Skip to content

Commit 1113719

Browse files
committed
update version to 0.2.0 and enhance README with badges and changelog
1 parent ccd41cf commit 1113719

File tree

5 files changed

+143
-5
lines changed

5 files changed

+143
-5
lines changed

.editorconfig

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Unix-style newlines with a newline ending every file
7+
[*]
8+
end_of_line = lf
9+
insert_final_newline = true
10+
charset = utf-8
11+
trim_trailing_whitespace = true
12+
13+
# TypeScript, JavaScript and JSON files
14+
[*.{ts,tsx,js,jsx,json}]
15+
indent_style = space
16+
indent_size = 2
17+
18+
# Markdown files
19+
[*.md]
20+
trim_trailing_whitespace = false
21+
22+
# YAML files
23+
[*.{yml,yaml}]
24+
indent_style = space
25+
indent_size = 2
26+
27+
# Package files
28+
[{package.json,tsconfig.json}]
29+
indent_style = space
30+
indent_size = 2

CHANGELOG.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
## [0.2.0] - 2025-07-12
11+
12+
### Added
13+
- Added `devMode` prop to BreakpointProvider to control console logging
14+
- Added CHANGELOG.md file
15+
- Added proper TypeScript compiler options for better type safety
16+
- Added repository metadata to package.json
17+
18+
### Changed
19+
- Updated dependencies to latest versions (ESLint, Storybook, TypeScript-ESLint, Prettier)
20+
- Moved @emotion/styled from dependencies to devDependencies (only used in Storybook)
21+
- Optimized build configuration (external source maps instead of inline)
22+
- Improved TypeScript configuration with stricter compiler options
23+
- Made automatic `pnpm link:self` after build optional
24+
25+
### Fixed
26+
- Fixed import examples in README.md (was using 'my-breakpoint-package')
27+
- Fixed missing package.json metadata (description, author, license, keywords)
28+
- Removed duplicate @emotion/styled dependency
29+
- Fixed security vulnerability in @babel/runtime
30+
31+
## [0.1.2] - 2025-02-10
32+
33+
### Added
34+
- Initial release of react-resize-detector-context
35+
- BreakpointProvider component for responsive breakpoint detection
36+
- BreakpointConditional component for conditional rendering
37+
- useBreakpoint hook for accessing breakpoint context
38+
- Utility methods: isAtLeast, isBelow, valueByBreakpoint
39+
- Full TypeScript support
40+
- Storybook stories with examples
41+
- Comprehensive documentation
42+
43+
[Unreleased]: https://github.com/smartlabsat/react-resize-detector-context/compare/v0.2.0...HEAD
44+
[0.2.0]: https://github.com/smartlabsat/react-resize-detector-context/compare/v0.1.2...v0.2.0
45+
[0.1.2]: https://github.com/smartlabsat/react-resize-detector-context/releases/tag/v0.1.2

README.md

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,23 @@
11
# ⚛️ React Resize Detector Context
22

3+
34
![Demo GIF](/doc/assets/demo.gif)
45

