@scalar/api-client 2.0.7 → 2.0.8

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.
@@ -1,11 +1,12 @@
1
- import { defineComponent as S, openBlock as s, createBlock as r, unref as p, withCtx as i, createElementBlock as f, Fragment as v, renderList as F, createCommentVNode as b, createVNode as c, createSlots as R, createElementVNode as u, toDisplayString as w, pushScopeId as $, popScopeId as x } from "vue";
2
- import I from "../../../components/DataTable/DataTable.vue.js";
3
- import U from "../../../components/DataTable/DataTableCell.vue.js";
1
+ import { defineComponent as _, openBlock as u, createBlock as d, unref as i, withCtx as s, createElementBlock as b, Fragment as w, renderList as F, createCommentVNode as m, createVNode as c, createElementVNode as p, toDisplayString as R, pushScopeId as S, popScopeId as $ } from "vue";
2
+ import U from "../../../components/DataTable/DataTable.vue.js";
3
+ import I from "../../../components/DataTable/DataTableCell.vue.js";
4
4
  import C from "../../../components/DataTable/DataTableCheckbox.vue.js";
5
- import V from "../../../components/DataTable/DataTableInput.vue.js";
6
- import z from "../../../components/DataTable/DataTableRow.vue.js";
7
- import { ScalarIcon as y, ScalarButton as E } from "@scalar/components";
8
- const q = (d) => ($("data-v-c04c82dd"), d = d(), x(), d), D = { class: "relative group/info flex items-center pr-2" }, H = { class: "absolute pointer-events-none w-40 shadow-lg rounded bg-b-1 z-100 p-1.5 text-xxs leading-5 -translate-x-full translate-y-[24px] opacity-0 group-hover/info:opacity-100 z-10 text-c-1" }, N = { class: "text-c-2 max-w-[100%] overflow-hidden filemask flex items-end justify-end" }, T = ["onClick"], j = /* @__PURE__ */ q(() => /* @__PURE__ */ u("span", null, "File", -1)), P = /* @__PURE__ */ S({
5
+ import v from "../../../components/DataTable/DataTableInput.vue.js";
6
+ import E from "../../../components/DataTable/DataTableRow.vue.js";
7
+ import { ScalarButton as q, ScalarIcon as D } from "@scalar/components";
8
+ import T from "./RequestTableTooltip.vue.js";
9
+ const H = (r) => (S("data-v-2cf8458e"), r = r(), $(), r), N = { class: "text-c-2 max-w-[100%] overflow-hidden filemask flex items-end justify-end" }, z = ["onClick"], j = /* @__PURE__ */ H(() => /* @__PURE__ */ p("span", null, "File", -1)), P = /* @__PURE__ */ _({
9
10
  __name: "RequestTable",
10
11
  props: {
11
12
  items: {},
@@ -13,85 +14,78 @@ const q = (d) => ($("data-v-c04c82dd"), d = d(), x(), d), D = { class: "relative
13
14
  showUploadButton: { type: Boolean, default: !1 }
14
15
  },
15
16
  emits: ["updateRow", "toggleRow", "addRow", "deleteRow", "inputFocus", "inputBlur", "uploadFile", "removeFile"],
16
- setup(d, { emit: g }) {
17
- const k = d, o = g, h = k.isEnabledHidden ? ["", ""] : ["", "", "36px"], m = (t, n, l) => {
18
- o("updateRow", t, n, l);
19
- }, _ = (t) => {
20
- o("uploadFile", t);
21
- };
22
- return (t, n) => (s(), r(I, {
17
+ setup(r, { emit: V }) {
18
+ const k = r, l = V, y = k.isEnabledHidden ? ["", ""] : ["", "", "36px"], f = (o, n, t) => {
19
+ l("updateRow", o, n, t);
20
+ }, h = (o) => {
21
+ l("uploadFile", o);
22
+ }, g = (o) => !!(o.description || o.type || o.default || o.format);
23
+ return (o, n) => (u(), d(U, {
23
24
  class: "flex-1",
24
- columns: p(h)
25
+ columns: i(y)
25
26
  }, {
26
- default: i(() => [
27
- (s(!0), f(v, null, F(t.items, (l, a) => (s(), r(z, { key: a }, {
28
- default: i(() => [
29
- t.isEnabledHidden ? b("", !0) : (s(), r(C, {
27
+ default: s(() => [
28
+ (u(!0), b(w, null, F(o.items, (t, a) => (u(), d(E, { key: a }, {
29
+ default: s(() => [
30
+ o.isEnabledHidden ? m("", !0) : (u(), d(C, {
30
31
  key: 0,
31
- modelValue: l.enabled,
32
- "onUpdate:modelValue": (e) => o("toggleRow", a, e)
32
+ modelValue: t.enabled,
33
+ "onUpdate:modelValue": (e) => l("toggleRow", a, e)
33
34
  }, null, 8, ["modelValue", "onUpdate:modelValue"])),
34
- c(V, {
35
- modelValue: l.key,
35
+ c(v, {
36
+ modelValue: t.key,
36
37
  placeholder: "Key",
37
- required: l.required,
38
- onBlur: n[0] || (n[0] = (e) => o("inputBlur")),
39
- onFocus: n[1] || (n[1] = (e) => o("inputFocus")),
40
- onInput: (e) => t.items && a === t.items.length - 1 && o("addRow"),
41
- onSelectVariable: (e) => m(a, "key", e),
42
- "onUpdate:modelValue": (e) => o("updateRow", a, "key", e)
38
+ required: t.required,
39
+ onBlur: n[0] || (n[0] = (e) => l("inputBlur")),
40
+ onFocus: n[1] || (n[1] = (e) => l("inputFocus")),
41
+ onInput: (e) => o.items && a === o.items.length - 1 && l("addRow"),
42
+ onSelectVariable: (e) => f(a, "key", e),
43
+ "onUpdate:modelValue": (e) => l("updateRow", a, "key", e)
43
44
  }, null, 8, ["modelValue", "required", "onInput", "onSelectVariable", "onUpdate:modelValue"]),
44
- c(V, {
45
- enum: l.enum,
46
- modelValue: l.value,
45
+ c(v, {
46
+ enum: t.enum,
47
+ modelValue: t.value,
47
48
  placeholder: "Value",
48
- onBlur: n[2] || (n[2] = (e) => o("inputBlur")),
49
- onFocus: n[3] || (n[3] = (e) => o("inputFocus")),
50
- onInput: (e) => t.items && a === t.items.length - 1 && o("addRow"),
51
- onSelectVariable: (e) => m(a, "value", e),
52
- "onUpdate:modelValue": (e) => o("updateRow", a, "value", e)
53
- }, R({ _: 2 }, [
54
- l.description ? {
55
- name: "icon",
56
- fn: i(() => [
57
- u("div", D, [
58
- c(p(y), {
59
- class: "ml-1 text-c-3 group-hover/info:text-c-1",
60
- icon: "Info",
61
- size: "sm"
62
- }),
63
- u("span", H, w(l.description), 1)
64
- ])
65
- ]),
66
- key: "0"
67
- } : void 0
68
- ]), 1032, ["enum", "modelValue", "onInput", "onSelectVariable", "onUpdate:modelValue"]),
69
- t.showUploadButton ? (s(), r(U, {
49
+ onBlur: n[2] || (n[2] = (e) => l("inputBlur")),
50
+ onFocus: n[3] || (n[3] = (e) => l("inputFocus")),
51
+ onInput: (e) => o.items && a === o.items.length - 1 && l("addRow"),
52
+ onSelectVariable: (e) => f(a, "value", e),
53
+ "onUpdate:modelValue": (e) => l("updateRow", a, "value", e)
54
+ }, {
55
+ icon: s(() => [
56
+ g(t) ? (u(), d(T, {
57
+ key: 0,
58
+ item: t
59
+ }, null, 8, ["item"])) : m("", !0)
60
+ ]),
61
+ _: 2
62
+ }, 1032, ["enum", "modelValue", "onInput", "onSelectVariable", "onUpdate:modelValue"]),
63
+ o.showUploadButton ? (u(), d(I, {
70
64
  key: 1,
71
65
  class: "group/upload p-1 overflow-hidden relative text-ellipsis whitespace-nowrap"
72
66
  }, {
73
- default: i(() => {
67
+ default: s(() => {
74
68
  var e;
75
69
  return [
76
- l.file ? (s(), f(v, { key: 0 }, [
77
- u("div", N, [
78
- u("span", null, w((e = l.file) == null ? void 0 : e.name), 1)
70
+ t.file ? (u(), b(w, { key: 0 }, [
71
+ p("div", N, [
72
+ p("span", null, R((e = t.file) == null ? void 0 : e.name), 1)
79
73
  ]),
80
- u("button", {
74
+ p("button", {
81
75
  class: "absolute bg-b-2 font-medium centered-x centered-y hidden rounded text-center p-0.5 w-[calc(100%_-_8px)] group-hover/upload:block text-xs",
82
76
  type: "button",
83
- onClick: (B) => o("removeFile", a)
84
- }, " Delete ", 8, T)
85
- ], 64)) : (s(), r(p(E), {
77
+ onClick: (B) => l("removeFile", a)
78
+ }, " Delete ", 8, z)
79
+ ], 64)) : (u(), d(i(q), {
86
80
  key: 1,
87
81
  class: "bg-b-2 hover:bg-b-3 border-0 py-px text-c-2",
88
82
  size: "sm",
89
83
  variant: "outlined",
90
- onClick: (B) => _(a)
84
+ onClick: (B) => h(a)
91
85
  }, {
92
- default: i(() => [
86
+ default: s(() => [
93
87
  j,
94
- c(p(y), {
88
+ c(i(D), {
95
89
  class: "ml-1 stroke-[2.5]",
96
90
  icon: "UploadSimple",
97
91
  size: "xs"
@@ -102,7 +96,7 @@ const q = (d) => ($("data-v-c04c82dd"), d = d(), x(), d), D = { class: "relative
102
96
  ];
103
97
  }),
104
98
  _: 2
105
- }, 1024)) : b("", !0)
99
+ }, 1024)) : m("", !0)
106
100
  ]),
107
101
  _: 2
108
102
  }, 1024))), 128))
@@ -0,0 +1,17 @@
1
+ import type { RequestExampleParameter } from '@scalar/oas-utils/entities/workspace/spec';
2
+ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
3
+ item: RequestExampleParameter;
4
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
5
+ item: RequestExampleParameter;
6
+ }>>>, {}, {}>;
7
+ export default _default;
8
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
9
+ type __VLS_TypePropsToOption<T> = {
10
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
11
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
12
+ } : {
13
+ type: import('vue').PropType<T[K]>;
14
+ required: true;
15
+ };
16
+ };
17
+ //# sourceMappingURL=RequestTableTooltip.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RequestTableTooltip.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestTableTooltip.vue"],"names":[],"mappings":"AA6CA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAA;;UAI1D,uBAAuB;;UAAvB,uBAAuB;;AAiIrD,wBAMG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -0,0 +1,45 @@
1
+ import { defineComponent as c, openBlock as t, createBlock as l, unref as a, withCtx as i, createVNode as p, createElementVNode as s, createElementBlock as n, toDisplayString as o, createCommentVNode as r } from "vue";
2
+ import { ScalarTooltip as m, ScalarIcon as d } from "@scalar/components";
3
+ const f = { class: "grid gap-1.5 pointer-events-none min-w-48 w-content shadow-lg rounded bg-b-1 z-100 p-2 text-xxs leading-5 z-10 text-c-1" }, u = { class: "flex items-center text-c-2" }, g = { key: 0 }, _ = {
4
+ key: 1,
5
+ class: "before:content-['·'] before:block before:mx-[0.5ch] flex"
6
+ }, h = {
7
+ key: 2,
8
+ class: "before:content-['·'] before:block before:mx-[0.5ch] flex whitespace-pre"
9
+ }, b = { class: "leading-snug text-pretty text-sm" }, v = /* @__PURE__ */ c({
10
+ __name: "RequestTableTooltip",
11
+ props: {
12
+ item: {}
13
+ },
14
+ setup(x) {
15
+ return (e, k) => (t(), l(a(m), {
16
+ align: "start",
17
+ class: "w-64",
18
+ delay: 0,
19
+ side: "left",
20
+ triggerClass: "p-[7px]"
21
+ }, {
22
+ trigger: i(() => [
23
+ p(a(d), {
24
+ class: "ml-1 text-c-3 group-hover/info:text-c-1",
25
+ icon: "Info",
26
+ size: "sm"
27
+ })
28
+ ]),
29
+ content: i(() => [
30
+ s("div", f, [
31
+ s("div", u, [
32
+ e.item.type ? (t(), n("span", g, o(e.item.type), 1)) : r("", !0),
33
+ e.item.format ? (t(), n("span", _, o(e.item.format), 1)) : r("", !0),
34
+ e.item.default ? (t(), n("span", h, "default: " + o(e.item.default), 1)) : r("", !0)
35
+ ]),
36
+ s("span", b, o(e.item.description), 1)
37
+ ])
38
+ ]),
39
+ _: 1
40
+ }));
41
+ }
42
+ });
43
+ export {
44
+ v as default
45
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./RequestTableTooltip.vue.js";
2
+ export {
3
+ f as default
4
+ };
package/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  "rest",
19
19
  "testing"
20
20
  ],
21
- "version": "2.0.7",
21
+ "version": "2.0.8",
22
22
  "engines": {
23
23
  "node": ">=18"
24
24
  },
@@ -110,14 +110,14 @@
110
110
  "vue": "^3.4.22",
111
111
  "vue-router": "^4.3.0",
112
112
  "zod": "^3.22.4",
113
- "@scalar/components": "0.12.8",
113
+ "@scalar/components": "0.12.9",
114
+ "@scalar/oas-utils": "0.2.10",
114
115
  "@scalar/draggable": "0.1.3",
115
116
  "@scalar/object-utils": "1.1.3",
116
- "@scalar/oas-utils": "0.2.9",
117
- "@scalar/use-codemirror": "0.11.4",
118
- "@scalar/themes": "0.9.11",
119
117
  "@scalar/use-toasts": "0.7.4",
120
- "@scalar/use-tooltip": "1.0.2"
118
+ "@scalar/use-tooltip": "1.0.2",
119
+ "@scalar/use-codemirror": "0.11.4",
120
+ "@scalar/themes": "0.9.11"
121
121
  },
122
122
  "devDependencies": {
123
123
  "@types/content-type": "^1.1.8",