@opendesign-plus/components 0.0.1-rc.94 → 0.0.1-rc.96

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 (64) 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 +196 -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 +126 -25
  7. package/dist/components/doc-layout/ODocLayout.vue.d.ts +38 -0
  8. package/dist/components/doc-layout/index.d.ts +59 -0
  9. package/dist/components/markdown/OMarkdown.vue.d.ts +7 -16
  10. package/dist/components/markdown/index.d.ts +13 -45
  11. package/dist/components.cjs.js +44 -44
  12. package/dist/components.css +1 -1
  13. package/dist/components.es.js +10081 -9852
  14. package/dist/index.d.ts +1 -0
  15. package/dist/treeshaking/_virtual/icon-menu-fold.mjs +20 -0
  16. package/dist/treeshaking/_virtual/icon-menu-unfold.mjs +20 -0
  17. package/dist/treeshaking/_virtual/icon-tips.mjs +13 -2
  18. package/dist/treeshaking/_virtual/icon-tips2.mjs +2 -13
  19. package/dist/treeshaking/components/article/OArticle.css +18 -124
  20. package/dist/treeshaking/components/article/OArticle.vue.d.ts +196 -14
  21. package/dist/treeshaking/components/article/OArticle.vue.mjs +1 -1
  22. package/dist/treeshaking/components/article/OArticle.vue2.mjs +48 -82
  23. package/dist/treeshaking/components/article/components/ArticleTitle.css +123 -0
  24. package/dist/treeshaking/components/article/components/ArticleTitle.vue.d.ts +22 -0
  25. package/dist/treeshaking/components/article/components/ArticleTitle.vue.mjs +7 -0
  26. package/dist/treeshaking/components/article/components/ArticleTitle.vue2.mjs +97 -0
  27. package/dist/treeshaking/components/article/components/DocTitle.css +246 -0
  28. package/dist/treeshaking/components/{markdown/components/MarkdownPageTitle.vue.d.ts → article/components/DocTitle.vue.d.ts} +6 -5
  29. package/dist/treeshaking/components/article/components/DocTitle.vue.mjs +7 -0
  30. package/dist/treeshaking/components/{markdown/components/MarkdownPageTitle.vue2.mjs → article/components/DocTitle.vue2.mjs} +131 -80
  31. package/dist/treeshaking/components/article/index.d.ts +126 -25
  32. package/dist/treeshaking/components/article-anchor/OArticleAnchor.css +4 -4
  33. package/dist/treeshaking/components/article-anchor/OArticleAnchor.vue.mjs +1 -1
  34. package/dist/treeshaking/components/article-anchor/OArticleAnchor.vue2.mjs +4 -5
  35. package/dist/treeshaking/components/doc-layout/ODocLayout.css +271 -0
  36. package/dist/treeshaking/components/doc-layout/ODocLayout.vue.d.ts +38 -0
  37. package/dist/treeshaking/components/doc-layout/ODocLayout.vue.mjs +7 -0
  38. package/dist/treeshaking/components/doc-layout/ODocLayout.vue2.mjs +165 -0
  39. package/dist/treeshaking/components/doc-layout/index.d.ts +59 -0
  40. package/dist/treeshaking/components/doc-layout/index.mjs +9 -0
  41. package/dist/treeshaking/components/markdown/OMarkdown.vue.d.ts +7 -16
  42. package/dist/treeshaking/components/markdown/OMarkdown.vue.mjs +1 -1
  43. package/dist/treeshaking/components/markdown/OMarkdown.vue2.mjs +47 -36
  44. package/dist/treeshaking/components/markdown/OMarkdown2.css +3 -3
  45. package/dist/treeshaking/components/markdown/components/MarkdownTitle.css +22 -22
  46. package/dist/treeshaking/components/markdown/components/MarkdownTitle.vue.mjs +1 -1
  47. package/dist/treeshaking/components/markdown/components/MarkdownTitle.vue2.mjs +11 -5
  48. package/dist/treeshaking/components/markdown/index.d.ts +13 -45
  49. package/dist/treeshaking/components/meeting/OMeetingMyCalendar.vue.mjs +5 -1
  50. package/dist/treeshaking/components/meeting/OMeetingSigCalendar.vue.mjs +1 -1
  51. package/dist/treeshaking/components/meeting/components/OMeetingCalendarList.vue.mjs +5 -1
  52. package/dist/treeshaking/components/recursion-menu/ORecursionMenu.vue.mjs +1 -1
  53. package/dist/treeshaking/components/user-center/OUserInfo.vue2.mjs +1 -1
  54. package/dist/treeshaking/components/user-center/index.mjs +0 -2
  55. package/dist/treeshaking/i18n/en.mjs +2 -1
  56. package/dist/treeshaking/i18n/zh.mjs +2 -1
  57. package/dist/treeshaking/index.d.ts +1 -0
  58. package/dist/treeshaking/index.mjs +2 -0
  59. package/package.json +2 -2
  60. package/dist/components/markdown/replacer/h1.d.ts +0 -11
  61. package/dist/treeshaking/components/markdown/components/MarkdownPageTitle.css +0 -261
  62. package/dist/treeshaking/components/markdown/components/MarkdownPageTitle.vue.mjs +0 -7
  63. package/dist/treeshaking/components/markdown/replacer/h1.d.ts +0 -11
  64. package/dist/treeshaking/components/markdown/replacer/h1.mjs +0 -29
