jamdesk 1.1.194 → 1.1.196

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.
@@ -4,8 +4,14 @@
4
4
  * Frontmatter is whatever YAML decided, not what the author meant:
5
5
  * `description: 404` parses to a number and `description: 2026-01-01` to a
6
6
  * Date. Both reach surfaces that accept only strings — react-markdown asserts
7
- * on `children` and THROWS in development, `.trim()`/`.replace()` throw
8
- * outright, and `<meta name="description">` would carry `[object Object]`.
7
+ * on `children` and THROWS in development, and `.trim()`/`.replace()` throw
8
+ * outright.
9
+ *
10
+ * What this does NOT do is make every malformed shape presentable. A YAML
11
+ * mapping still coerces to `[object Object]` and a sequence to `a,b`, because
12
+ * the alternative — returning '' — hides an authoring mistake behind an empty
13
+ * page rather than a visibly wrong one. The contract is only that no input
14
+ * makes a caller throw.
9
15
  *
10
16
  * The same is true of a dereferenced OpenAPI spec, which is why ApiMarkdown
11
17
  * calls this too: the ISR loader runs SwaggerParser.dereference, NOT .validate
@@ -1 +1 @@
1
- {"version":3,"file":"frontmatter-text.d.ts","sourceRoot":"","sources":["../../src/lib/frontmatter-text.ts"],"names":[],"mappings":"AAYA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAItD"}
1
+ {"version":3,"file":"frontmatter-text.d.ts","sourceRoot":"","sources":["../../src/lib/frontmatter-text.ts"],"names":[],"mappings":"AAYA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CActD"}
@@ -15,8 +15,14 @@
15
15
  * Frontmatter is whatever YAML decided, not what the author meant:
16
16
  * `description: 404` parses to a number and `description: 2026-01-01` to a
17
17
  * Date. Both reach surfaces that accept only strings — react-markdown asserts
18
- * on `children` and THROWS in development, `.trim()`/`.replace()` throw
19
- * outright, and `<meta name="description">` would carry `[object Object]`.
18
+ * on `children` and THROWS in development, and `.trim()`/`.replace()` throw
19
+ * outright.
20
+ *
21
+ * What this does NOT do is make every malformed shape presentable. A YAML
22
+ * mapping still coerces to `[object Object]` and a sequence to `a,b`, because
23
+ * the alternative — returning '' — hides an authoring mistake behind an empty
24
+ * page rather than a visibly wrong one. The contract is only that no input
25
+ * makes a caller throw.
20
26
  *
21
27
  * The same is true of a dereferenced OpenAPI spec, which is why ApiMarkdown
22
28
  * calls this too: the ISR loader runs SwaggerParser.dereference, NOT .validate
@@ -34,8 +40,17 @@
34
40
  export function frontmatterText(value) {
35
41
  if (value === null || value === undefined || value === '')
36
42
  return '';
37
- if (value instanceof Date)
43
+ // An out-of-range Date still satisfies `instanceof`, and toISOString() throws
44
+ // RangeError on it — the one input that would make this function do the very
45
+ // thing it exists to prevent. js-yaml cannot produce one (its timestamp
46
+ // resolver builds through Date.UTC, which rolls over rather than going
47
+ // invalid) and JSON.parse produces no Dates at all, but a JS caller can:
48
+ // Firestore's Timestamp.toDate() on out-of-range seconds, or a reviver.
49
+ // Falling through yields "Invalid Date" — visibly wrong, which is the right
50
+ // failure for a coercion whose contract is that it never throws.
51
+ if (value instanceof Date && !Number.isNaN(value.getTime())) {
38
52
  return value.toISOString().slice(0, 10);
53
+ }
39
54
  return String(value);
40
55
  }
41
56
  //# sourceMappingURL=frontmatter-text.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"frontmatter-text.js","sourceRoot":"","sources":["../../src/lib/frontmatter-text.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAChD,EAAE;AACF,uEAAuE;AACvE,EAAE;AACF,+EAA+E;AAC/E,6EAA6E;AAC7E,4EAA4E;AAC5E,4EAA4E;AAC5E,yEAAyE;AACzE,8EAA8E;AAC9E,4EAA4E;AAE5E;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,eAAe,CAAC,KAAc;IAC5C,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,EAAE;QAAE,OAAO,EAAE,CAAC;IACrE,IAAI,KAAK,YAAY,IAAI;QAAE,OAAO,KAAK,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IACnE,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC"}
