@scalar/api-client 2.14.1 → 2.15.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.
Files changed (67) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/style.css +1 -1
  3. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
  4. package/dist/v2/blocks/operation-block/OperationBlock.vue.js +28 -51
  5. package/dist/v2/blocks/operation-block/components/Header.vue.d.ts +0 -12
  6. package/dist/v2/blocks/operation-block/components/Header.vue.d.ts.map +1 -1
  7. package/dist/v2/blocks/operation-block/components/Header.vue.js +3 -3
  8. package/dist/v2/blocks/operation-block/components/Header.vue2.js +26 -28
  9. package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -1
  10. package/dist/v2/blocks/request-block/RequestBlock.vue.js +1 -1
  11. package/dist/v2/blocks/request-block/RequestBlock.vue2.js +134 -125
  12. package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts +2 -0
  13. package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts.map +1 -1
  14. package/dist/v2/blocks/request-block/components/RequestBody.vue.js +2 -2
  15. package/dist/v2/blocks/request-block/components/RequestBody.vue2.js +1 -1
  16. package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts +2 -2
  17. package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts.map +1 -1
  18. package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +2 -4
  19. package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts.map +1 -1
  20. package/dist/v2/blocks/request-block/components/RequestTable.vue.js +1 -1
  21. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +2 -2
  22. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
  23. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js +10 -10
  24. package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.d.ts +1 -1
  25. package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.d.ts.map +1 -1
  26. package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.js +21 -15
  27. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts +4 -13
  28. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
  29. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +1 -1
  30. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +106 -70
  31. package/dist/v2/components/code-input/CodeInput.vue.d.ts +10 -1
  32. package/dist/v2/components/code-input/CodeInput.vue.d.ts.map +1 -1
  33. package/dist/v2/components/code-input/CodeInput.vue.js +1 -1
  34. package/dist/v2/components/code-input/CodeInput.vue2.js +65 -51
  35. package/dist/v2/components/sidebar/Sidebar.vue.d.ts +4 -0
  36. package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
  37. package/dist/v2/components/sidebar/Sidebar.vue.js +42 -39
  38. package/dist/v2/features/app/App.vue.d.ts.map +1 -1
  39. package/dist/v2/features/app/App.vue.js +64 -66
  40. package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
  41. package/dist/v2/features/app/components/AppSidebar.vue.js +2 -2
  42. package/dist/v2/features/app/components/AppSidebar.vue2.js +193 -106
  43. package/dist/v2/features/app/components/ItemDecorator.vue.d.ts +22 -0
  44. package/dist/v2/features/app/components/ItemDecorator.vue.d.ts.map +1 -0
  45. package/dist/v2/features/app/components/ItemDecorator.vue.js +138 -0
  46. package/dist/v2/features/app/components/ItemDecorator.vue2.js +4 -0
  47. package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.d.ts +8 -0
  48. package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.d.ts.map +1 -1
  49. package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.js +76 -68
  50. package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.d.ts +8 -0
  51. package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.d.ts.map +1 -1
  52. package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.js +83 -75
  53. package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.d.ts +4 -0
  54. package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.d.ts.map +1 -1
  55. package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.js +32 -34
  56. package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts +16 -0
  57. package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts.map +1 -1
  58. package/dist/v2/features/command-palette/hooks/use-command-palette-state.js +24 -21
  59. package/dist/v2/features/operation/Operation.vue.js +1 -1
  60. package/dist/v2/features/settings/DocumentSettings.vue.js +2 -2
  61. package/dist/v2/features/settings/DocumentSettings.vue2.js +1 -1
  62. package/dist/v2/helpers/storage.d.ts.map +1 -1
  63. package/dist/v2/helpers/storage.js +5 -5
  64. package/dist/v2/hooks/use-workspace-client-events.d.ts.map +1 -1
  65. package/dist/v2/hooks/use-workspace-client-events.js +102 -61
  66. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  67. package/package.json +16 -16
@@ -24,24 +24,15 @@ type __VLS_Props = {
24
24
  /** Environment */
25
25
  environment: XScalarEnvironment;
26
26
  };
