zudoku 0.34.2 → 0.34.4

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.
@@ -1 +1 @@
1
- {"version":3,"file":"Stepper.js","sources":["../../src/lib/ui/Stepper.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport \"./Stepper.css\";\n\nconst Stepper = ({ children }: PropsWithChildren) => {\n return <div className=\"stepper\">{children}</div>;\n};\n\nexport { Stepper };\n"],"names":["Stepper","children","jsx"],"mappings":";AAGA,MAAMA,IAAU,CAAC,EAAE,UAAAC,QACTC,gBAAAA,EAAAA,IAAA,OAAA,EAAI,WAAU,WAAW,UAAAD,EAAS,CAAA;"}
1
+ {"version":3,"file":"Stepper.js","sources":["../../src/lib/ui/Stepper.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\n\n// \"stepper\" class is defined in main.css\nconst Stepper = ({ children }: PropsWithChildren) => {\n return <div className=\"stepper\">{children}</div>;\n};\n\nexport { Stepper };\n"],"names":["Stepper","children","jsx"],"mappings":";AAGA,MAAMA,IAAU,CAAC,EAAE,UAAAC,QACTC,gBAAAA,EAAAA,IAAA,OAAA,EAAI,WAAU,WAAW,UAAAD,EAAS,CAAA;"}
@@ -5,7 +5,7 @@ import "./chunk-HA7DTUK3-ZGg2W6yV.js";
5
5
  import "./hook-CfCFKZ-2.js";
6
6
  import "./ui/Button.js";
7
7
  import "./joinUrl-10po2Jdj.js";
