@apiboost/omnispec 1.1.0-next.1 → 1.1.0-next.2
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/cjs/asyncapi/index.js +4 -4
- package/dist/cjs/chunks/{AsyncApiSpec-CHvM1swf.js → AsyncApiSpec-Bj1F8C5K.js} +868 -147
- package/dist/cjs/chunks/AsyncApiSpec-Bj1F8C5K.js.map +1 -0
- package/dist/cjs/chunks/{Collapsible-Jlb_vtdW.js → Collapsible-BTWyDBkX.js} +161 -2
- package/dist/cjs/chunks/Collapsible-BTWyDBkX.js.map +1 -0
- package/dist/cjs/chunks/{ErrorBoundary-c1piU8da.js → ErrorBoundary-CezYgQDG.js} +2 -2
- package/dist/cjs/chunks/{ErrorBoundary-c1piU8da.js.map → ErrorBoundary-CezYgQDG.js.map} +1 -1
- package/dist/cjs/chunks/{OmniSpecRenderer-Dj6Z6W2J.js → OmniSpecRenderer-CghCPNuw.js} +6 -6
- package/dist/cjs/chunks/{OmniSpecRenderer-Dj6Z6W2J.js.map → OmniSpecRenderer-CghCPNuw.js.map} +1 -1
- package/dist/cjs/chunks/{OpenApiSpec-BPtXvk7C.js → OpenApiSpec-BOlesoUX.js} +7 -7
- package/dist/cjs/chunks/OpenApiSpec-BOlesoUX.js.map +1 -0
- package/dist/cjs/chunks/{OpenIdConnectManual-DBP0Do-3.js → OpenIdConnectManual-Bh7tdxoH.js} +3 -162
- package/dist/cjs/chunks/OpenIdConnectManual-Bh7tdxoH.js.map +1 -0
- package/dist/cjs/chunks/{useSpecDetector-A4OwYrmY.js → useSpecDetector-BemsWW9u.js} +2 -2
- package/dist/cjs/chunks/{useSpecDetector-A4OwYrmY.js.map → useSpecDetector-BemsWW9u.js.map} +1 -1
- package/dist/cjs/chunks/{useSpecFetcher-BKz1jHTV.js → useSpecFetcher-BAbHnXax.js} +28 -1
- package/dist/{esm/chunks/useSpecFetcher-CZvAnU7Z.js.map → cjs/chunks/useSpecFetcher-BAbHnXax.js.map} +1 -1
- package/dist/cjs/core/public.js +5 -5
- package/dist/cjs/index.js +8 -8
- package/dist/cjs/openapi/index.js +5 -5
- package/dist/cjs/wc/index.js +4 -4
- package/dist/esm/asyncapi/index.js +4 -4
- package/dist/esm/chunks/{AsyncApiSpec-BPiA9b5T.js → AsyncApiSpec-BzhfaQ_T.js} +876 -155
- package/dist/esm/chunks/AsyncApiSpec-BzhfaQ_T.js.map +1 -0
- package/dist/esm/chunks/{Collapsible-0ryLh6wX.js → Collapsible-MyJB2agz.js} +161 -3
- package/dist/esm/chunks/Collapsible-MyJB2agz.js.map +1 -0
- package/dist/esm/chunks/{ErrorBoundary-posRNrbt.js → ErrorBoundary-9pDlZFfM.js} +2 -2
- package/dist/esm/chunks/{ErrorBoundary-posRNrbt.js.map → ErrorBoundary-9pDlZFfM.js.map} +1 -1
- package/dist/esm/chunks/{OmniSpecRenderer-yF2Zw_B9.js → OmniSpecRenderer-BUJSl_2I.js} +6 -6
- package/dist/esm/chunks/{OmniSpecRenderer-yF2Zw_B9.js.map → OmniSpecRenderer-BUJSl_2I.js.map} +1 -1
- package/dist/esm/chunks/{OpenApiSpec-MGJ3oFHZ.js → OpenApiSpec-wm3tH2vF.js} +5 -5
- package/dist/esm/chunks/OpenApiSpec-wm3tH2vF.js.map +1 -0
- package/dist/esm/chunks/{OpenIdConnectManual-BS-n811Z.js → OpenIdConnectManual-DPmTIIIy.js} +4 -162
- package/dist/esm/chunks/OpenIdConnectManual-DPmTIIIy.js.map +1 -0
- package/dist/esm/chunks/{useSpecDetector-5SGcKnJx.js → useSpecDetector-BJBNbfN5.js} +2 -2
- package/dist/esm/chunks/{useSpecDetector-5SGcKnJx.js.map → useSpecDetector-BJBNbfN5.js.map} +1 -1
- package/dist/esm/chunks/{useSpecFetcher-CZvAnU7Z.js → useSpecFetcher-BvVfMuzf.js} +28 -1
- package/dist/{cjs/chunks/useSpecFetcher-BKz1jHTV.js.map → esm/chunks/useSpecFetcher-BvVfMuzf.js.map} +1 -1
- package/dist/esm/core/public.js +4 -4
- package/dist/esm/index.js +8 -8
- package/dist/esm/openapi/index.js +5 -5
- package/dist/esm/wc/index.js +4 -4
- package/dist/types/asyncapi/AsyncApiSpec.d.ts +1 -1
- package/dist/types/asyncapi/AsyncApiSpec.d.ts.map +1 -1
- package/dist/types/asyncapi/components/AsyncOverview.d.ts.map +1 -1
- package/dist/types/asyncapi/components/ChannelDetail.d.ts +6 -1
- package/dist/types/asyncapi/components/ChannelDetail.d.ts.map +1 -1
- package/dist/types/asyncapi/components/ChannelReferenceDetail.d.ts +35 -0
- package/dist/types/asyncapi/components/ChannelReferenceDetail.d.ts.map +1 -0
- package/dist/types/asyncapi/components/ComponentsSection.d.ts.map +1 -1
- package/dist/types/asyncapi/components/ExternalDocsLink.d.ts +29 -0
- package/dist/types/asyncapi/components/ExternalDocsLink.d.ts.map +1 -0
- package/dist/types/asyncapi/components/MessagePayload.d.ts.map +1 -1
- package/dist/types/asyncapi/components/SecurityRequirementBadges.d.ts +13 -6
- package/dist/types/asyncapi/components/SecurityRequirementBadges.d.ts.map +1 -1
- package/dist/types/asyncapi/components/TagGroupHeader.d.ts +1 -1
- package/dist/types/asyncapi/components/TagGroupHeader.d.ts.map +1 -1
- package/dist/types/asyncapi/components/field-display.d.ts +11 -1
- package/dist/types/asyncapi/components/field-display.d.ts.map +1 -1
- package/dist/types/asyncapi/parser/asyncapi-parser.d.ts.map +1 -1
- package/dist/types/asyncapi/tag-grouping.d.ts +5 -1
- package/dist/types/asyncapi/tag-grouping.d.ts.map +1 -1
- package/dist/types/asyncapi/types/asyncapi.types.d.ts +37 -8
- package/dist/types/asyncapi/types/asyncapi.types.d.ts.map +1 -1
- package/dist/types/core/components/Layout/DocLayout.d.ts.map +1 -1
- package/dist/types/core/types/auth.types.d.ts +1 -1
- package/dist/wc/standalone.js +1 -1
- package/dist/wc/standalone.js.map +1 -1
- package/package.json +1 -1
- package/dist/cjs/chunks/AsyncApiSpec-CHvM1swf.js.map +0 -1
- package/dist/cjs/chunks/Collapsible-Jlb_vtdW.js.map +0 -1
- package/dist/cjs/chunks/OpenApiSpec-BPtXvk7C.js.map +0 -1
- package/dist/cjs/chunks/OpenIdConnectManual-DBP0Do-3.js.map +0 -1
- package/dist/esm/chunks/AsyncApiSpec-BPiA9b5T.js.map +0 -1
- package/dist/esm/chunks/Collapsible-0ryLh6wX.js.map +0 -1
- package/dist/esm/chunks/OpenApiSpec-MGJ3oFHZ.js.map +0 -1
- package/dist/esm/chunks/OpenIdConnectManual-BS-n811Z.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useContext, createContext, useMemo, useState, useEffect, useCallback, memo, useRef } from 'react';
|
|
2
2
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
3
|
import { css, cx } from '@emotion/css';
|
|
4
|
-
import { m as mq, B as Button, I as Icon, j as useConfig } from './useSpecFetcher-
|
|
4
|
+
import { m as mq, B as Button, I as Icon, j as useConfig } from './useSpecFetcher-BvVfMuzf.js';
|
|
5
5
|
import styled from '@emotion/styled';
|
|
6
6
|
|
|
7
7
|
const ExpandContext = createContext({ expandAll: false, expandGeneration: 0 });
|
|
@@ -7461,6 +7461,164 @@ const selectStyle = css({
|
|
|
7461
7461
|
fontFamily: "var(--omnispec-font-mono)"
|
|
7462
7462
|
});
|
|
7463
7463
|
|
|
7464
|
+
const MOBILE_TABS = [
|
|
7465
|
+
{ id: "schema", label: "Schema" },
|
|
7466
|
+
{ id: "samples", label: "Samples" },
|
|
7467
|
+
{ id: "try-it", label: "Try It" }
|
|
7468
|
+
];
|
|
7469
|
+
const RIGHT_TABS = [
|
|
7470
|
+
{ id: "samples", label: "Samples" },
|
|
7471
|
+
{ id: "try-it", label: "Try It" }
|
|
7472
|
+
];
|
|
7473
|
+
function ReferenceLayout({ schema, samples, tryIt, operationId }) {
|
|
7474
|
+
const [rightTab, setRightTab] = useState("samples");
|
|
7475
|
+
const [mobileTab, setMobileTab] = useState("schema");
|
|
7476
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
7477
|
+
/* @__PURE__ */ jsxs("div", { className: mobileWrapperStyle, children: [
|
|
7478
|
+
/* @__PURE__ */ jsx("div", { className: mobileTabBarStyle, role: "tablist", children: MOBILE_TABS.map((tab) => /* @__PURE__ */ jsx(
|
|
7479
|
+
"button",
|
|
7480
|
+
{
|
|
7481
|
+
type: "button",
|
|
7482
|
+
role: "tab",
|
|
7483
|
+
"aria-selected": mobileTab === tab.id,
|
|
7484
|
+
"aria-controls": `mobile-panel-${operationId}-${tab.id}`,
|
|
7485
|
+
onClick: () => setMobileTab(tab.id),
|
|
7486
|
+
className: cx(mobileTabStyle, mobileTab === tab.id ? mobileTabActiveStyle : void 0),
|
|
7487
|
+
children: tab.label
|
|
7488
|
+
},
|
|
7489
|
+
tab.id
|
|
7490
|
+
)) }),
|
|
7491
|
+
/* @__PURE__ */ jsxs(
|
|
7492
|
+
"div",
|
|
7493
|
+
{
|
|
7494
|
+
id: `mobile-panel-${operationId}-${mobileTab}`,
|
|
7495
|
+
className: mobileContentStyle,
|
|
7496
|
+
role: "tabpanel",
|
|
7497
|
+
children: [
|
|
7498
|
+
mobileTab === "schema" && schema,
|
|
7499
|
+
mobileTab === "samples" && samples,
|
|
7500
|
+
mobileTab === "try-it" && tryIt
|
|
7501
|
+
]
|
|
7502
|
+
}
|
|
7503
|
+
)
|
|
7504
|
+
] }, `mobile-${operationId}`),
|
|
7505
|
+
/* @__PURE__ */ jsxs("div", { className: desktopWrapperStyle, children: [
|
|
7506
|
+
/* @__PURE__ */ jsx("div", { className: leftColumnStyle, children: schema }),
|
|
7507
|
+
/* @__PURE__ */ jsxs("div", { className: rightColumnStyle, children: [
|
|
7508
|
+
/* @__PURE__ */ jsx("div", { className: rightTabBarStyle, role: "tablist", children: RIGHT_TABS.map((tab) => /* @__PURE__ */ jsx(
|
|
7509
|
+
"button",
|
|
7510
|
+
{
|
|
7511
|
+
type: "button",
|
|
7512
|
+
role: "tab",
|
|
7513
|
+
"aria-selected": rightTab === tab.id,
|
|
7514
|
+
"aria-controls": `right-panel-${operationId}-${tab.id}`,
|
|
7515
|
+
onClick: () => setRightTab(tab.id),
|
|
7516
|
+
className: cx(rightTabStyle, rightTab === tab.id ? rightTabActiveStyle : void 0),
|
|
7517
|
+
children: tab.label
|
|
7518
|
+
},
|
|
7519
|
+
tab.id
|
|
7520
|
+
)) }),
|
|
7521
|
+
/* @__PURE__ */ jsxs(
|
|
7522
|
+
"div",
|
|
7523
|
+
{
|
|
7524
|
+
id: `right-panel-${operationId}-${rightTab}`,
|
|
7525
|
+
className: rightContentStyle,
|
|
7526
|
+
role: "tabpanel",
|
|
7527
|
+
children: [
|
|
7528
|
+
rightTab === "samples" && samples,
|
|
7529
|
+
rightTab === "try-it" && tryIt
|
|
7530
|
+
]
|
|
7531
|
+
}
|
|
7532
|
+
)
|
|
7533
|
+
] })
|
|
7534
|
+
] }, `desktop-${operationId}`)
|
|
7535
|
+
] });
|
|
7536
|
+
}
|
|
7537
|
+
const mobileWrapperStyle = css({
|
|
7538
|
+
display: "block",
|
|
7539
|
+
[mq.desktop]: {
|
|
7540
|
+
display: "none"
|
|
7541
|
+
}
|
|
7542
|
+
});
|
|
7543
|
+
const mobileTabBarStyle = css({
|
|
7544
|
+
display: "flex",
|
|
7545
|
+
borderBottom: "1px solid var(--omnispec-border-color)"
|
|
7546
|
+
});
|
|
7547
|
+
const mobileTabStyle = css({
|
|
7548
|
+
flex: 1,
|
|
7549
|
+
textAlign: "center",
|
|
7550
|
+
padding: "0.625rem 0.5rem",
|
|
7551
|
+
background: "none",
|
|
7552
|
+
border: "none",
|
|
7553
|
+
borderBottom: "0.125rem solid transparent",
|
|
7554
|
+
cursor: "pointer",
|
|
7555
|
+
fontSize: "var(--omnispec-font-size-xs)",
|
|
7556
|
+
fontWeight: 600,
|
|
7557
|
+
letterSpacing: "0.04em",
|
|
7558
|
+
textTransform: "uppercase",
|
|
7559
|
+
color: "var(--omnispec-fg-secondary)",
|
|
7560
|
+
"&:hover": {
|
|
7561
|
+
color: "var(--omnispec-fg-primary)"
|
|
7562
|
+
}
|
|
7563
|
+
});
|
|
7564
|
+
const mobileTabActiveStyle = css({
|
|
7565
|
+
borderBottom: "0.125rem solid var(--omnispec-color-primary)",
|
|
7566
|
+
color: "var(--omnispec-color-primary)"
|
|
7567
|
+
});
|
|
7568
|
+
const mobileContentStyle = css({
|
|
7569
|
+
padding: "1rem 0"
|
|
7570
|
+
});
|
|
7571
|
+
const desktopWrapperStyle = css({
|
|
7572
|
+
display: "none",
|
|
7573
|
+
[mq.desktop]: {
|
|
7574
|
+
display: "flex",
|
|
7575
|
+
alignItems: "flex-start"
|
|
7576
|
+
}
|
|
7577
|
+
});
|
|
7578
|
+
const leftColumnStyle = css({
|
|
7579
|
+
flex: 1,
|
|
7580
|
+
minWidth: 0,
|
|
7581
|
+
padding: "1rem 1.5rem"
|
|
7582
|
+
});
|
|
7583
|
+
const rightColumnStyle = css({
|
|
7584
|
+
width: "26rem",
|
|
7585
|
+
flexShrink: 0,
|
|
7586
|
+
borderLeft: "1px solid var(--omnispec-border-color)",
|
|
7587
|
+
position: "sticky",
|
|
7588
|
+
top: "calc(var(--omnispec-offset-top, 0px) + 1rem)",
|
|
7589
|
+
alignSelf: "flex-start",
|
|
7590
|
+
maxHeight: "calc(100vh - var(--omnispec-offset-top, 0px) - 2rem)",
|
|
7591
|
+
overflowY: "auto"
|
|
7592
|
+
});
|
|
7593
|
+
const rightTabBarStyle = css({
|
|
7594
|
+
display: "flex",
|
|
7595
|
+
borderBottom: "1px solid var(--omnispec-border-color)"
|
|
7596
|
+
});
|
|
7597
|
+
const rightTabStyle = css({
|
|
7598
|
+
flex: 1,
|
|
7599
|
+
textAlign: "center",
|
|
7600
|
+
padding: "0.625rem 0.5rem",
|
|
7601
|
+
background: "none",
|
|
7602
|
+
border: "none",
|
|
7603
|
+
borderBottom: "0.125rem solid transparent",
|
|
7604
|
+
cursor: "pointer",
|
|
7605
|
+
fontSize: "var(--omnispec-font-size-xs)",
|
|
7606
|
+
fontWeight: 600,
|
|
7607
|
+
letterSpacing: "0.04em",
|
|
7608
|
+
textTransform: "uppercase",
|
|
7609
|
+
color: "var(--omnispec-fg-secondary)",
|
|
7610
|
+
"&:hover": {
|
|
7611
|
+
color: "var(--omnispec-fg-primary)"
|
|
7612
|
+
}
|
|
7613
|
+
});
|
|
7614
|
+
const rightTabActiveStyle = css({
|
|
7615
|
+
borderBottom: "0.125rem solid var(--omnispec-color-primary)",
|
|
7616
|
+
color: "var(--omnispec-color-primary)"
|
|
7617
|
+
});
|
|
7618
|
+
const rightContentStyle = css({
|
|
7619
|
+
padding: "1rem"
|
|
7620
|
+
});
|
|
7621
|
+
|
|
7464
7622
|
const headerStyle_ = css({
|
|
7465
7623
|
display: "flex",
|
|
7466
7624
|
alignItems: "center",
|
|
@@ -7537,5 +7695,5 @@ function Collapsible({ title, children, defaultOpen = false, headerStyle, expand
|
|
|
7537
7695
|
] });
|
|
7538
7696
|
}
|
|
7539
7697
|
|
|
7540
|
-
export { schemaToNodes as A, Badge as B, CodeBlock as C, useHashScroll as D, EnumItem as E, FieldDescription as F, useScrollSpy as G,
|
|
7541
|
-
//# sourceMappingURL=Collapsible-
|
|
7698
|
+
export { schemaToNodes as A, Badge as B, CodeBlock as C, useHashScroll as D, EnumItem as E, FieldDescription as F, useScrollSpy as G, useExpandAll as H, getNamedExamples as I, ExampleSelector as J, buildConstraints as K, ExpandProvider as L, MarkdownRenderer as M, PresentationChildren as P, ReferenceLayout as R, SchemaBadge as S, Tabs as T, Collapsible as a, EnumLabel as b, EnumList as c, ExpandableCard as d, FieldName as e, MethodBar as f, PresentationContainer as g, PresentationRow as h, PropDefault as i, PropDesc as j, PropFormat as k, PropName as l, PropReq as m, PropRequiredStar as n, PropType as o, SchemaPropChildren as p, SchemaPropRow as q, SchemaRefLink as r, SchemaSectionTitle as s, SchemaTree as t, SearchBar as u, SpecToolbar as v, flattenNavItemIds as w, generateExample as x, requestExpand as y, resolveDownloadLink as z };
|
|
7699
|
+
//# sourceMappingURL=Collapsible-MyJB2agz.js.map
|