@scalar/api-client 2.19.1 → 2.19.3

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 (113) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
  3. package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
  4. package/dist/components/CommandPalette/WatchModeToggle.vue.d.ts.map +1 -1
  5. package/dist/components/DataTable/DataTable.vue.d.ts.map +1 -1
  6. package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
  7. package/dist/components/Form/Form.vue.d.ts.map +1 -1
  8. package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
  9. package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -1
  10. package/dist/components/ScalarAsciiArt.vue.d.ts.map +1 -1
  11. package/dist/components/SectionFilterButton.vue.d.ts.map +1 -1
  12. package/dist/components/Server/ServerDropdownItem.vue.d.ts.map +1 -1
  13. package/dist/components/Server/ServerVariablesSelect.vue.d.ts.map +1 -1
  14. package/dist/components/SideNav/DownloadAppButton.vue.d.ts.map +1 -1
  15. package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
  16. package/dist/components/SideNav/SideNavLink.vue.d.ts.map +1 -1
  17. package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
  18. package/dist/components/TopNav/TopNavItem.vue.d.ts.map +1 -1
  19. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
  20. package/dist/hooks/useFileDialog.d.ts +4 -4
  21. package/dist/layouts/App/MainLayout.vue.d.ts.map +1 -1
  22. package/dist/style.css +1 -1
  23. package/dist/v2/blocks/operation-block/helpers/build-request-parameters.d.ts +0 -1
  24. package/dist/v2/blocks/operation-block/helpers/build-request-parameters.d.ts.map +1 -1
  25. package/dist/v2/blocks/operation-block/helpers/build-request-parameters.js +96 -48
  26. package/dist/v2/blocks/operation-block/helpers/serialize-parameter.d.ts +96 -0
  27. package/dist/v2/blocks/operation-block/helpers/serialize-parameter.d.ts.map +1 -0
  28. package/dist/v2/blocks/operation-block/helpers/serialize-parameter.js +49 -0
  29. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts.map +1 -1
  30. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.js +16 -17
  31. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.d.ts +1 -2
  32. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.d.ts.map +1 -1
  33. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.js +109 -152
  34. package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.js +1 -1
  35. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
  36. package/dist/v2/blocks/request-block/helpers/get-default-headers.js +1 -1
  37. package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts.map +1 -1
  38. package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.d.ts.map +1 -1
  39. package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue.d.ts.map +1 -1
  40. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts.map +1 -1
  41. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
  42. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +0 -2
  43. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
  44. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +19 -20
  45. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts.map +1 -1
  46. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +1 -1
  47. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -1
  48. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts +25 -14
  49. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts.map +1 -1
  50. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.js +65 -45
  51. package/dist/v2/components/code-input/CodeInput.vue.d.ts.map +1 -1
  52. package/dist/v2/components/data-table/DataTable.vue.d.ts.map +1 -1
  53. package/dist/v2/components/data-table/DataTableInput.vue.d.ts.map +1 -1
  54. package/dist/v2/components/server/ServerDropdownItem.vue.d.ts.map +1 -1
  55. package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
  56. package/dist/v2/features/app/components/DesktopTab.vue.d.ts.map +1 -1
  57. package/dist/v2/features/app/helpers/routes.d.ts +2 -2
  58. package/dist/v2/features/collection/components/Settings.vue.d.ts.map +1 -1
  59. package/dist/v2/features/collection/components/Settings.vue.js +9 -10
  60. package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.d.ts +1 -3
  61. package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.d.ts.map +1 -1
  62. package/dist/v2/features/command-palette/components/TheCommandPalette.vue.d.ts.map +1 -1
  63. package/dist/v2/features/command-palette/components/WatchModeToggle.vue.d.ts.map +1 -1
  64. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.d.ts.map +1 -1
  65. package/dist/v2/features/modal/Modal.vue.d.ts +1 -1
  66. package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
  67. package/dist/v2/features/modal/Modal.vue.js +2 -2
  68. package/dist/v2/features/modal/Modal.vue2.js +31 -31
  69. package/dist/v2/features/modal/helpers/map-hidden-clients-config.d.ts +8 -0
  70. package/dist/v2/features/modal/helpers/map-hidden-clients-config.d.ts.map +1 -0
  71. package/dist/v2/features/modal/helpers/map-hidden-clients-config.js +36 -0
  72. package/dist/v2/features/modal/index.d.ts +1 -0
  73. package/dist/v2/features/modal/index.d.ts.map +1 -1
  74. package/dist/v2/features/modal/index.js +4 -2
  75. package/dist/v2/features/operation/Operation.vue.d.ts +5 -2
  76. package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
  77. package/dist/v2/features/operation/Operation.vue.js +48 -34
  78. package/dist/v2/features/operation/helpers/get-selected-server.d.ts +2 -1
  79. package/dist/v2/features/operation/helpers/get-selected-server.d.ts.map +1 -1
  80. package/dist/v2/features/operation/helpers/get-selected-server.js +2 -2
  81. package/dist/v2/features/search/components/SearchResult.vue.d.ts.map +1 -1
  82. package/dist/v2/features/settings/CollectionSettings.vue.d.ts +0 -2
  83. package/dist/v2/features/settings/CollectionSettings.vue.d.ts.map +1 -1
  84. package/dist/v2/features/settings/CollectionSettings.vue.js +110 -135
  85. package/dist/v2/features/settings/components/Appearance.vue.d.ts.map +1 -1
  86. package/dist/v2/helpers/get-servers.d.ts +23 -0
  87. package/dist/v2/helpers/get-servers.d.ts.map +1 -0
  88. package/dist/v2/helpers/get-servers.js +66 -0
  89. package/dist/v2/helpers/index.d.ts +1 -0
  90. package/dist/v2/helpers/index.d.ts.map +1 -1
  91. package/dist/v2/helpers/index.js +4 -2
  92. package/dist/views/Collection/components/EnvironmentForm.vue.d.ts.map +1 -1
  93. package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
  94. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
  95. package/dist/views/Request/Request.vue.d.ts.map +1 -1
  96. package/dist/views/Request/RequestRoot.vue.d.ts.map +1 -1
  97. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts.map +1 -1
  98. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
  99. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts.map +1 -1
  100. package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
  101. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
  102. package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
  103. package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
  104. package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
  105. package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.d.ts.map +1 -1
  106. package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue.d.ts.map +1 -1
  107. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
  108. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  109. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
  110. package/dist/views/Settings/SettingsGeneral.vue.d.ts.map +1 -1
  111. package/dist/views/Settings/components/SettingsAppearance.vue.d.ts.map +1 -1
  112. package/package.json +14 -14
  113. package/dist/v2/blocks/operation-block/helpers/get-delimiter.js +0 -15
