@qxs-bns/components 0.0.91 → 0.0.92

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 (415) hide show
  1. package/es/base/define.mjs +1 -1
  2. package/es/base/define.mjs.map +1 -1
  3. package/es/base/uid.mjs +1 -1
  4. package/es/base/uid.mjs.map +1 -1
  5. package/es/data-chart.mjs +15 -14
  6. package/es/data-chart.mjs.map +1 -1
  7. package/es/editor/blocksuite-editor.mjs +62 -51
  8. package/es/editor/blocksuite-editor.mjs.map +1 -1
  9. package/es/editor/content-format.mjs +8 -1
  10. package/es/editor/content-format.mjs.map +1 -1
  11. package/es/editor/index.mjs +1 -1
  12. package/es/editor/index.mjs.map +1 -1
  13. package/es/editor/toolbar.mjs +1 -1
  14. package/es/editor/toolbar.mjs.map +1 -1
  15. package/es/entry-data-chart.mjs +1 -1
  16. package/es/entry-editor.mjs +1 -1
  17. package/es/entry-file-upload.mjs +1 -1
  18. package/es/entry-fixed-action-bar.mjs +1 -1
  19. package/es/entry-icon.mjs +1 -1
  20. package/es/entry-image-upload.mjs +1 -1
  21. package/es/entry-photo-crop-tool.mjs +1 -1
  22. package/es/entry-subject.mjs +1 -1
  23. package/es/file-upload.mjs +25 -18
  24. package/es/file-upload.mjs.map +1 -1
  25. package/es/fixed-action-bar.mjs +5 -5
  26. package/es/fixed-action-bar.mjs.map +1 -1
  27. package/es/icon.mjs +7 -7
  28. package/es/icon.mjs.map +1 -1
  29. package/es/image-upload.mjs +26 -26
  30. package/es/image-upload.mjs.map +1 -1
  31. package/es/index.mjs +1 -1
  32. package/es/node_modules/.pnpm/marked@17.0.6/node_modules/marked/lib/marked.esm.mjs +59 -1
  33. package/es/node_modules/.pnpm/marked@17.0.6/node_modules/marked/lib/marked.esm.mjs.map +1 -1
  34. package/es/node_modules/.pnpm/turndown-plugin-gfm@1.0.2/node_modules/turndown-plugin-gfm/lib/turndown-plugin-gfm.es.mjs +16 -1
  35. package/es/node_modules/.pnpm/turndown-plugin-gfm@1.0.2/node_modules/turndown-plugin-gfm/lib/turndown-plugin-gfm.es.mjs.map +1 -1
  36. package/es/node_modules/.pnpm/turndown@7.2.4/node_modules/turndown/lib/turndown.browser.es.mjs +62 -0
  37. package/es/node_modules/.pnpm/turndown@7.2.4/node_modules/turndown/lib/turndown.browser.es.mjs.map +1 -0
  38. package/es/photo-crop-tool.mjs +12 -12
  39. package/es/photo-crop-tool.mjs.map +1 -1
  40. package/es/subject/action.mjs +58 -58
  41. package/es/subject/action.mjs.map +1 -1
  42. package/es/subject/blank-fill.mjs +80 -80
  43. package/es/subject/blank-fill.mjs.map +1 -1
  44. package/es/subject/draft.mjs +1 -1
  45. package/es/subject/draft.mjs.map +1 -1
  46. package/es/subject/layout.mjs +4 -4
  47. package/es/subject/layout.mjs.map +1 -1
  48. package/es/subject/page-end.mjs +5 -5
  49. package/es/subject/page-end.mjs.map +1 -1
  50. package/es/subject/pagination.mjs +1 -1
  51. package/es/subject/pagination.mjs.map +1 -1
  52. package/es/subject/runtime.mjs +1 -1
  53. package/es/subject/runtime.mjs.map +1 -1
  54. package/es/subject/scale.mjs +53 -50
  55. package/es/subject/scale.mjs.map +1 -1
  56. package/es/subject/shared-methods.mjs +1 -1
  57. package/es/subject/shared-methods.mjs.map +1 -1
  58. package/es/subject/shared-styles.mjs +53 -15
  59. package/es/subject/shared-styles.mjs.map +1 -1
  60. package/es/subject/single-interactions.mjs +2 -0
  61. package/es/subject/single-interactions.mjs.map +1 -0
  62. package/es/subject/single-model.mjs +2 -0
  63. package/es/subject/single-model.mjs.map +1 -0
  64. package/es/subject/single-state.mjs +2 -0
  65. package/es/subject/single-state.mjs.map +1 -0
  66. package/es/subject/single.mjs +177 -177
  67. package/es/subject/single.mjs.map +1 -1
  68. package/es/subject/sort-controller.mjs +1 -1
  69. package/es/subject/sort-controller.mjs.map +1 -1
  70. package/es/subject/sortable.mjs +13 -13
  71. package/es/subject/sortable.mjs.map +1 -1
  72. package/es/subject/sorting-card.mjs +12 -12
  73. package/es/subject/sorting-card.mjs.map +1 -1
  74. package/es/subject/subject-shared.mjs +2 -0
  75. package/es/subject/subject-shared.mjs.map +1 -0
  76. package/es/subject/text-fill.mjs +73 -73
  77. package/es/subject/text-fill.mjs.map +1 -1
  78. package/es/subject/title-prefix.mjs +1 -1
  79. package/es/subject/title-prefix.mjs.map +1 -1
  80. package/es/subject/types.mjs +1 -1
  81. package/es/subject/types.mjs.map +1 -1
  82. package/lib/base/define.cjs +1 -1
  83. package/lib/base/define.cjs.map +1 -1
  84. package/lib/base/uid.cjs +1 -1
  85. package/lib/base/uid.cjs.map +1 -1
  86. package/lib/data-chart.cjs +16 -15
  87. package/lib/data-chart.cjs.map +1 -1
  88. package/lib/editor/blocksuite-editor.cjs +62 -51
  89. package/lib/editor/blocksuite-editor.cjs.map +1 -1
  90. package/lib/editor/content-format.cjs +8 -1
  91. package/lib/editor/content-format.cjs.map +1 -1
  92. package/lib/editor/index.cjs +1 -1
  93. package/lib/editor/index.cjs.map +1 -1
  94. package/lib/editor/toolbar.cjs +1 -1
  95. package/lib/editor/toolbar.cjs.map +1 -1
  96. package/lib/entry-data-chart.cjs +1 -1
  97. package/lib/entry-editor.cjs +1 -1
  98. package/lib/entry-file-upload.cjs +1 -1
  99. package/lib/entry-fixed-action-bar.cjs +1 -1
  100. package/lib/entry-icon.cjs +1 -1
  101. package/lib/entry-image-upload.cjs +1 -1
  102. package/lib/entry-photo-crop-tool.cjs +1 -1
  103. package/lib/entry-subject.cjs +1 -1
  104. package/lib/file-upload.cjs +24 -17
  105. package/lib/file-upload.cjs.map +1 -1
  106. package/lib/fixed-action-bar.cjs +6 -6
  107. package/lib/fixed-action-bar.cjs.map +1 -1
  108. package/lib/icon.cjs +9 -9
  109. package/lib/icon.cjs.map +1 -1
  110. package/lib/image-upload.cjs +26 -26
  111. package/lib/image-upload.cjs.map +1 -1
  112. package/lib/index.cjs +1 -1
  113. package/lib/node_modules/.pnpm/marked@17.0.6/node_modules/marked/lib/marked.esm.cjs +59 -1
  114. package/lib/node_modules/.pnpm/marked@17.0.6/node_modules/marked/lib/marked.esm.cjs.map +1 -1
  115. package/lib/node_modules/.pnpm/turndown-plugin-gfm@1.0.2/node_modules/turndown-plugin-gfm/lib/turndown-plugin-gfm.es.cjs +16 -1
  116. package/lib/node_modules/.pnpm/turndown-plugin-gfm@1.0.2/node_modules/turndown-plugin-gfm/lib/turndown-plugin-gfm.es.cjs.map +1 -1
  117. package/lib/node_modules/.pnpm/turndown@7.2.4/node_modules/turndown/lib/turndown.browser.es.cjs +62 -0
  118. package/lib/node_modules/.pnpm/turndown@7.2.4/node_modules/turndown/lib/turndown.browser.es.cjs.map +1 -0
  119. package/lib/photo-crop-tool.cjs +11 -11
  120. package/lib/photo-crop-tool.cjs.map +1 -1
  121. package/lib/subject/action.cjs +42 -42
  122. package/lib/subject/action.cjs.map +1 -1
  123. package/lib/subject/blank-fill.cjs +80 -80
  124. package/lib/subject/blank-fill.cjs.map +1 -1
  125. package/lib/subject/draft.cjs +1 -1
  126. package/lib/subject/draft.cjs.map +1 -1
  127. package/lib/subject/layout.cjs +4 -4
  128. package/lib/subject/layout.cjs.map +1 -1
  129. package/lib/subject/page-end.cjs +4 -4
  130. package/lib/subject/page-end.cjs.map +1 -1
  131. package/lib/subject/pagination.cjs +1 -1
  132. package/lib/subject/pagination.cjs.map +1 -1
  133. package/lib/subject/runtime.cjs +1 -1
  134. package/lib/subject/runtime.cjs.map +1 -1
  135. package/lib/subject/scale.cjs +53 -50
  136. package/lib/subject/scale.cjs.map +1 -1
  137. package/lib/subject/shared-methods.cjs +1 -1
  138. package/lib/subject/shared-methods.cjs.map +1 -1
  139. package/lib/subject/shared-styles.cjs +54 -16
  140. package/lib/subject/shared-styles.cjs.map +1 -1
  141. package/lib/subject/single-interactions.cjs +2 -0
  142. package/lib/subject/single-interactions.cjs.map +1 -0
  143. package/lib/subject/single-model.cjs +2 -0
  144. package/lib/subject/single-model.cjs.map +1 -0
  145. package/lib/subject/single-state.cjs +2 -0
  146. package/lib/subject/single-state.cjs.map +1 -0
  147. package/lib/subject/single.cjs +177 -177
  148. package/lib/subject/single.cjs.map +1 -1
  149. package/lib/subject/sort-controller.cjs +1 -1
  150. package/lib/subject/sort-controller.cjs.map +1 -1
  151. package/lib/subject/sortable.cjs +15 -15
  152. package/lib/subject/sortable.cjs.map +1 -1
  153. package/lib/subject/sorting-card.cjs +12 -12
  154. package/lib/subject/sorting-card.cjs.map +1 -1
  155. package/lib/subject/subject-shared.cjs +2 -0
  156. package/lib/subject/subject-shared.cjs.map +1 -0
  157. package/lib/subject/text-fill.cjs +81 -81
  158. package/lib/subject/text-fill.cjs.map +1 -1
  159. package/lib/subject/title-prefix.cjs +1 -1
  160. package/lib/subject/title-prefix.cjs.map +1 -1
  161. package/lib/subject/types.cjs +1 -1
  162. package/lib/subject/types.cjs.map +1 -1
  163. package/package.json +5 -5
  164. package/types/editor/blocksuite-editor.d.ts +2 -0
  165. package/types/editor/toolbar.d.ts +1 -1
  166. package/types/file-upload.d.ts +2 -0
  167. package/types/subject/blank-fill.d.ts +1 -1
  168. package/types/subject/runtime.d.ts +1 -1
  169. package/types/subject/scale.d.ts +1 -1
  170. package/types/subject/single-interactions.d.ts +46 -0
  171. package/types/subject/single-model.d.ts +88 -0
  172. package/types/subject/single-state.d.ts +42 -0
  173. package/types/subject/single.d.ts +7 -85
  174. package/types/subject/sortable.d.ts +1 -1
  175. package/types/subject/subject-shared.d.ts +43 -0
  176. package/types/subject/text-fill.d.ts +1 -1
  177. package/README.md +0 -562
  178. package/es/node_modules/.pnpm/@iconify_vue@5.0.0_vue@3.5.18_typescript@5.9.2_/node_modules/@iconify/vue/dist/iconify.mjs +0 -2
  179. package/es/node_modules/.pnpm/@iconify_vue@5.0.0_vue@3.5.18_typescript@5.9.2_/node_modules/@iconify/vue/dist/iconify.mjs.map +0 -1
  180. package/es/node_modules/.pnpm/turndown@7.2.4/node_modules/turndown/lib/turndown.es.mjs +0 -2
  181. package/es/node_modules/.pnpm/turndown@7.2.4/node_modules/turndown/lib/turndown.es.mjs.map +0 -1
  182. package/es/package.json.mjs +0 -2
  183. package/es/package.json.mjs.map +0 -1
  184. package/es/src/alert/index.mjs +0 -2
  185. package/es/src/alert/index.mjs.map +0 -1
  186. package/es/src/alert/src/alert.mjs +0 -2
  187. package/es/src/alert/src/alert.mjs.map +0 -1
  188. package/es/src/components.mjs +0 -2
  189. package/es/src/components.mjs.map +0 -1
  190. package/es/src/data-chart/index.mjs +0 -2
  191. package/es/src/data-chart/index.mjs.map +0 -1
  192. package/es/src/defaults.mjs +0 -2
  193. package/es/src/defaults.mjs.map +0 -1
  194. package/es/src/dialog/src/dialog.mjs +0 -2
  195. package/es/src/dialog/src/dialog.mjs.map +0 -1
  196. package/es/src/feedback-plugin/index.mjs +0 -2
  197. package/es/src/feedback-plugin/index.mjs.map +0 -1
  198. package/es/src/file-upload/index.mjs +0 -2
  199. package/es/src/file-upload/index.mjs.map +0 -1
  200. package/es/src/icon/index.mjs +0 -2
  201. package/es/src/icon/index.mjs.map +0 -1
  202. package/es/src/icon/src/icon.mjs +0 -2
  203. package/es/src/icon/src/icon.mjs.map +0 -1
  204. package/es/src/image-upload/index.mjs +0 -2
  205. package/es/src/image-upload/index.mjs.map +0 -1
  206. package/es/src/make-installer.mjs +0 -2
  207. package/es/src/make-installer.mjs.map +0 -1
  208. package/es/src/message/src/message.mjs +0 -2
  209. package/es/src/message/src/message.mjs.map +0 -1
  210. package/es/src/photo-crop-tool/index.mjs +0 -2
  211. package/es/src/photo-crop-tool/index.mjs.map +0 -1
  212. package/es/src/tiny-mce-editor/index.mjs +0 -2
  213. package/es/src/tiny-mce-editor/index.mjs.map +0 -1
  214. package/es/src/tiny-mce-editor/src/tiny-mce-editor.vue.mjs +0 -2
  215. package/es/src/tiny-mce-editor/src/tiny-mce-editor.vue.mjs.map +0 -1
  216. package/es/src/tiny-mce-editor/src/tiny-mce-editor.vue2.mjs +0 -2
  217. package/es/src/tiny-mce-editor/src/tiny-mce-editor.vue2.mjs.map +0 -1
  218. package/es/src/ui/button/index.mjs +0 -2
  219. package/es/src/ui/button/index.mjs.map +0 -1
  220. package/es/src/ui/checkbox/index.mjs +0 -2
  221. package/es/src/ui/checkbox/index.mjs.map +0 -1
  222. package/es/src/ui/dialog/index.mjs +0 -2
  223. package/es/src/ui/dialog/index.mjs.map +0 -1
  224. package/es/src/ui/input/index.mjs +0 -2
  225. package/es/src/ui/input/index.mjs.map +0 -1
  226. package/es/src/ui/input-number/index.mjs +0 -2
  227. package/es/src/ui/input-number/index.mjs.map +0 -1
  228. package/es/src/ui/layout/index.mjs +0 -2
  229. package/es/src/ui/layout/index.mjs.map +0 -1
  230. package/es/src/ui/link/index.mjs +0 -2
  231. package/es/src/ui/link/index.mjs.map +0 -1
  232. package/es/src/ui/popover/index.mjs +0 -2
  233. package/es/src/ui/popover/index.mjs.map +0 -1
  234. package/es/src/ui/radio/index.mjs +0 -2
  235. package/es/src/ui/radio/index.mjs.map +0 -1
  236. package/es/src/ui/scrollbar/index.mjs +0 -2
  237. package/es/src/ui/scrollbar/index.mjs.map +0 -1
  238. package/es/src/ui/select/index.mjs +0 -2
  239. package/es/src/ui/select/index.mjs.map +0 -1
  240. package/es/src/ui/table/index.mjs +0 -2
  241. package/es/src/ui/table/index.mjs.map +0 -1
  242. package/es/src/ui/tag/index.mjs +0 -2
  243. package/es/src/ui/tag/index.mjs.map +0 -1
  244. package/es/src/wc-bridge.mjs +0 -2
  245. package/es/src/wc-bridge.mjs.map +0 -1
  246. package/es/src/withInstall.mjs +0 -2
  247. package/es/src/withInstall.mjs.map +0 -1
  248. package/lib/node_modules/.pnpm/@iconify_vue@5.0.0_vue@3.5.18_typescript@5.9.2_/node_modules/@iconify/vue/dist/iconify.cjs +0 -2
  249. package/lib/node_modules/.pnpm/@iconify_vue@5.0.0_vue@3.5.18_typescript@5.9.2_/node_modules/@iconify/vue/dist/iconify.cjs.map +0 -1
  250. package/lib/node_modules/.pnpm/turndown@7.2.4/node_modules/turndown/lib/turndown.es.cjs +0 -2
  251. package/lib/node_modules/.pnpm/turndown@7.2.4/node_modules/turndown/lib/turndown.es.cjs.map +0 -1
  252. package/lib/package.json.cjs +0 -2
  253. package/lib/package.json.cjs.map +0 -1
  254. package/lib/src/alert/index.cjs +0 -2
  255. package/lib/src/alert/index.cjs.map +0 -1
  256. package/lib/src/alert/src/alert.cjs +0 -2
  257. package/lib/src/alert/src/alert.cjs.map +0 -1
  258. package/lib/src/components.cjs +0 -2
  259. package/lib/src/components.cjs.map +0 -1
  260. package/lib/src/data-chart/index.cjs +0 -2
  261. package/lib/src/data-chart/index.cjs.map +0 -1
  262. package/lib/src/defaults.cjs +0 -2
  263. package/lib/src/defaults.cjs.map +0 -1
  264. package/lib/src/dialog/src/dialog.cjs +0 -2
  265. package/lib/src/dialog/src/dialog.cjs.map +0 -1
  266. package/lib/src/feedback-plugin/index.cjs +0 -2
  267. package/lib/src/feedback-plugin/index.cjs.map +0 -1
  268. package/lib/src/file-upload/index.cjs +0 -2
  269. package/lib/src/file-upload/index.cjs.map +0 -1
  270. package/lib/src/icon/index.cjs +0 -2
  271. package/lib/src/icon/index.cjs.map +0 -1
  272. package/lib/src/icon/src/icon.cjs +0 -2
  273. package/lib/src/icon/src/icon.cjs.map +0 -1
  274. package/lib/src/image-upload/index.cjs +0 -2
  275. package/lib/src/image-upload/index.cjs.map +0 -1
  276. package/lib/src/make-installer.cjs +0 -2
  277. package/lib/src/make-installer.cjs.map +0 -1
  278. package/lib/src/message/src/message.cjs +0 -2
  279. package/lib/src/message/src/message.cjs.map +0 -1
  280. package/lib/src/photo-crop-tool/index.cjs +0 -2
  281. package/lib/src/photo-crop-tool/index.cjs.map +0 -1
  282. package/lib/src/tiny-mce-editor/index.cjs +0 -2
  283. package/lib/src/tiny-mce-editor/index.cjs.map +0 -1
  284. package/lib/src/tiny-mce-editor/src/tiny-mce-editor.vue.cjs +0 -2
  285. package/lib/src/tiny-mce-editor/src/tiny-mce-editor.vue.cjs.map +0 -1
  286. package/lib/src/tiny-mce-editor/src/tiny-mce-editor.vue2.cjs +0 -2
  287. package/lib/src/tiny-mce-editor/src/tiny-mce-editor.vue2.cjs.map +0 -1
  288. package/lib/src/ui/button/index.cjs +0 -2
  289. package/lib/src/ui/button/index.cjs.map +0 -1
  290. package/lib/src/ui/checkbox/index.cjs +0 -2
  291. package/lib/src/ui/checkbox/index.cjs.map +0 -1
  292. package/lib/src/ui/dialog/index.cjs +0 -2
  293. package/lib/src/ui/dialog/index.cjs.map +0 -1
  294. package/lib/src/ui/input/index.cjs +0 -2
  295. package/lib/src/ui/input/index.cjs.map +0 -1
  296. package/lib/src/ui/input-number/index.cjs +0 -2
  297. package/lib/src/ui/input-number/index.cjs.map +0 -1
  298. package/lib/src/ui/layout/index.cjs +0 -2
  299. package/lib/src/ui/layout/index.cjs.map +0 -1
  300. package/lib/src/ui/link/index.cjs +0 -2
  301. package/lib/src/ui/link/index.cjs.map +0 -1
  302. package/lib/src/ui/popover/index.cjs +0 -2
  303. package/lib/src/ui/popover/index.cjs.map +0 -1
  304. package/lib/src/ui/radio/index.cjs +0 -2
  305. package/lib/src/ui/radio/index.cjs.map +0 -1
  306. package/lib/src/ui/scrollbar/index.cjs +0 -2
  307. package/lib/src/ui/scrollbar/index.cjs.map +0 -1
  308. package/lib/src/ui/select/index.cjs +0 -2
  309. package/lib/src/ui/select/index.cjs.map +0 -1
  310. package/lib/src/ui/table/index.cjs +0 -2
  311. package/lib/src/ui/table/index.cjs.map +0 -1
  312. package/lib/src/ui/tag/index.cjs +0 -2
  313. package/lib/src/ui/tag/index.cjs.map +0 -1
  314. package/lib/src/wc-bridge.cjs +0 -2
  315. package/lib/src/wc-bridge.cjs.map +0 -1
  316. package/lib/src/withInstall.cjs +0 -2
  317. package/lib/src/withInstall.cjs.map +0 -1
  318. package/types/index.d.ts.map +0 -1
  319. package/types/src/alert/index.d.ts +0 -66
  320. package/types/src/alert/index.d.ts.map +0 -1
  321. package/types/src/alert/src/alert.d.ts +0 -73
  322. package/types/src/alert/src/alert.d.ts.map +0 -1
  323. package/types/src/components.d.ts +0 -10
  324. package/types/src/components.d.ts.map +0 -1
  325. package/types/src/data-chart/index.d.ts +0 -13
  326. package/types/src/data-chart/index.d.ts.map +0 -1
  327. package/types/src/defaults.d.ts +0 -6
  328. package/types/src/defaults.d.ts.map +0 -1
  329. package/types/src/dialog/index.d.ts +0 -3
  330. package/types/src/dialog/index.d.ts.map +0 -1
  331. package/types/src/dialog/src/dialog.d.ts +0 -25
  332. package/types/src/dialog/src/dialog.d.ts.map +0 -1
  333. package/types/src/feedback-plugin/index.d.ts +0 -9
  334. package/types/src/feedback-plugin/index.d.ts.map +0 -1
  335. package/types/src/file-upload/index.d.ts +0 -12
  336. package/types/src/file-upload/index.d.ts.map +0 -1
  337. package/types/src/icon/index.d.ts +0 -56
  338. package/types/src/icon/index.d.ts.map +0 -1
  339. package/types/src/icon/src/icon.d.ts +0 -62
  340. package/types/src/icon/src/icon.d.ts.map +0 -1
  341. package/types/src/image-upload/index.d.ts +0 -12
  342. package/types/src/image-upload/index.d.ts.map +0 -1
  343. package/types/src/make-installer.d.ts +0 -6
  344. package/types/src/make-installer.d.ts.map +0 -1
  345. package/types/src/message/index.d.ts +0 -3
  346. package/types/src/message/index.d.ts.map +0 -1
  347. package/types/src/message/src/message.d.ts +0 -21
  348. package/types/src/message/src/message.d.ts.map +0 -1
  349. package/types/src/message/src/toaster.vue.d.ts +0 -3
  350. package/types/src/message/src/toaster.vue.d.ts.map +0 -1
  351. package/types/src/photo-crop-tool/index.d.ts +0 -12
  352. package/types/src/photo-crop-tool/index.d.ts.map +0 -1
  353. package/types/src/subject-action/index.d.ts +0 -93
  354. package/types/src/subject-action/index.d.ts.map +0 -1
  355. package/types/src/subject-action/src/subject-action.vue.d.ts +0 -92
  356. package/types/src/subject-action/src/subject-action.vue.d.ts.map +0 -1
  357. package/types/src/subject-layout/index.d.ts +0 -30
  358. package/types/src/subject-layout/index.d.ts.map +0 -1
  359. package/types/src/subject-layout/src/subject-layout.vue.d.ts +0 -20
  360. package/types/src/subject-layout/src/subject-layout.vue.d.ts.map +0 -1
  361. package/types/src/subject-list/index.d.ts +0 -20
  362. package/types/src/subject-list/index.d.ts.map +0 -1
  363. package/types/src/subject-list/src/components/SubjectPageEnd.vue.d.ts +0 -24
  364. package/types/src/subject-list/src/components/SubjectPageEnd.vue.d.ts.map +0 -1
  365. package/types/src/subject-list/src/components/subject-blank-fill.vue.d.ts +0 -32
  366. package/types/src/subject-list/src/components/subject-blank-fill.vue.d.ts.map +0 -1
  367. package/types/src/subject-list/src/components/subject-scale.vue.d.ts +0 -29
  368. package/types/src/subject-list/src/components/subject-scale.vue.d.ts.map +0 -1
  369. package/types/src/subject-list/src/components/subject-single.vue.d.ts +0 -37
  370. package/types/src/subject-list/src/components/subject-single.vue.d.ts.map +0 -1
  371. package/types/src/subject-list/src/components/subject-text-fill.vue.d.ts +0 -34
  372. package/types/src/subject-list/src/components/subject-text-fill.vue.d.ts.map +0 -1
  373. package/types/src/subject-list/src/subject-list.vue.d.ts +0 -21
  374. package/types/src/subject-list/src/subject-list.vue.d.ts.map +0 -1
  375. package/types/src/subject-type/index.d.ts +0 -8
  376. package/types/src/subject-type/index.d.ts.map +0 -1
  377. package/types/src/subject-type/src/subject-type.vue.d.ts +0 -7
  378. package/types/src/subject-type/src/subject-type.vue.d.ts.map +0 -1
  379. package/types/src/tiny-mce-editor/index.d.ts +0 -20
  380. package/types/src/tiny-mce-editor/index.d.ts.map +0 -1
  381. package/types/src/tiny-mce-editor/src/tiny-mce-editor.vue.d.ts +0 -32
  382. package/types/src/tiny-mce-editor/src/tiny-mce-editor.vue.d.ts.map +0 -1
  383. package/types/src/ui/button/index.d.ts +0 -96
  384. package/types/src/ui/button/index.d.ts.map +0 -1
  385. package/types/src/ui/checkbox/index.d.ts +0 -111
  386. package/types/src/ui/checkbox/index.d.ts.map +0 -1
  387. package/types/src/ui/dialog/index.d.ts +0 -134
  388. package/types/src/ui/dialog/index.d.ts.map +0 -1
  389. package/types/src/ui/index.d.ts +0 -16
  390. package/types/src/ui/index.d.ts.map +0 -1
  391. package/types/src/ui/input/index.d.ts +0 -132
  392. package/types/src/ui/input/index.d.ts.map +0 -1
  393. package/types/src/ui/input-number/index.d.ts +0 -106
  394. package/types/src/ui/input-number/index.d.ts.map +0 -1
  395. package/types/src/ui/layout/index.d.ts +0 -373
  396. package/types/src/ui/layout/index.d.ts.map +0 -1
  397. package/types/src/ui/link/index.d.ts +0 -57
  398. package/types/src/ui/link/index.d.ts.map +0 -1
  399. package/types/src/ui/popover/index.d.ts +0 -89
  400. package/types/src/ui/popover/index.d.ts.map +0 -1
  401. package/types/src/ui/radio/index.d.ts +0 -84
  402. package/types/src/ui/radio/index.d.ts.map +0 -1
  403. package/types/src/ui/scrollbar/index.d.ts +0 -35
  404. package/types/src/ui/scrollbar/index.d.ts.map +0 -1
  405. package/types/src/ui/select/index.d.ts +0 -113
  406. package/types/src/ui/select/index.d.ts.map +0 -1
  407. package/types/src/ui/table/index.d.ts +0 -152
  408. package/types/src/ui/table/index.d.ts.map +0 -1
  409. package/types/src/ui/tag/index.d.ts +0 -69
  410. package/types/src/ui/tag/index.d.ts.map +0 -1
  411. package/types/src/wc-bridge.d.ts +0 -23
  412. package/types/src/wc-bridge.d.ts.map +0 -1
  413. package/types/src/withInstall.d.ts +0 -4
  414. package/types/src/withInstall.d.ts.map +0 -1
  415. package/types/tsconfig.tsbuildinfo +0 -1