@@ -1,12 +1,14 @@
1
1
  import { MaybeRefOrGetter } from 'vue';
2
- import { OMarkdownMaybeElementT } from '../types';
2
+ import { OMarkdownMaybeElementT } from '../../markdown/types';
3
3
  type __VLS_Props = {
4
- el: OMarkdownMaybeElementT;
4
+ el?: OMarkdownMaybeElementT;
5
+ title?: string;
5
6
  bgImage?: MaybeRefOrGetter<string>;
6
7
  sourceUrl?: MaybeRefOrGetter<string>;
7
8
  updateTime?: MaybeRefOrGetter<string>;
8
9
  enableDownload?: MaybeRefOrGetter<boolean>;
9
10
  enableStar?: MaybeRefOrGetter<boolean>;
11
+ enableCopyLink?: MaybeRefOrGetter<boolean>;
10
12
  };
11
13
  declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
12
14
  download: () => any;
@@ -17,7 +19,6 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
17
19
  }>, {
18
20
  enableDownload: MaybeRefOrGetter<boolean>;
19
21
  enableStar: MaybeRefOrGetter<boolean>;
20
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
21
- titleRef: HTMLDivElement;
22
- }, any>;
22
+ enableCopyLink: MaybeRefOrGetter<boolean>;
23
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
23
24
  export default _default;
