@scalar/api-reference 1.48.4 → 1.48.6

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 (26) hide show
  1. package/CHANGELOG.md +65 -0
  2. package/dist/blocks/scalar-info-block/components/DownloadLink.vue.d.ts +5 -0
  3. package/dist/blocks/scalar-info-block/components/DownloadLink.vue.d.ts.map +1 -1
  4. package/dist/blocks/scalar-info-block/components/DownloadLink.vue.js +1 -1
  5. package/dist/blocks/scalar-info-block/components/DownloadLink.vue2.js +19 -15
  6. package/dist/blocks/scalar-info-block/components/InfoBlock.vue.d.ts +2 -0
  7. package/dist/blocks/scalar-info-block/components/InfoBlock.vue.d.ts.map +1 -1
  8. package/dist/blocks/scalar-info-block/components/InfoBlock.vue.js +4 -2
  9. package/dist/browser/standalone.js +3326 -3297
  10. package/dist/browser/webpack-stats.json +1 -1
  11. package/dist/components/ApiReference.vue.d.ts.map +1 -1
  12. package/dist/components/ApiReference.vue.js +1 -1
  13. package/dist/components/ApiReference.vue2.js +1 -16
  14. package/dist/components/Content/Content.vue.d.ts.map +1 -1
  15. package/dist/components/Content/Content.vue.js +2 -1
  16. package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
  17. package/dist/components/Content/Schema/SchemaComposition.vue.js +13 -3
  18. package/dist/components/Content/Schema/helpers/sort-property-names.d.ts.map +1 -1
  19. package/dist/components/Content/Schema/helpers/sort-property-names.js +13 -0
  20. package/dist/features/example-responses/ExampleResponses.vue.d.ts.map +1 -1
  21. package/dist/features/example-responses/ExampleResponses.vue.js +1 -1
  22. package/dist/features/example-responses/ExampleResponses.vue2.js +11 -13
  23. package/dist/helpers/storage.d.ts +16 -0
  24. package/dist/helpers/storage.d.ts.map +1 -1
  25. package/dist/style.css +271 -75
  26. package/package.json +17 -17
package/CHANGELOG.md CHANGED
@@ -1,5 +1,70 @@
1
1
  # @scalar/api-reference
2
2
 
