@scalar/api-reference 1.36.0 → 1.36.2

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 (123) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/dist/browser/standalone.js +15482 -15086
  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 +2 -2
  6. package/dist/components/Content/Models/ClassicLayout.vue.d.ts +2 -0
  7. package/dist/components/Content/Models/ClassicLayout.vue.d.ts.map +1 -1
  8. package/dist/components/Content/Models/ClassicLayout.vue.js +2 -2
  9. package/dist/components/Content/Models/ClassicLayout.vue2.js +52 -41
  10. package/dist/components/Content/Models/Models.vue.d.ts.map +1 -1
  11. package/dist/components/Content/Models/Models.vue.js +9 -8
  12. package/dist/components/Content/Models/ModernLayout.vue.d.ts.map +1 -1
  13. package/dist/components/Content/Models/ModernLayout.vue.js +2 -2
  14. package/dist/components/Content/Models/ModernLayout.vue2.js +46 -42
  15. package/dist/components/Content/Schema/Schema.vue.d.ts +3 -4
  16. package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
  17. package/dist/components/Content/Schema/Schema.vue.js +1 -1
  18. package/dist/components/Content/Schema/Schema.vue2.js +71 -74
  19. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts +4 -5
  20. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
  21. package/dist/components/Content/Schema/SchemaComposition.vue.js +46 -49
  22. package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts +2 -7
  23. package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts.map +1 -1
  24. package/dist/components/Content/Schema/SchemaObjectProperties.vue.js +29 -40
  25. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +3 -5
  26. package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
  27. package/dist/components/Content/Schema/SchemaProperty.vue.js +2 -2
  28. package/dist/components/Content/Schema/SchemaProperty.vue2.js +72 -76
  29. package/dist/components/Content/Schema/types.d.ts +17 -0
  30. package/dist/components/Content/Schema/types.d.ts.map +1 -0
  31. package/dist/components/OperationsList/OperationsList.vue.js +2 -2
  32. package/dist/components/Section/Section.vue.js +1 -1
  33. package/dist/components/Section/SectionContainerAccordion.vue.js +2 -2
  34. package/dist/consts/urls.d.ts +17 -0
  35. package/dist/consts/urls.d.ts.map +1 -0
  36. package/dist/consts/urls.js +7 -0
  37. package/dist/features/Operation/components/Header.vue.d.ts +2 -0
  38. package/dist/features/Operation/components/Header.vue.d.ts.map +1 -1
  39. package/dist/features/Operation/components/Header.vue.js +15 -10
  40. package/dist/features/Operation/components/Headers.vue.d.ts +2 -0
  41. package/dist/features/Operation/components/Headers.vue.d.ts.map +1 -1
  42. package/dist/features/Operation/components/Headers.vue.js +2 -2
  43. package/dist/features/Operation/components/Headers.vue2.js +26 -24
  44. package/dist/features/Operation/components/ParameterListItem.vue.d.ts.map +1 -1
  45. package/dist/features/Operation/components/ParameterListItem.vue.js +2 -2
  46. package/dist/features/Operation/components/ParameterListItem.vue2.js +55 -48
  47. package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
  48. package/dist/features/Operation/components/RequestBody.vue.js +1 -1
  49. package/dist/features/Operation/components/RequestBody.vue2.js +74 -61
  50. package/dist/features/Operation/components/callbacks/Callback.vue.js +2 -2
  51. package/dist/features/Operation/layouts/ClassicLayout.vue.js +3 -3
  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/api-client-modal/useApiClient.d.ts +20 -20
  55. package/dist/features/api-client-modal/useApiClient.d.ts.map +1 -1
  56. package/dist/features/multiple-documents/useMultipleDocuments.d.ts +4 -2
  57. package/dist/features/multiple-documents/useMultipleDocuments.d.ts.map +1 -1
  58. package/dist/features/multiple-documents/useMultipleDocuments.js +49 -43
  59. package/dist/features/toolbar/ApiReferenceToolbar.vue.d.ts +16 -0
  60. package/dist/features/toolbar/ApiReferenceToolbar.vue.d.ts.map +1 -0
  61. package/dist/features/toolbar/ApiReferenceToolbar.vue.js +43 -0
  62. package/dist/features/toolbar/ApiReferenceToolbar.vue2.js +4 -0
  63. package/dist/features/toolbar/ApiReferenceToolbarBlurb.vue.d.ts +13 -0
  64. package/dist/features/toolbar/ApiReferenceToolbarBlurb.vue.d.ts.map +1 -0
  65. package/dist/features/toolbar/ApiReferenceToolbarBlurb.vue.js +12 -0
  66. package/dist/features/toolbar/ApiReferenceToolbarConfig.vue.d.ts +14 -0
  67. package/dist/features/toolbar/ApiReferenceToolbarConfig.vue.d.ts.map +1 -0
  68. package/dist/features/toolbar/ApiReferenceToolbarConfig.vue.js +95 -0
  69. package/dist/features/toolbar/ApiReferenceToolbarConfig.vue2.js +4 -0
  70. package/dist/features/toolbar/ApiReferenceToolbarConfigLayout.vue.d.ts +10 -0
  71. package/dist/features/toolbar/ApiReferenceToolbarConfigLayout.vue.d.ts.map +1 -0
  72. package/dist/features/toolbar/ApiReferenceToolbarConfigLayout.vue.js +27 -0
  73. package/dist/features/toolbar/ApiReferenceToolbarConfigLayout.vue2.js +4 -0
  74. package/dist/features/toolbar/ApiReferenceToolbarConfigLayoutOptions.vue.d.ts +25 -0
  75. package/dist/features/toolbar/ApiReferenceToolbarConfigLayoutOptions.vue.d.ts.map +1 -0
  76. package/dist/features/toolbar/ApiReferenceToolbarConfigLayoutOptions.vue.js +123 -0
  77. package/dist/features/toolbar/ApiReferenceToolbarConfigLayoutOptions.vue2.js +4 -0
  78. package/dist/features/toolbar/ApiReferenceToolbarConfigTheme.vue.d.ts +11 -0
  79. package/dist/features/toolbar/ApiReferenceToolbarConfigTheme.vue.d.ts.map +1 -0
  80. package/dist/features/toolbar/ApiReferenceToolbarConfigTheme.vue.js +41 -0
  81. package/dist/features/toolbar/ApiReferenceToolbarConfigTheme.vue2.js +4 -0
  82. package/dist/features/toolbar/ApiReferenceToolbarPopover.vue.d.ts +26 -0
  83. package/dist/features/toolbar/ApiReferenceToolbarPopover.vue.d.ts.map +1 -0
  84. package/dist/features/toolbar/ApiReferenceToolbarPopover.vue.js +46 -0
  85. package/dist/features/toolbar/ApiReferenceToolbarPopover.vue2.js +4 -0
  86. package/dist/features/toolbar/ApiReferenceToolbarRegisterButton.vue.d.ts +25 -0
  87. package/dist/features/toolbar/ApiReferenceToolbarRegisterButton.vue.d.ts.map +1 -0
  88. package/dist/features/toolbar/ApiReferenceToolbarRegisterButton.vue.js +58 -0
  89. package/dist/features/toolbar/ApiReferenceToolbarRegisterButton.vue2.js +4 -0
  90. package/dist/features/toolbar/ApiReferenceToolbarSdks.vue.d.ts +7 -0
  91. package/dist/features/toolbar/ApiReferenceToolbarSdks.vue.d.ts.map +1 -0
  92. package/dist/features/toolbar/ApiReferenceToolbarSdks.vue.js +84 -0
  93. package/dist/features/toolbar/ApiReferenceToolbarSdks.vue2.js +4 -0
  94. package/dist/features/toolbar/ApiReferenceToolbarShare.vue.d.ts +7 -0
  95. package/dist/features/toolbar/ApiReferenceToolbarShare.vue.d.ts.map +1 -0
  96. package/dist/features/toolbar/ApiReferenceToolbarShare.vue.js +42 -0
  97. package/dist/features/toolbar/ApiReferenceToolbarShare.vue2.js +4 -0
  98. package/dist/features/toolbar/ApiReferenceToolbarShareRegister.vue.d.ts +7 -0
  99. package/dist/features/toolbar/ApiReferenceToolbarShareRegister.vue.d.ts.map +1 -0
  100. package/dist/features/toolbar/ApiReferenceToolbarShareRegister.vue.js +50 -0
  101. package/dist/features/toolbar/ApiReferenceToolbarShareRegister.vue2.js +4 -0
  102. package/dist/features/toolbar/ApiReferenceToolbarShareTemporary.vue.d.ts +14 -0
  103. package/dist/features/toolbar/ApiReferenceToolbarShareTemporary.vue.d.ts.map +1 -0
  104. package/dist/features/toolbar/ApiReferenceToolbarShareTemporary.vue.js +83 -0
  105. package/dist/features/toolbar/ApiReferenceToolbarShareTemporary.vue2.js +4 -0
  106. package/dist/features/toolbar/ApiReferenceToolbarTitle.vue.d.ts +3 -0
  107. package/dist/features/toolbar/ApiReferenceToolbarTitle.vue.d.ts.map +1 -0
  108. package/dist/features/toolbar/ApiReferenceToolbarTitle.vue.js +51 -0
  109. package/dist/features/toolbar/ApiReferenceToolbarTitle.vue2.js +4 -0
  110. package/dist/features/toolbar/uploadTempDocument.d.ts +3 -0
  111. package/dist/features/toolbar/uploadTempDocument.d.ts.map +1 -0
  112. package/dist/features/toolbar/uploadTempDocument.js +21 -0
  113. package/dist/helpers/convert-security-scheme.d.ts +1 -1
  114. package/dist/index.js +1 -1
  115. package/dist/style.css +1 -1
  116. package/dist/v2/ApiReferenceWorkspace.vue.d.ts +6 -6
  117. package/dist/v2/ApiReferenceWorkspace.vue.d.ts.map +1 -1
  118. package/dist/v2/ApiReferenceWorkspace.vue.js +90 -82
  119. package/dist/v2/blocks/scalar-info-block/components/IntroductionLayout.vue.js +2 -2
  120. package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.d.ts.map +1 -1
  121. package/dist/v2/blocks/scalar-request-example-block/helpers/get-secrets.js +5 -6
  122. package/dist/v2/helpers/map-configuration.d.ts.map +1 -1
  123. package/package.json +12 -12
