@scalar/api-reference 1.28.12 → 1.28.13

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.
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaDiscriminator.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaDiscriminator.vue"],"names":[],"mappings":"AAoLA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAQ9E,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,MAAM,CAAA;IACrB,OAAO,CAAC,EACJ,SAAS,CAAC,iBAAiB,GAC3B,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,YAAY,CAAC,GACtC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC,GACxC,OAAO,CAAA;IACX,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAC;;AAuQF,wBAOG"}
1
+ {"version":3,"file":"SchemaDiscriminator.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaDiscriminator.vue"],"names":[],"mappings":"AAyNA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAQ9E,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,MAAM,CAAA;IACrB,OAAO,CAAC,EACJ,SAAS,CAAC,iBAAiB,GAC3B,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,YAAY,CAAC,GACtC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC,GACxC,OAAO,CAAA;IACX,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAC;;AA+QF,wBAOG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./SchemaDiscriminator.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const i = /* @__PURE__ */ r(o, [["__scopeId", "data-v-5f3b3a79"]]);
4
+ const i = /* @__PURE__ */ r(o, [["__scopeId", "data-v-0e576b82"]]);
5
5
  export {
6
6
  i as default
7
7
  };
@@ -1,9 +1,9 @@
1
- import { defineComponent as S, ref as A, openBlock as a, createElementBlock as c, createBlock as i, unref as n, withCtx as l, createVNode as d, createElementVNode as m, toDisplayString as f, Fragment as y, renderList as v, normalizeClass as T, createTextVNode as q } from "vue";
2
- import { TabGroup as B, TabList as N, Tab as V, TabPanel as j } from "@headlessui/vue";
3
- import { cva as w, cx as H } from "@scalar/components";
4
- import { stringify as b } from "flatted";
1
+ import { defineComponent as S, ref as A, openBlock as i, createElementBlock as c, createBlock as o, unref as l, withCtx as n, createVNode as m, createElementVNode as p, toDisplayString as f, Fragment as y, renderList as b, normalizeClass as q } from "vue";
2
+ import { TabGroup as B, TabList as T, Tab as j, TabPanel as H } from "@headlessui/vue";
3
+ import { cva as N, cx as V } from "@scalar/components";
4
+ import { stringify as v } from "flatted";
5
5
  import g from "./Schema.vue.js";
