@scalar/api-reference 1.49.4 → 1.49.5
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.
- package/CHANGELOG.md +8 -0
- package/dist/browser/standalone.js +2309 -45729
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/AgentScalar/AgentScalarChatInterface.vue.d.ts +2 -1
- package/dist/components/AgentScalar/AgentScalarChatInterface.vue.d.ts.map +1 -1
- package/dist/components/AgentScalar/AgentScalarChatInterface.vue.js.map +1 -1
- package/dist/components/AgentScalar/AgentScalarChatInterface.vue.script.js +6 -4
- package/dist/components/AgentScalar/AgentScalarChatInterface.vue.script.js.map +1 -1
- package/dist/components/AgentScalar/AgentScalarDrawer.vue.d.ts +2 -3
- package/dist/components/AgentScalar/AgentScalarDrawer.vue.d.ts.map +1 -1
- package/dist/components/AgentScalar/AgentScalarDrawer.vue.js +1 -1
- package/dist/components/AgentScalar/AgentScalarDrawer.vue.js.map +1 -1
- package/dist/components/AgentScalar/AgentScalarDrawer.vue.script.js +4 -2
- package/dist/components/AgentScalar/AgentScalarDrawer.vue.script.js.map +1 -1
- package/dist/components/AgentScalar/OpenMCPButton.vue.d.ts +2 -0
- package/dist/components/AgentScalar/OpenMCPButton.vue.d.ts.map +1 -1
- package/dist/components/AgentScalar/OpenMCPButton.vue.js +1 -1
- package/dist/components/AgentScalar/OpenMCPButton.vue.js.map +1 -1
- package/dist/components/AgentScalar/OpenMCPButton.vue.script.js +5 -5
- package/dist/components/AgentScalar/OpenMCPButton.vue.script.js.map +1 -1
- package/dist/components/ApiReference.vue.d.ts.map +1 -1
- package/dist/components/ApiReference.vue.js +1 -1
- package/dist/components/ApiReference.vue.js.map +1 -1
- package/dist/components/ApiReference.vue.script.js +6 -0
- package/dist/components/ApiReference.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.d.ts +4 -0
- package/dist/components/Content/Schema/Schema.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.js +1 -1
- package/dist/components/Content/Schema/Schema.vue.js.map +1 -1
- package/dist/components/Content/Schema/Schema.vue.script.js +15 -5
- package/dist/components/Content/Schema/Schema.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/SchemaComposition.vue.d.ts +4 -0
- package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaComposition.vue.js.map +1 -1
- package/dist/components/Content/Schema/SchemaComposition.vue.script.js +33 -3
- package/dist/components/Content/Schema/SchemaComposition.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts +2 -0
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.js.map +1 -1
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.script.js +25 -5
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.script.js.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +6 -0
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.js.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.script.js +20 -3
- package/dist/components/Content/Schema/SchemaProperty.vue.script.js.map +1 -1
- package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/RequestBody.vue.js +1 -1
- package/dist/features/Operation/components/RequestBody.vue.js.map +1 -1
- package/dist/features/Operation/components/RequestBody.vue.script.js +6 -0
- package/dist/features/Operation/components/RequestBody.vue.script.js.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.js +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.js.map +1 -1
- package/dist/features/Operation/layouts/ClassicLayout.vue.script.js +16 -5
- package/dist/features/Operation/layouts/ClassicLayout.vue.script.js.map +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.d.ts.map +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.js +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.js.map +1 -1
- package/dist/features/Operation/layouts/ModernLayout.vue.script.js +16 -5
- package/dist/features/Operation/layouts/ModernLayout.vue.script.js.map +1 -1
- package/dist/features/Operation/request-body-composition-index.d.ts +8 -0
- package/dist/features/Operation/request-body-composition-index.d.ts.map +1 -0
- package/dist/features/Operation/request-body-composition-index.js +10 -0
- package/dist/features/Operation/request-body-composition-index.js.map +1 -0
- package/dist/features/developer-tools/DeveloperTools.vue.d.ts +2 -1
- package/dist/features/developer-tools/DeveloperTools.vue.d.ts.map +1 -1
- package/dist/features/developer-tools/DeveloperTools.vue.js.map +1 -1
- package/dist/features/developer-tools/DeveloperTools.vue.script.js +9 -2
- package/dist/features/developer-tools/DeveloperTools.vue.script.js.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.d.ts +2 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.d.ts.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.js.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.script.js +3 -3
- package/dist/features/developer-tools/components/ApiReferenceToolbarRegisterButton.vue.script.js.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.d.ts +2 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.d.ts.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.js.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.script.js +9 -3
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareRegister.vue.script.js.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.d.ts +2 -0
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.d.ts.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.js.map +1 -1
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.script.js +6 -4
- package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.script.js.map +1 -1
- package/dist/features/developer-tools/components/DeployApiReference.vue.d.ts +2 -0
- package/dist/features/developer-tools/components/DeployApiReference.vue.d.ts.map +1 -1
- package/dist/features/developer-tools/components/DeployApiReference.vue.js.map +1 -1
- package/dist/features/developer-tools/components/DeployApiReference.vue.script.js +8 -2
- package/dist/features/developer-tools/components/DeployApiReference.vue.script.js.map +1 -1
- package/dist/features/developer-tools/components/ShareApiReference.vue.d.ts +2 -0
- package/dist/features/developer-tools/components/ShareApiReference.vue.d.ts.map +1 -1
- package/dist/features/developer-tools/components/ShareApiReference.vue.js.map +1 -1
- package/dist/features/developer-tools/components/ShareApiReference.vue.script.js +8 -2
- package/dist/features/developer-tools/components/ShareApiReference.vue.script.js.map +1 -1
- package/dist/features/test-request-button/TestRequestButton.vue.d.ts +1 -0
- package/dist/features/test-request-button/TestRequestButton.vue.d.ts.map +1 -1
- package/dist/features/test-request-button/TestRequestButton.vue.js +1 -1
- package/dist/features/test-request-button/TestRequestButton.vue.js.map +1 -1
- package/dist/features/test-request-button/TestRequestButton.vue.script.js +4 -2
- package/dist/features/test-request-button/TestRequestButton.vue.script.js.map +1 -1
- package/dist/helpers/upload-temp-document.d.ts +2 -1
- package/dist/helpers/upload-temp-document.d.ts.map +1 -1
- package/dist/helpers/upload-temp-document.js +3 -3
- package/dist/helpers/upload-temp-document.js.map +1 -1
- package/dist/style.css +175 -175
- package/package.json +13 -13
- package/dist/consts/urls.d.ts +0 -13
- package/dist/consts/urls.d.ts.map +0 -1
- package/dist/consts/urls.js +0 -17
- package/dist/consts/urls.js.map +0 -1
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import type { ExternalUrls } from '@scalar/types/api-reference';
|
|
1
2
|
import type { WorkspaceStore } from '@scalar/workspace-store/client';
|
|
2
3
|
type __VLS_Props = {
|
|
3
4
|
workspace: WorkspaceStore;
|
|
5
|
+
externalUrls: ExternalUrls;
|
|
4
6
|
};
|
|
5
7
|
type __VLS_ModelProps = {
|
|
6
8
|
'url'?: string;
|
package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiReferenceToolbarShareTemporary.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue"],"names":[],"mappings":"AAiFA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;
|
|
1
|
+
{"version":3,"file":"ApiReferenceToolbarShareTemporary.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue"],"names":[],"mappings":"AAiFA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAE/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAMpE,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,cAAc,CAAA;IACzB,YAAY,EAAE,YAAY,CAAA;CAC3B,CAAC;AAqCF,KAAK,gBAAgB,GAAG;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAKF,KAAK,iBAAiB,GAAG,WAAW,GAAG,gBAAgB,CAAC;AAoFxD,QAAA,MAAM,YAAY;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiReferenceToolbarShareTemporary.vue.js","names":[],"sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport {\n ScalarButton,\n ScalarTextInputCopy,\n useLoadingState,\n} from '@scalar/components'\nimport {
|
|
1
|
+
{"version":3,"file":"ApiReferenceToolbarShareTemporary.vue.js","names":[],"sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport {\n ScalarButton,\n ScalarTextInputCopy,\n useLoadingState,\n} from '@scalar/components'\nimport type { ExternalUrls } from '@scalar/types/api-reference'\nimport { useToasts } from '@scalar/use-toasts'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\n\nimport { uploadTempDocument } from '@/helpers/upload-temp-document'\n\nimport ApiReferenceToolbarBlurb from './ApiReferenceToolbarBlurb.vue'\n\nconst { workspace, externalUrls } = defineProps<{\n workspace: WorkspaceStore\n externalUrls: ExternalUrls\n}>()\n\nconst { toast } = useToasts()\nconst loader = useLoadingState()\n\nconst tempDocUrl = defineModel<string>('url')\n\nasync function generateTemporaryLink() {\n if (loader.isLoading || !workspace || !!tempDocUrl.value) {\n return\n }\n\n loader.start()\n\n const document = workspace.exportActiveDocument('json')\n\n if (!document) {\n toast('Unable to export active document', 'error')\n await loader.invalidate()\n return\n }\n\n try {\n const url = await uploadTempDocument(document, externalUrls)\n await loader.validate({ duration: 900, persist: true }) // Wait to show the success state\n tempDocUrl.value = url\n } catch (error) {\n const message =\n error instanceof Error ? error.message : 'An unknown error occurred'\n toast(message, 'error')\n await loader.invalidate()\n }\n}\n</script>\n<template>\n <template v-if=\"tempDocUrl\">\n <ScalarTextInputCopy\n immediate\n :modelValue=\"tempDocUrl\"\n name=\"temporary-link\"\n :placeholder=\"`${externalUrls.registryUrl}/share/apis/…`\">\n </ScalarTextInputCopy>\n </template>\n <template v-else>\n <ScalarButton\n class=\"h-auto p-2.5\"\n :loader\n variant=\"gradient\"\n @click=\"generateTemporaryLink\">\n Upload Document\n </ScalarButton>\n </template>\n <ApiReferenceToolbarBlurb class=\"-mt-1\">\n Your document will automatically be deleted after 7 days.\n </ApiReferenceToolbarBlurb>\n</template>\n"],"mappings":""}
|
package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.script.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { REGISTRY_SHARE_URL } from "../../../consts/urls.js";
|
|
2
1
|
import { uploadTempDocument } from "../../../helpers/upload-temp-document.js";
|
|
3
2
|
import ApiReferenceToolbarBlurb_default from "./ApiReferenceToolbarBlurb.vue.js";
|
|
4
3
|
import { Fragment, createBlock, createElementBlock, createTextVNode, createVNode, defineComponent, mergeModels, openBlock, unref, useModel, withCtx } from "vue";
|
|
@@ -7,7 +6,10 @@ import { useToasts } from "@scalar/use-toasts";
|
|
|
7
6
|
//#region src/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue?vue&type=script&setup=true&lang.ts
|
|
8
7
|
var ApiReferenceToolbarShareTemporary_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
9
8
|
__name: "ApiReferenceToolbarShareTemporary",
|
|
10
|
-
props: /* @__PURE__ */ mergeModels({
|
|
9
|
+
props: /* @__PURE__ */ mergeModels({
|
|
10
|
+
workspace: {},
|
|
11
|
+
externalUrls: {}
|
|
12
|
+
}, {
|
|
11
13
|
"url": {},
|
|
12
14
|
"urlModifiers": {}
|
|
13
15
|
}),
|
|
@@ -26,7 +28,7 @@ var ApiReferenceToolbarShareTemporary_vue_vue_type_script_setup_true_lang_defaul
|
|
|
26
28
|
return;
|
|
27
29
|
}
|
|
28
30
|
try {
|
|
29
|
-
const url = await uploadTempDocument(document);
|
|
31
|
+
const url = await uploadTempDocument(document, __props.externalUrls);
|
|
30
32
|
await loader.validate({
|
|
31
33
|
duration: 900,
|
|
32
34
|
persist: true
|
|
@@ -43,7 +45,7 @@ var ApiReferenceToolbarShareTemporary_vue_vue_type_script_setup_true_lang_defaul
|
|
|
43
45
|
immediate: "",
|
|
44
46
|
modelValue: tempDocUrl.value,
|
|
45
47
|
name: "temporary-link",
|
|
46
|
-
placeholder: `${
|
|
48
|
+
placeholder: `${__props.externalUrls.registryUrl}/share/apis/…`
|
|
47
49
|
}, null, 8, ["modelValue", "placeholder"])) : (openBlock(), createBlock(unref(ScalarButton), {
|
|
48
50
|
key: 1,
|
|
49
51
|
class: "h-auto p-2.5",
|
package/dist/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue.script.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiReferenceToolbarShareTemporary.vue.script.js","names":[],"sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport {\n ScalarButton,\n ScalarTextInputCopy,\n useLoadingState,\n} from '@scalar/components'\nimport {
|
|
1
|
+
{"version":3,"file":"ApiReferenceToolbarShareTemporary.vue.script.js","names":[],"sources":["../../../../src/features/developer-tools/components/ApiReferenceToolbarShareTemporary.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport {\n ScalarButton,\n ScalarTextInputCopy,\n useLoadingState,\n} from '@scalar/components'\nimport type { ExternalUrls } from '@scalar/types/api-reference'\nimport { useToasts } from '@scalar/use-toasts'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\n\nimport { uploadTempDocument } from '@/helpers/upload-temp-document'\n\nimport ApiReferenceToolbarBlurb from './ApiReferenceToolbarBlurb.vue'\n\nconst { workspace, externalUrls } = defineProps<{\n workspace: WorkspaceStore\n externalUrls: ExternalUrls\n}>()\n\nconst { toast } = useToasts()\nconst loader = useLoadingState()\n\nconst tempDocUrl = defineModel<string>('url')\n\nasync function generateTemporaryLink() {\n if (loader.isLoading || !workspace || !!tempDocUrl.value) {\n return\n }\n\n loader.start()\n\n const document = workspace.exportActiveDocument('json')\n\n if (!document) {\n toast('Unable to export active document', 'error')\n await loader.invalidate()\n return\n }\n\n try {\n const url = await uploadTempDocument(document, externalUrls)\n await loader.validate({ duration: 900, persist: true }) // Wait to show the success state\n tempDocUrl.value = url\n } catch (error) {\n const message =\n error instanceof Error ? error.message : 'An unknown error occurred'\n toast(message, 'error')\n await loader.invalidate()\n }\n}\n</script>\n<template>\n <template v-if=\"tempDocUrl\">\n <ScalarTextInputCopy\n immediate\n :modelValue=\"tempDocUrl\"\n name=\"temporary-link\"\n :placeholder=\"`${externalUrls.registryUrl}/share/apis/…`\">\n </ScalarTextInputCopy>\n </template>\n <template v-else>\n <ScalarButton\n class=\"h-auto p-2.5\"\n :loader\n variant=\"gradient\"\n @click=\"generateTemporaryLink\">\n Upload Document\n </ScalarButton>\n </template>\n <ApiReferenceToolbarBlurb class=\"-mt-1\">\n Your document will automatically be deleted after 7 days.\n </ApiReferenceToolbarBlurb>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;EAmBA,MAAM,EAAE,UAAU,WAAU;EAC5B,MAAM,SAAS,iBAAgB;EAE/B,MAAM,aAAa,SAAmB,SAAC,MAAK;EAE5C,eAAe,wBAAwB;AACrC,OAAI,OAAO,aAAa,CAAC,QAAA,aAAa,CAAC,CAAC,WAAW,MACjD;AAGF,UAAO,OAAM;GAEb,MAAM,WAAW,QAAA,UAAU,qBAAqB,OAAM;AAEtD,OAAI,CAAC,UAAU;AACb,UAAM,oCAAoC,QAAO;AACjD,UAAM,OAAO,YAAW;AACxB;;AAGF,OAAI;IACF,MAAM,MAAM,MAAM,mBAAmB,UAAU,QAAA,aAAY;AAC3D,UAAM,OAAO,SAAS;KAAE,UAAU;KAAK,SAAS;KAAM,CAAC;AACvD,eAAW,QAAQ;YACZ,OAAO;AAGd,UADE,iBAAiB,QAAQ,MAAM,UAAU,6BAC5B,QAAO;AACtB,UAAM,OAAO,YAAW;;;;2DAKV,WAAA,SAAA,WAAA,EACd,YAKsB,MAAA,oBAAA,EAAA;;IAJpB,WAAA;IACC,YAAY,WAAA;IACb,MAAK;IACJ,aAAW,GAAK,QAAA,aAAa,YAAW;+DAI3C,YAMe,MAAA,aAAA,EAAA;;IALb,OAAM;IACL,QAAA,MAAA,OAAM;IACP,SAAQ;IACP,SAAO;;2BAEV,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAFiC,qBAEjC,GAAA,CAAA,EAAA,CAAA;;uBAEF,YAE2B,kCAAA,EAFD,OAAM,SAAO,EAAA;2BAEvC,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAFwC,+DAExC,GAAA,CAAA,EAAA,CAAA"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import type { ExternalUrls } from '@scalar/types/api-reference';
|
|
1
2
|
import type { WorkspaceStore } from '@scalar/workspace-store/client';
|
|
2
3
|
type __VLS_Props = {
|
|
3
4
|
workspace: WorkspaceStore;
|
|
5
|
+
externalUrls: ExternalUrls;
|
|
4
6
|
};
|
|
5
7
|
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>;
|
|
6
8
|
declare const _default: typeof __VLS_export;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeployApiReference.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/developer-tools/components/DeployApiReference.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DeployApiReference.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/developer-tools/components/DeployApiReference.vue"],"names":[],"mappings":"AAiCA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAKpE,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,cAAc,CAAA;IACzB,YAAY,EAAE,YAAY,CAAA;CAC3B,CAAC;AAmEF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeployApiReference.vue.js","names":[],"sources":["../../../../src/features/developer-tools/components/DeployApiReference.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarFormSection } from '@scalar/components'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\n\nimport ApiReferenceToolbarPopover from './ApiReferenceToolbarPopover.vue'\nimport ApiReferenceToolbarShareRegister from './ApiReferenceToolbarShareRegister.vue'\n\nconst { workspace } = defineProps<{\n workspace: WorkspaceStore\n}>()\n</script>\n\n<template>\n <ApiReferenceToolbarPopover class=\"w-120\">\n <template #label>Deploy</template>\n <ScalarFormSection>\n <template #label>Scalar Docs</template>\n <p class=\"text-c-2 mb-2 leading-normal\">\n Deploy your documentation on Scalar, the modern documentation platform\n for your API and everything else.\n </p>\n <ApiReferenceToolbarShareRegister
|
|
1
|
+
{"version":3,"file":"DeployApiReference.vue.js","names":[],"sources":["../../../../src/features/developer-tools/components/DeployApiReference.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarFormSection } from '@scalar/components'\nimport type { ExternalUrls } from '@scalar/types/api-reference'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\n\nimport ApiReferenceToolbarPopover from './ApiReferenceToolbarPopover.vue'\nimport ApiReferenceToolbarShareRegister from './ApiReferenceToolbarShareRegister.vue'\n\nconst { workspace, externalUrls } = defineProps<{\n workspace: WorkspaceStore\n externalUrls: ExternalUrls\n}>()\n</script>\n\n<template>\n <ApiReferenceToolbarPopover class=\"w-120\">\n <template #label>Deploy</template>\n <ScalarFormSection>\n <template #label>Scalar Docs</template>\n <p class=\"text-c-2 mb-2 leading-normal\">\n Deploy your documentation on Scalar, the modern documentation platform\n for your API and everything else.\n </p>\n <ApiReferenceToolbarShareRegister\n :externalUrls\n :workspace />\n </ScalarFormSection>\n </ApiReferenceToolbarPopover>\n</template>\n"],"mappings":""}
|
|
@@ -5,14 +5,20 @@ import { ScalarFormSection } from "@scalar/components";
|
|
|
5
5
|
//#region src/features/developer-tools/components/DeployApiReference.vue?vue&type=script&setup=true&lang.ts
|
|
6
6
|
var DeployApiReference_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
7
7
|
__name: "DeployApiReference",
|
|
8
|
-
props: {
|
|
8
|
+
props: {
|
|
9
|
+
workspace: {},
|
|
10
|
+
externalUrls: {}
|
|
11
|
+
},
|
|
9
12
|
setup(__props) {
|
|
10
13
|
return (_ctx, _cache) => {
|
|
11
14
|
return openBlock(), createBlock(ApiReferenceToolbarPopover_default, { class: "w-120" }, {
|
|
12
15
|
label: withCtx(() => [..._cache[0] || (_cache[0] = [createTextVNode("Deploy", -1)])]),
|
|
13
16
|
default: withCtx(() => [createVNode(unref(ScalarFormSection), null, {
|
|
14
17
|
label: withCtx(() => [..._cache[1] || (_cache[1] = [createTextVNode("Scalar Docs", -1)])]),
|
|
15
|
-
default: withCtx(() => [_cache[2] || (_cache[2] = createElementVNode("p", { class: "text-c-2 mb-2 leading-normal" }, " Deploy your documentation on Scalar, the modern documentation platform for your API and everything else. ", -1)), createVNode(ApiReferenceToolbarShareRegister_default, {
|
|
18
|
+
default: withCtx(() => [_cache[2] || (_cache[2] = createElementVNode("p", { class: "text-c-2 mb-2 leading-normal" }, " Deploy your documentation on Scalar, the modern documentation platform for your API and everything else. ", -1)), createVNode(ApiReferenceToolbarShareRegister_default, {
|
|
19
|
+
externalUrls: __props.externalUrls,
|
|
20
|
+
workspace: __props.workspace
|
|
21
|
+
}, null, 8, ["externalUrls", "workspace"])]),
|
|
16
22
|
_: 1
|
|
17
23
|
})]),
|
|
18
24
|
_: 1
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeployApiReference.vue.script.js","names":[],"sources":["../../../../src/features/developer-tools/components/DeployApiReference.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarFormSection } from '@scalar/components'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\n\nimport ApiReferenceToolbarPopover from './ApiReferenceToolbarPopover.vue'\nimport ApiReferenceToolbarShareRegister from './ApiReferenceToolbarShareRegister.vue'\n\nconst { workspace } = defineProps<{\n workspace: WorkspaceStore\n}>()\n</script>\n\n<template>\n <ApiReferenceToolbarPopover class=\"w-120\">\n <template #label>Deploy</template>\n <ScalarFormSection>\n <template #label>Scalar Docs</template>\n <p class=\"text-c-2 mb-2 leading-normal\">\n Deploy your documentation on Scalar, the modern documentation platform\n for your API and everything else.\n </p>\n <ApiReferenceToolbarShareRegister
|
|
1
|
+
{"version":3,"file":"DeployApiReference.vue.script.js","names":[],"sources":["../../../../src/features/developer-tools/components/DeployApiReference.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarFormSection } from '@scalar/components'\nimport type { ExternalUrls } from '@scalar/types/api-reference'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\n\nimport ApiReferenceToolbarPopover from './ApiReferenceToolbarPopover.vue'\nimport ApiReferenceToolbarShareRegister from './ApiReferenceToolbarShareRegister.vue'\n\nconst { workspace, externalUrls } = defineProps<{\n workspace: WorkspaceStore\n externalUrls: ExternalUrls\n}>()\n</script>\n\n<template>\n <ApiReferenceToolbarPopover class=\"w-120\">\n <template #label>Deploy</template>\n <ScalarFormSection>\n <template #label>Scalar Docs</template>\n <p class=\"text-c-2 mb-2 leading-normal\">\n Deploy your documentation on Scalar, the modern documentation platform\n for your API and everything else.\n </p>\n <ApiReferenceToolbarShareRegister\n :externalUrls\n :workspace />\n </ScalarFormSection>\n </ApiReferenceToolbarPopover>\n</template>\n"],"mappings":";;;;;;;;;;;;;uBAeE,YAY6B,oCAAA,EAZD,OAAM,SAAO,EAAA;IAC5B,OAAK,cAAO,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAAN,UAAM,GAAA,CAAA,EAAA,CAAA;2BAUH,CATpB,YASoB,MAAA,kBAAA,EAAA,MAAA;KARP,OAAK,cAAY,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAAX,eAAW,GAAA,CAAA,EAAA,CAAA;4BAIxB,CAAA,OAAA,OAAA,OAAA,KAHJ,mBAGI,KAAA,EAHD,OAAM,gCAA8B,EAAC,8GAGxC,GAAA,GACA,YAEe,0CAAA;MADZ,cAAA,QAAA;MACA,WAAA,QAAA"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import type { ExternalUrls } from '@scalar/types/api-reference';
|
|
1
2
|
import type { WorkspaceStore } from '@scalar/workspace-store/client';
|
|
2
3
|
type __VLS_Props = {
|
|
3
4
|
workspace: WorkspaceStore;
|
|
5
|
+
externalUrls: ExternalUrls;
|
|
4
6
|
};
|
|
5
7
|
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>;
|
|
6
8
|
declare const _default: typeof __VLS_export;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShareApiReference.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/developer-tools/components/ShareApiReference.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ShareApiReference.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/developer-tools/components/ShareApiReference.vue"],"names":[],"mappings":"AAgCA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAKpE,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,cAAc,CAAA;IACzB,YAAY,EAAE,YAAY,CAAA;CAC3B,CAAC;AAmEF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShareApiReference.vue.js","names":[],"sources":["../../../../src/features/developer-tools/components/ShareApiReference.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarFormSection } from '@scalar/components'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\n\nimport ApiReferenceToolbarPopover from './ApiReferenceToolbarPopover.vue'\nimport ApiReferenceToolbarShareTemporary from './ApiReferenceToolbarShareTemporary.vue'\n\nconst { workspace } = defineProps<{\n workspace: WorkspaceStore\n}>()\n</script>\n<template>\n <ApiReferenceToolbarPopover class=\"w-120\">\n <template #label>Share</template>\n <ScalarFormSection>\n <template #label>Share your API Reference</template>\n <p class=\"text-c-2 mb-2 leading-normal\">\n Upload your OpenAPI document to share your API Reference with others. As\n easy as pressing a button.\n </p>\n <ApiReferenceToolbarShareTemporary
|
|
1
|
+
{"version":3,"file":"ShareApiReference.vue.js","names":[],"sources":["../../../../src/features/developer-tools/components/ShareApiReference.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarFormSection } from '@scalar/components'\nimport type { ExternalUrls } from '@scalar/types/api-reference'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\n\nimport ApiReferenceToolbarPopover from './ApiReferenceToolbarPopover.vue'\nimport ApiReferenceToolbarShareTemporary from './ApiReferenceToolbarShareTemporary.vue'\n\nconst { workspace, externalUrls } = defineProps<{\n workspace: WorkspaceStore\n externalUrls: ExternalUrls\n}>()\n</script>\n<template>\n <ApiReferenceToolbarPopover class=\"w-120\">\n <template #label>Share</template>\n <ScalarFormSection>\n <template #label>Share your API Reference</template>\n <p class=\"text-c-2 mb-2 leading-normal\">\n Upload your OpenAPI document to share your API Reference with others. As\n easy as pressing a button.\n </p>\n <ApiReferenceToolbarShareTemporary\n :externalUrls\n :workspace />\n </ScalarFormSection>\n </ApiReferenceToolbarPopover>\n</template>\n"],"mappings":""}
|
|
@@ -5,14 +5,20 @@ import { ScalarFormSection } from "@scalar/components";
|
|
|
5
5
|
//#region src/features/developer-tools/components/ShareApiReference.vue?vue&type=script&setup=true&lang.ts
|
|
6
6
|
var ShareApiReference_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
7
7
|
__name: "ShareApiReference",
|
|
8
|
-
props: {
|
|
8
|
+
props: {
|
|
9
|
+
workspace: {},
|
|
10
|
+
externalUrls: {}
|
|
11
|
+
},
|
|
9
12
|
setup(__props) {
|
|
10
13
|
return (_ctx, _cache) => {
|
|
11
14
|
return openBlock(), createBlock(ApiReferenceToolbarPopover_default, { class: "w-120" }, {
|
|
12
15
|
label: withCtx(() => [..._cache[0] || (_cache[0] = [createTextVNode("Share", -1)])]),
|
|
13
16
|
default: withCtx(() => [createVNode(unref(ScalarFormSection), null, {
|
|
14
17
|
label: withCtx(() => [..._cache[1] || (_cache[1] = [createTextVNode("Share your API Reference", -1)])]),
|
|
15
|
-
default: withCtx(() => [_cache[2] || (_cache[2] = createElementVNode("p", { class: "text-c-2 mb-2 leading-normal" }, " Upload your OpenAPI document to share your API Reference with others. As easy as pressing a button. ", -1)), createVNode(ApiReferenceToolbarShareTemporary_default, {
|
|
18
|
+
default: withCtx(() => [_cache[2] || (_cache[2] = createElementVNode("p", { class: "text-c-2 mb-2 leading-normal" }, " Upload your OpenAPI document to share your API Reference with others. As easy as pressing a button. ", -1)), createVNode(ApiReferenceToolbarShareTemporary_default, {
|
|
19
|
+
externalUrls: __props.externalUrls,
|
|
20
|
+
workspace: __props.workspace
|
|
21
|
+
}, null, 8, ["externalUrls", "workspace"])]),
|
|
16
22
|
_: 1
|
|
17
23
|
})]),
|
|
18
24
|
_: 1
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShareApiReference.vue.script.js","names":[],"sources":["../../../../src/features/developer-tools/components/ShareApiReference.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarFormSection } from '@scalar/components'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\n\nimport ApiReferenceToolbarPopover from './ApiReferenceToolbarPopover.vue'\nimport ApiReferenceToolbarShareTemporary from './ApiReferenceToolbarShareTemporary.vue'\n\nconst { workspace } = defineProps<{\n workspace: WorkspaceStore\n}>()\n</script>\n<template>\n <ApiReferenceToolbarPopover class=\"w-120\">\n <template #label>Share</template>\n <ScalarFormSection>\n <template #label>Share your API Reference</template>\n <p class=\"text-c-2 mb-2 leading-normal\">\n Upload your OpenAPI document to share your API Reference with others. As\n easy as pressing a button.\n </p>\n <ApiReferenceToolbarShareTemporary
|
|
1
|
+
{"version":3,"file":"ShareApiReference.vue.script.js","names":[],"sources":["../../../../src/features/developer-tools/components/ShareApiReference.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ScalarFormSection } from '@scalar/components'\nimport type { ExternalUrls } from '@scalar/types/api-reference'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\n\nimport ApiReferenceToolbarPopover from './ApiReferenceToolbarPopover.vue'\nimport ApiReferenceToolbarShareTemporary from './ApiReferenceToolbarShareTemporary.vue'\n\nconst { workspace, externalUrls } = defineProps<{\n workspace: WorkspaceStore\n externalUrls: ExternalUrls\n}>()\n</script>\n<template>\n <ApiReferenceToolbarPopover class=\"w-120\">\n <template #label>Share</template>\n <ScalarFormSection>\n <template #label>Share your API Reference</template>\n <p class=\"text-c-2 mb-2 leading-normal\">\n Upload your OpenAPI document to share your API Reference with others. As\n easy as pressing a button.\n </p>\n <ApiReferenceToolbarShareTemporary\n :externalUrls\n :workspace />\n </ScalarFormSection>\n </ApiReferenceToolbarPopover>\n</template>\n"],"mappings":";;;;;;;;;;;;;uBAcE,YAY6B,oCAAA,EAZD,OAAM,SAAO,EAAA;IAC5B,OAAK,cAAM,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAAL,SAAK,GAAA,CAAA,EAAA,CAAA;2BAUF,CATpB,YASoB,MAAA,kBAAA,EAAA,MAAA;KARP,OAAK,cAAyB,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAAxB,4BAAwB,GAAA,CAAA,EAAA,CAAA;4BAIrC,CAAA,OAAA,OAAA,OAAA,KAHJ,mBAGI,KAAA,EAHD,OAAM,gCAA8B,EAAC,yGAGxC,GAAA,GACA,YAEe,2CAAA;MADZ,cAAA,QAAA;MACA,WAAA,QAAA"}
|
|
@@ -6,6 +6,7 @@ type __VLS_Props = {
|
|
|
6
6
|
path: string;
|
|
7
7
|
eventBus: WorkspaceEventBus;
|
|
8
8
|
exampleName?: string;
|
|
9
|
+
requestBodyCompositionSelection?: Record<string, number>;
|
|
9
10
|
};
|
|
10
11
|
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>;
|
|
11
12
|
declare const _default: typeof __VLS_export;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TestRequestButton.vue.d.ts","sourceRoot":"","sources":["../../../src/features/test-request-button/TestRequestButton.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TestRequestButton.vue.d.ts","sourceRoot":"","sources":["../../../src/features/test-request-button/TestRequestButton.vue"],"names":[],"mappings":"AA0FA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAEnE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAIvE,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,UAAU,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,+BAA+B,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACzD,CAAC;AAuFF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -2,7 +2,7 @@ import _plugin_vue_export_helper_default from "../../_virtual/_plugin-vue_export
|
|
|
2
2
|
import TestRequestButton_vue_vue_type_script_setup_true_lang_default from "./TestRequestButton.vue.script.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
//#region src/features/test-request-button/TestRequestButton.vue
|
|
5
|
-
var TestRequestButton_default = /* @__PURE__ */ _plugin_vue_export_helper_default(TestRequestButton_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
5
|
+
var TestRequestButton_default = /* @__PURE__ */ _plugin_vue_export_helper_default(TestRequestButton_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-15e312d9"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { TestRequestButton_default as default };
|
|
8
8
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TestRequestButton.vue.js","names":[],"sources":["../../../src/features/test-request-button/TestRequestButton.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { HttpMethod } from '@scalar/helpers/http/http-methods'\nimport { ScalarIconPlay } from '@scalar/icons'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\n\nimport ScreenReader from '@/components/ScreenReader.vue'\n\nconst {
|
|
1
|
+
{"version":3,"file":"TestRequestButton.vue.js","names":[],"sources":["../../../src/features/test-request-button/TestRequestButton.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { HttpMethod } from '@scalar/helpers/http/http-methods'\nimport { ScalarIconPlay } from '@scalar/icons'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\n\nimport ScreenReader from '@/components/ScreenReader.vue'\n\nconst {\n id,\n method,\n path,\n eventBus,\n exampleName,\n requestBodyCompositionSelection,\n} = defineProps<{\n id: string\n method: HttpMethod\n path: string\n eventBus: WorkspaceEventBus\n exampleName?: string\n requestBodyCompositionSelection?: Record<string, number>\n}>()\n\n/** Route via ID and optionally with example name */\nconst handleClick = () => {\n // Include exampleName in payload if provided\n const payload = {\n id,\n ...(exampleName && { exampleName }),\n ...(requestBodyCompositionSelection &&\n Object.keys(requestBodyCompositionSelection).length > 0 && {\n requestBodyCompositionSelection,\n }),\n }\n eventBus.emit('ui:open:client-modal', payload)\n}\n</script>\n<template>\n <!-- Render the Test Request Button -->\n <button\n class=\"show-api-client-button\"\n :method=\"method\"\n type=\"button\"\n @click.stop=\"handleClick\">\n <ScalarIconPlay\n class=\"size-3\"\n weight=\"fill\" />\n <span>Test Request</span>\n <ScreenReader>({{ method }} {{ path }})</ScreenReader>\n </button>\n</template>\n<style scoped>\n.show-api-client-button {\n appearance: none;\n border: none;\n padding: 1px 6px;\n white-space: nowrap;\n border-radius: var(--scalar-radius);\n display: flex;\n justify-content: center;\n align-items: center;\n font-weight: var(--scalar-semibold);\n font-size: var(--scalar-small);\n line-height: 22px;\n color: var(--scalar-background-2);\n font-family: var(--scalar-font);\n background: var(--scalar-button-1);\n position: relative;\n cursor: pointer;\n box-sizing: border-box;\n box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);\n\n outline-offset: 2px;\n}\n.show-api-client-button span,\n.show-api-client-button svg {\n fill: currentColor;\n color: var(--scalar-button-1-color);\n z-index: 1;\n}\n.show-api-client-button:hover {\n background: var(--scalar-button-1-hover);\n}\n.show-api-client-button svg {\n margin-right: 4px;\n}\n</style>\n"],"mappings":""}
|
|
@@ -10,14 +10,16 @@ var TestRequestButton_vue_vue_type_script_setup_true_lang_default = /* @__PURE__
|
|
|
10
10
|
method: {},
|
|
11
11
|
path: {},
|
|
12
12
|
eventBus: {},
|
|
13
|
-
exampleName: {}
|
|
13
|
+
exampleName: {},
|
|
14
|
+
requestBodyCompositionSelection: {}
|
|
14
15
|
},
|
|
15
16
|
setup(__props) {
|
|
16
17
|
/** Route via ID and optionally with example name */
|
|
17
18
|
const handleClick = () => {
|
|
18
19
|
const payload = {
|
|
19
20
|
id: __props.id,
|
|
20
|
-
...__props.exampleName && { exampleName: __props.exampleName }
|
|
21
|
+
...__props.exampleName && { exampleName: __props.exampleName },
|
|
22
|
+
...__props.requestBodyCompositionSelection && Object.keys(__props.requestBodyCompositionSelection).length > 0 && { requestBodyCompositionSelection: __props.requestBodyCompositionSelection }
|
|
21
23
|
};
|
|
22
24
|
__props.eventBus.emit("ui:open:client-modal", payload);
|
|
23
25
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TestRequestButton.vue.script.js","names":[],"sources":["../../../src/features/test-request-button/TestRequestButton.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { HttpMethod } from '@scalar/helpers/http/http-methods'\nimport { ScalarIconPlay } from '@scalar/icons'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\n\nimport ScreenReader from '@/components/ScreenReader.vue'\n\nconst {
|
|
1
|
+
{"version":3,"file":"TestRequestButton.vue.script.js","names":[],"sources":["../../../src/features/test-request-button/TestRequestButton.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { HttpMethod } from '@scalar/helpers/http/http-methods'\nimport { ScalarIconPlay } from '@scalar/icons'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\n\nimport ScreenReader from '@/components/ScreenReader.vue'\n\nconst {\n id,\n method,\n path,\n eventBus,\n exampleName,\n requestBodyCompositionSelection,\n} = defineProps<{\n id: string\n method: HttpMethod\n path: string\n eventBus: WorkspaceEventBus\n exampleName?: string\n requestBodyCompositionSelection?: Record<string, number>\n}>()\n\n/** Route via ID and optionally with example name */\nconst handleClick = () => {\n // Include exampleName in payload if provided\n const payload = {\n id,\n ...(exampleName && { exampleName }),\n ...(requestBodyCompositionSelection &&\n Object.keys(requestBodyCompositionSelection).length > 0 && {\n requestBodyCompositionSelection,\n }),\n }\n eventBus.emit('ui:open:client-modal', payload)\n}\n</script>\n<template>\n <!-- Render the Test Request Button -->\n <button\n class=\"show-api-client-button\"\n :method=\"method\"\n type=\"button\"\n @click.stop=\"handleClick\">\n <ScalarIconPlay\n class=\"size-3\"\n weight=\"fill\" />\n <span>Test Request</span>\n <ScreenReader>({{ method }} {{ path }})</ScreenReader>\n </button>\n</template>\n<style scoped>\n.show-api-client-button {\n appearance: none;\n border: none;\n padding: 1px 6px;\n white-space: nowrap;\n border-radius: var(--scalar-radius);\n display: flex;\n justify-content: center;\n align-items: center;\n font-weight: var(--scalar-semibold);\n font-size: var(--scalar-small);\n line-height: 22px;\n color: var(--scalar-background-2);\n font-family: var(--scalar-font);\n background: var(--scalar-button-1);\n position: relative;\n cursor: pointer;\n box-sizing: border-box;\n box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);\n\n outline-offset: 2px;\n}\n.show-api-client-button span,\n.show-api-client-button svg {\n fill: currentColor;\n color: var(--scalar-button-1-color);\n z-index: 1;\n}\n.show-api-client-button:hover {\n background: var(--scalar-button-1-hover);\n}\n.show-api-client-button svg {\n margin-right: 4px;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;EAwBA,MAAM,oBAAoB;GAExB,MAAM,UAAU;IACd,IAAC,QAAA;IACD,GAAI,QAAA,eAAe,EAAE,aAAU,QAAA,aAAG;IAClC,GAAI,QAAA,mCACF,OAAO,KAAK,QAAA,gCAAgC,CAAC,SAAS,KAAK,EACzD,iCAA8B,QAAA,iCAC/B;IACL;AACA,WAAA,SAAS,KAAK,wBAAwB,QAAO;;;uBAK7C,mBAUS,UAAA;IATP,OAAM;IACL,QAAQ,QAAA;IACT,MAAK;IACJ,SAAK,cAAO,aAAW,CAAA,OAAA,CAAA;;IACxB,YAEkB,MAAA,eAAA,EAAA;KADhB,OAAM;KACN,QAAO;;8BACT,mBAAyB,QAAA,MAAnB,gBAAY,GAAA;IAClB,YAAsD,sBAAA,MAAA;4BAAvC,CAAA,gBAAD,MAAC,gBAAG,QAAA,OAAM,GAAG,MAAC,gBAAG,QAAA,KAAI,GAAG,KAAC,EAAA,CAAA,CAAA"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ExternalUrls } from '@scalar/types/api-reference';
|
|
1
2
|
/** Upload a document and return a temporary URL */
|
|
2
|
-
export declare function uploadTempDocument(document: string): Promise<string>;
|
|
3
|
+
export declare function uploadTempDocument(document: string, urls: Pick<ExternalUrls, 'proxyUrl' | 'apiBaseUrl'>): Promise<string>;
|
|
3
4
|
//# sourceMappingURL=upload-temp-document.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload-temp-document.d.ts","sourceRoot":"","sources":["../../src/helpers/upload-temp-document.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"upload-temp-document.d.ts","sourceRoot":"","sources":["../../src/helpers/upload-temp-document.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAO/D,mDAAmD;AACnD,wBAAsB,kBAAkB,CACtC,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,IAAI,CAAC,YAAY,EAAE,UAAU,GAAG,YAAY,CAAC,GAClD,OAAO,CAAC,MAAM,CAAC,CAqBjB"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { PROXY_URL, UPLOAD_TEMP_API_URL } from "../consts/urls.js";
|
|
2
1
|
import { redirectToProxy } from "@scalar/helpers/url/redirect-to-proxy";
|
|
3
2
|
//#region src/helpers/upload-temp-document.ts
|
|
4
3
|
/** Type guard for the response body */
|
|
@@ -6,9 +5,10 @@ function isResponseBody(data) {
|
|
|
6
5
|
return !!data && typeof data === "object" && "url" in data && typeof data.url === "string";
|
|
7
6
|
}
|
|
8
7
|
/** Upload a document and return a temporary URL */
|
|
9
|
-
async function uploadTempDocument(document) {
|
|
8
|
+
async function uploadTempDocument(document, urls) {
|
|
10
9
|
const body = JSON.stringify({ document });
|
|
11
|
-
const
|
|
10
|
+
const uploadUrl = `${urls.apiBaseUrl}/core/share/upload/apis`;
|
|
11
|
+
const response = await fetch(redirectToProxy(urls.proxyUrl, uploadUrl), {
|
|
12
12
|
method: "POST",
|
|
13
13
|
headers: { "Content-Type": "application/json" },
|
|
14
14
|
body
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload-temp-document.js","names":[],"sources":["../../src/helpers/upload-temp-document.ts"],"sourcesContent":["import { redirectToProxy } from '@scalar/helpers/url/redirect-to-proxy'\
|
|
1
|
+
{"version":3,"file":"upload-temp-document.js","names":[],"sources":["../../src/helpers/upload-temp-document.ts"],"sourcesContent":["import { redirectToProxy } from '@scalar/helpers/url/redirect-to-proxy'\nimport type { ExternalUrls } from '@scalar/types/api-reference'\n\n/** Type guard for the response body */\nfunction isResponseBody(data: unknown): data is { url: string } {\n return !!data && typeof data === 'object' && 'url' in data && typeof (data as any).url === 'string'\n}\n\n/** Upload a document and return a temporary URL */\nexport async function uploadTempDocument(\n document: string,\n urls: Pick<ExternalUrls, 'proxyUrl' | 'apiBaseUrl'>,\n): Promise<string> {\n const body = JSON.stringify({ document })\n const uploadUrl = `${urls.apiBaseUrl}/core/share/upload/apis`\n\n // Proxy the request to avoid localhost CORS issues\n const response = await fetch(redirectToProxy(urls.proxyUrl, uploadUrl), {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body,\n })\n\n if (!response.ok) {\n throw new Error(` Failed to generate temporary link, server responded with ${response.status}`)\n }\n const data = (await response.json()) as unknown\n\n if (!isResponseBody(data)) {\n throw new Error('Failed to generate temporary link, invalid response from server')\n }\n\n return data.url\n}\n"],"mappings":";;;AAIA,SAAS,eAAe,MAAwC;AAC9D,QAAO,CAAC,CAAC,QAAQ,OAAO,SAAS,YAAY,SAAS,QAAQ,OAAQ,KAAa,QAAQ;;;AAI7F,eAAsB,mBACpB,UACA,MACiB;CACjB,MAAM,OAAO,KAAK,UAAU,EAAE,UAAU,CAAC;CACzC,MAAM,YAAY,GAAG,KAAK,WAAW;CAGrC,MAAM,WAAW,MAAM,MAAM,gBAAgB,KAAK,UAAU,UAAU,EAAE;EACtE,QAAQ;EACR,SAAS,EAAE,gBAAgB,oBAAoB;EAC/C;EACD,CAAC;AAEF,KAAI,CAAC,SAAS,GACZ,OAAM,IAAI,MAAM,6DAA6D,SAAS,SAAS;CAEjG,MAAM,OAAQ,MAAM,SAAS,MAAM;AAEnC,KAAI,CAAC,eAAe,KAAK,CACvB,OAAM,IAAI,MAAM,kEAAkE;AAGpF,QAAO,KAAK"}
|