@@ -1 +1 @@
1
- {"version":3,"file":"ApiReferenceLayout.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApiReferenceLayout.vue"],"names":[],"mappings":"AA0qBA,OAAO,EAGL,KAAK,OAAO,EACb,MAAM,gBAAgB,CAAA;AA2BvB,OAAO,KAAK,EACV,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,SAAS,CAAA;AA2ChB,KAAK,WAAW,GAAG;KACd,CAAC,IAAI,mBAAmB,GAAG,CAAC,KAAK,EAAE,kBAAkB,KAAK,GAAG;CAC/D,GAAG;IAAE,mBAAmB,EAAE,GAAG,CAAA;CAAE,CAAC;AA0oBnC,QAAA,MAAM,eAAe;;YA1qBqB,OAAO;eAAS,MAAM;;;;;;;;YAAtB,OAAO;eAAS,MAAM;;;;;;kFAirB9D,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"ApiReferenceLayout.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApiReferenceLayout.vue"],"names":[],"mappings":"AAwrBA,OAAO,EAGL,KAAK,OAAO,EACb,MAAM,gBAAgB,CAAA;AA2BvB,OAAO,KAAK,EACV,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,SAAS,CAAA;AA2ChB,KAAK,WAAW,GAAG;KACd,CAAC,IAAI,mBAAmB,GAAG,CAAC,KAAK,EAAE,kBAAkB,KAAK,GAAG;CAC/D,GAAG;IAAE,mBAAmB,EAAE,GAAG,CAAA;CAAE,CAAC;AA4oBnC,QAAA,MAAM,eAAe;;YA5qBqB,OAAO;eAAS,MAAM;;;;;;;;YAAtB,OAAO;eAAS,MAAM;;;;;;kFAmrB9D,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -4,7 +4,7 @@ import o from "./ApiReferenceLayout.vue2.js";
4
4
  /* empty css */
