{"_id":"@duongtruongan/easy-email-editor","_rev":"1-18b1fc41945a07012777c302b23b4ae4","name":"@duongtruongan/easy-email-editor","dist-tags":{"latest":"4.7.1"},"versions":{"4.7.0":{"name":"@duongtruongan/easy-email-editor","license":"MIT","description":"Email editor","version":"4.7.0","author":{"name":"m-Ryan"},"repository":{"type":"git","url":"git+ssh://git@github.com/m-Ryan/easy-email.git"},"keywords":["email editor core"],"main":"lib/index.js","types":"lib/index.d.ts","scripts":{"dev":"vite","typings":"tsc --declaration --emitDeclarationOnly --project tsconfig.lib.json && tsc-alias -p tsconfig.alias.json","build":"rimraf lib && npm run typings && vite build --config vite.config.ts","format":"eslint --fix  --ext .tsx,.ts,.tsx src/"},"husky":{"hooks":{"pre-commit":"yarn test && yarn lint-staged"}},"lint-staged":{"src/*.{js,jsx,ts,tsx}, example/*.{js,jsx,ts,tsx}":["yarn lint"]},"dependencies":{"@types/final-form-set-field-touched":"^1.0.0","@types/is-hotkey":"^0.1.7","final-form":"^4.20.4","final-form-arrays":"^3.0.2","final-form-set-field-touched":"^1.0.1","is-hotkey":"^0.2.0","lodash":"^4.17.21","react-final-form-arrays":"^3.1.3","react-use":"^17.3.1"},"devDependencies":{"@types/lodash":"^4.14.178","@types/node":"^16.11.7","@types/react":"17.0.2","@types/react-dom":"^17.0.11","@typescript-eslint/eslint-plugin":"^5.22.0","@typescript-eslint/parser":"^4.28.3","eslint":"^7.31.0","eslint-config-prettier":"^8.3.0","eslint-loader":"^4.0.2","eslint-plugin-import":"^2.23.4","eslint-plugin-prettier":"^3.4.0","eslint-plugin-react":"^7.24.0","eslint-plugin-react-hooks":"^4.2.0","mjml-browser":"^4.10.4","react":"^17.0.2","react-dom":"^17.0.2","react-final-form":"^6.5.7","rimraf":"^3.0.2","sass":"^1.43.4","tsc-alias":"^1.4.1","typescript":"^4.6.3","vite":"^2.6.14"},"peerDependencies":{"@duongtruongan/easy-email-core":"^4.3.6","mjml-browser":"^4.10.4","react":"^17.0.2","react-dom":"^17.0.2","react-final-form":"^6.5.7"},"gitHead":"2a08e8af15766344de708d891c1c8ea31bb77646","publishConfig":{"access":"public"},"bugs":{"url":"https://github.com/m-Ryan/easy-email/issues"},"homepage":"https://github.com/m-Ryan/easy-email#readme","_id":"@duongtruongan/easy-email-editor@4.7.0","_nodeVersion":"16.20.2","_npmVersion":"8.19.4","dist":{"integrity":"sha512-oPxsa8iTshzC3+YpktDV9DGLwCTAK3FCrBdWagC/MFDdbOpnj0Uoud6JOZIlLfweFyVIGWMHWEwB2TFdYqmKjA==","shasum":"5ade44c6964bb41d820d7ba13b3c50dbd6a0b545","tarball":"https://registry.npmjs.org/@duongtruongan/easy-email-editor/-/easy-email-editor-4.7.0.tgz","fileCount":79,"unpackedSize":1324785,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD6L6yaf8kdlZy9T+b9NNdo8SL8HkCnPwueff0dYwjnEwIgHy0+Zn7on0qS5QeL4Wzfv1ocbTktqYQw2zEmiRpxaxM="}]},"_npmUser":{"name":"duongtruongan","email":"duongtruongan@outlook.com"},"directories":{},"maintainers":[{"name":"duongtruongan","email":"duongtruongan@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/easy-email-editor_4.7.0_1702371914867_0.31569654469082553"},"_hasShrinkwrap":false},"4.7.1":{"name":"@duongtruongan/easy-email-editor","license":"MIT","description":"Email editor","version":"4.7.1","author":{"name":"m-Ryan"},"repository":{"type":"git","url":"git+ssh://git@github.com/m-Ryan/easy-email.git"},"keywords":["email editor core"],"main":"lib/index.js","types":"lib/index.d.ts","scripts":{"dev":"vite","typings":"tsc --declaration --emitDeclarationOnly --project tsconfig.lib.json && tsc-alias -p tsconfig.alias.json","build":"rimraf lib && npm run typings && vite build --config vite.config.ts","format":"eslint --fix  --ext .tsx,.ts,.tsx src/","pub":"npm version patch --force -m 'bump version to %s' && npm publish"},"husky":{"hooks":{"pre-commit":"yarn test && yarn lint-staged"}},"lint-staged":{"src/*.{js,jsx,ts,tsx}, example/*.{js,jsx,ts,tsx}":["yarn lint"]},"dependencies":{"@types/final-form-set-field-touched":"^1.0.0","@types/is-hotkey":"^0.1.7","final-form":"^4.20.4","final-form-arrays":"^3.0.2","final-form-set-field-touched":"^1.0.1","is-hotkey":"^0.2.0","lodash":"^4.17.21","react-final-form-arrays":"^3.1.3","react-use":"^17.3.1"},"devDependencies":{"@types/lodash":"^4.14.178","@types/node":"^16.11.7","@types/react":"17.0.2","@types/react-dom":"^17.0.11","@typescript-eslint/eslint-plugin":"^5.22.0","@typescript-eslint/parser":"^4.28.3","eslint":"^7.31.0","eslint-config-prettier":"^8.3.0","eslint-loader":"^4.0.2","eslint-plugin-import":"^2.23.4","eslint-plugin-prettier":"^3.4.0","eslint-plugin-react":"^7.24.0","eslint-plugin-react-hooks":"^4.2.0","mjml-browser":"^4.10.4","react":"^17.0.2","react-dom":"^17.0.2","react-final-form":"^6.5.7","rimraf":"^3.0.2","sass":"^1.43.4","tsc-alias":"^1.4.1","typescript":"^4.6.3","vite":"^2.6.14"},"peerDependencies":{"@duongtruongan/easy-email-core":"^4.3.6","mjml-browser":"^4.10.4","react":"^17.0.2","react-dom":"^17.0.2","react-final-form":"^6.5.7"},"gitHead":"2a08e8af15766344de708d891c1c8ea31bb77646","publishConfig":{"access":"public"},"bugs":{"url":"https://github.com/m-Ryan/easy-email/issues"},"homepage":"https://github.com/m-Ryan/easy-email#readme","_id":"@duongtruongan/easy-email-editor@4.7.1","_nodeVersion":"16.20.2","_npmVersion":"8.19.4","dist":{"integrity":"sha512-RqX016LV/LpUyIqp0ev05FZeyIwL5t/1RF6og8z+RxqncgI4AxpBnFYTQeDl+ZmLx//XToaWg3ct0+eY+GJPiA==","shasum":"082fbd93891e9db1346f6c03157616e019701aa6","tarball":"https://registry.npmjs.org/@duongtruongan/easy-email-editor/-/easy-email-editor-4.7.1.tgz","fileCount":79,"unpackedSize":1364062,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA6qszomy3oGuc0JJWXYL6ENKkJSfw/OjXc1ne7jn6ziAiEArm4BD+IFfzO7KrXs1lhQfITwSto4ErWSvkD+hvEIhlc="}]},"_npmUser":{"name":"duongtruongan","email":"duongtruongan@outlook.com"},"directories":{},"maintainers":[{"name":"duongtruongan","email":"duongtruongan@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/easy-email-editor_4.7.1_1702375663745_0.40719041431738434"},"_hasShrinkwrap":false}},"time":{"created":"2023-12-12T09:05:14.780Z","4.7.0":"2023-12-12T09:05:15.107Z","modified":"2023-12-12T10:07:44.170Z","4.7.1":"2023-12-12T10:07:44.002Z"},"maintainers":[{"name":"duongtruongan","email":"duongtruongan@outlook.com"}],"description":"Email editor","homepage":"https://github.com/m-Ryan/easy-email#readme","keywords":["email editor core"],"repository":{"type":"git","url":"git+ssh://git@github.com/m-Ryan/easy-email.git"},"author":{"name":"m-Ryan"},"bugs":{"url":"https://github.com/m-Ryan/easy-email/issues"},"license":"MIT","readme":"# Easy-email-editor\n\n## Introduction\n\nEmail render and preview container.\n\n## usage\n\n```sh\n$ npm install --save easy-email-editor\n```\n\nor\n\n```sh\n$ yarn add easy-email-editor\n```\n\n```js\nimport React from \"react\";\nimport { BlockManager } from \"easy-email-core\";\nimport { EmailEditor, EmailEditorProvider } from \"easy-email-editor\";\nimport \"easy-email-editor/lib/style.css\";\n\nconst initialValues = {\n  subject: \"Welcome to Easy-email\",\n  subTitle: \"Nice to meet you!\",\n  content: BlockManager.getBlockByType(BasicType.PAGE).create({}),\n};\n\nexport function App() {\n  return (\n    <EmailEditorProvider data={initialValues} height={\"calc(100vh - 72px)\"}>\n      {({ values }) => {\n        return <EmailEditor />;\n      }}\n    </EmailEditorProvider>\n  );\n}\n```\n\n## customize\n\nIf you customize the UI yourself,maybe you need to know\n\n- hooks\n\n  - useActiveTab // current tab is edit or preview\n  - useBlock // includes addBlock、moveBlock、removeBlock、undo, redo, etc.\n  - useHoverIdx // hover block related, dragging status related, dragging direction related\n  - useEditorProps // get props from EmailEditorProvider\n  - useEditorContext // get form state and initialized status\n  - useFocusIdx // focus block related\n\n- utils (These are some very simple methods, it is best to look at the implementation)\n\n  - getBlockNodeByIdx\n  - getBlockNodes\n  - getShadowRoot\n  - scrollBlockEleIntoView\n\n- components\n  - BlockAvatarWrapper // allow drag and drop to editor\n","readmeFilename":"readme.md"}