@scalar/api-client 2.12.0 → 2.14.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 +66 -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/helpers/oauth.d.ts +2 -2
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js +90 -75
- 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 +84 -99
- 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 +36 -30
- 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/dist/views/Request/libs/oauth2.d.ts +2 -2
- package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
- package/dist/views/Request/libs/oauth2.js +66 -53
- package/package.json +134 -44
|
@@ -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"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { defineComponent as c, ref as p, computed as m, onMounted as f, nextTick as h, withDirectives as b, createElementBlock as g, openBlock as v, mergeProps as w, withKeys as u, vModelText as y } from "vue";
|
|
2
|
+
const x = ["placeholder"], E = {
|
|
3
|
+
name: "CommandActionInput"
|
|
4
|
+
}, _ = /* @__PURE__ */ c({
|
|
5
|
+
...E,
|
|
6
|
+
inheritAttrs: !1,
|
|
7
|
+
props: {
|
|
8
|
+
modelValue: {},
|
|
9
|
+
placeholder: {},
|
|
10
|
+
autofocus: { type: Boolean, default: !0 }
|
|
11
|
+
},
|
|
12
|
+
emits: ["update:modelValue", "delete"],
|
|
13
|
+
setup(l, { emit: s }) {
|
|
14
|
+
const a = s, r = p(null), o = m({
|
|
15
|
+
get: () => l.modelValue ?? "",
|
|
16
|
+
set: (e) => a("update:modelValue", e)
|
|
17
|
+
});
|
|
18
|
+
f(() => {
|
|
19
|
+
h(() => {
|
|
20
|
+
l.autofocus && r.value?.focus();
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
const d = (e) => {
|
|
24
|
+
if (e.shiftKey || !e.target)
|
|
25
|
+
return;
|
|
26
|
+
e.preventDefault();
|
|
27
|
+
const t = e.target, n = new Event("submit", { cancelable: !0 });
|
|
28
|
+
t.form?.dispatchEvent(n);
|
|
29
|
+
}, i = (e) => {
|
|
30
|
+
o.value === "" && (e.preventDefault(), e.stopPropagation(), a("delete", e));
|
|
31
|
+
};
|
|
32
|
+
return (e, t) => b((v(), g("textarea", w({
|
|
33
|
+
id: "command-action-input",
|
|
34
|
+
ref_key: "input",
|
|
35
|
+
ref: r,
|
|
36
|
+
"onUpdate:modelValue": t[0] || (t[0] = (n) => o.value = n),
|
|
37
|
+
class: "min-h-8 w-full flex-1 resize-none border border-transparent py-1.5 pl-8.5 text-sm outline-none focus:border-b-1",
|
|
38
|
+
placeholder: e.placeholder ?? "",
|
|
39
|
+
wrap: "hard"
|
|
40
|
+
}, e.$attrs, {
|
|
41
|
+
onKeydown: [
|
|
42
|
+
u(i, ["delete"]),
|
|
43
|
+
u(d, ["enter"])
|
|
44
|
+
]
|
|
45
|
+
}), null, 16, x)), [
|
|
46
|
+
[y, o.value]
|
|
47
|
+
]);
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
export {
|
|
51
|
+
_ as default
|
|
52
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { WorkspaceStore } from '@scalar/workspace-store/client';
|
|
2
|
+
import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
3
|
+
/**
|
|
4
|
+
* Command Palette Document Component
|
|
5
|
+
*
|
|
6
|
+
* Provides a form for creating a new empty document in the workspace.
|
|
7
|
+
* Users can name the document and select an icon before creation.
|
|
8
|
+
* Validates that the name is not empty and not already in use.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* <CommandPaletteDocument
|
|
12
|
+
* :workspaceStore="workspaceStore"
|
|
13
|
+
* :eventBus="eventBus"
|
|
14
|
+
* @close="handleClose"
|
|
15
|
+
* @back="handleBack"
|
|
16
|
+
* />
|
|
17
|
+
*/
|
|
18
|
+
declare const _default: import("vue").DefineComponent<{
|
|
19
|
+
/** The workspace store for accessing existing documents */
|
|
20
|
+
workspaceStore: WorkspaceStore;
|
|
21
|
+
/** Event bus for emitting document creation events */
|
|
22
|
+
eventBus: WorkspaceEventBus;
|
|
23
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
24
|
+
close: () => any;
|
|
25
|
+
back: (keyboardEvent: KeyboardEvent) => any;
|
|
26
|
+
}, string, import("vue").PublicProps, Readonly<{
|
|
27
|
+
/** The workspace store for accessing existing documents */
|
|
28
|
+
workspaceStore: WorkspaceStore;
|
|
29
|
+
/** Event bus for emitting document creation events */
|
|
30
|
+
eventBus: WorkspaceEventBus;
|
|
31
|
+
}> & Readonly<{
|
|
32
|
+
onClose?: (() => any) | undefined;
|
|
33
|
+
onBack?: ((keyboardEvent: KeyboardEvent) => any) | undefined;
|
|
34
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
35
|
+
export default _default;
|
|
36
|
+
//# sourceMappingURL=CommandPaletteDocument.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CommandPaletteDocument.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/command-palette/components/CommandPaletteDocument.vue"],"names":[],"mappings":"AAuIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAUvE;;;;;;;;;;;;;;GAcG;;IAGD,2DAA2D;oBAC3C,cAAc;IAC9B,sDAAsD;cAC5C,iBAAiB;;;;;IAH3B,2DAA2D;oBAC3C,cAAc;IAC9B,sDAAsD;cAC5C,iBAAiB;;;;;AAL7B,wBA8MC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { defineComponent as k, ref as i, computed as d, createBlock as V, openBlock as x, withCtx as t, createVNode as n, createTextVNode as B, unref as f } from "vue";
|
|
2
|
+
import { ScalarButton as D } from "@scalar/components";
|
|
3
|
+
import { LibraryIcon as N } from "@scalar/icons/library";
|
|
4
|
+
import { useRouter as S } from "vue-router";
|
|
5
|
+
import w from "../../../../components/IconSelector.vue.js";
|
|
6
|
+
import C from "./CommandActionForm.vue.js";
|
|
7
|
+
import $ from "./CommandActionInput.vue.js";
|
|
8
|
+
const y = {}, L = /* @__PURE__ */ k({
|
|
9
|
+
...y,
|
|
10
|
+
__name: "CommandPaletteDocument",
|
|
11
|
+
props: {
|
|
12
|
+
workspaceStore: {},
|
|
13
|
+
eventBus: {}
|
|
14
|
+
},
|
|
15
|
+
emits: ["close", "back"],
|
|
16
|
+
setup(l, { emit: p }) {
|
|
17
|
+
const c = p, v = S(), m = i(""), o = d(() => m.value.trim()), a = i("interface-content-folder"), s = d(() => !o.value || l.workspaceStore.workspace.documents[o.value] !== void 0), b = () => {
|
|
18
|
+
s.value || (l.eventBus.emit("document:create:empty-document", {
|
|
19
|
+
name: o.value,
|
|
20
|
+
icon: a.value,
|
|
21
|
+
callback: (u) => {
|
|
22
|
+
u && v.push({
|
|
23
|
+
name: "document.overview",
|
|
24
|
+
params: {
|
|
25
|
+
documentSlug: o.value
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}), c("close"));
|
|
30
|
+
}, _ = (u) => {
|
|
31
|
+
c("back", u);
|
|
32
|
+
};
|
|
33
|
+
return (u, e) => (x(), V(C, {
|
|
34
|
+
disabled: s.value,
|
|
35
|
+
onSubmit: b
|
|
36
|
+
}, {
|
|
37
|
+
options: t(() => [
|
|
38
|
+
n(w, {
|
|
39
|
+
modelValue: a.value,
|
|
40
|
+
"onUpdate:modelValue": e[1] || (e[1] = (r) => a.value = r),
|
|
41
|
+
placement: "bottom-start"
|
|
42
|
+
}, {
|
|
43
|
+
default: t(() => [
|
|
44
|
+
n(f(D), {
|
|
45
|
+
class: "aspect-square h-auto px-0",
|
|
46
|
+
variant: "outlined"
|
|
47
|
+
}, {
|
|
48
|
+
default: t(() => [
|
|
49
|
+
n(f(N), {
|
|
50
|
+
class: "text-c-2 size-4 stroke-[1.75]",
|
|
51
|
+
src: a.value
|
|
52
|
+
}, null, 8, ["src"])
|
|
53
|
+
]),
|
|
54
|
+
_: 1
|
|
55
|
+
})
|
|
56
|
+
]),
|
|
57
|
+
_: 1
|
|
58
|
+
}, 8, ["modelValue"])
|
|
59
|
+
]),
|
|
60
|
+
submit: t(() => [...e[2] || (e[2] = [
|
|
61
|
+
B("Create Document", -1)
|
|
62
|
+
])]),
|
|
63
|
+
default: t(() => [
|
|
64
|
+
n($, {
|
|
65
|
+
modelValue: m.value,
|
|
66
|
+
"onUpdate:modelValue": e[0] || (e[0] = (r) => m.value = r),
|
|
67
|
+
label: "Document Name",
|
|
68
|
+
placeholder: "Document Name",
|
|
69
|
+
onDelete: _
|
|
70
|
+
}, null, 8, ["modelValue"])
|
|
71
|
+
]),
|
|
72
|
+
_: 1
|
|
73
|
+
}, 8, ["disabled"]));
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
export {
|
|
77
|
+
L as default
|
|
78
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { WorkspaceStore } from '@scalar/workspace-store/client';
|
|
2
|
+
/**
|
|
3
|
+
* Command Palette Example Component
|
|
4
|
+
*
|
|
5
|
+
* Provides a form for creating a new example for an API operation.
|
|
6
|
+
* Users can name the example, select a document (collection), and choose an operation.
|
|
7
|
+
* Automatically navigates to the example route which creates the example.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* <CommandPaletteExample
|
|
11
|
+
* :workspaceStore="workspaceStore"
|
|
12
|
+
* @close="handleClose"
|
|
13
|
+
* @back="handleBack"
|
|
14
|
+
* />
|
|
15
|
+
*/
|
|
16
|
+
declare const _default: import("vue").DefineComponent<{
|
|
17
|
+
/** The workspace store for accessing documents and operations */
|
|
18
|
+
workspaceStore: WorkspaceStore;
|
|
19
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
20
|
+
close: () => any;
|
|
21
|
+
back: (keyboardEvent: KeyboardEvent) => any;
|
|
22
|
+
}, string, import("vue").PublicProps, Readonly<{
|
|
23
|
+
/** The workspace store for accessing documents and operations */
|
|
24
|
+
workspaceStore: WorkspaceStore;
|
|
25
|
+
}> & Readonly<{
|
|
26
|
+
onClose?: (() => any) | undefined;
|
|
27
|
+
onBack?: ((keyboardEvent: KeyboardEvent) => any) | undefined;
|
|
28
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
29
|
+
export default _default;
|
|
30
|
+
//# sourceMappingURL=CommandPaletteExample.vue.d.ts.map
|