@robot-admin/naive-ui-components 0.31.5 → 0.33.0

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 (285) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/README.md +11 -5
  3. package/README_EN.md +11 -5
  4. package/dist/C_AutoComplete.cjs +1 -0
  5. package/dist/C_AutoComplete.css +36 -0
  6. package/dist/C_AutoComplete.d.cts +4 -0
  7. package/dist/C_AutoComplete.d.ts +4 -0
  8. package/dist/C_AutoComplete.js +1 -0
  9. package/dist/C_AutoComplete2.cjs +1 -0
  10. package/dist/C_AutoComplete2.js +1 -0
  11. package/dist/C_AvatarGroup.d.cts +1 -1
  12. package/dist/C_AvatarGroup.d.ts +1 -1
  13. package/dist/C_Barcode.d.cts +1 -1
  14. package/dist/C_Barcode.d.ts +1 -1
  15. package/dist/C_BatchResult.d.cts +1 -1
  16. package/dist/C_BatchResult.d.ts +1 -1
  17. package/dist/C_Breadcrumb.d.cts +2 -2
  18. package/dist/C_Breadcrumb.d.ts +1 -1
  19. package/dist/C_Cascade.d.cts +1 -1
  20. package/dist/C_Cascade.d.ts +1 -1
  21. package/dist/C_Chat.d.cts +1 -1
  22. package/dist/C_Chat.d.ts +1 -1
  23. package/dist/C_City.d.cts +1 -1
  24. package/dist/C_City.d.ts +1 -1
  25. package/dist/C_Code.d.cts +1 -1
  26. package/dist/C_Code.d.ts +1 -1
  27. package/dist/C_ContextMenu.d.cts +1 -1
  28. package/dist/C_ContextMenu.d.ts +1 -1
  29. package/dist/C_DataPicker.css +235 -31
  30. package/dist/C_DataPicker.d.cts +2 -2
  31. package/dist/C_DataPicker.d.ts +2 -2
  32. package/dist/C_Date.d.cts +1 -1
  33. package/dist/C_Date.d.ts +1 -1
  34. package/dist/C_Density.d.cts +1 -1
  35. package/dist/C_Density.d.ts +1 -1
  36. package/dist/C_Editor.d.cts +1 -1
  37. package/dist/C_Editor.d.ts +1 -1
  38. package/dist/C_ErrorSummary.d.cts +1 -1
  39. package/dist/C_ErrorSummary.d.ts +1 -1
  40. package/dist/C_Form.base.css +68 -1
  41. package/dist/C_Form.cjs +1 -1
  42. package/dist/C_Form.css +68 -1
  43. package/dist/C_Form.d.cts +3 -3
  44. package/dist/C_Form.d.ts +5 -3
  45. package/dist/C_Form.js +1 -1
  46. package/dist/C_FormModal.cjs +1 -1
  47. package/dist/C_FormModal.d.cts +1 -1
  48. package/dist/C_FormModal.d.ts +3 -1
  49. package/dist/C_FormModal.js +1 -1
  50. package/dist/C_FormModal2.cjs +1 -1
  51. package/dist/C_FormModal2.js +1 -1
  52. package/dist/C_FormSearch.css +160 -72
  53. package/dist/C_FormSearch.d.cts +3 -3
  54. package/dist/C_FormSearch.d.ts +3 -3
  55. package/dist/C_GlobalSearch2.cjs +1 -1
  56. package/dist/C_GlobalSearch2.js +1 -1
  57. package/dist/C_Guide.d.cts +1 -1
  58. package/dist/C_Guide.d.ts +1 -1
  59. package/dist/C_Icon.d.cts +1 -1
  60. package/dist/C_Icon.d.ts +1 -1
  61. package/dist/C_Language.d.cts +1 -1
  62. package/dist/C_Language.d.ts +1 -1
  63. package/dist/C_Loading.d.cts +1 -1
  64. package/dist/C_Loading.d.ts +1 -1
  65. package/dist/C_Login.d.cts +1 -1
  66. package/dist/C_Login.d.ts +1 -1
  67. package/dist/C_Markdown.d.cts +1 -1
  68. package/dist/C_Markdown.d.ts +1 -1
  69. package/dist/C_Menu.d.cts +2 -2
  70. package/dist/C_Menu.d.ts +1 -1
  71. package/dist/C_OrgChart.d.cts +1 -1
  72. package/dist/C_OrgChart.d.ts +1 -1
  73. package/dist/C_Progress.d.cts +1 -1
  74. package/dist/C_Progress.d.ts +1 -1
  75. package/dist/C_SectionNav.d.cts +1 -1
  76. package/dist/C_SectionNav.d.ts +1 -1
  77. package/dist/C_Select.css +32 -1
  78. package/dist/C_Select.d.cts +4 -2
  79. package/dist/C_Select.d.ts +4 -2
  80. package/dist/C_Select2.cjs +1 -1
  81. package/dist/C_Select2.js +1 -1
  82. package/dist/C_Skeleton.d.cts +1 -1
  83. package/dist/C_Skeleton.d.ts +1 -1
  84. package/dist/C_Steps.d.cts +1 -1
  85. package/dist/C_Steps.d.ts +1 -1
  86. package/dist/C_Table.base.css +214 -147
  87. package/dist/C_Table.cjs +1 -1
  88. package/dist/C_Table.css +146 -146
  89. package/dist/C_Table.d.cts +3 -3
  90. package/dist/C_Table.d.ts +13 -10
  91. package/dist/C_Table.js +1 -1
  92. package/dist/C_Table2.cjs +4 -3
  93. package/dist/C_Table2.js +4 -3
  94. package/dist/C_TagsView.css +51 -51
  95. package/dist/C_TagsView.d.cts +2 -2
  96. package/dist/C_TagsView.d.ts +1 -1
  97. package/dist/C_TagsView2.cjs +1 -1
  98. package/dist/C_TagsView2.js +1 -1
  99. package/dist/C_Theme.d.cts +1 -1
  100. package/dist/C_Theme.d.ts +1 -1
  101. package/dist/C_Timeline.d.cts +1 -1
  102. package/dist/C_Timeline.d.ts +1 -1
  103. package/dist/C_Transfer.d.cts +1 -1
  104. package/dist/C_Transfer.d.ts +1 -1
  105. package/dist/C_Tree.cjs +1 -1
  106. package/dist/C_Tree.css +60 -23
  107. package/dist/C_Tree.d.cts +2 -2
  108. package/dist/C_Tree.d.ts +12 -9
  109. package/dist/C_Tree.js +1 -1
  110. package/dist/C_Tree2.cjs +1 -1
  111. package/dist/C_Tree2.js +1 -1
  112. package/dist/OptionStatus.cjs +1 -0
  113. package/dist/OptionStatus.js +1 -0
  114. package/dist/SearchFieldSettings.cjs +1 -0
  115. package/dist/SearchFieldSettings.js +1 -0
  116. package/dist/constants4.d.cts +9 -9
  117. package/dist/constants4.d.ts +9 -9
  118. package/dist/constants5.d.cts +2 -2
  119. package/dist/constants5.d.ts +2 -2
  120. package/dist/data.d.cts +2 -1
  121. package/dist/data.d.ts +2 -1
  122. package/dist/data2.d.cts +7 -7
  123. package/dist/data2.d.ts +7 -7
  124. package/dist/dateRange.d.cts +52 -7
  125. package/dist/dateRange.d.ts +52 -7
  126. package/dist/editors.cjs +1 -0
  127. package/dist/{useTableQuery.d.cts → editors.d.cts} +120 -13
  128. package/dist/{useTableQuery.d.ts → editors.d.ts} +120 -13
  129. package/dist/editors.js +1 -0
  130. package/dist/fieldRenderers.cjs +1 -0
  131. package/dist/fieldRenderers.js +1 -0
  132. package/dist/formField.cjs +1 -1
  133. package/dist/formField.d.cts +79 -29
  134. package/dist/formField.d.ts +79 -29
  135. package/dist/formField.js +1 -1
  136. package/dist/helpers.cjs +1 -1
  137. package/dist/helpers.js +1 -1
  138. package/dist/index.cjs +1 -1
  139. package/dist/index.d.cts +63 -59
  140. package/dist/index.d.ts +63 -58
  141. package/dist/index.js +1 -1
  142. package/dist/index.vue.d.cts +5 -5
  143. package/dist/index.vue.d.ts +5 -5
  144. package/dist/index10.vue.d.cts +27 -35
  145. package/dist/index10.vue.d.ts +37 -80
  146. package/dist/index11.vue.d.cts +37 -80
  147. package/dist/index11.vue.d.ts +83 -16
  148. package/dist/index12.vue.d.cts +83 -16
  149. package/dist/index12.vue.d.ts +16 -59
  150. package/dist/index13.vue.d.cts +16 -59
  151. package/dist/index13.vue.d.ts +57 -17
  152. package/dist/index14.vue.d.cts +57 -17
  153. package/dist/index14.vue.d.ts +18 -55
  154. package/dist/index15.vue.d.cts +18 -55
  155. package/dist/index15.vue.d.ts +53 -124
  156. package/dist/index16.vue.d.cts +53 -124
  157. package/dist/index16.vue.d.ts +123 -51
  158. package/dist/index17.vue.d.cts +123 -51
  159. package/dist/index17.vue.d.ts +52 -25
  160. package/dist/index18.vue.d.cts +52 -25
  161. package/dist/index18.vue.d.ts +25 -12
  162. package/dist/index19.vue.d.cts +25 -12
  163. package/dist/index19.vue.d.ts +13 -129
  164. package/dist/index2.vue.d.cts +26 -82
  165. package/dist/index2.vue.d.ts +26 -82
  166. package/dist/index20.vue.d.cts +13 -129
  167. package/dist/index20.vue.d.ts +129 -76
  168. package/dist/index21.vue.d.cts +129 -76
  169. package/dist/index21.vue.d.ts +78 -72
  170. package/dist/index22.vue.d.cts +75 -97
  171. package/dist/index22.vue.d.ts +68 -96
  172. package/dist/index23.vue.d.cts +91 -40
  173. package/dist/index23.vue.d.ts +91 -40
  174. package/dist/index24.vue.d.cts +49 -23
  175. package/dist/index24.vue.d.ts +49 -23
  176. package/dist/index25.vue.d.cts +19 -46
  177. package/dist/index25.vue.d.ts +19 -46
  178. package/dist/index26.vue.d.cts +25 -98
  179. package/dist/index26.vue.d.ts +25 -98
  180. package/dist/index27.vue.d.cts +95 -37
  181. package/dist/index27.vue.d.ts +95 -37
  182. package/dist/index28.vue.d.cts +34 -8
  183. package/dist/index28.vue.d.ts +34 -8
  184. package/dist/index29.vue.d.cts +9 -86
  185. package/dist/index29.vue.d.ts +9 -86
  186. package/dist/index3.vue.d.cts +80 -30
  187. package/dist/index3.vue.d.ts +80 -30
  188. package/dist/index30.vue.d.cts +85 -99
  189. package/dist/index30.vue.d.ts +85 -99
  190. package/dist/index31.vue.d.cts +94 -63
  191. package/dist/index31.vue.d.ts +94 -63
  192. package/dist/index32.vue.d.cts +79 -0
  193. package/dist/index32.vue.d.ts +79 -0
  194. package/dist/index4.vue.d.cts +30 -19
  195. package/dist/index4.vue.d.ts +30 -19
  196. package/dist/index5.vue.d.cts +19 -128
  197. package/dist/index5.vue.d.ts +17 -34
  198. package/dist/index6.vue.d.cts +127 -35
  199. package/dist/index6.vue.d.ts +30 -22
  200. package/dist/index7.vue.d.cts +30 -22
  201. package/dist/index7.vue.d.ts +25 -118
  202. package/dist/index8.vue.d.cts +25 -118
  203. package/dist/index8.vue.d.ts +112 -21
  204. package/dist/index9.vue.d.cts +112 -21
  205. package/dist/index9.vue.d.ts +27 -35
  206. package/dist/mapUtils.d.cts +3 -3
  207. package/dist/mapUtils.d.ts +3 -3
  208. package/dist/optionSource.d.cts +30 -0
  209. package/dist/optionSource.d.ts +30 -0
  210. package/dist/public.d.ts +2 -0
  211. package/dist/resolver.cjs +1 -1
  212. package/dist/resolver.d.cts +1 -1
  213. package/dist/resolver.d.ts +1 -1
  214. package/dist/resolver.js +1 -1
  215. package/dist/selectPresentation.cjs +1 -1
  216. package/dist/selectPresentation.js +1 -1
  217. package/dist/serializeSearch.cjs +1 -1
  218. package/dist/serializeSearch.js +1 -1
  219. package/dist/sourceControls.cjs +1 -0
  220. package/dist/sourceControls.js +1 -0
  221. package/dist/style.css +513 -324
  222. package/dist/types2.d.cts +29 -103
  223. package/dist/types2.d.ts +30 -55
  224. package/dist/types3.d.cts +106 -55
  225. package/dist/types3.d.ts +60 -0
  226. package/dist/types4.d.cts +60 -0
  227. package/dist/types4.d.ts +50 -0
  228. package/dist/types5.d.cts +50 -0
  229. package/dist/useCalendarEvents.d.cts +1 -1
  230. package/dist/useCalendarEvents.d.ts +1 -1
  231. package/dist/useCollapsePanel.d.cts +3 -3
  232. package/dist/useCollapsePanel.d.ts +3 -3
  233. package/dist/useComponentLocale.cjs +1 -1
  234. package/dist/useComponentLocale.js +1 -1
  235. package/dist/useCropperCore.d.cts +9 -9
  236. package/dist/useCropperCore.d.ts +9 -9
  237. package/dist/useDataResource.cjs +1 -1
  238. package/dist/useDataResource.js +1 -1
  239. package/dist/useDraggableLayout.d.cts +2 -2
  240. package/dist/useDraggableLayout.d.ts +2 -2
  241. package/dist/useDynamicFormState.d.cts +17 -3
  242. package/dist/useDynamicFormState.d.ts +17 -3
  243. package/dist/useEdgeInteraction.d.cts +2 -2
  244. package/dist/useEdgeInteraction.d.ts +2 -2
  245. package/dist/useFormConfig.d.cts +5 -2
  246. package/dist/useFormConfig.d.ts +5 -2
  247. package/dist/useFormRenderer.d.cts +1 -1
  248. package/dist/useFormRenderer.d.ts +1 -1
  249. package/dist/useFullscreen.d.cts +2 -2
  250. package/dist/useFullscreen.d.ts +2 -2
  251. package/dist/useGlobalSearch.d.cts +8 -0
  252. package/dist/useGlobalSearch.d.ts +8 -0
  253. package/dist/useInfiniteScroll.d.cts +2 -2
  254. package/dist/useInfiniteScroll.d.ts +2 -2
  255. package/dist/useQRCode.d.cts +3 -3
  256. package/dist/useQRCode.d.ts +3 -3
  257. package/dist/useSignatureHistory.d.cts +4 -4
  258. package/dist/useSignatureHistory.d.ts +4 -4
  259. package/dist/useSplitResize.d.cts +7 -7
  260. package/dist/useSplitResize.d.ts +7 -7
  261. package/dist/useWorkflowValidation.d.cts +4 -4
  262. package/dist/useWorkflowValidation.d.ts +4 -4
  263. package/dist/verification.d.cts +6 -6
  264. package/dist/verification.d.ts +6 -6
  265. package/docs/architecture.md +3 -1
  266. package/docs/components.en.md +2 -1
  267. package/docs/components.md +2 -1
  268. package/docs/engineering.en.md +11 -1
  269. package/docs/engineering.md +11 -1
  270. package/docs/guides/component-contracts.md +72 -0
  271. package/docs/guides/data-picker.md +37 -1
  272. package/docs/guides/remote-options.md +117 -0
  273. package/docs/guides/search-workflows.md +162 -2
  274. package/docs/guides/table-editing.md +79 -0
  275. package/docs/guides/tree.en.md +41 -0
  276. package/docs/guides/tree.md +80 -1
  277. package/docs/search-selection-coverage.md +59 -0
  278. package/docs/wl-ui-produce-coverage.md +2 -0
  279. package/package.json +6 -3
  280. package/dist/helpers2.cjs +0 -1
  281. package/dist/helpers2.js +0 -1
  282. package/dist/temporalField.cjs +0 -1
  283. package/dist/temporalField.js +0 -1
  284. package/dist/useTableQuery.cjs +0 -1
  285. package/dist/useTableQuery.js +0 -1
