takumi-markdown 1.0.0 → 1.0.3

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
@@ -1,14 +1,33 @@
1
1
  # Takumi Markdown (匠)
2
2
 
3
- Beautiful Markdown renderer for React with Japanese typography optimization and ruby notation support.
3
+ [![npm version](https://img.shields.io/npm/v/takumi-markdown.svg)](https://www.npmjs.com/package/takumi-markdown)
4
+ [![npm downloads](https://img.shields.io/npm/dm/takumi-markdown.svg)](https://www.npmjs.com/package/takumi-markdown)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
6
+
7
+ **[🚀 Live Demo](https://ischca.github.io/takumi-markdown/)** | **[📦 npm](https://www.npmjs.com/package/takumi-markdown)**
8
+
9
+ Beautiful Markdown renderer for React, meticulously crafted for CJK (Chinese, Japanese, Korean) typography and readability.
10
+
11
+ <img src="./assets/preview.png" alt="Takumi Markdown Preview" width="600" />
12
+
13
+ ## Philosophy
14
+
15
+ Most markdown renderers focus on functionality. Takumi focuses on the **reading experience**.
16
+ We optimize line heights, letter spacing, and font choices to create documents that feel professional and polished by default.
4
17
 
5
18
  ## Features
6
19
 
7
- - 🎨 **Beautiful Typography** - Optimized for Japanese (CJK) text
8
- - 📝 **Ruby Notation** - Support for `|親文字《ルビ》` syntax (小説家になろう/カクヨム style)
9
- - 📋 **Frontmatter** - YAML frontmatter parsing and display
10
- - ✨ **GFM Support** - Tables, checkboxes, and more
11
- - 🎯 **Syntax Highlighting** - Code blocks with highlight.js
20
+ - 🎨 **Premium Typography** - Optimized specifically for Japanese text (C-spacing, P-alt)
21
+ - 📝 **Ruby Support** - Render `|text《ruby》` syntax beautifully (web novel style)
22
+ - 📋 **Rich Frontmatter** - Clean metadata display
23
+ - ✨ **Modern Standards** - GFM support, syntax highlighting, and responsive tables
24
+
25
+ ## Visual Experience
26
+
27
+ <img src="./assets/comparison.png" alt="Visual Comparison" width="700" />
28
+
29
+ > **Left**: Default rendering (standard typography, raw syntax)
30
+ > **Right**: Takumi rendering (optimized spacing, rendered rubies, premium feel)
12
31
 
13
32
  ## Installation
14
33
 
@@ -24,25 +43,55 @@ import 'takumi-markdown/styles.css';
24
43
 
25
44
  function App() {
26
45
  const markdown = `
27
- # タイトル
46
+ # The Art of Text
28
47
 
29
- これは**美しい**マークダウンです。
48
+ Words should be beautiful.
30
49
 
31
- |山田太郎《やまだたろう》は旅に出た。
50
+ |Typography《タイポグラフィ》 matters.
32
51
  `;
33
52
 
34
53
  return <MarkdownRenderer content={markdown} />;
35
54
  }
36
55
  ```
37
56
 
57
+ ## SSR (Next.js)
58
+
59
+ Takumi is SSR-safe as long as you load the CSS globally (Next.js requires global CSS to be imported in its root files).
60
+
61
+ **App Router**
62
+
63
+ ```tsx
64
+ // app/layout.tsx
65
+ import 'takumi-markdown/styles.css';
66
+
67
+ export default function RootLayout({ children }) {
68
+ return (
69
+ <html lang="ja">
70
+ <body>{children}</body>
71
+ </html>
72
+ );
73
+ }
74
+ ```
75
+
76
+ **Pages Router**
77
+
78
+ ```tsx
79
+ // pages/_app.tsx
80
+ import 'takumi-markdown/styles.css';
81
+
82
+ export default function App({ Component, pageProps }) {
83
+ return <Component {...pageProps} />;
84
+ }
85
+ ```
86
+
38
87
  ## Ruby Notation
39
88
 
40
- Supports 小説家になろう / カクヨム style ruby (furigana) notation:
89
+ Supports the standard Japanese web novel format:
41
90
 
42
- | Syntax | Result |
43
- |--------|--------|
44
- | `|漢字《かんじ》` | <ruby>漢字<rt>かんじ</rt></ruby> |
45
- | `漢字《かんじ》` | <ruby>漢字<rt>かんじ</rt></ruby> (auto-detect) |
91
+ | Syntax | Description | Result |
92
+ |--------|-------------|--------|
93
+ | `|text《ruby》` | Explicit | text with ruby above |
94
+ | `漢字《かんじ》` | Auto-detect | 漢字 with かんじ above |
46
95
 
47
96
  ## API
48
97
 
@@ -1,6 +1,4 @@
1
1
  import React from 'react';
2
- import '../styles/typography.css';
3
- import 'highlight.js/styles/github.css';
4
2
  export interface MarkdownRendererProps {
5
3
  content: string;
6
4
  }