@scalar/api-client-react 2.0.17 → 2.0.18
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 +6 -0
- package/dist/index.js +20 -6
- package/dist/index.js.map +1 -1
- package/dist/style.css +105 -105
- package/dist/use-api-client.d.ts +6 -2
- package/dist/use-api-client.d.ts.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { generateHash } from "@scalar/helpers/string/generate-hash";
|
|
2
3
|
import { useEffect, useRef, useState } from "react";
|
|
3
4
|
import { isObjectEqual } from "@scalar/helpers/object/is-object-equal";
|
|
4
5
|
//#region src/lazy-load.ts
|
|
@@ -64,6 +65,10 @@ globalThis.__VUE_PROD_HYDRATION_MISMATCH_DETAILS__ = true;
|
|
|
64
65
|
globalThis.__VUE_PROD_DEVTOOLS__ = false;
|
|
65
66
|
/** Tracks which documents are/have been loaded so we dont duplicate */
|
|
66
67
|
var documentSet = /* @__PURE__ */ new Set();
|
|
68
|
+
var getDocumentSlug = (configuration) => {
|
|
69
|
+
if (configuration.url !== void 0) return configuration.url || "default";
|
|
70
|
+
return generateHash(JSON.stringify(configuration.content));
|
|
71
|
+
};
|
|
67
72
|
/**
|
|
68
73
|
* Returns the singleton Api Client
|
|
69
74
|
*
|
|
@@ -86,10 +91,10 @@ var useApiClient = ({ configuration }) => {
|
|
|
86
91
|
});
|
|
87
92
|
useEffect(() => {
|
|
88
93
|
let cancelled = false;
|
|
89
|
-
const { url, ...modalOptions } = configuration;
|
|
94
|
+
const { url, content, ...modalOptions } = configuration;
|
|
95
|
+
const slug = getDocumentSlug(configuration);
|
|
90
96
|
getOrCreateApiClient(modalOptions)?.then((_client) => {
|
|
91
97
|
if (cancelled || !_client) return;
|
|
92
|
-
const slug = url || "";
|
|
93
98
|
_client.apiClient.updateOptions(modalOptions, true);
|
|
94
99
|
previousModalOptionsRef.current = modalOptions;
|
|
95
100
|
setClient(_client.apiClient);
|
|
@@ -97,10 +102,14 @@ var useApiClient = ({ configuration }) => {
|
|
|
97
102
|
documentSlugRef.current = slug;
|
|
98
103
|
if (slug && !documentSet.has(slug)) {
|
|
99
104
|
documentSet.add(slug);
|
|
100
|
-
_client.workspaceStore.addDocument({
|
|
105
|
+
if (url !== void 0) _client.workspaceStore.addDocument({
|
|
101
106
|
name: slug,
|
|
102
107
|
url
|
|
103
108
|
});
|
|
109
|
+
else _client.workspaceStore.addDocument({
|
|
110
|
+
name: slug,
|
|
111
|
+
document: content
|
|
112
|
+
});
|
|
104
113
|
}
|
|
105
114
|
});
|
|
106
115
|
return () => {
|
|
@@ -109,22 +118,27 @@ var useApiClient = ({ configuration }) => {
|
|
|
109
118
|
}, []);
|
|
110
119
|
useEffect(() => {
|
|
111
120
|
if (!client || !workspaceStore) return;
|
|
112
|
-
const slug = configuration
|
|
121
|
+
const slug = getDocumentSlug(configuration);
|
|
113
122
|
documentSlugRef.current = slug;
|
|
114
123
|
if (documentSet.has(slug)) return;
|
|
115
124
|
documentSet.add(slug);
|
|
116
|
-
workspaceStore.addDocument({
|
|
125
|
+
if (configuration.url !== void 0) workspaceStore.addDocument({
|
|
117
126
|
name: slug,
|
|
118
127
|
url: configuration.url
|
|
119
128
|
});
|
|
129
|
+
else workspaceStore.addDocument({
|
|
130
|
+
name: slug,
|
|
131
|
+
document: configuration.content
|
|
132
|
+
});
|
|
120
133
|
}, [
|
|
121
134
|
client,
|
|
122
135
|
configuration.url,
|
|
136
|
+
configuration.content,
|
|
123
137
|
workspaceStore
|
|
124
138
|
]);
|
|
125
139
|
useEffect(() => {
|
|
126
140
|
if (!client || !configuration) return;
|
|
127
|
-
const { url:
|
|
141
|
+
const { url: _url, content: _content, ...modalOptions } = configuration;
|
|
128
142
|
if (isObjectEqual(previousModalOptionsRef.current, modalOptions)) return;
|
|
129
143
|
client.updateOptions(modalOptions, true);
|
|
130
144
|
previousModalOptionsRef.current = modalOptions;
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../src/lazy-load.ts","../src/use-api-client.ts"],"sourcesContent":["import type { ApiClientOptions } from '@scalar/api-client/modal'\n\n/**\n * Creates a lazy singleton getter: the factory runs at most once, caches the resulting promise,\n * and clears the cache on failure so the next call can retry.\n *\n * Optional args are forwarded to the factory on the first (cache-miss) call only.\n * Subsequent calls return the cached promise regardless of the args passed.\n */\nconst makeLazySingleton = <T, Args extends unknown[] = []>(\n factory: (...args: Args) => Promise<T>,\n): ((...args: Args) => Promise<T>) => {\n let cached: Promise<T> | undefined\n return (...args: Args) => {\n cached ??= factory(...args).catch((error) => {\n cached = undefined\n throw error\n })\n return cached\n }\n}\n\n/** Lazy load the client modal creator */\nexport const getClientModalCreator = makeLazySingleton(() =>\n import('@scalar/api-client/modal').then(({ createApiClientModal }) => createApiClientModal),\n)\n\n/** Module-scoped singleton workspace store (lazy-loaded on first use). */\nexport const getWorkspaceStoreSingleton = makeLazySingleton(() =>\n import('@scalar/workspace-store/client').then(({ createWorkspaceStore }) => createWorkspaceStore()),\n)\n\n/** Module-scoped singleton workspace event bus (lazy-loaded on first use). */\nexport const getWorkspaceEventBusSingleton = makeLazySingleton(() =>\n import('@scalar/workspace-store/events').then(({ createWorkspaceEventBus }) => createWorkspaceEventBus()),\n)\n\n/**\n * Lazily creates the singleton Vue app, mounts it as the last child of document.body,\n * and returns the controller. Subsequent calls return the same promise.\n *\n * Only modal-supported options are accepted here. Document-specific fields\n * (`url`, `content`) must be registered via `workspaceStore.addDocument` after the client\n * is ready — they are not part of the modal constructor.\n */\nexport const getOrCreateApiClient = makeLazySingleton(async (options: ApiClientOptions = {}) => {\n const el = document.createElement('div')\n el.className = 'scalar-app'\n document.body.appendChild(el)\n\n try {\n const [createModal, workspaceStore, eventBus] = await Promise.all([\n getClientModalCreator(),\n getWorkspaceStoreSingleton(),\n getWorkspaceEventBusSingleton(),\n ])\n\n const apiClient = createModal({\n el,\n eventBus,\n workspaceStore,\n options,\n // TODO: map plugins from configuration when available\n // plugins: mapConfigPlugins(options),\n })\n\n return { apiClient, workspaceStore }\n } catch (error) {\n el.remove()\n throw error\n }\n})\n","'use client'\n\nimport type { ApiClientModal, ApiClientOptions, RoutePayload } from '@scalar/api-client/modal'\nimport { useEffect, useRef, useState } from 'react'\n\nimport './style.css'\n\nimport { isObjectEqual } from '@scalar/helpers/object/is-object-equal'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\n\nimport { getOrCreateApiClient } from './lazy-load'\n\nglobalThis.__VUE_OPTIONS_API__ = true\nglobalThis.__VUE_PROD_HYDRATION_MISMATCH_DETAILS__ = true\nglobalThis.__VUE_PROD_DEVTOOLS__ = false\n\nexport type ApiClientConfigurationReact = ApiClientOptions
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/lazy-load.ts","../src/use-api-client.ts"],"sourcesContent":["import type { ApiClientOptions } from '@scalar/api-client/modal'\n\n/**\n * Creates a lazy singleton getter: the factory runs at most once, caches the resulting promise,\n * and clears the cache on failure so the next call can retry.\n *\n * Optional args are forwarded to the factory on the first (cache-miss) call only.\n * Subsequent calls return the cached promise regardless of the args passed.\n */\nconst makeLazySingleton = <T, Args extends unknown[] = []>(\n factory: (...args: Args) => Promise<T>,\n): ((...args: Args) => Promise<T>) => {\n let cached: Promise<T> | undefined\n return (...args: Args) => {\n cached ??= factory(...args).catch((error) => {\n cached = undefined\n throw error\n })\n return cached\n }\n}\n\n/** Lazy load the client modal creator */\nexport const getClientModalCreator = makeLazySingleton(() =>\n import('@scalar/api-client/modal').then(({ createApiClientModal }) => createApiClientModal),\n)\n\n/** Module-scoped singleton workspace store (lazy-loaded on first use). */\nexport const getWorkspaceStoreSingleton = makeLazySingleton(() =>\n import('@scalar/workspace-store/client').then(({ createWorkspaceStore }) => createWorkspaceStore()),\n)\n\n/** Module-scoped singleton workspace event bus (lazy-loaded on first use). */\nexport const getWorkspaceEventBusSingleton = makeLazySingleton(() =>\n import('@scalar/workspace-store/events').then(({ createWorkspaceEventBus }) => createWorkspaceEventBus()),\n)\n\n/**\n * Lazily creates the singleton Vue app, mounts it as the last child of document.body,\n * and returns the controller. Subsequent calls return the same promise.\n *\n * Only modal-supported options are accepted here. Document-specific fields\n * (`url`, `content`) must be registered via `workspaceStore.addDocument` after the client\n * is ready — they are not part of the modal constructor.\n */\nexport const getOrCreateApiClient = makeLazySingleton(async (options: ApiClientOptions = {}) => {\n const el = document.createElement('div')\n el.className = 'scalar-app'\n document.body.appendChild(el)\n\n try {\n const [createModal, workspaceStore, eventBus] = await Promise.all([\n getClientModalCreator(),\n getWorkspaceStoreSingleton(),\n getWorkspaceEventBusSingleton(),\n ])\n\n const apiClient = createModal({\n el,\n eventBus,\n workspaceStore,\n options,\n // TODO: map plugins from configuration when available\n // plugins: mapConfigPlugins(options),\n })\n\n return { apiClient, workspaceStore }\n } catch (error) {\n el.remove()\n throw error\n }\n})\n","'use client'\n\nimport type { ApiClientModal, ApiClientOptions, RoutePayload } from '@scalar/api-client/modal'\nimport { generateHash } from '@scalar/helpers/string/generate-hash'\nimport { useEffect, useRef, useState } from 'react'\n\nimport './style.css'\n\nimport { isObjectEqual } from '@scalar/helpers/object/is-object-equal'\nimport type { WorkspaceStore } from '@scalar/workspace-store/client'\n\nimport { getOrCreateApiClient } from './lazy-load'\n\nglobalThis.__VUE_OPTIONS_API__ = true\nglobalThis.__VUE_PROD_HYDRATION_MISMATCH_DETAILS__ = true\nglobalThis.__VUE_PROD_DEVTOOLS__ = false\n\nexport type ApiClientConfigurationReact = ApiClientOptions &\n (\n | {\n content?: never\n url: string\n }\n | {\n content: Record<string, unknown>\n url?: never\n }\n )\n\nexport type UseApiClientModalProps = {\n /** Configuration for the Api Client (url or inline content) */\n configuration: ApiClientConfigurationReact\n}\n\n/** Tracks which documents are/have been loaded so we dont duplicate */\nconst documentSet = new Set<string>()\n\nconst getDocumentSlug = (configuration: ApiClientConfigurationReact) => {\n if (configuration.url !== undefined) {\n return configuration.url || 'default'\n }\n return generateHash(JSON.stringify(configuration.content))\n}\n\n/**\n * Returns the singleton Api Client\n *\n * On first call the Vue app is lazily created and appended to document.body where it\n * lives for the lifetime of the page — it is never unmounted, so it survives client-side\n * navigation without losing state.\n *\n * Subsequent calls from any component share the same instance of the client but can use the same\n * or different documents\n */\nexport const useApiClient = ({\n configuration,\n}: UseApiClientModalProps): (Omit<ApiClientModal, 'open'> & { open: (payload: RoutePayload) => void }) | undefined => {\n const [client, setClient] = useState<ApiClientModal | undefined>(undefined)\n const [workspaceStore, setWorkspaceStore] = useState<WorkspaceStore | undefined>(undefined)\n const documentSlugRef = useRef('')\n const previousModalOptionsRef = useRef<ApiClientOptions | undefined>(undefined)\n\n /** Small wrapper to set the documentSlug */\n const open = (payload: RoutePayload) => client?.open({ documentSlug: documentSlugRef.current, ...payload })\n\n useEffect(() => {\n let cancelled = false\n\n // Strip document-specific fields before passing to the modal constructor.\n const { url, content, ...modalOptions } = configuration\n\n const slug = getDocumentSlug(configuration)\n\n void getOrCreateApiClient(modalOptions)?.then((_client) => {\n if (cancelled || !_client) {\n return\n }\n\n // React always provides the complete modal option set for this hook instance,\n // so we overwrite to clear options removed by consumers.\n _client.apiClient.updateOptions(modalOptions, true)\n previousModalOptionsRef.current = modalOptions\n\n setClient(_client.apiClient)\n setWorkspaceStore(_client.workspaceStore)\n documentSlugRef.current = slug\n\n if (slug && !documentSet.has(slug)) {\n documentSet.add(slug)\n if (url !== undefined) {\n void _client.workspaceStore.addDocument({ name: slug, url })\n } else {\n void _client.workspaceStore.addDocument({ name: slug, document: content })\n }\n }\n })\n\n return () => {\n cancelled = true\n }\n\n // Only run once per mount\n }, [])\n\n // Register new document when we detect the url has changed\n useEffect(() => {\n if (!client || !workspaceStore) {\n return\n }\n\n const slug = getDocumentSlug(configuration)\n documentSlugRef.current = slug\n\n if (documentSet.has(slug)) {\n return\n }\n documentSet.add(slug)\n\n if (configuration.url !== undefined) {\n void workspaceStore.addDocument({ name: slug, url: configuration.url })\n } else {\n void workspaceStore.addDocument({ name: slug, document: configuration.content })\n }\n }, [client, configuration.url, configuration.content, workspaceStore])\n\n // Update the modal options when the configuration changes\n useEffect(() => {\n if (!client || !configuration) {\n return\n }\n\n const { url: _url, content: _content, ...modalOptions } = configuration\n if (isObjectEqual(previousModalOptionsRef.current, modalOptions)) {\n return\n }\n\n client.updateOptions(modalOptions, true)\n previousModalOptionsRef.current = modalOptions\n }, [client, configuration])\n\n return client\n ? {\n ...client,\n open,\n }\n : undefined\n}\n"],"mappings":"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"}
|
package/dist/style.css
CHANGED
|
@@ -4828,16 +4828,16 @@
|
|
|
4828
4828
|
opacity: .5;
|
|
4829
4829
|
}
|
|
4830
4830
|
}
|
|
4831
|
-
.http-bg-gradient[data-v-
|
|
4831
|
+
.http-bg-gradient[data-v-86e2b3ea] {
|
|
4832
4832
|
background: linear-gradient(rgba(255, 255, 255, 0.75), rgba(0, 0, 0, 0.035));
|
|
4833
4833
|
}
|
|
4834
|
-
.http-bg-gradient[data-v-
|
|
4834
|
+
.http-bg-gradient[data-v-86e2b3ea]:hover {
|
|
4835
4835
|
background: linear-gradient(rgba(0, 0, 0, 0.035), rgba(255, 255, 255, 0.75));
|
|
4836
4836
|
}
|
|
4837
|
-
.dark-mode .http-bg-gradient[data-v-
|
|
4837
|
+
.dark-mode .http-bg-gradient[data-v-86e2b3ea] {
|
|
4838
4838
|
background: linear-gradient(rgba(255, 255, 255, 0.035), rgba(0, 0, 0, 0.15));
|
|
4839
4839
|
}
|
|
4840
|
-
.dark-mode .http-bg-gradient[data-v-
|
|
4840
|
+
.dark-mode .http-bg-gradient[data-v-86e2b3ea]:hover {
|
|
4841
4841
|
background: linear-gradient(rgba(0, 0, 0, 0.15), rgba(255, 255, 255, 0.035));
|
|
4842
4842
|
}
|
|
4843
4843
|
.ascii-art-animate .ascii-art-line[data-v-9a695e58] {
|
|
@@ -4861,7 +4861,7 @@ to {
|
|
|
4861
4861
|
border-right-color: transparent;
|
|
4862
4862
|
}
|
|
4863
4863
|
}
|
|
4864
|
-
.open-api-client-button[data-v-
|
|
4864
|
+
.open-api-client-button[data-v-cd067f84] {
|
|
4865
4865
|
cursor: pointer;
|
|
4866
4866
|
width: 100%;
|
|
4867
4867
|
padding: 9px 12px;
|
|
@@ -4880,16 +4880,16 @@ to {
|
|
|
4880
4880
|
gap: 6px;
|
|
4881
4881
|
color: var(--scalar-sidebar-color-1);
|
|
4882
4882
|
}
|
|
4883
|
-
.open-api-client-button[data-v-
|
|
4883
|
+
.open-api-client-button[data-v-cd067f84]:hover {
|
|
4884
4884
|
background: var(
|
|
4885
4885
|
--scalar-sidebar-item-hover-background,
|
|
4886
4886
|
var(--scalar-background-2)
|
|
4887
4887
|
);
|
|
4888
4888
|
}
|
|
4889
|
-
.address-bar-history-button[data-v-
|
|
4889
|
+
.address-bar-history-button[data-v-12140f4f]:hover {
|
|
4890
4890
|
background: var(--scalar-background-3);
|
|
4891
4891
|
}
|
|
4892
|
-
.address-bar-history-button[data-v-
|
|
4892
|
+
.address-bar-history-button[data-v-12140f4f]:focus-within {
|
|
4893
4893
|
background: var(--scalar-background-2);
|
|
4894
4894
|
}
|
|
4895
4895
|
/*
|
|
@@ -5056,30 +5056,30 @@ to {
|
|
|
5056
5056
|
border-radius: var(--scalar-radius);
|
|
5057
5057
|
color: var(--scalar-color-1);
|
|
5058
5058
|
}
|
|
5059
|
-
.description[data-v-
|
|
5059
|
+
.description[data-v-649f9a0d] .markdown {
|
|
5060
5060
|
font-weight: var(--scalar-semibold);
|
|
5061
5061
|
color: var(--scalar-color--1);
|
|
5062
5062
|
padding: 0 0;
|
|
5063
5063
|
display: block;
|
|
5064
5064
|
}
|
|
5065
|
-
.description[data-v-
|
|
5065
|
+
.description[data-v-649f9a0d] .markdown > *:first-child {
|
|
5066
5066
|
margin-top: 0;
|
|
5067
5067
|
}
|
|
5068
|
-
[data-v-
|
|
5068
|
+
[data-v-372238a6] .cm-editor {
|
|
5069
5069
|
height: 100%;
|
|
5070
5070
|
outline: none;
|
|
5071
5071
|
width: 100%;
|
|
5072
5072
|
}
|
|
5073
|
-
[data-v-
|
|
5073
|
+
[data-v-372238a6] .cm-line {
|
|
5074
5074
|
padding: 0;
|
|
5075
5075
|
}
|
|
5076
|
-
[data-v-
|
|
5076
|
+
[data-v-372238a6] .cm-content {
|
|
5077
5077
|
padding: 0;
|
|
5078
5078
|
display: flex;
|
|
5079
5079
|
align-items: center;
|
|
5080
5080
|
font-size: var(--scalar-small);
|
|
5081
5081
|
}
|
|
5082
|
-
.scroll-timeline-x[data-v-
|
|
5082
|
+
.scroll-timeline-x[data-v-372238a6] {
|
|
5083
5083
|
-ms-overflow-style: none;
|
|
5084
5084
|
/* Fade the URL at the viewport edges. Mask lives on the scrollport (this
|
|
5085
5085
|
element) rather than on `.cm-scroller`, whose width follows the URL's
|
|
@@ -5092,31 +5092,31 @@ to {
|
|
|
5092
5092
|
transparent 100%
|
|
5093
5093
|
);
|
|
5094
5094
|
}
|
|
5095
|
-
.scroll-timeline-x-hidden[data-v-
|
|
5095
|
+
.scroll-timeline-x-hidden[data-v-372238a6] {
|
|
5096
5096
|
overflow-x: auto;
|
|
5097
5097
|
}
|
|
5098
|
-
.scroll-timeline-x-hidden[data-v-
|
|
5098
|
+
.scroll-timeline-x-hidden[data-v-372238a6] .cm-scroller {
|
|
5099
5099
|
scrollbar-width: none;
|
|
5100
5100
|
-ms-overflow-style: none;
|
|
5101
5101
|
padding-right: 20px;
|
|
5102
5102
|
overflow: auto;
|
|
5103
5103
|
}
|
|
5104
|
-
.scroll-timeline-x-hidden[data-v-
|
|
5104
|
+
.scroll-timeline-x-hidden[data-v-372238a6]::-webkit-scrollbar {
|
|
5105
5105
|
width: 0;
|
|
5106
5106
|
height: 0;
|
|
5107
5107
|
display: none;
|
|
5108
5108
|
}
|
|
5109
|
-
.scroll-timeline-x-hidden[data-v-
|
|
5109
|
+
.scroll-timeline-x-hidden[data-v-372238a6] .cm-scroller::-webkit-scrollbar {
|
|
5110
5110
|
width: 0;
|
|
5111
5111
|
height: 0;
|
|
5112
5112
|
display: none;
|
|
5113
5113
|
}
|
|
5114
|
-
.scroll-timeline-x-address[data-v-
|
|
5114
|
+
.scroll-timeline-x-address[data-v-372238a6] {
|
|
5115
5115
|
line-height: 27px;
|
|
5116
5116
|
scrollbar-width: none; /* Firefox */
|
|
5117
5117
|
}
|
|
5118
5118
|
/* make clickable are to left of send button */
|
|
5119
|
-
.scroll-timeline-x-address[data-v-
|
|
5119
|
+
.scroll-timeline-x-address[data-v-372238a6]:after {
|
|
5120
5120
|
content: '';
|
|
5121
5121
|
position: absolute;
|
|
5122
5122
|
height: 100%;
|
|
@@ -5124,12 +5124,12 @@ to {
|
|
|
5124
5124
|
right: 0;
|
|
5125
5125
|
cursor: text;
|
|
5126
5126
|
}
|
|
5127
|
-
.scroll-timeline-x-address[data-v-
|
|
5127
|
+
.scroll-timeline-x-address[data-v-372238a6]:empty:before {
|
|
5128
5128
|
content: 'Enter URL or cURL request';
|
|
5129
5129
|
color: var(--scalar-color-3);
|
|
5130
5130
|
pointer-events: none;
|
|
5131
5131
|
}
|
|
5132
|
-
.address-bar-bg-states[data-v-
|
|
5132
|
+
.address-bar-bg-states[data-v-372238a6] {
|
|
5133
5133
|
--scalar-address-bar-bg: color-mix(
|
|
5134
5134
|
in srgb,
|
|
5135
5135
|
var(--scalar-background-1),
|
|
@@ -5137,27 +5137,27 @@ to {
|
|
|
5137
5137
|
);
|
|
5138
5138
|
background: var(--scalar-address-bar-bg);
|
|
5139
5139
|
}
|
|
5140
|
-
.address-bar-bg-states[data-v-
|
|
5140
|
+
.address-bar-bg-states[data-v-372238a6]:has(.cm-focused) {
|
|
5141
5141
|
--scalar-address-bar-bg: var(--scalar-background-1);
|
|
5142
5142
|
border-color: var(--scalar-border-color);
|
|
5143
5143
|
outline-width: 1px;
|
|
5144
5144
|
outline-style: solid;
|
|
5145
5145
|
}
|
|
5146
|
-
.app-exit-button[data-v-
|
|
5146
|
+
.app-exit-button[data-v-42c563b3] {
|
|
5147
5147
|
color: white;
|
|
5148
5148
|
background: rgba(0, 0, 0, 0.1);
|
|
5149
5149
|
}
|
|
5150
|
-
.app-exit-button[data-v-
|
|
5150
|
+
.app-exit-button[data-v-42c563b3]:hover {
|
|
5151
5151
|
background: rgba(255, 255, 255, 0.1);
|
|
5152
5152
|
}
|
|
5153
|
-
.fade-request-section-content[data-v-
|
|
5153
|
+
.fade-request-section-content[data-v-07ff8fc3] {
|
|
5154
5154
|
background: linear-gradient(
|
|
5155
5155
|
to left,
|
|
5156
5156
|
var(--scalar-background-1) 64%,
|
|
5157
5157
|
transparent
|
|
5158
5158
|
);
|
|
5159
5159
|
}
|
|
5160
|
-
.filter-hover[data-v-
|
|
5160
|
+
.filter-hover[data-v-07ff8fc3] {
|
|
5161
5161
|
height: 100%;
|
|
5162
5162
|
padding-right: 39px;
|
|
5163
5163
|
padding-left: 24px;
|
|
@@ -5166,12 +5166,12 @@ to {
|
|
|
5166
5166
|
transition: width 0s ease-in-out 0.2s;
|
|
5167
5167
|
overflow: hidden;
|
|
5168
5168
|
}
|
|
5169
|
-
.filter-hover[data-v-
|
|
5170
|
-
.filter-hover[data-v-
|
|
5169
|
+
.filter-hover[data-v-07ff8fc3]:hover,
|
|
5170
|
+
.filter-hover[data-v-07ff8fc3]:has(:focus-visible) {
|
|
5171
5171
|
width: 100%;
|
|
5172
5172
|
z-index: 10;
|
|
5173
5173
|
}
|
|
5174
|
-
.filter-hover[data-v-
|
|
5174
|
+
.filter-hover[data-v-07ff8fc3]:before {
|
|
5175
5175
|
content: '';
|
|
5176
5176
|
position: absolute;
|
|
5177
5177
|
top: 0;
|
|
@@ -5183,59 +5183,59 @@ to {
|
|
|
5183
5183
|
transition: all 0.3s ease-in-out;
|
|
5184
5184
|
pointer-events: none;
|
|
5185
5185
|
}
|
|
5186
|
-
.filter-hover-item[data-v-
|
|
5186
|
+
.filter-hover-item[data-v-07ff8fc3] {
|
|
5187
5187
|
opacity: 0;
|
|
5188
5188
|
}
|
|
5189
|
-
.filter-hover-item[data-v-
|
|
5189
|
+
.filter-hover-item[data-v-07ff8fc3]:not(:last-of-type) {
|
|
5190
5190
|
transform: translate3d(0, 3px, 0);
|
|
5191
5191
|
}
|
|
5192
|
-
.filter-hover:hover .filter-hover-item[data-v-
|
|
5192
|
+
.filter-hover:hover .filter-hover-item[data-v-07ff8fc3] {
|
|
5193
5193
|
transition:
|
|
5194
5194
|
opacity 0.2s ease-in-out,
|
|
5195
5195
|
transform 0.2s ease-in-out;
|
|
5196
5196
|
}
|
|
5197
|
-
.filter-hover:hover .filter-hover-item[data-v-
|
|
5197
|
+
.filter-hover:hover .filter-hover-item[data-v-07ff8fc3]:nth-last-of-type(1) {
|
|
5198
5198
|
transition-delay: 0.05s;
|
|
5199
5199
|
}
|
|
5200
|
-
.filter-hover:hover .filter-hover-item[data-v-
|
|
5200
|
+
.filter-hover:hover .filter-hover-item[data-v-07ff8fc3]:nth-last-of-type(2) {
|
|
5201
5201
|
transition-delay: 0.1s;
|
|
5202
5202
|
}
|
|
5203
|
-
.filter-hover:hover .filter-hover-item[data-v-
|
|
5203
|
+
.filter-hover:hover .filter-hover-item[data-v-07ff8fc3]:nth-last-of-type(3) {
|
|
5204
5204
|
transition-delay: 0.15s;
|
|
5205
5205
|
}
|
|
5206
|
-
.filter-hover:hover .filter-hover-item[data-v-
|
|
5206
|
+
.filter-hover:hover .filter-hover-item[data-v-07ff8fc3]:nth-last-of-type(4) {
|
|
5207
5207
|
transition-delay: 0.2s;
|
|
5208
5208
|
}
|
|
5209
|
-
.filter-hover:hover .filter-hover-item[data-v-
|
|
5209
|
+
.filter-hover:hover .filter-hover-item[data-v-07ff8fc3]:nth-last-of-type(5) {
|
|
5210
5210
|
transition-delay: 0.25s;
|
|
5211
5211
|
}
|
|
5212
|
-
.filter-hover:hover .filter-hover-item[data-v-
|
|
5212
|
+
.filter-hover:hover .filter-hover-item[data-v-07ff8fc3]:nth-last-of-type(6) {
|
|
5213
5213
|
transition-delay: 0.3s;
|
|
5214
5214
|
}
|
|
5215
|
-
.filter-hover:hover .filter-hover-item[data-v-
|
|
5215
|
+
.filter-hover:hover .filter-hover-item[data-v-07ff8fc3]:nth-last-of-type(7) {
|
|
5216
5216
|
transition-delay: 0.35s;
|
|
5217
5217
|
}
|
|
5218
|
-
.filter-hover:hover .filter-hover-item[data-v-
|
|
5219
|
-
.filter-hover:has(:focus-visible) .filter-hover-item[data-v-
|
|
5218
|
+
.filter-hover:hover .filter-hover-item[data-v-07ff8fc3],
|
|
5219
|
+
.filter-hover:has(:focus-visible) .filter-hover-item[data-v-07ff8fc3] {
|
|
5220
5220
|
opacity: 1;
|
|
5221
5221
|
transform: translate3d(0, 0, 0);
|
|
5222
5222
|
}
|
|
5223
|
-
.filter-hover[data-v-
|
|
5224
|
-
.filter-hover[data-v-
|
|
5223
|
+
.filter-hover[data-v-07ff8fc3]:hover:before,
|
|
5224
|
+
.filter-hover[data-v-07ff8fc3]:has(:focus-visible):before {
|
|
5225
5225
|
opacity: 0.9;
|
|
5226
5226
|
backdrop-filter: blur(10px);
|
|
5227
5227
|
}
|
|
5228
|
-
.filter-button[data-v-
|
|
5228
|
+
.filter-button[data-v-07ff8fc3] {
|
|
5229
5229
|
top: 50%;
|
|
5230
5230
|
transform: translateY(-50%);
|
|
5231
5231
|
}
|
|
5232
|
-
.context-bar-group:hover .context-bar-group-hover\:text-c-1[data-v-
|
|
5233
|
-
.context-bar-group:has(:focus-visible) .context-bar-group-hover\:text-c-1[data-v-
|
|
5232
|
+
.context-bar-group:hover .context-bar-group-hover\:text-c-1[data-v-07ff8fc3],
|
|
5233
|
+
.context-bar-group:has(:focus-visible) .context-bar-group-hover\:text-c-1[data-v-07ff8fc3] {
|
|
5234
5234
|
--tw-text-opacity: 1;
|
|
5235
5235
|
color: rgb(var(--scalar-color-1) / var(--tw-text-opacity));
|
|
5236
5236
|
}
|
|
5237
|
-
.context-bar-group:hover .context-bar-group-hover\:hidden[data-v-
|
|
5238
|
-
.context-bar-group:has(:focus-visible) .context-bar-group-hover\:hidden[data-v-
|
|
5237
|
+
.context-bar-group:hover .context-bar-group-hover\:hidden[data-v-07ff8fc3],
|
|
5238
|
+
.context-bar-group:has(:focus-visible) .context-bar-group-hover\:hidden[data-v-07ff8fc3] {
|
|
5239
5239
|
display: none;
|
|
5240
5240
|
}
|
|
5241
5241
|
[data-v-36811e28] .cm-editor {
|
|
@@ -5271,7 +5271,7 @@ to {
|
|
|
5271
5271
|
var(--scalar-background-2) 20px
|
|
5272
5272
|
);
|
|
5273
5273
|
}
|
|
5274
|
-
[data-v-
|
|
5274
|
+
[data-v-aff33ea6] .cm-content {
|
|
5275
5275
|
font-size: var(--scalar-small);
|
|
5276
5276
|
}
|
|
5277
5277
|
/* Matches AddressBar.vue `.address-bar-bg-states` / `.fade-right` (header URL input). */
|
|
@@ -5295,10 +5295,10 @@ to {
|
|
|
5295
5295
|
-ms-overflow-style: none;
|
|
5296
5296
|
scrollbar-width: none;
|
|
5297
5297
|
}
|
|
5298
|
-
[data-v-
|
|
5298
|
+
[data-v-1ee3c31d] .cm-editor {
|
|
5299
5299
|
padding: 0;
|
|
5300
5300
|
}
|
|
5301
|
-
[data-v-
|
|
5301
|
+
[data-v-1ee3c31d] .cm-content {
|
|
5302
5302
|
align-items: center;
|
|
5303
5303
|
background-color: transparent;
|
|
5304
5304
|
display: flex;
|
|
@@ -5307,48 +5307,48 @@ to {
|
|
|
5307
5307
|
padding: 5px 8px;
|
|
5308
5308
|
width: 100%;
|
|
5309
5309
|
}
|
|
5310
|
-
[data-v-
|
|
5310
|
+
[data-v-1ee3c31d] .cm-content:has(.cm-pill) {
|
|
5311
5311
|
padding: 5px 8px;
|
|
5312
5312
|
}
|
|
5313
|
-
[data-v-
|
|
5313
|
+
[data-v-1ee3c31d] .cm-content .cm-pill:not(:last-of-type) {
|
|
5314
5314
|
margin-right: 0.5px;
|
|
5315
5315
|
}
|
|
5316
|
-
[data-v-
|
|
5316
|
+
[data-v-1ee3c31d] .cm-content .cm-pill:not(:first-of-type) {
|
|
5317
5317
|
margin-left: 0.5px;
|
|
5318
5318
|
}
|
|
5319
|
-
[data-v-
|
|
5319
|
+
[data-v-1ee3c31d] .cm-line {
|
|
5320
5320
|
overflow: hidden;
|
|
5321
5321
|
padding: 0;
|
|
5322
5322
|
text-overflow: ellipsis;
|
|
5323
5323
|
word-break: break-word;
|
|
5324
5324
|
}
|
|
5325
|
-
.required[data-v-
|
|
5325
|
+
.required[data-v-1ee3c31d]::after {
|
|
5326
5326
|
content: 'Required';
|
|
5327
5327
|
}
|
|
5328
5328
|
/* Tailwind placeholder is busted */
|
|
5329
|
-
input[data-v-
|
|
5329
|
+
input[data-v-1ee3c31d]::placeholder {
|
|
5330
5330
|
color: var(--scalar-color-3);
|
|
5331
5331
|
}
|
|
5332
5332
|
/* we want our inputs to look like a password input but not be one */
|
|
5333
|
-
.scalar-password-input[data-v-
|
|
5333
|
+
.scalar-password-input[data-v-1ee3c31d] {
|
|
5334
5334
|
text-security: disc;
|
|
5335
5335
|
-webkit-text-security: disc;
|
|
5336
5336
|
-moz-text-security: disc;
|
|
5337
5337
|
}
|
|
5338
|
-
.request-section-content[data-v-
|
|
5338
|
+
.request-section-content[data-v-9ee5445b] {
|
|
5339
5339
|
--scalar-border-width: 0.5px;
|
|
5340
5340
|
}
|
|
5341
|
-
.request-section-content-filter[data-v-
|
|
5341
|
+
.request-section-content-filter[data-v-9ee5445b] {
|
|
5342
5342
|
box-shadow: 0 -10px 0 10px var(--scalar-background-1);
|
|
5343
5343
|
}
|
|
5344
|
-
.request-item:focus-within .request-meta-buttons[data-v-
|
|
5344
|
+
.request-item:focus-within .request-meta-buttons[data-v-9ee5445b] {
|
|
5345
5345
|
opacity: 1;
|
|
5346
5346
|
}
|
|
5347
|
-
.group-hover-input[data-v-
|
|
5347
|
+
.group-hover-input[data-v-9ee5445b] {
|
|
5348
5348
|
border-width: var(--scalar-border-width);
|
|
5349
5349
|
border-color: transparent;
|
|
5350
5350
|
}
|
|
5351
|
-
.group:hover .group-hover-input[data-v-
|
|
5351
|
+
.group:hover .group-hover-input[data-v-9ee5445b] {
|
|
5352
5352
|
background: color-mix(
|
|
5353
5353
|
in srgb,
|
|
5354
5354
|
var(--scalar-background-1),
|
|
@@ -5356,27 +5356,27 @@ input[data-v-819cea32]::placeholder {
|
|
|
5356
5356
|
);
|
|
5357
5357
|
border-color: var(--scalar-border-color);
|
|
5358
5358
|
}
|
|
5359
|
-
.group-hover-input[data-v-
|
|
5359
|
+
.group-hover-input[data-v-9ee5445b]:focus {
|
|
5360
5360
|
background: transparent !important;
|
|
5361
5361
|
border-color: var(--scalar-border-color) !important;
|
|
5362
5362
|
}
|
|
5363
|
-
[data-v-
|
|
5363
|
+
[data-v-8c1df828] .cm-editor {
|
|
5364
5364
|
background-color: transparent;
|
|
5365
5365
|
font-size: var(--scalar-small);
|
|
5366
5366
|
outline: none;
|
|
5367
5367
|
}
|
|
5368
|
-
[data-v-
|
|
5368
|
+
[data-v-8c1df828] .cm-gutters {
|
|
5369
5369
|
background-color: var(--scalar-background-1);
|
|
5370
5370
|
border-radius: var(--scalar-radius) 0 0 var(--scalar-radius);
|
|
5371
5371
|
}
|
|
5372
|
-
[data-v-
|
|
5372
|
+
[data-v-8c1df828] .cm-scroller {
|
|
5373
5373
|
overflow: auto;
|
|
5374
5374
|
min-width: 100%;
|
|
5375
5375
|
}
|
|
5376
|
-
.light-mode .bg-preview[data-v-
|
|
5376
|
+
.light-mode .bg-preview[data-v-8bc927e4] {
|
|
5377
5377
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23000' fill-opacity='10%25'%3E%3Crect width='8' height='8' /%3E%3Crect x='8' y='8' width='8' height='8' /%3E%3C/svg%3E");
|
|
5378
5378
|
}
|
|
5379
|
-
.dark-mode .bg-preview[data-v-
|
|
5379
|
+
.dark-mode .bg-preview[data-v-8bc927e4] {
|
|
5380
5380
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23FFF' fill-opacity='10%25'%3E%3Crect width='8' height='8' /%3E%3Crect x='8' y='8' width='8' height='8' /%3E%3C/svg%3E");
|
|
5381
5381
|
}
|
|
5382
5382
|
.scalar-code-block[data-v-bb31ac6f] .hljs * {
|
|
@@ -5388,7 +5388,7 @@ input[data-v-819cea32]::placeholder {
|
|
|
5388
5388
|
flex-direction: column;
|
|
5389
5389
|
flex-grow: 1;
|
|
5390
5390
|
}
|
|
5391
|
-
.scalar-version-number[data-v-
|
|
5391
|
+
.scalar-version-number[data-v-0895623d] {
|
|
5392
5392
|
transform: skew(0deg, 13deg);
|
|
5393
5393
|
width: 76px;
|
|
5394
5394
|
height: 76px;
|
|
@@ -5408,7 +5408,7 @@ input[data-v-819cea32]::placeholder {
|
|
|
5408
5408
|
text-transform: initial;
|
|
5409
5409
|
text-decoration-color: var(--scalar-color-3);
|
|
5410
5410
|
}
|
|
5411
|
-
.scalar-version-number a[data-v-
|
|
5411
|
+
.scalar-version-number a[data-v-0895623d] {
|
|
5412
5412
|
font-weight: bold;
|
|
5413
5413
|
font-weight: bold;
|
|
5414
5414
|
background: var(--scalar-background-2);
|
|
@@ -5417,20 +5417,20 @@ input[data-v-819cea32]::placeholder {
|
|
|
5417
5417
|
text-decoration: none;
|
|
5418
5418
|
border: 0.5px solid var(--scalar-border-color);
|
|
5419
5419
|
}
|
|
5420
|
-
.gitbook-show[data-v-
|
|
5420
|
+
.gitbook-show[data-v-0895623d] {
|
|
5421
5421
|
display: none;
|
|
5422
5422
|
}
|
|
5423
|
-
.v-enter-active[data-v-
|
|
5423
|
+
.v-enter-active[data-v-b80db6e2] {
|
|
5424
5424
|
transition: opacity 0.5s ease;
|
|
5425
5425
|
}
|
|
5426
|
-
.v-enter-from[data-v-
|
|
5426
|
+
.v-enter-from[data-v-b80db6e2] {
|
|
5427
5427
|
opacity: 0;
|
|
5428
5428
|
}
|
|
5429
|
-
.animate-response-heading .response-heading[data-v-
|
|
5430
|
-
animation: push-response-
|
|
5429
|
+
.animate-response-heading .response-heading[data-v-7a7c6611] {
|
|
5430
|
+
animation: push-response-7a7c6611 0.2s ease-in-out forwards;
|
|
5431
5431
|
opacity: 1;
|
|
5432
5432
|
}
|
|
5433
|
-
@keyframes push-response-
|
|
5433
|
+
@keyframes push-response-7a7c6611 {
|
|
5434
5434
|
from {
|
|
5435
5435
|
opacity: 1;
|
|
5436
5436
|
transform: translateY(0);
|
|
@@ -5440,11 +5440,11 @@ to {
|
|
|
5440
5440
|
transform: translateY(-4px);
|
|
5441
5441
|
}
|
|
5442
5442
|
}
|
|
5443
|
-
.animate-response-heading .animate-response-children[data-v-
|
|
5444
|
-
animation: response-spans-
|
|
5443
|
+
.animate-response-heading .animate-response-children[data-v-7a7c6611] {
|
|
5444
|
+
animation: response-spans-7a7c6611 0.2s ease-in-out forwards 0.05s;
|
|
5445
5445
|
opacity: 0;
|
|
5446
5446
|
}
|
|
5447
|
-
@keyframes response-spans-
|
|
5447
|
+
@keyframes response-spans-7a7c6611 {
|
|
5448
5448
|
from {
|
|
5449
5449
|
opacity: 0;
|
|
5450
5450
|
transform: translateY(4px);
|
|
@@ -5454,34 +5454,34 @@ to {
|
|
|
5454
5454
|
transform: translateY(0);
|
|
5455
5455
|
}
|
|
5456
5456
|
}
|
|
5457
|
-
.request-card[data-v-
|
|
5457
|
+
.request-card[data-v-49c97039] {
|
|
5458
5458
|
color: var(--scalar-color-1);
|
|
5459
5459
|
font-size: var(--scalar-font-size-3);
|
|
5460
5460
|
}
|
|
5461
|
-
.request-method[data-v-
|
|
5461
|
+
.request-method[data-v-49c97039] {
|
|
5462
5462
|
font-family: var(--scalar-font-code);
|
|
5463
5463
|
text-transform: uppercase;
|
|
5464
5464
|
margin-right: 6px;
|
|
5465
5465
|
}
|
|
5466
|
-
.request-card-footer[data-v-
|
|
5466
|
+
.request-card-footer[data-v-49c97039] {
|
|
5467
5467
|
display: flex;
|
|
5468
5468
|
justify-content: flex-end;
|
|
5469
5469
|
padding: 6px;
|
|
5470
5470
|
flex-shrink: 0;
|
|
5471
5471
|
position: relative;
|
|
5472
5472
|
}
|
|
5473
|
-
.request-card-footer-addon[data-v-
|
|
5473
|
+
.request-card-footer-addon[data-v-49c97039] {
|
|
5474
5474
|
display: flex;
|
|
5475
5475
|
align-items: center;
|
|
5476
5476
|
|
|
5477
5477
|
flex: 1;
|
|
5478
5478
|
min-width: 0;
|
|
5479
5479
|
}
|
|
5480
|
-
.request-editor-section[data-v-
|
|
5480
|
+
.request-editor-section[data-v-49c97039] {
|
|
5481
5481
|
display: flex;
|
|
5482
5482
|
flex: 1;
|
|
5483
5483
|
}
|
|
5484
|
-
.request-card-simple[data-v-
|
|
5484
|
+
.request-card-simple[data-v-49c97039] {
|
|
5485
5485
|
display: flex;
|
|
5486
5486
|
align-items: center;
|
|
5487
5487
|
justify-content: space-between;
|
|
@@ -5490,7 +5490,7 @@ to {
|
|
|
5490
5490
|
|
|
5491
5491
|
font-size: var(--scalar-small);
|
|
5492
5492
|
}
|
|
5493
|
-
.code-snippet[data-v-
|
|
5493
|
+
.code-snippet[data-v-49c97039] {
|
|
5494
5494
|
display: flex;
|
|
5495
5495
|
flex-direction: column;
|
|
5496
5496
|
width: 100%;
|
|
@@ -5526,10 +5526,10 @@ to {
|
|
|
5526
5526
|
right: 0;
|
|
5527
5527
|
bottom: 0;
|
|
5528
5528
|
}
|
|
5529
|
-
[data-v-
|
|
5529
|
+
[data-v-69be2d6c] .cm-editor {
|
|
5530
5530
|
padding: 0;
|
|
5531
5531
|
}
|
|
5532
|
-
[data-v-
|
|
5532
|
+
[data-v-69be2d6c] .cm-content {
|
|
5533
5533
|
align-items: center;
|
|
5534
5534
|
background-color: transparent;
|
|
5535
5535
|
display: flex;
|
|
@@ -5538,22 +5538,22 @@ to {
|
|
|
5538
5538
|
padding: 5px 8px;
|
|
5539
5539
|
width: 100%;
|
|
5540
5540
|
}
|
|
5541
|
-
[data-v-
|
|
5541
|
+
[data-v-69be2d6c] .cm-content:has(.cm-pill) {
|
|
5542
5542
|
padding: 5px 8px;
|
|
5543
5543
|
}
|
|
5544
|
-
[data-v-
|
|
5544
|
+
[data-v-69be2d6c] .cm-content .cm-pill:not(:last-of-type) {
|
|
5545
5545
|
margin-right: 0.5px;
|
|
5546
5546
|
}
|
|
5547
|
-
[data-v-
|
|
5547
|
+
[data-v-69be2d6c] .cm-content .cm-pill:not(:first-of-type) {
|
|
5548
5548
|
margin-left: 0.5px;
|
|
5549
5549
|
}
|
|
5550
|
-
[data-v-
|
|
5550
|
+
[data-v-69be2d6c] .cm-line {
|
|
5551
5551
|
overflow: hidden;
|
|
5552
5552
|
padding: 0;
|
|
5553
5553
|
text-overflow: ellipsis;
|
|
5554
5554
|
}
|
|
5555
5555
|
/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */
|
|
5556
|
-
.scalar .scalar-app-layout[data-v-
|
|
5556
|
+
.scalar .scalar-app-layout[data-v-77897d1c] {
|
|
5557
5557
|
background: var(--scalar-background-1);
|
|
5558
5558
|
border: var(--scalar-border-width) solid var(--scalar-border-color);
|
|
5559
5559
|
border-radius: 8px;
|
|
@@ -5565,12 +5565,12 @@ to {
|
|
|
5565
5565
|
overflow: hidden;
|
|
5566
5566
|
}
|
|
5567
5567
|
@media (max-width: 720px) and (max-height: 480px) {
|
|
5568
|
-
.scalar .scalar-app-layout[data-v-
|
|
5568
|
+
.scalar .scalar-app-layout[data-v-77897d1c] {
|
|
5569
5569
|
height: 100%;
|
|
5570
5570
|
max-height: 90svh;
|
|
5571
5571
|
}
|
|
5572
5572
|
}
|
|
5573
|
-
.scalar .scalar-app-exit[data-v-
|
|
5573
|
+
.scalar .scalar-app-exit[data-v-77897d1c] {
|
|
5574
5574
|
cursor: pointer;
|
|
5575
5575
|
z-index: -1;
|
|
5576
5576
|
background: #00000038;
|
|
@@ -5580,10 +5580,10 @@ to {
|
|
|
5580
5580
|
top: 0;
|
|
5581
5581
|
left: 0;
|
|
5582
5582
|
}
|
|
5583
|
-
.dark-mode .scalar .scalar-app-exit[data-v-
|
|
5583
|
+
.dark-mode .scalar .scalar-app-exit[data-v-77897d1c] {
|
|
5584
5584
|
background: #00000073;
|
|
5585
5585
|
}
|
|
5586
|
-
.scalar .scalar-app-exit[data-v-
|
|
5586
|
+
.scalar .scalar-app-exit[data-v-77897d1c]:before {
|
|
5587
5587
|
text-align: center;
|
|
5588
5588
|
color: #fff;
|
|
5589
5589
|
opacity: .6;
|
|
@@ -5595,10 +5595,10 @@ to {
|
|
|
5595
5595
|
top: 0;
|
|
5596
5596
|
right: 12px;
|
|
5597
5597
|
}
|
|
5598
|
-
.scalar .scalar-app-exit[data-v-
|
|
5598
|
+
.scalar .scalar-app-exit[data-v-77897d1c]:hover:before {
|
|
5599
5599
|
opacity: 1;
|
|
5600
5600
|
}
|
|
5601
|
-
.scalar-container[data-v-
|
|
5601
|
+
.scalar-container[data-v-77897d1c] {
|
|
5602
5602
|
visibility: hidden;
|
|
5603
5603
|
opacity: 0;
|
|
5604
5604
|
pointer-events: none;
|
|
@@ -5615,19 +5615,19 @@ to {
|
|
|
5615
5615
|
left: 0;
|
|
5616
5616
|
overflow: hidden;
|
|
5617
5617
|
}
|
|
5618
|
-
.scalar-container.scalar-client--open[data-v-
|
|
5618
|
+
.scalar-container.scalar-client--open[data-v-77897d1c] {
|
|
5619
5619
|
opacity: 1;
|
|
5620
5620
|
visibility: visible;
|
|
5621
5621
|
pointer-events: auto;
|
|
5622
5622
|
transition: opacity .35s;
|
|
5623
5623
|
}
|
|
5624
|
-
.scalar .url-form-input[data-v-
|
|
5624
|
+
.scalar .url-form-input[data-v-77897d1c] {
|
|
5625
5625
|
min-height: auto !important;
|
|
5626
5626
|
}
|
|
5627
|
-
.scalar .scalar-container[data-v-
|
|
5627
|
+
.scalar .scalar-container[data-v-77897d1c] {
|
|
5628
5628
|
line-height: normal;
|
|
5629
5629
|
}
|
|
5630
|
-
.ref-search-meta[data-v-
|
|
5630
|
+
.ref-search-meta[data-v-d1af4404] {
|
|
5631
5631
|
background: var(--scalar-background-1);
|
|
5632
5632
|
border-bottom-left-radius: var(--scalar-radius-lg);
|
|
5633
5633
|
border-bottom-right-radius: var(--scalar-radius-lg);
|
package/dist/use-api-client.d.ts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import type { ApiClientModal, ApiClientOptions, RoutePayload } from '@scalar/api-client/modal';
|
|
2
2
|
import './style.css';
|
|
3
|
-
export type ApiClientConfigurationReact = ApiClientOptions & {
|
|
3
|
+
export type ApiClientConfigurationReact = ApiClientOptions & ({
|
|
4
|
+
content?: never;
|
|
4
5
|
url: string;
|
|
5
|
-
}
|
|
6
|
+
} | {
|
|
7
|
+
content: Record<string, unknown>;
|
|
8
|
+
url?: never;
|
|
9
|
+
});
|
|
6
10
|
export type UseApiClientModalProps = {
|
|
7
11
|
/** Configuration for the Api Client (url or inline content) */
|
|
8
12
|
configuration: ApiClientConfigurationReact;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-api-client.d.ts","sourceRoot":"","sources":["../src/use-api-client.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;
|
|
1
|
+
{"version":3,"file":"use-api-client.d.ts","sourceRoot":"","sources":["../src/use-api-client.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAI9F,OAAO,aAAa,CAAA;AAWpB,MAAM,MAAM,2BAA2B,GAAG,gBAAgB,GACxD,CACI;IACE,OAAO,CAAC,EAAE,KAAK,CAAA;IACf,GAAG,EAAE,MAAM,CAAA;CACZ,GACD;IACE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAChC,GAAG,CAAC,EAAE,KAAK,CAAA;CACZ,CACJ,CAAA;AAEH,MAAM,MAAM,sBAAsB,GAAG;IACnC,+DAA+D;IAC/D,aAAa,EAAE,2BAA2B,CAAA;CAC3C,CAAA;AAYD;;;;;;;;;GASG;AACH,eAAO,MAAM,YAAY,GAAI,oBAE1B,sBAAsB,KAAG,CAAC,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC,GAAG;IAAE,IAAI,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,IAAI,CAAA;CAAE,CAAC,GAAG,SA0FxG,CAAA"}
|
package/package.json
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"testing",
|
|
20
20
|
"react"
|
|
21
21
|
],
|
|
22
|
-
"version": "2.0.
|
|
22
|
+
"version": "2.0.18",
|
|
23
23
|
"engines": {
|
|
24
24
|
"node": ">=22"
|
|
25
25
|
},
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
"CHANGELOG.md"
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@scalar/api-client": "3.8.2",
|
|
43
42
|
"@scalar/helpers": "0.8.0",
|
|
44
|
-
"@scalar/workspace-store": "0.51.
|
|
43
|
+
"@scalar/workspace-store": "0.51.1",
|
|
44
|
+
"@scalar/api-client": "3.8.3"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@testing-library/dom": "^10.4.1",
|