From 431636b89ff6de6679e239ba0c0816a0158c57a0 Mon Sep 17 00:00:00 2001
From: Xuan <97ssps30212@gmail.com>
Date: Sun, 18 Sep 2022 19:02:49 +0800
Subject: [PATCH 1/4] chore: use pnpm workspace
---
package.json | 68 ++-----
.../.storybook}/main.js | 0
.../.storybook}/preview-head.html | 0
.../.storybook}/preview.js | 0
.../react-typist-component/api-extractor.json | 0
.../react-typist-component/dev}/App.tsx | 2 +-
.../dev}/components/Header.tsx | 2 +-
.../dev}/components/PauseExample.tsx | 2 +-
.../dev}/components/Section.tsx | 0
.../react-typist-component/dev}/favicon.svg | 0
.../react-typist-component/dev}/index.css | 0
.../react-typist-component/dev}/main.tsx | 0
.../dev}/utils/randomDelayGenerator.ts | 0
.../react-typist-component/dev}/vite-env.d.ts | 0
.../react-typist-component/index.html | 0
.../react-typist-component/jest-setup.ts | 0
.../react-typist-component/jest.config.js | 0
packages/react-typist-component/package.json | 90 +++++++++
.../react-typist-component/postcss.config.js | 0
.../src}/__test__/Typist.test.tsx | 0
.../src}/__test__/constant.tsx | 0
.../src}/__test__/utils.ts | 0
.../src}/components/Backspace.tsx | 0
.../src}/components/Delay.tsx | 0
.../src}/components/Main.tsx | 0
.../src}/components/Paste.tsx | 0
.../src}/components/Typist.ts | 0
.../react-typist-component/src}/index.ts | 0
.../src}/stories/Typist.stories.tsx | 0
.../src}/types/TypistProps.ts | 0
.../src}/types/actions.ts | 0
.../src}/utils/defaultFuncs.ts | 0
.../src}/utils/getActions.ts | 0
.../src}/utils/getTypedChildren.ts | 0
.../src}/utils/getTypedChildrenArray.ts | 0
.../src}/utils/insertCursor.ts | 0
.../src}/utils/isNil.ts | 0
.../react-typist-component/tailwind.config.js | 0
.../react-typist-component/tsconfig.json | 0
.../react-typist-component/tsconfig.lib.json | 0
.../react-typist-component/tsconfig.node.json | 0
.../types/components/Backspace.d.ts | 6 +
.../types/components/Backspace.d.ts.map | 1 +
.../types/components/Delay.d.ts | 6 +
.../types/components/Delay.d.ts.map | 1 +
.../types/components/Main.d.ts | 5 +
.../types/components/Main.d.ts.map | 1 +
.../types/components/Paste.d.ts | 7 +
.../types/components/Paste.d.ts.map | 1 +
.../types/components/Typist.d.ts | 14 ++
.../types/components/Typist.d.ts.map | 1 +
.../react-typist-component/types/index.d.ts | 5 +
.../types/index.d.ts.map | 1 +
.../types/types/TypistProps.d.ts | 20 ++
.../types/types/TypistProps.d.ts.map | 1 +
.../types/types/actions.d.ts | 19 ++
.../types/types/actions.d.ts.map | 1 +
.../types/utils/defaultFuncs.d.ts | 4 +
.../types/utils/defaultFuncs.d.ts.map | 1 +
.../types/utils/getActions.d.ts | 9 +
.../types/utils/getActions.d.ts.map | 1 +
.../types/utils/getTypedChildren.d.ts | 11 ++
.../types/utils/getTypedChildren.d.ts.map | 1 +
.../types/utils/getTypedChildrenArray.d.ts | 4 +
.../utils/getTypedChildrenArray.d.ts.map | 1 +
.../types/utils/insertCursor.d.ts | 8 +
.../types/utils/insertCursor.d.ts.map | 1 +
.../types/utils/isNil.d.ts | 3 +
.../types/utils/isNil.d.ts.map | 1 +
.../react-typist-component/vite.config.ts | 0
pnpm-lock.yaml | 171 ++++++++++--------
pnpm-workspace.yaml | 2 +
72 files changed, 338 insertions(+), 134 deletions(-)
rename {.storybook => packages/react-typist-component/.storybook}/main.js (100%)
rename {.storybook => packages/react-typist-component/.storybook}/preview-head.html (100%)
rename {.storybook => packages/react-typist-component/.storybook}/preview.js (100%)
rename api-extractor.json => packages/react-typist-component/api-extractor.json (100%)
rename {dev => packages/react-typist-component/dev}/App.tsx (93%)
rename {dev => packages/react-typist-component/dev}/components/Header.tsx (88%)
rename {dev => packages/react-typist-component/dev}/components/PauseExample.tsx (91%)
rename {dev => packages/react-typist-component/dev}/components/Section.tsx (100%)
rename {dev => packages/react-typist-component/dev}/favicon.svg (100%)
rename {dev => packages/react-typist-component/dev}/index.css (100%)
rename {dev => packages/react-typist-component/dev}/main.tsx (100%)
rename {dev => packages/react-typist-component/dev}/utils/randomDelayGenerator.ts (100%)
rename {dev => packages/react-typist-component/dev}/vite-env.d.ts (100%)
rename index.html => packages/react-typist-component/index.html (100%)
rename jest-setup.ts => packages/react-typist-component/jest-setup.ts (100%)
rename jest.config.js => packages/react-typist-component/jest.config.js (100%)
create mode 100644 packages/react-typist-component/package.json
rename postcss.config.js => packages/react-typist-component/postcss.config.js (100%)
rename {src => packages/react-typist-component/src}/__test__/Typist.test.tsx (100%)
rename {src => packages/react-typist-component/src}/__test__/constant.tsx (100%)
rename {src => packages/react-typist-component/src}/__test__/utils.ts (100%)
rename {src => packages/react-typist-component/src}/components/Backspace.tsx (100%)
rename {src => packages/react-typist-component/src}/components/Delay.tsx (100%)
rename {src => packages/react-typist-component/src}/components/Main.tsx (100%)
rename {src => packages/react-typist-component/src}/components/Paste.tsx (100%)
rename {src => packages/react-typist-component/src}/components/Typist.ts (100%)
rename {src => packages/react-typist-component/src}/index.ts (100%)
rename {src => packages/react-typist-component/src}/stories/Typist.stories.tsx (100%)
rename {src => packages/react-typist-component/src}/types/TypistProps.ts (100%)
rename {src => packages/react-typist-component/src}/types/actions.ts (100%)
rename {src => packages/react-typist-component/src}/utils/defaultFuncs.ts (100%)
rename {src => packages/react-typist-component/src}/utils/getActions.ts (100%)
rename {src => packages/react-typist-component/src}/utils/getTypedChildren.ts (100%)
rename {src => packages/react-typist-component/src}/utils/getTypedChildrenArray.ts (100%)
rename {src => packages/react-typist-component/src}/utils/insertCursor.ts (100%)
rename {src => packages/react-typist-component/src}/utils/isNil.ts (100%)
rename tailwind.config.js => packages/react-typist-component/tailwind.config.js (100%)
rename tsconfig.json => packages/react-typist-component/tsconfig.json (100%)
rename tsconfig.lib.json => packages/react-typist-component/tsconfig.lib.json (100%)
rename tsconfig.node.json => packages/react-typist-component/tsconfig.node.json (100%)
create mode 100644 packages/react-typist-component/types/components/Backspace.d.ts
create mode 100644 packages/react-typist-component/types/components/Backspace.d.ts.map
create mode 100644 packages/react-typist-component/types/components/Delay.d.ts
create mode 100644 packages/react-typist-component/types/components/Delay.d.ts.map
create mode 100644 packages/react-typist-component/types/components/Main.d.ts
create mode 100644 packages/react-typist-component/types/components/Main.d.ts.map
create mode 100644 packages/react-typist-component/types/components/Paste.d.ts
create mode 100644 packages/react-typist-component/types/components/Paste.d.ts.map
create mode 100644 packages/react-typist-component/types/components/Typist.d.ts
create mode 100644 packages/react-typist-component/types/components/Typist.d.ts.map
create mode 100644 packages/react-typist-component/types/index.d.ts
create mode 100644 packages/react-typist-component/types/index.d.ts.map
create mode 100644 packages/react-typist-component/types/types/TypistProps.d.ts
create mode 100644 packages/react-typist-component/types/types/TypistProps.d.ts.map
create mode 100644 packages/react-typist-component/types/types/actions.d.ts
create mode 100644 packages/react-typist-component/types/types/actions.d.ts.map
create mode 100644 packages/react-typist-component/types/utils/defaultFuncs.d.ts
create mode 100644 packages/react-typist-component/types/utils/defaultFuncs.d.ts.map
create mode 100644 packages/react-typist-component/types/utils/getActions.d.ts
create mode 100644 packages/react-typist-component/types/utils/getActions.d.ts.map
create mode 100644 packages/react-typist-component/types/utils/getTypedChildren.d.ts
create mode 100644 packages/react-typist-component/types/utils/getTypedChildren.d.ts.map
create mode 100644 packages/react-typist-component/types/utils/getTypedChildrenArray.d.ts
create mode 100644 packages/react-typist-component/types/utils/getTypedChildrenArray.d.ts.map
create mode 100644 packages/react-typist-component/types/utils/insertCursor.d.ts
create mode 100644 packages/react-typist-component/types/utils/insertCursor.d.ts.map
create mode 100644 packages/react-typist-component/types/utils/isNil.d.ts
create mode 100644 packages/react-typist-component/types/utils/isNil.d.ts.map
rename vite.config.ts => packages/react-typist-component/vite.config.ts (100%)
create mode 100644 pnpm-workspace.yaml
diff --git a/package.json b/package.json
index 449cbfa..2aeb493 100644
--- a/package.json
+++ b/package.json
@@ -1,17 +1,9 @@
{
- "name": "react-typist-component",
+ "name": "react-components-monorepo",
"version": "1.0.4",
- "description": "A react component lets you create typewriter effect.",
"author": "Yu-Xuan Zheng",
"keywords": [
- "react",
- "react component",
- "typewriter",
- "typewriter component",
- "react typewriter component",
- "typist",
- "typist component",
- "react typist component"
+ "react components"
],
"license": "MIT",
"repository": {
@@ -33,60 +25,23 @@
"scripts": {
"preinstall": "npx only-allow pnpm",
"commit": "cz",
- "dev": "vite",
- "test": "jest",
- "build:website": "tsc && vite build",
- "build:types": "rimraf types/* && tsc --project tsconfig.lib.json",
- "build:lib": "pnpm build:types && vite build --mode lib && api-extractor run",
- "prepublishOnly": "pnpm build:lib",
- "preview": "vite preview",
- "storybook": "start-storybook -p 6006",
- "build-storybook": "build-storybook"
+ "test": "pnpm -r --filter ./packages/* run test",
+ "build:lib": "pnpm -r --filter ./packages/* run build:lib",
+ "prepublishOnly": "pnpm build:lib"
},
"devDependencies": {
- "@babel/core": "^7.18.5",
- "@microsoft/api-extractor": "^7.28.4",
- "@storybook/addon-actions": "^6.5.9",
- "@storybook/addon-essentials": "^6.5.9",
- "@storybook/addon-interactions": "^6.5.9",
- "@storybook/addon-links": "^6.5.9",
- "@storybook/builder-vite": "^0.2.0",
- "@storybook/react": "^6.5.9",
- "@storybook/testing-library": "^0.0.13",
- "@testing-library/jest-dom": "^5.16.4",
- "@testing-library/react": "^13.3.0",
- "@types/jest": "^28.1.6",
- "@types/react": "^18.0.15",
- "@types/react-dom": "^18.0.6",
"@typescript-eslint/eslint-plugin": "^5.25.0",
"@typescript-eslint/parser": "^5.25.0",
- "@vitejs/plugin-react": "^2.0.0",
- "autoprefixer": "^10.4.8",
- "babel-loader": "^8.2.5",
"commitizen": "^4.2.4",
"cz-conventional-changelog": "3.3.0",
"eslint": "^8.15.0",
"eslint-plugin-react": "^7.30.0",
"eslint-plugin-react-hooks": "^4.5.0",
"eslint-plugin-storybook": "^0.6.1",
- "grapheme-splitter": "^1.0.4",
- "jest": "^28.1.3",
- "jest-environment-jsdom": "^28.1.3",
- "postcss": "^8.4.16",
"prettier": "^2.7.1",
"prettier-plugin-tailwindcss": "^0.1.13",
- "react": "^18.2.0",
- "react-dom": "^18.2.0",
- "rimraf": "^3.0.2",
- "tailwindcss": "^3.1.8",
- "ts-jest": "^28.0.7",
- "typescript": "^4.7.4",
- "vite": "^3.0.2"
+ "typescript": "^4.7.4"
},
- "peerDependencies": {
- "react": ">=18.0.0"
- },
- "dependencies": {},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
@@ -98,5 +53,16 @@
"singleQuote": true,
"jsxSingleQuote": true,
"printWidth": 80
+ },
+ "pnpm": {
+ "overrides": {
+ "@types/react": "^18.0.15",
+ "@types/react-dom": "^18.0.6",
+ "react": "^18.2.0",
+ "react-dom": "^18.2.0",
+ "vite": "^3.0.2",
+ "@vitejs/plugin-react": "^2.0.0",
+ "typescript": "^4.7.4"
+ }
}
}
diff --git a/.storybook/main.js b/packages/react-typist-component/.storybook/main.js
similarity index 100%
rename from .storybook/main.js
rename to packages/react-typist-component/.storybook/main.js
diff --git a/.storybook/preview-head.html b/packages/react-typist-component/.storybook/preview-head.html
similarity index 100%
rename from .storybook/preview-head.html
rename to packages/react-typist-component/.storybook/preview-head.html
diff --git a/.storybook/preview.js b/packages/react-typist-component/.storybook/preview.js
similarity index 100%
rename from .storybook/preview.js
rename to packages/react-typist-component/.storybook/preview.js
diff --git a/api-extractor.json b/packages/react-typist-component/api-extractor.json
similarity index 100%
rename from api-extractor.json
rename to packages/react-typist-component/api-extractor.json
diff --git a/dev/App.tsx b/packages/react-typist-component/dev/App.tsx
similarity index 93%
rename from dev/App.tsx
rename to packages/react-typist-component/dev/App.tsx
index 3748749..2442403 100644
--- a/dev/App.tsx
+++ b/packages/react-typist-component/dev/App.tsx
@@ -1,5 +1,5 @@
import React from 'react';
-import Typist from '../src';
+import Typist from '../packages/react-typist-component/src';
import Header from './components/Header';
import Section from './components/Section';
import PauseExample from './components/PauseExample';
diff --git a/dev/components/Header.tsx b/packages/react-typist-component/dev/components/Header.tsx
similarity index 88%
rename from dev/components/Header.tsx
rename to packages/react-typist-component/dev/components/Header.tsx
index d69adb0..811338f 100644
--- a/dev/components/Header.tsx
+++ b/packages/react-typist-component/dev/components/Header.tsx
@@ -1,6 +1,6 @@
import React from 'react';
-import Typist from '../../src';
+import Typist from '../../packages/react-typist-component/src';
import randomDelayGenerator from '../utils/randomDelayGenerator';
export default function Header() {
diff --git a/dev/components/PauseExample.tsx b/packages/react-typist-component/dev/components/PauseExample.tsx
similarity index 91%
rename from dev/components/PauseExample.tsx
rename to packages/react-typist-component/dev/components/PauseExample.tsx
index 4f2d88e..182568d 100644
--- a/dev/components/PauseExample.tsx
+++ b/packages/react-typist-component/dev/components/PauseExample.tsx
@@ -1,6 +1,6 @@
import React, { useState } from 'react';
-import Typist from '../../src';
+import Typist from '../../packages/react-typist-component/src';
import Section from './Section';
export default function PauseExample() {
diff --git a/dev/components/Section.tsx b/packages/react-typist-component/dev/components/Section.tsx
similarity index 100%
rename from dev/components/Section.tsx
rename to packages/react-typist-component/dev/components/Section.tsx
diff --git a/dev/favicon.svg b/packages/react-typist-component/dev/favicon.svg
similarity index 100%
rename from dev/favicon.svg
rename to packages/react-typist-component/dev/favicon.svg
diff --git a/dev/index.css b/packages/react-typist-component/dev/index.css
similarity index 100%
rename from dev/index.css
rename to packages/react-typist-component/dev/index.css
diff --git a/dev/main.tsx b/packages/react-typist-component/dev/main.tsx
similarity index 100%
rename from dev/main.tsx
rename to packages/react-typist-component/dev/main.tsx
diff --git a/dev/utils/randomDelayGenerator.ts b/packages/react-typist-component/dev/utils/randomDelayGenerator.ts
similarity index 100%
rename from dev/utils/randomDelayGenerator.ts
rename to packages/react-typist-component/dev/utils/randomDelayGenerator.ts
diff --git a/dev/vite-env.d.ts b/packages/react-typist-component/dev/vite-env.d.ts
similarity index 100%
rename from dev/vite-env.d.ts
rename to packages/react-typist-component/dev/vite-env.d.ts
diff --git a/index.html b/packages/react-typist-component/index.html
similarity index 100%
rename from index.html
rename to packages/react-typist-component/index.html
diff --git a/jest-setup.ts b/packages/react-typist-component/jest-setup.ts
similarity index 100%
rename from jest-setup.ts
rename to packages/react-typist-component/jest-setup.ts
diff --git a/jest.config.js b/packages/react-typist-component/jest.config.js
similarity index 100%
rename from jest.config.js
rename to packages/react-typist-component/jest.config.js
diff --git a/packages/react-typist-component/package.json b/packages/react-typist-component/package.json
new file mode 100644
index 0000000..a973046
--- /dev/null
+++ b/packages/react-typist-component/package.json
@@ -0,0 +1,90 @@
+{
+ "name": "react-typist-component",
+ "version": "1.0.4",
+ "description": "A react component lets you create typewriter effect.",
+ "author": "Yu-Xuan Zheng",
+ "keywords": [
+ "react",
+ "react component",
+ "typewriter",
+ "typewriter component",
+ "react typewriter component",
+ "typist",
+ "typist component",
+ "react typist component"
+ ],
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jason89521/react-typist-component"
+ },
+ "files": [
+ "dist"
+ ],
+ "types": "./dist/react-typist-component.d.ts",
+ "main": "./dist/react-typist-component.umd.js",
+ "module": "./dist/react-typist-component.mjs",
+ "exports": {
+ ".": {
+ "import": "./dist/react-typist-component.mjs",
+ "require": "./dist/react-typist-component.umd.js"
+ }
+ },
+ "scripts": {
+ "preinstall": "npx only-allow pnpm",
+ "dev": "vite",
+ "test": "jest",
+ "build:website": "tsc && vite build",
+ "build:types": "rimraf types/* && tsc --project tsconfig.lib.json",
+ "build:lib": "pnpm build:types && vite build --mode lib && api-extractor run",
+ "prepublishOnly": "pnpm build:lib",
+ "preview": "vite preview",
+ "storybook": "start-storybook -p 6006",
+ "build-storybook": "build-storybook"
+ },
+ "devDependencies": {
+ "@babel/core": "^7.18.5",
+ "@microsoft/api-extractor": "^7.28.4",
+ "@storybook/addon-actions": "^6.5.9",
+ "@storybook/addon-essentials": "^6.5.9",
+ "@storybook/addon-interactions": "^6.5.9",
+ "@storybook/addon-links": "^6.5.9",
+ "@storybook/builder-vite": "^0.2.0",
+ "@storybook/react": "^6.5.9",
+ "@storybook/testing-library": "^0.0.13",
+ "@testing-library/jest-dom": "^5.16.4",
+ "@testing-library/react": "^13.3.0",
+ "@types/jest": "^28.1.6",
+ "@types/react": "^18.0.15",
+ "@types/react-dom": "^18.0.6",
+ "@vitejs/plugin-react": "^2.0.0",
+ "autoprefixer": "^10.4.8",
+ "babel-loader": "^8.2.5",
+ "grapheme-splitter": "^1.0.4",
+ "jest": "^28.1.3",
+ "jest-environment-jsdom": "^28.1.3",
+ "postcss": "^8.4.16",
+ "react": "^18.2.0",
+ "react-dom": "^18.2.0",
+ "rimraf": "^3.0.2",
+ "tailwindcss": "^3.1.8",
+ "ts-jest": "^28.0.7",
+ "typescript": "^4.7.4",
+ "vite": "^3.0.2"
+ },
+ "peerDependencies": {
+ "react": ">=18.0.0"
+ },
+ "config": {
+ "commitizen": {
+ "path": "./node_modules/cz-conventional-changelog"
+ }
+ },
+ "prettier": {
+ "tabWidth": 2,
+ "semi": true,
+ "singleQuote": true,
+ "jsxSingleQuote": true,
+ "printWidth": 80
+ }
+}
diff --git a/postcss.config.js b/packages/react-typist-component/postcss.config.js
similarity index 100%
rename from postcss.config.js
rename to packages/react-typist-component/postcss.config.js
diff --git a/src/__test__/Typist.test.tsx b/packages/react-typist-component/src/__test__/Typist.test.tsx
similarity index 100%
rename from src/__test__/Typist.test.tsx
rename to packages/react-typist-component/src/__test__/Typist.test.tsx
diff --git a/src/__test__/constant.tsx b/packages/react-typist-component/src/__test__/constant.tsx
similarity index 100%
rename from src/__test__/constant.tsx
rename to packages/react-typist-component/src/__test__/constant.tsx
diff --git a/src/__test__/utils.ts b/packages/react-typist-component/src/__test__/utils.ts
similarity index 100%
rename from src/__test__/utils.ts
rename to packages/react-typist-component/src/__test__/utils.ts
diff --git a/src/components/Backspace.tsx b/packages/react-typist-component/src/components/Backspace.tsx
similarity index 100%
rename from src/components/Backspace.tsx
rename to packages/react-typist-component/src/components/Backspace.tsx
diff --git a/src/components/Delay.tsx b/packages/react-typist-component/src/components/Delay.tsx
similarity index 100%
rename from src/components/Delay.tsx
rename to packages/react-typist-component/src/components/Delay.tsx
diff --git a/src/components/Main.tsx b/packages/react-typist-component/src/components/Main.tsx
similarity index 100%
rename from src/components/Main.tsx
rename to packages/react-typist-component/src/components/Main.tsx
diff --git a/src/components/Paste.tsx b/packages/react-typist-component/src/components/Paste.tsx
similarity index 100%
rename from src/components/Paste.tsx
rename to packages/react-typist-component/src/components/Paste.tsx
diff --git a/src/components/Typist.ts b/packages/react-typist-component/src/components/Typist.ts
similarity index 100%
rename from src/components/Typist.ts
rename to packages/react-typist-component/src/components/Typist.ts
diff --git a/src/index.ts b/packages/react-typist-component/src/index.ts
similarity index 100%
rename from src/index.ts
rename to packages/react-typist-component/src/index.ts
diff --git a/src/stories/Typist.stories.tsx b/packages/react-typist-component/src/stories/Typist.stories.tsx
similarity index 100%
rename from src/stories/Typist.stories.tsx
rename to packages/react-typist-component/src/stories/Typist.stories.tsx
diff --git a/src/types/TypistProps.ts b/packages/react-typist-component/src/types/TypistProps.ts
similarity index 100%
rename from src/types/TypistProps.ts
rename to packages/react-typist-component/src/types/TypistProps.ts
diff --git a/src/types/actions.ts b/packages/react-typist-component/src/types/actions.ts
similarity index 100%
rename from src/types/actions.ts
rename to packages/react-typist-component/src/types/actions.ts
diff --git a/src/utils/defaultFuncs.ts b/packages/react-typist-component/src/utils/defaultFuncs.ts
similarity index 100%
rename from src/utils/defaultFuncs.ts
rename to packages/react-typist-component/src/utils/defaultFuncs.ts
diff --git a/src/utils/getActions.ts b/packages/react-typist-component/src/utils/getActions.ts
similarity index 100%
rename from src/utils/getActions.ts
rename to packages/react-typist-component/src/utils/getActions.ts
diff --git a/src/utils/getTypedChildren.ts b/packages/react-typist-component/src/utils/getTypedChildren.ts
similarity index 100%
rename from src/utils/getTypedChildren.ts
rename to packages/react-typist-component/src/utils/getTypedChildren.ts
diff --git a/src/utils/getTypedChildrenArray.ts b/packages/react-typist-component/src/utils/getTypedChildrenArray.ts
similarity index 100%
rename from src/utils/getTypedChildrenArray.ts
rename to packages/react-typist-component/src/utils/getTypedChildrenArray.ts
diff --git a/src/utils/insertCursor.ts b/packages/react-typist-component/src/utils/insertCursor.ts
similarity index 100%
rename from src/utils/insertCursor.ts
rename to packages/react-typist-component/src/utils/insertCursor.ts
diff --git a/src/utils/isNil.ts b/packages/react-typist-component/src/utils/isNil.ts
similarity index 100%
rename from src/utils/isNil.ts
rename to packages/react-typist-component/src/utils/isNil.ts
diff --git a/tailwind.config.js b/packages/react-typist-component/tailwind.config.js
similarity index 100%
rename from tailwind.config.js
rename to packages/react-typist-component/tailwind.config.js
diff --git a/tsconfig.json b/packages/react-typist-component/tsconfig.json
similarity index 100%
rename from tsconfig.json
rename to packages/react-typist-component/tsconfig.json
diff --git a/tsconfig.lib.json b/packages/react-typist-component/tsconfig.lib.json
similarity index 100%
rename from tsconfig.lib.json
rename to packages/react-typist-component/tsconfig.lib.json
diff --git a/tsconfig.node.json b/packages/react-typist-component/tsconfig.node.json
similarity index 100%
rename from tsconfig.node.json
rename to packages/react-typist-component/tsconfig.node.json
diff --git a/packages/react-typist-component/types/components/Backspace.d.ts b/packages/react-typist-component/types/components/Backspace.d.ts
new file mode 100644
index 0000000..1cc3286
--- /dev/null
+++ b/packages/react-typist-component/types/components/Backspace.d.ts
@@ -0,0 +1,6 @@
+declare type Props = {
+ count: number;
+};
+declare const Backspace: (props: Props) => null;
+export default Backspace;
+//# sourceMappingURL=Backspace.d.ts.map
\ No newline at end of file
diff --git a/packages/react-typist-component/types/components/Backspace.d.ts.map b/packages/react-typist-component/types/components/Backspace.d.ts.map
new file mode 100644
index 0000000..9d1057e
--- /dev/null
+++ b/packages/react-typist-component/types/components/Backspace.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"Backspace.d.ts","sourceRoot":"","sources":["../../src/components/Backspace.tsx"],"names":[],"mappings":"AACA,aAAK,KAAK,GAAG;IACX,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,QAAA,MAAM,SAAS,UAAW,KAAK,SAE9B,CAAC;AAEF,eAAe,SAAS,CAAC"}
\ No newline at end of file
diff --git a/packages/react-typist-component/types/components/Delay.d.ts b/packages/react-typist-component/types/components/Delay.d.ts
new file mode 100644
index 0000000..878882c
--- /dev/null
+++ b/packages/react-typist-component/types/components/Delay.d.ts
@@ -0,0 +1,6 @@
+declare type Props = {
+ ms: number;
+};
+declare const Delay: (props: Props) => null;
+export default Delay;
+//# sourceMappingURL=Delay.d.ts.map
\ No newline at end of file
diff --git a/packages/react-typist-component/types/components/Delay.d.ts.map b/packages/react-typist-component/types/components/Delay.d.ts.map
new file mode 100644
index 0000000..2331066
--- /dev/null
+++ b/packages/react-typist-component/types/components/Delay.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"Delay.d.ts","sourceRoot":"","sources":["../../src/components/Delay.tsx"],"names":[],"mappings":"AACA,aAAK,KAAK,GAAG;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,QAAA,MAAM,KAAK,UAAW,KAAK,SAE1B,CAAC;AAEF,eAAe,KAAK,CAAC"}
\ No newline at end of file
diff --git a/packages/react-typist-component/types/components/Main.d.ts b/packages/react-typist-component/types/components/Main.d.ts
new file mode 100644
index 0000000..ab35ad2
--- /dev/null
+++ b/packages/react-typist-component/types/components/Main.d.ts
@@ -0,0 +1,5 @@
+///
+import type { TypistProps } from '../types/TypistProps';
+declare const Main: ({ cursor, disabled, restartKey, children, splitter, typingDelay, backspaceDelay, onTypingDone, startDelay, finishDelay, loop, pause, }: TypistProps) => JSX.Element;
+export default Main;
+//# sourceMappingURL=Main.d.ts.map
\ No newline at end of file
diff --git a/packages/react-typist-component/types/components/Main.d.ts.map b/packages/react-typist-component/types/components/Main.d.ts.map
new file mode 100644
index 0000000..91c888a
--- /dev/null
+++ b/packages/react-typist-component/types/components/Main.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"Main.d.ts","sourceRoot":"","sources":["../../src/components/Main.tsx"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAwB,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAO9E,QAAA,MAAM,IAAI,2IAaP,WAAW,gBAwGb,CAAC;AAEF,eAAe,IAAI,CAAC"}
\ No newline at end of file
diff --git a/packages/react-typist-component/types/components/Paste.d.ts b/packages/react-typist-component/types/components/Paste.d.ts
new file mode 100644
index 0000000..6c3a803
--- /dev/null
+++ b/packages/react-typist-component/types/components/Paste.d.ts
@@ -0,0 +1,7 @@
+import React from 'react';
+declare type Props = {
+ children: React.ReactNode;
+};
+declare const Paste: ({ children }: Props) => JSX.Element;
+export default Paste;
+//# sourceMappingURL=Paste.d.ts.map
\ No newline at end of file
diff --git a/packages/react-typist-component/types/components/Paste.d.ts.map b/packages/react-typist-component/types/components/Paste.d.ts.map
new file mode 100644
index 0000000..e50ba39
--- /dev/null
+++ b/packages/react-typist-component/types/components/Paste.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"Paste.d.ts","sourceRoot":"","sources":["../../src/components/Paste.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,aAAK,KAAK,GAAG;IACX,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF,QAAA,MAAM,KAAK,iBAAkB,KAAK,gBAEjC,CAAC;AAEF,eAAe,KAAK,CAAC"}
\ No newline at end of file
diff --git a/packages/react-typist-component/types/components/Typist.d.ts b/packages/react-typist-component/types/components/Typist.d.ts
new file mode 100644
index 0000000..9745822
--- /dev/null
+++ b/packages/react-typist-component/types/components/Typist.d.ts
@@ -0,0 +1,14 @@
+///
+declare const Typist: (({ cursor, disabled, restartKey, children, splitter, typingDelay, backspaceDelay, onTypingDone, startDelay, finishDelay, loop, pause, }: import("..").TypistProps) => JSX.Element) & {
+ Delay: (props: {
+ ms: number;
+ }) => null;
+ Backspace: (props: {
+ count: number;
+ }) => null;
+ Paste: ({ children }: {
+ children: import("react").ReactNode;
+ }) => JSX.Element;
+};
+export default Typist;
+//# sourceMappingURL=Typist.d.ts.map
\ No newline at end of file
diff --git a/packages/react-typist-component/types/components/Typist.d.ts.map b/packages/react-typist-component/types/components/Typist.d.ts.map
new file mode 100644
index 0000000..f64b2b0
--- /dev/null
+++ b/packages/react-typist-component/types/components/Typist.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"Typist.d.ts","sourceRoot":"","sources":["../../src/components/Typist.ts"],"names":[],"mappings":";AAKA,QAAA,MAAM,MAAM;;;;;;;;;;CAAmD,CAAC;AAEhE,eAAe,MAAM,CAAC"}
\ No newline at end of file
diff --git a/packages/react-typist-component/types/index.d.ts b/packages/react-typist-component/types/index.d.ts
new file mode 100644
index 0000000..228e220
--- /dev/null
+++ b/packages/react-typist-component/types/index.d.ts
@@ -0,0 +1,5 @@
+import type { TypistProps, Splitter, Delay } from './types/TypistProps';
+import Typist from './components/Typist';
+export default Typist;
+export type { TypistProps, Splitter, Delay };
+//# sourceMappingURL=index.d.ts.map
\ No newline at end of file
diff --git a/packages/react-typist-component/types/index.d.ts.map b/packages/react-typist-component/types/index.d.ts.map
new file mode 100644
index 0000000..713b41b
--- /dev/null
+++ b/packages/react-typist-component/types/index.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACxE,OAAO,MAAM,MAAM,qBAAqB,CAAC;AAEzC,eAAe,MAAM,CAAC;AACtB,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC"}
\ No newline at end of file
diff --git a/packages/react-typist-component/types/types/TypistProps.d.ts b/packages/react-typist-component/types/types/TypistProps.d.ts
new file mode 100644
index 0000000..397c77c
--- /dev/null
+++ b/packages/react-typist-component/types/types/TypistProps.d.ts
@@ -0,0 +1,20 @@
+///
+export declare type TypedChildren = (string | React.ReactElement)[] | null | undefined;
+export declare type TypedLines = (string | React.ReactElement | null)[];
+export declare type Delay = number | (() => number);
+export declare type Splitter = (str: string) => string[];
+export declare type TypistProps = {
+ children: React.ReactNode;
+ typingDelay?: Delay;
+ backspaceDelay?: Delay;
+ loop?: boolean;
+ pause?: boolean;
+ startDelay?: number;
+ finishDelay?: number;
+ onTypingDone?: () => void;
+ splitter?: Splitter;
+ cursor?: string | React.ReactElement;
+ disabled?: boolean;
+ restartKey?: any;
+};
+//# sourceMappingURL=TypistProps.d.ts.map
\ No newline at end of file
diff --git a/packages/react-typist-component/types/types/TypistProps.d.ts.map b/packages/react-typist-component/types/types/TypistProps.d.ts.map
new file mode 100644
index 0000000..930888d
--- /dev/null
+++ b/packages/react-typist-component/types/types/TypistProps.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"TypistProps.d.ts","sourceRoot":"","sources":["../../src/types/TypistProps.ts"],"names":[],"mappings":";AAAA,oBAAY,aAAa,GAAG,CAAC,MAAM,GAAG,KAAK,CAAC,YAAY,CAAC,EAAE,GAAG,IAAI,GAAG,SAAS,CAAC;AAC/E,oBAAY,UAAU,GAAG,CAAC,MAAM,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC,EAAE,CAAC;AAChE,oBAAY,KAAK,GAAG,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,CAAC;AAC5C,oBAAY,QAAQ,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,EAAE,CAAC;AAEjD,oBAAY,WAAW,GAAG;IACxB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,WAAW,CAAC,EAAE,KAAK,CAAC;IACpB,cAAc,CAAC,EAAE,KAAK,CAAC;IACvB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,YAAY,CAAC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,GAAG,CAAC;CAClB,CAAC"}
\ No newline at end of file
diff --git a/packages/react-typist-component/types/types/actions.d.ts b/packages/react-typist-component/types/types/actions.d.ts
new file mode 100644
index 0000000..9bf493b
--- /dev/null
+++ b/packages/react-typist-component/types/types/actions.d.ts
@@ -0,0 +1,19 @@
+import type { ReactElement } from 'react';
+export declare type TypeTokenAction = {
+ type: 'TYPE_TOKEN';
+ payload: string | ReactElement;
+};
+export declare type BackspaceAction = {
+ type: 'BACKSPACE';
+ payload: number;
+};
+export declare type DelayAction = {
+ type: 'DELAY';
+ payload: number;
+};
+export declare type PasteAction = {
+ type: 'PASTE';
+ payload: string | ReactElement;
+};
+export declare type Action = TypeTokenAction | BackspaceAction | DelayAction | PasteAction;
+//# sourceMappingURL=actions.d.ts.map
\ No newline at end of file
diff --git a/packages/react-typist-component/types/types/actions.d.ts.map b/packages/react-typist-component/types/types/actions.d.ts.map
new file mode 100644
index 0000000..6804b48
--- /dev/null
+++ b/packages/react-typist-component/types/types/actions.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/types/actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,oBAAY,eAAe,GAAG;IAC5B,IAAI,EAAE,YAAY,CAAC;IACnB,OAAO,EAAE,MAAM,GAAG,YAAY,CAAC;CAChC,CAAC;AACF,oBAAY,eAAe,GAAG;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AACrE,oBAAY,WAAW,GAAG;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAC7D,oBAAY,WAAW,GAAG;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,GAAG,YAAY,CAAA;CAAE,CAAC;AAC5E,oBAAY,MAAM,GAAG,eAAe,GAAG,eAAe,GAAG,WAAW,GAAG,WAAW,CAAC"}
\ No newline at end of file
diff --git a/packages/react-typist-component/types/utils/defaultFuncs.d.ts b/packages/react-typist-component/types/utils/defaultFuncs.d.ts
new file mode 100644
index 0000000..3eb3953
--- /dev/null
+++ b/packages/react-typist-component/types/utils/defaultFuncs.d.ts
@@ -0,0 +1,4 @@
+declare const emptyFunc: () => void;
+declare const defaultSplitter: (str: string) => string[];
+export { emptyFunc, defaultSplitter };
+//# sourceMappingURL=defaultFuncs.d.ts.map
\ No newline at end of file
diff --git a/packages/react-typist-component/types/utils/defaultFuncs.d.ts.map b/packages/react-typist-component/types/utils/defaultFuncs.d.ts.map
new file mode 100644
index 0000000..716f6b3
--- /dev/null
+++ b/packages/react-typist-component/types/utils/defaultFuncs.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"defaultFuncs.d.ts","sourceRoot":"","sources":["../../src/utils/defaultFuncs.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,SAAS,YAEd,CAAC;AAEF,QAAA,MAAM,eAAe,QAAS,MAAM,aAAkB,CAAC;AAEvD,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC"}
\ No newline at end of file
diff --git a/packages/react-typist-component/types/utils/getActions.d.ts b/packages/react-typist-component/types/utils/getActions.d.ts
new file mode 100644
index 0000000..0d01270
--- /dev/null
+++ b/packages/react-typist-component/types/utils/getActions.d.ts
@@ -0,0 +1,9 @@
+import type { Action } from '../types/actions';
+import type { Splitter } from '../types/TypistProps';
+/**
+ * Returns an actions array generated from ReactNode.
+ * `Main` component will use these actions to determine what it should do.
+ */
+declare const getActions: (node: React.ReactNode, splitter: Splitter) => Action[];
+export default getActions;
+//# sourceMappingURL=getActions.d.ts.map
\ No newline at end of file
diff --git a/packages/react-typist-component/types/utils/getActions.d.ts.map b/packages/react-typist-component/types/utils/getActions.d.ts.map
new file mode 100644
index 0000000..f9d6810
--- /dev/null
+++ b/packages/react-typist-component/types/utils/getActions.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"getActions.d.ts","sourceRoot":"","sources":["../../src/utils/getActions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,MAAM,EAKP,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAqBrD;;;GAGG;AACH,QAAA,MAAM,UAAU,SAAU,MAAM,SAAS,YAAY,QAAQ,aAgE5D,CAAC;AAEF,eAAe,UAAU,CAAC"}
\ No newline at end of file
diff --git a/packages/react-typist-component/types/utils/getTypedChildren.d.ts b/packages/react-typist-component/types/utils/getTypedChildren.d.ts
new file mode 100644
index 0000000..4667e0f
--- /dev/null
+++ b/packages/react-typist-component/types/utils/getTypedChildren.d.ts
@@ -0,0 +1,11 @@
+import React from 'react';
+import type { TypedChildren } from '../types/TypistProps';
+/**
+ * Determine whether to display contents by looking up the `lines` variable.
+ * @param children
+ * @param lines
+ * @returns
+ */
+declare const getTypedChildren: (children: React.ReactNode, lines: (string | React.ReactElement | null)[]) => TypedChildren;
+export default getTypedChildren;
+//# sourceMappingURL=getTypedChildren.d.ts.map
\ No newline at end of file
diff --git a/packages/react-typist-component/types/utils/getTypedChildren.d.ts.map b/packages/react-typist-component/types/utils/getTypedChildren.d.ts.map
new file mode 100644
index 0000000..8e00e0f
--- /dev/null
+++ b/packages/react-typist-component/types/utils/getTypedChildren.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"getTypedChildren.d.ts","sourceRoot":"","sources":["../../src/utils/getTypedChildren.ts"],"names":[],"mappings":"AAAA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAItE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAG1D;;;;;GAKG;AACH,QAAA,MAAM,gBAAgB,aACV,MAAM,SAAS,SAClB,CAAC,MAAM,GAAG,MAAM,YAAY,GAAG,IAAI,CAAC,EAAE,kBAoC9C,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
\ No newline at end of file
diff --git a/packages/react-typist-component/types/utils/getTypedChildrenArray.d.ts b/packages/react-typist-component/types/utils/getTypedChildrenArray.d.ts
new file mode 100644
index 0000000..554e8b2
--- /dev/null
+++ b/packages/react-typist-component/types/utils/getTypedChildrenArray.d.ts
@@ -0,0 +1,4 @@
+import type { ReactNode } from 'react';
+import type { Splitter } from '../types/TypistProps';
+export default function getTypedChildrenArray(children: ReactNode, splitter: Splitter): import("../types/TypistProps").TypedChildren[];
+//# sourceMappingURL=getTypedChildrenArray.d.ts.map
\ No newline at end of file
diff --git a/packages/react-typist-component/types/utils/getTypedChildrenArray.d.ts.map b/packages/react-typist-component/types/utils/getTypedChildrenArray.d.ts.map
new file mode 100644
index 0000000..777e72c
--- /dev/null
+++ b/packages/react-typist-component/types/utils/getTypedChildrenArray.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"getTypedChildrenArray.d.ts","sourceRoot":"","sources":["../../src/utils/getTypedChildrenArray.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,QAAQ,EAAc,MAAM,sBAAsB,CAAC;AAOjE,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,kDA6EpF"}
\ No newline at end of file
diff --git a/packages/react-typist-component/types/utils/insertCursor.d.ts b/packages/react-typist-component/types/utils/insertCursor.d.ts
new file mode 100644
index 0000000..861362b
--- /dev/null
+++ b/packages/react-typist-component/types/utils/insertCursor.d.ts
@@ -0,0 +1,8 @@
+import React from 'react';
+import type { TypedChildren } from '../types/TypistProps';
+/**
+ * Insert the cursor after the latest typed character.
+ */
+declare const insertCursor: (typedChildren: TypedChildren, cursor: string | React.ReactElement) => TypedChildren;
+export default insertCursor;
+//# sourceMappingURL=insertCursor.d.ts.map
\ No newline at end of file
diff --git a/packages/react-typist-component/types/utils/insertCursor.d.ts.map b/packages/react-typist-component/types/utils/insertCursor.d.ts.map
new file mode 100644
index 0000000..4d117ec
--- /dev/null
+++ b/packages/react-typist-component/types/utils/insertCursor.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"insertCursor.d.ts","sourceRoot":"","sources":["../../src/utils/insertCursor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAG1D;;GAEG;AACH,QAAA,MAAM,YAAY,kBACD,aAAa,UACpB,MAAM,GAAG,MAAM,YAAY,KAClC,aA0BF,CAAC;AAEF,eAAe,YAAY,CAAC"}
\ No newline at end of file
diff --git a/packages/react-typist-component/types/utils/isNil.d.ts b/packages/react-typist-component/types/utils/isNil.d.ts
new file mode 100644
index 0000000..1f049cc
--- /dev/null
+++ b/packages/react-typist-component/types/utils/isNil.d.ts
@@ -0,0 +1,3 @@
+declare const isNil: (value: any) => value is null | undefined;
+export default isNil;
+//# sourceMappingURL=isNil.d.ts.map
\ No newline at end of file
diff --git a/packages/react-typist-component/types/utils/isNil.d.ts.map b/packages/react-typist-component/types/utils/isNil.d.ts.map
new file mode 100644
index 0000000..4528cc5
--- /dev/null
+++ b/packages/react-typist-component/types/utils/isNil.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"isNil.d.ts","sourceRoot":"","sources":["../../src/utils/isNil.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,KAAK,UAAW,GAAG,8BAA6C,CAAC;AAEvE,eAAe,KAAK,CAAC"}
\ No newline at end of file
diff --git a/vite.config.ts b/packages/react-typist-component/vite.config.ts
similarity index 100%
rename from vite.config.ts
rename to packages/react-typist-component/vite.config.ts
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 37e9a56..23a9017 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -1,84 +1,101 @@
lockfileVersion: 5.3
-specifiers:
- '@babel/core': ^7.18.5
- '@microsoft/api-extractor': ^7.28.4
- '@storybook/addon-actions': ^6.5.9
- '@storybook/addon-essentials': ^6.5.9
- '@storybook/addon-interactions': ^6.5.9
- '@storybook/addon-links': ^6.5.9
- '@storybook/builder-vite': ^0.2.0
- '@storybook/react': ^6.5.9
- '@storybook/testing-library': ^0.0.13
- '@testing-library/jest-dom': ^5.16.4
- '@testing-library/react': ^13.3.0
- '@types/jest': ^28.1.6
+overrides:
'@types/react': ^18.0.15
'@types/react-dom': ^18.0.6
- '@typescript-eslint/eslint-plugin': ^5.25.0
- '@typescript-eslint/parser': ^5.25.0
- '@vitejs/plugin-react': ^2.0.0
- autoprefixer: ^10.4.8
- babel-loader: ^8.2.5
- commitizen: ^4.2.4
- cz-conventional-changelog: 3.3.0
- eslint: ^8.15.0
- eslint-plugin-react: ^7.30.0
- eslint-plugin-react-hooks: ^4.5.0
- eslint-plugin-storybook: ^0.6.1
- grapheme-splitter: ^1.0.4
- jest: ^28.1.3
- jest-environment-jsdom: ^28.1.3
- postcss: ^8.4.16
- prettier: ^2.7.1
- prettier-plugin-tailwindcss: ^0.1.13
react: ^18.2.0
react-dom: ^18.2.0
- rimraf: ^3.0.2
- tailwindcss: ^3.1.8
- ts-jest: ^28.0.7
- typescript: ^4.7.4
vite: ^3.0.2
+ '@vitejs/plugin-react': ^2.0.0
+ typescript: ^4.7.4
-devDependencies:
- '@babel/core': 7.18.9
- '@microsoft/api-extractor': 7.28.4
- '@storybook/addon-actions': 6.5.9_react-dom@18.2.0+react@18.2.0
- '@storybook/addon-essentials': 6.5.9_e349558d9a13a36af50581153c3c53b7
- '@storybook/addon-interactions': 6.5.9_32c7a70df5dfb6a929c1e2ab819cb5cd
- '@storybook/addon-links': 6.5.9_react-dom@18.2.0+react@18.2.0
- '@storybook/builder-vite': 0.2.0_5dfbc0e77f28ccd1f3921ee9a145f3b6
- '@storybook/react': 6.5.9_e349558d9a13a36af50581153c3c53b7
- '@storybook/testing-library': 0.0.13_react-dom@18.2.0+react@18.2.0
- '@testing-library/jest-dom': 5.16.4
- '@testing-library/react': 13.3.0_react-dom@18.2.0+react@18.2.0
- '@types/jest': 28.1.6
- '@types/react': 18.0.15
- '@types/react-dom': 18.0.6
- '@typescript-eslint/eslint-plugin': 5.30.7_f59730a40ab520cf82d095906622871f
- '@typescript-eslint/parser': 5.30.7_eslint@8.20.0+typescript@4.7.4
- '@vitejs/plugin-react': 2.0.0_vite@3.0.2
- autoprefixer: 10.4.8_postcss@8.4.16
- babel-loader: 8.2.5_@babel+core@7.18.9
- commitizen: 4.2.5
- cz-conventional-changelog: 3.3.0
- eslint: 8.20.0
- eslint-plugin-react: 7.30.1_eslint@8.20.0
- eslint-plugin-react-hooks: 4.6.0_eslint@8.20.0
- eslint-plugin-storybook: 0.6.1_eslint@8.20.0+typescript@4.7.4
- grapheme-splitter: 1.0.4
- jest: 28.1.3
- jest-environment-jsdom: 28.1.3
- postcss: 8.4.16
- prettier: 2.7.1
- prettier-plugin-tailwindcss: 0.1.13_prettier@2.7.1
- react: 18.2.0
- react-dom: 18.2.0_react@18.2.0
- rimraf: 3.0.2
- tailwindcss: 3.1.8
- ts-jest: 28.0.7_8163232040de7c219af8f24f2e655fd4
- typescript: 4.7.4
- vite: 3.0.2
+importers:
+
+ .:
+ specifiers:
+ '@typescript-eslint/eslint-plugin': ^5.25.0
+ '@typescript-eslint/parser': ^5.25.0
+ commitizen: ^4.2.4
+ cz-conventional-changelog: 3.3.0
+ eslint: ^8.15.0
+ eslint-plugin-react: ^7.30.0
+ eslint-plugin-react-hooks: ^4.5.0
+ eslint-plugin-storybook: ^0.6.1
+ prettier: ^2.7.1
+ prettier-plugin-tailwindcss: ^0.1.13
+ typescript: ^4.7.4
+ devDependencies:
+ '@typescript-eslint/eslint-plugin': 5.30.7_f59730a40ab520cf82d095906622871f
+ '@typescript-eslint/parser': 5.30.7_eslint@8.20.0+typescript@4.7.4
+ commitizen: 4.2.5
+ cz-conventional-changelog: 3.3.0
+ eslint: 8.20.0
+ eslint-plugin-react: 7.30.1_eslint@8.20.0
+ eslint-plugin-react-hooks: 4.6.0_eslint@8.20.0
+ eslint-plugin-storybook: 0.6.1_eslint@8.20.0+typescript@4.7.4
+ prettier: 2.7.1
+ prettier-plugin-tailwindcss: 0.1.13_prettier@2.7.1
+ typescript: 4.7.4
+
+ packages/react-typist-component:
+ specifiers:
+ '@babel/core': ^7.18.5
+ '@microsoft/api-extractor': ^7.28.4
+ '@storybook/addon-actions': ^6.5.9
+ '@storybook/addon-essentials': ^6.5.9
+ '@storybook/addon-interactions': ^6.5.9
+ '@storybook/addon-links': ^6.5.9
+ '@storybook/builder-vite': ^0.2.0
+ '@storybook/react': ^6.5.9
+ '@storybook/testing-library': ^0.0.13
+ '@testing-library/jest-dom': ^5.16.4
+ '@testing-library/react': ^13.3.0
+ '@types/jest': ^28.1.6
+ '@types/react': ^18.0.15
+ '@types/react-dom': ^18.0.6
+ '@vitejs/plugin-react': ^2.0.0
+ autoprefixer: ^10.4.8
+ babel-loader: ^8.2.5
+ grapheme-splitter: ^1.0.4
+ jest: ^28.1.3
+ jest-environment-jsdom: ^28.1.3
+ postcss: ^8.4.16
+ react: ^18.2.0
+ react-dom: ^18.2.0
+ rimraf: ^3.0.2
+ tailwindcss: ^3.1.8
+ ts-jest: ^28.0.7
+ typescript: ^4.7.4
+ vite: ^3.0.2
+ devDependencies:
+ '@babel/core': 7.18.9
+ '@microsoft/api-extractor': 7.28.4
+ '@storybook/addon-actions': 6.5.9_react-dom@18.2.0+react@18.2.0
+ '@storybook/addon-essentials': 6.5.9_e349558d9a13a36af50581153c3c53b7
+ '@storybook/addon-interactions': 6.5.9_32c7a70df5dfb6a929c1e2ab819cb5cd
+ '@storybook/addon-links': 6.5.9_react-dom@18.2.0+react@18.2.0
+ '@storybook/builder-vite': 0.2.0_5dfbc0e77f28ccd1f3921ee9a145f3b6
+ '@storybook/react': 6.5.9_e349558d9a13a36af50581153c3c53b7
+ '@storybook/testing-library': 0.0.13_react-dom@18.2.0+react@18.2.0
+ '@testing-library/jest-dom': 5.16.4
+ '@testing-library/react': 13.3.0_react-dom@18.2.0+react@18.2.0
+ '@types/jest': 28.1.6
+ '@types/react': 18.0.15
+ '@types/react-dom': 18.0.6
+ '@vitejs/plugin-react': 2.0.0_vite@3.0.2
+ autoprefixer: 10.4.8_postcss@8.4.16
+ babel-loader: 8.2.5_@babel+core@7.18.9
+ grapheme-splitter: 1.0.4
+ jest: 28.1.3
+ jest-environment-jsdom: 28.1.3
+ postcss: 8.4.16
+ react: 18.2.0
+ react-dom: 18.2.0_react@18.2.0
+ rimraf: 3.0.2
+ tailwindcss: 3.1.8
+ ts-jest: 28.0.7_8163232040de7c219af8f24f2e655fd4
+ typescript: 4.7.4
+ vite: 3.0.2
packages:
@@ -2162,7 +2179,7 @@ packages:
resolve: 1.17.0
semver: 7.3.7
source-map: 0.6.1
- typescript: 4.6.4
+ typescript: 4.7.4
dev: true
/@microsoft/tsdoc-config/0.16.1:
@@ -13043,12 +13060,6 @@ packages:
resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==}
dev: true
- /typescript/4.6.4:
- resolution: {integrity: sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg==}
- engines: {node: '>=4.2.0'}
- hasBin: true
- dev: true
-
/typescript/4.7.4:
resolution: {integrity: sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==}
engines: {node: '>=4.2.0'}
diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml
new file mode 100644
index 0000000..18ec407
--- /dev/null
+++ b/pnpm-workspace.yaml
@@ -0,0 +1,2 @@
+packages:
+ - 'packages/*'
From dfb8ffb8e43e131638605d87124936fbe48a638e Mon Sep 17 00:00:00 2001
From: Xuan <97ssps30212@gmail.com>
Date: Sun, 18 Sep 2022 19:33:36 +0800
Subject: [PATCH 2/4] chore: remove api-extractor
---
package.json | 2 +-
.../react-typist-component/api-extractor.json | 46 ------
packages/react-typist-component/package.json | 10 +-
.../react-typist-component/tsconfig.lib.json | 3 +-
.../types/components/Backspace.d.ts | 6 -
.../types/components/Backspace.d.ts.map | 1 -
.../types/components/Delay.d.ts | 6 -
.../types/components/Delay.d.ts.map | 1 -
.../types/components/Main.d.ts | 5 -
.../types/components/Main.d.ts.map | 1 -
.../types/components/Paste.d.ts | 7 -
.../types/components/Paste.d.ts.map | 1 -
.../types/components/Typist.d.ts | 14 --
.../types/components/Typist.d.ts.map | 1 -
.../react-typist-component/types/index.d.ts | 5 -
.../types/index.d.ts.map | 1 -
.../types/types/TypistProps.d.ts | 20 ---
.../types/types/TypistProps.d.ts.map | 1 -
.../types/types/actions.d.ts | 19 ---
.../types/types/actions.d.ts.map | 1 -
.../types/utils/defaultFuncs.d.ts | 4 -
.../types/utils/defaultFuncs.d.ts.map | 1 -
.../types/utils/getActions.d.ts | 9 -
.../types/utils/getActions.d.ts.map | 1 -
.../types/utils/getTypedChildren.d.ts | 11 --
.../types/utils/getTypedChildren.d.ts.map | 1 -
.../types/utils/getTypedChildrenArray.d.ts | 4 -
.../utils/getTypedChildrenArray.d.ts.map | 1 -
.../types/utils/insertCursor.d.ts | 8 -
.../types/utils/insertCursor.d.ts.map | 1 -
.../types/utils/isNil.d.ts | 3 -
.../types/utils/isNil.d.ts.map | 1 -
pnpm-lock.yaml | 155 ------------------
33 files changed, 6 insertions(+), 345 deletions(-)
delete mode 100644 packages/react-typist-component/api-extractor.json
delete mode 100644 packages/react-typist-component/types/components/Backspace.d.ts
delete mode 100644 packages/react-typist-component/types/components/Backspace.d.ts.map
delete mode 100644 packages/react-typist-component/types/components/Delay.d.ts
delete mode 100644 packages/react-typist-component/types/components/Delay.d.ts.map
delete mode 100644 packages/react-typist-component/types/components/Main.d.ts
delete mode 100644 packages/react-typist-component/types/components/Main.d.ts.map
delete mode 100644 packages/react-typist-component/types/components/Paste.d.ts
delete mode 100644 packages/react-typist-component/types/components/Paste.d.ts.map
delete mode 100644 packages/react-typist-component/types/components/Typist.d.ts
delete mode 100644 packages/react-typist-component/types/components/Typist.d.ts.map
delete mode 100644 packages/react-typist-component/types/index.d.ts
delete mode 100644 packages/react-typist-component/types/index.d.ts.map
delete mode 100644 packages/react-typist-component/types/types/TypistProps.d.ts
delete mode 100644 packages/react-typist-component/types/types/TypistProps.d.ts.map
delete mode 100644 packages/react-typist-component/types/types/actions.d.ts
delete mode 100644 packages/react-typist-component/types/types/actions.d.ts.map
delete mode 100644 packages/react-typist-component/types/utils/defaultFuncs.d.ts
delete mode 100644 packages/react-typist-component/types/utils/defaultFuncs.d.ts.map
delete mode 100644 packages/react-typist-component/types/utils/getActions.d.ts
delete mode 100644 packages/react-typist-component/types/utils/getActions.d.ts.map
delete mode 100644 packages/react-typist-component/types/utils/getTypedChildren.d.ts
delete mode 100644 packages/react-typist-component/types/utils/getTypedChildren.d.ts.map
delete mode 100644 packages/react-typist-component/types/utils/getTypedChildrenArray.d.ts
delete mode 100644 packages/react-typist-component/types/utils/getTypedChildrenArray.d.ts.map
delete mode 100644 packages/react-typist-component/types/utils/insertCursor.d.ts
delete mode 100644 packages/react-typist-component/types/utils/insertCursor.d.ts.map
delete mode 100644 packages/react-typist-component/types/utils/isNil.d.ts
delete mode 100644 packages/react-typist-component/types/utils/isNil.d.ts.map
diff --git a/package.json b/package.json
index 2aeb493..5e76480 100644
--- a/package.json
+++ b/package.json
@@ -26,7 +26,7 @@
"preinstall": "npx only-allow pnpm",
"commit": "cz",
"test": "pnpm -r --filter ./packages/* run test",
- "build:lib": "pnpm -r --filter ./packages/* run build:lib",
+ "build:packages": "pnpm -r --filter ./packages/* run build:package",
"prepublishOnly": "pnpm build:lib"
},
"devDependencies": {
diff --git a/packages/react-typist-component/api-extractor.json b/packages/react-typist-component/api-extractor.json
deleted file mode 100644
index 4957661..0000000
--- a/packages/react-typist-component/api-extractor.json
+++ /dev/null
@@ -1,46 +0,0 @@
-{
- "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
-
- "mainEntryPointFilePath": "/types/index.d.ts",
-
- "bundledPackages": [],
-
- "compiler": {},
-
- "apiReport": {
- "enabled": false
- },
-
- "docModel": {
- "enabled": false
- },
-
- "dtsRollup": {
- "enabled": true
- },
-
- "tsdocMetadata": {
- "enabled": false
- },
-
- "messages": {
- "compilerMessageReporting": {
- "default": {
- "logLevel": "warning"
- }
- },
- "extractorMessageReporting": {
- "default": {
- "logLevel": "warning"
- },
- "ae-missing-release-tag": {
- "logLevel": "none"
- }
- },
- "tsdocMessageReporting": {
- "default": {
- "logLevel": "warning"
- }
- }
- }
-}
diff --git a/packages/react-typist-component/package.json b/packages/react-typist-component/package.json
index a973046..f2d24d8 100644
--- a/packages/react-typist-component/package.json
+++ b/packages/react-typist-component/package.json
@@ -21,7 +21,7 @@
"files": [
"dist"
],
- "types": "./dist/react-typist-component.d.ts",
+ "types": "./dist/types/index.d.ts",
"main": "./dist/react-typist-component.umd.js",
"module": "./dist/react-typist-component.mjs",
"exports": {
@@ -31,20 +31,18 @@
}
},
"scripts": {
- "preinstall": "npx only-allow pnpm",
"dev": "vite",
"test": "jest",
"build:website": "tsc && vite build",
- "build:types": "rimraf types/* && tsc --project tsconfig.lib.json",
- "build:lib": "pnpm build:types && vite build --mode lib && api-extractor run",
- "prepublishOnly": "pnpm build:lib",
+ "build:types": "tsc --project tsconfig.lib.json",
+ "build:package": "vite build --mode lib && pnpm build:types",
+ "prepublishOnly": "pnpm build:package",
"preview": "vite preview",
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook"
},
"devDependencies": {
"@babel/core": "^7.18.5",
- "@microsoft/api-extractor": "^7.28.4",
"@storybook/addon-actions": "^6.5.9",
"@storybook/addon-essentials": "^6.5.9",
"@storybook/addon-interactions": "^6.5.9",
diff --git a/packages/react-typist-component/tsconfig.lib.json b/packages/react-typist-component/tsconfig.lib.json
index 3e3161d..9c28887 100644
--- a/packages/react-typist-component/tsconfig.lib.json
+++ b/packages/react-typist-component/tsconfig.lib.json
@@ -15,8 +15,7 @@
"isolatedModules": true,
"jsx": "react-jsx",
"declaration": true,
- "declarationDir": "./types",
- "declarationMap": true,
+ "declarationDir": "./dist/types",
"emitDeclarationOnly": true
},
"include": ["src"],
diff --git a/packages/react-typist-component/types/components/Backspace.d.ts b/packages/react-typist-component/types/components/Backspace.d.ts
deleted file mode 100644
index 1cc3286..0000000
--- a/packages/react-typist-component/types/components/Backspace.d.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-declare type Props = {
- count: number;
-};
-declare const Backspace: (props: Props) => null;
-export default Backspace;
-//# sourceMappingURL=Backspace.d.ts.map
\ No newline at end of file
diff --git a/packages/react-typist-component/types/components/Backspace.d.ts.map b/packages/react-typist-component/types/components/Backspace.d.ts.map
deleted file mode 100644
index 9d1057e..0000000
--- a/packages/react-typist-component/types/components/Backspace.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"Backspace.d.ts","sourceRoot":"","sources":["../../src/components/Backspace.tsx"],"names":[],"mappings":"AACA,aAAK,KAAK,GAAG;IACX,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,QAAA,MAAM,SAAS,UAAW,KAAK,SAE9B,CAAC;AAEF,eAAe,SAAS,CAAC"}
\ No newline at end of file
diff --git a/packages/react-typist-component/types/components/Delay.d.ts b/packages/react-typist-component/types/components/Delay.d.ts
deleted file mode 100644
index 878882c..0000000
--- a/packages/react-typist-component/types/components/Delay.d.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-declare type Props = {
- ms: number;
-};
-declare const Delay: (props: Props) => null;
-export default Delay;
-//# sourceMappingURL=Delay.d.ts.map
\ No newline at end of file
diff --git a/packages/react-typist-component/types/components/Delay.d.ts.map b/packages/react-typist-component/types/components/Delay.d.ts.map
deleted file mode 100644
index 2331066..0000000
--- a/packages/react-typist-component/types/components/Delay.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"Delay.d.ts","sourceRoot":"","sources":["../../src/components/Delay.tsx"],"names":[],"mappings":"AACA,aAAK,KAAK,GAAG;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,QAAA,MAAM,KAAK,UAAW,KAAK,SAE1B,CAAC;AAEF,eAAe,KAAK,CAAC"}
\ No newline at end of file
diff --git a/packages/react-typist-component/types/components/Main.d.ts b/packages/react-typist-component/types/components/Main.d.ts
deleted file mode 100644
index ab35ad2..0000000
--- a/packages/react-typist-component/types/components/Main.d.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-///
-import type { TypistProps } from '../types/TypistProps';
-declare const Main: ({ cursor, disabled, restartKey, children, splitter, typingDelay, backspaceDelay, onTypingDone, startDelay, finishDelay, loop, pause, }: TypistProps) => JSX.Element;
-export default Main;
-//# sourceMappingURL=Main.d.ts.map
\ No newline at end of file
diff --git a/packages/react-typist-component/types/components/Main.d.ts.map b/packages/react-typist-component/types/components/Main.d.ts.map
deleted file mode 100644
index 91c888a..0000000
--- a/packages/react-typist-component/types/components/Main.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"Main.d.ts","sourceRoot":"","sources":["../../src/components/Main.tsx"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAwB,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAO9E,QAAA,MAAM,IAAI,2IAaP,WAAW,gBAwGb,CAAC;AAEF,eAAe,IAAI,CAAC"}
\ No newline at end of file
diff --git a/packages/react-typist-component/types/components/Paste.d.ts b/packages/react-typist-component/types/components/Paste.d.ts
deleted file mode 100644
index 6c3a803..0000000
--- a/packages/react-typist-component/types/components/Paste.d.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-import React from 'react';
-declare type Props = {
- children: React.ReactNode;
-};
-declare const Paste: ({ children }: Props) => JSX.Element;
-export default Paste;
-//# sourceMappingURL=Paste.d.ts.map
\ No newline at end of file
diff --git a/packages/react-typist-component/types/components/Paste.d.ts.map b/packages/react-typist-component/types/components/Paste.d.ts.map
deleted file mode 100644
index e50ba39..0000000
--- a/packages/react-typist-component/types/components/Paste.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"Paste.d.ts","sourceRoot":"","sources":["../../src/components/Paste.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,aAAK,KAAK,GAAG;IACX,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF,QAAA,MAAM,KAAK,iBAAkB,KAAK,gBAEjC,CAAC;AAEF,eAAe,KAAK,CAAC"}
\ No newline at end of file
diff --git a/packages/react-typist-component/types/components/Typist.d.ts b/packages/react-typist-component/types/components/Typist.d.ts
deleted file mode 100644
index 9745822..0000000
--- a/packages/react-typist-component/types/components/Typist.d.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-///
-declare const Typist: (({ cursor, disabled, restartKey, children, splitter, typingDelay, backspaceDelay, onTypingDone, startDelay, finishDelay, loop, pause, }: import("..").TypistProps) => JSX.Element) & {
- Delay: (props: {
- ms: number;
- }) => null;
- Backspace: (props: {
- count: number;
- }) => null;
- Paste: ({ children }: {
- children: import("react").ReactNode;
- }) => JSX.Element;
-};
-export default Typist;
-//# sourceMappingURL=Typist.d.ts.map
\ No newline at end of file
diff --git a/packages/react-typist-component/types/components/Typist.d.ts.map b/packages/react-typist-component/types/components/Typist.d.ts.map
deleted file mode 100644
index f64b2b0..0000000
--- a/packages/react-typist-component/types/components/Typist.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"Typist.d.ts","sourceRoot":"","sources":["../../src/components/Typist.ts"],"names":[],"mappings":";AAKA,QAAA,MAAM,MAAM;;;;;;;;;;CAAmD,CAAC;AAEhE,eAAe,MAAM,CAAC"}
\ No newline at end of file
diff --git a/packages/react-typist-component/types/index.d.ts b/packages/react-typist-component/types/index.d.ts
deleted file mode 100644
index 228e220..0000000
--- a/packages/react-typist-component/types/index.d.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import type { TypistProps, Splitter, Delay } from './types/TypistProps';
-import Typist from './components/Typist';
-export default Typist;
-export type { TypistProps, Splitter, Delay };
-//# sourceMappingURL=index.d.ts.map
\ No newline at end of file
diff --git a/packages/react-typist-component/types/index.d.ts.map b/packages/react-typist-component/types/index.d.ts.map
deleted file mode 100644
index 713b41b..0000000
--- a/packages/react-typist-component/types/index.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACxE,OAAO,MAAM,MAAM,qBAAqB,CAAC;AAEzC,eAAe,MAAM,CAAC;AACtB,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC"}
\ No newline at end of file
diff --git a/packages/react-typist-component/types/types/TypistProps.d.ts b/packages/react-typist-component/types/types/TypistProps.d.ts
deleted file mode 100644
index 397c77c..0000000
--- a/packages/react-typist-component/types/types/TypistProps.d.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-///
-export declare type TypedChildren = (string | React.ReactElement)[] | null | undefined;
-export declare type TypedLines = (string | React.ReactElement | null)[];
-export declare type Delay = number | (() => number);
-export declare type Splitter = (str: string) => string[];
-export declare type TypistProps = {
- children: React.ReactNode;
- typingDelay?: Delay;
- backspaceDelay?: Delay;
- loop?: boolean;
- pause?: boolean;
- startDelay?: number;
- finishDelay?: number;
- onTypingDone?: () => void;
- splitter?: Splitter;
- cursor?: string | React.ReactElement;
- disabled?: boolean;
- restartKey?: any;
-};
-//# sourceMappingURL=TypistProps.d.ts.map
\ No newline at end of file
diff --git a/packages/react-typist-component/types/types/TypistProps.d.ts.map b/packages/react-typist-component/types/types/TypistProps.d.ts.map
deleted file mode 100644
index 930888d..0000000
--- a/packages/react-typist-component/types/types/TypistProps.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"TypistProps.d.ts","sourceRoot":"","sources":["../../src/types/TypistProps.ts"],"names":[],"mappings":";AAAA,oBAAY,aAAa,GAAG,CAAC,MAAM,GAAG,KAAK,CAAC,YAAY,CAAC,EAAE,GAAG,IAAI,GAAG,SAAS,CAAC;AAC/E,oBAAY,UAAU,GAAG,CAAC,MAAM,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC,EAAE,CAAC;AAChE,oBAAY,KAAK,GAAG,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,CAAC;AAC5C,oBAAY,QAAQ,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,EAAE,CAAC;AAEjD,oBAAY,WAAW,GAAG;IACxB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,WAAW,CAAC,EAAE,KAAK,CAAC;IACpB,cAAc,CAAC,EAAE,KAAK,CAAC;IACvB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,YAAY,CAAC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,GAAG,CAAC;CAClB,CAAC"}
\ No newline at end of file
diff --git a/packages/react-typist-component/types/types/actions.d.ts b/packages/react-typist-component/types/types/actions.d.ts
deleted file mode 100644
index 9bf493b..0000000
--- a/packages/react-typist-component/types/types/actions.d.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import type { ReactElement } from 'react';
-export declare type TypeTokenAction = {
- type: 'TYPE_TOKEN';
- payload: string | ReactElement;
-};
-export declare type BackspaceAction = {
- type: 'BACKSPACE';
- payload: number;
-};
-export declare type DelayAction = {
- type: 'DELAY';
- payload: number;
-};
-export declare type PasteAction = {
- type: 'PASTE';
- payload: string | ReactElement;
-};
-export declare type Action = TypeTokenAction | BackspaceAction | DelayAction | PasteAction;
-//# sourceMappingURL=actions.d.ts.map
\ No newline at end of file
diff --git a/packages/react-typist-component/types/types/actions.d.ts.map b/packages/react-typist-component/types/types/actions.d.ts.map
deleted file mode 100644
index 6804b48..0000000
--- a/packages/react-typist-component/types/types/actions.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/types/actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,oBAAY,eAAe,GAAG;IAC5B,IAAI,EAAE,YAAY,CAAC;IACnB,OAAO,EAAE,MAAM,GAAG,YAAY,CAAC;CAChC,CAAC;AACF,oBAAY,eAAe,GAAG;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AACrE,oBAAY,WAAW,GAAG;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAC7D,oBAAY,WAAW,GAAG;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,GAAG,YAAY,CAAA;CAAE,CAAC;AAC5E,oBAAY,MAAM,GAAG,eAAe,GAAG,eAAe,GAAG,WAAW,GAAG,WAAW,CAAC"}
\ No newline at end of file
diff --git a/packages/react-typist-component/types/utils/defaultFuncs.d.ts b/packages/react-typist-component/types/utils/defaultFuncs.d.ts
deleted file mode 100644
index 3eb3953..0000000
--- a/packages/react-typist-component/types/utils/defaultFuncs.d.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-declare const emptyFunc: () => void;
-declare const defaultSplitter: (str: string) => string[];
-export { emptyFunc, defaultSplitter };
-//# sourceMappingURL=defaultFuncs.d.ts.map
\ No newline at end of file
diff --git a/packages/react-typist-component/types/utils/defaultFuncs.d.ts.map b/packages/react-typist-component/types/utils/defaultFuncs.d.ts.map
deleted file mode 100644
index 716f6b3..0000000
--- a/packages/react-typist-component/types/utils/defaultFuncs.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"defaultFuncs.d.ts","sourceRoot":"","sources":["../../src/utils/defaultFuncs.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,SAAS,YAEd,CAAC;AAEF,QAAA,MAAM,eAAe,QAAS,MAAM,aAAkB,CAAC;AAEvD,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC"}
\ No newline at end of file
diff --git a/packages/react-typist-component/types/utils/getActions.d.ts b/packages/react-typist-component/types/utils/getActions.d.ts
deleted file mode 100644
index 0d01270..0000000
--- a/packages/react-typist-component/types/utils/getActions.d.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-import type { Action } from '../types/actions';
-import type { Splitter } from '../types/TypistProps';
-/**
- * Returns an actions array generated from ReactNode.
- * `Main` component will use these actions to determine what it should do.
- */
-declare const getActions: (node: React.ReactNode, splitter: Splitter) => Action[];
-export default getActions;
-//# sourceMappingURL=getActions.d.ts.map
\ No newline at end of file
diff --git a/packages/react-typist-component/types/utils/getActions.d.ts.map b/packages/react-typist-component/types/utils/getActions.d.ts.map
deleted file mode 100644
index f9d6810..0000000
--- a/packages/react-typist-component/types/utils/getActions.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"getActions.d.ts","sourceRoot":"","sources":["../../src/utils/getActions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,MAAM,EAKP,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAqBrD;;;GAGG;AACH,QAAA,MAAM,UAAU,SAAU,MAAM,SAAS,YAAY,QAAQ,aAgE5D,CAAC;AAEF,eAAe,UAAU,CAAC"}
\ No newline at end of file
diff --git a/packages/react-typist-component/types/utils/getTypedChildren.d.ts b/packages/react-typist-component/types/utils/getTypedChildren.d.ts
deleted file mode 100644
index 4667e0f..0000000
--- a/packages/react-typist-component/types/utils/getTypedChildren.d.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import React from 'react';
-import type { TypedChildren } from '../types/TypistProps';
-/**
- * Determine whether to display contents by looking up the `lines` variable.
- * @param children
- * @param lines
- * @returns
- */
-declare const getTypedChildren: (children: React.ReactNode, lines: (string | React.ReactElement | null)[]) => TypedChildren;
-export default getTypedChildren;
-//# sourceMappingURL=getTypedChildren.d.ts.map
\ No newline at end of file
diff --git a/packages/react-typist-component/types/utils/getTypedChildren.d.ts.map b/packages/react-typist-component/types/utils/getTypedChildren.d.ts.map
deleted file mode 100644
index 8e00e0f..0000000
--- a/packages/react-typist-component/types/utils/getTypedChildren.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"getTypedChildren.d.ts","sourceRoot":"","sources":["../../src/utils/getTypedChildren.ts"],"names":[],"mappings":"AAAA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAItE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAG1D;;;;;GAKG;AACH,QAAA,MAAM,gBAAgB,aACV,MAAM,SAAS,SAClB,CAAC,MAAM,GAAG,MAAM,YAAY,GAAG,IAAI,CAAC,EAAE,kBAoC9C,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
\ No newline at end of file
diff --git a/packages/react-typist-component/types/utils/getTypedChildrenArray.d.ts b/packages/react-typist-component/types/utils/getTypedChildrenArray.d.ts
deleted file mode 100644
index 554e8b2..0000000
--- a/packages/react-typist-component/types/utils/getTypedChildrenArray.d.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-import type { ReactNode } from 'react';
-import type { Splitter } from '../types/TypistProps';
-export default function getTypedChildrenArray(children: ReactNode, splitter: Splitter): import("../types/TypistProps").TypedChildren[];
-//# sourceMappingURL=getTypedChildrenArray.d.ts.map
\ No newline at end of file
diff --git a/packages/react-typist-component/types/utils/getTypedChildrenArray.d.ts.map b/packages/react-typist-component/types/utils/getTypedChildrenArray.d.ts.map
deleted file mode 100644
index 777e72c..0000000
--- a/packages/react-typist-component/types/utils/getTypedChildrenArray.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"getTypedChildrenArray.d.ts","sourceRoot":"","sources":["../../src/utils/getTypedChildrenArray.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,QAAQ,EAAc,MAAM,sBAAsB,CAAC;AAOjE,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,kDA6EpF"}
\ No newline at end of file
diff --git a/packages/react-typist-component/types/utils/insertCursor.d.ts b/packages/react-typist-component/types/utils/insertCursor.d.ts
deleted file mode 100644
index 861362b..0000000
--- a/packages/react-typist-component/types/utils/insertCursor.d.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-import React from 'react';
-import type { TypedChildren } from '../types/TypistProps';
-/**
- * Insert the cursor after the latest typed character.
- */
-declare const insertCursor: (typedChildren: TypedChildren, cursor: string | React.ReactElement) => TypedChildren;
-export default insertCursor;
-//# sourceMappingURL=insertCursor.d.ts.map
\ No newline at end of file
diff --git a/packages/react-typist-component/types/utils/insertCursor.d.ts.map b/packages/react-typist-component/types/utils/insertCursor.d.ts.map
deleted file mode 100644
index 4d117ec..0000000
--- a/packages/react-typist-component/types/utils/insertCursor.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"insertCursor.d.ts","sourceRoot":"","sources":["../../src/utils/insertCursor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAG1D;;GAEG;AACH,QAAA,MAAM,YAAY,kBACD,aAAa,UACpB,MAAM,GAAG,MAAM,YAAY,KAClC,aA0BF,CAAC;AAEF,eAAe,YAAY,CAAC"}
\ No newline at end of file
diff --git a/packages/react-typist-component/types/utils/isNil.d.ts b/packages/react-typist-component/types/utils/isNil.d.ts
deleted file mode 100644
index 1f049cc..0000000
--- a/packages/react-typist-component/types/utils/isNil.d.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-declare const isNil: (value: any) => value is null | undefined;
-export default isNil;
-//# sourceMappingURL=isNil.d.ts.map
\ No newline at end of file
diff --git a/packages/react-typist-component/types/utils/isNil.d.ts.map b/packages/react-typist-component/types/utils/isNil.d.ts.map
deleted file mode 100644
index 4528cc5..0000000
--- a/packages/react-typist-component/types/utils/isNil.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"isNil.d.ts","sourceRoot":"","sources":["../../src/utils/isNil.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,KAAK,UAAW,GAAG,8BAA6C,CAAC;AAEvE,eAAe,KAAK,CAAC"}
\ No newline at end of file
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 23a9017..1378b6c 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -40,7 +40,6 @@ importers:
packages/react-typist-component:
specifiers:
'@babel/core': ^7.18.5
- '@microsoft/api-extractor': ^7.28.4
'@storybook/addon-actions': ^6.5.9
'@storybook/addon-essentials': ^6.5.9
'@storybook/addon-interactions': ^6.5.9
@@ -69,7 +68,6 @@ importers:
vite: ^3.0.2
devDependencies:
'@babel/core': 7.18.9
- '@microsoft/api-extractor': 7.28.4
'@storybook/addon-actions': 6.5.9_react-dom@18.2.0+react@18.2.0
'@storybook/addon-essentials': 6.5.9_e349558d9a13a36af50581153c3c53b7
'@storybook/addon-interactions': 6.5.9_32c7a70df5dfb6a929c1e2ab819cb5cd
@@ -2156,45 +2154,6 @@ packages:
resolution: {integrity: sha512-H1rQc1ZOHANWBvPcW+JpGwr+juXSxM8Q8YCkm3GhZd8REu1fHR3z99CErO1p9pkcfcxZnMdIZdIsXkOHY0NilA==}
dev: true
- /@microsoft/api-extractor-model/7.21.0:
- resolution: {integrity: sha512-NN4mXzoQWTuzznIcnLWeV6tGyn6Os9frDK6M/mmTXZ73vUYOvSWoKQ5SYzyzP7HF3YtvTmr1Rs+DsBb0HRx7WQ==}
- dependencies:
- '@microsoft/tsdoc': 0.14.1
- '@microsoft/tsdoc-config': 0.16.1
- '@rushstack/node-core-library': 3.49.0
- dev: true
-
- /@microsoft/api-extractor/7.28.4:
- resolution: {integrity: sha512-7JeROBGYTUt4/4HPnpMscsQgLzX0OfGTQR2qOQzzh3kdkMyxmiv2mzpuhoMnwbubb1GvPcyFm+NguoqOqkCVaw==}
- hasBin: true
- dependencies:
- '@microsoft/api-extractor-model': 7.21.0
- '@microsoft/tsdoc': 0.14.1
- '@microsoft/tsdoc-config': 0.16.1
- '@rushstack/node-core-library': 3.49.0
- '@rushstack/rig-package': 0.3.13
- '@rushstack/ts-command-line': 4.12.1
- colors: 1.2.5
- lodash: 4.17.21
- resolve: 1.17.0
- semver: 7.3.7
- source-map: 0.6.1
- typescript: 4.7.4
- dev: true
-
- /@microsoft/tsdoc-config/0.16.1:
- resolution: {integrity: sha512-2RqkwiD4uN6MLnHFljqBlZIXlt/SaUT6cuogU1w2ARw4nKuuppSmR0+s+NC+7kXBQykd9zzu0P4HtBpZT5zBpQ==}
- dependencies:
- '@microsoft/tsdoc': 0.14.1
- ajv: 6.12.6
- jju: 1.4.0
- resolve: 1.19.0
- dev: true
-
- /@microsoft/tsdoc/0.14.1:
- resolution: {integrity: sha512-6Wci+Tp3CgPt/B9B0a3J4s3yMgLNSku6w5TV6mN+61C71UqsRBv2FUibBf3tPGlNxebgPHMEUzKpb1ggE8KCKw==}
- dev: true
-
/@mrmlnc/readdir-enhanced/2.2.1:
resolution: {integrity: sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==}
engines: {node: '>=4'}
@@ -2283,36 +2242,6 @@ packages:
webpack: 5.73.0
dev: true
- /@rushstack/node-core-library/3.49.0:
- resolution: {integrity: sha512-yBJRzGgUNFwulVrwwBARhbGaHsxVMjsZ9JwU1uSBbqPYCdac+t2HYdzi4f4q/Zpgb0eNbwYj2yxgHYpJORNEaw==}
- dependencies:
- '@types/node': 12.20.24
- colors: 1.2.5
- fs-extra: 7.0.1
- import-lazy: 4.0.0
- jju: 1.4.0
- resolve: 1.17.0
- semver: 7.3.7
- timsort: 0.3.0
- z-schema: 5.0.3
- dev: true
-
- /@rushstack/rig-package/0.3.13:
- resolution: {integrity: sha512-4/2+yyA/uDl7LQvtYtFs1AkhSWuaIGEKhP9/KK2nNARqOVc5eCXmu1vyOqr5mPvNq7sHoIR+sG84vFbaKYGaDA==}
- dependencies:
- resolve: 1.17.0
- strip-json-comments: 3.1.1
- dev: true
-
- /@rushstack/ts-command-line/4.12.1:
- resolution: {integrity: sha512-S1Nev6h/kNnamhHeGdp30WgxZTA+B76SJ/P721ctP7DrnC+rrjAc6h/R80I4V0cA2QuEEcMdVOQCtK2BTjsOiQ==}
- dependencies:
- '@types/argparse': 1.0.38
- argparse: 1.0.10
- colors: 1.2.5
- string-argv: 0.3.1
- dev: true
-
/@sinclair/typebox/0.24.20:
resolution: {integrity: sha512-kVaO5aEFZb33nPMTZBxiPEkY+slxiPtqC7QX8f9B3eGOMBvEfuMfxp9DSTTCsRJPumPKjrge4yagyssO4q6qzQ==}
dev: true
@@ -3761,10 +3690,6 @@ packages:
dev: true
optional: true
- /@types/argparse/1.0.38:
- resolution: {integrity: sha512-ebDJ9b0e702Yr7pWgB0jzm+CX4Srzz8RcXtLJDJB+BSccqMa36uyH/zUsSYao5+BD1ytv3k3rPYCq4mAE1hsXA==}
- dev: true
-
/@types/aria-query/4.2.2:
resolution: {integrity: sha512-HnYpAE1Y6kRyKM/XkEuiRQhTHvkzMBurTHnpFLYLBGPIylZNPs9jJcuOOYWxPLJCSEtmZT0Y8rHDokKN7rRTig==}
dev: true
@@ -3903,10 +3828,6 @@ packages:
form-data: 3.0.1
dev: true
- /@types/node/12.20.24:
- resolution: {integrity: sha512-yxDeaQIAJlMav7fH5AQqPH1u8YIuhYJXYBzxaQ4PifsU0GDO38MSdmEDeRlIxrKbC6NbEaaEHDanWb+y30U8SQ==}
- dev: true
-
/@types/node/16.11.45:
resolution: {integrity: sha512-3rKg/L5x0rofKuuUt5zlXzOnKyIHXmIu5R8A0TuNDMF2062/AOIDBciFIjToLEJ/9F9DzkHNot+BpNsMI1OLdQ==}
dev: true
@@ -5789,11 +5710,6 @@ packages:
hasBin: true
dev: true
- /colors/1.2.5:
- resolution: {integrity: sha512-erNRLao/Y3Fv54qUa0LBB+//Uf3YwMUmdJinN20yMXm9zdKKqH9wt7R9IIVZ+K7ShzfpLV/Zg8+VyrBJYB4lpg==}
- engines: {node: '>=0.1.90'}
- dev: true
-
/combined-stream/1.0.8:
resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==}
engines: {node: '>= 0.8'}
@@ -7722,15 +7638,6 @@ packages:
universalify: 2.0.0
dev: true
- /fs-extra/7.0.1:
- resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==}
- engines: {node: '>=6 <7 || >=8'}
- dependencies:
- graceful-fs: 4.2.10
- jsonfile: 4.0.0
- universalify: 0.1.2
- dev: true
-
/fs-extra/9.1.0:
resolution: {integrity: sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==}
engines: {node: '>=10'}
@@ -8390,11 +8297,6 @@ packages:
resolve-from: 4.0.0
dev: true
- /import-lazy/4.0.0:
- resolution: {integrity: sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==}
- engines: {node: '>=8'}
- dev: true
-
/import-local/3.1.0:
resolution: {integrity: sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==}
engines: {node: '>=8'}
@@ -9484,10 +9386,6 @@ packages:
- ts-node
dev: true
- /jju/1.4.0:
- resolution: {integrity: sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==}
- dev: true
-
/js-string-escape/1.0.1:
resolution: {integrity: sha512-Smw4xcfIQ5LVjAOuJCvN/zIodzA/BBSsluuoSykP+lUvScIi4U6RJLfwHet5cxFnCswUjISV8oAXaqaJDY3chg==}
engines: {node: '>= 0.8'}
@@ -9599,12 +9497,6 @@ packages:
hasBin: true
dev: true
- /jsonfile/4.0.0:
- resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==}
- optionalDependencies:
- graceful-fs: 4.2.10
- dev: true
-
/jsonfile/6.1.0:
resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==}
dependencies:
@@ -9767,14 +9659,6 @@ packages:
resolution: {integrity: sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==}
dev: true
- /lodash.get/4.4.2:
- resolution: {integrity: sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==}
- dev: true
-
- /lodash.isequal/4.5.0:
- resolution: {integrity: sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==}
- dev: true
-
/lodash.map/4.6.0:
resolution: {integrity: sha512-worNHGKLDetmcEYDvh2stPCrrQRkP20E4l0iIS7F8EvzMqBBi7ltvFN5m1HvTf1P7Jk1txKhvFcmYsCr8O2F1Q==}
dev: true
@@ -11820,19 +11704,6 @@ packages:
engines: {node: '>=10'}
dev: true
- /resolve/1.17.0:
- resolution: {integrity: sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==}
- dependencies:
- path-parse: 1.0.7
- dev: true
-
- /resolve/1.19.0:
- resolution: {integrity: sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==}
- dependencies:
- is-core-module: 2.9.0
- path-parse: 1.0.7
- dev: true
-
/resolve/1.22.1:
resolution: {integrity: sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==}
hasBin: true
@@ -12393,11 +12264,6 @@ packages:
resolution: {integrity: sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==}
dev: true
- /string-argv/0.3.1:
- resolution: {integrity: sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==}
- engines: {node: '>=0.6.19'}
- dev: true
-
/string-length/4.0.2:
resolution: {integrity: sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==}
engines: {node: '>=10'}
@@ -12799,10 +12665,6 @@ packages:
setimmediate: 1.0.5
dev: true
- /timsort/0.3.0:
- resolution: {integrity: sha512-qsdtZH+vMoCARQtyod4imc2nIJwg9Cc7lPRrw9CzF8ZKR0khdr8+2nX80PBhET3tcyTtJDxAffGh2rXH4tyU8A==}
- dev: true
-
/tmp/0.0.33:
resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==}
engines: {node: '>=0.6.0'}
@@ -13355,11 +13217,6 @@ packages:
spdx-expression-parse: 3.0.1
dev: true
- /validator/13.7.0:
- resolution: {integrity: sha512-nYXQLCBkpJ8X6ltALua9dRrZDHVYxjJ1wgskNt1lH9fzGjs3tgojGSCBjmEPwkWS1y29+DrizMTW19Pr9uB2nw==}
- engines: {node: '>= 0.10'}
- dev: true
-
/vary/1.1.2:
resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==}
engines: {node: '>= 0.8'}
@@ -13843,18 +13700,6 @@ packages:
engines: {node: '>=10'}
dev: true
- /z-schema/5.0.3:
- resolution: {integrity: sha512-sGvEcBOTNum68x9jCpCVGPFJ6mWnkD0YxOcddDlJHRx3tKdB2q8pCHExMVZo/AV/6geuVJXG7hljDaWG8+5GDw==}
- engines: {node: '>=8.0.0'}
- hasBin: true
- dependencies:
- lodash.get: 4.4.2
- lodash.isequal: 4.5.0
- validator: 13.7.0
- optionalDependencies:
- commander: 2.20.3
- dev: true
-
/zwitch/1.0.5:
resolution: {integrity: sha512-V50KMwwzqJV0NpZIZFwfOD5/lyny3WlSzRiXgA0G7VUnRlqttta1L6UQIHzd6EuBY/cHGfwTIck7w1yH6Q5zUw==}
dev: true
From bd70f0dc7d34abf1683f1340ce2b59daae454b7f Mon Sep 17 00:00:00 2001
From: Xuan <97ssps30212@gmail.com>
Date: Sun, 18 Sep 2022 19:54:54 +0800
Subject: [PATCH 3/4] chore: publish react-typist-component@1.0.5
---
.npmrc | 1 +
README.md | 194 +------------------
package.json | 1 -
packages/react-typist-component/README.md | 193 ++++++++++++++++++
packages/react-typist-component/package.json | 2 +-
5 files changed, 197 insertions(+), 194 deletions(-)
create mode 100644 .npmrc
create mode 100644 packages/react-typist-component/README.md
diff --git a/.npmrc b/.npmrc
new file mode 100644
index 0000000..125f6d0
--- /dev/null
+++ b/.npmrc
@@ -0,0 +1 @@
+git-checks=false
\ No newline at end of file
diff --git a/README.md b/README.md
index 8ca42ce..6da5606 100644
--- a/README.md
+++ b/README.md
@@ -1,193 +1,3 @@
-# React Typist Component
+# React Components Monorepo
-Create typewriter effect by setting up a component's children directly.
-
-## Install
-
-```bash
-npm install react-typist-component
-# or
-yarn add react-typist-component
-```
-
-## Example
-
-```jsx
-import Typist from 'react-typist-component';
-
-const MyComponent = () => {
- return (
- |}>
- This is a typo
-
-
-
- react component
-
-
-
-
- );
-};
-```
-
-## API reference
-
-### `Typist`
-
-```ts
-export type Delay = number | (() => number);
-export type Splitter = (str: string) => string[];
-export type TypistProps = {
- children: React.ReactNode;
- typingDelay?: Delay;
- backspaceDelay?: Delay;
- loop?: boolean;
- pause?: boolean;
- startDelay?: number;
- finishDelay?: number;
- onTypingDone?: () => void;
- splitter?: Splitter;
- cursor?: string | React.ReactElement;
- disabled?: boolean;
- restartKey?: any;
-};
-```
-
-#### `children`
-
-The contents that will be rendered with typewriter effect. It accepts nested elements, so you can easily style your contents.
-
-Note that `Typist` treats the element whose children is `null` or `undefined` as a single token. For example:
-
-```jsx
-const Foo = () => {
- return Foo
;
-};
-
-// The text "Foo" will be displayed after "123" immediately instead of displayed seperately
-const App = () => {
- return (
-
- 123
-
-
- );
-};
-```
-
-#### `typingDelay`
-
-**Default**: `75`
-
-The delay after typing a token. If you pass in a function, `Typist` will call the function after typing a token and use the return value as the delay.
-
-#### `backspaceDelay`
-
-**Default**: `typingDelay`
-
-The delay after backspacing a token. If you pass in a function, `Typist` will call the function after backspacing a token and use the return value as the delay.
-
-#### `loop`
-
-**Default**: `false`
-
-`Typist` will automatically restart the typing animation if this value is `true`.
-
-#### `pause`
-
-**Default**: `false`
-
-Set to `true` if you want to pause the typing animation.
-
-#### `startDelay`
-
-**Default**: `0`
-
-`Typist` will wait for this delay before starting the typing animation.
-
-#### `finishDelay`
-
-**Default**: `0`
-
-`Typist` will wait for this delay after finishing the typing animation.
-
-#### `onTypingDone`
-
-This function will be called when the typing animation finishes. It will be called before waiting for the timeout with `finishDelay`.
-
-#### `splitter`
-
-**Default**: `(str: string) => str.split('')`
-
-`Typist` will use this function to get tokens from strings. It may be useful when you want to split your string in different way. For example, you can use [grapheme-splitter](https://github.com/orling/grapheme-splitter) to split string if your string contains emoji.
-
-```tsx
-import GraphemeSplitter from 'grapheme-splitter';
-
-const splitter = (str: string) => {
- return new GraphemeSplitter().splitGraphemes(str);
-};
-
-const App = () => {
- return (
-
- ๐๐๐ฅตโ ๐๐โ๐จโ๐จโ๐งโ๐ฆ๐๐ก๐๐๐๐๐๐
-
-
- );
-};
-```
-
-#### `cursor`
-
-Will be inserted after the last typed token.
-
-#### `disabled`
-
-**Default**: `false`
-
-If this value is `true`, the result will be displayed immediately without typing animation. It can be useful when you want to display the final result if a user has visited the typing animation.
-
-#### `restartKey`
-
-`Typist` will restart the typing animation whenever `restartKey` changes.
-
-### `Typist.Backspace`
-
-```ts
-type Props = {
- count: number;
-};
-```
-
-#### `count`
-
-The number of tokens that will be backspaced.
-
-### `Typist.Delay`
-
-```ts
-type Props = {
- ms: number;
-};
-```
-
-#### `ms`
-
-The duration of the delay in milliseconds.
-
-### `Typist.Paste`
-
-```ts
-type Props = {
- children: React.ReactNode;
-};
-```
-
-#### `children`
-
-Children inside this component will be pasted without typewriter effect. Do not wrap another `Paste` inside this component, otherwise `Typist` will produce weird behavior.
+- [react-typist-component](./packages/react-typist-component/README.md)
diff --git a/package.json b/package.json
index 5e76480..d4cfd45 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,5 @@
{
"name": "react-components-monorepo",
- "version": "1.0.4",
"author": "Yu-Xuan Zheng",
"keywords": [
"react components"
diff --git a/packages/react-typist-component/README.md b/packages/react-typist-component/README.md
new file mode 100644
index 0000000..8ca42ce
--- /dev/null
+++ b/packages/react-typist-component/README.md
@@ -0,0 +1,193 @@
+# React Typist Component
+
+Create typewriter effect by setting up a component's children directly.
+
+## Install
+
+```bash
+npm install react-typist-component
+# or
+yarn add react-typist-component
+```
+
+## Example
+
+```jsx
+import Typist from 'react-typist-component';
+
+const MyComponent = () => {
+ return (
+ |}>
+ This is a typo
+
+
+
+ react component
+
+
+
+
+ );
+};
+```
+
+## API reference
+
+### `Typist`
+
+```ts
+export type Delay = number | (() => number);
+export type Splitter = (str: string) => string[];
+export type TypistProps = {
+ children: React.ReactNode;
+ typingDelay?: Delay;
+ backspaceDelay?: Delay;
+ loop?: boolean;
+ pause?: boolean;
+ startDelay?: number;
+ finishDelay?: number;
+ onTypingDone?: () => void;
+ splitter?: Splitter;
+ cursor?: string | React.ReactElement;
+ disabled?: boolean;
+ restartKey?: any;
+};
+```
+
+#### `children`
+
+The contents that will be rendered with typewriter effect. It accepts nested elements, so you can easily style your contents.
+
+Note that `Typist` treats the element whose children is `null` or `undefined` as a single token. For example:
+
+```jsx
+const Foo = () => {
+ return Foo
;
+};
+
+// The text "Foo" will be displayed after "123" immediately instead of displayed seperately
+const App = () => {
+ return (
+
+ 123
+
+
+ );
+};
+```
+
+#### `typingDelay`
+
+**Default**: `75`
+
+The delay after typing a token. If you pass in a function, `Typist` will call the function after typing a token and use the return value as the delay.
+
+#### `backspaceDelay`
+
+**Default**: `typingDelay`
+
+The delay after backspacing a token. If you pass in a function, `Typist` will call the function after backspacing a token and use the return value as the delay.
+
+#### `loop`
+
+**Default**: `false`
+
+`Typist` will automatically restart the typing animation if this value is `true`.
+
+#### `pause`
+
+**Default**: `false`
+
+Set to `true` if you want to pause the typing animation.
+
+#### `startDelay`
+
+**Default**: `0`
+
+`Typist` will wait for this delay before starting the typing animation.
+
+#### `finishDelay`
+
+**Default**: `0`
+
+`Typist` will wait for this delay after finishing the typing animation.
+
+#### `onTypingDone`
+
+This function will be called when the typing animation finishes. It will be called before waiting for the timeout with `finishDelay`.
+
+#### `splitter`
+
+**Default**: `(str: string) => str.split('')`
+
+`Typist` will use this function to get tokens from strings. It may be useful when you want to split your string in different way. For example, you can use [grapheme-splitter](https://github.com/orling/grapheme-splitter) to split string if your string contains emoji.
+
+```tsx
+import GraphemeSplitter from 'grapheme-splitter';
+
+const splitter = (str: string) => {
+ return new GraphemeSplitter().splitGraphemes(str);
+};
+
+const App = () => {
+ return (
+
+ ๐๐๐ฅตโ ๐๐โ๐จโ๐จโ๐งโ๐ฆ๐๐ก๐๐๐๐๐๐
+
+
+ );
+};
+```
+
+#### `cursor`
+
+Will be inserted after the last typed token.
+
+#### `disabled`
+
+**Default**: `false`
+
+If this value is `true`, the result will be displayed immediately without typing animation. It can be useful when you want to display the final result if a user has visited the typing animation.
+
+#### `restartKey`
+
+`Typist` will restart the typing animation whenever `restartKey` changes.
+
+### `Typist.Backspace`
+
+```ts
+type Props = {
+ count: number;
+};
+```
+
+#### `count`
+
+The number of tokens that will be backspaced.
+
+### `Typist.Delay`
+
+```ts
+type Props = {
+ ms: number;
+};
+```
+
+#### `ms`
+
+The duration of the delay in milliseconds.
+
+### `Typist.Paste`
+
+```ts
+type Props = {
+ children: React.ReactNode;
+};
+```
+
+#### `children`
+
+Children inside this component will be pasted without typewriter effect. Do not wrap another `Paste` inside this component, otherwise `Typist` will produce weird behavior.
diff --git a/packages/react-typist-component/package.json b/packages/react-typist-component/package.json
index f2d24d8..f27d666 100644
--- a/packages/react-typist-component/package.json
+++ b/packages/react-typist-component/package.json
@@ -1,6 +1,6 @@
{
"name": "react-typist-component",
- "version": "1.0.4",
+ "version": "1.0.5",
"description": "A react component lets you create typewriter effect.",
"author": "Yu-Xuan Zheng",
"keywords": [
From 445dd9d9c9deabbc721939445ad76941cb287517 Mon Sep 17 00:00:00 2001
From: Xuan <97ssps30212@gmail.com>
Date: Sun, 18 Sep 2022 19:57:52 +0800
Subject: [PATCH 4/4] fix: fix the path of importing typist
---
package.json | 1 +
packages/react-typist-component/dev/App.tsx | 2 +-
packages/react-typist-component/dev/components/Header.tsx | 2 +-
packages/react-typist-component/dev/components/PauseExample.tsx | 2 +-
4 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/package.json b/package.json
index d4cfd45..2120fd0 100644
--- a/package.json
+++ b/package.json
@@ -25,6 +25,7 @@
"preinstall": "npx only-allow pnpm",
"commit": "cz",
"test": "pnpm -r --filter ./packages/* run test",
+ "build:website": "pnpm -r --filter ./packages/* run build:website",
"build:packages": "pnpm -r --filter ./packages/* run build:package",
"prepublishOnly": "pnpm build:lib"
},
diff --git a/packages/react-typist-component/dev/App.tsx b/packages/react-typist-component/dev/App.tsx
index 2442403..3748749 100644
--- a/packages/react-typist-component/dev/App.tsx
+++ b/packages/react-typist-component/dev/App.tsx
@@ -1,5 +1,5 @@
import React from 'react';
-import Typist from '../packages/react-typist-component/src';
+import Typist from '../src';
import Header from './components/Header';
import Section from './components/Section';
import PauseExample from './components/PauseExample';
diff --git a/packages/react-typist-component/dev/components/Header.tsx b/packages/react-typist-component/dev/components/Header.tsx
index 811338f..d69adb0 100644
--- a/packages/react-typist-component/dev/components/Header.tsx
+++ b/packages/react-typist-component/dev/components/Header.tsx
@@ -1,6 +1,6 @@
import React from 'react';
-import Typist from '../../packages/react-typist-component/src';
+import Typist from '../../src';
import randomDelayGenerator from '../utils/randomDelayGenerator';
export default function Header() {
diff --git a/packages/react-typist-component/dev/components/PauseExample.tsx b/packages/react-typist-component/dev/components/PauseExample.tsx
index 182568d..4f2d88e 100644
--- a/packages/react-typist-component/dev/components/PauseExample.tsx
+++ b/packages/react-typist-component/dev/components/PauseExample.tsx
@@ -1,6 +1,6 @@
import React, { useState } from 'react';
-import Typist from '../../packages/react-typist-component/src';
+import Typist from '../../src';
import Section from './Section';
export default function PauseExample() {