6
- const L = { class: "property-rule" }, z = { class: "flex items-center gap-1.5 overflow-x-auto" }, G = /* @__PURE__ */ S({
6
+ const w = { class: "property-rule" }, z = { class: "text-c-3" }, L = { class: "flex items-center gap-1.5" }, D = { class: "schema-tab-label z-1 relative" }, G = /* @__PURE__ */ S({
7
7
  __name: "SchemaDiscriminator",
8
8
  props: {
9
9
  discriminator: {},
@@ -14,25 +14,25 @@ const L = { class: "property-rule" }, z = { class: "flex items-center gap-1.5 ov
14
14
  hideHeading: { type: Boolean }
15
15
  },
16
16
  setup(h) {
17
- const s = h, p = A(0), k = w({
18
- base: "py-0.75 h-fit rounded-full border px-2 text-sm font-medium transition-colors",
17
+ const s = h, u = A(0), k = N({
18
+ base: "schema-tab",
19
19
  variants: {
20
20
  selected: {
21
- true: "bg-b-accent text-c-accent hover:text-c-accent",
22
- false: "bg-transparent text-c-2 hover:text-c-1"
21
+ true: "schema-tab-selected",
22
+ false: "text-c-3"
23
23
  }
24
24
  }
25
- }), u = (e) => {
25
+ }), d = (e) => {
26
26
  if (!Array.isArray(e) || e.length === 0)
27
27
  return {};
28
28
  if (e.length > 0 && e[0].allOf) {
29
- const o = e.flatMap((r) => r.allOf || []);
30
- return u(o);
29
+ const a = e.flatMap((r) => r.allOf || []);
30
+ return d(a);
31
31
  }
32
- return e.reduce((o, r) => {
32
+ return e.reduce((a, r) => {
33
33
  if (!r || typeof r != "object")
34
- return o;
35
- const t = { ...o };
34
+ return a;
35
+ const t = { ...a };
36
36
  return r.properties && (t.properties = {
37
37
  ...t.properties,
38
38
  ...r.properties
@@ -47,30 +47,30 @@ const L = { class: "property-rule" }, z = { class: "flex items-center gap-1.5 ov
47
47
  if (e.name)
48
48
  return e.name;
49
49
  if (s.schemas && typeof s.schemas == "object") {
50
- for (const [o, r] of Object.entries(s.schemas))
51
- if (b(r) === b(e))
52
- return o;
50
+ for (const [a, r] of Object.entries(s.schemas))
51
+ if (v(r) === v(e))
52
+ return a;
53
53
  return Object.keys(e)[0];
54
54
  }
55
55
  return null;
56
- }, C = (e) => e.replace(/([A-Z])/g, " $1").replace(/^./, (o) => o.toUpperCase()).toLowerCase().replace(/^(\w)/, (o) => o.toUpperCase());
57
- return (e, o) => (a(), c("div", L, [
58
- e.discriminator === "oneOf" || e.discriminator === "anyOf" ? (a(), i(n(B), { key: 0 }, {
59
- default: l(() => [
60
- d(n(N), { class: "discriminator-tab-list py-1.25 flex items-center gap-2 rounded-t-lg border border-b-0 px-2 pr-3" }, {
61
- default: l(() => [
62
- m("span", null, f(C(e.discriminator)), 1),
63
- m("div", z, [
64
- (a(!0), c(y, null, v(e.value[e.discriminator], (r, t) => (a(), i(n(V), {
56
+ }, C = (e) => e.replace(/([A-Z])/g, " $1").replace(/^./, (a) => a.toUpperCase()).toLowerCase().replace(/^(\w)/, (a) => a.toUpperCase());
57
+ return (e, a) => (i(), c("div", w, [
58
+ e.discriminator === "oneOf" || e.discriminator === "anyOf" ? (i(), o(l(B), { key: 0 }, {
59
+ default: n(() => [
60
+ m(l(T), { class: "discriminator-tab-list py-1.25 flex flex-col gap-1 rounded-t-lg border border-b-0 px-2 pr-3" }, {
61
+ default: n(() => [
62
+ p("span", z, f(C(e.discriminator)), 1),
63
+ p("div", L, [
64
+ (i(!0), c(y, null, b(e.value[e.discriminator], (r, t) => (i(), o(l(j), {
65
65
  key: t,
66
- class: T([
66
+ class: q([
67
67
  "cursor-pointer",
68
- n(H)(n(k)({ selected: p.value === t }))
68
+ l(V)(l(k)({ selected: u.value === t }))
69
69
  ]),
70
- onClick: (D) => p.value = t
70
+ onClick: (E) => u.value = t
71
71
  }, {
72
- default: l(() => [
73
- q(f(O(r) || "Schema"), 1)
72
+ default: n(() => [
73
+ p("span", D, f(O(r) || "Schema"), 1)
74
74
  ]),
75
75
  _: 2
76
76
  }, 1032, ["class", "onClick"]))), 128))
@@ -78,12 +78,12 @@ const L = { class: "property-rule" }, z = { class: "flex items-center gap-1.5 ov
78
78
  ]),
79
79
  _: 1
80
80
  }),
81
- (a(!0), c(y, null, v(e.value[e.discriminator], (r, t) => (a(), i(n(j), {
81
+ (i(!0), c(y, null, b(e.value[e.discriminator], (r, t) => (i(), o(l(H), {
82
82
  key: t,
83
83
  class: "discriminator-panel"
84
84
  }, {
85
- default: l(() => [
86
- d(g, {
85
+ default: n(() => [
86
+ m(g, {
87
87
  compact: e.compact,
88
88
  hideHeading: e.hideHeading,
89
89
  noncollapsible: !0,
@@ -95,13 +95,13 @@ const L = { class: "property-rule" }, z = { class: "flex items-center gap-1.5 ov
95
95
  }, 1024))), 128))
96
96
  ]),
97
97
  _: 1
98
- })) : (a(), i(g, {
98
+ })) : (i(), o(g, {
99
99
  key: 1,
100
100
  compact: e.compact,
101
101
  level: e.level,
102
102
  noncollapsible: e.level == 0,
103
103
  schemas: e.schemas,
104
- value: u(e.value[e.discriminator])
104
+ value: d(e.value[e.discriminator])
105
105
  }, null, 8, ["compact", "level", "noncollapsible", "schemas", "value"]))
106
106
  ]));
107
107
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaProperty.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaProperty.vue"],"names":[],"mappings":"AAmgBA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAc9E;;;;;GAKG;AAEH,KAAK,WAAW,GAAG;IACf,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,OAAO,CAAC,EACJ,SAAS,CAAC,iBAAiB,GAC3B,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,YAAY,CAAC,GACtC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC,GACxC,OAAO,CAAA;IACX,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAC;;cAZW,OAAO;WAFV,MAAM;aAGJ,OAAO;kBAIF,OAAO;;AA4c1B,0BAQG"}
1
+ {"version":3,"file":"SchemaProperty.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaProperty.vue"],"names":[],"mappings":"AA4gBA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAc9E;;;;;GAKG;AAEH,KAAK,WAAW,GAAG;IACf,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,OAAO,CAAC,EACJ,SAAS,CAAC,iBAAiB,GAC3B,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,YAAY,CAAC,GACtC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,YAAY,CAAC,GACxC,OAAO,CAAA;IACX,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAC;;cAZW,OAAO;WAFV,MAAM;aAGJ,OAAO;kBAIF,OAAO;;AAod1B,0BAQG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./SchemaProperty.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-eab09a54"]]);
4
+ const a = /* @__PURE__ */ r(o, [["__scopeId", "data-v-04d58839"]]);
5
5
  export {
6
- m as default
6
+ a as default
7
7
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ApiClientModal.vue.d.ts","sourceRoot":"","sources":["../../../src/features/ApiClientModal/ApiClientModal.vue"],"names":[],"mappings":"AAuDA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AASzE,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,OAAO,CAAC,sBAAsB,CAAC,CAAA;CAC/C,CAAC;;AA6FF,wBAOG"}
1
+ {"version":3,"file":"ApiClientModal.vue.d.ts","sourceRoot":"","sources":["../../../src/features/ApiClientModal/ApiClientModal.vue"],"names":[],"mappings":"AAoEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AAWzE,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,OAAO,CAAC,sBAAsB,CAAC,CAAA;CAC/C,CAAC;;AAwGF,wBAOG"}
@@ -1,39 +1,42 @@
1
- import { defineComponent as c, ref as p, onMounted as m, watch as f, onBeforeUnmount as s, openBlock as d, createElementBlock as v } from "vue";
2
- import { useWorkspace as x } from "@scalar/api-client/store";
1
+ import { defineComponent as m, ref as p, onMounted as f, watch as s, onBeforeUnmount as d, openBlock as v, createElementBlock as x } from "vue";
2
+ import { useWorkspace as E } from "@scalar/api-client/store";
3
3
  import { watchDebounced as g } from "@vueuse/core";
4
4
  import { useApiClient as k } from "./useApiClient.js";
5
- import { useExampleStore as C } from "../../legacy/stores/useExampleStore.js";
6
- const A = /* @__PURE__ */ c({
5
+ import { useNavState as C } from "../../hooks/useNavState.js";
6
+ import { useExampleStore as _ } from "../../legacy/stores/useExampleStore.js";
7
+ const S = /* @__PURE__ */ m({
7
8
  __name: "ApiClientModal",
8
9
  props: {
9
10
  configuration: {}
10
11
  },
11
- setup(r) {
12
- const t = p(null), { client: o, init: a } = k(), { selectedExampleKey: l, operationId: u } = C(), i = x();
13
- return m(() => {
14
- t.value && a({
15
- el: t.value,
16
- configuration: r.configuration,
17
- store: i
12
+ setup(u) {
13
+ const o = p(null), { client: t, init: i } = k(), { selectedExampleKey: l, operationId: a } = _(), c = E(), { isIntersectionEnabled: r } = C();
14
+ return f(() => {
15
+ o.value && i({
16
+ el: o.value,
17
+ configuration: u.configuration,
18
+ store: c
18
19
  });
19
20
  }), g(
20
- () => r.configuration,
21
+ () => u.configuration,
21
22
  (e) => {
22
23
  var n;
23
- return e && ((n = o.value) == null ? void 0 : n.updateConfig(e));
24
+ e && (r.value = !1, (n = t.value) == null || n.updateConfig(e), setTimeout(() => {
25
+ r.value = !0;
26
+ }, 1e3));
24
27
  },
25
28
  { deep: !0, debounce: 300 }
26
- ), f(l, (e) => {
27
- o.value && e && u.value && o.value.updateExample(e, u.value);
28
- }), s(() => {
29
+ ), s(l, (e) => {
30
+ t.value && e && a.value && t.value.updateExample(e, a.value);
31
+ }), d(() => {
29
32
  var e;
30
- return (e = o.value) == null ? void 0 : e.app.unmount();
31
- }), (e, n) => (d(), v("div", {
33
+ return (e = t.value) == null ? void 0 : e.app.unmount();
34
+ }), (e, n) => (v(), x("div", {
32
35
  ref_key: "el",
33
- ref: t
36
+ ref: o
34
37
  }, null, 512));
35
38
  }
36
39
  });
37
40
  export {
38
- A as default
41
+ S as default
39
42
  };