@opendesign-plus-test/components 0.0.1-rc.247 → 0.0.1-rc.249

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 (117) hide show
  1. package/dist/components/activity/index.d.ts +9 -9
  2. package/dist/components/anchor-bar/OAnchorBar.vue.d.ts +2 -2
  3. package/dist/components/anchor-bar/index.d.ts +9 -9
  4. package/dist/components/article/OArticle.vue.d.ts +14 -206
  5. package/dist/components/article/index.d.ts +50 -156
  6. package/dist/components/article/types.d.ts +2 -8
  7. package/dist/components/article-anchor/index.d.ts +9 -9
  8. package/dist/components/article-pagination/index.d.ts +17 -17
  9. package/dist/components/banner/index.d.ts +6 -6
  10. package/dist/components/brand/index.d.ts +15 -15
  11. package/dist/components/events/index.d.ts +20 -20
  12. package/dist/components/footer/index.d.ts +3 -3
  13. package/dist/components/header/OHeaderMobile.vue.d.ts +8 -8
  14. package/dist/components/header/components/HeaderNavMobile.vue.d.ts +1 -1
  15. package/dist/components/header/index.d.ts +28 -28
  16. package/dist/components/header-search/index.d.ts +13 -13
  17. package/dist/components/logo-swiper/index.d.ts +11 -11
  18. package/dist/components/markdown/OMarkdown.vue.d.ts +16 -9
  19. package/dist/components/{article/components/DocTitle.vue.d.ts → markdown/components/MarkdownPageTitle.vue.d.ts} +5 -6
  20. package/dist/components/markdown/index.d.ts +45 -19
  21. package/dist/components/markdown/replacer/h1.d.ts +11 -0
  22. package/dist/components/meeting/OMeetingPlayback.vue.d.ts +6 -6
  23. package/dist/components/meeting/components/OMeetingPlaybackVideo.vue.d.ts +1 -1
  24. package/dist/components/meeting/index.d.ts +51 -51
  25. package/dist/components/org/index.d.ts +9 -9
  26. package/dist/components/recursion-menu/index.d.ts +3 -3
  27. package/dist/components/search/index.d.ts +11 -11
  28. package/dist/components/search-result/OSearchResultHeader.vue.d.ts +24 -24
  29. package/dist/components/search-result/index.d.ts +31 -31
  30. package/dist/components/sig/index.d.ts +15 -15
  31. package/dist/components/summit/index.d.ts +12 -12
  32. package/dist/components/user-center/index.d.ts +18 -18
  33. package/dist/components/video/index.d.ts +3 -3
  34. package/dist/components.cjs.js +45 -45
  35. package/dist/components.css +2 -2
  36. package/dist/components.es.js +11202 -11457
  37. package/dist/index.d.ts +0 -1
  38. package/dist/treeshaking/components/activity/index.d.ts +9 -9
  39. package/dist/treeshaking/components/anchor-bar/OAnchorBar.vue.d.ts +2 -2
  40. package/dist/treeshaking/components/anchor-bar/index.d.ts +9 -9
  41. package/dist/treeshaking/components/article/OArticle.css +124 -18
  42. package/dist/treeshaking/components/article/OArticle.vue.d.ts +14 -206
  43. package/dist/treeshaking/components/article/OArticle.vue.mjs +1 -1
  44. package/dist/treeshaking/components/article/OArticle.vue2.mjs +82 -48
  45. package/dist/treeshaking/components/article/OArticleList.css +6 -7
  46. package/dist/treeshaking/components/article/OArticleList.vue.mjs +34 -48
  47. package/dist/treeshaking/components/article/index.d.ts +50 -156
  48. package/dist/treeshaking/components/article/types.d.ts +2 -8
  49. package/dist/treeshaking/components/article-anchor/OArticleAnchor.css +4 -4
  50. package/dist/treeshaking/components/article-anchor/OArticleAnchor.vue.mjs +1 -1
  51. package/dist/treeshaking/components/article-anchor/OArticleAnchor.vue2.mjs +5 -4
  52. package/dist/treeshaking/components/article-anchor/index.d.ts +9 -9
  53. package/dist/treeshaking/components/article-pagination/index.d.ts +17 -17
  54. package/dist/treeshaking/components/banner/index.d.ts +6 -6
  55. package/dist/treeshaking/components/brand/index.d.ts +15 -15
  56. package/dist/treeshaking/components/events/OEventsList.vue.mjs +1 -1
  57. package/dist/treeshaking/components/events/index.d.ts +20 -20
  58. package/dist/treeshaking/components/footer/index.d.ts +3 -3
  59. package/dist/treeshaking/components/header/OHeaderMobile.vue.d.ts +8 -8
  60. package/dist/treeshaking/components/header/components/HeaderNavMobile.vue.d.ts +1 -1
  61. package/dist/treeshaking/components/header/index.d.ts +28 -28
  62. package/dist/treeshaking/components/header-search/index.d.ts +13 -13
  63. package/dist/treeshaking/components/logo-swiper/index.d.ts +11 -11
  64. package/dist/treeshaking/components/markdown/OMarkdown.vue.d.ts +16 -9
  65. package/dist/treeshaking/components/markdown/OMarkdown.vue.mjs +1 -1
  66. package/dist/treeshaking/components/markdown/OMarkdown.vue2.mjs +36 -68
  67. package/dist/treeshaking/components/markdown/OMarkdown2.css +3 -3
  68. package/dist/treeshaking/components/markdown/components/MarkdownPageTitle.css +261 -0
  69. package/dist/treeshaking/components/{article/components/DocTitle.vue.d.ts → markdown/components/MarkdownPageTitle.vue.d.ts} +5 -6
  70. package/dist/treeshaking/components/markdown/components/MarkdownPageTitle.vue.mjs +7 -0
  71. package/dist/treeshaking/components/{article/components/DocTitle.vue2.mjs → markdown/components/MarkdownPageTitle.vue2.mjs} +80 -131
  72. package/dist/treeshaking/components/markdown/components/MarkdownTitle.css +22 -22
  73. package/dist/treeshaking/components/markdown/components/MarkdownTitle.vue.mjs +1 -1
  74. package/dist/treeshaking/components/markdown/components/MarkdownTitle.vue2.mjs +5 -11
  75. package/dist/treeshaking/components/markdown/index.d.ts +45 -19
  76. package/dist/treeshaking/components/markdown/replacer/h1.d.ts +11 -0
  77. package/dist/treeshaking/components/markdown/replacer/h1.mjs +29 -0
  78. package/dist/treeshaking/components/meeting/OMeetingPlayback.vue.d.ts +6 -6
  79. package/dist/treeshaking/components/meeting/components/OMeetingPlaybackVideo.vue.d.ts +1 -1
  80. package/dist/treeshaking/components/meeting/index.d.ts +51 -51
  81. package/dist/treeshaking/components/org/index.d.ts +9 -9
  82. package/dist/treeshaking/components/recursion-menu/ORecursionMenu.vue.mjs +1 -1
  83. package/dist/treeshaking/components/recursion-menu/index.d.ts +3 -3
  84. package/dist/treeshaking/components/search/index.d.ts +11 -11
  85. package/dist/treeshaking/components/search-result/OSearchResultHeader.vue.d.ts +24 -24
  86. package/dist/treeshaking/components/search-result/index.d.ts +31 -31
  87. package/dist/treeshaking/components/sig/index.d.ts +15 -15
  88. package/dist/treeshaking/components/summit/index.d.ts +12 -12
  89. package/dist/treeshaking/components/user-center/OUserInfo.css +109 -109
  90. package/dist/treeshaking/components/user-center/OUserInfo.vue.mjs +1 -1
  91. package/dist/treeshaking/components/user-center/OUserInfo.vue2.mjs +1 -1
  92. package/dist/treeshaking/components/user-center/OUserInfo2.css +10 -7
  93. package/dist/treeshaking/components/user-center/OUserInfo3.css +4 -4
  94. package/dist/treeshaking/components/user-center/index.d.ts +18 -18
  95. package/dist/treeshaking/components/user-center/verify/Verify.css +53 -44
  96. package/dist/treeshaking/components/user-center/verify/Verify.vue.mjs +1 -1
  97. package/dist/treeshaking/components/video/index.d.ts +3 -3
  98. package/dist/treeshaking/index.d.ts +0 -1
  99. package/dist/treeshaking/index.mjs +0 -2
  100. package/package.json +3 -3
  101. package/dist/components/article/components/ArticleTitle.vue.d.ts +0 -22
  102. package/dist/components/doc-layout/ODocLayout.vue.d.ts +0 -38
  103. package/dist/components/doc-layout/index.d.ts +0 -59
  104. package/dist/treeshaking/_virtual/icon-menu-fold.mjs +0 -20
  105. package/dist/treeshaking/_virtual/icon-menu-unfold.mjs +0 -20
  106. package/dist/treeshaking/components/article/components/ArticleTitle.css +0 -123
  107. package/dist/treeshaking/components/article/components/ArticleTitle.vue.d.ts +0 -22
  108. package/dist/treeshaking/components/article/components/ArticleTitle.vue.mjs +0 -7
  109. package/dist/treeshaking/components/article/components/ArticleTitle.vue2.mjs +0 -97
  110. package/dist/treeshaking/components/article/components/DocTitle.css +0 -246
  111. package/dist/treeshaking/components/article/components/DocTitle.vue.mjs +0 -7
  112. package/dist/treeshaking/components/doc-layout/ODocLayout.css +0 -271
  113. package/dist/treeshaking/components/doc-layout/ODocLayout.vue.d.ts +0 -38
  114. package/dist/treeshaking/components/doc-layout/ODocLayout.vue.mjs +0 -7
  115. package/dist/treeshaking/components/doc-layout/ODocLayout.vue2.mjs +0 -165
  116. package/dist/treeshaking/components/doc-layout/index.d.ts +0 -59
  117. package/dist/treeshaking/components/doc-layout/index.mjs +0 -9
