@scalar/api-reference 1.44.4 → 1.44.7
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 +44 -0
- package/dist/browser/standalone.js +1948 -1944
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/AgentScalar/index.d.ts +0 -1
- package/dist/components/AgentScalar/index.d.ts.map +1 -1
- package/dist/components/ApiReference.vue.d.ts.map +1 -1
- package/dist/components/ApiReference.vue.js +1 -1
- package/dist/components/ApiReference.vue2.js +7 -16
- package/dist/components/Content/Schema/SchemaComposition.vue.d.ts +3 -2
- package/dist/components/Content/Schema/SchemaComposition.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.js +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue2.js +1 -1
- package/dist/components/Content/Schema/helpers/get-ref-name.d.ts +1 -2
- package/dist/components/Content/Schema/helpers/get-ref-name.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/get-ref-name.js +1 -5
- package/dist/components/Content/Schema/helpers/get-schema-type.d.ts +2 -1
- package/dist/components/Content/Schema/helpers/get-schema-type.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/get-schema-type.js +7 -1
- package/dist/components/Content/Schema/helpers/optimize-value-for-display.d.ts +5 -1
- package/dist/components/Content/Schema/helpers/optimize-value-for-display.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/optimize-value-for-display.js +2 -0
- package/dist/components/Content/Schema/helpers/schema-name.js +1 -1
- package/dist/features/ask-agent-button/AskAgentButton.vue.d.ts.map +1 -1
- package/dist/features/ask-agent-button/AskAgentButton.vue.js +1 -1
- package/dist/style.css +149 -120
- package/package.json +12 -12
- package/dist/components/AgentScalar/AgentScalarTooltip.vue.d.ts +0 -19
- package/dist/components/AgentScalar/AgentScalarTooltip.vue.d.ts.map +0 -1
- package/dist/components/AgentScalar/AgentScalarTooltip.vue.js +0 -35
- package/dist/components/AgentScalar/AgentScalarTooltip.vue2.js +0 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/AgentScalar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AACtE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,yBAAyB,CAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/AgentScalar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AACtE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,yBAAyB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiReference.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApiReference.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ApiReference.vue.d.ts","sourceRoot":"","sources":["../../src/components/ApiReference.vue"],"names":[],"mappings":"AAisCA,OAAO,EAEL,KAAK,4BAA4B,EAGlC,MAAM,6BAA6B,CAAA;AA4BpC,OAAO,8BAA8B,CAAA;AAiCrC,KAAK,WAAW,GAAG;IACjB;;;OAGG;IACH,aAAa,CAAC,EAAE,4BAA4B,CAAA;CAC7C,CAAC;AAGF,KAAK,WAAW,GAAG;IACjB,eAAe,CAAC,IAAI;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;IAC1C,aAAa,CAAC,IAAI;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;IACxC,eAAe,CAAC,IAAI;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;IAC1C,aAAa,CAAC,IAAI;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;IACxC,oBAAoB,CAAC,IAAI;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;IAC/C,MAAM,CAAC,IAAI;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;CAClC,CAAC;AAyvCF,QAAA,MAAM,eAAe;;;oPAOnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -4,7 +4,7 @@ import _sfc_main from "./ApiReference.vue2.js";
|
|
|
4
4
|
/* empty css */
|
|
5
5
|
/* empty css */
|
|
6
6
|
import _export_sfc from "../_virtual/_plugin-vue_export-helper.js";
|
|
7
|
-
const ApiReference = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
7
|
+
const ApiReference = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-b69294a9"]]);
|
|
8
8
|
export {
|
|
9
9
|
ApiReference as default
|
|
10
10
|
};
|
|
@@ -20,12 +20,12 @@ import "@scalar/agent-chat/style.css";
|
|
|
20
20
|
import { isLocalUrl } from "@scalar/helpers/url/is-local-url";
|
|
21
21
|
import { useScrollLock } from "@vueuse/core";
|
|
22
22
|
import ClassicHeader from "./ClassicHeader.vue.js";
|
|
23
|
-
import _sfc_main$
|
|
23
|
+
import _sfc_main$5 from "./Content/Content.vue.js";
|
|
24
24
|
/* empty css */
|
|
25
25
|
import _sfc_main$1 from "./MobileHeader.vue.js";
|
|
26
26
|
import _sfc_main$2 from "../features/multiple-documents/DocumentSelector.vue.js";
|
|
27
27
|
import _sfc_main$3 from "../features/Search/components/SearchButton.vue.js";
|
|
28
|
-
import _sfc_main$
|
|
28
|
+
import _sfc_main$6 from "../features/toolbar/ApiReferenceToolbar.vue.js";
|
|
29
29
|
import { getSystemModePreference } from "../helpers/color-mode.js";
|
|
30
30
|
import { downloadDocument } from "../helpers/download.js";
|
|
31
31
|
import { getIdFromUrl, makeUrlFromId } from "../helpers/id-routing.js";
|
|
@@ -39,8 +39,7 @@ import { persistencePlugin } from "../plugins/persistance-plugin.js";
|
|
|
39
39
|
import { PLUGIN_MANAGER_SYMBOL } from "../plugins/hooks/usePluginManager.js";
|
|
40
40
|
import { createPluginManager } from "../plugins/plugin-manager.js";
|
|
41
41
|
import AgentScalarDrawer from "./AgentScalar/AgentScalarDrawer.vue.js";
|
|
42
|
-
import _sfc_main$4 from "./AgentScalar/
|
|
43
|
-
import _sfc_main$5 from "./AgentScalar/AgentScalarButton.vue.js";
|
|
42
|
+
import _sfc_main$4 from "./AgentScalar/AgentScalarButton.vue.js";
|
|
44
43
|
const _hoisted_1 = {
|
|
45
44
|
key: 1,
|
|
46
45
|
class: "flex gap-1.5 p-3 pt-1.5"
|
|
@@ -531,7 +530,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
531
530
|
_ctx.$attrs.class
|
|
532
531
|
]])
|
|
533
532
|
}, [
|
|
534
|
-
unref(agent).agentEnabled ? (openBlock(), createBlock(unref(AgentScalarDrawer), {
|
|
533
|
+
unref(agent).agentEnabled.value ? (openBlock(), createBlock(unref(AgentScalarDrawer), {
|
|
535
534
|
key: 0,
|
|
536
535
|
agentScalarConfiguration: configList.value[activeSlug.value]?.agent,
|
|
537
536
|
eventBus: unref(eventBus),
|
|
@@ -583,15 +582,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
583
582
|
hideModels: mergedConfig.value.hideModels,
|
|
584
583
|
searchHotKey: mergedConfig.value.searchHotKey
|
|
585
584
|
}, null, 8, ["document", "eventBus", "hideModels", "searchHotKey"]),
|
|
586
|
-
unref(agent).agentEnabled ? (openBlock(), createBlock(unref(_sfc_main$4), {
|
|
587
|
-
key: 0,
|
|
588
|
-
agentScalarConfiguration: configList.value[activeSlug.value]?.agent
|
|
589
|
-
}, {
|
|
590
|
-
default: withCtx(() => [
|
|
591
|
-
createVNode(unref(_sfc_main$5))
|
|
592
|
-
]),
|
|
593
|
-
_: 1
|
|
594
|
-
}, 8, ["agentScalarConfiguration"])) : createCommentVNode("", true)
|
|
585
|
+
unref(agent).agentEnabled.value ? (openBlock(), createBlock(unref(_sfc_main$4), { key: 0 })) : createCommentVNode("", true)
|
|
595
586
|
])) : createCommentVNode("", true),
|
|
596
587
|
renderSlot(_ctx.$slots, "sidebar-start", normalizeProps(guardReactiveProps(slotProps.value)), void 0, true)
|
|
597
588
|
]),
|
|
@@ -627,7 +618,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
627
618
|
"aria-label": `Open API Documentation for ${unref(workspaceStore).workspace.activeDocument?.info?.title}`,
|
|
628
619
|
class: "references-rendered"
|
|
629
620
|
}, [
|
|
630
|
-
createVNode(_sfc_main$
|
|
621
|
+
createVNode(_sfc_main$5, {
|
|
631
622
|
document: unref(workspaceStore).workspace.activeDocument,
|
|
632
623
|
environment: environment.value,
|
|
633
624
|
eventBus: unref(eventBus),
|
|
@@ -639,7 +630,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
639
630
|
xScalarDefaultClient: unref(workspaceStore).workspace["x-scalar-default-client"]
|
|
640
631
|
}, createSlots({
|
|
641
632
|
start: withCtx(() => [
|
|
642
|
-
unref(workspaceStore).workspace.activeDocument && unref(mediaQueries).lg.value ? (openBlock(), createBlock(_sfc_main$
|
|
633
|
+
unref(workspaceStore).workspace.activeDocument && unref(mediaQueries).lg.value ? (openBlock(), createBlock(_sfc_main$6, {
|
|
643
634
|
key: 0,
|
|
644
635
|
overrides: configurationOverrides.value,
|
|
645
636
|
"onUpdate:overrides": _cache[3] || (_cache[3] = ($event) => configurationOverrides.value = $event),
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
2
|
-
import type { DiscriminatorObject
|
|
2
|
+
import type { DiscriminatorObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
3
|
+
import type { SchemaWithOriginalRef } from '../../../components/Content/Schema/helpers/optimize-value-for-display.js';
|
|
3
4
|
import type { SchemaOptions } from '../../../components/Content/Schema/types';
|
|
4
5
|
import { type CompositionKeyword } from './helpers/schema-composition.js';
|
|
5
6
|
type __VLS_Props = {
|
|
@@ -10,7 +11,7 @@ type __VLS_Props = {
|
|
|
10
11
|
/** Optional name for the schema */
|
|
11
12
|
name?: string;
|
|
12
13
|
/** The schema value containing the composition */
|
|
13
|
-
schema:
|
|
14
|
+
schema: SchemaWithOriginalRef;
|
|
14
15
|
/** Nesting level for proper indentation */
|
|
15
16
|
level: number;
|
|
16
17
|
/** Whether to use compact layout */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaComposition.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaComposition.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SchemaComposition.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaComposition.vue"],"names":[],"mappings":"AA0JA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8DAA8D,CAAA;AAGvG,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gEAAgE,CAAA;AAC3G,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAA;AAItE,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AAGtE,KAAK,WAAW,GAAG;IACf,oDAAoD;IACpD,WAAW,EAAE,kBAAkB,CAAA;IAC/B,4DAA4D;IAC5D,aAAa,CAAC,EAAE,mBAAmB,CAAA;IACnC,mCAAmC;IACnC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,kDAAkD;IAClD,MAAM,EAAE,qBAAqB,CAAA;IAC7B,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAA;IACb,oCAAoC;IACpC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,kCAAkC;IAClC,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,gCAAgC;IAChC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,iCAAiC;IACjC,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,yEAAyE;IACzE,OAAO,EAAE,aAAa,CAAA;CACvB,CAAC;;aATU,OAAO;iBAEH,OAAO;;AAgOzB,wBAOG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaProperty.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaProperty.vue"],"names":[],"mappings":"AAyaA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EACV,mBAAmB,EACnB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAErE,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,KAAK,CAAA;AAI9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAA;AAetE;;;;;GAKG;AAEH,KAAK,WAAW,GAAG;IACf,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACvB,MAAM,EAAE,YAAY,GAAG,SAAS,CAAA;IAChC,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,aAAa,CAAC,EAAE,mBAAmB,CAAA;IACnC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,OAAO,CAAC,EAAE,sBAAsB,GAAG,mBAAmB,CAAA;IACtD,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,OAAO,EAAE,aAAa,CAAA;CACvB,CAAC;;WAZQ,MAAM;cAEH,OAAO;aACR,OAAO;oBAGA,OAAO;;
|
|
1
|
+
{"version":3,"file":"SchemaProperty.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Schema/SchemaProperty.vue"],"names":[],"mappings":"AAyaA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EACV,mBAAmB,EACnB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAErE,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,KAAK,CAAA;AAI9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAA;AAetE;;;;;GAKG;AAEH,KAAK,WAAW,GAAG;IACf,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACvB,MAAM,EAAE,YAAY,GAAG,SAAS,CAAA;IAChC,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,aAAa,CAAC,EAAE,mBAAmB,CAAA;IACnC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,OAAO,CAAC,EAAE,sBAAsB,GAAG,mBAAmB,CAAA;IACtD,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAClC,OAAO,EAAE,aAAa,CAAA;CACvB,CAAC;;WAZQ,MAAM;cAEH,OAAO;aACR,OAAO;oBAGA,OAAO;;AAsc5B,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./SchemaProperty.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const SchemaProperty = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const SchemaProperty = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-8da63347"]]);
|
|
5
5
|
export {
|
|
6
6
|
SchemaProperty as default
|
|
7
7
|
};
|
|
@@ -205,7 +205,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
205
205
|
name: __props.name,
|
|
206
206
|
noncollapsible: __props.noncollapsible,
|
|
207
207
|
options: __props.options,
|
|
208
|
-
schema:
|
|
208
|
+
schema: compositionData.value
|
|
209
209
|
}, null, 8, ["breadcrumb", "compact", "composition", "discriminator", "eventBus", "hideHeading", "level", "name", "noncollapsible", "options", "schema"]);
|
|
210
210
|
}), 128)),
|
|
211
211
|
createVNode(unref(_sfc_main$3), { value: optimizedValue.value }, null, 8, ["value"])
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { ReferenceType, SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
2
1
|
/**
|
|
3
2
|
* Gets the "name" of the schema from the ref path
|
|
4
3
|
* TODO: this will change so fix it when the new refs are out
|
|
@@ -6,5 +5,5 @@ import type { ReferenceType, SchemaObject } from '@scalar/workspace-store/schema
|
|
|
6
5
|
*
|
|
7
6
|
* @example SchemaName from #/components/schemas/SchemaName
|
|
8
7
|
*/
|
|
9
|
-
export declare const getRefName: (
|
|
8
|
+
export declare const getRefName: (ref: string) => string | null | undefined;
|
|
10
9
|
//# sourceMappingURL=get-ref-name.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-ref-name.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Schema/helpers/get-ref-name.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-ref-name.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Schema/helpers/get-ref-name.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,GAAI,KAAK,MAAM,8BAWrC,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ReferenceType, SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
2
|
+
import type { SchemaWithOriginalRef } from '../../../../components/Content/Schema/helpers/optimize-value-for-display.js';
|
|
2
3
|
/**
|
|
3
4
|
* Computes the human-readable type for a schema.
|
|
4
5
|
*
|
|
@@ -11,5 +12,5 @@ import type { ReferenceType, SchemaObject } from '@scalar/workspace-store/schema
|
|
|
11
12
|
* 6. $ref names
|
|
12
13
|
* 7. raw type
|
|
13
14
|
*/
|
|
14
|
-
export declare const getSchemaType: (valueOrRef:
|
|
15
|
+
export declare const getSchemaType: (valueOrRef: SchemaWithOriginalRef | ReferenceType<SchemaObject>) => string;
|
|
15
16
|
//# sourceMappingURL=get-schema-type.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-schema-type.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Schema/helpers/get-schema-type.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;
|
|
1
|
+
{"version":3,"file":"get-schema-type.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Schema/helpers/get-schema-type.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAI/G,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gEAAgE,CAAA;AAiC3G;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,aAAa,GAAI,YAAY,qBAAqB,GAAG,aAAa,CAAC,YAAY,CAAC,KAAG,MAkE/F,CAAA"}
|
|
@@ -47,8 +47,14 @@ const getSchemaType = (valueOrRef) => {
|
|
|
47
47
|
if ("type" in value && value.type && value.contentEncoding) {
|
|
48
48
|
return `${value.type} • ${value.contentEncoding}`;
|
|
49
49
|
}
|
|
50
|
+
if ("originalRef" in valueOrRef && valueOrRef.originalRef) {
|
|
51
|
+
const refName = getRefName(valueOrRef.originalRef);
|
|
52
|
+
if (refName) {
|
|
53
|
+
return refName;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
50
56
|
if ("$ref" in valueOrRef) {
|
|
51
|
-
const refName = getRefName(valueOrRef);
|
|
57
|
+
const refName = getRefName(valueOrRef.$ref);
|
|
52
58
|
if (refName) {
|
|
53
59
|
return refName;
|
|
54
60
|
}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import type { SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
2
|
+
/** We need to keep the original ref after we resolve for display purposes */
|
|
3
|
+
export type SchemaWithOriginalRef = SchemaObject & {
|
|
4
|
+
originalRef?: string;
|
|
5
|
+
};
|
|
2
6
|
/**
|
|
3
7
|
* Optimize the value by removing nulls from compositions and merging root properties.
|
|
4
8
|
*
|
|
5
9
|
* TODO: figure out what this does
|
|
6
10
|
*/
|
|
7
|
-
export declare function optimizeValueForDisplay(value: SchemaObject | undefined):
|
|
11
|
+
export declare function optimizeValueForDisplay(value: SchemaObject | undefined): SchemaWithOriginalRef | undefined;
|
|
8
12
|
//# sourceMappingURL=optimize-value-for-display.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"optimize-value-for-display.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Schema/helpers/optimize-value-for-display.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAIhG;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,YAAY,GAAG,SAAS,GAAG,
|
|
1
|
+
{"version":3,"file":"optimize-value-for-display.d.ts","sourceRoot":"","sources":["../../../../../src/components/Content/Schema/helpers/optimize-value-for-display.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAIhG,6EAA6E;AAC7E,MAAM,MAAM,qBAAqB,GAAG,YAAY,GAAG;IAAE,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAE3E;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,YAAY,GAAG,SAAS,GAAG,qBAAqB,GAAG,SAAS,CA0F1G"}
|
|
@@ -19,6 +19,8 @@ function optimizeValueForDisplay(value) {
|
|
|
19
19
|
const schema = getResolvedRef(_schema);
|
|
20
20
|
if ("type" in schema && schema.type === "null") {
|
|
21
21
|
acc.hasNullSchema = true;
|
|
22
|
+
} else if ("$ref" in _schema && _schema.$ref) {
|
|
23
|
+
acc.filteredSchemas.push({ ...schema, originalRef: _schema.$ref });
|
|
22
24
|
} else {
|
|
23
25
|
acc.filteredSchemas.push(schema);
|
|
24
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AskAgentButton.vue.d.ts","sourceRoot":"","sources":["../../../src/features/ask-agent-button/AskAgentButton.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"AskAgentButton.vue.d.ts","sourceRoot":"","sources":["../../../src/features/ask-agent-button/AskAgentButton.vue"],"names":[],"mappings":";AAiPA,wBAKG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./AskAgentButton.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const AskAgentButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const AskAgentButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-b5a61e43"]]);
|
|
5
5
|
export {
|
|
6
6
|
AskAgentButton as default
|
|
7
7
|
};
|