jamdesk 1.1.195 → 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.
- package/dist/lib/frontmatter-text.d.ts +8 -2
- package/dist/lib/frontmatter-text.d.ts.map +1 -1
- package/dist/lib/frontmatter-text.js +18 -3
- package/dist/lib/frontmatter-text.js.map +1 -1
- package/package.json +1 -1
- package/vendored/components/mdx/markdown-classes.ts +16 -4
- package/vendored/lib/frontmatter-text.ts +19 -3
- package/vendored/workspace-package-lock.json +6 -6
|
@@ -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
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
|
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.
|
|
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",
|
|
@@ -91,13 +91,25 @@ export const API_DESCRIPTION_PROSE = [
|
|
|
91
91
|
* tempting to read as redundant — the page already wraps its content in
|
|
92
92
|
* `.prose` (render-doc-page.tsx `proseClasses`), so every `.prose <descendant>`
|
|
93
93
|
* rule reaches the element anyway — but `.prose` also sets `font-size` on the
|
|
94
|
-
* element it matches (themes/jam
|
|
94
|
+
* element it matches (themes/jam, themes/pulsar, themes/halo),
|
|
95
95
|
* and that is a different question from inheritance: the div carries `text-sm`,
|
|
96
96
|
* and `.prose` only outranks it by being UNLAYERED where Tailwind utilities sit
|
|
97
97
|
* in `@layer utilities`. Drop the class and `text-sm` wins, taking the
|
|
98
|
-
* operation description from 16px to 14px on the default
|
|
99
|
-
*
|
|
100
|
-
*
|
|
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.
|
|
101
113
|
*
|
|
102
114
|
* `prose-sm` and `dark:prose-invert` went with the inline version and are not
|
|
103
115
|
* coming back: they are Tailwind Typography modifiers and this build has no
|
|
@@ -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
|
|
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
|
-
|
|
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.
|
|
2929
|
-
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.
|
|
2930
|
-
"integrity": "sha512-
|
|
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.
|
|
4450
|
-
"resolved": "https://registry.npmjs.org/mermaid/-/mermaid-11.17.
|
|
4451
|
-
"integrity": "sha512-
|
|
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",
|