@hi-ui/highlighter 4.1.0 → 5.0.0-canary.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @hi-ui/highlighter
2
2
 
3
+ ## 5.0.0-canary.0
4
+
5
+ ### Major Changes
6
+
7
+ - 225ebaa51: feat: 组件的 package.json 中的 exports 统一加上 types 配置 (5.0)
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [225ebaa51]
12
+ - Updated dependencies [428716024]
13
+ - @hi-ui/core@5.0.0-canary.0
14
+ - @hi-ui/classname@5.0.0-canary.0
15
+ - @hi-ui/env@5.0.0-canary.0
16
+
17
+ ## 4.1.1
18
+
19
+ ### Patch Changes
20
+
21
+ - [#3109](https://github.com/XiaoMi/hiui/pull/3109) [`8dc162d`](https://github.com/XiaoMi/hiui/commit/8dc162d6e7ef7a174f946b8ccdbecdd0f4731338) Thanks [@zyprepare](https://github.com/zyprepare)! - fix(highlighter): 修复作为子组件使用时匹配问题
22
+
3
23
  ## 4.1.0
4
24
 
5
25
  ### Minor Changes
@@ -38,6 +38,7 @@ var Highlighter = /*#__PURE__*/React.forwardRef(function (_a, ref) {
38
38
  children = _a$children === void 0 ? null : _a$children,
39
39
  rest = tslib.__rest(_a, ["prefixCls", "className", "keyword", "highlightClassName", "highlightStyle", "children"]);
40
40
  var startIndex = React.useRef(0);
41
+ startIndex.current = 0;
41
42
  if (!keyword) return children;
42
43
  if (typeof children !== 'string') return children;
43
44
  // 支持多个匹配高亮
@@ -12,7 +12,7 @@
12
12
  Object.defineProperty(exports, '__esModule', {
13
13
  value: true
14
14
  });
15
- var css_248z = ".hi-v4-highlighter--matched {color: var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa));}";
15
+ var css_248z = ".hi-v5-highlighter--matched {color: var(--hi-v5-color-primary-500, var(--hi-v5-color-brandblue-500, #2660ff));}";
16
16
  var __styleInject__ = require('@hi-ui/style-inject')["default"];
17
17
  __styleInject__(css_248z);
18
18
  exports["default"] = css_248z;
@@ -26,6 +26,7 @@ var Highlighter = /*#__PURE__*/forwardRef(function (_a, ref) {
26
26
  children = _a$children === void 0 ? null : _a$children,
27
27
  rest = __rest(_a, ["prefixCls", "className", "keyword", "highlightClassName", "highlightStyle", "children"]);
28
28
  var startIndex = useRef(0);
29
+ startIndex.current = 0;
29
30
  if (!keyword) return children;
30
31
  if (typeof children !== 'string') return children;
31
32
  // 支持多个匹配高亮
@@ -8,6 +8,6 @@
8
8
  * LICENSE file in the root directory of this source tree.
9
9
  */
10
10
  import __styleInject__ from '@hi-ui/style-inject';
11
- var css_248z = ".hi-v4-highlighter--matched {color: var(--hi-v4-color-primary-500, var(--hi-v4-color-brandblue-500, #237ffa));}";
11
+ var css_248z = ".hi-v5-highlighter--matched {color: var(--hi-v5-color-primary-500, var(--hi-v5-color-brandblue-500, #2660ff));}";
12
12
  __styleInject__(css_248z);
13
13
  export { css_248z as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hi-ui/highlighter",
3
- "version": "4.1.0",
3
+ "version": "5.0.0-canary.0",
4
4
  "description": "A sub-package for @hi-ui/hiui.",
5
5
  "keywords": [],
6
6
  "author": "HiUI <mi-hiui@xiaomi.com>",
@@ -20,7 +20,8 @@
20
20
  "exports": {
21
21
  ".": {
22
22
  "require": "./lib/cjs/index.js",
23
- "default": "./lib/esm/index.js"
23
+ "default": "./lib/esm/index.js",
24
+ "types": "./lib/types/index.d.ts"
24
25
  }
25
26
  },
26
27
  "publishConfig": {
@@ -43,17 +44,17 @@
43
44
  "url": "https://github.com/XiaoMi/hiui/issues"
44
45
  },
45
46
  "dependencies": {
46
- "@hi-ui/classname": "^4.0.5",
47
- "@hi-ui/env": "^4.0.5"
47
+ "@hi-ui/classname": "^5.0.0-canary.0",
48
+ "@hi-ui/env": "^5.0.0-canary.0"
48
49
  },
49
50
  "peerDependencies": {
50
- "@hi-ui/core": ">=4.0.8",
51
+ "@hi-ui/core": ">=5.0.0-canary.0",
51
52
  "react": ">=16.8.6",
52
53
  "react-dom": ">=16.8.6"
53
54
  },
54
55
  "devDependencies": {
55
- "@hi-ui/core": "^4.0.8",
56
- "@hi-ui/core-css": "^4.1.5",
56
+ "@hi-ui/core": "^5.0.0-canary.0",
57
+ "@hi-ui/core-css": "^5.0.0-canary.0",
57
58
  "react": "^17.0.1",
58
59
  "react-dom": "^17.0.1"
59
60
  }