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

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 (121) 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 +43 -43
  15. package/dist/components.css +2 -2
  16. package/dist/components.es.js +12154 -11869
  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/components/article/OArticle.css +18 -124
  21. package/dist/treeshaking/components/article/OArticle.vue.d.ts +206 -14
  22. package/dist/treeshaking/components/article/OArticle.vue.mjs +1 -1
  23. package/dist/treeshaking/components/article/OArticle.vue2.mjs +48 -82
  24. package/dist/treeshaking/components/article/OArticleList.css +7 -6
  25. package/dist/treeshaking/components/article/OArticleList.vue.mjs +48 -34
  26. package/dist/treeshaking/components/article/components/ArticleTitle.css +123 -0
  27. package/dist/treeshaking/components/article/components/ArticleTitle.vue.d.ts +22 -0
  28. package/dist/treeshaking/components/article/components/ArticleTitle.vue.mjs +7 -0
  29. package/dist/treeshaking/components/article/components/ArticleTitle.vue2.mjs +97 -0
  30. package/dist/treeshaking/components/article/components/DocTitle.css +246 -0
  31. package/dist/treeshaking/components/{markdown/components/MarkdownPageTitle.vue.d.ts → article/components/DocTitle.vue.d.ts} +6 -5
  32. package/dist/treeshaking/components/article/components/DocTitle.vue.mjs +7 -0
  33. package/dist/treeshaking/components/{markdown/components/MarkdownPageTitle.vue2.mjs → article/components/DocTitle.vue2.mjs} +131 -80
  34. package/dist/treeshaking/components/article/index.d.ts +131 -25
  35. package/dist/treeshaking/components/article/types.d.ts +8 -2
  36. package/dist/treeshaking/components/article-anchor/OArticleAnchor.css +4 -4
  37. package/dist/treeshaking/components/article-anchor/OArticleAnchor.vue.mjs +1 -1
  38. package/dist/treeshaking/components/article-anchor/OArticleAnchor.vue2.mjs +4 -5
  39. package/dist/treeshaking/components/doc-layout/ODocLayout.css +271 -0
  40. package/dist/treeshaking/components/doc-layout/ODocLayout.vue.d.ts +38 -0
  41. package/dist/treeshaking/components/doc-layout/ODocLayout.vue.mjs +7 -0
  42. package/dist/treeshaking/components/doc-layout/ODocLayout.vue2.mjs +165 -0
  43. package/dist/treeshaking/components/doc-layout/index.d.ts +59 -0
  44. package/dist/treeshaking/components/doc-layout/index.mjs +9 -0
  45. package/dist/treeshaking/components/events/OEventsList.vue.mjs +1 -1
  46. package/dist/treeshaking/components/markdown/OMarkdown.vue.d.ts +9 -16
  47. package/dist/treeshaking/components/markdown/OMarkdown.vue.mjs +1 -1
  48. package/dist/treeshaking/components/markdown/OMarkdown.vue2.mjs +68 -36
  49. package/dist/treeshaking/components/markdown/OMarkdown2.css +3 -3
  50. package/dist/treeshaking/components/markdown/components/MarkdownTitle.css +22 -22
  51. package/dist/treeshaking/components/markdown/components/MarkdownTitle.vue.mjs +1 -1
  52. package/dist/treeshaking/components/markdown/components/MarkdownTitle.vue2.mjs +11 -5
  53. package/dist/treeshaking/components/markdown/index.d.ts +19 -45
  54. package/dist/treeshaking/components/meeting/OMeetingMyCalendar.vue.mjs +5 -1
  55. package/dist/treeshaking/components/meeting/components/OMeetingCalendarList.vue.mjs +5 -1
  56. package/dist/treeshaking/components/recursion-menu/ORecursionMenu.vue.mjs +1 -1
  57. package/dist/treeshaking/components/summit/OSummitLive.css +38 -22
  58. package/dist/treeshaking/components/summit/OSummitLive.vue.mjs +1 -1
  59. package/dist/treeshaking/components/summit/OSummitLive.vue2.mjs +37 -10
  60. package/dist/treeshaking/components/summit/OSummitSchedule.css +33 -33
  61. package/dist/treeshaking/components/summit/OSummitSchedule.vue.mjs +1 -1
  62. package/dist/treeshaking/components/summit/OSummitSchedule.vue2.mjs +7 -13
  63. package/dist/treeshaking/components/summit/components/OSummitTabs.css +31 -30
  64. package/dist/treeshaking/components/summit/components/OSummitTabs.vue.mjs +1 -1
  65. package/dist/treeshaking/components/summit/types.d.ts +20 -7
  66. package/dist/treeshaking/components/summit/utils.d.ts +11 -1
  67. package/dist/treeshaking/components/summit/utils.mjs +30 -0
  68. package/dist/treeshaking/components/user-center/OLayout.css +13 -13
  69. package/dist/treeshaking/components/user-center/OLayout.vue.mjs +1 -1
  70. package/dist/treeshaking/components/user-center/OLayout.vue2.mjs +1 -1
  71. package/dist/treeshaking/components/user-center/OUserInfo.css +109 -109
  72. package/dist/treeshaking/components/user-center/OUserInfo.vue.mjs +1 -1
  73. package/dist/treeshaking/components/user-center/OUserInfo.vue2.mjs +1 -1
  74. package/dist/treeshaking/components/user-center/OUserInfo2.css +8 -8
  75. package/dist/treeshaking/components/user-center/OUserInfo3.css +4 -4
  76. package/dist/treeshaking/components/user-center/internal/OAppDialog.css +19 -19
  77. package/dist/treeshaking/components/user-center/internal/OAppDialog.vue.mjs +1 -1
  78. package/dist/treeshaking/components/user-center/internal/OAppDialog.vue2.mjs +1 -1
  79. package/dist/treeshaking/components/user-center/internal/OCommonHeader.css +9 -9
  80. package/dist/treeshaking/components/user-center/internal/OCommonHeader.vue.mjs +1 -1
  81. package/dist/treeshaking/components/user-center/internal/OCommonHeader.vue2.mjs +1 -1
  82. package/dist/treeshaking/components/user-center/internal/ODeleteAccountModal.css +32 -32
  83. package/dist/treeshaking/components/user-center/internal/ODeleteAccountModal.vue.mjs +1 -1
  84. package/dist/treeshaking/components/user-center/internal/ODeleteAccountModal.vue2.mjs +1 -1
  85. package/dist/treeshaking/components/user-center/internal/ODeleteAccountModal2.css +11 -11
  86. package/dist/treeshaking/components/user-center/internal/OEditNicknameDialog.css +21 -21
  87. package/dist/treeshaking/components/user-center/internal/OEditNicknameDialog.vue.mjs +1 -1
  88. package/dist/treeshaking/components/user-center/internal/OEditNicknameDialog.vue2.mjs +1 -1
  89. package/dist/treeshaking/components/user-center/internal/OEditNicknameDialog2.css +1 -1
  90. package/dist/treeshaking/components/user-center/internal/OEditOrgDialog.css +21 -21
  91. package/dist/treeshaking/components/user-center/internal/OEditOrgDialog.vue.mjs +1 -1
  92. package/dist/treeshaking/components/user-center/internal/OEditOrgDialog.vue2.mjs +1 -1
  93. package/dist/treeshaking/components/user-center/internal/OEditOrgDialog2.css +1 -1
  94. package/dist/treeshaking/components/user-center/internal/OModifyPwd.css +21 -21
  95. package/dist/treeshaking/components/user-center/internal/OModifyPwd.vue.mjs +1 -1
  96. package/dist/treeshaking/components/user-center/internal/OModifyPwd.vue2.mjs +1 -1
  97. package/dist/treeshaking/components/user-center/internal/OPasswordPopInput.css +4 -4
  98. package/dist/treeshaking/components/user-center/internal/OPasswordPopInput.vue.mjs +1 -1
  99. package/dist/treeshaking/components/user-center/internal/OPasswordPopInput.vue2.mjs +2 -2
  100. package/dist/treeshaking/components/user-center/internal/OToBindingTipModal.css +16 -16
  101. package/dist/treeshaking/components/user-center/internal/OToBindingTipModal.vue.mjs +1 -1
  102. package/dist/treeshaking/components/user-center/internal/OToBindingTipModal.vue2.mjs +1 -1
  103. package/dist/treeshaking/components/user-center/internal/OUnbindingThirdpartyAccountModal.css +18 -18
  104. package/dist/treeshaking/components/user-center/internal/OUnbindingThirdpartyAccountModal.vue.mjs +1 -1
  105. package/dist/treeshaking/components/user-center/internal/OUnbindingThirdpartyAccountModal.vue2.mjs +1 -1
  106. package/dist/treeshaking/components/user-center/internal/OUploadAvatar.css +106 -106
  107. package/dist/treeshaking/components/user-center/internal/OUploadAvatar.vue.mjs +1 -1
  108. package/dist/treeshaking/components/user-center/internal/OUploadAvatar.vue2.mjs +1 -1
  109. package/dist/treeshaking/components/user-center/internal/OUploadAvatar2.css +2 -2
  110. package/dist/treeshaking/components/user-center/verify/Verify.css +44 -44
  111. package/dist/treeshaking/components/user-center/verify/Verify.vue.mjs +1 -1
  112. package/dist/treeshaking/i18n/en.mjs +2 -1
  113. package/dist/treeshaking/i18n/zh.mjs +2 -1
  114. package/dist/treeshaking/index.d.ts +1 -0
  115. package/dist/treeshaking/index.mjs +2 -0
  116. package/package.json +3 -3
  117. package/dist/components/markdown/replacer/h1.d.ts +0 -11
  118. package/dist/treeshaking/components/markdown/components/MarkdownPageTitle.css +0 -261
  119. package/dist/treeshaking/components/markdown/components/MarkdownPageTitle.vue.mjs +0 -7
  120. package/dist/treeshaking/components/markdown/replacer/h1.d.ts +0 -11
  121. package/dist/treeshaking/components/markdown/replacer/h1.mjs +0 -29
