@scalar/api-reference 1.32.5 → 1.32.7

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 (94) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/dist/browser/standalone.js +9924 -9851
  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 +8 -8
  6. package/dist/components/Badge/Badge.vue.js +1 -1
  7. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.d.ts.map +1 -1
  8. package/dist/components/Content/ClientLibraries/ClientLibraries.vue.js +1 -1
  9. package/dist/components/Content/ClientLibraries/ClientLibraries.vue2.js +28 -26
  10. package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
  11. package/dist/components/Content/Schema/Schema.vue.js +2 -2
  12. package/dist/components/Content/Schema/Schema.vue2.js +97 -156
  13. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.d.ts +7 -0
  14. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.d.ts.map +1 -0
  15. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue.js +7 -0
  16. package/dist/components/Content/Schema/SchemaEnumPropertyItem.vue2.js +25 -0
  17. package/dist/components/Content/Schema/SchemaEnumValues.vue.d.ts.map +1 -1
  18. package/dist/components/Content/Schema/SchemaEnumValues.vue.js +1 -1
  19. package/dist/components/Content/Schema/SchemaEnumValues.vue2.js +73 -90
  20. package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts +21 -0
  21. package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts.map +1 -0
  22. package/dist/components/Content/Schema/SchemaObjectProperties.vue.js +92 -0
  23. package/dist/components/Content/Schema/SchemaObjectProperties.vue2.js +4 -0
  24. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +1 -2
  25. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  26. package/dist/components/Content/Schema/SchemaProperty.vue.js +2 -2
  27. package/dist/components/Content/Schema/SchemaProperty.vue2.js +54 -55
  28. package/dist/components/Content/Schema/SchemaPropertyExamples.vue.js +2 -2
  29. package/dist/components/Content/Schema/SchemaPropertyExamples.vue2.js +1 -1
  30. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts +0 -2
  31. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.d.ts.map +1 -1
  32. package/dist/components/Content/Schema/SchemaPropertyHeading.vue.js +1 -1
  33. package/dist/components/Content/Schema/SchemaPropertyHeading.vue2.js +81 -97
  34. package/dist/components/Content/Schema/helpers/{formatExample.d.ts → format-example.d.ts} +1 -1
  35. package/dist/components/Content/Schema/helpers/format-example.d.ts.map +1 -0
  36. package/dist/components/Content/Schema/helpers/is-type-object.d.ts +3 -0
  37. package/dist/components/Content/Schema/helpers/is-type-object.d.ts.map +1 -0
  38. package/dist/components/Content/Schema/helpers/is-type-object.js +17 -0
  39. package/dist/components/Content/Schema/helpers/{optimizeValueForDisplay.d.ts → optimize-value-for-display.d.ts} +1 -1
  40. package/dist/components/Content/Schema/helpers/optimize-value-for-display.d.ts.map +1 -0
  41. package/dist/components/Content/Tag/OperationsListItem.vue.d.ts.map +1 -1
  42. package/dist/components/Content/Tag/OperationsListItem.vue.js +2 -2
  43. package/dist/components/Content/Tag/OperationsListItem.vue2.js +1 -1
  44. package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -2
  45. package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
  46. package/dist/features/Operation/components/ParameterListItem.vue.js +1 -1
  47. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts +4 -2
  48. package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
  49. package/dist/features/Operation/layouts/ClassicLayout.vue.js +2 -2
  50. package/dist/features/Operation/layouts/ClassicLayout.vue2.js +8 -8
  51. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts +4 -2
  52. package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
  53. package/dist/features/Operation/layouts/ModernLayout.vue.js +2 -2
  54. package/dist/features/Operation/layouts/ModernLayout.vue2.js +30 -30
  55. package/dist/features/api-client-modal/useApiClient.d.ts +84 -4
  56. package/dist/features/api-client-modal/useApiClient.d.ts.map +1 -1
  57. package/dist/features/download-link/DownloadLink.vue.d.ts.map +1 -1
  58. package/dist/features/download-link/DownloadLink.vue.js +1 -1
  59. package/dist/features/example-request/ExampleRequest.vue.d.ts.map +1 -1
  60. package/dist/features/example-request/ExampleRequest.vue.js +1 -1
  61. package/dist/features/example-request/ExampleRequest.vue2.js +126 -124
  62. package/dist/features/example-responses/ExampleResponse.vue.js +2 -2
  63. package/dist/features/example-responses/ExampleResponses.vue.js +2 -2
  64. package/dist/features/sidebar/components/SidebarElement.vue.d.ts.map +1 -1
  65. package/dist/features/sidebar/components/SidebarElement.vue.js +2 -2
  66. package/dist/features/sidebar/components/SidebarElement.vue2.js +16 -15
  67. package/dist/helpers/convert-security-scheme.d.ts +9 -0
  68. package/dist/helpers/convert-security-scheme.d.ts.map +1 -0
  69. package/dist/index.js +1 -1
  70. package/dist/libs/openapi.d.ts +0 -13
  71. package/dist/libs/openapi.d.ts.map +1 -1
  72. package/dist/libs/openapi.js +49 -63
  73. package/dist/stores/useHttpClientStore.js +20 -20
  74. package/dist/style.css +1 -1
  75. package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
  76. package/dist/v2/ApiReferenceWorkspace.vue.js +84 -75
  77. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.d.ts +19 -0
  78. package/dist/v2/blocks/scalar-request-example-block/components/ExamplePicker.vue.d.ts.map +1 -0
  79. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts +21 -72
  80. package/dist/v2/blocks/scalar-request-example-block/components/RequestExample.vue.d.ts.map +1 -1
  81. package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.d.ts +4 -2
  82. package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.d.ts.map +1 -1
  83. package/dist/v2/blocks/scalar-request-example-block/helpers/find-client.js +5 -0
  84. package/dist/v2/blocks/scalar-request-example-block/index.d.ts +1 -0
  85. package/dist/v2/blocks/scalar-request-example-block/index.d.ts.map +1 -1
  86. package/dist/v2/events/definitions.d.ts +13 -4
  87. package/dist/v2/events/definitions.d.ts.map +1 -1
  88. package/dist/v2/hooks/useStore.d.ts +9 -0
  89. package/dist/v2/hooks/useStore.d.ts.map +1 -0
  90. package/package.json +13 -12
  91. package/dist/components/Content/Schema/helpers/formatExample.d.ts.map +0 -1
  92. package/dist/components/Content/Schema/helpers/optimizeValueForDisplay.d.ts.map +0 -1
  93. /package/dist/components/Content/Schema/helpers/{formatExample.js → format-example.js} +0 -0
  94. /package/dist/components/Content/Schema/helpers/{optimizeValueForDisplay.js → optimize-value-for-display.js} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"ApiReference.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApiReference.vue"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAA;AAO/E,KAAK,WAAW,GAAG;IACjB;;;OAGG;IACH,aAAa,CAAC,EAAE,4BAA4B,CAAA;CAC7C,CAAC;;AAqEF,wBAOG"}