1
+ {"version":3,"file":"frontmatter-text.js","sourceRoot":"","sources":["../../src/lib/frontmatter-text.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAChD,EAAE;AACF,uEAAuE;AACvE,EAAE;AACF,+EAA+E;AAC/E,6EAA6E;AAC7E,4EAA4E;AAC5E,4EAA4E;AAC5E,yEAAyE;AACzE,8EAA8E;AAC9E,4EAA4E;AAE5E;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,UAAU,eAAe,CAAC,KAAc;IAC5C,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,EAAE;QAAE,OAAO,EAAE,CAAC;IACrE,8EAA8E;IAC9E,6EAA6E;IAC7E,wEAAwE;IACxE,uEAAuE;IACvE,yEAAyE;IACzE,wEAAwE;IACxE,4EAA4E;IAC5E,iEAAiE;IACjE,IAAI,KAAK,YAAY,IAAI,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC;QAC5D,OAAO,KAAK,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAC1C,CAAC;IACD,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jamdesk",
3
- "version": "1.1.194",
3
+ "version": "1.1.196",
4
4
  "description": "CLI for Jamdesk — build, preview, and deploy documentation sites from MDX. Dev server with hot reload, 50+ components, OpenAPI support, AI search, and Mintlify migration",
5
5
  "keywords": [
6
6
  "jamdesk",
@@ -983,7 +983,7 @@ export function OpenApiEndpoint({
983
983
 
984
984
  {/* Description only - summary is shown as page title (h1) */}
985
985
  {description && !descriptionAlreadyShown && (
986
- <ApiMarkdown className={`mt-4 text-sm text-[var(--color-text-secondary)] leading-relaxed ${OPERATION_DESCRIPTION_PROSE}`}>
986
+ <ApiMarkdown className={`mt-4 text-sm text-[var(--color-text-secondary)] leading-relaxed prose ${OPERATION_DESCRIPTION_PROSE}`}>
987
987
  {description}
988
988
  </ApiMarkdown>
989
989
  )}
@@ -87,15 +87,33 @@ export const API_DESCRIPTION_PROSE = [
87
87
  * correctly everywhere else on the same page. Sharing the structure and varying
88
88
  * only the scale is what keeps that from recurring.
89
89
  *
90
- * The inline version also carried `prose prose-sm dark:prose-invert`. All three
91
- * are gone and nothing renders differently for it: `prose-sm` and
92
- * `dark:prose-invert` are Tailwind Typography modifiers and this build has no
93
- * such plugin, and the local `prose` was redundant because the page already
94
- * wraps its content in `.prose` (render-doc-page.tsx `proseClasses`) — every
95
- * `.prose <descendant>` rule in themes/base.css still applies from there. The
96
- * class contributed only `.prose { color, line-height }`, both inheritable and
97
- * both already inherited from that wrapper. The other twelve description sites
98
- * never carried it.
90
+ * The call site keeps a bare `prose` alongside this constant, and MUST. It is
91
+ * tempting to read as redundant the page already wraps its content in
92
+ * `.prose` (render-doc-page.tsx `proseClasses`), so every `.prose <descendant>`
93
+ * rule reaches the element anyway — but `.prose` also sets `font-size` on the
94
+ * element it matches (themes/jam, themes/pulsar, themes/halo),
95
+ * and that is a different question from inheritance: the div carries `text-sm`,
96
+ * and `.prose` only outranks it by being UNLAYERED where Tailwind utilities sit
97
+ * in `@layer utilities`. Drop the class and `text-sm` wins, taking the
98
+ * operation description from 16px to 14px on jam (the default), pulsar and
99
+ * halo. `text-sm` has to stay too: base and nebula set no `.prose` font-size
100
+ * at all, so for them it is the size that actually renders.
101
+ *
102
+ * Audit those rules with a selector-agnostic search, not `^\.prose` — jam and
103
+ * halo write theirs as `body[data-theme="..."] .prose`, and an anchored grep
104
+ * reports both as clean.
105
+ *
106
+ * Font-size is not all of it, either. Below 1024px `.api-page-layout .prose`
107
+ * (themes/base.css) switches this element to `display: flex; flex-direction:
108
+ * column`, so its paragraph margins stop collapsing and start adding. That
109
+ * predates the consolidation — the old inline string carried `prose` too — but
110
+ * it means the class is a layout switch as well as a type size, and removing
111
+ * it changes the narrow-viewport rendering on every theme, not just the three
112
+ * that set a `.prose` font-size.
113
+ *
114
+ * `prose-sm` and `dark:prose-invert` went with the inline version and are not
115
+ * coming back: they are Tailwind Typography modifiers and this build has no
116
+ * such plugin, so they never matched anything.
99
117
  */
100
118
  export const OPERATION_DESCRIPTION_PROSE = [
101
119
  MARKDOWN_BLOCK_STRUCTURE,
@@ -16,8 +16,14 @@
16
16
  * Frontmatter is whatever YAML decided, not what the author meant:
17
17
  * `description: 404` parses to a number and `description: 2026-01-01` to a
18
18
  * Date. Both reach surfaces that accept only strings — react-markdown asserts
19
- * on `children` and THROWS in development, `.trim()`/`.replace()` throw
20
- * outright, and `<meta name="description">` would carry `[object Object]`.
19
+ * on `children` and THROWS in development, and `.trim()`/`.replace()` throw
20
+ * outright.
21
+ *
22
+ * What this does NOT do is make every malformed shape presentable. A YAML
23
+ * mapping still coerces to `[object Object]` and a sequence to `a,b`, because
24
+ * the alternative — returning '' — hides an authoring mistake behind an empty
25
+ * page rather than a visibly wrong one. The contract is only that no input
26
+ * makes a caller throw.
21
27
  *
22
28
  * The same is true of a dereferenced OpenAPI spec, which is why ApiMarkdown
23
29
  * calls this too: the ISR loader runs SwaggerParser.dereference, NOT .validate
@@ -34,6 +40,16 @@
34
40
  */
35
41
  export function frontmatterText(value: unknown): string {
36
42
  if (value === null || value === undefined || value === '') return '';
37
- if (value instanceof Date) return value.toISOString().slice(0, 10);
43
+ // An out-of-range Date still satisfies `instanceof`, and toISOString() throws
44
+ // RangeError on it — the one input that would make this function do the very
45
+ // thing it exists to prevent. js-yaml cannot produce one (its timestamp
46
+ // resolver builds through Date.UTC, which rolls over rather than going
47
+ // invalid) and JSON.parse produces no Dates at all, but a JS caller can:
48
+ // Firestore's Timestamp.toDate() on out-of-range seconds, or a reviver.
49
+ // Falling through yields "Invalid Date" — visibly wrong, which is the right
50
+ // failure for a coercion whose contract is that it never throws.
51
+ if (value instanceof Date && !Number.isNaN(value.getTime())) {
52
+ return value.toISOString().slice(0, 10);
53
+ }
38
54
  return String(value);
39
55
  }
@@ -2925,9 +2925,9 @@
2925
2925
  "license": "MIT"
2926
2926
  },
2927
2927
  "node_modules/electron-to-chromium": {
2928
- "version": "1.5.412",
2929
- "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.412.tgz",
2930
- "integrity": "sha512-z4rMe3esBzlzovKHj4gxJnsCGZRK5l4baUvm+gCGJBPE+gsyUMKsuU9tnEUtI1dOebXz1ytAPGjvXhmQ7rIPwA==",
2928
+ "version": "1.5.413",
2929
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.413.tgz",
2930
+ "integrity": "sha512-F1XPKvt7HVfly5WND90ec16nFsdr4g5x/cVUP3EqjeyXynupabGDqpMa84wwvuYGDnldXLBz6DLXyZXWO9TPvw==",
2931
2931
  "license": "ISC"
2932
2932
  },
2933
2933
  "node_modules/enhanced-resolve": {
@@ -4446,9 +4446,9 @@
4446
4446
  }
4447
4447
  },
4448
4448
  "node_modules/mermaid": {
4449
- "version": "11.17.0",
4450
- "resolved": "https://registry.npmjs.org/mermaid/-/mermaid-11.17.0.tgz",
4451
- "integrity": "sha512-Jo9N377Wb4MSnHFPTbLi2SxFpsQl4eVHoxnW5U1Md9EazvgMp3s+4ohDxr81YNTgbn5Kj7HJ3yslrSJ52kwpbA==",
4449
+ "version": "11.17.1",
4450
+ "resolved": "https://registry.npmjs.org/mermaid/-/mermaid-11.17.1.tgz",
4451
+ "integrity": "sha512-G1BP6qU4BRwEGk2SdsxgDk1cSuApimT32Nkb52YRSv+856FrmB8qo28BaNk9Ee8Fvuon3OxpXDJ4L6cD5AykXg==",
4452
4452
  "license": "MIT",
4453
4453
  "dependencies": {
4454
4454
  "@braintree/sanitize-url": "^7.1.2",