react-text-range 1.0.0 → 1.0.2
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/dist/cjs/SelectionHandler.js +4 -4
- package/dist/cjs/SelectionHandler.js.map +1 -1
- package/dist/cjs/quote-left.svg +1 -0
- package/dist/cjs/quote-right.svg +1 -0
- package/dist/esm/SelectionHandler.js +2 -2
- package/dist/esm/SelectionHandler.js.map +1 -1
- package/dist/esm/quote-left.svg +1 -0
- package/dist/esm/quote-right.svg +1 -0
- package/package.json +3 -3
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.SelectionHandler = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
-
const quote_left_svg_1 = require("
|
|
7
|
-
const quote_right_svg_1 = require("
|
|
6
|
+
const quote_left_svg_1 = tslib_1.__importDefault(require("./quote-left.svg"));
|
|
7
|
+
const quote_right_svg_1 = tslib_1.__importDefault(require("./quote-right.svg"));
|
|
8
8
|
const SelectionHandler = ({ pos, grab, setGrab, left }) => {
|
|
9
9
|
return (pos &&
|
|
10
10
|
react_1.default.createElement("div", { draggable: false, className: `bg-yellow-300 opacity-80 ${left ? 'rounded-l-md' : 'rounded-r-md'}`, style: {
|
|
@@ -26,8 +26,8 @@ const SelectionHandler = ({ pos, grab, setGrab, left }) => {
|
|
|
26
26
|
}, onMouseUp: () => {
|
|
27
27
|
setGrab(false);
|
|
28
28
|
} }, left
|
|
29
|
-
? react_1.default.createElement(quote_left_svg_1.
|
|
30
|
-
: react_1.default.createElement(quote_right_svg_1.
|
|
29
|
+
? react_1.default.createElement(quote_left_svg_1.default, null)
|
|
30
|
+
: react_1.default.createElement(quote_right_svg_1.default, null)));
|
|
31
31
|
};
|
|
32
32
|
exports.SelectionHandler = SelectionHandler;
|
|
33
33
|
//# sourceMappingURL=SelectionHandler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectionHandler.js","sourceRoot":"","sources":["../../src/SelectionHandler.tsx"],"names":[],"mappings":";;;;AAAA,0DAAkC;AAElC,
|
|
1
|
+
{"version":3,"file":"SelectionHandler.js","sourceRoot":"","sources":["../../src/SelectionHandler.tsx"],"names":[],"mappings":";;;;AAAA,0DAAkC;AAElC,8EAAyC;AACzC,gFAA2C;AAEpC,MAAM,gBAAgB,GAKxB,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE;IACpC,OAAO,CACL,GAAG;QACH,uCACE,SAAS,EAAE,KAAK,EAChB,SAAS,EAAE,4BAA4B,IAAI,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,cAAc,EAAE,EAC/E,KAAK,EAAE;gBACL,QAAQ,EAAE,UAAU;gBACpB,OAAO,EAAE,MAAM;gBACf,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC;gBACzC,GAAG,EAAE,GAAG,CAAC,GAAG;gBACZ,KAAK,EAAE,MAAM;gBACb,MAAM,EAAE,GAAG,CAAC,MAAM;gBAClB,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM;gBAClC,UAAU,EAAE,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,UAAU;aAC7C,EACD,WAAW,EAAE,GAAG,EAAE;gBAChB,OAAO,CAAC,IAAI,CAAC,CAAC;gBACd,MAAM,OAAO,GAAG,GAAG,EAAE;oBACnB,OAAO,CAAC,KAAK,CAAC,CAAC;oBACf,QAAQ,CAAC,mBAAmB,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;gBACnD,CAAC,CAAC;gBACF,QAAQ,CAAC,gBAAgB,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;YAChD,CAAC,EACD,SAAS,EAAE,GAAG,EAAE;gBACd,OAAO,CAAC,KAAK,CAAC,CAAC;YACjB,CAAC,IAEA,IAAI;YACH,CAAC,CAAC,8BAAC,wBAAS,OAAG;YACf,CAAC,CAAC,8BAAC,yBAAU,OAAG,CACd,CACP,CAAC;AACJ,CAAC,CAAC;AAtCW,QAAA,gBAAgB,oBAsC3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M13 14.725c0-5.141 3.892-10.519 10-11.725l.984 2.126c-2.215.835-4.163 3.742-4.38 5.746 2.491.392 4.396 2.547 4.396 5.149 0 3.182-2.584 4.979-5.199 4.979-3.015 0-5.801-2.305-5.801-6.275zm-13 0c0-5.141 3.892-10.519 10-11.725l.984 2.126c-2.215.835-4.163 3.742-4.38 5.746 2.491.392 4.396 2.547 4.396 5.149 0 3.182-2.584 4.979-5.199 4.979-3.015 0-5.801-2.305-5.801-6.275z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M11 9.275c0 5.141-3.892 10.519-10 11.725l-.984-2.126c2.215-.835 4.163-3.742 4.38-5.746-2.491-.392-4.396-2.547-4.396-5.149 0-3.182 2.584-4.979 5.199-4.979 3.015 0 5.801 2.305 5.801 6.275zm13 0c0 5.141-3.892 10.519-10 11.725l-.984-2.126c2.215-.835 4.163-3.742 4.38-5.746-2.491-.392-4.396-2.547-4.396-5.149 0-3.182 2.584-4.979 5.199-4.979 3.015 0 5.801 2.305 5.801 6.275z"/></svg>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import QuoteLeft from "./quote-left.svg";
|
|
3
|
+
import QuoteRight from "./quote-right.svg";
|
|
4
4
|
export const SelectionHandler = ({ pos, grab, setGrab, left }) => {
|
|
5
5
|
return (pos &&
|
|
6
6
|
React.createElement("div", { draggable: false, className: `bg-yellow-300 opacity-80 ${left ? 'rounded-l-md' : 'rounded-r-md'}`, style: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectionHandler.js","sourceRoot":"","sources":["../../src/SelectionHandler.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAa,MAAM,OAAO,CAAC;AAElC,OAAO,
|
|
1
|
+
{"version":3,"file":"SelectionHandler.js","sourceRoot":"","sources":["../../src/SelectionHandler.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAa,MAAM,OAAO,CAAC;AAElC,OAAO,SAAS,MAAM,kBAAkB,CAAC;AACzC,OAAO,UAAU,MAAM,mBAAmB,CAAC;AAE3C,MAAM,CAAC,MAAM,gBAAgB,GAKxB,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE;IACpC,OAAO,CACL,GAAG;QACH,6BACE,SAAS,EAAE,KAAK,EAChB,SAAS,EAAE,4BAA4B,IAAI,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,cAAc,EAAE,EAC/E,KAAK,EAAE;gBACL,QAAQ,EAAE,UAAU;gBACpB,OAAO,EAAE,MAAM;gBACf,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC;gBACzC,GAAG,EAAE,GAAG,CAAC,GAAG;gBACZ,KAAK,EAAE,MAAM;gBACb,MAAM,EAAE,GAAG,CAAC,MAAM;gBAClB,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM;gBAClC,UAAU,EAAE,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,UAAU;aAC7C,EACD,WAAW,EAAE,GAAG,EAAE;gBAChB,OAAO,CAAC,IAAI,CAAC,CAAC;gBACd,MAAM,OAAO,GAAG,GAAG,EAAE;oBACnB,OAAO,CAAC,KAAK,CAAC,CAAC;oBACf,QAAQ,CAAC,mBAAmB,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;gBACnD,CAAC,CAAC;gBACF,QAAQ,CAAC,gBAAgB,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;YAChD,CAAC,EACD,SAAS,EAAE,GAAG,EAAE;gBACd,OAAO,CAAC,KAAK,CAAC,CAAC;YACjB,CAAC,IAEA,IAAI;YACH,CAAC,CAAC,oBAAC,SAAS,OAAG;YACf,CAAC,CAAC,oBAAC,UAAU,OAAG,CACd,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M13 14.725c0-5.141 3.892-10.519 10-11.725l.984 2.126c-2.215.835-4.163 3.742-4.38 5.746 2.491.392 4.396 2.547 4.396 5.149 0 3.182-2.584 4.979-5.199 4.979-3.015 0-5.801-2.305-5.801-6.275zm-13 0c0-5.141 3.892-10.519 10-11.725l.984 2.126c-2.215.835-4.163 3.742-4.38 5.746 2.491.392 4.396 2.547 4.396 5.149 0 3.182-2.584 4.979-5.199 4.979-3.015 0-5.801-2.305-5.801-6.275z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M11 9.275c0 5.141-3.892 10.519-10 11.725l-.984-2.126c2.215-.835 4.163-3.742 4.38-5.746-2.491-.392-4.396-2.547-4.396-5.149 0-3.182 2.584-4.979 5.199-4.979 3.015 0 5.801 2.305 5.801 6.275zm13 0c0 5.141-3.892 10.519-10 11.725l-.984-2.126c2.215-.835 4.163-3.742 4.38-5.746-2.491-.392-4.396-2.547-4.396-5.149 0-3.182 2.584-4.979 5.199-4.979 3.015 0 5.801 2.305 5.801 6.275z"/></svg>
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-text-range",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "text selection editor for React",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
7
7
|
"types": "./dist/esm/index.d.ts",
|
|
8
8
|
"scripts": {
|
|
9
|
-
"build:esm": "tsc",
|
|
10
|
-
"build:cjs": "tsc --module commonjs --outDir dist/cjs",
|
|
9
|
+
"build:esm": "tsc && cp ./src/*.svg ./dist/esm",
|
|
10
|
+
"build:cjs": "tsc --module commonjs --outDir dist/cjs && cp ./src/*.svg ./dist/cjs",
|
|
11
11
|
"build": "npm run build:esm && npm run build:cjs",
|
|
12
12
|
"test": "jest --config jestconfig.json",
|
|
13
13
|
"prepare": "npm run build",
|