@@ -0,0 +1,261 @@
1
+ .hover-icon-rotate .o-icon[data-v-84f356a4] {
2
+ transition: all var(--o-duration-m1) var(--o-easing-standard-in);
3
+ }
4
+ @media (hover: hover) {
5
+ .hover-icon-rotate:hover .o-icon[data-v-84f356a4] {
6
+ transform: rotate(-180deg);
7
+ }
8
+ }
9
+ .o-md-page-title[data-v-84f356a4] {
10
+ align-items: center;
11
+ justify-content: space-between;
12
+ gap: 12px;
13
+ padding: 16px;
14
+ margin-bottom: 32px;
15
+ border-radius: var(--o-radius-xs);
16
+ background-image: var(--v6981a063);
17
+ background-position: 100% 100%;
18
+ background-repeat: no-repeat;
19
+ background-size: cover;
20
+ }
21
+ @media (max-width: 1680px) {
22
+ .o-md-page-title[data-v-84f356a4] {
23
+ gap: 8px;
24
+ padding: 12px;
25
+ margin-bottom: 24px;
26
+ }
27
+ }
28
+ @media (max-width: 1200px) {
29
+ .o-md-page-title[data-v-84f356a4] {
30
+ gap: 8px;
31
+ padding: 8px;
32
+ margin-bottom: 16px;
33
+ }
34
+ }
35
+ @media (max-width: 840px) {
36
+ .o-md-page-title[data-v-84f356a4] {
37
+ gap: 12px;
38
+ padding: 16px;
39
+ margin-bottom: 28px;
40
+ }
41
+ }
42
+ .o-md-page-title .o-md-page-title-content[data-v-84f356a4] {
43
+ display: flex;
44
+ flex-direction: column;
45
+ gap: 8px;
46
+ min-width: 0;
47
+ }
48
+ .o-md-page-title .o-md-page-title-text[data-v-84f356a4] h1 {
49
+ margin-top: 0;
50
+ margin-bottom: 0;
51
+ font-size: 32px;
52
+ line-height: 44px;
53
+ }
54
+ @media (min-width: 1201px) and (max-width: 1680px) {
55
+ .o-md-page-title .o-md-page-title-text[data-v-84f356a4] h1 {
56
+ font-size: 20px;
57
+ line-height: 28px;
58
+ }
59
+ }
60
+ @media (min-width: 841px) and (max-width: 1200px) {
61
+ .o-md-page-title .o-md-page-title-text[data-v-84f356a4] h1 {
62
+ font-size: 20px;
63
+ line-height: 28px;
64
+ }
65
+ }
66
+ @media (min-width: 601px) and (max-width: 840px) {
67
+ .o-md-page-title .o-md-page-title-text[data-v-84f356a4] h1 {
68
+ font-size: 18px;
69
+ line-height: 26px;
70
+ }
71
+ }
72
+ @media (max-width: 600px) {
73
+ .o-md-page-title .o-md-page-title-text[data-v-84f356a4] h1 {
74
+ font-size: 16px;
75
+ line-height: 24px;
76
+ }
77
+ }
78
+ .o-md-page-title .o-md-page-title-actions[data-v-84f356a4] {
79
+ display: flex;
80
+ align-items: center;
81
+ justify-content: space-between;
82
+ margin-top: 12px;
83
+ }
84
+ @media (max-width: 1680px) {
85
+ .o-md-page-title .o-md-page-title-actions[data-v-84f356a4] {
86
+ margin-top: 8px;
87
+ }
88
+ }
89
+ @media (max-width: 840px) {
90
+ .o-md-page-title .o-md-page-title-actions[data-v-84f356a4] {
91
+ margin-top: 0;
92
+ }
93
+ }
94
+ .o-md-page-title .o-md-page-title-actions .o-md-page-title-icon-more[data-v-84f356a4] {
95
+ font-size: 24px;
96
+ color: var(--o-color-info2);
97
+ }
98
+ .o-md-page-title .o-md-page-title-actions .o-md-page-title-source-code[data-v-84f356a4] {
99
+ font-size: 16px;
100
+ line-height: 24px;
101
+ }
102
+ @media (min-width: 1201px) and (max-width: 1680px) {
103
+ .o-md-page-title .o-md-page-title-actions .o-md-page-title-source-code[data-v-84f356a4] {
104
+ font-size: 14px;
105
+ line-height: 22px;
106
+ }
107
+ }
108
+ @media (min-width: 841px) and (max-width: 1200px) {
109
+ .o-md-page-title .o-md-page-title-actions .o-md-page-title-source-code[data-v-84f356a4] {
110
+ font-size: 14px;
111
+ line-height: 22px;
112
+ }
113
+ }
114
+ @media (min-width: 601px) and (max-width: 840px) {
115
+ .o-md-page-title .o-md-page-title-actions .o-md-page-title-source-code[data-v-84f356a4] {
116
+ font-size: 14px;
117
+ line-height: 22px;
118
+ }
119
+ }
120
+ @media (max-width: 600px) {
121
+ .o-md-page-title .o-md-page-title-actions .o-md-page-title-source-code[data-v-84f356a4] {
122
+ font-size: 12px;
123
+ line-height: 18px;
124
+ }
125
+ }
126
+ .o-md-page-title .o-md-page-title-actions .o-md-page-title-source-code[data-v-84f356a4] .o-link-label {
127
+ display: flex;
128
+ align-items: center;
129
+ }
130
+ .o-md-page-title .o-md-page-title-actions .o-md-page-title-icon-outlink[data-v-84f356a4] {
131
+ font-size: 22px;
132
+ line-height: 30px;
133
+ }
134
+ @media (min-width: 1201px) and (max-width: 1680px) {
135
+ .o-md-page-title .o-md-page-title-actions .o-md-page-title-icon-outlink[data-v-84f356a4] {
136
+ font-size: 18px;
137
+ line-height: 26px;
138
+ }
139
+ }
140
+ @media (min-width: 841px) and (max-width: 1200px) {
141
+ .o-md-page-title .o-md-page-title-actions .o-md-page-title-icon-outlink[data-v-84f356a4] {
142
+ font-size: 16px;
143
+ line-height: 24px;
144
+ }
145
+ }
146
+ @media (min-width: 601px) and (max-width: 840px) {
147
+ .o-md-page-title .o-md-page-title-actions .o-md-page-title-icon-outlink[data-v-84f356a4] {
148
+ font-size: 16px;
149
+ line-height: 24px;
150
+ }
151
+ }
152
+ @media (max-width: 600px) {
153
+ .o-md-page-title .o-md-page-title-actions .o-md-page-title-icon-outlink[data-v-84f356a4] {
154
+ font-size: 16px;
155
+ line-height: 24px;
156
+ }
157
+ }
158
+ .o-md-page-title .o-md-page-title-actions .o-md-page-title-update-time[data-v-84f356a4] {
159
+ color: var(--o-color-info3);
160
+ font-size: 14px;
161
+ line-height: 22px;
162
+ }
163
+ @media (min-width: 1201px) and (max-width: 1680px) {
164
+ .o-md-page-title .o-md-page-title-actions .o-md-page-title-update-time[data-v-84f356a4] {
165
+ font-size: 14px;
166
+ line-height: 18px;
167
+ }
168
+ }
169
+ @media (min-width: 841px) and (max-width: 1200px) {
170
+ .o-md-page-title .o-md-page-title-actions .o-md-page-title-update-time[data-v-84f356a4] {
171
+ font-size: 12px;
172
+ line-height: 18px;
173
+ }
174
+ }
175
+ @media (min-width: 601px) and (max-width: 840px) {
176
+ .o-md-page-title .o-md-page-title-actions .o-md-page-title-update-time[data-v-84f356a4] {
177
+ font-size: 12px;
178
+ line-height: 18px;
179
+ }
180
+ }
181
+ @media (max-width: 600px) {
182
+ .o-md-page-title .o-md-page-title-actions .o-md-page-title-update-time[data-v-84f356a4] {
183
+ font-size: 12px;
184
+ line-height: 18px;
185
+ }
186
+ }
187
+ .o-md-page-title .o-md-page-title-actions .o-md-page-title-actions-left[data-v-84f356a4] {
188
+ display: flex;
189
+ align-items: center;
190
+ gap: 12px;
191
+ }
192
+ .o-md-page-title .o-md-page-title-actions .o-md-page-title-icon-download[data-v-84f356a4],
193
+ .o-md-page-title .o-md-page-title-actions .o-md-page-title-icon-star[data-v-84f356a4] {
194
+ font-size: 24px;
195
+ cursor: pointer;
196
+ }
197
+ @media (hover: hover) {
198
+ .o-md-page-title .o-md-page-title-actions .o-md-page-title-icon-download[data-v-84f356a4]:hover,
199
+ .o-md-page-title .o-md-page-title-actions .o-md-page-title-icon-star[data-v-84f356a4]:hover {
200
+ color: var(--o-color-info1);
201
+ }
202
+ }
203
+ @media (max-width: 1680px) {
204
+ .o-md-page-title .o-md-page-title-actions .o-md-page-title-icon-download[data-v-84f356a4],
205
+ .o-md-page-title .o-md-page-title-actions .o-md-page-title-icon-star[data-v-84f356a4] {
206
+ font-size: 20px;
207
+ }
208
+ }
209
+ .o-md-page-title.is-simple[data-v-84f356a4] {
210
+ padding: 0;
211
+ background-image: none;
212
+ }
213
+ @media (max-width: 840px) {
214
+ .o-md-page-title.first-h1[data-v-84f356a4] {
215
+ display: flex;
216
+ justify-content: space-between;
217
+ align-items: center;
218
+ }
219
+ }
220
+ .o-md-page-title.more-h1[data-v-84f356a4] {
221
+ margin-top: 32px;
222
+ }
223
+ @media (max-width: 1680px) {
224
+ .o-md-page-title.more-h1[data-v-84f356a4] {
225
+ margin-top: 24px;
226
+ }
227
+ }
228
+ @media (max-width: 1200px) {
229
+ .o-md-page-title.more-h1[data-v-84f356a4] {
230
+ margin-top: 16px;
231
+ }
232
+ }
233
+ @media (max-width: 840px) {
234
+ .o-md-page-title.more-h1[data-v-84f356a4] {
235
+ margin-top: 28px;
236
+ }
237
+ }
238
+ .o-md-page-dlg-action-box-container[data-v-84f356a4] {
239
+ display: flex;
240
+ justify-content: space-around;
241
+ }
242
+ .o-md-page-dlg-action-box-container .o-md-page-dlg-action-box[data-v-84f356a4] {
243
+ flex: 1;
244
+ align-items: center;
245
+ display: flex;
246
+ flex-direction: column;
247
+ }
248
+ .o-md-page-dlg-action-box-container .o-md-page-dlg-action-box-icon[data-v-84f356a4] {
249
+ display: flex;
250
+ justify-content: center;
251
+ align-items: center;
252
+ width: 40px;
253
+ height: 40px;
254
+ background-color: var(--o-color-fill1);
255
+ border-radius: 50%;
256
+ font-size: 24px;
257
+ }
258
+ .o-md-page-dlg-action-box-container .o-md-page-dlg-action-box-label[data-v-84f356a4] {
259
+ margin-top: 8px;
260
+ color: var(--o-color-info1);
261
+ }
@@ -1,14 +1,12 @@
1
1
  import { MaybeRefOrGetter } from 'vue';
