@chayns-components/typewriter 5.5.26 → 5.5.28

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/AGENTS.md +40 -2
  2. package/package.json +3 -3
package/AGENTS.md CHANGED
@@ -219,17 +219,55 @@ import { Typewriter } from '@chayns-components/typewriter';
219
219
 
220
220
  ### Props
221
221
 
222
- No prop documentation available.
222
+ | name | type | required | description |
223
+ | --- | --- | --- | --- |
224
+ | `animationSteps` | `number \| undefined` | no | The number of characters that will be animated per animation cycle. |
225
+ | `autoSpeedBaseFactor` | `number \| undefined` | no | Sets how long the animation should last when `shouldCalcAutoSpeed` is enabled in milliseconds.<br />When chunks are streamed, this value will only be used for the initial speed and then change to the speed characters are added at |
226
+ | `children` | `string \| ReactElement<any, string \| JSXElementConstructor<any>> \| string[] \| ReactElement<any, string \| JSXElementConstructor<any>>[]` | yes | The text to type |
227
+ | `cursorType` | `CursorType \| undefined` | no | The type of the cursor. Use the CursorType enum for this prop. |
228
+ | `nextTextDelay` | `TypewriterDelay \| undefined` | no | The delay in milliseconds before the next text is shown.<br />This prop is only used if multiple texts are given. |
229
+ | `onFinish` | `VoidFunction \| undefined` | no | Function that is executed when the typewriter animation has finished. This function will not<br />be executed if multiple texts are used. |
230
+ | `onResetAnimationEnd` | `VoidFunction \| undefined` | no | Function that is executed when the reset animation has finished. This function will not be<br />executed if `shouldUseResetAnimation` is not set to `true`. |
231
+ | `onResetAnimationStart` | `VoidFunction \| undefined` | no | Function that is executed when the reset animation has started. This function will not be<br />executed if `shouldUseResetAnimation` is not set to `true`. |
232
+ | `onTypingAnimationEnd` | `VoidFunction \| undefined` | no | Function that is executed when the typing animation has finished. If multiple texts are given,<br />this function will be executed for each text. |
233
+ | `onTypingAnimationStart` | `VoidFunction \| undefined` | no | Function that is executed when the typing animation has started. If multiple texts are given,<br />this function will be executed for each text. |
234
+ | `pseudoChildren` | `string \| ReactElement<any, string \| JSXElementConstructor<any>> \| undefined` | no | Pseudo-element to be rendered invisible during animation to define the size of the element<br />for the typewriter effect. By default, the "children" is used for this purpose. |
235
+ | `resetDelay` | `TypewriterDelay \| undefined` | no | Waiting time in milliseconds before the typewriter resets the text.<br />This prop is only used if multiple texts are given. |
236
+ | `resetSpeed` | `number \| undefined` | no | The reset speed of the animation. Use the TypewriterSpeed enum for this prop. |
237
+ | `shouldCalcAutoSpeed` | `boolean \| undefined` | no | Whether the animation speed should be calculated with the chunk interval. |
238
+ | `shouldForceCursorAnimation` | `boolean \| undefined` | no | Specifies whether the cursor should be forced to animate even if no text is currently animated. |
239
+ | `shouldHideCursor` | `boolean \| undefined` | no | Specifies whether the cursor should be hidden |
240
+ | `shouldRemainSingleLine` | `boolean \| undefined` | no | Whether the content should remain a single line. |
241
+ | `shouldSortChildrenRandomly` | `boolean \| undefined` | no | Specifies whether the children should be sorted randomly if there are multiple texts.<br />This makes the typewriter start with a different text each time and also changes them<br />in a random order. |
242
+ | `shouldUseAnimationHeight` | `boolean \| undefined` | no | Specifies whether the animation should use its full height or the height of the current<br />chunk. |
243
+ | `shouldUseResetAnimation` | `boolean \| undefined` | no | Specifies whether the reset of the text should be animated with a backspace animation for<br />multiple texts. |
244
+ | `shouldWaitForContent` | `boolean \| undefined` | no | Whether the typewriter should wait for new content |
245
+ | `speed` | `number \| undefined` | no | The speed of the animation. Use the TypewriterSpeed enum for this prop. |
246
+ | `startDelay` | `TypewriterDelay \| undefined` | no | The delay in milliseconds before the typewriter starts typing. |
247
+ | `textStyle` | `CSSPropertiesWithVars \| undefined` | no | The style of the typewriter text element |
223
248
 
224
249
  ### Types
225
250
 
226
- No additional exported types documented.
251
+ - `CursorType` -> `enum CursorType {
252
+ Default = 'default',
253
+ Thin = 'thin',
254
+ }`
255
+ - `TypewriterDelay` -> `enum TypewriterDelay {
256
+ ExtraSlow = 4000,
257
+ Slow = 2000,
258
+ Medium = 1000,
259
+ Fast = 500,
260
+ ExtraFast = 250,
261
+ None = 0,
262
+ }`
227
263
 
228
264
  ### Usage Notes
229
265
 
230
266
  - Import `Typewriter` directly from `@chayns-components/typewriter` instead of internal source paths.
231
267
  - Start with one of the documented Storybook examples and adapt the props incrementally for your use case.
268
+ - Pay special attention to required props: `children`.
232
269
 
233
270
  ### Anti Patterns
234
271
 
235
272
  - Avoid imports from internal paths such as `@chayns-components/typewriter/src/...`; always use the public package export.
273
+ - Avoid incomplete prop objects; follow the documented prop types and required fields.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chayns-components/typewriter",
3
- "version": "5.5.26",
3
+ "version": "5.5.28",
4
4
  "description": "A set of beautiful React components for developing your own applications with chayns.",
5
5
  "sideEffects": false,
6
6
  "browserslist": [
@@ -69,7 +69,7 @@
69
69
  "typescript": "^5.9.3"
70
70
  },
71
71
  "dependencies": {
72
- "@chayns-components/core": "^5.5.26",
72
+ "@chayns-components/core": "^5.5.28",
73
73
  "react-compiler-runtime": "^1.0.0"
74
74
  },
75
75
  "peerDependencies": {
@@ -82,5 +82,5 @@
82
82
  "publishConfig": {
83
83
  "access": "public"
84
84
  },
85
- "gitHead": "92d9195193d59f3180f001b3545b34167476d6a7"
85
+ "gitHead": "20b5354c0ee43c56e9919589f6b3bad7cf6b14bb"
86
86
  }