5
5
  /* empty css */
6
6
  import t from "../_virtual/_plugin-vue_export-helper.js";
7
- const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-27c7b7dd"]]);
7
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-a548dd3a"]]);
8
8
  export {
9
- c as default
9
+ f as default
10
10
  };
@@ -1,5 +1,7 @@
1
+ import type { ApiReferenceConfiguration } from '@scalar/types/api-reference';
1
2
  import type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
2
3
  type __VLS_Props = {
4
+ config: ApiReferenceConfiguration;
3
5
  schemas: {
4
6
  id: string;
5
7
  name: string;
@@ -1 +1 @@
1
- {"version":3,"file":"ClassicLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Models/ClassicLayout.vue"],"names":[],"mappings":"AAmFA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAYhG,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,YAAY,CAAA;KAAE,EAAE,CAAA;CAC9D,CAAC;;AAyKF,wBAMG"}
1
+ {"version":3,"file":"ClassicLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Models/ClassicLayout.vue"],"names":[],"mappings":"AA6FA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAE5E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAYhG,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,yBAAyB,CAAA;IACjC,OAAO,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,YAAY,CAAA;KAAE,EAAE,CAAA;CAC9D,CAAC;;AAyLF,wBAMG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./ClassicLayout.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-0131e9c4"]]);
4
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-42f5a051"]]);
5
5
  export {
6
- c as default
6
+ f as default
7
7
  };