3
+ ## 1.48.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [#8414](https://github.com/scalar/scalar/pull/8414): fix(api-reference): limit height of example response descriptions
8
+
9
+ #### Updated Dependencies
10
+
11
+ - **@scalar/api-client@2.36.2**
12
+ - [#8414](https://github.com/scalar/scalar/pull/8414): fix(api-client): pass example picker attributes to button component
13
+
14
+ - **@scalar/components@0.20.6**
15
+ - [#8327](https://github.com/scalar/scalar/pull/8327): fix: markdown tables with specified width attributes in td/th break the layout
16
+
17
+ - **@scalar/helpers@0.4.1**
18
+ - [#8420](https://github.com/scalar/scalar/pull/8420): fix TypeScript access to navigator.userAgentData in isMacOS without ts-expect-error
19
+
20
+ - **@scalar/agent-chat@0.9.6**
21
+
22
+ - **@scalar/sidebar@0.8.6**
23
+
24
+ - **@scalar/oas-utils@0.10.5**
25
+
26
+ - **@scalar/openapi-parser@0.25.3**
27
+
28
+ - **@scalar/types@0.7.3**
29
+
30
+ - **@scalar/workspace-store@0.39.2**
31
+
32
+ - **@scalar/snippetz@0.7.4**
33
+
34
+ ## 1.48.5
35
+
36
+ ### Patch Changes
37
+
38
+ - [#8406](https://github.com/scalar/scalar/pull/8406): feat: x-order
39
+ - [#8097](https://github.com/scalar/scalar/pull/8097): fix: lazy load compositions
40
+ - [#8380](https://github.com/scalar/scalar/pull/8380): feat(api-reference): render `<a>` HTML tag for `documentDownloadType: direct`
41
+
42
+ #### Updated Dependencies
43
+
44
+ - **@scalar/workspace-store@0.39.1**
45
+ - [#8393](https://github.com/scalar/scalar/pull/8393): fix: correctly update active tab on tab close event
46
+ - [#8403](https://github.com/scalar/scalar/pull/8403): Persist auth url and token url in local storage
47
+
48
+ - **@scalar/api-client@2.36.1**
49
+ - [#8403](https://github.com/scalar/scalar/pull/8403): Persist auth url and token url in local storage
50
+ - [#8402](https://github.com/scalar/scalar/pull/8402): Fix raw binary request bodies so uploaded files are sent correctly and code samples show file references.
51
+ - [#8398](https://github.com/scalar/scalar/pull/8398): fix code snippet HAR request URL generation to URL-encode substituted path parameter values, matching request sending behavior.
52
+ - [#8386](https://github.com/scalar/scalar/pull/8386): feat: app drag region for macos
53
+ - [#8408](https://github.com/scalar/scalar/pull/8408): Use the secret oauth urls before the default flow urls
54
+ - [#8407](https://github.com/scalar/scalar/pull/8407): Fix conditional rendering for token URL
55
+
56
+ - **@scalar/snippetz@0.7.3**
57
+ - [#8404](https://github.com/scalar/scalar/pull/8404): Preserve duplicate query parameters in generated code snippets. php/guzzle: preserve duplicate query parameters as arrays.
58
+
59
+ - **@scalar/sidebar@0.8.5**
60
+ - [#8386](https://github.com/scalar/scalar/pull/8386): feat: add spacer slot to sidebar
61
+
62
+ - **@scalar/agent-chat@0.9.5**
63
+
64
+ - **@scalar/oas-utils@0.10.4**
65
+
66
+ - **@scalar/components@0.20.5**
67
+
3
68
  ## 1.48.4
4
69
 
5
70
  ### Patch Changes
@@ -5,6 +5,11 @@ type __VLS_Props = {
5
5
  documentDownloadType: ApiReferenceConfiguration['documentDownloadType'];
6
6
  /** The event bus for the handling all events. */
7
7
  eventBus: WorkspaceEventBus;
8
+ /**
9
+ * URL of the OpenAPI document. Required when documentDownloadType is 'direct'
10
+ * so the link can point to the document.
11
+ */
12
+ documentUrl?: string;
8
13
  };
9
14
  declare const __VLS_export: 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>;
10
15
  declare const _default: typeof __VLS_export;
@@ -1 +1 @@
1
- {"version":3,"file":"DownloadLink.vue.d.ts","sourceRoot":"","sources":["../../../../src/blocks/scalar-info-block/components/DownloadLink.vue"],"names":[],"mappings":"AA8LA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAC5E,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAIvE,KAAK,WAAW,GAAG;IACjB,kCAAkC;IAClC,oBAAoB,EAAE,yBAAyB,CAAC,sBAAsB,CAAC,CAAA;IACvE,iDAAiD;IACjD,QAAQ,EAAE,iBAAiB,CAAA;CAC5B,CAAC;AA4HF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"DownloadLink.vue.d.ts","sourceRoot":"","sources":["../../../../src/blocks/scalar-info-block/components/DownloadLink.vue"],"names":[],"mappings":"AAqMA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAC5E,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAIvE,KAAK,WAAW,GAAG;IACjB,kCAAkC;IAClC,oBAAoB,EAAE,yBAAyB,CAAC,sBAAsB,CAAC,CAAA;IACvE,iDAAiD;IACjD,QAAQ,EAAE,iBAAiB,CAAA;IAC3B;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAC;AAgIF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./DownloadLink.vue2.js";
2
2
  /* empty css */
3
3
  import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const DownloadLink = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-59b5011b"]]);
4
+ const DownloadLink = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-95e980e1"]]);
5
5
  export {
6
6
  DownloadLink as default
7
7
  };
@@ -1,50 +1,54 @@
1
- import { defineComponent, createElementBlock, createCommentVNode, openBlock, normalizeClass, withModifiers, createElementVNode, createVNode, withCtx, createTextVNode } from "vue";
1
+ import { defineComponent, createElementBlock, createCommentVNode, openBlock, normalizeClass, createElementVNode, withModifiers, createVNode, withCtx, createTextVNode } from "vue";
2
2
  import Badge from "../../../components/Badge/Badge.vue.js";
3
+ const _hoisted_1 = ["href"];
3
4
  const _sfc_main = /* @__PURE__ */ defineComponent({
4
5
  __name: "DownloadLink",
5
6
  props: {
6
7
  documentDownloadType: {},
7
- eventBus: {}
8
+ eventBus: {},
9
+ documentUrl: {}
8
10
  },
9
11
  setup(__props) {
10
12
  const handleDownloadClick = (format) => {
11
13
  __props.eventBus.emit("ui:download:document", { format });
12
14
  };
13
15
  return (_ctx, _cache) => {
14
- return ["yaml", "json", "both", "direct"].includes(__props.documentDownloadType) ? (openBlock(), createElementBlock("div", {
16
+ return ["yaml", "json", "both"].includes(__props.documentDownloadType) || __props.documentDownloadType === "direct" && __props.documentUrl ? (openBlock(), createElementBlock("div", {
15
17
  key: 0,
16
18
  class: normalizeClass(["download-container group", {
17
19
  "download-both": __props.documentDownloadType === "both"
18
20
  }])
19
21
  }, [
20
- __props.documentDownloadType === "json" || __props.documentDownloadType === "both" || __props.documentDownloadType === "direct" ? (openBlock(), createElementBlock("button", {
22
+ __props.documentDownloadType === "direct" && __props.documentUrl ? (openBlock(), createElementBlock("a", {
21
23
  key: 0,
24
+ class: "download-link download-button",
25
+ href: __props.documentUrl
26
+ }, [..._cache[2] || (_cache[2] = [
27
+ createElementVNode("span", null, " Download OpenAPI Document ", -1)
28
+ ])], 8, _hoisted_1)) : createCommentVNode("", true),
29
+ __props.documentDownloadType === "json" || __props.documentDownloadType === "both" ? (openBlock(), createElementBlock("button", {
30
+ key: 1,
22
31
  class: "download-button",
23
32
  type: "button",
24
- onClick: _cache[0] || (_cache[0] = withModifiers(
25
- () => handleDownloadClick(
26
- __props.documentDownloadType === "direct" ? "direct" : "json"
27
- ),
28
- ["prevent"]
29
- ))
33
+ onClick: _cache[0] || (_cache[0] = withModifiers(() => handleDownloadClick("json"), ["prevent"]))
30
34
  }, [
31
- _cache[3] || (_cache[3] = createElementVNode("span", null, " Download OpenAPI Document ", -1)),
35
+ _cache[4] || (_cache[4] = createElementVNode("span", null, " Download OpenAPI Document ", -1)),
32
36
  createVNode(Badge, { class: "extension hidden group-hover:flex" }, {
33
- default: withCtx(() => [..._cache[2] || (_cache[2] = [
37
+ default: withCtx(() => [..._cache[3] || (_cache[3] = [
34
38
  createTextVNode("json", -1)
35
39
  ])]),
36
40
  _: 1
37
41
  })
38
42
  ])) : createCommentVNode("", true),
39
43
  __props.documentDownloadType === "yaml" || __props.documentDownloadType === "both" ? (openBlock(), createElementBlock("button", {
40
- key: 1,
44
+ key: 2,
41
45
  class: "download-button",
42
46
  type: "button",
43
47
  onClick: _cache[1] || (_cache[1] = withModifiers(() => handleDownloadClick("yaml"), ["prevent"]))
44
48
  }, [
45
- _cache[5] || (_cache[5] = createElementVNode("span", null, " Download OpenAPI Document ", -1)),
49
+ _cache[6] || (_cache[6] = createElementVNode("span", null, " Download OpenAPI Document ", -1)),
46
50
  createVNode(Badge, { class: "extension hidden group-hover:flex" }, {
47
- default: withCtx(() => [..._cache[4] || (_cache[4] = [
51
+ default: withCtx(() => [..._cache[5] || (_cache[5] = [
48
52
  createTextVNode("yaml", -1)
49
53
  ])]),
50
54
  _: 1
@@ -23,6 +23,8 @@ type __VLS_Props = {
23
23
  layout?: 'modern' | 'classic';
24
24
  /** The document download type. */
25
25
  documentDownloadType?: ApiReferenceConfiguration['documentDownloadType'];
26
+ /** URL of the OpenAPI document. Used when documentDownloadType is 'direct'. */
27
+ documentUrl?: string;
26
28
  };
27
29
  declare var __VLS_15: {};
28
30
  type __VLS_Slots = {} & {
@@ -1 +1 @@
1
- {"version":3,"file":"InfoBlock.vue.d.ts","sourceRoot":"","sources":["../../../../src/blocks/scalar-info-block/components/InfoBlock.vue"],"names":[],"mappings":"AA8EA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAC5E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EACV,2BAA2B,EAC3B,UAAU,EACX,MAA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O,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -14,7 +14,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
14
14
  eventBus: {},
15
15
  headingSlugGenerator: { type: Function },
16
16
  layout: {},
17
- documentDownloadType: { default: "both" }
17
+ documentDownloadType: { default: "both" },
18
+ documentUrl: {}
18
19
  },
19
20
  setup(__props) {
20
21
  const introCardsSlot = computed(
@@ -44,8 +45,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
44
45
  "download-link": withCtx(() => [
45
46
  createVNode(DownloadLink, {
46
47
  documentDownloadType: __props.documentDownloadType,
48
+ documentUrl: __props.documentUrl,
47
49
  eventBus: __props.eventBus
48
- }, null, 8, ["documentDownloadType", "eventBus"])
50
+ }, null, 8, ["documentDownloadType", "documentUrl", "eventBus"])
49
51
  ]),
50
52
  _: 2
51
53
  }, 1032, ["id", "documentExtensions", "eventBus", "externalDocs", "headingSlugGenerator", "info", "infoExtensions", "oasVersion"]);