@@ -0,0 +1,246 @@
1
+ .hover-icon-rotate .o-icon[data-v-ea84d56c] {
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-ea84d56c] {
6
+ transform: rotate(-180deg);
7
+ }
8
+ }
9
+ .o-doc-title[data-v-ea84d56c] {
10
+ align-items: center;
11
+ justify-content: space-between;
12
+ gap: 12px;
13
+ padding: 16px;
14
+ border-radius: var(--o-radius-xs);
15
+ background-image: var(--bc7b9dec);
16
+ background-position: 100% 100%;
17
+ background-repeat: no-repeat;
18
+ background-size: cover;
19
+ }
20
+ @media (max-width: 1680px) {
21
+ .o-doc-title[data-v-ea84d56c] {
22
+ gap: 8px;
23
+ padding: 12px;
24
+ }
25
+ }
26
+ @media (max-width: 1200px) {
27
+ .o-doc-title[data-v-ea84d56c] {
28
+ gap: 8px;
29
+ padding: 8px;
30
+ }
31
+ }
32
+ @media (max-width: 840px) {
33
+ .o-doc-title[data-v-ea84d56c] {
34
+ gap: 12px;
35
+ padding: 16px;
36
+ }
37
+ }
38
+ .o-doc-title .o-doc-title-content[data-v-ea84d56c] {
39
+ display: flex;
40
+ flex-direction: column;
41
+ gap: 8px;
42
+ min-width: 0;
43
+ }
44
+ .o-doc-title .o-doc-title-text[data-v-ea84d56c] h1 {
45
+ margin-top: 0;
46
+ margin-bottom: 0;
47
+ font-size: 32px;
48
+ line-height: 44px;
49
+ }
50
+ @media (min-width: 1201px) and (max-width: 1680px) {
51
+ .o-doc-title .o-doc-title-text[data-v-ea84d56c] h1 {
52
+ font-size: 20px;
53
+ line-height: 28px;
54
+ }
55
+ }
56
+ @media (min-width: 841px) and (max-width: 1200px) {
57
+ .o-doc-title .o-doc-title-text[data-v-ea84d56c] h1 {
58
+ font-size: 20px;
59
+ line-height: 28px;
60
+ }
61
+ }
62
+ @media (min-width: 601px) and (max-width: 840px) {
63
+ .o-doc-title .o-doc-title-text[data-v-ea84d56c] h1 {
64
+ font-size: 18px;
65
+ line-height: 26px;
66
+ }
67
+ }
68
+ @media (max-width: 600px) {
69
+ .o-doc-title .o-doc-title-text[data-v-ea84d56c] h1 {
70
+ font-size: 16px;
71
+ line-height: 24px;
72
+ }
73
+ }
74
+ .o-doc-title .o-doc-title-actions[data-v-ea84d56c] {
75
+ display: flex;
76
+ align-items: center;
77
+ justify-content: space-between;
78
+ margin-top: 12px;
79
+ }
80
+ @media (max-width: 1680px) {
81
+ .o-doc-title .o-doc-title-actions[data-v-ea84d56c] {
82
+ margin-top: 8px;
83
+ }
84
+ }
85
+ @media (max-width: 840px) {
86
+ .o-doc-title .o-doc-title-actions[data-v-ea84d56c] {
87
+ margin-top: 0;
88
+ }
89
+ }
90
+ .o-doc-title .o-doc-title-actions .o-doc-title-icon-more[data-v-ea84d56c] {
91
+ font-size: 24px;
92
+ color: var(--o-color-info2);
93
+ }
94
+ .o-doc-title .o-doc-title-actions .o-doc-title-source-code[data-v-ea84d56c] {
95
+ font-size: 16px;
96
+ line-height: 24px;
97
+ }
98
+ @media (min-width: 1201px) and (max-width: 1680px) {
99
+ .o-doc-title .o-doc-title-actions .o-doc-title-source-code[data-v-ea84d56c] {
100
+ font-size: 14px;
101
+ line-height: 22px;
102
+ }
103
+ }
104
+ @media (min-width: 841px) and (max-width: 1200px) {
105
+ .o-doc-title .o-doc-title-actions .o-doc-title-source-code[data-v-ea84d56c] {
106
+ font-size: 14px;
107
+ line-height: 22px;
108
+ }
109
+ }
110
+ @media (min-width: 601px) and (max-width: 840px) {
111
+ .o-doc-title .o-doc-title-actions .o-doc-title-source-code[data-v-ea84d56c] {
112
+ font-size: 14px;
113
+ line-height: 22px;
114
+ }
115
+ }
116
+ @media (max-width: 600px) {
117
+ .o-doc-title .o-doc-title-actions .o-doc-title-source-code[data-v-ea84d56c] {
118
+ font-size: 12px;
119
+ line-height: 18px;
120
+ }
121
+ }
122
+ .o-doc-title .o-doc-title-actions .o-doc-title-source-code[data-v-ea84d56c] .o-link-label {
123
+ display: flex;
124
+ align-items: center;
125
+ }
126
+ .o-doc-title .o-doc-title-actions .o-doc-title-icon-outlink[data-v-ea84d56c] {
127
+ font-size: 22px;
128
+ line-height: 30px;
129
+ }
130
+ @media (min-width: 1201px) and (max-width: 1680px) {
131
+ .o-doc-title .o-doc-title-actions .o-doc-title-icon-outlink[data-v-ea84d56c] {
132
+ font-size: 18px;
133
+ line-height: 26px;
134
+ }
135
+ }
136
+ @media (min-width: 841px) and (max-width: 1200px) {
137
+ .o-doc-title .o-doc-title-actions .o-doc-title-icon-outlink[data-v-ea84d56c] {
138
+ font-size: 16px;
139
+ line-height: 24px;
140
+ }
141
+ }
142
+ @media (min-width: 601px) and (max-width: 840px) {
143
+ .o-doc-title .o-doc-title-actions .o-doc-title-icon-outlink[data-v-ea84d56c] {
144
+ font-size: 16px;
145
+ line-height: 24px;
146
+ }
147
+ }
148
+ @media (max-width: 600px) {
149
+ .o-doc-title .o-doc-title-actions .o-doc-title-icon-outlink[data-v-ea84d56c] {
150
+ font-size: 16px;
151
+ line-height: 24px;
152
+ }
153
+ }
154
+ .o-doc-title .o-doc-title-actions .o-doc-title-update-time[data-v-ea84d56c] {
155
+ color: var(--o-color-info3);
156
+ font-size: 14px;
157
+ line-height: 22px;
158
+ }
159
+ @media (min-width: 1201px) and (max-width: 1680px) {
160
+ .o-doc-title .o-doc-title-actions .o-doc-title-update-time[data-v-ea84d56c] {
161
+ font-size: 14px;
162
+ line-height: 18px;
163
+ }
164
+ }
165
+ @media (min-width: 841px) and (max-width: 1200px) {
166
+ .o-doc-title .o-doc-title-actions .o-doc-title-update-time[data-v-ea84d56c] {
167
+ font-size: 12px;
168
+ line-height: 18px;
169
+ }
170
+ }
171
+ @media (min-width: 601px) and (max-width: 840px) {
172
+ .o-doc-title .o-doc-title-actions .o-doc-title-update-time[data-v-ea84d56c] {
173
+ font-size: 12px;
174
+ line-height: 18px;
175
+ }
176
+ }
177
+ @media (max-width: 600px) {
178
+ .o-doc-title .o-doc-title-actions .o-doc-title-update-time[data-v-ea84d56c] {
179
+ font-size: 12px;
180
+ line-height: 18px;
181
+ }
182
+ }
183
+ .o-doc-title .o-doc-title-actions .o-doc-title-actions-left[data-v-ea84d56c] {
184
+ display: flex;
185
+ align-items: center;
186
+ gap: 12px;
187
+ }
188
+ .o-doc-title .o-doc-title-actions .o-doc-title-icon-download[data-v-ea84d56c],
189
+ .o-doc-title .o-doc-title-actions .o-doc-title-icon-star[data-v-ea84d56c],
190
+ .o-doc-title .o-doc-title-actions .o-doc-title-icon-copy[data-v-ea84d56c] {
191
+ font-size: 24px;
192
+ cursor: pointer;
193
+ }
194
+ @media (hover: hover) {
195
+ .o-doc-title .o-doc-title-actions .o-doc-title-icon-download[data-v-ea84d56c]:hover,
196
+ .o-doc-title .o-doc-title-actions .o-doc-title-icon-star[data-v-ea84d56c]:hover,
197
+ .o-doc-title .o-doc-title-actions .o-doc-title-icon-copy[data-v-ea84d56c]:hover {
198
+ color: var(--o-color-info1);
199
+ }
200
+ }
201
+ @media (max-width: 1680px) {
202
+ .o-doc-title .o-doc-title-actions .o-doc-title-icon-download[data-v-ea84d56c],
203
+ .o-doc-title .o-doc-title-actions .o-doc-title-icon-star[data-v-ea84d56c],
204
+ .o-doc-title .o-doc-title-actions .o-doc-title-icon-copy[data-v-ea84d56c] {
205
+ font-size: 20px;
206
+ }
207
+ }
208
+ .o-doc-title.is-simple[data-v-ea84d56c] {
209
+ padding: 0;
210
+ background-image: none;
211
+ background-color: var(--o-color-fill2);
212
+ }
213
+ @media (max-width: 840px) {
214
+ .o-doc-title.first-h1[data-v-ea84d56c] {
215
+ display: flex;
216
+ justify-content: space-between;
217
+ align-items: center;
218
+ }
219
+ }
220
+ .o-doc-title-dlg-action-box-container[data-v-ea84d56c] {
221
+ display: flex;
222
+ flex-wrap: wrap;
223
+ justify-content: flex-start;
224
+ column-gap: 8px;
225
+ row-gap: 24px;
226
+ }
227
+ .o-doc-title-dlg-action-box-container .o-doc-title-dlg-action-box[data-v-ea84d56c] {
228
+ flex: 0 0 calc(33.333% - 8px);
229
+ align-items: center;
230
+ display: flex;
231
+ flex-direction: column;
232
+ }
233
+ .o-doc-title-dlg-action-box-container .o-doc-title-dlg-action-box-icon[data-v-ea84d56c] {
234
+ display: flex;
235
+ justify-content: center;
236
+ align-items: center;
237
+ width: 40px;
238
+ height: 40px;
239
+ background-color: var(--o-color-fill1);
240
+ border-radius: 50%;
241
+ font-size: 24px;
242
+ }
243
+ .o-doc-title-dlg-action-box-container .o-doc-title-dlg-action-box-label[data-v-ea84d56c] {
244
+ margin-top: 8px;
245
+ color: var(--o-color-info1);
246
+ }
@@ -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
  ]),