6+
7+
58
A lightweight React context that leverages [react-resize-detector](https://github.com/maslianok/react-resize-detector) to dynamically detect the
69
current breakpoint based on an element's width. It provides utility functions and helper components to conditionally render content based on
710
responsive breakpoints – all fully typed in TypeScript for excellent IDE support. 😎
811

12+
[![npm version](https://img.shields.io/npm/v/react-resize-detector-context.svg)](https://www.npmjs.com/package/react-resize-detector-context)
13+
[![npm downloads](https://img.shields.io/npm/dm/react-resize-detector-context.svg)](https://www.npmjs.com/package/react-resize-detector-context)
14+
[![Bundle Size](https://img.shields.io/bundlephobia/minzip/react-resize-detector-context)](https://bundlephobia.com/package/react-resize-detector-context)
15+
[![codecov](https://codecov.io/gh/smartlabsat/react-resize-detector-context/branch/main/graph/badge.svg)](https://codecov.io/gh/smartlabsat/react-resize-detector-context)
16+
[![CI](https://github.com/smartlabsat/react-resize-detector-context/actions/workflows/ci.yml/badge.svg)](https://github.com/smartlabsat/react-resize-detector-context/actions/workflows/ci.yml)
17+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
18+
[![TypeScript](https://img.shields.io/badge/TypeScript-Ready-blue.svg)](https://www.typescriptlang.org/)
19+
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](CONTRIBUTING.md)
20+
921
---
1022

1123
## Table of Contents 📚
@@ -23,6 +35,7 @@ responsive breakpoints – all fully typed in TypeScript for excellent IDE suppo
2335
- [useBreakpoint Hook](#usebreakpoint-hook)
2436
- [Available Scripts](#available-scripts)
2537
- [Contribution Guidelines](#contribution-guidelines)
38+
- [Changelog](#changelog)
2639
- [License](#license)
2740

2841
---
@@ -67,7 +80,7 @@ values.
6780

6881
```typescript
6982
import React from 'react';
70-
import { BreakpointProvider, useBreakpoint } from 'my-breakpoint-package';
83+
import { BreakpointProvider, useBreakpoint } from 'react-resize-detector-context';
7184

7285
const breakpoints = {
7386
XS: 0,
@@ -114,7 +127,7 @@ Render content only when specific breakpoint conditions are met.
114127

115128
```typescript
116129
import React from 'react';
117-
import { BreakpointProvider, BreakpointConditional } from 'my-breakpoint-package';
130+
import { BreakpointProvider, BreakpointConditional } from 'react-resize-detector-context';
118131

119132
const breakpoints = {
120133
XS: 0,
@@ -152,7 +165,7 @@ Define your own custom breakpoints – for example, using car sizes:
152165

153166
```typescript
154167
import React from 'react';
155-
import { BreakpointProvider, useBreakpoint } from 'my-breakpoint-package';
168+
import { BreakpointProvider, useBreakpoint } from 'react-resize-detector-context';
156169

157170
const carBreakpoints = {
158171
Smart: 0,
@@ -243,7 +256,7 @@ The `useBreakpoint` hook provides access to the responsive context. It returns a
243256
244257
```typescript
245258
import React from 'react';
246-
import { BreakpointProvider, useBreakpoint } from 'my-breakpoint-package';
259+
import { BreakpointProvider, useBreakpoint } from 'react-resize-detector-context';
247260

248261
const breakpoints = {
249262
XS: 0,
@@ -340,6 +353,12 @@ Let's build something awesome together! 🚀✨
340353
341354
---
342355
356+
## Changelog
357+
358+
See [CHANGELOG.md](./CHANGELOG.md) for a list of changes.
359+
360+
---
361+
343362
## License
344363
345364
This project is licensed under the MIT License.

SECURITY.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
We release patches for security vulnerabilities. Which versions are eligible for receiving such patches depends on the CVSS v3.0 Rating:
6+
7+
| Version | Supported |
8+
| ------- | ------------------ |
9+
| 0.1.x | :white_check_mark: |
10+
| < 0.1.0 | :x: |
11+
12+
## Reporting a Vulnerability
13+
14+
We take the security of our software seriously. If you believe you have found a security vulnerability in react-resize-detector-context, please report it to us as described below.
15+
16+
**Please do not report security vulnerabilities through public GitHub issues.**
17+
18+
Instead, please report them via email to [email protected].
19+
20+
You should receive a response within 48 hours. If for some reason you do not, please follow up via email to ensure we received your original message.
21+
22+
Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
23+
24+
- Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
25+
- Full paths of source file(s) related to the manifestation of the issue
26+
- The location of the affected source code (tag/branch/commit or direct URL)
27+
- Any special configuration required to reproduce the issue
28+
- Step-by-step instructions to reproduce the issue
29+
- Proof-of-concept or exploit code (if possible)
30+
- Impact of the issue, including how an attacker might exploit the issue
31+
32+
This information will help us triage your report more quickly.
33+
34+
## Preferred Languages
35+
36+
We prefer all communications to be in English or German.
37+
38+
## Policy
39+
40+
We follow the principle of [Responsible Disclosure](https://en.wikipedia.org/wiki/Responsible_disclosure).
41+
42+
## Comments on this Policy
43+
44+
If you have suggestions on how this process could be improved please submit a pull request.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "react-resize-detector-context",
33
"description": "React context that detects element width and provides responsive breakpoint utilities with conditional rendering components",
4-
"version": "0.1.2",
4+
"version": "0.2.0",
55
"author": "Christopher Schwarz",
66
"license": "MIT",
77
"keywords": [

0 commit comments

Comments
 (0)