@opendesign-plus-test/components 0.0.1-rc.251 → 0.0.1-rc.253

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.
Files changed (85) hide show
  1. package/dist/chunk-OElCookieNotice.cjs.js +1 -1
  2. package/dist/chunk-OElCookieNotice.es.js +4 -2
  3. package/dist/components/article/OArticle.vue.d.ts +206 -14
  4. package/dist/components/article/components/ArticleTitle.vue.d.ts +22 -0
  5. package/dist/components/{markdown/components/MarkdownPageTitle.vue.d.ts → article/components/DocTitle.vue.d.ts} +6 -5
  6. package/dist/components/article/index.d.ts +131 -25
  7. package/dist/components/article/types.d.ts +8 -2
  8. package/dist/components/doc-layout/ODocLayout.vue.d.ts +38 -0
  9. package/dist/components/doc-layout/index.d.ts +59 -0
  10. package/dist/components/markdown/OMarkdown.vue.d.ts +9 -16
  11. package/dist/components/markdown/index.d.ts +19 -45
  12. package/dist/components/summit/types.d.ts +20 -7
  13. package/dist/components/summit/utils.d.ts +11 -1
  14. package/dist/components.cjs.js +44 -44
  15. package/dist/components.css +1 -1
  16. package/dist/components.es.js +13146 -12861
  17. package/dist/index.d.ts +1 -0
  18. package/dist/treeshaking/_virtual/icon-menu-fold.mjs +20 -0
  19. package/dist/treeshaking/_virtual/icon-menu-unfold.mjs +20 -0
  20. package/dist/treeshaking/_virtual/icon-tips.mjs +13 -2
  21. package/dist/treeshaking/_virtual/icon-tips2.mjs +2 -13
  22. package/dist/treeshaking/components/anchor-bar/OAnchorBar.css +32 -32
  23. package/dist/treeshaking/components/anchor-bar/OAnchorBar.vue.mjs +1 -1
  24. package/dist/treeshaking/components/article/OArticle.css +18 -124
  25. package/dist/treeshaking/components/article/OArticle.vue.d.ts +206 -14
  26. package/dist/treeshaking/components/article/OArticle.vue.mjs +1 -1
  27. package/dist/treeshaking/components/article/OArticle.vue2.mjs +48 -82
  28. package/dist/treeshaking/components/article/OArticleList.css +7 -6
  29. package/dist/treeshaking/components/article/OArticleList.vue.mjs +48 -34
  30. package/dist/treeshaking/components/article/components/ArticleTitle.css +123 -0
  31. package/dist/treeshaking/components/article/components/ArticleTitle.vue.d.ts +22 -0
  32. package/dist/treeshaking/components/article/components/ArticleTitle.vue.mjs +7 -0
  33. package/dist/treeshaking/components/article/components/ArticleTitle.vue2.mjs +97 -0
  34. package/dist/treeshaking/components/article/components/DocTitle.css +246 -0
  35. package/dist/treeshaking/components/{markdown/components/MarkdownPageTitle.vue.d.ts → article/components/DocTitle.vue.d.ts} +6 -5
  36. package/dist/treeshaking/components/article/components/DocTitle.vue.mjs +7 -0
  37. package/dist/treeshaking/components/{markdown/components/MarkdownPageTitle.vue2.mjs → article/components/DocTitle.vue2.mjs} +131 -80
  38. package/dist/treeshaking/components/article/index.d.ts +131 -25
  39. package/dist/treeshaking/components/article/types.d.ts +8 -2
  40. package/dist/treeshaking/components/article-anchor/OArticleAnchor.css +4 -4
  41. package/dist/treeshaking/components/article-anchor/OArticleAnchor.vue.mjs +1 -1
  42. package/dist/treeshaking/components/article-anchor/OArticleAnchor.vue2.mjs +4 -5
  43. package/dist/treeshaking/components/doc-layout/ODocLayout.css +271 -0
  44. package/dist/treeshaking/components/doc-layout/ODocLayout.vue.d.ts +38 -0
  45. package/dist/treeshaking/components/doc-layout/ODocLayout.vue.mjs +7 -0
  46. package/dist/treeshaking/components/doc-layout/ODocLayout.vue2.mjs +165 -0
  47. package/dist/treeshaking/components/doc-layout/index.d.ts +59 -0
  48. package/dist/treeshaking/components/doc-layout/index.mjs +9 -0
  49. package/dist/treeshaking/components/events/OEventsList.vue.mjs +1 -1
  50. package/dist/treeshaking/components/markdown/OMarkdown.vue.d.ts +9 -16
  51. package/dist/treeshaking/components/markdown/OMarkdown.vue.mjs +1 -1
  52. package/dist/treeshaking/components/markdown/OMarkdown.vue2.mjs +68 -36
  53. package/dist/treeshaking/components/markdown/OMarkdown2.css +3 -3
  54. package/dist/treeshaking/components/markdown/components/MarkdownTitle.css +22 -22
  55. package/dist/treeshaking/components/markdown/components/MarkdownTitle.vue.mjs +1 -1
  56. package/dist/treeshaking/components/markdown/components/MarkdownTitle.vue2.mjs +11 -5
  57. package/dist/treeshaking/components/markdown/index.d.ts +19 -45
  58. package/dist/treeshaking/components/meeting/OMeetingMyCalendar.vue.mjs +5 -1
  59. package/dist/treeshaking/components/meeting/OMeetingSigCalendar.vue.mjs +1 -1
  60. package/dist/treeshaking/components/meeting/components/OMeetingCalendarList.vue.mjs +5 -1
  61. package/dist/treeshaking/components/recursion-menu/ORecursionMenu.vue.mjs +1 -1
  62. package/dist/treeshaking/components/summit/OSummitLive.css +38 -22
  63. package/dist/treeshaking/components/summit/OSummitLive.vue.mjs +1 -1
  64. package/dist/treeshaking/components/summit/OSummitLive.vue2.mjs +37 -10
  65. package/dist/treeshaking/components/summit/OSummitSchedule.css +33 -33
  66. package/dist/treeshaking/components/summit/OSummitSchedule.vue.mjs +1 -1
  67. package/dist/treeshaking/components/summit/OSummitSchedule.vue2.mjs +7 -13
  68. package/dist/treeshaking/components/summit/components/OSummitTabs.css +31 -30
  69. package/dist/treeshaking/components/summit/components/OSummitTabs.vue.mjs +1 -1
  70. package/dist/treeshaking/components/summit/types.d.ts +20 -7
  71. package/dist/treeshaking/components/summit/utils.d.ts +11 -1
  72. package/dist/treeshaking/components/summit/utils.mjs +30 -0
  73. package/dist/treeshaking/components/user-center/OUserInfo.vue2.mjs +1 -1
  74. package/dist/treeshaking/i18n/en.mjs +2 -1
  75. package/dist/treeshaking/i18n/zh.mjs +2 -1
  76. package/dist/treeshaking/index.d.ts +1 -0
  77. package/dist/treeshaking/index.mjs +2 -0
  78. package/package.json +4 -4
  79. package/dist/components/markdown/replacer/h1.d.ts +0 -11
  80. package/dist/components/meeting/components/OMeetingCalendarSelector.vue.d.ts +0 -664
  81. package/dist/treeshaking/components/markdown/components/MarkdownPageTitle.css +0 -261
  82. package/dist/treeshaking/components/markdown/components/MarkdownPageTitle.vue.mjs +0 -7
  83. package/dist/treeshaking/components/markdown/replacer/h1.d.ts +0 -11
  84. package/dist/treeshaking/components/markdown/replacer/h1.mjs +0 -29
  85. package/dist/treeshaking/components/meeting/components/OMeetingCalendarSelector.vue.d.ts +0 -664
