apiuikit 2.3.0 → 2.3.1
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/dist/{CodeSamples-CZKz2-Dm.js → CodeSamples-BZ9XQjgB.js} +771 -753
- package/dist/{CodeSamples-C-Zh9TuO.cjs → CodeSamples-q8uQxaVQ.cjs} +31 -31
- package/dist/{LogoExtension-gQqp4qAs.cjs → LogoExtension-BHflNL3k.cjs} +1 -1
- package/dist/{LogoExtension-D9QH---d.js → LogoExtension-Dl1WqCLh.js} +1 -1
- package/dist/apiuikit.cjs.js +1 -1
- package/dist/apiuikit.es.js +1 -1
- package/dist/helpers/namedSchemas.d.ts +23 -0
- package/dist/helpers/searchIndex.d.ts +10 -2
- package/dist/helpers/toMarkdown.d.ts +2 -2
- package/dist/index-BK2Ww7ke.cjs +180 -0
- package/dist/{index-mERDXCsS.js → index-CabXKpy5.js} +1 -1
- package/dist/{index-zzzbwB0Q.cjs → index-Cd6FW5xD.cjs} +1 -1
- package/dist/{index-DWi-5Qhv.js → index-CueEY-QU.js} +1 -1
- package/dist/{index-Dbx_ZPzz.cjs → index-CzxZNRji.cjs} +1 -1
- package/dist/{index-DCUxUfs9.js → index-Wj8fLc_a.js} +3084 -3034
- package/dist/markdown.cjs +40 -38
- package/dist/markdown.es.js +892 -828
- package/dist/{protoToJsonSchema-D5rReTeP.cjs → protoToJsonSchema-D0-qDx0Y.cjs} +1 -1
- package/dist/{protoToJsonSchema-CSfBUNFY.js → protoToJsonSchema-DldJrtOQ.js} +1 -1
- package/dist/{protobufSchemaParser-C0tNlE9Q.js → protobufSchemaParser-CBy9b_Wq.js} +2 -2
- package/dist/{protobufSchemaParser-C1qERHkI.cjs → protobufSchemaParser-Dvl7IrZM.cjs} +1 -1
- package/package.json +1 -1
- package/dist/index-C2-zxpuU.cjs +0 -178
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),t=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),t=require("./index-BK2Ww7ke.cjs");function n({value:e}){const o=t.resolveLogo(e);return o?r.jsx("img",{src:o.url,alt:o.altText??"logo",style:o.backgroundColor?{backgroundColor:o.backgroundColor}:void 0,className:"max-h-24 max-w-24 object-contain"}):null}exports.default=n;
|
package/dist/apiuikit.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./index-BK2Ww7ke.cjs");exports.AsyncAPI=e.AsyncAPI;exports.AsyncAPIInfo=e.AsyncAPIInfo;exports.AsyncAPIMessage=e.AsyncAPIMessage;exports.AsyncAPIMessages=e.AsyncAPIMessages;exports.AsyncAPIOperation=e.AsyncAPIOperation;exports.AsyncAPIOperations=e.AsyncAPIOperations;exports.AsyncAPIProvider=e.AsyncAPIProvider;exports.AsyncAPIRenderer=e.AsyncAPIRenderer;exports.AsyncAPISchemas=e.AsyncAPISchemas;exports.AsyncAPIServers=e.AsyncAPIServers;exports.ErrorBoundary=e.ErrorBoundary;exports.OpenAPI=e.OpenAPI;exports.OpenAPIEndpoint=e.OpenAPIEndpoint;exports.OpenAPIEndpoints=e.OpenAPIEndpoints;exports.OpenAPIInfo=e.OpenAPIInfo;exports.OpenAPIProvider=e.OpenAPIProvider;exports.OpenAPIRenderer=e.OpenAPIRenderer;exports.OpenAPISchemas=e.OpenAPISchemas;exports.OpenAPIServers=e.OpenAPIServers;exports.OpenAPIWebhook=e.OpenAPIWebhook;exports.OpenAPIWebhooks=e.OpenAPIWebhooks;exports.PluginSlot=e.PluginSlot;exports.Schema=e.Schema;exports.SchemaTab=e.SchemaTabs;exports.SchemaTree=e.SchemaTree;exports.Schemas=e.Schemas;exports.asyncApiOperationToMarkdown=e.asyncApiOperationToMarkdown;exports.asyncApiToMarkdown=e.asyncApiToMarkdown;exports.default=e.AsyncAPI;exports.defaultConfig=e.defaultConfig;exports.documentToLlmsTxt=e.documentToLlmsTxt;exports.documentToMarkdown=e.documentToMarkdown;exports.listDocumentTargets=e.listDocumentTargets;exports.markdownForLlm=e.markdownForLlm;exports.openApiEndpointToMarkdown=e.openApiEndpointToMarkdown;exports.openApiToMarkdown=e.openApiToMarkdown;exports.parseAndRender=e.parseAndRender;exports.parseAndRenderOpenAPI=e.parseAndRender$1;exports.targetSlug=e.targetSlug;exports.useAsyncAPIDocument=e.useAsyncAPIDocument;exports.useAsyncAPIDocumentContext=e.useAsyncAPIDocumentContext;exports.useDocumentContext=e.useDocumentContext;exports.useOpenAPIDocumentContext=e.useOpenAPIDocumentContext;exports.useOperationTabPlugins=e.useOperationTabPlugins;exports.usePluginSlot=e.usePluginSlot;
|
package/dist/apiuikit.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as e, f as n, j as o, k as A, l as r, m as t, n as P, p, q as c, s as I, E as d, O as u, t as i, v as m, w as O, x as y, y as l, z as S, B as T, D as g, F as k, P as h, S as M, G as f, H as w, I as x, J as D, K as v, A as E, L as R, M as b, N as C, Q as L, R as W, o as B, T as F, U as j, V as q, W as z, Y as G, Z as H, u as J, _ as K, $ as N, a0 as Q } from "./index-
|
|
1
|
+
import { A as e, f as n, j as o, k as A, l as r, m as t, n as P, p, q as c, s as I, E as d, O as u, t as i, v as m, w as O, x as y, y as l, z as S, B as T, D as g, F as k, P as h, S as M, G as f, H as w, I as x, J as D, K as v, A as E, L as R, M as b, N as C, Q as L, R as W, o as B, T as F, U as j, V as q, W as z, Y as G, Z as H, u as J, _ as K, $ as N, a0 as Q } from "./index-Wj8fLc_a.js";
|
|
2
2
|
export {
|
|
3
3
|
e as AsyncAPI,
|
|
4
4
|
n as AsyncAPIInfo,
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** JSON Schema keywords whose values are subschemas (or maps/lists of them). */
|
|
2
|
+
export declare const SCHEMA_STRUCTURAL_KEYS: Set<string>;
|
|
3
|
+
/** The component schema a JSON Pointer is or points inside of (`#/components/schemas/<name>/…`), if any. */
|
|
4
|
+
export declare const componentSchemaContaining: (pointer: string) => string | undefined;
|
|
5
|
+
/**
|
|
6
|
+
* Names a document's component schemas wherever they've been inlined, so a
|
|
7
|
+
* walker can stop at one instead of re-expanding it at every reference site.
|
|
8
|
+
* In densely linked specs that re-expansion is what blows up: Stripe's
|
|
9
|
+
* response schemas are ~9k distinct objects but tens of millions of nodes
|
|
10
|
+
* walked as a tree.
|
|
11
|
+
*
|
|
12
|
+
* Matched by identity, two ways: resolveDocument inlines a `$ref` as the
|
|
13
|
+
* target object itself (its `copies`), while @scalar/openapi-parser inlines a
|
|
14
|
+
* fresh shallow copy of the target whose structural children (`properties`,
|
|
15
|
+
* `items`, …) are still the target's own — so a node also matches when one of
|
|
16
|
+
* those children is the same object, under the same key, on a named schema of
|
|
17
|
+
* the same `type`. Where such a copy sits inside its own target, resolveDocument
|
|
18
|
+
* cuts the cycle by replacing that child with a `$ref` stub to wherever the
|
|
19
|
+
* child first appeared — often deep under `#/paths`, not under the schema —
|
|
20
|
+
* so with `deref` (against the same resolved document) a stub child is
|
|
21
|
+
* followed and matched the same way.
|
|
22
|
+
*/
|
|
23
|
+
export declare const createNamedSchemaLookup: (schemas: Record<string, unknown> | undefined, deref?: (ref: string) => unknown) => ((node: unknown) => string | undefined);
|
|
@@ -16,6 +16,14 @@ export interface SearchEntry {
|
|
|
16
16
|
schemaFocusTokens?: string[];
|
|
17
17
|
}
|
|
18
18
|
export declare const normalizeString: (value: unknown) => string;
|
|
19
|
-
/**
|
|
20
|
-
|
|
19
|
+
/**
|
|
20
|
+
* Walks a single JSON Schema node into flat search entries — spec-agnostic (AsyncAPI and OpenAPI schemas share the same shape), reused by openapiSearchIndex.ts.
|
|
21
|
+
*
|
|
22
|
+
* `namedSchemaOf` (createNamedSchemaLookup) recognizes the document's
|
|
23
|
+
* component schemas, each indexed by its own call. A reference to one still gets an entry where it occurs, but the
|
|
24
|
+
* walk doesn't descend into it — otherwise every schema re-indexes everything
|
|
25
|
+
* it can reach: on a densely linked spec like Stripe's, 271k entries for ~10k
|
|
26
|
+
* distinct nodes.
|
|
27
|
+
*/
|
|
28
|
+
export declare const addSchemaEntries: (entries: SearchEntry[], schema: unknown, schemaKey: string, schemaName: string, namedSchemaOf?: (node: unknown) => string | undefined) => void;
|
|
21
29
|
export declare function buildSearchIndex(asyncapi: AsyncAPIDocumentData): SearchEntry[];
|
|
@@ -11,8 +11,8 @@ export declare function openApiToMarkdown(doc: OpenAPIDocumentData, deref?: Dere
|
|
|
11
11
|
/**
|
|
12
12
|
* Builds a self-contained Markdown snippet for a single OpenAPI endpoint:
|
|
13
13
|
* doc info + servers (so the snippet stands alone without the rest of the
|
|
14
|
-
* document) followed by that one endpoint's
|
|
15
|
-
*
|
|
14
|
+
* document) followed by that one endpoint's parameters, request body, and
|
|
15
|
+
* responses, then every component schema those reference, as opposed to `openApiToMarkdown`'s
|
|
16
16
|
* whole-document export. Backs the "Agent Prompt" entry in the endpoint's
|
|
17
17
|
* code-sample dropdown (components/CodeSamples.tsx).
|
|
18
18
|
*/
|