@docubook/flame 1.0.0 → 1.0.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.
@@ -141,7 +141,11 @@ export function MobileBar({
141
141
  }
142
142
  >
143
143
  {(docuConfig.navbar?.menu || []).map((item) => (
144
- <li key={item.href} className="text-base-content/80 hover:text-base-content">
144
+ <li
145
+ key={item.href}
146
+ role="menuitem"
147
+ className="text-base-content/80 hover:text-base-content hover:bg-base-200 cursor-pointer"
148
+ >
145
149
  <Anchor
146
150
  href={item.href}
147
151
  activeWhen={(path: string) =>
@@ -33,6 +33,9 @@ export default function Sublink({
33
33
  return currentPathname.startsWith(fullHref) && currentPathname !== fullHref;
34
34
  });
35
35
 
36
+ // Shared padding based on nesting level
37
+ const levelPadding = cn(level === 1 && "pl-2", level === 2 && "pl-4", level >= 3 && "pl-6");
38
+
36
39
  // Leaf node (no children)
37
40
  if (!items) {
38
41
  const isActive = currentPathname === fullHref || currentPathname === `${fullHref}.html`;
@@ -52,7 +55,8 @@ export default function Sublink({
52
55
  <div
53
56
  className={cn(
54
57
  "py-1.5",
55
- level >= 2 && "border-l-2 pl-3",
58
+ levelPadding,
59
+ level >= 2 && "border-l-2",
56
60
  level >= 2 && (isActive ? "border-primary" : "border-base-300")
57
61
  )}
58
62
  >
@@ -63,7 +67,7 @@ export default function Sublink({
63
67
 
64
68
  // Section with children
65
69
  return (
66
- <div className="flex flex-col">
70
+ <div className={cn("flex flex-col", levelPadding)}>
67
71
  {/* Section header */}
68
72
  <button
69
73
  type="button"
@@ -56,7 +56,7 @@ function slugify(text: string): string {
56
56
  .replace(/^-+|-+$/g, "");
57
57
  }
58
58
 
59
- function stripJsx(content: string): string {
59
+ export function stripJsx(content: string): string {
60
60
  let result = content;
61
61
  let prev = "";
62
62
  while (result !== prev) {
@@ -68,7 +68,7 @@ function stripJsx(content: string): string {
68
68
  return result;
69
69
  }
70
70
 
71
- function extractRecords(filePath: string, raw: string): SearchRecord[] {
71
+ export function extractRecords(filePath: string, raw: string): SearchRecord[] {
72
72
  const { frontmatter, strippedContent: content } = extractFrontmatterWithContent<Frontmatter>(raw);
73
73
  const records: SearchRecord[] = [];
74
74
  const url = `/docs/${filePath}`;
package/README.md CHANGED
@@ -16,7 +16,7 @@
16
16
 
17
17
  ```bash
18
18
  mkdir my-docs && cd my-docs
19
- bun add @docubook/flame@rc
19
+ bun add @docubook/flame
20
20
  bunx flame init
21
21
  bun run dev
22
22
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docubook/flame",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "A blazing-fast React + MDX framework powered by Bun, built for modern documentation experiences.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -52,8 +52,8 @@
52
52
  "react": "^19.0.0",
53
53
  "react-dom": "^19.0.0",
54
54
  "@docubook/mdx-content": "^3.2.1",
55
- "@docubook/ui-react": "^0.1.2",
56
- "@docubook/core": "^1.7.0"
55
+ "@docubook/core": "^1.7.0",
56
+ "@docubook/ui-react": "^0.1.2"
57
57
  },
58
58
  "peerDependencies": {
59
59
  "@sentry/bun": "^9.0.0"
@@ -25,7 +25,7 @@ No heavy abstractions. No complex tooling. Just a minimal layer between your con
25
25
 
26
26
  ```bash
27
27
  mkdir my-docs && cd my-docs
28
- bun add @docubook/flame@rc
28
+ bun add @docubook/flame
29
29
  bunx flame init
30
30
  bun run dev
31
31
  ```
@@ -132,7 +132,7 @@ docs/
132
132
 
133
133
  Reference in MDX:
134
134
 
135
- ```mdx
135
+ ```markdown
136
136
  ![Screenshot](/docs/assets/images/screenshot.png)
137
137
  ```
138
138
 
@@ -183,7 +183,7 @@ Upload the contents of `.docu/dist/` to any static hosting (Netlify, Cloudflare
183
183
 
184
184
  Copy `.env.example` to `.env` to customize:
185
185
 
186
- ```env
186
+ ```
187
187
  # Server port (default: 3000)
188
188
  PORT=3000
189
189
 
@@ -201,7 +201,7 @@ bun add @sentry/bun
201
201
 
202
202
  Then set environment variables:
203
203
 
204
- ```env
204
+ ```
205
205
  SENTRY_DSN=https://your-dsn@sentry.io/project-id
206
206
  ```
207
207