@@ -0,0 +1,7 @@
1
+ import _sfc_main from "./DocTitle.vue2.mjs";
2
+ import './DocTitle.css';
3
+ import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
4
+ const DocTitle = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ea84d56c"]]);
5
+ export {
6
+ DocTitle as default
7
+ };
@@ -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,129 @@ 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
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
57
+ $attrs: import('vue').Attrs;
58
+ $refs: {
59
+ [x: string]: unknown;
60
+ } & {
61
+ markdownBodyRef: HTMLDivElement;
62
+ };
63
+ $slots: Readonly<{
64
+ [name: string]: import('vue').Slot<any> | undefined;
65
+ }>;
66
+ $root: import('vue').ComponentPublicInstance | null;
67
+ $parent: import('vue').ComponentPublicInstance | null;
68
+ $host: Element | null;
69
+ $emit: (event: string, ...args: any[]) => void;
70
+ $el: HTMLDivElement;
71
+ $options: import('vue').ComponentOptionsBase<Readonly<{
72
+ disableH2?: boolean;
73
+ disableTable?: boolean;
74
+ disableImg?: boolean;
75
+ disableCode?: boolean;
76
+ disableChangeCodeTheme?: boolean;
77
+ markdownBodyClass?: string;
78
+ hideFirstH1?: boolean;
79
+ }> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
80
+ disableChangeCodeTheme: boolean;
81
+ disableH2: boolean;
82
+ disableTable: boolean;
83
+ disableImg: boolean;
84
+ disableCode: boolean;
85
+ markdownBodyClass: string;
86
+ hideFirstH1: boolean;
87
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
88
+ beforeCreate?: (() => void) | (() => void)[];
89
+ created?: (() => void) | (() => void)[];
90
+ beforeMount?: (() => void) | (() => void)[];
91
+ mounted?: (() => void) | (() => void)[];
92
+ beforeUpdate?: (() => void) | (() => void)[];
93
+ updated?: (() => void) | (() => void)[];
94
+ activated?: (() => void) | (() => void)[];
95
+ deactivated?: (() => void) | (() => void)[];
96
+ beforeDestroy?: (() => void) | (() => void)[];
97
+ beforeUnmount?: (() => void) | (() => void)[];
98
+ destroyed?: (() => void) | (() => void)[];
99
+ unmounted?: (() => void) | (() => void)[];
100
+ renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
101
+ renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
102
+ errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
103
+ };
104
+ $forceUpdate: () => void;
105
+ $nextTick: typeof import('vue').nextTick;
106
+ $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;
107
+ } & Readonly<{
108
+ disableChangeCodeTheme: boolean;
109
+ disableH2: boolean;
110
+ disableTable: boolean;
111
+ disableImg: boolean;
112
+ disableCode: boolean;
113
+ markdownBodyClass: string;
114
+ hideFirstH1: boolean;
115
+ }> & Omit<Readonly<{
116
+ disableH2?: boolean;
117
+ disableTable?: boolean;
118
+ disableImg?: boolean;
119
+ disableCode?: boolean;
120
+ disableChangeCodeTheme?: boolean;
121
+ markdownBodyClass?: string;
122
+ hideFirstH1?: boolean;
123
+ }> & Readonly<{}>, "disableChangeCodeTheme" | "disableH2" | "disableTable" | "disableImg" | "disableCode" | "markdownBodyClass" | "hideFirstH1"> & {} & import('vue').ComponentCustomProperties & {} & {
124
+ $slots: {
125
+ header?(_: {
126
+ h1: HTMLElement | undefined;
127
+ }): any;
128
+ default?(_: {}): any;
129
+ footer?(_: {}): any;
130
+ };
131
+ }) | null;
132
+ }, HTMLDivElement, import('vue').ComponentProvideOptions, {
40
133
  P: {};
41
134
  B: {};
42
135
  D: {};
@@ -50,33 +143,36 @@ declare const OArticle: {
50
143
  community?: string;
51
144
  prev?: import('../article-pagination').OArticlePaginationItemT | null;
52
145
  next?: import('../article-pagination').OArticlePaginationItemT | null;
146
+ type?: "article" | "doc";
53
147
  disableH2?: boolean;
54
148
  disableTable?: boolean;
55
149
  disableImg?: boolean;
56
150
  disableCode?: boolean;
57
151
  updateTime?: string;
58
- markdownBodyClass?: string;
59
- removeFirstTopMargin?: boolean;
60
- autoHideFirstH1?: boolean;
152
+ sourceUrl?: string;
153
+ enableDownload?: boolean;
154
+ enableStar?: boolean;
155
+ enableCopyLink?: boolean;
61
156
  prevLabel?: string;
62
157
  nextLabel?: string;
63
- divider?: boolean;
64
158
  radius?: string;
65
159
  }> & Readonly<{
66
160
  onNavigate?: ((type: "prev" | "next", item: import('../article-pagination').OArticlePaginationItemT) => any) | undefined;
161
+ onDownload?: (() => any) | undefined;
162
+ onCollect?: (() => any) | undefined;
67
163
  }>, {}, {}, {}, {}, {
164
+ type: "article" | "doc";
68
165
  disableH2: boolean;
69
166
  disableTable: boolean;
70
167
  disableImg: boolean;
71
168
  disableCode: boolean;
72
- markdownBodyClass: string;
73
169
  prev: import('../article-pagination').OArticlePaginationItemT | null;
74
170
  next: import('../article-pagination').OArticlePaginationItemT | null;
75
- divider: boolean;
76
171
  radius: string;
77
172
  tags: string[];
78
- removeFirstTopMargin: boolean;
79
- autoHideFirstH1: boolean;
173
+ enableDownload: boolean;
174
+ enableStar: boolean;
175
+ enableCopyLink: boolean;
80
176
  }>;
81
177
  __isFragment?: never;
82
178
  __isTeleport?: never;
@@ -88,35 +184,40 @@ declare const OArticle: {
88
184
  community?: string;
89
185
  prev?: import('../article-pagination').OArticlePaginationItemT | null;
90
186
  next?: import('../article-pagination').OArticlePaginationItemT | null;
187
+ type?: "article" | "doc";
91
188
  disableH2?: boolean;
92
189
  disableTable?: boolean;
93
190
  disableImg?: boolean;
94
191
  disableCode?: boolean;
95
192
  updateTime?: string;
96
- markdownBodyClass?: string;
97
- removeFirstTopMargin?: boolean;
98
- autoHideFirstH1?: boolean;
193
+ sourceUrl?: string;
194
+ enableDownload?: boolean;
195
+ enableStar?: boolean;
196
+ enableCopyLink?: boolean;
99
197
  prevLabel?: string;
100
198
  nextLabel?: string;
101
- divider?: boolean;
102
199
  radius?: string;
103
200
  }> & Readonly<{
104
201
  onNavigate?: ((type: "prev" | "next", item: import('../article-pagination').OArticlePaginationItemT) => any) | undefined;
202
+ onDownload?: (() => any) | undefined;
203
+ onCollect?: (() => any) | undefined;
105
204
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
106
205
  navigate: (type: "prev" | "next", item: import('../article-pagination').OArticlePaginationItemT) => any;
206
+ download: () => any;
207
+ collect: () => any;
107
208
  }, string, {
209
+ type: "article" | "doc";
108
210
  disableH2: boolean;
109
211
  disableTable: boolean;
110
212
  disableImg: boolean;
111
213
  disableCode: boolean;
112
- markdownBodyClass: string;
113
214
  prev: import('../article-pagination').OArticlePaginationItemT | null;
114
215
  next: import('../article-pagination').OArticlePaginationItemT | null;
115
- divider: boolean;
116
216
  radius: string;
117
217
  tags: string[];
118
- removeFirstTopMargin: boolean;
119
- autoHideFirstH1: boolean;
218
+ enableDownload: boolean;
219
+ enableStar: boolean;
220
+ enableCopyLink: boolean;
120
221
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
121
222
  $slots: {
122
223
  default?(_: {}): any;
@@ -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
  };