@scalar/api-reference 1.52.2 → 1.52.3
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 +8 -0
- package/dist/browser/standalone.js +210 -201
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiReference.vue.d.ts.map +1 -1
- package/dist/components/ApiReference.vue.js +1 -1
- package/dist/components/ApiReference.vue.js.map +1 -1
- package/dist/components/ApiReference.vue.script.js +6 -2
- package/dist/components/ApiReference.vue.script.js.map +1 -1
- package/dist/features/Operation/helpers/filter-selected-security.js +3 -3
- package/dist/features/Operation/helpers/filter-selected-security.js.map +1 -1
- package/dist/helpers/map-config-plugins.d.ts.map +1 -1
- package/dist/helpers/map-config-plugins.js +2 -1
- package/dist/helpers/map-config-plugins.js.map +1 -1
- package/dist/plugins/plugin-manager.d.ts +17 -0
- package/dist/plugins/plugin-manager.d.ts.map +1 -1
- package/dist/plugins/plugin-manager.js +14 -0
- package/dist/plugins/plugin-manager.js.map +1 -1
- package/dist/plugins/posthog/index.d.ts +16 -0
- package/dist/plugins/posthog/index.d.ts.map +1 -0
- package/dist/plugins/posthog/index.js +54 -0
- package/dist/plugins/posthog/index.js.map +1 -0
- package/dist/style.css +111 -37
- package/package.json +19 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"map-config-plugins.d.ts","sourceRoot":"","sources":["../../src/helpers/map-config-plugins.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"map-config-plugins.d.ts","sourceRoot":"","sources":["../../src/helpers/map-config-plugins.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAE5E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,EAAE,KAAK,WAAW,EAAS,MAAM,KAAK,CAAA;AAE7C;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,gBAAgB,GAC3B,QAAQ,WAAW,CAAC,yBAAyB,CAAC,EAC9C,aAAa,WAAW,CAAC,kBAAkB,CAAC,KAC3C,YAAY,EAwCd,CAAA"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { watch } from "vue";
|
|
2
2
|
import { buildRequest, getEnvironmentVariables } from "@scalar/workspace-store/request-example";
|
|
3
|
+
import { buildSafeBodyRequest } from "@scalar/helpers/http/can-method-have-body";
|
|
3
4
|
//#region src/helpers/map-config-plugins.ts
|
|
4
5
|
/**
|
|
5
6
|
* Maps API reference configuration callbacks to client plugins.
|
|
@@ -27,7 +28,7 @@ var mapConfigPlugins = (config, environment) => {
|
|
|
27
28
|
if (!plugin.hooks) plugin.hooks = {};
|
|
28
29
|
plugin.hooks.beforeRequest = onBeforeRequest ? async (payload) => {
|
|
29
30
|
await onBeforeRequest({
|
|
30
|
-
request: buildRequest(payload.requestBuilder, { envVariables }).
|
|
31
|
+
request: buildSafeBodyRequest(...buildRequest(payload.requestBuilder, { envVariables }).requestPayload),
|
|
31
32
|
requestBuilder: payload.requestBuilder,
|
|
32
33
|
envVariables
|
|
33
34
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"map-config-plugins.js","names":[],"sources":["../../src/helpers/map-config-plugins.ts"],"sourcesContent":["import type { ClientPlugin } from '@scalar/oas-utils/helpers'\nimport type { ApiReferenceConfiguration } from '@scalar/types/api-reference'\nimport { buildRequest, getEnvironmentVariables } from '@scalar/workspace-store/request-example'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport { type ComputedRef, watch } from 'vue'\n\n/**\n * Maps API reference configuration callbacks to client plugins.\n *\n * This function transforms the legacy onBeforeRequest and onRequestSent callbacks\n * into the new plugin hook system. The mapping is reactive, so changes to the\n * configuration will automatically update the plugin hooks.\n *\n * Note: onRequestSent is mapped to responseReceived hook. This is not a perfect\n * one-to-one mapping, but it maintains backward compatibility with the old API.\n * The old callback receives only the URL string, while the new hook receives\n * the full response object.\n *\n * @param config - Reactive configuration object containing optional hook callbacks\n * @returns Array containing a single plugin with the mapped hooks\n */\nexport const mapConfigPlugins = (\n config: ComputedRef<ApiReferenceConfiguration>,\n environment: ComputedRef<XScalarEnvironment>,\n): ClientPlugin[] => {\n // Create a new plugin with the hooks which is going to be updated by the watcher when config changes\n const plugin: ClientPlugin = { hooks: {} }\n\n watch(\n [() => config.value.onBeforeRequest, () => config.value.onRequestSent, () => environment.value],\n ([onBeforeRequest, onRequestSent, environment]) => {\n // Get the environment variables for the current environment\n const envVariables = getEnvironmentVariables(environment)\n\n // Initialize the hooks object if it doesn't exist\n if (!plugin.hooks) {\n plugin.hooks = {}\n }\n\n plugin.hooks.beforeRequest = onBeforeRequest\n ? async (payload) => {\n await onBeforeRequest({\n // We need to build the request to get the fetch `Request`\n request: buildRequest(payload.requestBuilder, { envVariables }).
|
|
1
|
+
{"version":3,"file":"map-config-plugins.js","names":[],"sources":["../../src/helpers/map-config-plugins.ts"],"sourcesContent":["import { buildSafeBodyRequest } from '@scalar/helpers/http/can-method-have-body'\nimport type { ClientPlugin } from '@scalar/oas-utils/helpers'\nimport type { ApiReferenceConfiguration } from '@scalar/types/api-reference'\nimport { buildRequest, getEnvironmentVariables } from '@scalar/workspace-store/request-example'\nimport type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments'\nimport { type ComputedRef, watch } from 'vue'\n\n/**\n * Maps API reference configuration callbacks to client plugins.\n *\n * This function transforms the legacy onBeforeRequest and onRequestSent callbacks\n * into the new plugin hook system. The mapping is reactive, so changes to the\n * configuration will automatically update the plugin hooks.\n *\n * Note: onRequestSent is mapped to responseReceived hook. This is not a perfect\n * one-to-one mapping, but it maintains backward compatibility with the old API.\n * The old callback receives only the URL string, while the new hook receives\n * the full response object.\n *\n * @param config - Reactive configuration object containing optional hook callbacks\n * @returns Array containing a single plugin with the mapped hooks\n */\nexport const mapConfigPlugins = (\n config: ComputedRef<ApiReferenceConfiguration>,\n environment: ComputedRef<XScalarEnvironment>,\n): ClientPlugin[] => {\n // Create a new plugin with the hooks which is going to be updated by the watcher when config changes\n const plugin: ClientPlugin = { hooks: {} }\n\n watch(\n [() => config.value.onBeforeRequest, () => config.value.onRequestSent, () => environment.value],\n ([onBeforeRequest, onRequestSent, environment]) => {\n // Get the environment variables for the current environment\n const envVariables = getEnvironmentVariables(environment)\n\n // Initialize the hooks object if it doesn't exist\n if (!plugin.hooks) {\n plugin.hooks = {}\n }\n\n plugin.hooks.beforeRequest = onBeforeRequest\n ? async (payload) => {\n await onBeforeRequest({\n // We need to build the request to get the fetch `Request`\n request: buildSafeBodyRequest(...buildRequest(payload.requestBuilder, { envVariables }).requestPayload),\n requestBuilder: payload.requestBuilder,\n envVariables,\n })\n }\n : undefined\n\n /**\n * Maps onRequestSent to responseReceived hook.\n * The old API only passed the URL string, so we extract it from the request.\n */\n plugin.hooks.responseReceived = onRequestSent\n ? (payload) => {\n onRequestSent(payload.request.url)\n }\n : undefined\n },\n { immediate: true },\n )\n\n return [plugin]\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAsBA,IAAa,oBACX,QACA,gBACmB;CAEnB,MAAM,SAAuB,EAAE,OAAO,EAAE,EAAE;AAE1C,OACE;QAAO,OAAO,MAAM;QAAuB,OAAO,MAAM;QAAqB,YAAY;EAAM,GAC9F,CAAC,iBAAiB,eAAe,iBAAiB;EAEjD,MAAM,eAAe,wBAAwB,YAAY;AAGzD,MAAI,CAAC,OAAO,MACV,QAAO,QAAQ,EAAE;AAGnB,SAAO,MAAM,gBAAgB,kBACzB,OAAO,YAAY;AACjB,SAAM,gBAAgB;IAEpB,SAAS,qBAAqB,GAAG,aAAa,QAAQ,gBAAgB,EAAE,cAAc,CAAC,CAAC,eAAe;IACvG,gBAAgB,QAAQ;IACxB;IACD,CAAC;MAEJ,KAAA;;;;;AAMJ,SAAO,MAAM,mBAAmB,iBAC3B,YAAY;AACX,iBAAc,QAAQ,QAAQ,IAAI;MAEpC,KAAA;IAEN,EAAE,WAAW,MAAM,CACpB;AAED,QAAO,CAAC,OAAO"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ClientPlugin } from '@scalar/oas-utils/helpers';
|
|
1
2
|
import type { ApiReferencePlugin as OriginalApiReferencePlugin, SpecificationExtension, ViewComponent } from '@scalar/types/api-reference';
|
|
2
3
|
export type ApiReferencePlugin = OriginalApiReferencePlugin;
|
|
3
4
|
type CreatePluginManagerParams = {
|
|
@@ -17,6 +18,22 @@ export declare const createPluginManager: ({ plugins }: CreatePluginManagerParam
|
|
|
17
18
|
* Get all components for a specific view from registered plugins
|
|
18
19
|
*/
|
|
19
20
|
getViewComponents: (viewName: "content.end") => ViewComponent[];
|
|
21
|
+
/**
|
|
22
|
+
* Notify all plugins that the API Reference has been initialized
|
|
23
|
+
*/
|
|
24
|
+
notifyInit: (config: Record<string, unknown>) => void;
|
|
25
|
+
/**
|
|
26
|
+
* Notify all plugins that the configuration has changed
|
|
27
|
+
*/
|
|
28
|
+
notifyConfigChange: (config: Record<string, unknown>) => void;
|
|
29
|
+
/**
|
|
30
|
+
* Notify all plugins that the API Reference is being destroyed
|
|
31
|
+
*/
|
|
32
|
+
notifyDestroy: () => void;
|
|
33
|
+
/**
|
|
34
|
+
* Get all client plugins provided by registered plugins
|
|
35
|
+
*/
|
|
36
|
+
getApiClientPlugins: () => ClientPlugin[];
|
|
20
37
|
};
|
|
21
38
|
export type PluginManager = ReturnType<typeof createPluginManager>;
|
|
22
39
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-manager.d.ts","sourceRoot":"","sources":["../../src/plugins/plugin-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,IAAI,0BAA0B,EAChD,sBAAsB,EACtB,aAAa,EACd,MAAM,6BAA6B,CAAA;AAEpC,MAAM,MAAM,kBAAkB,GAAG,0BAA0B,CAAA;AAE3D,KAAK,yBAAyB,GAAG;IAC/B,OAAO,CAAC,EAAE,kBAAkB,EAAE,CAAA;CAC/B,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,GAAI,aAAkB,yBAAyB;IAU3E;;OAEG;uCACgC,KAAK,MAAM,EAAE,KAAG,sBAAsB,EAAE;IAc3E;;OAEG;kCAC2B,aAAa,KAAG,aAAa,EAAE;
|
|
1
|
+
{"version":3,"file":"plugin-manager.d.ts","sourceRoot":"","sources":["../../src/plugins/plugin-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,KAAK,EACV,kBAAkB,IAAI,0BAA0B,EAChD,sBAAsB,EACtB,aAAa,EACd,MAAM,6BAA6B,CAAA;AAEpC,MAAM,MAAM,kBAAkB,GAAG,0BAA0B,CAAA;AAE3D,KAAK,yBAAyB,GAAG;IAC/B,OAAO,CAAC,EAAE,kBAAkB,EAAE,CAAA;CAC/B,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,GAAI,aAAkB,yBAAyB;IAU3E;;OAEG;uCACgC,KAAK,MAAM,EAAE,KAAG,sBAAsB,EAAE;IAc3E;;OAEG;kCAC2B,aAAa,KAAG,aAAa,EAAE;IAa7D;;OAEG;yBACkB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAG,IAAI;IAMnD;;OAEG;iCAC0B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAG,IAAI;IAM3D;;OAEG;yBACgB,IAAI;IAMvB;;OAEG;+BACsB,YAAY,EAAE;CAY1C,CAAA;AAED,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAA"}
|
|
@@ -23,6 +23,20 @@ var createPluginManager = ({ plugins = [] }) => {
|
|
|
23
23
|
if (viewComponents) components.push(...viewComponents);
|
|
24
24
|
}
|
|
25
25
|
return components;
|
|
26
|
+
},
|
|
27
|
+
notifyInit: (config) => {
|
|
28
|
+
for (const plugin of registeredPlugins.values()) plugin.hooks?.onInit?.({ config });
|
|
29
|
+
},
|
|
30
|
+
notifyConfigChange: (config) => {
|
|
31
|
+
for (const plugin of registeredPlugins.values()) plugin.hooks?.onConfigChange?.({ config });
|
|
32
|
+
},
|
|
33
|
+
notifyDestroy: () => {
|
|
34
|
+
for (const plugin of registeredPlugins.values()) plugin.hooks?.onDestroy?.();
|
|
35
|
+
},
|
|
36
|
+
getApiClientPlugins: () => {
|
|
37
|
+
const apiClientPlugins = [];
|
|
38
|
+
for (const plugin of registeredPlugins.values()) if (plugin.apiClientPlugins) apiClientPlugins.push(...plugin.apiClientPlugins);
|
|
39
|
+
return apiClientPlugins;
|
|
26
40
|
}
|
|
27
41
|
};
|
|
28
42
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-manager.js","names":[],"sources":["../../src/plugins/plugin-manager.ts"],"sourcesContent":["import type {\n ApiReferencePlugin as OriginalApiReferencePlugin,\n SpecificationExtension,\n ViewComponent,\n} from '@scalar/types/api-reference'\n\nexport type ApiReferencePlugin = OriginalApiReferencePlugin\n\ntype CreatePluginManagerParams = {\n plugins?: ApiReferencePlugin[]\n}\n\n/**\n * Create the plugin manager store\n *\n * This store manages all plugins registered with the API client\n */\nexport const createPluginManager = ({ plugins = [] }: CreatePluginManagerParams) => {\n const registeredPlugins = new Map<string, ReturnType<ApiReferencePlugin>>()\n\n // Register initial plugins\n plugins.forEach((plugin) => {\n const pluginInstance = plugin()\n registeredPlugins.set(pluginInstance.name, pluginInstance)\n })\n\n return {\n /**\n * Get all extensions with the given name from registered plugins\n */\n getSpecificationExtensions: (name: `x-${string}`): SpecificationExtension[] => {\n const extensions: SpecificationExtension[] = []\n\n for (const plugin of registeredPlugins.values()) {\n for (const extension of plugin.extensions) {\n if (extension.name === name) {\n extensions.push(extension)\n }\n }\n }\n\n return extensions\n },\n\n /**\n * Get all components for a specific view from registered plugins\n */\n getViewComponents: (viewName: 'content.end'): ViewComponent[] => {\n const components: ViewComponent[] = []\n\n for (const plugin of registeredPlugins.values()) {\n const viewComponents = plugin.views?.[viewName]\n if (viewComponents) {\n components.push(...viewComponents)\n }\n }\n\n return components\n },\n }\n}\n\nexport type PluginManager = ReturnType<typeof createPluginManager>\n"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"plugin-manager.js","names":[],"sources":["../../src/plugins/plugin-manager.ts"],"sourcesContent":["import type { ClientPlugin } from '@scalar/oas-utils/helpers'\nimport type {\n ApiReferencePlugin as OriginalApiReferencePlugin,\n SpecificationExtension,\n ViewComponent,\n} from '@scalar/types/api-reference'\n\nexport type ApiReferencePlugin = OriginalApiReferencePlugin\n\ntype CreatePluginManagerParams = {\n plugins?: ApiReferencePlugin[]\n}\n\n/**\n * Create the plugin manager store\n *\n * This store manages all plugins registered with the API client\n */\nexport const createPluginManager = ({ plugins = [] }: CreatePluginManagerParams) => {\n const registeredPlugins = new Map<string, ReturnType<ApiReferencePlugin>>()\n\n // Register initial plugins\n plugins.forEach((plugin) => {\n const pluginInstance = plugin()\n registeredPlugins.set(pluginInstance.name, pluginInstance)\n })\n\n return {\n /**\n * Get all extensions with the given name from registered plugins\n */\n getSpecificationExtensions: (name: `x-${string}`): SpecificationExtension[] => {\n const extensions: SpecificationExtension[] = []\n\n for (const plugin of registeredPlugins.values()) {\n for (const extension of plugin.extensions) {\n if (extension.name === name) {\n extensions.push(extension)\n }\n }\n }\n\n return extensions\n },\n\n /**\n * Get all components for a specific view from registered plugins\n */\n getViewComponents: (viewName: 'content.end'): ViewComponent[] => {\n const components: ViewComponent[] = []\n\n for (const plugin of registeredPlugins.values()) {\n const viewComponents = plugin.views?.[viewName]\n if (viewComponents) {\n components.push(...viewComponents)\n }\n }\n\n return components\n },\n\n /**\n * Notify all plugins that the API Reference has been initialized\n */\n notifyInit: (config: Record<string, unknown>): void => {\n for (const plugin of registeredPlugins.values()) {\n plugin.hooks?.onInit?.({ config })\n }\n },\n\n /**\n * Notify all plugins that the configuration has changed\n */\n notifyConfigChange: (config: Record<string, unknown>): void => {\n for (const plugin of registeredPlugins.values()) {\n plugin.hooks?.onConfigChange?.({ config })\n }\n },\n\n /**\n * Notify all plugins that the API Reference is being destroyed\n */\n notifyDestroy: (): void => {\n for (const plugin of registeredPlugins.values()) {\n plugin.hooks?.onDestroy?.()\n }\n },\n\n /**\n * Get all client plugins provided by registered plugins\n */\n getApiClientPlugins: (): ClientPlugin[] => {\n const apiClientPlugins: ClientPlugin[] = []\n\n for (const plugin of registeredPlugins.values()) {\n if (plugin.apiClientPlugins) {\n apiClientPlugins.push(...(plugin.apiClientPlugins as ClientPlugin[]))\n }\n }\n\n return apiClientPlugins\n },\n }\n}\n\nexport type PluginManager = ReturnType<typeof createPluginManager>\n"],"mappings":";;;;;;AAkBA,IAAa,uBAAuB,EAAE,UAAU,EAAE,OAAkC;CAClF,MAAM,oCAAoB,IAAI,KAA6C;AAG3E,SAAQ,SAAS,WAAW;EAC1B,MAAM,iBAAiB,QAAQ;AAC/B,oBAAkB,IAAI,eAAe,MAAM,eAAe;GAC1D;AAEF,QAAO;EAIL,6BAA6B,SAAkD;GAC7E,MAAM,aAAuC,EAAE;AAE/C,QAAK,MAAM,UAAU,kBAAkB,QAAQ,CAC7C,MAAK,MAAM,aAAa,OAAO,WAC7B,KAAI,UAAU,SAAS,KACrB,YAAW,KAAK,UAAU;AAKhC,UAAO;;EAMT,oBAAoB,aAA6C;GAC/D,MAAM,aAA8B,EAAE;AAEtC,QAAK,MAAM,UAAU,kBAAkB,QAAQ,EAAE;IAC/C,MAAM,iBAAiB,OAAO,QAAQ;AACtC,QAAI,eACF,YAAW,KAAK,GAAG,eAAe;;AAItC,UAAO;;EAMT,aAAa,WAA0C;AACrD,QAAK,MAAM,UAAU,kBAAkB,QAAQ,CAC7C,QAAO,OAAO,SAAS,EAAE,QAAQ,CAAC;;EAOtC,qBAAqB,WAA0C;AAC7D,QAAK,MAAM,UAAU,kBAAkB,QAAQ,CAC7C,QAAO,OAAO,iBAAiB,EAAE,QAAQ,CAAC;;EAO9C,qBAA2B;AACzB,QAAK,MAAM,UAAU,kBAAkB,QAAQ,CAC7C,QAAO,OAAO,aAAa;;EAO/B,2BAA2C;GACzC,MAAM,mBAAmC,EAAE;AAE3C,QAAK,MAAM,UAAU,kBAAkB,QAAQ,CAC7C,KAAI,OAAO,iBACT,kBAAiB,KAAK,GAAI,OAAO,iBAAoC;AAIzE,UAAO;;EAEV"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type PostHogConfig } from '@scalar/api-client/plugins/posthog';
|
|
2
|
+
import type { ApiReferencePlugin } from '../plugin-manager.js';
|
|
3
|
+
export type { PostHogConfig };
|
|
4
|
+
/**
|
|
5
|
+
* PostHog analytics plugin for the API Reference.
|
|
6
|
+
*
|
|
7
|
+
* Loading this plugin opts in to analytics for both the API Reference
|
|
8
|
+
* and the embedded API Client (tracked as separate products).
|
|
9
|
+
*
|
|
10
|
+
* Respects the `telemetry` configuration option — when set to `false`,
|
|
11
|
+
* capturing is disabled. Reacts dynamically to config changes at runtime.
|
|
12
|
+
*
|
|
13
|
+
* If the plugin is not loaded, no tracking occurs.
|
|
14
|
+
*/
|
|
15
|
+
export declare const PostHogPlugin: (config: PostHogConfig) => ApiReferencePlugin;
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/posthog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,aAAa,EAAE,MAAM,oCAAoC,CAAA;AAI5F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAE3D,YAAY,EAAE,aAAa,EAAE,CAAA;AAE7B;;;;;;;;;;GAUG;AACH,eAAO,MAAM,aAAa,GAAI,QAAQ,aAAa,KAAG,kBAuDrD,CAAA"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { PostHogClientPlugin } from "@scalar/api-client/plugins/posthog";
|
|
2
|
+
import ph from "posthog-js";
|
|
3
|
+
//#region src/plugins/posthog/index.ts
|
|
4
|
+
/**
|
|
5
|
+
* PostHog analytics plugin for the API Reference.
|
|
6
|
+
*
|
|
7
|
+
* Loading this plugin opts in to analytics for both the API Reference
|
|
8
|
+
* and the embedded API Client (tracked as separate products).
|
|
9
|
+
*
|
|
10
|
+
* Respects the `telemetry` configuration option — when set to `false`,
|
|
11
|
+
* capturing is disabled. Reacts dynamically to config changes at runtime.
|
|
12
|
+
*
|
|
13
|
+
* If the plugin is not loaded, no tracking occurs.
|
|
14
|
+
*/
|
|
15
|
+
var PostHogPlugin = (config) => {
|
|
16
|
+
let posthog = null;
|
|
17
|
+
const clientPlugin = PostHogClientPlugin(config);
|
|
18
|
+
return () => ({
|
|
19
|
+
name: "posthog",
|
|
20
|
+
extensions: [],
|
|
21
|
+
apiClientPlugins: [clientPlugin],
|
|
22
|
+
hooks: {
|
|
23
|
+
onInit({ config: referenceConfig }) {
|
|
24
|
+
if (typeof window === "undefined") return;
|
|
25
|
+
const instance = ph.init(config.apiKey, {
|
|
26
|
+
api_host: config.apiHost,
|
|
27
|
+
...config.uiHost ? { ui_host: config.uiHost } : {},
|
|
28
|
+
...config.defaults ? { defaults: config.defaults } : {},
|
|
29
|
+
opt_out_capturing_by_default: true
|
|
30
|
+
}, "scalar-api-reference");
|
|
31
|
+
if (instance) {
|
|
32
|
+
posthog = instance;
|
|
33
|
+
posthog.register({ product: "api-reference" });
|
|
34
|
+
if (referenceConfig.telemetry !== false) posthog.opt_in_capturing();
|
|
35
|
+
}
|
|
36
|
+
clientPlugin.lifecycle?.onInit?.({ config: referenceConfig });
|
|
37
|
+
},
|
|
38
|
+
onConfigChange({ config: referenceConfig }) {
|
|
39
|
+
if (posthog) if (referenceConfig.telemetry === false) posthog.opt_out_capturing();
|
|
40
|
+
else posthog.opt_in_capturing();
|
|
41
|
+
clientPlugin.lifecycle?.onConfigChange?.({ config: referenceConfig });
|
|
42
|
+
},
|
|
43
|
+
onDestroy() {
|
|
44
|
+
posthog?.reset();
|
|
45
|
+
posthog = null;
|
|
46
|
+
clientPlugin.lifecycle?.onDestroy?.();
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
//#endregion
|
|
52
|
+
export { PostHogPlugin };
|
|
53
|
+
|
|
54
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/plugins/posthog/index.ts"],"sourcesContent":["import { PostHogClientPlugin, type PostHogConfig } from '@scalar/api-client/plugins/posthog'\nimport type { PostHog } from 'posthog-js'\nimport ph from 'posthog-js'\n\nimport type { ApiReferencePlugin } from '../plugin-manager'\n\nexport type { PostHogConfig }\n\n/**\n * PostHog analytics plugin for the API Reference.\n *\n * Loading this plugin opts in to analytics for both the API Reference\n * and the embedded API Client (tracked as separate products).\n *\n * Respects the `telemetry` configuration option — when set to `false`,\n * capturing is disabled. Reacts dynamically to config changes at runtime.\n *\n * If the plugin is not loaded, no tracking occurs.\n */\nexport const PostHogPlugin = (config: PostHogConfig): ApiReferencePlugin => {\n let posthog: PostHog | null = null\n const clientPlugin = PostHogClientPlugin(config)\n\n return () => ({\n name: 'posthog',\n extensions: [],\n apiClientPlugins: [clientPlugin],\n hooks: {\n onInit({ config: referenceConfig }) {\n if (typeof window === 'undefined') {\n return\n }\n\n const instance = ph.init(\n config.apiKey,\n {\n api_host: config.apiHost,\n ...(config.uiHost ? { ui_host: config.uiHost } : {}),\n ...(config.defaults ? { defaults: config.defaults } : {}),\n opt_out_capturing_by_default: true,\n },\n 'scalar-api-reference',\n )\n\n if (instance) {\n posthog = instance\n posthog.register({ product: 'api-reference' })\n\n if (referenceConfig.telemetry !== false) {\n posthog.opt_in_capturing()\n }\n }\n\n clientPlugin.lifecycle?.onInit?.({ config: referenceConfig })\n },\n onConfigChange({ config: referenceConfig }) {\n if (posthog) {\n if (referenceConfig.telemetry === false) {\n posthog.opt_out_capturing()\n } else {\n posthog.opt_in_capturing()\n }\n }\n\n clientPlugin.lifecycle?.onConfigChange?.({ config: referenceConfig })\n },\n onDestroy() {\n posthog?.reset()\n posthog = null\n\n clientPlugin.lifecycle?.onDestroy?.()\n },\n },\n })\n}\n"],"mappings":";;;;;;;;;;;;;;AAmBA,IAAa,iBAAiB,WAA8C;CAC1E,IAAI,UAA0B;CAC9B,MAAM,eAAe,oBAAoB,OAAO;AAEhD,eAAc;EACZ,MAAM;EACN,YAAY,EAAE;EACd,kBAAkB,CAAC,aAAa;EAChC,OAAO;GACL,OAAO,EAAE,QAAQ,mBAAmB;AAClC,QAAI,OAAO,WAAW,YACpB;IAGF,MAAM,WAAW,GAAG,KAClB,OAAO,QACP;KACE,UAAU,OAAO;KACjB,GAAI,OAAO,SAAS,EAAE,SAAS,OAAO,QAAQ,GAAG,EAAE;KACnD,GAAI,OAAO,WAAW,EAAE,UAAU,OAAO,UAAU,GAAG,EAAE;KACxD,8BAA8B;KAC/B,EACD,uBACD;AAED,QAAI,UAAU;AACZ,eAAU;AACV,aAAQ,SAAS,EAAE,SAAS,iBAAiB,CAAC;AAE9C,SAAI,gBAAgB,cAAc,MAChC,SAAQ,kBAAkB;;AAI9B,iBAAa,WAAW,SAAS,EAAE,QAAQ,iBAAiB,CAAC;;GAE/D,eAAe,EAAE,QAAQ,mBAAmB;AAC1C,QAAI,QACF,KAAI,gBAAgB,cAAc,MAChC,SAAQ,mBAAmB;QAE3B,SAAQ,kBAAkB;AAI9B,iBAAa,WAAW,iBAAiB,EAAE,QAAQ,iBAAiB,CAAC;;GAEvE,YAAY;AACV,aAAS,OAAO;AAChB,cAAU;AAEV,iBAAa,WAAW,aAAa;;GAExC;EACF"}
|
package/dist/style.css
CHANGED
|
@@ -3883,8 +3883,8 @@ to {
|
|
|
3883
3883
|
.scalar-app .group-hover\/button\:bg-sidebar-indent-border-hover:is(:where(.group\/button):hover *) {
|
|
3884
3884
|
background-color: var(--scalar-sidebar-indent-border-hover, var(--scalar-border-color));
|
|
3885
3885
|
}
|
|
3886
|
-
.scalar-app .group-hover\/button\:text-c-1:is(:where(.group\/button):hover *) {
|
|
3887
|
-
color: var(--scalar-color-1);
|
|
3886
|
+
.scalar-app .group-hover\/button\:text-c-header-1:is(:where(.group\/button):hover *) {
|
|
3887
|
+
color: var(--scalar-header-color-1, var(--scalar-color-1));
|
|
3888
3888
|
}
|
|
3889
3889
|
.scalar-app .hover\:bg-b-2:hover {
|
|
3890
3890
|
background-color: var(--scalar-background-2);
|
|
@@ -3892,9 +3892,20 @@ to {
|
|
|
3892
3892
|
.scalar-app .hover\:bg-b-3:hover {
|
|
3893
3893
|
background-color: var(--scalar-background-3);
|
|
3894
3894
|
}
|
|
3895
|
+
.scalar-app .hover\:bg-b-header-2:hover {
|
|
3896
|
+
background-color: var(--scalar-header-background-2, var(--scalar-background-2));
|
|
3897
|
+
}
|
|
3895
3898
|
.scalar-app .hover\:bg-h-btn:hover {
|
|
3896
3899
|
background-color: var(--scalar-button-1-hover);
|
|
3897
3900
|
}
|
|
3901
|
+
.scalar-app .hover\:bg-h-header-cta:hover {
|
|
3902
|
+
background-color: var(--scalar-header-call-to-action-color, var(--scalar-button-1));
|
|
3903
|
+
}
|
|
3904
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
3905
|
+
.scalar-app .hover\:bg-h-header-cta:hover {
|
|
3906
|
+
background-color: color-mix(in srgb, var(--scalar-header-call-to-action-color, var(--scalar-button-1)), var(--scalar-header-background-1, var(--scalar-background-1)) 15%);
|
|
3907
|
+
}
|
|
3908
|
+
}
|
|
3898
3909
|
.scalar-app .hover\:bg-sidebar-b-1:hover {
|
|
3899
3910
|
background-color: var(--scalar-sidebar-background-1, var(--scalar-background-1));
|
|
3900
3911
|
}
|
|
@@ -3926,6 +3937,9 @@ to {
|
|
|
3926
3937
|
.scalar-app .hover\:text-c-1:hover {
|
|
3927
3938
|
color: var(--scalar-color-1);
|
|
3928
3939
|
}
|
|
3940
|
+
.scalar-app .hover\:text-c-header-1:hover {
|
|
3941
|
+
color: var(--scalar-header-color-1, var(--scalar-color-1));
|
|
3942
|
+
}
|
|
3929
3943
|
.scalar-app .hover\:text-sidebar-c-1:hover {
|
|
3930
3944
|
color: var(--scalar-sidebar-color-1, var(--scalar-color-1));
|
|
3931
3945
|
}
|
|
@@ -4259,8 +4273,8 @@ to {
|
|
|
4259
4273
|
.scalar-app .group-hover\/button\:bg-sidebar-indent-border-hover:is(:where(.group\/button):hover *) {
|
|
4260
4274
|
background-color: var(--scalar-sidebar-indent-border-hover, var(--scalar-border-color));
|
|
4261
4275
|
}
|
|
4262
|
-
.scalar-app .group-hover\/button\:text-c-1:is(:where(.group\/button):hover *) {
|
|
4263
|
-
color: var(--scalar-color-1);
|
|
4276
|
+
.scalar-app .group-hover\/button\:text-c-header-1:is(:where(.group\/button):hover *) {
|
|
4277
|
+
color: var(--scalar-header-color-1, var(--scalar-color-1));
|
|
4264
4278
|
}
|
|
4265
4279
|
.scalar-app .hover\:bg-b-2:hover {
|
|
4266
4280
|
background-color: var(--scalar-background-2);
|
|
@@ -4268,9 +4282,20 @@ to {
|
|
|
4268
4282
|
.scalar-app .hover\:bg-b-3:hover {
|
|
4269
4283
|
background-color: var(--scalar-background-3);
|
|
4270
4284
|
}
|
|
4285
|
+
.scalar-app .hover\:bg-b-header-2:hover {
|
|
4286
|
+
background-color: var(--scalar-header-background-2, var(--scalar-background-2));
|
|
4287
|
+
}
|
|
4271
4288
|
.scalar-app .hover\:bg-h-btn:hover {
|
|
4272
4289
|
background-color: var(--scalar-button-1-hover);
|
|
4273
4290
|
}
|
|
4291
|
+
.scalar-app .hover\:bg-h-header-cta:hover {
|
|
4292
|
+
background-color: var(--scalar-header-call-to-action-color, var(--scalar-button-1));
|
|
4293
|
+
}
|
|
4294
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
4295
|
+
.scalar-app .hover\:bg-h-header-cta:hover {
|
|
4296
|
+
background-color: color-mix(in srgb, var(--scalar-header-call-to-action-color, var(--scalar-button-1)), var(--scalar-header-background-1, var(--scalar-background-1)) 15%);
|
|
4297
|
+
}
|
|
4298
|
+
}
|
|
4274
4299
|
.scalar-app .hover\:bg-sidebar-b-1:hover {
|
|
4275
4300
|
background-color: var(--scalar-sidebar-background-1, var(--scalar-background-1));
|
|
4276
4301
|
}
|
|
@@ -4302,6 +4327,9 @@ to {
|
|
|
4302
4327
|
.scalar-app .hover\:text-c-1:hover {
|
|
4303
4328
|
color: var(--scalar-color-1);
|
|
4304
4329
|
}
|
|
4330
|
+
.scalar-app .hover\:text-c-header-1:hover {
|
|
4331
|
+
color: var(--scalar-header-color-1, var(--scalar-color-1));
|
|
4332
|
+
}
|
|
4305
4333
|
.scalar-app .hover\:text-sidebar-c-1:hover {
|
|
4306
4334
|
color: var(--scalar-sidebar-color-1, var(--scalar-color-1));
|
|
4307
4335
|
}
|
|
@@ -4478,8 +4506,8 @@ to {
|
|
|
4478
4506
|
.scalar-app .group-hover\/button\:bg-sidebar-indent-border-hover:is(:where(.group\/button):hover *) {
|
|
4479
4507
|
background-color: var(--scalar-sidebar-indent-border-hover, var(--scalar-border-color));
|
|
4480
4508
|
}
|
|
4481
|
-
.scalar-app .group-hover\/button\:text-c-1:is(:where(.group\/button):hover *) {
|
|
4482
|
-
color: var(--scalar-color-1);
|
|
4509
|
+
.scalar-app .group-hover\/button\:text-c-header-1:is(:where(.group\/button):hover *) {
|
|
4510
|
+
color: var(--scalar-header-color-1, var(--scalar-color-1));
|
|
4483
4511
|
}
|
|
4484
4512
|
.scalar-app .hover\:bg-b-2:hover {
|
|
4485
4513
|
background-color: var(--scalar-background-2);
|
|
@@ -4487,9 +4515,20 @@ to {
|
|
|
4487
4515
|
.scalar-app .hover\:bg-b-3:hover {
|
|
4488
4516
|
background-color: var(--scalar-background-3);
|
|
4489
4517
|
}
|
|
4518
|
+
.scalar-app .hover\:bg-b-header-2:hover {
|
|
4519
|
+
background-color: var(--scalar-header-background-2, var(--scalar-background-2));
|
|
4520
|
+
}
|
|
4490
4521
|
.scalar-app .hover\:bg-h-btn:hover {
|
|
4491
4522
|
background-color: var(--scalar-button-1-hover);
|
|
4492
4523
|
}
|
|
4524
|
+
.scalar-app .hover\:bg-h-header-cta:hover {
|
|
4525
|
+
background-color: var(--scalar-header-call-to-action-color, var(--scalar-button-1));
|
|
4526
|
+
}
|
|
4527
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
4528
|
+
.scalar-app .hover\:bg-h-header-cta:hover {
|
|
4529
|
+
background-color: color-mix(in srgb, var(--scalar-header-call-to-action-color, var(--scalar-button-1)), var(--scalar-header-background-1, var(--scalar-background-1)) 15%);
|
|
4530
|
+
}
|
|
4531
|
+
}
|
|
4493
4532
|
.scalar-app .hover\:bg-sidebar-b-1:hover {
|
|
4494
4533
|
background-color: var(--scalar-sidebar-background-1, var(--scalar-background-1));
|
|
4495
4534
|
}
|
|
@@ -4521,6 +4560,9 @@ to {
|
|
|
4521
4560
|
.scalar-app .hover\:text-c-1:hover {
|
|
4522
4561
|
color: var(--scalar-color-1);
|
|
4523
4562
|
}
|
|
4563
|
+
.scalar-app .hover\:text-c-header-1:hover {
|
|
4564
|
+
color: var(--scalar-header-color-1, var(--scalar-color-1));
|
|
4565
|
+
}
|
|
4524
4566
|
.scalar-app .hover\:text-sidebar-c-1:hover {
|
|
4525
4567
|
color: var(--scalar-sidebar-color-1, var(--scalar-color-1));
|
|
4526
4568
|
}
|
|
@@ -6168,6 +6210,9 @@ to {
|
|
|
6168
6210
|
border-style: var(--tw-border-style);
|
|
6169
6211
|
border-width: 1px;
|
|
6170
6212
|
}
|
|
6213
|
+
.scalar-app .border-border-header {
|
|
6214
|
+
border-color: var(--scalar-header-border-color, var(--scalar-border-color));
|
|
6215
|
+
}
|
|
6171
6216
|
.scalar-app .border-c-alert {
|
|
6172
6217
|
border-color: var(--scalar-color-alert);
|
|
6173
6218
|
}
|
|
@@ -6200,6 +6245,12 @@ to {
|
|
|
6200
6245
|
.scalar-app .bg-b-btn {
|
|
6201
6246
|
background-color: var(--scalar-button-1);
|
|
6202
6247
|
}
|
|
6248
|
+
.scalar-app .bg-b-header-1 {
|
|
6249
|
+
background-color: var(--scalar-header-background-1, var(--scalar-background-1));
|
|
6250
|
+
}
|
|
6251
|
+
.scalar-app .bg-b-header-cta {
|
|
6252
|
+
background-color: var(--scalar-header-call-to-action-color, var(--scalar-button-1));
|
|
6253
|
+
}
|
|
6203
6254
|
.scalar-app .bg-b-tooltip {
|
|
6204
6255
|
background-color: var(--scalar-tooltip-background);
|
|
6205
6256
|
}
|
|
@@ -6347,6 +6398,15 @@ to {
|
|
|
6347
6398
|
.scalar-app .break-words, .scalar-app .wrap-break-word {
|
|
6348
6399
|
overflow-wrap: break-word;
|
|
6349
6400
|
}
|
|
6401
|
+
.scalar-app .text-c-header-1 {
|
|
6402
|
+
color: var(--scalar-header-color-1, var(--scalar-color-1));
|
|
6403
|
+
}
|
|
6404
|
+
.scalar-app .text-c-header-2 {
|
|
6405
|
+
color: var(--scalar-header-color-2, var(--scalar-color-2));
|
|
6406
|
+
}
|
|
6407
|
+
.scalar-app .text-c-header-cta {
|
|
6408
|
+
color: var(--scalar-button-1-color);
|
|
6409
|
+
}
|
|
6350
6410
|
.scalar-app .text-c-tooltip {
|
|
6351
6411
|
color: var(--scalar-tooltip-color);
|
|
6352
6412
|
}
|
|
@@ -6427,8 +6487,8 @@ to {
|
|
|
6427
6487
|
:is(.scalar-app .\*\:justify-center > *) {
|
|
6428
6488
|
justify-content: center;
|
|
6429
6489
|
}
|
|
6430
|
-
:is(.scalar-app .\*\:gap-
|
|
6431
|
-
gap:
|
|
6490
|
+
:is(.scalar-app .\*\:gap-1 > *) {
|
|
6491
|
+
gap: 4px;
|
|
6432
6492
|
}
|
|
6433
6493
|
:is(.scalar-app .\*\:rounded > *) {
|
|
6434
6494
|
border-radius: var(--scalar-radius);
|
|
@@ -6458,8 +6518,8 @@ to {
|
|
|
6458
6518
|
.scalar-app .group-hover\/button\:bg-sidebar-indent-border-hover:is(:where(.group\/button):hover *) {
|
|
6459
6519
|
background-color: var(--scalar-sidebar-indent-border-hover, var(--scalar-border-color));
|
|
6460
6520
|
}
|
|
6461
|
-
.scalar-app .group-hover\/button\:text-c-1:is(:where(.group\/button):hover *) {
|
|
6462
|
-
color: var(--scalar-color-1);
|
|
6521
|
+
.scalar-app .group-hover\/button\:text-c-header-1:is(:where(.group\/button):hover *) {
|
|
6522
|
+
color: var(--scalar-header-color-1, var(--scalar-color-1));
|
|
6463
6523
|
}
|
|
6464
6524
|
}
|
|
6465
6525
|
.scalar-app .group-focus-visible\/toggle\:outline:is(:where(.group\/toggle):focus-visible *) {
|
|
@@ -6521,9 +6581,20 @@ to {
|
|
|
6521
6581
|
.scalar-app .hover\:bg-b-3:hover {
|
|
6522
6582
|
background-color: var(--scalar-background-3);
|
|
6523
6583
|
}
|
|
6584
|
+
.scalar-app .hover\:bg-b-header-2:hover {
|
|
6585
|
+
background-color: var(--scalar-header-background-2, var(--scalar-background-2));
|
|
6586
|
+
}
|
|
6524
6587
|
.scalar-app .hover\:bg-h-btn:hover {
|
|
6525
6588
|
background-color: var(--scalar-button-1-hover);
|
|
6526
6589
|
}
|
|
6590
|
+
.scalar-app .hover\:bg-h-header-cta:hover {
|
|
6591
|
+
background-color: var(--scalar-header-call-to-action-color, var(--scalar-button-1));
|
|
6592
|
+
}
|
|
6593
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
6594
|
+
.scalar-app .hover\:bg-h-header-cta:hover {
|
|
6595
|
+
background-color: color-mix(in srgb, var(--scalar-header-call-to-action-color, var(--scalar-button-1)), var(--scalar-header-background-1, var(--scalar-background-1)) 15%);
|
|
6596
|
+
}
|
|
6597
|
+
}
|
|
6527
6598
|
.scalar-app .hover\:bg-sidebar-b-1:hover {
|
|
6528
6599
|
background-color: var(--scalar-sidebar-background-1, var(--scalar-background-1));
|
|
6529
6600
|
}
|
|
@@ -6555,6 +6626,9 @@ to {
|
|
|
6555
6626
|
.scalar-app .hover\:text-c-1:hover {
|
|
6556
6627
|
color: var(--scalar-color-1);
|
|
6557
6628
|
}
|
|
6629
|
+
.scalar-app .hover\:text-c-header-1:hover {
|
|
6630
|
+
color: var(--scalar-header-color-1, var(--scalar-color-1));
|
|
6631
|
+
}
|
|
6558
6632
|
.scalar-app .hover\:text-sidebar-c-1:hover {
|
|
6559
6633
|
color: var(--scalar-sidebar-color-1, var(--scalar-color-1));
|
|
6560
6634
|
}
|
|
@@ -7157,6 +7231,9 @@ to {
|
|
|
7157
7231
|
.scalar-app .h-\[68px\] {
|
|
7158
7232
|
height: 68px;
|
|
7159
7233
|
}
|
|
7234
|
+
.scalar-app .h-\[300px\] {
|
|
7235
|
+
height: 300px;
|
|
7236
|
+
}
|
|
7160
7237
|
.scalar-app .h-\[calc\(100\%_-_50px\)\] {
|
|
7161
7238
|
height: calc(100% - 50px);
|
|
7162
7239
|
}
|
|
@@ -7208,9 +7285,6 @@ to {
|
|
|
7208
7285
|
.scalar-app .max-h-\[60svh\] {
|
|
7209
7286
|
max-height: 60svh;
|
|
7210
7287
|
}
|
|
7211
|
-
.scalar-app .max-h-\[300px\] {
|
|
7212
|
-
max-height: 300px;
|
|
7213
|
-
}
|
|
7214
7288
|
.scalar-app .max-h-\[auto\] {
|
|
7215
7289
|
max-height: auto;
|
|
7216
7290
|
}
|
|
@@ -9870,7 +9944,7 @@ input[data-v-3157c3c7]::placeholder {
|
|
|
9870
9944
|
min-width: 100%;
|
|
9871
9945
|
overflow: auto;
|
|
9872
9946
|
}
|
|
9873
|
-
.scalar-code-block[data-v-
|
|
9947
|
+
.scalar-code-block[data-v-30c34ea4] .hljs * {
|
|
9874
9948
|
font-size: var(--scalar-small);
|
|
9875
9949
|
}
|
|
9876
9950
|
.response-body-virtual[data-headlessui-state="open"], .response-body-virtual[data-headlessui-state="open"] .diclosure-panel {
|
|
@@ -9937,11 +10011,11 @@ to {
|
|
|
9937
10011
|
.v-enter-from[data-v-1f35725e] {
|
|
9938
10012
|
opacity: 0;
|
|
9939
10013
|
}
|
|
9940
|
-
.animate-response-heading .response-heading[data-v-
|
|
10014
|
+
.animate-response-heading .response-heading[data-v-82f4df98] {
|
|
9941
10015
|
opacity: 1;
|
|
9942
|
-
animation: .2s ease-in-out forwards push-response-
|
|
10016
|
+
animation: .2s ease-in-out forwards push-response-82f4df98;
|
|
9943
10017
|
}
|
|
9944
|
-
@keyframes push-response-
|
|
10018
|
+
@keyframes push-response-82f4df98 {
|
|
9945
10019
|
from {
|
|
9946
10020
|
opacity: 1;
|
|
9947
10021
|
transform: translateY(0);
|
|
@@ -9951,11 +10025,11 @@ to {
|
|
|
9951
10025
|
transform: translateY(-4px);
|
|
9952
10026
|
}
|
|
9953
10027
|
}
|
|
9954
|
-
.animate-response-heading .animate-response-children[data-v-
|
|
10028
|
+
.animate-response-heading .animate-response-children[data-v-82f4df98] {
|
|
9955
10029
|
opacity: 0;
|
|
9956
|
-
animation: .2s ease-in-out 50ms forwards response-spans-
|
|
10030
|
+
animation: .2s ease-in-out 50ms forwards response-spans-82f4df98;
|
|
9957
10031
|
}
|
|
9958
|
-
@keyframes response-spans-
|
|
10032
|
+
@keyframes response-spans-82f4df98 {
|
|
9959
10033
|
from {
|
|
9960
10034
|
opacity: 0;
|
|
9961
10035
|
transform: translateY(4px);
|
|
@@ -10527,7 +10601,7 @@ to {
|
|
|
10527
10601
|
.scroll-timeline-x[data-v-f4568236]::-webkit-scrollbar {
|
|
10528
10602
|
display: none;
|
|
10529
10603
|
}
|
|
10530
|
-
.postman-import-path-conflict-callout[data-v-
|
|
10604
|
+
.postman-import-path-conflict-callout[data-v-cc4f666d] {
|
|
10531
10605
|
border-color: var(--scalar-color-red);
|
|
10532
10606
|
background-color: var(--scalar-background-danger);
|
|
10533
10607
|
color: var(--scalar-color-1);
|
|
@@ -12180,7 +12254,7 @@ div + .userMessage[data-v-8e43ed7a] {
|
|
|
12180
12254
|
|
|
12181
12255
|
/* Configurable Layout Variables */
|
|
12182
12256
|
@layer scalar-config {
|
|
12183
|
-
.scalar-api-reference[data-v-
|
|
12257
|
+
.scalar-api-reference[data-v-07ea94ee] {
|
|
12184
12258
|
/* The header height */
|
|
12185
12259
|
--refs-header-height: calc(
|
|
12186
12260
|
var(--scalar-custom-header-height, 0px) + var(--scalar-header-height, 0px)
|
|
@@ -12202,20 +12276,20 @@ div + .userMessage[data-v-8e43ed7a] {
|
|
|
12202
12276
|
/* The maximum width of the content column */
|
|
12203
12277
|
--refs-content-max-width: var(--scalar-content-max-width, 1540px);
|
|
12204
12278
|
}
|
|
12205
|
-
.scalar-api-reference.references-classic[data-v-
|
|
12279
|
+
.scalar-api-reference.references-classic[data-v-07ea94ee] {
|
|
12206
12280
|
/* Classic layout is wider */
|
|
12207
12281
|
--refs-content-max-width: var(--scalar-content-max-width, 1420px);
|
|
12208
12282
|
min-height: 100dvh;
|
|
12209
12283
|
--refs-sidebar-width: 0;
|
|
12210
12284
|
}
|
|
12211
12285
|
}
|
|
12212
|
-
.t-doc__sidebar[data-v-
|
|
12286
|
+
.t-doc__sidebar[data-v-07ea94ee] {
|
|
12213
12287
|
z-index: 10;
|
|
12214
12288
|
}
|
|
12215
12289
|
|
|
12216
12290
|
/* ----------------------------------------------------- */
|
|
12217
12291
|
/* References Layout */
|
|
12218
|
-
.references-layout[data-v-
|
|
12292
|
+
.references-layout[data-v-07ea94ee] {
|
|
12219
12293
|
/* Try to fill the container */
|
|
12220
12294
|
min-height: 100dvh;
|
|
12221
12295
|
min-width: 100%;
|
|
@@ -12239,44 +12313,44 @@ div + .userMessage[data-v-8e43ed7a] {
|
|
|
12239
12313
|
|
|
12240
12314
|
background: var(--scalar-background-1);
|
|
12241
12315
|
}
|
|
12242
|
-
.references-editor[data-v-
|
|
12316
|
+
.references-editor[data-v-07ea94ee] {
|
|
12243
12317
|
grid-area: editor;
|
|
12244
12318
|
display: flex;
|
|
12245
12319
|
min-width: 0;
|
|
12246
12320
|
background: var(--scalar-background-1);
|
|
12247
12321
|
}
|
|
12248
|
-
.references-rendered[data-v-
|
|
12322
|
+
.references-rendered[data-v-07ea94ee] {
|
|
12249
12323
|
position: relative;
|
|
12250
12324
|
grid-area: rendered;
|
|
12251
12325
|
min-width: 0;
|
|
12252
12326
|
background: var(--scalar-background-1);
|
|
12253
12327
|
}
|
|
12254
|
-
.scalar-api-reference.references-classic[data-v-
|
|
12255
|
-
.references-classic .references-rendered[data-v-
|
|
12328
|
+
.scalar-api-reference.references-classic[data-v-07ea94ee],
|
|
12329
|
+
.references-classic .references-rendered[data-v-07ea94ee] {
|
|
12256
12330
|
height: initial !important;
|
|
12257
12331
|
max-height: initial !important;
|
|
12258
12332
|
}
|
|
12259
12333
|
@layer scalar-config {
|
|
12260
|
-
.references-sidebar[data-v-
|
|
12334
|
+
.references-sidebar[data-v-07ea94ee] {
|
|
12261
12335
|
/* Set a default width if references are enabled */
|
|
12262
12336
|
--refs-sidebar-width: var(--scalar-sidebar-width, 288px);
|
|
12263
12337
|
}
|
|
12264
12338
|
}
|
|
12265
12339
|
|
|
12266
12340
|
/* Footer */
|
|
12267
|
-
.references-footer[data-v-
|
|
12341
|
+
.references-footer[data-v-07ea94ee] {
|
|
12268
12342
|
grid-area: footer;
|
|
12269
12343
|
}
|
|
12270
12344
|
/* ----------------------------------------------------- */
|
|
12271
12345
|
/* Responsive / Mobile Layout */
|
|
12272
12346
|
@media (max-width: 1000px) {
|
|
12273
12347
|
/* Keep toolbar hidden on mobile without forcing desktop display mode. */
|
|
12274
|
-
.references-developer-tools[data-v-
|
|
12348
|
+
.references-developer-tools[data-v-07ea94ee] {
|
|
12275
12349
|
display: none;
|
|
12276
12350
|
}
|
|
12277
12351
|
|
|
12278
12352
|
/* Stack view on mobile */
|
|
12279
|
-
.references-layout[data-v-
|
|
12353
|
+
.references-layout[data-v-07ea94ee] {
|
|
12280
12354
|
/* Adjust the sidebar height to the viewport height minus the header height */
|
|
12281
12355
|
--refs-sidebar-height: calc(
|
|
12282
12356
|
var(--full-height, 100dvh) - var(--scalar-custom-header-height, 0px)
|
|
@@ -12291,13 +12365,13 @@ div + .userMessage[data-v-8e43ed7a] {
|
|
|
12291
12365
|
'rendered'
|
|
12292
12366
|
'footer';
|
|
12293
12367
|
}
|
|
12294
|
-
.references-editable[data-v-
|
|
12368
|
+
.references-editable[data-v-07ea94ee] {
|
|
12295
12369
|
grid-template-areas:
|
|
12296
12370
|
'header'
|
|
12297
12371
|
'navigation'
|
|
12298
12372
|
'editor';
|
|
12299
12373
|
}
|
|
12300
|
-
.references-rendered[data-v-
|
|
12374
|
+
.references-rendered[data-v-07ea94ee] {
|
|
12301
12375
|
position: static;
|
|
12302
12376
|
}
|
|
12303
12377
|
}
|
|
@@ -12308,12 +12382,12 @@ div + .userMessage[data-v-8e43ed7a] {
|
|
|
12308
12382
|
* when the new elements are available
|
|
12309
12383
|
*/
|
|
12310
12384
|
@media (max-width: 1000px) {
|
|
12311
|
-
.scalar-api-references-standalone-mobile[data-v-
|
|
12385
|
+
.scalar-api-references-standalone-mobile[data-v-07ea94ee]:not(.references-classic) {
|
|
12312
12386
|
--scalar-header-height: 50px;
|
|
12313
12387
|
}
|
|
12314
12388
|
}
|
|
12315
12389
|
|
|
12316
|
-
.darklight-reference[data-v-
|
|
12390
|
+
.darklight-reference[data-v-07ea94ee] {
|
|
12317
12391
|
width: 100%;
|
|
12318
12392
|
margin-top: auto;
|
|
12319
12393
|
}
|