fumadocs-openapi 10.8.1 → 10.8.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/css/generated/shared.css +4 -1
- package/dist/node_modules/.pnpm/{@scalar_helpers@0.5.2 → @scalar_helpers@0.6.0}/node_modules/@scalar/helpers/dist/general/create-limiter.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_helpers@0.5.2 → @scalar_helpers@0.6.0}/node_modules/@scalar/helpers/dist/object/is-object.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_helpers@0.5.2 → @scalar_helpers@0.6.0}/node_modules/@scalar/helpers/dist/object/prevent-pollution.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_helpers@0.5.2 → @scalar_helpers@0.6.0}/node_modules/@scalar/helpers/dist/queue/queue.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_helpers@0.5.2 → @scalar_helpers@0.6.0}/node_modules/@scalar/helpers/dist/string/generate-hash.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.8 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/bundle/bundle.js +2 -2
- package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.8 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/bundle/plugins/fetch-urls/index.js +2 -2
- package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.12/node_modules/@scalar/json-magic/dist/bundle/plugins/parse-yaml/index.js +1 -0
- package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.8 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/bundle/plugins/read-files/index.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.8 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/bundle/value-generator.js +2 -2
- package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.8 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/helpers/convert-to-local-ref.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.8 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/helpers/escape-json-pointer.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.8 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/helpers/get-schemas.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.8 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/helpers/get-segments-from-path.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.8 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/helpers/get-value-by-path.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.8 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/helpers/is-file-path.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.8 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/helpers/is-http-url.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.8 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/helpers/is-json-object.js +2 -2
- package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.8 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/helpers/is-yaml.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.8 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/helpers/normalize.js +3 -3
- package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.8 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/helpers/resolve-reference-path.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.8 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/helpers/set-value-at-path.js +2 -2
- package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.8 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/helpers/to-relative-path.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.8 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/helpers/unescape-json-pointer.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_openapi-upgrader@0.2.6 → @scalar_openapi-upgrader@0.2.7}/node_modules/@scalar/openapi-upgrader/dist/2.0-to-3.0/upgrade-from-two-to-three.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_openapi-upgrader@0.2.6 → @scalar_openapi-upgrader@0.2.7}/node_modules/@scalar/openapi-upgrader/dist/3.0-to-3.1/upgrade-from-three-to-three-one.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_openapi-upgrader@0.2.6 → @scalar_openapi-upgrader@0.2.7}/node_modules/@scalar/openapi-upgrader/dist/3.1-to-3.2/upgrade-from-three-one-to-three-two.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_openapi-upgrader@0.2.6 → @scalar_openapi-upgrader@0.2.7}/node_modules/@scalar/openapi-upgrader/dist/helpers/traverse.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_openapi-upgrader@0.2.6 → @scalar_openapi-upgrader@0.2.7}/node_modules/@scalar/openapi-upgrader/dist/upgrade.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/compose/compose-collection.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/compose/compose-doc.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/compose/compose-node.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/compose/compose-scalar.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/compose/composer.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/compose/resolve-block-map.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/compose/resolve-block-scalar.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/compose/resolve-block-seq.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/compose/resolve-end.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +5 -8
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/compose/resolve-props.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/compose/util-contains-newline.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/compose/util-flow-indent-check.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/compose/util-map-includes.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/doc/Document.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/doc/anchors.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/doc/applyReviver.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/doc/createNode.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/doc/directives.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/errors.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/log.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/nodes/Alias.js +2 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/nodes/Collection.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/nodes/Node.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/nodes/Pair.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/nodes/Scalar.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/nodes/YAMLMap.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/nodes/YAMLSeq.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/nodes/identity.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/nodes/toJS.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/parse/cst-visit.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/parse/lexer.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/parse/line-counter.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/parse/parser.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/public-api.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/Schema.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/common/map.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/common/null.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/common/seq.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/common/string.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/core/bool.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/core/float.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/core/int.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/core/schema.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/json/schema.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/tags.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/yaml-1.1/float.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/yaml-1.1/int.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js +9 -6
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/yaml-1.1/set.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/stringify/foldFlowLines.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/stringify/stringify.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/stringify/stringifyCollection.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/stringify/stringifyComment.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/stringify/stringifyDocument.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/stringify/stringifyNumber.js +2 -2
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/stringify/stringifyPair.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/stringify/stringifyString.js +1 -1
- package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/visit.js +1 -1
- package/dist/playground/client.d.ts +2 -0
- package/dist/playground/client.js +2 -2
- package/dist/server/source-api.d.ts +1 -0
- package/dist/server/source-api.js +6 -1
- package/dist/ui/base.js +2 -1
- package/dist/ui/create-client.js +2 -1
- package/dist/ui/operation/index.js +15 -3
- package/dist/ui/operation/usage-tabs/client.js +4 -1
- package/dist/utils/document/process.js +5 -5
- package/dist/utils/pages/builder.d.ts +1 -0
- package/dist/utils/pages/preset-auto.js +9 -6
- package/dist/utils/pages/to-text.d.ts +1 -1
- package/dist/utils/pages/to-text.js +17 -22
- package/dist/utils/schema/index.d.ts +4 -0
- package/dist/utils/schema/to-string.js +11 -8
- package/package.json +16 -19
- package/dist/node_modules/.pnpm/@scalar_json-magic@0.12.8/node_modules/@scalar/json-magic/dist/bundle/plugins/parse-yaml/index.js +0 -1
- /package/dist/node_modules/.pnpm/{@scalar_json-magic@0.12.8 → @scalar_json-magic@0.12.12}/node_modules/@scalar/json-magic/dist/bundle/plugins/node.js +0 -0
- /package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/index.js +0 -0
- /package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/parse/cst-scalar.js +0 -0
- /package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/parse/cst.js +0 -0
- /package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/index.js +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SCALAR } from "./identity.js";
|
|
2
2
|
import { toJS } from "./toJS.js";
|
|
3
3
|
import { NodeBase } from "./Node.js";
|
|
4
|
-
//#region ../../node_modules/.pnpm/yaml@2.8.
|
|
4
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/node_modules/yaml/browser/dist/nodes/Scalar.js
|
|
5
5
|
const isScalarValue = (value) => !value || typeof value !== "function" && typeof value !== "object";
|
|
6
6
|
var Scalar = class extends NodeBase {
|
|
7
7
|
constructor(value) {
|
|
@@ -4,7 +4,7 @@ import { Collection } from "./Collection.js";
|
|
|
4
4
|
import { addPairToJSMap } from "./addPairToJSMap.js";
|
|
5
5
|
import { Pair, createPair } from "./Pair.js";
|
|
6
6
|
import { stringifyCollection } from "../stringify/stringifyCollection.js";
|
|
7
|
-
//#region ../../node_modules/.pnpm/yaml@2.8.
|
|
7
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/node_modules/yaml/browser/dist/nodes/YAMLMap.js
|
|
8
8
|
function findPair(items, key) {
|
|
9
9
|
const k = isScalar(key) ? key.value : key;
|
|
10
10
|
for (const it of items) if (isPair(it)) {
|
|
@@ -4,7 +4,7 @@ import { isScalarValue } from "./Scalar.js";
|
|
|
4
4
|
import { createNode } from "../doc/createNode.js";
|
|
5
5
|
import { Collection } from "./Collection.js";
|
|
6
6
|
import { stringifyCollection } from "../stringify/stringifyCollection.js";
|
|
7
|
-
//#region ../../node_modules/.pnpm/yaml@2.8.
|
|
7
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/node_modules/yaml/browser/dist/nodes/YAMLSeq.js
|
|
8
8
|
var YAMLSeq = class extends Collection {
|
|
9
9
|
static get tagName() {
|
|
10
10
|
return "tag:yaml.org,2002:seq";
|
|
@@ -3,7 +3,7 @@ import { toJS } from "./toJS.js";
|
|
|
3
3
|
import { createStringifyContext } from "../stringify/stringify.js";
|
|
4
4
|
import { warn } from "../log.js";
|
|
5
5
|
import { addMergeToJSMap, isMergeKey } from "../schema/yaml-1.1/merge.js";
|
|
6
|
-
//#region ../../node_modules/.pnpm/yaml@2.8.
|
|
6
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js
|
|
7
7
|
function addPairToJSMap(ctx, map, { key, value }) {
|
|
8
8
|
if (isNode(key) && key.addToJSMap) key.addToJSMap(ctx, map, value);
|
|
9
9
|
else if (isMergeKey(ctx, key)) addMergeToJSMap(ctx, map, value);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/yaml@2.8.
|
|
1
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/node_modules/yaml/browser/dist/nodes/identity.js
|
|
2
2
|
const ALIAS = Symbol.for("yaml.alias");
|
|
3
3
|
const DOC = Symbol.for("yaml.document");
|
|
4
4
|
const MAP = Symbol.for("yaml.map");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { hasAnchor } from "./identity.js";
|
|
2
|
-
//#region ../../node_modules/.pnpm/yaml@2.8.
|
|
2
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/node_modules/yaml/browser/dist/nodes/toJS.js
|
|
3
3
|
/**
|
|
4
4
|
* Recursively convert any node or its contents to native JavaScript
|
|
5
5
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/yaml@2.8.
|
|
1
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/node_modules/yaml/browser/dist/parse/cst-visit.js
|
|
2
2
|
const BREAK = Symbol("break visit");
|
|
3
3
|
const SKIP = Symbol("skip children");
|
|
4
4
|
const REMOVE = Symbol("remove item");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/yaml@2.8.
|
|
1
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/node_modules/yaml/browser/dist/parse/line-counter.js
|
|
2
2
|
/**
|
|
3
3
|
* Tracks newlines during parsing in order to provide an efficient API for
|
|
4
4
|
* determining the one-indexed `{ line, col }` position for any offset
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { tokenType } from "./cst.js";
|
|
2
2
|
import { Lexer } from "./lexer.js";
|
|
3
|
-
//#region ../../node_modules/.pnpm/yaml@2.8.
|
|
3
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/node_modules/yaml/browser/dist/parse/parser.js
|
|
4
4
|
function includesToken(list, type) {
|
|
5
5
|
for (let i = 0; i < list.length; ++i) if (list[i].type === type) return true;
|
|
6
6
|
return false;
|
|
@@ -4,7 +4,7 @@ import { YAMLParseError, prettifyError } from "./errors.js";
|
|
|
4
4
|
import { Composer } from "./compose/composer.js";
|
|
5
5
|
import { LineCounter } from "./parse/line-counter.js";
|
|
6
6
|
import { Parser } from "./parse/parser.js";
|
|
7
|
-
//#region ../../node_modules/.pnpm/yaml@2.8.
|
|
7
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/node_modules/yaml/browser/dist/public-api.js
|
|
8
8
|
function parseOptions(options) {
|
|
9
9
|
const prettyErrors = options.prettyErrors !== false;
|
|
10
10
|
return {
|
|
@@ -3,7 +3,7 @@ import { map } from "./common/map.js";
|
|
|
3
3
|
import { seq } from "./common/seq.js";
|
|
4
4
|
import { string } from "./common/string.js";
|
|
5
5
|
import { coreKnownTags, getTags } from "./tags.js";
|
|
6
|
-
//#region ../../node_modules/.pnpm/yaml@2.8.
|
|
6
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/node_modules/yaml/browser/dist/schema/Schema.js
|
|
7
7
|
const sortMapEntriesByKey = (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0;
|
|
8
8
|
var Schema = class Schema {
|
|
9
9
|
constructor({ compat, customTags, merge, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isMap } from "../../nodes/identity.js";
|
|
2
2
|
import { YAMLMap } from "../../nodes/YAMLMap.js";
|
|
3
|
-
//#region ../../node_modules/.pnpm/yaml@2.8.
|
|
3
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/node_modules/yaml/browser/dist/schema/common/map.js
|
|
4
4
|
const map = {
|
|
5
5
|
collection: "map",
|
|
6
6
|
default: true,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Scalar } from "../../nodes/Scalar.js";
|
|
2
|
-
//#region ../../node_modules/.pnpm/yaml@2.8.
|
|
2
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/node_modules/yaml/browser/dist/schema/common/null.js
|
|
3
3
|
const nullTag = {
|
|
4
4
|
identify: (value) => value == null,
|
|
5
5
|
createNode: () => new Scalar(null),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isSeq } from "../../nodes/identity.js";
|
|
2
2
|
import { YAMLSeq } from "../../nodes/YAMLSeq.js";
|
|
3
|
-
//#region ../../node_modules/.pnpm/yaml@2.8.
|
|
3
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/node_modules/yaml/browser/dist/schema/common/seq.js
|
|
4
4
|
const seq = {
|
|
5
5
|
collection: "seq",
|
|
6
6
|
default: true,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { stringifyString } from "../../stringify/stringifyString.js";
|
|
2
|
-
//#region ../../node_modules/.pnpm/yaml@2.8.
|
|
2
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/node_modules/yaml/browser/dist/schema/common/string.js
|
|
3
3
|
const string = {
|
|
4
4
|
identify: (value) => typeof value === "string",
|
|
5
5
|
default: true,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Scalar } from "../../nodes/Scalar.js";
|
|
2
|
-
//#region ../../node_modules/.pnpm/yaml@2.8.
|
|
2
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/node_modules/yaml/browser/dist/schema/core/bool.js
|
|
3
3
|
const boolTag = {
|
|
4
4
|
identify: (value) => typeof value === "boolean",
|
|
5
5
|
default: true,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Scalar } from "../../nodes/Scalar.js";
|
|
2
2
|
import { stringifyNumber } from "../../stringify/stringifyNumber.js";
|
|
3
|
-
//#region ../../node_modules/.pnpm/yaml@2.8.
|
|
3
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/node_modules/yaml/browser/dist/schema/core/float.js
|
|
4
4
|
const floatNaN = {
|
|
5
5
|
identify: (value) => typeof value === "number",
|
|
6
6
|
default: true,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { stringifyNumber } from "../../stringify/stringifyNumber.js";
|
|
2
|
-
//#region ../../node_modules/.pnpm/yaml@2.8.
|
|
2
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/node_modules/yaml/browser/dist/schema/core/int.js
|
|
3
3
|
const intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
|
|
4
4
|
const intResolve = (str, offset, radix, { intAsBigInt }) => intAsBigInt ? BigInt(str) : parseInt(str.substring(offset), radix);
|
|
5
5
|
function intStringify(node, radix, prefix) {
|
|
@@ -5,7 +5,7 @@ import { nullTag } from "../common/null.js";
|
|
|
5
5
|
import { boolTag } from "./bool.js";
|
|
6
6
|
import { float, floatExp, floatNaN } from "./float.js";
|
|
7
7
|
import { int, intHex, intOct } from "./int.js";
|
|
8
|
-
//#region ../../node_modules/.pnpm/yaml@2.8.
|
|
8
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/node_modules/yaml/browser/dist/schema/core/schema.js
|
|
9
9
|
const schema = [
|
|
10
10
|
map,
|
|
11
11
|
seq,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Scalar } from "../../nodes/Scalar.js";
|
|
2
2
|
import { map } from "../common/map.js";
|
|
3
3
|
import { seq } from "../common/seq.js";
|
|
4
|
-
//#region ../../node_modules/.pnpm/yaml@2.8.
|
|
4
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/node_modules/yaml/browser/dist/schema/json/schema.js
|
|
5
5
|
function intIdentify(value) {
|
|
6
6
|
return typeof value === "bigint" || Number.isInteger(value);
|
|
7
7
|
}
|
|
@@ -14,7 +14,7 @@ import { omap } from "./yaml-1.1/omap.js";
|
|
|
14
14
|
import { set } from "./yaml-1.1/set.js";
|
|
15
15
|
import { floatTime, intTime, timestamp } from "./yaml-1.1/timestamp.js";
|
|
16
16
|
import { schema as schema$2 } from "./yaml-1.1/schema.js";
|
|
17
|
-
//#region ../../node_modules/.pnpm/yaml@2.8.
|
|
17
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/node_modules/yaml/browser/dist/schema/tags.js
|
|
18
18
|
const schemas = new Map([
|
|
19
19
|
["core", schema],
|
|
20
20
|
["failsafe", [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Scalar } from "../../nodes/Scalar.js";
|
|
2
2
|
import { stringifyString } from "../../stringify/stringifyString.js";
|
|
3
|
-
//#region ../../node_modules/.pnpm/yaml@2.8.
|
|
3
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js
|
|
4
4
|
const binary = {
|
|
5
5
|
identify: (value) => value instanceof Uint8Array,
|
|
6
6
|
default: false,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Scalar } from "../../nodes/Scalar.js";
|
|
2
|
-
//#region ../../node_modules/.pnpm/yaml@2.8.
|
|
2
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js
|
|
3
3
|
function boolStringify({ value, source }, ctx) {
|
|
4
4
|
if (source && (value ? trueTag : falseTag).test.test(source)) return source;
|
|
5
5
|
return value ? ctx.options.trueStr : ctx.options.falseStr;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Scalar } from "../../nodes/Scalar.js";
|
|
2
2
|
import { stringifyNumber } from "../../stringify/stringifyNumber.js";
|
|
3
|
-
//#region ../../node_modules/.pnpm/yaml@2.8.
|
|
3
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/node_modules/yaml/browser/dist/schema/yaml-1.1/float.js
|
|
4
4
|
const floatNaN = {
|
|
5
5
|
identify: (value) => typeof value === "number",
|
|
6
6
|
default: true,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { stringifyNumber } from "../../stringify/stringifyNumber.js";
|
|
2
|
-
//#region ../../node_modules/.pnpm/yaml@2.8.
|
|
2
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/node_modules/yaml/browser/dist/schema/yaml-1.1/int.js
|
|
3
3
|
const intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
|
|
4
4
|
function intResolve(str, offset, radix, { intAsBigInt }) {
|
|
5
5
|
const sign = str[0];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isAlias, isMap, isScalar, isSeq } from "../../nodes/identity.js";
|
|
2
2
|
import { Scalar } from "../../nodes/Scalar.js";
|
|
3
|
-
//#region ../../node_modules/.pnpm/yaml@2.8.
|
|
3
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js
|
|
4
4
|
const MERGE_KEY = "<<";
|
|
5
5
|
const merge = {
|
|
6
6
|
identify: (value) => value === MERGE_KEY || typeof value === "symbol" && value.description === MERGE_KEY,
|
|
@@ -12,13 +12,13 @@ const merge = {
|
|
|
12
12
|
};
|
|
13
13
|
const isMergeKey = (ctx, key) => (merge.identify(key) || isScalar(key) && (!key.type || key.type === Scalar.PLAIN) && merge.identify(key.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge.tag && tag.default);
|
|
14
14
|
function addMergeToJSMap(ctx, map, value) {
|
|
15
|
-
|
|
16
|
-
if (isSeq(
|
|
17
|
-
else if (Array.isArray(
|
|
18
|
-
else mergeValue(ctx, map,
|
|
15
|
+
const source = resolveAliasValue(ctx, value);
|
|
16
|
+
if (isSeq(source)) for (const it of source.items) mergeValue(ctx, map, it);
|
|
17
|
+
else if (Array.isArray(source)) for (const it of source) mergeValue(ctx, map, it);
|
|
18
|
+
else mergeValue(ctx, map, source);
|
|
19
19
|
}
|
|
20
20
|
function mergeValue(ctx, map, value) {
|
|
21
|
-
const source = ctx
|
|
21
|
+
const source = resolveAliasValue(ctx, value);
|
|
22
22
|
if (!isMap(source)) throw new Error("Merge sources must be maps or map aliases");
|
|
23
23
|
const srcMap = source.toJSON(null, ctx, Map);
|
|
24
24
|
for (const [key, value] of srcMap) if (map instanceof Map) {
|
|
@@ -32,5 +32,8 @@ function mergeValue(ctx, map, value) {
|
|
|
32
32
|
});
|
|
33
33
|
return map;
|
|
34
34
|
}
|
|
35
|
+
function resolveAliasValue(ctx, value) {
|
|
36
|
+
return ctx && isAlias(value) ? value.resolve(ctx.doc, ctx) : value;
|
|
37
|
+
}
|
|
35
38
|
//#endregion
|
|
36
39
|
export { addMergeToJSMap, isMergeKey, merge };
|
|
@@ -3,7 +3,7 @@ import { toJS } from "../../nodes/toJS.js";
|
|
|
3
3
|
import { YAMLMap } from "../../nodes/YAMLMap.js";
|
|
4
4
|
import { YAMLSeq } from "../../nodes/YAMLSeq.js";
|
|
5
5
|
import { createPairs, resolvePairs } from "./pairs.js";
|
|
6
|
-
//#region ../../node_modules/.pnpm/yaml@2.8.
|
|
6
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js
|
|
7
7
|
var YAMLOMap = class YAMLOMap extends YAMLSeq {
|
|
8
8
|
constructor() {
|
|
9
9
|
super();
|
|
@@ -2,7 +2,7 @@ import { isMap, isPair, isSeq } from "../../nodes/identity.js";
|
|
|
2
2
|
import { Scalar } from "../../nodes/Scalar.js";
|
|
3
3
|
import { Pair, createPair } from "../../nodes/Pair.js";
|
|
4
4
|
import { YAMLSeq } from "../../nodes/YAMLSeq.js";
|
|
5
|
-
//#region ../../node_modules/.pnpm/yaml@2.8.
|
|
5
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js
|
|
6
6
|
function resolvePairs(seq, onError) {
|
|
7
7
|
if (isSeq(seq)) for (let i = 0; i < seq.items.length; ++i) {
|
|
8
8
|
let item = seq.items[i];
|
|
@@ -11,7 +11,7 @@ import { float, floatExp, floatNaN } from "./float.js";
|
|
|
11
11
|
import { int, intBin, intHex, intOct } from "./int.js";
|
|
12
12
|
import { set } from "./set.js";
|
|
13
13
|
import { floatTime, intTime, timestamp } from "./timestamp.js";
|
|
14
|
-
//#region ../../node_modules/.pnpm/yaml@2.8.
|
|
14
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js
|
|
15
15
|
const schema = [
|
|
16
16
|
map,
|
|
17
17
|
seq,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isMap, isPair, isScalar } from "../../nodes/identity.js";
|
|
2
2
|
import { Pair, createPair } from "../../nodes/Pair.js";
|
|
3
3
|
import { YAMLMap, findPair } from "../../nodes/YAMLMap.js";
|
|
4
|
-
//#region ../../node_modules/.pnpm/yaml@2.8.
|
|
4
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/node_modules/yaml/browser/dist/schema/yaml-1.1/set.js
|
|
5
5
|
var YAMLSet = class YAMLSet extends YAMLMap {
|
|
6
6
|
constructor(schema) {
|
|
7
7
|
super(schema);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { stringifyNumber } from "../../stringify/stringifyNumber.js";
|
|
2
|
-
//#region ../../node_modules/.pnpm/yaml@2.8.
|
|
2
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js
|
|
3
3
|
/** Internal types handle bigint as number, because TS can't figure it out. */
|
|
4
4
|
function parseSexagesimal(str, asBigInt) {
|
|
5
5
|
const sign = str[0];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/yaml@2.8.
|
|
1
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/node_modules/yaml/browser/dist/stringify/foldFlowLines.js
|
|
2
2
|
const FOLD_FLOW = "flow";
|
|
3
3
|
const FOLD_BLOCK = "block";
|
|
4
4
|
const FOLD_QUOTED = "quoted";
|
|
@@ -2,7 +2,7 @@ import { isAlias, isCollection, isNode, isPair, isScalar } from "../nodes/identi
|
|
|
2
2
|
import { anchorIsValid } from "../doc/anchors.js";
|
|
3
3
|
import { stringifyComment } from "./stringifyComment.js";
|
|
4
4
|
import { stringifyString } from "./stringifyString.js";
|
|
5
|
-
//#region ../../node_modules/.pnpm/yaml@2.8.
|
|
5
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/node_modules/yaml/browser/dist/stringify/stringify.js
|
|
6
6
|
function createStringifyContext(doc, options) {
|
|
7
7
|
const opt = Object.assign({
|
|
8
8
|
blockQuote: true,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isNode, isPair } from "../nodes/identity.js";
|
|
2
2
|
import { indentComment, lineComment } from "./stringifyComment.js";
|
|
3
3
|
import { stringify } from "./stringify.js";
|
|
4
|
-
//#region ../../node_modules/.pnpm/yaml@2.8.
|
|
4
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/node_modules/yaml/browser/dist/stringify/stringifyCollection.js
|
|
5
5
|
function stringifyCollection(collection, ctx, options) {
|
|
6
6
|
return (ctx.inFlow ?? collection.flow ? stringifyFlowCollection : stringifyBlockCollection)(collection, ctx, options);
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isNode } from "../nodes/identity.js";
|
|
2
2
|
import { indentComment, lineComment } from "./stringifyComment.js";
|
|
3
3
|
import { createStringifyContext, stringify } from "./stringify.js";
|
|
4
|
-
//#region ../../node_modules/.pnpm/yaml@2.8.
|
|
4
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/node_modules/yaml/browser/dist/stringify/stringifyDocument.js
|
|
5
5
|
function stringifyDocument(doc, options) {
|
|
6
6
|
const lines = [];
|
|
7
7
|
let hasDirectives = options.directives === true;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/yaml@2.8.
|
|
1
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/node_modules/yaml/browser/dist/stringify/stringifyNumber.js
|
|
2
2
|
function stringifyNumber({ format, minFractionDigits, tag, value }) {
|
|
3
3
|
if (typeof value === "bigint") return String(value);
|
|
4
4
|
const num = typeof value === "number" ? value : Number(value);
|
|
5
5
|
if (!isFinite(num)) return isNaN(num) ? ".nan" : num < 0 ? "-.inf" : ".inf";
|
|
6
6
|
let n = Object.is(value, -0) ? "-0" : JSON.stringify(value);
|
|
7
|
-
if (!format && minFractionDigits && (!tag || tag === "tag:yaml.org,2002:float") &&
|
|
7
|
+
if (!format && minFractionDigits && (!tag || tag === "tag:yaml.org,2002:float") && /^-?\d/.test(n) && !n.includes("e")) {
|
|
8
8
|
let i = n.indexOf(".");
|
|
9
9
|
if (i < 0) {
|
|
10
10
|
i = n.length;
|
|
@@ -2,7 +2,7 @@ import { isCollection, isNode, isScalar, isSeq } from "../nodes/identity.js";
|
|
|
2
2
|
import { Scalar } from "../nodes/Scalar.js";
|
|
3
3
|
import { indentComment, lineComment } from "./stringifyComment.js";
|
|
4
4
|
import { stringify } from "./stringify.js";
|
|
5
|
-
//#region ../../node_modules/.pnpm/yaml@2.8.
|
|
5
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/node_modules/yaml/browser/dist/stringify/stringifyPair.js
|
|
6
6
|
function stringifyPair({ key, value }, ctx, onComment, onChompKeep) {
|
|
7
7
|
const { allNullValues, doc, indent, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx;
|
|
8
8
|
let keyComment = isNode(key) && key.comment || null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Scalar } from "../nodes/Scalar.js";
|
|
2
2
|
import { FOLD_BLOCK, FOLD_FLOW, FOLD_QUOTED, foldFlowLines } from "./foldFlowLines.js";
|
|
3
|
-
//#region ../../node_modules/.pnpm/yaml@2.8.
|
|
3
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/node_modules/yaml/browser/dist/stringify/stringifyString.js
|
|
4
4
|
const getFoldOptions = (ctx, isBlock) => ({
|
|
5
5
|
indentAtStart: isBlock ? ctx.indent.length : ctx.indentAtStart,
|
|
6
6
|
lineWidth: ctx.options.lineWidth,
|
package/dist/node_modules/.pnpm/{yaml@2.8.3 → yaml@2.8.4}/node_modules/yaml/browser/dist/visit.js
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isAlias, isCollection, isDocument, isMap, isNode, isPair, isScalar, isSeq } from "./nodes/identity.js";
|
|
2
|
-
//#region ../../node_modules/.pnpm/yaml@2.8.
|
|
2
|
+
//#region ../../node_modules/.pnpm/yaml@2.8.4/node_modules/yaml/browser/dist/visit.js
|
|
3
3
|
const BREAK = Symbol("break visit");
|
|
4
4
|
const SKIP = Symbol("skip children");
|
|
5
5
|
const REMOVE = Symbol("remove node");
|
|
@@ -23,6 +23,7 @@ interface PlaygroundClientProps extends ComponentProps<'form'>, SchemaScope {
|
|
|
23
23
|
/** the OpenAPI document (not dereferenced) */
|
|
24
24
|
doc: Document;
|
|
25
25
|
proxyUrl?: string;
|
|
26
|
+
deprecated?: boolean;
|
|
26
27
|
}
|
|
27
28
|
interface CollapsiblePanelProps extends Omit<ComponentProps<typeof Collapsible>, 'title'> {
|
|
28
29
|
'data-type': 'authorization' | 'body' | ParamType;
|
|
@@ -71,6 +72,7 @@ declare function PlaygroundClient({
|
|
|
71
72
|
proxyUrl,
|
|
72
73
|
writeOnly,
|
|
73
74
|
readOnly,
|
|
75
|
+
deprecated,
|
|
74
76
|
...rest
|
|
75
77
|
}: PlaygroundClientProps): _$react_jsx_runtime0.JSX.Element;
|
|
76
78
|
declare const ParamTypes: readonly ["path", "header", "cookie", "query"];
|
|
@@ -28,7 +28,7 @@ import { StfProvider, useDataEngine, useFieldValue, useListener, useStf } from "
|
|
|
28
28
|
import { arrayStartsWith, objectGet, objectSet, stringifyFieldKey } from "@fumari/stf/lib/utils";
|
|
29
29
|
import { useOnChange } from "fumadocs-core/utils/use-on-change";
|
|
30
30
|
//#region src/playground/client.tsx
|
|
31
|
-
function PlaygroundClient({ route, method, securities, doc, proxyUrl, writeOnly, readOnly, ...rest }) {
|
|
31
|
+
function PlaygroundClient({ route, method, securities, doc, proxyUrl, writeOnly, readOnly, deprecated, ...rest }) {
|
|
32
32
|
const t = useTranslations();
|
|
33
33
|
const { parameters, body } = useMemo(() => {
|
|
34
34
|
const operation = doc.paths[route][method];
|
|
@@ -130,7 +130,7 @@ function PlaygroundClient({ route, method, securities, doc, proxyUrl, writeOnly,
|
|
|
130
130
|
/* @__PURE__ */ jsx(MethodLabel, { children: method }),
|
|
131
131
|
/* @__PURE__ */ jsx(Route, {
|
|
132
132
|
route,
|
|
133
|
-
className: "flex-1"
|
|
133
|
+
className: cn("flex-1", deprecated && "line-through")
|
|
134
134
|
}),
|
|
135
135
|
/* @__PURE__ */ jsx("button", {
|
|
136
136
|
type: "submit",
|
|
@@ -17,6 +17,10 @@ function openapiPlugin() {
|
|
|
17
17
|
if (!file || file.format !== "page") return node;
|
|
18
18
|
const openApiData = file.data._openapi;
|
|
19
19
|
if (!openApiData || typeof openApiData !== "object") return node;
|
|
20
|
+
if (openApiData.deprecated) node.name = /* @__PURE__ */ jsx("span", {
|
|
21
|
+
className: "fd-page-tree-item-name line-through",
|
|
22
|
+
children: node.name
|
|
23
|
+
});
|
|
20
24
|
if (openApiData.webhook) node.name = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
21
25
|
node.name,
|
|
22
26
|
" ",
|
|
@@ -76,7 +80,8 @@ async function openapiSource(server, options = {}) {
|
|
|
76
80
|
...toStaticData(props, processed.dereferenced),
|
|
77
81
|
_openapi: {
|
|
78
82
|
method: entry.type === "operation" || entry.type === "webhook" ? entry.item.method : void 0,
|
|
79
|
-
webhook: entry.type === "webhook"
|
|
83
|
+
webhook: entry.type === "webhook",
|
|
84
|
+
deprecated: entry.info.deprecated
|
|
80
85
|
}
|
|
81
86
|
}
|
|
82
87
|
});
|
package/dist/ui/base.js
CHANGED
package/dist/ui/create-client.js
CHANGED
|
@@ -64,7 +64,8 @@ function createClientAPIPage({ shiki = defaultShikiFactory, shikiOptions = { the
|
|
|
64
64
|
doc: ctx.schema.bundled,
|
|
65
65
|
proxyUrl: ctx.proxyUrl,
|
|
66
66
|
writeOnly: true,
|
|
67
|
-
readOnly: false
|
|
67
|
+
readOnly: false,
|
|
68
|
+
deprecated: method.deprecated
|
|
68
69
|
});
|
|
69
70
|
}
|
|
70
71
|
function renderPlaygroundProviderDefault({ children }) {
|
|
@@ -14,6 +14,7 @@ import { getExampleRequests } from "./get-example-requests.js";
|
|
|
14
14
|
import { SelectTab, SelectTabTrigger, SelectTabs } from "../components/select-tab.js";
|
|
15
15
|
import { Fragment, use, useMemo } from "react";
|
|
16
16
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
17
|
+
import { Callout } from "fumadocs-ui/components/callout";
|
|
17
18
|
//#region src/ui/operation/index.tsx
|
|
18
19
|
const paramTypeKeys = [
|
|
19
20
|
"path",
|
|
@@ -37,9 +38,20 @@ function Operation({ type = "operation", path, method, ctx, showTitle, showDescr
|
|
|
37
38
|
]);
|
|
38
39
|
if (showTitle) {
|
|
39
40
|
const title = method.summary || (method.operationId ? idToTitle(method.operationId) : path);
|
|
40
|
-
headNode =
|
|
41
|
+
headNode = /* @__PURE__ */ jsxs("div", {
|
|
42
|
+
className: "flex gap-2 items-center justify-between",
|
|
43
|
+
children: [ctx.renderHeading(headingLevel, title, { className: "my-0!" }), method.deprecated && /* @__PURE__ */ jsx(Badge, {
|
|
44
|
+
color: "yellow",
|
|
45
|
+
className: "text-xs not-prose",
|
|
46
|
+
children: /* @__PURE__ */ jsx(I18nLabel, { label: "deprecated" })
|
|
47
|
+
})]
|
|
48
|
+
});
|
|
41
49
|
headingLevel++;
|
|
42
|
-
}
|
|
50
|
+
} else if (method.deprecated) headNode = /* @__PURE__ */ jsx(Callout, {
|
|
51
|
+
type: "warn",
|
|
52
|
+
title: /* @__PURE__ */ jsx(I18nLabel, { label: "deprecated" }),
|
|
53
|
+
className: "mt-0!"
|
|
54
|
+
});
|
|
43
55
|
const contentTypes = body?.content ? Object.entries(body.content) : null;
|
|
44
56
|
if (body && contentTypes && contentTypes.length > 0) {
|
|
45
57
|
const items = contentTypes.map(([key]) => ({
|
|
@@ -237,7 +249,7 @@ function Operation({ type = "operation", path, method, ctx, showTitle, showDescr
|
|
|
237
249
|
className: "text-xs",
|
|
238
250
|
children: method.method
|
|
239
251
|
}), /* @__PURE__ */ jsx("code", {
|
|
240
|
-
className: "flex-1 overflow-auto text-nowrap text-[0.8125rem] text-fd-muted-foreground",
|
|
252
|
+
className: cn("flex-1 overflow-auto text-nowrap text-[0.8125rem] text-fd-muted-foreground", method.deprecated && "line-through"),
|
|
241
253
|
children: path
|
|
242
254
|
})]
|
|
243
255
|
}),
|
|
@@ -46,17 +46,19 @@ function UsageTab({ id, lang, _client }) {
|
|
|
46
46
|
const { examples, example: selectedExampleId, route, addListener, removeListener } = useOperationContext();
|
|
47
47
|
const { server } = useServerContext();
|
|
48
48
|
const codegen = codeUsages.get(id);
|
|
49
|
+
const [mounted, setMounted] = useState(false);
|
|
49
50
|
const [data, setData] = useState(() => examples.find((example) => example.id === selectedExampleId)?.encoded);
|
|
50
51
|
useEffect(() => {
|
|
51
52
|
const listener = (_, encoded) => setData(encoded);
|
|
52
53
|
addListener(listener);
|
|
54
|
+
setMounted(true);
|
|
53
55
|
return () => {
|
|
54
56
|
removeListener(listener);
|
|
55
57
|
};
|
|
56
58
|
}, [addListener, removeListener]);
|
|
57
59
|
const code = useMemo(() => {
|
|
58
60
|
if (!data) return;
|
|
59
|
-
const url = joinURL(
|
|
61
|
+
const url = joinURL(server && mounted ? withBase(resolveServerUrl(server.url, server.variables), window.location.origin) : "https://example.com", resolveRequestData(route, data));
|
|
60
62
|
if (_client) {
|
|
61
63
|
const { generate, serverContext } = _client;
|
|
62
64
|
if (typeof generate === "string") return generate;
|
|
@@ -74,6 +76,7 @@ function UsageTab({ id, lang, _client }) {
|
|
|
74
76
|
data,
|
|
75
77
|
server,
|
|
76
78
|
route,
|
|
79
|
+
mounted,
|
|
77
80
|
_client,
|
|
78
81
|
codegen,
|
|
79
82
|
mediaAdapters
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { bundle } from "../../node_modules/.pnpm/@scalar_json-magic@0.12.
|
|
2
|
-
import { upgrade } from "../../node_modules/.pnpm/@scalar_openapi-upgrader@0.2.
|
|
3
|
-
import { fetchUrls } from "../../node_modules/.pnpm/@scalar_json-magic@0.12.
|
|
4
|
-
import { readFiles } from "../../node_modules/.pnpm/@scalar_json-magic@0.12.
|
|
5
|
-
import "../../node_modules/.pnpm/@scalar_json-magic@0.12.
|
|
1
|
+
import { bundle } from "../../node_modules/.pnpm/@scalar_json-magic@0.12.12/node_modules/@scalar/json-magic/dist/bundle/bundle.js";
|
|
2
|
+
import { upgrade } from "../../node_modules/.pnpm/@scalar_openapi-upgrader@0.2.7/node_modules/@scalar/openapi-upgrader/dist/upgrade.js";
|
|
3
|
+
import { fetchUrls } from "../../node_modules/.pnpm/@scalar_json-magic@0.12.12/node_modules/@scalar/json-magic/dist/bundle/plugins/fetch-urls/index.js";
|
|
4
|
+
import { readFiles } from "../../node_modules/.pnpm/@scalar_json-magic@0.12.12/node_modules/@scalar/json-magic/dist/bundle/plugins/read-files/index.js";
|
|
5
|
+
import "../../node_modules/.pnpm/@scalar_json-magic@0.12.12/node_modules/@scalar/json-magic/dist/bundle/plugins/node.js";
|
|
6
6
|
import { dereferenceDocument } from "./dereference.js";
|
|
7
7
|
//#region src/utils/document/process.ts
|
|
8
8
|
/**
|