@haklex/rich-renderer-ruby 0.0.65 → 0.0.67
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
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# @haklex/rich-renderer-ruby
|
|
2
|
+
|
|
3
|
+
Ruby annotation renderer for CJK text, providing furigana (reading aids) above base characters.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm add @haklex/rich-renderer-ruby
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Peer Dependencies
|
|
12
|
+
|
|
13
|
+
| Package | Version |
|
|
14
|
+
| --- | --- |
|
|
15
|
+
| `react` | `>=19` |
|
|
16
|
+
| `react-dom` | `>=19` |
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```tsx
|
|
21
|
+
import { RubyRenderer } from '@haklex/rich-renderer-ruby/static'
|
|
22
|
+
|
|
23
|
+
// Register in a static RendererConfig
|
|
24
|
+
const rendererConfig = {
|
|
25
|
+
// ...other renderers
|
|
26
|
+
ruby: RubyRenderer,
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
For edit mode:
|
|
31
|
+
|
|
32
|
+
```tsx
|
|
33
|
+
import { RubyEditRenderer } from '@haklex/rich-renderer-ruby'
|
|
34
|
+
|
|
35
|
+
const editRendererConfig = {
|
|
36
|
+
// ...other renderers
|
|
37
|
+
ruby: RubyEditRenderer,
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Exports
|
|
42
|
+
|
|
43
|
+
### Components
|
|
44
|
+
|
|
45
|
+
- `RubyRenderer` — Static (read-only) renderer for ruby annotations
|
|
46
|
+
- `RubyEditRenderer` — Edit (interactive) renderer with annotation editing
|
|
47
|
+
|
|
48
|
+
### Types
|
|
49
|
+
|
|
50
|
+
- `RubyRendererProps` — Props interface for the ruby renderer component
|
|
51
|
+
|
|
52
|
+
### Sub-path Exports
|
|
53
|
+
|
|
54
|
+
| Path | Description |
|
|
55
|
+
| --- | --- |
|
|
56
|
+
| `@haklex/rich-renderer-ruby` | Full exports (edit + static) |
|
|
57
|
+
| `@haklex/rich-renderer-ruby/static` | Static-only renderer |
|
|
58
|
+
| `@haklex/rich-renderer-ruby/style.css` | Stylesheet |
|
|
59
|
+
|
|
60
|
+
## Part of Haklex
|
|
61
|
+
|
|
62
|
+
This package is part of the [Haklex](../../README.md) rich editor ecosystem.
|
|
63
|
+
|
|
64
|
+
## License
|
|
65
|
+
|
|
66
|
+
MIT
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { RubyRendererProps } from '@haklex/rich-editor';
|
|
1
|
+
import { RubyRendererProps } from '@haklex/rich-editor/renderers';
|
|
2
2
|
export declare function RubyEditRenderer(props: RubyRendererProps): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=RubyEditRenderer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RubyEditRenderer.d.ts","sourceRoot":"","sources":["../src/RubyEditRenderer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RubyEditRenderer.d.ts","sourceRoot":"","sources":["../src/RubyEditRenderer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAIvE,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,iBAAiB,2CAQxD"}
|
package/dist/RubyRenderer.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RubyRendererProps } from '@haklex/rich-editor';
|
|
1
|
+
import { RubyRendererProps } from '@haklex/rich-editor/renderers';
|
|
2
2
|
export type { RubyRendererProps };
|
|
3
3
|
export declare function RubyRenderer({ reading, children }: RubyRendererProps): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export default RubyRenderer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RubyRenderer.d.ts","sourceRoot":"","sources":["../src/RubyRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"RubyRenderer.d.ts","sourceRoot":"","sources":["../src/RubyRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAIvE,YAAY,EAAE,iBAAiB,EAAE,CAAC;AAElC,wBAAgB,YAAY,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,iBAAiB,2CAWpE;AAED,eAAe,YAAY,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haklex/rich-renderer-ruby",
|
|
3
|
-
"
|
|
4
|
-
"version": "0.0.65",
|
|
3
|
+
"version": "0.0.67",
|
|
5
4
|
"description": "Ruby annotation renderer for haklex rich editor",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/Innei/haklex.git",
|
|
8
|
+
"directory": "packages/rich-renderer-ruby"
|
|
9
|
+
},
|
|
6
10
|
"license": "MIT",
|
|
11
|
+
"type": "module",
|
|
7
12
|
"exports": {
|
|
8
13
|
".": {
|
|
9
14
|
"import": "./dist/index.mjs",
|
|
@@ -19,13 +24,9 @@
|
|
|
19
24
|
"files": [
|
|
20
25
|
"dist"
|
|
21
26
|
],
|
|
22
|
-
"peerDependencies": {
|
|
23
|
-
"react": ">=19",
|
|
24
|
-
"react-dom": ">=19"
|
|
25
|
-
},
|
|
26
27
|
"dependencies": {
|
|
27
|
-
"@haklex/rich-editor": "0.0.
|
|
28
|
-
"@haklex/rich-style-token": "0.0.
|
|
28
|
+
"@haklex/rich-editor": "0.0.67",
|
|
29
|
+
"@haklex/rich-style-token": "0.0.67"
|
|
29
30
|
},
|
|
30
31
|
"devDependencies": {
|
|
31
32
|
"@types/react": "^19.2.14",
|
|
@@ -38,6 +39,10 @@
|
|
|
38
39
|
"vite": "^7.3.1",
|
|
39
40
|
"vite-plugin-dts": "^4.5.4"
|
|
40
41
|
},
|
|
42
|
+
"peerDependencies": {
|
|
43
|
+
"react": ">=19",
|
|
44
|
+
"react-dom": ">=19"
|
|
45
|
+
},
|
|
41
46
|
"publishConfig": {
|
|
42
47
|
"access": "public"
|
|
43
48
|
},
|