@scalar/api-client 2.21.0 → 2.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/CHANGELOG.md +54 -0
  2. package/dist/components/OpenApiClientButton.vue.d.ts.map +1 -1
  3. package/dist/components/OpenApiClientButton.vue.js +2 -2
  4. package/dist/components/OpenApiClientButton.vue2.js +1 -1
  5. package/dist/hooks/useClientConfig.d.ts +9 -0
  6. package/dist/hooks/useClientConfig.d.ts.map +1 -1
  7. package/dist/layouts/App/create-api-client-app.d.ts +2 -2
  8. package/dist/layouts/Web/create-api-client-web.d.ts +2 -2
  9. package/dist/libs/create-client.d.ts +2 -2
  10. package/dist/store/request-example.d.ts +2 -2
  11. package/dist/store/store.d.ts +2 -2
  12. package/dist/style.css +1 -1
  13. package/dist/v2/blocks/operation-block/helpers/get-example.d.ts +2 -2
  14. package/dist/v2/blocks/operation-block/helpers/get-example.d.ts.map +1 -1
  15. package/dist/v2/blocks/operation-block/helpers/get-example.js +29 -22
  16. package/dist/v2/blocks/operation-block/index.d.ts +1 -0
  17. package/dist/v2/blocks/operation-block/index.d.ts.map +1 -1
  18. package/dist/v2/blocks/operation-block/index.js +2 -0
  19. package/dist/v2/blocks/request-block/helpers/get-default-headers.js +1 -1
  20. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +2 -2
  21. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +4 -4
  22. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +3 -2
  23. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts.map +1 -1
  24. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.js +96 -78
  25. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue3.js +5 -0
  26. package/dist/v2/features/app/App.vue.d.ts +3 -0
  27. package/dist/v2/features/app/App.vue.d.ts.map +1 -1
  28. package/dist/v2/features/app/App.vue.js +43 -42
  29. package/dist/v2/features/app/app-events.d.ts +1 -3
  30. package/dist/v2/features/app/app-events.d.ts.map +1 -1
  31. package/dist/v2/features/app/app-events.js +37 -43
  32. package/dist/v2/features/app/app-state.d.ts +0 -2
  33. package/dist/v2/features/app/app-state.d.ts.map +1 -1
  34. package/dist/v2/features/app/app-state.js +87 -90
  35. package/dist/v2/features/app/helpers/create-api-client-app.d.ts.map +1 -1
  36. package/dist/v2/features/app/helpers/create-api-client-app.js +14 -8
  37. package/dist/v2/features/app/index.d.ts +1 -0
  38. package/dist/v2/features/app/index.d.ts.map +1 -1
  39. package/dist/v2/features/app/index.js +11 -7
  40. package/dist/v2/features/command-palette/{components/TheCommandPalette.vue.d.ts → TheCommandPalette.vue.d.ts} +3 -3
  41. package/dist/v2/features/command-palette/TheCommandPalette.vue.d.ts.map +1 -0
  42. package/dist/v2/features/command-palette/TheCommandPalette.vue.js +7 -0
  43. package/dist/v2/features/command-palette/TheCommandPalette.vue2.js +152 -0
  44. package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.d.ts +9 -2
  45. package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.d.ts.map +1 -1
  46. package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.js +61 -55
  47. package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue.d.ts +2 -2
  48. package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue.d.ts.map +1 -1
  49. package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue.js +1 -1
  50. package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue2.js +26 -26
  51. package/dist/v2/features/command-palette/helpers/get-operation-from-curl.d.ts.map +1 -1
  52. package/dist/v2/features/command-palette/helpers/get-operation-from-curl.js +30 -24
  53. package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts +240 -151
  54. package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts.map +1 -1
  55. package/dist/v2/features/command-palette/hooks/use-command-palette-state.js +114 -102
  56. package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
  57. package/dist/v2/features/modal/Modal.vue.js +2 -2
  58. package/dist/v2/features/modal/Modal.vue2.js +17 -15
  59. package/dist/v2/features/operation/Operation.vue.js +1 -1
  60. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +2 -2
  61. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
  62. package/package.json +17 -22
  63. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue2.js +0 -4
  64. package/dist/v2/features/command-palette/components/TheCommandPalette.vue.d.ts.map +0 -1
  65. package/dist/v2/features/command-palette/components/TheCommandPalette.vue.js +0 -7
  66. package/dist/v2/features/command-palette/components/TheCommandPalette.vue2.js +0 -172
  67. package/dist/v2/features/command-palette/components/index.d.ts +0 -2
  68. package/dist/v2/features/command-palette/components/index.d.ts.map +0 -1
  69. package/dist/v2/features/command-palette/components/index.js +0 -4
  70. package/dist/v2/features/command-palette/types.d.ts +0 -83
  71. package/dist/v2/features/command-palette/types.d.ts.map +0 -1
