@dogsbay/render-html 0.2.0-beta.120 → 0.2.0-beta.121

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/api.css CHANGED
@@ -1,4 +1,4 @@
1
- /* Generated by packages/render-html/scripts/sync-sources.mjs from @dogsbay/ui api-symbol.css, api-source.css, EndpointSection.astro, PropertyItem.astro. Do not edit. */
1
+ /* Generated by packages/render-html/scripts/sync-sources.mjs from @dogsbay/ui api-symbol.css, api-source.css, EndpointCard.astro, EndpointSection.astro, PropertyItem.astro. Do not edit. */
2
2
  /* API Symbol badges, coloured by kind. Text on its own 20% tint must reach
3
3
  WCAG AA (4.5:1) on the page background: the light colours were L 0.5–0.6
4
4
  (3.2–4.0:1) and are L 0.44 (5.0:1 or more); render-html's
@@ -126,6 +126,63 @@
126
126
  }
127
127
 
128
128
 
129
+ /* An operation's description is Markdown rendered to HTML (lists, code,
130
+ paragraphs), placed where the page's prose styles do not reach: without
131
+ these a bulleted field list reads as loose lines. */
132
+ .api-description > * + * {
133
+ margin-top: 0.5rem;
134
+ }
135
+ .api-description ul {
136
+ list-style: disc;
137
+ padding-left: 1.25rem;
138
+ }
139
+ .api-description ol {
140
+ list-style: decimal;
141
+ padding-left: 1.25rem;
142
+ }
143
+ .api-description li + li,
144
+ .api-description li > ul,
145
+ .api-description li > ol {
146
+ margin-top: 0.125rem;
147
+ }
148
+ .api-description ul ul {
149
+ list-style: circle;
150
+ }
151
+ /* Field names (`id`, `scm_type`) stand out in the JSON key colour,
152
+ on a faint tint of it. Override --api-field in the theme to change it; a site
153
+ scaffolded before the token existed gets --api-post, the same blue. */
154
+ .api-description code {
155
+ font-family: var(--font-mono, ui-monospace, monospace);
156
+ font-size: 0.85em;
157
+ font-weight: 600;
158
+ color: var(--api-field, var(--api-post, var(--foreground)));
159
+ background-color: color-mix(in oklab, var(--api-field, var(--api-post, var(--foreground))) 8%, transparent);
160
+ border-radius: 0.25rem;
161
+ padding: 0.0625rem 0.3rem;
162
+ }
163
+ /* A code block in a description (a JSON shape, `?order_by=`) is one
164
+ full-width block, as Swagger UI shows it: the chip styling above,
165
+ applied per line, read as a stack of separate highlights. */
166
+ .api-description pre {
167
+ overflow-x: auto;
168
+ border-radius: 0.375rem;
169
+ padding: 0.5rem 0.75rem;
170
+ background-color: var(--code-background, color-mix(in oklab, var(--foreground) 6%, transparent));
171
+ }
172
+ .api-description pre code {
173
+ display: block;
174
+ padding: 0;
175
+ border-radius: 0;
176
+ background: none;
177
+ white-space: pre;
178
+ }
179
+ .api-description a {
180
+ color: var(--primary);
181
+ text-decoration: underline;
182
+ text-underline-offset: 2px;
183
+ }
184
+
185
+
129
186
  details[open] > summary [data-section-chevron] {
130
187
  transform: rotate(90deg);
131
188
  }
@@ -56,6 +56,7 @@
56
56
  --color-code-fg: var(--code-foreground);
57
57
 
58
58
  /* API reference — HTTP method, type, status, role colors */
59
+ --color-api-field: var(--api-field);
59
60
  --color-api-get: var(--api-get);
60
61
  --color-api-post: var(--api-post);
61
62
  --color-api-put: var(--api-put);
@@ -139,6 +140,9 @@
139
140
  --api-head: oklch(0.47 0.222 286);
140
141
  --api-required: oklch(0.45 0.179 22);
141
142
  --api-deprecated: oklch(0.455 0.105 63);
143
+ /* A field name in an operation's description (`id`, `name`): the JSON
144
+ key colour of the highlighted examples (github-light-default #0550ae). */
145
+ --api-field: oklch(0.47 0.16 254);
142
146
  --api-type-string: oklch(0.435 0.095 162);
