@jiujue/react-canvas-fiber 2.0.6 → 2.0.7

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/AI_GUIDE.md CHANGED
@@ -47,6 +47,14 @@ function App() {
47
47
  }
48
48
  ```
49
49
 
50
+ - **Props**: `CanvasProps`
51
+ - **Key Attributes**:
52
+ - `width`, `height`: Logical size (number).
53
+ - `dpr`: Device pixel ratio (default 1).
54
+ - `clearColor`: Frame clear color string.
55
+ - `style`: CSS properties for the DOM canvas element.
56
+ - `fontFamily`, `fontSize`, `fontWeight`, `lineHeight`: Default text styles.
57
+
50
58
  ### Intrinsic Elements
51
59
 
52
60
  #### `<View />`
@@ -57,12 +65,27 @@ Container element for layout and grouping.
57
65
  - **Key Attributes**:
58
66
  - `style`: `YogaStyle` (flex, padding, margin, position, etc.)
59
67
  - `background`: Background color string.
68
+ - `border`: Border string (e.g., `"1px solid red"`).
60
69
  - `borderRadius`: Number.
61
70
  - `scrollX`, `scrollY`: Booleans to enable scrolling.
71
+ - `scrollbarX`, `scrollbarY`: Booleans to show/hide scrollbars (default `true` if scrolling enabled).
72
+ - `scrollbarWidth`, `scrollbarInset`: Number (custom scrollbar appearance).
73
+ - `scrollbarTrackColor`, `scrollbarThumbColor`: Color strings.
62
74
  - `onScroll`, `onScrollX`: Scroll callbacks.
63
75
  - `pointerEvents`: `'auto' | 'none'`.
64
76
  - Event handlers: `onClick`, `onPointerDown`, etc.
65
77
 
78
+ #### `<Image />`
79
+
80
+ Image primitive.
81
+
82
+ - **Props**: `ImageProps`
83
+ - **Key Attributes**:
84
+ - `src`: **Mandatory** string (URL).
85
+ - `style`: `YogaStyle`.
86
+ - `objectFit`: `'cover' | 'contain' | 'fill'` (default `contain`).
87
+ - `borderRadius`: Number.
88
+
66
89
  #### `<Text />`
67
90
 
68
91
  Text rendering element.
package/README.md CHANGED
@@ -4,6 +4,8 @@
4
4
 
5
5
  A Canvas custom renderer (2D) based on `react-reconciler`, integrated with Yoga Flexbox layout.
6
6
 
7
+ **Keywords**: react, canvas, renderer, fiber, yoga, layout, flexbox, 2d, ui, graphics
8
+
7
9
  ## Installation
8
10
 
9
11
  Once published to npm, you can install it directly:
package/README.zh.md CHANGED
@@ -4,6 +4,8 @@
4
4
 
5
5
  基于 `react-reconciler` 的 Canvas 自定义渲染器(2D),并集成 Yoga Flexbox 布局。
6
6
 
7
+ **关键词**: react, canvas, renderer, fiber, yoga, layout, flexbox, 2d, ui, graphics
8
+
7
9
  ## 安装
8
10
 
9
11
  发布到 npm 后可直接安装:
package/package.json CHANGED
@@ -1,10 +1,24 @@
1
1
  {
2
2
  "name": "@jiujue/react-canvas-fiber",
3
- "version": "2.0.6",
3
+ "version": "2.0.7",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "description": "A React custom renderer for Canvas2D with Yoga layout",
8
+ "keywords": [
9
+ "react",
10
+ "canvas",
11
+ "renderer",
12
+ "fiber",
13
+ "yoga",
14
+ "layout",
15
+ "flexbox",
16
+ "2d",
17
+ "ui",
18
+ "react-reconciler",
19
+ "custom-renderer",
20
+ "graphics"
21
+ ],
8
22
  "sideEffects": false,
9
23
  "files": [
10
24
  "dist",