@haluo/biz 2.0.39 → 2.0.41-next.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/README.md CHANGED
@@ -8,9 +8,11 @@
8
8
  # npm login
9
9
  # cd ./packages/haluo-biz
10
10
  # npm run build
11
- npm publish --tag=release # 发布到release环境
12
- npm publish --tag=publish # 发布到publish环境
13
- npm publish # 线上环境
11
+ npm publish --tag=beta # 测试版本
12
+ npm publish --tag=next # 预发布版本
13
+ npm publish --tag=release # 待验证的正式版
14
+ npm publish --tag=latest # 最新稳定的正式版(用户默认安装)
15
+ npm publish # 正式发布版本
14
16
  ```
15
17
  # 安装
16
18
  ```
package/dist/haluo-biz.js CHANGED
@@ -4484,6 +4484,7 @@ const _sfc_main$3 = {
4484
4484
  // 话题输入处理
4485
4485
  handleTopicInput(event) {
4486
4486
  var _a;
4487
+ console.log("handleTopicInput", event.key);
4487
4488
  const activeElement = document.activeElement;
4488
4489
  if (activeElement && (activeElement.tagName === "INPUT" || activeElement.tagName === "TEXTAREA")) {
4489
4490
  return;
@@ -4514,7 +4515,7 @@ const _sfc_main$3 = {
4514
4515
  const { textContent: paragraphText, cursorPosition } = this.getParagraphTextExcludingTopics(paragraph, range);
4515
4516
  if (event.key === "#") {
4516
4517
  const afterCursor = paragraphText.substring(cursorPosition);
4517
- if (afterCursor.length > 0 && (afterCursor[0] === "@" || afterCursor[0] === " ")) {
4518
+ if (afterCursor.length > 0 && afterCursor[0] === " ") {
4518
4519
  return;
4519
4520
  }
4520
4521
  setTimeout(() => {
@@ -4532,10 +4533,12 @@ const _sfc_main$3 = {
4532
4533
  setTimeout(() => {
4533
4534
  this.checkAndTriggerSearch(paragraph);
4534
4535
  }, 10);
4536
+ } else {
4537
+ this.hideTopicPopover();
4535
4538
  }
4536
4539
  },
4537
4540
  shouldTriggerSearch(key) {
4538
- return key.length === 1 || key === "Backspace" || key === "Delete";
4541
+ return key !== " " && key.length === 1 || key === "Backspace" || key === "Delete";
4539
4542
  },
4540
4543
  checkAndTriggerSearch(paragraph) {
4541
4544
  const selection = window.getSelection();
@@ -4555,7 +4558,7 @@ const _sfc_main$3 = {
4555
4558
  const hashIndex = beforeCursor.lastIndexOf("#");
4556
4559
  if (hashIndex !== -1) {
4557
4560
  const afterHash = beforeCursor.substring(hashIndex + 1);
4558
- if (afterHash.indexOf(" ") === -1 && afterHash.indexOf("@") === -1) {
4561
+ if (afterHash.replace(/\u00A0/g, " ").indexOf(" ") === -1) {
4559
4562
  if (afterHash.length <= 15) {
4560
4563
  const position = this.getCaretPosition();
4561
4564
  const triggerInfo = {
@@ -6964,7 +6967,7 @@ const _sfc_main = {
6964
6967
  },
6965
6968
  // 是否是摩托范的图片
6966
6969
  isHaloImage(url = "") {
6967
- return url.indexOf("jddmoto") > -1 || url.indexOf("58moto") > -1 || url.indexOf("emotofine") > -1;
6970
+ return url.indexOf("jddmoto") > -1 || url.indexOf("58moto") > -1 || url.indexOf("emotofine") > -1 || url.indexOf("dronefine") > -1;
6968
6971
  },
6969
6972
  // 获取待上传图片列表
6970
6973
  updateUploads() {
@@ -4483,6 +4483,7 @@
4483
4483
  // 话题输入处理
4484
4484
  handleTopicInput(event) {
4485
4485
  var _a;
4486
+ console.log("handleTopicInput", event.key);
4486
4487
  const activeElement = document.activeElement;
4487
4488
  if (activeElement && (activeElement.tagName === "INPUT" || activeElement.tagName === "TEXTAREA")) {
4488
4489
  return;
@@ -4513,7 +4514,7 @@
4513
4514
  const { textContent: paragraphText, cursorPosition } = this.getParagraphTextExcludingTopics(paragraph, range);
4514
4515
  if (event.key === "#") {
4515
4516
  const afterCursor = paragraphText.substring(cursorPosition);
4516
- if (afterCursor.length > 0 && (afterCursor[0] === "@" || afterCursor[0] === " ")) {
4517
+ if (afterCursor.length > 0 && afterCursor[0] === " ") {
4517
4518
  return;
4518
4519
  }
4519
4520
  setTimeout(() => {
@@ -4531,10 +4532,12 @@
4531
4532
  setTimeout(() => {
4532
4533
  this.checkAndTriggerSearch(paragraph);
4533
4534
  }, 10);
4535
+ } else {
4536
+ this.hideTopicPopover();
4534
4537
  }
4535
4538
  },
4536
4539
  shouldTriggerSearch(key) {
4537
- return key.length === 1 || key === "Backspace" || key === "Delete";
4540
+ return key !== " " && key.length === 1 || key === "Backspace" || key === "Delete";
4538
4541
  },
4539
4542
  checkAndTriggerSearch(paragraph) {
4540
4543
  const selection = window.getSelection();
@@ -4554,7 +4557,7 @@
4554
4557
  const hashIndex = beforeCursor.lastIndexOf("#");
4555
4558
  if (hashIndex !== -1) {
4556
4559
  const afterHash = beforeCursor.substring(hashIndex + 1);
4557
- if (afterHash.indexOf(" ") === -1 && afterHash.indexOf("@") === -1) {
4560
+ if (afterHash.replace(/\u00A0/g, " ").indexOf(" ") === -1) {
4558
4561
  if (afterHash.length <= 15) {
4559
4562
  const position = this.getCaretPosition();
4560
4563
  const triggerInfo = {
@@ -6963,7 +6966,7 @@
6963
6966
  },
6964
6967
  // 是否是摩托范的图片
6965
6968
  isHaloImage(url = "") {
6966
- return url.indexOf("jddmoto") > -1 || url.indexOf("58moto") > -1 || url.indexOf("emotofine") > -1;
6969
+ return url.indexOf("jddmoto") > -1 || url.indexOf("58moto") > -1 || url.indexOf("emotofine") > -1 || url.indexOf("dronefine") > -1;
6967
6970
  },
6968
6971
  // 获取待上传图片列表
6969
6972
  updateUploads() {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@haluo/biz",
3
3
  "description": "rich text",
4
- "version": "2.0.39",
4
+ "version": "2.0.41-next.0",
5
5
  "type": "module",
6
6
  "module": "./dist/haluo-biz.js",
7
7
  "main": "./dist/haluo-biz.umd.cjs",
@@ -20,7 +20,9 @@
20
20
  "build": "vue-tsc --noEmit && vite build",
21
21
  "build:watch": "vue-tsc --noEmit && vite build --watch",
22
22
  "preview": "vite preview",
23
- "pub": "npm publish"
23
+ "next": "npm version prerelease --preid=next",
24
+ "pub": "npm publish",
25
+ "pub:next": "npm publish --tag=next"
24
26
  },
25
27
  "dependencies": {
26
28
  "element-plus": "^2.2.28",