2
- import { OMarkdownMaybeElementT } from '../../markdown/types';
2
+ import { OMarkdownMaybeElementT } from '../types';
3
3
  type __VLS_Props = {
4
- el?: OMarkdownMaybeElementT;
5
- title?: string;
4
+ el: OMarkdownMaybeElementT;
6
5
  bgImage?: MaybeRefOrGetter<string>;
7
6
  sourceUrl?: MaybeRefOrGetter<string>;
8
7
  updateTime?: MaybeRefOrGetter<string>;
9
8
  enableDownload?: MaybeRefOrGetter<boolean>;
10
9
  enableStar?: MaybeRefOrGetter<boolean>;
11
- enableCopyLink?: MaybeRefOrGetter<boolean>;
12
10
  };
13
11
  declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
14
12
  download: () => any;
@@ -19,6 +17,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
19
17
  }>, {
20
18
  enableDownload: MaybeRefOrGetter<boolean>;
21
19
  enableStar: MaybeRefOrGetter<boolean>;
22
- enableCopyLink: MaybeRefOrGetter<boolean>;
23
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
20
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
21
+ titleRef: HTMLDivElement;
22
+ }, any>;
24
23
  export default _default;
@@ -0,0 +1,7 @@
1
+ import _sfc_main from "./MarkdownPageTitle.vue2.mjs";
2
+ import './MarkdownPageTitle.css';
3
+ import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
4
+ const MarkdownPageTitle = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-84f356a4"]]);
5
+ export {
6
+ MarkdownPageTitle as default
7
+ };
@@ -1,56 +1,45 @@
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";
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";
4
5
  import { buildVueDompurifyHTMLDirective } from "vue-dompurify-html";
