react-highlight-me 2.2.1 → 2.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,15 @@
1
+ ISC License
2
+
3
+ Copyright (c) 2025 [Andrey Hohutkin <andrey.hohutkin@gmail.com>]
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for any
6
+ purpose with or without fee is hereby granted, provided that the above
7
+ copyright notice and this permission notice appear in all copies.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
package/README.md CHANGED
@@ -14,11 +14,11 @@ A flexible React component for highlighting specific words or phrases within tex
14
14
 
15
15
  ## Installation
16
16
 
17
- | npm | yarn | pnpm |
17
+ | npm | yarn | pnpm * |
18
18
  |----------------------------------|-------------------------------|-------------------------------|
19
19
  | `npm install react-highlight-me` | `yarn add react-highlight-me` | `pnpm add react-highlight-me` |
20
20
 
21
-
21
+ *) pnpm is a preferable package manager for me at the moment.
22
22
 
23
23
  ## Usage
24
24
 
@@ -252,10 +252,23 @@ Works in all modern browsers that support:
252
252
  - ES6 Regular Expressions
253
253
  - Array methods (map, filter, some)
254
254
 
255
+ ## Development & Debugging
256
+
257
+ This package includes TypeScript source files for easier debugging and development:
258
+ ```typescript
259
+ // For production (compiled):
260
+ import { Highlighter } from 'react-highlight-me';
261
+
262
+ // For debugging (source):
263
+ import { Highlighter } from 'react-highlight-me/src';
264
+ ```
265
+
266
+ Source maps are included to map compiled code back to TypeScript sources in your debugger.
267
+
255
268
  ## Contributing
256
269
 
257
270
  Feel free to submit issues, feature requests, or pull requests to improve the component.
258
271
 
259
272
  ## License
260
273
 
261
- MIT License - feel free to use in your projects!
274
+ ISC License - see [LICENSE](LICENSE) file for details.
@@ -17,3 +17,4 @@ interface TextHighlighterComponent extends React.ForwardRefExoticComponent<Props
17
17
  }
18
18
  declare const TextHighlighter: TextHighlighterComponent;
19
19
  export default TextHighlighter;
20
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqE,MAAM,OAAO,CAAC;AAE1F,KAAK,KAAK,GAAG;IACX,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,CAAC;IAC9C,cAAc,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IACrC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAA;AAMD,eAAO,MAAM,aAAa,oCAAmC,CAAC;AAC9D,eAAO,MAAM,uBAAuB,wHAAkF,CAAC;AAEvH,UAAU,wBAAyB,SAAQ,KAAK,CAAC,yBAAyB,CAAC,KAAK,GAAG,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;IACrH,uBAAuB,EAAE,MAAM,CAAC;IAChC,aAAa,EAAE,MAAM,CAAC;IACtB,qBAAqB,EAAE,MAAM,CAAC;CAC/B;AAED,QAAA,MAAM,eAAe,EAwNf,wBAAwB,CAAC;AAM/B,eAAe,eAAe,CAAC"}
@@ -17,3 +17,4 @@ interface TextHighlighterComponent extends React.ForwardRefExoticComponent<Props
17
17
  }
18
18
  declare const TextHighlighter: TextHighlighterComponent;
19
19
  export default TextHighlighter;
20
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqE,MAAM,OAAO,CAAC;AAE1F,KAAK,KAAK,GAAG;IACX,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,CAAC;IAC9C,cAAc,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IACrC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAA;AAMD,eAAO,MAAM,aAAa,oCAAmC,CAAC;AAC9D,eAAO,MAAM,uBAAuB,wHAAkF,CAAC;AAEvH,UAAU,wBAAyB,SAAQ,KAAK,CAAC,yBAAyB,CAAC,KAAK,GAAG,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;IACrH,uBAAuB,EAAE,MAAM,CAAC;IAChC,aAAa,EAAE,MAAM,CAAC;IACtB,qBAAqB,EAAE,MAAM,CAAC;CAC/B;AAED,QAAA,MAAM,eAAe,EAwNf,wBAAwB,CAAC;AAM/B,eAAe,eAAe,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-highlight-me",
3
- "version": "2.2.1",
3
+ "version": "2.2.3",
4
4
  "description": "Highlight words in React components or text",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -19,13 +19,14 @@
19
19
  },
20
20
  "files": [
21
21
  "dist",
22
- "src"
22
+ "src",
23
+ "README.md"
23
24
  ],
24
25
  "keywords": [],
25
26
  "author": "Andrey Hohutkin <Andrey.Hohutkin@gmail.com",
26
27
  "repository": {
27
28
  "type": "git",
28
- "url": "git+https://github.com/AHgPuK/react-highlight-me"
29
+ "url": "git+https://github.com/AHgPuK/react-highlight-me.git"
29
30
  },
30
31
  "license": "ISC",
31
32
  "devDependencies": {
@@ -37,6 +38,10 @@
37
38
  "build": "npm run build:cjs && npm run build:esm",
38
39
  "build:cjs": "tsc -p tsconfig.cjs.json",
39
40
  "build:esm": "tsc -p tsconfig.esm.json",
40
- "clean": "rm -rf dist"
41
+ "clean": "rm -rf dist",
42
+ "pack:check": "npm pack && tar -tzf *.tgz && rm *.tgz",
43
+ "demo:dev": "cd demo && pnpm run dev",
44
+ "demo:build": "pnpm run build && cd demo && pnpm run build",
45
+ "demo:preview": "cd demo && pnpm run preview"
41
46
  }
42
47
  }