react-animated-text-writer 1.0.3 → 1.0.4

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.
Files changed (2) hide show
  1. package/README.md +31 -41
  2. package/package.json +5 -4
package/README.md CHANGED
@@ -90,47 +90,37 @@ import AnimatedTextWriter from "react-animated-text-writer";
90
90
 
91
91
  ## Props
92
92
 
93
- ```ts
94
- interface AnimatedTextWriterProps {
95
- content?: string;
96
- prefix?: string;
97
- suffix?: string;
98
- replacablePrefix?: string;
99
-
100
- codePrefix?: string;
101
- codeSuffix?: string;
102
-
103
- delay?: number;
104
- startDelay?: number;
105
-
106
- displayCursor?: boolean;
107
- displayCursorEnd?: boolean;
108
-
109
- displayCodeWrapper?: boolean;
110
- displayCodeLineNumber?: boolean;
111
- displayCodeLineNumberMax?: number;
112
-
113
- className?: string;
114
-
115
- cursorColor?: string;
116
- cursorLineHeight?: string;
117
-
118
- codeWrapperClasses?: string;
119
- codeWrapperStyle?: string | React.CSSProperties;
120
- codeWrapperWhiteSpace?: "auto" | "nowrap";
121
-
122
- displayClickMoreButtonAndPause?: boolean;
123
- displayFullContentOnClickMoreButton?: boolean;
124
-
125
- clickMoreHeaderText?: string;
126
- clickMoreHeaderClassString?: string;
127
- viewMoreButtonText?: string;
128
- viewLessButtonText?: string;
129
-
130
- showContentAuto?: boolean;
131
- sx?: React.CSSProperties;
132
- }
133
- ```
93
+ ## AnimatedTextWriter Props
94
+
95
+ | Prop | Type | Default | Description |
96
+ |-----|------|---------|-------------|
97
+ | `content` | `string` | `""` | Text content that will be displayed with the typing animation. |
98
+ | `prefix` | `string` | `""` | Text displayed before the animated content. |
99
+ | `suffix` | `string` | `""` | Text displayed after the animated content. |
100
+ | `replacablePrefix` | `string` | `""` | Placeholder text that will be replaced by the animated `content`. |
101
+ | `codePrefix` | `string` | `""` | Optional prefix displayed before code content when using the code wrapper. |
102
+ | `codeSuffix` | `string` | `""` | Optional suffix displayed after code content when using the code wrapper. |
103
+ | `delay` | `number` | `50` | Delay in milliseconds between each typed character. |
104
+ | `startDelay` | `number` | `0` | Delay before the typing animation begins. |
105
+ | `displayCursor` | `boolean` | `true` | Shows a blinking cursor during typing animation. |
106
+ | `displayCursorEnd` | `boolean` | `true` | Keeps the cursor visible after typing finishes. |
107
+ | `displayCodeWrapper` | `boolean` | `false` | Displays the animated text inside a code-editor styled container. |
108
+ | `displayCodeLineNumber` | `boolean` | `false` | Shows line numbers when `displayCodeWrapper` is enabled. |
109
+ | `displayCodeLineNumberMax` | `number` | `undefined` | Maximum number of line numbers to display. |
110
+ | `className` | `string` | `""` | Custom CSS class applied to the main container. |
111
+ | `cursorColor` | `string` | `currentColor` | Color of the blinking cursor. |
112
+ | `cursorLineHeight` | `string` | `"1em"` | Line height for the cursor element. |
113
+ | `codeWrapperClasses` | `string` | `""` | Additional CSS classes for the code wrapper container. |
114
+ | `codeWrapperStyle` | `string \| React.CSSProperties` | `{}` | Inline styles applied to the code wrapper container. |
115
+ | `codeWrapperWhiteSpace` | `"auto" \| "nowrap"` | `"auto"` | Controls white-space behavior inside the code wrapper. |
116
+ | `displayClickMoreButtonAndPause` | `boolean` | `false` | Shows a **View More** button and pauses typing until the user clicks it. |
117
+ | `displayFullContentOnClickMoreButton` | `boolean` | `false` | Displays the entire remaining content when the **View More** button is clicked. |
118
+ | `clickMoreHeaderText` | `string` | `""` | Optional header text shown above the **View More** section. |
119
+ | `clickMoreHeaderClassString` | `string` | `""` | CSS class applied to the **View More** header. |
120
+ | `viewMoreButtonText` | `string` | `"View More"` | Text displayed on the button to expand content. |
121
+ | `viewLessButtonText` | `string` | `"View Less"` | Text displayed on the button to collapse content. |
122
+ | `showContentAuto` | `boolean` | `false` | Automatically expands the full content without user interaction. |
123
+ | `sx` | `React.CSSProperties` | `{}` | Inline styles applied to the root component container. |
134
124
 
135
125
  ---
136
126
 
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "react-animated-text-writer",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "React Animated Text Writer - A flexible typing animation component for React with cursor effects, delays, prefix/suffix injection, and an optional code-editor style wrapper with line numbers and syntax highlighting.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
7
7
  "types": "dist/index.d.ts",
8
8
  "scripts": {
9
- "test": "echo \"Error: no test specified\" && exit 1",
9
+ "test": "vite",
10
10
  "rollup": "rollup -c --bundleConfigAsCjs"
11
11
  },
12
12
  "keywords": [
@@ -30,7 +30,7 @@
30
30
  "devDependencies": {
31
31
  "@rollup/plugin-commonjs": "^29.0.0",
32
32
  "@rollup/plugin-node-resolve": "^16.0.3",
33
- "@rollup/plugin-terser": "^0.4.4",
33
+ "@rollup/plugin-terser": "^1.0.0",
34
34
  "@rollup/plugin-typescript": "^12.3.0",
35
35
  "@types/node": "^25.2.1",
36
36
  "@types/react": "^19.2.13",
@@ -40,6 +40,7 @@
40
40
  "rollup-plugin-peer-deps-external": "^2.2.4",
41
41
  "rollup-plugin-postcss": "^4.0.2",
42
42
  "tslib": "^2.8.1",
43
- "typescript": "^5.9.3"
43
+ "typescript": "^5.9.3",
44
+ "vite": "^7.3.1"
44
45
  }
45
46
  }