8
- import { U as n, o as s } from "./index-DK7IuUyR.js";
8
+ import { U as n, o as s } from "./index-BO-sA1cw.js";
9
9
  export {
10
10
  n as UNTAGGED_PATH,
11
11
  s as openApiPlugin
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zudoku",
3
- "version": "0.34.2",
3
+ "version": "0.34.4",
4
4
  "type": "module",
5
5
  "homepage": "https://zudoku.dev",
6
6
  "repository": {
package/src/app/main.css CHANGED
@@ -239,61 +239,96 @@
239
239
  }
240
240
 
241
241
  /* Theme */
242
+ :root {
243
+ --background: 0 0% 100%;
244
+ --foreground: 240 10% 3.9%;
245
+ --card: 0 0% 100%;
246
+ --card-foreground: 240 10% 3.9%;
247
+ --popover: 0 0% 100%;
248
+ --popover-foreground: 240 10% 3.9%;
249
+ --primary: 240 5.9% 10%;
250
+ --primary-foreground: 0 0% 98%;
251
+ --secondary: 240 4.8% 95.9%;
252
+ --secondary-foreground: 240 5.9% 10%;
253
+ --muted: 240 4.8% 95.9%;
254
+ --muted-foreground: 240 3.8% 46.1%;
255
+ --accent: 240 4.8% 95.9%;
256
+ --accent-foreground: 240 5.9% 10%;
257
+ --destructive: 0 84.2% 60.2%;
258
+ --destructive-foreground: 0 0% 98%;
259
+ --border: 240 5.9% 95%;
260
+ --input: 240 5.9% 90%;
261
+ --ring: 240 5.9% 10%;
262
+ --radius: 0.75rem;
263
+ --chart-1: 12 76% 61%;
264
+ --chart-2: 173 58% 39%;
265
+ --chart-3: 197 37% 24%;
266
+ --chart-4: 43 74% 66%;
267
+ --chart-5: 27 87% 67%;
268
+ }
242
269
 
243
- @layer base {
244
- :root {
245
- --background: 0 0% 100%;
246
- --foreground: 240 10% 3.9%;
247
- --card: 0 0% 100%;
248
- --card-foreground: 240 10% 3.9%;
249
- --popover: 0 0% 100%;
250
- --popover-foreground: 240 10% 3.9%;
251
- --primary: 240 5.9% 10%;
252
- --primary-foreground: 0 0% 98%;
253
- --secondary: 240 4.8% 95.9%;
254
- --secondary-foreground: 240 5.9% 10%;
255
- --muted: 240 4.8% 95.9%;
256
- --muted-foreground: 240 3.8% 46.1%;
257
- --accent: 240 4.8% 95.9%;
258
- --accent-foreground: 240 5.9% 10%;
259
- --destructive: 0 84.2% 60.2%;
260
- --destructive-foreground: 0 0% 98%;
261
- --border: 240 5.9% 95%;
262
- --input: 240 5.9% 90%;
263
- --ring: 240 5.9% 10%;
264
- --radius: 0.75rem;
265
- --chart-1: 12 76% 61%;
266
- --chart-2: 173 58% 39%;
267
- --chart-3: 197 37% 24%;
268
- --chart-4: 43 74% 66%;
269
- --chart-5: 27 87% 67%;
270
- }
270
+ .dark {
271
+ --background: 240 10% 3.9%;
272
+ --foreground: 0 0% 98%;
273
+ --card: 240 10% 3.9%;
274
+ --card-foreground: 0 0% 98%;
275
+ --popover: 240 10% 3.9%;
276
+ --popover-foreground: 0 0% 98%;
277
+ --primary: 0 0% 98%;
278
+ --primary-foreground: 240 5.9% 10%;
279
+ --secondary: 240 3.7% 15.9%;
280
+ --secondary-foreground: 0 0% 98%;
281
+ --muted: 240 3.7% 15.9%;
282
+ --muted-foreground: 240 5% 64.9%;
283
+ --accent: 240 3.7% 15.9%;
284
+ --accent-foreground: 0 0% 98%;
285
+ --destructive: 0 62.8% 30.6%;
286
+ --destructive-foreground: 0 0% 98%;
287
+ --border: 240 3.7% 15.9%;
288
+ --input: 240 3.7% 15.9%;
289
+ --ring: 240 4.9% 83.9%;
290
+ --chart-1: 220 70% 50%;
291
+ --chart-2: 160 60% 45%;
292
+ --chart-3: 30 80% 55%;
293
+ --chart-4: 280 65% 60%;
294
+ --chart-5: 340 75% 55%;
295
+ }
296
+ }
271
297
 
272
- .dark {
273
- --background: 240 10% 3.9%;
274
- --foreground: 0 0% 98%;
275
- --card: 240 10% 3.9%;
276
- --card-foreground: 0 0% 98%;
277
- --popover: 240 10% 3.9%;
278
- --popover-foreground: 0 0% 98%;
279
- --primary: 0 0% 98%;
280
- --primary-foreground: 240 5.9% 10%;
281
- --secondary: 240 3.7% 15.9%;
282
- --secondary-foreground: 0 0% 98%;
283
- --muted: 240 3.7% 15.9%;
284
- --muted-foreground: 240 5% 64.9%;
285
- --accent: 240 3.7% 15.9%;
286
- --accent-foreground: 0 0% 98%;
287
- --destructive: 0 62.8% 30.6%;
288
- --destructive-foreground: 0 0% 98%;
289
- --border: 240 3.7% 15.9%;
290
- --input: 240 3.7% 15.9%;
291
- --ring: 240 4.9% 83.9%;
292
- --chart-1: 220 70% 50%;
293
- --chart-2: 160 60% 45%;
294
- --chart-3: 30 80% 55%;
295
- --chart-4: 280 65% 60%;
296
- --chart-5: 340 75% 55%;
297
- }
298
+ @layer components {
299
+ .stepper > ol {
300
+ --bullet-size: 1.75rem;
301
+ --line-spacing: 0.25rem;
302
+ @apply flex flex-col list-none p-0 m-0;
303
+ counter-reset: step-counter;
304
+ }
305
+
306
+ .stepper > ol > li {
307
+ @apply relative ps-12 pb-6 my-0;
308
+ counter-increment: step-counter;
309
+ }
310
+
311
+ .stepper > ol > li:last-child {
312
+ @apply pb-0;
313
+ }
314
+
315
+ /* Bullet with number */
316
+ .stepper > ol > li::before {
317
+ @apply absolute left-0 flex items-center justify-center size-[--bullet-size];
318
+ @apply bg-muted/80 border border-border text-muted-foreground text-[calc(var(--bullet-size)/2)] font-semibold rounded-full;
319
+ content: counter(step-counter);
320
+ }
321
+
322
+ /* Vertical line */
323
+ .stepper > ol > li::after {
324
+ @apply absolute content-[''] w-[2px] bg-border -translate-x-1/2;
325
+ left: calc(var(--bullet-size) / 2);
326
+ top: calc(var(--bullet-size) + var(--line-spacing));
327
+ height: calc(100% - var(--bullet-size) - (2 * var(--line-spacing)));
328
+ }
329
+
330
+ .stepper > ol > li > :first-child {
331
+ @apply mt-0 pt-0;
332
+ transform: translateY(calc((var(--bullet-size) - 1lh) / 2));
298
333
  }
299
334
  }
@@ -147,17 +147,21 @@ export const OperationList = ({
147
147
  const description = schema.description;
148
148
  const navigate = useNavigate();
149
149
  const operations = schema.operations;
150
+ const tagDescription = schema.tags.find((t) => t.name === tag)?.description;
151
+
150
152
  // Prefetch for Playground
151
153
  useApiIdentities();
152
154
 
153
155
  // The summary property is preferable here as it is a short description of
154
156
  // the API, whereas the description property is typically longer and supports
155
157
  // commonmark formatting, making it ill-suited for use in the meta description
156
- const metaDescription = summary
157
- ? summary
158
- : description
159
- ? sanitizeMarkdownForMetatag(description)
160
- : undefined;
158
+ const metaDescription = tagDescription
159
+ ? sanitizeMarkdownForMetatag(tagDescription)
160
+ : summary
161
+ ? summary
162
+ : description
163
+ ? sanitizeMarkdownForMetatag(description)
164
+ : undefined;
161
165
 
162
166
  const showVersions = Object.entries(versions).length > 1;
163
167
 
@@ -168,7 +172,7 @@ export const OperationList = ({
168
172
  data-pagefind-meta="section:openapi"
169
173
  >
170
174
  <Helmet>
171
- <title>{title}</title>
175
+ <title>{[tag, title].filter(Boolean).join(" - ")}</title>
172
176
  {metaDescription && (
173
177
  <meta name="description" content={metaDescription} />
174
178
  )}
@@ -243,6 +247,16 @@ export const OperationList = ({
243
247
  </CollapsibleContent>
244
248
  )}
245
249
  </Collapsible>
250
+ {tagDescription && (
251
+ <p
252
+ className={cn(
253
+ ProseClasses,
254
+ "my-4 max-w-full prose-img:max-w-prose",
255
+ )}
256
+ >
257
+ <Markdown content={tagDescription} />
258
+ </p>
259
+ )}
246
260
  </div>
247
261
  <hr />
248
262
  <div className="my-4 flex items-center justify-end gap-4">
@@ -1,6 +1,6 @@
1
1
  import type { PropsWithChildren } from "react";
2
- import "./Stepper.css";
3
2
 
3
+ // "stepper" class is defined in main.css
4
4
  const Stepper = ({ children }: PropsWithChildren) => {
5
5
  return <div className="stepper">{children}</div>;
6
6
  };
package/lib/zudoku.css DELETED
@@ -1 +0,0 @@
1
- @tailwind components;@layer components{.stepper>ol{--bullet-size: 1.75rem;--line-spacing: .25rem;@apply flex flex-col list-none p-0 m-0;counter-reset:step-counter}.stepper>ol>li{@apply relative ps-12 pb-6 my-0;counter-increment:step-counter}.stepper>ol>li:last-child{@apply pb-0;}.stepper>ol>li:before{@apply absolute left-0 flex items-center justify-center size-[--bullet-size];@apply bg-muted/80 border border-border text-muted-foreground text-[calc(var(--bullet-size)/2)] font-semibold rounded-full;content:counter(step-counter)}.stepper>ol>li:after{@apply absolute content-[""] w-[2px] bg-border -translate-x-1/2;left:calc(var(--bullet-size) / 2);top:calc(var(--bullet-size) + var(--line-spacing));height:calc(100% - var(--bullet-size) - (2 * var(--line-spacing)))}.stepper>ol>li>:first-child{@apply mt-0 pt-0;transform:translateY(calc((var(--bullet-size) - 1lh) / 2))}}
@@ -1,43 +0,0 @@
1
- @tailwind components;
2
-
3
- @layer components {
4
- .stepper {
5
- /* @apply mb-6; */
6
- }
7
-
8
- .stepper > ol {
9
- --bullet-size: 1.75rem;
10
- --line-spacing: 0.25rem;
11
- @apply flex flex-col list-none p-0 m-0;
12
- counter-reset: step-counter;
13
- }
14
-
15
- .stepper > ol > li {
16
- @apply relative ps-12 pb-6 my-0;
17
- counter-increment: step-counter;
18
- }
19
-
20
- .stepper > ol > li:last-child {
21
- @apply pb-0;
22
- }
23
-
24
- /* Bullet with number */
25
- .stepper > ol > li::before {
26
- @apply absolute left-0 flex items-center justify-center size-[--bullet-size];
27
- @apply bg-muted/80 border border-border text-muted-foreground text-[calc(var(--bullet-size)/2)] font-semibold rounded-full;
28
- content: counter(step-counter);
29
- }
30
-
31
- /* Vertical line */
32
- .stepper > ol > li::after {
33
- @apply absolute content-[''] w-[2px] bg-border -translate-x-1/2;
34
- left: calc(var(--bullet-size) / 2);
35
- top: calc(var(--bullet-size) + var(--line-spacing));
36
- height: calc(100% - var(--bullet-size) - (2 * var(--line-spacing)));
37
- }
38
-
39
- .stepper > ol > li > :first-child {
40
- @apply mt-0 pt-0;
41
- transform: translateY(calc((var(--bullet-size) - 1lh) / 2));
42
- }
43
- }