@scalar/api-client 2.31.3 → 2.33.0
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 +94 -0
- package/dist/assets/yaml.worker-CcQnAKCg.js +490 -0
- package/dist/style.css +1 -1
- package/dist/v2/blocks/request-block/helpers/get-default-headers.js +1 -1
- package/dist/v2/features/app/App.vue.d.ts +0 -5
- package/dist/v2/features/app/App.vue.d.ts.map +1 -1
- package/dist/v2/features/app/App.vue.js +57 -60
- package/dist/v2/features/app/app-state.d.ts +17 -2
- package/dist/v2/features/app/app-state.d.ts.map +1 -1
- package/dist/v2/features/app/app-state.js +117 -105
- package/dist/v2/features/app/helpers/create-api-client-app.d.ts.map +1 -1
- package/dist/v2/features/app/helpers/create-api-client-app.js +1 -3
- package/dist/v2/features/app/helpers/routes.d.ts +17 -0
- package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
- package/dist/v2/features/app/helpers/routes.js +8 -2
- package/dist/v2/features/app/hooks/use-theme.d.ts +14 -0
- package/dist/v2/features/app/hooks/use-theme.d.ts.map +1 -1
- package/dist/v2/features/app/hooks/use-theme.js +42 -28
- package/dist/v2/features/collection/DocumentCollection.vue.js +8 -6
- package/dist/v2/features/collection/OperationCollection.vue.js +14 -12
- package/dist/v2/features/collection/WorkspaceCollection.vue.js +9 -7
- package/dist/v2/features/collection/components/Authentication.vue2.js +19 -17
- package/dist/v2/features/collection/components/Cookies.vue.js +10 -8
- package/dist/v2/features/collection/components/Editor/Editor.vue.d.ts +16 -0
- package/dist/v2/features/collection/components/Editor/Editor.vue.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Editor/Editor.vue.js +7 -0
- package/dist/v2/features/collection/components/Editor/Editor.vue2.js +333 -0
- package/dist/v2/features/collection/components/Editor/components/EditorDiagnosticsPanel.vue.d.ts +19 -0
- package/dist/v2/features/collection/components/Editor/components/EditorDiagnosticsPanel.vue.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Editor/components/EditorDiagnosticsPanel.vue.js +78 -0
- package/dist/v2/features/collection/components/Editor/components/EditorDiagnosticsPanel.vue2.js +4 -0
- package/dist/v2/features/collection/components/Editor/components/EditorSavePanel.vue.d.ts +16 -0
- package/dist/v2/features/collection/components/Editor/components/EditorSavePanel.vue.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Editor/components/EditorSavePanel.vue.js +83 -0
- package/dist/v2/features/collection/components/Editor/components/EditorSavePanel.vue2.js +4 -0
- package/dist/v2/features/collection/components/Editor/helpers/apply-scalar-theme.d.ts +16 -0
- package/dist/v2/features/collection/components/Editor/helpers/apply-scalar-theme.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Editor/helpers/apply-scalar-theme.js +56 -0
- package/dist/v2/features/collection/components/Editor/helpers/configure-language-support.d.ts +7 -0
- package/dist/v2/features/collection/components/Editor/helpers/configure-language-support.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Editor/helpers/configure-language-support.js +40 -0
- package/dist/v2/features/collection/components/Editor/helpers/ensure-monaco-environment.d.ts +6 -0
- package/dist/v2/features/collection/components/Editor/helpers/ensure-monaco-environment.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Editor/helpers/ensure-monaco-environment.js +23 -0
- package/dist/v2/features/collection/components/Editor/helpers/get-diagnostic-counts.d.ts +12 -0
- package/dist/v2/features/collection/components/Editor/helpers/get-diagnostic-counts.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Editor/helpers/get-diagnostic-counts.js +10 -0
- package/dist/v2/features/collection/components/Editor/helpers/get-json-ast-node-from-path.d.ts +14 -0
- package/dist/v2/features/collection/components/Editor/helpers/get-json-ast-node-from-path.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Editor/helpers/get-json-ast-node-from-path.js +9 -0
- package/dist/v2/features/collection/components/Editor/helpers/get-operation-context.d.ts +11 -0
- package/dist/v2/features/collection/components/Editor/helpers/get-operation-context.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Editor/helpers/get-operation-context.js +5 -0
- package/dist/v2/features/collection/components/Editor/helpers/get-visible-diagnostics.d.ts +7 -0
- package/dist/v2/features/collection/components/Editor/helpers/get-visible-diagnostics.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Editor/helpers/get-visible-diagnostics.js +5 -0
- package/dist/v2/features/collection/components/Editor/helpers/get-yaml-node-range-from-path.d.ts +19 -0
- package/dist/v2/features/collection/components/Editor/helpers/get-yaml-node-range-from-path.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Editor/helpers/get-yaml-node-range-from-path.js +50 -0
- package/dist/v2/features/collection/components/Editor/helpers/json-ast.d.ts +12 -0
- package/dist/v2/features/collection/components/Editor/helpers/json-ast.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Editor/helpers/json-ast.js +24 -0
- package/dist/v2/features/collection/components/Editor/helpers/json-pointer-links.d.ts +15 -0
- package/dist/v2/features/collection/components/Editor/helpers/json-pointer-links.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Editor/helpers/json-pointer-links.js +72 -0
- package/dist/v2/features/collection/components/Editor/helpers/json-pointer-path.d.ts +7 -0
- package/dist/v2/features/collection/components/Editor/helpers/json-pointer-path.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Editor/helpers/json-pointer-path.js +20 -0
- package/dist/v2/features/collection/components/Editor/helpers/load-css-variables.d.ts +14 -0
- package/dist/v2/features/collection/components/Editor/helpers/load-css-variables.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Editor/helpers/load-css-variables.js +21 -0
- package/dist/v2/features/collection/components/Editor/helpers/parse-editor-object.d.ts +10 -0
- package/dist/v2/features/collection/components/Editor/helpers/parse-editor-object.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Editor/helpers/parse-editor-object.js +21 -0
- package/dist/v2/features/collection/components/Editor/helpers/stringify-document.d.ts +10 -0
- package/dist/v2/features/collection/components/Editor/helpers/stringify-document.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Editor/helpers/stringify-document.js +5 -0
- package/dist/v2/features/collection/components/Editor/helpers/yaml.worker.d.ts +2 -0
- package/dist/v2/features/collection/components/Editor/helpers/yaml.worker.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Editor/helpers/yaml.worker.js +11 -0
- package/dist/v2/features/collection/components/Editor/hooks/use-editor-markers.d.ts +152 -0
- package/dist/v2/features/collection/components/Editor/hooks/use-editor-markers.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Editor/hooks/use-editor-markers.js +34 -0
- package/dist/v2/features/collection/components/Editor/hooks/use-editor-state.d.ts +14 -0
- package/dist/v2/features/collection/components/Editor/hooks/use-editor-state.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Editor/hooks/use-editor-state.js +25 -0
- package/dist/v2/features/collection/components/Editor/hooks/use-editor.d.ts +39 -0
- package/dist/v2/features/collection/components/Editor/hooks/use-editor.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Editor/hooks/use-editor.js +153 -0
- package/dist/v2/features/collection/components/Editor/index.d.ts +2 -0
- package/dist/v2/features/collection/components/Editor/index.d.ts.map +1 -0
- package/dist/v2/features/collection/components/Editor/index.js +4 -0
- package/dist/v2/features/collection/components/Editor/schemas/openapi-3.1-schema.json.js +25 -0
- package/dist/v2/features/collection/components/Environment.vue.js +8 -6
- package/dist/v2/features/collection/components/Overview.vue2.js +16 -14
- package/dist/v2/features/collection/components/Servers.vue.js +18 -16
- package/dist/v2/features/collection/components/Settings.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Settings.vue.js +6 -4
- package/dist/v2/features/collection/components/Tabs.vue.js +4 -4
- package/dist/v2/features/operation/Operation.vue.js +9 -7
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/package.json +32 -25
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/v2/features/collection/components/Editor/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,cAAc,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const e = "https://spec.openapis.org/oas/3.1/schema/2025-11-23", t = "https://json-schema.org/draft/2020-12/schema", r = "The description of OpenAPI v3.1.x Documents without Schema Object validation", s = "object", o = { openapi: { type: "string", pattern: "^3\\.1\\.\\d+(-.+)?$" }, info: { $ref: "#/$defs/info" }, jsonSchemaDialect: { type: "string", format: "uri-reference", default: "https://spec.openapis.org/oas/3.1/dialect/2024-11-10" }, servers: { type: "array", items: { $ref: "#/$defs/server" }, default: [{ url: "/" }] }, paths: { $ref: "#/$defs/paths" }, webhooks: { type: "object", additionalProperties: { $ref: "#/$defs/path-item" } }, components: { $ref: "#/$defs/components" }, security: { type: "array", items: { $ref: "#/$defs/security-requirement" } }, tags: { type: "array", items: { $ref: "#/$defs/tag" } }, externalDocs: { $ref: "#/$defs/external-documentation" } }, i = ["openapi", "info"], p = [{ required: ["paths"] }, { required: ["components"] }, { required: ["webhooks"] }], n = "#/$defs/specification-extensions", a = !1, f = /* @__PURE__ */ JSON.parse('{"info":{"$comment":"https://spec.openapis.org/oas/v3.1#info-object","type":"object","properties":{"title":{"type":"string"},"summary":{"type":"string"},"description":{"type":"string"},"termsOfService":{"type":"string","format":"uri-reference"},"contact":{"$ref":"#/$defs/contact"},"license":{"$ref":"#/$defs/license"},"version":{"type":"string"}},"required":["title","version"],"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"contact":{"$comment":"https://spec.openapis.org/oas/v3.1#contact-object","type":"object","properties":{"name":{"type":"string"},"url":{"type":"string","format":"uri-reference"},"email":{"type":"string","format":"email"}},"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"license":{"$comment":"https://spec.openapis.org/oas/v3.1#license-object","type":"object","properties":{"name":{"type":"string"},"identifier":{"type":"string"},"url":{"type":"string","format":"uri-reference"}},"required":["name"],"dependentSchemas":{"identifier":{"not":{"required":["url"]}}},"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"server":{"$comment":"https://spec.openapis.org/oas/v3.1#server-object","type":"object","properties":{"url":{"type":"string"},"description":{"type":"string"},"variables":{"type":"object","additionalProperties":{"$ref":"#/$defs/server-variable"}}},"required":["url"],"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"server-variable":{"$comment":"https://spec.openapis.org/oas/v3.1#server-variable-object","type":"object","properties":{"enum":{"type":"array","items":{"type":"string"},"minItems":1},"default":{"type":"string"},"description":{"type":"string"}},"required":["default"],"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"components":{"$comment":"https://spec.openapis.org/oas/v3.1#components-object","type":"object","properties":{"schemas":{"type":"object","additionalProperties":{"$dynamicRef":"#meta"}},"responses":{"type":"object","additionalProperties":{"$ref":"#/$defs/response-or-reference"}},"parameters":{"type":"object","additionalProperties":{"$ref":"#/$defs/parameter-or-reference"}},"examples":{"type":"object","additionalProperties":{"$ref":"#/$defs/example-or-reference"}},"requestBodies":{"type":"object","additionalProperties":{"$ref":"#/$defs/request-body-or-reference"}},"headers":{"type":"object","additionalProperties":{"$ref":"#/$defs/header-or-reference"}},"securitySchemes":{"type":"object","additionalProperties":{"$ref":"#/$defs/security-scheme-or-reference"}},"links":{"type":"object","additionalProperties":{"$ref":"#/$defs/link-or-reference"}},"callbacks":{"type":"object","additionalProperties":{"$ref":"#/$defs/callbacks-or-reference"}},"pathItems":{"type":"object","additionalProperties":{"$ref":"#/$defs/path-item"}}},"patternProperties":{"^(?:schemas|responses|parameters|examples|requestBodies|headers|securitySchemes|links|callbacks|pathItems)$":{"$comment":"Enumerating all of the property names in the regex above is necessary for unevaluatedProperties to work as expected","propertyNames":{"pattern":"^[a-zA-Z0-9._-]+$"}}},"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"paths":{"$comment":"https://spec.openapis.org/oas/v3.1#paths-object","type":"object","patternProperties":{"^/":{"$ref":"#/$defs/path-item"},"^x-":true},"additionalProperties":false},"path-item":{"$comment":"https://spec.openapis.org/oas/v3.1#path-item-object","type":"object","properties":{"$ref":{"type":"string","format":"uri-reference"},"summary":{"type":"string"},"description":{"type":"string"},"servers":{"type":"array","items":{"$ref":"#/$defs/server"}},"parameters":{"type":"array","items":{"$ref":"#/$defs/parameter-or-reference"}},"get":{"$ref":"#/$defs/operation"},"put":{"$ref":"#/$defs/operation"},"post":{"$ref":"#/$defs/operation"},"delete":{"$ref":"#/$defs/operation"},"options":{"$ref":"#/$defs/operation"},"head":{"$ref":"#/$defs/operation"},"patch":{"$ref":"#/$defs/operation"},"trace":{"$ref":"#/$defs/operation"}},"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"operation":{"$comment":"https://spec.openapis.org/oas/v3.1#operation-object","type":"object","properties":{"tags":{"type":"array","items":{"type":"string"}},"summary":{"type":"string"},"description":{"type":"string"},"externalDocs":{"$ref":"#/$defs/external-documentation"},"operationId":{"type":"string"},"parameters":{"type":"array","items":{"$ref":"#/$defs/parameter-or-reference"}},"requestBody":{"$ref":"#/$defs/request-body-or-reference"},"responses":{"$ref":"#/$defs/responses"},"callbacks":{"type":"object","additionalProperties":{"$ref":"#/$defs/callbacks-or-reference"}},"deprecated":{"default":false,"type":"boolean"},"security":{"type":"array","items":{"$ref":"#/$defs/security-requirement"}},"servers":{"type":"array","items":{"$ref":"#/$defs/server"}}},"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"external-documentation":{"$comment":"https://spec.openapis.org/oas/v3.1#external-documentation-object","type":"object","properties":{"description":{"type":"string"},"url":{"type":"string","format":"uri-reference"}},"required":["url"],"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"parameter":{"$comment":"https://spec.openapis.org/oas/v3.1#parameter-object","type":"object","properties":{"name":{"type":"string"},"in":{"enum":["query","header","path","cookie"]},"description":{"type":"string"},"required":{"default":false,"type":"boolean"},"deprecated":{"default":false,"type":"boolean"},"schema":{"$dynamicRef":"#meta"},"content":{"$ref":"#/$defs/content","minProperties":1,"maxProperties":1}},"required":["name","in"],"oneOf":[{"required":["schema"]},{"required":["content"]}],"if":{"properties":{"in":{"const":"query"}}},"then":{"properties":{"allowEmptyValue":{"default":false,"type":"boolean"}}},"dependentSchemas":{"schema":{"properties":{"style":{"type":"string"},"explode":{"type":"boolean"}},"allOf":[{"$ref":"#/$defs/examples"},{"$ref":"#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-path"},{"$ref":"#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-header"},{"$ref":"#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-query"},{"$ref":"#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-cookie"}],"$defs":{"styles-for-path":{"if":{"properties":{"in":{"const":"path"}}},"then":{"properties":{"name":{"pattern":"^[^{}]+$"},"style":{"default":"simple","enum":["matrix","label","simple"]},"required":{"const":true},"explode":{"default":false}},"required":["required"]}},"styles-for-header":{"if":{"properties":{"in":{"const":"header"}}},"then":{"properties":{"style":{"default":"simple","const":"simple"},"explode":{"default":false}}}},"styles-for-query":{"if":{"properties":{"in":{"const":"query"}}},"then":{"properties":{"style":{"default":"form","enum":["form","spaceDelimited","pipeDelimited","deepObject"]},"allowReserved":{"default":false,"type":"boolean"}},"$ref":"#/$defs/explode-for-form"}},"styles-for-cookie":{"if":{"properties":{"in":{"const":"cookie"}}},"then":{"properties":{"style":{"default":"form","const":"form"}},"$ref":"#/$defs/explode-for-form"}}}}},"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"parameter-or-reference":{"if":{"type":"object","required":["$ref"]},"then":{"$ref":"#/$defs/reference"},"else":{"$ref":"#/$defs/parameter"}},"request-body":{"$comment":"https://spec.openapis.org/oas/v3.1#request-body-object","type":"object","properties":{"description":{"type":"string"},"content":{"$ref":"#/$defs/content"},"required":{"default":false,"type":"boolean"}},"required":["content"],"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"request-body-or-reference":{"if":{"type":"object","required":["$ref"]},"then":{"$ref":"#/$defs/reference"},"else":{"$ref":"#/$defs/request-body"}},"content":{"$comment":"https://spec.openapis.org/oas/v3.1#fixed-fields-10","type":"object","additionalProperties":{"$ref":"#/$defs/media-type"},"propertyNames":{"format":"media-range"}},"media-type":{"$comment":"https://spec.openapis.org/oas/v3.1#media-type-object","type":"object","properties":{"schema":{"$dynamicRef":"#meta"},"encoding":{"type":"object","additionalProperties":{"$ref":"#/$defs/encoding"}}},"allOf":[{"$ref":"#/$defs/specification-extensions"},{"$ref":"#/$defs/examples"}],"unevaluatedProperties":false},"encoding":{"$comment":"https://spec.openapis.org/oas/v3.1#encoding-object","type":"object","properties":{"contentType":{"type":"string","format":"media-range"},"headers":{"type":"object","additionalProperties":{"$ref":"#/$defs/header-or-reference"}},"style":{"enum":["form","spaceDelimited","pipeDelimited","deepObject"]},"explode":{"type":"boolean"},"allowReserved":{"type":"boolean"}},"dependentSchemas":{"style":{"properties":{"allowReserved":{"default":false}},"$ref":"#/$defs/explode-for-form"},"explode":{"properties":{"style":{"default":"form"},"allowReserved":{"default":false}}},"allowReserved":{"properties":{"style":{"default":"form"}},"$ref":"#/$defs/explode-for-form"}},"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"responses":{"$comment":"https://spec.openapis.org/oas/v3.1#responses-object","type":"object","properties":{"default":{"$ref":"#/$defs/response-or-reference"}},"patternProperties":{"^[1-5](?:[0-9]{2}|XX)$":{"$ref":"#/$defs/response-or-reference"}},"minProperties":1,"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false,"if":{"$comment":"either default, or at least one response code property must exist","patternProperties":{"^[1-5](?:[0-9]{2}|XX)$":false}},"then":{"required":["default"]}},"response":{"$comment":"https://spec.openapis.org/oas/v3.1#response-object","type":"object","properties":{"description":{"type":"string"},"headers":{"type":"object","additionalProperties":{"$ref":"#/$defs/header-or-reference"}},"content":{"$ref":"#/$defs/content"},"links":{"type":"object","additionalProperties":{"$ref":"#/$defs/link-or-reference"}}},"required":["description"],"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"response-or-reference":{"if":{"type":"object","required":["$ref"]},"then":{"$ref":"#/$defs/reference"},"else":{"$ref":"#/$defs/response"}},"callbacks":{"$comment":"https://spec.openapis.org/oas/v3.1#callback-object","type":"object","$ref":"#/$defs/specification-extensions","additionalProperties":{"$ref":"#/$defs/path-item"}},"callbacks-or-reference":{"if":{"type":"object","required":["$ref"]},"then":{"$ref":"#/$defs/reference"},"else":{"$ref":"#/$defs/callbacks"}},"example":{"$comment":"https://spec.openapis.org/oas/v3.1#example-object","type":"object","properties":{"summary":{"type":"string"},"description":{"type":"string"},"value":true,"externalValue":{"type":"string","format":"uri-reference"}},"not":{"required":["value","externalValue"]},"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"example-or-reference":{"if":{"type":"object","required":["$ref"]},"then":{"$ref":"#/$defs/reference"},"else":{"$ref":"#/$defs/example"}},"link":{"$comment":"https://spec.openapis.org/oas/v3.1#link-object","type":"object","properties":{"operationRef":{"type":"string","format":"uri-reference"},"operationId":{"type":"string"},"parameters":{"$ref":"#/$defs/map-of-strings"},"requestBody":true,"description":{"type":"string"},"server":{"$ref":"#/$defs/server"}},"oneOf":[{"required":["operationRef"]},{"required":["operationId"]}],"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"link-or-reference":{"if":{"type":"object","required":["$ref"]},"then":{"$ref":"#/$defs/reference"},"else":{"$ref":"#/$defs/link"}},"header":{"$comment":"https://spec.openapis.org/oas/v3.1#header-object","type":"object","properties":{"description":{"type":"string"},"required":{"default":false,"type":"boolean"},"deprecated":{"default":false,"type":"boolean"},"schema":{"$dynamicRef":"#meta"},"content":{"$ref":"#/$defs/content","minProperties":1,"maxProperties":1}},"oneOf":[{"required":["schema"]},{"required":["content"]}],"dependentSchemas":{"schema":{"properties":{"style":{"default":"simple","const":"simple"},"explode":{"default":false,"type":"boolean"}},"$ref":"#/$defs/examples"}},"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"header-or-reference":{"if":{"type":"object","required":["$ref"]},"then":{"$ref":"#/$defs/reference"},"else":{"$ref":"#/$defs/header"}},"tag":{"$comment":"https://spec.openapis.org/oas/v3.1#tag-object","type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"externalDocs":{"$ref":"#/$defs/external-documentation"}},"required":["name"],"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"reference":{"$comment":"https://spec.openapis.org/oas/v3.1#reference-object","type":"object","properties":{"$ref":{"type":"string","format":"uri-reference"},"summary":{"type":"string"},"description":{"type":"string"}}},"schema":{"$comment":"https://spec.openapis.org/oas/v3.1#schema-object","$dynamicAnchor":"meta","type":["object","boolean"]},"security-scheme":{"$comment":"https://spec.openapis.org/oas/v3.1#security-scheme-object","type":"object","properties":{"type":{"enum":["apiKey","http","mutualTLS","oauth2","openIdConnect"]},"description":{"type":"string"}},"required":["type"],"allOf":[{"$ref":"#/$defs/specification-extensions"},{"$ref":"#/$defs/security-scheme/$defs/type-apikey"},{"$ref":"#/$defs/security-scheme/$defs/type-http"},{"$ref":"#/$defs/security-scheme/$defs/type-http-bearer"},{"$ref":"#/$defs/security-scheme/$defs/type-oauth2"},{"$ref":"#/$defs/security-scheme/$defs/type-oidc"}],"unevaluatedProperties":false,"$defs":{"type-apikey":{"if":{"properties":{"type":{"const":"apiKey"}}},"then":{"properties":{"name":{"type":"string"},"in":{"enum":["query","header","cookie"]}},"required":["name","in"]}},"type-http":{"if":{"properties":{"type":{"const":"http"}}},"then":{"properties":{"scheme":{"type":"string"}},"required":["scheme"]}},"type-http-bearer":{"if":{"properties":{"type":{"const":"http"},"scheme":{"type":"string","pattern":"^[Bb][Ee][Aa][Rr][Ee][Rr]$"}},"required":["type","scheme"]},"then":{"properties":{"bearerFormat":{"type":"string"}}}},"type-oauth2":{"if":{"properties":{"type":{"const":"oauth2"}}},"then":{"properties":{"flows":{"$ref":"#/$defs/oauth-flows"}},"required":["flows"]}},"type-oidc":{"if":{"properties":{"type":{"const":"openIdConnect"}}},"then":{"properties":{"openIdConnectUrl":{"type":"string","format":"uri-reference"}},"required":["openIdConnectUrl"]}}}},"security-scheme-or-reference":{"if":{"type":"object","required":["$ref"]},"then":{"$ref":"#/$defs/reference"},"else":{"$ref":"#/$defs/security-scheme"}},"oauth-flows":{"type":"object","properties":{"implicit":{"$ref":"#/$defs/oauth-flows/$defs/implicit"},"password":{"$ref":"#/$defs/oauth-flows/$defs/password"},"clientCredentials":{"$ref":"#/$defs/oauth-flows/$defs/client-credentials"},"authorizationCode":{"$ref":"#/$defs/oauth-flows/$defs/authorization-code"}},"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false,"$defs":{"implicit":{"type":"object","properties":{"authorizationUrl":{"type":"string","format":"uri-reference"},"refreshUrl":{"type":"string","format":"uri-reference"},"scopes":{"$ref":"#/$defs/map-of-strings"}},"required":["authorizationUrl","scopes"],"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"password":{"type":"object","properties":{"tokenUrl":{"type":"string","format":"uri-reference"},"refreshUrl":{"type":"string","format":"uri-reference"},"scopes":{"$ref":"#/$defs/map-of-strings"}},"required":["tokenUrl","scopes"],"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"client-credentials":{"type":"object","properties":{"tokenUrl":{"type":"string","format":"uri-reference"},"refreshUrl":{"type":"string","format":"uri-reference"},"scopes":{"$ref":"#/$defs/map-of-strings"}},"required":["tokenUrl","scopes"],"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false},"authorization-code":{"type":"object","properties":{"authorizationUrl":{"type":"string","format":"uri-reference"},"tokenUrl":{"type":"string","format":"uri-reference"},"refreshUrl":{"type":"string","format":"uri-reference"},"scopes":{"$ref":"#/$defs/map-of-strings"}},"required":["authorizationUrl","tokenUrl","scopes"],"$ref":"#/$defs/specification-extensions","unevaluatedProperties":false}}},"security-requirement":{"$comment":"https://spec.openapis.org/oas/v3.1#security-requirement-object","type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"specification-extensions":{"$comment":"https://spec.openapis.org/oas/v3.1#specification-extensions","patternProperties":{"^x-":true}},"examples":{"properties":{"example":true,"examples":{"type":"object","additionalProperties":{"$ref":"#/$defs/example-or-reference"}}},"not":{"required":["example","examples"]}},"map-of-strings":{"type":"object","additionalProperties":{"type":"string"}},"explode-for-form":{"$comment":"for encoding objects, and query and cookie parameters, style=form is the default","if":{"properties":{"style":{"const":"form"}}},"then":{"properties":{"explode":{"default":true}}},"else":{"properties":{"explode":{"default":false}}}}}'), c = {
|
|
2
|
+
$id: e,
|
|
3
|
+
$schema: t,
|
|
4
|
+
description: r,
|
|
5
|
+
type: s,
|
|
6
|
+
properties: o,
|
|
7
|
+
required: i,
|
|
8
|
+
anyOf: p,
|
|
9
|
+
$ref: n,
|
|
10
|
+
unevaluatedProperties: a,
|
|
11
|
+
$defs: f
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
f as $defs,
|
|
15
|
+
e as $id,
|
|
16
|
+
n as $ref,
|
|
17
|
+
t as $schema,
|
|
18
|
+
p as anyOf,
|
|
19
|
+
c as default,
|
|
20
|
+
r as description,
|
|
21
|
+
o as properties,
|
|
22
|
+
i as required,
|
|
23
|
+
s as type,
|
|
24
|
+
a as unevaluatedProperties
|
|
25
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as i, computed as
|
|
1
|
+
import { defineComponent as i, computed as r, createBlock as l, createCommentVNode as m, openBlock as s, withCtx as n, createVNode as u, unref as v, createTextVNode as o, createElementVNode as d } from "vue";
|
|
2
2
|
import p from "../../settings/components/Section.vue.js";
|
|
3
3
|
import f from "../../environments/EnvironmentsList.vue.js";
|
|
4
4
|
const y = {
|
|
5
5
|
name: "Environment"
|
|
6
|
-
},
|
|
6
|
+
}, w = /* @__PURE__ */ i({
|
|
7
7
|
...y,
|
|
8
8
|
props: {
|
|
9
9
|
documentSlug: {},
|
|
@@ -19,12 +19,14 @@ const y = {
|
|
|
19
19
|
activeWorkspace: {},
|
|
20
20
|
plugins: {},
|
|
21
21
|
customThemes: {},
|
|
22
|
+
currentTheme: {},
|
|
23
|
+
isDarkMode: { type: Boolean },
|
|
22
24
|
collectionType: {}
|
|
23
25
|
},
|
|
24
26
|
setup(e) {
|
|
25
|
-
const
|
|
27
|
+
const c = r(
|
|
26
28
|
() => (e.collectionType === "document" ? e.document["x-scalar-environments"] : e.workspaceStore.workspace["x-scalar-environments"]) ?? {}
|
|
27
|
-
), a =
|
|
29
|
+
), a = r(() => e.workspaceStore.workspace["x-scalar-active-environment"]);
|
|
28
30
|
return (k, t) => e.collectionType !== "operation" ? (s(), l(p, { key: 0 }, {
|
|
29
31
|
title: n(() => [...t[0] || (t[0] = [
|
|
30
32
|
o("Environment Variables", -1)
|
|
@@ -38,7 +40,7 @@ const y = {
|
|
|
38
40
|
u(v(f), {
|
|
39
41
|
activeEnvironment: a.value,
|
|
40
42
|
collectionType: e.collectionType,
|
|
41
|
-
environments:
|
|
43
|
+
environments: c.value,
|
|
42
44
|
eventBus: e.eventBus
|
|
43
45
|
}, null, 8, ["activeEnvironment", "collectionType", "environments", "eventBus"])
|
|
44
46
|
]),
|
|
@@ -47,5 +49,5 @@ const y = {
|
|
|
47
49
|
}
|
|
48
50
|
});
|
|
49
51
|
export {
|
|
50
|
-
|
|
52
|
+
w as default
|
|
51
53
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as V, computed as b, ref as z, useTemplateRef as I, createElementBlock as d, openBlock as r, Fragment as m, createElementVNode as o, createVNode as a, createCommentVNode as w, withCtx as l, createBlock as T, unref as n, createTextVNode as f, normalizeClass as
|
|
1
|
+
import { defineComponent as V, computed as b, ref as z, useTemplateRef as I, createElementBlock as d, openBlock as r, Fragment as m, createElementVNode as o, createVNode as a, createCommentVNode as w, withCtx as l, createBlock as T, unref as n, createTextVNode as f, normalizeClass as D, nextTick as N } from "vue";
|
|
2
2
|
import { useModal as O, ScalarMarkdown as R, ScalarButton as p, ScalarToggle as U, ScalarModal as j } from "@scalar/components";
|
|
3
|
-
import { isHttpMethod as
|
|
4
|
-
import { ScalarIconPencil as
|
|
3
|
+
import { isHttpMethod as B } from "@scalar/helpers/http/is-http-method";
|
|
4
|
+
import { ScalarIconPencil as C } from "@scalar/icons";
|
|
5
5
|
import E from "../../../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
|
|
6
6
|
import y from "../../settings/components/Section.vue.js";
|
|
7
7
|
import H from "../../../components/code-input/CodeInput.vue.js";
|
|
@@ -24,12 +24,14 @@ const L = { class: "flex flex-col gap-8" }, W = { class: "has-focus-visible:bg-b
|
|
|
24
24
|
activeWorkspace: {},
|
|
25
25
|
plugins: {},
|
|
26
26
|
customThemes: {},
|
|
27
|
+
currentTheme: {},
|
|
28
|
+
isDarkMode: { type: Boolean },
|
|
27
29
|
collectionType: {}
|
|
28
30
|
},
|
|
29
31
|
setup(e) {
|
|
30
|
-
const x = b(() => !e.method || !e.path ? "this operation" : `${typeof e.method == "string" ? e.method.toUpperCase() : e.method} ${e.path}`), h = b(() => e.collectionType === "operation" ? !e.path || !e.method || !
|
|
32
|
+
const x = b(() => !e.method || !e.path ? "this operation" : `${typeof e.method == "string" ? e.method.toUpperCase() : e.method} ${e.path}`), h = b(() => e.collectionType === "operation" ? !e.path || !e.method || !B(e.method) ? "" : e.document?.paths?.[e.path]?.[e.method]?.description ?? "" : e.document?.info?.description ?? ""), v = b(() => e.collectionType !== "operation" || !e.path || !B(e.method) ? !1 : e.document?.paths?.[e.path]?.[e.method]?.deprecated ?? !1), g = z("preview"), k = I("codeInputRef"), s = async (i) => {
|
|
31
33
|
g.value = i, i === "edit" && (await N(), k.value?.focus());
|
|
32
|
-
},
|
|
34
|
+
}, S = async (i) => {
|
|
33
35
|
if (await s("preview"), e.collectionType === "document")
|
|
34
36
|
return e.eventBus.emit("document:update:info", { description: i });
|
|
35
37
|
if (e.collectionType === "operation") {
|
|
@@ -45,12 +47,12 @@ const L = { class: "flex flex-col gap-8" }, W = { class: "has-focus-visible:bg-b
|
|
|
45
47
|
});
|
|
46
48
|
}
|
|
47
49
|
console.error("Invalid collection type", { collectionType: e.collectionType });
|
|
48
|
-
},
|
|
50
|
+
}, M = (i) => {
|
|
49
51
|
e.collectionType !== "operation" || !e.path || !e.method || e.eventBus.emit("operation:update:meta", {
|
|
50
52
|
meta: { path: e.path, method: e.method },
|
|
51
53
|
payload: { deprecated: i }
|
|
52
54
|
});
|
|
53
|
-
}, u = O(),
|
|
55
|
+
}, u = O(), $ = () => {
|
|
54
56
|
e.collectionType !== "operation" || !e.path || !e.method || !e.documentSlug || (e.eventBus.emit("operation:delete:operation", {
|
|
55
57
|
documentName: e.documentSlug,
|
|
56
58
|
meta: { path: e.path, method: e.method }
|
|
@@ -72,7 +74,7 @@ const L = { class: "flex flex-col gap-8" }, W = { class: "has-focus-visible:bg-b
|
|
|
72
74
|
onClick: t[0] || (t[0] = (c) => s("edit"))
|
|
73
75
|
}, {
|
|
74
76
|
default: l(() => [
|
|
75
|
-
a(n(
|
|
77
|
+
a(n(C), {
|
|
76
78
|
size: "sm",
|
|
77
79
|
thickness: "1.5"
|
|
78
80
|
}),
|
|
@@ -100,7 +102,7 @@ const L = { class: "flex flex-col gap-8" }, W = { class: "has-focus-visible:bg-b
|
|
|
100
102
|
onClick: t[2] || (t[2] = (c) => s("edit"))
|
|
101
103
|
}, {
|
|
102
104
|
default: l(() => [
|
|
103
|
-
a(n(
|
|
105
|
+
a(n(C), {
|
|
104
106
|
size: "sm",
|
|
105
107
|
thickness: "1.5"
|
|
106
108
|
}),
|
|
@@ -117,7 +119,7 @@ const L = { class: "flex flex-col gap-8" }, W = { class: "has-focus-visible:bg-b
|
|
|
117
119
|
environment: void 0,
|
|
118
120
|
layout: e.layout,
|
|
119
121
|
modelValue: h.value,
|
|
120
|
-
onBlur:
|
|
122
|
+
onBlur: S
|
|
121
123
|
}, null, 8, ["layout", "modelValue"]))
|
|
122
124
|
])
|
|
123
125
|
]),
|
|
@@ -130,7 +132,7 @@ const L = { class: "flex flex-col gap-8" }, W = { class: "has-focus-visible:bg-b
|
|
|
130
132
|
])]),
|
|
131
133
|
default: l(() => [
|
|
132
134
|
o("div", {
|
|
133
|
-
class:
|
|
135
|
+
class: D([
|
|
134
136
|
"rounded-lg border text-sm transition-colors",
|
|
135
137
|
v.value ? "border-(--scalar-color-alert) bg-(--scalar-background-alert)" : "bg-b-2 border-(--scalar-background-3)"
|
|
136
138
|
])
|
|
@@ -138,7 +140,7 @@ const L = { class: "flex flex-col gap-8" }, W = { class: "has-focus-visible:bg-b
|
|
|
138
140
|
o("div", P, [
|
|
139
141
|
o("div", Z, [
|
|
140
142
|
o("h4", {
|
|
141
|
-
class:
|
|
143
|
+
class: D([
|
|
142
144
|
"font-medium",
|
|
143
145
|
v.value ? "text-(--scalar-color-alert)" : "text-c-1"
|
|
144
146
|
])
|
|
@@ -148,7 +150,7 @@ const L = { class: "flex flex-col gap-8" }, W = { class: "has-focus-visible:bg-b
|
|
|
148
150
|
a(n(U), {
|
|
149
151
|
class: "shrink-0",
|
|
150
152
|
modelValue: v.value,
|
|
151
|
-
"onUpdate:modelValue":
|
|
153
|
+
"onUpdate:modelValue": M
|
|
152
154
|
}, null, 8, ["modelValue"])
|
|
153
155
|
])
|
|
154
156
|
], 2)
|
|
@@ -192,7 +194,7 @@ const L = { class: "flex flex-col gap-8" }, W = { class: "has-focus-visible:bg-b
|
|
|
192
194
|
variableName: x.value,
|
|
193
195
|
warningMessage: "This action cannot be undone.",
|
|
194
196
|
onClose: t[4] || (t[4] = (c) => n(u).hide()),
|
|
195
|
-
onDelete:
|
|
197
|
+
onDelete: $
|
|
196
198
|
}, null, 8, ["variableName"])
|
|
197
199
|
]),
|
|
198
200
|
_: 1
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as L, ref as
|
|
2
|
-
import { useModal as q, ScalarMarkdown as G, ScalarButton as
|
|
1
|
+
import { defineComponent as L, ref as T, computed as h, watchEffect as E, createElementBlock as v, openBlock as i, Fragment as b, createVNode as s, createSlots as j, withCtx as u, createElementVNode as l, normalizeClass as U, renderList as F, createBlock as M, unref as n, toDisplayString as W, createCommentVNode as H, createTextVNode as d } from "vue";
|
|
2
|
+
import { useModal as q, ScalarMarkdown as G, ScalarButton as O, ScalarToggle as J, ScalarModal as K } from "@scalar/components";
|
|
3
3
|
import { debounce as Q } from "@scalar/helpers/general/debounce";
|
|
4
4
|
import { isHttpMethod as C } from "@scalar/helpers/http/is-http-method";
|
|
5
5
|
import { ScalarIconTrash as X, ScalarIconPlus as Y } from "@scalar/icons";
|
|
@@ -27,14 +27,16 @@ const re = { class: "flex h-8 items-center" }, ae = { class: "flex flex-col gap-
|
|
|
27
27
|
activeWorkspace: {},
|
|
28
28
|
plugins: {},
|
|
29
29
|
customThemes: {},
|
|
30
|
+
currentTheme: {},
|
|
31
|
+
isDarkMode: { type: Boolean },
|
|
30
32
|
collectionType: {}
|
|
31
33
|
},
|
|
32
34
|
setup(t) {
|
|
33
|
-
const g = q(), c =
|
|
35
|
+
const g = q(), c = T(-1), m = h(() => t.collectionType === "operation"), S = h(() => !m.value || !t.path || !C(t.method) ? null : Z(t.document?.paths?.[t.path]?.[t.method])), f = T(!1);
|
|
34
36
|
E(() => {
|
|
35
37
|
f.value = S.value?.servers !== void 0;
|
|
36
38
|
});
|
|
37
|
-
const k = h(() => t.collectionType === "operation" && S.value ? S.value.servers ?? [] : t.document?.servers ?? []),
|
|
39
|
+
const k = h(() => t.collectionType === "operation" && S.value ? S.value.servers ?? [] : t.document?.servers ?? []), D = h(() => k.value[c.value]), o = h(() => t.collectionType === "operation" && t.path && C(t.method) ? { type: "operation", path: t.path, method: t.method } : { type: "document" }), N = [
|
|
38
40
|
{
|
|
39
41
|
label: "URL",
|
|
40
42
|
key: "url",
|
|
@@ -45,7 +47,7 @@ const re = { class: "flex h-8 items-center" }, ae = { class: "flex flex-col gap-
|
|
|
45
47
|
key: "description",
|
|
46
48
|
placeholder: "Production"
|
|
47
49
|
}
|
|
48
|
-
],
|
|
50
|
+
], V = (r) => {
|
|
49
51
|
c.value = r, g.show();
|
|
50
52
|
}, w = () => {
|
|
51
53
|
g.hide(), c.value = -1;
|
|
@@ -69,7 +71,7 @@ const re = { class: "flex h-8 items-center" }, ae = { class: "flex flex-col gap-
|
|
|
69
71
|
value: a,
|
|
70
72
|
meta: o.value
|
|
71
73
|
})
|
|
72
|
-
), z = () => t.eventBus.emit("server:add:server", { meta: o.value }),
|
|
74
|
+
), z = () => t.eventBus.emit("server:add:server", { meta: o.value }), B = (r, e = 0) => r?.description || `Server ${e + 1}`, P = (r) => {
|
|
73
75
|
if (o.value.type === "operation")
|
|
74
76
|
return f.value = r, r ? t.eventBus.emit("server:initialize:servers", {
|
|
75
77
|
meta: o.value
|
|
@@ -104,10 +106,10 @@ const re = { class: "flex h-8 items-center" }, ae = { class: "flex flex-col gap-
|
|
|
104
106
|
]),
|
|
105
107
|
default: u(() => [
|
|
106
108
|
l("div", {
|
|
107
|
-
class:
|
|
109
|
+
class: U(m.value && !f.value && "cursor-not-allowed")
|
|
108
110
|
}, [
|
|
109
111
|
l("div", {
|
|
110
|
-
class:
|
|
112
|
+
class: U([
|
|
111
113
|
"flex flex-col gap-4",
|
|
112
114
|
m.value && !f.value && "pointer-events-none cursor-not-allowed opacity-50 mix-blend-luminosity"
|
|
113
115
|
])
|
|
@@ -118,16 +120,16 @@ const re = { class: "flex h-8 items-center" }, ae = { class: "flex flex-col gap-
|
|
|
118
120
|
class: "rounded-lg border"
|
|
119
121
|
}, [
|
|
120
122
|
l("div", oe, [
|
|
121
|
-
a.description ? (i(),
|
|
123
|
+
a.description ? (i(), M(n(G), {
|
|
122
124
|
key: 0,
|
|
123
125
|
class: "self-center",
|
|
124
126
|
value: a.description
|
|
125
|
-
}, null, 8, ["value"])) : (i(), v("span", se, W(
|
|
126
|
-
s(n(
|
|
127
|
+
}, null, 8, ["value"])) : (i(), v("span", se, W(B(a, p)), 1)),
|
|
128
|
+
s(n(O), {
|
|
127
129
|
class: "hover:bg-b-3 hover:text-c-1 h-fit p-1.25",
|
|
128
130
|
"data-testid": "delete-server-button",
|
|
129
131
|
variant: "ghost",
|
|
130
|
-
onClick: (y) =>
|
|
132
|
+
onClick: (y) => V(p)
|
|
131
133
|
}, {
|
|
132
134
|
default: u(() => [
|
|
133
135
|
s(n(X), { class: "size-3.5" })
|
|
@@ -140,9 +142,9 @@ const re = { class: "flex h-8 items-center" }, ae = { class: "flex flex-col gap-
|
|
|
140
142
|
data: a,
|
|
141
143
|
environment: t.environment,
|
|
142
144
|
onUpdate: (y, x) => A(p, y, x),
|
|
143
|
-
options:
|
|
145
|
+
options: N
|
|
144
146
|
}, null, 8, ["data", "environment", "onUpdate"]),
|
|
145
|
-
a.variables ? (i(),
|
|
147
|
+
a.variables ? (i(), M(n(le), {
|
|
146
148
|
key: 0,
|
|
147
149
|
variables: a.variables,
|
|
148
150
|
"onUpdate:variable": (y, x) => I(p, y, x)
|
|
@@ -151,7 +153,7 @@ const re = { class: "flex h-8 items-center" }, ae = { class: "flex flex-col gap-
|
|
|
151
153
|
]))), 128))
|
|
152
154
|
]),
|
|
153
155
|
l("div", ie, [
|
|
154
|
-
s(n(
|
|
156
|
+
s(n(O), {
|
|
155
157
|
class: "hover:bg-b-2 hover:text-c-1 flex items-center gap-2",
|
|
156
158
|
size: "sm",
|
|
157
159
|
variant: "ghost",
|
|
@@ -186,7 +188,7 @@ const re = { class: "flex h-8 items-center" }, ae = { class: "flex flex-col gap-
|
|
|
186
188
|
s(n(K), {
|
|
187
189
|
size: "xxs",
|
|
188
190
|
state: n(g),
|
|
189
|
-
title: `Delete ${
|
|
191
|
+
title: `Delete ${B(D.value, c.value)}`
|
|
190
192
|
}, {
|
|
191
193
|
default: u(() => [
|
|
192
194
|
s(_, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Settings.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/collection/components/Settings.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Settings.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/collection/components/Settings.vue"],"names":[],"mappings":"AA4MA,QAAA,MAAM,YAAY;;;;;;;;;;;;kGAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -18,6 +18,8 @@ const f = /* @__PURE__ */ d({
|
|
|
18
18
|
activeWorkspace: {},
|
|
19
19
|
plugins: {},
|
|
20
20
|
customThemes: {},
|
|
21
|
+
currentTheme: {},
|
|
22
|
+
isDarkMode: { type: Boolean },
|
|
21
23
|
collectionType: {}
|
|
22
24
|
},
|
|
23
25
|
setup(e) {
|
|
@@ -25,9 +27,9 @@ const f = /* @__PURE__ */ d({
|
|
|
25
27
|
e.eventBus.emit("document:update:watch-mode", t);
|
|
26
28
|
}, l = (t) => {
|
|
27
29
|
e.eventBus.emit("workspace:update:theme", t);
|
|
28
|
-
}, u = (t) => {
|
|
29
|
-
e.eventBus.emit("workspace:update:active-proxy", t);
|
|
30
30
|
}, r = (t) => {
|
|
31
|
+
e.eventBus.emit("workspace:update:active-proxy", t);
|
|
32
|
+
}, u = (t) => {
|
|
31
33
|
e.eventBus.emit("workspace:update:color-mode", t);
|
|
32
34
|
};
|
|
33
35
|
return (t, c) => e.collectionType === "document" ? (n(), a(o(s), {
|
|
@@ -47,8 +49,8 @@ const f = /* @__PURE__ */ d({
|
|
|
47
49
|
activeThemeSlug: e.workspaceStore.workspace["x-scalar-theme"] ?? "none",
|
|
48
50
|
colorMode: e.workspaceStore.workspace["x-scalar-color-mode"] ?? "system",
|
|
49
51
|
customThemes: e.customThemes,
|
|
50
|
-
"onUpdate:colorMode":
|
|
51
|
-
"onUpdate:proxyUrl":
|
|
52
|
+
"onUpdate:colorMode": u,
|
|
53
|
+
"onUpdate:proxyUrl": r,
|
|
52
54
|
"onUpdate:themeSlug": l
|
|
53
55
|
}, null, 8, ["activeProxyUrl", "activeThemeSlug", "colorMode", "customThemes"]));
|
|
54
56
|
}
|
|
@@ -6,7 +6,7 @@ const w = { class: "flex w-full gap-2 border-b pl-1.5 md:ml-1.5 md:pl-0" }, _ =
|
|
|
6
6
|
type: {}
|
|
7
7
|
},
|
|
8
8
|
setup(e) {
|
|
9
|
-
const
|
|
9
|
+
const i = u(() => e.type === "workspace" ? ["environment", "cookies", "settings"] : e.type === "operation" ? ["overview", "servers", "authentication", "editor"] : [
|
|
10
10
|
"overview",
|
|
11
11
|
"servers",
|
|
12
12
|
"authentication",
|
|
@@ -15,12 +15,12 @@ const w = { class: "flex w-full gap-2 border-b pl-1.5 md:ml-1.5 md:pl-0" }, _ =
|
|
|
15
15
|
"settings"
|
|
16
16
|
]);
|
|
17
17
|
return (y, g) => (r(), n("div", w, [
|
|
18
|
-
(r(!0), n(m, null, p(
|
|
18
|
+
(r(!0), n(m, null, p(i.value, (t) => (r(), f(d(b), {
|
|
19
19
|
key: t,
|
|
20
20
|
custom: "",
|
|
21
21
|
to: { name: `${e.type}.${t}` }
|
|
22
22
|
}, {
|
|
23
|
-
default: h(({ isActive:
|
|
23
|
+
default: h(({ isActive: s, href: c, navigate: a }) => [
|
|
24
24
|
o("a", {
|
|
25
25
|
class: "-ml-2 flex h-10 cursor-pointer items-center px-2 text-center text-sm font-medium whitespace-nowrap no-underline -outline-offset-1 has-[:focus-visible]:outline",
|
|
26
26
|
href: c,
|
|
@@ -29,7 +29,7 @@ const w = { class: "flex w-full gap-2 border-b pl-1.5 md:ml-1.5 md:pl-0" }, _ =
|
|
|
29
29
|
o("span", {
|
|
30
30
|
class: v([
|
|
31
31
|
"flex-center hover:text-c-1 h-full border-b",
|
|
32
|
-
|
|
32
|
+
s ? "text-c-1 border-c-1" : "text-c-2 hover:text-c-1 border-transparent"
|
|
33
33
|
])
|
|
34
34
|
}, x(k(t)), 3)
|
|
35
35
|
], 8, _)
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { defineComponent as w, computed as t, toValue as a, createBlock as C, createElementBlock as B, openBlock as m, unref as c, createElementVNode as U } from "vue";
|
|
2
2
|
import { getResolvedRef as s } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
3
3
|
import { mapHiddenClientsConfig as b } from "../modal/helpers/map-hidden-clients-config.js";
|
|
4
|
-
import { combineParams as
|
|
5
|
-
import { getSelectedServer as
|
|
4
|
+
import { combineParams as M } from "./helpers/combine-params.js";
|
|
5
|
+
import { getSelectedServer as N } from "./helpers/get-selected-server.js";
|
|
6
6
|
import { getActiveProxyUrl as A } from "../../helpers/get-active-proxy-url.js";
|
|
7
7
|
import { getServers as E } from "../../helpers/get-servers.js";
|
|
8
8
|
import V from "../../blocks/operation-block/OperationBlock.vue.js";
|
|
9
9
|
const P = {
|
|
10
10
|
key: 1,
|
|
11
11
|
class: "flex h-full w-full items-center justify-center"
|
|
12
|
-
}, R = {},
|
|
12
|
+
}, R = {}, W = /* @__PURE__ */ w({
|
|
13
13
|
...R,
|
|
14
14
|
__name: "Operation",
|
|
15
15
|
props: {
|
|
@@ -26,6 +26,8 @@ const P = {
|
|
|
26
26
|
activeWorkspace: {},
|
|
27
27
|
plugins: {},
|
|
28
28
|
customThemes: {},
|
|
29
|
+
currentTheme: {},
|
|
30
|
+
isDarkMode: { type: Boolean },
|
|
29
31
|
options: {}
|
|
30
32
|
},
|
|
31
33
|
setup(e) {
|
|
@@ -37,7 +39,7 @@ const P = {
|
|
|
37
39
|
return null;
|
|
38
40
|
if (!l.value)
|
|
39
41
|
return n;
|
|
40
|
-
const o =
|
|
42
|
+
const o = M(
|
|
41
43
|
l.value.parameters,
|
|
42
44
|
n.parameters
|
|
43
45
|
);
|
|
@@ -59,7 +61,7 @@ const P = {
|
|
|
59
61
|
documentUrl: e.document?.["x-scalar-original-source-url"]
|
|
60
62
|
});
|
|
61
63
|
}), v = t(() => a(e.options)?.servers != null ? e.document?.["x-scalar-selected-server"] : r.value?.servers != null ? r.value["x-scalar-selected-server"] : e.document?.["x-scalar-selected-server"]), h = t(
|
|
62
|
-
() =>
|
|
64
|
+
() => N(u.value, v.value)
|
|
63
65
|
), S = t(() => r.value?.servers != null ? { type: "operation", path: e.path ?? "", method: e.method ?? "get" } : { type: "document" }), y = t(() => e.workspaceStore.auth.getAuthSelectedSchemas({
|
|
64
66
|
type: "document",
|
|
65
67
|
documentName: e.documentSlug
|
|
@@ -81,7 +83,7 @@ const P = {
|
|
|
81
83
|
)
|
|
82
84
|
)), x = t(
|
|
83
85
|
() => b(a(e.options)?.hiddenClients)
|
|
84
|
-
), g = "2.
|
|
86
|
+
), g = "2.33.0";
|
|
85
87
|
return (n, o) => e.path && e.method && e.exampleName && r.value ? (m(), C(c(V), {
|
|
86
88
|
key: 0,
|
|
87
89
|
activeEnvironment: e.workspaceStore.workspace["x-scalar-active-environment"],
|
|
@@ -119,5 +121,5 @@ const P = {
|
|
|
119
121
|
}
|
|
120
122
|
});
|
|
121
123
|
export {
|
|
122
|
-
|
|
124
|
+
W as default
|
|
123
125
|
};
|
|
@@ -33,7 +33,7 @@ const W = { class: "flex-center relative flex flex-1 flex-col gap-6 p-2 capitali
|
|
|
33
33
|
}));
|
|
34
34
|
}, f = (u) => {
|
|
35
35
|
u?.createNew && g.name === "request" && p();
|
|
36
|
-
}, v = "2.
|
|
36
|
+
}, v = "2.33.0";
|
|
37
37
|
return q(() => a.hotKeys.on(f)), R(() => a.hotKeys.off(f)), (u, e) => (l(), n("div", W, [
|
|
38
38
|
s("div", {
|
|
39
39
|
class: y(["flex h-[calc(100%_-_50px)] flex-col items-center justify-center", {
|
package/package.json
CHANGED
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
"rest",
|
|
19
19
|
"testing"
|
|
20
20
|
],
|
|
21
|
-
"version": "2.
|
|
21
|
+
"version": "2.33.0",
|
|
22
22
|
"engines": {
|
|
23
|
-
"node": ">=
|
|
23
|
+
"node": ">=22"
|
|
24
24
|
},
|
|
25
25
|
"type": "module",
|
|
26
26
|
"main": "dist/index.js",
|
|
@@ -221,6 +221,11 @@
|
|
|
221
221
|
"types": "./dist/v2/features/app/components/index.d.ts",
|
|
222
222
|
"default": "./dist/v2/features/app/components/index.js"
|
|
223
223
|
},
|
|
224
|
+
"./v2/features/collection/components/Editor": {
|
|
225
|
+
"import": "./dist/v2/features/collection/components/Editor/index.js",
|
|
226
|
+
"types": "./dist/v2/features/collection/components/Editor/index.d.ts",
|
|
227
|
+
"default": "./dist/v2/features/collection/components/Editor/index.js"
|
|
228
|
+
},
|
|
224
229
|
"./v2/features/command-palette": {
|
|
225
230
|
"import": "./dist/v2/features/command-palette/index.js",
|
|
226
231
|
"types": "./dist/v2/features/command-palette/index.d.ts",
|
|
@@ -317,6 +322,8 @@
|
|
|
317
322
|
"fuse.js": "^7.1.0",
|
|
318
323
|
"js-base64": "^3.7.8",
|
|
319
324
|
"microdiff": "^1.5.0",
|
|
325
|
+
"monaco-editor": "0.54.0",
|
|
326
|
+
"monaco-yaml": "5.2.3",
|
|
320
327
|
"nanoid": "^5.1.6",
|
|
321
328
|
"pretty-bytes": "^7.1.0",
|
|
322
329
|
"pretty-ms": "^9.3.0",
|
|
@@ -327,26 +334,26 @@
|
|
|
327
334
|
"whatwg-mimetype": "4.0.0",
|
|
328
335
|
"yaml": "^2.8.0",
|
|
329
336
|
"zod": "^4.3.5",
|
|
330
|
-
"@scalar/analytics-client": "1.0
|
|
331
|
-
"@scalar/
|
|
332
|
-
"@scalar/
|
|
333
|
-
"@scalar/
|
|
334
|
-
"@scalar/import": "0.
|
|
335
|
-
"@scalar/
|
|
336
|
-
"@scalar/
|
|
337
|
-
"@scalar/
|
|
338
|
-
"@scalar/
|
|
339
|
-
"@scalar/openapi-
|
|
340
|
-
"@scalar/openapi-
|
|
341
|
-
"@scalar/sidebar": "0.
|
|
342
|
-
"@scalar/
|
|
343
|
-
"@scalar/
|
|
344
|
-
"@scalar/
|
|
345
|
-
"@scalar/
|
|
346
|
-
"@scalar/use-
|
|
347
|
-
"@scalar/
|
|
348
|
-
"@scalar/
|
|
349
|
-
"@scalar/
|
|
337
|
+
"@scalar/analytics-client": "1.1.0",
|
|
338
|
+
"@scalar/draggable": "0.4.0",
|
|
339
|
+
"@scalar/helpers": "0.3.0",
|
|
340
|
+
"@scalar/components": "0.20.1",
|
|
341
|
+
"@scalar/import": "0.5.0",
|
|
342
|
+
"@scalar/icons": "0.6.0",
|
|
343
|
+
"@scalar/json-magic": "0.12.0",
|
|
344
|
+
"@scalar/object-utils": "1.3.0",
|
|
345
|
+
"@scalar/oas-utils": "0.10.0",
|
|
346
|
+
"@scalar/openapi-types": "0.6.0",
|
|
347
|
+
"@scalar/openapi-parser": "0.25.0",
|
|
348
|
+
"@scalar/sidebar": "0.8.1",
|
|
349
|
+
"@scalar/postman-to-openapi": "0.5.0",
|
|
350
|
+
"@scalar/snippetz": "0.7.0",
|
|
351
|
+
"@scalar/themes": "0.15.0",
|
|
352
|
+
"@scalar/types": "0.7.0",
|
|
353
|
+
"@scalar/use-codemirror": "0.14.1",
|
|
354
|
+
"@scalar/use-hooks": "0.4.0",
|
|
355
|
+
"@scalar/use-toasts": "0.10.0",
|
|
356
|
+
"@scalar/workspace-store": "0.37.0"
|
|
350
357
|
},
|
|
351
358
|
"devDependencies": {
|
|
352
359
|
"@tailwindcss/vite": "^4.1.18",
|
|
@@ -361,9 +368,9 @@
|
|
|
361
368
|
"vite": "^7.3.1",
|
|
362
369
|
"vite-svg-loader": "5.1.0",
|
|
363
370
|
"vitest": "4.0.16",
|
|
364
|
-
"@scalar/
|
|
365
|
-
"@scalar/
|
|
366
|
-
"@scalar/pre-post-request-scripts": "0.
|
|
371
|
+
"@scalar/build-tooling": "0.5.0",
|
|
372
|
+
"@scalar/galaxy": "0.6.0",
|
|
373
|
+
"@scalar/pre-post-request-scripts": "0.3.1"
|
|
367
374
|
},
|
|
368
375
|
"scripts": {
|
|
369
376
|
"build": "scalar-build-vite",
|