@@ -1,13 +1,15 @@
1
- import { defineComponent as h, computed as a, onMounted as v, createBlock as y, createElementBlock as f, openBlock as c, unref as u, createElementVNode as S } from "vue";
2
- import { getResolvedRef as l } from "@scalar/workspace-store/helpers/get-resolved-ref";
3
- import { combineParams as x } from "./helpers/combine-params.js";
4
- import { getSelectedServer as k } from "./helpers/get-selected-server.js";
5
- import g from "../../blocks/operation-block/OperationBlock.vue.js";
6
- const B = {
1
+ import { defineComponent as y, computed as n, toValue as o, onMounted as S, createBlock as x, createElementBlock as k, openBlock as c, unref as i, createElementVNode as g } from "vue";
2
+ import { getResolvedRef as s } from "@scalar/workspace-store/helpers/get-resolved-ref";
3
+ import { mapHiddenClientsConfig as C } from "../modal/helpers/map-hidden-clients-config.js";
4
+ import { combineParams as B } from "./helpers/combine-params.js";
5
+ import { getSelectedServer as w } from "./helpers/get-selected-server.js";
6
+ import { getServers as U } from "../../helpers/get-servers.js";
7
+ import p from "../../blocks/operation-block/OperationBlock.vue.js";
8
+ const b = {
7
9
  key: 1,
8
10
  class: "flex h-full w-full items-center justify-center"
9
- }, C = {}, M = /* @__PURE__ */ h({
10
- ...C,
11
+ }, N = {}, $ = /* @__PURE__ */ y({
12
+ ...N,
11
13
  __name: "Operation",
12
14
  props: {
13
15
  documentSlug: {},
@@ -22,21 +24,23 @@ const B = {
22
24
  workspaceStore: {},
23
25
  activeWorkspace: {},
24
26
  plugins: {},
25
- hideClientButton: { type: Boolean }
27
+ options: {}
26
28
  },
27
29
  setup(e) {
28
- const o = a(() => {
30
+ const u = n(() => e.path ? s(e.document?.paths?.[e.path]) : null), l = n(() => {
29
31
  if (!e.path || !e.method)
30
32
  return null;
31
- const t = l(e.document?.paths?.[e.path]?.[e.method]);
33
+ const t = s(e.document?.paths?.[e.path]?.[e.method]);
32
34
  if (!t)
33
35
  return null;
34
- const n = l(e.document?.paths?.[e.path]);
35
- if (!n)
36
+ if (!u.value)
36
37
  return t;
37
- const r = x(n.parameters, t.parameters);
38
- return { ...t, parameters: r };
39
- }), i = a(() => [
38
+ const a = B(
39
+ u.value.parameters,
40
+ t.parameters
41
+ );
42
+ return { ...t, parameters: a };
43
+ }), m = n(() => [
40
44
  ...(e.workspaceStore.workspace?.["x-scalar-cookies"] ?? []).map((t) => ({
41
45
  ...t,
42
46
  location: "workspace"
@@ -45,49 +49,59 @@ const B = {
45
49
  ...t,
46
50
  location: "document"
47
51
  }))
48
- ]), s = a(() => k(e.document));
49
- v(() => {
50
- typeof e.document?.["x-scalar-selected-server"] > "u" && e.document?.servers?.[0]?.url && e.eventBus.emit("server:update:selected", { url: e.document.servers[0].url });
52
+ ]), r = n(() => {
53
+ const t = o(e.options)?.servers ?? l.value?.servers ?? u.value?.servers ?? e.document?.servers;
54
+ return U(t, {
55
+ baseServerUrl: o(e.options)?.baseServerURL,
56
+ documentUrl: e.document?.["x-scalar-original-source-url"]
57
+ });
58
+ }), d = n(
59
+ () => w(e.document, r.value)
60
+ );
61
+ S(() => {
62
+ typeof e.document?.["x-scalar-selected-server"] > "u" && r.value?.[0]?.url && e.eventBus.emit("server:update:selected", { url: r.value[0].url });
51
63
  });
52
- const m = a(() => e.document?.["x-scalar-set-operation-security"] ? {
64
+ const v = n(() => e.document?.["x-scalar-set-operation-security"] ? {
53
65
  type: "operation",
54
66
  path: e.path ?? "",
55
67
  method: e.method ?? "get"
56
68
  } : {
57
69
  type: "document"
58
- }), d = "2.19.1";
59
- return (t, n) => e.path && e.method && e.exampleName && o.value ? (c(), y(u(g), {
70
+ }), h = n(
71
+ () => C(o(e.options)?.hiddenClients)
72
+ ), f = "2.19.3";
73
+ return (t, a) => e.path && e.method && e.exampleName && l.value ? (c(), x(i(p), {
60
74
  key: 0,
61
- appVersion: u(d),
62
- authMeta: m.value,
75
+ appVersion: i(f),
76
+ authMeta: v.value,
63
77
  documentSecurity: e.document?.security ?? [],
64
78
  documentSelectedSecurity: e.document?.["x-scalar-selected-security"],
65
79
  documentUrl: e.document?.["x-scalar-original-source-url"],
66
80
  environment: e.environment,
67
81
  eventBus: e.eventBus,
68
82
  exampleKey: e.exampleName,
69
- globalCookies: i.value,
70
- hideClientButton: e.hideClientButton,
83
+ globalCookies: m.value,
84
+ hideClientButton: o(e.options)?.hideClientButton ?? !1,
71
85
  history: [],
72
- httpClients: e.workspaceStore.config["x-scalar-reference-config"]?.httpClients,
86
+ httpClients: h.value,
73
87
  layout: e.layout,
74
88
  method: e.method,
75
- operation: o.value,
89
+ operation: l.value,
76
90
  path: e.path,
77
91
  plugins: e.plugins,
78
92
  proxyUrl: e.workspaceStore.workspace["x-scalar-active-proxy"] ?? "",
79
93
  securitySchemes: e.securitySchemes,
80
94
  selectedClient: e.workspaceStore.workspace["x-scalar-default-client"],
81
- server: s.value,
82
- servers: e.document?.servers ?? [],
95
+ server: d.value,
96
+ servers: r.value,
83
97
  setOperationSecurity: e.document?.["x-scalar-set-operation-security"] ?? !1,
84
98
  totalPerformedRequests: 0,
85
- "onUpdate:servers": n[0] || (n[0] = (r) => e.eventBus.emit("ui:route:page", { name: "document.servers" }))
86
- }, null, 8, ["appVersion", "authMeta", "documentSecurity", "documentSelectedSecurity", "documentUrl", "environment", "eventBus", "exampleKey", "globalCookies", "hideClientButton", "httpClients", "layout", "method", "operation", "path", "plugins", "proxyUrl", "securitySchemes", "selectedClient", "server", "servers", "setOperationSecurity"])) : (c(), f("div", B, [...n[1] || (n[1] = [
87
- S("span", { class: "text-c-3" }, "Select an operation to view details", -1)
99
+ "onUpdate:servers": a[0] || (a[0] = (R) => e.eventBus.emit("ui:route:page", { name: "document.servers" }))
100
+ }, null, 8, ["appVersion", "authMeta", "documentSecurity", "documentSelectedSecurity", "documentUrl", "environment", "eventBus", "exampleKey", "globalCookies", "hideClientButton", "httpClients", "layout", "method", "operation", "path", "plugins", "proxyUrl", "securitySchemes", "selectedClient", "server", "servers", "setOperationSecurity"])) : (c(), k("div", b, [...a[1] || (a[1] = [
101
+ g("span", { class: "text-c-3" }, "Select an operation to view details", -1)
88
102
  ])]));
89
103
  }
90
104
  });
91
105
  export {
92
- M as default
106
+ $ as default
93
107
  };
@@ -1,3 +1,4 @@
1
+ import type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
1
2
  import type { WorkspaceDocument } from '@scalar/workspace-store/schemas/workspace';
2
3
  /**
3
4
  * Get the selected server for a document,
@@ -6,5 +7,5 @@ import type { WorkspaceDocument } from '@scalar/workspace-store/schemas/workspac
6
7
  * If x-scalar-selected-server is undefined we select the first server (this means the user has not selected a server yet)
7
8
  * If the user has un-selected a server it would be an empty string
8
9
  */
9
- export declare const getSelectedServer: (document: WorkspaceDocument | null) => import("@scalar/workspace-store/schemas/v3.1/strict/server").ServerObject | null;
10
+ export declare const getSelectedServer: (document: WorkspaceDocument | null, servers: ServerObject[] | null) => ServerObject | null;
10
11
  //# sourceMappingURL=get-selected-server.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-selected-server.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/operation/helpers/get-selected-server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAA;AAElF;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,GAAI,UAAU,iBAAiB,GAAG,IAAI,qFAQnE,CAAA"}
1
+ {"version":3,"file":"get-selected-server.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/operation/helpers/get-selected-server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAChG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAA;AAElF;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,GAAI,UAAU,iBAAiB,GAAG,IAAI,EAAE,SAAS,YAAY,EAAE,GAAG,IAAI,wBAQnG,CAAA"}
@@ -1,4 +1,4 @@
1
- const s = (e) => typeof e?.["x-scalar-selected-server"] > "u" && e?.servers?.length ? e.servers[0] : e?.servers?.find(({ url: r }) => r === e?.["x-scalar-selected-server"]) ?? null;
1
+ const l = (r, e) => typeof r?.["x-scalar-selected-server"] > "u" && e?.length ? e[0] : e?.find(({ url: t }) => t === r?.["x-scalar-selected-server"]) ?? null;
2
2
  export {
3
- s as getSelectedServer
3
+ l as getSelectedServer
4
4
  };
@@ -1 +1 @@
1
- {"version":3,"file":"SearchResult.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/search/components/SearchResult.vue"],"names":[],"mappings":"AA4GA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEzC,OAAO,KAAK,EAAa,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AAErE,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAA;IACV,UAAU,EAAE,OAAO,CAAA;IACnB,MAAM,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAA;CAC7B,CAAC;;AAgJF,wBAMG"}
1
+ {"version":3,"file":"SearchResult.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/search/components/SearchResult.vue"],"names":[],"mappings":"AA4GA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEzC,OAAO,KAAK,EAAa,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AAErE,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAA;IACV,UAAU,EAAE,OAAO,CAAA;IACnB,MAAM,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAA;CAC7B,CAAC;;AA+IF,wBAMG"}
@@ -2,8 +2,6 @@ import { type ThemeId } from '@scalar/themes';
2
2
  type __VLS_Props = {
3
3
  /** Currently active proxy URL, when set to null means no proxy */
4
4
  activeProxyUrl?: string | null;
5
- /** Custom proxy url, when set to null means no custom proxy */
6
- customProxyUrl?: string | null;
7
5
  /** Currently active theme ID */
8
6
  activeThemeId: ThemeId;
9
7
  /** Currently active color mode */
@@ -1 +1 @@
1
- {"version":3,"file":"CollectionSettings.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/settings/CollectionSettings.vue"],"names":[],"mappings":"AAwQA,OAAO,EAGL,KAAK,OAAO,EACb,MAAM,gBAAgB,CAAA;AAQvB,KAAK,WAAW,GAAG;IACjB,kEAAkE;IAClE,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,+DAA+D;IAC/D,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,gCAAgC;IAChC,aAAa,EAAE,OAAO,CAAA;IACtB,kCAAkC;IAClC,SAAS,EAAE,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAA;CACvC,CAAC;;;;;;;;;;AAqkBF,wBAOG"}
1
+ {"version":3,"file":"CollectionSettings.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/settings/CollectionSettings.vue"],"names":[],"mappings":"AAsQA,OAAO,EAGL,KAAK,OAAO,EACb,MAAM,gBAAgB,CAAA;AAQvB,KAAK,WAAW,GAAG;IACjB,kEAAkE;IAClE,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,gCAAgC;IAChC,aAAa,EAAE,OAAO,CAAA;IACtB,kCAAkC;IAClC,SAAS,EAAE,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAA;CACvC,CAAC;;;;;;;;;;AA2fF,wBAOG"}
@@ -1,28 +1,27 @@
1
- import { defineComponent as $, createElementBlock as p, openBlock as a, createVNode as n, withCtx as l, createElementVNode as s, createBlock as u, createCommentVNode as f, unref as t, normalizeClass as c, createTextVNode as i, toDisplayString as g, Fragment as U, renderList as w, normalizeStyle as h } from "vue";
2
- import { cva as M, ScalarButton as x, cx as y, ScalarIcon as k } from "@scalar/components";
3
- import { themeLabels as P } from "@scalar/themes";
1
+ import { defineComponent as M, createElementBlock as y, openBlock as c, createVNode as n, withCtx as s, createElementVNode as o, unref as r, normalizeClass as a, createTextVNode as l, createBlock as f, createCommentVNode as p, Fragment as C, renderList as w, toDisplayString as U, normalizeStyle as g } from "vue";
2
+ import { cva as $, ScalarButton as m, cx as x, ScalarIcon as b } from "@scalar/components";
3
+ import { themeLabels as T } from "@scalar/themes";
4
4
  import B from "../../../components/ImportCollection/IntegrationLogo.vue.js";
5
5
  import L from "./components/Appearance.vue.js";
6
- import b from "./components/Section.vue.js";
7
- import { getThemeColors as C } from "./helpers/get-theme-colors.js";
8
- const N = { class: "flex flex-col gap-4" }, R = { class: "flex flex-col gap-2" }, V = { class: "bg-c-accent text-b-1 flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] border-transparent p-1" }, A = { class: "flex flex-col gap-2" }, E = { class: "grid grid-cols-2 gap-2" }, F = { class: "flex items-center gap-2" }, O = { class: "flex items-center gap-1" }, D = { class: "grid grid-cols-2 gap-2" }, W = { class: "flex items-center gap-2" }, q = { class: "flex items-center gap-1" }, G = { class: "size-7 rounded-xl" }, v = "https://proxy.scalar.com", _ = /* @__PURE__ */ $({
6
+ import k from "./components/Section.vue.js";
7
+ import { getThemeColors as h } from "./helpers/get-theme-colors.js";
8
+ const N = { class: "flex flex-col gap-4" }, R = { class: "flex flex-col gap-2" }, V = { class: "flex flex-col gap-2" }, A = { class: "grid grid-cols-2 gap-2" }, E = { class: "flex items-center gap-2" }, F = { class: "flex items-center gap-1" }, O = { class: "grid grid-cols-2 gap-2" }, D = { class: "flex items-center gap-2" }, W = { class: "flex items-center gap-1" }, q = { class: "size-7 rounded-xl" }, v = "https://proxy.scalar.com", I = /* @__PURE__ */ M({
9
9
  __name: "CollectionSettings",
10
10
  props: {
11
11
  activeProxyUrl: {},
12
- customProxyUrl: {},
13
12
  activeThemeId: {},
14
13
  colorMode: {}
15
14
  },
16
15
  emits: ["update:proxyUrl", "update:themeId", "update:colorMode"],
17
- setup(o, { emit: T }) {
18
- const d = T, S = [
16
+ setup(i, { emit: S }) {
17
+ const d = S, P = [
19
18
  "default",
20
19
  "alternate",
21
20
  "purple",
22
21
  "solarized",
23
22
  "saturn",
24
23
  "kepler"
25
- ], z = ["elysiajs", "fastify"], m = M({
24
+ ], z = ["elysiajs", "fastify"], u = $({
26
25
  base: "w-full shadow-none text-c-1 justify-start pl-2 gap-2 border",
27
26
  variants: {
28
27
  active: {
@@ -31,98 +30,74 @@ const N = { class: "flex flex-col gap-4" }, R = { class: "flex flex-col gap-2" }
31
30
  }
32
31
  }
33
32
  });
34
- return (H, e) => (a(), p("div", N, [
35
- n(b, null, {
36
- title: l(() => [...e[4] || (e[4] = [
37
- i(" CORS Proxy ", -1)
33
+ return (G, e) => (c(), y("div", N, [
34
+ n(k, null, {
35
+ title: s(() => [...e[3] || (e[3] = [
36
+ l(" CORS Proxy ", -1)
38
37
  ])]),
39
- description: l(() => [...e[5] || (e[5] = [
40
- i(" Browsers block cross-origin requests for security. We provide a public proxy to ", -1),
41
- s("a", {
38
+ description: s(() => [...e[4] || (e[4] = [
39
+ l(" Browsers block cross-origin requests for security. We provide a public proxy to ", -1),
40
+ o("a", {
42
41
  class: "hover:text-c-1 underline-offset-2",
43
42
  href: "https://en.wikipedia.org/wiki/Cross-origin_resource_sharing",
44
43
  target: "_blank"
45
44
  }, " bypass CORS issues ", -1),
46
- i(" . Check the ", -1),
47
- s("a", {
45
+ l(" . Check the ", -1),
46
+ o("a", {
48
47
  class: "hover:text-c-1 underline-offset-2",
49
48
  href: "https://github.com/scalar/scalar/tree/main/projects/proxy-scalar-com",
50
49
  target: "_blank"
51
50
  }, " source code on GitHub ", -1),
52
- i(" . ", -1)
51
+ l(" . ", -1)
53
52
  ])]),
54
- default: l(() => [
55
- s("div", R, [
56
- n(t(x), {
57
- class: c(
58
- t(y)(
59
- t(m)({
60
- active: o.activeProxyUrl === v
53
+ default: s(() => [
54
+ o("div", R, [
55
+ n(r(m), {
56
+ class: a(
57
+ r(x)(
58
+ r(u)({
59
+ active: i.activeProxyUrl === v
61
60
  })
62
61
  )
63
62
  ),
64
- onClick: e[0] || (e[0] = (r) => d("update:proxyUrl", v))
63
+ onClick: e[0] || (e[0] = (t) => d("update:proxyUrl", v))
65
64
  }, {
66
- default: l(() => [
67
- s("div", {
68
- class: c(["flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1", {
69
- "bg-c-accent text-b-1 border-transparent": o.activeProxyUrl === v
65
+ default: s(() => [
66
+ o("div", {
67
+ class: a(["flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1", {
68
+ "bg-c-accent text-b-1 border-transparent": i.activeProxyUrl === v
70
69
  }])
71
70
  }, [
72
- o.activeProxyUrl === v ? (a(), u(t(k), {
71
+ i.activeProxyUrl === v ? (c(), f(r(b), {
73
72
  key: 0,
74
73
  icon: "Checkmark",
75
74
  size: "xs",
76
75
  thickness: "3.5"
77
- })) : f("", !0)
76
+ })) : p("", !0)
78
77
  ], 2),
79
- e[6] || (e[6] = i(" Use proxy.scalar.com (default) ", -1))
78
+ e[5] || (e[5] = l(" Use proxy.scalar.com (default) ", -1))
80
79
  ]),
81
80
  _: 1
82
81
  }, 8, ["class"]),
83
- o.customProxyUrl && o.customProxyUrl !== v ? (a(), u(t(x), {
84
- key: 0,
85
- class: c(
86
- t(y)(
87
- t(m)({
88
- active: o.activeProxyUrl === o.customProxyUrl
89
- })
90
- )
91
- ),
92
- onClick: e[1] || (e[1] = (r) => d("update:proxyUrl", o.customProxyUrl))
93
- }, {
94
- default: l(() => [
95
- s("div", V, [
96
- o.customProxyUrl === o.activeProxyUrl ? (a(), u(t(k), {
97
- key: 0,
98
- icon: "Checkmark",
99
- size: "xs",
100
- thickness: "3.5"
101
- })) : f("", !0)
102
- ]),
103
- i(" Use custom proxy (" + g(o.customProxyUrl) + ") ", 1)
104
- ]),
105
- _: 1
106
- }, 8, ["class"])) : f("", !0),
107
- n(t(x), {
108
- class: c(t(y)(t(m)({ active: !o.activeProxyUrl }))),
109
- onClick: e[2] || (e[2] = (r) => d("update:proxyUrl", null))
82
+ n(r(m), {
83
+ class: a(r(x)(r(u)({ active: !i.activeProxyUrl }))),
84
+ onClick: e[1] || (e[1] = (t) => d("update:proxyUrl", null))
110
85
  }, {
111
- default: l(() => [
112
- s("div", {
113
- class: c([
86
+ default: s(() => [
87
+ o("div", {
88
+ class: a([
114
89
  "flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1",
115
- !o.activeProxyUrl && "bg-c-accent text-b-1 border-transparent"
90
+ !i.activeProxyUrl && "bg-c-accent text-b-1 border-transparent"
116
91
  ])
117
92
  }, [
118
- o.activeProxyUrl ? f("", !0) : (a(), u(t(k), {
93
+ i.activeProxyUrl ? p("", !0) : (c(), f(r(b), {
119
94
  key: 0,
120
95
  icon: "Checkmark",
121
96
  size: "xs",
122
97
  thickness: "3.5"
123
98
  }))
124
99
  ], 2),
125
- e[7] || (e[7] = i(" Skip the proxy ", -1))
100
+ e[6] || (e[6] = l(" Skip the proxy ", -1))
126
101
  ]),
127
102
  _: 1
128
103
  }, 8, ["class"])
@@ -130,60 +105,60 @@ const N = { class: "flex flex-col gap-4" }, R = { class: "flex flex-col gap-2" }
130
105
  ]),
131
106
  _: 1
132
107
  }),
133
- n(b, null, {
134
- title: l(() => [...e[8] || (e[8] = [
135
- i(" Themes ", -1)
108
+ n(k, null, {
109
+ title: s(() => [...e[7] || (e[7] = [
110
+ l(" Themes ", -1)
136
111
  ])]),
137
- description: l(() => [...e[9] || (e[9] = [
138
- i(" We've got a whole rainbow of themes for you to play with: ", -1)
112
+ description: s(() => [...e[8] || (e[8] = [
113
+ l(" We've got a whole rainbow of themes for you to play with: ", -1)
139
114
  ])]),
140
- default: l(() => [
141
- s("div", A, [
142
- s("div", E, [
143
- (a(), p(U, null, w(S, (r) => n(t(x), {
144
- key: r,
145
- class: c(
146
- t(y)(
147
- t(m)({
148
- active: o.activeThemeId === r
115
+ default: s(() => [
116
+ o("div", V, [
117
+ o("div", A, [
118
+ (c(), y(C, null, w(P, (t) => n(r(m), {
119
+ key: t,
120
+ class: a(
121
+ r(x)(
122
+ r(u)({
123
+ active: i.activeThemeId === t
149
124
  })
150
125
  )
151
126
  ),
152
- onClick: (j) => d("update:themeId", r)
127
+ onClick: (j) => d("update:themeId", t)
153
128
  }, {
154
- default: l(() => [
155
- s("div", F, [
156
- s("div", {
157
- class: c(["flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1", {
158
- "bg-c-accent text-b-1 border-transparent": o.activeThemeId === r
129
+ default: s(() => [
130
+ o("div", E, [
131
+ o("div", {
132
+ class: a(["flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1", {
133
+ "bg-c-accent text-b-1 border-transparent": i.activeThemeId === t
159
134
  }])
160
135
  }, [
161
- o.activeThemeId === r ? (a(), u(t(k), {
136
+ i.activeThemeId === t ? (c(), f(r(b), {
162
137
  key: 0,
163
138
  icon: "Checkmark",
164
139
  size: "xs",
165
140
  thickness: "3.5"
166
- })) : f("", !0)
141
+ })) : p("", !0)
167
142
  ], 2),
168
- i(" " + g(t(P)[r]), 1)
143
+ l(" " + U(r(T)[t]), 1)
169
144
  ]),
170
- s("div", O, [
171
- s("span", {
145
+ o("div", F, [
146
+ o("span", {
172
147
  class: "border-c-3 -mr-3 inline-block h-5 w-5 rounded-full",
173
- style: h({
174
- backgroundColor: t(C)(r).light
148
+ style: g({
149
+ backgroundColor: r(h)(t).light
175
150
  })
176
151
  }, null, 4),
177
- s("span", {
152
+ o("span", {
178
153
  class: "border-c-3 -mr-3 inline-block h-5 w-5 rounded-full",
179
- style: h({
180
- backgroundColor: t(C)(r).dark
154
+ style: g({
155
+ backgroundColor: r(h)(t).dark
181
156
  })
182
157
  }, null, 4),
183
- s("span", {
158
+ o("span", {
184
159
  class: "border-c-3 inline-block h-5 w-5 rounded-full",
185
- style: h({
186
- backgroundColor: t(C)(r).accent
160
+ style: g({
161
+ backgroundColor: r(h)(t).accent
187
162
  })
188
163
  }, null, 4)
189
164
  ])
@@ -195,45 +170,45 @@ const N = { class: "flex flex-col gap-4" }, R = { class: "flex flex-col gap-2" }
195
170
  ]),
196
171
  _: 1
197
172
  }),
198
- n(b, null, {
199
- title: l(() => [...e[10] || (e[10] = [
200
- i(" Framework Themes ", -1)
173
+ n(k, null, {
174
+ title: s(() => [...e[9] || (e[9] = [
175
+ l(" Framework Themes ", -1)
201
176
  ])]),
202
- description: l(() => [...e[11] || (e[11] = [
203
- i(" Are you a real fan? Show your support by using your favorite framework's theme! ", -1)
177
+ description: s(() => [...e[10] || (e[10] = [
178
+ l(" Are you a real fan? Show your support by using your favorite framework's theme! ", -1)
204
179
  ])]),
205
- default: l(() => [
206
- s("div", D, [
207
- (a(), p(U, null, w(z, (r) => n(t(x), {
208
- key: r,
209
- class: c(
210
- t(y)(
211
- t(m)({
212
- active: o.activeThemeId === r
180
+ default: s(() => [
181
+ o("div", O, [
182
+ (c(), y(C, null, w(z, (t) => n(r(m), {
183
+ key: t,
184
+ class: a(
185
+ r(x)(
186
+ r(u)({
187
+ active: i.activeThemeId === t
213
188
  })
214
189
  )
215
190
  ),
216
- onClick: (j) => d("update:themeId", r)
191
+ onClick: (j) => d("update:themeId", t)
217
192
  }, {
218
- default: l(() => [
219
- s("div", W, [
220
- s("div", {
221
- class: c(["flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1", {
222
- "bg-c-accent text-b-1 border-transparent": o.activeThemeId === r
193
+ default: s(() => [
194
+ o("div", D, [
195
+ o("div", {
196
+ class: a(["flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1", {
197
+ "bg-c-accent text-b-1 border-transparent": i.activeThemeId === t
223
198
  }])
224
199
  }, [
225
- o.activeThemeId === r ? (a(), u(t(k), {
200
+ i.activeThemeId === t ? (c(), f(r(b), {
226
201
  key: 0,
227
202
  icon: "Checkmark",
228
203
  size: "xs",
229
204
  thickness: "3.5"
230
- })) : f("", !0)
205
+ })) : p("", !0)
231
206
  ], 2),
232
- i(" " + g(t(P)[r]), 1)
207
+ l(" " + U(r(T)[t]), 1)
233
208
  ]),
234
- s("div", q, [
235
- s("div", G, [
236
- n(B, { integration: r }, null, 8, ["integration"])
209
+ o("div", W, [
210
+ o("div", q, [
211
+ n(B, { integration: t }, null, 8, ["integration"])
237
212
  ])
238
213
  ])
239
214
  ]),
@@ -243,17 +218,17 @@ const N = { class: "flex flex-col gap-4" }, R = { class: "flex flex-col gap-2" }
243
218
  ]),
244
219
  _: 1
245
220
  }),
246
- n(b, null, {
247
- title: l(() => [...e[12] || (e[12] = [
248
- i(" Appearance ", -1)
221
+ n(k, null, {
222
+ title: s(() => [...e[11] || (e[11] = [
223
+ l(" Appearance ", -1)
249
224
  ])]),
250
- description: l(() => [...e[13] || (e[13] = [
251
- i(" Choose between light, dark, or system-based appearance for your workspace. ", -1)
225
+ description: s(() => [...e[12] || (e[12] = [
226
+ l(" Choose between light, dark, or system-based appearance for your workspace. ", -1)
252
227
  ])]),
253
- default: l(() => [
228
+ default: s(() => [
254
229
  n(L, {
255
- colorMode: o.colorMode,
256
- "onUpdate:colorMode": e[3] || (e[3] = (r) => d("update:colorMode", r))
230
+ colorMode: i.colorMode,
231
+ "onUpdate:colorMode": e[2] || (e[2] = (t) => d("update:colorMode", t))
257
232
  }, null, 8, ["colorMode"])
258
233
  ]),
259
234
  _: 1
@@ -262,5 +237,5 @@ const N = { class: "flex flex-col gap-4" }, R = { class: "flex flex-col gap-2" }
262
237
  }
263
238
  });
264
239
  export {
265
- _ as default
240
+ I as default
266
241
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Appearance.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/settings/components/Appearance.vue"],"names":[],"mappings":"AA6EA,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAA;CACvC,CAAC;;;;;;AAqNF,wBAOG"}
1
+ {"version":3,"file":"Appearance.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/settings/components/Appearance.vue"],"names":[],"mappings":"AA6EA,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAA;CACvC,CAAC;;;;;;AA4MF,wBAOG"}
@@ -0,0 +1,23 @@
1
+ import type { ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
2
+ /**
3
+ * Server processing options containing base URLs for resolving relative server URLs.
4
+ */
5
+ type ServerProcessingOptions = {
6
+ baseServerUrl?: string;
7
+ documentUrl?: string;
8
+ };
9
+ /**
10
+ * Retrieves and processes servers from an OpenAPI document.
11
+ *
12
+ * This function handles several scenarios:
13
+ * 1. No servers provided - creates a default server from document URL or fallback
14
+ * 2. Invalid server configurations - filters them out with warnings
15
+ * 3. Relative URLs - resolves them to absolute URLs using available base URLs
16
+ *
17
+ * @param servers - Array of OpenAPI server objects from the document
18
+ * @param options - Configuration options for server processing
19
+ * @returns Array of validated Server entities
20
+ */
21
+ export declare function getServers(servers: ServerObject[] | undefined, options?: ServerProcessingOptions): ServerObject[];
22
+ export {};
23
+ //# sourceMappingURL=get-servers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-servers.d.ts","sourceRoot":"","sources":["../../../src/v2/helpers/get-servers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAEhG;;GAEG;AACH,KAAK,uBAAuB,GAAG;IAC7B,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,SAAS,EAAE,OAAO,GAAE,uBAA4B,GAAG,YAAY,EAAE,CAsBrH"}