@scalar/api-client 2.25.0 → 2.26.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 +39 -0
- package/dist/components/DataTable/DataTableCheckbox.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableCheckbox.vue.js +8 -8
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-body.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-body.js +28 -19
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.js +1 -1
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue2.js +1 -1
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.js +18 -18
- package/dist/v2/blocks/request-block/helpers/get-default-headers.js +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue.js +2 -2
- package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue2.js +19 -19
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +26 -26
- package/dist/v2/components/callout/Callout.vue.d.ts +17 -0
- package/dist/v2/components/callout/Callout.vue.d.ts.map +1 -0
- package/dist/v2/components/callout/Callout.vue.js +7 -0
- package/dist/v2/components/callout/Callout.vue2.js +43 -0
- package/dist/v2/components/data-table/DataTableCheckbox.vue.d.ts.map +1 -1
- package/dist/v2/components/data-table/DataTableCheckbox.vue.js +8 -8
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.js +40 -41
- package/dist/v2/features/app/App.vue.d.ts +2 -2
- package/dist/v2/features/app/App.vue.d.ts.map +1 -1
- package/dist/v2/features/app/App.vue.js +84 -89
- package/dist/v2/features/app/app-events.d.ts +1 -1
- package/dist/v2/features/app/app-events.d.ts.map +1 -1
- package/dist/v2/features/app/app-events.js +10 -10
- package/dist/v2/features/app/app-state.d.ts +36 -87
- package/dist/v2/features/app/app-state.d.ts.map +1 -1
- package/dist/v2/features/app/app-state.js +339 -330
- package/dist/v2/features/app/components/DesktopTabs.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/DesktopTabs.vue.js +1 -1
- package/dist/v2/features/app/helpers/create-api-client-app.d.ts +2 -2
- package/dist/v2/features/app/helpers/create-api-client-app.d.ts.map +1 -1
- package/dist/v2/features/app/helpers/create-api-client-app.js +9 -9
- package/dist/v2/features/app/helpers/get-route-param.d.ts +7 -0
- package/dist/v2/features/app/helpers/get-route-param.d.ts.map +1 -0
- package/dist/v2/features/app/helpers/get-route-param.js +9 -0
- package/dist/v2/features/app/index.d.ts +1 -1
- package/dist/v2/features/app/index.d.ts.map +1 -1
- package/dist/v2/features/app/index.js +12 -12
- package/dist/v2/features/collection/DocumentCollection.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/DocumentCollection.vue.js +72 -65
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.d.ts +29 -2
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.d.ts.map +1 -1
- package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.js +110 -106
- package/dist/v2/features/command-palette/helpers/load-document-from-source.d.ts +5 -1
- package/dist/v2/features/command-palette/helpers/load-document-from-source.d.ts.map +1 -1
- package/dist/v2/features/command-palette/helpers/load-document-from-source.js +41 -23
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts +41 -8
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts.map +1 -1
- package/dist/v2/features/command-palette/index.d.ts +1 -2
- package/dist/v2/features/command-palette/index.d.ts.map +1 -1
- package/dist/v2/features/command-palette/index.js +4 -6
- package/dist/v2/features/operation/Operation.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue2.js +24 -23
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/package.json +9 -9
- package/dist/v2/features/app/components/WebTopNav.vue.d.ts +0 -41
- package/dist/v2/features/app/components/WebTopNav.vue.d.ts.map +0 -1
- package/dist/v2/features/app/components/WebTopNav.vue.js +0 -27
- package/dist/v2/features/app/components/WebTopNav.vue2.js +0 -4
|
@@ -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":"AA2EA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,oEAAoE,CAAA;AAK7F,KAAK,WAAW,GAAG;IACjB,iBAAiB;IACjB,IAAI,EAAE,GAAG,EAAE,CAAA;IACX,+BAA+B;IAC/B,cAAc,EAAE,MAAM,CAAA;IACtB,0DAA0D;IAC1D,QAAQ,EAAE,iBAAiB,CAAA;CAC5B,CAAC;;AAmJF,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as v, computed as d, createElementBlock as l, openBlock as n, createElementVNode as h, Fragment as T, renderList as p, createBlock as C, createVNode as k, unref as g } from "vue";
|
|
2
2
|
import { ScalarIcon as f } from "@scalar/components";
|
|
3
3
|
import B from "./DesktopTab.vue.js";
|
|
4
|
-
const y = { class: "mac:pl-[72px] t-app__top-nav flex h-10 items-center gap-2 px-2" }, U = /* @__PURE__ */ v({
|
|
4
|
+
const y = { class: "mac:pl-[72px] t-app__top-nav z-1 flex h-10 items-center gap-2 px-2" }, U = /* @__PURE__ */ v({
|
|
5
5
|
__name: "DesktopTabs",
|
|
6
6
|
props: {
|
|
7
7
|
tabs: {},
|
|
@@ -20,9 +20,9 @@ export declare const createAppRouter: (layout: CreateApiClientOptions["layout"])
|
|
|
20
20
|
/**
|
|
21
21
|
* Create the API Client with router and passes in the workspace store as a prop
|
|
22
22
|
*/
|
|
23
|
-
export declare const createApiClientApp: (el: HTMLElement | null, { layout, plugins }: CreateApiClientOptions) => {
|
|
23
|
+
export declare const createApiClientApp: (el: HTMLElement | null, { layout, plugins }: CreateApiClientOptions) => Promise<{
|
|
24
24
|
app: import("vue").App<Element>;
|
|
25
25
|
state: import("../../../../v2/features/app/app-state.js").AppState;
|
|
26
|
-
} | undefined
|
|
26
|
+
} | undefined>;
|
|
27
27
|
export {};
|
|
28
28
|
//# sourceMappingURL=create-api-client-app.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-api-client-app.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/app/helpers/create-api-client-app.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAIrD,KAAK,sBAAsB,GAAG;IAC5B;;;;;OAKG;IACH,MAAM,EAAE,OAAO,CAAC,YAAY,EAAE,OAAO,CAAC,CAAA;IACtC;;OAEG;IACH,OAAO,CAAC,EAAE,YAAY,EAAE,CAAA;CACzB,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,eAAe,GAAI,QAAQ,sBAAsB,CAAC,QAAQ,CAAC,gCAQvE,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"create-api-client-app.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/app/helpers/create-api-client-app.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAIrD,KAAK,sBAAsB,GAAG;IAC5B;;;;;OAKG;IACH,MAAM,EAAE,OAAO,CAAC,YAAY,EAAE,OAAO,CAAC,CAAA;IACtC;;OAEG;IACH,OAAO,CAAC,EAAE,YAAY,EAAE,CAAA;CACzB,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,eAAe,GAAI,QAAQ,sBAAsB,CAAC,QAAQ,CAAC,gCAQvE,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAC7B,IAAI,WAAW,GAAG,IAAI,EACtB,qBAAiC,sBAAsB;;;cAgCxD,CAAA"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { createApp as
|
|
2
|
-
import { createRouter as p, createWebHistory as
|
|
3
|
-
import
|
|
1
|
+
import { createApp as n } from "vue";
|
|
2
|
+
import { createRouter as p, createWebHistory as s, createWebHashHistory as l } from "vue-router";
|
|
3
|
+
import u from "../App.vue.js";
|
|
4
4
|
/* empty css */
|
|
5
|
-
import {
|
|
6
|
-
import { ROUTES as
|
|
5
|
+
import { createAppState as d } from "../app-state.js";
|
|
6
|
+
import { ROUTES as c } from "./routes.js";
|
|
7
7
|
import { useCommandPaletteState as f } from "../../command-palette/hooks/use-command-palette-state.js";
|
|
8
|
-
const A = (t) => t === "web" ? p({ history:
|
|
9
|
-
const o = A(r), a = d(o),
|
|
8
|
+
const A = (t) => t === "web" ? p({ history: s(), routes: c }) : p({ history: l(), routes: c }), P = async (t, { layout: r = "desktop", plugins: i }) => {
|
|
9
|
+
const o = A(r), a = await d({ router: o }), m = f(), e = n(u, {
|
|
10
10
|
layout: r,
|
|
11
11
|
plugins: i,
|
|
12
12
|
getAppState: () => a,
|
|
13
|
-
getCommandPaletteState: () =>
|
|
13
|
+
getCommandPaletteState: () => m
|
|
14
14
|
});
|
|
15
15
|
if (e.use(o), !t) {
|
|
16
16
|
console.error(
|
|
@@ -26,6 +26,6 @@ const A = (t) => t === "web" ? p({ history: n(), routes: m }) : p({ history: u()
|
|
|
26
26
|
};
|
|
27
27
|
};
|
|
28
28
|
export {
|
|
29
|
-
|
|
29
|
+
P as createApiClientApp,
|
|
30
30
|
A as createAppRouter
|
|
31
31
|
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { HttpMethod } from '@scalar/helpers/http/http-methods';
|
|
2
|
+
import type { RouteLocationNormalizedGeneric } from 'vue-router';
|
|
3
|
+
import type { ScalarClientAppRouteParams } from '../../../../v2/features/app/helpers/routes.js';
|
|
4
|
+
/** Extracts a string parameter from the route */
|
|
5
|
+
export declare function getRouteParam(paramName: 'method', route: RouteLocationNormalizedGeneric | null): HttpMethod | undefined;
|
|
6
|
+
export declare function getRouteParam(paramName: Exclude<ScalarClientAppRouteParams, 'method'>, route: RouteLocationNormalizedGeneric | null): string | undefined;
|
|
7
|
+
//# sourceMappingURL=get-route-param.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-route-param.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/app/helpers/get-route-param.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAEnE,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,YAAY,CAAA;AAEhE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAA;AAElF,iDAAiD;AACjD,wBAAgB,aAAa,CAAC,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,8BAA8B,GAAG,IAAI,GAAG,UAAU,GAAG,SAAS,CAAA;AACxH,wBAAgB,aAAa,CAC3B,SAAS,EAAE,OAAO,CAAC,0BAA0B,EAAE,QAAQ,CAAC,EACxD,KAAK,EAAE,8BAA8B,GAAG,IAAI,GAC3C,MAAM,GAAG,SAAS,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { type AppState,
|
|
1
|
+
export { type AppState, createAppState } from '../../../v2/features/app/app-state.js';
|
|
2
2
|
export { default as CreateWorkspaceModal } from '../../../v2/features/app/components/CreateWorkspaceModal.vue.js';
|
|
3
3
|
export { default as CommandActionForm } from '../../../v2/features/command-palette/components/CommandActionForm.vue.js';
|
|
4
4
|
export { default as CommandActionInput } from '../../../v2/features/command-palette/components/CommandActionInput.vue.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/app/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/app/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAC3E,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,uDAAuD,CAAA;AACvG,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,gEAAgE,CAAA;AAC7G,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,iEAAiE,CAAA;AAC/G,YAAY,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACxD,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,iBAAiB,EACjB,UAAU,EACV,sBAAsB,GACvB,MAAM,oDAAoD,CAAA;AAC3D,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,WAAW,CAAA;AAChD,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAA"}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createAppState as a } from "./app-state.js";
|
|
2
2
|
import { default as p } from "./components/CreateWorkspaceModal.vue.js";
|
|
3
3
|
import { default as f } from "../command-palette/components/CommandActionForm.vue.js";
|
|
4
|
-
import { default as
|
|
5
|
-
import { baseClientActions as
|
|
6
|
-
import { default as
|
|
4
|
+
import { default as s } from "../command-palette/components/CommandActionInput.vue.js";
|
|
5
|
+
import { baseClientActions as d, baseRoutes as i, useCommandPaletteState as u } from "../command-palette/hooks/use-command-palette-state.js";
|
|
6
|
+
import { default as c } from "./App.vue.js";
|
|
7
7
|
/* empty css */
|
|
8
|
-
import { createApiClientApp as
|
|
8
|
+
import { createApiClientApp as C, createAppRouter as b } from "./helpers/create-api-client-app.js";
|
|
9
9
|
export {
|
|
10
|
-
|
|
10
|
+
c as ClientApp,
|
|
11
11
|
f as CommandActionForm,
|
|
12
|
-
|
|
12
|
+
s as CommandActionInput,
|
|
13
13
|
p as CreateWorkspaceModal,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
d as baseClientActions,
|
|
15
|
+
i as baseRoutes,
|
|
16
|
+
C as createApiClientApp,
|
|
17
17
|
b as createAppRouter,
|
|
18
|
-
a as
|
|
19
|
-
|
|
18
|
+
a as createAppState,
|
|
19
|
+
u as useCommandPaletteState
|
|
20
20
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocumentCollection.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/collection/DocumentCollection.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DocumentCollection.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/collection/DocumentCollection.vue"],"names":[],"mappings":"AAwJA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAA;AAMlE;;;;;;;GAOG;;AACH,wBA6VC"}
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { LibraryIcon as
|
|
5
|
-
import { RouterView as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
|
|
1
|
+
import { defineComponent as y, computed as p, createElementBlock as c, openBlock as u, createElementVNode as t, createVNode as o, createBlock as f, createCommentVNode as g, withCtx as l, unref as s, resolveDynamicComponent as h, mergeProps as k } from "vue";
|
|
2
|
+
import { ScalarButton as i } from "@scalar/components";
|
|
3
|
+
import { ScalarIconFloppyDisk as b } from "@scalar/icons";
|
|
4
|
+
import { LibraryIcon as w } from "@scalar/icons/library";
|
|
5
|
+
import { RouterView as _ } from "vue-router";
|
|
6
|
+
import C from "../../../components/IconSelector.vue.js";
|
|
7
|
+
import S from "../../components/callout/Callout.vue.js";
|
|
8
|
+
import V from "./components/LabelInput.vue.js";
|
|
9
|
+
import B from "./components/Tabs.vue.js";
|
|
10
|
+
const D = { class: "custom-scroll h-full" }, N = {
|
|
10
11
|
key: 0,
|
|
11
12
|
class: "w-full md:mx-auto md:max-w-[720px]"
|
|
12
|
-
},
|
|
13
|
+
}, z = ["aria-label"], I = { class: "flex flex-row items-center gap-2" }, U = { class: "group relative ml-1.25" }, $ = { class: "px-1.5 py-8" }, j = {
|
|
13
14
|
key: 1,
|
|
14
15
|
class: "flex w-full flex-1 items-center justify-center"
|
|
15
|
-
},
|
|
16
|
+
}, E = {
|
|
16
17
|
name: "DocumentCollection"
|
|
17
|
-
},
|
|
18
|
-
...
|
|
18
|
+
}, H = /* @__PURE__ */ y({
|
|
19
|
+
...E,
|
|
19
20
|
props: {
|
|
20
21
|
documentSlug: {},
|
|
21
22
|
document: {},
|
|
@@ -31,66 +32,72 @@ const I = { class: "custom-scroll h-full" }, N = {
|
|
|
31
32
|
plugins: {}
|
|
32
33
|
},
|
|
33
34
|
setup(a) {
|
|
34
|
-
const n = a,
|
|
35
|
+
const n = a, m = p(() => n.document?.info?.title || "Untitled Document"), d = p(
|
|
35
36
|
() => n.document?.["x-scalar-icon"] || "interface-content-folder"
|
|
36
|
-
),
|
|
37
|
+
), x = () => {
|
|
37
38
|
n.workspaceStore.revertDocumentChanges(n.documentSlug);
|
|
38
|
-
},
|
|
39
|
+
}, v = () => {
|
|
39
40
|
n.workspaceStore.saveDocument(n.documentSlug);
|
|
40
41
|
};
|
|
41
|
-
return (
|
|
42
|
-
a.document ? (u(),
|
|
42
|
+
return (L, e) => (u(), c("div", D, [
|
|
43
|
+
a.document ? (u(), c("div", N, [
|
|
43
44
|
t("div", {
|
|
44
|
-
"aria-label": `title: ${
|
|
45
|
+
"aria-label": `title: ${m.value}`,
|
|
45
46
|
class: "mx-auto flex h-fit w-full flex-col gap-2 pt-6 pb-3 md:mx-auto md:max-w-[720px]"
|
|
46
47
|
}, [
|
|
47
|
-
a.document["x-scalar-is-dirty"] ? (u(),
|
|
48
|
+
a.document?.["x-scalar-is-dirty"] ? (u(), f(S, {
|
|
48
49
|
key: 0,
|
|
49
|
-
|
|
50
|
+
class: "mb-5",
|
|
51
|
+
type: "warning"
|
|
50
52
|
}, {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
53
|
+
actions: l(() => [
|
|
54
|
+
o(s(i), {
|
|
55
|
+
class: "text-c-2 hover:text-c-1 flex items-center gap-2",
|
|
56
|
+
size: "xs",
|
|
57
|
+
type: "button",
|
|
58
|
+
variant: "outlined",
|
|
59
|
+
onClick: x
|
|
60
|
+
}, {
|
|
61
|
+
default: l(() => [...e[2] || (e[2] = [
|
|
62
|
+
t("span", null, "Undo", -1)
|
|
63
|
+
])]),
|
|
64
|
+
_: 1
|
|
65
|
+
}),
|
|
66
|
+
o(s(i), {
|
|
67
|
+
class: "text-c-btn flex items-center gap-2",
|
|
68
|
+
size: "xs",
|
|
69
|
+
type: "button",
|
|
70
|
+
variant: "solid",
|
|
71
|
+
onClick: v
|
|
72
|
+
}, {
|
|
73
|
+
default: l(() => [
|
|
74
|
+
o(s(b), {
|
|
75
|
+
size: "sm",
|
|
76
|
+
thickness: "1.5"
|
|
77
|
+
}),
|
|
78
|
+
e[3] || (e[3] = t("span", null, "Save", -1))
|
|
79
|
+
]),
|
|
80
|
+
_: 1
|
|
81
|
+
})
|
|
82
|
+
]),
|
|
83
|
+
default: l(() => [
|
|
84
|
+
e[4] || (e[4] = t("p", null, " You have unsaved changes. Save your work to keep your changes, or undo to revert them. ", -1))
|
|
78
85
|
]),
|
|
79
86
|
_: 1
|
|
80
|
-
})) :
|
|
81
|
-
t("div",
|
|
82
|
-
o(
|
|
87
|
+
})) : g("", !0),
|
|
88
|
+
t("div", I, [
|
|
89
|
+
o(C, {
|
|
83
90
|
modelValue: d.value,
|
|
84
91
|
placement: "bottom-start",
|
|
85
92
|
"onUpdate:modelValue": e[0] || (e[0] = (r) => a.eventBus.emit("document:update:icon", r))
|
|
86
93
|
}, {
|
|
87
|
-
default:
|
|
88
|
-
o(
|
|
94
|
+
default: l(() => [
|
|
95
|
+
o(s(i), {
|
|
89
96
|
class: "hover:bg-b-2 aspect-square h-7 w-7 cursor-pointer rounded border border-transparent p-0 hover:border-inherit",
|
|
90
97
|
variant: "ghost"
|
|
91
98
|
}, {
|
|
92
|
-
default:
|
|
93
|
-
o(
|
|
99
|
+
default: l(() => [
|
|
100
|
+
o(s(w), {
|
|
94
101
|
class: "text-c-2 size-5",
|
|
95
102
|
src: d.value,
|
|
96
103
|
"stroke-width": "2"
|
|
@@ -102,25 +109,25 @@ const I = { class: "custom-scroll h-full" }, N = {
|
|
|
102
109
|
_: 1
|
|
103
110
|
}, 8, ["modelValue"])
|
|
104
111
|
]),
|
|
105
|
-
t("div",
|
|
106
|
-
o(
|
|
112
|
+
t("div", U, [
|
|
113
|
+
o(V, {
|
|
107
114
|
class: "text-xl font-bold",
|
|
108
115
|
inputId: "documentName",
|
|
109
|
-
modelValue:
|
|
116
|
+
modelValue: m.value,
|
|
110
117
|
"onUpdate:modelValue": e[1] || (e[1] = (r) => a.eventBus.emit("document:update:info", { title: r }))
|
|
111
118
|
}, null, 8, ["modelValue"])
|
|
112
119
|
])
|
|
113
|
-
], 8,
|
|
114
|
-
o(
|
|
120
|
+
], 8, z),
|
|
121
|
+
o(B, { type: "document" }),
|
|
115
122
|
t("div", $, [
|
|
116
|
-
o(
|
|
117
|
-
default:
|
|
118
|
-
(u(),
|
|
123
|
+
o(s(_), null, {
|
|
124
|
+
default: l(({ Component: r }) => [
|
|
125
|
+
(u(), f(h(r), k(n, { collectionType: "document" }), null, 16))
|
|
119
126
|
]),
|
|
120
127
|
_: 1
|
|
121
128
|
})
|
|
122
129
|
])
|
|
123
|
-
])) : (u(),
|
|
130
|
+
])) : (u(), c("div", j, [...e[5] || (e[5] = [
|
|
124
131
|
t("div", { class: "flex h-full flex-col items-center justify-center" }, [
|
|
125
132
|
t("h1", { class: "text-2xl font-bold" }, "Document not found"),
|
|
126
133
|
t("p", { class: "text-gray-500" }, " The document you are looking for does not exist. ")
|
|
@@ -130,5 +137,5 @@ const I = { class: "custom-scroll h-full" }, N = {
|
|
|
130
137
|
}
|
|
131
138
|
});
|
|
132
139
|
export {
|
|
133
|
-
|
|
140
|
+
H as default
|
|
134
141
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { LoaderPlugin } from '@scalar/json-magic/bundle';
|
|
1
2
|
import { type WorkspaceStore } from '@scalar/workspace-store/client';
|
|
2
3
|
import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
3
4
|
/**
|
|
@@ -17,12 +18,25 @@ import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
|
17
18
|
* @back="handleBack"
|
|
18
19
|
* @open-command="handleOpenCommand"
|
|
19
20
|
* />
|
|
21
|
+
*
|
|
22
|
+
* @example Custom file upload button
|
|
23
|
+
* <CommandPaletteImport
|
|
24
|
+
* :workspaceStore="workspaceStore"
|
|
25
|
+
* @close="handleClose">
|
|
26
|
+
* <template #fileUpload="{ import: importDocument }">
|
|
27
|
+
* <button @click="() => importDocument(source, 'file')">
|
|
28
|
+
* Custom Upload
|
|
29
|
+
* </button>
|
|
30
|
+
* </template>
|
|
31
|
+
* </CommandPaletteImport>
|
|
20
32
|
*/
|
|
21
|
-
declare const _default: import("vue").DefineComponent<{
|
|
33
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
22
34
|
/** The workspace store for adding documents */
|
|
23
35
|
workspaceStore: WorkspaceStore;
|
|
24
36
|
/** Event bus for emitting operation creation events */
|
|
25
37
|
eventBus: WorkspaceEventBus;
|
|
38
|
+
/** Loader plugin for file import */
|
|
39
|
+
fileLoader?: LoaderPlugin;
|
|
26
40
|
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
27
41
|
close: () => any;
|
|
28
42
|
back: (keyboardEvent: KeyboardEvent) => any;
|
|
@@ -31,9 +45,22 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
31
45
|
workspaceStore: WorkspaceStore;
|
|
32
46
|
/** Event bus for emitting operation creation events */
|
|
33
47
|
eventBus: WorkspaceEventBus;
|
|
48
|
+
/** Loader plugin for file import */
|
|
49
|
+
fileLoader?: LoaderPlugin;
|
|
34
50
|
}> & Readonly<{
|
|
35
51
|
onClose?: (() => any) | undefined;
|
|
36
52
|
onBack?: ((keyboardEvent: KeyboardEvent) => any) | undefined;
|
|
37
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any
|
|
53
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
54
|
+
/** Slot for custom file upload component that can trigger import */
|
|
55
|
+
fileUpload(props: {
|
|
56
|
+
/** Function to trigger import with source content and type */
|
|
57
|
+
import: (source: string, type: "file" | "raw") => Promise<void>;
|
|
58
|
+
}): void;
|
|
59
|
+
}>;
|
|
38
60
|
export default _default;
|
|
61
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
62
|
+
new (): {
|
|
63
|
+
$slots: S;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
39
66
|
//# sourceMappingURL=CommandPaletteImport.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandPaletteImport.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/command-palette/components/CommandPaletteImport.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CommandPaletteImport.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/command-palette/components/CommandPaletteImport.vue"],"names":[],"mappings":"AAyXA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAE7D,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,gCAAgC,CAAA;AACvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAoBvE;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;;IAGD,+CAA+C;oBAC/B,cAAc;IAC9B,uDAAuD;cAC7C,iBAAiB;IAC3B,oCAAoC;iBACvB,YAAY;;;;;IALzB,+CAA+C;oBAC/B,cAAc;IAC9B,uDAAuD;cAC7C,iBAAiB;IAC3B,oCAAoC;iBACvB,YAAY;;;;;IAazB,oEAAoE;sBAClD;QAChB,8DAA8D;QAC9D,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,KAAK,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;KAChE,GAAG,IAAI;;AAxBV,wBA2eC;AAOD,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|