@apiboost/omnispec 1.0.0 → 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 +5 -5
- package/dist/cjs/chunks/AsyncApiSpec-Bj1F8C5K.js +2601 -0
- package/dist/cjs/chunks/AsyncApiSpec-Bj1F8C5K.js.map +1 -0
- package/dist/cjs/chunks/{Collapsible-BHAHk_Ep.js → Collapsible-BTWyDBkX.js} +429 -209
- 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-CE4wxVTL.js → OmniSpecRenderer-CghCPNuw.js} +6 -6
- package/dist/cjs/chunks/{OmniSpecRenderer-CE4wxVTL.js.map → OmniSpecRenderer-CghCPNuw.js.map} +1 -1
- package/dist/cjs/chunks/{OpenApiSpec-D0JtmOVQ.js → OpenApiSpec-BOlesoUX.js} +12 -12
- package/dist/cjs/chunks/OpenApiSpec-BOlesoUX.js.map +1 -0
- package/dist/cjs/chunks/{OpenIdConnectManual-oEnN0QJ-.js → OpenIdConnectManual-Bh7tdxoH.js} +7 -227
- package/dist/cjs/chunks/OpenIdConnectManual-Bh7tdxoH.js.map +1 -0
- package/dist/cjs/chunks/{ref-resolver-DWu6Q6E5.js → ref-resolver-0A8GNRI3.js} +6 -2
- package/dist/cjs/chunks/{ref-resolver-DWu6Q6E5.js.map → ref-resolver-0A8GNRI3.js.map} +1 -1
- 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 +9 -9
- package/dist/cjs/openapi/index.js +6 -6
- package/dist/cjs/wc/index.js +4 -4
- package/dist/esm/asyncapi/index.js +5 -5
- package/dist/esm/chunks/AsyncApiSpec-BzhfaQ_T.js +2599 -0
- package/dist/esm/chunks/AsyncApiSpec-BzhfaQ_T.js.map +1 -0
- package/dist/esm/chunks/{Collapsible-DA6-nS46.js → Collapsible-MyJB2agz.js} +428 -211
- 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-MqsQFXro.js → OmniSpecRenderer-BUJSl_2I.js} +6 -6
- package/dist/esm/chunks/{OmniSpecRenderer-MqsQFXro.js.map → OmniSpecRenderer-BUJSl_2I.js.map} +1 -1
- package/dist/esm/chunks/{OpenApiSpec-Cy-oW6jA.js → OpenApiSpec-wm3tH2vF.js} +6 -6
- package/dist/esm/chunks/OpenApiSpec-wm3tH2vF.js.map +1 -0
- package/dist/esm/chunks/{OpenIdConnectManual-COfITasf.js → OpenIdConnectManual-DPmTIIIy.js} +6 -223
- package/dist/esm/chunks/OpenIdConnectManual-DPmTIIIy.js.map +1 -0
- package/dist/esm/chunks/{ref-resolver-BIrHJOjz.js → ref-resolver-B0C36NuQ.js} +6 -3
- package/dist/esm/chunks/{ref-resolver-BIrHJOjz.js.map → ref-resolver-B0C36NuQ.js.map} +1 -1
- 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 +9 -9
- package/dist/esm/openapi/index.js +6 -6
- 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/BindingsSection.d.ts +26 -0
- package/dist/types/asyncapi/components/BindingsSection.d.ts.map +1 -0
- package/dist/types/asyncapi/components/ChannelDetail.d.ts +7 -2
- 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 +1 -1
- 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 +22 -0
- package/dist/types/asyncapi/components/MessagePayload.d.ts.map +1 -0
- package/dist/types/asyncapi/components/SecurityRequirementBadges.d.ts +29 -0
- package/dist/types/asyncapi/components/SecurityRequirementBadges.d.ts.map +1 -0
- package/dist/types/asyncapi/components/SecuritySchemesSection.d.ts +23 -0
- package/dist/types/asyncapi/components/SecuritySchemesSection.d.ts.map +1 -0
- package/dist/types/asyncapi/components/ServerList.d.ts +1 -1
- package/dist/types/asyncapi/components/ServerList.d.ts.map +1 -1
- package/dist/types/asyncapi/components/TagGroupHeader.d.ts +18 -0
- package/dist/types/asyncapi/components/TagGroupHeader.d.ts.map +1 -0
- package/dist/types/asyncapi/components/field-display.d.ts +30 -0
- package/dist/types/asyncapi/components/field-display.d.ts.map +1 -0
- package/dist/types/asyncapi/parser/asyncapi-parser.d.ts.map +1 -1
- package/dist/types/asyncapi/schema-formats.d.ts +26 -0
- package/dist/types/asyncapi/schema-formats.d.ts.map +1 -0
- package/dist/types/asyncapi/tag-grouping.d.ts +43 -0
- package/dist/types/asyncapi/tag-grouping.d.ts.map +1 -0
- package/dist/types/asyncapi/types/asyncapi.types.d.ts +72 -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/types/openapi/parser/ref-resolver.d.ts +8 -0
- package/dist/types/openapi/parser/ref-resolver.d.ts.map +1 -1
- package/dist/wc/standalone.js +1 -1
- package/dist/wc/standalone.js.map +1 -1
- package/package.json +2 -2
- package/dist/cjs/chunks/AsyncApiSpec-TBlyRxTP.js +0 -819
- package/dist/cjs/chunks/AsyncApiSpec-TBlyRxTP.js.map +0 -1
- package/dist/cjs/chunks/Collapsible-BHAHk_Ep.js.map +0 -1
- package/dist/cjs/chunks/OpenApiSpec-D0JtmOVQ.js.map +0 -1
- package/dist/cjs/chunks/OpenIdConnectManual-oEnN0QJ-.js.map +0 -1
- package/dist/esm/chunks/AsyncApiSpec-C3lsUpZk.js +0 -817
- package/dist/esm/chunks/AsyncApiSpec-C3lsUpZk.js.map +0 -1
- package/dist/esm/chunks/Collapsible-DA6-nS46.js.map +0 -1
- package/dist/esm/chunks/OpenApiSpec-Cy-oW6jA.js.map +0 -1
- package/dist/esm/chunks/OpenIdConnectManual-COfITasf.js.map +0 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
5
|
var css = require('@emotion/css');
|
|
6
|
-
var useSpecFetcher = require('./useSpecFetcher-
|
|
6
|
+
var useSpecFetcher = require('./useSpecFetcher-BAbHnXax.js');
|
|
7
7
|
var styled = require('@emotion/styled');
|
|
8
8
|
|
|
9
9
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -63,6 +63,50 @@ function useScrollSpy(ids, rootMargin = "0px 0px -80% 0px") {
|
|
|
63
63
|
return activeId;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
+
const expandListeners = /* @__PURE__ */ new Map();
|
|
67
|
+
function onExpandRequest(id, callback) {
|
|
68
|
+
expandListeners.set(id, callback);
|
|
69
|
+
return () => {
|
|
70
|
+
expandListeners.delete(id);
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
function requestExpand(id) {
|
|
74
|
+
const listener = expandListeners.get(id);
|
|
75
|
+
if (listener) listener();
|
|
76
|
+
}
|
|
77
|
+
const SMOOTH_THRESHOLD = 50;
|
|
78
|
+
function useHashScroll(operationCount = 0) {
|
|
79
|
+
const scrollBehavior = operationCount > SMOOTH_THRESHOLD ? "instant" : "smooth";
|
|
80
|
+
React.useEffect(() => {
|
|
81
|
+
const hash = window.location.hash.slice(1);
|
|
82
|
+
if (!hash) return;
|
|
83
|
+
requestExpand(hash);
|
|
84
|
+
const attempt = () => {
|
|
85
|
+
const el = document.getElementById(hash);
|
|
86
|
+
if (el) {
|
|
87
|
+
el.scrollIntoView({ behavior: scrollBehavior, block: "start" });
|
|
88
|
+
return true;
|
|
89
|
+
}
|
|
90
|
+
return false;
|
|
91
|
+
};
|
|
92
|
+
if (attempt()) return;
|
|
93
|
+
let tries = 0;
|
|
94
|
+
const interval = setInterval(() => {
|
|
95
|
+
if (attempt() || ++tries >= 10) clearInterval(interval);
|
|
96
|
+
}, 200);
|
|
97
|
+
return () => clearInterval(interval);
|
|
98
|
+
}, [scrollBehavior]);
|
|
99
|
+
const navigateTo = React.useCallback((id) => {
|
|
100
|
+
window.history.replaceState(null, "", `#${id}`);
|
|
101
|
+
requestExpand(id);
|
|
102
|
+
requestAnimationFrame(() => {
|
|
103
|
+
const el = document.getElementById(id);
|
|
104
|
+
el?.scrollIntoView({ behavior: scrollBehavior, block: "start" });
|
|
105
|
+
});
|
|
106
|
+
}, [scrollBehavior]);
|
|
107
|
+
return { navigateTo };
|
|
108
|
+
}
|
|
109
|
+
|
|
66
110
|
function SearchBar({ placeholder = "Search...", onSearch }) {
|
|
67
111
|
const [value, setValue] = React.useState("");
|
|
68
112
|
const handleChange = React.useCallback((e) => {
|
|
@@ -70,7 +114,7 @@ function SearchBar({ placeholder = "Search...", onSearch }) {
|
|
|
70
114
|
setValue(query);
|
|
71
115
|
onSearch(query);
|
|
72
116
|
}, [onSearch]);
|
|
73
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `omnispec-search ${containerStyle$
|
|
117
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `omnispec-search ${containerStyle$5}`, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
74
118
|
"input",
|
|
75
119
|
{
|
|
76
120
|
type: "text",
|
|
@@ -82,7 +126,7 @@ function SearchBar({ placeholder = "Search...", onSearch }) {
|
|
|
82
126
|
}
|
|
83
127
|
) });
|
|
84
128
|
}
|
|
85
|
-
const containerStyle$
|
|
129
|
+
const containerStyle$5 = css.css({
|
|
86
130
|
padding: "12px"
|
|
87
131
|
});
|
|
88
132
|
const inputStyle = css.css({
|
|
@@ -108,7 +152,7 @@ function SpecToolbar({
|
|
|
108
152
|
onToggleExpand,
|
|
109
153
|
downloadLink
|
|
110
154
|
}) {
|
|
111
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: containerStyle$
|
|
155
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: containerStyle$4, children: [
|
|
112
156
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: overviewWrapStyle, children: overview }),
|
|
113
157
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: actionsStyle, children: [
|
|
114
158
|
versionBadge && /* @__PURE__ */ jsxRuntime.jsx("div", { className: mobileBadgeStyle, children: versionBadge }),
|
|
@@ -133,7 +177,7 @@ function SpecToolbar({
|
|
|
133
177
|
] })
|
|
134
178
|
] });
|
|
135
179
|
}
|
|
136
|
-
const containerStyle$
|
|
180
|
+
const containerStyle$4 = css.css({
|
|
137
181
|
display: "flex",
|
|
138
182
|
alignItems: "flex-start",
|
|
139
183
|
justifyContent: "space-between",
|
|
@@ -2457,7 +2501,7 @@ marked.setOptions({
|
|
|
2457
2501
|
breaks: false,
|
|
2458
2502
|
gfm: true
|
|
2459
2503
|
});
|
|
2460
|
-
const containerStyle$
|
|
2504
|
+
const containerStyle$3 = css.css({
|
|
2461
2505
|
color: "var(--omnispec-fg-primary)",
|
|
2462
2506
|
fontSize: "var(--omnispec-font-size-base)",
|
|
2463
2507
|
lineHeight: 1.6
|
|
@@ -2470,7 +2514,7 @@ function MarkdownRenderer({ content, className }) {
|
|
|
2470
2514
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2471
2515
|
"div",
|
|
2472
2516
|
{
|
|
2473
|
-
className: css.cx("omnispec-markdown", containerStyle$
|
|
2517
|
+
className: css.cx("omnispec-markdown", containerStyle$3, className),
|
|
2474
2518
|
dangerouslySetInnerHTML: { __html: html }
|
|
2475
2519
|
}
|
|
2476
2520
|
);
|
|
@@ -3612,6 +3656,187 @@ function generateNumberExample(format, minimum) {
|
|
|
3612
3656
|
}
|
|
3613
3657
|
}
|
|
3614
3658
|
|
|
3659
|
+
const ExpandableCard = React.memo(function ExpandableCard2({
|
|
3660
|
+
id,
|
|
3661
|
+
title,
|
|
3662
|
+
rightLabel,
|
|
3663
|
+
deprecated,
|
|
3664
|
+
badges,
|
|
3665
|
+
expandAll,
|
|
3666
|
+
expandGeneration,
|
|
3667
|
+
children
|
|
3668
|
+
}) {
|
|
3669
|
+
const { defaultExpandOperations } = useSpecFetcher.useConfig();
|
|
3670
|
+
const [expanded, setExpanded] = React.useState(defaultExpandOperations);
|
|
3671
|
+
const [nearViewport, setNearViewport] = React.useState(false);
|
|
3672
|
+
const containerRef = React.useRef(null);
|
|
3673
|
+
const ctx = useExpandAll();
|
|
3674
|
+
const effectiveExpandAll = expandAll ?? ctx.expandAll;
|
|
3675
|
+
const effectiveGeneration = expandGeneration ?? ctx.expandGeneration;
|
|
3676
|
+
React.useEffect(() => {
|
|
3677
|
+
if (effectiveGeneration > 0) {
|
|
3678
|
+
setExpanded(!!effectiveExpandAll);
|
|
3679
|
+
}
|
|
3680
|
+
}, [effectiveExpandAll, effectiveGeneration]);
|
|
3681
|
+
React.useEffect(() => {
|
|
3682
|
+
if (!id) return;
|
|
3683
|
+
return onExpandRequest(id, () => setExpanded(true));
|
|
3684
|
+
}, [id]);
|
|
3685
|
+
React.useEffect(() => {
|
|
3686
|
+
const el = containerRef.current;
|
|
3687
|
+
if (!el) return;
|
|
3688
|
+
if (nearViewport) return;
|
|
3689
|
+
const observer = new IntersectionObserver(
|
|
3690
|
+
([entry]) => {
|
|
3691
|
+
if (entry.isIntersecting) {
|
|
3692
|
+
setNearViewport(true);
|
|
3693
|
+
observer.disconnect();
|
|
3694
|
+
}
|
|
3695
|
+
},
|
|
3696
|
+
{ rootMargin: "1000px" }
|
|
3697
|
+
);
|
|
3698
|
+
observer.observe(el);
|
|
3699
|
+
return () => observer.disconnect();
|
|
3700
|
+
}, [nearViewport]);
|
|
3701
|
+
const shouldRender = expanded && nearViewport;
|
|
3702
|
+
const handleClick = React.useCallback(() => {
|
|
3703
|
+
setExpanded((prev) => !prev);
|
|
3704
|
+
}, []);
|
|
3705
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3706
|
+
"div",
|
|
3707
|
+
{
|
|
3708
|
+
ref: containerRef,
|
|
3709
|
+
id,
|
|
3710
|
+
className: css.cx(
|
|
3711
|
+
"omnispec-expandable-card",
|
|
3712
|
+
containerStyle$2,
|
|
3713
|
+
deprecated ? deprecatedStyle : void 0
|
|
3714
|
+
),
|
|
3715
|
+
children: [
|
|
3716
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3717
|
+
"button",
|
|
3718
|
+
{
|
|
3719
|
+
type: "button",
|
|
3720
|
+
onClick: handleClick,
|
|
3721
|
+
className: css.cx(headerStyle$2, expanded ? headerExpandedStyle : void 0),
|
|
3722
|
+
"aria-expanded": expanded,
|
|
3723
|
+
children: [
|
|
3724
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: css.cx(chevronStyle, expanded && chevronExpandedStyle), children: /* @__PURE__ */ jsxRuntime.jsx(useSpecFetcher.Icon, { name: "chevron-right", size: "0.75rem" }) }),
|
|
3725
|
+
badges?.filter((b) => b.position === "before").map((b) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: xBadgeStyle, style: { backgroundColor: b.color ?? "var(--omnispec-bg-tertiary)", color: b.color ? "#fff" : "var(--omnispec-fg-secondary)" }, children: b.name }, b.name)),
|
|
3726
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: titleStyle$1, children: title }),
|
|
3727
|
+
badges?.filter((b) => b.position !== "before").map((b) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: xBadgeStyle, style: { backgroundColor: b.color ?? "var(--omnispec-bg-tertiary)", color: b.color ? "#fff" : "var(--omnispec-fg-secondary)" }, children: b.name }, b.name)),
|
|
3728
|
+
deprecated && /* @__PURE__ */ jsxRuntime.jsx("span", { className: deprecatedBadgeStyle, children: "Deprecated" }),
|
|
3729
|
+
rightLabel && /* @__PURE__ */ jsxRuntime.jsx("span", { className: rightLabelStyle, children: rightLabel })
|
|
3730
|
+
]
|
|
3731
|
+
}
|
|
3732
|
+
),
|
|
3733
|
+
shouldRender && /* @__PURE__ */ jsxRuntime.jsx("div", { className: bodyStyle, children })
|
|
3734
|
+
]
|
|
3735
|
+
}
|
|
3736
|
+
);
|
|
3737
|
+
});
|
|
3738
|
+
const containerStyle$2 = css.css({
|
|
3739
|
+
marginBottom: "0.75rem",
|
|
3740
|
+
maxWidth: "100%",
|
|
3741
|
+
borderRadius: "0.5rem",
|
|
3742
|
+
[useSpecFetcher.mq.desktop]: {
|
|
3743
|
+
border: "1px solid var(--omnispec-border-color)",
|
|
3744
|
+
borderRadius: "0.5rem"
|
|
3745
|
+
}
|
|
3746
|
+
});
|
|
3747
|
+
const deprecatedStyle = css.css({
|
|
3748
|
+
opacity: 0.6
|
|
3749
|
+
});
|
|
3750
|
+
const headerStyle$2 = css.css({
|
|
3751
|
+
display: "flex",
|
|
3752
|
+
alignItems: "center",
|
|
3753
|
+
gap: "0.75rem",
|
|
3754
|
+
width: "100%",
|
|
3755
|
+
padding: "0.75rem 0",
|
|
3756
|
+
background: "var(--omnispec-bg-primary)",
|
|
3757
|
+
border: "none",
|
|
3758
|
+
borderBottom: "none",
|
|
3759
|
+
borderRadius: "0.5rem",
|
|
3760
|
+
cursor: "pointer",
|
|
3761
|
+
textAlign: "left",
|
|
3762
|
+
[useSpecFetcher.mq.desktop]: {
|
|
3763
|
+
padding: "1rem"
|
|
3764
|
+
}
|
|
3765
|
+
});
|
|
3766
|
+
const headerExpandedStyle = css.css({});
|
|
3767
|
+
const chevronStyle = css.css({
|
|
3768
|
+
color: "var(--omnispec-fg-muted)",
|
|
3769
|
+
flexShrink: 0,
|
|
3770
|
+
transition: "transform 0.2s ease"
|
|
3771
|
+
});
|
|
3772
|
+
const chevronExpandedStyle = css.css({
|
|
3773
|
+
transform: "rotate(90deg)"
|
|
3774
|
+
});
|
|
3775
|
+
const titleStyle$1 = css.css({
|
|
3776
|
+
fontWeight: 600,
|
|
3777
|
+
flex: 1,
|
|
3778
|
+
minWidth: 0,
|
|
3779
|
+
color: "var(--omnispec-fg-primary)",
|
|
3780
|
+
fontSize: "var(--omnispec-font-size-md)",
|
|
3781
|
+
textOverflow: "ellipsis",
|
|
3782
|
+
whiteSpace: "nowrap"
|
|
3783
|
+
});
|
|
3784
|
+
const xBadgeStyle = css.css({
|
|
3785
|
+
fontSize: "var(--omnispec-font-size-xs)",
|
|
3786
|
+
fontWeight: 600,
|
|
3787
|
+
padding: "0.125rem 0.5rem",
|
|
3788
|
+
borderRadius: "1rem",
|
|
3789
|
+
whiteSpace: "nowrap",
|
|
3790
|
+
flexShrink: 0
|
|
3791
|
+
});
|
|
3792
|
+
const deprecatedBadgeStyle = css.css({
|
|
3793
|
+
fontSize: "10px",
|
|
3794
|
+
color: "var(--omnispec-color-warning)",
|
|
3795
|
+
fontWeight: 600,
|
|
3796
|
+
textTransform: "uppercase",
|
|
3797
|
+
border: "1px solid var(--omnispec-color-warning)",
|
|
3798
|
+
padding: "1px 5px",
|
|
3799
|
+
borderRadius: "3px",
|
|
3800
|
+
flexShrink: 0
|
|
3801
|
+
});
|
|
3802
|
+
const rightLabelStyle = css.css({
|
|
3803
|
+
fontSize: "var(--omnispec-font-size-sm)",
|
|
3804
|
+
color: "var(--omnispec-fg-muted)",
|
|
3805
|
+
flexShrink: 0,
|
|
3806
|
+
marginLeft: "auto"
|
|
3807
|
+
});
|
|
3808
|
+
const bodyStyle = css.css({});
|
|
3809
|
+
|
|
3810
|
+
const barStyle = css.css({
|
|
3811
|
+
display: "flex",
|
|
3812
|
+
flexWrap: "wrap",
|
|
3813
|
+
alignItems: "center",
|
|
3814
|
+
gap: "12px",
|
|
3815
|
+
padding: "12px 16px",
|
|
3816
|
+
backgroundColor: "rgba(0, 0, 0, 0.02)",
|
|
3817
|
+
borderBottom: "1px solid var(--omnispec-border-color)",
|
|
3818
|
+
overflow: "hidden",
|
|
3819
|
+
maxWidth: "100%"
|
|
3820
|
+
});
|
|
3821
|
+
const pathStyle = css.css({
|
|
3822
|
+
minWidth: 0,
|
|
3823
|
+
wordBreak: "break-all"
|
|
3824
|
+
});
|
|
3825
|
+
function MethodBar({ label, path, color, method }) {
|
|
3826
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: barStyle, children: [
|
|
3827
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3828
|
+
Badge,
|
|
3829
|
+
{
|
|
3830
|
+
label,
|
|
3831
|
+
variant: method ? "method" : "default",
|
|
3832
|
+
method,
|
|
3833
|
+
color
|
|
3834
|
+
}
|
|
3835
|
+
),
|
|
3836
|
+
/* @__PURE__ */ jsxRuntime.jsx("code", { className: pathStyle, children: path })
|
|
3837
|
+
] });
|
|
3838
|
+
}
|
|
3839
|
+
|
|
3615
3840
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
3616
3841
|
|
|
3617
3842
|
function getDefaultExportFromCjs (x) {
|
|
@@ -7004,9 +7229,9 @@ function CodeBlock({
|
|
|
7004
7229
|
}, [code]);
|
|
7005
7230
|
const hasHeader = title || showCopy || headerLeft;
|
|
7006
7231
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: css.cx("omnispec-code-block", containerStyle$1), children: [
|
|
7007
|
-
hasHeader && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: headerStyle$
|
|
7232
|
+
hasHeader && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: headerStyle$1, children: [
|
|
7008
7233
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: headerLeftStyle, children: [
|
|
7009
|
-
title && /* @__PURE__ */ jsxRuntime.jsx("span", { className: titleStyle
|
|
7234
|
+
title && /* @__PURE__ */ jsxRuntime.jsx("span", { className: titleStyle, children: title }),
|
|
7010
7235
|
headerLeft
|
|
7011
7236
|
] }),
|
|
7012
7237
|
showCopy && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -7056,7 +7281,7 @@ const containerStyle$1 = css.css({
|
|
|
7056
7281
|
border: "1px solid var(--omnispec-border-color)"
|
|
7057
7282
|
}
|
|
7058
7283
|
});
|
|
7059
|
-
const headerStyle$
|
|
7284
|
+
const headerStyle$1 = css.css({
|
|
7060
7285
|
display: "flex",
|
|
7061
7286
|
justifyContent: "space-between",
|
|
7062
7287
|
alignItems: "center",
|
|
@@ -7073,7 +7298,7 @@ const headerLeftStyle = css.css({
|
|
|
7073
7298
|
minWidth: 0,
|
|
7074
7299
|
overflow: "hidden"
|
|
7075
7300
|
});
|
|
7076
|
-
const titleStyle
|
|
7301
|
+
const titleStyle = css.css({
|
|
7077
7302
|
fontFamily: "var(--omnispec-font-mono)",
|
|
7078
7303
|
fontSize: "var(--omnispec-font-size-xs)",
|
|
7079
7304
|
color: "var(--omnispec-fg-muted)",
|
|
@@ -7104,7 +7329,7 @@ const preStyle = css.css({
|
|
|
7104
7329
|
}
|
|
7105
7330
|
});
|
|
7106
7331
|
|
|
7107
|
-
const headerStyle
|
|
7332
|
+
const headerStyle = css.css({
|
|
7108
7333
|
display: "flex",
|
|
7109
7334
|
gap: "0.125rem",
|
|
7110
7335
|
marginBottom: "-1px",
|
|
@@ -7163,7 +7388,7 @@ function Tabs({ tabs, defaultTab, flush = false }) {
|
|
|
7163
7388
|
const [activeTab, setActiveTab] = React.useState(defaultTab ?? tabs[0]?.id ?? "");
|
|
7164
7389
|
const activeContent = tabs.find((t) => t.id === activeTab)?.content;
|
|
7165
7390
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "omnispec-tabs", children: [
|
|
7166
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: css.cx(headerStyle
|
|
7391
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: css.cx(headerStyle, flush && flushHeaderStyle), role: "tablist", children: tabs.map((tab) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7167
7392
|
"button",
|
|
7168
7393
|
{
|
|
7169
7394
|
type: "button",
|
|
@@ -7183,230 +7408,222 @@ function Tabs({ tabs, defaultTab, flush = false }) {
|
|
|
7183
7408
|
] });
|
|
7184
7409
|
}
|
|
7185
7410
|
|
|
7186
|
-
|
|
7187
|
-
|
|
7188
|
-
|
|
7189
|
-
|
|
7190
|
-
|
|
7191
|
-
|
|
7192
|
-
|
|
7193
|
-
|
|
7194
|
-
|
|
7195
|
-
|
|
7196
|
-
|
|
7197
|
-
|
|
7198
|
-
|
|
7199
|
-
|
|
7200
|
-
|
|
7201
|
-
|
|
7202
|
-
|
|
7203
|
-
|
|
7204
|
-
const attempt = () => {
|
|
7205
|
-
const el = document.getElementById(hash);
|
|
7206
|
-
if (el) {
|
|
7207
|
-
el.scrollIntoView({ behavior: scrollBehavior, block: "start" });
|
|
7208
|
-
return true;
|
|
7411
|
+
function ExampleSelector({
|
|
7412
|
+
examples,
|
|
7413
|
+
selectedName,
|
|
7414
|
+
onSelect
|
|
7415
|
+
}) {
|
|
7416
|
+
if (examples.length <= 1) {
|
|
7417
|
+
return null;
|
|
7418
|
+
}
|
|
7419
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: containerStyle, children: [
|
|
7420
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: "example-selector", className: labelStyle, children: "Example:" }),
|
|
7421
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7422
|
+
"select",
|
|
7423
|
+
{
|
|
7424
|
+
id: "example-selector",
|
|
7425
|
+
value: selectedName,
|
|
7426
|
+
onChange: (e) => onSelect(e.target.value),
|
|
7427
|
+
className: selectStyle,
|
|
7428
|
+
children: examples.map((example) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: example.name, children: example.summary ? `${example.name} - ${example.summary}` : example.name }, example.name))
|
|
7209
7429
|
}
|
|
7210
|
-
|
|
7211
|
-
|
|
7212
|
-
if (attempt()) return;
|
|
7213
|
-
let tries = 0;
|
|
7214
|
-
const interval = setInterval(() => {
|
|
7215
|
-
if (attempt() || ++tries >= 10) clearInterval(interval);
|
|
7216
|
-
}, 200);
|
|
7217
|
-
return () => clearInterval(interval);
|
|
7218
|
-
}, [scrollBehavior]);
|
|
7219
|
-
const navigateTo = React.useCallback((id) => {
|
|
7220
|
-
window.history.replaceState(null, "", `#${id}`);
|
|
7221
|
-
requestExpand(id);
|
|
7222
|
-
requestAnimationFrame(() => {
|
|
7223
|
-
const el = document.getElementById(id);
|
|
7224
|
-
el?.scrollIntoView({ behavior: scrollBehavior, block: "start" });
|
|
7225
|
-
});
|
|
7226
|
-
}, [scrollBehavior]);
|
|
7227
|
-
return { navigateTo };
|
|
7430
|
+
)
|
|
7431
|
+
] });
|
|
7228
7432
|
}
|
|
7433
|
+
function getNamedExamples(media) {
|
|
7434
|
+
if (media.example !== void 0) {
|
|
7435
|
+
return [{ name: "default", value: media.example }];
|
|
7436
|
+
}
|
|
7437
|
+
if (media.examples && typeof media.examples === "object") {
|
|
7438
|
+
return Object.entries(media.examples).map(([name, example]) => ({
|
|
7439
|
+
name,
|
|
7440
|
+
summary: example.summary,
|
|
7441
|
+
value: example.value
|
|
7442
|
+
}));
|
|
7443
|
+
}
|
|
7444
|
+
return [];
|
|
7445
|
+
}
|
|
7446
|
+
const containerStyle = css.css({
|
|
7447
|
+
display: "flex",
|
|
7448
|
+
alignItems: "center",
|
|
7449
|
+
gap: "0.5rem",
|
|
7450
|
+
marginBottom: "0.75rem"
|
|
7451
|
+
});
|
|
7452
|
+
const labelStyle = css.css({
|
|
7453
|
+
fontSize: "var(--omnispec-font-size-xs)",
|
|
7454
|
+
fontWeight: 600,
|
|
7455
|
+
color: "var(--omnispec-fg-muted)",
|
|
7456
|
+
textTransform: "uppercase",
|
|
7457
|
+
letterSpacing: "0.5px",
|
|
7458
|
+
whiteSpace: "nowrap"
|
|
7459
|
+
});
|
|
7460
|
+
const selectStyle = css.css({
|
|
7461
|
+
padding: "0.375rem 0.625rem",
|
|
7462
|
+
border: "1px solid var(--omnispec-input-border)",
|
|
7463
|
+
borderRadius: "var(--omnispec-border-radius)",
|
|
7464
|
+
backgroundColor: "var(--omnispec-input-bg)",
|
|
7465
|
+
color: "var(--omnispec-fg-primary)",
|
|
7466
|
+
fontSize: "var(--omnispec-font-size-sm)",
|
|
7467
|
+
fontFamily: "var(--omnispec-font-mono)"
|
|
7468
|
+
});
|
|
7229
7469
|
|
|
7230
|
-
const
|
|
7231
|
-
id,
|
|
7232
|
-
|
|
7233
|
-
|
|
7234
|
-
|
|
7235
|
-
|
|
7236
|
-
|
|
7237
|
-
|
|
7238
|
-
|
|
7239
|
-
}) {
|
|
7240
|
-
const
|
|
7241
|
-
const [
|
|
7242
|
-
|
|
7243
|
-
|
|
7244
|
-
|
|
7245
|
-
|
|
7246
|
-
|
|
7247
|
-
|
|
7248
|
-
|
|
7249
|
-
|
|
7250
|
-
|
|
7251
|
-
|
|
7252
|
-
|
|
7253
|
-
|
|
7254
|
-
|
|
7255
|
-
|
|
7256
|
-
|
|
7257
|
-
|
|
7258
|
-
|
|
7259
|
-
|
|
7260
|
-
|
|
7261
|
-
|
|
7262
|
-
|
|
7263
|
-
|
|
7264
|
-
|
|
7470
|
+
const MOBILE_TABS = [
|
|
7471
|
+
{ id: "schema", label: "Schema" },
|
|
7472
|
+
{ id: "samples", label: "Samples" },
|
|
7473
|
+
{ id: "try-it", label: "Try It" }
|
|
7474
|
+
];
|
|
7475
|
+
const RIGHT_TABS = [
|
|
7476
|
+
{ id: "samples", label: "Samples" },
|
|
7477
|
+
{ id: "try-it", label: "Try It" }
|
|
7478
|
+
];
|
|
7479
|
+
function ReferenceLayout({ schema, samples, tryIt, operationId }) {
|
|
7480
|
+
const [rightTab, setRightTab] = React.useState("samples");
|
|
7481
|
+
const [mobileTab, setMobileTab] = React.useState("schema");
|
|
7482
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
7483
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: mobileWrapperStyle, children: [
|
|
7484
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: mobileTabBarStyle, role: "tablist", children: MOBILE_TABS.map((tab) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7485
|
+
"button",
|
|
7486
|
+
{
|
|
7487
|
+
type: "button",
|
|
7488
|
+
role: "tab",
|
|
7489
|
+
"aria-selected": mobileTab === tab.id,
|
|
7490
|
+
"aria-controls": `mobile-panel-${operationId}-${tab.id}`,
|
|
7491
|
+
onClick: () => setMobileTab(tab.id),
|
|
7492
|
+
className: css.cx(mobileTabStyle, mobileTab === tab.id ? mobileTabActiveStyle : void 0),
|
|
7493
|
+
children: tab.label
|
|
7494
|
+
},
|
|
7495
|
+
tab.id
|
|
7496
|
+
)) }),
|
|
7497
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
7498
|
+
"div",
|
|
7499
|
+
{
|
|
7500
|
+
id: `mobile-panel-${operationId}-${mobileTab}`,
|
|
7501
|
+
className: mobileContentStyle,
|
|
7502
|
+
role: "tabpanel",
|
|
7503
|
+
children: [
|
|
7504
|
+
mobileTab === "schema" && schema,
|
|
7505
|
+
mobileTab === "samples" && samples,
|
|
7506
|
+
mobileTab === "try-it" && tryIt
|
|
7507
|
+
]
|
|
7265
7508
|
}
|
|
7266
|
-
|
|
7267
|
-
|
|
7268
|
-
|
|
7269
|
-
|
|
7270
|
-
|
|
7271
|
-
|
|
7272
|
-
const shouldRender = expanded && nearViewport;
|
|
7273
|
-
const handleClick = React.useCallback(() => {
|
|
7274
|
-
setExpanded((prev) => !prev);
|
|
7275
|
-
}, []);
|
|
7276
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7277
|
-
"div",
|
|
7278
|
-
{
|
|
7279
|
-
ref: containerRef,
|
|
7280
|
-
id,
|
|
7281
|
-
className: css.cx(
|
|
7282
|
-
"omnispec-expandable-card",
|
|
7283
|
-
containerStyle,
|
|
7284
|
-
deprecated ? deprecatedStyle : void 0
|
|
7285
|
-
),
|
|
7286
|
-
children: [
|
|
7287
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
7509
|
+
)
|
|
7510
|
+
] }, `mobile-${operationId}`),
|
|
7511
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: desktopWrapperStyle, children: [
|
|
7512
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: leftColumnStyle, children: schema }),
|
|
7513
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: rightColumnStyle, children: [
|
|
7514
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: rightTabBarStyle, role: "tablist", children: RIGHT_TABS.map((tab) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7288
7515
|
"button",
|
|
7289
7516
|
{
|
|
7290
7517
|
type: "button",
|
|
7291
|
-
|
|
7292
|
-
|
|
7293
|
-
"aria-
|
|
7518
|
+
role: "tab",
|
|
7519
|
+
"aria-selected": rightTab === tab.id,
|
|
7520
|
+
"aria-controls": `right-panel-${operationId}-${tab.id}`,
|
|
7521
|
+
onClick: () => setRightTab(tab.id),
|
|
7522
|
+
className: css.cx(rightTabStyle, rightTab === tab.id ? rightTabActiveStyle : void 0),
|
|
7523
|
+
children: tab.label
|
|
7524
|
+
},
|
|
7525
|
+
tab.id
|
|
7526
|
+
)) }),
|
|
7527
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
7528
|
+
"div",
|
|
7529
|
+
{
|
|
7530
|
+
id: `right-panel-${operationId}-${rightTab}`,
|
|
7531
|
+
className: rightContentStyle,
|
|
7532
|
+
role: "tabpanel",
|
|
7294
7533
|
children: [
|
|
7295
|
-
|
|
7296
|
-
|
|
7297
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: titleStyle, children: title }),
|
|
7298
|
-
badges?.filter((b) => b.position !== "before").map((b) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: xBadgeStyle, style: { backgroundColor: b.color ?? "var(--omnispec-bg-tertiary)", color: b.color ? "#fff" : "var(--omnispec-fg-secondary)" }, children: b.name }, b.name)),
|
|
7299
|
-
deprecated && /* @__PURE__ */ jsxRuntime.jsx("span", { className: deprecatedBadgeStyle, children: "Deprecated" }),
|
|
7300
|
-
rightLabel && /* @__PURE__ */ jsxRuntime.jsx("span", { className: rightLabelStyle, children: rightLabel })
|
|
7534
|
+
rightTab === "samples" && samples,
|
|
7535
|
+
rightTab === "try-it" && tryIt
|
|
7301
7536
|
]
|
|
7302
7537
|
}
|
|
7303
|
-
)
|
|
7304
|
-
|
|
7305
|
-
|
|
7306
|
-
|
|
7307
|
-
|
|
7308
|
-
|
|
7309
|
-
|
|
7310
|
-
marginBottom: "0.75rem",
|
|
7311
|
-
maxWidth: "100%",
|
|
7312
|
-
borderRadius: "0.5rem",
|
|
7538
|
+
)
|
|
7539
|
+
] })
|
|
7540
|
+
] }, `desktop-${operationId}`)
|
|
7541
|
+
] });
|
|
7542
|
+
}
|
|
7543
|
+
const mobileWrapperStyle = css.css({
|
|
7544
|
+
display: "block",
|
|
7313
7545
|
[useSpecFetcher.mq.desktop]: {
|
|
7314
|
-
|
|
7315
|
-
borderRadius: "0.5rem"
|
|
7546
|
+
display: "none"
|
|
7316
7547
|
}
|
|
7317
7548
|
});
|
|
7318
|
-
const
|
|
7319
|
-
opacity: 0.6
|
|
7320
|
-
});
|
|
7321
|
-
const headerStyle = css.css({
|
|
7549
|
+
const mobileTabBarStyle = css.css({
|
|
7322
7550
|
display: "flex",
|
|
7323
|
-
|
|
7324
|
-
|
|
7325
|
-
|
|
7326
|
-
|
|
7327
|
-
|
|
7551
|
+
borderBottom: "1px solid var(--omnispec-border-color)"
|
|
7552
|
+
});
|
|
7553
|
+
const mobileTabStyle = css.css({
|
|
7554
|
+
flex: 1,
|
|
7555
|
+
textAlign: "center",
|
|
7556
|
+
padding: "0.625rem 0.5rem",
|
|
7557
|
+
background: "none",
|
|
7328
7558
|
border: "none",
|
|
7329
|
-
borderBottom: "
|
|
7330
|
-
borderRadius: "0.5rem",
|
|
7559
|
+
borderBottom: "0.125rem solid transparent",
|
|
7331
7560
|
cursor: "pointer",
|
|
7332
|
-
|
|
7333
|
-
|
|
7334
|
-
|
|
7561
|
+
fontSize: "var(--omnispec-font-size-xs)",
|
|
7562
|
+
fontWeight: 600,
|
|
7563
|
+
letterSpacing: "0.04em",
|
|
7564
|
+
textTransform: "uppercase",
|
|
7565
|
+
color: "var(--omnispec-fg-secondary)",
|
|
7566
|
+
"&:hover": {
|
|
7567
|
+
color: "var(--omnispec-fg-primary)"
|
|
7335
7568
|
}
|
|
7336
7569
|
});
|
|
7337
|
-
const
|
|
7338
|
-
|
|
7339
|
-
color: "var(--omnispec-
|
|
7340
|
-
flexShrink: 0,
|
|
7341
|
-
transition: "transform 0.2s ease"
|
|
7570
|
+
const mobileTabActiveStyle = css.css({
|
|
7571
|
+
borderBottom: "0.125rem solid var(--omnispec-color-primary)",
|
|
7572
|
+
color: "var(--omnispec-color-primary)"
|
|
7342
7573
|
});
|
|
7343
|
-
const
|
|
7344
|
-
|
|
7574
|
+
const mobileContentStyle = css.css({
|
|
7575
|
+
padding: "1rem 0"
|
|
7345
7576
|
});
|
|
7346
|
-
const
|
|
7347
|
-
|
|
7577
|
+
const desktopWrapperStyle = css.css({
|
|
7578
|
+
display: "none",
|
|
7579
|
+
[useSpecFetcher.mq.desktop]: {
|
|
7580
|
+
display: "flex",
|
|
7581
|
+
alignItems: "flex-start"
|
|
7582
|
+
}
|
|
7583
|
+
});
|
|
7584
|
+
const leftColumnStyle = css.css({
|
|
7348
7585
|
flex: 1,
|
|
7349
7586
|
minWidth: 0,
|
|
7350
|
-
|
|
7351
|
-
fontSize: "var(--omnispec-font-size-md)",
|
|
7352
|
-
textOverflow: "ellipsis",
|
|
7353
|
-
whiteSpace: "nowrap"
|
|
7587
|
+
padding: "1rem 1.5rem"
|
|
7354
7588
|
});
|
|
7355
|
-
const
|
|
7356
|
-
|
|
7357
|
-
|
|
7358
|
-
|
|
7359
|
-
|
|
7360
|
-
|
|
7361
|
-
|
|
7589
|
+
const rightColumnStyle = css.css({
|
|
7590
|
+
width: "26rem",
|
|
7591
|
+
flexShrink: 0,
|
|
7592
|
+
borderLeft: "1px solid var(--omnispec-border-color)",
|
|
7593
|
+
position: "sticky",
|
|
7594
|
+
top: "calc(var(--omnispec-offset-top, 0px) + 1rem)",
|
|
7595
|
+
alignSelf: "flex-start",
|
|
7596
|
+
maxHeight: "calc(100vh - var(--omnispec-offset-top, 0px) - 2rem)",
|
|
7597
|
+
overflowY: "auto"
|
|
7362
7598
|
});
|
|
7363
|
-
const
|
|
7364
|
-
|
|
7365
|
-
|
|
7599
|
+
const rightTabBarStyle = css.css({
|
|
7600
|
+
display: "flex",
|
|
7601
|
+
borderBottom: "1px solid var(--omnispec-border-color)"
|
|
7602
|
+
});
|
|
7603
|
+
const rightTabStyle = css.css({
|
|
7604
|
+
flex: 1,
|
|
7605
|
+
textAlign: "center",
|
|
7606
|
+
padding: "0.625rem 0.5rem",
|
|
7607
|
+
background: "none",
|
|
7608
|
+
border: "none",
|
|
7609
|
+
borderBottom: "0.125rem solid transparent",
|
|
7610
|
+
cursor: "pointer",
|
|
7611
|
+
fontSize: "var(--omnispec-font-size-xs)",
|
|
7366
7612
|
fontWeight: 600,
|
|
7613
|
+
letterSpacing: "0.04em",
|
|
7367
7614
|
textTransform: "uppercase",
|
|
7368
|
-
|
|
7369
|
-
|
|
7370
|
-
|
|
7371
|
-
|
|
7372
|
-
});
|
|
7373
|
-
const rightLabelStyle = css.css({
|
|
7374
|
-
fontSize: "var(--omnispec-font-size-sm)",
|
|
7375
|
-
color: "var(--omnispec-fg-muted)",
|
|
7376
|
-
flexShrink: 0,
|
|
7377
|
-
marginLeft: "auto"
|
|
7615
|
+
color: "var(--omnispec-fg-secondary)",
|
|
7616
|
+
"&:hover": {
|
|
7617
|
+
color: "var(--omnispec-fg-primary)"
|
|
7618
|
+
}
|
|
7378
7619
|
});
|
|
7379
|
-
const
|
|
7380
|
-
|
|
7381
|
-
|
|
7382
|
-
display: "flex",
|
|
7383
|
-
flexWrap: "wrap",
|
|
7384
|
-
alignItems: "center",
|
|
7385
|
-
gap: "12px",
|
|
7386
|
-
padding: "12px 16px",
|
|
7387
|
-
backgroundColor: "rgba(0, 0, 0, 0.02)",
|
|
7388
|
-
borderBottom: "1px solid var(--omnispec-border-color)",
|
|
7389
|
-
overflow: "hidden",
|
|
7390
|
-
maxWidth: "100%"
|
|
7620
|
+
const rightTabActiveStyle = css.css({
|
|
7621
|
+
borderBottom: "0.125rem solid var(--omnispec-color-primary)",
|
|
7622
|
+
color: "var(--omnispec-color-primary)"
|
|
7391
7623
|
});
|
|
7392
|
-
const
|
|
7393
|
-
|
|
7394
|
-
wordBreak: "break-all"
|
|
7624
|
+
const rightContentStyle = css.css({
|
|
7625
|
+
padding: "1rem"
|
|
7395
7626
|
});
|
|
7396
|
-
function MethodBar({ label, path, color, method }) {
|
|
7397
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: barStyle, children: [
|
|
7398
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7399
|
-
Badge,
|
|
7400
|
-
{
|
|
7401
|
-
label,
|
|
7402
|
-
variant: method ? "method" : "default",
|
|
7403
|
-
method,
|
|
7404
|
-
color
|
|
7405
|
-
}
|
|
7406
|
-
),
|
|
7407
|
-
/* @__PURE__ */ jsxRuntime.jsx("code", { className: pathStyle, children: path })
|
|
7408
|
-
] });
|
|
7409
|
-
}
|
|
7410
7627
|
|
|
7411
7628
|
const headerStyle_ = css.css({
|
|
7412
7629
|
display: "flex",
|
|
@@ -7490,6 +7707,7 @@ exports.Collapsible = Collapsible;
|
|
|
7490
7707
|
exports.EnumItem = EnumItem;
|
|
7491
7708
|
exports.EnumLabel = EnumLabel;
|
|
7492
7709
|
exports.EnumList = EnumList;
|
|
7710
|
+
exports.ExampleSelector = ExampleSelector;
|
|
7493
7711
|
exports.ExpandProvider = ExpandProvider;
|
|
7494
7712
|
exports.ExpandableCard = ExpandableCard;
|
|
7495
7713
|
exports.FieldDescription = FieldDescription;
|
|
@@ -7506,6 +7724,7 @@ exports.PropName = PropName;
|
|
|
7506
7724
|
exports.PropReq = PropReq;
|
|
7507
7725
|
exports.PropRequiredStar = PropRequiredStar;
|
|
7508
7726
|
exports.PropType = PropType;
|
|
7727
|
+
exports.ReferenceLayout = ReferenceLayout;
|
|
7509
7728
|
exports.SchemaBadge = SchemaBadge;
|
|
7510
7729
|
exports.SchemaPropChildren = SchemaPropChildren;
|
|
7511
7730
|
exports.SchemaPropRow = SchemaPropRow;
|
|
@@ -7518,10 +7737,11 @@ exports.Tabs = Tabs;
|
|
|
7518
7737
|
exports.buildConstraints = buildConstraints;
|
|
7519
7738
|
exports.flattenNavItemIds = flattenNavItemIds;
|
|
7520
7739
|
exports.generateExample = generateExample;
|
|
7740
|
+
exports.getNamedExamples = getNamedExamples;
|
|
7521
7741
|
exports.requestExpand = requestExpand;
|
|
7522
7742
|
exports.resolveDownloadLink = resolveDownloadLink;
|
|
7523
7743
|
exports.schemaToNodes = schemaToNodes;
|
|
7524
7744
|
exports.useExpandAll = useExpandAll;
|
|
7525
7745
|
exports.useHashScroll = useHashScroll;
|
|
7526
7746
|
exports.useScrollSpy = useScrollSpy;
|
|
7527
|
-
//# sourceMappingURL=Collapsible-
|
|
7747
|
+
//# sourceMappingURL=Collapsible-BTWyDBkX.js.map
|