-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: setup changesets for publishing
- Loading branch information
Showing
5 changed files
with
106 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Changesets | ||
|
||
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works | ||
with multi-package repos, or single-package repos to help you version and publish your code. You can | ||
find the full documentation for it [in our repository](https://github.com/changesets/changesets) | ||
|
||
We have a quick list of common questions to get you started engaging with this project in | ||
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"$schema": "https://unpkg.com/@changesets/config@3.0.3/schema.json", | ||
"changelog": "@changesets/cli/changelog", | ||
"commit": false, | ||
"fixed": [], | ||
"linked": [], | ||
"access": "restricted", | ||
"baseBranch": "main", | ||
"updateInternalDependencies": "patch", | ||
"ignore": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
--- | ||
"@omsimos/react-highlight-popover": major | ||
--- | ||
|
||
# React Highlight Popover v1.0.0 | ||
|
||
We're excited to announce the initial release of React Highlight Popover, a customizable, headless React component for creating popovers on text selection, with zero dependencies! | ||
|
||
## 🎉 Highlights | ||
|
||
- **Headless Component**: Maximum flexibility for styling and integration | ||
- **Zero Dependencies**: Only React as a peer dependency | ||
- **Customizable**: Fine-tune behavior with props and callbacks | ||
- **Lightweight**: Minimal impact on your bundle size | ||
- **TypeScript Support**: Full type definitions included | ||
|
||
## 🚀 Features | ||
|
||
- Easy-to-use React component | ||
- Fully customizable popover content and styling | ||
- Configurable minimum selection length | ||
- Automatic positioning based on text selection | ||
- Customizable offset for fine-tuning popover position | ||
- Event callbacks for selection and popover lifecycle | ||
- Extensible architecture for advanced use cases | ||
|
||
## 📦 Installation | ||
|
||
```sh | ||
npm install @omsimos/react-highlight-popover | ||
``` | ||
|
||
or | ||
|
||
```sh | ||
yarn add @omsimos/react-highlight-popover | ||
``` | ||
|
||
## 🔧 Usage | ||
|
||
```jsx | ||
import React from 'react'; | ||
import { HighlightPopover } from '@omsimos/react-highlight-popover'; | ||
|
||
function App() { | ||
const renderPopover = ({ selection }) => ( | ||
<div className="bg-white border rounded p-2 shadow-lg select-none"> | ||
You selected: {selection} | ||
</div> | ||
); | ||
|
||
return ( | ||
<HighlightPopover renderPopover={renderPopover}> | ||
<p>Select some text to see the popover in action!</p> | ||
</HighlightPopover> | ||
); | ||
} | ||
``` | ||
|
||
## 📝 Changelog | ||
|
||
### v1.0.0 | ||
|
||
- Initial release of React Highlight Popover | ||
- Implemented core HighlightPopover component | ||
- Added useHighlightPopover hook for accessing internal state | ||
- Included props for customization: | ||
- renderPopover | ||
- className | ||
- offset | ||
- minSelectionLength | ||
- Added event callbacks: | ||
- onSelectionStart | ||
- onSelectionEnd | ||
- onPopoverShow | ||
- onPopoverHide | ||
- Implemented automatic positioning of popover | ||
- Added TypeScript definitions | ||
- Created comprehensive documentation and examples | ||
|
||
## 📚 Documentation | ||
|
||
For full documentation, usage examples, and API references, please visit our [GitHub repository](https://github.com/omsimos/react-highlight-popover) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,5 +21,8 @@ | |
"apps/*", | ||
"packages/*", | ||
"tests" | ||
] | ||
], | ||
"dependencies": { | ||
"@changesets/cli": "^2.27.8" | ||
} | ||
} |