diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..bbb4a79 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,13 @@ +# Carries the Prettier basics into editors that do not run Prettier on save. +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_style = space +indent_size = 2 +insert_final_newline = true +trim_trailing_whitespace = true + +[*.md] +trim_trailing_whitespace = false diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..4b8cb08 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,55 @@ +name: Bug report +description: Something in the React wrapper is not working +labels: [bug] +body: + - type: markdown + attributes: + value: | + This repository is the **React wrapper**. Questions about the editor + itself, your Unlayer account, or AI Assistant entitlements are better + raised with Unlayer support — see the links when you go back. + - type: textarea + id: what-happened + attributes: + label: What happened? + description: What did you expect, and what happened instead? + validations: + required: true + - type: textarea + id: repro + attributes: + label: Steps to reproduce + description: A minimal example is worth far more than a description. + placeholder: | + 1. Render + 2. ... + validations: + required: true + - type: input + id: version + attributes: + label: '@unlayer/react-image-editor version' + placeholder: 1.0.2 + validations: + required: true + - type: input + id: react-version + attributes: + label: React version + placeholder: 19.2.7 + validations: + required: true + - type: input + id: environment + attributes: + label: Browser / framework + description: Include the framework if relevant (Next.js App Router, Vite, CRA...). + placeholder: Chrome 140, Next.js 15 App Router + validations: + required: true + - type: textarea + id: console + attributes: + label: Console output + description: Any errors logged by the wrapper or passed to onError. + render: shell diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..ad1e71f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,8 @@ +blank_issues_enabled: true +contact_links: + - name: Unlayer support + url: https://unlayer.com/contact + about: Account, billing, AI Assistant entitlements, or the editor itself (not the React wrapper). + - name: Unlayer documentation + url: https://docs.unlayer.com + about: Editor options, features and configuration reference. diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..f5e943b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,21 @@ +name: Feature request +description: Suggest an improvement to the React wrapper +labels: [enhancement] +body: + - type: textarea + id: problem + attributes: + label: What problem does this solve? + description: Describe the situation you are stuck in, not only the solution you have in mind. + validations: + required: true + - type: textarea + id: proposal + attributes: + label: Proposed API + description: If you have a shape in mind, sketch it. + render: jsx + - type: textarea + id: alternatives + attributes: + label: Alternatives you have tried diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..2dcbb0d --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,16 @@ +## What and why + + + +## How it was verified + + + +## Checklist + +- [ ] Commit messages follow [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) +- [ ] `npm run lint`, `npm run typecheck` and `npm test` pass +- [ ] Coverage is still 100% (`npm run test:coverage`) +- [ ] New or changed props are documented in the README +- [ ] Any new dependency is pinned exact (no `^` / `~`) +- [ ] No `console.log` / `console.debug` diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..2bd5a0a --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +22 diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..8431525 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,58 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, caste, color, religion, or sexual +identity and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment: + +- Demonstrating empathy and kindness toward other people +- Being respectful of differing opinions, viewpoints, and experiences +- Giving and gracefully accepting constructive feedback +- Accepting responsibility and apologizing to those affected by our mistakes +- Focusing on what is best for the overall community + +Examples of unacceptable behavior: + +- The use of sexualized language or imagery, and sexual attention or advances +- Trolling, insulting or derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or email address, + without their explicit permission +- Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing these standards +and will take appropriate and fair corrective action in response to any behavior +that they deem inappropriate, threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the maintainers responsible for enforcement by opening a report +through GitHub. All complaints will be reviewed and investigated promptly and +fairly. Community leaders are obligated to respect the privacy and security of +the reporter of any incident. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), +version 2.1, available at +https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..e891d88 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,31 @@ +# Security Policy + +## Supported versions + +Security fixes land on the latest released minor version. Please upgrade to the +latest release before reporting. + +## Reporting a vulnerability + +**Please do not open a public issue for a security report.** + +Use GitHub's private vulnerability reporting instead: +[Report a vulnerability](https://github.com/unlayer/react-image-editor/security/advisories/new). +That opens a private advisory visible only to you and the maintainers. + +Please include: + +- the version of `@unlayer/react-image-editor` affected +- a description of the issue and its impact +- steps to reproduce, ideally a minimal example +- any suggested mitigation + +You can expect an acknowledgement within a few business days. We will keep you +updated as we work on a fix, and will credit you in the advisory unless you ask +otherwise. + +## Scope + +This repository is the React wrapper. It loads the Unlayer Image Editor from a +CDN at runtime, so issues in the editor itself, or in Unlayer's hosted APIs, are +outside this repository — report those to Unlayer directly. diff --git a/package.json b/package.json index 0226bc9..18334f3 100644 --- a/package.json +++ b/package.json @@ -41,8 +41,7 @@ "format": "prettier --write .", "prepare": "npm run build", "prepublishOnly": "npm run lint && npm run typecheck && npm test", - "release": "npm run build && npm publish", - "netlify-build": "cd demo && npm install && npm run build" + "release": "npm run build && npm publish" }, "peerDependencies": { "react": ">=18"