@qxs-bns/components 0.0.89 → 0.0.91
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.
- package/README.md +11 -15
- package/es/base/define.mjs +2 -0
- package/es/base/define.mjs.map +1 -0
- package/es/base/uid.mjs +2 -0
- package/es/base/uid.mjs.map +1 -0
- package/es/data-chart.mjs +142 -0
- package/es/data-chart.mjs.map +1 -0
- package/es/editor/blocksuite-editor.mjs +1115 -0
- package/es/editor/blocksuite-editor.mjs.map +1 -0
- package/es/editor/content-format.mjs +2 -0
- package/es/editor/content-format.mjs.map +1 -0
- package/es/editor/index.mjs +2 -0
- package/es/editor/index.mjs.map +1 -0
- package/es/editor/toolbar.mjs +2 -0
- package/es/editor/toolbar.mjs.map +1 -0
- package/es/entry-data-chart.mjs +2 -0
- package/es/entry-data-chart.mjs.map +1 -0
- package/es/entry-editor.mjs +2 -0
- package/es/entry-editor.mjs.map +1 -0
- package/es/entry-file-upload.mjs +2 -0
- package/es/entry-file-upload.mjs.map +1 -0
- package/es/entry-fixed-action-bar.mjs +2 -0
- package/es/entry-fixed-action-bar.mjs.map +1 -0
- package/es/entry-icon.mjs +2 -0
- package/es/entry-icon.mjs.map +1 -0
- package/es/entry-image-upload.mjs +2 -0
- package/es/entry-image-upload.mjs.map +1 -0
- package/es/entry-photo-crop-tool.mjs +2 -0
- package/es/entry-photo-crop-tool.mjs.map +1 -0
- package/es/entry-subject.mjs +2 -0
- package/es/entry-subject.mjs.map +1 -0
- package/es/file-upload.mjs +157 -0
- package/es/file-upload.mjs.map +1 -0
- package/es/fixed-action-bar.mjs +39 -0
- package/es/fixed-action-bar.mjs.map +1 -0
- package/es/icon.mjs +20 -0
- package/es/icon.mjs.map +1 -0
- package/es/image-upload.mjs +333 -0
- package/es/image-upload.mjs.map +1 -0
- package/es/index.mjs +1 -1
- package/es/index.mjs.map +1 -1
- 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 +1 -1
- 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 +1 -1
- package/es/node_modules/.pnpm/marked@17.0.6/node_modules/marked/lib/marked.esm.mjs +2 -0
- package/es/node_modules/.pnpm/marked@17.0.6/node_modules/marked/lib/marked.esm.mjs.map +1 -0
- package/es/node_modules/.pnpm/turndown-plugin-gfm@1.0.2/node_modules/turndown-plugin-gfm/lib/turndown-plugin-gfm.es.mjs +2 -0
- package/es/node_modules/.pnpm/turndown-plugin-gfm@1.0.2/node_modules/turndown-plugin-gfm/lib/turndown-plugin-gfm.es.mjs.map +1 -0
- package/es/node_modules/.pnpm/turndown@7.2.4/node_modules/turndown/lib/turndown.es.mjs +2 -0
- package/es/node_modules/.pnpm/turndown@7.2.4/node_modules/turndown/lib/turndown.es.mjs.map +1 -0
- package/es/package.json.mjs +1 -1
- package/es/photo-crop-tool.mjs +147 -0
- package/es/photo-crop-tool.mjs.map +1 -0
- package/es/src/alert/index.mjs +2 -0
- package/es/src/alert/index.mjs.map +1 -0
- package/es/src/alert/src/alert.mjs +2 -0
- package/es/src/alert/src/alert.mjs.map +1 -0
- package/es/src/components.mjs +1 -1
- package/es/src/data-chart/index.mjs +1 -1
- package/es/src/data-chart/index.mjs.map +1 -1
- package/es/src/dialog/src/dialog.mjs +2 -0
- package/es/src/dialog/src/dialog.mjs.map +1 -0
- package/es/src/feedback-plugin/index.mjs +2 -0
- package/es/src/feedback-plugin/index.mjs.map +1 -0
- package/es/src/file-upload/index.mjs +1 -1
- package/es/src/file-upload/index.mjs.map +1 -1
- package/es/src/image-upload/index.mjs +1 -1
- package/es/src/image-upload/index.mjs.map +1 -1
- package/es/src/make-installer.mjs +1 -1
- package/es/src/make-installer.mjs.map +1 -1
- package/es/src/message/src/message.mjs +2 -0
- package/es/src/message/src/message.mjs.map +1 -0
- package/es/src/photo-crop-tool/index.mjs +1 -1
- package/es/src/photo-crop-tool/index.mjs.map +1 -1
- package/es/src/tiny-mce-editor/src/tiny-mce-editor.vue.mjs +1 -1
- package/es/src/tiny-mce-editor/src/tiny-mce-editor.vue.mjs.map +1 -1
- package/es/src/ui/button/index.mjs +2 -0
- package/es/src/ui/button/index.mjs.map +1 -0
- package/es/src/ui/checkbox/index.mjs +2 -0
- package/es/src/ui/checkbox/index.mjs.map +1 -0
- package/es/src/ui/dialog/index.mjs +2 -0
- package/es/src/ui/dialog/index.mjs.map +1 -0
- package/es/src/ui/input/index.mjs +2 -0
- package/es/src/ui/input/index.mjs.map +1 -0
- package/es/src/ui/input-number/index.mjs +2 -0
- package/es/src/ui/input-number/index.mjs.map +1 -0
- package/es/src/ui/layout/index.mjs +2 -0
- package/es/src/ui/layout/index.mjs.map +1 -0
- package/es/src/ui/link/index.mjs +2 -0
- package/es/src/ui/link/index.mjs.map +1 -0
- package/es/src/ui/popover/index.mjs +2 -0
- package/es/src/ui/popover/index.mjs.map +1 -0
- package/es/src/ui/radio/index.mjs +2 -0
- package/es/src/ui/radio/index.mjs.map +1 -0
- package/es/src/ui/scrollbar/index.mjs +2 -0
- package/es/src/ui/scrollbar/index.mjs.map +1 -0
- package/es/src/ui/select/index.mjs +2 -0
- package/es/src/ui/select/index.mjs.map +1 -0
- package/es/src/ui/table/index.mjs +2 -0
- package/es/src/ui/table/index.mjs.map +1 -0
- package/es/src/ui/tag/index.mjs +2 -0
- package/es/src/ui/tag/index.mjs.map +1 -0
- package/es/src/wc-bridge.mjs +2 -0
- package/es/src/wc-bridge.mjs.map +1 -0
- package/es/subject/action.mjs +171 -0
- package/es/subject/action.mjs.map +1 -0
- package/es/subject/blank-fill.mjs +385 -0
- package/es/subject/blank-fill.mjs.map +1 -0
- package/es/subject/draft.mjs +2 -0
- package/es/subject/draft.mjs.map +1 -0
- package/es/subject/layout.mjs +21 -0
- package/es/subject/layout.mjs.map +1 -0
- package/es/subject/page-end.mjs +28 -0
- package/es/subject/page-end.mjs.map +1 -0
- package/es/subject/pagination.mjs +2 -0
- package/es/subject/pagination.mjs.map +1 -0
- package/es/subject/runtime.mjs +2 -0
- package/es/subject/runtime.mjs.map +1 -0
- package/es/subject/scale.mjs +267 -0
- package/es/subject/scale.mjs.map +1 -0
- package/es/subject/shared-methods.mjs +2 -0
- package/es/subject/shared-methods.mjs.map +1 -0
- package/es/subject/shared-styles.mjs +75 -0
- package/es/subject/shared-styles.mjs.map +1 -0
- package/es/subject/single.mjs +600 -0
- package/es/subject/single.mjs.map +1 -0
- package/es/subject/sort-controller.mjs +2 -0
- package/es/subject/sort-controller.mjs.map +1 -0
- package/es/subject/sortable.mjs +30 -0
- package/es/subject/sortable.mjs.map +1 -0
- package/es/subject/sorting-card.mjs +52 -0
- package/es/subject/sorting-card.mjs.map +1 -0
- package/es/subject/text-fill.mjs +395 -0
- package/es/subject/text-fill.mjs.map +1 -0
- package/es/subject/title-prefix.mjs +2 -0
- package/es/subject/title-prefix.mjs.map +1 -0
- package/es/subject/types.mjs +2 -0
- package/es/subject/types.mjs.map +1 -0
- package/lib/base/define.cjs +2 -0
- package/lib/base/define.cjs.map +1 -0
- package/lib/base/uid.cjs +2 -0
- package/lib/base/uid.cjs.map +1 -0
- package/lib/data-chart.cjs +142 -0
- package/lib/data-chart.cjs.map +1 -0
- package/lib/editor/blocksuite-editor.cjs +1115 -0
- package/lib/editor/blocksuite-editor.cjs.map +1 -0
- package/lib/editor/content-format.cjs +2 -0
- package/lib/editor/content-format.cjs.map +1 -0
- package/lib/editor/index.cjs +2 -0
- package/lib/editor/index.cjs.map +1 -0
- package/lib/editor/toolbar.cjs +2 -0
- package/lib/editor/toolbar.cjs.map +1 -0
- package/lib/entry-data-chart.cjs +2 -0
- package/lib/entry-data-chart.cjs.map +1 -0
- package/lib/entry-editor.cjs +2 -0
- package/lib/entry-editor.cjs.map +1 -0
- package/lib/entry-file-upload.cjs +2 -0
- package/lib/entry-file-upload.cjs.map +1 -0
- package/lib/entry-fixed-action-bar.cjs +2 -0
- package/lib/entry-fixed-action-bar.cjs.map +1 -0
- package/lib/entry-icon.cjs +2 -0
- package/lib/entry-icon.cjs.map +1 -0
- package/lib/entry-image-upload.cjs +2 -0
- package/lib/entry-image-upload.cjs.map +1 -0
- package/lib/entry-photo-crop-tool.cjs +2 -0
- package/lib/entry-photo-crop-tool.cjs.map +1 -0
- package/lib/entry-subject.cjs +2 -0
- package/lib/entry-subject.cjs.map +1 -0
- package/lib/file-upload.cjs +157 -0
- package/lib/file-upload.cjs.map +1 -0
- package/lib/fixed-action-bar.cjs +39 -0
- package/lib/fixed-action-bar.cjs.map +1 -0
- package/lib/icon.cjs +20 -0
- package/lib/icon.cjs.map +1 -0
- package/lib/image-upload.cjs +333 -0
- package/lib/image-upload.cjs.map +1 -0
- package/lib/index.cjs +1 -1
- package/lib/index.cjs.map +1 -1
- 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 +1 -1
- 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 +1 -1
- package/lib/node_modules/.pnpm/marked@17.0.6/node_modules/marked/lib/marked.esm.cjs +2 -0
- package/lib/node_modules/.pnpm/marked@17.0.6/node_modules/marked/lib/marked.esm.cjs.map +1 -0
- package/lib/node_modules/.pnpm/turndown-plugin-gfm@1.0.2/node_modules/turndown-plugin-gfm/lib/turndown-plugin-gfm.es.cjs +2 -0
- package/lib/node_modules/.pnpm/turndown-plugin-gfm@1.0.2/node_modules/turndown-plugin-gfm/lib/turndown-plugin-gfm.es.cjs.map +1 -0
- package/lib/node_modules/.pnpm/turndown@7.2.4/node_modules/turndown/lib/turndown.es.cjs +2 -0
- package/lib/node_modules/.pnpm/turndown@7.2.4/node_modules/turndown/lib/turndown.es.cjs.map +1 -0
- package/lib/package.json.cjs +1 -1
- package/lib/photo-crop-tool.cjs +147 -0
- package/lib/photo-crop-tool.cjs.map +1 -0
- package/lib/src/alert/index.cjs +2 -0
- package/lib/src/alert/index.cjs.map +1 -0
- package/lib/src/alert/src/alert.cjs +2 -0
- package/lib/src/alert/src/alert.cjs.map +1 -0
- package/lib/src/components.cjs +1 -1
- package/lib/src/data-chart/index.cjs +1 -1
- package/lib/src/data-chart/index.cjs.map +1 -1
- package/lib/src/dialog/src/dialog.cjs +2 -0
- package/lib/src/dialog/src/dialog.cjs.map +1 -0
- package/lib/src/feedback-plugin/index.cjs +2 -0
- package/lib/src/feedback-plugin/index.cjs.map +1 -0
- package/lib/src/file-upload/index.cjs +1 -1
- package/lib/src/file-upload/index.cjs.map +1 -1
- package/lib/src/image-upload/index.cjs +1 -1
- package/lib/src/image-upload/index.cjs.map +1 -1
- package/lib/src/make-installer.cjs +1 -1
- package/lib/src/make-installer.cjs.map +1 -1
- package/lib/src/message/src/message.cjs +2 -0
- package/lib/src/message/src/message.cjs.map +1 -0
- package/lib/src/photo-crop-tool/index.cjs +1 -1
- package/lib/src/photo-crop-tool/index.cjs.map +1 -1
- package/lib/src/tiny-mce-editor/src/tiny-mce-editor.vue.cjs +1 -1
- package/lib/src/tiny-mce-editor/src/tiny-mce-editor.vue.cjs.map +1 -1
- package/lib/src/ui/button/index.cjs +2 -0
- package/lib/src/ui/button/index.cjs.map +1 -0
- package/lib/src/ui/checkbox/index.cjs +2 -0
- package/lib/src/ui/checkbox/index.cjs.map +1 -0
- package/lib/src/ui/dialog/index.cjs +2 -0
- package/lib/src/ui/dialog/index.cjs.map +1 -0
- package/lib/src/ui/input/index.cjs +2 -0
- package/lib/src/ui/input/index.cjs.map +1 -0
- package/lib/src/ui/input-number/index.cjs +2 -0
- package/lib/src/ui/input-number/index.cjs.map +1 -0
- package/lib/src/ui/layout/index.cjs +2 -0
- package/lib/src/ui/layout/index.cjs.map +1 -0
- package/lib/src/ui/link/index.cjs +2 -0
- package/lib/src/ui/link/index.cjs.map +1 -0
- package/lib/src/ui/popover/index.cjs +2 -0
- package/lib/src/ui/popover/index.cjs.map +1 -0
- package/lib/src/ui/radio/index.cjs +2 -0
- package/lib/src/ui/radio/index.cjs.map +1 -0
- package/lib/src/ui/scrollbar/index.cjs +2 -0
- package/lib/src/ui/scrollbar/index.cjs.map +1 -0
- package/lib/src/ui/select/index.cjs +2 -0
- package/lib/src/ui/select/index.cjs.map +1 -0
- package/lib/src/ui/table/index.cjs +2 -0
- package/lib/src/ui/table/index.cjs.map +1 -0
- package/lib/src/ui/tag/index.cjs +2 -0
- package/lib/src/ui/tag/index.cjs.map +1 -0
- package/lib/src/wc-bridge.cjs +2 -0
- package/lib/src/wc-bridge.cjs.map +1 -0
- package/lib/subject/action.cjs +171 -0
- package/lib/subject/action.cjs.map +1 -0
- package/lib/subject/blank-fill.cjs +385 -0
- package/lib/subject/blank-fill.cjs.map +1 -0
- package/lib/subject/draft.cjs +2 -0
- package/lib/subject/draft.cjs.map +1 -0
- package/lib/subject/layout.cjs +21 -0
- package/lib/subject/layout.cjs.map +1 -0
- package/lib/subject/page-end.cjs +28 -0
- package/lib/subject/page-end.cjs.map +1 -0
- package/lib/subject/pagination.cjs +2 -0
- package/lib/subject/pagination.cjs.map +1 -0
- package/lib/subject/runtime.cjs +2 -0
- package/lib/subject/runtime.cjs.map +1 -0
- package/lib/subject/scale.cjs +267 -0
- package/lib/subject/scale.cjs.map +1 -0
- package/lib/subject/shared-methods.cjs +2 -0
- package/lib/subject/shared-methods.cjs.map +1 -0
- package/lib/subject/shared-styles.cjs +75 -0
- package/lib/subject/shared-styles.cjs.map +1 -0
- package/lib/subject/single.cjs +600 -0
- package/lib/subject/single.cjs.map +1 -0
- package/lib/subject/sort-controller.cjs +2 -0
- package/lib/subject/sort-controller.cjs.map +1 -0
- package/lib/subject/sortable.cjs +30 -0
- package/lib/subject/sortable.cjs.map +1 -0
- package/lib/subject/sorting-card.cjs +52 -0
- package/lib/subject/sorting-card.cjs.map +1 -0
- package/lib/subject/text-fill.cjs +395 -0
- package/lib/subject/text-fill.cjs.map +1 -0
- package/lib/subject/title-prefix.cjs +2 -0
- package/lib/subject/title-prefix.cjs.map +1 -0
- package/lib/subject/types.cjs +2 -0
- package/lib/subject/types.cjs.map +1 -0
- package/package.json +94 -41
- package/types/base/define.d.ts +1 -0
- package/types/base/uid.d.ts +1 -0
- package/types/data-chart.d.ts +65 -0
- package/types/editor/blocksuite-editor.d.ts +191 -0
- package/types/editor/content-format.d.ts +4 -0
- package/types/editor/index.d.ts +4 -0
- package/types/editor/toolbar.d.ts +6 -0
- package/types/editor/types.d.ts +42 -0
- package/types/entry-data-chart.d.ts +1 -0
- package/types/entry-editor.d.ts +2 -0
- package/types/entry-file-upload.d.ts +1 -0
- package/types/entry-fixed-action-bar.d.ts +1 -0
- package/types/entry-icon.d.ts +2 -0
- package/types/entry-image-upload.d.ts +1 -0
- package/types/entry-photo-crop-tool.d.ts +1 -0
- package/types/entry-subject.d.ts +2 -0
- package/types/file-upload.d.ts +48 -0
- package/types/fixed-action-bar.d.ts +25 -0
- package/types/icon.d.ts +30 -0
- package/types/image-upload.d.ts +68 -0
- package/types/index.d.ts +21 -6
- package/types/photo-crop-tool.d.ts +43 -0
- package/types/src/alert/index.d.ts +66 -0
- package/types/src/alert/index.d.ts.map +1 -0
- package/types/src/alert/src/alert.d.ts +73 -0
- package/types/src/alert/src/alert.d.ts.map +1 -0
- package/types/src/components.d.ts +4 -6
- package/types/src/components.d.ts.map +1 -1
- package/types/src/data-chart/index.d.ts +11 -27
- package/types/src/data-chart/index.d.ts.map +1 -1
- package/types/src/dialog/index.d.ts +3 -0
- package/types/src/dialog/index.d.ts.map +1 -0
- package/types/src/dialog/src/dialog.d.ts +25 -0
- package/types/src/dialog/src/dialog.d.ts.map +1 -0
- package/types/src/feedback-plugin/index.d.ts +9 -0
- package/types/src/feedback-plugin/index.d.ts.map +1 -0
- package/types/src/file-upload/index.d.ts +10 -28
- package/types/src/file-upload/index.d.ts.map +1 -1
- package/types/src/icon/index.d.ts +3 -3
- package/types/src/icon/src/icon.d.ts +3 -3
- package/types/src/image-upload/index.d.ts +10 -46
- package/types/src/image-upload/index.d.ts.map +1 -1
- package/types/src/make-installer.d.ts +1 -4
- package/types/src/make-installer.d.ts.map +1 -1
- package/types/src/message/index.d.ts +3 -0
- package/types/src/message/index.d.ts.map +1 -0
- package/types/src/message/src/message.d.ts +21 -0
- package/types/src/message/src/message.d.ts.map +1 -0
- package/types/src/message/src/toaster.vue.d.ts +3 -0
- package/types/src/message/src/toaster.vue.d.ts.map +1 -0
- package/types/src/photo-crop-tool/index.d.ts +9 -52
- package/types/src/photo-crop-tool/index.d.ts.map +1 -1
- package/types/src/subject-action/src/subject-action.vue.d.ts.map +1 -1
- package/types/src/subject-layout/index.d.ts +2 -2
- package/types/src/subject-layout/src/subject-layout.vue.d.ts +2 -2
- package/types/src/subject-layout/src/subject-layout.vue.d.ts.map +1 -1
- package/types/src/subject-list/src/components/subject-blank-fill.vue.d.ts.map +1 -1
- package/types/src/subject-list/src/components/subject-scale.vue.d.ts.map +1 -1
- package/types/src/subject-list/src/components/subject-single.vue.d.ts.map +1 -1
- package/types/src/subject-list/src/components/subject-text-fill.vue.d.ts.map +1 -1
- package/types/src/subject-list/src/subject-list.vue.d.ts.map +1 -1
- package/types/src/subject-type/src/subject-type.vue.d.ts.map +1 -1
- package/types/src/ui/button/index.d.ts +96 -0
- package/types/src/ui/button/index.d.ts.map +1 -0
- package/types/src/ui/checkbox/index.d.ts +111 -0
- package/types/src/ui/checkbox/index.d.ts.map +1 -0
- package/types/src/ui/dialog/index.d.ts +134 -0
- package/types/src/ui/dialog/index.d.ts.map +1 -0
- package/types/src/ui/index.d.ts +16 -0
- package/types/src/ui/index.d.ts.map +1 -0
- package/types/src/ui/input/index.d.ts +132 -0
- package/types/src/ui/input/index.d.ts.map +1 -0
- package/types/src/ui/input-number/index.d.ts +106 -0
- package/types/src/ui/input-number/index.d.ts.map +1 -0
- package/types/src/ui/layout/index.d.ts +373 -0
- package/types/src/ui/layout/index.d.ts.map +1 -0
- package/types/src/ui/link/index.d.ts +57 -0
- package/types/src/ui/link/index.d.ts.map +1 -0
- package/types/src/ui/popover/index.d.ts +89 -0
- package/types/src/ui/popover/index.d.ts.map +1 -0
- package/types/src/ui/radio/index.d.ts +84 -0
- package/types/src/ui/radio/index.d.ts.map +1 -0
- package/types/src/ui/scrollbar/index.d.ts +35 -0
- package/types/src/ui/scrollbar/index.d.ts.map +1 -0
- package/types/src/ui/select/index.d.ts +113 -0
- package/types/src/ui/select/index.d.ts.map +1 -0
- package/types/src/ui/table/index.d.ts +152 -0
- package/types/src/ui/table/index.d.ts.map +1 -0
- package/types/src/ui/tag/index.d.ts +69 -0
- package/types/src/ui/tag/index.d.ts.map +1 -0
- package/types/src/wc-bridge.d.ts +23 -0
- package/types/src/wc-bridge.d.ts.map +1 -0
- package/types/subject/action.d.ts +37 -0
- package/types/subject/blank-fill.d.ts +79 -0
- package/types/subject/draft.d.ts +63 -0
- package/types/subject/index.d.ts +13 -0
- package/types/subject/layout.d.ts +7 -0
- package/types/subject/page-end.d.ts +16 -0
- package/types/subject/pagination.d.ts +23 -0
- package/types/subject/runtime.d.ts +12 -0
- package/types/subject/scale.d.ts +55 -0
- package/types/subject/shared-methods.d.ts +8 -0
- package/types/subject/shared-styles.d.ts +5 -0
- package/types/subject/single.d.ts +288 -0
- package/types/subject/sort-controller.d.ts +3 -0
- package/types/subject/sortable.d.ts +19 -0
- package/types/subject/sorting-card.d.ts +2 -0
- package/types/subject/text-fill.d.ts +88 -0
- package/types/subject/title-prefix.d.ts +2 -0
- package/types/subject/types.d.ts +12 -0
- package/types/tsconfig.tsbuildinfo +1 -1
- package/es/_virtual/_plugin-vue_export-helper.mjs +0 -2
- package/es/_virtual/_plugin-vue_export-helper.mjs.map +0 -1
- package/es/node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.mjs +0 -2
- package/es/node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.mjs.map +0 -1
- package/es/src/data-chart/src/analyze.mjs +0 -2
- package/es/src/data-chart/src/analyze.mjs.map +0 -1
- package/es/src/data-chart/src/components/area.vue.mjs +0 -2
- package/es/src/data-chart/src/components/area.vue.mjs.map +0 -1
- package/es/src/data-chart/src/components/area.vue2.mjs +0 -2
- package/es/src/data-chart/src/components/area.vue2.mjs.map +0 -1
- package/es/src/data-chart/src/components/area.vue3.mjs +0 -2
- package/es/src/data-chart/src/components/area.vue3.mjs.map +0 -1
- package/es/src/data-chart/src/components/bar.vue.mjs +0 -2
- package/es/src/data-chart/src/components/bar.vue.mjs.map +0 -1
- package/es/src/data-chart/src/components/bar.vue2.mjs +0 -2
- package/es/src/data-chart/src/components/bar.vue2.mjs.map +0 -1
- package/es/src/data-chart/src/components/bar.vue3.mjs +0 -2
- package/es/src/data-chart/src/components/bar.vue3.mjs.map +0 -1
- package/es/src/data-chart/src/components/card.vue.mjs +0 -2
- package/es/src/data-chart/src/components/card.vue.mjs.map +0 -1
- package/es/src/data-chart/src/components/card.vue2.mjs +0 -2
- package/es/src/data-chart/src/components/card.vue2.mjs.map +0 -1
- package/es/src/data-chart/src/components/card.vue3.mjs +0 -2
- package/es/src/data-chart/src/components/card.vue3.mjs.map +0 -1
- package/es/src/data-chart/src/components/data-chart-card-bg-left.svg.mjs +0 -2
- package/es/src/data-chart/src/components/data-chart-card-bg-left.svg.mjs.map +0 -1
- package/es/src/data-chart/src/components/data-chart-card-bg-right.svg.mjs +0 -2
- package/es/src/data-chart/src/components/data-chart-card-bg-right.svg.mjs.map +0 -1
- package/es/src/data-chart/src/components/empty.svg.mjs +0 -2
- package/es/src/data-chart/src/components/empty.svg.mjs.map +0 -1
- package/es/src/data-chart/src/components/empty.vue.mjs +0 -2
- package/es/src/data-chart/src/components/empty.vue.mjs.map +0 -1
- package/es/src/data-chart/src/components/empty.vue2.mjs +0 -2
- package/es/src/data-chart/src/components/empty.vue2.mjs.map +0 -1
- package/es/src/data-chart/src/components/funnel.vue.mjs +0 -2
- package/es/src/data-chart/src/components/funnel.vue.mjs.map +0 -1
- package/es/src/data-chart/src/components/funnel.vue2.mjs +0 -2
- package/es/src/data-chart/src/components/funnel.vue2.mjs.map +0 -1
- package/es/src/data-chart/src/components/funnel.vue3.mjs +0 -2
- package/es/src/data-chart/src/components/funnel.vue3.mjs.map +0 -1
- package/es/src/data-chart/src/components/line.vue.mjs +0 -2
- package/es/src/data-chart/src/components/line.vue.mjs.map +0 -1
- package/es/src/data-chart/src/components/line.vue2.mjs +0 -2
- package/es/src/data-chart/src/components/line.vue2.mjs.map +0 -1
- package/es/src/data-chart/src/components/line.vue3.mjs +0 -2
- package/es/src/data-chart/src/components/line.vue3.mjs.map +0 -1
- package/es/src/data-chart/src/components/pie.vue.mjs +0 -2
- package/es/src/data-chart/src/components/pie.vue.mjs.map +0 -1
- package/es/src/data-chart/src/components/pie.vue2.mjs +0 -2
- package/es/src/data-chart/src/components/pie.vue2.mjs.map +0 -1
- package/es/src/data-chart/src/components/pie.vue3.mjs +0 -2
- package/es/src/data-chart/src/components/pie.vue3.mjs.map +0 -1
- package/es/src/data-chart/src/components/radar.vue.mjs +0 -2
- package/es/src/data-chart/src/components/radar.vue.mjs.map +0 -1
- package/es/src/data-chart/src/components/radar.vue2.mjs +0 -2
- package/es/src/data-chart/src/components/radar.vue2.mjs.map +0 -1
- package/es/src/data-chart/src/components/radar.vue3.mjs +0 -2
- package/es/src/data-chart/src/components/radar.vue3.mjs.map +0 -1
- package/es/src/data-chart/src/components/scatter-simple.vue.mjs +0 -2
- package/es/src/data-chart/src/components/scatter-simple.vue.mjs.map +0 -1
- package/es/src/data-chart/src/components/scatter-simple.vue2.mjs +0 -2
- package/es/src/data-chart/src/components/scatter-simple.vue2.mjs.map +0 -1
- package/es/src/data-chart/src/components/scatter-simple.vue3.mjs +0 -2
- package/es/src/data-chart/src/components/scatter-simple.vue3.mjs.map +0 -1
- package/es/src/data-chart/src/components/scatter.vue.mjs +0 -2
- package/es/src/data-chart/src/components/scatter.vue.mjs.map +0 -1
- package/es/src/data-chart/src/components/scatter.vue2.mjs +0 -2
- package/es/src/data-chart/src/components/scatter.vue2.mjs.map +0 -1
- package/es/src/data-chart/src/components/scatter.vue3.mjs +0 -2
- package/es/src/data-chart/src/components/scatter.vue3.mjs.map +0 -1
- package/es/src/data-chart/src/components/table.vue.mjs +0 -2
- package/es/src/data-chart/src/components/table.vue.mjs.map +0 -1
- package/es/src/data-chart/src/components/table.vue2.mjs +0 -2
- package/es/src/data-chart/src/components/table.vue2.mjs.map +0 -1
- package/es/src/data-chart/src/data-chart.vue.mjs +0 -2
- package/es/src/data-chart/src/data-chart.vue.mjs.map +0 -1
- package/es/src/data-chart/src/data-chart.vue2.mjs +0 -2
- package/es/src/data-chart/src/data-chart.vue2.mjs.map +0 -1
- package/es/src/data-chart/src/utils/config.mjs +0 -2
- package/es/src/data-chart/src/utils/config.mjs.map +0 -1
- package/es/src/data-chart/src/utils/injectionKeys.mjs +0 -2
- package/es/src/data-chart/src/utils/injectionKeys.mjs.map +0 -1
- package/es/src/data-chart/src/utils/mapData.mjs +0 -2
- package/es/src/data-chart/src/utils/mapData.mjs.map +0 -1
- package/es/src/data-chart/src/utils/safe-eval.mjs +0 -2
- package/es/src/data-chart/src/utils/safe-eval.mjs.map +0 -1
- package/es/src/data-chart/src/utils/types.mjs +0 -2
- package/es/src/data-chart/src/utils/types.mjs.map +0 -1
- package/es/src/data-chart/src/utils/useCharts.mjs +0 -2
- package/es/src/data-chart/src/utils/useCharts.mjs.map +0 -1
- package/es/src/file-upload/src/file-upload.vue.mjs +0 -2
- package/es/src/file-upload/src/file-upload.vue.mjs.map +0 -1
- package/es/src/file-upload/src/file-upload.vue2.mjs +0 -2
- package/es/src/file-upload/src/file-upload.vue2.mjs.map +0 -1
- package/es/src/fixed-action-bar/index.mjs +0 -2
- package/es/src/fixed-action-bar/index.mjs.map +0 -1
- package/es/src/fixed-action-bar/src/fixed-action-bar.vue.mjs +0 -2
- package/es/src/fixed-action-bar/src/fixed-action-bar.vue.mjs.map +0 -1
- package/es/src/fixed-action-bar/src/fixed-action-bar.vue2.mjs +0 -2
- package/es/src/fixed-action-bar/src/fixed-action-bar.vue2.mjs.map +0 -1
- package/es/src/image-upload/src/image-upload.vue.mjs +0 -2
- package/es/src/image-upload/src/image-upload.vue.mjs.map +0 -1
- package/es/src/image-upload/src/image-upload.vue2.mjs +0 -2
- package/es/src/image-upload/src/image-upload.vue2.mjs.map +0 -1
- package/es/src/photo-crop-tool/src/composables.mjs +0 -2
- package/es/src/photo-crop-tool/src/composables.mjs.map +0 -1
- package/es/src/photo-crop-tool/src/photo-crop-tool.vue.mjs +0 -2
- package/es/src/photo-crop-tool/src/photo-crop-tool.vue.mjs.map +0 -1
- package/es/src/photo-crop-tool/src/photo-crop-tool.vue2.mjs +0 -2
- package/es/src/photo-crop-tool/src/photo-crop-tool.vue2.mjs.map +0 -1
- package/es/src/subject-action/index.mjs +0 -2
- package/es/src/subject-action/index.mjs.map +0 -1
- package/es/src/subject-action/src/subject-action.vue.mjs +0 -2
- package/es/src/subject-action/src/subject-action.vue.mjs.map +0 -1
- package/es/src/subject-action/src/subject-action.vue2.mjs +0 -2
- package/es/src/subject-action/src/subject-action.vue2.mjs.map +0 -1
- package/es/src/subject-layout/index.mjs +0 -2
- package/es/src/subject-layout/index.mjs.map +0 -1
- package/es/src/subject-layout/src/subject-layout.vue.mjs +0 -2
- package/es/src/subject-layout/src/subject-layout.vue.mjs.map +0 -1
- package/es/src/subject-layout/src/subject-layout.vue2.mjs +0 -2
- package/es/src/subject-layout/src/subject-layout.vue2.mjs.map +0 -1
- package/es/src/subject-list/index.mjs +0 -2
- package/es/src/subject-list/index.mjs.map +0 -1
- package/es/src/subject-list/src/components/SubjectPageEnd.vue.mjs +0 -2
- package/es/src/subject-list/src/components/SubjectPageEnd.vue.mjs.map +0 -1
- package/es/src/subject-list/src/components/SubjectPageEnd.vue2.mjs +0 -2
- package/es/src/subject-list/src/components/SubjectPageEnd.vue2.mjs.map +0 -1
- package/es/src/subject-list/src/components/SubjectRichText.vue.mjs +0 -2
- package/es/src/subject-list/src/components/SubjectRichText.vue.mjs.map +0 -1
- package/es/src/subject-list/src/components/SubjectRichText.vue2.mjs +0 -2
- package/es/src/subject-list/src/components/SubjectRichText.vue2.mjs.map +0 -1
- package/es/src/subject-list/src/components/subject-blank-fill.vue.mjs +0 -2
- package/es/src/subject-list/src/components/subject-blank-fill.vue.mjs.map +0 -1
- package/es/src/subject-list/src/components/subject-blank-fill.vue2.mjs +0 -2
- package/es/src/subject-list/src/components/subject-blank-fill.vue2.mjs.map +0 -1
- package/es/src/subject-list/src/components/subject-scale.vue.mjs +0 -2
- package/es/src/subject-list/src/components/subject-scale.vue.mjs.map +0 -1
- package/es/src/subject-list/src/components/subject-scale.vue2.mjs +0 -2
- package/es/src/subject-list/src/components/subject-scale.vue2.mjs.map +0 -1
- package/es/src/subject-list/src/components/subject-single.vue.mjs +0 -2
- package/es/src/subject-list/src/components/subject-single.vue.mjs.map +0 -1
- package/es/src/subject-list/src/components/subject-single.vue2.mjs +0 -2
- package/es/src/subject-list/src/components/subject-single.vue2.mjs.map +0 -1
- package/es/src/subject-list/src/components/subject-text-fill.vue.mjs +0 -2
- package/es/src/subject-list/src/components/subject-text-fill.vue.mjs.map +0 -1
- package/es/src/subject-list/src/components/subject-text-fill.vue2.mjs +0 -2
- package/es/src/subject-list/src/components/subject-text-fill.vue2.mjs.map +0 -1
- package/es/src/subject-list/src/subject-list.vue.mjs +0 -2
- package/es/src/subject-list/src/subject-list.vue.mjs.map +0 -1
- package/es/src/subject-list/src/subject-list.vue2.mjs +0 -2
- package/es/src/subject-list/src/subject-list.vue2.mjs.map +0 -1
- package/es/src/subject-type/index.mjs +0 -2
- package/es/src/subject-type/index.mjs.map +0 -1
- package/es/src/subject-type/src/subject-type.vue.mjs +0 -2
- package/es/src/subject-type/src/subject-type.vue.mjs.map +0 -1
- package/es/src/subject-type/src/subject-type.vue2.mjs +0 -2
- package/es/src/subject-type/src/subject-type.vue2.mjs.map +0 -1
- package/lib/_virtual/_plugin-vue_export-helper.cjs +0 -2
- package/lib/_virtual/_plugin-vue_export-helper.cjs.map +0 -1
- package/lib/node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.cjs +0 -2
- package/lib/node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.cjs.map +0 -1
- package/lib/src/data-chart/src/analyze.cjs +0 -2
- package/lib/src/data-chart/src/analyze.cjs.map +0 -1
- package/lib/src/data-chart/src/components/area.vue.cjs +0 -2
- package/lib/src/data-chart/src/components/area.vue.cjs.map +0 -1
- package/lib/src/data-chart/src/components/area.vue2.cjs +0 -2
- package/lib/src/data-chart/src/components/area.vue2.cjs.map +0 -1
- package/lib/src/data-chart/src/components/area.vue3.cjs +0 -2
- package/lib/src/data-chart/src/components/area.vue3.cjs.map +0 -1
- package/lib/src/data-chart/src/components/bar.vue.cjs +0 -2
- package/lib/src/data-chart/src/components/bar.vue.cjs.map +0 -1
- package/lib/src/data-chart/src/components/bar.vue2.cjs +0 -2
- package/lib/src/data-chart/src/components/bar.vue2.cjs.map +0 -1
- package/lib/src/data-chart/src/components/bar.vue3.cjs +0 -2
- package/lib/src/data-chart/src/components/bar.vue3.cjs.map +0 -1
- package/lib/src/data-chart/src/components/card.vue.cjs +0 -2
- package/lib/src/data-chart/src/components/card.vue.cjs.map +0 -1
- package/lib/src/data-chart/src/components/card.vue2.cjs +0 -2
- package/lib/src/data-chart/src/components/card.vue2.cjs.map +0 -1
- package/lib/src/data-chart/src/components/card.vue3.cjs +0 -2
- package/lib/src/data-chart/src/components/card.vue3.cjs.map +0 -1
- package/lib/src/data-chart/src/components/data-chart-card-bg-left.svg.cjs +0 -2
- package/lib/src/data-chart/src/components/data-chart-card-bg-left.svg.cjs.map +0 -1
- package/lib/src/data-chart/src/components/data-chart-card-bg-right.svg.cjs +0 -2
- package/lib/src/data-chart/src/components/data-chart-card-bg-right.svg.cjs.map +0 -1
- package/lib/src/data-chart/src/components/empty.svg.cjs +0 -2
- package/lib/src/data-chart/src/components/empty.svg.cjs.map +0 -1
- package/lib/src/data-chart/src/components/empty.vue.cjs +0 -2
- package/lib/src/data-chart/src/components/empty.vue.cjs.map +0 -1
- package/lib/src/data-chart/src/components/empty.vue2.cjs +0 -2
- package/lib/src/data-chart/src/components/empty.vue2.cjs.map +0 -1
- package/lib/src/data-chart/src/components/funnel.vue.cjs +0 -2
- package/lib/src/data-chart/src/components/funnel.vue.cjs.map +0 -1
- package/lib/src/data-chart/src/components/funnel.vue2.cjs +0 -2
- package/lib/src/data-chart/src/components/funnel.vue2.cjs.map +0 -1
- package/lib/src/data-chart/src/components/funnel.vue3.cjs +0 -2
- package/lib/src/data-chart/src/components/funnel.vue3.cjs.map +0 -1
- package/lib/src/data-chart/src/components/line.vue.cjs +0 -2
- package/lib/src/data-chart/src/components/line.vue.cjs.map +0 -1
- package/lib/src/data-chart/src/components/line.vue2.cjs +0 -2
- package/lib/src/data-chart/src/components/line.vue2.cjs.map +0 -1
- package/lib/src/data-chart/src/components/line.vue3.cjs +0 -2
- package/lib/src/data-chart/src/components/line.vue3.cjs.map +0 -1
- package/lib/src/data-chart/src/components/pie.vue.cjs +0 -2
- package/lib/src/data-chart/src/components/pie.vue.cjs.map +0 -1
- package/lib/src/data-chart/src/components/pie.vue2.cjs +0 -2
- package/lib/src/data-chart/src/components/pie.vue2.cjs.map +0 -1
- package/lib/src/data-chart/src/components/pie.vue3.cjs +0 -2
- package/lib/src/data-chart/src/components/pie.vue3.cjs.map +0 -1
- package/lib/src/data-chart/src/components/radar.vue.cjs +0 -2
- package/lib/src/data-chart/src/components/radar.vue.cjs.map +0 -1
- package/lib/src/data-chart/src/components/radar.vue2.cjs +0 -2
- package/lib/src/data-chart/src/components/radar.vue2.cjs.map +0 -1
- package/lib/src/data-chart/src/components/radar.vue3.cjs +0 -2
- package/lib/src/data-chart/src/components/radar.vue3.cjs.map +0 -1
- package/lib/src/data-chart/src/components/scatter-simple.vue.cjs +0 -2
- package/lib/src/data-chart/src/components/scatter-simple.vue.cjs.map +0 -1
- package/lib/src/data-chart/src/components/scatter-simple.vue2.cjs +0 -2
- package/lib/src/data-chart/src/components/scatter-simple.vue2.cjs.map +0 -1
- package/lib/src/data-chart/src/components/scatter-simple.vue3.cjs +0 -2
- package/lib/src/data-chart/src/components/scatter-simple.vue3.cjs.map +0 -1
- package/lib/src/data-chart/src/components/scatter.vue.cjs +0 -2
- package/lib/src/data-chart/src/components/scatter.vue.cjs.map +0 -1
- package/lib/src/data-chart/src/components/scatter.vue2.cjs +0 -2
- package/lib/src/data-chart/src/components/scatter.vue2.cjs.map +0 -1
- package/lib/src/data-chart/src/components/scatter.vue3.cjs +0 -2
- package/lib/src/data-chart/src/components/scatter.vue3.cjs.map +0 -1
- package/lib/src/data-chart/src/components/table.vue.cjs +0 -2
- package/lib/src/data-chart/src/components/table.vue.cjs.map +0 -1
- package/lib/src/data-chart/src/components/table.vue2.cjs +0 -2
- package/lib/src/data-chart/src/components/table.vue2.cjs.map +0 -1
- package/lib/src/data-chart/src/data-chart.vue.cjs +0 -2
- package/lib/src/data-chart/src/data-chart.vue.cjs.map +0 -1
- package/lib/src/data-chart/src/data-chart.vue2.cjs +0 -2
- package/lib/src/data-chart/src/data-chart.vue2.cjs.map +0 -1
- package/lib/src/data-chart/src/utils/config.cjs +0 -2
- package/lib/src/data-chart/src/utils/config.cjs.map +0 -1
- package/lib/src/data-chart/src/utils/injectionKeys.cjs +0 -2
- package/lib/src/data-chart/src/utils/injectionKeys.cjs.map +0 -1
- package/lib/src/data-chart/src/utils/mapData.cjs +0 -2
- package/lib/src/data-chart/src/utils/mapData.cjs.map +0 -1
- package/lib/src/data-chart/src/utils/safe-eval.cjs +0 -2
- package/lib/src/data-chart/src/utils/safe-eval.cjs.map +0 -1
- package/lib/src/data-chart/src/utils/types.cjs +0 -2
- package/lib/src/data-chart/src/utils/types.cjs.map +0 -1
- package/lib/src/data-chart/src/utils/useCharts.cjs +0 -2
- package/lib/src/data-chart/src/utils/useCharts.cjs.map +0 -1
- package/lib/src/file-upload/src/file-upload.vue.cjs +0 -2
- package/lib/src/file-upload/src/file-upload.vue.cjs.map +0 -1
- package/lib/src/file-upload/src/file-upload.vue2.cjs +0 -2
- package/lib/src/file-upload/src/file-upload.vue2.cjs.map +0 -1
- package/lib/src/fixed-action-bar/index.cjs +0 -2
- package/lib/src/fixed-action-bar/index.cjs.map +0 -1
- package/lib/src/fixed-action-bar/src/fixed-action-bar.vue.cjs +0 -2
- package/lib/src/fixed-action-bar/src/fixed-action-bar.vue.cjs.map +0 -1
- package/lib/src/fixed-action-bar/src/fixed-action-bar.vue2.cjs +0 -2
- package/lib/src/fixed-action-bar/src/fixed-action-bar.vue2.cjs.map +0 -1
- package/lib/src/image-upload/src/image-upload.vue.cjs +0 -2
- package/lib/src/image-upload/src/image-upload.vue.cjs.map +0 -1
- package/lib/src/image-upload/src/image-upload.vue2.cjs +0 -2
- package/lib/src/image-upload/src/image-upload.vue2.cjs.map +0 -1
- package/lib/src/photo-crop-tool/src/composables.cjs +0 -2
- package/lib/src/photo-crop-tool/src/composables.cjs.map +0 -1
- package/lib/src/photo-crop-tool/src/photo-crop-tool.vue.cjs +0 -2
- package/lib/src/photo-crop-tool/src/photo-crop-tool.vue.cjs.map +0 -1
- package/lib/src/photo-crop-tool/src/photo-crop-tool.vue2.cjs +0 -2
- package/lib/src/photo-crop-tool/src/photo-crop-tool.vue2.cjs.map +0 -1
- package/lib/src/subject-action/index.cjs +0 -2
- package/lib/src/subject-action/index.cjs.map +0 -1
- package/lib/src/subject-action/src/subject-action.vue.cjs +0 -2
- package/lib/src/subject-action/src/subject-action.vue.cjs.map +0 -1
- package/lib/src/subject-action/src/subject-action.vue2.cjs +0 -2
- package/lib/src/subject-action/src/subject-action.vue2.cjs.map +0 -1
- package/lib/src/subject-layout/index.cjs +0 -2
- package/lib/src/subject-layout/index.cjs.map +0 -1
- package/lib/src/subject-layout/src/subject-layout.vue.cjs +0 -2
- package/lib/src/subject-layout/src/subject-layout.vue.cjs.map +0 -1
- package/lib/src/subject-layout/src/subject-layout.vue2.cjs +0 -2
- package/lib/src/subject-layout/src/subject-layout.vue2.cjs.map +0 -1
- package/lib/src/subject-list/index.cjs +0 -2
- package/lib/src/subject-list/index.cjs.map +0 -1
- package/lib/src/subject-list/src/components/SubjectPageEnd.vue.cjs +0 -2
- package/lib/src/subject-list/src/components/SubjectPageEnd.vue.cjs.map +0 -1
- package/lib/src/subject-list/src/components/SubjectPageEnd.vue2.cjs +0 -2
- package/lib/src/subject-list/src/components/SubjectPageEnd.vue2.cjs.map +0 -1
- package/lib/src/subject-list/src/components/SubjectRichText.vue.cjs +0 -2
- package/lib/src/subject-list/src/components/SubjectRichText.vue.cjs.map +0 -1
- package/lib/src/subject-list/src/components/SubjectRichText.vue2.cjs +0 -2
- package/lib/src/subject-list/src/components/SubjectRichText.vue2.cjs.map +0 -1
- package/lib/src/subject-list/src/components/subject-blank-fill.vue.cjs +0 -2
- package/lib/src/subject-list/src/components/subject-blank-fill.vue.cjs.map +0 -1
- package/lib/src/subject-list/src/components/subject-blank-fill.vue2.cjs +0 -2
- package/lib/src/subject-list/src/components/subject-blank-fill.vue2.cjs.map +0 -1
- package/lib/src/subject-list/src/components/subject-scale.vue.cjs +0 -2
- package/lib/src/subject-list/src/components/subject-scale.vue.cjs.map +0 -1
- package/lib/src/subject-list/src/components/subject-scale.vue2.cjs +0 -2
- package/lib/src/subject-list/src/components/subject-scale.vue2.cjs.map +0 -1
- package/lib/src/subject-list/src/components/subject-single.vue.cjs +0 -2
- package/lib/src/subject-list/src/components/subject-single.vue.cjs.map +0 -1
- package/lib/src/subject-list/src/components/subject-single.vue2.cjs +0 -2
- package/lib/src/subject-list/src/components/subject-single.vue2.cjs.map +0 -1
- package/lib/src/subject-list/src/components/subject-text-fill.vue.cjs +0 -2
- package/lib/src/subject-list/src/components/subject-text-fill.vue.cjs.map +0 -1
- package/lib/src/subject-list/src/components/subject-text-fill.vue2.cjs +0 -2
- package/lib/src/subject-list/src/components/subject-text-fill.vue2.cjs.map +0 -1
- package/lib/src/subject-list/src/subject-list.vue.cjs +0 -2
- package/lib/src/subject-list/src/subject-list.vue.cjs.map +0 -1
- package/lib/src/subject-list/src/subject-list.vue2.cjs +0 -2
- package/lib/src/subject-list/src/subject-list.vue2.cjs.map +0 -1
- package/lib/src/subject-type/index.cjs +0 -2
- package/lib/src/subject-type/index.cjs.map +0 -1
- package/lib/src/subject-type/src/subject-type.vue.cjs +0 -2
- package/lib/src/subject-type/src/subject-type.vue.cjs.map +0 -1
- package/lib/src/subject-type/src/subject-type.vue2.cjs +0 -2
- package/lib/src/subject-type/src/subject-type.vue2.cjs.map +0 -1
- package/theme-chalk/index.css +0 -1
- package/theme-chalk/index.scss +0 -17
- package/theme-chalk/src/base.css +0 -1
- package/theme-chalk/src/base.scss +0 -16
- package/theme-chalk/src/common/element-plus-deps.css +0 -1
- package/theme-chalk/src/common/element-plus-deps.scss +0 -40
- package/theme-chalk/src/common/element-plus.css +0 -1
- package/theme-chalk/src/common/element-plus.scss +0 -606
- package/theme-chalk/src/data-chart/empty.css +0 -1
- package/theme-chalk/src/data-chart/empty.scss +0 -24
- package/theme-chalk/src/data-chart/index.css +0 -1
- package/theme-chalk/src/data-chart/index.scss +0 -11
- package/theme-chalk/src/data-chart/table.css +0 -1
- package/theme-chalk/src/data-chart/table.scss +0 -43
- package/theme-chalk/src/file-upload.css +0 -1
- package/theme-chalk/src/file-upload.scss +0 -34
- package/theme-chalk/src/fixed-action-bar.css +0 -1
- package/theme-chalk/src/fixed-action-bar.scss +0 -18
- package/theme-chalk/src/icon.css +0 -1
- package/theme-chalk/src/icon.scss +0 -35
- package/theme-chalk/src/image-upload.css +0 -1
- package/theme-chalk/src/image-upload.scss +0 -157
- package/theme-chalk/src/mixins/_var.css +0 -0
- package/theme-chalk/src/mixins/_var.scss +0 -24
- package/theme-chalk/src/mixins/config.css +0 -0
- package/theme-chalk/src/mixins/config.scss +0 -12
- package/theme-chalk/src/mixins/function.css +0 -0
- package/theme-chalk/src/mixins/function.scss +0 -95
- package/theme-chalk/src/mixins/mixins.css +0 -0
- package/theme-chalk/src/mixins/mixins.scss +0 -102
- package/theme-chalk/src/normalize.css +0 -1
- package/theme-chalk/src/normalize.scss +0 -11
- package/theme-chalk/src/photo-crop-tool.css +0 -1
- package/theme-chalk/src/photo-crop-tool.scss +0 -98
- package/theme-chalk/src/subject-action.css +0 -1
- package/theme-chalk/src/subject-action.scss +0 -37
- package/theme-chalk/src/subject-layout.css +0 -1
- package/theme-chalk/src/subject-layout.scss +0 -28
- package/theme-chalk/src/subject-list.css +0 -1
- package/theme-chalk/src/subject-list.scss +0 -290
- package/theme-chalk/src/subject-template.css +0 -1
- package/theme-chalk/src/subject-template.scss +0 -5
- package/theme-chalk/src/subject-type.css +0 -1
- package/theme-chalk/src/subject-type.scss +0 -32
- package/theme-chalk/src/tiny-mce-editor.css +0 -1
- package/theme-chalk/src/tiny-mce-editor.scss +0 -29
- package/types/src/data-chart/src/analyze.d.ts +0 -23
- package/types/src/data-chart/src/analyze.d.ts.map +0 -1
- package/types/src/data-chart/src/components/area.vue.d.ts +0 -12
- package/types/src/data-chart/src/components/area.vue.d.ts.map +0 -1
- package/types/src/data-chart/src/components/bar.vue.d.ts +0 -12
- package/types/src/data-chart/src/components/bar.vue.d.ts.map +0 -1
- package/types/src/data-chart/src/components/card.vue.d.ts +0 -27
- package/types/src/data-chart/src/components/card.vue.d.ts.map +0 -1
- package/types/src/data-chart/src/components/empty.vue.d.ts +0 -11
- package/types/src/data-chart/src/components/empty.vue.d.ts.map +0 -1
- package/types/src/data-chart/src/components/funnel.vue.d.ts +0 -11
- package/types/src/data-chart/src/components/funnel.vue.d.ts.map +0 -1
- package/types/src/data-chart/src/components/line.vue.d.ts +0 -12
- package/types/src/data-chart/src/components/line.vue.d.ts.map +0 -1
- package/types/src/data-chart/src/components/pie.vue.d.ts +0 -12
- package/types/src/data-chart/src/components/pie.vue.d.ts.map +0 -1
- package/types/src/data-chart/src/components/radar.vue.d.ts +0 -11
- package/types/src/data-chart/src/components/radar.vue.d.ts.map +0 -1
- package/types/src/data-chart/src/components/scatter-simple.vue.d.ts +0 -11
- package/types/src/data-chart/src/components/scatter-simple.vue.d.ts.map +0 -1
- package/types/src/data-chart/src/components/scatter.vue.d.ts +0 -11
- package/types/src/data-chart/src/components/scatter.vue.d.ts.map +0 -1
- package/types/src/data-chart/src/components/table.vue.d.ts +0 -27
- package/types/src/data-chart/src/components/table.vue.d.ts.map +0 -1
- package/types/src/data-chart/src/data-chart.vue.d.ts +0 -28
- package/types/src/data-chart/src/data-chart.vue.d.ts.map +0 -1
- package/types/src/data-chart/src/utils/config.d.ts +0 -41
- package/types/src/data-chart/src/utils/config.d.ts.map +0 -1
- package/types/src/data-chart/src/utils/injectionKeys.d.ts +0 -3
- package/types/src/data-chart/src/utils/injectionKeys.d.ts.map +0 -1
- package/types/src/data-chart/src/utils/mapData.d.ts +0 -64
- package/types/src/data-chart/src/utils/mapData.d.ts.map +0 -1
- package/types/src/data-chart/src/utils/safe-eval.d.ts +0 -9
- package/types/src/data-chart/src/utils/safe-eval.d.ts.map +0 -1
- package/types/src/data-chart/src/utils/types.d.ts +0 -72
- package/types/src/data-chart/src/utils/types.d.ts.map +0 -1
- package/types/src/data-chart/src/utils/useCharts.d.ts +0 -16
- package/types/src/data-chart/src/utils/useCharts.d.ts.map +0 -1
- package/types/src/file-upload/src/file-upload.vue.d.ts +0 -20
- package/types/src/file-upload/src/file-upload.vue.d.ts.map +0 -1
- package/types/src/fixed-action-bar/index.d.ts +0 -56
- package/types/src/fixed-action-bar/index.d.ts.map +0 -1
- package/types/src/fixed-action-bar/src/fixed-action-bar.vue.d.ts +0 -31
- package/types/src/fixed-action-bar/src/fixed-action-bar.vue.d.ts.map +0 -1
- package/types/src/image-upload/src/image-upload.vue.d.ts +0 -59
- package/types/src/image-upload/src/image-upload.vue.d.ts.map +0 -1
- package/types/src/photo-crop-tool/src/composables.d.ts +0 -7
- package/types/src/photo-crop-tool/src/composables.d.ts.map +0 -1
- package/types/src/photo-crop-tool/src/photo-crop-tool.vue.d.ts +0 -65
- package/types/src/photo-crop-tool/src/photo-crop-tool.vue.d.ts.map +0 -1
- package/types/src/subject-list/src/components/SubjectRichText.vue.d.ts +0 -25
- package/types/src/subject-list/src/components/SubjectRichText.vue.d.ts.map +0 -1
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
import{html as e,css as t,LitElement as i,nothing as s}from"lit";import{property as r,state as o,query as a}from"lit/decorators.js";import{repeat as l}from"lit/directives/repeat.js";import{styleMap as n}from"lit/directives/style-map.js";import{safeCustomElement as d}from"./base/define.mjs";var p=Object.defineProperty,h=Object.getOwnPropertyDescriptor,c=(e,t,i,s)=>{for(var r,o=s>1?void 0:s?h(t,i):t,a=e.length-1;a>=0;a--)(r=e[a])&&(o=(s?r(t,i,o):r(o))||o);return s&&o&&p(t,i,o),o};const u=e`
|
|
2
|
+
<svg viewBox="0 0 24 24" aria-hidden="true">
|
|
3
|
+
<path
|
|
4
|
+
d="M1.5 12s3.5-6 10.5-6 10.5 6 10.5 6-3.5 6-10.5 6S1.5 12 1.5 12Z"
|
|
5
|
+
fill="none"
|
|
6
|
+
stroke="currentColor"
|
|
7
|
+
stroke-linecap="round"
|
|
8
|
+
stroke-linejoin="round"
|
|
9
|
+
stroke-width="1.8"
|
|
10
|
+
/>
|
|
11
|
+
<circle
|
|
12
|
+
cx="12"
|
|
13
|
+
cy="12"
|
|
14
|
+
r="3.2"
|
|
15
|
+
fill="none"
|
|
16
|
+
stroke="currentColor"
|
|
17
|
+
stroke-width="1.8"
|
|
18
|
+
/>
|
|
19
|
+
</svg>
|
|
20
|
+
`,g=e`
|
|
21
|
+
<svg viewBox="0 0 24 24" aria-hidden="true">
|
|
22
|
+
<path
|
|
23
|
+
d="M7 7l10 10M17 7L7 17"
|
|
24
|
+
fill="none"
|
|
25
|
+
stroke="currentColor"
|
|
26
|
+
stroke-linecap="round"
|
|
27
|
+
stroke-width="1.9"
|
|
28
|
+
/>
|
|
29
|
+
</svg>
|
|
30
|
+
`;let v=class extends i{constructor(){super(...arguments),this.action="",this.name="file",this.size=20,this.width=160,this.height=90,this.accept="image/jpeg,image/jpg,image/png,image/gif",this.placeholder="上传图片",this.notip=!1,this.tipText="",this.disabled=!1,this.limit=1,this.fileList=[],this._internalFiles=[],this._viewerVisible=!1,this._viewerIndex=0,this._message="",this._messageType="",this._hasScrollLock=!1,this._pendingRequests=new Map}connectedCallback(){super.connectedCallback(),this._syncFileList()}disconnectedCallback(){this._syncScrollLock(!1),super.disconnectedCallback(),this._pendingRequests.forEach(e=>e.abort()),this._pendingRequests.clear(),this._internalFiles.forEach(e=>this._revokeFileUrl(e))}updated(e){e.has("fileList")&&this._syncFileList(),e.has("_viewerVisible")&&this._syncScrollLock(this._viewerVisible)}get _exts(){return this.accept.split(",").map(e=>e.split("/").pop()?.toLowerCase()??"").filter(Boolean)}get _tipMessage(){if(this.tipText)return this.tipText;return`支持 ${this._exts.join(" / ")} 格式,大小不超过 ${this.size}MB`+(this.width&&this.height?`,建议尺寸 ${this.width}×${this.height}`:"")}_syncFileList(){this._internalFiles=[...this.fileList]}_setMessage(e,t){this._messageType=e,this._message=t}_clearMessage(){this._messageType="",this._message=""}_revokeFileUrl(e){e.url?.startsWith("blob:")&&URL.revokeObjectURL(e.url)}_emitFileListChange(){const e={fileList:this._internalFiles.slice()};this.dispatchEvent(new CustomEvent("file-list-change",{detail:e,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("update:fileList",{detail:e,bubbles:!0,composed:!0}))}_emitSuccess(e){this.dispatchEvent(new CustomEvent("upload-success",{detail:e,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("success",{detail:e,bubbles:!0,composed:!0}))}_getFileKey(e){return String(e.uid??e.name)}_updateFileByKey(e,t){let i=!1;return this._internalFiles=this._internalFiles.map(s=>this._getFileKey(s)!==e?s:(i=!0,t(s))),i}_emitRemove(e){this.dispatchEvent(new CustomEvent("remove",{detail:{file:e},bubbles:!0,composed:!0}))}_validateFile(e){const t=e.name.split(".").pop()?.toLowerCase()??"";if(!this._exts.some(e=>e===t))return this._setMessage("error",`仅支持上传 ${this._exts.join(" / ")} 格式的图片`),!1;return!(e.size/1024/1024>this.size)||(this._setMessage("error",`图片大小不能超过 ${this.size}MB`),!1)}_handleSelectedFiles(e){if(this.disabled||!e.length)return;this._clearMessage();const t=e.filter(e=>this._validateFile(e));t.length&&(this.action?this._internalFiles.length+t.length>this.limit?this._setMessage("warning",`最多上传 ${this.limit} 张图片`):t.forEach(e=>{const t={uid:Date.now()+Math.random(),name:e.name,size:e.size,status:"uploading",progress:0,url:URL.createObjectURL(e),file:e};this._internalFiles=[...this._internalFiles,t],this._emitFileListChange(),this._uploadFile(e,t)}):this._setMessage("warning","请先配置上传地址 action"))}_handleInputChange(e){const t=e.target,i=t.files;i&&(this._handleSelectedFiles(Array.from(i)),t.value="")}_uploadFile(e,t){const i=new FormData;i.append(this.name,e),this.data&&Object.entries(this.data).forEach(e=>{let[t,s]=e;i.append(t,s)});const s=new XMLHttpRequest,r=this._getFileKey(t);s.open("POST",this.action),this._pendingRequests.set(r,s),this.headers&&Object.entries(this.headers).forEach(e=>{let[t,i]=e;s.setRequestHeader(t,i)}),s.upload.onprogress=e=>{if(e.lengthComputable){const t=Math.floor(e.loaded/e.total*100);this._updateFileByKey(r,e=>({...e,progress:t}))}},s.onload=()=>{if(this._pendingRequests.get(r)===s)if(this._pendingRequests.delete(r),s.status>=200&&s.status<300){const e=function(e){try{return JSON.parse(e)}catch{return e}}(s.responseText);if(!this._updateFileByKey(r,e=>({...e,status:"success",progress:100})))return;this._emitFileListChange();const t=this._internalFiles.find(e=>this._getFileKey(e)===r);if(!t)return;this._emitSuccess({response:e,file:{...t},files:this._internalFiles.slice()})}else this._updateFileByKey(r,e=>({...e,status:"fail",progress:0})),this._setMessage("error","上传失败")},s.onerror=()=>{this._pendingRequests.get(r)===s&&(this._pendingRequests.delete(r),this._updateFileByKey(r,e=>({...e,status:"fail",progress:0})),this._setMessage("error","上传失败"))},s.onabort=()=>{this._pendingRequests.get(r)===s&&this._pendingRequests.delete(r)},s.send(i)}_handlePreview(e){this._viewerIndex=e,this._viewerVisible=!0}_closeViewer(){this._viewerVisible=!1}_prevImage(){this._viewerIndex=(this._viewerIndex-1+this._internalFiles.length)%this._internalFiles.length}_nextImage(){this._viewerIndex=(this._viewerIndex+1)%this._internalFiles.length}_handleRemove(e){if(this.disabled)return;const t=this._internalFiles[e];if(!t)return;const i=this._getFileKey(t),s=this._pendingRequests.get(i);s&&(this._pendingRequests.delete(i),s.abort()),this._revokeFileUrl(t),this._internalFiles=this._internalFiles.filter((t,i)=>i!==e),this._emitFileListChange(),this._emitRemove(t),this._viewerIndex>=this._internalFiles.length&&(this._viewerIndex=Math.max(0,this._internalFiles.length-1)),this._internalFiles.length||(this._viewerVisible=!1)}_syncScrollLock(e){if("undefined"==typeof document)return;const t=document.documentElement,i=document.body;if(e){if(this._hasScrollLock)return;return 0===v._scrollLockCount&&(v._previousHtmlOverflow=t.style.overflow,v._previousBodyOverflow=i.style.overflow,t.style.overflow="hidden",i.style.overflow="hidden"),v._scrollLockCount+=1,void(this._hasScrollLock=!0)}this._hasScrollLock&&(v._scrollLockCount=Math.max(0,v._scrollLockCount-1),this._hasScrollLock=!1,0===v._scrollLockCount&&(t.style.overflow=v._previousHtmlOverflow,i.style.overflow=v._previousBodyOverflow,v._previousHtmlOverflow="",v._previousBodyOverflow=""))}render(){const t={"--upload-width":`${this.width}px`,"--upload-height":`${this.height}px`},i=this._internalFiles[this._viewerIndex];return e`
|
|
31
|
+
<div class="upload" style=${n(t)} part="container">
|
|
32
|
+
<div class="list" part="list">
|
|
33
|
+
${l(this._internalFiles,e=>String(e.uid??e.name),(t,i)=>e`
|
|
34
|
+
<div class="item" part="item">
|
|
35
|
+
${t.url?e`<img src=${t.url} alt=${t.name} part="image">`:e`<div class="placeholder" part="placeholder">无图片</div>`}
|
|
36
|
+
|
|
37
|
+
${"uploading"===t.status?e`
|
|
38
|
+
<div class="progress" part="progress">
|
|
39
|
+
<div class="progress-bar" style=${n({width:`${t.progress??0}%`})}></div>
|
|
40
|
+
</div>
|
|
41
|
+
`:s}
|
|
42
|
+
|
|
43
|
+
<div class="actions" part="actions">
|
|
44
|
+
${t.url?e`
|
|
45
|
+
<button
|
|
46
|
+
class="action"
|
|
47
|
+
data-action="preview"
|
|
48
|
+
type="button"
|
|
49
|
+
aria-label="预览图片"
|
|
50
|
+
@click=${()=>this._handlePreview(i)}
|
|
51
|
+
>
|
|
52
|
+
${u}
|
|
53
|
+
</button>
|
|
54
|
+
`:s}
|
|
55
|
+
<button
|
|
56
|
+
class="action ${this.disabled?"is-disabled":""}"
|
|
57
|
+
data-action="remove"
|
|
58
|
+
type="button"
|
|
59
|
+
aria-label="删除图片"
|
|
60
|
+
@click=${()=>this._handleRemove(i)}
|
|
61
|
+
>
|
|
62
|
+
${g}
|
|
63
|
+
</button>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
`)}
|
|
67
|
+
|
|
68
|
+
${this._internalFiles.length<this.limit?e`
|
|
69
|
+
<label class="add ${this.disabled?"is-disabled":""}" part="add">
|
|
70
|
+
<input
|
|
71
|
+
type="file"
|
|
72
|
+
accept=${this.accept}
|
|
73
|
+
?multiple=${this.limit>1}
|
|
74
|
+
?disabled=${this.disabled}
|
|
75
|
+
@change=${this._handleInputChange}
|
|
76
|
+
>
|
|
77
|
+
<div class="add-content" part="add-content">
|
|
78
|
+
<div class="add-icon">+</div>
|
|
79
|
+
<div>${this.placeholder}</div>
|
|
80
|
+
</div>
|
|
81
|
+
</label>
|
|
82
|
+
`:s}
|
|
83
|
+
</div>
|
|
84
|
+
|
|
85
|
+
${this._message?e`<div class="message ${this._messageType}" part="message">${this._message}</div>`:s}
|
|
86
|
+
|
|
87
|
+
${this.notip?s:e`
|
|
88
|
+
<div class="tip" part="tip">
|
|
89
|
+
<slot name="tip">${this._tipMessage}</slot>
|
|
90
|
+
</div>
|
|
91
|
+
`}
|
|
92
|
+
|
|
93
|
+
${this._viewerVisible&&i?.url?e`
|
|
94
|
+
<div class="viewer" part="viewer">
|
|
95
|
+
<div class="viewer-mask" @click=${this._closeViewer}></div>
|
|
96
|
+
<button class="viewer-close" type="button" @click=${this._closeViewer}>×</button>
|
|
97
|
+
${this._internalFiles.length>1?e`
|
|
98
|
+
<button class="viewer-nav prev" type="button" @click=${this._prevImage}>‹</button>
|
|
99
|
+
<button class="viewer-nav next" type="button" @click=${this._nextImage}>›</button>
|
|
100
|
+
`:s}
|
|
101
|
+
<div class="viewer-inner">
|
|
102
|
+
<img src=${i.url} alt=${i.name}>
|
|
103
|
+
</div>
|
|
104
|
+
</div>
|
|
105
|
+
`:s}
|
|
106
|
+
</div>
|
|
107
|
+
`}};v._scrollLockCount=0,v._previousHtmlOverflow="",v._previousBodyOverflow="",v.styles=t`
|
|
108
|
+
:host {
|
|
109
|
+
display: block;
|
|
110
|
+
--upload-width: 160px;
|
|
111
|
+
--upload-height: 90px;
|
|
112
|
+
color: #0f172a;
|
|
113
|
+
font-size: 14px;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.upload {
|
|
117
|
+
display: grid;
|
|
118
|
+
gap: 10px;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.list {
|
|
122
|
+
display: flex;
|
|
123
|
+
flex-wrap: wrap;
|
|
124
|
+
gap: 10px;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.item,
|
|
128
|
+
.add {
|
|
129
|
+
position: relative;
|
|
130
|
+
width: var(--upload-width);
|
|
131
|
+
height: var(--upload-height);
|
|
132
|
+
overflow: hidden;
|
|
133
|
+
border: 1px dashed #cbd5e1;
|
|
134
|
+
border-radius: 14px;
|
|
135
|
+
background: #f8fafc;
|
|
136
|
+
transition: border-color 0.2s ease;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.item:hover {
|
|
140
|
+
border-color: #3d61e3;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.add:hover {
|
|
144
|
+
border-color: #94a3b8;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.add {
|
|
148
|
+
display: grid;
|
|
149
|
+
place-items: center;
|
|
150
|
+
cursor: pointer;
|
|
151
|
+
background: #f8fafc;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.add.is-disabled {
|
|
155
|
+
cursor: not-allowed;
|
|
156
|
+
opacity: 0.6;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.add input {
|
|
160
|
+
display: none;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.add-content {
|
|
164
|
+
display: grid;
|
|
165
|
+
gap: 8px;
|
|
166
|
+
place-items: center;
|
|
167
|
+
color: #64748b;
|
|
168
|
+
text-align: center;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.add-icon {
|
|
172
|
+
font-size: 28px;
|
|
173
|
+
line-height: 1;
|
|
174
|
+
color: #3d61e3;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.item img,
|
|
178
|
+
.viewer img {
|
|
179
|
+
width: 100%;
|
|
180
|
+
height: 100%;
|
|
181
|
+
object-fit: cover;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.item img {
|
|
185
|
+
transition: none;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.placeholder {
|
|
189
|
+
display: grid;
|
|
190
|
+
place-items: center;
|
|
191
|
+
width: 100%;
|
|
192
|
+
height: 100%;
|
|
193
|
+
color: #94a3b8;
|
|
194
|
+
background: #f8fafc;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.progress {
|
|
198
|
+
position: absolute;
|
|
199
|
+
right: 0;
|
|
200
|
+
bottom: 0;
|
|
201
|
+
left: 0;
|
|
202
|
+
height: 4px;
|
|
203
|
+
background: rgb(15 23 42 / 12%);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.progress-bar {
|
|
207
|
+
height: 100%;
|
|
208
|
+
background: #3d61e3;
|
|
209
|
+
transition: width 0.2s ease;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.actions {
|
|
213
|
+
position: absolute;
|
|
214
|
+
inset: 0;
|
|
215
|
+
display: flex;
|
|
216
|
+
gap: 14px;
|
|
217
|
+
align-items: center;
|
|
218
|
+
justify-content: center;
|
|
219
|
+
background: rgb(15 23 42 / 48%);
|
|
220
|
+
opacity: 0;
|
|
221
|
+
transition: opacity 0.2s ease;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.item:hover .actions {
|
|
225
|
+
opacity: 1;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.action {
|
|
229
|
+
display: grid;
|
|
230
|
+
place-items: center;
|
|
231
|
+
width: 38px;
|
|
232
|
+
height: 38px;
|
|
233
|
+
color: #fff;
|
|
234
|
+
cursor: pointer;
|
|
235
|
+
background: rgb(255 255 255 / 14%);
|
|
236
|
+
border: 0;
|
|
237
|
+
border-radius: 999px;
|
|
238
|
+
transition: background 0.18s ease;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.action.is-disabled {
|
|
242
|
+
cursor: not-allowed;
|
|
243
|
+
opacity: 0.45;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.action:hover {
|
|
247
|
+
background: rgb(255 255 255 / 24%);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.action:focus-visible {
|
|
251
|
+
outline: 2px solid rgb(255 255 255 / 88%);
|
|
252
|
+
outline-offset: 2px;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.action svg {
|
|
256
|
+
width: 18px;
|
|
257
|
+
height: 18px;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.tip,
|
|
261
|
+
.message {
|
|
262
|
+
font-size: 12px;
|
|
263
|
+
line-height: 1.6;
|
|
264
|
+
color: #64748b;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.message {
|
|
268
|
+
padding: 10px 12px;
|
|
269
|
+
border-radius: 12px;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.message.error {
|
|
273
|
+
color: #b91c1c;
|
|
274
|
+
background: #fef2f2;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.message.warning {
|
|
278
|
+
color: #9a3412;
|
|
279
|
+
background: #fff7ed;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.viewer {
|
|
283
|
+
position: fixed;
|
|
284
|
+
inset: 0;
|
|
285
|
+
z-index: 9999;
|
|
286
|
+
display: grid;
|
|
287
|
+
place-items: center;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
.viewer-mask {
|
|
291
|
+
position: absolute;
|
|
292
|
+
inset: 0;
|
|
293
|
+
background: rgb(0 0 0 / 82%);
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
.viewer-inner {
|
|
297
|
+
position: relative;
|
|
298
|
+
z-index: 1;
|
|
299
|
+
width: min(88vw, 960px);
|
|
300
|
+
height: min(80vh, 640px);
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
.viewer-close,
|
|
304
|
+
.viewer-nav {
|
|
305
|
+
position: absolute;
|
|
306
|
+
z-index: 1;
|
|
307
|
+
color: #fff;
|
|
308
|
+
cursor: pointer;
|
|
309
|
+
background: transparent;
|
|
310
|
+
border: 0;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
.viewer-close {
|
|
314
|
+
top: 16px;
|
|
315
|
+
right: 16px;
|
|
316
|
+
font-size: 32px;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
.viewer-nav {
|
|
320
|
+
top: 50%;
|
|
321
|
+
font-size: 52px;
|
|
322
|
+
transform: translateY(-50%);
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
.viewer-nav.prev {
|
|
326
|
+
left: 20px;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
.viewer-nav.next {
|
|
330
|
+
right: 20px;
|
|
331
|
+
}
|
|
332
|
+
`,c([r({type:String})],v.prototype,"action",2),c([r({attribute:!1})],v.prototype,"headers",2),c([r({attribute:!1})],v.prototype,"data",2),c([r({type:String})],v.prototype,"name",2),c([r({type:Number})],v.prototype,"size",2),c([r({type:Number})],v.prototype,"width",2),c([r({type:Number})],v.prototype,"height",2),c([r({type:String})],v.prototype,"accept",2),c([r({type:String})],v.prototype,"placeholder",2),c([r({type:Boolean})],v.prototype,"notip",2),c([r({type:String,attribute:"tip-text"})],v.prototype,"tipText",2),c([r({type:Boolean})],v.prototype,"disabled",2),c([r({type:Number})],v.prototype,"limit",2),c([r({attribute:!1})],v.prototype,"fileList",2),c([o()],v.prototype,"_internalFiles",2),c([o()],v.prototype,"_viewerVisible",2),c([o()],v.prototype,"_viewerIndex",2),c([o()],v.prototype,"_message",2),c([o()],v.prototype,"_messageType",2),c([a('input[type="file"]')],v.prototype,"_input",2),v=c([d("qxs-image-upload")],v);export{v as QxsImageUpload};
|
|
333
|
+
//# sourceMappingURL=image-upload.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-upload.mjs","sources":["../../../packages/components/src/image-upload.ts"],"sourcesContent":["import { LitElement, css, html, nothing } from 'lit'\nimport { property, query, state } from 'lit/decorators.js'\nimport { repeat } from 'lit/directives/repeat.js'\nimport { styleMap } from 'lit/directives/style-map.js'\nimport { safeCustomElement } from './base/define'\n\nexport type ImageUploadFile = {\n uid?: string | number\n name: string\n url?: string\n size?: number\n status?: 'ready' | 'uploading' | 'success' | 'fail'\n progress?: number\n file?: File\n}\n\ntype UploadSuccessDetail = {\n response: any\n file: ImageUploadFile\n files: ImageUploadFile[]\n}\n\nfunction parseJsonResponse(responseText: string) {\n try {\n return JSON.parse(responseText)\n }\n catch {\n return responseText\n }\n}\n\nconst previewIcon = html`\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n d=\"M1.5 12s3.5-6 10.5-6 10.5 6 10.5 6-3.5 6-10.5 6S1.5 12 1.5 12Z\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"1.8\"\n />\n <circle\n cx=\"12\"\n cy=\"12\"\n r=\"3.2\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.8\"\n />\n </svg>\n`\n\nconst removeIcon = html`\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n d=\"M7 7l10 10M17 7L7 17\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-linecap=\"round\"\n stroke-width=\"1.9\"\n />\n </svg>\n`\n\n@safeCustomElement('qxs-image-upload')\nexport class QxsImageUpload extends LitElement {\n private static _scrollLockCount = 0\n private static _previousHtmlOverflow = ''\n private static _previousBodyOverflow = ''\n\n static styles = css`\n :host {\n display: block;\n --upload-width: 160px;\n --upload-height: 90px;\n color: #0f172a;\n font-size: 14px;\n }\n\n .upload {\n display: grid;\n gap: 10px;\n }\n\n .list {\n display: flex;\n flex-wrap: wrap;\n gap: 10px;\n }\n\n .item,\n .add {\n position: relative;\n width: var(--upload-width);\n height: var(--upload-height);\n overflow: hidden;\n border: 1px dashed #cbd5e1;\n border-radius: 14px;\n background: #f8fafc;\n transition: border-color 0.2s ease;\n }\n\n .item:hover {\n border-color: #3d61e3;\n }\n\n .add:hover {\n border-color: #94a3b8;\n }\n\n .add {\n display: grid;\n place-items: center;\n cursor: pointer;\n background: #f8fafc;\n }\n\n .add.is-disabled {\n cursor: not-allowed;\n opacity: 0.6;\n }\n\n .add input {\n display: none;\n }\n\n .add-content {\n display: grid;\n gap: 8px;\n place-items: center;\n color: #64748b;\n text-align: center;\n }\n\n .add-icon {\n font-size: 28px;\n line-height: 1;\n color: #3d61e3;\n }\n\n .item img,\n .viewer img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n\n .item img {\n transition: none;\n }\n\n .placeholder {\n display: grid;\n place-items: center;\n width: 100%;\n height: 100%;\n color: #94a3b8;\n background: #f8fafc;\n }\n\n .progress {\n position: absolute;\n right: 0;\n bottom: 0;\n left: 0;\n height: 4px;\n background: rgb(15 23 42 / 12%);\n }\n\n .progress-bar {\n height: 100%;\n background: #3d61e3;\n transition: width 0.2s ease;\n }\n\n .actions {\n position: absolute;\n inset: 0;\n display: flex;\n gap: 14px;\n align-items: center;\n justify-content: center;\n background: rgb(15 23 42 / 48%);\n opacity: 0;\n transition: opacity 0.2s ease;\n }\n\n .item:hover .actions {\n opacity: 1;\n }\n\n .action {\n display: grid;\n place-items: center;\n width: 38px;\n height: 38px;\n color: #fff;\n cursor: pointer;\n background: rgb(255 255 255 / 14%);\n border: 0;\n border-radius: 999px;\n transition: background 0.18s ease;\n }\n\n .action.is-disabled {\n cursor: not-allowed;\n opacity: 0.45;\n }\n\n .action:hover {\n background: rgb(255 255 255 / 24%);\n }\n\n .action:focus-visible {\n outline: 2px solid rgb(255 255 255 / 88%);\n outline-offset: 2px;\n }\n\n .action svg {\n width: 18px;\n height: 18px;\n }\n\n .tip,\n .message {\n font-size: 12px;\n line-height: 1.6;\n color: #64748b;\n }\n\n .message {\n padding: 10px 12px;\n border-radius: 12px;\n }\n\n .message.error {\n color: #b91c1c;\n background: #fef2f2;\n }\n\n .message.warning {\n color: #9a3412;\n background: #fff7ed;\n }\n\n .viewer {\n position: fixed;\n inset: 0;\n z-index: 9999;\n display: grid;\n place-items: center;\n }\n\n .viewer-mask {\n position: absolute;\n inset: 0;\n background: rgb(0 0 0 / 82%);\n }\n\n .viewer-inner {\n position: relative;\n z-index: 1;\n width: min(88vw, 960px);\n height: min(80vh, 640px);\n }\n\n .viewer-close,\n .viewer-nav {\n position: absolute;\n z-index: 1;\n color: #fff;\n cursor: pointer;\n background: transparent;\n border: 0;\n }\n\n .viewer-close {\n top: 16px;\n right: 16px;\n font-size: 32px;\n }\n\n .viewer-nav {\n top: 50%;\n font-size: 52px;\n transform: translateY(-50%);\n }\n\n .viewer-nav.prev {\n left: 20px;\n }\n\n .viewer-nav.next {\n right: 20px;\n }\n `\n\n @property({ type: String }) action = ''\n @property({ attribute: false }) headers?: Record<string, string>\n @property({ attribute: false }) data?: Record<string, string | Blob>\n @property({ type: String }) name = 'file'\n @property({ type: Number }) size = 20\n @property({ type: Number }) width = 160\n @property({ type: Number }) height = 90\n @property({ type: String }) accept = 'image/jpeg,image/jpg,image/png,image/gif'\n @property({ type: String }) placeholder = '上传图片'\n @property({ type: Boolean }) notip = false\n @property({ type: String, attribute: 'tip-text' }) tipText = ''\n @property({ type: Boolean }) disabled = false\n @property({ type: Number }) limit = 1\n @property({ attribute: false }) fileList: ImageUploadFile[] = []\n\n @state() private _internalFiles: ImageUploadFile[] = []\n @state() private _viewerVisible = false\n @state() private _viewerIndex = 0\n @state() private _message = ''\n @state() private _messageType: 'error' | 'warning' | '' = ''\n\n @query('input[type=\"file\"]') private _input?: HTMLInputElement\n private _hasScrollLock = false\n private _pendingRequests = new Map<string, XMLHttpRequest>()\n\n connectedCallback() {\n super.connectedCallback()\n this._syncFileList()\n }\n\n disconnectedCallback() {\n this._syncScrollLock(false)\n super.disconnectedCallback()\n this._pendingRequests.forEach(xhr => xhr.abort())\n this._pendingRequests.clear()\n this._internalFiles.forEach(file => this._revokeFileUrl(file))\n }\n\n updated(changed: Map<string, unknown>) {\n if (changed.has('fileList')) {\n this._syncFileList()\n }\n\n if (changed.has('_viewerVisible')) {\n this._syncScrollLock(this._viewerVisible)\n }\n }\n\n private get _exts() {\n return this.accept\n .split(',')\n .map(item => item.split('/').pop()?.toLowerCase() ?? '')\n .filter(Boolean)\n }\n\n private get _tipMessage() {\n if (this.tipText) {\n return this.tipText\n }\n const formatText = `支持 ${this._exts.join(' / ')} 格式,大小不超过 ${this.size}MB`\n const sizeText = this.width && this.height ? `,建议尺寸 ${this.width}×${this.height}` : ''\n return formatText + sizeText\n }\n\n private _syncFileList() {\n this._internalFiles = [...this.fileList]\n }\n\n private _setMessage(type: 'error' | 'warning', message: string) {\n this._messageType = type\n this._message = message\n }\n\n private _clearMessage() {\n this._messageType = ''\n this._message = ''\n }\n\n private _revokeFileUrl(file: ImageUploadFile) {\n if (file.url?.startsWith('blob:')) {\n URL.revokeObjectURL(file.url)\n }\n }\n\n private _emitFileListChange() {\n const detail = { fileList: this._internalFiles.slice() }\n this.dispatchEvent(new CustomEvent('file-list-change', { detail, bubbles: true, composed: true }))\n this.dispatchEvent(new CustomEvent('update:fileList', { detail, bubbles: true, composed: true }))\n }\n\n private _emitSuccess(detail: UploadSuccessDetail) {\n this.dispatchEvent(new CustomEvent('upload-success', { detail, bubbles: true, composed: true }))\n this.dispatchEvent(new CustomEvent('success', { detail, bubbles: true, composed: true }))\n }\n\n private _getFileKey(file: Pick<ImageUploadFile, 'uid' | 'name'>) {\n return String(file.uid ?? file.name)\n }\n\n private _updateFileByKey(fileKey: string, updater: (file: ImageUploadFile) => ImageUploadFile) {\n let changed = false\n this._internalFiles = this._internalFiles.map((item) => {\n if (this._getFileKey(item) !== fileKey) {\n return item\n }\n changed = true\n return updater(item)\n })\n return changed\n }\n\n private _emitRemove(file: ImageUploadFile) {\n this.dispatchEvent(new CustomEvent('remove', {\n detail: { file },\n bubbles: true,\n composed: true,\n }))\n }\n\n private _validateFile(file: File) {\n const fileExt = file.name.split('.').pop()?.toLowerCase() ?? ''\n const isTypeOk = this._exts.some(ext => ext === fileExt)\n\n if (!isTypeOk) {\n this._setMessage('error', `仅支持上传 ${this._exts.join(' / ')} 格式的图片`)\n return false\n }\n\n const fileSizeMB = file.size / 1024 / 1024\n if (fileSizeMB > this.size) {\n this._setMessage('error', `图片大小不能超过 ${this.size}MB`)\n return false\n }\n\n return true\n }\n\n private _handleSelectedFiles(files: File[]) {\n if (this.disabled || !files.length) {\n return\n }\n\n this._clearMessage()\n const validFiles = files.filter(file => this._validateFile(file))\n\n if (!validFiles.length) {\n return\n }\n\n if (!this.action) {\n this._setMessage('warning', '请先配置上传地址 action')\n return\n }\n\n if (this._internalFiles.length + validFiles.length > this.limit) {\n this._setMessage('warning', `最多上传 ${this.limit} 张图片`)\n return\n }\n\n validFiles.forEach((file) => {\n const imageFile: ImageUploadFile = {\n uid: Date.now() + Math.random(),\n name: file.name,\n size: file.size,\n status: 'uploading',\n progress: 0,\n url: URL.createObjectURL(file),\n file,\n }\n\n this._internalFiles = [...this._internalFiles, imageFile]\n this._emitFileListChange()\n this._uploadFile(file, imageFile)\n })\n }\n\n private _handleInputChange(event: Event) {\n const input = event.target as HTMLInputElement\n const files = input.files\n if (!files) {\n return\n }\n\n this._handleSelectedFiles(Array.from(files))\n input.value = ''\n }\n\n private _uploadFile(file: File, imageFile: ImageUploadFile) {\n const formData = new FormData()\n formData.append(this.name, file)\n\n if (this.data) {\n Object.entries(this.data).forEach(([key, value]) => {\n formData.append(key, value)\n })\n }\n\n const xhr = new XMLHttpRequest()\n const fileKey = this._getFileKey(imageFile)\n xhr.open('POST', this.action)\n this._pendingRequests.set(fileKey, xhr)\n\n if (this.headers) {\n Object.entries(this.headers).forEach(([key, value]) => {\n xhr.setRequestHeader(key, value)\n })\n }\n\n xhr.upload.onprogress = (event) => {\n if (event.lengthComputable) {\n const progress = Math.floor((event.loaded / event.total) * 100)\n this._updateFileByKey(fileKey, item => ({ ...item, progress }))\n }\n }\n\n xhr.onload = () => {\n if (this._pendingRequests.get(fileKey) !== xhr) {\n return\n }\n this._pendingRequests.delete(fileKey)\n\n if (xhr.status >= 200 && xhr.status < 300) {\n const response = parseJsonResponse(xhr.responseText)\n const changed = this._updateFileByKey(fileKey, item => ({\n ...item,\n status: 'success',\n progress: 100,\n }))\n if (!changed) {\n return\n }\n this._emitFileListChange()\n const updatedFile = this._internalFiles.find(item => this._getFileKey(item) === fileKey)\n if (!updatedFile) {\n return\n }\n this._emitSuccess({\n response,\n file: { ...updatedFile },\n files: this._internalFiles.slice(),\n })\n }\n else {\n this._updateFileByKey(fileKey, item => ({ ...item, status: 'fail', progress: 0 }))\n this._setMessage('error', '上传失败')\n }\n }\n\n xhr.onerror = () => {\n if (this._pendingRequests.get(fileKey) !== xhr) {\n return\n }\n this._pendingRequests.delete(fileKey)\n this._updateFileByKey(fileKey, item => ({ ...item, status: 'fail', progress: 0 }))\n this._setMessage('error', '上传失败')\n }\n\n xhr.onabort = () => {\n if (this._pendingRequests.get(fileKey) !== xhr) {\n return\n }\n this._pendingRequests.delete(fileKey)\n }\n\n xhr.send(formData)\n }\n\n private _handlePreview(index: number) {\n this._viewerIndex = index\n this._viewerVisible = true\n }\n\n private _closeViewer() {\n this._viewerVisible = false\n }\n\n private _prevImage() {\n this._viewerIndex = (this._viewerIndex - 1 + this._internalFiles.length) % this._internalFiles.length\n }\n\n private _nextImage() {\n this._viewerIndex = (this._viewerIndex + 1) % this._internalFiles.length\n }\n\n private _handleRemove(index: number) {\n if (this.disabled) {\n return\n }\n\n const file = this._internalFiles[index]\n if (!file) {\n return\n }\n\n const fileKey = this._getFileKey(file)\n const pendingRequest = this._pendingRequests.get(fileKey)\n if (pendingRequest) {\n this._pendingRequests.delete(fileKey)\n pendingRequest.abort()\n }\n\n this._revokeFileUrl(file)\n this._internalFiles = this._internalFiles.filter((_, fileIndex) => fileIndex !== index)\n this._emitFileListChange()\n this._emitRemove(file)\n\n if (this._viewerIndex >= this._internalFiles.length) {\n this._viewerIndex = Math.max(0, this._internalFiles.length - 1)\n }\n if (!this._internalFiles.length) {\n this._viewerVisible = false\n }\n }\n\n private _syncScrollLock(locked: boolean) {\n if (typeof document === 'undefined') {\n return\n }\n\n const htmlElement = document.documentElement\n const bodyElement = document.body\n\n if (locked) {\n if (this._hasScrollLock) {\n return\n }\n\n if (QxsImageUpload._scrollLockCount === 0) {\n QxsImageUpload._previousHtmlOverflow = htmlElement.style.overflow\n QxsImageUpload._previousBodyOverflow = bodyElement.style.overflow\n htmlElement.style.overflow = 'hidden'\n bodyElement.style.overflow = 'hidden'\n }\n\n QxsImageUpload._scrollLockCount += 1\n this._hasScrollLock = true\n return\n }\n\n if (!this._hasScrollLock) {\n return\n }\n\n QxsImageUpload._scrollLockCount = Math.max(0, QxsImageUpload._scrollLockCount - 1)\n this._hasScrollLock = false\n\n if (QxsImageUpload._scrollLockCount === 0) {\n htmlElement.style.overflow = QxsImageUpload._previousHtmlOverflow\n bodyElement.style.overflow = QxsImageUpload._previousBodyOverflow\n QxsImageUpload._previousHtmlOverflow = ''\n QxsImageUpload._previousBodyOverflow = ''\n }\n }\n\n render() {\n const cssVars = {\n '--upload-width': `${this.width}px`,\n '--upload-height': `${this.height}px`,\n }\n const currentPreview = this._internalFiles[this._viewerIndex]\n\n return html`\n <div class=\"upload\" style=${styleMap(cssVars)} part=\"container\">\n <div class=\"list\" part=\"list\">\n ${repeat(this._internalFiles, file => String(file.uid ?? file.name), (file, index) => html`\n <div class=\"item\" part=\"item\">\n ${file.url\n ? html`<img src=${file.url} alt=${file.name} part=\"image\">`\n : html`<div class=\"placeholder\" part=\"placeholder\">无图片</div>`}\n\n ${file.status === 'uploading'\n ? html`\n <div class=\"progress\" part=\"progress\">\n <div class=\"progress-bar\" style=${styleMap({ width: `${file.progress ?? 0}%` })}></div>\n </div>\n `\n : nothing}\n\n <div class=\"actions\" part=\"actions\">\n ${file.url\n ? html`\n <button\n class=\"action\"\n data-action=\"preview\"\n type=\"button\"\n aria-label=\"预览图片\"\n @click=${() => this._handlePreview(index)}\n >\n ${previewIcon}\n </button>\n `\n : nothing}\n <button\n class=\"action ${this.disabled ? 'is-disabled' : ''}\"\n data-action=\"remove\"\n type=\"button\"\n aria-label=\"删除图片\"\n @click=${() => this._handleRemove(index)}\n >\n ${removeIcon}\n </button>\n </div>\n </div>\n `)}\n\n ${this._internalFiles.length < this.limit\n ? html`\n <label class=\"add ${this.disabled ? 'is-disabled' : ''}\" part=\"add\">\n <input\n type=\"file\"\n accept=${this.accept}\n ?multiple=${this.limit > 1}\n ?disabled=${this.disabled}\n @change=${this._handleInputChange}\n >\n <div class=\"add-content\" part=\"add-content\">\n <div class=\"add-icon\">+</div>\n <div>${this.placeholder}</div>\n </div>\n </label>\n `\n : nothing}\n </div>\n\n ${this._message\n ? html`<div class=\"message ${this._messageType}\" part=\"message\">${this._message}</div>`\n : nothing}\n\n ${this.notip\n ? nothing\n : html`\n <div class=\"tip\" part=\"tip\">\n <slot name=\"tip\">${this._tipMessage}</slot>\n </div>\n `}\n\n ${this._viewerVisible && currentPreview?.url\n ? html`\n <div class=\"viewer\" part=\"viewer\">\n <div class=\"viewer-mask\" @click=${this._closeViewer}></div>\n <button class=\"viewer-close\" type=\"button\" @click=${this._closeViewer}>×</button>\n ${this._internalFiles.length > 1\n ? html`\n <button class=\"viewer-nav prev\" type=\"button\" @click=${this._prevImage}>‹</button>\n <button class=\"viewer-nav next\" type=\"button\" @click=${this._nextImage}>›</button>\n `\n : nothing}\n <div class=\"viewer-inner\">\n <img src=${currentPreview.url} alt=${currentPreview.name}>\n </div>\n </div>\n `\n : nothing}\n </div>\n `\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'qxs-image-upload': QxsImageUpload\n }\n}\n"],"names":["previewIcon","html","removeIcon","QxsImageUpload","LitElement","constructor","super","arguments","this","action","name","size","width","height","accept","placeholder","notip","tipText","disabled","limit","fileList","_internalFiles","_viewerVisible","_viewerIndex","_message","_messageType","_hasScrollLock","_pendingRequests","Map","connectedCallback","_syncFileList","disconnectedCallback","_syncScrollLock","forEach","xhr","abort","clear","file","_revokeFileUrl","updated","changed","has","_exts","split","map","item","pop","toLowerCase","filter","Boolean","_tipMessage","join","_setMessage","type","message","_clearMessage","url","startsWith","URL","revokeObjectURL","_emitFileListChange","detail","slice","dispatchEvent","CustomEvent","bubbles","composed","_emitSuccess","_getFileKey","String","uid","_updateFileByKey","fileKey","updater","_emitRemove","_validateFile","fileExt","some","ext","_handleSelectedFiles","files","length","validFiles","imageFile","Date","now","Math","random","status","progress","createObjectURL","_uploadFile","_handleInputChange","event","input","target","Array","from","value","formData","FormData","append","data","Object","entries","_ref","key","XMLHttpRequest","open","set","headers","_ref2","setRequestHeader","upload","onprogress","lengthComputable","floor","loaded","total","onload","get","delete","response","responseText","JSON","parse","parseJsonResponse","updatedFile","find","onerror","onabort","send","_handlePreview","index","_closeViewer","_prevImage","_nextImage","_handleRemove","pendingRequest","_","fileIndex","max","locked","document","htmlElement","documentElement","bodyElement","body","_scrollLockCount","_previousHtmlOverflow","style","overflow","_previousBodyOverflow","render","cssVars","currentPreview","styleMap","repeat","nothing","styles","css","__decorateClass","property","prototype","attribute","Number","state","query","safeCustomElement"],"mappings":"meA+BA,MAAMA,EAAcC,CAAA;;;;;;;;;;;;;;;;;;;EAqBdC,EAAaD,CAAA;;;;;;;;;;EAaZ,IAAME,EAAN,cAA6BC,EAA7BC,WAAAA,GAAAC,SAAAC,WAwOuBC,KAAAC,OAAS,GAGTD,KAAAE,KAAO,OACPF,KAAAG,KAAO,GACPH,KAAAI,MAAQ,IACRJ,KAAAK,OAAS,GACTL,KAAAM,OAAS,2CACTN,KAAAO,YAAc,OACbP,KAAAQ,OAAQ,EACcR,KAAAS,QAAU,GAChCT,KAAAU,UAAW,EACZV,KAAAW,MAAQ,EACJX,KAAAY,SAA8B,GAErDZ,KAAQa,eAAoC,GAC5Cb,KAAQc,gBAAiB,EACzBd,KAAQe,aAAe,EACvBf,KAAQgB,SAAW,GACnBhB,KAAQiB,aAAyC,GAG1DjB,KAAQkB,gBAAiB,EACzBlB,KAAQmB,qBAAuBC,GAA4B,CAE3DC,iBAAAA,GACEvB,MAAMuB,oBACNrB,KAAKsB,eACP,CAEAC,oBAAAA,GACEvB,KAAKwB,iBAAgB,GACrB1B,MAAMyB,uBACNvB,KAAKmB,iBAAiBM,QAAQC,GAAOA,EAAIC,SACzC3B,KAAKmB,iBAAiBS,QACtB5B,KAAKa,eAAeY,QAAQI,GAAQ7B,KAAK8B,eAAeD,GAC1D,CAEAE,OAAAA,CAAQC,GACFA,EAAQC,IAAI,aACdjC,KAAKsB,gBAGHU,EAAQC,IAAI,mBACd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AAhBK,KA1PUnK,EA0PMgK,UAAA,WAAA,GACAF,EAAA,CAAhBK,KA3PUnK,EA2PMgK,UAAA,eAAA,GAEoBF,EAAA,CAApCM,EAAM,uBA7PIpK,EA6P0BgK,UAAA,SAAA,GA7P1BhK,EAAN8J,EAAA,CADNO,EAAkB,qBACNrK"}
|
package/es/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
export{QxsIcon}from"./icon.mjs";export{QxsFixedActionBar}from"./fixed-action-bar.mjs";export{QxsPhotoCropTool}from"./photo-crop-tool.mjs";export{QxsFileUpload}from"./file-upload.mjs";export{QxsImageUpload}from"./image-upload.mjs";export{QxsDataChart}from"./data-chart.mjs";export{QxsBlocksuiteEditor}from"./editor/blocksuite-editor.mjs";export{register}from"./editor/index.mjs";export{collectSubjectElements,serializeSubjectElements,validateSubjectElements}from"./subject/runtime.mjs";export{createSubjectDraft}from"./subject/draft.mjs";export{getPaginationMeta,insertPageBreak,rebuildPageBreaksFromPageIndex,removePageBreak,serializeSubjectsWithPageIndex}from"./subject/pagination.mjs";export{moveSubjectItem,reorderSubjects}from"./subject/sort-controller.mjs";export{QxsBlankFill}from"./subject/blank-fill.mjs";export{QxsPageEnd}from"./subject/page-end.mjs";export{QxsScale}from"./subject/scale.mjs";export{QxsSubjectAction}from"./subject/action.mjs";export{QxsSubjectLayout}from"./subject/layout.mjs";export{QxsSubjectSingle}from"./subject/single.mjs";export{QxsSubjectSortable}from"./subject/sortable.mjs";export{QxsTextFill}from"./subject/text-fill.mjs";
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
package/es/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{defineComponent as e,ref as t,shallowRef as n,onMounted as o,watch as r,onUnmounted as i,h as c,nextTick as s}from"vue";const l=/^[a-z0-9]+(-[a-z0-9]+)*$/,a=(e,t,n,o="")=>{const r=e.split(":");if("@"===e.slice(0,1)){if(r.length<2||r.length>3)return null;o=r.shift().slice(1)}if(r.length>3||!r.length)return null;if(r.length>1){const e=r.pop(),n=r.pop(),i={provider:r.length>0?r[0]:o,prefix:n,name:e};return t&&!u(i)?null:i}const i=r[0],c=i.split("-");if(c.length>1){const e={provider:o,prefix:c.shift(),name:c.join("-")};return t&&!u(e)?null:e}if(n&&""===o){const e={provider:o,prefix:"",name:i};return t&&!u(e,n)?null:e}return null},u=(e,t)=>!!e&&!(!(t&&""===e.prefix||e.prefix)||!e.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(e,t){const n=function(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const o=((e.rotate||0)+(t.rotate||0))%4;return o&&(n.rotate=o),n}(e,t);for(const o in h)o in p?o in e&&!(o in n)&&(n[o]=p[o]):o in t?n[o]=t[o]:o in e&&(n[o]=e[o]);return n}function m(e,t,n){const o=e.icons,r=e.aliases||Object.create(null);let i={};function c(e){i=g(o[e]||r[e],i)}return c(t),n.forEach(c),g(e,i)}function b(e,t){const n=[];if("object"!=typeof e||"object"!=typeof e.icons)return n;e.not_found instanceof Array&&e.not_found.forEach(e=>{t(e,null),n.push(e)});const o=function(e){const t=e.icons,n=e.aliases||Object.create(null),o=Object.create(null);return Object.keys(t).concat(Object.keys(n)).forEach(function e(r){if(t[r])return o[r]=[];if(!(r in o)){o[r]=null;const t=n[r]&&n[r].parent,i=t&&e(t);i&&(o[r]=[t].concat(i))}return o[r]}),o}(e);for(const r in o){const i=o[r];i&&(t(r,m(e,r,i)),n.push(r))}return n}const v={provider:"",aliases:{},not_found:{},...f};function y(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function x(e){if("object"!=typeof e||null===e)return null;const t=e;if("string"!=typeof t.prefix||!e.icons||"object"!=typeof e.icons)return null;if(!y(e,v))return null;const n=t.icons;for(const e in n){const t=n[e];if(!e||"string"!=typeof t.body||!y(t,h))return null}const o=t.aliases||Object.create(null);for(const e in o){const t=o[e],r=t.parent;if(!e||"string"!=typeof r||!n[r]&&!o[r]||!y(t,h))return null}return t}const w=Object.create(null);function j(e,t){const n=w[e]||(w[e]=Object.create(null));return n[t]||(n[t]=function(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}(e,t))}function k(e,t){return x(t)?b(t,(t,n)=>{n?e.icons[t]=n:e.missing.add(t)}):[]}let F=!1;function O(e){return"boolean"==typeof e&&(F=e),F}function E(e,t){const n=a(e,!0,F);if(!n)return!1;const o=j(n.provider,n.prefix);return t?function(e,t,n){try{if("string"==typeof n.body)return e.icons[t]={...n},!0}catch(e){}return!1}(o,n.name,t):(o.missing.add(n.name),!0)}function T(e,t){if("object"!=typeof e)return!1;if("string"!=typeof t&&(t=e.provider||""),F&&!t&&!e.prefix){let t=!1;return x(e)&&(e.prefix="",b(e,(e,n)=>{E(e,n)&&(t=!0)})),t}const n=e.prefix;if(!u({prefix:n,name:"a"}))return!1;return!!k(j(t,n),e)}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(e,t,n){if(1===t)return e;if(n=n||100,"number"==typeof e)return Math.ceil(e*t*n)/n;if("string"!=typeof e)return e;const o=e.split(C);if(null===o||!o.length)return e;const r=[];let i=o.shift(),c=L.test(i);for(;;){if(c){const e=parseFloat(i);isNaN(e)?r.push(i):r.push(Math.ceil(e*t*n)/n)}else r.push(i);if(i=o.shift(),void 0===i)return r.join("");c=!c}}function M(e,t){const n={...d,...e},o={...I,...t},r={left:n.left,top:n.top,width:n.width,height:n.height};let i=n.body;[n,o].forEach(e=>{const t=[],n=e.hFlip,o=e.vFlip;let c,s=e.rotate;switch(n?o?s+=2:(t.push("translate("+(r.width+r.left).toString()+" "+(0-r.top).toString()+")"),t.push("scale(-1 1)"),r.top=r.left=0):o&&(t.push("translate("+(0-r.left).toString()+" "+(r.height+r.top).toString()+")"),t.push("scale(1 -1)"),r.top=r.left=0),s<0&&(s-=4*Math.floor(s/4)),s%=4,s){case 1:c=r.height/2+r.top,t.unshift("rotate(90 "+c.toString()+" "+c.toString()+")");break;case 2:t.unshift("rotate(180 "+(r.width/2+r.left).toString()+" "+(r.height/2+r.top).toString()+")");break;case 3:c=r.width/2+r.left,t.unshift("rotate(-90 "+c.toString()+" "+c.toString()+")")}s%2==1&&(r.left!==r.top&&(c=r.left,r.left=r.top,r.top=c),r.width!==r.height&&(c=r.width,r.width=r.height,r.height=c)),t.length&&(i=function(e,t,n){const o=function(e,t="defs"){let n="";const o=e.indexOf("<"+t);for(;o>=0;){const r=e.indexOf(">",o),i=e.indexOf("</"+t);if(-1===r||-1===i)break;const c=e.indexOf(">",i);if(-1===c)break;n+=e.slice(r+1,i).trim(),e=e.slice(0,o).trim()+e.slice(c+1)}return{defs:n,content:e}}(e);return r=o.defs,i=t+o.content+n,r?"<defs>"+r+"</defs>"+i:i;var r,i}(i,'<g transform="'+t.join(" ")+'">',"</g>"))});const c=o.width,s=o.height,l=r.width,a=r.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=(e,t)=>{(e=>"unset"===e||"undefined"===e||"none"===e)(t)||(p[e]=t.toString())};h("width",u),h("height",f);const g=[r.left,r.top,l,a];return p.viewBox=g.join(" "),{attributes:p,viewBox:g,body:i}}const A=/\sid="(\S+)"/g,P="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16);let R=0;function $(e,t=P){const n=[];let o;for(;o=A.exec(e);)n.push(o[1]);if(!n.length)return e;const r="suffix"+(16777216*Math.random()|Date.now()).toString(16);return n.forEach(n=>{const o="function"==typeof t?t(n):t+(R++).toString(),i=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+i+')([")]|\\.[a-z])',"g"),"$1"+o+r+"$3")}),e=e.replace(new RegExp(r,"g"),"")}const N=Object.create(null);function U(e){return N[e]||N[""]}function q(e){let t;if("string"==typeof e.resources)t=[e.resources];else if(t=e.resources,!(t instanceof Array&&t.length))return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:!0===e.random,index:e.index||0,dataAfterTimeout:!1!==e.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(e,t){const n=q(t);return null!==n&&(D[e]=n,!0)}function B(e){return D[e]}D[""]=q({resources:["https://api.iconify.design"].concat(H)});let V=(()=>{let e;try{if(e=fetch,"function"==typeof e)return e}catch(e){}})();const G={prepare:(e,t,n)=>{const o=[],r=function(e,t){const n=B(e);if(!n)return 0;let o;if(n.maxURL){let e=0;n.resources.forEach(t=>{const n=t;e=Math.max(e,n.length)});const r=t+".json?icons=";o=n.maxURL-e-n.path.length-r.length}else o=0;return o}(e,t),i="icons";let c={type:i,provider:e,prefix:t,icons:[]},s=0;return n.forEach((n,l)=>{s+=n.length+1,s>=r&&l>0&&(o.push(c),c={type:i,provider:e,prefix:t,icons:[]},s=n.length),c.icons.push(n)}),o.push(c),o},send:(e,t,n)=>{if(!V)return void n("abort",424);let o=function(e){if("string"==typeof e){const t=B(e);if(t)return t.path}return"/"}(t.provider);switch(t.type){case"icons":{const e=t.prefix,n=t.icons.join(",");o+=e+".json?"+new URLSearchParams({icons:n}).toString();break}case"custom":{const e=t.uri;o+="/"===e.slice(0,1)?e.slice(1):e;break}default:return void n("abort",400)}let r=503;V(e+o).then(e=>{const t=e.status;if(200===t)return r=501,e.json();setTimeout(()=>{n(function(e){return 404===e}(t)?"abort":"next",t)})}).then(e=>{"object"==typeof e&&null!==e?setTimeout(()=>{n("success",e)}):setTimeout(()=>{404===e?n("abort",e):n("next",r)})}).catch(()=>{n("next",r)})}};function J(e,t){e.forEach(e=>{const n=e.loaderCallbacks;n&&(e.loaderCallbacks=n.filter(e=>e.id!==t))})}let K=0;var W={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function X(e,t,n,o){const r=e.resources.length,i=e.random?Math.floor(Math.random()*r):e.index;let c;if(e.random){let t=e.resources.slice(0);for(c=[];t.length>1;){const e=Math.floor(Math.random()*t.length);c.push(t[e]),t=t.slice(0,e).concat(t.slice(e+1))}c=c.concat(t)}else c=e.resources.slice(i).concat(e.resources.slice(0,i));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(e=>{"pending"===e.status&&(e.status="aborted")}),p=[]}function m(e,t){t&&(d=[]),"function"==typeof e&&d.push(e)}function b(){a="failed",d.forEach(e=>{e(void 0,l)})}function v(){p.forEach(e=>{"pending"===e.status&&(e.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())},e.timeout)):void b();const r={status:"pending",resource:o,callback:(t,n)=>{!function(t,n,o){const r="success"!==n;switch(p=p.filter(e=>e!==t),a){case"pending":break;case"failed":if(r||!e.dataAfterTimeout)return;break;default:return}if("abort"===n)return l=o,void b();if(r)return l=o,void(p.length||(c.length?y():b()));if(h(),v(),!e.random){const n=e.resources.indexOf(t.resource);-1!==n&&n!==e.index&&(e.index=n)}a="completed",d.forEach(e=>{e(o)})}(r,t,n)}};p.push(r),u++,f=setTimeout(y,e.rotate),n(o,t,r.callback)}return"function"==typeof o&&d.push(o),setTimeout(y),function(){return{startTime:s,payload:t,status:a,queriesSent:u,queriesPending:p.length,subscribe:m,abort:g}}}function Y(e){const t={...W,...e};let n=[];function o(){n=n.filter(e=>"pending"===e().status)}return{query:function(e,r,i){const c=X(t,e,r,(e,t)=>{o(),i&&i(e,t)});return n.push(c),c},find:function(e){return n.find(t=>e(t))||null},setIndex:e=>{t.index=e},getIndex:()=>t.index,cleanup:o}}function Z(){}const ee=Object.create(null);function te(e,t,n){let o,r;if("string"==typeof e){const t=U(e);if(!t)return n(void 0,424),Z;r=t.send;const i=function(e){if(!ee[e]){const t=B(e);if(!t)return;const n={config:t,redundancy:Y(t)};ee[e]=n}return ee[e]}(e);i&&(o=i.redundancy)}else{const t=q(e);if(t){o=Y(t);const n=U(e.resources?e.resources[0]:"");n&&(r=n.send)}}return o&&r?o.query(t,r,n)().abort:(n(void 0,424),Z)}function ne(){}function oe(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,function(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const o=e.provider,r=e.prefix;t.forEach(t=>{const i=t.icons,c=i.pending.length;i.pending=i.pending.filter(t=>{if(t.prefix!==r)return!0;const c=t.name;if(e.icons[c])i.loaded.push({provider:o,prefix:r,name:c});else{if(!e.missing.has(c))return n=!0,!0;i.missing.push({provider:o,prefix:r,name:c})}return!1}),i.pending.length!==c&&(n||J([e],t.id),t.callback(i.loaded.slice(0),i.missing.slice(0),i.pending.slice(0),t.abort))})}))}(e)}))}function re(e,t,n){function o(){const n=e.pendingIcons;t.forEach(t=>{n&&n.delete(t),e.icons[t]||e.missing.add(t)})}if(n&&"object"==typeof n)try{if(!k(e,n).length)return void o()}catch(e){console.error(e)}o(),oe(e)}function ie(e,t){e instanceof Promise?e.then(e=>{t(e)}).catch(()=>{t(null)}):t(e)}function ce(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:t,prefix:n}=e,o=e.iconsToLoad;if(delete e.iconsToLoad,!o||!o.length)return;const r=e.loadIcon;if(e.loadIcons&&(o.length>1||!r))return void ie(e.loadIcons(o,n,t),t=>{re(e,o,t)});if(r)return void o.forEach(o=>{ie(r(o,n,t),t=>{re(e,[o],t?{prefix:n,icons:{[o]:t}}:null)})});const{valid:i,invalid:c}=function(e){const t=[],n=[];return e.forEach(e=>{(e.match(l)?t:n).push(e)}),{valid:t,invalid:n}}(o);if(c.length&&re(e,c,null),!i.length)return;const s=n.match(l)?U(t):null;if(!s)return void re(e,i,null);s.prepare(t,n,i).forEach(n=>{te(t,n,t=>{re(e,n.icons,t)})})}))}const se=(e,t)=>{const n=function(e,t=!0,n=!1){const o=[];return e.forEach(e=>{const r="string"==typeof e?a(e,t,n):e;r&&o.push(r)}),o}(e,!0,O()),o=function(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((e,t)=>e.provider!==t.provider?e.provider.localeCompare(t.provider):e.prefix!==t.prefix?e.prefix.localeCompare(t.prefix):e.name.localeCompare(t.name));let o={provider:"",prefix:"",name:""};return e.forEach(e=>{if(o.name===e.name&&o.prefix===e.prefix&&o.provider===e.provider)return;o=e;const r=e.provider,i=e.prefix,c=e.name,s=n[r]||(n[r]=Object.create(null)),l=s[i]||(s[i]=j(r,i));let a;a=c in l.icons?t.loaded:""===i||l.missing.has(c)?t.missing:t.pending;const u={provider:r,prefix:i,name:c};a.push(u)}),t}(n);if(!o.pending.length){let e=!0;return t&&setTimeout(()=>{e&&t(o.loaded,o.missing,o.pending,ne)}),()=>{e=!1}}const r=Object.create(null),i=[];let c,s;return o.pending.forEach(e=>{const{provider:t,prefix:n}=e;if(n===s&&t===c)return;c=t,s=n,i.push(j(t,n));const o=r[t]||(r[t]=Object.create(null));o[n]||(o[n]=[])}),o.pending.forEach(e=>{const{provider:t,prefix:n,name:o}=e,i=j(t,n),c=i.pendingIcons||(i.pendingIcons=new Set);c.has(o)||(c.add(o),r[t][n].push(o))}),i.forEach(e=>{const t=r[e.provider][e.prefix];t.length&&ce(e,t)}),t?function(e,t,n){const o=K++,r=J.bind(null,n,o);if(!t.pending.length)return r;const i={id:o,icons:t,callback:e,abort:r};return n.forEach(e=>{(e.loaderCallbacks||(e.loaderCallbacks=[])).push(i)}),r}(t,o,i):ne};const le=/[\s,]+/;function ae(e,t){t.split(le).forEach(t=>{switch(t.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0}})}function ue(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function o(e){for(;e<0;)e+=4;return e%4}if(""===n){const t=parseInt(e);return isNaN(t)?0:o(t)}if(n!==e){let t=0;switch(n){case"%":t=25;break;case"deg":t=90}if(t){let r=parseFloat(e.slice(0,e.length-n.length));return isNaN(r)?0:(r/=t,r%1==0?o(r):0)}}return t}const fe={...I,inline:!1},pe={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},de={display:"inline-block"},he={backgroundColor:"currentColor"},ge={backgroundColor:"transparent"},me={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},be={webkitMask:he,mask:he,background:ge};for(const e in be){const t=be[e];for(const n in me)t[e+n]=me[n]}const ve={};function ye(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}["horizontal","vertical"].forEach(e=>{const t=e.slice(0,1)+"Flip";ve[e+"-flip"]=t,ve[e.slice(0,1)+"-flip"]=t,ve[e+"Flip"]=t});const xe=(e,t)=>{const n=function(e,t){const n={...e};for(const e in t){const o=t[e],r=typeof o;e in S?(null===o||o&&("string"===r||"number"===r))&&(n[e]=o):r===typeof n[e]&&(n[e]="rotate"===e?o%4:o)}return n}(fe,t),o={...pe},r=t.mode||"svg",i={},s=t.style,l="object"!=typeof s||s instanceof Array?{}:s;for(let e in t){const r=t[e];if(void 0!==r)switch(e){case"icon":case"style":case"onLoad":case"mode":case"ssr":break;case"inline":case"hFlip":case"vFlip":n[e]=!0===r||"true"===r||1===r;break;case"flip":"string"==typeof r&&ae(n,r);break;case"color":i.color=r;break;case"rotate":"string"==typeof r?n[e]=ue(r):"number"==typeof r&&(n[e]=r);break;case"ariaHidden":case"aria-hidden":!0!==r&&"true"!==r&&delete o["aria-hidden"];break;default:{const t=ve[e];t?!0!==r&&"true"!==r&&1!==r||(n[t]=!0):void 0===fe[e]&&(o[e]=r)}}}const a=M(e,n),u=a.attributes;if(n.inline&&(i.verticalAlign="-0.125em"),"svg"===r){o.style={...i,...l},Object.assign(o,u);let e=0,n=t.id;return"string"==typeof n&&(n=n.replace(/-/g,"_")),o.innerHTML=$(a.body,n?()=>n+"ID"+e++:"iconifyVue"),c("svg",o)}const{body:f,width:p,height:d}=e,h="mask"===r||"bg"!==r&&-1!==f.indexOf("currentColor"),g=function(e,t){let n=-1===e.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const e in t)n+=" "+e+'="'+t[e]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}(f,{...u,width:p+"",height:d+""});var m;return o.style={...i,"--svg":(m=g,'url("'+function(e){return"data:image/svg+xml,"+function(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}(e)}(m)+'")'),width:ye(u.width),height:ye(u.height),...de,...h?he:ge,...l},c("span",o)};var we;if(O(!0),we=G,N[""]=we,"undefined"!=typeof document&&"undefined"!=typeof window){const e=window;if(void 0!==e.IconifyPreload){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";"object"==typeof t&&null!==t&&(t instanceof Array?t:[t]).forEach(e=>{try{("object"!=typeof e||null===e||e instanceof Array||"object"!=typeof e.icons||"string"!=typeof e.prefix||!T(e))&&console.error(n)}catch(e){console.error(n)}})}if(void 0!==e.IconifyProviders){const t=e.IconifyProviders;if("object"==typeof t&&null!==t)for(let e in t){const n="IconifyProviders["+e+"] is invalid.";try{const o=t[e];if("object"!=typeof o||!o||void 0===o.resources)continue;Q(e,o)||console.error(n)}catch(e){console.error(n)}}}}const je={...d,body:""},ke=e((e,{emit:c})=>{const l=t(null);function u(){l.value&&(l.value.abort?.(),l.value=null)}const f=t(!!e.ssr),p=t(""),h=n(null);function g(){const t=e.icon;if("object"==typeof t&&null!==t&&"string"==typeof t.body)return p.value="",{data:t};let n;if("string"!=typeof t||null===(n=a(t,!1,!0)))return null;let o=function(e){const t="string"==typeof e?a(e,!0,F):e;if(t){const e=j(t.provider,t.prefix),n=t.name;return e.icons[n]||(e.missing.has(n)?null:void 0)}}(n);if(!o){const e=l.value;return e&&e.name===t||(l.value=null===o?{name:t}:{name:t,abort:se([n],m)}),null}u(),p.value!==t&&(p.value=t,s(()=>{c("load",t)}));const r=e.customise;if(r){o=Object.assign({},o);const e=r(o.body,n.name,n.prefix,n.provider);"string"==typeof e&&(o.body=e)}const i=["iconify"];return""!==n.prefix&&i.push("iconify--"+n.prefix),""!==n.provider&&i.push("iconify--"+n.provider),{data:o,classes:i}}function m(){const e=g();e?e.data!==h.value?.data&&(h.value=e):h.value=null}return f.value?m():o(()=>{f.value=!0,m()}),r(()=>e.icon,m),i(u),()=>{const t=h.value;if(!t)return xe(je,e);let n=e;return t.classes&&(n={...e,class:t.classes.join(" ")}),xe({...d,...t.data},n)}},{props:["icon","mode","ssr","width","height","style","color","inline","rotate","hFlip","horizontalFlip","vFlip","verticalFlip","flip","id","ariaHidden","customise","title"],emits:["load"]});export{ke as Icon,Q as addAPIProvider,T as addCollection,E as addIcon,M as buildIcon,z as calculateSize,se as loadIcons,$ as replaceIDs};
|
|
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
2
|
//# sourceMappingURL=iconify.mjs.map
|