@pie-lib/text-select 3.0.3-next.38 → 3.0.3-next.39
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/index.js +3 -3
- package/dist/node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js +1 -1
- package/dist/text-select.js +1 -1
- package/dist/token-select/index.js +2 -2
- package/dist/token-select/token.js +6 -6
- package/dist/tokenizer/builder.js +1 -1
- package/dist/tokenizer/controls.js +1 -1
- package/dist/tokenizer/index.js +2 -2
- package/dist/tokenizer/token-text.js +2 -2
- package/dist/utils.js +1 -1
- package/package.json +9 -4
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import e from "./tokenizer/index.js";
|
|
2
|
-
import t,
|
|
3
|
-
import r from "./token-select/index.js";
|
|
1
|
+
import { Tokenizer as e } from "./tokenizer/index.js";
|
|
2
|
+
import { Token as t, TokenTypes as n } from "./token-select/token.js";
|
|
3
|
+
import { TokenSelect as r } from "./token-select/index.js";
|
|
4
4
|
import i from "./text-select.js";
|
|
5
5
|
import { Legend as a } from "./legend.js";
|
|
6
6
|
import { prepareText as o } from "./utils.js";
|
package/dist/text-select.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { normalize as e } from "./tokenizer/builder.js";
|
|
2
2
|
import { TokenTypes as t } from "./token-select/token.js";
|
|
3
|
-
import n from "./token-select/index.js";
|
|
3
|
+
import { TokenSelect as n } from "./token-select/index.js";
|
|
4
4
|
import r from "react";
|
|
5
5
|
import i from "prop-types";
|
|
6
6
|
import { jsx as a } from "react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e,
|
|
1
|
+
import { Token as e, TokenTypes as t } from "./token.js";
|
|
2
2
|
import n from "react";
|
|
3
3
|
import r from "prop-types";
|
|
4
4
|
import { styled as i } from "@mui/material/styles";
|
|
@@ -167,4 +167,4 @@ var p = d("@pie-lib:text-select:token-select"), m = i("div")(() => ({
|
|
|
167
167
|
}
|
|
168
168
|
};
|
|
169
169
|
//#endregion
|
|
170
|
-
export { v as default };
|
|
170
|
+
export { v as TokenSelect, v as default, t as TokenTypes };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e from "../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js";
|
|
1
|
+
import { clsx as e } from "../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js";
|
|
2
2
|
import t from "react";
|
|
3
3
|
import n from "prop-types";
|
|
4
4
|
import { styled as r } from "@mui/material/styles";
|
|
@@ -19,12 +19,12 @@ var l = 3.2, u = 3.4, d = 2, f = r("span")(({ theme: e }) => ({
|
|
|
19
19
|
pointerEvents: "none"
|
|
20
20
|
},
|
|
21
21
|
"&.disabledAndSelected": { backgroundColor: i.blueGrey100() },
|
|
22
|
-
[`@media (min-width: ${e.breakpoints.values.md}px)`]: { "&.
|
|
22
|
+
[`@media (min-width: ${e.breakpoints.values.md}px)`]: { "&.selectableToken:hover": {
|
|
23
23
|
backgroundColor: i.blueGrey300(),
|
|
24
24
|
color: e.palette.common.black,
|
|
25
25
|
"& > *": { backgroundColor: i.blueGrey300() }
|
|
26
26
|
} },
|
|
27
|
-
"&.
|
|
27
|
+
"&.selectedToken": {
|
|
28
28
|
backgroundColor: i.blueGrey100(),
|
|
29
29
|
color: e.palette.common.black,
|
|
30
30
|
lineHeight: `${parseFloat(e.spacing(1)) * l}px`,
|
|
@@ -92,7 +92,7 @@ var x = {
|
|
|
92
92
|
getClassAndIconConfig = () => {
|
|
93
93
|
let { selectable: t, selected: n, className: i, disabled: a, highlight: o, correct: s, animationsDisabled: c, isMissing: l } = this.props, u = "ontouchstart" in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0, d = r.rootClassName;
|
|
94
94
|
if (s === void 0 && n && a) return {
|
|
95
|
-
className: e(d, "
|
|
95
|
+
className: e(d, "selectedToken", "disabledBlack", i),
|
|
96
96
|
Component: f
|
|
97
97
|
};
|
|
98
98
|
if (s !== void 0) {
|
|
@@ -110,7 +110,7 @@ var x = {
|
|
|
110
110
|
Container: g,
|
|
111
111
|
Icon: y
|
|
112
112
|
} : {
|
|
113
|
-
className: e(d, a && "disabled", t && !a && !u && "
|
|
113
|
+
className: e(d, a && "disabled", t && !a && !u && "selectableToken", n && !a && "selectedToken", n && a && "disabledAndSelected", o && t && !a && !n && "highlight", c && "print", i),
|
|
114
114
|
Component: f,
|
|
115
115
|
Container: void 0,
|
|
116
116
|
Icon: void 0
|
|
@@ -131,4 +131,4 @@ var x = {
|
|
|
131
131
|
}
|
|
132
132
|
};
|
|
133
133
|
//#endregion
|
|
134
|
-
export {
|
|
134
|
+
export { S as Token, S as default, x as TokenTypes };
|
|
@@ -121,4 +121,4 @@ var r = (e, t) => t.children ? t.children.reduce(r, e) : t.value ? e + t.value :
|
|
|
121
121
|
}).result;
|
|
122
122
|
};
|
|
123
123
|
//#endregion
|
|
124
|
-
export { f as intersection, m as normalize, s as paragraphs, l as sentences, u as words };
|
|
124
|
+
export { c as handleSentence, f as intersection, m as normalize, s as paragraphs, l as sentences, p as sort, u as words };
|
package/dist/tokenizer/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e from "./controls.js";
|
|
1
|
+
import { Controls as e } from "./controls.js";
|
|
2
2
|
import { paragraphs as t, sentences as n, words as r } from "./builder.js";
|
|
3
3
|
import i from "./token-text.js";
|
|
4
4
|
import a from "react";
|
|
@@ -88,4 +88,4 @@ var m = s("div")(({ disabled: e }) => ({
|
|
|
88
88
|
}
|
|
89
89
|
};
|
|
90
90
|
//#endregion
|
|
91
|
-
export { h as default };
|
|
91
|
+
export { h as Tokenizer, h as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { intersection as e, normalize as t } from "./builder.js";
|
|
2
|
-
import n from "../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js";
|
|
2
|
+
import { clsx as n } from "../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js";
|
|
3
3
|
import { clearSelection as r, getCaretCharacterOffsetWithin as i } from "./selection-utils.js";
|
|
4
4
|
import a from "react";
|
|
5
5
|
import o from "prop-types";
|
|
@@ -82,4 +82,4 @@ var f = l("@pie-lib:text-select:token-text"), p = s("span")(() => ({
|
|
|
82
82
|
}
|
|
83
83
|
};
|
|
84
84
|
//#endregion
|
|
85
|
-
export { g as default };
|
|
85
|
+
export { m as Text, g as default };
|
package/dist/utils.js
CHANGED
package/package.json
CHANGED
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-lib/text-select",
|
|
3
|
-
"version": "3.0.3-next.
|
|
3
|
+
"version": "3.0.3-next.39",
|
|
4
4
|
"description": "Some react components for text selection",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/pie-framework/pie-elements-ng.git",
|
|
8
|
+
"directory": "packages/lib-react/text-select"
|
|
9
|
+
},
|
|
5
10
|
"dependencies": {
|
|
6
11
|
"@emotion/react": "^11.14.0",
|
|
7
|
-
"@emotion/
|
|
12
|
+
"@emotion/styled": "^11.14.1",
|
|
8
13
|
"@mui/icons-material": "^7.3.4",
|
|
9
14
|
"@mui/material": "^7.3.4",
|
|
10
15
|
"@pie-framework/parse-english": "^1.0.0",
|
|
11
|
-
"@pie-lib/render-ui": "6.1.1-next.
|
|
16
|
+
"@pie-lib/render-ui": "6.1.1-next.39",
|
|
12
17
|
"@pie-lib/style-utils": "2.0.2",
|
|
13
|
-
"@pie-lib/translator": "4.0.3-next.
|
|
18
|
+
"@pie-lib/translator": "4.0.3-next.2",
|
|
14
19
|
"debug": "^4.1.1",
|
|
15
20
|
"prop-types": "^15.6.2",
|
|
16
21
|
"@pie-element/shared-lodash": "0.1.1-next.1",
|