@@ -1,52 +1,53 @@
1
- import { defineComponent as v, createBlock as s, createCommentVNode as k, openBlock as r, unref as e, withCtx as t, createElementBlock as n, Fragment as c, renderList as f, createVNode as l, createTextVNode as S } from "vue";
2
- import { getResolvedRef as g } from "@scalar/workspace-store/helpers/get-resolved-ref";
3
- import y from "../../Section/SectionContainerAccordion.vue.js";
4
- import C from "../../Section/SectionAccordion.vue.js";
5
- import p from "../Schema/SchemaProperty.vue.js";
6
- import b from "../../Anchor/Anchor.vue.js";
7
- import h from "../../Section/SectionHeaderTag.vue.js";
8
- import q from "../Schema/SchemaHeading.vue.js";
9
- import B from "../../Section/SectionHeader.vue.js";
10
- const H = {
1
+ import { defineComponent as h, createBlock as a, createCommentVNode as g, openBlock as r, unref as e, withCtx as o, createElementBlock as s, Fragment as p, renderList as u, createVNode as n, createTextVNode as S } from "vue";
2
+ import { getResolvedRef as y } from "@scalar/workspace-store/helpers/get-resolved-ref";
3
+ import P from "../../Section/SectionContainerAccordion.vue.js";
4
+ import k from "../../Section/SectionAccordion.vue.js";
5
+ import f from "../Schema/SchemaProperty.vue.js";
6
+ import q from "../../Anchor/Anchor.vue.js";
7
+ import v from "../../Section/SectionHeaderTag.vue.js";
8
+ import B from "../Schema/SchemaHeading.vue.js";
9
+ import R from "../../Section/SectionHeader.vue.js";
10
+ const C = {
11
11
  key: 0,
12
12
  class: "properties"
13
- }, N = { key: 1 }, M = /* @__PURE__ */ v({
13
+ }, F = { key: 1 }, M = /* @__PURE__ */ h({
14
14
  __name: "ClassicLayout",
15
15
  props: {
16
+ config: {},
16
17
  schemas: {}
17
18
  },
18
- setup(V) {
19
- return (m, u) => m.schemas.length ? (r(), s(e(y), {
19
+ setup(b) {
20
+ return (t, m) => t.schemas.length ? (r(), a(e(P), {
20
21
  key: 0,
21
22
  class: "reference-models"
22
23
  }, {
23
- title: t(() => [
24
- l(e(B), { level: 2 }, {
25
- default: t(() => u[0] || (u[0] = [
24
+ title: o(() => [
25
+ n(e(R), { level: 2 }, {
26
+ default: o(() => m[0] || (m[0] = [
26
27
  S("Models")
27
28
  ])),
28
29
  _: 1,
29
30
  __: [0]
30
31
  })
31
32
  ]),
32
- default: t(() => [
33
- (r(!0), n(c, null, f(m.schemas, ({ id: d, name: i, schema: o }) => (r(), s(e(C), {
34
- id: d,
35
- key: i,
36
- label: i
33
+ default: o(() => [
34
+ (r(!0), s(p, null, u(t.schemas, ({ id: c, name: l, schema: i }) => (r(), a(e(k), {
35
+ id: c,
36
+ key: l,
37
+ label: l
37
38
  }, {
38
- title: t(() => [
39
- l(e(b), {
40
- id: d,
39
+ title: o(() => [
40
+ n(e(q), {
41
+ id: c,
41
42
  class: "reference-models-anchor"
42
43
  }, {
43
- default: t(() => [
44
- l(e(h), { level: 3 }, {
45
- default: t(() => [
46
- l(e(q), {
44
+ default: o(() => [
45
+ n(e(v), { level: 3 }, {
46
+ default: o(() => [
47
+ n(e(B), {
47
48
  class: "reference-models-label",
48
- name: o.title ?? i,
49
- value: o
49
+ name: i.title ?? l,
50
+ value: i
50
51
  }, null, 8, ["name", "value"])
51
52
  ]),
52
53
  _: 2
@@ -55,23 +56,33 @@ const H = {
55
56
  _: 2
56
57
  }, 1032, ["id"])
57
58
  ]),
58
- default: t(() => [
59
- "properties" in o ? (r(), n("div", H, [
60
- (r(!0), n(c, null, f(Object.entries(o.properties ?? {}), ([a, _]) => (r(), s(e(p), {
61
- key: a,
62
- name: a,
63
- required: o.required?.includes(a),
64
- value: e(g)(_)
65
- }, null, 8, ["name", "required", "value"]))), 128))
66
- ])) : (r(), n("div", N, [
67
- l(e(p), { value: o }, null, 8, ["value"])
59
+ default: o(() => [
60
+ "properties" in i ? (r(), s("div", C, [
61
+ (r(!0), s(p, null, u(Object.entries(i.properties ?? {}), ([d, _]) => (r(), a(e(f), {
62
+ key: d,
63
+ name: d,
64
+ options: {
65
+ orderRequiredPropertiesFirst: t.config.orderRequiredPropertiesFirst,
66
+ orderSchemaPropertiesBy: t.config.orderSchemaPropertiesBy
67
+ },
68
+ required: i.required?.includes(d),
69
+ schema: e(y)(_)
70
+ }, null, 8, ["name", "options", "required", "schema"]))), 128))
71
+ ])) : (r(), s("div", F, [
72
+ n(e(f), {
73
+ options: {
74
+ orderRequiredPropertiesFirst: t.config.orderRequiredPropertiesFirst,
75
+ orderSchemaPropertiesBy: t.config.orderSchemaPropertiesBy
76
+ },
77
+ schema: i
78
+ }, null, 8, ["options", "schema"])
68
79
  ]))
69
80
  ]),
70
81
  _: 2
71
82
  }, 1032, ["id", "label"]))), 128))
72
83
  ]),
73
84
  _: 1
74
- })) : k("", !0);
85
+ })) : g("", !0);
75
86
  }
76
87
  });
77
88
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"Models.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Models/Models.vue"],"names":[],"mappings":"AA4DA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA;AAE9D,OAAO,KAAK,EACV,gBAAgB,EAEjB,MAAM,8DAA8D,CAAA;AAUrE,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,gBAAgB,CAAC,SAAS,CAAC,CAAA;IACpC,MAAM,EAAE,yBAAyB,CAAA;CAClC,CAAC;;AAgGF,wBAMG"}
1
+ {"version":3,"file":"Models.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Models/Models.vue"],"names":[],"mappings":"AA6DA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA;AAE9D,OAAO,KAAK,EACV,gBAAgB,EAEjB,MAAM,8DAA8D,CAAA;AAUrE,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,gBAAgB,CAAC,SAAS,CAAC,CAAA;IACpC,MAAM,EAAE,yBAAyB,CAAA;CAClC,CAAC;;AAkGF,wBAMG"}
@@ -1,4 +1,4 @@
1
- import { defineComponent as f, computed as r, createBlock as o, createCommentVNode as u, openBlock as t, unref as a, withCtx as d } from "vue";
1
+ import { defineComponent as f, computed as r, createBlock as s, createCommentVNode as u, openBlock as t, unref as a, withCtx as d } from "vue";
2
2
  import { getResolvedRef as h } from "@scalar/workspace-store/helpers/get-resolved-ref";
3
3
  import { useNavState as p } from "../../../hooks/useNavState.js";
4
4
  import y from "./ClassicLayout.vue.js";
@@ -14,21 +14,22 @@ const z = /* @__PURE__ */ f({
14
14
  setup(c) {
15
15
  const { hash: m } = p(), { items: i } = k(), l = r(() => i.value.entries.find(
16
16
  (e) => e.type === "text" && e.id === "models"
17
- )), n = r(() => (l.value?.children ?? []).filter((s) => s.type === "model").map((s) => ({
18
- id: s.id,
19
- name: s.name,
20
- schema: h(c.schemas[s.name])
17
+ )), n = r(() => (l.value?.children ?? []).filter((o) => o.type === "model").map((o) => ({
18
+ id: o.id,
19
+ name: o.name,
20
+ schema: h(c.schemas[o.name])
21
21
  })));
22
- return (e, s) => e.schemas && Object.keys(e.schemas).length > 0 ? (t(), o(a(v), {
22
+ return (e, o) => e.schemas && Object.keys(e.schemas).length > 0 ? (t(), s(a(v), {
23
23
  key: 0,
24
24
  id: "models",
25
25
  isLazy: !!a(m) && !a(m).startsWith("model")
26
26
  }, {
27
27
  default: d(() => [
28
- e.config?.layout === "classic" ? (t(), o(y, {
28
+ e.config?.layout === "classic" ? (t(), s(y, {
29
29
  key: 0,
30
+ config: e.config,
30
31
  schemas: n.value
31
- }, null, 8, ["schemas"])) : (t(), o(g, {
32
+ }, null, 8, ["config", "schemas"])) : (t(), s(g, {
32
33
  key: 1,
33
34
  config: e.config,
34
35
  schemas: n.value
@@ -1 +1 @@
1
- {"version":3,"file":"ModernLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Models/ModernLayout.vue"],"names":[],"mappings":"AA8GA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAehG,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,yBAAyB,CAAA;IACjC,OAAO,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,YAAY,CAAA;KAAE,EAAE,CAAA;CAC9D,CAAC;;AAmNF,wBAMG"}
1
+ {"version":3,"file":"ModernLayout.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Models/ModernLayout.vue"],"names":[],"mappings":"AAmHA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAehG,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,yBAAyB,CAAA;IACjC,OAAO,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,YAAY,CAAA;KAAE,EAAE,CAAA;CAC9D,CAAC;;AA6NF,wBAMG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./ModernLayout.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-c533a862"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-c4d2ae99"]]);
5
5
  export {
6
- p as default
6
+ m as default
7
7
  };
@@ -1,39 +1,39 @@
1
- import { defineComponent as g, useId as M, computed as c, createBlock as m, createCommentVNode as f, openBlock as a, unref as e, withCtx as l, createVNode as o, createElementVNode as _, createTextVNode as y, normalizeClass as N, createElementBlock as k, Fragment as C, renderList as I } from "vue";
2
- import { ScalarErrorBoundary as A } from "@scalar/components";
3
- import B from "../../ShowMoreButton.vue.js";
1
+ import { defineComponent as b, useId as y, computed as u, createBlock as s, createCommentVNode as f, openBlock as a, unref as e, withCtx as o, createVNode as l, createElementVNode as M, createTextVNode as B, normalizeClass as N, createElementBlock as k, Fragment as C, renderList as I } from "vue";
2
+ import { ScalarErrorBoundary as _ } from "@scalar/components";
3
+ import A from "../../ShowMoreButton.vue.js";
4
4
  import { useSidebar as H } from "../../../v2/blocks/scalar-sidebar-block/hooks/useSidebar.js";
5
5
  import L from "../../Section/SectionContainer.vue.js";
6
6
  import w from "../../Section/Section.vue.js";
7
- import x from "../../Section/SectionHeader.vue.js";
7
+ import E from "../../Section/SectionHeader.vue.js";
8
8
  import p from "../../Section/SectionHeaderTag.vue.js";
9
- import E from "../../Section/CompactSection.vue.js";
10
- import O from "../Schema/Schema.vue.js";
9
+ import O from "../../Section/CompactSection.vue.js";
10
+ import P from "../Schema/Schema.vue.js";
11
11
  import V from "../Schema/SchemaHeading.vue.js";
12
- const S = 10, K = /* @__PURE__ */ g({
12
+ const S = 10, G = /* @__PURE__ */ b({
13
13
  __name: "ModernLayout",
14
14
  props: {
15
15
  config: {},
16
16
  schemas: { default: () => [] }
17
17
  },
18
- setup(t) {
19
- const i = M(), { collapsedSidebarItems: h } = H(), r = c(
20
- () => t.config.expandAllModelSections || t.schemas.length <= S || h.models
21
- ), v = c(() => r.value ? t.schemas : t.schemas.slice(0, S));
22
- return (s, u) => s.schemas ? (a(), m(e(L), {
18
+ setup(r) {
19
+ const m = y(), { collapsedSidebarItems: h } = H(), d = u(
20
+ () => r.config.expandAllModelSections || r.schemas.length <= S || h.models
21
+ ), g = u(() => d.value ? r.schemas : r.schemas.slice(0, S));
22
+ return (t, c) => t.schemas ? (a(), s(e(L), {
23
23
  key: 0,
24
24
  id: "models"
25
25
  }, {
26
- default: l(() => [
27
- o(e(w), { "aria-labelledby": e(i) }, {
28
- default: l(() => [
29
- o(e(x), null, {
30
- default: l(() => [
31
- o(e(p), {
32
- id: e(i),
26
+ default: o(() => [
27
+ l(e(w), { "aria-labelledby": e(m) }, {
28
+ default: o(() => [
29
+ l(e(E), null, {
30
+ default: o(() => [
31
+ l(e(p), {
32
+ id: e(m),
33
33
  level: 2
34
34
  }, {
35
- default: l(() => u[0] || (u[0] = [
36
- y(" Models ")
35
+ default: o(() => c[0] || (c[0] = [
36
+ B(" Models ")
37
37
  ])),
38
38
  _: 1,
39
39
  __: [0]
@@ -41,37 +41,41 @@ const S = 10, K = /* @__PURE__ */ g({
41
41
  ]),
42
42
  _: 1
43
43
  }),
44
- _("div", {
45
- class: N(["models-list", { "models-list-truncated": !r.value }])
44
+ M("div", {
45
+ class: N(["models-list", { "models-list-truncated": !d.value }])
46
46
  }, [
47
- (a(!0), k(C, null, I(v.value, ({ id: b, name: d, schema: n }) => (a(), m(e(E), {
48
- id: b,
49
- key: d,
47
+ (a(!0), k(C, null, I(g.value, ({ id: v, name: i, schema: n }) => (a(), s(e(O), {
48
+ id: v,
49
+ key: i,
50
50
  class: "models-list-item",
51
- defaultOpen: s.config.expandAllModelSections,
52
- label: d
51
+ defaultOpen: t.config.expandAllModelSections,
52
+ label: i
53
53
  }, {
54
- heading: l(() => [
55
- o(e(p), { level: 3 }, {
56
- default: l(() => [
57
- o(e(V), {
58
- name: n.title ?? d,
54
+ heading: o(() => [
55
+ l(e(p), { level: 3 }, {
56
+ default: o(() => [
57
+ l(e(V), {
58
+ name: n.title ?? i,
59
59
  value: n
60
60
  }, null, 8, ["name", "value"])
61
61
  ]),
62
62
  _: 2
63
63
  }, 1024)
64
64
  ]),
65
- default: l(() => [
66
- o(e(A), null, {
67
- default: l(() => [
68
- o(e(O), {
69
- hideHeading: !0,
70
- hideModelNames: !0,
65
+ default: o(() => [
66
+ l(e(_), null, {
67
+ default: o(() => [
68
+ l(e(P), {
69
+ hideHeading: "",
70
+ hideModelNames: "",
71
71
  level: 1,
72
72
  noncollapsible: "",
73
+ options: {
74
+ orderRequiredPropertiesFirst: t.config.orderRequiredPropertiesFirst,
75
+ orderSchemaPropertiesBy: t.config.orderSchemaPropertiesBy
76
+ },
73
77
  schema: n
74
- }, null, 8, ["schema"])
78
+ }, null, 8, ["options", "schema"])
75
79
  ]),
76
80
  _: 2
77
81
  }, 1024)
@@ -79,7 +83,7 @@ const S = 10, K = /* @__PURE__ */ g({
79
83
  _: 2
80
84
  }, 1032, ["id", "defaultOpen", "label"]))), 128))
81
85
  ], 2),
82
- r.value ? f("", !0) : (a(), m(B, {
86
+ d.value ? f("", !0) : (a(), s(A, {
83
87
  key: 0,
84
88
  id: "models",
85
89
  class: "show-more-models"
@@ -93,5 +97,5 @@ const S = 10, K = /* @__PURE__ */ g({
93
97
  }
94
98
  });
95
99
  export {
96
- K as default
100
+ G as default
97
101
  };
@@ -1,4 +1,5 @@
1
1
  import type { DiscriminatorObject, SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
2
+ import type { SchemaOptions } from '../../../components/Content/Schema/types';
2
3
  type __VLS_Props = {
3
4
  schema?: SchemaObject;
4
5
  /** Track how deep we've gone */
@@ -10,10 +11,6 @@ type __VLS_Props = {
10
11
  noncollapsible?: boolean;
11
12
  /** Hide the heading */
12
13
  hideHeading?: boolean;
13
- /** Hide read-only properties */
14
- hideReadOnly?: boolean;
15
- /** Hide write-only properties */
16
- hideWriteOnly?: boolean;
17
14
  /** Show a special one way toggle for additional properties, also has a top border when open */
18
15
  additionalProperties?: boolean;
19
16
  /** Hide model names in type display */
@@ -22,6 +19,8 @@ type __VLS_Props = {
22
19
  discriminator?: DiscriminatorObject;
23
20
  /** Breadcrumb for the schema */
24
21
  breadcrumb?: string[];
22
+ /** Move the options into a single prop so they are easy to pass around */
23
+ options: SchemaOptions;
25
24
  };
26
25
  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, {}, any>;
27
26
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"Schema.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/Schema.vue"],"names":[],"mappings":"AAoVA,OAAO,KAAK,EACV,mBAAmB,EACnB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAUrE,KAAK,WAAW,GAAG;IACjB,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,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,uBAAuB;IACvB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,gCAAgC;IAChC,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,iCAAiC;IACjC,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,+FAA+F;IAC/F,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,uCAAuC;IACvC,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,2BAA2B;IAC3B,aAAa,CAAC,EAAE,mBAAmB,CAAA;IACnC,gCAAgC;IAChC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;CACtB,CAAC;;AA8aF,wBAMG"}
1
+ {"version":3,"file":"Schema.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/Schema.vue"],"names":[],"mappings":"AAgVA,OAAO,KAAK,EACV,mBAAmB,EACnB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAGrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAA;AAQtE,KAAK,WAAW,GAAG;IACjB,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,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,uBAAuB;IACvB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,+FAA+F;IAC/F,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,uCAAuC;IACvC,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,2BAA2B;IAC3B,aAAa,CAAC,EAAE,mBAAmB,CAAA;IACnC,gCAAgC;IAChC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,0EAA0E;IAC1E,OAAO,EAAE,aAAa,CAAA;CACvB,CAAC;;AAyaF,wBAMG"}
@@ -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 c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-6897f9dc"]]);
4
+ const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-35907cdf"]]);
5
5
  export {
6
6
  c as default
7
7
  };