@@ -1,45 +1,56 @@
1
- import { defineComponent, useCssVars, computed, toValue, ref, onMounted, nextTick, watch, openBlock, createElementBlock, Fragment, createElementVNode, normalizeClass, unref, withDirectives, createBlock, withCtx, createVNode, createCommentVNode, toDisplayString, createTextVNode } from "vue";
2
- import { useWindowSize } from "@vueuse/core";
3
- import { OIcon, OPopover, ODivider, OLink, ODialog } from "@opensig/opendesign";
4
- import { useScreen } from "@opendesign-plus/composables";
1
+ import { defineComponent, useCssVars, computed, toValue, ref, openBlock, createElementBlock, Fragment, createElementVNode, normalizeClass, unref, toDisplayString, withDirectives, createBlock, withCtx, createVNode, createCommentVNode, createTextVNode } from "vue";
2
+ import { useMessage, useToast, OIcon, OPopover, ODivider, OLink, ODialog } from "@opensig/opendesign";
3
+ import { useScreen, useClipboard } from "@opendesign-plus/composables";
5
4
  import { buildVueDompurifyHTMLDirective } from "vue-dompurify-html";
6
5
  import { useI18n } from "../../../i18n/index.mjs";
7
6
  import IconOutlink from "../../../_virtual/icon-outlink.mjs";
8
7
  import IconMore from "../../../_virtual/icon-more.mjs";
9
8
  import IconDownload from "../../../_virtual/icon-download.mjs";
10
9
  import IconStar from "../../../_virtual/icon-star.mjs";
11
- const _hoisted_1 = { class: "o-md-page-title-content" };
12
- const _hoisted_2 = { class: "o-md-page-title-text __mounted" };
10
+ import IconLink from "../../../_virtual/icon-link.mjs";
11
+ const _hoisted_1 = { class: "o-doc-title-content" };
12
+ const _hoisted_2 = {
13
+ key: 0,
14
+ class: "o-doc-title-text"
15
+ };
13
16
  const _hoisted_3 = {
17
+ key: 1,
18
+ class: "o-doc-title-text __mounted"
19
+ };
20
+ const _hoisted_4 = {
14
21
  key: 0,
15
- class: "o-md-page-title-actions"
22
+ class: "o-doc-title-actions"
16
23
  };
