Skip to content

Commit

Permalink
feat: setup changesets for publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
joshxfi committed Sep 8, 2024
1 parent d05f802 commit 2f48f7d
Show file tree
Hide file tree
Showing 5 changed files with 106 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .changeset/README.md
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)
11 changes: 11 additions & 0 deletions .changeset/config.json
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": []
}
83 changes: 83 additions & 0 deletions .changeset/gold-olives-own.md
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)
Binary file modified bun.lockb
Binary file not shown.
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,8 @@
"apps/*",
"packages/*",
"tests"
]
],
"dependencies": {
"@changesets/cli": "^2.27.8"
}
}

0 comments on commit 2f48f7d

Please sign in to comment.