@scalar/api-client 2.12.0 → 2.13.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 +42 -0
- package/dist/components/CodeInput/CodeInput.vue.d.ts +1 -1
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandActionForm.vue.d.ts +2 -2
- package/dist/components/CommandPalette/CommandActionForm.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandActionForm.vue.js +14 -14
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +38 -38
- package/dist/components/EmptyState.vue.d.ts.map +1 -1
- package/dist/components/EmptyState.vue.js +2 -2
- package/dist/components/EmptyState.vue2.js +27 -16
- package/dist/components/TopNav/TopNav.vue.js +33 -33
- package/dist/layouts/App/create-api-client-app.d.ts +28 -28
- package/dist/layouts/Web/create-api-client-web.d.ts +28 -28
- package/dist/libs/create-client.d.ts +28 -28
- package/dist/libs/hot-keys.d.ts +2 -2
- package/dist/libs/send-request/create-fetch-body.d.ts +2 -2
- package/dist/store/active-entities.d.ts +2 -2
- package/dist/store/collections.d.ts +4 -4
- package/dist/store/index.d.ts +1 -1
- package/dist/store/index.d.ts.map +1 -1
- package/dist/store/index.js +8 -8
- package/dist/store/request-example.d.ts +12 -12
- package/dist/store/store.d.ts +28 -28
- package/dist/store/workspace.d.ts +12 -12
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +1 -2
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.js +9 -8
- package/dist/v2/blocks/operation-block/components/Header.vue.d.ts +1 -1
- package/dist/v2/blocks/operation-block/components/Header.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/components/Header.vue.js +3 -3
- package/dist/v2/blocks/operation-code-sample/index.d.ts.map +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 +14 -11
- package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.js +22 -22
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts +2 -2
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.js +2 -2
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue2.js +18 -15
- package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.js +2 -2
- package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue2.js +17 -17
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +2 -2
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +17 -12
- package/dist/v2/blocks/scalar-address-bar-block/index.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +205 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +52 -52
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +205 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/index.d.ts.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts +1 -2
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.js +1 -1
- package/dist/v2/features/app/App.vue.d.ts.map +1 -1
- package/dist/v2/features/app/App.vue.js +126 -103
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts +0 -2
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/AppSidebar.vue.js +1 -1
- package/dist/v2/features/app/components/AppSidebar.vue2.js +56 -53
- package/dist/v2/features/app/components/DesktopTab.vue.d.ts +26 -0
- package/dist/v2/features/app/components/DesktopTab.vue.d.ts.map +1 -0
- package/dist/v2/features/app/components/DesktopTab.vue.js +7 -0
- package/dist/v2/features/app/components/DesktopTab.vue2.js +134 -0
- package/dist/v2/features/app/components/DesktopTabs.vue.d.ts +9 -4
- package/dist/v2/features/app/components/DesktopTabs.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/DesktopTabs.vue.js +47 -13
- package/dist/v2/features/app/components/DesktopTabs.vue2.js +2 -4
- package/dist/v2/features/app/components/SplashScreen.vue.js +2 -2
- package/dist/v2/features/app/components/SplashScreen.vue2.js +2 -2
- package/dist/v2/features/app/helpers/routes.js +1 -1
- package/dist/v2/features/collection/components/Settings.vue2.js +3 -3
- package/dist/v2/features/command-palette/components/CommandActionForm.vue.d.ts +61 -0
- package/dist/v2/features/command-palette/components/CommandActionForm.vue.d.ts.map +1 -0
- package/dist/v2/features/command-palette/components/CommandActionForm.vue.js +48 -0
- package/dist/v2/features/command-palette/components/CommandActionForm.vue2.js +4 -0
- package/dist/v2/features/command-palette/components/CommandActionInput.vue.d.ts +39 -0
- package/dist/v2/features/command-palette/components/CommandActionInput.vue.d.ts.map +1 -0
- package/dist/v2/features/command-palette/components/CommandActionInput.vue.js +52 -0
- package/dist/v2/features/command-palette/components/CommandActionInput.vue2.js +4 -0
- package/dist/v2/features/command-palette/components/CommandPaletteDocument.vue.d.ts +36 -0
- package/dist/v2/features/command-palette/components/CommandPaletteDocument.vue.d.ts.map +1 -0
- package/dist/v2/features/command-palette/components/CommandPaletteDocument.vue.js +78 -0
- package/dist/v2/features/command-palette/components/CommandPaletteDocument.vue2.js +4 -0
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.d.ts +30 -0
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.d.ts.map +1 -0
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.js +169 -0
- package/dist/v2/features/command-palette/components/CommandPaletteExample.vue2.js +4 -0
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.d.ts +34 -0
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.d.ts.map +1 -0
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.js +175 -0
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue2.js +4 -0
- package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue.d.ts +43 -0
- package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue.d.ts.map +1 -0
- package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue.js +7 -0
- package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue2.js +115 -0
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.d.ts +39 -0
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.d.ts.map +1 -0
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.js +213 -0
- package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue2.js +4 -0
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.d.ts +38 -0
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.d.ts.map +1 -0
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.js +89 -0
- package/dist/v2/features/command-palette/components/CommandPaletteTag.vue2.js +4 -0
- package/dist/v2/features/command-palette/components/TheCommandPalette.vue.d.ts +41 -0
- package/dist/v2/features/command-palette/components/TheCommandPalette.vue.d.ts.map +1 -0
- package/dist/v2/features/command-palette/components/TheCommandPalette.vue.js +7 -0
- package/dist/v2/features/command-palette/components/TheCommandPalette.vue2.js +172 -0
- package/dist/v2/features/command-palette/components/WatchModeToggle.vue.d.ts +33 -0
- package/dist/v2/features/command-palette/components/WatchModeToggle.vue.d.ts.map +1 -0
- package/dist/v2/features/command-palette/components/WatchModeToggle.vue.js +40 -0
- package/dist/v2/features/command-palette/components/WatchModeToggle.vue2.js +4 -0
- package/dist/v2/features/command-palette/components/index.d.ts +2 -0
- package/dist/v2/features/command-palette/components/index.d.ts.map +1 -0
- package/dist/v2/features/command-palette/components/index.js +4 -0
- package/dist/v2/features/command-palette/helpers/get-openapi-document-details.d.ts +23 -0
- package/dist/v2/features/command-palette/helpers/get-openapi-document-details.d.ts.map +1 -0
- package/dist/v2/features/command-palette/helpers/get-openapi-document-details.js +31 -0
- package/dist/v2/features/command-palette/helpers/get-openapi-from-postman.d.ts +13 -0
- package/dist/v2/features/command-palette/helpers/get-openapi-from-postman.d.ts.map +1 -0
- package/dist/v2/features/command-palette/helpers/get-openapi-from-postman.js +12 -0
- package/dist/v2/features/command-palette/helpers/get-operation-from-curl.d.ts +26 -0
- package/dist/v2/features/command-palette/helpers/get-operation-from-curl.d.ts.map +1 -0
- package/dist/v2/features/command-palette/helpers/get-operation-from-curl.js +70 -0
- package/dist/v2/features/command-palette/helpers/get-postman-document-details.d.ts +23 -0
- package/dist/v2/features/command-palette/helpers/get-postman-document-details.d.ts.map +1 -0
- package/dist/v2/features/command-palette/helpers/get-postman-document-details.js +18 -0
- package/dist/v2/features/command-palette/helpers/is-postman-collection.d.ts +11 -0
- package/dist/v2/features/command-palette/helpers/is-postman-collection.d.ts.map +1 -0
- package/dist/v2/features/command-palette/helpers/is-postman-collection.js +11 -0
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts +202 -0
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts.map +1 -0
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.js +109 -0
- package/dist/v2/features/command-palette/types.d.ts +82 -0
- package/dist/v2/features/command-palette/types.d.ts.map +1 -0
- package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.js +24 -20
- package/dist/v2/helpers/drag-handle-factory.d.ts +1 -2
- package/dist/v2/helpers/drag-handle-factory.d.ts.map +1 -1
- package/dist/v2/helpers/drag-handle-factory.js +74 -90
- package/dist/v2/helpers/get-tab-details.d.ts +43 -0
- package/dist/v2/helpers/get-tab-details.d.ts.map +1 -0
- package/dist/v2/helpers/get-tab-details.js +34 -0
- package/dist/v2/helpers/handle-hotkeys.js +1 -1
- package/dist/v2/helpers/is-url.d.ts +2 -0
- package/dist/v2/helpers/is-url.d.ts.map +1 -0
- package/dist/v2/helpers/is-url.js +5 -0
- package/dist/v2/helpers/remove-circular.d.ts +15 -0
- package/dist/v2/helpers/remove-circular.d.ts.map +1 -0
- package/dist/v2/helpers/remove-circular.js +18 -0
- package/dist/v2/helpers/storage.d.ts +4 -6
- package/dist/v2/helpers/storage.d.ts.map +1 -1
- package/dist/v2/helpers/storage.js +8 -12
- package/dist/v2/hooks/use-sidebar-state.d.ts +12 -19
- package/dist/v2/hooks/use-sidebar-state.d.ts.map +1 -1
- package/dist/v2/hooks/use-sidebar-state.js +20 -18
- package/dist/v2/hooks/use-sync-path.d.ts +11 -0
- package/dist/v2/hooks/use-sync-path.d.ts.map +1 -0
- package/dist/v2/hooks/use-sync-path.js +51 -0
- package/dist/v2/hooks/use-tabs.d.ts +31 -0
- package/dist/v2/hooks/use-tabs.d.ts.map +1 -0
- package/dist/v2/hooks/use-tabs.js +44 -0
- package/dist/v2/hooks/use-workspace-client-events.d.ts +5 -2
- package/dist/v2/hooks/use-workspace-client-events.d.ts.map +1 -1
- package/dist/v2/hooks/use-workspace-client-events.js +91 -36
- package/dist/v2/hooks/use-workspace-selector.d.ts +16 -6
- package/dist/v2/hooks/use-workspace-selector.d.ts.map +1 -1
- package/dist/v2/hooks/use-workspace-selector.js +58 -64
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +78 -78
- package/dist/views/Request/ResponseSection/ResponseBodyStreaming.vue.js +29 -29
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue2.js +19 -19
- package/package.json +136 -46
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as A, mergeModels as k, computed as p, capitalize as D, useModel as f, createBlock as S, openBlock as m, unref as o, createSlots as
|
|
2
|
-
import { ScalarSidebarItem as
|
|
3
|
-
import { ScalarIconGlobe as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import { defineComponent as A, mergeModels as k, computed as p, capitalize as D, useModel as f, createBlock as S, openBlock as m, unref as o, createSlots as $, withCtx as i, createVNode as l, createTextVNode as u, toDisplayString as z, createElementVNode as s, normalizeClass as E, createElementBlock as M, createCommentVNode as w } from "vue";
|
|
2
|
+
import { ScalarSidebarItem as N, ScalarButton as y } from "@scalar/components";
|
|
3
|
+
import { ScalarIconGlobe as V } from "@scalar/icons";
|
|
4
|
+
import q from "../../../../assets/rabbit.ascii.js";
|
|
5
|
+
import G from "../../../../assets/rabbitjump.ascii.js";
|
|
6
6
|
import W from "../../../../components/ScalarAsciiArt.vue.js";
|
|
7
|
-
import { dragHandleFactory as
|
|
8
|
-
import
|
|
9
|
-
const
|
|
7
|
+
import { dragHandleFactory as R } from "../../../helpers/drag-handle-factory.js";
|
|
8
|
+
import j from "../../../components/sidebar/Sidebar.vue.js";
|
|
9
|
+
const H = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "empty-sidebar-item-content overflow-hidden px-2.5 py-2.5"
|
|
12
|
-
},
|
|
12
|
+
}, L = { class: "rabbit-ascii relative m-auto mt-2 h-[68px] w-[60px]" }, P = { class: "gap-1.5 p-2" }, Y = /* @__PURE__ */ A({
|
|
13
13
|
__name: "AppSidebar",
|
|
14
14
|
props: /* @__PURE__ */ k({
|
|
15
15
|
layout: {},
|
|
@@ -28,78 +28,81 @@ const j = {
|
|
|
28
28
|
},
|
|
29
29
|
sidebarWidthModifiers: {}
|
|
30
30
|
}),
|
|
31
|
-
emits: /* @__PURE__ */ k(["
|
|
32
|
-
setup(r, { emit:
|
|
33
|
-
const
|
|
34
|
-
() =>
|
|
31
|
+
emits: /* @__PURE__ */ k(["click:workspace", "selectItem", "select:workspace", "create:workspace"], ["update:isSidebarOpen", "update:sidebarWidth"]),
|
|
32
|
+
setup(r, { emit: B }) {
|
|
33
|
+
const n = B, g = p(() => D(r.activeWorkspace.name)), b = f(r, "isSidebarOpen"), c = f(r, "sidebarWidth"), d = p(() => r.sidebarState.items.value.length <= 1), v = p(
|
|
34
|
+
() => R({
|
|
35
35
|
store: r.store,
|
|
36
36
|
sidebarState: r.sidebarState
|
|
37
37
|
})
|
|
38
|
-
),
|
|
39
|
-
return (
|
|
38
|
+
), O = (t, e) => v.value.handleDragEnd(t, e), C = (t, e) => v.value.isDroppable(t, e);
|
|
39
|
+
return (t, e) => (m(), S(o(j), {
|
|
40
|
+
isSidebarOpen: b.value,
|
|
41
|
+
"onUpdate:isSidebarOpen": e[3] || (e[3] = (a) => b.value = a),
|
|
42
|
+
sidebarWidth: c.value,
|
|
43
|
+
"onUpdate:sidebarWidth": e[4] || (e[4] = (a) => c.value = a),
|
|
44
|
+
activeWorkspace: t.activeWorkspace,
|
|
45
|
+
documents: Object.values(t.store.workspace.documents),
|
|
46
|
+
eventBus: t.eventBus,
|
|
40
47
|
isDroppable: C,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
"
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
onCreateWorkspace: e[5] || (e[5] = (t) => s("create:workspace")),
|
|
52
|
-
"onSelect:workspace": e[6] || (e[6] = (t) => s("select:workspace", t)),
|
|
53
|
-
onSelectItem: e[7] || (e[7] = (t) => s("selectItem", t)),
|
|
54
|
-
onReorder: e[8] || (e[8] = (t, I) => g(t, I))
|
|
55
|
-
}, P({
|
|
56
|
-
workspaceButton: n(() => [
|
|
57
|
-
l(o(M), {
|
|
48
|
+
layout: t.layout,
|
|
49
|
+
sidebarState: t.sidebarState,
|
|
50
|
+
workspaces: t.workspaces,
|
|
51
|
+
"onCreate:workspace": e[5] || (e[5] = (a) => n("create:workspace")),
|
|
52
|
+
onReorder: e[6] || (e[6] = (a, I) => O(a, I)),
|
|
53
|
+
"onSelect:workspace": e[7] || (e[7] = (a) => n("select:workspace", a)),
|
|
54
|
+
onSelectItem: e[8] || (e[8] = (a) => n("selectItem", a))
|
|
55
|
+
}, $({
|
|
56
|
+
workspaceButton: i(() => [
|
|
57
|
+
l(o(N), {
|
|
58
58
|
is: "button",
|
|
59
|
-
active:
|
|
60
|
-
icon: o(
|
|
61
|
-
onClick: e[0] || (e[0] = (
|
|
59
|
+
active: t.isWorkspaceOpen,
|
|
60
|
+
icon: o(V),
|
|
61
|
+
onClick: e[0] || (e[0] = (a) => n("click:workspace"))
|
|
62
62
|
}, {
|
|
63
|
-
default:
|
|
64
|
-
u(
|
|
63
|
+
default: i(() => [
|
|
64
|
+
u(z(g.value), 1)
|
|
65
65
|
]),
|
|
66
66
|
_: 1
|
|
67
67
|
}, 8, ["active", "icon"])
|
|
68
68
|
]),
|
|
69
69
|
_: 2
|
|
70
70
|
}, [
|
|
71
|
-
|
|
71
|
+
t.layout !== "modal" ? {
|
|
72
72
|
name: "footer",
|
|
73
|
-
fn:
|
|
74
|
-
|
|
75
|
-
class:
|
|
73
|
+
fn: i(() => [
|
|
74
|
+
s("div", {
|
|
75
|
+
class: E({
|
|
76
76
|
"empty-sidebar-item border-t": d.value
|
|
77
77
|
})
|
|
78
78
|
}, [
|
|
79
|
-
d.value ? (m(),
|
|
80
|
-
|
|
79
|
+
d.value ? (m(), M("div", H, [
|
|
80
|
+
s("div", L, [
|
|
81
81
|
l(W, {
|
|
82
|
-
art: o(
|
|
82
|
+
art: o(q),
|
|
83
83
|
class: "rabbitsit font-bold"
|
|
84
84
|
}, null, 8, ["art"]),
|
|
85
85
|
l(W, {
|
|
86
|
-
art: o(
|
|
86
|
+
art: o(G),
|
|
87
87
|
class: "rabbitjump absolute top-0 left-0 font-bold"
|
|
88
88
|
}, null, 8, ["art"])
|
|
89
89
|
]),
|
|
90
|
-
e[9] || (e[9] =
|
|
91
|
-
|
|
92
|
-
|
|
90
|
+
e[9] || (e[9] = s("div", { class: "mt-2 mb-2 text-center text-sm text-balance" }, [
|
|
91
|
+
s("b", { class: "font-medium" }, "Let's Get Started"),
|
|
92
|
+
s("p", { class: "mt-2 leading-3" }, " Create request, folder, collection or import from OpenAPI/Postman ")
|
|
93
93
|
], -1))
|
|
94
94
|
])) : w("", !0),
|
|
95
|
-
|
|
95
|
+
s("div", P, [
|
|
96
96
|
d.value ? (m(), S(o(y), {
|
|
97
97
|
key: 0,
|
|
98
98
|
class: "w-full",
|
|
99
99
|
size: "sm",
|
|
100
|
-
onClick: e[1] || (e[1] = (
|
|
100
|
+
onClick: e[1] || (e[1] = (a) => t.eventBus.emit("ui:open:command-palette", {
|
|
101
|
+
action: "import-from-openapi-swagger-postman-curl",
|
|
102
|
+
payload: void 0
|
|
103
|
+
}))
|
|
101
104
|
}, {
|
|
102
|
-
default:
|
|
105
|
+
default: i(() => [...e[10] || (e[10] = [
|
|
103
106
|
u(" Import Collection ", -1)
|
|
104
107
|
])]),
|
|
105
108
|
_: 1
|
|
@@ -109,9 +112,9 @@ const j = {
|
|
|
109
112
|
hotkey: "K",
|
|
110
113
|
size: "sm",
|
|
111
114
|
variant: "outlined",
|
|
112
|
-
onClick: e[2] || (e[2] = (
|
|
115
|
+
onClick: e[2] || (e[2] = (a) => t.eventBus.emit("ui:open:command-palette"))
|
|
113
116
|
}, {
|
|
114
|
-
default:
|
|
117
|
+
default: i(() => [...e[11] || (e[11] = [
|
|
115
118
|
u(" Add Item ", -1)
|
|
116
119
|
])]),
|
|
117
120
|
_: 1
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Tab } from '@scalar/workspace-store/schemas/extensions/workspace';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/** Optional keyboard shortcut number for the tab */
|
|
4
|
+
hotkey?: string;
|
|
5
|
+
/** Whether this tab is currently active */
|
|
6
|
+
active: boolean;
|
|
7
|
+
/** Whether this is the only tab (changes styling to header-like appearance) */
|
|
8
|
+
isSingleTab?: boolean;
|
|
9
|
+
/** The tab data */
|
|
10
|
+
tab: Tab;
|
|
11
|
+
};
|
|
12
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
13
|
+
click: () => any;
|
|
14
|
+
close: () => any;
|
|
15
|
+
newTab: () => any;
|
|
16
|
+
copyUrl: () => any;
|
|
17
|
+
closeOtherTabs: () => any;
|
|
18
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
19
|
+
onClick?: (() => any) | undefined;
|
|
20
|
+
onClose?: (() => any) | undefined;
|
|
21
|
+
onNewTab?: (() => any) | undefined;
|
|
22
|
+
onCopyUrl?: (() => any) | undefined;
|
|
23
|
+
onCloseOtherTabs?: (() => any) | undefined;
|
|
24
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
25
|
+
export default _default;
|
|
26
|
+
//# sourceMappingURL=DesktopTab.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DesktopTab.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/app/components/DesktopTab.vue"],"names":[],"mappings":"AAwTA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,sDAAsD,CAAA;AAG/E,KAAK,WAAW,GAAG;IACjB,oDAAoD;IACpD,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,2CAA2C;IAC3C,MAAM,EAAE,OAAO,CAAA;IACf,+EAA+E;IAC/E,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,mBAAmB;IACnB,GAAG,EAAE,GAAG,CAAA;CACT,CAAC;;;;;;;;;;;;;;AAmXF,wBAOG"}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { defineComponent as I, computed as d, createBlock as i, openBlock as l, unref as t, withCtx as a, createVNode as n, createElementBlock as k, createCommentVNode as u, createTextVNode as m, resolveDynamicComponent as s, Fragment as D, createElementVNode as b, normalizeClass as f, toDisplayString as $ } from "vue";
|
|
2
|
+
import { ScalarContextMenu as B, ScalarFloating as N, ScalarDropdownMenu as O, ScalarDropdownButton as p, ScalarHotkey as v, ScalarDropdownDivider as U, ScalarTooltip as V } from "@scalar/components";
|
|
3
|
+
import { isMacOS as q } from "@scalar/helpers/general/is-mac-os";
|
|
4
|
+
import { ScalarIconPlusSquare as F, ScalarIconLinkSimple as M, ScalarIconXSquare as E, ScalarIconTabs as L, ScalarIconFolderSimple as P, ScalarIconArrowUpRight as R, ScalarIconX as X } from "@scalar/icons";
|
|
5
|
+
const K = /* @__PURE__ */ I({
|
|
6
|
+
__name: "DesktopTab",
|
|
7
|
+
props: {
|
|
8
|
+
hotkey: {},
|
|
9
|
+
active: { type: Boolean },
|
|
10
|
+
isSingleTab: { type: Boolean, default: !1 },
|
|
11
|
+
tab: {}
|
|
12
|
+
},
|
|
13
|
+
emits: ["click", "close", "newTab", "copyUrl", "closeOtherTabs"],
|
|
14
|
+
setup(g, { emit: y }) {
|
|
15
|
+
const r = y, S = {
|
|
16
|
+
request: R,
|
|
17
|
+
document: P
|
|
18
|
+
}, T = d(() => q() ? "⌘" : "^"), C = d(
|
|
19
|
+
() => g.hotkey ? `${T.value} ${g.hotkey}` : ""
|
|
20
|
+
), w = (o) => {
|
|
21
|
+
o.stopPropagation(), r("close");
|
|
22
|
+
};
|
|
23
|
+
return (o, e) => (l(), i(t(B), { triggerClass: `overflow-hidden w-full flex-1 select-none
|
|
24
|
+
` }, {
|
|
25
|
+
trigger: a(() => [
|
|
26
|
+
(l(), i(s(o.isSingleTab ? "div" : t(V)), {
|
|
27
|
+
content: C.value,
|
|
28
|
+
placement: "bottom"
|
|
29
|
+
}, {
|
|
30
|
+
default: a(() => [
|
|
31
|
+
b("div", {
|
|
32
|
+
class: f(["app-no-drag-region", [
|
|
33
|
+
o.isSingleTab ? "nav-single-tab" : "nav-item",
|
|
34
|
+
{ "nav-item__active": o.active && !o.isSingleTab }
|
|
35
|
+
]]),
|
|
36
|
+
onClick: e[0] || (e[0] = (c) => !o.isSingleTab && r("click"))
|
|
37
|
+
}, [
|
|
38
|
+
b("div", {
|
|
39
|
+
class: f([
|
|
40
|
+
"flex items-center justify-center gap-1.5",
|
|
41
|
+
o.isSingleTab ? "custom-scroll h-full w-full whitespace-nowrap" : "nav-item-icon-copy flex-1"
|
|
42
|
+
])
|
|
43
|
+
}, [
|
|
44
|
+
o.tab.icon && S[o.tab.icon] ? (l(), i(s(S[o.tab.icon]), { key: 0 })) : u("", !0),
|
|
45
|
+
b("span", {
|
|
46
|
+
class: f([
|
|
47
|
+
o.isSingleTab ? "" : "custom-scroll nav-item-copy",
|
|
48
|
+
"text-sm"
|
|
49
|
+
])
|
|
50
|
+
}, $(o.tab.title), 3)
|
|
51
|
+
], 2),
|
|
52
|
+
o.isSingleTab ? u("", !0) : (l(), k("button", {
|
|
53
|
+
key: 0,
|
|
54
|
+
class: "nav-item-close",
|
|
55
|
+
type: "button",
|
|
56
|
+
onClick: w
|
|
57
|
+
}, [
|
|
58
|
+
(l(), i(s(t(X))))
|
|
59
|
+
]))
|
|
60
|
+
], 2)
|
|
61
|
+
]),
|
|
62
|
+
_: 1
|
|
63
|
+
}, 8, ["content"]))
|
|
64
|
+
]),
|
|
65
|
+
content: a(() => [
|
|
66
|
+
n(t(N), { placement: "right-start" }, {
|
|
67
|
+
floating: a(() => [
|
|
68
|
+
n(t(O), { class: "scalar-app scalar-client" }, {
|
|
69
|
+
default: a(() => [
|
|
70
|
+
n(t(p), {
|
|
71
|
+
class: "flex items-center gap-1.5",
|
|
72
|
+
onClick: e[1] || (e[1] = (c) => r("newTab"))
|
|
73
|
+
}, {
|
|
74
|
+
default: a(() => [
|
|
75
|
+
(l(), i(s(t(F)))),
|
|
76
|
+
e[5] || (e[5] = m(" New Tab ", -1)),
|
|
77
|
+
n(t(v), {
|
|
78
|
+
class: "bg-b-2 ml-auto",
|
|
79
|
+
hotkey: "T"
|
|
80
|
+
})
|
|
81
|
+
]),
|
|
82
|
+
_: 1
|
|
83
|
+
}),
|
|
84
|
+
n(t(p), {
|
|
85
|
+
class: "flex items-center gap-1.5",
|
|
86
|
+
onClick: e[2] || (e[2] = (c) => r("copyUrl"))
|
|
87
|
+
}, {
|
|
88
|
+
default: a(() => [
|
|
89
|
+
(l(), i(s(t(M)))),
|
|
90
|
+
e[6] || (e[6] = m(" Copy URL ", -1))
|
|
91
|
+
]),
|
|
92
|
+
_: 1
|
|
93
|
+
}),
|
|
94
|
+
o.isSingleTab ? u("", !0) : (l(), k(D, { key: 0 }, [
|
|
95
|
+
n(t(U)),
|
|
96
|
+
n(t(p), {
|
|
97
|
+
class: "flex items-center gap-1.5",
|
|
98
|
+
onClick: e[3] || (e[3] = (c) => r("close"))
|
|
99
|
+
}, {
|
|
100
|
+
default: a(() => [
|
|
101
|
+
(l(), i(s(t(E)))),
|
|
102
|
+
e[7] || (e[7] = m(" Close Tab ", -1)),
|
|
103
|
+
n(t(v), {
|
|
104
|
+
class: "bg-b-2 ml-auto",
|
|
105
|
+
hotkey: "W"
|
|
106
|
+
})
|
|
107
|
+
]),
|
|
108
|
+
_: 1
|
|
109
|
+
}),
|
|
110
|
+
n(t(p), {
|
|
111
|
+
class: "flex items-center gap-1.5",
|
|
112
|
+
onClick: e[4] || (e[4] = (c) => r("closeOtherTabs"))
|
|
113
|
+
}, {
|
|
114
|
+
default: a(() => [
|
|
115
|
+
(l(), i(s(t(L)))),
|
|
116
|
+
e[8] || (e[8] = m(" Close Other Tabs ", -1))
|
|
117
|
+
]),
|
|
118
|
+
_: 1
|
|
119
|
+
})
|
|
120
|
+
], 64))
|
|
121
|
+
]),
|
|
122
|
+
_: 1
|
|
123
|
+
})
|
|
124
|
+
]),
|
|
125
|
+
_: 1
|
|
126
|
+
})
|
|
127
|
+
]),
|
|
128
|
+
_: 1
|
|
129
|
+
}));
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
export {
|
|
133
|
+
K as default
|
|
134
|
+
};
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
2
|
+
import type { UseTabsReturn } from '../../../../v2/hooks/use-tabs.js';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
/** Tabs state */
|
|
5
|
+
tabsState: UseTabsReturn;
|
|
6
|
+
/** Workspace event bus for emitting tab-related events */
|
|
7
|
+
eventBus: WorkspaceEventBus;
|
|
8
|
+
};
|
|
9
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
5
10
|
export default _default;
|
|
6
11
|
//# sourceMappingURL=DesktopTabs.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DesktopTabs.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/app/components/DesktopTabs.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DesktopTabs.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/app/components/DesktopTabs.vue"],"names":[],"mappings":"AAoEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAIvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAExD,KAAK,WAAW,GAAG;IACjB,iBAAiB;IACjB,SAAS,EAAE,aAAa,CAAA;IACxB,0DAA0D;IAC1D,QAAQ,EAAE,iBAAiB,CAAA;CAC5B,CAAC;;AA6IF,wBAMG"}
|
|
@@ -1,15 +1,49 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { defineComponent as v, computed as m, createElementBlock as c, openBlock as n, createElementVNode as h, Fragment as d, renderList as T, createBlock as p, createVNode as k, unref as C } from "vue";
|
|
2
|
+
import { ScalarIcon as g } from "@scalar/components";
|
|
3
|
+
import S from "./DesktopTab.vue.js";
|
|
4
|
+
const f = { class: "flex h-10 items-center gap-2 px-2" }, O = /* @__PURE__ */ v({
|
|
5
|
+
__name: "DesktopTabs",
|
|
6
|
+
props: {
|
|
7
|
+
tabsState: {},
|
|
8
|
+
eventBus: {}
|
|
9
|
+
},
|
|
10
|
+
setup(a) {
|
|
11
|
+
const s = m(() => a.tabsState.tabs.value.length === 1), l = () => {
|
|
12
|
+
a.eventBus.emit("tabs:add:tab", void 0);
|
|
13
|
+
}, b = (e) => {
|
|
14
|
+
a.eventBus.emit("tabs:focus:tab", { index: e });
|
|
15
|
+
}, r = (e) => {
|
|
16
|
+
a.eventBus.emit("tabs:close:tab", { index: e });
|
|
17
|
+
}, i = (e) => {
|
|
18
|
+
a.eventBus.emit("tabs:close:other-tabs", { index: e });
|
|
19
|
+
};
|
|
20
|
+
return (e, B) => (n(), c("nav", f, [
|
|
21
|
+
(n(!0), c(d, null, T(e.tabsState.tabs.value, (u, t) => (n(), p(S, {
|
|
22
|
+
key: t,
|
|
23
|
+
active: t === e.tabsState.activeTabIndex.value,
|
|
24
|
+
hotkey: !s.value && t < 9 ? String(t + 1) : void 0,
|
|
25
|
+
isSingleTab: s.value,
|
|
26
|
+
tab: u,
|
|
27
|
+
onClick: (o) => b(t),
|
|
28
|
+
onClose: (o) => r(t),
|
|
29
|
+
onCloseOtherTabs: (o) => i(t),
|
|
30
|
+
onCopyUrl: (o) => e.tabsState.copyTabUrl(t),
|
|
31
|
+
onNewTab: l
|
|
32
|
+
}, null, 8, ["active", "hotkey", "isSingleTab", "tab", "onClick", "onClose", "onCloseOtherTabs", "onCopyUrl"]))), 128)),
|
|
33
|
+
h("button", {
|
|
34
|
+
class: "text-c-3 hover:bg-b-3 app-no-drag-region rounded p-1.5",
|
|
35
|
+
type: "button",
|
|
36
|
+
onClick: l
|
|
37
|
+
}, [
|
|
38
|
+
k(C(g), {
|
|
39
|
+
icon: "Add",
|
|
40
|
+
size: "sm",
|
|
41
|
+
thickness: "2.5"
|
|
42
|
+
})
|
|
43
|
+
])
|
|
44
|
+
]));
|
|
45
|
+
}
|
|
46
|
+
});
|
|
13
47
|
export {
|
|
14
|
-
|
|
48
|
+
O as default
|
|
15
49
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./SplashScreen.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-af32615f"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -6,8 +6,8 @@ const a = { class: "splash-screen bg-b-1 fixed inset-0 z-50 flex items-center ju
|
|
|
6
6
|
return (_, f) => (c(), t("div", a, [
|
|
7
7
|
o("div", l, [
|
|
8
8
|
n(s(r), {
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
class: "logo-icon text-c-1 h-16 w-16",
|
|
10
|
+
icon: "Logo"
|
|
11
11
|
})
|
|
12
12
|
])
|
|
13
13
|
]));
|
|
@@ -96,7 +96,7 @@ const o = [
|
|
|
96
96
|
},
|
|
97
97
|
{
|
|
98
98
|
path: "/:pathMatch(.*)*",
|
|
99
|
-
redirect: () =>
|
|
99
|
+
redirect: () => e.getLastPath() ?? "/workspace/default/document/drafts/overview"
|
|
100
100
|
}
|
|
101
101
|
];
|
|
102
102
|
export {
|
|
@@ -37,12 +37,12 @@ const y = /* @__PURE__ */ u({
|
|
|
37
37
|
return (e, k) => e.collectionType === "document" ? (a(), t(r(p), {
|
|
38
38
|
key: 0,
|
|
39
39
|
documentUrl: e.document?.["x-scalar-original-source-url"],
|
|
40
|
+
isDraftDocument: e.documentSlug === "drafts",
|
|
40
41
|
title: e.document?.info.title ?? "",
|
|
41
42
|
watchMode: e.document?.["x-scalar-watch-mode"] ?? !0,
|
|
42
43
|
"onDelete:document": s,
|
|
43
|
-
"onUpdate:watchMode": c
|
|
44
|
-
|
|
45
|
-
}, null, 8, ["documentUrl", "title", "watchMode", "isDraftDocument"])) : (a(), t(r(h), {
|
|
44
|
+
"onUpdate:watchMode": c
|
|
45
|
+
}, null, 8, ["documentUrl", "isDraftDocument", "title", "watchMode"])) : (a(), t(r(h), {
|
|
46
46
|
key: 1,
|
|
47
47
|
activeProxyUrl: e.workspaceStore.workspace["x-scalar-active-proxy"],
|
|
48
48
|
activeThemeId: e.workspaceStore.workspace["x-scalar-theme"] ?? "default",
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { type LoadingState } from '@scalar/components';
|
|
2
|
+
/**
|
|
3
|
+
* Command Action Form Component
|
|
4
|
+
*
|
|
5
|
+
* A reusable form wrapper for command palette actions.
|
|
6
|
+
* Provides a consistent layout with a main content area, optional controls,
|
|
7
|
+
* and a submit button. Prevents form submission when disabled.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* <CommandActionForm
|
|
11
|
+
* :loader
|
|
12
|
+
* :disabled="isDisabled"
|
|
13
|
+
* @submit="handleSubmit"
|
|
14
|
+
* @cancel="handleCancel"
|
|
15
|
+
* @back="handleBack"
|
|
16
|
+
* >
|
|
17
|
+
* <!-- Main content goes in default slot -->
|
|
18
|
+
* <CommandActionInput v-model="value" />
|
|
19
|
+
*
|
|
20
|
+
* <!-- Optional controls in options slot -->
|
|
21
|
+
* <template #options>
|
|
22
|
+
* <ScalarCheckbox v-model="option" />
|
|
23
|
+
* </template>
|
|
24
|
+
*
|
|
25
|
+
* <!-- Custom submit button text -->
|
|
26
|
+
* <template #submit>Create</template>
|
|
27
|
+
* </CommandActionForm>
|
|
28
|
+
*/
|
|
29
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
30
|
+
/** Loading state from useLoadingState composable to show spinner on submit button */
|
|
31
|
+
loader?: LoadingState;
|
|
32
|
+
/** Whether the form and submit button are disabled */
|
|
33
|
+
disabled?: boolean;
|
|
34
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
35
|
+
submit: () => any;
|
|
36
|
+
cancel: () => any;
|
|
37
|
+
back: (e: KeyboardEvent) => any;
|
|
38
|
+
}, string, import("vue").PublicProps, Readonly<{
|
|
39
|
+
/** Loading state from useLoadingState composable to show spinner on submit button */
|
|
40
|
+
loader?: LoadingState;
|
|
41
|
+
/** Whether the form and submit button are disabled */
|
|
42
|
+
disabled?: boolean;
|
|
43
|
+
}> & Readonly<{
|
|
44
|
+
onSubmit?: (() => any) | undefined;
|
|
45
|
+
onCancel?: (() => any) | undefined;
|
|
46
|
+
onBack?: ((e: KeyboardEvent) => any) | undefined;
|
|
47
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
48
|
+
/** Main content area for form inputs */
|
|
49
|
+
default(): void;
|
|
50
|
+
/** Optional controls displayed before the submit button (e.g., checkboxes, toggles, dropdowns) */
|
|
51
|
+
options(): void;
|
|
52
|
+
/** Custom text or content for the submit button (defaults to "Continue") */
|
|
53
|
+
submit(): void;
|
|
54
|
+
}>;
|
|
55
|
+
export default _default;
|
|
56
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
57
|
+
new (): {
|
|
58
|
+
$slots: S;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
//# sourceMappingURL=CommandActionForm.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CommandActionForm.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/command-palette/components/CommandActionForm.vue"],"names":[],"mappings":"AAqGA,OAAO,EAA2B,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAG/E;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;;IAGD,qFAAqF;aAC5E,YAAY;IACrB,sDAAsD;eAC3C,OAAO;;;;;;IAHlB,qFAAqF;aAC5E,YAAY;IACrB,sDAAsD;eAC3C,OAAO;;;;;;IAelB,wCAAwC;eAC7B,IAAI;IACf,kGAAkG;eACvF,IAAI;IACf,4EAA4E;cAClE,IAAI;;AAzBhB,wBAmIC;AAOD,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { defineComponent as f, createElementBlock as u, openBlock as p, withModifiers as l, withKeys as c, createElementVNode as o, normalizeProps as x, guardReactiveProps as b, unref as a, renderSlot as s, createVNode as h, withCtx as v, createTextVNode as w } from "vue";
|
|
2
|
+
import { useBindCx as B, ScalarButton as C } from "@scalar/components";
|
|
3
|
+
const y = { class: "flex gap-2" }, S = { class: "flex max-h-8 flex-1" }, _ = {
|
|
4
|
+
name: "CommandActionForm"
|
|
5
|
+
}, N = /* @__PURE__ */ f({
|
|
6
|
+
..._,
|
|
7
|
+
props: {
|
|
8
|
+
loader: {},
|
|
9
|
+
disabled: { type: Boolean, default: !1 }
|
|
10
|
+
},
|
|
11
|
+
emits: ["submit", "cancel", "back"],
|
|
12
|
+
setup(d, { emit: i }) {
|
|
13
|
+
const n = i, { cx: r } = B(), m = () => {
|
|
14
|
+
d.disabled || n("submit");
|
|
15
|
+
};
|
|
16
|
+
return (e, t) => (p(), u("form", {
|
|
17
|
+
class: "flex w-full flex-col gap-3",
|
|
18
|
+
onKeydown: t[0] || (t[0] = c(l(() => {
|
|
19
|
+
}, ["stop"]), ["enter"])),
|
|
20
|
+
onSubmit: l(m, ["prevent", "stop"])
|
|
21
|
+
}, [
|
|
22
|
+
o("div", x(b(a(r)("relative flex min-h-20 flex-col rounded"))), [
|
|
23
|
+
s(e.$slots, "default")
|
|
24
|
+
], 16),
|
|
25
|
+
o("div", y, [
|
|
26
|
+
o("div", S, [
|
|
27
|
+
s(e.$slots, "options")
|
|
28
|
+
]),
|
|
29
|
+
h(a(C), {
|
|
30
|
+
class: "max-h-8 px-3 text-xs",
|
|
31
|
+
disabled: e.disabled,
|
|
32
|
+
loader: e.loader,
|
|
33
|
+
type: "submit"
|
|
34
|
+
}, {
|
|
35
|
+
default: v(() => [
|
|
36
|
+
s(e.$slots, "submit", {}, () => [
|
|
37
|
+
t[1] || (t[1] = w("Continue", -1))
|
|
38
|
+
])
|
|
39
|
+
]),
|
|
40
|
+
_: 3
|
|
41
|
+
}, 8, ["disabled", "loader"])
|
|
42
|
+
])
|
|
43
|
+
], 32));
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
export {
|
|
47
|
+
N as default
|
|
48
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Command Action Input Component
|
|
3
|
+
*
|
|
4
|
+
* A textarea input component for command palette actions.
|
|
5
|
+
* Supports v-model binding, auto-focus, and special keyboard handling:
|
|
6
|
+
* - Enter submits the parent form (unless Shift is held)
|
|
7
|
+
* - Backspace emits delete event when input is empty (for navigation back)
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* <CommandActionInput
|
|
11
|
+
* v-model="inputValue"
|
|
12
|
+
* placeholder="Enter name..."
|
|
13
|
+
* :autofocus="true"
|
|
14
|
+
* @delete="handleBack"
|
|
15
|
+
* />
|
|
16
|
+
*/
|
|
17
|
+
declare const _default: import("vue").DefineComponent<{
|
|
18
|
+
/** Current value of the input */
|
|
19
|
+
modelValue?: string;
|
|
20
|
+
/** Placeholder text shown when input is empty */
|
|
21
|
+
placeholder?: string;
|
|
22
|
+
/** Whether to automatically focus the input when mounted */
|
|
23
|
+
autofocus?: boolean;
|
|
24
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
25
|
+
delete: (keyboardEvent: KeyboardEvent) => any;
|
|
26
|
+
"update:modelValue": (value: string) => any;
|
|
27
|
+
}, string, import("vue").PublicProps, Readonly<{
|
|
28
|
+
/** Current value of the input */
|
|
29
|
+
modelValue?: string;
|
|
30
|
+
/** Placeholder text shown when input is empty */
|
|
31
|
+
placeholder?: string;
|
|
32
|
+
/** Whether to automatically focus the input when mounted */
|
|
33
|
+
autofocus?: boolean;
|
|
34
|
+
}> & Readonly<{
|
|
35
|
+
onDelete?: ((keyboardEvent: KeyboardEvent) => any) | undefined;
|
|
36
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
37
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
38
|
+
export default _default;
|
|
39
|
+
//# sourceMappingURL=CommandActionInput.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CommandActionInput.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/command-palette/components/CommandActionInput.vue"],"names":[],"mappings":"AAsHA;;;;;;;;;;;;;;;GAeG;;IAGD,iCAAiC;iBACpB,MAAM;IACnB,iDAAiD;kBACnC,MAAM;IACpB,4DAA4D;gBAChD,OAAO;;;;;IALnB,iCAAiC;iBACpB,MAAM;IACnB,iDAAiD;kBACnC,MAAM;IACpB,4DAA4D;gBAChD,OAAO;;;;;AAPrB,wBAmJC"}
|