cnhis-design-vue 3.4.0-beta.75 → 3.4.0-beta.77

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.
@@ -37,17 +37,19 @@ function useOther(canvas, propItems, emits, computedX, computedY, fixedNoRisePoi
37
37
  }
38
38
  }
39
39
  function adjustEventsForCrossDay(eventList) {
40
+ var _a, _b;
40
41
  const currentColumnEvents = [...eventList];
41
42
  const sortedEvents = currentColumnEvents.sort((a, b) => (b.trueLeft || 0) - (a.trueLeft || 0));
42
43
  for (let i = 0; i < sortedEvents.length; i++) {
43
44
  const event = sortedEvents[i];
44
45
  const nextEvent = sortedEvents[i + 1];
45
- const prevLeft = event.trueLeft - xCellWidth;
46
+ const currentLeft = (_a = event.trueLeft) != null ? _a : 0;
47
+ const prevLeft = currentLeft - xCellWidth;
46
48
  if (prevLeft >= originX) {
47
49
  event.set("left", prevLeft);
48
50
  event.trueLeft = prevLeft;
49
51
  }
50
- if (nextEvent && (event.trueLeft || 0) - (nextEvent.trueLeft || 0) > xCellWidth + 1) {
52
+ if (nextEvent && currentLeft - ((_b = nextEvent.trueLeft) != null ? _b : 0) > xCellWidth + 1) {
51
53
  break;
52
54
  }
53
55
  }
@@ -4556,6 +4556,7 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<import("vue"
4556
4556
  loading: boolean;
4557
4557
  };
4558
4558
  content: import("vue").ComputedRef<string>;
4559
+ normalizeMarkdown: (text: string) => string;
4559
4560
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
4560
4561
  data: {
4561
4562
  type: import("vue").PropType<import("../../shared/types").AnyObject>;
@@ -4557,6 +4557,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
4557
4557
  loading: boolean;
4558
4558
  };
4559
4559
  content: import("vue").ComputedRef<string>;
4560
+ normalizeMarkdown: (text: string) => string;
4560
4561
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
4561
4562
  data: {
4562
4563
  type: PropType<AnyObject>;
@@ -1312,6 +1312,7 @@ declare const _default: import("vue").DefineComponent<{}, {
1312
1312
  loading: boolean;
1313
1313
  };
1314
1314
  content: import("vue").ComputedRef<string>;
1315
+ normalizeMarkdown: (text: string) => string;
1315
1316
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
1316
1317
  data: {
1317
1318
  type: import("vue").PropType<AnyObject>;
@@ -148,6 +148,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
148
148
  loading: boolean;
149
149
  };
150
150
  content: import("vue").ComputedRef<string>;
151
+ normalizeMarkdown: (text: string) => string;
151
152
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
152
153
  data: {
153
154
  type: PropType<AnyObject>;
@@ -19,13 +19,23 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
19
19
  }
20
20
  },
21
21
  setup(__props) {
22
- const mdhtml = markdownIt({ html: true });
22
+ const mdhtml = markdownIt({ html: true, breaks: true });
23
23
  const props = __props;
24
24
  useData();
25
25
  const content = computed(() => {
26
26
  var _a;
27
- return mdhtml.render(((_a = props.data.content) == null ? void 0 : _a.msg) || "");
27
+ const raw = ((_a = props.data.content) == null ? void 0 : _a.msg) || "";
28
+ const normalized = normalizeMarkdown(raw);
29
+ return mdhtml.render(normalized);
28
30
  });
31
+ function normalizeMarkdown(text) {
32
+ let s = text.replace(/\r\n/g, "\n");
33
+ s = s.replace(/(^|\n)(#{1,6})[,、,]/g, (_m, p1, p2) => `${p1}${p2} `);
34
+ s = s.replace(/(^|\n)(#{1,6})(?!\s)/g, (_m, p1, p2) => `${p1}${p2} `);
35
+ s = s.replace(/([^\n])\s*(#{1,6})(?=\S)/g, (_m, pre, hashes) => `${pre}
36
+ ${hashes} `);
37
+ return s;
38
+ }
29
39
  return (_ctx, _cache) => {
30
40
  return openBlock(), createElementBlock("div", _hoisted_1, [
31
41
  createElementVNode("div", {