143
147
  --api-type-number: oklch(0.45 0.174 259);
144
148
  --api-type-boolean: oklch(0.455 0.105 63);
@@ -195,6 +199,7 @@
195
199
  --api-head: oklch(0.740 0.182 286);
196
200
  --api-required: oklch(0.805 0.194 22);
197
201
  --api-deprecated: oklch(0.745 0.15 63);
202
+ --api-field: oklch(0.79 0.11 245); /* github-dark-default #79c0ff */
198
203
  --api-type-string: oklch(0.690 0.135 162);
199
204
  --api-type-number: oklch(0.725 0.174 259);
200
205
  --api-type-boolean: oklch(0.720 0.15 63);
@@ -56,6 +56,7 @@
56
56
  --color-code-fg: var(--code-foreground);
57
57
 
58
58
  /* API reference — HTTP method, type, status, role colors */
59
+ --color-api-field: var(--api-field);
59
60
  --color-api-get: var(--api-get);
60
61
  --color-api-post: var(--api-post);
61
62
  --color-api-put: var(--api-put);
@@ -142,6 +143,9 @@
142
143
  --api-head: oklch(0.47 0.222 286);
143
144
  --api-required: oklch(0.45 0.179 22);
144
145
  --api-deprecated: oklch(0.455 0.105 63);
146
+ /* A field name in an operation's description (`id`, `name`): the JSON
147
+ key colour of the highlighted examples (github-light-default #0550ae). */
148
+ --api-field: oklch(0.47 0.16 254);
145
149
  --api-type-string: oklch(0.435 0.095 162);
146
150
  --api-type-number: oklch(0.45 0.174 259);
147
151
  --api-type-boolean: oklch(0.455 0.105 63);
@@ -199,6 +203,7 @@
199
203
  --api-head: oklch(0.740 0.182 286);
200
204
  --api-required: oklch(0.805 0.194 22);
201
205
  --api-deprecated: oklch(0.745 0.15 63);
206
+ --api-field: oklch(0.79 0.11 245); /* github-dark-default #79c0ff */
202
207
  --api-type-string: oklch(0.690 0.135 162);
203
208
  --api-type-number: oklch(0.725 0.174 259);
204
209
  --api-type-boolean: oklch(0.720 0.15 63);
package/dist/api.js CHANGED
@@ -319,7 +319,7 @@ function endpoint(n, ctx) {
319
319
  ? `<div class="flex items-center gap-2 rounded-lg border border-api-deprecated/30 bg-api-deprecated/10 px-4 py-2 text-sm text-api-deprecated">${DEPRECATED_ICON}<span>This endpoint is deprecated.</span></div>`
320
320
  : "") +
321
321
  (summary ? `<p class="text-sm text-muted-foreground">${esc(summary)}</p>` : "") +
322
- (description ? `<div class="text-sm text-muted-foreground">${rewriteHtml(description, ctx)}</div>` : "") +
322
+ (description ? `<div class="api-description text-sm text-muted-foreground">${rewriteHtml(description, ctx)}</div>` : "") +
323
323
  `<div class="space-y-3">${sections}</div></div>`;
324
324
  const panels = codePanels(p)
325
325
  .map((c) => c.samples
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dogsbay/render-html",
3
- "version": "0.2.0-beta.120",
3
+ "version": "0.2.0-beta.121",
4
4
  "description": "Dogsbay MD TreeNode → HTML with the Astro components' markup and classes. No highlighter, math or CSS compiler unless you pass one; Worker- and browser-safe",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -30,9 +30,9 @@
30
30
  "dependencies": {
31
31
  "htmlparser2": "^10.1.0",
32
32
  "markdown-it": "^14.3.0",
33
- "@dogsbay/format-dogsbay-md": "0.2.0-beta.120",
34
- "@dogsbay/serialize-core": "0.2.0-beta.120",
35
- "@dogsbay/types": "0.2.0-beta.120"
33
+ "@dogsbay/format-dogsbay-md": "0.2.0-beta.121",
34
+ "@dogsbay/serialize-core": "0.2.0-beta.121",
35
+ "@dogsbay/types": "0.2.0-beta.121"
36
36
  },
37
37
  "peerDependencies": {
38
38
  "katex": "^0.16.0"