@ciderpress/ui 1.0.0-rc.16 → 1.0.0-rc.17

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.
@@ -8,7 +8,7 @@
8
8
  /* ── Two-column operation layout ───────────────────────────── */
9
9
  .cp-oas-operation {
10
10
  display: grid;
11
- grid-template-columns: 55% 45%;
11
+ grid-template-columns: minmax(0, 11fr) minmax(0, 9fr);
12
12
  gap: 2rem;
13
13
  padding: 1rem 0;
14
14
  }
@@ -24,7 +24,7 @@
24
24
  min-width: 0;
25
25
  }
26
26
 
27
- @media (max-width: 960px) {
27
+ @media (max-width: 1280px) {
28
28
  .cp-oas-operation {
29
29
  grid-template-columns: 1fr;
30
30
  }
@@ -119,6 +119,11 @@
119
119
  }
120
120
 
121
121
  /* ── Sidebar method badge + path ───────────────────────────── */
122
+ .rp-sidebar-item__left:has(.cp-oas-sidebar-badge) {
123
+ /* Preserve the active row while tightening Rspress's depth-2 inline indent. */
124
+ margin-left: -12px;
125
+ }
126
+
122
127
  .cp-oas-sidebar-badge {
123
128
  display: inline-block;
124
129
  padding: 1px 6px;
@@ -194,10 +199,22 @@
194
199
  margin: 1rem 0 0.5rem;
195
200
  }
196
201
 
197
- .cp-oas-parameters__table {
202
+ .rp-doc .cp-oas-parameters__table {
198
203
  width: 100%;
204
+ table-layout: fixed;
199
205
  border-collapse: collapse;
200
206
  font-size: 0.875rem;
207
+ margin: 0;
208
+ }
209
+
210
+ .cp-oas-parameters__table-scroll {
211
+ overflow-x: auto;
212
+ }
213
+
214
+ @media (max-width: 640px) {
215
+ .rp-doc .cp-oas-parameters__table {
216
+ min-width: 36rem;
217
+ }
201
218
  }
202
219
 
203
220
  .cp-oas-parameters__table th {
@@ -214,6 +231,7 @@
214
231
  color: var(--cp-c-text-1);
215
232
  border-bottom: 1px solid var(--cp-c-divider);
216
233
  vertical-align: top;
234
+ overflow-wrap: anywhere;
217
235
  }
218
236
 
219
237
  .cp-oas-parameters__name {
@@ -113,7 +113,7 @@ function ServerList({
113
113
  P.when((s): s is readonly Record<string, unknown>[] => s.length > 0),
114
114
  (s) => (
115
115
  <div className="cp-oas-servers">
116
- <div className="cp-oas-overview__section-title">Servers</div>
116
+ <h2 className="cp-oas-overview__section-title">Servers</h2>
117
117
  {s.map((server) => {
118
118
  const url = String(server['url'] ?? '')
119
119
  const description = server['description'] as string | undefined
@@ -153,7 +153,7 @@ function AuthSchemes({
153
153
  P.when((e): e is [string, Record<string, unknown>][] => e.length > 0),
154
154
  (e) => (
155
155
  <div className="cp-oas-auth-schemes">
156
- <div className="cp-oas-overview__section-title">Authentication</div>
156
+ <h2 className="cp-oas-overview__section-title">Authentication</h2>
157
157
  {e.map(([name, scheme]) => (
158
158
  <div key={name} className="cp-oas-auth-scheme">
159
159
  <LockIcon />
@@ -180,7 +180,7 @@ function TagGroups({ tags }: { readonly tags: readonly TagInfo[] }): React.React
180
180
  P.when((t): t is readonly TagInfo[] => t.length > 0),
181
181
  (t) => (
182
182
  <div className="cp-oas-tags">
183
- <div className="cp-oas-overview__section-title">Operations</div>
183
+ <h2 className="cp-oas-overview__section-title">Operations</h2>
184
184
  {t.map((tag) => {
185
185
  const descEl = match(tag.description)
186
186
  .with(
@@ -29,7 +29,7 @@ export function ParametersTable({ parameters }: ParametersTableProps): React.Rea
29
29
  P.when((g): g is readonly ParameterGroup[] => g.length > 0),
30
30
  (g) => (
31
31
  <div className="cp-oas-parameters">
32
- <div className="cp-oas-parameters__title">Parameters</div>
32
+ <h2 className="cp-oas-parameters__title">Parameters</h2>
33
33
  {g.map(renderGroup)}
34
34
  </div>
35
35
  )
@@ -131,19 +131,21 @@ function renderRow(param: Record<string, unknown>): React.ReactElement {
131
131
  function renderGroup(group: ParameterGroup): React.ReactElement {
132
132
  return (
133
133
  <div key={group.label}>
134
- <div className="cp-oas-parameters__group-label">{group.label}</div>
135
- <table className="cp-oas-parameters__table">
136
- <thead>
137
- <tr>
138
- <th>Name</th>
139
- <th>Type</th>
140
- <th>Required</th>
141
- <th>Description</th>
142
- <th>Default</th>
143
- </tr>
144
- </thead>
145
- <tbody>{group.items.map(renderRow)}</tbody>
146
- </table>
134
+ <h3 className="cp-oas-parameters__group-label">{group.label}</h3>
135
+ <div className="cp-oas-parameters__table-scroll">
136
+ <table className="cp-oas-parameters__table">
137
+ <thead>
138
+ <tr>
139
+ <th>Name</th>
140
+ <th>Type</th>
141
+ <th>Required</th>
142
+ <th>Description</th>
143
+ <th>Default</th>
144
+ </tr>
145
+ </thead>
146
+ <tbody>{group.items.map(renderRow)}</tbody>
147
+ </table>
148
+ </div>
147
149
  </div>
148
150
  )
149
151
  }
@@ -54,7 +54,7 @@ export function RequestBody({ requestBody }: RequestBodyProps): React.ReactEleme
54
54
 
55
55
  return (
56
56
  <div className="cp-oas-request-body">
57
- <div className="cp-oas-request-body__title">Request Body</div>
57
+ <h2 className="cp-oas-request-body__title">Request Body</h2>
58
58
  {descEl}
59
59
  {bodyEl}
60
60
  {exampleEl}
@@ -26,7 +26,7 @@ export function ResponseList({ responses }: ResponseListProps): React.ReactEleme
26
26
 
27
27
  return (
28
28
  <div className="cp-oas-responses">
29
- <div className="cp-oas-responses__title">Responses</div>
29
+ <h2 className="cp-oas-responses__title">Responses</h2>
30
30
  {entries.map(renderResponseItem)}
31
31
  </div>
32
32
  )
@@ -26,7 +26,7 @@ export function SecurityBadges({ securities }: SecurityBadgesProps): React.React
26
26
  P.when((s): s is readonly Record<string, unknown>[] => s.length > 0),
27
27
  (s) => (
28
28
  <div className="cp-oas-security">
29
- <div className="cp-oas-security__title">Authentication</div>
29
+ <h2 className="cp-oas-security__title">Authentication</h2>
30
30
  <div className="cp-oas-security__list">
31
31
  {s.map((requirement, idx) => (
32
32
  <span key={String(idx)} className="cp-oas-security__badge">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ciderpress/ui",
3
- "version": "1.0.0-rc.16",
3
+ "version": "1.0.0-rc.17",
4
4
  "description": "Rspress plugin, theme components, and styles for ciderpress",
5
5
  "keywords": [
6
6
  "ciderpress",
@@ -60,6 +60,7 @@
60
60
  "@rspress/plugin-client-redirects": "^2.0.21",
61
61
  "@rspress/plugin-sitemap": "^2.0.21",
62
62
  "clsx": "^2.1.1",
63
+ "katex": "^0.18.9",
63
64
  "massaman": "^0.5.1",
64
65
  "mermaid": "^11.17.2",
65
66
  "react-aria-components": "^1.20.0",
@@ -8,7 +8,7 @@
8
8
  /* ── Two-column operation layout ───────────────────────────── */
9
9
  .cp-oas-operation {
10
10
  display: grid;
11
- grid-template-columns: 55% 45%;
11
+ grid-template-columns: minmax(0, 11fr) minmax(0, 9fr);
12
12
  gap: 2rem;
13
13
  padding: 1rem 0;
14
14
  }
@@ -24,7 +24,7 @@
24
24
  min-width: 0;
25
25
  }
26
26
 
27
- @media (max-width: 960px) {
27
+ @media (max-width: 1280px) {
28
28
  .cp-oas-operation {
29
29
  grid-template-columns: 1fr;
30
30
  }
@@ -119,6 +119,11 @@
119
119
  }
120
120
 
121
121
  /* ── Sidebar method badge + path ───────────────────────────── */
122
+ .rp-sidebar-item__left:has(.cp-oas-sidebar-badge) {
123
+ /* Preserve the active row while tightening Rspress's depth-2 inline indent. */
124
+ margin-left: -12px;
125
+ }
126
+
122
127
  .cp-oas-sidebar-badge {
123
128
  display: inline-block;
124
129
  padding: 1px 6px;
@@ -194,10 +199,22 @@
194
199
  margin: 1rem 0 0.5rem;
195
200
  }
196
201
 
197
- .cp-oas-parameters__table {
202
+ .rp-doc .cp-oas-parameters__table {
198
203
  width: 100%;
204
+ table-layout: fixed;
199
205
  border-collapse: collapse;
200
206
  font-size: 0.875rem;
207
+ margin: 0;
208
+ }
209
+
210
+ .cp-oas-parameters__table-scroll {
211
+ overflow-x: auto;
212
+ }
213
+
214
+ @media (max-width: 640px) {
215
+ .rp-doc .cp-oas-parameters__table {
216
+ min-width: 36rem;
217
+ }
201
218
  }
202
219
 
203
220
  .cp-oas-parameters__table th {
@@ -214,6 +231,7 @@
214
231
  color: var(--cp-c-text-1);
215
232
  border-bottom: 1px solid var(--cp-c-divider);
216
233
  vertical-align: top;
234
+ overflow-wrap: anywhere;
217
235
  }
218
236
 
219
237
  .cp-oas-parameters__name {
@@ -113,7 +113,7 @@ function ServerList({
113
113
  P.when((s): s is readonly Record<string, unknown>[] => s.length > 0),
114
114
  (s) => (
115
115
  <div className="cp-oas-servers">
116
- <div className="cp-oas-overview__section-title">Servers</div>
116
+ <h2 className="cp-oas-overview__section-title">Servers</h2>
117
117
  {s.map((server) => {
118
118
  const url = String(server['url'] ?? '')
119
119
  const description = server['description'] as string | undefined
@@ -153,7 +153,7 @@ function AuthSchemes({
153
153
  P.when((e): e is [string, Record<string, unknown>][] => e.length > 0),
154
154
  (e) => (
155
155
  <div className="cp-oas-auth-schemes">
156
- <div className="cp-oas-overview__section-title">Authentication</div>
156
+ <h2 className="cp-oas-overview__section-title">Authentication</h2>
157
157
  {e.map(([name, scheme]) => (
158
158
  <div key={name} className="cp-oas-auth-scheme">
159
159
  <LockIcon />
@@ -180,7 +180,7 @@ function TagGroups({ tags }: { readonly tags: readonly TagInfo[] }): React.React
180
180
  P.when((t): t is readonly TagInfo[] => t.length > 0),
181
181
  (t) => (
182
182
  <div className="cp-oas-tags">
183
- <div className="cp-oas-overview__section-title">Operations</div>
183
+ <h2 className="cp-oas-overview__section-title">Operations</h2>
184
184
  {t.map((tag) => {
185
185
  const descEl = match(tag.description)
186
186
  .with(
@@ -29,7 +29,7 @@ export function ParametersTable({ parameters }: ParametersTableProps): React.Rea
29
29
  P.when((g): g is readonly ParameterGroup[] => g.length > 0),
30
30
  (g) => (
31
31
  <div className="cp-oas-parameters">
32
- <div className="cp-oas-parameters__title">Parameters</div>
32
+ <h2 className="cp-oas-parameters__title">Parameters</h2>
33
33
  {g.map(renderGroup)}
34
34
  </div>
35
35
  )
@@ -131,19 +131,21 @@ function renderRow(param: Record<string, unknown>): React.ReactElement {
131
131
  function renderGroup(group: ParameterGroup): React.ReactElement {
132
132
  return (
133
133
  <div key={group.label}>
134
- <div className="cp-oas-parameters__group-label">{group.label}</div>
135
- <table className="cp-oas-parameters__table">
136
- <thead>
137
- <tr>
138
- <th>Name</th>
139
- <th>Type</th>
140
- <th>Required</th>
141
- <th>Description</th>
142
- <th>Default</th>
143
- </tr>
144
- </thead>
145
- <tbody>{group.items.map(renderRow)}</tbody>
146
- </table>
134
+ <h3 className="cp-oas-parameters__group-label">{group.label}</h3>
135
+ <div className="cp-oas-parameters__table-scroll">
136
+ <table className="cp-oas-parameters__table">
137
+ <thead>
138
+ <tr>
139
+ <th>Name</th>
140
+ <th>Type</th>
141
+ <th>Required</th>
142
+ <th>Description</th>
143
+ <th>Default</th>
144
+ </tr>
145
+ </thead>
146
+ <tbody>{group.items.map(renderRow)}</tbody>
147
+ </table>
148
+ </div>
147
149
  </div>
148
150
  )
149
151
  }
@@ -54,7 +54,7 @@ export function RequestBody({ requestBody }: RequestBodyProps): React.ReactEleme
54
54
 
55
55
  return (
56
56
  <div className="cp-oas-request-body">
57
- <div className="cp-oas-request-body__title">Request Body</div>
57
+ <h2 className="cp-oas-request-body__title">Request Body</h2>
58
58
  {descEl}
59
59
  {bodyEl}
60
60
  {exampleEl}
@@ -26,7 +26,7 @@ export function ResponseList({ responses }: ResponseListProps): React.ReactEleme
26
26
 
27
27
  return (
28
28
  <div className="cp-oas-responses">
29
- <div className="cp-oas-responses__title">Responses</div>
29
+ <h2 className="cp-oas-responses__title">Responses</h2>
30
30
  {entries.map(renderResponseItem)}
31
31
  </div>
32
32
  )
@@ -26,7 +26,7 @@ export function SecurityBadges({ securities }: SecurityBadgesProps): React.React
26
26
  P.when((s): s is readonly Record<string, unknown>[] => s.length > 0),
27
27
  (s) => (
28
28
  <div className="cp-oas-security">
29
- <div className="cp-oas-security__title">Authentication</div>
29
+ <h2 className="cp-oas-security__title">Authentication</h2>
30
30
  <div className="cp-oas-security__list">
31
31
  {s.map((requirement, idx) => (
32
32
  <span key={String(idx)} className="cp-oas-security__badge">