5
6
  import { useI18n } from "../../../i18n/index.mjs";
6
7
  import IconOutlink from "../../../_virtual/icon-outlink.mjs";
7
8
  import IconMore from "../../../_virtual/icon-more.mjs";
8
9
  import IconDownload from "../../../_virtual/icon-download.mjs";
9
10
  import IconStar from "../../../_virtual/icon-star.mjs";
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
- };
11
+ const _hoisted_1 = { class: "o-md-page-title-content" };
12
+ const _hoisted_2 = { class: "o-md-page-title-text __mounted" };
16
13
  const _hoisted_3 = {
17
- key: 1,
18
- class: "o-doc-title-text __mounted"
19
- };
20
- const _hoisted_4 = {
21
14
  key: 0,
22
- class: "o-doc-title-actions"
15
+ class: "o-md-page-title-actions"
23
16
  };
24
- const _hoisted_5 = { class: "o-doc-title-actions-left" };
25
- const _hoisted_6 = {
17
+ const _hoisted_4 = { class: "o-md-page-title-actions-left" };
18
+ const _hoisted_5 = {
26
19
  key: 0,
27
- class: "o-doc-title-update-time"
20
+ class: "o-md-page-title-update-time"
28
21
  };
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" };
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" };
38
29
  const _sfc_main = /* @__PURE__ */ defineComponent({
39
- __name: "DocTitle",
30
+ __name: "MarkdownPageTitle",
40
31
  props: {
41
32
  el: {},
42
- title: {},
43
33
  bgImage: {},
44
34
  sourceUrl: {},
45
35
  updateTime: {},
46
36
  enableDownload: { default: false },
47
- enableStar: { default: false },
48
- enableCopyLink: { default: false }
37
+ enableStar: { default: false }
49
38
  },
50
39
  emits: ["download", "collect"],
51
40
  setup(__props, { emit: __emit }) {
52
41
  useCssVars((_ctx) => ({
53
- "bc7b9dec": bgImage.value
42
+ "v6981a063": bgImage.value
54
43
  }));
55
44
  const props = __props;
56
45
  const emit = __emit;
@@ -62,8 +51,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
62
51
  const updateTime = computed(() => toValue(props.updateTime));
63
52
  const enableDownload = computed(() => toValue(props.enableDownload));
64
53
  const enableStar = computed(() => toValue(props.enableStar));
65
- const enableCopyLink = computed(() => toValue(props.enableCopyLink));
66
- const showActions = computed(() => sourceUrl.value || updateTime.value || enableDownload.value || enableStar.value || enableCopyLink.value);
54
+ const showActions = computed(() => sourceUrl.value || updateTime.value || enableDownload.value || enableStar.value);
67
55
  const showDivider = computed(() => sourceUrl.value && (enableDownload.value || enableStar.value));
68
56
  const vDompurifyHtml = buildVueDompurifyHTMLDirective({
69
57
  default: {
@@ -71,61 +59,59 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
71
59
  }
72
60
  });
73
61
  const { lePadV } = useScreen();
62
+ const { width } = useWindowSize();
74
63
  const { t } = useI18n();
75
- const message = useMessage();
76
- const toast = useToast();
64
+ const titleRef = ref();
65
+ const isFirstH1 = ref(false);
77
66
  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
+ });
78
81
  const openSourceUrl = () => {
79
82
  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;
100
83
  };
101
84
  return (_ctx, _cache) => {
102
85
  var _a;
103
86
  return openBlock(), createElementBlock(Fragment, null, [
104
87
  createElementVNode("div", {
105
- class: normalizeClass(["o-doc-title", {
106
- "is-simple": unref(lePadV),
107
- "first-h1": true
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
108
94
  }])
109
95
  }, [
110
96
  createElementVNode("div", _hoisted_1, [
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)), [
97
+ withDirectives(createElementVNode("div", _hoisted_2, null, 512), [
114
98
  [unref(vDompurifyHtml), (_a = __props.el) == null ? void 0 : _a.outerHTML]
115
99
  ])
116
100
  ]),
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, [
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, [
129
115
  enableDownload.value ? (openBlock(), createBlock(unref(OPopover), {
130
116
  key: 0,
131
117
  position: "top",
@@ -134,7 +120,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
134
120
  }, {
135
121
  target: withCtx(() => [
136
122
  createVNode(unref(OIcon), {
137
- class: "o-doc-title-icon-download",
123
+ class: "o-md-page-title-icon-download",
138
124
  onClick: _cache[1] || (_cache[1] = ($event) => emit("download"))
139
125
  }, {
140
126
  default: withCtx(() => [
@@ -156,7 +142,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
156
142
  }, {
157
143
  target: withCtx(() => [
158
144
  createVNode(unref(OIcon), {
159
- class: "o-doc-title-icon-star",
145
+ class: "o-md-page-title-icon-star",
160
146
  onClick: _cache[2] || (_cache[2] = ($event) => emit("collect"))
161
147
  }, {
162
148
  default: withCtx(() => [
@@ -170,36 +156,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
170
156
  ]),
171
157
  _: 1
172
158
  })) : createCommentVNode("", true),
173
- enableCopyLink.value ? (openBlock(), createBlock(unref(OPopover), {
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
159
  showDivider.value ? (openBlock(), createBlock(unref(ODivider), {
196
- key: 3,
160
+ key: 2,
197
161
  direction: "v",
198
162
  style: { "--o-divider-label-gap": "0" }
199
163
  })) : createCommentVNode("", true),
200
164
  sourceUrl.value ? (openBlock(), createBlock(unref(OLink), {
201
- key: 4,
202
- class: "o-doc-title-source-code",
165
+ key: 3,
166
+ class: "o-md-page-title-source-code",
203
167
  size: "large",
204
168
  href: sourceUrl.value,
205
169
  target: "_blank",
@@ -207,7 +171,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
207
171
  }, {
208
172
  default: withCtx(() => [
209
173
  createTextVNode(toDisplayString(unref(t)("md.gitSource")) + " ", 1),
210
- createVNode(unref(OIcon), { class: "o-doc-title-icon-outlink" }, {
174
+ createVNode(unref(OIcon), { class: "o-md-page-title-icon-outlink" }, {
211
175
  default: withCtx(() => [
212
176
  createVNode(unref(IconOutlink))
213
177
  ]),
@@ -217,14 +181,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
217
181
  _: 1
218
182
  }, 8, ["href"])) : createCommentVNode("", true)
219
183
  ]),
220
- updateTime.value ? (openBlock(), createElementBlock("span", _hoisted_6, toDisplayString(unref(t)("md.updateTime")) + toDisplayString(updateTime.value), 1)) : createCommentVNode("", true)
184
+ updateTime.value ? (openBlock(), createElementBlock("span", _hoisted_5, toDisplayString(unref(t)("md.updateTime")) + toDisplayString(updateTime.value), 1)) : createCommentVNode("", true)
221
185
  ], 64))
222
186
  ])) : createCommentVNode("", true)
223
187
  ], 2),
224
188
  unref(lePadV) && showActions.value ? (openBlock(), createBlock(unref(ODialog), {
225
189
  key: 0,
226
190
  visible: showActionsDlg.value,
227
- "onUpdate:visible": _cache[3] || (_cache[3] = ($event) => showActionsDlg.value = $event),
191
+ "onUpdate:visible": _cache[5] || (_cache[5] = ($event) => showActionsDlg.value = $event),
228
192
  size: "medium",
229
193
  "phone-half-full": ""
230
194
  }, {
@@ -232,13 +196,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
232
196
  createTextVNode(toDisplayString(unref(t)("md.moreActions")), 1)
233
197
  ]),
234
198
  default: withCtx(() => [
235
- createElementVNode("div", _hoisted_7, [
199
+ createElementVNode("div", _hoisted_6, [
236
200
  enableDownload.value ? (openBlock(), createElementBlock("div", {
237
201
  key: 0,
238
- class: "o-doc-title-dlg-action-box",
239
- onClick: onDownload
202
+ class: "o-md-page-dlg-action-box",
203
+ onClick: _cache[3] || (_cache[3] = ($event) => emit("download"))
240
204
  }, [
241
- createElementVNode("div", _hoisted_8, [
205
+ createElementVNode("div", _hoisted_7, [
242
206
  createVNode(unref(OIcon), null, {
243
207
  default: withCtx(() => [
244
208
  createVNode(unref(IconDownload))
@@ -246,14 +210,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
246
210
  _: 1
247
211
  })
248
212
  ]),
249
- createElementVNode("div", _hoisted_9, toDisplayString(unref(t)("md.downloadDoc")), 1)
213
+ createElementVNode("div", _hoisted_8, toDisplayString(unref(t)("md.downloadDoc")), 1)
250
214
  ])) : createCommentVNode("", true),
251
215
  enableStar.value ? (openBlock(), createElementBlock("div", {
252
216
  key: 1,
253
- class: "o-doc-title-dlg-action-box",
254
- onClick: onCollect
217
+ class: "o-md-page-dlg-action-box",
218
+ onClick: _cache[4] || (_cache[4] = ($event) => emit("collect"))
255
219
  }, [
256
- createElementVNode("div", _hoisted_10, [
220
+ createElementVNode("div", _hoisted_9, [
257
221
  createVNode(unref(OIcon), null, {
258
222
  default: withCtx(() => [
259
223
  createVNode(unref(IconStar))
@@ -261,29 +225,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
261
225
  _: 1
262
226
  })
263
227
  ]),
264
- createElementVNode("div", _hoisted_11, toDisplayString(unref(t)("md.starDoc")), 1)
265
- ])) : createCommentVNode("", true),
266
- enableCopyLink.value ? (openBlock(), createElementBlock("div", {
267
- key: 2,
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)
228
+ createElementVNode("div", _hoisted_10, toDisplayString(unref(t)("md.starDoc")), 1)
280
229
  ])) : createCommentVNode("", true),
281
230
  sourceUrl.value ? (openBlock(), createElementBlock("div", {
282
- key: 3,
283
- class: "o-doc-title-dlg-action-box",
231
+ key: 2,
232
+ class: "o-md-page-dlg-action-box",
284
233
  onClick: openSourceUrl
285
234
  }, [
286
- createElementVNode("div", _hoisted_14, [
235
+ createElementVNode("div", _hoisted_11, [
287
236
  createVNode(unref(OIcon), null, {
288
237
  default: withCtx(() => [
289
238
  createVNode(unref(IconOutlink))
@@ -291,7 +240,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
291
240
  _: 1
292
241
  })
293
242
  ]),
294
- createElementVNode("div", _hoisted_15, toDisplayString(unref(t)("md.gitSource")), 1)
243
+ createElementVNode("div", _hoisted_12, toDisplayString(unref(t)("md.gitSource")), 1)
295
244
  ])) : createCommentVNode("", true)
296
245
  ])
297
246
  ]),