@draftbase/renderer 0.1.2 → 0.3.1

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/README.md CHANGED
@@ -233,6 +233,8 @@ function EntryLink({ id, children }: { id: string; children: React.ReactNode })
233
233
  - Extra classes: `<MDXContent source={...} className="prose" />`.
234
234
  - Custom wrapper/error element (e.g. React Native's `View`/`Text`): `<MDXContent source={...} wrapperTag={View} errorTag={Text} />`.
235
235
 
236
+ If your site has a sticky header, set the anchor offset once on your own page — `html { scroll-padding-top: 5rem }` — so heading links don't land underneath it. The renderer deliberately ships no offset of its own, since `scroll-padding-top` and `scroll-margin-top` sum when both are set.
237
+
236
238
  ## Using with Claude Code / AI coding agents
237
239
 
238
240
  If you're an agent wiring this into a project, follow this checklist:
package/dist/styles.css CHANGED
@@ -25,7 +25,6 @@
25
25
  line-height: 1.25;
26
26
  margin: 1.5em 0 0.5em;
27
27
  color: inherit;
28
- scroll-margin-top: 96px;
29
28
  }
30
29
 
31
30
  /* Highlights a footnote/citation anchor when the URL hash lands on it, e.g. #fn-1. */
@@ -34,7 +33,7 @@
34
33
  }
35
34
 
36
35
  .db-content h1 {
37
- font-size: 2em;
36
+ font-size: 2.25em;
38
37
  font-weight: 700;
39
38
  line-height: 1.2;
40
39
  letter-spacing: -0.025em;
@@ -42,41 +41,41 @@
42
41
  }
43
42
 
44
43
  .db-content h2 {
45
- font-size: 1.625em;
44
+ font-size: 1.5em;
46
45
  line-height: 1.25;
47
46
  letter-spacing: -0.02em;
48
47
  margin-top: 1.75em;
49
48
  }
50
49
 
51
50
  .db-content h3 {
52
- font-size: 1.375em;
51
+ font-size: 1.25em;
53
52
  line-height: 1.3;
54
53
  }
55
54
 
56
55
  .db-content h4 {
57
- font-size: 1.25em;
56
+ font-size: 1.125em;
58
57
  line-height: 1.35;
59
58
  }
60
59
 
61
60
  .db-content h5 {
62
- font-size: 1.125em;
61
+ font-size: 1em;
63
62
  line-height: 1.4;
64
63
  }
65
64
 
66
65
  .db-content h6 {
67
- font-size: 1em;
66
+ font-size: 0.875em;
68
67
  line-height: 1.4;
69
68
  }
70
69
 
71
70
  @media (max-width: 640px) {
72
71
  .db-content h1 {
73
- font-size: 1.75em;
72
+ font-size: 1.875em;
74
73
  }
75
74
  .db-content h2 {
76
- font-size: 1.4em;
75
+ font-size: 1.25em;
77
76
  }
78
77
  .db-content h3 {
79
- font-size: 1.2em;
78
+ font-size: 1.125em;
80
79
  }
81
80
  }
82
81
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbase/renderer",
3
- "version": "0.1.2",
3
+ "version": "0.3.1",
4
4
  "description": "Framework-agnostic MDX renderer for Draftbase content (React, Next.js RSC, React Native, Astro, Vite, Vue)",
5
5
  "keywords": [
6
6
  "draftbase",