@scalar/api-client 2.26.1 → 2.27.1
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 +102 -0
- package/dist/components/Server/ServerSelector.vue.js +6 -6
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +6 -6
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.js +48 -43
- package/dist/v2/blocks/operation-block/components/Header.vue.js +2 -2
- package/dist/v2/blocks/operation-block/components/Header.vue2.js +10 -10
- package/dist/v2/blocks/operation-block/helpers/build-request-body.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-body.js +29 -25
- package/dist/v2/blocks/operation-block/helpers/get-example.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/get-example.js +15 -15
- package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.d.ts +10 -0
- package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.js +4 -0
- package/dist/v2/blocks/operation-block/helpers/send-request.d.ts +1 -1
- package/dist/v2/blocks/operation-block/helpers/send-request.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/send-request.js +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.js +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue2.js +101 -100
- package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBody.vue.js +2 -2
- package/dist/v2/blocks/request-block/components/RequestBody.vue2.js +62 -69
- package/dist/v2/blocks/request-block/components/RequestParams.vue.js +6 -6
- package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +36 -2
- package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTable.vue.js +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +38 -3
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/helpers/get-default-headers.js +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue.js +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue2.js +68 -69
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.js +1 -1
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue2.js +31 -40
- package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.js +35 -41
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +37 -41
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +3 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +107 -87
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.d.ts +21 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.js +91 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue2.js +4 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +107 -93
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.js +87 -65
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.d.ts +36 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.js +35 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.js +18 -10
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.d.ts +5 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.js +27 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/secret-types.d.ts +3 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/secret-types.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts +1 -2
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.js +29 -37
- package/dist/v2/components/layout/CollapsibleSection.vue.js +1 -1
- package/dist/v2/components/modals/ModalClientContainer.vue.d.ts +2 -2
- package/dist/v2/components/modals/ModalClientContainer.vue.d.ts.map +1 -1
- package/dist/v2/components/modals/ModalClientContainer.vue.js +1 -1
- package/dist/v2/components/modals/ModalClientContainer.vue2.js +45 -42
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts +2 -0
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.js +25 -24
- package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts +2 -0
- package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts.map +1 -1
- package/dist/v2/components/sidebar/SidebarMenu.vue.js +30 -30
- package/dist/v2/features/app/App.vue.d.ts +6 -1
- package/dist/v2/features/app/App.vue.d.ts.map +1 -1
- package/dist/v2/features/app/App.vue.js +48 -46
- package/dist/v2/features/app/app-events.d.ts +1 -1
- package/dist/v2/features/app/app-events.d.ts.map +1 -1
- package/dist/v2/features/app/app-events.js +95 -56
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/AppSidebar.vue.js +3 -3
- package/dist/v2/features/app/components/AppSidebar.vue2.js +111 -105
- package/dist/v2/features/app/helpers/create-api-client-app.d.ts +12 -2
- 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 +12 -10
- package/dist/v2/features/app/helpers/routes.d.ts +3 -1
- package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
- package/dist/v2/features/app/hooks/use-theme.d.ts +42 -0
- package/dist/v2/features/app/hooks/use-theme.d.ts.map +1 -0
- package/dist/v2/features/app/hooks/use-theme.js +34 -0
- package/dist/v2/features/app/index.d.ts +0 -1
- package/dist/v2/features/app/index.d.ts.map +1 -1
- package/dist/v2/features/collection/DocumentCollection.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/DocumentCollection.vue.js +27 -26
- package/dist/v2/features/collection/WorkspaceCollection.vue.js +13 -12
- package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Authentication.vue.js +2 -2
- package/dist/v2/features/collection/components/Authentication.vue2.js +49 -40
- package/dist/v2/features/collection/components/Cookies.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Cookies.vue.js +26 -13
- package/dist/v2/features/collection/components/Environment.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Environment.vue.js +27 -15
- package/dist/v2/features/collection/components/Overview.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Overview.vue.js +2 -2
- package/dist/v2/features/collection/components/Overview.vue2.js +68 -61
- package/dist/v2/features/collection/components/Servers.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Servers.vue.js +93 -88
- package/dist/v2/features/collection/components/Settings.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Settings.vue.js +19 -17
- package/dist/v2/features/environments/EnvironmentsList.vue.js +1 -1
- package/dist/v2/features/global-cookies/components/CookiesTable.vue.d.ts.map +1 -1
- package/dist/v2/features/global-cookies/components/CookiesTable.vue.js +2 -2
- package/dist/v2/features/global-cookies/components/CookiesTable.vue2.js +8 -8
- package/dist/v2/features/modal/Modal.vue.d.ts +1 -1
- package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
- package/dist/v2/features/modal/Modal.vue.js +15 -15
- package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts +1 -1
- package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.js +31 -34
- package/dist/v2/features/settings/CollectionSettings.vue.d.ts +10 -7
- package/dist/v2/features/settings/CollectionSettings.vue.d.ts.map +1 -1
- package/dist/v2/features/settings/CollectionSettings.vue.js +183 -149
- package/dist/v2/features/settings/DocumentSettings.vue.d.ts.map +1 -1
- package/dist/v2/features/settings/DocumentSettings.vue.js +88 -79
- package/dist/v2/features/settings/components/Section.vue.d.ts +2 -1
- package/dist/v2/features/settings/components/Section.vue.d.ts.map +1 -1
- package/dist/v2/features/settings/components/Section.vue.js +26 -15
- package/dist/v2/features/settings/helpers/get-theme-colors.d.ts +4 -3
- package/dist/v2/features/settings/helpers/get-theme-colors.d.ts.map +1 -1
- package/dist/v2/features/settings/helpers/get-theme-colors.js +6 -7
- package/dist/v2/helpers/handle-hotkeys.d.ts.map +1 -1
- package/dist/v2/helpers/handle-hotkeys.js +2 -2
- package/dist/v2/helpers/index.d.ts +0 -1
- package/dist/v2/helpers/index.d.ts.map +1 -1
- package/dist/v2/hooks/use-global-hot-keys.d.ts +3 -1
- package/dist/v2/hooks/use-global-hot-keys.d.ts.map +1 -1
- package/dist/v2/hooks/use-global-hot-keys.js +8 -6
- package/dist/v2/workspace-events.d.ts.map +1 -1
- package/dist/v2/workspace-events.js +10 -0
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue.js +2 -2
- package/dist/views/Request/RequestSidebar.vue2.js +139 -155
- package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
- package/dist/views/Request/RequestSidebarItem.vue2.js +104 -101
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/package.json +20 -18
- package/dist/v2/helpers/plugins.d.ts +0 -65
- package/dist/v2/helpers/plugins.d.ts.map +0 -1
- package/dist/v2/helpers/plugins.js +0 -11
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarErrorBoundary as
|
|
1
|
+
import { defineComponent as z, computed as n, ref as X, useId as s, watch as J, createBlock as q, openBlock as v, withCtx as C, createElementVNode as K, withDirectives as m, createElementBlock as B, createVNode as d, unref as y, vShow as c, mergeProps as f, toHandlers as b, Fragment as W, renderList as Y, createCommentVNode as E, resolveDynamicComponent as Z, toDisplayString as _ } from "vue";
|
|
2
|
+
import { ScalarErrorBoundary as ee } from "@scalar/components";
|
|
3
3
|
import { canMethodHaveBody as w } from "@scalar/helpers/http/can-method-have-body";
|
|
4
|
-
import { REGEX as
|
|
5
|
-
import { getResolvedRef as
|
|
6
|
-
import { unpackProxyObject as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { filterGlobalCookie as
|
|
10
|
-
import { getExample as
|
|
11
|
-
import { getResolvedUrl as
|
|
12
|
-
import
|
|
13
|
-
import
|
|
4
|
+
import { REGEX as te } from "@scalar/helpers/regex/regex-helpers";
|
|
5
|
+
import { getResolvedRef as p } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
6
|
+
import { unpackProxyObject as ae } from "@scalar/workspace-store/helpers/unpack-proxy";
|
|
7
|
+
import le from "../../../components/SectionFilter.vue.js";
|
|
8
|
+
import ne from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
|
|
9
|
+
import { filterGlobalCookie as oe } from "../operation-block/helpers/filter-global-cookies.js";
|
|
10
|
+
import { getExample as re } from "../operation-block/helpers/get-example.js";
|
|
11
|
+
import { getResolvedUrl as ie } from "../operation-block/helpers/get-resolved-url.js";
|
|
12
|
+
import ue from "./components/RequestBody.vue.js";
|
|
13
|
+
import se from "./components/RequestCodeSnippet.vue.js";
|
|
14
14
|
import k from "./components/RequestParams.vue.js";
|
|
15
|
-
import { createParameterHandlers as
|
|
16
|
-
import { getDefaultHeaders as
|
|
17
|
-
import { getParameterSchema as
|
|
15
|
+
import { createParameterHandlers as g } from "./helpers/create-parameter-handlers.js";
|
|
16
|
+
import { getDefaultHeaders as me } from "./helpers/get-default-headers.js";
|
|
17
|
+
import { getParameterSchema as de } from "./helpers/get-parameter-schema.js";
|
|
18
18
|
import { groupBy as D } from "./helpers/group-by.js";
|
|
19
|
-
import { isParamDisabled as
|
|
20
|
-
import
|
|
21
|
-
const
|
|
19
|
+
import { isParamDisabled as ce } from "./helpers/is-param-disabled.js";
|
|
20
|
+
import ve from "../scalar-auth-selector-block/components/AuthSelector.vue.js";
|
|
21
|
+
const ye = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:pr-24" }, he = ["for"], fe = ["id", "placeholder", "value"], xe = {
|
|
22
22
|
key: 2,
|
|
23
23
|
class: "text-c-1 flex h-8 items-center"
|
|
24
|
-
},
|
|
24
|
+
}, Be = ["id", "role"], Te = /* @__PURE__ */ z({
|
|
25
25
|
__name: "RequestBlock",
|
|
26
26
|
props: {
|
|
27
27
|
authMeta: { default: () => ({ type: "document" }) },
|
|
@@ -44,38 +44,38 @@ const ve = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
44
44
|
server: {}
|
|
45
45
|
},
|
|
46
46
|
setup(e) {
|
|
47
|
-
const
|
|
47
|
+
const o = n(() => ({
|
|
48
48
|
method: e.method,
|
|
49
49
|
path: e.path,
|
|
50
50
|
exampleKey: e.exampleKey
|
|
51
|
-
})),
|
|
51
|
+
})), r = n(
|
|
52
52
|
() => D(
|
|
53
|
-
e.operation.parameters?.map((t) =>
|
|
53
|
+
e.operation.parameters?.map((t) => p(t)) ?? [],
|
|
54
54
|
"in",
|
|
55
55
|
(t) => {
|
|
56
|
-
const a =
|
|
56
|
+
const a = re(t, e.exampleKey, void 0);
|
|
57
57
|
return {
|
|
58
58
|
name: t.name,
|
|
59
59
|
value: a?.value ?? "",
|
|
60
60
|
description: t.description,
|
|
61
|
-
schema:
|
|
61
|
+
schema: de(t),
|
|
62
62
|
isRequired: t.required,
|
|
63
|
-
isDisabled:
|
|
63
|
+
isDisabled: ce(t, a),
|
|
64
64
|
originalParameter: t
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
67
|
)
|
|
68
68
|
), I = n(
|
|
69
69
|
() => D(
|
|
70
|
-
|
|
70
|
+
r.value.header?.map((t) => ({
|
|
71
71
|
...t,
|
|
72
72
|
name: t.name.toLowerCase()
|
|
73
73
|
})) ?? [],
|
|
74
74
|
"name"
|
|
75
75
|
)
|
|
76
76
|
), N = n(
|
|
77
|
-
() =>
|
|
78
|
-
),
|
|
77
|
+
() => me({ method: e.method, operation: e.operation, exampleKey: e.exampleKey })
|
|
78
|
+
), R = n(() => {
|
|
79
79
|
const t = e.operation["x-scalar-disable-parameters"]?.["default-headers"]?.[e.exampleKey] ?? {};
|
|
80
80
|
return N.value.map((a) => {
|
|
81
81
|
const l = I.value[a.name.toLowerCase()]?.[0];
|
|
@@ -89,17 +89,17 @@ const ve = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
89
89
|
};
|
|
90
90
|
});
|
|
91
91
|
}), A = n(() => [
|
|
92
|
-
...
|
|
93
|
-
...
|
|
94
|
-
]),
|
|
95
|
-
const t =
|
|
92
|
+
...R.value,
|
|
93
|
+
...r.value.header ?? []
|
|
94
|
+
]), V = n(() => {
|
|
95
|
+
const t = ie({
|
|
96
96
|
environment: e.environment,
|
|
97
97
|
server: e.server,
|
|
98
98
|
path: e.path,
|
|
99
99
|
pathVariables: {}
|
|
100
100
|
}), a = e.operation["x-scalar-disable-parameters"]?.["global-cookies"]?.[e.exampleKey] ?? {};
|
|
101
101
|
return e.globalCookies?.filter(
|
|
102
|
-
(l) =>
|
|
102
|
+
(l) => oe({
|
|
103
103
|
cookie: l,
|
|
104
104
|
url: t,
|
|
105
105
|
// Do not filter global cookies for the default cookies section (it's already filtered in the buildRequestCookieHeader function)
|
|
@@ -109,14 +109,14 @@ const ve = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
109
109
|
).map((l) => ({
|
|
110
110
|
name: l.name,
|
|
111
111
|
value: l.value,
|
|
112
|
-
globalRoute: l.location === "document" ? "document
|
|
112
|
+
globalRoute: l.location === "document" ? { page: "document", path: "cookies" } : { page: "workspace", path: "cookies" },
|
|
113
113
|
isReadonly: !0,
|
|
114
114
|
isDisabled: a[l.name.toLowerCase()] ?? !1
|
|
115
115
|
})) ?? [];
|
|
116
|
-
}),
|
|
117
|
-
...
|
|
118
|
-
...
|
|
119
|
-
]), i =
|
|
116
|
+
}), P = n(() => [
|
|
117
|
+
...V.value ?? [],
|
|
118
|
+
...r.value.cookie ?? []
|
|
119
|
+
]), i = X("All"), T = [
|
|
120
120
|
"Auth",
|
|
121
121
|
"Variables",
|
|
122
122
|
"Cookies",
|
|
@@ -133,15 +133,15 @@ const ve = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
133
133
|
Body: s()
|
|
134
134
|
}, O = n(() => {
|
|
135
135
|
const t = /* @__PURE__ */ new Set(["All", ...T]);
|
|
136
|
-
return
|
|
136
|
+
return r.value.path?.length || t.delete("Variables"), w(e.method) || t.delete("Body"), H.value && t.delete("Auth"), [...t];
|
|
137
137
|
}), u = n(
|
|
138
138
|
() => Object.fromEntries(
|
|
139
139
|
O.value.map((t) => [t, $[t]])
|
|
140
140
|
)
|
|
141
|
-
),
|
|
141
|
+
), H = n(
|
|
142
142
|
() => e.layout === "modal" && !e.operation.security && !Object.keys(e.securitySchemes ?? {}).length
|
|
143
|
-
), L = n(() => e.operation.summary ? e.operation.summary : e.path.replace(
|
|
144
|
-
|
|
143
|
+
), L = n(() => e.operation.summary ? e.operation.summary : e.path.replace(te.PROTOCOL, "") || "Request Name"), h = (t) => i.value === "All" || i.value === t;
|
|
144
|
+
J(
|
|
145
145
|
() => e.method,
|
|
146
146
|
(t) => {
|
|
147
147
|
i.value === "Body" && !w(t) && (i.value = "All");
|
|
@@ -150,27 +150,27 @@ const ve = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
150
150
|
const F = (t) => {
|
|
151
151
|
const a = t.target.value;
|
|
152
152
|
e.eventBus.emit("operation:update:summary", {
|
|
153
|
-
meta:
|
|
153
|
+
meta: o.value,
|
|
154
154
|
payload: { summary: a }
|
|
155
155
|
});
|
|
156
|
-
},
|
|
157
|
-
path:
|
|
158
|
-
context:
|
|
156
|
+
}, x = n(() => ({
|
|
157
|
+
path: g("path", e.eventBus, o.value, {
|
|
158
|
+
context: r.value.path ?? []
|
|
159
159
|
}),
|
|
160
|
-
cookie:
|
|
161
|
-
context:
|
|
162
|
-
globalParameters:
|
|
160
|
+
cookie: g("cookie", e.eventBus, o.value, {
|
|
161
|
+
context: P.value ?? [],
|
|
162
|
+
globalParameters: V.value.length
|
|
163
163
|
}),
|
|
164
|
-
header:
|
|
164
|
+
header: g("header", e.eventBus, o.value, {
|
|
165
165
|
context: A.value,
|
|
166
|
-
defaultParameters:
|
|
166
|
+
defaultParameters: R.value.length
|
|
167
167
|
}),
|
|
168
|
-
query:
|
|
169
|
-
context:
|
|
168
|
+
query: g("query", e.eventBus, o.value, {
|
|
169
|
+
context: r.value.query ?? []
|
|
170
170
|
})
|
|
171
171
|
})), G = (t) => e.eventBus.emit("operation:update:requestBody:contentType", {
|
|
172
172
|
payload: { contentType: t.value },
|
|
173
|
-
meta:
|
|
173
|
+
meta: o.value
|
|
174
174
|
}), Q = ({
|
|
175
175
|
payload: t,
|
|
176
176
|
contentType: a
|
|
@@ -181,7 +181,7 @@ const ve = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
181
181
|
{
|
|
182
182
|
payload: t,
|
|
183
183
|
contentType: a,
|
|
184
|
-
meta:
|
|
184
|
+
meta: o.value
|
|
185
185
|
},
|
|
186
186
|
{
|
|
187
187
|
debounceKey: l
|
|
@@ -195,48 +195,48 @@ const ve = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
195
195
|
e.eventBus.emit(
|
|
196
196
|
"operation:update:requestBody:formValue",
|
|
197
197
|
{
|
|
198
|
-
payload: t.map((
|
|
198
|
+
payload: t.map((S) => ae(S, { depth: 1 })),
|
|
199
199
|
contentType: a,
|
|
200
|
-
meta:
|
|
200
|
+
meta: o.value
|
|
201
201
|
},
|
|
202
202
|
{
|
|
203
203
|
debounceKey: l
|
|
204
204
|
}
|
|
205
205
|
);
|
|
206
|
-
},
|
|
207
|
-
return (t, a) => (
|
|
206
|
+
}, U = s(), j = (t) => e.eventBus.emit("operation:update:extension", { payload: t, meta: o.value });
|
|
207
|
+
return (t, a) => (v(), q(ne, {
|
|
208
208
|
"aria-label": `Request: ${e.operation.summary}`
|
|
209
209
|
}, {
|
|
210
|
-
title:
|
|
211
|
-
K("div",
|
|
212
|
-
e.layout !== "modal" ? (
|
|
210
|
+
title: C(() => [
|
|
211
|
+
K("div", ye, [
|
|
212
|
+
e.layout !== "modal" ? (v(), B("label", {
|
|
213
213
|
key: 0,
|
|
214
214
|
class: "pointer-events-auto absolute top-0 left-0 h-full w-full cursor-text opacity-0",
|
|
215
|
-
for:
|
|
216
|
-
}, null, 8,
|
|
217
|
-
e.layout !== "modal" ? (
|
|
215
|
+
for: y(U)
|
|
216
|
+
}, null, 8, he)) : E("", !0),
|
|
217
|
+
e.layout !== "modal" ? (v(), B("input", {
|
|
218
218
|
key: 1,
|
|
219
|
-
id:
|
|
219
|
+
id: y(U),
|
|
220
220
|
class: "text-c-1 group-hover-input pointer-events-auto relative z-10 -ml-0.5 h-8 w-full rounded pl-1.25 has-[:focus-visible]:outline md:-ml-1.25",
|
|
221
221
|
placeholder: L.value,
|
|
222
222
|
value: e.operation.summary,
|
|
223
223
|
onInput: F
|
|
224
|
-
}, null, 40,
|
|
224
|
+
}, null, 40, fe)) : (v(), B("span", xe, _(e.operation.summary), 1))
|
|
225
225
|
]),
|
|
226
|
-
|
|
226
|
+
d(le, {
|
|
227
227
|
modelValue: i.value,
|
|
228
228
|
"onUpdate:modelValue": a[0] || (a[0] = (l) => i.value = l),
|
|
229
229
|
filterIds: u.value,
|
|
230
230
|
filters: O.value
|
|
231
231
|
}, null, 8, ["modelValue", "filterIds", "filters"])
|
|
232
232
|
]),
|
|
233
|
-
default:
|
|
233
|
+
default: C(() => [
|
|
234
234
|
K("div", {
|
|
235
235
|
id: u.value.All,
|
|
236
236
|
class: "request-section-content custom-scroll relative flex flex-1 flex-col",
|
|
237
237
|
role: i.value === "All" ? "tabpanel" : "none"
|
|
238
238
|
}, [
|
|
239
|
-
|
|
239
|
+
m(d(y(ve), {
|
|
240
240
|
id: u.value.Auth,
|
|
241
241
|
environment: e.environment,
|
|
242
242
|
eventBus: e.eventBus,
|
|
@@ -249,74 +249,75 @@ const ve = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
249
249
|
server: e.server,
|
|
250
250
|
title: "Authentication"
|
|
251
251
|
}, null, 8, ["id", "environment", "eventBus", "meta", "proxyUrl", "securityRequirements", "securitySchemes", "selectedSecurity", "selectedSecuritySchemes", "server"]), [
|
|
252
|
-
[
|
|
252
|
+
[c, h("Auth") && !H.value]
|
|
253
253
|
]),
|
|
254
|
-
|
|
254
|
+
m(d(k, f({
|
|
255
255
|
id: u.value.Variables,
|
|
256
256
|
environment: e.environment,
|
|
257
257
|
eventBus: e.eventBus,
|
|
258
258
|
exampleKey: e.exampleKey,
|
|
259
|
-
rows:
|
|
259
|
+
rows: r.value.path ?? [],
|
|
260
260
|
showAddRowPlaceholder: !1,
|
|
261
261
|
title: "Variables"
|
|
262
|
-
}, b(
|
|
263
|
-
[
|
|
262
|
+
}, b(x.value.path)), null, 16, ["id", "environment", "eventBus", "exampleKey", "rows"]), [
|
|
263
|
+
[c, h("Variables") && r.value.path?.length]
|
|
264
264
|
]),
|
|
265
|
-
|
|
265
|
+
m(d(k, f({
|
|
266
266
|
id: u.value.Cookies,
|
|
267
267
|
environment: e.environment,
|
|
268
268
|
eventBus: e.eventBus,
|
|
269
269
|
exampleKey: e.exampleKey,
|
|
270
|
-
rows:
|
|
270
|
+
rows: P.value ?? [],
|
|
271
271
|
showAddRowPlaceholder: !0,
|
|
272
272
|
title: "Cookies"
|
|
273
|
-
}, b(
|
|
274
|
-
[
|
|
273
|
+
}, b(x.value.cookie)), null, 16, ["id", "environment", "eventBus", "exampleKey", "rows"]), [
|
|
274
|
+
[c, h("Cookies")]
|
|
275
275
|
]),
|
|
276
|
-
|
|
276
|
+
m(d(k, f({
|
|
277
277
|
id: u.value.Headers,
|
|
278
278
|
environment: e.environment,
|
|
279
279
|
eventBus: e.eventBus,
|
|
280
280
|
exampleKey: e.exampleKey,
|
|
281
281
|
rows: A.value ?? [],
|
|
282
282
|
title: "Headers"
|
|
283
|
-
}, b(
|
|
284
|
-
[
|
|
283
|
+
}, b(x.value.header)), null, 16, ["id", "environment", "eventBus", "exampleKey", "rows"]), [
|
|
284
|
+
[c, h("Headers")]
|
|
285
285
|
]),
|
|
286
|
-
|
|
286
|
+
m(d(k, f({
|
|
287
287
|
id: u.value.Query,
|
|
288
288
|
environment: e.environment,
|
|
289
289
|
eventBus: e.eventBus,
|
|
290
290
|
exampleKey: e.exampleKey,
|
|
291
|
-
rows:
|
|
291
|
+
rows: r.value.query ?? [],
|
|
292
292
|
title: "Query Parameters"
|
|
293
|
-
}, b(
|
|
294
|
-
[
|
|
293
|
+
}, b(x.value.query)), null, 16, ["id", "environment", "eventBus", "exampleKey", "rows"]), [
|
|
294
|
+
[c, h("Query")]
|
|
295
295
|
]),
|
|
296
|
-
|
|
296
|
+
m(d(ue, {
|
|
297
297
|
id: u.value.Body,
|
|
298
298
|
environment: e.environment,
|
|
299
299
|
exampleKey: e.exampleKey,
|
|
300
|
-
requestBody:
|
|
300
|
+
requestBody: y(p)(e.operation.requestBody),
|
|
301
301
|
title: "Request Body",
|
|
302
302
|
"onUpdate:contentType": G,
|
|
303
303
|
"onUpdate:formValue": M,
|
|
304
304
|
"onUpdate:value": Q
|
|
305
305
|
}, null, 8, ["id", "environment", "exampleKey", "requestBody"]), [
|
|
306
|
-
[
|
|
306
|
+
[c, h("Body") && y(w)(e.method)]
|
|
307
307
|
]),
|
|
308
|
-
(
|
|
309
|
-
default:
|
|
310
|
-
l?.components?.request ? (
|
|
308
|
+
(v(!0), B(W, null, Y(e.plugins, (l, S) => (v(), q(y(ee), { key: S }, {
|
|
309
|
+
default: C(() => [
|
|
310
|
+
l?.components?.request ? m((v(), q(Z(l.components.request.component), f({
|
|
311
311
|
key: 0,
|
|
312
|
-
operation: e.operation
|
|
313
|
-
|
|
314
|
-
|
|
312
|
+
operation: e.operation
|
|
313
|
+
}, { ref_for: !0 }, l.components.request.additionalProps, { "onOperation:update:extension": j }), null, 16, ["operation"])), [
|
|
314
|
+
[c, i.value === "All"]
|
|
315
|
+
]) : E("", !0)
|
|
315
316
|
]),
|
|
316
317
|
_: 2
|
|
317
318
|
}, 1024))), 128)),
|
|
318
319
|
a[1] || (a[1] = K("div", { class: "flex grow" }, null, -1)),
|
|
319
|
-
|
|
320
|
+
m(d(se, {
|
|
320
321
|
clientOptions: e.clientOptions,
|
|
321
322
|
eventBus: e.eventBus,
|
|
322
323
|
globalCookies: e.globalCookies,
|
|
@@ -326,17 +327,17 @@ const ve = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg
|
|
|
326
327
|
path: e.path,
|
|
327
328
|
securitySchemes: e.selectedSecuritySchemes,
|
|
328
329
|
selectedClient: e.selectedClient,
|
|
329
|
-
selectedContentType:
|
|
330
|
+
selectedContentType: y(p)(e.operation.requestBody)?.["x-scalar-selected-content-type"]?.[e.exampleKey],
|
|
330
331
|
selectedServer: e.server ?? void 0
|
|
331
332
|
}, null, 8, ["clientOptions", "eventBus", "globalCookies", "method", "operation", "path", "securitySchemes", "selectedClient", "selectedContentType", "selectedServer"]), [
|
|
332
|
-
[
|
|
333
|
+
[c, i.value === "All"]
|
|
333
334
|
])
|
|
334
|
-
], 8,
|
|
335
|
+
], 8, Be)
|
|
335
336
|
]),
|
|
336
337
|
_: 1
|
|
337
338
|
}, 8, ["aria-label"]));
|
|
338
339
|
}
|
|
339
340
|
});
|
|
340
341
|
export {
|
|
341
|
-
|
|
342
|
+
Te as default
|
|
342
343
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestBody.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestBody.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestBody.vue"],"names":[],"mappings":"AAkRA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8DAA8D,CAAA;AAiBrG,KAAK,WAAW,GAAG;IACjB,mBAAmB;IACnB,WAAW,CAAC,EAAE,iBAAiB,CAAA;IAC/B,+DAA+D;IAC/D,UAAU,EAAE,MAAM,CAAA;IAClB,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,2BAA2B;IAC3B,WAAW,EAAE,kBAAkB,CAAA;CAChC,CAAC;AAyfF,QAAA,MAAM,YAAY;;;;;;;;;;;eApf4B,MAAM;;;;;;;;;;;;;;;;;;eAAN,MAAM;;;;;;;kFAuflD,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./RequestBody.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-3d420065"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarListbox as
|
|
1
|
+
import { defineComponent as j, computed as s, createBlock as d, openBlock as u, unref as t, withCtx as a, createVNode as r, createElementVNode as c, toDisplayString as v, createElementBlock as y, Fragment as S, createTextVNode as T } from "vue";
|
|
2
|
+
import { ScalarListbox as D, ScalarButton as x, ScalarIcon as k } from "@scalar/components";
|
|
3
3
|
import { unpackProxyObject as B } from "@scalar/workspace-store/helpers/unpack-proxy";
|
|
4
|
-
import
|
|
4
|
+
import { getSelectedBodyContentType as O } from "../../operation-block/helpers/get-selected-body-content-type.js";
|
|
5
|
+
import U from "./RequestBodyForm.vue.js";
|
|
5
6
|
import { getFileName as V } from "../helpers/files.js";
|
|
6
|
-
import { getExampleFromBody as
|
|
7
|
+
import { getExampleFromBody as q } from "../helpers/get-request-body-example.js";
|
|
7
8
|
import E from "../../../components/layout/CollapsibleSection.vue.js";
|
|
8
9
|
import L from "../../../components/data-table/DataTable.vue.js";
|
|
9
10
|
import M from "../../../components/data-table/DataTableHeader.vue.js";
|
|
@@ -16,7 +17,7 @@ const R = {
|
|
|
16
17
|
}, I = {
|
|
17
18
|
key: 1,
|
|
18
19
|
class: "flex items-center justify-center overflow-hidden border-t p-1.5"
|
|
19
|
-
}, J = { class: "text-c-2 w-full max-w-full overflow-hidden rounded border px-1.5 py-1 text-xs whitespace-nowrap" }, ne = /* @__PURE__ */
|
|
20
|
+
}, J = { class: "text-c-2 w-full max-w-full overflow-hidden rounded border px-1.5 py-1 text-xs whitespace-nowrap" }, ne = /* @__PURE__ */ j({
|
|
20
21
|
__name: "RequestBody",
|
|
21
22
|
props: {
|
|
22
23
|
requestBody: {},
|
|
@@ -25,8 +26,8 @@ const R = {
|
|
|
25
26
|
environment: {}
|
|
26
27
|
},
|
|
27
28
|
emits: ["update:contentType", "update:value", "update:formValue"],
|
|
28
|
-
setup(
|
|
29
|
-
const
|
|
29
|
+
setup(i, { emit: C }) {
|
|
30
|
+
const p = C, N = {
|
|
30
31
|
"application/json": "json",
|
|
31
32
|
"application/xml": "xml",
|
|
32
33
|
"application/yaml": "yaml"
|
|
@@ -40,72 +41,64 @@ const R = {
|
|
|
40
41
|
"application/edn": "EDN",
|
|
41
42
|
other: "Other",
|
|
42
43
|
none: "None"
|
|
43
|
-
},
|
|
44
|
-
() =>
|
|
45
|
-
)
|
|
46
|
-
|
|
47
|
-
() => l.requestBody?.["x-scalar-selected-content-type"]?.[l.exampleKey],
|
|
48
|
-
(o) => {
|
|
49
|
-
o || s("update:contentType", { value: n.value });
|
|
50
|
-
},
|
|
51
|
-
{ immediate: !0 }
|
|
52
|
-
);
|
|
53
|
-
const f = Object.entries(b).map(([o, e]) => ({
|
|
54
|
-
id: o,
|
|
44
|
+
}, o = s(
|
|
45
|
+
() => O(i.requestBody, i.exampleKey) ?? "none"
|
|
46
|
+
), f = Object.entries(b).map(([n, e]) => ({
|
|
47
|
+
id: n,
|
|
55
48
|
label: e
|
|
56
|
-
})), g =
|
|
49
|
+
})), g = s({
|
|
57
50
|
get: () => f.find(
|
|
58
|
-
(e) => e.id ===
|
|
51
|
+
(e) => e.id === o.value
|
|
59
52
|
) ?? f.at(-1),
|
|
60
|
-
set: (
|
|
61
|
-
|
|
53
|
+
set: (n) => {
|
|
54
|
+
p("update:contentType", { value: n.id });
|
|
62
55
|
}
|
|
63
56
|
});
|
|
64
|
-
function
|
|
57
|
+
function F(n) {
|
|
65
58
|
const { open: e } = K({
|
|
66
|
-
onChange: (
|
|
67
|
-
const w =
|
|
68
|
-
w &&
|
|
59
|
+
onChange: (l) => {
|
|
60
|
+
const w = l?.[0];
|
|
61
|
+
w && n(w);
|
|
69
62
|
},
|
|
70
63
|
multiple: !1,
|
|
71
64
|
accept: "*/*"
|
|
72
65
|
});
|
|
73
66
|
e();
|
|
74
67
|
}
|
|
75
|
-
const m =
|
|
76
|
-
() =>
|
|
77
|
-
),
|
|
68
|
+
const m = s(
|
|
69
|
+
() => i.requestBody && q(i.requestBody, o.value, i.exampleKey)
|
|
70
|
+
), h = s(() => {
|
|
78
71
|
if (!m.value)
|
|
79
72
|
return "";
|
|
80
|
-
const
|
|
81
|
-
return typeof
|
|
73
|
+
const n = m.value.value;
|
|
74
|
+
return typeof n == "string" ? n : JSON.stringify(n, null, 2);
|
|
82
75
|
});
|
|
83
|
-
return (
|
|
84
|
-
title:
|
|
85
|
-
T(v(
|
|
76
|
+
return (n, e) => (u(), d(t(E), null, {
|
|
77
|
+
title: a(() => [
|
|
78
|
+
T(v(i.title), 1)
|
|
86
79
|
]),
|
|
87
|
-
default:
|
|
80
|
+
default: a(() => [
|
|
88
81
|
r(t(L), {
|
|
89
82
|
columns: [""],
|
|
90
83
|
presentational: ""
|
|
91
84
|
}, {
|
|
92
|
-
default:
|
|
85
|
+
default: a(() => [
|
|
93
86
|
r(t(M), { class: "relative col-span-full flex h-8 cursor-pointer items-center justify-between border-r-0 !p-0" }, {
|
|
94
|
-
default:
|
|
95
|
-
r(t(
|
|
87
|
+
default: a(() => [
|
|
88
|
+
r(t(D), {
|
|
96
89
|
modelValue: g.value,
|
|
97
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
|
90
|
+
"onUpdate:modelValue": e[0] || (e[0] = (l) => g.value = l),
|
|
98
91
|
options: t(f),
|
|
99
92
|
teleport: ""
|
|
100
93
|
}, {
|
|
101
|
-
default:
|
|
94
|
+
default: a(() => [
|
|
102
95
|
r(t(x), {
|
|
103
96
|
class: "text-c-2 hover:text-c-1 flex h-full w-fit gap-1.5 px-3 font-normal",
|
|
104
97
|
fullWidth: "",
|
|
105
98
|
variant: "ghost"
|
|
106
99
|
}, {
|
|
107
|
-
default:
|
|
108
|
-
c("span", null, v(b[
|
|
100
|
+
default: a(() => [
|
|
101
|
+
c("span", null, v(b[o.value] ?? o.value), 1),
|
|
109
102
|
r(t(k), {
|
|
110
103
|
icon: "ChevronDown",
|
|
111
104
|
size: "md"
|
|
@@ -120,39 +113,39 @@ const R = {
|
|
|
120
113
|
_: 1
|
|
121
114
|
}),
|
|
122
115
|
r(t($), null, {
|
|
123
|
-
default:
|
|
124
|
-
|
|
116
|
+
default: a(() => [
|
|
117
|
+
o.value === "none" ? (u(), y("div", R, [...e[5] || (e[5] = [
|
|
125
118
|
c("span", null, "No Body", -1)
|
|
126
|
-
])])) :
|
|
127
|
-
t(V)(t(B)(m.value?.value)) !== void 0 ? (u(), y(
|
|
119
|
+
])])) : o.value === "application/octet-stream" ? (u(), y("div", I, [
|
|
120
|
+
t(V)(t(B)(m.value?.value)) !== void 0 ? (u(), y(S, { key: 0 }, [
|
|
128
121
|
c("span", J, v(t(V)(t(B)(m.value?.value))), 1),
|
|
129
122
|
r(t(x), {
|
|
130
123
|
class: "bg-b-2 hover:bg-b-3 text-c-2 ml-1 border-0 shadow-none",
|
|
131
124
|
size: "sm",
|
|
132
125
|
variant: "outlined",
|
|
133
|
-
onClick: e[1] || (e[1] = (
|
|
126
|
+
onClick: e[1] || (e[1] = (l) => p("update:value", {
|
|
134
127
|
payload: void 0,
|
|
135
|
-
contentType:
|
|
128
|
+
contentType: o.value
|
|
136
129
|
}))
|
|
137
130
|
}, {
|
|
138
|
-
default:
|
|
131
|
+
default: a(() => [...e[6] || (e[6] = [
|
|
139
132
|
T(" Delete ", -1)
|
|
140
133
|
])]),
|
|
141
134
|
_: 1
|
|
142
135
|
})
|
|
143
|
-
], 64)) : (u(),
|
|
136
|
+
], 64)) : (u(), d(t(x), {
|
|
144
137
|
key: 1,
|
|
145
138
|
class: "bg-b-2 hover:bg-b-3 text-c-2 border-0 shadow-none",
|
|
146
139
|
size: "sm",
|
|
147
140
|
variant: "outlined",
|
|
148
|
-
onClick: e[2] || (e[2] = () =>
|
|
149
|
-
(
|
|
150
|
-
payload:
|
|
151
|
-
contentType:
|
|
141
|
+
onClick: e[2] || (e[2] = () => F(
|
|
142
|
+
(l) => p("update:value", {
|
|
143
|
+
payload: l,
|
|
144
|
+
contentType: o.value
|
|
152
145
|
})
|
|
153
146
|
))
|
|
154
147
|
}, {
|
|
155
|
-
default:
|
|
148
|
+
default: a(() => [
|
|
156
149
|
e[7] || (e[7] = c("span", null, "Select File", -1)),
|
|
157
150
|
r(t(k), {
|
|
158
151
|
class: "ml-1",
|
|
@@ -163,27 +156,27 @@ const R = {
|
|
|
163
156
|
]),
|
|
164
157
|
_: 1
|
|
165
158
|
}))
|
|
166
|
-
])) :
|
|
159
|
+
])) : o.value === "multipart/form-data" || o.value === "application/x-www-form-urlencoded" ? (u(), d(U, {
|
|
167
160
|
key: 2,
|
|
168
|
-
environment:
|
|
161
|
+
environment: i.environment,
|
|
169
162
|
example: m.value,
|
|
170
|
-
selectedContentType:
|
|
171
|
-
"onUpdate:formValue": e[3] || (e[3] = (
|
|
172
|
-
payload:
|
|
173
|
-
contentType:
|
|
163
|
+
selectedContentType: o.value,
|
|
164
|
+
"onUpdate:formValue": e[3] || (e[3] = (l) => p("update:formValue", {
|
|
165
|
+
payload: l,
|
|
166
|
+
contentType: o.value
|
|
174
167
|
}))
|
|
175
|
-
}, null, 8, ["environment", "example", "selectedContentType"])) : (u(),
|
|
168
|
+
}, null, 8, ["environment", "example", "selectedContentType"])) : (u(), d(t(z), {
|
|
176
169
|
key: 3,
|
|
177
170
|
class: "border-t px-3",
|
|
178
171
|
content: "",
|
|
179
|
-
environment:
|
|
180
|
-
language: N[
|
|
172
|
+
environment: i.environment,
|
|
173
|
+
language: N[o.value] ?? "plaintext",
|
|
181
174
|
lineNumbers: "",
|
|
182
175
|
lint: "",
|
|
183
|
-
modelValue:
|
|
184
|
-
"onUpdate:modelValue": e[4] || (e[4] = (
|
|
185
|
-
payload:
|
|
186
|
-
contentType:
|
|
176
|
+
modelValue: h.value,
|
|
177
|
+
"onUpdate:modelValue": e[4] || (e[4] = (l) => p("update:value", {
|
|
178
|
+
payload: l,
|
|
179
|
+
contentType: o.value
|
|
187
180
|
}))
|
|
188
181
|
}, null, 8, ["environment", "language", "modelValue"]))
|
|
189
182
|
]),
|