package/README.md DELETED
@@ -1,562 +0,0 @@
1
- # @qxs-bns/components
2
-
3
- QXS Business System 组件库,基于 Vue 3 + TypeScript + Element Plus 构建的企业级组件库。
4
-
5
- ## ✨ 特性
6
-
7
- - 🎯 **企业级** - 专为企业级应用设计,提供丰富的业务组件
8
- - 🔧 **二次封装** - 基于 Element Plus 进行增强,保持 API 一致性
9
- - 📦 **按需加载** - 支持 Tree-shaking,减少打包体积
10
- - 🎨 **主题定制** - 支持主题定制和暗黑模式
11
- - 🌍 **国际化** - 内置国际化支持
12
- - 📱 **响应式** - 移动端友好的响应式设计
13
- - ♿ **无障碍** - 遵循 WAI-ARIA 标准
14
- - 🎪 **TypeScript** - 完整的 TypeScript 类型定义
15
-
16
- ## 📦 安装
17
-
18
- ```bash
19
- # npm
20
- npm install @qxs-bns/components
21
-
22
- # yarn
23
- yarn add @qxs-bns/components
24
-
25
- # pnpm
26
- pnpm add @qxs-bns/components
27
- ```
28
-
29
- ## 🚀 快速开始
30
-
31
- ### 完整引入
32
-
33
- ```typescript
34
- import { createApp } from 'vue'
35
- import QxsComponents from '@qxs-bns/components'
36
- import '@qxs-bns/components/dist/index.css'
37
- import App from './App.vue'
38
-
39
- const app = createApp(App)
40
- app.use(QxsComponents)
41
- app.mount('#app')
42
- ```
43
-
44
- ### 按需引入
45
-
46
- ```vue
47
- <template>
48
- <QxsButton type="primary">按钮</QxsButton>
49
- <QxsTinyMceEditor v-model="content" />
50
- </template>
51
-
52
- <script setup>
53
- import { ref } from 'vue'
54
- import { QxsButton, QxsTinyMceEditor } from '@qxs-bns/components'
55
-
56
- const content = ref('<p>旧版富文本编辑内容</p>')
57
- </script>
58
- ```
59
-
60
- ## 🏗️ 项目结构
61
-
62
- ```
63
- packages/components/
64
- ├── src/ # 源码目录
65
- │ ├── button/ # 按钮组件
66
- │ │ ├── src/ # 组件源码
67
- │ │ │ └── button.vue
68
- │ │ ├── style/ # 组件样式
69
- │ │ │ └── index.scss
70
- │ │ └── index.ts # 组件入口
71
- │ ├── tiny-mce-editor/ # 富文本编辑器
72
- │ ├── utils/ # 工具函数
73
- │ ├── constants/ # 常量定义
74
- │ └── index.ts # 总入口
75
- ├── dist/ # 构建产物
76
- ├── docs/ # 组件文档
77
- └── package.json
78
- ```
79
-
80
- ## 🧩 核心组件
81
-
82
- ### 基础组件
83
-
84
- | 组件名 | 说明 | 文档 |
85
- |--------|------|------|
86
- | Button | 按钮组件 | [查看文档](./src/button/README.md) |
87
- | Input | 输入框组件 | [查看文档](./src/input/README.md) |
88
- | Select | 选择器组件 | [查看文档](./src/select/README.md) |
89
-
90
- ### 数据展示
91
-
92
- | 组件名 | 说明 | 文档 |
93
- |--------|------|------|
94
- | TinyMceEditor | 富文本编辑器 | [查看文档](./src/tiny-mce-editor/README.md) |
95
- | Table | 表格组件 | [查看文档](./src/table/README.md) |
96
- | Card | 卡片组件 | [查看文档](./src/card/README.md) |
97
-
98
- ### 导航组件
99
-
100
- | 组件名 | 说明 | 文档 |
101
- |--------|------|------|
102
- | Menu | 菜单组件 | [查看文档](./src/menu/README.md) |
103
- | Breadcrumb | 面包屑组件 | [查看文档](./src/breadcrumb/README.md) |
104
- | Pagination | 分页组件 | [查看文档](./src/pagination/README.md) |
105
-
106
- ### 反馈组件
107
-
108
- | 组件名 | 说明 | 文档 |
109
- |--------|------|------|
110
- | Dialog | 对话框组件 | [查看文档](./src/dialog/README.md) |
111
- | Message | 消息提示组件 | [查看文档](./src/message/README.md) |
112
- | Loading | 加载组件 | [查看文档](./src/loading/README.md) |
113
-
114
- ## 🛠️ 开发指南
115
-
116
- ### 环境要求
117
-
118
- - Node.js >= 16
119
- - pnpm >= 7
120
- - Vue >= 3.3
121
- - TypeScript >= 4.9
122
-
123
- ### 本地开发
124
-
125
- ```bash
126
- # 克隆项目
127
- git clone <repository-url>
128
-
129
- # 安装依赖
130
- pnpm install
131
-
132
- # 启动开发服务器
133
- pnpm dev
134
-
135
- # 构建组件库
136
- pnpm build
137
-
138
- # 运行测试
139
- pnpm test
140
- ```
141
-
142
- ### 创建新组件
143
-
144
- 1. **创建组件目录**
145
- ```bash
146
- mkdir src/my-component
147
- cd src/my-component
148
- ```
149
-
150
- 2. **创建必要文件**
151
- ```
152
- my-component/
153
- ├── src/
154
- │ └── my-component.vue
155
- ├── style/
156
- │ └── index.scss
157
- ├── index.ts
158
- └── README.md
159
- ```
160
-
161
- 3. **组件模板**
162
- ```vue
163
- <!-- src/my-component.vue -->
164
- <template>
165
- <div :class="ns.b()">
166
- <slot />
167
- </div>
168
- </template>
169
-
170
- <script setup lang="ts">
171
- import { useNamespace } from '@qxs-bns/hooks'
172
-
173
- defineOptions({
174
- name: 'QxsMyComponent'
175
- })
176
-
177
- const ns = useNamespace('my-component')
178
- </script>
179
- ```
180
-
181
- 4. **样式文件**
182
- ```scss
183
- // style/index.scss
184
- @use 'sass:map';
185
- @use '@qxs-bns/theme-chalk/src/mixins/mixins' as *;
186
- @use '@qxs-bns/theme-chalk/src/common/var' as *;
187
-
188
- @include b(my-component) {
189
- // 组件样式
190
- }
191
- ```
192
-
193
- 5. **入口文件**
194
- ```typescript
195
- // index.ts
196
- import { withInstall } from '@qxs-bns/utils'
197
- import MyComponent from './src/my-component.vue'
198
-
199
- export const QxsMyComponent = withInstall(MyComponent)
200
- export default QxsMyComponent
201
-
202
- export * from './src/my-component'
203
- ```
204
-
205
- ## 📋 开发规范
206
-
207
- ### 组件命名规范
208
-
209
- #### Element Plus 二次封装组件
210
- - **组件名**:保持与 Element Plus 一致,添加 `Qxs` 前缀
211
- - **文件名**:使用 kebab-case
212
- - **样式类名**:使用 Element Plus 的 BEM 命名规范
213
-
214
- ```typescript
215
- // ✅ 正确示例
216
- export const QxsButton = withInstall(Button)
217
- export const QxsInput = withInstall(Input)
218
-
219
- // ❌ 错误示例
220
- export const QxsBtn = withInstall(Button)
221
- export const QxsInputField = withInstall(Input)
222
- ```
223
-
224
- #### 自定义组件
225
- - **组件名**:使用 `@qxs-bns/hooks` 中的 `useNamespace` 函数
226
- - **文件名**:使用 kebab-case
227
- - **样式类名**:使用 BEM 命名规范
228
-
229
- ```vue
230
- <script setup lang="ts">
231
- import { useNamespace } from '@qxs-bns/hooks'
232
-
233
- defineOptions({
234
- name: 'QxsMyComponent' // 组件名使用 PascalCase
235
- })
236
-
237
- const ns = useNamespace('my-component') // 使用 kebab-case
238
- </script>
239
-
240
- <template>
241
- <div :class="ns.b()"> <!-- 生成 .qxs-my-component -->
242
- <div :class="ns.e('header')"> <!-- 生成 .qxs-my-component__header -->
243
- <div :class="ns.em('header', 'title')"> <!-- 生成 .qxs-my-component__header--title -->
244
- ```
245
-
246
- ### Props 设计规范
247
-
248
- ```typescript
249
- // 使用 TypeScript 接口定义 Props
250
- interface ButtonProps {
251
- /**
252
- * 按钮类型
253
- * @default 'default'
254
- */
255
- type?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'default'
256
-
257
- /**
258
- * 按钮尺寸
259
- * @default 'default'
260
- */
261
- size?: 'large' | 'default' | 'small'
262
-
263
- /**
264
- * 是否禁用
265
- * @default false
266
- */
267
- disabled?: boolean
268
-
269
- /**
270
- * 是否加载中
271
- * @default false
272
- */
273
- loading?: boolean
274
- }
275
-
276
- // 使用 withDefaults 设置默认值
277
- const props = withDefaults(defineProps<ButtonProps>(), {
278
- type: 'default',
279
- size: 'default',
280
- disabled: false,
281
- loading: false
282
- })
283
- ```
284
-
285
- ### 事件设计规范
286
-
287
- ```typescript
288
- // 定义事件类型
289
- interface ButtonEmits {
290
- /**
291
- * 点击事件
292
- * @param event 原生事件对象
293
- */
294
- click: [event: MouseEvent]
295
-
296
- /**
297
- * 焦点事件
298
- * @param event 原生事件对象
299
- */
300
- focus: [event: FocusEvent]
301
-
302
- /**
303
- * 失焦事件
304
- * @param event 原生事件对象
305
- */
306
- blur: [event: FocusEvent]
307
- }
308
-
309
- const emit = defineEmits<ButtonEmits>()
310
-
311
- // 事件处理
312
- const handleClick = (event: MouseEvent) => {
313
- if (props.disabled || props.loading) return
314
- emit('click', event)
315
- }
316
- ```
317
-
318
- ### 样式规范
319
-
320
- #### SCSS 变量使用
321
-
322
- ```scss
323
- // 使用主题变量
324
- @use '@qxs-bns/theme-chalk/src/common/var' as *;
325
-
326
- @include b(button) {
327
- // 使用 CSS 变量
328
- background-color: var(#{getCssVarName('button', 'bg-color')});
329
- border-color: var(#{getCssVarName('button', 'border-color')});
330
- color: var(#{getCssVarName('button', 'text-color')});
331
-
332
- // 状态样式
333
- @include when(disabled) {
334
- opacity: var(#{getCssVarName('disabled-opacity')});
335
- cursor: not-allowed;
336
- }
337
-
338
- // 修饰符样式
339
- @include m(primary) {
340
- background-color: var(#{getCssVarName('color-primary')});
341
- border-color: var(#{getCssVarName('color-primary')});
342
- }
343
- }
344
- ```
345
-
346
- #### BEM 命名规范
347
-
348
- ```scss
349
- // Block(块)
350
- .qxs-button { }
351
-
352
- // Element(元素)
353
- .qxs-button__icon { }
354
- .qxs-button__text { }
355
-
356
- // Modifier(修饰符)
357
- .qxs-button--primary { }
358
- .qxs-button--large { }
359
-
360
- // State(状态)
361
- .qxs-button.is-disabled { }
362
- .qxs-button.is-loading { }
363
- ```
364
-
365
- ## 🧪 测试规范
366
-
367
- ### 单元测试
368
-
369
- ```typescript
370
- // button.test.ts
371
- import { mount } from '@vue/test-utils'
372
- import { describe, it, expect } from 'vitest'
373
- import Button from '../src/button.vue'
374
-
375
- describe('Button', () => {
376
- it('should render correctly', () => {
377
- const wrapper = mount(Button, {
378
- props: { type: 'primary' },
379
- slots: { default: 'Click me' }
380
- })
381
-
382
- expect(wrapper.classes()).toContain('qxs-button--primary')
383
- expect(wrapper.text()).toBe('Click me')
384
- })
385
-
386
- it('should emit click event', async () => {
387
- const wrapper = mount(Button)
388
- await wrapper.trigger('click')
389
-
390
- expect(wrapper.emitted('click')).toHaveLength(1)
391
- })
392
-
393
- it('should not emit click when disabled', async () => {
394
- const wrapper = mount(Button, {
395
- props: { disabled: true }
396
- })
397
- await wrapper.trigger('click')
398
-
399
- expect(wrapper.emitted('click')).toBeUndefined()
400
- })
401
- })
402
- ```
403
-
404
- ### 组件快照测试
405
-
406
- ```typescript
407
- // button.snap.test.ts
408
- import { mount } from '@vue/test-utils'
409
- import { describe, it, expect } from 'vitest'
410
- import Button from '../src/button.vue'
411
-
412
- describe('Button Snapshots', () => {
413
- it('should match snapshot with different types', () => {
414
- const types = ['primary', 'success', 'warning', 'danger', 'info']
415
-
416
- types.forEach(type => {
417
- const wrapper = mount(Button, {
418
- props: { type },
419
- slots: { default: 'Button' }
420
- })
421
- expect(wrapper.html()).toMatchSnapshot(`button-${type}`)
422
- })
423
- })
424
- })
425
- ```
426
-
427
- ## 📖 文档规范
428
-
429
- ### 组件文档模板
430
-
431
- 每个组件都应该包含完整的 README.md 文档:
432
-
433
- ```markdown
434
- # Button 按钮
435
-
436
- 常用的操作按钮。
437
-
438
- ## 基础用法
439
-
440
- 基础的按钮用法。
441
-
442
- :::demo 使用 `type`、`plain`、`round` 和 `circle` 属性来定义 Button 的样式。
443
-
444
- button/basic
445
-
446
- :::
447
-
448
- ## API
449
-
450
- ### Button Attributes
451
-
452
- | 属性名 | 说明 | 类型 | 可选值 | 默认值 |
453
- |--------|------|------|--------|--------|
454
- | type | 类型 | string | primary / success / warning / danger / info / text | — |
455
- | size | 尺寸 | string | large / small / mini | — |
456
- | disabled | 是否禁用状态 | boolean | — | false |
457
-
458
- ### Button Events
459
-
460
- | 事件名 | 说明 | 参数 |
461
- |--------|------|------|
462
- | click | 点击时触发 | (event: Event) |
463
-
464
- ### Button Slots
465
-
466
- | 插槽名 | 说明 |
467
- |--------|------|
468
- | — | 默认插槽 |
469
- ```
470
-
471
- ## 🤝 贡献指南
472
-
473
- ### 提交规范
474
-
475
- 使用 [Conventional Commits](https://conventionalcommits.org/) 规范:
476
-
477
- ```bash
478
- # 新功能
479
- feat(button): add loading state support
480
-
481
- # 修复 bug
482
- fix(data-chart): resolve chart rendering issue
483
-
484
- # 文档更新
485
- docs(readme): update installation guide
486
-
487
- # 样式调整
488
- style(button): adjust padding and margin
489
-
490
- # 重构代码
491
- refactor(utils): optimize namespace function
492
-
493
- # 性能优化
494
- perf(table): improve virtual scrolling performance
495
-
496
- # 测试相关
497
- test(button): add unit tests for disabled state
498
- ```
499
-
500
- ### 开发流程
501
-
502
- 1. **Fork 项目**
503
- 2. **创建功能分支**
504
- ```bash
505
- git checkout -b feat/new-component
506
- ```
507
- 3. **开发组件**
508
- - 编写组件代码
509
- - 添加单元测试
510
- - 编写文档
511
- 4. **提交代码**
512
- ```bash
513
- git add .
514
- git commit -m "feat(new-component): add new component"
515
- ```
516
- 5. **推送分支**
517
- ```bash
518
- git push origin feat/new-component
519
- ```
520
- 6. **创建 Pull Request**
521
-
522
- ### 代码审查清单
523
-
524
- - [ ] 组件命名符合规范
525
- - [ ] TypeScript 类型定义完整
526
- - [ ] 单元测试覆盖率 > 80%
527
- - [ ] 文档完整且示例可运行
528
- - [ ] 样式符合设计规范
529
- - [ ] 无障碍性支持
530
- - [ ] 国际化支持
531
-
532
- ## 🔧 常见问题
533
-
534
- ### Q: 如何自定义主题?
535
-
536
- A: 通过 CSS 变量覆盖默认主题:
537
-
538
- ```css
539
- :root {
540
- --qxs-color-primary: #409eff;
541
- --qxs-color-success: #67c23a;
542
- --qxs-color-warning: #e6a23c;
543
- --qxs-color-danger: #f56c6c;
544
- --qxs-color-info: #909399;
545
- }
546
- ```
547
-
548
- ### Q: 如何按需引入组件?
549
-
550
- A: 使用 ES6 模块语法:
551
-
552
- ```typescript
553
- import { QxsButton, QxsInput } from '@qxs-bns/components'
554
- ```
555
-
556
- ### Q: 如何贡献新组件?
557
-
558
- A: 请参考 [贡献指南](#🤝-贡献指南) 部分。
559
-
560
- ## 📄 许可证
561
-
562
- MIT License - 详见 [LICENSE](./LICENSE) 文件。
@@ -1,2 +0,0 @@
1
- import{defineComponent as t,ref as e,shallowRef as n,onMounted as o,watch as i,onUnmounted as r,h as c,nextTick as s}from"vue";const l=/^[a-z0-9]+(-[a-z0-9]+)*$/,a=(t,e,n,o="")=>{const i=t.split(":");if("@"===t.slice(0,1)){if(i.length<2||i.length>3)return null;o=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const t=i.pop(),n=i.pop(),r={provider:i.length>0?i[0]:o,prefix:n,name:t};return e&&!u(r)?null:r}const r=i[0],c=r.split("-");if(c.length>1){const t={provider:o,prefix:c.shift(),name:c.join("-")};return e&&!u(t)?null:t}if(n&&""===o){const t={provider:o,prefix:"",name:r};return e&&!u(t,n)?null:t}return null},u=(t,e)=>!!t&&!(!(e&&""===t.prefix||t.prefix)||!t.name),f=Object.freeze({left:0,top:0,width:16,height:16}),p=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),d=Object.freeze({...f,...p}),h=Object.freeze({...d,body:"",hidden:!1});function g(t,e){const n=function(t,e){const n={};!t.hFlip!=!e.hFlip&&(n.hFlip=!0),!t.vFlip!=!e.vFlip&&(n.vFlip=!0);const o=((t.rotate||0)+(e.rotate||0))%4;return o&&(n.rotate=o),n}(t,e);for(const o in h)o in p?o in t&&!(o in n)&&(n[o]=p[o]):o in e?n[o]=e[o]:o in t&&(n[o]=t[o]);return n}function m(t,e,n){const o=t.icons,i=t.aliases||Object.create(null);let r={};function c(t){r=g(o[t]||i[t],r)}return c(e),n.forEach(c),g(t,r)}function b(t,e){const n=[];if("object"!=typeof t||"object"!=typeof t.icons)return n;t.not_found instanceof Array&&t.not_found.forEach(t=>{e(t,null),n.push(t)});const o=function(t){const e=t.icons,n=t.aliases||Object.create(null),o=Object.create(null);return Object.keys(e).concat(Object.keys(n)).forEach(function t(i){if(e[i])return o[i]=[];if(!(i in o)){o[i]=null;const e=n[i]&&n[i].parent,r=e&&t(e);r&&(o[i]=[e].concat(r))}return o[i]}),o}(t);for(const i in o){const r=o[i];r&&(e(i,m(t,i,r)),n.push(i))}return n}const v={provider:"",aliases:{},not_found:{},...f};function y(t,e){for(const n in e)if(n in t&&typeof t[n]!=typeof e[n])return!1;return!0}function x(t){if("object"!=typeof t||null===t)return null;const e=t;if("string"!=typeof e.prefix||!t.icons||"object"!=typeof t.icons)return null;if(!y(t,v))return null;const n=e.icons;for(const t in n){const e=n[t];if(!t||"string"!=typeof e.body||!y(e,h))return null}const o=e.aliases||Object.create(null);for(const t in o){const e=o[t],i=e.parent;if(!t||"string"!=typeof i||!n[i]&&!o[i]||!y(e,h))return null}return e}const w=Object.create(null);function j(t,e){const n=w[t]||(w[t]=Object.create(null));return n[e]||(n[e]=function(t,e){return{provider:t,prefix:e,icons:Object.create(null),missing:new Set}}(t,e))}function k(t,e){return x(e)?b(e,(e,n)=>{n?t.icons[e]=n:t.missing.add(e)}):[]}let F=!1;function O(t){return"boolean"==typeof t&&(F=t),F}function E(t,e){const n=a(t,!0,F);if(!n)return!1;const o=j(n.provider,n.prefix);return e?function(t,e,n){try{if("string"==typeof n.body)return t.icons[e]={...n},!0}catch(t){}return!1}(o,n.name,e):(o.missing.add(n.name),!0)}function T(t,e){if("object"!=typeof t)return!1;if("string"!=typeof e&&(e=t.provider||""),F&&!e&&!t.prefix){let e=!1;return x(t)&&(t.prefix="",b(t,(t,n)=>{E(t,n)&&(e=!0)})),e}const n=t.prefix;if(!u({prefix:n,name:"a"}))return!1;return!!k(j(e,n),t)}const S=Object.freeze({width:null,height:null}),I=Object.freeze({...S,...p}),C=/(-?[0-9.]*[0-9]+[0-9.]*)/g,L=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function z(t,e,n){if(1===e)return t;if(n=n||100,"number"==typeof t)return Math.ceil(t*e*n)/n;if("string"!=typeof t)return t;const o=t.split(C);if(null===o||!o.length)return t;const i=[];let r=o.shift(),c=L.test(r);for(;;){if(c){const t=parseFloat(r);isNaN(t)?i.push(r):i.push(Math.ceil(t*e*n)/n)}else i.push(r);if(r=o.shift(),void 0===r)return i.join("");c=!c}}function M(t,e){const n={...d,...t},o={...I,...e},i={left:n.left,top:n.top,width:n.width,height:n.height};let r=n.body;[n,o].forEach(t=>{const e=[],n=t.hFlip,o=t.vFlip;let c,s=t.rotate;switch(n?o?s+=2:(e.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),e.push("scale(-1 1)"),i.top=i.left=0):o&&(e.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),e.push("scale(1 -1)"),i.top=i.left=0),s<0&&(s-=4*Math.floor(s/4)),s%=4,s){case 1:c=i.height/2+i.top,e.unshift("rotate(90 "+c.toString()+" "+c.toString()+")");break;case 2:e.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:c=i.width/2+i.left,e.unshift("rotate(-90 "+c.toString()+" "+c.toString()+")")}s%2==1&&(i.left!==i.top&&(c=i.left,i.left=i.top,i.top=c),i.width!==i.height&&(c=i.width,i.width=i.height,i.height=c)),e.length&&(r=function(t,e,n){const o=function(t,e="defs"){let n="";const o=t.indexOf("<"+e);for(;o>=0;){const i=t.indexOf(">",o),r=t.indexOf("</"+e);if(-1===i||-1===r)break;const c=t.indexOf(">",r);if(-1===c)break;n+=t.slice(i+1,r).trim(),t=t.slice(0,o).trim()+t.slice(c+1)}return{defs:n,content:t}}(t);return i=o.defs,r=e+o.content+n,i?"<defs>"+i+"</defs>"+r:r;var i,r}(r,'<g transform="'+e.join(" ")+'">',"</g>"))});const c=o.width,s=o.height,l=i.width,a=i.height;let u,f;null===c?(f=null===s?"1em":"auto"===s?a:s,u=z(f,l/a)):(u="auto"===c?l:c,f=null===s?z(u,a/l):"auto"===s?a:s);const p={},h=(t,e)=>{(t=>"unset"===t||"undefined"===t||"none"===t)(e)||(p[t]=e.toString())};h("width",u),h("height",f);const g=[i.left,i.top,l,a];return p.viewBox=g.join(" "),{attributes:p,viewBox:g,body:r}}const A=/\sid="(\S+)"/g,R="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16);let P=0;function $(t,e=R){const n=[];let o;for(;o=A.exec(t);)n.push(o[1]);if(!n.length)return t;const i="suffix"+(16777216*Math.random()|Date.now()).toString(16);return n.forEach(n=>{const o="function"==typeof e?e(n):e+(P++).toString(),r=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+r+')([")]|\\.[a-z])',"g"),"$1"+o+i+"$3")}),t=t.replace(new RegExp(i,"g"),"")}const N=Object.create(null);function U(t){return N[t]||N[""]}function q(t){let e;if("string"==typeof t.resources)e=[t.resources];else if(e=t.resources,!(e instanceof Array&&e.length))return null;return{resources:e,path:t.path||"/",maxURL:t.maxURL||500,rotate:t.rotate||750,timeout:t.timeout||5e3,random:!0===t.random,index:t.index||0,dataAfterTimeout:!1!==t.dataAfterTimeout}}const D=Object.create(null),_=["https://api.simplesvg.com","https://api.unisvg.com"],H=[];for(;_.length>0;)1===_.length||Math.random()>.5?H.push(_.shift()):H.push(_.pop());function Q(t,e){const n=q(e);return null!==n&&(D[t]=n,!0)}function B(t){return D[t]}D[""]=q({resources:["https://api.iconify.design"].concat(H)});let V=(()=>{let t;try{if(t=fetch,"function"==typeof t)return t}catch(t){}})();const G={prepare:(t,e,n)=>{const o=[],i=function(t,e){const n=B(t);if(!n)return 0;let o;if(n.maxURL){let t=0;n.resources.forEach(e=>{const n=e;t=Math.max(t,n.length)});const i=e+".json?icons=";o=n.maxURL-t-n.path.length-i.length}else o=0;return o}(t,e),r="icons";let c={type:r,provider:t,prefix:e,icons:[]},s=0;return n.forEach((n,l)=>{s+=n.length+1,s>=i&&l>0&&(o.push(c),c={type:r,provider:t,prefix:e,icons:[]},s=n.length),c.icons.push(n)}),o.push(c),o},send:(t,e,n)=>{if(!V)return void n("abort",424);let o=function(t){if("string"==typeof t){const e=B(t);if(e)return e.path}return"/"}(e.provider);switch(e.type){case"icons":{const t=e.prefix,n=e.icons.join(",");o+=t+".json?"+new URLSearchParams({icons:n}).toString();break}case"custom":{const t=e.uri;o+="/"===t.slice(0,1)?t.slice(1):t;break}default:return void n("abort",400)}let i=503;V(t+o).then(t=>{const e=t.status;if(200===e)return i=501,t.json();setTimeout(()=>{n(function(t){return 404===t}(e)?"abort":"next",e)})}).then(t=>{"object"==typeof t&&null!==t?setTimeout(()=>{n("success",t)}):setTimeout(()=>{404===t?n("abort",t):n("next",i)})}).catch(()=>{n("next",i)})}};function J(t,e){t.forEach(t=>{const n=t.loaderCallbacks;n&&(t.loaderCallbacks=n.filter(t=>t.id!==e))})}let K=0;var W={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function X(t,e,n,o){const i=t.resources.length,r=t.random?Math.floor(Math.random()*i):t.index;let c;if(t.random){let e=t.resources.slice(0);for(c=[];e.length>1;){const t=Math.floor(Math.random()*e.length);c.push(e[t]),e=e.slice(0,t).concat(e.slice(t+1))}c=c.concat(e)}else c=t.resources.slice(r).concat(t.resources.slice(0,r));const s=Date.now();let l,a="pending",u=0,f=null,p=[],d=[];function h(){f&&(clearTimeout(f),f=null)}function g(){"pending"===a&&(a="aborted"),h(),p.forEach(t=>{"pending"===t.status&&(t.status="aborted")}),p=[]}function m(t,e){e&&(d=[]),"function"==typeof t&&d.push(t)}function b(){a="failed",d.forEach(t=>{t(void 0,l)})}function v(){p.forEach(t=>{"pending"===t.status&&(t.status="aborted")}),p=[]}function y(){if("pending"!==a)return;h();const o=c.shift();if(void 0===o)return p.length?void(f=setTimeout(()=>{h(),"pending"===a&&(v(),b())},t.timeout)):void b();const i={status:"pending",resource:o,callback:(e,n)=>{!function(e,n,o){const i="success"!==n;switch(p=p.filter(t=>t!==e),a){case"pending":break;case"failed":if(i||!t.dataAfterTimeout)return;break;default:return}if("abort"===n)return l=o,void b();if(i)return l=o,void(p.length||(c.length?y():b()));if(h(),v(),!t.random){const n=t.resources.indexOf(e.resource);-1!==n&&n!==t.index&&(t.index=n)}a="completed",d.forEach(t=>{t(o)})}(i,e,n)}};p.push(i),u++,f=setTimeout(y,t.rotate),n(o,e,i.callback)}return"function"==typeof o&&d.push(o),setTimeout(y),function(){return{startTime:s,payload:e,status:a,queriesSent:u,queriesPending:p.length,subscribe:m,abort:g}}}function Y(t){const e={...W,...t};let n=[];function o(){n=n.filter(t=>"pending"===t().status)}return{query:function(t,i,r){const c=X(e,t,i,(t,e)=>{o(),r&&r(t,e)});return n.push(c),c},find:function(t){return n.find(e=>t(e))||null},setIndex:t=>{e.index=t},getIndex:()=>e.index,cleanup:o}}function Z(){}const tt=Object.create(null);function et(t,e,n){let o,i;if("string"==typeof t){const e=U(t);if(!e)return n(void 0,424),Z;i=e.send;const r=function(t){if(!tt[t]){const e=B(t);if(!e)return;const n={config:e,redundancy:Y(e)};tt[t]=n}return tt[t]}(t);r&&(o=r.redundancy)}else{const e=q(t);if(e){o=Y(e);const n=U(t.resources?t.resources[0]:"");n&&(i=n.send)}}return o&&i?o.query(e,i,n)().abort:(n(void 0,424),Z)}function nt(){}function ot(t){t.iconsLoaderFlag||(t.iconsLoaderFlag=!0,setTimeout(()=>{t.iconsLoaderFlag=!1,function(t){t.pendingCallbacksFlag||(t.pendingCallbacksFlag=!0,setTimeout(()=>{t.pendingCallbacksFlag=!1;const e=t.loaderCallbacks?t.loaderCallbacks.slice(0):[];if(!e.length)return;let n=!1;const o=t.provider,i=t.prefix;e.forEach(e=>{const r=e.icons,c=r.pending.length;r.pending=r.pending.filter(e=>{if(e.prefix!==i)return!0;const c=e.name;if(t.icons[c])r.loaded.push({provider:o,prefix:i,name:c});else{if(!t.missing.has(c))return n=!0,!0;r.missing.push({provider:o,prefix:i,name:c})}return!1}),r.pending.length!==c&&(n||J([t],e.id),e.callback(r.loaded.slice(0),r.missing.slice(0),r.pending.slice(0),e.abort))})}))}(t)}))}function it(t,e,n){function o(){const n=t.pendingIcons;e.forEach(e=>{n&&n.delete(e),t.icons[e]||t.missing.add(e)})}if(n&&"object"==typeof n)try{if(!k(t,n).length)return void o()}catch(t){}o(),ot(t)}function rt(t,e){t instanceof Promise?t.then(t=>{e(t)}).catch(()=>{e(null)}):e(t)}function ct(t,e){t.iconsToLoad?t.iconsToLoad=t.iconsToLoad.concat(e).sort():t.iconsToLoad=e,t.iconsQueueFlag||(t.iconsQueueFlag=!0,setTimeout(()=>{t.iconsQueueFlag=!1;const{provider:e,prefix:n}=t,o=t.iconsToLoad;if(delete t.iconsToLoad,!o||!o.length)return;const i=t.loadIcon;if(t.loadIcons&&(o.length>1||!i))return void rt(t.loadIcons(o,n,e),e=>{it(t,o,e)});if(i)return void o.forEach(o=>{rt(i(o,n,e),e=>{it(t,[o],e?{prefix:n,icons:{[o]:e}}:null)})});const{valid:r,invalid:c}=function(t){const e=[],n=[];return t.forEach(t=>{(t.match(l)?e:n).push(t)}),{valid:e,invalid:n}}(o);if(c.length&&it(t,c,null),!r.length)return;const s=n.match(l)?U(e):null;if(!s)return void it(t,r,null);s.prepare(e,n,r).forEach(n=>{et(e,n,e=>{it(t,n.icons,e)})})}))}const st=(t,e)=>{const n=function(t,e=!0,n=!1){const o=[];return t.forEach(t=>{const i="string"==typeof t?a(t,e,n):t;i&&o.push(i)}),o}(t,!0,O()),o=function(t){const e={loaded:[],missing:[],pending:[]},n=Object.create(null);t.sort((t,e)=>t.provider!==e.provider?t.provider.localeCompare(e.provider):t.prefix!==e.prefix?t.prefix.localeCompare(e.prefix):t.name.localeCompare(e.name));let o={provider:"",prefix:"",name:""};return t.forEach(t=>{if(o.name===t.name&&o.prefix===t.prefix&&o.provider===t.provider)return;o=t;const i=t.provider,r=t.prefix,c=t.name,s=n[i]||(n[i]=Object.create(null)),l=s[r]||(s[r]=j(i,r));let a;a=c in l.icons?e.loaded:""===r||l.missing.has(c)?e.missing:e.pending;const u={provider:i,prefix:r,name:c};a.push(u)}),e}(n);if(!o.pending.length){let t=!0;return e&&setTimeout(()=>{t&&e(o.loaded,o.missing,o.pending,nt)}),()=>{t=!1}}const i=Object.create(null),r=[];let c,s;return o.pending.forEach(t=>{const{provider:e,prefix:n}=t;if(n===s&&e===c)return;c=e,s=n,r.push(j(e,n));const o=i[e]||(i[e]=Object.create(null));o[n]||(o[n]=[])}),o.pending.forEach(t=>{const{provider:e,prefix:n,name:o}=t,r=j(e,n),c=r.pendingIcons||(r.pendingIcons=new Set);c.has(o)||(c.add(o),i[e][n].push(o))}),r.forEach(t=>{const e=i[t.provider][t.prefix];e.length&&ct(t,e)}),e?function(t,e,n){const o=K++,i=J.bind(null,n,o);if(!e.pending.length)return i;const r={id:o,icons:e,callback:t,abort:i};return n.forEach(t=>{(t.loaderCallbacks||(t.loaderCallbacks=[])).push(r)}),i}(e,o,r):nt};const lt=/[\s,]+/;function at(t,e){e.split(lt).forEach(e=>{switch(e.trim()){case"horizontal":t.hFlip=!0;break;case"vertical":t.vFlip=!0}})}function ut(t,e=0){const n=t.replace(/^-?[0-9.]*/,"");function o(t){for(;t<0;)t+=4;return t%4}if(""===n){const e=parseInt(t);return isNaN(e)?0:o(e)}if(n!==t){let e=0;switch(n){case"%":e=25;break;case"deg":e=90}if(e){let i=parseFloat(t.slice(0,t.length-n.length));return isNaN(i)?0:(i/=e,i%1==0?o(i):0)}}return e}const ft={...I,inline:!1},pt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},dt={display:"inline-block"},ht={backgroundColor:"currentColor"},gt={backgroundColor:"transparent"},mt={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},bt={webkitMask:ht,mask:ht,background:gt};for(const t in bt){const e=bt[t];for(const n in mt)e[t+n]=mt[n]}const vt={};function yt(t){return t+(t.match(/^[-0-9.]+$/)?"px":"")}["horizontal","vertical"].forEach(t=>{const e=t.slice(0,1)+"Flip";vt[t+"-flip"]=e,vt[t.slice(0,1)+"-flip"]=e,vt[t+"Flip"]=e});const xt=(t,e)=>{const n=function(t,e){const n={...t};for(const t in e){const o=e[t],i=typeof o;t in S?(null===o||o&&("string"===i||"number"===i))&&(n[t]=o):i===typeof n[t]&&(n[t]="rotate"===t?o%4:o)}return n}(ft,e),o={...pt},i=e.mode||"svg",r={},s=e.style,l="object"!=typeof s||s instanceof Array?{}:s;for(let t in e){const i=e[t];if(void 0!==i)switch(t){case"icon":case"style":case"onLoad":case"mode":case"ssr":break;case"inline":case"hFlip":case"vFlip":n[t]=!0===i||"true"===i||1===i;break;case"flip":"string"==typeof i&&at(n,i);break;case"color":r.color=i;break;case"rotate":"string"==typeof i?n[t]=ut(i):"number"==typeof i&&(n[t]=i);break;case"ariaHidden":case"aria-hidden":!0!==i&&"true"!==i&&delete o["aria-hidden"];break;default:{const e=vt[t];e?!0!==i&&"true"!==i&&1!==i||(n[e]=!0):void 0===ft[t]&&(o[t]=i)}}}const a=M(t,n),u=a.attributes;if(n.inline&&(r.verticalAlign="-0.125em"),"svg"===i){o.style={...r,...l},Object.assign(o,u);let t=0,n=e.id;return"string"==typeof n&&(n=n.replace(/-/g,"_")),o.innerHTML=$(a.body,n?()=>n+"ID"+t++:"iconifyVue"),c("svg",o)}const{body:f,width:p,height:d}=t,h="mask"===i||"bg"!==i&&-1!==f.indexOf("currentColor"),g=function(t,e){let n=-1===t.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const t in e)n+=" "+t+'="'+e[t]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+t+"</svg>"}(f,{...u,width:p+"",height:d+""});var m;return o.style={...r,"--svg":(m=g,'url("'+function(t){return"data:image/svg+xml,"+function(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}(t)}(m)+'")'),width:yt(u.width),height:yt(u.height),...dt,...h?ht:gt,...l},c("span",o)};var wt;if(O(!0),wt=G,N[""]=wt,"undefined"!=typeof document&&"undefined"!=typeof window){const t=window;if(void 0!==t.IconifyPreload){const e=t.IconifyPreload;"object"==typeof e&&null!==e&&(e instanceof Array?e:[e]).forEach(t=>{try{"object"!=typeof t||null===t||t instanceof Array||"object"!=typeof t.icons||"string"!=typeof t.prefix||T(t)}catch(t){}})}if(void 0!==t.IconifyProviders){const e=t.IconifyProviders;if("object"==typeof e&&null!==e)for(let t in e){try{const n=e[t];if("object"!=typeof n||!n||void 0===n.resources)continue;Q(t,n)}catch(t){}}}}const jt={...d,body:""},kt=t((t,{emit:c})=>{const l=e(null);function u(){l.value&&(l.value.abort?.(),l.value=null)}const f=e(!!t.ssr),p=e(""),h=n(null);function g(){const e=t.icon;if("object"==typeof e&&null!==e&&"string"==typeof e.body)return p.value="",{data:e};let n;if("string"!=typeof e||null===(n=a(e,!1,!0)))return null;let o=function(t){const e="string"==typeof t?a(t,!0,F):t;if(e){const t=j(e.provider,e.prefix),n=e.name;return t.icons[n]||(t.missing.has(n)?null:void 0)}}(n);if(!o){const t=l.value;return t&&t.name===e||(l.value=null===o?{name:e}:{name:e,abort:st([n],m)}),null}u(),p.value!==e&&(p.value=e,s(()=>{c("load",e)}));const i=t.customise;if(i){o=Object.assign({},o);const t=i(o.body,n.name,n.prefix,n.provider);"string"==typeof t&&(o.body=t)}const r=["iconify"];return""!==n.prefix&&r.push("iconify--"+n.prefix),""!==n.provider&&r.push("iconify--"+n.provider),{data:o,classes:r}}function m(){const t=g();t?t.data!==h.value?.data&&(h.value=t):h.value=null}return f.value?m():o(()=>{f.value=!0,m()}),i(()=>t.icon,m),r(u),()=>{const e=h.value;if(!e)return xt(jt,t);let n=t;return e.classes&&(n={...t,class:e.classes.join(" ")}),xt({...d,...e.data},n)}},{props:["icon","mode","ssr","width","height","style","color","inline","rotate","hFlip","horizontalFlip","vFlip","verticalFlip","flip","id","ariaHidden","customise","title"],emits:["load"]});export{kt as Icon,Q as addAPIProvider,T as addCollection,E as addIcon,M as buildIcon,z as calculateSize,st as loadIcons,$ as replaceIDs};
2
- //# sourceMappingURL=iconify.mjs.map