17
- const _hoisted_4 = { class: "o-md-page-title-actions-left" };
18
- const _hoisted_5 = {
24
+ const _hoisted_5 = { class: "o-doc-title-actions-left" };
25
+ const _hoisted_6 = {
19
26
  key: 0,
20
- class: "o-md-page-title-update-time"
27
+ class: "o-doc-title-update-time"
21
28
  };
22
- const _hoisted_6 = { class: "o-md-page-dlg-action-box-container" };
23
- const _hoisted_7 = { class: "o-md-page-dlg-action-box-icon" };
24
- const _hoisted_8 = { class: "o-md-page-dlg-action-box-label" };
25
- const _hoisted_9 = { class: "o-md-page-dlg-action-box-icon" };
26
- const _hoisted_10 = { class: "o-md-page-dlg-action-box-label" };
27
- const _hoisted_11 = { class: "o-md-page-dlg-action-box-icon" };
28
- const _hoisted_12 = { class: "o-md-page-dlg-action-box-label" };
29
+ const _hoisted_7 = { class: "o-doc-title-dlg-action-box-container" };
30
+ const _hoisted_8 = { class: "o-doc-title-dlg-action-box-icon" };
31
+ const _hoisted_9 = { class: "o-doc-title-dlg-action-box-label" };
32
+ const _hoisted_10 = { class: "o-doc-title-dlg-action-box-icon" };
33
+ const _hoisted_11 = { class: "o-doc-title-dlg-action-box-label" };
34
+ const _hoisted_12 = { class: "o-doc-title-dlg-action-box-icon" };
35
+ const _hoisted_13 = { class: "o-doc-title-dlg-action-box-label" };
36
+ const _hoisted_14 = { class: "o-doc-title-dlg-action-box-icon" };
37
+ const _hoisted_15 = { class: "o-doc-title-dlg-action-box-label" };
29
38
  const _sfc_main = /* @__PURE__ */ defineComponent({
30
- __name: "MarkdownPageTitle",
39
+ __name: "DocTitle",
31
40
  props: {
32
41
  el: {},
42
+ title: {},
33
43
  bgImage: {},
34
44
  sourceUrl: {},
35
45
  updateTime: {},
36
46
  enableDownload: { default: false },
37
- enableStar: { default: false }
47
+ enableStar: { default: false },
48
+ enableCopyLink: { default: false }
38
49
  },
39
50
  emits: ["download", "collect"],
40
51
  setup(__props, { emit: __emit }) {
41
52
  useCssVars((_ctx) => ({
42
- "v6981a063": bgImage.value
53
+ "bc7b9dec": bgImage.value
43
54
  }));
44
55
  const props = __props;
45
56
  const emit = __emit;
@@ -51,7 +62,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
51
62
  const updateTime = computed(() => toValue(props.updateTime));
52
63
  const enableDownload = computed(() => toValue(props.enableDownload));
53
64
  const enableStar = computed(() => toValue(props.enableStar));
54
- const showActions = computed(() => sourceUrl.value || updateTime.value || enableDownload.value || enableStar.value);
65
+ const enableCopyLink = computed(() => toValue(props.enableCopyLink));
66
+ const showActions = computed(() => sourceUrl.value || updateTime.value || enableDownload.value || enableStar.value || enableCopyLink.value);
55
67
  const showDivider = computed(() => sourceUrl.value && (enableDownload.value || enableStar.value));
56
68
  const vDompurifyHtml = buildVueDompurifyHTMLDirective({
57
69
  default: {
@@ -59,59 +71,61 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
59
71
  }
60
72
  });
61
73
  const { lePadV } = useScreen();
62
- const { width } = useWindowSize();
63
74
  const { t } = useI18n();
64
- const titleRef = ref();
65
- const isFirstH1 = ref(false);
75
+ const message = useMessage();
76
+ const toast = useToast();
66
77
  const showActionsDlg = ref(false);
67
- const checkShowDownloadPdf = () => {
68
- var _a;
69
- const mdBodyH1 = document.querySelector(".o-markdown-body h1");
70
- const myH1 = (_a = titleRef.value) == null ? void 0 : _a.querySelector("h1");
71
- isFirstH1.value = myH1 === mdBodyH1;
72
- };
73
- onMounted(async () => {
74
- await nextTick();
75
- checkShowDownloadPdf();
76
- });
77
- watch([lePadV, width], async () => {
78
- await nextTick();
79
- checkShowDownloadPdf();
80
- });
81
78
  const openSourceUrl = () => {
82
79
  window.open(sourceUrl.value, "_blank", "noopener,noreferrer");
80
+ showActionsDlg.value = false;
81
+ };
82
+ const copyLink = async () => {
83
+ const success = await useClipboard(window.location.href);
84
+ if (success) {
85
+ if (lePadV.value) {
86
+ toast.show(t("common.copySuccess"));
87
+ showActionsDlg.value = false;
88
+ } else {
89
+ message.success(t("common.copySuccess"));
90
+ }
91
+ }
92
+ };
93
+ const onDownload = () => {
94
+ emit("download");
95
+ showActionsDlg.value = false;
96
+ };
97
+ const onCollect = () => {
98
+ emit("collect");
99
+ showActionsDlg.value = false;
83
100
  };
84
101
  return (_ctx, _cache) => {
85
102
  var _a;
86
103
  return openBlock(), createElementBlock(Fragment, null, [
87
104
  createElementVNode("div", {
88
- ref_key: "titleRef",
89
- ref: titleRef,
90
- class: normalizeClass(["o-md-page-title", {
91
- "is-simple": !isFirstH1.value || unref(lePadV),
92
- "first-h1": isFirstH1.value,
93
- "more-h1": !isFirstH1.value
105
+ class: normalizeClass(["o-doc-title", {
106
+ "is-simple": unref(lePadV),
107
+ "first-h1": true
94
108
  }])
95
109
  }, [
96
110
  createElementVNode("div", _hoisted_1, [
97
- withDirectives(createElementVNode("div", _hoisted_2, null, 512), [
111
+ __props.title ? (openBlock(), createElementBlock("div", _hoisted_2, [
112
+ createElementVNode("h1", null, toDisplayString(__props.title), 1)
113
+ ])) : withDirectives((openBlock(), createElementBlock("div", _hoisted_3, null, 512)), [
98
114
  [unref(vDompurifyHtml), (_a = __props.el) == null ? void 0 : _a.outerHTML]
99
115
  ])
100
116
  ]),
101
- isFirstH1.value && showActions.value ? (openBlock(), createElementBlock("div", _hoisted_3, [
102
- unref(lePadV) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
103
- showActions.value ? (openBlock(), createBlock(unref(OIcon), {
104
- key: 0,
105
- class: "o-md-page-title-icon-more",
106
- onClick: _cache[0] || (_cache[0] = ($event) => showActionsDlg.value = true)
107
- }, {
108
- default: withCtx(() => [
109
- createVNode(unref(IconMore))
110
- ]),
111
- _: 1
112
- })) : createCommentVNode("", true)
113
- ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
114
- createElementVNode("div", _hoisted_4, [
117
+ showActions.value ? (openBlock(), createElementBlock("div", _hoisted_4, [
118
+ unref(lePadV) ? (openBlock(), createBlock(unref(OIcon), {
119
+ key: 0,
120
+ class: "o-doc-title-icon-more",
121
+ onClick: _cache[0] || (_cache[0] = ($event) => showActionsDlg.value = true)
122
+ }, {
123
+ default: withCtx(() => [
124
+ createVNode(unref(IconMore))
125
+ ]),
126
+ _: 1
127
+ })) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
128
+ createElementVNode("div", _hoisted_5, [
115
129
  enableDownload.value ? (openBlock(), createBlock(unref(OPopover), {
116
130
  key: 0,
117
131
  position: "top",
@@ -120,7 +134,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
120
134
  }, {
121
135
  target: withCtx(() => [
122
136
  createVNode(unref(OIcon), {
123
- class: "o-md-page-title-icon-download",
137
+ class: "o-doc-title-icon-download",
124
138
  onClick: _cache[1] || (_cache[1] = ($event) => emit("download"))
125
139
  }, {
126
140
  default: withCtx(() => [
@@ -142,7 +156,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
142
156
  }, {
143
157
  target: withCtx(() => [
144
158
  createVNode(unref(OIcon), {
145
- class: "o-md-page-title-icon-star",
159
+ class: "o-doc-title-icon-star",
146
160
  onClick: _cache[2] || (_cache[2] = ($event) => emit("collect"))
147
161
  }, {
148
162
  default: withCtx(() => [
@@ -156,14 +170,36 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
156
170
  ]),
157
171
  _: 1
158
172
  })) : createCommentVNode("", true),
159
- showDivider.value ? (openBlock(), createBlock(unref(ODivider), {
173
+ enableCopyLink.value ? (openBlock(), createBlock(unref(OPopover), {
160
174
  key: 2,
175
+ position: "top",
176
+ trigger: "hover",
177
+ offset: 12
178
+ }, {
179
+ target: withCtx(() => [
180
+ createVNode(unref(OIcon), {
181
+ class: "o-doc-title-icon-copy",
182
+ onClick: copyLink
183
+ }, {
184
+ default: withCtx(() => [
185
+ createVNode(unref(IconLink))
186
+ ]),
187
+ _: 1
188
+ })
189
+ ]),
190
+ default: withCtx(() => [
191
+ createElementVNode("span", null, toDisplayString(unref(t)("common.copyLink")), 1)
192
+ ]),
193
+ _: 1
194
+ })) : createCommentVNode("", true),
195
+ showDivider.value ? (openBlock(), createBlock(unref(ODivider), {
196
+ key: 3,
161
197
  direction: "v",
162
198
  style: { "--o-divider-label-gap": "0" }
163
199
  })) : createCommentVNode("", true),
164
200
  sourceUrl.value ? (openBlock(), createBlock(unref(OLink), {
165
- key: 3,
166
- class: "o-md-page-title-source-code",
201
+ key: 4,
202
+ class: "o-doc-title-source-code",
167
203
  size: "large",
168
204
  href: sourceUrl.value,
169
205
  target: "_blank",
@@ -171,7 +207,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
171
207
  }, {
172
208
  default: withCtx(() => [
173
209
  createTextVNode(toDisplayString(unref(t)("md.gitSource")) + " ", 1),
174
- createVNode(unref(OIcon), { class: "o-md-page-title-icon-outlink" }, {
210
+ createVNode(unref(OIcon), { class: "o-doc-title-icon-outlink" }, {
175
211
  default: withCtx(() => [
176
212
  createVNode(unref(IconOutlink))
177
213
  ]),
@@ -181,14 +217,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
181
217
  _: 1
182
218
  }, 8, ["href"])) : createCommentVNode("", true)
183
219
  ]),
184
- updateTime.value ? (openBlock(), createElementBlock("span", _hoisted_5, toDisplayString(unref(t)("md.updateTime")) + toDisplayString(updateTime.value), 1)) : createCommentVNode("", true)
220
+ updateTime.value ? (openBlock(), createElementBlock("span", _hoisted_6, toDisplayString(unref(t)("md.updateTime")) + toDisplayString(updateTime.value), 1)) : createCommentVNode("", true)
185
221
  ], 64))
186
222
  ])) : createCommentVNode("", true)
187
223
  ], 2),
188
224
  unref(lePadV) && showActions.value ? (openBlock(), createBlock(unref(ODialog), {
189
225
  key: 0,
190
226
  visible: showActionsDlg.value,
191
- "onUpdate:visible": _cache[5] || (_cache[5] = ($event) => showActionsDlg.value = $event),
227
+ "onUpdate:visible": _cache[3] || (_cache[3] = ($event) => showActionsDlg.value = $event),
192
228
  size: "medium",
193
229
  "phone-half-full": ""
194
230
  }, {
@@ -196,13 +232,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
196
232
  createTextVNode(toDisplayString(unref(t)("md.moreActions")), 1)
197
233
  ]),
198
234
  default: withCtx(() => [
199
- createElementVNode("div", _hoisted_6, [
235
+ createElementVNode("div", _hoisted_7, [
200
236
  enableDownload.value ? (openBlock(), createElementBlock("div", {
201
237
  key: 0,
202
- class: "o-md-page-dlg-action-box",
203
- onClick: _cache[3] || (_cache[3] = ($event) => emit("download"))
238
+ class: "o-doc-title-dlg-action-box",
239
+ onClick: onDownload
204
240
  }, [
205
- createElementVNode("div", _hoisted_7, [
241
+ createElementVNode("div", _hoisted_8, [
206
242
  createVNode(unref(OIcon), null, {
207
243
  default: withCtx(() => [
208
244
  createVNode(unref(IconDownload))
@@ -210,14 +246,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
210
246
  _: 1
211
247
  })
212
248
  ]),
213
- createElementVNode("div", _hoisted_8, toDisplayString(unref(t)("md.downloadDoc")), 1)
249
+ createElementVNode("div", _hoisted_9, toDisplayString(unref(t)("md.downloadDoc")), 1)
214
250
  ])) : createCommentVNode("", true),
215
251
  enableStar.value ? (openBlock(), createElementBlock("div", {
216
252
  key: 1,
217
- class: "o-md-page-dlg-action-box",
218
- onClick: _cache[4] || (_cache[4] = ($event) => emit("collect"))
253
+ class: "o-doc-title-dlg-action-box",
254
+ onClick: onCollect
219
255
  }, [
220
- createElementVNode("div", _hoisted_9, [
256
+ createElementVNode("div", _hoisted_10, [
221
257
  createVNode(unref(OIcon), null, {
222
258
  default: withCtx(() => [
223
259
  createVNode(unref(IconStar))
@@ -225,14 +261,29 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
225
261
  _: 1
226
262
  })
227
263
  ]),
228
- createElementVNode("div", _hoisted_10, toDisplayString(unref(t)("md.starDoc")), 1)
264
+ createElementVNode("div", _hoisted_11, toDisplayString(unref(t)("md.starDoc")), 1)
229
265
  ])) : createCommentVNode("", true),
230
- sourceUrl.value ? (openBlock(), createElementBlock("div", {
266
+ enableCopyLink.value ? (openBlock(), createElementBlock("div", {
231
267
  key: 2,
232
- class: "o-md-page-dlg-action-box",
268
+ class: "o-doc-title-dlg-action-box",
269
+ onClick: copyLink
270
+ }, [
271
+ createElementVNode("div", _hoisted_12, [
272
+ createVNode(unref(OIcon), null, {
273
+ default: withCtx(() => [
274
+ createVNode(unref(IconLink))
275
+ ]),
276
+ _: 1
277
+ })
278
+ ]),
279
+ createElementVNode("div", _hoisted_13, toDisplayString(unref(t)("common.copyLink")), 1)
280
+ ])) : createCommentVNode("", true),
281
+ sourceUrl.value ? (openBlock(), createElementBlock("div", {
282
+ key: 3,
283
+ class: "o-doc-title-dlg-action-box",
233
284
  onClick: openSourceUrl
234
285
  }, [
235
- createElementVNode("div", _hoisted_11, [
286
+ createElementVNode("div", _hoisted_14, [
236
287
  createVNode(unref(OIcon), null, {
237
288
  default: withCtx(() => [
238
289
  createVNode(unref(IconOutlink))
@@ -240,7 +291,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
240
291
  _: 1
241
292
  })
242
293
  ]),
243
- createElementVNode("div", _hoisted_12, toDisplayString(unref(t)("md.gitSource")), 1)
294
+ createElementVNode("div", _hoisted_15, toDisplayString(unref(t)("md.gitSource")), 1)
244
295
  ])) : createCommentVNode("", true)
245
296
  ])
246
297
  ]),
@@ -7,36 +7,134 @@ declare const OArticle: {
7
7
  community?: string;
8
8
  prev?: import('../article-pagination').OArticlePaginationItemT | null;
9
9
  next?: import('../article-pagination').OArticlePaginationItemT | null;
10
+ type?: "article" | "doc";
10
11
  disableH2?: boolean;
11
12
  disableTable?: boolean;
12
13
  disableImg?: boolean;
13
14
  disableCode?: boolean;
14
15
  updateTime?: string;
15
- markdownBodyClass?: string;
16
- removeFirstTopMargin?: boolean;
17
- autoHideFirstH1?: boolean;
16
+ sourceUrl?: string;
17
+ enableDownload?: boolean;
18
+ enableStar?: boolean;
19
+ enableCopyLink?: boolean;
18
20
  prevLabel?: string;
19
21
  nextLabel?: string;
20
- divider?: boolean;
21
22
  radius?: string;
22
23
  }> & Readonly<{
23
24
  onNavigate?: ((type: "prev" | "next", item: import('../article-pagination').OArticlePaginationItemT) => any) | undefined;
25
+ onDownload?: (() => any) | undefined;
26
+ onCollect?: (() => any) | undefined;
24
27
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
25
28
  navigate: (type: "prev" | "next", item: import('../article-pagination').OArticlePaginationItemT) => any;
29
+ download: () => any;
30
+ collect: () => any;
26
31
  }, import('vue').PublicProps, {
32
+ type: "article" | "doc";
27
33
  disableH2: boolean;
28
34
  disableTable: boolean;
29
35
  disableImg: boolean;
30
36
  disableCode: boolean;
31
- markdownBodyClass: string;
32
37
  prev: import('../article-pagination').OArticlePaginationItemT | null;
33
38
  next: import('../article-pagination').OArticlePaginationItemT | null;
34
- divider: boolean;
35
39
  radius: string;
36
40
  tags: string[];
37
- removeFirstTopMargin: boolean;
38
- autoHideFirstH1: boolean;
39
- }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
41
+ enableDownload: boolean;
42
+ enableStar: boolean;
43
+ enableCopyLink: boolean;
44
+ }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
45
+ markdownRef: ({
46
+ $: import('vue').ComponentInternalInstance;
47
+ $data: {};
48
+ $props: {
49
+ readonly disableH2?: boolean | undefined;
50
+ readonly disableTable?: boolean | undefined;
51
+ readonly disableImg?: boolean | undefined;
52
+ readonly disableCode?: boolean | undefined;
53
+ readonly disableChangeCodeTheme?: boolean | undefined;
54
+ readonly markdownBodyClass?: string | undefined;
55
+ readonly hideFirstH1?: boolean | undefined;
56
+ readonly hideFirstElementMarginTop?: boolean | undefined;
57
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
58
+ $attrs: import('vue').Attrs;
59
+ $refs: {
60
+ [x: string]: unknown;
61
+ } & {
62
+ markdownBodyRef: HTMLDivElement;
63
+ };
64
+ $slots: Readonly<{
65
+ [name: string]: import('vue').Slot<any> | undefined;
66
+ }>;
67
+ $root: import('vue').ComponentPublicInstance | null;
68
+ $parent: import('vue').ComponentPublicInstance | null;
69
+ $host: Element | null;
70
+ $emit: (event: string, ...args: any[]) => void;
71
+ $el: HTMLDivElement;
72
+ $options: import('vue').ComponentOptionsBase<Readonly<{
73
+ disableH2?: boolean;
74
+ disableTable?: boolean;
75
+ disableImg?: boolean;
76
+ disableCode?: boolean;
77
+ disableChangeCodeTheme?: boolean;
78
+ markdownBodyClass?: string;
79
+ hideFirstH1?: boolean;
80
+ hideFirstElementMarginTop?: boolean;
81
+ }> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
82
+ disableChangeCodeTheme: boolean;
83
+ disableH2: boolean;
84
+ disableTable: boolean;
85
+ disableImg: boolean;
86
+ disableCode: boolean;
87
+ markdownBodyClass: string;
88
+ hideFirstH1: boolean;
89
+ hideFirstElementMarginTop: boolean;
90
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
91
+ beforeCreate?: (() => void) | (() => void)[];
92
+ created?: (() => void) | (() => void)[];
93
+ beforeMount?: (() => void) | (() => void)[];
94
+ mounted?: (() => void) | (() => void)[];
95
+ beforeUpdate?: (() => void) | (() => void)[];
96
+ updated?: (() => void) | (() => void)[];
97
+ activated?: (() => void) | (() => void)[];
98
+ deactivated?: (() => void) | (() => void)[];
99
+ beforeDestroy?: (() => void) | (() => void)[];
100
+ beforeUnmount?: (() => void) | (() => void)[];
101
+ destroyed?: (() => void) | (() => void)[];
102
+ unmounted?: (() => void) | (() => void)[];
103
+ renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
104
+ renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
105
+ errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
106
+ };
107
+ $forceUpdate: () => void;
108
+ $nextTick: typeof import('vue').nextTick;
109
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
110
+ } & Readonly<{
111
+ disableChangeCodeTheme: boolean;
112
+ disableH2: boolean;
113
+ disableTable: boolean;
114
+ disableImg: boolean;
115
+ disableCode: boolean;
116
+ markdownBodyClass: string;
117
+ hideFirstH1: boolean;
118
+ hideFirstElementMarginTop: boolean;
119
+ }> & Omit<Readonly<{
120
+ disableH2?: boolean;
121
+ disableTable?: boolean;
122
+ disableImg?: boolean;
123
+ disableCode?: boolean;
124
+ disableChangeCodeTheme?: boolean;
125
+ markdownBodyClass?: string;
126
+ hideFirstH1?: boolean;
127
+ hideFirstElementMarginTop?: boolean;
128
+ }> & Readonly<{}>, "disableChangeCodeTheme" | "disableH2" | "disableTable" | "disableImg" | "disableCode" | "markdownBodyClass" | "hideFirstH1" | "hideFirstElementMarginTop"> & {} & import('vue').ComponentCustomProperties & {} & {
129
+ $slots: {
130
+ header?(_: {
131
+ h1: HTMLElement | undefined;
132
+ }): any;
133
+ default?(_: {}): any;
134
+ footer?(_: {}): any;
135
+ };
136
+ }) | null;
137
+ }, HTMLDivElement, import('vue').ComponentProvideOptions, {
40
138
  P: {};
41
139
  B: {};
42
140
  D: {};
@@ -50,33 +148,36 @@ declare const OArticle: {
50
148
  community?: string;
51
149
  prev?: import('../article-pagination').OArticlePaginationItemT | null;
52
150
  next?: import('../article-pagination').OArticlePaginationItemT | null;
151
+ type?: "article" | "doc";
53
152
  disableH2?: boolean;
54
153
  disableTable?: boolean;
55
154
  disableImg?: boolean;
56
155
  disableCode?: boolean;
57
156
  updateTime?: string;
58
- markdownBodyClass?: string;
59
- removeFirstTopMargin?: boolean;
60
- autoHideFirstH1?: boolean;
157
+ sourceUrl?: string;
158
+ enableDownload?: boolean;
159
+ enableStar?: boolean;
160
+ enableCopyLink?: boolean;
61
161
  prevLabel?: string;
62
162
  nextLabel?: string;
63
- divider?: boolean;
64
163
  radius?: string;
65
164
  }> & Readonly<{
66
165
  onNavigate?: ((type: "prev" | "next", item: import('../article-pagination').OArticlePaginationItemT) => any) | undefined;
166
+ onDownload?: (() => any) | undefined;
167
+ onCollect?: (() => any) | undefined;
67
168
  }>, {}, {}, {}, {}, {
169
+ type: "article" | "doc";
68
170
  disableH2: boolean;
69
171
  disableTable: boolean;
70
172
  disableImg: boolean;
71
173
  disableCode: boolean;
72
- markdownBodyClass: string;
73
174
  prev: import('../article-pagination').OArticlePaginationItemT | null;
74
175
  next: import('../article-pagination').OArticlePaginationItemT | null;
75
- divider: boolean;
76
176
  radius: string;
77
177
  tags: string[];
78
- removeFirstTopMargin: boolean;
79
- autoHideFirstH1: boolean;
178
+ enableDownload: boolean;
179
+ enableStar: boolean;
180
+ enableCopyLink: boolean;
80
181
  }>;
81
182
  __isFragment?: never;
82
183
  __isTeleport?: never;
@@ -88,35 +189,40 @@ declare const OArticle: {
88
189
  community?: string;
89
190
  prev?: import('../article-pagination').OArticlePaginationItemT | null;
90
191
  next?: import('../article-pagination').OArticlePaginationItemT | null;
192
+ type?: "article" | "doc";
91
193
  disableH2?: boolean;
92
194
  disableTable?: boolean;
93
195
  disableImg?: boolean;
94
196
  disableCode?: boolean;
95
197
  updateTime?: string;
96
- markdownBodyClass?: string;
97
- removeFirstTopMargin?: boolean;
98
- autoHideFirstH1?: boolean;
198
+ sourceUrl?: string;
199
+ enableDownload?: boolean;
200
+ enableStar?: boolean;
201
+ enableCopyLink?: boolean;
99
202
  prevLabel?: string;
100
203
  nextLabel?: string;
101
- divider?: boolean;
102
204
  radius?: string;
103
205
  }> & Readonly<{
104
206
  onNavigate?: ((type: "prev" | "next", item: import('../article-pagination').OArticlePaginationItemT) => any) | undefined;
207
+ onDownload?: (() => any) | undefined;
208
+ onCollect?: (() => any) | undefined;
105
209
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
106
210
  navigate: (type: "prev" | "next", item: import('../article-pagination').OArticlePaginationItemT) => any;
211
+ download: () => any;
212
+ collect: () => any;
107
213
  }, string, {
214
+ type: "article" | "doc";
108
215
  disableH2: boolean;
109
216
  disableTable: boolean;
110
217
  disableImg: boolean;
111
218
  disableCode: boolean;
112
- markdownBodyClass: string;
113
219
  prev: import('../article-pagination').OArticlePaginationItemT | null;
114
220
  next: import('../article-pagination').OArticlePaginationItemT | null;
115
- divider: boolean;
116
221
  radius: string;
117
222
  tags: string[];
118
- removeFirstTopMargin: boolean;
119
- autoHideFirstH1: boolean;
223
+ enableDownload: boolean;
224
+ enableStar: boolean;
225
+ enableCopyLink: boolean;
120
226
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
121
227
  $slots: {
122
228
  default?(_: {}): any;
@@ -1,8 +1,14 @@
1
1
  import { Component } from 'vue';
2
- /** 文章类型标签(卡片详情区顶部展示) */
2
+ import { TagColorT, TagVariantT } from '@opensig/opendesign';
3
+ import { RoundT, SizeT } from '@opensig/opendesign/es/_utils/types';
4
+ /** 文章类型标签(卡片详情区顶部展示,从左往右排列可换行,间距 --o-gap-2) */
3
5
  export interface ArticleTagT {
4
6
  label: string;
5
7
  icon?: Component;
8
+ color?: TagColorT;
9
+ variant?: TagVariantT;
10
+ size?: SizeT;
11
+ round?: RoundT;
6
12
  }
7
13
  /** 文章列表项(新闻/博客通用) */
8
14
  export interface ArticleItemT {
@@ -13,7 +19,7 @@ export interface ArticleItemT {
13
19
  date?: string;
14
20
  author?: string | string[];
15
21
  location?: string;
16
- tag?: ArticleTagT;
22
+ tags?: ArticleTagT[];
17
23
  [key: string]: any;
18
24
  }
19
25
  export interface ArticleListPropsT {
@@ -1,18 +1,18 @@
1
- .hover-icon-rotate .o-icon[data-v-f561da4e] {
1
+ .hover-icon-rotate .o-icon[data-v-6e032ecb] {
2
2
  transition: all var(--o-duration-m1) var(--o-easing-standard-in);
3
3
  }
4
4
  @media (hover: hover) {
5
- .hover-icon-rotate:hover .o-icon[data-v-f561da4e] {
5
+ .hover-icon-rotate:hover .o-icon[data-v-6e032ecb] {
6
6
  transform: rotate(-180deg);
7
7
  }
8
8
  }
9
- .o-article-anchor__body[data-v-f561da4e] .o-anchor {
9
+ .o-article-anchor__body[data-v-6e032ecb] .o-anchor {
10
10
  --anchor-item-link-color: var(--o-color-info2);
11
11
  --anchor-item-link-color-active: var(--o-color-primary1);
12
12
  --anchor-item-link-color-hover: var(--o-color-primary2);
13
13
  --anchor-item-link-color-press: var(--o-color-primary3);
14
14
  --anchor-line-bg-color: var(--o-color-control4);
15
15
  }
16
- .o-article-anchor--hidden[data-v-f561da4e] {
16
+ .o-article-anchor--hidden[data-v-6e032ecb] {
17
17
  display: none;
18
18
  }
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./OArticleAnchor.vue2.mjs";
2
2
  import './OArticleAnchor.css';
3
3
  import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const _OArticleAnchor = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f561da4e"]]);
4
+ const _OArticleAnchor = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-6e032ecb"]]);
5
5
  export {
6
6
  _OArticleAnchor as default
7
7
  };