@@ -1,31 +1,31 @@
1
1
  import { parseCurlCommand as f } from "../../../../libs/parse-curl.js";
2
- const b = (t) => {
2
+ const b = (e) => {
3
3
  try {
4
- return JSON.parse(t);
4
+ return JSON.parse(e);
5
5
  } catch {
6
- const e = {};
7
- return t.split("&").forEach((r) => {
6
+ const t = {};
7
+ return e.split("&").forEach((r) => {
8
8
  const [n, o] = r.split("=");
9
- n && o && (e[decodeURIComponent(n)] = decodeURIComponent(o));
10
- }), e;
9
+ n && o && (t[decodeURIComponent(n)] = decodeURIComponent(o));
10
+ }), t;
11
11
  }
12
- }, j = (t, e) => {
13
- if (e["Content-Type"])
14
- return e["Content-Type"];
15
- const r = t.trim();
16
- return r.startsWith("{") || r.startsWith("[") ? "application/json" : t.includes("=") && !r.startsWith("{") ? "application/x-www-form-urlencoded" : "";
17
- }, a = (t) => {
18
- const e = typeof t;
19
- return e === "string" ? "string" : e === "number" ? "number" : e === "boolean" ? "boolean" : t === null ? "null" : Array.isArray(t) ? "array" : e === "object" ? "object" : "string";
20
- }, C = (t, e, r) => {
21
- const n = Array.isArray(t) ? t.map(({ key: c, value: s }) => ({
12
+ }, j = (e, t) => {
13
+ if (t["Content-Type"])
14
+ return t["Content-Type"];
15
+ const r = e.trim();
16
+ return r.startsWith("{") || r.startsWith("[") ? "application/json" : e.includes("=") && !r.startsWith("{") ? "application/x-www-form-urlencoded" : "";
17
+ }, a = (e) => {
18
+ const t = typeof e;
19
+ return t === "string" ? "string" : t === "number" ? "number" : t === "boolean" ? "boolean" : e === null ? "null" : Array.isArray(e) ? "array" : t === "object" ? "object" : "string";
20
+ }, C = (e, t, r) => {
21
+ const n = Array.isArray(e) ? e.map(({ key: c, value: s }) => ({
22
22
  name: c,
23
23
  in: "query",
24
24
  schema: { type: a(s) },
25
25
  examples: {
26
26
  [r]: { value: s }
27
27
  }
28
- })) : [], o = Object.entries(e || {}).map(([c, s]) => ({
28
+ })) : [], o = Object.entries(t || {}).map(([c, s]) => ({
29
29
  name: c,
30
30
  in: "header",
31
31
  schema: { type: a(s) },
@@ -34,13 +34,19 @@ const b = (t) => {
34
34
  }
35
35
  }));
36
36
  return [...n, ...o];
37
- }, g = (t) => ({
37
+ }, g = (e) => ({
38
38
  type: "object",
39
39
  properties: Object.fromEntries(
40
- Object.entries(t).map(([r, n]) => [r, { type: a(n) }])
40
+ Object.entries(e).map(([r, n]) => [r, { type: a(n) }])
41
41
  )
42
- }), O = (t, e = "curl") => {
43
- const r = f(t), { method: n = "get", url: o, body: c = "", headers: s = {}, servers: u = [], queryParameters: d = [] } = r, y = new URL(o).pathname, i = j(c, s), p = c ? b(c) : {}, l = C(d, s, e), m = u.map((h) => ({
42
+ }), q = (e) => {
43
+ try {
44
+ return new URL(e).pathname;
45
+ } catch {
46
+ return "/";
47
+ }
48
+ }, T = (e, t = "curl") => {
49
+ const r = f(e), { method: n = "get", url: o, body: c = "", headers: s = {}, servers: u = [], queryParameters: d = [] } = r, y = q(o), i = j(c, s), p = c ? b(c) : {}, l = C(d, s, t), m = u.map((h) => ({
44
50
  url: h
45
51
  }));
46
52
  return {
@@ -53,12 +59,12 @@ const b = (t) => {
53
59
  [i]: {
54
60
  schema: g(p),
55
61
  examples: {
56
- [e]: { value: p }
62
+ [t]: { value: p }
57
63
  }
58
64
  }
59
65
  },
60
66
  "x-scalar-selected-content-type": {
61
- [e]: i
67
+ [t]: i
62
68
  }
63
69
  },
64
70
  servers: m.length ? m : void 0
@@ -66,5 +72,5 @@ const b = (t) => {
66
72
  };
67
73
  };
68
74
  export {
69
- O as getOperationFromCurl
75
+ T as getOperationFromCurl
70
76
  };
@@ -1,150 +1,15 @@
1
- import type { Icon as IconType } from '@scalar/components';
2
- import { type ComputedRef, type Ref } from 'vue';
1
+ import type { ScalarIconComponent } from '@scalar/icons/types';
2
+ import type { CommandPalettePayload } from '@scalar/workspace-store/events';
3
+ import { type Component, type ComputedRef, type Ref, type ShallowRef } from 'vue';
3
4
  import type { RouteLocationRaw } from 'vue-router';
4
- /** Base properties shared by all command types (internal) */
5
- type CommandBase = {
6
- /** Unique identifier for the command */
7
- id: string;
8
- /** Display name shown in the command palette */
9
- name: string;
10
- };
11
- type FolderCommand = CommandBase & {
12
- type: 'folder';
13
- icon: IconType;
14
- /** Props for the command */
15
- props?: Record<string, unknown>;
16
- };
17
- type HiddenFolderCommand = CommandBase & {
18
- type: 'hidden-folder';
19
- /** Props for the command */
20
- props?: Record<string, unknown>;
21
- };
22
- type RouteCommand = CommandBase & {
23
- type: 'route';
24
- to: RouteLocationRaw;
25
- icon: IconType;
26
- };
27
- /**
28
- * Represents a single command in the command palette.
29
- * Commands can be folders (open sub-actions), routes (navigate), or hidden folders.
30
- */
31
- export type Command = FolderCommand | RouteCommand | HiddenFolderCommand;
32
- /**
33
- * A group of related commands with a label.
34
- * Used to organize commands into categories in the palette.
35
- */
36
- type CommandGroup = {
37
- /** Label for the command group (empty string for unlabeled groups) */
38
- label: string;
39
- /** List of commands in this group */
40
- commands: Command[];
41
- };
42
5
  /**
43
- * Available commands in the command palette.
44
- * Organized into groups for better UX and discoverability.
45
- */
46
- declare const commands: [{
47
- readonly label: "";
48
- readonly commands: [{
49
- readonly type: "folder";
50
- readonly id: "import-from-openapi-swagger-postman-curl";
51
- readonly name: "Import from OpenAPI/Swagger/Postman/cURL";
52
- readonly icon: "Import";
53
- }, {
54
- readonly type: "folder";
55
- readonly id: "create-document";
56
- readonly name: "Create Document";
57
- readonly icon: "Collection";
58
- }, {
59
- readonly type: "folder";
60
- readonly id: "add-tag";
61
- readonly name: "Add Tag";
62
- readonly icon: "Folder";
63
- readonly props: {
64
- /** Document id to add the tag to */
65
- documentId?: string;
66
- };
67
- }, {
68
- readonly type: "folder";
69
- readonly id: "create-request";
70
- readonly name: "Create Request";
71
- readonly icon: "ExternalLink";
72
- readonly props: {
73
- /** The id of the document to create the request in */
74
- documentId?: string;
75
- /** Tag id to add the request to (optional) */
76
- tagId?: string;
77
- };
78
- }, {
79
- readonly type: "folder";
80
- readonly id: "add-example";
81
- readonly name: "Add Example";
82
- readonly icon: "Example";
83
- readonly props: {
84
- /** Document id to add the example to */
85
- documentId?: string;
86
- /** Operation id to add the example to */
87
- operationId?: string;
88
- };
89
- }, {
90
- readonly type: "hidden-folder";
91
- readonly id: "import-curl-command";
92
- readonly name: "Import cURL Command";
93
- readonly props: {
94
- curl: string;
95
- };
96
- }];
97
- }, {
98
- readonly label: "Pages";
99
- readonly commands: [{
100
- readonly type: "route";
101
- readonly id: "environment";
102
- readonly name: "Environment";
103
- readonly icon: "Brackets";
104
- readonly to: {
105
- readonly name: "workspace.environment";
106
- };
107
- }, {
108
- readonly type: "route";
109
- readonly id: "cookies";
110
- readonly name: "Cookies";
111
- readonly icon: "Cookie";
112
- readonly to: {
113
- readonly name: "workspace.cookies";
114
- };
115
- }, {
116
- readonly type: "route";
117
- readonly id: "settings";
118
- readonly name: "Settings";
119
- readonly icon: "Settings";
120
- readonly to: {
121
- readonly name: "workspace.settings";
122
- };
123
- }];
124
- }];
125
- type FlatCommand = (typeof commands)[number]['commands'][number];
126
- export type FolderCommandIds = Extract<FlatCommand, {
127
- type: 'folder';
128
- }>['id'];
129
- type HiddenFolderCommandIds = Extract<FlatCommand, {
130
- type: 'hidden-folder';
131
- }>['id'];
132
- /** Command IDs that map to UI components (folder and hidden-folder types) */
133
- export type UiCommandIds = FolderCommandIds | HiddenFolderCommandIds;
134
- /**
135
- * Maps each command ID to its respective props type.
136
- * If a command has no props defined, it maps to undefined.
6
+ * Command IDs that map to UI components (folder and hidden-folder types)
137
7
  *
138
- * This is used by the type system to validate that command components
139
- * accept the correct props for their respective command IDs.
8
+ * For base app commands they are defined by their action payload
140
9
  */
141
- export type CommandPropsMap = {
142
- [K in UiCommandIds]: Extract<FlatCommand, {
143
- id: K;
144
- }> extends {
145
- props: infer P;
146
- } ? P : undefined;
147
- };
10
+ type UiCommandIds = keyof CommandPalettePayload;
11
+ /** Map the the prop definitons to the prop value */
12
+ type CommandPaletteActionProps<K extends UiCommandIds> = CommandPalettePayload[K];
148
13
  /**
149
14
  * Type for the open function in the command palette.
150
15
  * Supports two usage patterns:
@@ -152,26 +17,48 @@ export type CommandPropsMap = {
152
17
  * - open(commandId) - Opens a command that does not require props
153
18
  * - open(commandId, props) - Opens a command with required props
154
19
  */
155
- export type OpenCommand = {
20
+ type OpenCommand = {
156
21
  (): void;
157
- <T extends UiCommandIds>(commandId: T, props: CommandPropsMap[T]): void;
22
+ <T extends UiCommandIds>(commandId: T, props: CommandPaletteActionProps<T>): void;
158
23
  };
159
- export type OpenCommandEvent = <T extends UiCommandIds>(event: 'open-command', commandId: T, ...args: CommandPropsMap[T] extends undefined ? [] : [props: CommandPropsMap[T]]) => void;
24
+ /** Route enntry for the palette list */
25
+ export type CommandPaletteRoute = {
26
+ id: string;
27
+ type: 'route';
28
+ icon: ScalarIconComponent;
29
+ name: string;
30
+ to: RouteLocationRaw;
31
+ };
32
+ /** Command entry for the palette list */
33
+ type BaseCommandPaletteAction = {
34
+ id: keyof CommandPalettePayload;
35
+ name: string;
36
+ icon?: ScalarIconComponent;
37
+ component: Component;
38
+ hidden?: boolean;
39
+ };
40
+ export type CommandPaletteAction = Omit<BaseCommandPaletteAction, 'id'> & {
41
+ id: string;
42
+ };
43
+ export type CommandPaletteEntry = CommandPaletteAction | CommandPaletteRoute;
160
44
  /**
161
45
  * Return type for the useCommandPaletteState composable.
162
46
  * Provides reactive state and methods to control the command palette.
163
47
  */
164
- export type UseCommandPaletteStateReturn = {
48
+ export type CommandPaletteState = {
165
49
  /** Whether the command palette is currently open */
166
50
  isOpen: Ref<boolean>;
167
51
  /** The currently active command, or null if showing the main list */
168
- activeCommand: Ref<UiCommandIds | null>;
52
+ activeCommand: ShallowRef<CommandPaletteAction | null>;
169
53
  /** Properties passed to the active command component */
170
54
  activeCommandProps: Ref<Record<string, unknown> | null>;
171
55
  /** Current filter/search query for filtering commands */
172
56
  filterQuery: Ref<string>;
173
- /** Filtered commands based on the current search query */
174
- filteredCommands: ComputedRef<readonly CommandGroup[]>;
57
+ /** Grouped actions and routes to be rendered */
58
+ filteredCommands: ComputedRef<{
59
+ label?: string;
60
+ commands: (CommandPaletteAction | CommandPaletteRoute)[];
61
+ }[]>;
175
62
  /**
176
63
  * Opens the command palette, optionally with a specific command active.
177
64
  * When opening a command, props are required only if the command defines them.
@@ -213,6 +100,208 @@ export type UseCommandPaletteStateReturn = {
213
100
  * // Close and reset
214
101
  * palette.close()
215
102
  */
216
- export declare const useCommandPaletteState: () => UseCommandPaletteStateReturn;
103
+ export declare const useCommandPaletteState: (actions?: CommandPaletteAction[], routes?: CommandPaletteRoute[]) => CommandPaletteState;
104
+ /**
105
+ * The base naviation routes used in the command palette.
106
+ * This object can be extended and passed to the useCommandPaletteState hook to add custom routes
107
+ */
108
+ export declare const baseRoutes: CommandPaletteRoute[];
109
+ /**
110
+ * The internal client command palette actions
111
+ * This object can be extended and passed to the useCommandPaletteState hook to add custom actions
112
+ */
113
+ export declare const baseClientActions: [{
114
+ readonly id: "import-from-openapi-swagger-postman-curl";
115
+ readonly name: "Import from OpenAPI/Swagger/Postman/cURL";
116
+ readonly component: import("vue").DefineComponent<{
117
+ workspaceStore: import("@scalar/workspace-store/client").WorkspaceStore;
118
+ eventBus: import("@scalar/workspace-store/events").WorkspaceEventBus;
119
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
120
+ close: () => any;
121
+ back: (keyboardEvent: KeyboardEvent) => any;
122
+ }, string, import("vue").PublicProps, Readonly<{
123
+ workspaceStore: import("@scalar/workspace-store/client").WorkspaceStore;
124
+ eventBus: import("@scalar/workspace-store/events").WorkspaceEventBus;
125
+ }> & Readonly<{
126
+ onClose?: (() => any) | undefined;
127
+ onBack?: ((keyboardEvent: KeyboardEvent) => any) | undefined;
128
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
129
+ readonly icon: {
130
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("@scalar/icons/types").ScalarIconProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
131
+ P: {};
132
+ B: {};
133
+ D: {};
134
+ C: {};
135
+ M: {};
136
+ Defaults: {};
137
+ }, Readonly<import("@scalar/icons/types").ScalarIconProps> & Readonly<{}>, {}, {}, {}, {}, {}>;
138
+ __isFragment?: never;
139
+ __isTeleport?: never;
140
+ __isSuspense?: never;
141
+ } & import("vue").ComponentOptionsBase<Readonly<import("@scalar/icons/types").ScalarIconProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
142
+ $slots: {
143
+ default?: (props: {}) => any;
144
+ };
145
+ });
146
+ }, {
147
+ readonly id: "create-document";
148
+ readonly name: "Create Document";
149
+ readonly component: import("vue").DefineComponent<{
150
+ workspaceStore: import("@scalar/workspace-store/client").WorkspaceStore;
151
+ eventBus: import("@scalar/workspace-store/events").WorkspaceEventBus;
152
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
153
+ close: () => any;
154
+ back: (keyboardEvent: KeyboardEvent) => any;
155
+ }, string, import("vue").PublicProps, Readonly<{
156
+ workspaceStore: import("@scalar/workspace-store/client").WorkspaceStore;
157
+ eventBus: import("@scalar/workspace-store/events").WorkspaceEventBus;
158
+ }> & Readonly<{
159
+ onClose?: (() => any) | undefined;
160
+ onBack?: ((keyboardEvent: KeyboardEvent) => any) | undefined;
161
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
162
+ readonly icon: {
163
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("@scalar/icons/types").ScalarIconProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
164
+ P: {};
165
+ B: {};
166
+ D: {};
167
+ C: {};
168
+ M: {};
169
+ Defaults: {};
170
+ }, Readonly<import("@scalar/icons/types").ScalarIconProps> & Readonly<{}>, {}, {}, {}, {}, {}>;
171
+ __isFragment?: never;
172
+ __isTeleport?: never;
173
+ __isSuspense?: never;
174
+ } & import("vue").ComponentOptionsBase<Readonly<import("@scalar/icons/types").ScalarIconProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
175
+ $slots: {
176
+ default?: (props: {}) => any;
177
+ };
178
+ });
179
+ }, {
180
+ readonly id: "add-tag";
181
+ readonly name: "Add Tag";
182
+ readonly component: import("vue").DefineComponent<{
183
+ workspaceStore: import("@scalar/workspace-store/client").WorkspaceStore;
184
+ eventBus: import("@scalar/workspace-store/events").WorkspaceEventBus;
185
+ documentId?: string;
186
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
187
+ close: () => any;
188
+ back: (keyboardEvent: KeyboardEvent) => any;
189
+ }, string, import("vue").PublicProps, Readonly<{
190
+ workspaceStore: import("@scalar/workspace-store/client").WorkspaceStore;
191
+ eventBus: import("@scalar/workspace-store/events").WorkspaceEventBus;
192
+ documentId?: string;
193
+ }> & Readonly<{
194
+ onClose?: (() => any) | undefined;
195
+ onBack?: ((keyboardEvent: KeyboardEvent) => any) | undefined;
196
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
197
+ readonly icon: {
198
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("@scalar/icons/types").ScalarIconProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
199
+ P: {};
200
+ B: {};
201
+ D: {};
202
+ C: {};
203
+ M: {};
204
+ Defaults: {};
205
+ }, Readonly<import("@scalar/icons/types").ScalarIconProps> & Readonly<{}>, {}, {}, {}, {}, {}>;
206
+ __isFragment?: never;
207
+ __isTeleport?: never;
208
+ __isSuspense?: never;
209
+ } & import("vue").ComponentOptionsBase<Readonly<import("@scalar/icons/types").ScalarIconProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
210
+ $slots: {
211
+ default?: (props: {}) => any;
212
+ };
213
+ });
214
+ }, {
215
+ readonly id: "create-request";
216
+ readonly name: "Create Request";
217
+ readonly component: import("vue").DefineComponent<{
218
+ workspaceStore: import("@scalar/workspace-store/client").WorkspaceStore;
219
+ eventBus: import("@scalar/workspace-store/events").WorkspaceEventBus;
220
+ documentId?: string;
221
+ tagId?: string;
222
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
223
+ close: () => any;
224
+ back: (keyboardEvent: KeyboardEvent) => any;
225
+ }, string, import("vue").PublicProps, Readonly<{
226
+ workspaceStore: import("@scalar/workspace-store/client").WorkspaceStore;
227
+ eventBus: import("@scalar/workspace-store/events").WorkspaceEventBus;
228
+ documentId?: string;
229
+ tagId?: string;
230
+ }> & Readonly<{
231
+ onClose?: (() => any) | undefined;
232
+ onBack?: ((keyboardEvent: KeyboardEvent) => any) | undefined;
233
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
234
+ readonly icon: {
235
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("@scalar/icons/types").ScalarIconProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
236
+ P: {};
237
+ B: {};
238
+ D: {};
239
+ C: {};
240
+ M: {};
241
+ Defaults: {};
242
+ }, Readonly<import("@scalar/icons/types").ScalarIconProps> & Readonly<{}>, {}, {}, {}, {}, {}>;
243
+ __isFragment?: never;
244
+ __isTeleport?: never;
245
+ __isSuspense?: never;
246
+ } & import("vue").ComponentOptionsBase<Readonly<import("@scalar/icons/types").ScalarIconProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
247
+ $slots: {
248
+ default?: (props: {}) => any;
249
+ };
250
+ });
251
+ }, {
252
+ readonly id: "add-example";
253
+ readonly name: "Add Example";
254
+ readonly component: import("vue").DefineComponent<{
255
+ workspaceStore: import("@scalar/workspace-store/client").WorkspaceStore;
256
+ documentId?: string;
257
+ operationId?: string;
258
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
259
+ close: () => any;
260
+ back: (keyboardEvent: KeyboardEvent) => any;
261
+ }, string, import("vue").PublicProps, Readonly<{
262
+ workspaceStore: import("@scalar/workspace-store/client").WorkspaceStore;
263
+ documentId?: string;
264
+ operationId?: string;
265
+ }> & Readonly<{
266
+ onClose?: (() => any) | undefined;
267
+ onBack?: ((keyboardEvent: KeyboardEvent) => any) | undefined;
268
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
269
+ readonly icon: {
270
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("@scalar/icons/types").ScalarIconProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
271
+ P: {};
272
+ B: {};
273
+ D: {};
274
+ C: {};
275
+ M: {};
276
+ Defaults: {};
277
+ }, Readonly<import("@scalar/icons/types").ScalarIconProps> & Readonly<{}>, {}, {}, {}, {}, {}>;
278
+ __isFragment?: never;
279
+ __isTeleport?: never;
280
+ __isSuspense?: never;
281
+ } & import("vue").ComponentOptionsBase<Readonly<import("@scalar/icons/types").ScalarIconProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
282
+ $slots: {
283
+ default?: (props: {}) => any;
284
+ };
285
+ });
286
+ }, {
287
+ readonly id: "import-curl-command";
288
+ readonly name: "Import cURL Command";
289
+ readonly hidden: true;
290
+ readonly component: import("vue").DefineComponent<{
291
+ workspaceStore: import("@scalar/workspace-store/client").WorkspaceStore;
292
+ eventBus: import("@scalar/workspace-store/events").WorkspaceEventBus;
293
+ inputValue: string;
294
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
295
+ close: () => any;
296
+ back: (keyboardEvent: KeyboardEvent) => any;
297
+ }, string, import("vue").PublicProps, Readonly<{
298
+ workspaceStore: import("@scalar/workspace-store/client").WorkspaceStore;
299
+ eventBus: import("@scalar/workspace-store/events").WorkspaceEventBus;
300
+ inputValue: string;
301
+ }> & Readonly<{
302
+ onClose?: (() => any) | undefined;
303
+ onBack?: ((keyboardEvent: KeyboardEvent) => any) | undefined;
304
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
305
+ }];
217
306
  export {};
218
307
  //# sourceMappingURL=use-command-palette-state.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-command-palette-state.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/command-palette/hooks/use-command-palette-state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAE1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AAC,CAAA;IACpB,qEAAqE;IACrE,aAAa,EAAE,GAAG,CAAC,YAAY,GAAG,IAAI,CAAC,CAAA;IACvC,wDAAwD;IACxD,kBAAkB,EAAE,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC,CAAA;IACvD,yDAAyD;IACzD,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACxB,0DAA0D;IAC1D,gBAAgB,EAAE,WAAW,CAAC,SAAS,YAAY,EAAE,CAAC,CAAA;IACtD;;;OAGG;IACH,IAAI,EAAE,WAAW,CAAA;IACjB,kDAAkD;IAClD,KAAK,EAAE,MAAM,IAAI,CAAA;IACjB,sDAAsD;IACtD,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACvC,yCAAyC;IACzC,KAAK,EAAE,MAAM,IAAI,CAAA;CAClB,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,sBAAsB,QAAO,4BAmFzC,CAAA"}
1
+ {"version":3,"file":"use-command-palette-state.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/command-palette/hooks/use-command-palette-state.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAC9D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAA;AAE3E,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,WAAW,EAAE,KAAK,GAAG,EAAE,KAAK,UAAU,EAA6B,MAAM,KAAK,CAAA;AAC5G,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AASlD;;;;GAIG;AACH,KAAK,YAAY,GAAG,MAAM,qBAAqB,CAAA;AAE/C,oDAAoD;AACpD,KAAK,yBAAyB,CAAC,CAAC,SAAS,YAAY,IAAI,qBAAqB,CAAC,CAAC,CAAC,CAAA;AAEjF;;;;;;GAMG;AACH,K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