1
+ {"version":3,"file":"ApiReference.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApiReference.vue"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAA;AAO/E,KAAK,WAAW,GAAG;IACjB;;;OAGG;IACH,aAAa,CAAC,EAAE,4BAA4B,CAAA;CAC7C,CAAC;;AA0EF,wBAOG"}
@@ -1,20 +1,20 @@
1
- import { defineComponent as r, createBlock as t, openBlock as n, unref as c } from "vue";
2
- import { createWorkspaceStore as p } from "@scalar/workspace-store/client";
3
- import a from "../v2/ApiReferenceWorkspace.vue.js";
1
+ import { defineComponent as r, createBlock as n, openBlock as t, unref as c } from "vue";
2
+ import { createWorkspaceStore as i } from "@scalar/workspace-store/client";
3
+ import p from "../v2/ApiReferenceWorkspace.vue.js";
4
4
  /* empty css */
5
- const g = /* @__PURE__ */ r({
5
+ const d = /* @__PURE__ */ r({
6
6
  __name: "ApiReference",
7
7
  props: {
8
8
  configuration: {}
9
9
  },
10
- setup(i) {
11
- const o = p();
12
- return (e, f) => (n(), t(a, {
10
+ setup(a) {
11
+ const o = i();
12
+ return typeof window < "u" && (window.dataDumpWorkspace = () => o), (e, f) => (t(), n(p, {
13
13
  getWorkspaceStore: () => c(o),
14
14
  configuration: e.configuration
15
15
  }, null, 8, ["getWorkspaceStore", "configuration"]));
16
16
  }
17
17
  });
18
18
  export {
19
- g as default
19
+ d as default
20
20
  };
@@ -7,7 +7,7 @@ function s(e, a) {
7
7
  r(e.$slots, "default", {}, void 0, !0)
8
8
  ]);
9
9
  }
10
- const l = /* @__PURE__ */ c(n, [["render", s], ["__scopeId", "data-v-75480129"]]);
10
+ const l = /* @__PURE__ */ c(n, [["render", s], ["__scopeId", "data-v-2a0118c0"]]);
11
11
  export {
12
12
  l as default
13
13
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ClientLibraries.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/ClientLibraries/ClientLibraries.vue"],"names":[],"mappings":";AAudA,wBAKG"}
1
+ {"version":3,"file":"ClientLibraries.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/ClientLibraries/ClientLibraries.vue"],"names":[],"mappings":";AA2dA,wBAKG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./ClientLibraries.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const a = /* @__PURE__ */ r(o, [["__scopeId", "data-v-21cf9eeb"]]);
4
+ const a = /* @__PURE__ */ r(o, [["__scopeId", "data-v-d0decf3e"]]);
5
5
  export {
6
6
  a as default
7
7
  };
@@ -1,5 +1,5 @@
1
- import { defineComponent as K, ref as w, useId as y, watch as P, onMounted as B, computed as F, createElementBlock as l, createCommentVNode as b, unref as e, openBlock as n, createVNode as i, withCtx as m, createElementVNode as V, Fragment as h, normalizeClass as H, renderList as A, createBlock as D, createTextVNode as M, toDisplayString as p } from "vue";
2
- import { TabGroup as O, TabList as R, TabPanels as j, TabPanel as z } from "@headlessui/vue";
1
+ import { defineComponent as K, ref as P, useId as y, watch as w, onMounted as B, computed as D, createElementBlock as l, createCommentVNode as _, unref as e, openBlock as n, createVNode as i, withCtx as m, createElementVNode as F, Fragment as h, normalizeClass as V, renderList as A, createBlock as H, createTextVNode as R, toDisplayString as p } from "vue";
2
+ import { TabGroup as M, TabList as O, TabPanels as j, TabPanel as z } from "@headlessui/vue";
3
3
  import { useWorkspace as G } from "@scalar/api-client/store";
4
4
  import { ScalarMarkdown as J, ScalarCodeBlock as W } from "@scalar/components";
5
5
  import { REFERENCE_LS_KEYS as Y } from "@scalar/helpers/object/local-storage";
@@ -16,14 +16,14 @@ const Z = { key: 0 }, $ = ["id"], X = {
16
16
  setup(te) {
17
17
  const {
18
18
  availableTargets: T,
19
- httpTargetTitle: k,
20
- httpClientTitle: x,
21
- getClientTitle: E,
19
+ httpTargetTitle: E,
20
+ httpClientTitle: k,
21
+ getClientTitle: x,
22
22
  getTargetTitle: L,
23
23
  httpClient: a,
24
- setHttpClient: _
25
- } = q(), { featuredClients: d, isFeatured: S } = U(), I = G(), g = w(0), v = y(), C = y();
26
- P(
24
+ setHttpClient: b
25
+ } = q(), { featuredClients: d, isFeatured: S } = U(), I = G(), g = P(0), C = y(), v = y();
26
+ w(
27
27
  a,
28
28
  (t) => {
29
29
  t && (g.value = d.findIndex(
@@ -34,13 +34,15 @@ const Z = { key: 0 }, $ = ["id"], X = {
34
34
  );
35
35
  function N(t) {
36
36
  const o = d[t];
37
- o && _(o);
37
+ o && b(o);
38
38
  }
39
39
  B(() => {
40
- const t = localStorage.getItem(Y.SELECTED_CLIENT);
41
- t && _(JSON.parse(t));
40
+ const t = localStorage.getItem(
41
+ Y.SELECTED_CLIENT_DEPRECATED
42
+ );
43
+ t && b(JSON.parse(t));
42
44
  });
43
- const r = F(() => {
45
+ const r = D(() => {
44
46
  var c;
45
47
  const t = Object.values(I.collections)[0], o = (c = t == null ? void 0 : t.info) == null ? void 0 : c["x-scalar-sdk-installation"];
46
48
  if (!Array.isArray(o) || !(o != null && o.length))
@@ -55,24 +57,24 @@ const Z = { key: 0 }, $ = ["id"], X = {
55
57
  return s;
56
58
  });
57
59
  return (t, o) => e(T).length ? (n(), l("div", Z, [
58
- i(e(O), {
60
+ i(e(M), {
59
61
  manual: "",
60
62
  selectedIndex: g.value,
61
63
  onChange: N
62
64
  }, {
63
65
  default: m(() => [
64
- V("div", {
65
- id: e(v),
66
+ F("div", {
67
+ id: e(C),
66
68
  class: "client-libraries-heading"
67
69
  }, " Client Libraries ", 8, $),
68
- i(e(R), {
69
- "aria-labelledby": e(v),
70
+ i(e(O), {
71
+ "aria-labelledby": e(C),
70
72
  class: "client-libraries-list"
71
73
  }, {
72
74
  default: m(() => [
73
75
  i(Q, {
74
76
  featured: e(d),
75
- morePanel: e(C)
77
+ morePanel: e(v)
76
78
  }, null, 8, ["featured", "morePanel"])
77
79
  ]),
78
80
  _: 1
@@ -84,14 +86,14 @@ const Z = { key: 0 }, $ = ["id"], X = {
84
86
  (s = r.value) != null && s.source || (c = r.value) != null && c.description ? (n(), l(h, { key: 0 }, [
85
87
  r.value.description ? (n(), l("div", {
86
88
  key: 0,
87
- class: H(["selected-client card-footer -outline-offset-2", r.value.source && "rounded-b-none"]),
89
+ class: V(["selected-client card-footer -outline-offset-2", r.value.source && "rounded-b-none"]),
88
90
  role: "tabpanel",
89
91
  tabindex: "0"
90
92
  }, [
91
93
  i(e(J), {
92
94
  value: r.value.description
93
95
  }, null, 8, ["value"])
94
- ], 2)) : b("", !0),
96
+ ], 2)) : _("", !0),
95
97
  r.value.source ? (n(), l("div", X, [
96
98
  i(e(W), {
97
99
  lang: "shell",
@@ -99,22 +101,22 @@ const Z = { key: 0 }, $ = ["id"], X = {
99
101
  copy: !0,
100
102
  class: "rounded-t-none rounded-b-lg px-3 py-2 -outline-offset-1 has-focus:outline"
101
103
  }, null, 8, ["content"])
102
- ])) : b("", !0)
103
- ], 64)) : e(a) && e(S)(e(a)) ? (n(!0), l(h, { key: 1 }, A(e(d), (u, f) => (n(), D(e(z), {
104
+ ])) : _("", !0)
105
+ ], 64)) : e(a) && e(S)(e(a)) ? (n(!0), l(h, { key: 1 }, A(e(d), (u, f) => (n(), H(e(z), {
104
106
  key: f,
105
107
  class: "selected-client card-footer -outline-offset-2"
106
108
  }, {
107
109
  default: m(() => [
108
- M(p(e(E)(u)) + " " + p(e(L)(u)), 1)
110
+ R(p(e(x)(u)) + " " + p(e(L)(u)), 1)
109
111
  ]),
110
112
  _: 2
111
113
  }, 1024))), 128)) : (n(), l("div", {
112
114
  key: 2,
113
- id: e(C),
115
+ id: e(v),
114
116
  class: "selected-client card-footer -outline-offset-2",
115
117
  role: "tabpanel",
116
118
  tabindex: "0"
117
- }, p(e(x)) + " " + p(e(k)), 9, ee))
119
+ }, p(e(k)) + " " + p(e(E)), 9, ee))
118
120
  ];
119
121
  }),
120
122
  _: 1
@@ -122,7 +124,7 @@ const Z = { key: 0 }, $ = ["id"], X = {
122
124
  ]),
123
125
  _: 1
124
126
  }, 8, ["selectedIndex"])
125
- ])) : b("", !0);
127
+ ])) : _("", !0);
126
128
  }
127
129
  });
128
130
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"Schema.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/Schema.vue"],"names":[],"mappings":"AA+fA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAIxD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAA;AAQjE,KAAK,WAAW,GAAG;IACf,KAAK,CAAC,EACF,WAAW,CAAC,eAAe,GAC3B,WAAW,CAAC,YAAY,GACxB,WAAW,CAAC,iBAAiB,GAC7B,WAAW,CAAC,oBAAoB,GAChC,WAAW,CAAC,YAAY,GACxB,WAAW,CAAC,iBAAiB,GAC7B,WAAW,CAAC,oBAAoB,CAAA;IACpC,gCAAgC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,+DAA+D;IAC/D,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,2CAA2C;IAC3C,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,+FAA+F;IAC/F,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,uCAAuC;IACvC,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,2CAA2C;IAC3C,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,6BAA6B;IAC7B,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,4BAA4B;IAC5B,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC7C,kCAAkC;IAClC,yBAAyB,CAAC,EAAE,MAAM,CAAA;IAClC,6CAA6C;IAC7C,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B,CAAC;;;;;;WAtBQ,MAAM;oBAMG,OAAO;oBAKP,OAAO;;AA0mB5B,wBAQG"}
1
+ {"version":3,"file":"Schema.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/Schema.vue"],"names":[],"mappings":"AAiZA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAIxD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAA;AAUjE,KAAK,WAAW,GAAG;IACf,KAAK,CAAC,EACF,WAAW,CAAC,eAAe,GAC3B,WAAW,CAAC,YAAY,GACxB,WAAW,CAAC,iBAAiB,GAC7B,WAAW,CAAC,oBAAoB,GAChC,WAAW,CAAC,YAAY,GACxB,WAAW,CAAC,iBAAiB,GAC7B,WAAW,CAAC,oBAAoB,CAAA;IACpC,gCAAgC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,+DAA+D;IAC/D,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,2CAA2C;IAC3C,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,+FAA+F;IAC/F,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,uCAAuC;IACvC,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,2CAA2C;IAC3C,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,6BAA6B;IAC7B,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,4BAA4B;IAC5B,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC7C,kCAAkC;IAClC,yBAAyB,CAAC,EAAE,MAAM,CAAA;IAClC,6CAA6C;IAC7C,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B,CAAC;;;;;;WAtBQ,MAAM;oBAMG,OAAO;oBAKP,OAAO;;AAgd5B,wBAQG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./Schema.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-e2ccf7a4"]]);
4
+ const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-67eca159"]]);
5
5
  export {
6
- r as default
6
+ c as default
7
7
  };
@@ -1,17 +1,19 @@
1
- import { defineComponent as Q, inject as W, computed as p, createBlock as s, createCommentVNode as n, openBlock as i, unref as u, withCtx as v, createElementVNode as I, normalizeClass as P, createElementBlock as d, withDirectives as E, createVNode as k, createTextVNode as M, toDisplayString as H, vShow as R, normalizeStyle as Y, Fragment as m, renderList as $ } from "vue";
2
- import { Disclosure as Z, DisclosureButton as F, DisclosurePanel as _ } from "@headlessui/vue";
3
- import { ScalarMarkdown as x, ScalarIcon as V } from "@scalar/components";
4
- import L from "../../ScreenReader.vue.js";
5
- import { DISCRIMINATOR_CONTEXT as ee } from "../../../hooks/useDiscriminator.js";
6
- import ae from "./SchemaHeading.vue.js";
7
- import b from "./SchemaProperty.vue.js";
8
- const ie = {
1
+ import { defineComponent as U, inject as F, computed as c, createBlock as t, createCommentVNode as n, openBlock as l, unref as s, withCtx as d, createElementVNode as C, normalizeClass as p, createElementBlock as m, withDirectives as T, createVNode as h, createTextVNode as v, toDisplayString as g, vShow as A, normalizeStyle as X, Fragment as f } from "vue";
2
+ import { Disclosure as q, DisclosureButton as j, DisclosurePanel as G } from "@headlessui/vue";
3
+ import { ScalarMarkdown as J, ScalarIcon as k } from "@scalar/components";
4
+ import z from "../../ScreenReader.vue.js";
5
+ import { DISCRIMINATOR_CONTEXT as K } from "../../../hooks/useDiscriminator.js";
6
+ import { isTypeObject as N } from "./helpers/is-type-object.js";
7
+ import L from "./SchemaHeading.vue.js";
8
+ import Q from "./SchemaObjectProperties.vue.js";
9
+ import W from "./SchemaProperty.vue.js";
10
+ const Y = {
9
11
  key: 0,
10
12
  class: "schema-card-description"
11
- }, le = {
13
+ }, Z = {
12
14
  key: 0,
13
15
  class: "schema-properties"
14
- }, ue = /* @__PURE__ */ Q({
16
+ }, te = /* @__PURE__ */ U({
15
17
  __name: "Schema",
16
18
  props: {
17
19
  value: { type: [Object, Boolean] },
@@ -29,73 +31,73 @@ const ie = {
29
31
  hasDiscriminator: { type: Boolean }
30
32
  },
31
33
  emits: ["update:modelValue"],
32
- setup(X, { emit: G }) {
33
- const o = X, J = G, r = W(ee, null), h = p(
34
+ setup(I, { emit: E }) {
35
+ const r = I, R = E, i = F(K, null), M = c(
34
36
  () => {
35
37
  var e;
36
- return ((e = r == null ? void 0 : r.value) == null ? void 0 : e.discriminatorMapping) || o.discriminatorMapping || {};
38
+ return ((e = i == null ? void 0 : i.value) == null ? void 0 : e.discriminatorMapping) || r.discriminatorMapping || {};
37
39
  }
38
- ), c = p(
40
+ ), P = c(
39
41
  () => {
40
42
  var e;
41
- return ((e = r == null ? void 0 : r.value) == null ? void 0 : e.discriminatorPropertyName) || o.discriminatorPropertyName || "";
43
+ return ((e = i == null ? void 0 : i.value) == null ? void 0 : e.discriminatorPropertyName) || r.discriminatorPropertyName || "";
42
44
  }
43
- ), D = p(
45
+ ), S = c(
44
46
  () => {
45
47
  var e;
46
- return ((e = r == null ? void 0 : r.value) == null ? void 0 : e.selectedType) || o.discriminator;
48
+ return ((e = i == null ? void 0 : i.value) == null ? void 0 : e.selectedType) || r.discriminator;
47
49
  }
48
- ), O = (e) => e !== null && typeof e == "object" && "type" in e && e.type === "object", a = p(() => {
49
- var t;
50
- const e = (t = r == null ? void 0 : r.value) == null ? void 0 : t.mergedSchema, S = o.value;
51
- return e && o.level === 0 && o.hasDiscriminator && O(S) && O(e) ? e : o.value;
52
- }), j = p(() => !(o.noncollapsible || o.level === 0)), K = p(() => {
50
+ ), a = c(() => {
51
+ var o;
52
+ const e = (o = i == null ? void 0 : i.value) == null ? void 0 : o.mergedSchema, y = r.value;
53
+ return e && r.level === 0 && r.hasDiscriminator && N(y) && N(e) ? e : r.value;
54
+ }), b = c(() => !(r.noncollapsible || r.level === 0)), $ = c(() => {
53
55
  var e;
54
- return !(!((e = a.value) != null && e.description) || typeof a.value.description != "string" || a.value.allOf || a.value.oneOf || a.value.anyOf || a.value.enum || !a.value.properties && !a.value.patternProperties && !a.value.additionalProperties || o.level === 0);
55
- }), B = (e) => o.noncollapsible && e.stopPropagation(), y = (e) => {
56
- J("update:modelValue", e);
56
+ return !(!((e = a.value) != null && e.description) || typeof a.value.description != "string" || a.value.allOf || a.value.oneOf || a.value.anyOf || a.value.enum || !a.value.properties && !a.value.patternProperties && !a.value.additionalProperties || r.level === 0);
57
+ }), D = (e) => r.noncollapsible && e.stopPropagation(), B = (e) => {
58
+ R("update:modelValue", e);
57
59
  };
58
- return (e, S) => typeof e.value == "object" && Object.keys(e.value).length ? (i(), s(u(Z), {
60
+ return (e, y) => typeof e.value == "object" && Object.keys(e.value).length ? (l(), t(s(q), {
59
61
  key: 0,
60
62
  defaultOpen: e.noncollapsible
61
63
  }, {
62
- default: v(({ open: t }) => {
63
- var w, C;
64
+ default: d(({ open: o }) => {
65
+ var H, O;
64
66
  return [
65
- I("div", {
66
- class: P(["schema-card", [
67
+ C("div", {
68
+ class: p(["schema-card", [
67
69
  `schema-card--level-${e.level}`,
68
- { "schema-card--compact": e.compact, "schema-card--open": t },
69
- { "border-t": e.additionalProperties && t }
70
+ { "schema-card--compact": e.compact, "schema-card--open": o },
71
+ { "border-t": e.additionalProperties && o }
70
72
  ]])
71
73
  }, [
72
- K.value ? (i(), d("div", ie, [
73
- (w = a.value) != null && w.enum ? n("", !0) : (i(), s(u(x), {
74
+ $.value ? (l(), m("div", Y, [
75
+ (H = a.value) != null && H.enum ? n("", !0) : (l(), t(s(J), {
74
76
  key: 0,
75
- value: (C = a.value) == null ? void 0 : C.description
77
+ value: (O = a.value) == null ? void 0 : O.description
76
78
  }, null, 8, ["value"]))
77
79
  ])) : n("", !0),
78
- I("div", {
79
- class: P(["schema-properties", {
80
- "schema-properties-open": t
80
+ C("div", {
81
+ class: p(["schema-properties", {
82
+ "schema-properties-open": o
81
83
  }])
82
84
  }, [
83
- e.additionalProperties ? E((i(), d("div", le, [
84
- k(u(F), {
85
+ e.additionalProperties ? T((l(), m("div", Z, [
86
+ h(s(j), {
85
87
  as: "button",
86
88
  class: "schema-card-title schema-card-title--compact",
87
- onClickCapture: B
89
+ onClickCapture: D
88
90
  }, {
89
- default: v(() => [
90
- k(u(V), {
91
+ default: d(() => [
92
+ h(s(k), {
91
93
  class: "schema-card-title-icon",
92
94
  icon: "Add",
93
95
  size: "sm"
94
96
  }),
95
- S[0] || (S[0] = M(" Show additional properties ")),
96
- e.name ? (i(), s(L, { key: 0 }, {
97
- default: v(() => [
98
- M("for " + H(e.name), 1)
97
+ y[0] || (y[0] = v(" Show additional properties ")),
98
+ e.name ? (l(), t(z, { key: 0 }, {
99
+ default: d(() => [
100
+ v("for " + g(e.name), 1)
99
101
  ]),
100
102
  _: 1
101
103
  })) : n("", !0)
@@ -103,44 +105,44 @@ const ie = {
103
105
  _: 1
104
106
  })
105
107
  ], 512)), [
106
- [R, !t]
107
- ]) : j.value ? E((i(), s(u(F), {
108
+ [A, !o]
109
+ ]) : b.value ? T((l(), t(s(j), {
108
110
  key: 1,
109
111
  as: e.noncollapsible ? "div" : "button",
110
- class: P(["schema-card-title", { "schema-card-title--compact": e.compact }]),
111
- style: Y({
112
+ class: p(["schema-card-title", { "schema-card-title--compact": e.compact }]),
113
+ style: X({
112
114
  top: `calc(var(--refs-header-height) + calc(var(--schema-title-height) * ${e.level}))`
113
115
  }),
114
- onClickCapture: B
116
+ onClickCapture: D
115
117
  }, {
116
- default: v(() => {
117
- var f, g, l;
118
+ default: d(() => {
119
+ var u, V, w;
118
120
  return [
119
- e.compact ? (i(), d(m, { key: 0 }, [
120
- k(u(V), {
121
- class: P(["schema-card-title-icon", { "schema-card-title-icon--open": t }]),
121
+ e.compact ? (l(), m(f, { key: 0 }, [
122
+ h(s(k), {
123
+ class: p(["schema-card-title-icon", { "schema-card-title-icon--open": o }]),
122
124
  icon: "Add",
123
125
  size: "sm"
124
126
  }, null, 8, ["class"]),
125
- t ? (i(), d(m, { key: 0 }, [
126
- M(" Hide " + H(((f = e.value) == null ? void 0 : f.title) ?? "Child Attributes"), 1)
127
- ], 64)) : (i(), d(m, { key: 1 }, [
128
- M(" Show " + H(((g = e.value) == null ? void 0 : g.title) ?? "Child Attributes"), 1)
127
+ o ? (l(), m(f, { key: 0 }, [
128
+ v(" Hide " + g(((u = e.value) == null ? void 0 : u.title) ?? "Child Attributes"), 1)
129
+ ], 64)) : (l(), m(f, { key: 1 }, [
130
+ v(" Show " + g(((V = e.value) == null ? void 0 : V.title) ?? "Child Attributes"), 1)
129
131
  ], 64)),
130
- e.name ? (i(), s(L, { key: 2 }, {
131
- default: v(() => [
132
- M("for " + H(e.name), 1)
132
+ e.name ? (l(), t(z, { key: 2 }, {
133
+ default: d(() => [
134
+ v("for " + g(e.name), 1)
133
135
  ]),
134
136
  _: 1
135
137
  })) : n("", !0)
136
- ], 64)) : (i(), d(m, { key: 1 }, [
137
- k(u(V), {
138
- class: P(["schema-card-title-icon", { "schema-card-title-icon--open": t }]),
138
+ ], 64)) : (l(), m(f, { key: 1 }, [
139
+ h(s(k), {
140
+ class: p(["schema-card-title-icon", { "schema-card-title-icon--open": o }]),
139
141
  icon: "Add",
140
142
  size: "sm"
141
143
  }, null, 8, ["class"]),
142
- k(ae, {
143
- name: ((l = e.value) == null ? void 0 : l.title) ?? e.name,
144
+ h(L, {
145
+ name: ((w = e.value) == null ? void 0 : w.title) ?? e.name,
144
146
  value: e.value
145
147
  }, null, 8, ["name", "value"])
146
148
  ], 64))
@@ -148,92 +150,31 @@ const ie = {
148
150
  }),
149
151
  _: 2
150
152
  }, 1032, ["as", "class", "style"])), [
151
- [R, !e.hideHeading && !(e.noncollapsible && e.compact)]
153
+ [A, !e.hideHeading && !(e.noncollapsible && e.compact)]
152
154
  ]) : n("", !0),
153
- !e.additionalProperties || t ? (i(), s(u(_), {
155
+ !e.additionalProperties || o ? (l(), t(s(G), {
154
156
  key: 2,
155
157
  as: "ul",
156
- static: !j.value
158
+ static: !b.value
157
159
  }, {
158
- default: v(() => {
159
- var f, g;
160
+ default: d(() => {
161
+ var u;
160
162
  return [
161
- a.value && typeof a.value == "object" && ("properties" in a.value || "additionalProperties" in a.value || "patternProperties" in a.value) ? (i(), d(m, { key: 0 }, [
162
- a.value.properties ? (i(!0), d(m, { key: 0 }, $(Object.keys(a.value.properties), (l) => {
163
- var N, A, T, z, U, q;
164
- return i(), s(b, {
165
- key: l,
166
- compact: e.compact,
167
- hideHeading: e.hideHeading,
168
- level: e.level + 1,
169
- name: l,
170
- hideModelNames: e.hideModelNames,
171
- required: ((N = a.value.required) == null ? void 0 : N.includes(l)) || ((A = a.value.properties[l]) == null ? void 0 : A.required) === !0,
172
- schemas: e.schemas,
173
- resolvedSchema: a.value.properties[l],
174
- value: {
175
- ...a.value.properties[l],
176
- parent: a.value,
177
- isDiscriminator: l === c.value || ((T = a.value.discriminator) == null ? void 0 : T.propertyName) === l
178
- },
179
- discriminatorMapping: ((z = a.value.discriminator) == null ? void 0 : z.mapping) || h.value,
180
- discriminatorPropertyName: ((U = a.value.discriminator) == null ? void 0 : U.propertyName) || c.value,
181
- isDiscriminator: l === (((q = a.value.discriminator) == null ? void 0 : q.propertyName) || c.value),
182
- modelValue: D.value,
183
- "onUpdate:modelValue": y
184
- }, null, 8, ["compact", "hideHeading", "level", "name", "hideModelNames", "required", "schemas", "resolvedSchema", "value", "discriminatorMapping", "discriminatorPropertyName", "isDiscriminator", "modelValue"]);
185
- }), 128)) : n("", !0),
186
- a.value.patternProperties ? (i(!0), d(m, { key: 1 }, $(Object.keys(a.value.patternProperties), (l) => {
187
- var N;
188
- return i(), s(b, {
189
- key: l,
190
- compact: e.compact,
191
- hideHeading: e.hideHeading,
192
- level: e.level,
193
- name: l,
194
- hideModelNames: e.hideModelNames,
195
- pattern: "",
196
- schemas: e.schemas,
197
- value: ((N = e.value.discriminator) == null ? void 0 : N.propertyName) === l ? e.value : a.value.patternProperties[l],
198
- discriminatorMapping: h.value,
199
- discriminatorPropertyName: c.value,
200
- "onUpdate:modelValue": y
201
- }, null, 8, ["compact", "hideHeading", "level", "name", "hideModelNames", "schemas", "value", "discriminatorMapping", "discriminatorPropertyName"]);
202
- }), 128)) : n("", !0),
203
- a.value.additionalProperties ? (i(), d(m, { key: 2 }, [
204
- a.value.additionalProperties === !0 || Object.keys(a.value.additionalProperties).length === 0 || !("type" in a.value.additionalProperties) ? (i(), s(b, {
205
- key: 0,
206
- additional: "",
207
- compact: e.compact,
208
- hideHeading: e.hideHeading,
209
- hideModelNames: e.hideModelNames,
210
- level: e.level,
211
- noncollapsible: "",
212
- schemas: e.schemas,
213
- value: {
214
- type: "anything",
215
- ...typeof a.value.additionalProperties == "object" ? a.value.additionalProperties : {}
216
- },
217
- discriminatorMapping: h.value,
218
- discriminatorPropertyName: c.value,
219
- "onUpdate:modelValue": y
220
- }, null, 8, ["compact", "hideHeading", "hideModelNames", "level", "schemas", "value", "discriminatorMapping", "discriminatorPropertyName"])) : (i(), s(b, {
221
- key: 1,
222
- additional: "",
223
- compact: e.compact,
224
- hideHeading: e.hideHeading,
225
- hideModelNames: e.hideModelNames,
226
- level: e.level,
227
- noncollapsible: "",
228
- schemas: e.schemas,
229
- value: ((f = e.value.discriminator) == null ? void 0 : f.propertyName) === e.name ? e.value : a.value.additionalProperties,
230
- discriminatorMapping: h.value,
231
- discriminatorPropertyName: c.value,
232
- "onUpdate:modelValue": y
233
- }, null, 8, ["compact", "hideHeading", "hideModelNames", "level", "schemas", "value", "discriminatorMapping", "discriminatorPropertyName"]))
234
- ], 64)) : n("", !0)
235
- ], 64)) : (i(), d(m, { key: 1 }, [
236
- a.value ? (i(), s(b, {
163
+ s(N)(a.value) ? (l(), t(Q, {
164
+ key: 0,
165
+ schema: a.value,
166
+ compact: e.compact,
167
+ hideHeading: e.hideHeading,
168
+ level: e.level + 1,
169
+ hideModelNames: e.hideModelNames,
170
+ schemas: e.schemas,
171
+ discriminator: S.value,
172
+ discriminatorMapping: M.value,
173
+ discriminatorPropertyName: P.value,
174
+ hasDiscriminator: e.hasDiscriminator,
175
+ "onUpdate:modelValue": B
176
+ }, null, 8, ["schema", "compact", "hideHeading", "level", "hideModelNames", "schemas", "discriminator", "discriminatorMapping", "discriminatorPropertyName", "hasDiscriminator"])) : (l(), m(f, { key: 1 }, [
177
+ a.value ? (l(), t(W, {
237
178
  key: 0,
238
179
  compact: e.compact,
239
180
  hideHeading: e.hideHeading,
@@ -241,11 +182,11 @@ const ie = {
241
182
  level: e.level,
242
183
  name: a.value.name,
243
184
  schemas: e.schemas,
244
- value: ((g = e.value.discriminator) == null ? void 0 : g.propertyName) === e.name ? e.value : a.value,
245
- discriminatorMapping: h.value,
246
- discriminatorPropertyName: c.value,
247
- modelValue: D.value,
248
- "onUpdate:modelValue": y
185
+ value: ((u = e.value.discriminator) == null ? void 0 : u.propertyName) === e.name ? e.value : a.value,
186
+ discriminatorMapping: M.value,
187
+ discriminatorPropertyName: P.value,
188
+ modelValue: S.value,
189
+ "onUpdate:modelValue": B
249
190
  }, null, 8, ["compact", "hideHeading", "hideModelNames", "level", "name", "schemas", "value", "discriminatorMapping", "discriminatorPropertyName", "modelValue"])) : n("", !0)
250
191
  ], 64))
251
192
  ];
@@ -261,5 +202,5 @@ const ie = {
261
202
  }
262
203
  });
263
204
  export {
264
- ue as default
205
+ te as default
265
206
  };
@@ -0,0 +1,7 @@
1
+ type __VLS_Props = {
2
+ label: string;
3
+ description?: string;
4
+ };
5
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLLIElement>;
6
+ export default _default;
7
+ //# sourceMappingURL=SchemaEnumPropertyItem.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SchemaEnumPropertyItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaEnumPropertyItem.vue"],"names":[],"mappings":"AAkGA,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAC;;AAmFF,wBAOG"}
@@ -0,0 +1,7 @@
1
+ import o from "./SchemaEnumPropertyItem.vue2.js";
2
+ /* empty css */
3
+ import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
+ const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-ac891053"]]);
5
+ export {
6
+ e as default
7
+ };
@@ -0,0 +1,25 @@
1
+ import { defineComponent as n, createElementBlock as o, openBlock as t, createElementVNode as r, createCommentVNode as a, toDisplayString as s, createVNode as l, unref as p } from "vue";
2
+ import { ScalarMarkdown as c } from "@scalar/components";
3
+ const i = { class: "property-enum-value" }, m = { class: "property-enum-value-content" }, u = { class: "property-enum-value-label" }, d = {
4
+ key: 0,
5
+ class: "property-enum-value-description"
6
+ }, h = /* @__PURE__ */ n({
7
+ __name: "SchemaEnumPropertyItem",
8
+ props: {
9
+ label: {},
10
+ description: {}
11
+ },
12
+ setup(_) {
13
+ return (e, v) => (t(), o("li", i, [
14
+ r("div", m, [
15
+ r("span", u, s(e.label), 1),
16
+ e.description ? (t(), o("span", d, [
17
+ l(p(c), { value: e.description }, null, 8, ["value"])
18
+ ])) : a("", !0)
19
+ ])
20
+ ]));
21
+ }
22
+ });
23
+ export {
24
+ h as default
25
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaEnumValues.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaEnumValues.vue"],"names":[],"mappings":"AA6TA,KAAK,WAAW,GAAG;IACjB,MAAM,CAAC,EAAE,GAAG,EAAE,CAAA;IACd,OAAO,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,GAAG,EAAE,CAAA;KAAE,CAAA;IAC1B,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,EAAE,CAAA;IACxD,qBAAqB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,EAAE,CAAA;IACzD,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC5B,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;CACzB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;AAGvB,KAAK,WAAW,GAAG;IACjB,4DAA4D;IAC5D,KAAK,CAAC,EAAE,WAAW,CAAA;IACnB,4DAA4D;IAC5D,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,CAAC;;AAkUF,wBAMG"}
1
+ {"version":3,"file":"SchemaEnumValues.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaEnumValues.vue"],"names":[],"mappings":"AAqRA,KAAK,WAAW,GAAG;IACjB,MAAM,CAAC,EAAE,GAAG,EAAE,CAAA;IACd,OAAO,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,GAAG,EAAE,CAAA;KAAE,CAAA;IAC1B,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,EAAE,CAAA;IACxD,qBAAqB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,EAAE,CAAA;IACzD,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC5B,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;CACzB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;AAGvB,KAAK,WAAW,GAAG;IACjB,4DAA4D;IAC5D,KAAK,CAAC,EAAE,WAAW,CAAA;IACnB,4DAA4D;IAC5D,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,CAAC;;AA4SF,wBAMG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./SchemaEnumValues.vue2.js";
2
2
  /* empty css */
3
3
  import a from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const r = /* @__PURE__ */ a(o, [["__scopeId", "data-v-ec7a8d6d"]]);
4
+ const r = /* @__PURE__ */ a(o, [["__scopeId", "data-v-904ae9e7"]]);
5
5
  export {
6
6
  r as default
7
7
  };