@@ -68,7 +68,7 @@
68
68
  * 标签组件样式 - 精简版
69
69
  * =========================================== */
70
70
  /* --------- 标签视图容器 --------- */
71
- .tags-view-container[data-v-bd2a9250] {
71
+ .tags-view-container[data-v-22e190cf] {
72
72
  border-bottom: 1px solid var(--color-border);
73
73
  padding: 8px 16px 0;
74
74
  position: relative;
@@ -76,14 +76,14 @@
76
76
  }
77
77
 
78
78
  /* --------- 滚动轨道容器 --------- */
79
- .tags-track[data-v-bd2a9250] {
79
+ .tags-track[data-v-22e190cf] {
80
80
  width: 100%;
81
81
  overflow: hidden;
82
82
  position: relative;
83
83
  }
84
84
 
85
85
  /* --------- 滚动容器 --------- */
86
- .tags-container[data-v-bd2a9250] {
86
+ .tags-container[data-v-22e190cf] {
87
87
  display: flex;
88
88
  overflow-x: auto;
89
89
  overflow-y: hidden;
@@ -93,12 +93,12 @@
93
93
  align-items: center;
94
94
  min-height: 40px;
95
95
  }
96
- .tags-container[data-v-bd2a9250]::-webkit-scrollbar {
96
+ .tags-container[data-v-22e190cf]::-webkit-scrollbar {
97
97
  display: none;
98
98
  }
99
99
 
100
100
  /* --------- 现代化标签样式 --------- */
101
- .n-tag[data-v-bd2a9250] {
101
+ .n-tag[data-v-22e190cf] {
102
102
  position: relative;
103
103
  display: inline-flex;
104
104
  align-items: center;
@@ -115,7 +115,7 @@
115
115
  white-space: nowrap;
116
116
  /* 内部高光效果 */
117
117
  }
118
- .n-tag[data-v-bd2a9250]::before {
118
+ .n-tag[data-v-22e190cf]::before {
119
119
  content: "";
120
120
  position: absolute;
121
121
  top: 1px;
@@ -127,67 +127,67 @@
127
127
  opacity: 0.5;
128
128
  transition: opacity 0.22s ease;
129
129
  }
130
- .n-tag[data-v-bd2a9250] {
130
+ .n-tag[data-v-22e190cf] {
131
131
  /* --------- 悬停效果 --------- */
132
132
  }
133
- .n-tag[data-v-bd2a9250]:hover:not([type=primary]) {
133
+ .n-tag[data-v-22e190cf]:hover:not([type=primary]) {
134
134
  color: var(--color-primary) !important;
135
135
  border-color: var(--color-primary);
136
136
  transform: scale(1.02);
137
137
  }
138
- .n-tag[data-v-bd2a9250]:hover:not([type=primary])::before {
138
+ .n-tag[data-v-22e190cf]:hover:not([type=primary])::before {
139
139
  opacity: 0.8;
140
140
  }
141
- .n-tag[data-v-bd2a9250]:hover:not([type=primary]) .c-icon,
142
- .n-tag[data-v-bd2a9250]:hover:not([type=primary]) [class*='c-icon'] {
141
+ .n-tag[data-v-22e190cf]:hover:not([type=primary]) .c-icon,
142
+ .n-tag[data-v-22e190cf]:hover:not([type=primary]) [class*='c-icon'] {
143
143
  color: var(--color-primary) !important;
144
144
  }
145
- .n-tag:hover:not([type=primary]) i[data-v-bd2a9250],
146
- .n-tag:hover:not([type=primary]) .icon[data-v-bd2a9250] {
145
+ .n-tag:hover:not([type=primary]) i[data-v-22e190cf],
146
+ .n-tag:hover:not([type=primary]) .icon[data-v-22e190cf] {
147
147
  color: var(--color-primary) !important;
148
148
  }
149
- .n-tag[data-v-bd2a9250]:hover:not([type=primary]) .n-tag__close {
149
+ .n-tag[data-v-22e190cf]:hover:not([type=primary]) .n-tag__close {
150
150
  color: var(--color-primary) !important;
151
151
  opacity: 0.8;
152
152
  transform: scale(1.05);
153
153
  }
154
- .n-tag[data-v-bd2a9250] {
154
+ .n-tag[data-v-22e190cf] {
155
155
  /* --------- 激活状态 --------- */
156
156
  }
157
- .n-tag[type=primary][data-v-bd2a9250] {
157
+ .n-tag[type=primary][data-v-22e190cf] {
158
158
  background: var(--tag-active-bg, rgba(32, 128, 240, 0.08)) !important;
159
159
  color: var(--color-primary) !important;
160
160
  border-color: var(--color-primary) !important;
161
161
  font-weight: 600;
162
162
  transform: scale(1.02);
163
163
  }
164
- .n-tag[type=primary][data-v-bd2a9250]::before {
164
+ .n-tag[type=primary][data-v-22e190cf]::before {
165
165
  opacity: 0.6;
166
166
  }
167
- .n-tag[type=primary][data-v-bd2a9250] .n-tag__content,
168
- .n-tag[type=primary][data-v-bd2a9250] *:not(.n-tag__close) {
167
+ .n-tag[type=primary][data-v-22e190cf] .n-tag__content,
168
+ .n-tag[type=primary][data-v-22e190cf] *:not(.n-tag__close) {
169
169
  color: var(--color-primary) !important;
170
170
  }
171
- .n-tag[type=primary][data-v-bd2a9250] .c-icon,
172
- .n-tag[type=primary][data-v-bd2a9250] [class*='c-icon'] {
171
+ .n-tag[type=primary][data-v-22e190cf] .c-icon,
172
+ .n-tag[type=primary][data-v-22e190cf] [class*='c-icon'] {
173
173
  color: var(--color-primary) !important;
174
174
  }
175
- .n-tag[type=primary] i[data-v-bd2a9250],
176
- .n-tag[type=primary] .icon[data-v-bd2a9250] {
175
+ .n-tag[type=primary] i[data-v-22e190cf],
176
+ .n-tag[type=primary] .icon[data-v-22e190cf] {
177
177
  color: var(--color-primary) !important;
178
178
  }
179
- .n-tag[type=primary][data-v-bd2a9250]:hover {
179
+ .n-tag[type=primary][data-v-22e190cf]:hover {
180
180
  background: var(--tag-active-hover-bg, rgba(32, 128, 240, 0.12)) !important;
181
181
  transform: scale(1.03);
182
182
  }
183
- .n-tag[type=primary][data-v-bd2a9250] .n-tag__close {
183
+ .n-tag[type=primary][data-v-22e190cf] .n-tag__close {
184
184
  color: var(--color-primary) !important;
185
185
  opacity: 0.8;
186
186
  }
187
- .n-tag[data-v-bd2a9250] {
187
+ .n-tag[data-v-22e190cf] {
188
188
  /* --------- 关闭按钮 --------- */
189
189
  }
190
- .n-tag[data-v-bd2a9250] .n-tag__close {
190
+ .n-tag[data-v-22e190cf] .n-tag__close {
191
191
  width: 16px !important;
192
192
  height: 16px !important;
193
193
  border-radius: 8px !important;
@@ -202,10 +202,10 @@
202
202
  background: rgba(0, 0, 0, 0.02) !important;
203
203
  border: 1px solid transparent;
204
204
  }
205
- .n-tag[data-v-bd2a9250] .n-tag__close:not(:hover) {
205
+ .n-tag[data-v-22e190cf] .n-tag__close:not(:hover) {
206
206
  transform: scale(0.9);
207
207
  }
208
- .n-tag[data-v-bd2a9250] .n-tag__close:hover {
208
+ .n-tag[data-v-22e190cf] .n-tag__close:hover {
209
209
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.1), rgba(239, 68, 68, 0.08)) !important;
210
210
  border-color: rgba(239, 68, 68, 0.15) !important;
211
211
  color: #ef4444 !important;
@@ -213,13 +213,13 @@
213
213
  transform: scale(0.6) !important;
214
214
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.2) !important;
215
215
  }
216
- .n-tag[data-v-bd2a9250] .n-tag__close:active {
216
+ .n-tag[data-v-22e190cf] .n-tag__close:active {
217
217
  transform: scale(0.95) !important;
218
218
  transition-duration: 0.1s !important;
219
219
  }
220
220
 
221
221
  /* --------- C_Icon --------- */
222
- [data-v-bd2a9250] .c-icon {
222
+ [data-v-22e190cf] .c-icon {
223
223
  margin-right: 4px;
224
224
  font-size: 12px;
225
225
  transition: color 0.22s ease;
@@ -229,63 +229,63 @@
229
229
 
230
230
  /* --------- 响应式 --------- */
231
231
  @media (max-width: 768px) {
232
- .tags-view-container[data-v-bd2a9250] {
232
+ .tags-view-container[data-v-22e190cf] {
233
233
  padding: 6px 12px 0;
234
234
  }
235
- .n-tag[data-v-bd2a9250] {
235
+ .n-tag[data-v-22e190cf] {
236
236
  height: 26px;
237
237
  padding: 0 10px;
238
238
  font-size: 11px;
239
239
  margin-right: 3px;
240
240
  border-radius: 13px;
241
241
  }
242
- .n-tag[data-v-bd2a9250] .n-tag__close {
242
+ .n-tag[data-v-22e190cf] .n-tag__close {
243
243
  width: 14px;
244
244
  height: 14px;
245
245
  font-size: 11px;
246
246
  margin-left: 4px;
247
247
  }
248
- .tags-container[data-v-bd2a9250] {
248
+ .tags-container[data-v-22e190cf] {
249
249
  padding: 0 12px;
250
250
  min-height: 36px;
251
251
  }
252
- [data-v-bd2a9250] .c-icon {
252
+ [data-v-22e190cf] .c-icon {
253
253
  font-size: 11px;
254
254
  margin-right: 3px;
255
255
  }
256
256
  }
257
257
  /* --------- 暗色主题 --------- */
258
- [data-theme=dark] .n-tag[data-v-bd2a9250] .n-tag__close {
258
+ [data-theme=dark] .n-tag[data-v-22e190cf] .n-tag__close {
259
259
  background: rgba(255, 255, 255, 0.03) !important;
260
260
  }
261
- [data-theme=dark] .n-tag[data-v-bd2a9250] .n-tag__close:hover {
261
+ [data-theme=dark] .n-tag[data-v-22e190cf] .n-tag__close:hover {
262
262
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.12), rgba(239, 68, 68, 0.1)) !important;
263
263
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.25) !important;
264
264
  }
265
265
 
266
266
  /* layer: icons */
267
- .i-mdi\:align-horizontal-left[data-v-bd2a9250]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' display='inline-block' vertical-align='middle' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M4 22H2V2h2zM22 7H6v3h16zm-6 7H6v3h10z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;display:inline-block;vertical-align:middle;width:1em;height:1em;}
268
- .i-mdi\:align-horizontal-right[data-v-bd2a9250]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' display='inline-block' vertical-align='middle' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M20 2h2v20h-2zM2 10h16V7H2zm6 7h10v-3H8z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;display:inline-block;vertical-align:middle;width:1em;height:1em;}
269
- .i-mdi\:arrow-left-right-bold[data-v-bd2a9250]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' display='inline-block' vertical-align='middle' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M8 14v4l-6-6l6-6v4h8V6l6 6l-6 6v-4z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;display:inline-block;vertical-align:middle;width:1em;height:1em;}
270
- .i-mdi\:close[data-v-bd2a9250]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' display='inline-block' vertical-align='middle' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;display:inline-block;vertical-align:middle;width:1em;height:1em;}
271
- .i-mdi\:tally-mark-5[data-v-bd2a9250]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' display='inline-block' vertical-align='middle' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M19 10.73V19h-2v-7.64L15 12v7h-2v-6.38l-2 .64V19H9v-5.11l-2 .61V19H5v-3.85l-2.43.77L2 14l3-.95V5h2v7.42l2-.63V5h2v6.16l2-.63V5h2v4.9l2-.64V5h2v3.63L21 8l.57 1.92z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;display:inline-block;vertical-align:middle;width:1em;height:1em;}
267
+ .i-mdi\:align-horizontal-left[data-v-22e190cf]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' display='inline-block' vertical-align='middle' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M4 22H2V2h2zM22 7H6v3h16zm-6 7H6v3h10z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;display:inline-block;vertical-align:middle;width:1em;height:1em;}
268
+ .i-mdi\:align-horizontal-right[data-v-22e190cf]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' display='inline-block' vertical-align='middle' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M20 2h2v20h-2zM2 10h16V7H2zm6 7h10v-3H8z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;display:inline-block;vertical-align:middle;width:1em;height:1em;}
269
+ .i-mdi\:arrow-left-right-bold[data-v-22e190cf]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' display='inline-block' vertical-align='middle' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M8 14v4l-6-6l6-6v4h8V6l6 6l-6 6v-4z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;display:inline-block;vertical-align:middle;width:1em;height:1em;}
270
+ .i-mdi\:close[data-v-22e190cf]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' display='inline-block' vertical-align='middle' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;display:inline-block;vertical-align:middle;width:1em;height:1em;}
271
+ .i-mdi\:tally-mark-5[data-v-22e190cf]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' display='inline-block' vertical-align='middle' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M19 10.73V19h-2v-7.64L15 12v7h-2v-6.38l-2 .64V19H9v-5.11l-2 .61V19H5v-3.85l-2.43.77L2 14l3-.95V5h2v7.42l2-.63V5h2v6.16l2-.63V5h2v4.9l2-.64V5h2v3.63L21 8l.57 1.92z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;display:inline-block;vertical-align:middle;width:1em;height:1em;}
272
272
  /* layer: shortcuts */
273
- .container[data-v-bd2a9250]{width:100%;}
273
+ .container[data-v-22e190cf]{width:100%;}
274
274
  @media (min-width: 640px){
275
- .container[data-v-bd2a9250]{max-width:640px;}
275
+ .container[data-v-22e190cf]{max-width:640px;}
276
276
  }
277
277
  @media (min-width: 768px){
278
- .container[data-v-bd2a9250]{max-width:768px;}
278
+ .container[data-v-22e190cf]{max-width:768px;}
279
279
  }
280
280
  @media (min-width: 1024px){
281
- .container[data-v-bd2a9250]{max-width:1024px;}
281
+ .container[data-v-22e190cf]{max-width:1024px;}
282
282
  }
283
283
  @media (min-width: 1280px){
284
- .container[data-v-bd2a9250]{max-width:1280px;}
284
+ .container[data-v-22e190cf]{max-width:1280px;}
285
285
  }
286
286
  @media (min-width: 1536px){
287
- .container[data-v-bd2a9250]{max-width:1536px;}
287
+ .container[data-v-22e190cf]{max-width:1536px;}
288
288
  }
289
289
  /* layer: default */
290
- .inline[data-v-bd2a9250]{display:inline;}
291
- .block[data-v-bd2a9250]{display:block;}
290
+ .inline[data-v-22e190cf]{display:inline;}
291
+ .block[data-v-22e190cf]{display:block;}
@@ -1,3 +1,3 @@
1
- import { i as TagItem } from "./types2.cjs";
2
- import { i as useTagsView, n as ContextMenuLabels, r as UseTagsViewOptions, t as _default } from "./index29.vue.cjs";
1
+ import { i as TagItem } from "./types3.cjs";
2
+ import { i as useTagsView, n as ContextMenuLabels, r as UseTagsViewOptions, t as _default } from "./index30.vue.cjs";
3
3
  export { _default as C_TagsView, type ContextMenuLabels, type TagItem, type UseTagsViewOptions, useTagsView };
@@ -1,3 +1,3 @@
1
1
  import { s as TagItem } from "./public.js";
2
- import { i as useTagsView, n as ContextMenuLabels, r as UseTagsViewOptions, t as _default } from "./index29.vue.js";
2
+ import { i as useTagsView, n as ContextMenuLabels, r as UseTagsViewOptions, t as _default } from "./index30.vue.js";
3
3
  export { _default as C_TagsView, type ContextMenuLabels, type TagItem, type UseTagsViewOptions, useTagsView };
@@ -1 +1 @@
1
- require(`./chunk.cjs`);const e=require(`./C_Icon2.cjs`),t=require(`./export-helper.cjs`);let n=require(`vue`),r=require(`naive-ui`),i=require(`vue-router`);const a=e=>{if(!e||typeof e!=`object`)return!1;let t=e;return typeof t.path==`string`&&t.path.startsWith(`/`)&&!t.path.startsWith(`//`)&&typeof t.title==`string`},o=e=>{if(!(!e||typeof e!=`object`||Array.isArray(e)))return Object.fromEntries(Object.entries(e).filter(([e,t])=>![`__proto__`,`prototype`,`constructor`].includes(e)&&(e!==`affix`||typeof t==`boolean`)))};function s(e){if(!e)return[];try{let t=JSON.parse(e);return Array.isArray(t)?t.flatMap(e=>a(e)?[{path:e.path,title:e.title,originalTitle:typeof e.originalTitle==`string`?e.originalTitle:void 0,icon:typeof e.icon==`string`?e.icon:void 0,meta:o(e.meta)}]:[]):[]}catch{return[]}}function c(e={}){let{persistKey:t=`__tags_view_list__`,homePath:r=`/home`}=e,i=()=>{if(!t)return[];try{return s(localStorage.getItem(t))}catch{return[]}},a=e=>{if(t)try{localStorage.setItem(t,JSON.stringify(e))}catch{}},o=(0,n.ref)(i()),c=(0,n.ref)(``),l=()=>a(o.value),u=e=>{e?o.value=e:o.value=[...new Map(o.value.map(e=>[e.path,e])).values()],l()},d=e=>{c.value=e};return{tagsViewList:o,activeTag:c,homePath:r,initTags:u,setActiveTag:d,addTag:e=>{let t=o.value.findIndex(t=>t.path===e.path);if(t===-1)o.value.push(e);else{let n=o.value[t];(n.title!==e.title||!n.originalTitle)&&(n.title=e.title,n.originalTitle=e.originalTitle||n.originalTitle)}d(e.path),l()},removeTag:e=>{if(e>=0&&e<o.value.length){let t=o.value.splice(e,1)[0]?.path??null;return l(),t}return null},removeOtherTags:e=>{o.value=o.value.filter((t,n)=>n===0||t.meta?.affix||n===e),l()},removeLeftTags:e=>{o.value=o.value.filter((t,n)=>n===0||t.meta?.affix||n>=e),l()},removeRightTags:e=>{o.value=o.value.filter((t,n)=>t.meta?.affix||n<=e),l()},removeAllTags:()=>{o.value=o.value.filter(e=>e.meta?.affix),l()}}}const l={class:`tags-view-container`},u=(0,n.defineComponent)({name:`C_TagsView`,__name:`index`,props:{labelFormatter:{},homePath:{default:`/home`},homeTitle:{default:`首页`},homeIcon:{default:`mdi:home`},persistKey:{default:`__tags_view_list__`},contextMenuLabels:{default:()=>({close:`关闭`,closeOthers:`关闭其他`,closeLeft:`关闭左侧`,closeRight:`关闭右侧`,closeAll:`关闭所有`})},tagsViewOptions:{}},emits:[`close`,`closeAll`],setup(t,{expose:a,emit:o}){let s=t,u=o,d=(0,i.useRoute)(),f=(0,i.useRouter)(),p=c(s.tagsViewOptions??{persistKey:s.persistKey,homePath:s.homePath});if(p.tagsViewList.value.length>0&&s.labelFormatter){let e=f.getRoutes(),t=p.tagsViewList.value.map(t=>{let n=e.find(e=>e.path===t.path),r=t.originalTitle||n?.meta?.title||t.title;return{...t,originalTitle:r,title:s.labelFormatter(r)}});p.initTags(t)}let m=e=>s.labelFormatter?s.labelFormatter(e):e,h=()=>{let e=d.path===s.homePath,t=e?s.homeTitle:d.meta.title||`Unnamed Page`;return{path:d.path,originalTitle:t,title:m(t),icon:e?s.homeIcon:d.meta.icon,meta:{affix:d.meta.affix}}},g=(0,n.ref)(!1),_=(0,n.ref)(0),v=(0,n.ref)(0),y=(0,n.ref)(null),b=(0,n.ref)(),x=(0,n.ref)(),S=e=>e.path===d.path,C=e=>e.meta?.affix,w=e=>{let t=x.value;t&&(e.preventDefault(),t.scrollTo({left:t.scrollLeft+e.deltaY,behavior:`smooth`}))},T=e=>{(0,n.nextTick)(()=>{let t=[...x.value?.querySelectorAll(`[data-path]`)??[]].find(t=>t.dataset.path===e);t&&t.scrollIntoView({behavior:`smooth`,block:`nearest`,inline:`center`})})},E=e=>{e.path!==d.path&&f.push(e.path).catch(()=>void 0),T(e.path)},D=0,O=!1,k=async e=>{try{let t=await f.push(e);return!(0,i.isNavigationFailure)(t)||(0,i.isNavigationFailure)(t,i.NavigationFailureType.duplicated)}catch{return!1}},A=async(e,t,n=!1)=>{let r=++D;if((n||!e.some(e=>e.path===d.path))&&!await k(t)||O||r!==D)return!1;let i=p.tagsViewList.value.find(e=>e.path===d.path)??h();return p.initTags(e.some(e=>e.path===i.path)?e:[...e,i]),p.setActiveTag(d.path),T(d.path),!0},j=async e=>{if(C(e))return;let t=p.tagsViewList.value,n=t.findIndex(t=>t.path===e.path);if(n===-1)return;let r=S(e),i=t.filter(t=>t.path!==e.path),a=n===t.length-1?i[n-1]?.path||s.homePath:i[i.length-1]?.path||s.homePath;await A(i,a)&&r&&u(`close`,a)};(0,n.onBeforeUnmount)(()=>{O=!0,D+=1});let M=(e,t)=>{e.preventDefault(),y.value=t,g.value=!0,_.value=e.clientX,v.value=e.clientY},N=()=>g.value=!1,P=(0,n.computed)(()=>{let e=s.contextMenuLabels;return[{type:`option`,label:e.close??`关闭`,key:`close`,disabled:C(y.value),icon:()=>(0,n.h)(`span`,{class:`i-mdi:close`})},{type:`option`,label:e.closeOthers??`关闭其他`,key:`closeOthers`,icon:()=>(0,n.h)(`span`,{class:`i-mdi:arrow-left-right-bold`})},{type:`option`,label:e.closeLeft??`关闭左侧`,key:`closeLeft`,icon:()=>(0,n.h)(`span`,{class:`i-mdi:align-horizontal-left`})},{type:`option`,label:e.closeRight??`关闭右侧`,key:`closeRight`,icon:()=>(0,n.h)(`span`,{class:`i-mdi:align-horizontal-right`})},{type:`option`,label:e.closeAll??`关闭所有`,key:`closeAll`,icon:()=>(0,n.h)(`span`,{class:`i-mdi:tally-mark-5`})}]}),F=async e=>{let t=y.value,n=p.tagsViewList.value,r=n.findIndex(e=>e.path===t?.path);if(N(),!t||r===-1)return;if(e===`close`){await j(t);return}let i=n.filter((t,n)=>t.meta?.affix?!0:e===`closeOthers`?n===0||n===r:e===`closeLeft`?n===0||n>=r:e===`closeRight`?n<=r:e!==`closeAll`);[`closeOthers`,`closeLeft`,`closeRight`,`closeAll`].includes(e)&&await A(i,e===`closeAll`?s.homePath:t.path,e===`closeAll`)&&e===`closeAll`&&u(`closeAll`)};return(0,n.watch)(()=>d.path,e=>{p.addTag(h()),p.setActiveTag(e),T(e)},{immediate:!0}),a({tags:p,scrollToTag:T}),(t,i)=>{let a=r.NTag,o=r.NDropdown;return(0,n.openBlock)(),(0,n.createElementBlock)(`div`,l,[(0,n.createElementVNode)(`div`,{class:`tags-track`,ref_key:`tagsTrack`,ref:b,onWheel:w},[(0,n.createElementVNode)(`div`,{class:`tags-container`,ref_key:`tagsContainer`,ref:x},[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)((0,n.unref)(p).tagsViewList.value,t=>((0,n.openBlock)(),(0,n.createBlock)(a,{key:t.path,type:S(t)?`primary`:`default`,closable:!C(t),"data-path":t.path,onClose:(0,n.withModifiers)(e=>j(t),[`stop`]),onClick:e=>E(t),onContextmenu:(0,n.withModifiers)(e=>M(e,t),[`prevent`])},{icon:(0,n.withCtx)(()=>[t.icon?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(e.t),{key:0,name:t.icon,size:12},null,8,[`name`])):(0,n.createCommentVNode)(`v-if`,!0)]),default:(0,n.withCtx)(()=>[(0,n.createTextVNode)(` `+(0,n.toDisplayString)(t.title),1)]),_:2},1032,[`type`,`closable`,`data-path`,`onClose`,`onClick`,`onContextmenu`]))),128))],512)],544),g.value?((0,n.openBlock)(),(0,n.createBlock)(o,{key:0,show:g.value,options:P.value,x:_.value,y:v.value,onClickoutside:N,onSelect:F},null,8,[`show`,`options`,`x`,`y`])):(0,n.createCommentVNode)(`v-if`,!0)])}}});var d=t.t(u,[[`__scopeId`,`data-v-bd2a9250`]]);Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return d}});
1
+ require(`./chunk.cjs`);const e=require(`./C_Icon2.cjs`),t=require(`./export-helper.cjs`);let n=require(`vue`),r=require(`naive-ui`),i=require(`vue-router`);const a=e=>typeof e==`string`&&e.startsWith(`/`)&&!e.startsWith(`//`)&&!e.includes(`\\`)&&!Array.from(e).some(e=>e.charCodeAt(0)<32);function o(e){return a(e.fullPath)&&e.fullPath.split(/[?#]/,1)[0]===e.path?e.fullPath:e.path}const s=e=>{if(!e||typeof e!=`object`)return!1;let t=e;return a(t.path)&&typeof t.title==`string`},c=e=>{if(!(!e||typeof e!=`object`||Array.isArray(e)))return Object.fromEntries(Object.entries(e).filter(([e,t])=>![`__proto__`,`prototype`,`constructor`].includes(e)&&(e!==`affix`||typeof t==`boolean`)))};function l(e){if(!e)return[];try{let t=JSON.parse(e);return Array.isArray(t)?t.flatMap(e=>s(e)?[{path:e.path,...typeof e.fullPath==`string`&&o({path:e.path,fullPath:e.fullPath})===e.fullPath?{fullPath:e.fullPath}:{},title:e.title,originalTitle:typeof e.originalTitle==`string`?e.originalTitle:void 0,icon:typeof e.icon==`string`?e.icon:void 0,meta:c(e.meta)}]:[]):[]}catch{return[]}}function u(e={}){let{persistKey:t=`__tags_view_list__`,homePath:r=`/home`}=e,i=()=>{if(!t)return[];try{return l(localStorage.getItem(t))}catch{return[]}},a=e=>{if(t)try{localStorage.setItem(t,JSON.stringify(e))}catch{}},s=(0,n.ref)(i()),c=(0,n.ref)(``),u=()=>a(s.value),d=e=>{e?s.value=e:s.value=[...new Map(s.value.map(e=>[e.path,e])).values()],u()},f=e=>{c.value=e};return{tagsViewList:s,activeTag:c,homePath:r,initTags:d,setActiveTag:f,addTag:e=>{let t=s.value.findIndex(t=>t.path===e.path);if(t===-1)s.value.push(e);else{let n=s.value[t];e.fullPath!==void 0&&(n.fullPath=o(e)),(n.title!==e.title||!n.originalTitle)&&(n.title=e.title,n.originalTitle=e.originalTitle||n.originalTitle)}f(e.path),u()},removeTag:e=>{if(e>=0&&e<s.value.length){let t=s.value.splice(e,1)[0]?.path??null;return u(),t}return null},removeOtherTags:e=>{s.value=s.value.filter((t,n)=>n===0||t.meta?.affix||n===e),u()},removeLeftTags:e=>{s.value=s.value.filter((t,n)=>n===0||t.meta?.affix||n>=e),u()},removeRightTags:e=>{s.value=s.value.filter((t,n)=>t.meta?.affix||n<=e),u()},removeAllTags:()=>{s.value=s.value.filter(e=>e.meta?.affix),u()}}}const d={class:`tags-view-container`},f=(0,n.defineComponent)({name:`C_TagsView`,__name:`index`,props:{labelFormatter:{},homePath:{default:`/home`},homeTitle:{default:`首页`},homeIcon:{default:`mdi:home`},persistKey:{default:`__tags_view_list__`},contextMenuLabels:{default:()=>({close:`关闭`,closeOthers:`关闭其他`,closeLeft:`关闭左侧`,closeRight:`关闭右侧`,closeAll:`关闭所有`})},tagsViewOptions:{}},emits:[`close`,`closeAll`],setup(t,{expose:a,emit:s}){let c=t,l=s,f=(0,i.useRoute)(),p=(0,i.useRouter)(),m=u(c.tagsViewOptions??{persistKey:c.persistKey,homePath:c.homePath});if(m.tagsViewList.value.length>0&&c.labelFormatter){let e=p.getRoutes(),t=m.tagsViewList.value.map(t=>{let n=e.find(e=>e.path===t.path),r=t.originalTitle||n?.meta?.title||t.title;return{...t,originalTitle:r,title:c.labelFormatter(r)}});m.initTags(t)}let h=e=>c.labelFormatter?c.labelFormatter(e):e,g=()=>{let e=f.path===c.homePath,t=e?c.homeTitle:f.meta.title||`Unnamed Page`;return{path:f.path,fullPath:f.fullPath,originalTitle:t,title:h(t),icon:e?c.homeIcon:f.meta.icon,meta:{affix:f.meta.affix}}},_=(0,n.ref)(!1),v=(0,n.ref)(0),y=(0,n.ref)(0),b=(0,n.ref)(null),x=(0,n.ref)(),S=(0,n.ref)(),C=e=>e.path===f.path,w=e=>e.meta?.affix,T=e=>{let t=S.value;t&&(e.preventDefault(),t.scrollTo({left:t.scrollLeft+e.deltaY,behavior:`smooth`}))},E=e=>{(0,n.nextTick)(()=>{let t=[...S.value?.querySelectorAll(`[data-path]`)??[]].find(t=>t.dataset.path===e);t&&t.scrollIntoView({behavior:`smooth`,block:`nearest`,inline:`center`})})},D=e=>{let t=o(e);t!==f.fullPath&&p.push(t).catch(()=>void 0),E(e.path)},O=0,k=!1,A=async e=>{try{let t=await p.push(e);return!(0,i.isNavigationFailure)(t)||(0,i.isNavigationFailure)(t,i.NavigationFailureType.duplicated)}catch{return!1}},j=async(e,t,n=!1)=>{let r=++O,i=n||!e.some(e=>e.path===f.path),a=e.find(e=>e.path===t),s=a?o(a):t;if(i&&!await A(s)||k||r!==O)return!1;let c=m.tagsViewList.value.find(e=>e.path===f.path)??g();return m.initTags(e.some(e=>e.path===c.path)?e:[...e,c]),m.setActiveTag(f.path),E(f.path),!0},M=async e=>{if(w(e))return;let t=m.tagsViewList.value,n=t.findIndex(t=>t.path===e.path);if(n===-1)return;let r=C(e),i=t.filter(t=>t.path!==e.path),a=n===t.length-1?i[n-1]?.path||c.homePath:i[i.length-1]?.path||c.homePath;await j(i,a)&&r&&l(`close`,a)};(0,n.onBeforeUnmount)(()=>{k=!0,O+=1});let N=(e,t)=>{e.preventDefault(),b.value=t,_.value=!0,v.value=e.clientX,y.value=e.clientY},P=()=>_.value=!1,F=(0,n.computed)(()=>{let e=c.contextMenuLabels;return[{type:`option`,label:e.close??`关闭`,key:`close`,disabled:w(b.value),icon:()=>(0,n.h)(`span`,{class:`i-mdi:close`})},{type:`option`,label:e.closeOthers??`关闭其他`,key:`closeOthers`,icon:()=>(0,n.h)(`span`,{class:`i-mdi:arrow-left-right-bold`})},{type:`option`,label:e.closeLeft??`关闭左侧`,key:`closeLeft`,icon:()=>(0,n.h)(`span`,{class:`i-mdi:align-horizontal-left`})},{type:`option`,label:e.closeRight??`关闭右侧`,key:`closeRight`,icon:()=>(0,n.h)(`span`,{class:`i-mdi:align-horizontal-right`})},{type:`option`,label:e.closeAll??`关闭所有`,key:`closeAll`,icon:()=>(0,n.h)(`span`,{class:`i-mdi:tally-mark-5`})}]}),I=async e=>{let t=b.value,n=m.tagsViewList.value,r=n.findIndex(e=>e.path===t?.path);if(P(),!t||r===-1)return;if(e===`close`){await M(t);return}let i=n.filter((t,n)=>t.meta?.affix?!0:e===`closeOthers`?n===0||n===r:e===`closeLeft`?n===0||n>=r:e===`closeRight`?n<=r:e!==`closeAll`);[`closeOthers`,`closeLeft`,`closeRight`,`closeAll`].includes(e)&&await j(i,e===`closeAll`?c.homePath:t.path,e===`closeAll`)&&e===`closeAll`&&l(`closeAll`)};return(0,n.watch)(()=>f.fullPath,()=>{m.addTag(g()),m.setActiveTag(f.path),E(f.path)},{immediate:!0}),a({tags:m,scrollToTag:E}),(t,i)=>{let a=r.NTag,o=r.NDropdown;return(0,n.openBlock)(),(0,n.createElementBlock)(`div`,d,[(0,n.createElementVNode)(`div`,{class:`tags-track`,ref_key:`tagsTrack`,ref:x,onWheel:T},[(0,n.createElementVNode)(`div`,{class:`tags-container`,ref_key:`tagsContainer`,ref:S},[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)((0,n.unref)(m).tagsViewList.value,t=>((0,n.openBlock)(),(0,n.createBlock)(a,{key:t.path,type:C(t)?`primary`:`default`,closable:!w(t),"data-path":t.path,onClose:(0,n.withModifiers)(e=>M(t),[`stop`]),onClick:e=>D(t),onContextmenu:(0,n.withModifiers)(e=>N(e,t),[`prevent`])},{icon:(0,n.withCtx)(()=>[t.icon?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(e.t),{key:0,name:t.icon,size:12},null,8,[`name`])):(0,n.createCommentVNode)(`v-if`,!0)]),default:(0,n.withCtx)(()=>[(0,n.createTextVNode)(` `+(0,n.toDisplayString)(t.title),1)]),_:2},1032,[`type`,`closable`,`data-path`,`onClose`,`onClick`,`onContextmenu`]))),128))],512)],544),_.value?((0,n.openBlock)(),(0,n.createBlock)(o,{key:0,show:_.value,options:F.value,x:v.value,y:y.value,onClickoutside:P,onSelect:I},null,8,[`show`,`options`,`x`,`y`])):(0,n.createCommentVNode)(`v-if`,!0)])}}});var p=t.t(f,[[`__scopeId`,`data-v-22e190cf`]]);Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return p}});
@@ -1 +1 @@
1
- import{t as e}from"./C_Icon2.js";import{t}from"./export-helper.js";import{Fragment as n,computed as r,createBlock as i,createCommentVNode as a,createElementBlock as o,createElementVNode as s,createTextVNode as c,defineComponent as l,h as u,nextTick as d,onBeforeUnmount as f,openBlock as p,ref as m,renderList as h,resolveComponent as g,toDisplayString as ee,unref as _,watch as v,withCtx as y,withModifiers as b}from"vue";import{NDropdown as x,NTag as S}from"naive-ui";import{NavigationFailureType as C,isNavigationFailure as w,useRoute as T,useRouter as E}from"vue-router";const D=e=>{if(!e||typeof e!=`object`)return!1;let t=e;return typeof t.path==`string`&&t.path.startsWith(`/`)&&!t.path.startsWith(`//`)&&typeof t.title==`string`},O=e=>{if(!(!e||typeof e!=`object`||Array.isArray(e)))return Object.fromEntries(Object.entries(e).filter(([e,t])=>![`__proto__`,`prototype`,`constructor`].includes(e)&&(e!==`affix`||typeof t==`boolean`)))};function k(e){if(!e)return[];try{let t=JSON.parse(e);return Array.isArray(t)?t.flatMap(e=>D(e)?[{path:e.path,title:e.title,originalTitle:typeof e.originalTitle==`string`?e.originalTitle:void 0,icon:typeof e.icon==`string`?e.icon:void 0,meta:O(e.meta)}]:[]):[]}catch{return[]}}function A(e={}){let{persistKey:t=`__tags_view_list__`,homePath:n=`/home`}=e,r=()=>{if(!t)return[];try{return k(localStorage.getItem(t))}catch{return[]}},i=e=>{if(t)try{localStorage.setItem(t,JSON.stringify(e))}catch{}},a=m(r()),o=m(``),s=()=>i(a.value),c=e=>{e?a.value=e:a.value=[...new Map(a.value.map(e=>[e.path,e])).values()],s()},l=e=>{o.value=e};return{tagsViewList:a,activeTag:o,homePath:n,initTags:c,setActiveTag:l,addTag:e=>{let t=a.value.findIndex(t=>t.path===e.path);if(t===-1)a.value.push(e);else{let n=a.value[t];(n.title!==e.title||!n.originalTitle)&&(n.title=e.title,n.originalTitle=e.originalTitle||n.originalTitle)}l(e.path),s()},removeTag:e=>{if(e>=0&&e<a.value.length){let t=a.value.splice(e,1)[0]?.path??null;return s(),t}return null},removeOtherTags:e=>{a.value=a.value.filter((t,n)=>n===0||t.meta?.affix||n===e),s()},removeLeftTags:e=>{a.value=a.value.filter((t,n)=>n===0||t.meta?.affix||n>=e),s()},removeRightTags:e=>{a.value=a.value.filter((t,n)=>t.meta?.affix||n<=e),s()},removeAllTags:()=>{a.value=a.value.filter(e=>e.meta?.affix),s()}}}const j={class:`tags-view-container`};var M=t(l({name:`C_TagsView`,__name:`index`,props:{labelFormatter:{},homePath:{default:`/home`},homeTitle:{default:`首页`},homeIcon:{default:`mdi:home`},persistKey:{default:`__tags_view_list__`},contextMenuLabels:{default:()=>({close:`关闭`,closeOthers:`关闭其他`,closeLeft:`关闭左侧`,closeRight:`关闭右侧`,closeAll:`关闭所有`})},tagsViewOptions:{}},emits:[`close`,`closeAll`],setup(t,{expose:l,emit:g}){let D=t,O=g,k=T(),M=E(),N=A(D.tagsViewOptions??{persistKey:D.persistKey,homePath:D.homePath});if(N.tagsViewList.value.length>0&&D.labelFormatter){let e=M.getRoutes(),t=N.tagsViewList.value.map(t=>{let n=e.find(e=>e.path===t.path),r=t.originalTitle||n?.meta?.title||t.title;return{...t,originalTitle:r,title:D.labelFormatter(r)}});N.initTags(t)}let P=e=>D.labelFormatter?D.labelFormatter(e):e,F=()=>{let e=k.path===D.homePath,t=e?D.homeTitle:k.meta.title||`Unnamed Page`;return{path:k.path,originalTitle:t,title:P(t),icon:e?D.homeIcon:k.meta.icon,meta:{affix:k.meta.affix}}},I=m(!1),L=m(0),R=m(0),z=m(null),B=m(),V=m(),H=e=>e.path===k.path,U=e=>e.meta?.affix,W=e=>{let t=V.value;t&&(e.preventDefault(),t.scrollTo({left:t.scrollLeft+e.deltaY,behavior:`smooth`}))},G=e=>{d(()=>{let t=[...V.value?.querySelectorAll(`[data-path]`)??[]].find(t=>t.dataset.path===e);t&&t.scrollIntoView({behavior:`smooth`,block:`nearest`,inline:`center`})})},K=e=>{e.path!==k.path&&M.push(e.path).catch(()=>void 0),G(e.path)},q=0,J=!1,Y=async e=>{try{let t=await M.push(e);return!w(t)||w(t,C.duplicated)}catch{return!1}},X=async(e,t,n=!1)=>{let r=++q;if((n||!e.some(e=>e.path===k.path))&&!await Y(t)||J||r!==q)return!1;let i=N.tagsViewList.value.find(e=>e.path===k.path)??F();return N.initTags(e.some(e=>e.path===i.path)?e:[...e,i]),N.setActiveTag(k.path),G(k.path),!0},Z=async e=>{if(U(e))return;let t=N.tagsViewList.value,n=t.findIndex(t=>t.path===e.path);if(n===-1)return;let r=H(e),i=t.filter(t=>t.path!==e.path),a=n===t.length-1?i[n-1]?.path||D.homePath:i[i.length-1]?.path||D.homePath;await X(i,a)&&r&&O(`close`,a)};f(()=>{J=!0,q+=1});let Q=(e,t)=>{e.preventDefault(),z.value=t,I.value=!0,L.value=e.clientX,R.value=e.clientY},$=()=>I.value=!1,te=r(()=>{let e=D.contextMenuLabels;return[{type:`option`,label:e.close??`关闭`,key:`close`,disabled:U(z.value),icon:()=>u(`span`,{class:`i-mdi:close`})},{type:`option`,label:e.closeOthers??`关闭其他`,key:`closeOthers`,icon:()=>u(`span`,{class:`i-mdi:arrow-left-right-bold`})},{type:`option`,label:e.closeLeft??`关闭左侧`,key:`closeLeft`,icon:()=>u(`span`,{class:`i-mdi:align-horizontal-left`})},{type:`option`,label:e.closeRight??`关闭右侧`,key:`closeRight`,icon:()=>u(`span`,{class:`i-mdi:align-horizontal-right`})},{type:`option`,label:e.closeAll??`关闭所有`,key:`closeAll`,icon:()=>u(`span`,{class:`i-mdi:tally-mark-5`})}]}),ne=async e=>{let t=z.value,n=N.tagsViewList.value,r=n.findIndex(e=>e.path===t?.path);if($(),!t||r===-1)return;if(e===`close`){await Z(t);return}let i=n.filter((t,n)=>t.meta?.affix?!0:e===`closeOthers`?n===0||n===r:e===`closeLeft`?n===0||n>=r:e===`closeRight`?n<=r:e!==`closeAll`);[`closeOthers`,`closeLeft`,`closeRight`,`closeAll`].includes(e)&&await X(i,e===`closeAll`?D.homePath:t.path,e===`closeAll`)&&e===`closeAll`&&O(`closeAll`)};return v(()=>k.path,e=>{N.addTag(F()),N.setActiveTag(e),G(e)},{immediate:!0}),l({tags:N,scrollToTag:G}),(t,r)=>{let l=S,u=x;return p(),o(`div`,j,[s(`div`,{class:`tags-track`,ref_key:`tagsTrack`,ref:B,onWheel:W},[s(`div`,{class:`tags-container`,ref_key:`tagsContainer`,ref:V},[(p(!0),o(n,null,h(_(N).tagsViewList.value,t=>(p(),i(l,{key:t.path,type:H(t)?`primary`:`default`,closable:!U(t),"data-path":t.path,onClose:b(e=>Z(t),[`stop`]),onClick:e=>K(t),onContextmenu:b(e=>Q(e,t),[`prevent`])},{icon:y(()=>[t.icon?(p(),i(_(e),{key:0,name:t.icon,size:12},null,8,[`name`])):a(`v-if`,!0)]),default:y(()=>[c(` `+ee(t.title),1)]),_:2},1032,[`type`,`closable`,`data-path`,`onClose`,`onClick`,`onContextmenu`]))),128))],512)],544),I.value?(p(),i(u,{key:0,show:I.value,options:te.value,x:L.value,y:R.value,onClickoutside:$,onSelect:ne},null,8,[`show`,`options`,`x`,`y`])):a(`v-if`,!0)])}}}),[[`__scopeId`,`data-v-bd2a9250`]]);export{A as n,M as t};
1
+ import{t as e}from"./C_Icon2.js";import{t}from"./export-helper.js";import{Fragment as n,computed as r,createBlock as i,createCommentVNode as a,createElementBlock as o,createElementVNode as s,createTextVNode as c,defineComponent as l,h as u,nextTick as d,onBeforeUnmount as f,openBlock as p,ref as m,renderList as h,resolveComponent as g,toDisplayString as _,unref as v,watch as y,withCtx as b,withModifiers as x}from"vue";import{NDropdown as ee,NTag as S}from"naive-ui";import{NavigationFailureType as C,isNavigationFailure as w,useRoute as T,useRouter as E}from"vue-router";const D=e=>typeof e==`string`&&e.startsWith(`/`)&&!e.startsWith(`//`)&&!e.includes(`\\`)&&!Array.from(e).some(e=>e.charCodeAt(0)<32);function O(e){return D(e.fullPath)&&e.fullPath.split(/[?#]/,1)[0]===e.path?e.fullPath:e.path}const k=e=>{if(!e||typeof e!=`object`)return!1;let t=e;return D(t.path)&&typeof t.title==`string`},A=e=>{if(!(!e||typeof e!=`object`||Array.isArray(e)))return Object.fromEntries(Object.entries(e).filter(([e,t])=>![`__proto__`,`prototype`,`constructor`].includes(e)&&(e!==`affix`||typeof t==`boolean`)))};function j(e){if(!e)return[];try{let t=JSON.parse(e);return Array.isArray(t)?t.flatMap(e=>k(e)?[{path:e.path,...typeof e.fullPath==`string`&&O({path:e.path,fullPath:e.fullPath})===e.fullPath?{fullPath:e.fullPath}:{},title:e.title,originalTitle:typeof e.originalTitle==`string`?e.originalTitle:void 0,icon:typeof e.icon==`string`?e.icon:void 0,meta:A(e.meta)}]:[]):[]}catch{return[]}}function M(e={}){let{persistKey:t=`__tags_view_list__`,homePath:n=`/home`}=e,r=()=>{if(!t)return[];try{return j(localStorage.getItem(t))}catch{return[]}},i=e=>{if(t)try{localStorage.setItem(t,JSON.stringify(e))}catch{}},a=m(r()),o=m(``),s=()=>i(a.value),c=e=>{e?a.value=e:a.value=[...new Map(a.value.map(e=>[e.path,e])).values()],s()},l=e=>{o.value=e};return{tagsViewList:a,activeTag:o,homePath:n,initTags:c,setActiveTag:l,addTag:e=>{let t=a.value.findIndex(t=>t.path===e.path);if(t===-1)a.value.push(e);else{let n=a.value[t];e.fullPath!==void 0&&(n.fullPath=O(e)),(n.title!==e.title||!n.originalTitle)&&(n.title=e.title,n.originalTitle=e.originalTitle||n.originalTitle)}l(e.path),s()},removeTag:e=>{if(e>=0&&e<a.value.length){let t=a.value.splice(e,1)[0]?.path??null;return s(),t}return null},removeOtherTags:e=>{a.value=a.value.filter((t,n)=>n===0||t.meta?.affix||n===e),s()},removeLeftTags:e=>{a.value=a.value.filter((t,n)=>n===0||t.meta?.affix||n>=e),s()},removeRightTags:e=>{a.value=a.value.filter((t,n)=>t.meta?.affix||n<=e),s()},removeAllTags:()=>{a.value=a.value.filter(e=>e.meta?.affix),s()}}}const N={class:`tags-view-container`};var P=t(l({name:`C_TagsView`,__name:`index`,props:{labelFormatter:{},homePath:{default:`/home`},homeTitle:{default:`首页`},homeIcon:{default:`mdi:home`},persistKey:{default:`__tags_view_list__`},contextMenuLabels:{default:()=>({close:`关闭`,closeOthers:`关闭其他`,closeLeft:`关闭左侧`,closeRight:`关闭右侧`,closeAll:`关闭所有`})},tagsViewOptions:{}},emits:[`close`,`closeAll`],setup(t,{expose:l,emit:g}){let D=t,k=g,A=T(),j=E(),P=M(D.tagsViewOptions??{persistKey:D.persistKey,homePath:D.homePath});if(P.tagsViewList.value.length>0&&D.labelFormatter){let e=j.getRoutes(),t=P.tagsViewList.value.map(t=>{let n=e.find(e=>e.path===t.path),r=t.originalTitle||n?.meta?.title||t.title;return{...t,originalTitle:r,title:D.labelFormatter(r)}});P.initTags(t)}let F=e=>D.labelFormatter?D.labelFormatter(e):e,I=()=>{let e=A.path===D.homePath,t=e?D.homeTitle:A.meta.title||`Unnamed Page`;return{path:A.path,fullPath:A.fullPath,originalTitle:t,title:F(t),icon:e?D.homeIcon:A.meta.icon,meta:{affix:A.meta.affix}}},L=m(!1),R=m(0),z=m(0),B=m(null),V=m(),H=m(),U=e=>e.path===A.path,W=e=>e.meta?.affix,G=e=>{let t=H.value;t&&(e.preventDefault(),t.scrollTo({left:t.scrollLeft+e.deltaY,behavior:`smooth`}))},K=e=>{d(()=>{let t=[...H.value?.querySelectorAll(`[data-path]`)??[]].find(t=>t.dataset.path===e);t&&t.scrollIntoView({behavior:`smooth`,block:`nearest`,inline:`center`})})},q=e=>{let t=O(e);t!==A.fullPath&&j.push(t).catch(()=>void 0),K(e.path)},J=0,Y=!1,X=async e=>{try{let t=await j.push(e);return!w(t)||w(t,C.duplicated)}catch{return!1}},Z=async(e,t,n=!1)=>{let r=++J,i=n||!e.some(e=>e.path===A.path),a=e.find(e=>e.path===t),o=a?O(a):t;if(i&&!await X(o)||Y||r!==J)return!1;let s=P.tagsViewList.value.find(e=>e.path===A.path)??I();return P.initTags(e.some(e=>e.path===s.path)?e:[...e,s]),P.setActiveTag(A.path),K(A.path),!0},Q=async e=>{if(W(e))return;let t=P.tagsViewList.value,n=t.findIndex(t=>t.path===e.path);if(n===-1)return;let r=U(e),i=t.filter(t=>t.path!==e.path),a=n===t.length-1?i[n-1]?.path||D.homePath:i[i.length-1]?.path||D.homePath;await Z(i,a)&&r&&k(`close`,a)};f(()=>{Y=!0,J+=1});let te=(e,t)=>{e.preventDefault(),B.value=t,L.value=!0,R.value=e.clientX,z.value=e.clientY},$=()=>L.value=!1,ne=r(()=>{let e=D.contextMenuLabels;return[{type:`option`,label:e.close??`关闭`,key:`close`,disabled:W(B.value),icon:()=>u(`span`,{class:`i-mdi:close`})},{type:`option`,label:e.closeOthers??`关闭其他`,key:`closeOthers`,icon:()=>u(`span`,{class:`i-mdi:arrow-left-right-bold`})},{type:`option`,label:e.closeLeft??`关闭左侧`,key:`closeLeft`,icon:()=>u(`span`,{class:`i-mdi:align-horizontal-left`})},{type:`option`,label:e.closeRight??`关闭右侧`,key:`closeRight`,icon:()=>u(`span`,{class:`i-mdi:align-horizontal-right`})},{type:`option`,label:e.closeAll??`关闭所有`,key:`closeAll`,icon:()=>u(`span`,{class:`i-mdi:tally-mark-5`})}]}),re=async e=>{let t=B.value,n=P.tagsViewList.value,r=n.findIndex(e=>e.path===t?.path);if($(),!t||r===-1)return;if(e===`close`){await Q(t);return}let i=n.filter((t,n)=>t.meta?.affix?!0:e===`closeOthers`?n===0||n===r:e===`closeLeft`?n===0||n>=r:e===`closeRight`?n<=r:e!==`closeAll`);[`closeOthers`,`closeLeft`,`closeRight`,`closeAll`].includes(e)&&await Z(i,e===`closeAll`?D.homePath:t.path,e===`closeAll`)&&e===`closeAll`&&k(`closeAll`)};return y(()=>A.fullPath,()=>{P.addTag(I()),P.setActiveTag(A.path),K(A.path)},{immediate:!0}),l({tags:P,scrollToTag:K}),(t,r)=>{let l=S,u=ee;return p(),o(`div`,N,[s(`div`,{class:`tags-track`,ref_key:`tagsTrack`,ref:V,onWheel:G},[s(`div`,{class:`tags-container`,ref_key:`tagsContainer`,ref:H},[(p(!0),o(n,null,h(v(P).tagsViewList.value,t=>(p(),i(l,{key:t.path,type:U(t)?`primary`:`default`,closable:!W(t),"data-path":t.path,onClose:x(e=>Q(t),[`stop`]),onClick:e=>q(t),onContextmenu:x(e=>te(e,t),[`prevent`])},{icon:b(()=>[t.icon?(p(),i(v(e),{key:0,name:t.icon,size:12},null,8,[`name`])):a(`v-if`,!0)]),default:b(()=>[c(` `+_(t.title),1)]),_:2},1032,[`type`,`closable`,`data-path`,`onClose`,`onClick`,`onContextmenu`]))),128))],512)],544),L.value?(p(),i(u,{key:0,show:L.value,options:ne.value,x:R.value,y:z.value,onClickoutside:$,onSelect:re},null,8,[`show`,`options`,`x`,`y`])):a(`v-if`,!0)])}}}),[[`__scopeId`,`data-v-22e190cf`]]);export{M as n,P as t};
@@ -1,2 +1,2 @@
1
- import { n as ThemeMode, t as _default } from "./index28.vue.cjs";
1
+ import { n as ThemeMode, t as _default } from "./index29.vue.cjs";
2
2
  export { _default as C_Theme, type ThemeMode };
package/dist/C_Theme.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { n as ThemeMode, t as _default } from "./index28.vue.js";
1
+ import { n as ThemeMode, t as _default } from "./index29.vue.js";
2
2
  export { _default as C_Theme, type ThemeMode };
@@ -1,2 +1,2 @@
1
- import { a as TimelineProps, i as TimelineItem, n as DEFAULT_TIMELINE_PROPS, r as STATUS_COLOR_MAP, t as _default } from "./index30.vue.cjs";
1
+ import { a as TimelineProps, i as TimelineItem, n as DEFAULT_TIMELINE_PROPS, r as STATUS_COLOR_MAP, t as _default } from "./index31.vue.cjs";
2
2
  export { _default as C_Timeline, DEFAULT_TIMELINE_PROPS, STATUS_COLOR_MAP as TIMELINE_STATUS_COLOR_MAP, type TimelineItem, type TimelineProps };
@@ -1,2 +1,2 @@
1
- import { a as TimelineProps, i as TimelineItem, n as DEFAULT_TIMELINE_PROPS, r as STATUS_COLOR_MAP, t as _default } from "./index30.vue.js";
1
+ import { a as TimelineProps, i as TimelineItem, n as DEFAULT_TIMELINE_PROPS, r as STATUS_COLOR_MAP, t as _default } from "./index31.vue.js";
2
2
  export { _default as C_Timeline, DEFAULT_TIMELINE_PROPS, STATUS_COLOR_MAP as TIMELINE_STATUS_COLOR_MAP, type TimelineItem, type TimelineProps };
@@ -1,2 +1,2 @@
1
- import { a as TransferProps, i as TransferItem, n as DEFAULT_TRANSFER_PROPS, r as TransferEmits, t as _default } from "./index31.vue.cjs";
1
+ import { a as TransferProps, i as TransferItem, n as DEFAULT_TRANSFER_PROPS, r as TransferEmits, t as _default } from "./index32.vue.cjs";
2
2
  export { _default as C_Transfer, DEFAULT_TRANSFER_PROPS, type TransferEmits, type TransferItem, type TransferProps };
@@ -1,2 +1,2 @@
1
- import { a as TransferProps, i as TransferItem, n as DEFAULT_TRANSFER_PROPS, r as TransferEmits, t as _default } from "./index31.vue.js";
1
+ import { a as TransferProps, i as TransferItem, n as DEFAULT_TRANSFER_PROPS, r as TransferEmits, t as _default } from "./index32.vue.js";
2
2
  export { _default as C_Transfer, DEFAULT_TRANSFER_PROPS, type TransferEmits, type TransferItem, type TransferProps };
package/dist/C_Tree.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`./C_Icon2.cjs`);const e=require(`./C_Tree2.cjs`);exports.C_Tree=e.t,exports.treePresetConfigs=e.r,exports.useTreeOperations=e.n;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`./C_Icon2.cjs`);const e=require(`./C_Tree2.cjs`);exports.C_Tree=e.t,exports.treePresetConfigs=e.i,exports.useTreeOperations=e.r;
package/dist/C_Tree.css CHANGED
@@ -1,5 +1,5 @@
1
1
  @import "./shared-tokens.css";
2
- .c-tree[data-v-d71f9eac] {
2
+ .c-tree[data-v-d7f39843] {
3
3
  --c-tree-padding: 12px;
4
4
  --c-tree-gap: 10px;
5
5
  display: flex;
@@ -9,15 +9,15 @@
9
9
  height: 100%;
10
10
  gap: var(--c-tree-gap);
11
11
  }
12
- .c-tree--compact[data-v-d71f9eac] {
12
+ .c-tree--compact[data-v-d7f39843] {
13
13
  --c-tree-padding: 8px;
14
14
  --c-tree-gap: 8px;
15
15
  }
16
- .c-tree--comfortable[data-v-d71f9eac] {
16
+ .c-tree--comfortable[data-v-d7f39843] {
17
17
  --c-tree-padding: 16px;
18
18
  --c-tree-gap: 14px;
19
19
  }
20
- .c-tree .c-tree-toolbar[data-v-d71f9eac] {
20
+ .c-tree .c-tree-toolbar[data-v-d7f39843] {
21
21
  display: flex;
22
22
  flex-wrap: wrap;
23
23
  align-items: center;
@@ -27,21 +27,21 @@
27
27
  border-radius: var(--c-tree-radius);
28
28
  flex-shrink: 0;
29
29
  }
30
- .c-tree .toolbar-left[data-v-d71f9eac] {
30
+ .c-tree .toolbar-left[data-v-d7f39843] {
31
31
  flex: 1 1 140px;
32
32
  min-width: 0;
33
33
  }
34
- .c-tree .toolbar-left .search-input[data-v-d71f9eac] {
34
+ .c-tree .toolbar-left .search-input[data-v-d7f39843] {
35
35
  width: 100%;
36
36
  }
37
- .c-tree .toolbar-right[data-v-d71f9eac] {
37
+ .c-tree .toolbar-right[data-v-d7f39843] {
38
38
  display: flex;
39
39
  flex-wrap: wrap;
40
40
  align-items: center;
41
41
  gap: 6px;
42
42
  margin-left: auto;
43
43
  }
44
- .c-tree .c-tree-container[data-v-d71f9eac] {
44
+ .c-tree .c-tree-container[data-v-d7f39843] {
45
45
  flex: 1 1 auto;
46
46
  min-width: 0;
47
47
  min-height: 0;
@@ -51,33 +51,49 @@
51
51
  overflow: auto;
52
52
  scrollbar-width: thin;
53
53
  }
54
- .c-tree--virtual .c-tree-container[data-v-d71f9eac] {
54
+ .c-tree .c-tree-search-status[data-v-d7f39843] {
55
+ display: flex;
56
+ align-items: center;
57
+ justify-content: space-between;
58
+ flex-wrap: wrap;
59
+ gap: 8px;
60
+ padding-inline: var(--c-tree-padding);
61
+ font-size: 12px;
62
+ color: var(--c-tree-text-secondary);
63
+ flex-shrink: 0;
64
+ }
65
+ .c-tree .c-tree-search-navigation[data-v-d7f39843] {
66
+ display: inline-flex;
67
+ align-items: center;
68
+ gap: 12px;
69
+ }
70
+ .c-tree--virtual .c-tree-container[data-v-d7f39843] {
55
71
  overflow: hidden;
56
72
  }
57
- .c-tree--virtual .tree-instance[data-v-d71f9eac] {
73
+ .c-tree--virtual .tree-instance[data-v-d7f39843] {
58
74
  height: 100%;
59
75
  }
60
- .c-tree[data-v-d71f9eac] .n-tree-node-content,
61
- .c-tree[data-v-d71f9eac] .n-tree-node-content__text {
76
+ .c-tree[data-v-d7f39843] .n-tree-node-content,
77
+ .c-tree[data-v-d7f39843] .n-tree-node-content__text {
62
78
  min-width: 0;
63
79
  }
64
- .c-tree[data-v-d71f9eac] .c-tree-node-label {
80
+ .c-tree[data-v-d7f39843] .c-tree-node-label {
65
81
  display: flex;
66
82
  align-items: center;
67
83
  min-width: 0;
68
84
  width: 100%;
69
85
  gap: 6px;
70
86
  }
71
- .c-tree[data-v-d71f9eac] .c-tree-node-title {
87
+ .c-tree[data-v-d7f39843] .c-tree-node-title {
72
88
  overflow: hidden;
73
89
  white-space: nowrap;
74
90
  text-overflow: ellipsis;
75
91
  }
76
- .c-tree[data-v-d71f9eac] .c-tree-node-status,
77
- .c-tree[data-v-d71f9eac] .c-tree-node-icon {
92
+ .c-tree[data-v-d7f39843] .c-tree-node-status,
93
+ .c-tree[data-v-d7f39843] .c-tree-node-icon {
78
94
  flex-shrink: 0;
79
95
  }
80
- .c-tree[data-v-d71f9eac] .tree-actions {
96
+ .c-tree[data-v-d7f39843] .tree-actions {
81
97
  display: inline-flex;
82
98
  align-items: center;
83
99
  gap: 2px;
@@ -85,21 +101,42 @@
85
101
  opacity: 0;
86
102
  transition: opacity 0.15s ease;
87
103
  }
88
- .c-tree[data-v-d71f9eac] .n-tree-node:hover .tree-actions,
89
- .c-tree[data-v-d71f9eac] .n-tree-node:focus-within .tree-actions,
90
- .c-tree[data-v-d71f9eac] .tree-actions:focus-within {
104
+ .c-tree[data-v-d7f39843] .c-tree-suffix {
105
+ display: inline-flex;
106
+ align-items: center;
107
+ gap: 6px;
108
+ }
109
+ .c-tree[data-v-d7f39843] .c-tree-node-loading {
110
+ width: 12px;
111
+ height: 12px;
112
+ border: 2px solid currentColor;
113
+ border-right-color: transparent;
114
+ border-radius: 50%;
115
+ animation: c-tree-spin-d7f39843 0.8s linear infinite;
116
+ }
117
+ .c-tree[data-v-d7f39843] .n-tree-node:hover .tree-actions,
118
+ .c-tree[data-v-d7f39843] .n-tree-node:focus-within .tree-actions,
119
+ .c-tree[data-v-d7f39843] .tree-actions:focus-within {
91
120
  opacity: 1;
92
121
  }
93
122
  @media (hover: none), (max-width: 640px) {
94
- .c-tree[data-v-d71f9eac] .tree-actions {
123
+ .c-tree[data-v-d7f39843] .tree-actions {
95
124
  opacity: 1;
96
125
  }
97
126
  }
98
127
  @media (prefers-reduced-motion: reduce) {
99
- .c-tree[data-v-d71f9eac] .tree-actions {
128
+ .c-tree[data-v-d7f39843] .tree-actions {
100
129
  transition: none;
101
130
  }
131
+ .c-tree[data-v-d7f39843] .c-tree-node-loading {
132
+ animation: none;
133
+ }
134
+ }
135
+ @keyframes c-tree-spin-d7f39843 {
136
+ to {
137
+ transform: rotate(360deg);
138
+ }
102
139
  }
103
140
 
104
141
  /* layer: default */
105
- .filter[data-v-d71f9eac]{filter:var(--un-blur) var(--un-brightness) var(--un-contrast) var(--un-drop-shadow) var(--un-grayscale) var(--un-hue-rotate) var(--un-invert) var(--un-saturate) var(--un-sepia);}
142
+ .filter[data-v-d7f39843]{filter:var(--un-blur) var(--un-brightness) var(--un-contrast) var(--un-drop-shadow) var(--un-grayscale) var(--un-hue-rotate) var(--un-invert) var(--un-saturate) var(--un-sepia);}
package/dist/C_Tree.d.cts CHANGED
@@ -1,3 +1,3 @@
1
1
  import { t as ComponentDensity } from "./density.cjs";
2
- import { C as TreeNodeData, D as TreeSlots, E as TreeRenderContext, O as TreeUpdateMeta, S as TreeNativeProps, T as TreeProps, _ as StatusType, b as TreeKey, d as _default, f as ActionConfig, g as StatusConfig, h as IconConfig, l as useTreeOperations, m as DropInfo, p as ButtonType, u as presetConfigs, v as TreeEmits, w as TreeOption, x as TreeMode, y as TreeExpose } from "./useTableQuery.cjs";
3
- export { type ActionConfig, type ButtonType, _default as C_Tree, type ComponentDensity, type DropInfo, type IconConfig, type StatusConfig, type StatusType, type TreeEmits, type TreeExpose, type TreeKey, type TreeMode, type TreeNativeProps, type TreeNodeData, type TreeOption, type TreeProps, type TreeRenderContext, type TreeSlots, type TreeUpdateMeta, presetConfigs as treePresetConfigs, useTreeOperations };
2
+ import { A as TreeSearchSource, C as TreeKey, D as TreeOption, E as TreeNodeData, M as TreeUpdateMeta, O as TreeProps, S as TreeExpose, T as TreeNativeProps, _ as DropInfo, b as StatusType, f as useTreeOperations, g as ButtonType, h as ActionConfig, j as TreeSlots, k as TreeRenderContext, m as _default, p as presetConfigs, v as IconConfig, w as TreeMode, x as TreeEmits, y as StatusConfig } from "./editors.cjs";
3
+ export { type ActionConfig, type ButtonType, _default as C_Tree, type ComponentDensity, type DropInfo, type IconConfig, type StatusConfig, type StatusType, type TreeEmits, type TreeExpose, type TreeKey, type TreeMode, type TreeNativeProps, type TreeNodeData, type TreeOption, type TreeProps, type TreeRenderContext, type TreeSearchSource, type TreeSlots, type TreeUpdateMeta, presetConfigs as treePresetConfigs, useTreeOperations };
package/dist/C_Tree.d.ts CHANGED
@@ -1,24 +1,27 @@
1
1
  import "./types.js";
2
2
  import "./presets.js";
3
3
  import "./useEdgeInteraction.js";
4
+ import { t as ComponentDensity } from "./density.js";
5
+ import "./types2.js";
6
+ import "./index2.vue.js";
4
7
  import "./public.js";
5
- import "./index5.vue.js";
8
+ import "./index6.vue.js";
6
9
  import "./useFormConfig.js";
7
- import { t as ComponentDensity } from "./density.js";
8
10
  import "./config2.js";
9
11
  import "./verification.js";
10
12
  import "./formField.js";
11
13
  import "./useFormRenderer.js";
12
14
  import "./useDraggableLayout.js";
13
15
  import "./useDynamicFormState.js";
14
- import "./index14.vue.js";
16
+ import "./types4.js";
17
+ import "./index15.vue.js";
15
18
  import "./dateRange.js";
16
- import "./index19.vue.js";
19
+ import "./index20.vue.js";
17
20
  import "./mapUtils.js";
18
- import "./index21.vue.js";
19
- import "./index25.vue.js";
20
- import { C as TreeNodeData, D as TreeSlots, E as TreeRenderContext, O as TreeUpdateMeta, S as TreeNativeProps, T as TreeProps, _ as StatusType, b as TreeKey, d as _default, f as ActionConfig, g as StatusConfig, h as IconConfig, l as useTreeOperations, m as DropInfo, p as ButtonType, u as presetConfigs, v as TreeEmits, w as TreeOption, x as TreeMode, y as TreeExpose } from "./useTableQuery.js";
21
+ import "./index22.vue.js";
22
+ import "./index26.vue.js";
23
+ import { A as TreeSearchSource, C as TreeKey, D as TreeOption, E as TreeNodeData, M as TreeUpdateMeta, O as TreeProps, S as TreeExpose, T as TreeNativeProps, _ as DropInfo, b as StatusType, f as useTreeOperations, g as ButtonType, h as ActionConfig, j as TreeSlots, k as TreeRenderContext, m as _default, p as presetConfigs, v as IconConfig, w as TreeMode, x as TreeEmits, y as StatusConfig } from "./editors.js";
21
24
  import "./constants5.js";
22
25
  import "./useWorkflowValidation.js";
23
- import "./index29.vue.js";
24
- export { type ActionConfig, type ButtonType, _default as C_Tree, type ComponentDensity, type DropInfo, type IconConfig, type StatusConfig, type StatusType, type TreeEmits, type TreeExpose, type TreeKey, type TreeMode, type TreeNativeProps, type TreeNodeData, type TreeOption, type TreeProps, type TreeRenderContext, type TreeSlots, type TreeUpdateMeta, presetConfigs as treePresetConfigs, useTreeOperations };
26
+ import "./index30.vue.js";
27
+ export { type ActionConfig, type ButtonType, _default as C_Tree, type ComponentDensity, type DropInfo, type IconConfig, type StatusConfig, type StatusType, type TreeEmits, type TreeExpose, type TreeKey, type TreeMode, type TreeNativeProps, type TreeNodeData, type TreeOption, type TreeProps, type TreeRenderContext, type TreeSearchSource, type TreeSlots, type TreeUpdateMeta, presetConfigs as treePresetConfigs, useTreeOperations };
package/dist/C_Tree.js CHANGED
@@ -1 +1 @@
1
- import"./C_Icon2.js";import{n as e,r as t,t as n}from"./C_Tree2.js";export{n as C_Tree,t as treePresetConfigs,e as useTreeOperations};
1
+ import"./C_Icon2.js";import{i as e,r as t,t as n}from"./C_Tree2.js";export{n as C_Tree,e as treePresetConfigs,t as useTreeOperations};