27
- declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
27
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {
28
+ methodConflict: import("vue").Ref<"delete" | "get" | "head" | "options" | "patch" | "post" | "put" | "trace" | null, "delete" | "get" | "head" | "options" | "patch" | "post" | "put" | "trace" | null>;
29
+ pathConflict: import("vue").Ref<string | null, string | null>;
30
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
28
31
  execute: () => any;
29
32
  "update:servers": () => any;
30
- "update:path": (payload: {
31
- value: string;
32
- }) => any;
33
- "update:method": (payload: {
34
- value: HttpMethodType;
35
- }) => any;
36
33
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
37
34
  onExecute?: (() => any) | undefined;
38
35
  "onUpdate:servers"?: (() => any) | undefined;
39
- "onUpdate:path"?: ((payload: {
40
- value: string;
41
- }) => any) | undefined;
42
- "onUpdate:method"?: ((payload: {
43
- value: HttpMethodType;
44
- }) => any) | undefined;
45
36
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
46
37
  export default _default;
47
38
  //# sourceMappingURL=AddressBar.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AddressBar.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-address-bar-block/components/AddressBar.vue"],"names":[],"mappings":"AAqUA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AACrF,OAAO,KAAK,EAEV,iBAAiB,EAClB,MAAM,gCAAgC,CAAA;AACvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAUhG,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAA;AAI3C,OAA0B,EAAE,KAAK,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAEzE,KAAK,WAAW,GAAG;IACjB,2BAA2B;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,6BAA6B;IAC7B,MAAM,EAAE,cAAc,CAAA;IACtB,gCAAgC;IAChC,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;IAC3B,mDAAmD;IACnD,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,8BAA8B;IAC9B,OAAO,EAAE,OAAO,EAAE,CAAA;IAClB,oBAAoB;IACpB,MAAM,EAAE,YAAY,CAAA;IACpB,iDAAiD;IACjD,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,gBAAgB;IAChB,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,kBAAkB;IAClB,WAAW,EAAE,kBAAkB,CAAA;CAChC,CAAC;;;;;eAkBW,MAAM;;;eAMN,cAAc;;;;;;eANd,MAAM;;;eAMN,cAAc;;;AAkZ3B,wBAOG"}
1
+ {"version":3,"file":"AddressBar.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-address-bar-block/components/AddressBar.vue"],"names":[],"mappings":"AA2YA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAErF,OAAO,KAAK,EAEV,iBAAiB,EAClB,MAAM,gCAAgC,CAAA;AACvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAWhG,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAA;AAI3C,OAA0B,EAAE,KAAK,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAEzE,KAAK,WAAW,GAAG;IACjB,2BAA2B;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,6BAA6B;IAC7B,MAAM,EAAE,cAAc,CAAA;IACtB,gCAAgC;IAChC,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;IAC3B,mDAAmD;IACnD,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,8BAA8B;IAC9B,OAAO,EAAE,OAAO,EAAE,CAAA;IAClB,oBAAoB;IACpB,MAAM,EAAE,YAAY,CAAA;IACpB,iDAAiD;IACjD,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,gBAAgB;IAChB,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,kBAAkB;IAClB,WAAW,EAAE,kBAAkB,CAAA;CAChC,CAAC;;;;;;;;;;;AAohBF,wBAQG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./AddressBar.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../../../_virtual/_plugin-vue_export-helper.js";
4
- const d = /* @__PURE__ */ r(o, [["__scopeId", "data-v-a74c279d"]]);
4
+ const d = /* @__PURE__ */ r(o, [["__scopeId", "data-v-6cf7598d"]]);
5
5
  export {
6
6
  d as default
7
7
  };
@@ -1,14 +1,18 @@
1
- import { defineComponent as g, useId as B, computed as y, useTemplateRef as v, onMounted as x, onBeforeUnmount as w, createElementBlock as k, openBlock as b, unref as l, createElementVNode as r, createVNode as a, normalizeStyle as S, createBlock as C, createCommentVNode as R, withCtx as E, toDisplayString as u } from "vue";
2
- import { ScalarButton as U, ScalarIcon as V } from "@scalar/components";
3
- import { REQUEST_METHODS as $ } from "@scalar/helpers/http/http-info";
4
- import z from "./AddressBarHistory.vue.js";
5
- import I from "../../../../components/HttpMethod/HttpMethod.vue.js";
6
- import T from "../../../components/server/ServerDropdown.vue.js";
7
- import A from "../../../components/code-input/CodeInput.vue.js";
8
- const D = ["id"], F = { class: "address-bar-bg-states text-xxs group relative order-last flex w-full max-w-[calc(100dvw-24px)] flex-1 flex-row items-stretch rounded-lg p-0.75 lg:order-none lg:max-w-[580px] lg:min-w-[580px] xl:max-w-[720px] xl:min-w-[720px]" }, H = { class: "pointer-events-none absolute top-0 left-0 block h-full w-full overflow-hidden rounded-lg border" }, M = { class: "z-context-plus flex gap-1" }, N = { class: "scroll-timeline-x scroll-timeline-x-hidden z-context-plus relative flex w-full bg-blend-normal" }, q = {
1
+ import { defineComponent as V, useId as T, computed as B, ref as C, useTemplateRef as w, onMounted as I, onBeforeUnmount as M, createElementBlock as k, openBlock as p, unref as s, createElementVNode as o, normalizeClass as A, createVNode as r, createCommentVNode as S, normalizeStyle as N, createBlock as q, createTextVNode as c, toDisplayString as i, withCtx as D } from "vue";
2
+ import { ScalarWrappingText as F, ScalarButton as H, ScalarIcon as L } from "@scalar/components";
3
+ import { REQUEST_METHODS as O } from "@scalar/helpers/http/http-info";
4
+ import { ScalarIconWarningCircle as P } from "@scalar/icons";
5
+ import W from "./AddressBarHistory.vue.js";
6
+ import K from "../../../../components/HttpMethod/HttpMethod.vue.js";
7
+ import Q from "../../../components/server/ServerDropdown.vue.js";
8
+ import j from "../../../components/code-input/CodeInput.vue.js";
9
+ const G = ["id"], J = { class: "pointer-events-none absolute top-0 left-0 block h-full w-full overflow-hidden rounded-lg border" }, X = { class: "z-context-plus flex gap-1" }, Y = { class: "scroll-timeline-x scroll-timeline-x-hidden z-context-plus relative flex w-full bg-blend-normal" }, Z = {
10
+ key: 0,
11
+ class: "z-context absolute inset-x-0 top-[calc(100%+4px)] flex flex-col items-center rounded px-6"
12
+ }, _ = { class: "text-c-danger bg-b-danger border-c-danger flex items-center gap-1 rounded border p-1" }, ee = { class: "min-w-0 flex-1" }, te = {
9
13
  "aria-hidden": "true",
10
14
  class: "inline-flex items-center gap-1"
11
- }, L = { class: "sr-only" }, W = /* @__PURE__ */ g({
15
+ }, le = { class: "sr-only" }, me = /* @__PURE__ */ V({
12
16
  __name: "AddressBar",
13
17
  props: {
14
18
  path: {},
@@ -21,106 +25,138 @@ const D = ["id"], F = { class: "address-bar-bg-states text-xxs group relative or
21
25
  eventBus: {},
22
26
  environment: {}
23
27
  },
24
- emits: ["execute", "update:path", "update:method", "update:servers"],
25
- setup(o, { emit: c }) {
26
- const n = c, d = B(), h = y(() => ({
27
- backgroundColor: `color-mix(in srgb, transparent 90%, ${$[o.method].colorVar})`,
28
- transform: `translate3d(-${o.percentage}%,0,0)`
29
- })), m = v("sendButtonRef"), i = v("addressBarRef"), f = () => m.value?.$el?.focus(), p = ({
30
- event: t
31
- }) => {
32
- i.value?.isFocused && o.layout !== "desktop" || (i.value?.focus(), t.preventDefault());
28
+ emits: ["execute", "update:servers"],
29
+ setup(l, { expose: U, emit: E }) {
30
+ const u = E, m = T(), R = B(() => ({
31
+ backgroundColor: `color-mix(in srgb, transparent 90%, ${O[l.method].colorVar})`,
32
+ transform: `translate3d(-${l.percentage}%,0,0)`
33
+ })), d = C(null), a = C(null), h = B(() => a.value || d.value), b = (e, t, n) => l.eventBus.emit(
34
+ "operation:update:pathMethod",
35
+ {
36
+ meta: { method: l.method, path: l.path },
37
+ payload: { method: e, path: t },
38
+ callback: (v) => {
39
+ v === "success" || v === "no-change" ? (a.value = null, d.value = null) : v === "conflict" && (e !== l.method && (a.value = e), t !== l.path && (d.value = t));
40
+ }
41
+ },
42
+ n
43
+ ), z = (e) => b(e, d.value ?? l.path), $ = (e) => b(a.value ?? l.method, e, {
44
+ debounceKey: `operation:update:pathMethod-${l.path}-${l.method}`
45
+ }), g = w("sendButtonRef"), f = w("addressBarRef"), x = () => g.value?.$el?.focus(), y = (e) => {
46
+ f.value?.isFocused && l.layout !== "desktop" || (f.value?.focus(!0), e?.event.preventDefault());
33
47
  };
34
- return x(() => {
35
- o.eventBus.on("ui:focus:address-bar", p), o.eventBus.on("ui:focus:send-button", f);
36
- }), w(() => {
37
- o.eventBus.off("ui:focus:address-bar", p), o.eventBus.off("ui:focus:send-button", f);
38
- }), (t, e) => (b(), k("div", {
39
- id: l(d),
48
+ return I(() => {
49
+ l.eventBus.on("ui:focus:address-bar", y), l.eventBus.on("ui:focus:send-button", x);
50
+ }), M(() => {
51
+ l.eventBus.off("ui:focus:address-bar", y), l.eventBus.off("ui:focus:send-button", x);
52
+ }), U({
53
+ methodConflict: a,
54
+ pathConflict: d
55
+ }), (e, t) => (p(), k("div", {
56
+ id: s(m),
40
57
  class: "scalar-address-bar order-last flex h-(--scalar-address-bar-height) w-full [--scalar-address-bar-height:32px] lg:order-none lg:w-auto"
41
58
  }, [
42
- r("div", F, [
43
- r("div", H, [
44
- r("div", {
59
+ o("div", {
60
+ class: A(["address-bar-bg-states text-xxs group relative order-last flex w-full max-w-[calc(100dvw-24px)] flex-1 flex-row items-stretch rounded-lg p-0.75 lg:order-none lg:max-w-[580px] lg:min-w-[580px] xl:max-w-[720px] xl:min-w-[720px]", {
61
+ "outline-c-danger outline": h.value
62
+ }])
63
+ }, [
64
+ o("div", J, [
65
+ o("div", {
45
66
  class: "absolute top-0 left-0 z-[1002] h-full w-full",
46
- style: S(h.value)
67
+ style: N(R.value)
47
68
  }, null, 4)
48
69
  ]),
49
- r("div", M, [
50
- a(l(I), {
51
- isEditable: t.layout !== "modal",
70
+ o("div", X, [
71
+ r(s(K), {
72
+ isEditable: e.layout !== "modal",
52
73
  isSquare: "",
53
- method: t.method,
74
+ method: a.value ?? e.method,
54
75
  teleport: "",
55
- onChange: e[0] || (e[0] = (s) => n("update:method", { value: s }))
76
+ onChange: z
56
77
  }, null, 8, ["isEditable", "method"])
57
78
  ]),
58
- r("div", N, [
59
- t.servers.length ? (b(), C(l(T), {
79
+ o("div", Y, [
80
+ e.servers.length ? (p(), q(s(Q), {
60
81
  key: 0,
61
- layout: t.layout,
62
- server: t.server,
63
- servers: t.servers,
64
- target: l(d),
65
- "onUpdate:selectedServer": e[1] || (e[1] = (s) => t.eventBus.emit("server:update:selected", s)),
66
- "onUpdate:servers": e[2] || (e[2] = (s) => n("update:servers")),
67
- "onUpdate:variable": e[3] || (e[3] = (s) => t.eventBus.emit("server:update:variables", s))
68
- }, null, 8, ["layout", "server", "servers", "target"])) : R("", !0),
69
- e[8] || (e[8] = r("div", { class: "fade-left" }, null, -1)),
70
- a(l(A), {
82
+ layout: e.layout,
83
+ server: e.server,
84
+ servers: e.servers,
85
+ target: s(m),
86
+ "onUpdate:selectedServer": t[0] || (t[0] = (n) => e.eventBus.emit("server:update:selected", n)),
87
+ "onUpdate:servers": t[1] || (t[1] = (n) => u("update:servers")),
88
+ "onUpdate:variable": t[2] || (t[2] = (n) => e.eventBus.emit("server:update:variables", n))
89
+ }, null, 8, ["layout", "server", "servers", "target"])) : S("", !0),
90
+ t[6] || (t[6] = o("div", { class: "fade-left" }, null, -1)),
91
+ r(s(j), {
71
92
  ref_key: "addressBarRef",
72
- ref: i,
93
+ ref: f,
94
+ alwaysEmitChange: "",
73
95
  "aria-label": "Path",
74
96
  class: "min-w-fit outline-none",
75
97
  disableCloseBrackets: "",
76
- disabled: t.layout === "modal",
98
+ disabled: e.layout === "modal",
77
99
  disableEnter: "",
78
100
  disableTabIndent: "",
79
101
  emitOnBlur: !1,
80
- environment: t.environment,
102
+ environment: e.environment,
81
103
  importCurl: "",
82
- modelValue: t.path,
83
- placeholder: t.server ? "" : "Enter a URL or cURL command",
104
+ modelValue: e.path,
105
+ placeholder: e.server ? "" : "Enter a URL or cURL command",
84
106
  server: "",
85
- onCurl: e[4] || (e[4] = (s) => t.eventBus.emit("ui:open:command-palette", {
107
+ onCurl: t[3] || (t[3] = (n) => e.eventBus.emit("ui:open:command-palette", {
86
108
  action: "import-curl-command",
87
109
  payload: {
88
- curl: s
110
+ curl: n
89
111
  }
90
112
  })),
91
- onSubmit: e[5] || (e[5] = (s) => n("execute")),
92
- "onUpdate:modelValue": e[6] || (e[6] = (s) => n("update:path", { value: s }))
113
+ onSubmit: t[4] || (t[4] = (n) => u("execute")),
114
+ "onUpdate:modelValue": $
93
115
  }, null, 8, ["disabled", "environment", "modelValue", "placeholder"]),
94
- e[9] || (e[9] = r("div", { class: "fade-right" }, null, -1))
116
+ t[7] || (t[7] = o("div", { class: "fade-right" }, null, -1))
95
117
  ]),
96
- a(z, {
97
- history: t.history,
98
- target: l(d)
118
+ r(W, {
119
+ history: e.history,
120
+ target: s(m)
99
121
  }, null, 8, ["history", "target"]),
100
- a(l(U), {
122
+ h.value ? (p(), k("div", Z, [
123
+ o("div", _, [
124
+ r(s(P), { size: "sm" }),
125
+ o("div", ee, [
126
+ t[8] || (t[8] = c(" A ", -1)),
127
+ o("em", null, i(a.value?.toUpperCase() ?? e.method.toUpperCase()), 1),
128
+ t[9] || (t[9] = c(" request to ", -1)),
129
+ r(s(F), {
130
+ text: d.value ?? e.path
131
+ }, null, 8, ["text"]),
132
+ t[10] || (t[10] = c(" already exists in this document ", -1))
133
+ ])
134
+ ])
135
+ ])) : S("", !0),
136
+ r(s(H), {
101
137
  ref_key: "sendButtonRef",
102
- ref: m,
138
+ ref: g,
103
139
  class: "z-context-plus relative h-auto shrink-0 overflow-hidden py-1 pr-2.5 pl-2 font-bold",
104
- disabled: t.percentage < 100,
105
- onClick: e[7] || (e[7] = (s) => n("execute"))
140
+ disabled: e.percentage < 100,
141
+ onClick: t[5] || (t[5] = (n) => u("execute"))
106
142
  }, {
107
- default: E(() => [
108
- r("span", q, [
109
- a(l(V), {
143
+ default: D(() => [
144
+ o("span", te, [
145
+ r(s(L), {
110
146
  class: "relative shrink-0 fill-current",
111
147
  icon: "Play",
112
148
  size: "xs"
113
149
  }),
114
- e[10] || (e[10] = r("span", { class: "text-xxs hidden lg:flex" }, "Send", -1))
150
+ t[11] || (t[11] = o("span", { class: "text-xxs hidden lg:flex" }, "Send", -1))
115
151
  ]),
116
- r("span", L, " Send " + u(t.method) + " request to " + u(t.server?.url ?? "") + u(t.path), 1)
152
+ o("span", le, " Send " + i(e.method) + " request to " + i(e.server?.url ?? "") + i(e.path), 1)
117
153
  ]),
118
154
  _: 1
119
155
  }, 8, ["disabled"])
120
- ])
121
- ], 8, D));
156
+ ], 2)
157
+ ], 8, G));
122
158
  }
123
159
  });
124
160
  export {
125
- W as default
161
+ me as default
126
162
  };
@@ -50,12 +50,19 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
50
50
  withVariables?: boolean;
51
51
  /** Detect and emit curl commands */
52
52
  importCurl?: boolean;
53
+ /** Emit change event even if the value is the same */
54
+ alwaysEmitChange?: boolean;
53
55
  /** Custom change handler, prevents default emit */
54
56
  handleFieldChange?: (value: string) => void;
55
57
  /** Custom submit handler, prevents default emit */
56
58
  handleFieldSubmit?: (value: string) => void;
57
59
  }, {
58
- focus: () => void | undefined;
60
+ /**
61
+ * Focus the codemirror element
62
+ *
63
+ * @param cursorAtEnd boolean place the cursor at the end of the input
64
+ */
65
+ focus: (cursorAtEnd?: boolean) => void;
59
66
  isFocused: Ref<boolean, boolean>;
60
67
  handleChange: (value: string) => void;
61
68
  handleSubmit: (value: string) => void;
@@ -117,6 +124,8 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
117
124
  withVariables?: boolean;
118
125
  /** Detect and emit curl commands */
119
126
  importCurl?: boolean;
127
+ /** Emit change event even if the value is the same */
128
+ alwaysEmitChange?: boolean;
120
129
  /** Custom change handler, prevents default emit */
121
130
  handleFieldChange?: (value: string) => void;
122
131
  /** Custom submit handler, prevents default emit */
@@ -1 +1 @@
1
- {"version":3,"file":"CodeInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/code-input/CodeInput.vue"],"names":[],"mappings":"AAwmBA,OAAO,EAIL,KAAK,kBAAkB,EACvB,KAAK,SAAS,EACf,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AAEnH,OAAO,EAAyC,KAAK,GAAG,EAAE,MAAM,KAAK,CAAA;AAIrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;;gBAcvC,MAAM,GAAG,MAAM;IAC3B,6FAA6F;iBAChF,kBAAkB,GAAG,SAAS;IAC3C,mEAAmE;WAC5D,MAAM,GAAG,MAAM,EAAE;IACxB,sCAAsC;eAC3B,OAAO;IAClB,yBAAyB;YACjB,OAAO;IACf,kDAAkD;aACzC,YAAY;IACrB,mDAAmD;WAC5C,MAAM,EAAE;IACf,2CAA2C;eAChC,MAAM,EAAE;IACnB,2CAA2C;cACjC,MAAM,GAAG,MAAM;IACzB,2CAA2C;eAChC,OAAO;IAClB,uCAAuC;kBACzB,MAAM;IACpB,8BAA8B;eACnB,OAAO;IAClB,oCAAoC;kBACtB,OAAO;IACrB,kCAAkC;kBACpB,OAAO;IACrB,qBAAqB;WACd,OAAO;IACd,2BAA2B;mBACZ,OAAO;IACtB,+BAA+B;eACpB,kBAAkB;IAC7B,uCAAuC;iBAC1B,SAAS,EAAE;IACxB,sCAAsC;uBACnB,OAAO;IAC1B,wBAAwB;mBACT,OAAO;IACtB,wCAAwC;2BACjB,OAAO;IAC9B,gCAAgC;iBACnB,OAAO;IACpB,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AC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"CodeInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/code-input/CodeInput.vue"],"names":[],"mappings":"AAgoBA,OAAO,EAIL,KAAK,kBAAkB,EACvB,KAAK,SAAS,EACf,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AAEnH,OAAO,EAAyC,KAAK,GAAG,EAAE,MAAM,KAAK,CAAA;AAIrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;;gBAcvC,MAAM,GAAG,MAAM;IAC3B,6FAA6F;iBAChF,kBAAkB,GAAG,SAAS;IAC3C,mEAAmE;WAC5D,MAAM,GAAG,MAAM,EAAE;IACxB,sCAAsC;eAC3B,OAAO;IAClB,yBAAyB;YACjB,OAAO;IACf,kDAAkD;aACzC,YAAY;IACrB,mDAAmD;WAC5C,MAAM,EAAE;IACf,2CAA2C;eAChC,MAAM,EAAE;IACnB,2CAA2C;cACjC,MAAM,GAAG,MAAM;IACzB,2CAA2C;eAChC,OAAO;IAClB,uCAAuC;kBACzB,MAAM;IACpB,8BAA8B;eACnB,OAAO;IAClB,oCAAoC;kBACtB,OAAO;IACrB,kCAAkC;kBACpB,OAAO;IACrB,qBAAqB;WACd,OAAO;IACd,2BAA2B;mBACZ,OAAO;IACtB,+BAA+B;eACpB,kBAAkB;IAC7B,uCAAuC;iBAC1B,SAAS,EAAE;IACxB,sCAAsC;uBACnB,OAAO;IAC1B,wBAAwB;mBACT,OAAO;IACtB,wCAAwC;2BACjB,OAAO;IAC9B,gCAAgC;iBACnB,OAAO;IACpB,wCAAwC;oBACxB,OAAO;IACvB,oCAAoC;iBACvB,OAAO;IACpB,sDAAsD;uBACnC,OAAO;IAC1B,mDAAmD;wBAC/B,CAAC,KA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AI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -2,7 +2,7 @@ import o from "./CodeInput.vue2.js";
2
2
  /* empty css */
3
3
  /* empty css */
4
4
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
5
- const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-fb7ca3f4"]]);
5
+ const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-802d60c5"]]);
6
6
  export {
7
7
  a as default
8
8
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as W, useAttrs as j, ref as d, computed as s, toRef as r, watch as H, createElementBlock as i, openBlock as n, Fragment as Q, createBlock as c, createCommentVNode as f, normalizeClass as G, createElementVNode as w, toDisplayString as J, mergeProps as X, unref as T, withKeys as b, withModifiers as D, createTextVNode as V, renderSlot as $ } from "vue";
1
+ import { defineComponent as W, useAttrs as j, ref as d, computed as s, toRef as r, watch as H, createElementBlock as i, openBlock as o, Fragment as Q, createBlock as m, createCommentVNode as f, normalizeClass as G, createElementVNode as w, toDisplayString as J, mergeProps as X, unref as T, withKeys as b, withModifiers as D, createTextVNode as V, renderSlot as $ } from "vue";
2
2
  import { useCodeMirror as Y, useDropdown as Z, colorPicker as _ } from "@scalar/use-codemirror";
3
3
  import { nanoid as ee } from "nanoid";
4
4
  import B from "../data-table/DataTableInputSelect.vue.js";
@@ -19,7 +19,7 @@ const oe = { class: "whitespace-nowrap" }, ae = ["id"], re = {
19
19
  class: "required centered-y text-xxs text-c-3 group-[.error]:text-red bg-b-1 pointer-events-none absolute right-0 mr-0.5 pt-px pr-2 opacity-100 shadow-[-8px_0_4px_var(--scalar-background-1)] transition-opacity duration-150 group-[.alert]:bg-transparent group-[.alert]:shadow-none group-[.error]:bg-transparent group-[.error]:shadow-none peer-has-[.cm-focused]:opacity-0"
20
20
  }, se = {
21
21
  inheritAttrs: !1
22
- }, ge = /* @__PURE__ */ W({
22
+ }, pe = /* @__PURE__ */ W({
23
23
  ...se,
24
24
  __name: "CodeInput",
25
25
  props: {
@@ -47,18 +47,19 @@ const oe = { class: "whitespace-nowrap" }, ae = ["id"], re = {
47
47
  emitOnBlur: { type: Boolean, default: !0 },
48
48
  withVariables: { type: Boolean, default: !0 },
49
49
  importCurl: { type: Boolean, default: !1 },
50
+ alwaysEmitChange: { type: Boolean, default: !1 },
50
51
  handleFieldChange: { type: Function },
51
52
  handleFieldSubmit: { type: Function }
52
53
  },
53
54
  emits: ["update:modelValue", "submit", "blur", "curl", "redirectToEnvironment"],
54
- setup(t, { expose: M, emit: R }) {
55
- const u = R, k = j(), q = k.id || `id-${ee()}`, p = d(!1), A = s(() => t.enum?.length ? !1 : t.type === "boolean" || Array.isArray(t.type) && t.type.includes("boolean")), x = s(() => t.nullable ? ["true", "false", "null"] : ["true", "false"]), I = s(() => Array.isArray(t.type) ? t.type.find((e) => e !== "null") ?? "string" : t.type), C = (e) => {
56
- if (e !== t.modelValue) {
55
+ setup(t, { expose: I, emit: M }) {
56
+ const u = M, k = j(), R = k.id || `id-${ee()}`, y = d(!1), q = s(() => t.enum?.length ? !1 : t.type === "boolean" || Array.isArray(t.type) && t.type.includes("boolean")), x = s(() => t.nullable ? ["true", "false", "null"] : ["true", "false"]), A = s(() => Array.isArray(t.type) ? t.type.find((e) => e !== "null") ?? "string" : t.type), C = (e) => {
57
+ if (!(!t.alwaysEmitChange && e === t.modelValue)) {
57
58
  if (t.importCurl && e.trim().toLowerCase().startsWith("curl")) {
58
- u("curl", e), o.value && o.value.dispatch({
59
+ u("curl", e), n.value && n.value.dispatch({
59
60
  changes: {
60
61
  from: 0,
61
- to: o.value.state.doc.length,
62
+ to: n.value.state.doc.length,
62
63
  insert: String(t.modelValue)
63
64
  }
64
65
  });
@@ -66,11 +67,11 @@ const oe = { class: "whitespace-nowrap" }, ae = ["id"], re = {
66
67
  }
67
68
  t.handleFieldChange ? t.handleFieldChange(e) : u("update:modelValue", e);
68
69
  }
69
- }, y = (e) => {
70
+ }, h = (e) => {
70
71
  t.handleFieldSubmit ? t.handleFieldSubmit(e) : u("submit", e);
71
- }, S = (e) => {
72
- p.value = !1, t.emitOnBlur && t.modelValue && y(e), u("blur", e);
73
- }, g = (e) => {
72
+ }, E = (e) => {
73
+ y.value = !1, t.emitOnBlur && t.modelValue && h(e), u("blur", e);
74
+ }, p = (e) => {
74
75
  u("update:modelValue", e);
75
76
  }, N = () => {
76
77
  const e = [...t.extensions];
@@ -84,16 +85,16 @@ const oe = { class: "whitespace-nowrap" }, ae = ["id"], re = {
84
85
  ...N(),
85
86
  O.value,
86
87
  ne
87
- ]), E = d(null), { codeMirror: o } = Y({
88
+ ]), S = d(null), { codeMirror: n } = Y({
88
89
  content: r(() => String(t.modelValue ?? "")),
89
90
  onChange: (e) => {
90
91
  C(e), L();
91
92
  },
92
93
  onFocus: () => {
93
- p.value = !0;
94
+ y.value = !0;
94
95
  },
95
- onBlur: S,
96
- codeMirrorRef: E,
96
+ onBlur: E,
97
+ codeMirrorRef: S,
97
98
  disableTabIndent: r(() => t.disableTabIndent),
98
99
  disableEnter: r(() => t.disableEnter),
99
100
  disableCloseBrackets: r(() => t.disableCloseBrackets),
@@ -103,74 +104,87 @@ const oe = { class: "whitespace-nowrap" }, ae = ["id"], re = {
103
104
  extensions: z,
104
105
  placeholder: r(() => t.placeholder)
105
106
  });
106
- H(o, () => {
107
- o.value && Object.hasOwn(k, "autofocus") && o.value.focus();
107
+ H(n, () => {
108
+ n.value && Object.hasOwn(k, "autofocus") && n.value.focus();
108
109
  });
109
- const h = d(!1), F = d(""), P = d({ left: 0, top: 0 }), v = d(null), { handleDropdownSelect: K, updateDropdownVisibility: L } = Z({
110
- codeMirror: o,
110
+ const g = d(!1), F = d(""), P = d({ left: 0, top: 0 }), v = d(null), { handleDropdownSelect: K, updateDropdownVisibility: L } = Z({
111
+ codeMirror: n,
111
112
  query: F,
112
- showDropdown: h,
113
+ showDropdown: g,
113
114
  dropdownPosition: P
114
- }), U = s(() => h.value && t.withVariables && t.layout !== "modal" && !!t.environment), m = (e, l) => {
115
- if (h.value) {
115
+ }), U = s(() => g.value && t.withVariables && t.layout !== "modal" && !!t.environment), c = (e, l) => {
116
+ if (g.value) {
116
117
  e === "down" || e === "up" ? (l.preventDefault(), v.value?.handleArrowKey(e)) : e === "enter" && (l.preventDefault(), v.value?.handleSelect());
117
118
  return;
118
119
  }
119
- e === "escape" && !t.disableTabIndent && l.stopPropagation(), e === "enter" && l.target instanceof HTMLDivElement && y(l.target.textContent ?? "");
120
+ e === "escape" && !t.disableTabIndent && l.stopPropagation(), e === "enter" && l.target instanceof HTMLDivElement && h(l.target.textContent ?? "");
120
121
  };
121
- return M({
122
- focus: () => o.value?.focus(),
123
- isFocused: p,
122
+ return I({
123
+ /**
124
+ * Focus the codemirror element
125
+ *
126
+ * @param cursorAtEnd boolean place the cursor at the end of the input
127
+ */
128
+ focus: (e) => {
129
+ if (!n.value || (n.value.focus(), !e))
130
+ return;
131
+ const l = n.value.state.doc.length;
132
+ n.value.dispatch({
133
+ selection: { anchor: l },
134
+ scrollIntoView: !0
135
+ });
136
+ },
137
+ isFocused: y,
124
138
  handleChange: C,
125
- handleSubmit: y,
126
- handleBlur: S,
139
+ handleSubmit: h,
140
+ handleBlur: E,
127
141
  booleanOptions: x,
128
- codeMirror: o,
142
+ codeMirror: n,
129
143
  modelValue: t.modelValue
130
- }), (e, l) => (n(), i(Q, null, [
131
- e.disabled ? (n(), i("div", {
144
+ }), (e, l) => (o(), i(Q, null, [
145
+ e.disabled ? (o(), i("div", {
132
146
  key: 0,
133
147
  class: G(["text-c-2 flex cursor-default items-center justify-center", e.layout === "modal" ? "font-code pr-2 pl-1 text-base" : "px-2"]),
134
148
  "data-testid": "code-input-disabled"
135
149
  }, [
136
150
  w("span", oe, J(e.modelValue), 1)
137
- ], 2)) : t.enum?.length ? (n(), c(B, {
151
+ ], 2)) : t.enum?.length ? (o(), m(B, {
138
152
  key: 1,
139
153
  default: t.default,
140
154
  modelValue: e.modelValue,
141
- type: I.value,
155
+ type: A.value,
142
156
  value: t.enum,
143
- "onUpdate:modelValue": g
144
- }, null, 8, ["default", "modelValue", "type", "value"])) : A.value ? (n(), c(B, {
157
+ "onUpdate:modelValue": p
158
+ }, null, 8, ["default", "modelValue", "type", "value"])) : q.value ? (o(), m(B, {
145
159
  key: 2,
146
160
  default: t.default,
147
161
  modelValue: e.modelValue,
148
162
  value: x.value,
149
- "onUpdate:modelValue": g
150
- }, null, 8, ["default", "modelValue", "value"])) : e.examples?.length ? (n(), c(B, {
163
+ "onUpdate:modelValue": p
164
+ }, null, 8, ["default", "modelValue", "value"])) : e.examples?.length ? (o(), m(B, {
151
165
  key: 3,
152
166
  default: t.default,
153
167
  modelValue: e.modelValue,
154
168
  value: e.examples,
155
- "onUpdate:modelValue": g
156
- }, null, 8, ["default", "modelValue", "value"])) : (n(), i("div", X({
169
+ "onUpdate:modelValue": p
170
+ }, null, 8, ["default", "modelValue", "value"])) : (o(), i("div", X({
157
171
  key: 4,
158
- id: T(q)
172
+ id: T(R)
159
173
  }, e.$attrs, {
160
174
  ref_key: "codeMirrorRef",
161
- ref: E,
175
+ ref: S,
162
176
  class: ["group/input group-[.alert]:outline-orange group-[.error]:outline-red font-code peer relative w-full overflow-hidden text-xs leading-[1.44] whitespace-nowrap -outline-offset-1 has-[:focus-visible]:rounded-[4px] has-[:focus-visible]:outline", {
163
177
  "line-wrapping has-[:focus-visible]:bg-b-1 has-[:focus-visible]:absolute has-[:focus-visible]:z-1": e.lineWrapping,
164
178
  "flow-code-input--error": e.error
165
179
  }],
166
180
  onKeydown: [
167
- l[0] || (l[0] = b(D((a) => m("down", a), ["stop"]), ["down"])),
168
- l[1] || (l[1] = b((a) => m("enter", a), ["enter"])),
169
- l[2] || (l[2] = b((a) => m("escape", a), ["escape"])),
170
- l[3] || (l[3] = b(D((a) => m("up", a), ["stop"]), ["up"]))
181
+ l[0] || (l[0] = b(D((a) => c("down", a), ["stop"]), ["down"])),
182
+ l[1] || (l[1] = b((a) => c("enter", a), ["enter"])),
183
+ l[2] || (l[2] = b((a) => c("escape", a), ["escape"])),
184
+ l[3] || (l[3] = b(D((a) => c("up", a), ["stop"]), ["up"]))
171
185
  ]
172
186
  }), [
173
- e.disableTabIndent ? f("", !0) : (n(), i("div", re, [...l[5] || (l[5] = [
187
+ e.disableTabIndent ? f("", !0) : (o(), i("div", re, [...l[5] || (l[5] = [
174
188
  V(" Press ", -1),
175
189
  w("kbd", { class: "-mx-0.25 rounded border px-0.5 font-mono" }, "Esc", -1),
176
190
  V(" then ", -1),
@@ -178,14 +192,14 @@ const oe = { class: "whitespace-nowrap" }, ae = ["id"], re = {
178
192
  V(" to exit ", -1)
179
193
  ])]))
180
194
  ], 16, ae)),
181
- e.$slots.warning ? (n(), i("div", ie, [
195
+ e.$slots.warning ? (o(), i("div", ie, [
182
196
  $(e.$slots, "warning", {}, void 0, !0)
183
197
  ])) : f("", !0),
184
- e.$slots.icon ? (n(), i("div", ue, [
198
+ e.$slots.icon ? (o(), i("div", ue, [
185
199
  $(e.$slots, "icon", {}, void 0, !0)
186
200
  ])) : f("", !0),
187
- e.required ? (n(), i("div", de, " Required ")) : f("", !0),
188
- U.value && e.environment ? (n(), c(te, {
201
+ e.required ? (o(), i("div", de, " Required ")) : f("", !0),
202
+ U.value && e.environment ? (o(), m(te, {
189
203
  key: 8,
190
204
  ref_key: "dropdownRef",
191
205
  ref: v,
@@ -199,5 +213,5 @@ const oe = { class: "whitespace-nowrap" }, ae = ["id"], re = {
199
213
  }
200
214
  });
201
215
  export {
202
- ge as default
216
+ pe as default
203
217
  };
@@ -27,6 +27,10 @@ type __VLS_Props = {
27
27
  type __VLS_Slots = {
28
28
  /** Slot to add the workspace button */
29
29
  workspaceButton?(): unknown;
30
+ /** Slot to add additional content to the decorator */
31
+ decorator?(props: {
32
+ item: TraversedEntry;
33
+ }): unknown;
30
34
  /** Slot to add additional content to the footer */
31
35
  footer?(): unknown;
32
36
  };
@@ -1 +1 @@
1
- {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