@qxs-bns/components 0.0.90 → 0.0.92
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +143 -0
- package/es/data-chart.mjs.map +1 -0
- package/es/editor/blocksuite-editor.mjs +1126 -0
- package/es/editor/blocksuite-editor.mjs.map +1 -0
- package/es/editor/content-format.mjs +9 -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 +164 -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/marked@17.0.6/node_modules/marked/lib/marked.esm.mjs +60 -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 +17 -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.browser.es.mjs +62 -0
- package/es/node_modules/.pnpm/turndown@7.2.4/node_modules/turndown/lib/turndown.browser.es.mjs.map +1 -0
- package/es/photo-crop-tool.mjs +147 -0
- package/es/photo-crop-tool.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 +270 -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 +113 -0
- package/es/subject/shared-styles.mjs.map +1 -0
- package/es/subject/single-interactions.mjs +2 -0
- package/es/subject/single-interactions.mjs.map +1 -0
- package/es/subject/single-model.mjs +2 -0
- package/es/subject/single-model.mjs.map +1 -0
- package/es/subject/single-state.mjs +2 -0
- package/es/subject/single-state.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/subject-shared.mjs +2 -0
- package/es/subject/subject-shared.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 +143 -0
- package/lib/data-chart.cjs.map +1 -0
- package/lib/editor/blocksuite-editor.cjs +1126 -0
- package/lib/editor/blocksuite-editor.cjs.map +1 -0
- package/lib/editor/content-format.cjs +9 -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 +164 -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/marked@17.0.6/node_modules/marked/lib/marked.esm.cjs +60 -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 +17 -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.browser.es.cjs +62 -0
- package/lib/node_modules/.pnpm/turndown@7.2.4/node_modules/turndown/lib/turndown.browser.es.cjs.map +1 -0
- package/lib/photo-crop-tool.cjs +147 -0
- package/lib/photo-crop-tool.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 +270 -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 +113 -0
- package/lib/subject/shared-styles.cjs.map +1 -0
- package/lib/subject/single-interactions.cjs +2 -0
- package/lib/subject/single-interactions.cjs.map +1 -0
- package/lib/subject/single-model.cjs +2 -0
- package/lib/subject/single-model.cjs.map +1 -0
- package/lib/subject/single-state.cjs +2 -0
- package/lib/subject/single-state.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/subject-shared.cjs +2 -0
- package/lib/subject/subject-shared.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 +98 -36
- 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 +193 -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 +50 -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/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-interactions.d.ts +46 -0
- package/types/subject/single-model.d.ts +88 -0
- package/types/subject/single-state.d.ts +42 -0
- package/types/subject/single.d.ts +210 -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/subject-shared.d.ts +43 -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/README.md +0 -566
- package/es/_virtual/_commonjsHelpers.mjs +0 -2
- package/es/_virtual/_commonjsHelpers.mjs.map +0 -1
- package/es/_virtual/_plugin-vue_export-helper.mjs +0 -2
- package/es/_virtual/_plugin-vue_export-helper.mjs.map +0 -1
- package/es/_virtual/sortable.esm.mjs +0 -2
- package/es/_virtual/sortable.esm.mjs.map +0 -1
- package/es/_virtual/vuedraggable.umd.mjs +0 -2
- package/es/_virtual/vuedraggable.umd.mjs.map +0 -1
- package/es/_virtual/vuedraggable.umd2.mjs +0 -2
- package/es/_virtual/vuedraggable.umd2.mjs.map +0 -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 +0 -2
- package/es/node_modules/.pnpm/@iconify_vue@5.0.0_vue@3.5.18_typescript@5.9.2_/node_modules/@iconify/vue/dist/iconify.mjs.map +0 -1
- package/es/node_modules/.pnpm/sortablejs@1.14.0/node_modules/sortablejs/modular/sortable.esm.mjs +0 -8
- package/es/node_modules/.pnpm/sortablejs@1.14.0/node_modules/sortablejs/modular/sortable.esm.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/node_modules/.pnpm/vuedraggable@4.1.0_vue@3.5.18_typescript@5.9.2_/node_modules/vuedraggable/dist/vuedraggable.umd.mjs +0 -2
- package/es/node_modules/.pnpm/vuedraggable@4.1.0_vue@3.5.18_typescript@5.9.2_/node_modules/vuedraggable/dist/vuedraggable.umd.mjs.map +0 -1
- package/es/package.json.mjs +0 -2
- package/es/package.json.mjs.map +0 -1
- package/es/src/alert/index.mjs +0 -2
- package/es/src/alert/index.mjs.map +0 -1
- package/es/src/alert/src/alert.mjs +0 -2
- package/es/src/alert/src/alert.mjs.map +0 -1
- package/es/src/components.mjs +0 -2
- package/es/src/components.mjs.map +0 -1
- package/es/src/data-chart/index.mjs +0 -2
- package/es/src/data-chart/index.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/defaults.mjs +0 -2
- package/es/src/defaults.mjs.map +0 -1
- package/es/src/dialog/src/dialog.mjs +0 -2
- package/es/src/dialog/src/dialog.mjs.map +0 -1
- package/es/src/feedback-plugin/index.mjs +0 -2
- package/es/src/feedback-plugin/index.mjs.map +0 -1
- package/es/src/file-upload/index.mjs +0 -2
- package/es/src/file-upload/index.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/file-upload/src/file-upload.vue3.mjs +0 -2
- package/es/src/file-upload/src/file-upload.vue3.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/icon/index.mjs +0 -2
- package/es/src/icon/index.mjs.map +0 -1
- package/es/src/icon/src/icon.mjs +0 -2
- package/es/src/icon/src/icon.mjs.map +0 -1
- package/es/src/image-upload/index.mjs +0 -2
- package/es/src/image-upload/index.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/image-upload/src/image-upload.vue3.mjs +0 -2
- package/es/src/image-upload/src/image-upload.vue3.mjs.map +0 -1
- package/es/src/make-installer.mjs +0 -2
- package/es/src/make-installer.mjs.map +0 -1
- package/es/src/message/src/message.mjs +0 -2
- package/es/src/message/src/message.mjs.map +0 -1
- package/es/src/photo-crop-tool/index.mjs +0 -2
- package/es/src/photo-crop-tool/index.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/es/src/tiny-mce-editor/index.mjs +0 -2
- package/es/src/tiny-mce-editor/index.mjs.map +0 -1
- package/es/src/tiny-mce-editor/src/tiny-mce-editor.vue.mjs +0 -2
- package/es/src/tiny-mce-editor/src/tiny-mce-editor.vue.mjs.map +0 -1
- package/es/src/tiny-mce-editor/src/tiny-mce-editor.vue2.mjs +0 -2
- package/es/src/tiny-mce-editor/src/tiny-mce-editor.vue2.mjs.map +0 -1
- package/es/src/ui/button/index.mjs +0 -2
- package/es/src/ui/button/index.mjs.map +0 -1
- package/es/src/ui/checkbox/index.mjs +0 -2
- package/es/src/ui/checkbox/index.mjs.map +0 -1
- package/es/src/ui/dialog/index.mjs +0 -2
- package/es/src/ui/dialog/index.mjs.map +0 -1
- package/es/src/ui/input/index.mjs +0 -2
- package/es/src/ui/input/index.mjs.map +0 -1
- package/es/src/ui/input-number/index.mjs +0 -2
- package/es/src/ui/input-number/index.mjs.map +0 -1
- package/es/src/ui/layout/index.mjs +0 -2
- package/es/src/ui/layout/index.mjs.map +0 -1
- package/es/src/ui/link/index.mjs +0 -2
- package/es/src/ui/link/index.mjs.map +0 -1
- package/es/src/ui/popover/index.mjs +0 -2
- package/es/src/ui/popover/index.mjs.map +0 -1
- package/es/src/ui/radio/index.mjs +0 -2
- package/es/src/ui/radio/index.mjs.map +0 -1
- package/es/src/ui/scrollbar/index.mjs +0 -2
- package/es/src/ui/scrollbar/index.mjs.map +0 -1
- package/es/src/ui/select/index.mjs +0 -2
- package/es/src/ui/select/index.mjs.map +0 -1
- package/es/src/ui/table/index.mjs +0 -2
- package/es/src/ui/table/index.mjs.map +0 -1
- package/es/src/ui/tag/index.mjs +0 -2
- package/es/src/ui/tag/index.mjs.map +0 -1
- package/es/src/withInstall.mjs +0 -2
- package/es/src/withInstall.mjs.map +0 -1
- package/lib/_virtual/_commonjsHelpers.cjs +0 -2
- package/lib/_virtual/_commonjsHelpers.cjs.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/_virtual/sortable.esm.cjs +0 -2
- package/lib/_virtual/sortable.esm.cjs.map +0 -1
- package/lib/_virtual/vuedraggable.umd.cjs +0 -2
- package/lib/_virtual/vuedraggable.umd.cjs.map +0 -1
- package/lib/_virtual/vuedraggable.umd2.cjs +0 -2
- package/lib/_virtual/vuedraggable.umd2.cjs.map +0 -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 +0 -2
- package/lib/node_modules/.pnpm/@iconify_vue@5.0.0_vue@3.5.18_typescript@5.9.2_/node_modules/@iconify/vue/dist/iconify.cjs.map +0 -1
- package/lib/node_modules/.pnpm/sortablejs@1.14.0/node_modules/sortablejs/modular/sortable.esm.cjs +0 -9
- package/lib/node_modules/.pnpm/sortablejs@1.14.0/node_modules/sortablejs/modular/sortable.esm.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/node_modules/.pnpm/vuedraggable@4.1.0_vue@3.5.18_typescript@5.9.2_/node_modules/vuedraggable/dist/vuedraggable.umd.cjs +0 -2
- package/lib/node_modules/.pnpm/vuedraggable@4.1.0_vue@3.5.18_typescript@5.9.2_/node_modules/vuedraggable/dist/vuedraggable.umd.cjs.map +0 -1
- package/lib/package.json.cjs +0 -2
- package/lib/package.json.cjs.map +0 -1
- package/lib/src/alert/index.cjs +0 -2
- package/lib/src/alert/index.cjs.map +0 -1
- package/lib/src/alert/src/alert.cjs +0 -2
- package/lib/src/alert/src/alert.cjs.map +0 -1
- package/lib/src/components.cjs +0 -2
- package/lib/src/components.cjs.map +0 -1
- package/lib/src/data-chart/index.cjs +0 -2
- package/lib/src/data-chart/index.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/defaults.cjs +0 -2
- package/lib/src/defaults.cjs.map +0 -1
- package/lib/src/dialog/src/dialog.cjs +0 -2
- package/lib/src/dialog/src/dialog.cjs.map +0 -1
- package/lib/src/feedback-plugin/index.cjs +0 -2
- package/lib/src/feedback-plugin/index.cjs.map +0 -1
- package/lib/src/file-upload/index.cjs +0 -2
- package/lib/src/file-upload/index.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/file-upload/src/file-upload.vue3.cjs +0 -2
- package/lib/src/file-upload/src/file-upload.vue3.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/icon/index.cjs +0 -2
- package/lib/src/icon/index.cjs.map +0 -1
- package/lib/src/icon/src/icon.cjs +0 -2
- package/lib/src/icon/src/icon.cjs.map +0 -1
- package/lib/src/image-upload/index.cjs +0 -2
- package/lib/src/image-upload/index.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/image-upload/src/image-upload.vue3.cjs +0 -2
- package/lib/src/image-upload/src/image-upload.vue3.cjs.map +0 -1
- package/lib/src/make-installer.cjs +0 -2
- package/lib/src/make-installer.cjs.map +0 -1
- package/lib/src/message/src/message.cjs +0 -2
- package/lib/src/message/src/message.cjs.map +0 -1
- package/lib/src/photo-crop-tool/index.cjs +0 -2
- package/lib/src/photo-crop-tool/index.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/lib/src/tiny-mce-editor/index.cjs +0 -2
- package/lib/src/tiny-mce-editor/index.cjs.map +0 -1
- package/lib/src/tiny-mce-editor/src/tiny-mce-editor.vue.cjs +0 -2
- package/lib/src/tiny-mce-editor/src/tiny-mce-editor.vue.cjs.map +0 -1
- package/lib/src/tiny-mce-editor/src/tiny-mce-editor.vue2.cjs +0 -2
- package/lib/src/tiny-mce-editor/src/tiny-mce-editor.vue2.cjs.map +0 -1
- package/lib/src/ui/button/index.cjs +0 -2
- package/lib/src/ui/button/index.cjs.map +0 -1
- package/lib/src/ui/checkbox/index.cjs +0 -2
- package/lib/src/ui/checkbox/index.cjs.map +0 -1
- package/lib/src/ui/dialog/index.cjs +0 -2
- package/lib/src/ui/dialog/index.cjs.map +0 -1
- package/lib/src/ui/input/index.cjs +0 -2
- package/lib/src/ui/input/index.cjs.map +0 -1
- package/lib/src/ui/input-number/index.cjs +0 -2
- package/lib/src/ui/input-number/index.cjs.map +0 -1
- package/lib/src/ui/layout/index.cjs +0 -2
- package/lib/src/ui/layout/index.cjs.map +0 -1
- package/lib/src/ui/link/index.cjs +0 -2
- package/lib/src/ui/link/index.cjs.map +0 -1
- package/lib/src/ui/popover/index.cjs +0 -2
- package/lib/src/ui/popover/index.cjs.map +0 -1
- package/lib/src/ui/radio/index.cjs +0 -2
- package/lib/src/ui/radio/index.cjs.map +0 -1
- package/lib/src/ui/scrollbar/index.cjs +0 -2
- package/lib/src/ui/scrollbar/index.cjs.map +0 -1
- package/lib/src/ui/select/index.cjs +0 -2
- package/lib/src/ui/select/index.cjs.map +0 -1
- package/lib/src/ui/table/index.cjs +0 -2
- package/lib/src/ui/table/index.cjs.map +0 -1
- package/lib/src/ui/tag/index.cjs +0 -2
- package/lib/src/ui/tag/index.cjs.map +0 -1
- package/lib/src/withInstall.cjs +0 -2
- package/lib/src/withInstall.cjs.map +0 -1
- package/theme-chalk/index.css +0 -1
- package/theme-chalk/index.scss +0 -21
- package/theme-chalk/src/base.css +0 -1
- package/theme-chalk/src/base.scss +0 -16
- package/theme-chalk/src/common/qxs-components.css +0 -1
- package/theme-chalk/src/common/qxs-components.scss +0 -4
- package/theme-chalk/src/common/qxs-variables.css +0 -1
- package/theme-chalk/src/common/qxs-variables.scss +0 -81
- 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/dialog.css +0 -1
- package/theme-chalk/src/dialog.scss +0 -122
- package/theme-chalk/src/file-upload.css +0 -0
- package/theme-chalk/src/file-upload.scss +0 -7
- 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 -149
- 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 -78
- 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 -568
- 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 -42
- package/theme-chalk/src/tiny-mce-editor.css +0 -1
- package/theme-chalk/src/tiny-mce-editor.scss +0 -29
- package/theme-chalk/src/ui/button.css +0 -1
- package/theme-chalk/src/ui/button.scss +0 -173
- package/theme-chalk/src/ui/input.css +0 -1
- package/theme-chalk/src/ui/input.scss +0 -128
- package/theme-chalk/src/ui/table.css +0 -1
- package/theme-chalk/src/ui/table.scss +0 -166
- package/types/index.d.ts.map +0 -1
- package/types/src/alert/index.d.ts +0 -66
- package/types/src/alert/index.d.ts.map +0 -1
- package/types/src/alert/src/alert.d.ts +0 -73
- package/types/src/alert/src/alert.d.ts.map +0 -1
- package/types/src/components.d.ts +0 -15
- package/types/src/components.d.ts.map +0 -1
- package/types/src/data-chart/index.d.ts +0 -29
- package/types/src/data-chart/index.d.ts.map +0 -1
- 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/defaults.d.ts +0 -6
- package/types/src/defaults.d.ts.map +0 -1
- package/types/src/dialog/index.d.ts +0 -3
- package/types/src/dialog/index.d.ts.map +0 -1
- package/types/src/dialog/src/dialog.d.ts +0 -25
- package/types/src/dialog/src/dialog.d.ts.map +0 -1
- package/types/src/feedback-plugin/index.d.ts +0 -9
- package/types/src/feedback-plugin/index.d.ts.map +0 -1
- package/types/src/file-upload/index.d.ts +0 -19
- package/types/src/file-upload/index.d.ts.map +0 -1
- package/types/src/file-upload/src/file-upload.vue.d.ts +0 -34
- 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/icon/index.d.ts +0 -56
- package/types/src/icon/index.d.ts.map +0 -1
- package/types/src/icon/src/icon.d.ts +0 -62
- package/types/src/icon/src/icon.d.ts.map +0 -1
- package/types/src/image-upload/index.d.ts +0 -27
- package/types/src/image-upload/index.d.ts.map +0 -1
- package/types/src/image-upload/src/image-upload.vue.d.ts +0 -49
- package/types/src/image-upload/src/image-upload.vue.d.ts.map +0 -1
- package/types/src/make-installer.d.ts +0 -6
- package/types/src/make-installer.d.ts.map +0 -1
- package/types/src/message/index.d.ts +0 -3
- package/types/src/message/index.d.ts.map +0 -1
- package/types/src/message/src/message.d.ts +0 -21
- package/types/src/message/src/message.d.ts.map +0 -1
- package/types/src/message/src/toaster.vue.d.ts +0 -3
- package/types/src/message/src/toaster.vue.d.ts.map +0 -1
- package/types/src/photo-crop-tool/index.d.ts +0 -55
- package/types/src/photo-crop-tool/index.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-action/index.d.ts +0 -93
- package/types/src/subject-action/index.d.ts.map +0 -1
- package/types/src/subject-action/src/subject-action.vue.d.ts +0 -92
- package/types/src/subject-action/src/subject-action.vue.d.ts.map +0 -1
- package/types/src/subject-layout/index.d.ts +0 -30
- package/types/src/subject-layout/index.d.ts.map +0 -1
- package/types/src/subject-layout/src/subject-layout.vue.d.ts +0 -20
- package/types/src/subject-layout/src/subject-layout.vue.d.ts.map +0 -1
- package/types/src/subject-list/index.d.ts +0 -20
- package/types/src/subject-list/index.d.ts.map +0 -1
- package/types/src/subject-list/src/components/SubjectPageEnd.vue.d.ts +0 -24
- package/types/src/subject-list/src/components/SubjectPageEnd.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
- package/types/src/subject-list/src/components/subject-blank-fill.vue.d.ts +0 -32
- package/types/src/subject-list/src/components/subject-blank-fill.vue.d.ts.map +0 -1
- package/types/src/subject-list/src/components/subject-scale.vue.d.ts +0 -29
- package/types/src/subject-list/src/components/subject-scale.vue.d.ts.map +0 -1
- package/types/src/subject-list/src/components/subject-single.vue.d.ts +0 -37
- package/types/src/subject-list/src/components/subject-single.vue.d.ts.map +0 -1
- package/types/src/subject-list/src/components/subject-text-fill.vue.d.ts +0 -34
- package/types/src/subject-list/src/components/subject-text-fill.vue.d.ts.map +0 -1
- package/types/src/subject-list/src/subject-list.vue.d.ts +0 -21
- package/types/src/subject-list/src/subject-list.vue.d.ts.map +0 -1
- package/types/src/subject-type/index.d.ts +0 -8
- package/types/src/subject-type/index.d.ts.map +0 -1
- package/types/src/subject-type/src/subject-type.vue.d.ts +0 -7
- package/types/src/subject-type/src/subject-type.vue.d.ts.map +0 -1
- package/types/src/tiny-mce-editor/index.d.ts +0 -20
- package/types/src/tiny-mce-editor/index.d.ts.map +0 -1
- package/types/src/tiny-mce-editor/src/tiny-mce-editor.vue.d.ts +0 -32
- package/types/src/tiny-mce-editor/src/tiny-mce-editor.vue.d.ts.map +0 -1
- package/types/src/ui/button/index.d.ts +0 -96
- package/types/src/ui/button/index.d.ts.map +0 -1
- package/types/src/ui/checkbox/index.d.ts +0 -111
- package/types/src/ui/checkbox/index.d.ts.map +0 -1
- package/types/src/ui/dialog/index.d.ts +0 -134
- package/types/src/ui/dialog/index.d.ts.map +0 -1
- package/types/src/ui/index.d.ts +0 -16
- package/types/src/ui/index.d.ts.map +0 -1
- package/types/src/ui/input/index.d.ts +0 -132
- package/types/src/ui/input/index.d.ts.map +0 -1
- package/types/src/ui/input-number/index.d.ts +0 -106
- package/types/src/ui/input-number/index.d.ts.map +0 -1
- package/types/src/ui/layout/index.d.ts +0 -373
- package/types/src/ui/layout/index.d.ts.map +0 -1
- package/types/src/ui/link/index.d.ts +0 -57
- package/types/src/ui/link/index.d.ts.map +0 -1
- package/types/src/ui/popover/index.d.ts +0 -89
- package/types/src/ui/popover/index.d.ts.map +0 -1
- package/types/src/ui/radio/index.d.ts +0 -84
- package/types/src/ui/radio/index.d.ts.map +0 -1
- package/types/src/ui/scrollbar/index.d.ts +0 -35
- package/types/src/ui/scrollbar/index.d.ts.map +0 -1
- package/types/src/ui/select/index.d.ts +0 -113
- package/types/src/ui/select/index.d.ts.map +0 -1
- package/types/src/ui/table/index.d.ts +0 -152
- package/types/src/ui/table/index.d.ts.map +0 -1
- package/types/src/ui/tag/index.d.ts +0 -69
- package/types/src/ui/tag/index.d.ts.map +0 -1
- package/types/src/withInstall.d.ts +0 -4
- package/types/src/withInstall.d.ts.map +0 -1
- package/types/tsconfig.tsbuildinfo +0 -1
|
@@ -0,0 +1,1126 @@
|
|
|
1
|
+
import{Node as E,mergeAttributes as w,Editor as P}from"@tiptap/core";import V from"@tiptap/extension-blockquote";import F from"@tiptap/extension-bold";import H from"@tiptap/extension-bullet-list";import q from"@tiptap/extension-code";import z from"@tiptap/extension-document";import D from"@tiptap/extension-heading";import O from"@tiptap/extension-history";import j from"@tiptap/extension-horizontal-rule";import U from"@tiptap/extension-image";import W from"@tiptap/extension-italic";import N from"@tiptap/extension-link";import G from"@tiptap/extension-list-item";import K from"@tiptap/extension-ordered-list";import Y from"@tiptap/extension-paragraph";import X from"@tiptap/extension-placeholder";import J from"@tiptap/extension-strike";import{Table as Q}from"@tiptap/extension-table";import{TableCell as Z}from"@tiptap/extension-table-cell";import{TableHeader as ee}from"@tiptap/extension-table-header";import{TableRow as te}from"@tiptap/extension-table-row";import ie from"@tiptap/extension-text";import oe from"@tiptap/extension-text-align";import re from"@tiptap/extension-underline";import{css as ne,LitElement as se,html as l}from"lit";import{property as h,state as b}from"lit/decorators.js";import{transformIncomingContentByFormat as C,EMPTY_EDITOR_HTML as le,transformOutgoingContentByFormat as I}from"./content-format.mjs";import{parseEditorToolbarItems as M,SIMPLE_EDITOR_TOOLBAR as ae,DEFAULT_EDITOR_TOOLBAR as de}from"./toolbar.mjs";import{safeCustomElement as he}from"../base/define.mjs";var ce=Object.defineProperty,ue=Object.getOwnPropertyDescriptor,d=(e,t,i,o)=>{for(var r=o>1?void 0:o?ue(t,i):t,n=e.length-1,s;n>=0;n--)(s=e[n])&&(r=(o?s(t,i,r):s(r))||r);return o&&r&&ce(t,i,r),r};const S=560,v=24,k="输入内容",L="输入 / 唤出快捷命令",A="80px",pe={image:"插入图片",link:"插入链接"},be=new Set(["bold","italic","underline","strike","code","link","image","bulletList","orderedList","taskList","blockquote","table"]),ge=E.create({name:"taskList",group:"block list",content:"taskItem+",defining:!0,parseHTML(){return[{tag:'ul[data-type="taskList"]'}]},renderHTML({HTMLAttributes:e}){return["ul",w(e,{"data-type":"taskList"}),0]},addCommands(){return{toggleTaskList:()=>({commands:e})=>e.toggleList(this.name,"taskItem")}}}),me=E.create({name:"taskItem",defining:!0,content:"paragraph block*",addAttributes(){return{checked:{default:!1,parseHTML:e=>e.getAttribute("data-checked")==="true",renderHTML:e=>({"data-checked":String(!!e.checked)})}}},parseHTML(){return[{tag:'li[data-type="taskItem"]'}]},renderHTML({HTMLAttributes:e}){const t=!!e.checked;return["li",w(e,{"data-type":"taskItem"}),["label",{contenteditable:"false"},["input",{type:"checkbox",checked:t?"checked":null}],["span"]],["div",0]]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),fe=G.extend({addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),_e=U.extend({addAttributes(){return{...this.parent?.(),width:{default:null,parseHTML:e=>{const t=e.getAttribute("width"),i=Number(t);return Number.isFinite(i)&&i>0?i:null},renderHTML:e=>e.width?{width:String(e.width)}:{}},align:{default:"left",parseHTML:e=>e.getAttribute("data-align")||"left",renderHTML:e=>e.align?{"data-align":String(e.align)}:{}}}},renderHTML({HTMLAttributes:e}){const t=Number(e.width),i=["max-width:100%","height:auto",Number.isFinite(t)&&t>0?`width:${t}px`:"",e.style||""].filter(Boolean).join(";");return["img",w(this.options.HTMLAttributes,e,{style:i})]}});let a=class extends se{constructor(){super(...arguments),this.content="",this["model-value"]="",this.placeholder=k,this["toolbar-mode"]="header",this.toolbar="",this["toolbar-preset"]="full",this["header-toolbar-labels"]=pe,this._lastInvalidHeaderToolbarLabelsSource=void 0,this["header-always-visible"]="true",this["use-model"]="false",this.readonly="false",this.preview="false",this.editable=null,this["min-height"]=A,this["max-height"]="",this["show-character-count"]="false",this["toolbar-position"]="top",this["custom-styles"]="",this["content-format"]="html",this["deserialize-content"]=null,this["serialize-content"]=null,this._injectedStyleEl=null,this["upload-image"]=async e=>new Promise((t,i)=>{const o=new FileReader;o.onload=r=>t(r.target?.result),o.onerror=i,o.readAsDataURL(e)}),this._editor=null,this._pendingContent=null,this._tableRows=3,this._tableCols=3,this._hoverRow=0,this._hoverCol=0,this._tableDropdownOpen=!1,this._tableCellToolbar={x:0,y:0,visible:!1,cellRow:0,cellCol:0},this._imageToolbar={x:0,y:0,visible:!1},this._linkEditor={x:0,y:0,visible:!1,url:"",label:""},this._isEditorFocused=!1,this._selectedImage=null,this._hasSlashCommand=!1,this._slashCommandRange=null,this._slashInlineMarkState=null,this._isComposingText=!1,this._isUpdating=!1,this._pendingImageInsertPos=null,this._linkSelection=null,this._preserveFocusOnInternalClick=!1,this._tableEdgeDetectionSetup=!1,this._handleCompositionStart=()=>{this._isComposingText=!0},this._handleCompositionEnd=()=>{this._isComposingText=!1,requestAnimationFrame(()=>{this._syncSlashInlineMarkState(),this._restoreSlashInlineMarkIfNeeded()})}}_injectCustomStyles(){const e=this.shadowRoot;if(!e||(this._injectedStyleEl&&(this._injectedStyleEl.remove(),this._injectedStyleEl=null),!this["custom-styles"]))return;const t=document.createElement("style");t.textContent=this["custom-styles"],e.appendChild(t),this._injectedStyleEl=t}get _useModelValue(){return this["use-model"]===!0||this["use-model"]==="true"||this["use-model"]===""||this.hasAttribute("use-model")}get _readonlyValue(){return this.readonly!==!1&&this.readonly!=="false"}get _previewValue(){return this.preview!==!1&&this.preview!=="false"}get _editableValue(){return this.editable===null||this.editable===void 0?null:this.editable!==!1&&this.editable!=="false"}get _isEditable(){return this._previewValue?!1:this._editableValue!==null?this._editableValue:!this._readonlyValue}get _toolbarModeValue(){return this["toolbar-mode"]==="header"?"header":"slash"}get _headerAlwaysVisibleValue(){return this["header-always-visible"]===!0||this["header-always-visible"]==="true"||this["header-always-visible"]===""||this.hasAttribute("header-always-visible")}get _toolbarPositionValue(){return this["toolbar-position"]==="bottom"?"bottom":"top"}get _toolbarPresetValue(){return this["toolbar-preset"]==="simple"?"simple":this["toolbar-preset"]==="none"?"none":"full"}get _contentFormatValue(){return this["content-format"]==="markdown"?"markdown":this["content-format"]==="custom"?"custom":"html"}get _showCharacterCountValue(){return this["show-character-count"]===!0||this["show-character-count"]==="true"||this["show-character-count"]===""||this.hasAttribute("show-character-count")}get _resolvedMinHeight(){return this["min-height"]?.trim()||A}get _resolvedMaxHeight(){return this["max-height"]?.trim()||"none"}get _wrapperStyleValue(){const e=this["max-height"]?.trim()?"auto":"visible";return[`--qxs-editor-min-height: ${this._resolvedMinHeight}`,`--qxs-editor-max-height: ${this._resolvedMaxHeight}`,`--qxs-editor-overflow-y: ${e}`].join("; ")}get _resolvedPlaceholder(){return this.placeholder&&this.placeholder!==k&&this.placeholder!==L?this.placeholder:this._toolbarModeValue==="header"?k:L}get _toolbarItemsValue(){return Array.isArray(this.toolbar)?M(this.toolbar):typeof this.toolbar=="string"&&this.toolbar.trim()?M(this.toolbar):this._toolbarPresetValue==="simple"?[...ae]:this._toolbarPresetValue==="none"?[]:[...de]}_hasToolbarItem(e){return this._toolbarItemsValue.includes(e)}get _headerToolbarLabelsValue(){const e=this["header-toolbar-labels"];if(!e)return{};let t=e;if(typeof e=="string"){if(e==="[object Object]")return this._warnInvalidHeaderToolbarLabels(e,'received "[object Object]"; Vue hosts should pass object values with `.prop`, for example `:header-toolbar-labels.prop="headerToolbarLabels"`'),{};try{t=JSON.parse(e)}catch(o){return this._warnInvalidHeaderToolbarLabels(e,"parse failed, fallback to empty map",o),{}}}if(!t||typeof t!="object"||Array.isArray(t))return{};const i={};for(const[o,r]of Object.entries(t))be.has(o)&&typeof r=="string"&&r.trim()&&(i[o]=r.trim());return i}_warnInvalidHeaderToolbarLabels(e,t,i){this._lastInvalidHeaderToolbarLabelsSource!==e&&(this._lastInvalidHeaderToolbarLabelsSource=e)}_getHeaderToolbarLabel(e){return this._toolbarModeValue!=="header"?"":this._headerToolbarLabelsValue[e]||""}_renderToolbarButton(e,t){const i=this._getHeaderToolbarLabel(e),o=["bubble-btn",t.active?"is-active":"",t.danger?"danger":"",i?"has-label":""].filter(Boolean).join(" ");return l`
|
|
2
|
+
<button class=${o} @click=${t.onClick} title=${t.title}>
|
|
3
|
+
${t.icon}
|
|
4
|
+
${i?l`<span class="bubble-btn__label">${i}</span>`:null}
|
|
5
|
+
</button>
|
|
6
|
+
`}_transformIncomingContent(e){const t=e||"",i=this["deserialize-content"];if(!i)return C(t,this._contentFormatValue);try{return i(t)||le}catch{return C(t,this._contentFormatValue)}}_transformOutgoingContent(e){const t=this["serialize-content"];if(!t)return I(e,this._contentFormatValue);try{return t(e)}catch{return I(e,this._contentFormatValue)}}_getEditorCharacterCount(){return this._editor?.getText().length??0}_initEditor(){if(this._editor)return;const e=this.shadowRoot?.querySelector(".editor-content");if(!e){requestAnimationFrame(()=>this._initEditor());return}for(;e.firstChild;)e.removeChild(e.firstChild);const t=this._useModelValue,i=this.getAttribute("model-value")??this["model-value"],o=this.content,r=t?this._transformIncomingContent(this._pendingContent??i):this._transformIncomingContent(this._pendingContent??o),n=[z,Y,ie,F,W,re,J,q,D.configure({levels:[1,2,3]}),H,K,ge,me,fe,V,j,O,_e.configure({inline:!1,allowBase64:!0}),N.extend({inclusive:!1}).configure({openOnClick:!1,HTMLAttributes:{rel:"noopener noreferrer"}}),oe.configure({types:["heading","paragraph"]}),Q.configure({resizable:!0}),te,Z,ee,X.configure({placeholder:this._resolvedPlaceholder})];this._editor=new P({element:e,extensions:n,editable:this._isEditable,content:r}),this._editor.view.dom.addEventListener("compositionstart",this._handleCompositionStart),this._editor.view.dom.addEventListener("compositionend",this._handleCompositionEnd),this._pendingContent=null,this._editor.on("selectionUpdate",()=>{this._syncSlashInlineMarkState(),this._restoreSlashInlineMarkIfNeeded(),this._toolbarModeValue==="slash"&&this._updateBubbleMenuPosition(),this._editor?.isActive("table")?this._showTableCellToolbar():this._hideTableCellToolbar(),this._syncImageSelectionState()}),this._editor.on("transaction",()=>{this._editor?.isActive("table")?this._showTableCellToolbar():this._hideTableCellToolbar(),this._checkSlashCommand(),this._syncSlashInlineMarkState(),this._restoreSlashInlineMarkIfNeeded(),this._setupTableEdgeDetection(),this._syncImageSelectionState()}),this._editor.on("update",()=>{this._emitContentChange()})}_toggleTaskItemChecked(e){const t=e.target,i=this._editor;if(!(t instanceof HTMLInputElement)||t.type!=="checkbox"||!i)return;const o=t.closest('li[data-type="taskItem"]');if(!o)return;e.preventDefault(),e.stopPropagation();const r=i.view.posAtDOM(o,0),n=Math.max(0,r-2),s=Math.min(i.state.doc.content.size,r+2);let c=null;if(i.state.doc.nodesBetween(n,s,(g,p)=>{if(g.type.name==="taskItem")return c=p,!1}),c===null)return;const u=i.state.doc.nodeAt(c);!u||u.type.name!=="taskItem"||i.view.dispatch(i.state.tr.setNodeMarkup(c,void 0,{...u.attrs,checked:!u.attrs.checked}))}_emitContentChange(){if(!this._editor)return;const e=this.getContentSnapshot();this._showCharacterCountValue&&this.requestUpdate(),this.dispatchEvent(new CustomEvent("content-update",{detail:e,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("content-change",{detail:e.value,bubbles:!0,composed:!0}))}_setupTableEdgeDetection(){const e=this.shadowRoot?.querySelector(".editor-content"),t=this.shadowRoot?.querySelector(".editor-wrapper");if(!e||this._tableEdgeDetectionSetup)return;this._tableEdgeDetectionSetup=!0;const i=o=>{this._toggleTaskItemChecked(o);const r=o.target;r instanceof Element&&r.closest(".editor-header, .bubble-menu, .table-cell-toolbar, .image-toolbar, .link-editor")||this._isEditable&&this._editor?.chain().focus().run()};e.addEventListener("click",i),t?.addEventListener("click",i)}_handleWrapperFocusIn(){this._preserveFocusOnInternalClick=!1,this._isEditorFocused=!0}_handleHeaderToolbarMouseDown(e){if(!this._isEditable)return;const t=e.target;!(t instanceof Element)||!t.closest("button, .bubble-dropdown, .table-cell")||(e.preventDefault(),this._preserveFocusOnInternalClick=!0,requestAnimationFrame(()=>{this._preserveFocusOnInternalClick=!1}))}_handleWrapperMouseDown(e){const t=e.target;!this._isEditable||!(t instanceof Element)||t.closest(".editor-header, .bubble-menu, .table-cell-toolbar, .image-toolbar, .link-editor")||(this._preserveFocusOnInternalClick=!0,requestAnimationFrame(()=>{this._preserveFocusOnInternalClick=!1}))}_handleWrapperFocusOut(e){const t=e.relatedTarget,i=this.shadowRoot?.querySelector(".editor-wrapper");this._preserveFocusOnInternalClick||t&&i?.contains(t)||(this._isEditorFocused=!1,this._tableDropdownOpen=!1,this._selectedImage=null,this._hideImageToolbar(),this._closeLinkEditor())}_isHeaderVisible(){return this._toolbarModeValue==="header"&&!this._previewValue&&(this._headerAlwaysVisibleValue||this._isEditorFocused||this._tableDropdownOpen||!!this._selectedImage)}_getImageSelection(){const e=this._editor,t=e?.state.selection;return!e||!t?.node||t.node.type?.name!=="image"?null:{pos:t.from,attrs:t.node.attrs??{}}}_getImageMaxWidth(){const t=(this.shadowRoot?.querySelector(".editor-content")?.clientWidth??S)-32;return Math.max(v,Math.min(S,t))}async _getImageNaturalWidth(e){return await new Promise(t=>{const i=URL.createObjectURL(e),o=new window.Image;o.onload=()=>{const r=o.naturalWidth;URL.revokeObjectURL(i),t(Number.isFinite(r)&&r>0?r:null)},o.onerror=()=>{URL.revokeObjectURL(i),t(null)},o.src=i})}_syncImageSelectionState(){const e=this._getImageSelection();if(!e){this._selectedImage=null,this._toolbarModeValue==="slash"&&this._hideImageToolbar();return}const t=Number(e.attrs.width),i=String(e.attrs.align||"left");if(this._selectedImage={pos:e.pos,width:Number.isFinite(t)&&t>0?t:this._getImageMaxWidth(),align:i},this._toolbarModeValue!=="slash"){this._hideImageToolbar();return}const o=this._editor,r=this.shadowRoot?.querySelector(".editor-wrapper")?.getBoundingClientRect();if(!o||!r)return;const n=o.view.coordsAtPos(e.pos),s=n.left-r.left+(n.right-n.left)/2,c=n.top-r.top-40;this._showImageToolbar({x:s,y:c})}_clearSlashCommandText(){if(!this._editor||!this._slashCommandRange)return;const{from:e,to:t}=this._slashCommandRange;this._editor.chain().focus().deleteRange({from:e,to:t}).run(),this._hasSlashCommand=!1,this._slashCommandRange=null}_checkSlashCommand(){if(!this._editor)return;const{selection:e}=this._editor.state;if(!e.empty){this._hasSlashCommand=!1,this._slashCommandRange=null;return}const{$from:t}=e,i=t.parent.textBetween(0,t.parentOffset," "," "),o=/(?:^|\s)(\/\S*)$/.exec(i);if(!o){this._hasSlashCommand=!1,this._slashCommandRange=null;return}const r=o[1];this._hasSlashCommand=!0,this._slashCommandRange={from:e.from-r.length,to:e.from}}firstUpdated(){this._injectCustomStyles(),queueMicrotask(()=>{this.isConnected&&this._initEditor()})}updated(e){if(e.has("custom-styles")&&this._injectCustomStyles(),this._editor){if(e.has("content")||e.has("model-value")&&this._useModelValue||e.has("deserialize-content")||e.has("content-format")){const t=this._useModelValue?this["model-value"]:this.content,i=this._transformIncomingContent(t);!(!(e.has("deserialize-content")||e.has("content-format"))&&(t??"")===this.getContent())&&i!==this._editor.getHTML()&&this._editor.commands.setContent(i)}(e.has("readonly")||e.has("preview")||e.has("editable"))&&this._editor.setEditable(this._isEditable);return}e.has("content")&&(this._pendingContent=this.content),e.has("model-value")&&this._useModelValue&&(this._pendingContent=this["model-value"])}disconnectedCallback(){super.disconnectedCallback();const e=this._editor?.view?.dom;e?.removeEventListener("compositionstart",this._handleCompositionStart),e?.removeEventListener("compositionend",this._handleCompositionEnd),this._editor?.destroy(),this._editor=null}getContent(){return this.getContentSnapshot().value}getContentSnapshot(){const e=this._editor?.getHTML()??"",t=this._editor?.getText().trim()??"";return{value:e?this._transformOutgoingContent(e):"",html:e,text:t,format:this._contentFormatValue}}forceUpdate(){if(this.requestUpdate(),this._editor){const e=this._transformIncomingContent(this._useModelValue?this["model-value"]:this.content);e!==this._editor.getHTML()&&this._editor.commands.setContent(e)}}_applyFormat(e){this._clearSlashCommandText(),this._clearSlashInlineMarkState(!0),e()}_getCurrentLineStart(e){const{selection:t}=e.state;return t.empty?t.$from.start():null}_getSlashCommandContext(){const e=this._editor,t=this._slashCommandRange;return!e||!t?null:{lineFrom:e.state.doc.resolve(t.from).start(),lineTo:t.from}}_clearSlashInlineMarkState(e=!1){const t=this._editor,i=this._slashInlineMarkState;if(!t||!i)return;const{selection:o}=t.state,r=this._getCurrentLineStart(t);if(!e&&r===i.lineStart&&o.empty&&o.to>=i.startPos)return;this._slashInlineMarkState=null;const n=t.state.selection.to;let s=t.chain().focus().setTextSelection({from:n,to:n});switch(i.type){case"bold":s=s.unsetBold();break;case"italic":s=s.unsetItalic();break;case"underline":s=s.unsetUnderline();break;case"strike":s=s.unsetStrike();break;case"code":s=s.unsetCode();break}s.run()}_runInlineMarkAction(e,t,i){switch(e){case"bold":return i==="set"?t.setBold():t.unsetBold();case"italic":return i==="set"?t.setItalic():t.unsetItalic();case"underline":return i==="set"?t.setUnderline():t.unsetUnderline();case"strike":return i==="set"?t.setStrike():t.unsetStrike();case"code":return i==="set"?t.setCode():t.unsetCode()}}_syncSlashInlineMarkState(){if(!(!this._slashInlineMarkState||!this._editor)&&!this._isComposingText){if(this._shouldEndSlashInlineMarkAtCursor()){this._clearSlashInlineMarkState(!0);return}this._clearSlashInlineMarkState()}}_shouldEndSlashInlineMarkAtCursor(){const e=this._editor,t=this._slashInlineMarkState;if(!e||!t)return!1;const{selection:i}=e.state,o=this._getCurrentLineStart(e);if(!i.empty||o!==t.lineStart||i.to<=t.startPos)return!1;const r=e.state.doc.textBetween(i.to-1,i.to,`
|
|
7
|
+
`,`
|
|
8
|
+
`);return/\s/.test(r)}_hasInlineMarkAtCursor(e){const t=this._editor;if(!t)return!1;const i=t.schema.marks[e];if(!i)return!1;const{selection:o,storedMarks:r}=t.state;return o.empty?(r??o.$from.marks()).some(s=>s.type===i):!1}_restoreSlashInlineMarkIfNeeded(){const e=this._editor,t=this._slashInlineMarkState;if(!e||!t)return;const{selection:i}=e.state,o=this._getCurrentLineStart(e);if(!i.empty||o!==t.lineStart||i.to<t.startPos||this._hasInlineMarkAtCursor(t.type))return;const r=e.state.selection.to;this._runInlineMarkAction(t.type,e.chain().focus().setTextSelection({from:r,to:r}),"set").run()}_setInlineMarkState(e,t){const i=this._getCurrentLineStart(this._editor);this._slashInlineMarkState=i===null?null:{type:e,lineStart:i,startPos:t}}_applyInlineMarkToCurrentLine(e,t){const i=this._editor;if(!i)return!1;const{selection:o}=i.state;if(!o.empty)return this._runInlineMarkAction(e,i.chain().focus().setTextSelection({from:o.from,to:o.to}),t).run(),t==="unset"&&this._clearSlashInlineMarkState(!0),!0;const r=o.from,n=i.state.doc.resolve(r),s={from:n.start(),to:n.end()};return this._clearSlashInlineMarkState(!0),s.from<s.to&&this._runInlineMarkAction(e,i.chain().focus().setTextSelection(s),t).run(),this._runInlineMarkAction(e,i.chain().focus().setTextSelection({from:r,to:r}),t).run(),t==="set"&&this._setInlineMarkState(e,r),!0}_toggleToolbarInlineMark(e){return this._applyInlineMarkToCurrentLine(e,this._hasInlineMarkAtCursor(e)?"unset":"set")}_applySlashInlineMark(e){const t=this._editor,i=this._getSlashCommandContext();if(!t||!i)return!1;this._clearSlashCommandText(),this._clearSlashInlineMarkState(!0);const o=t.state.selection.to,r={from:i.lineFrom,to:t.state.doc.resolve(o).end()};return r.from<r.to&&this._runInlineMarkAction(e,t.chain().focus().setTextSelection(r),"set").run(),this._runInlineMarkAction(e,t.chain().focus().setTextSelection({from:o,to:o}),"set").run(),this._setInlineMarkState(e,o),!0}_applySlashLineBlock(e){const t=this._editor,i=this._getSlashCommandContext();return!t||!i?!1:(this._clearSlashCommandText(),e(t.chain().focus().setTextSelection({from:i.lineFrom,to:i.lineTo})).run(),!0)}_toggleBold(){this._applySlashInlineMark("bold")||this._toggleToolbarInlineMark("bold")}_toggleItalic(){this._applySlashInlineMark("italic")||this._toggleToolbarInlineMark("italic")}_toggleUnderline(){this._applySlashInlineMark("underline")||this._toggleToolbarInlineMark("underline")}_toggleStrike(){this._applySlashInlineMark("strike")||this._toggleToolbarInlineMark("strike")}_toggleCode(){this._applySlashInlineMark("code")||this._toggleToolbarInlineMark("code")}_setHeading(e){this._applySlashLineBlock(t=>t.setHeading({level:e}))||this._applyFormat(()=>this._editor?.chain().focus().toggleHeading({level:e}).run())}_setParagraph(){this._applySlashLineBlock(e=>e.setParagraph())||this._applyFormat(()=>this._editor?.chain().focus().setParagraph().run())}_toggleBulletList(){this._applySlashLineBlock(e=>e.toggleBulletList())||this._applyFormat(()=>this._editor?.chain().focus().toggleBulletList().run())}_toggleOrderedList(){this._applySlashLineBlock(e=>e.toggleOrderedList())||this._applyFormat(()=>this._editor?.chain().focus().toggleOrderedList().run())}_toggleTaskList(){this._applySlashLineBlock(e=>e.toggleTaskList())||this._applyFormat(()=>this._editor?.chain().focus().toggleTaskList().run())}_toggleBlockquote(){this._applySlashLineBlock(e=>e.toggleBlockquote())||this._applyFormat(()=>this._editor?.chain().focus().toggleBlockquote().run())}_setTextAlign(e){this._applySlashLineBlock(t=>t.setTextAlign(e))||this._applyFormat(()=>this._editor?.chain().focus().setTextAlign(e).run())}_normalizeLinkUrl(e){const t=e.trim();return t?/^(https?:\/\/|mailto:|tel:|#|\/)/i.test(t)?t:`https://${t}`:""}_getLinkLabelFromRange(e){const t=this._editor;return!t||!e||e.from>=e.to?"":t.state.doc.textBetween(e.from,e.to,"")}_getLinkTargetRange(){const e=this._editor;if(!e)return null;const{selection:t}=e.state;if(!t.empty)return{from:t.from,to:t.to};if(e.isActive("link"))return e.chain().focus().extendMarkRange("link").run(),{from:e.state.selection.from,to:e.state.selection.to};const i=e.state.doc.resolve(t.from);return{from:i.start(),to:i.end()}}_setLink(e){const t=this._editor,i=this.shadowRoot?.querySelector(".editor-wrapper"),o=e.currentTarget instanceof HTMLElement?e.currentTarget:null;if(!t||!i||!o)return;const r=this._getLinkTargetRange();this._linkSelection=r;const n=i.getBoundingClientRect(),s=o.getBoundingClientRect(),c=Math.max(12,n.width-332),u=Math.min(Math.max(12,s.left-n.left),c),g=s.bottom-n.top+8,p=String(t.getAttributes("link").href||""),m=this._getLinkLabelFromRange(r);this._linkEditor={x:u,y:g,visible:!0,url:p,label:m},this.updateComplete.then(()=>{const f=this.shadowRoot?.querySelector('.link-editor__input[data-field="url"]');f?.focus(),f?.select()})}_closeLinkEditor(){this._linkEditor={...this._linkEditor,visible:!1}}_handleLinkEditorInput(e){const t=e.target,i=t.dataset.field==="label"?"label":"url";this._linkEditor={...this._linkEditor,[i]:t.value}}_applyLink(){const e=this._editor,t=this._normalizeLinkUrl(this._linkEditor.url),i=this._linkEditor.label.trim()||t;if(!e||!t)return;this._clearSlashCommandText();const o=this._linkSelection??this._getLinkTargetRange()??e.state.selection,r=o.from+i.length;e.chain().focus().insertContentAt({from:o.from,to:o.to},{type:"text",text:i,marks:[{type:"link",attrs:{href:t}}]}).setTextSelection({from:r,to:r}).run(),this._closeLinkEditor()}_removeLink(){const e=this._editor;if(!e)return;const t=this._linkSelection??e.state.selection;let i=e.chain().focus();t.from!==t.to&&(i=i.setTextSelection(t)),i.extendMarkRange("link").unsetLink().run(),this._closeLinkEditor()}_handleLinkEditorKeydown(e){if(e.key==="Enter"){e.preventDefault(),this._applyLink();return}e.key==="Escape"&&(e.preventDefault(),this._closeLinkEditor())}_insertTable(e,t){this._editor?.chain().focus().insertTable({rows:e??this._tableRows,cols:t??this._tableCols,withHeaderRow:!0}).run()}async _handleImageUpload(e){const t=e.target,i=Array.from(t.files??[]);if(!i.length){t.value="";return}this._clearSlashCommandText();let o=this._pendingImageInsertPos!==null?{from:this._pendingImageInsertPos,to:this._pendingImageInsertPos}:this._editor?{from:this._editor.state.selection.from,to:this._editor.state.selection.to}:null;this._pendingImageInsertPos=null;for(const r of i)try{const n=await this._getImageNaturalWidth(r),s=await this["upload-image"](r),c=n?Math.min(n,this._getImageMaxWidth()):this._getImageMaxWidth();if(!o&&this._editor&&(o={from:this._editor.state.selection.from,to:this._editor.state.selection.to}),!o)continue;const u=this._insertImageAt(o,{src:s,width:c,align:"left"});o={from:u,to:u}}catch(n){const s=n instanceof Error?n:new Error("图片上传失败");this.dispatchEvent(new CustomEvent("image-upload-error",{detail:{file:r,error:s},bubbles:!0,composed:!0}))}t.value=""}_triggerImageUpload(){this._clearSlashCommandText();const e=this.shadowRoot?.querySelector(".image-input");if(!e)return;e.value="";const t=e;if(typeof t.showPicker=="function")try{t.showPicker();return}catch{}e.click()}_insertTableByClick(e,t){this._clearSlashCommandText(),this._tableRows=e,this._tableCols=t,this._insertTable(e,t)}_showTableCellToolbar(){if(!this._editor?.isActive("table"))return;const{state:e}=this._editor,{selection:t}=e,i=this._editor.view.coordsAtPos(t.from),o=this.shadowRoot?.querySelector(".editor-wrapper");if(!o)return;const r=o.getBoundingClientRect(),n=this._getTableCellRow(),s=this._getTableCellCol();!(n===0)&&!(s===0)||requestAnimationFrame(()=>{this._tableCellToolbar={x:i.left-r.left,y:i.bottom-r.top+8,visible:!0,cellRow:n,cellCol:s}})}_getTableCellRow(){if(!this._editor)return 0;const{selection:e}=this._editor.state,t=this._editor.state.doc.resolve(e.from);for(let i=t.depth;i>0;i--)if(t.node(i).type.name==="tableCell")return t.index(i-1);return 0}_getTableCellCol(){if(!this._editor)return 0;const{selection:e}=this._editor.state,t=this._editor.state.doc.resolve(e.from);for(let i=t.depth;i>0;i--)if(t.node(i).type.name==="tableCell")return t.index(i);return 0}_hideTableCellToolbar(){requestAnimationFrame(()=>{this._tableCellToolbar={...this._tableCellToolbar,visible:!1}})}_addTableRowAbove(){this._editor?.chain().focus().addRowBefore().run(),this._hideTableCellToolbar()}_addTableRowBelow(){this._editor?.chain().focus().addRowAfter().run(),this._hideTableCellToolbar()}_addTableColumnLeft(){this._editor?.chain().focus().addColumnBefore().run(),this._hideTableCellToolbar()}_addTableColumnRight(){this._editor?.chain().focus().addColumnAfter().run(),this._hideTableCellToolbar()}_deleteTableRow(){this._editor?.chain().focus().deleteRow().run(),this._hideTableCellToolbar()}_deleteTableColumn(){this._editor?.chain().focus().deleteColumn().run(),this._hideTableCellToolbar()}_deleteTable(){this._editor?.chain().focus().deleteTable().run(),this._hideTableCellToolbar()}_showImageToolbar(e){requestAnimationFrame(()=>{this._imageToolbar={x:e.x,y:e.y,visible:!0}})}_hideImageToolbar(){requestAnimationFrame(()=>{this._imageToolbar={...this._imageToolbar,visible:!1}})}_deleteImage(){const e=this._getSelectedImageNode();if(!e)return;const{editor:t,pos:i,node:o}=e;t.view.dispatch(t.state.tr.delete(i,i+o.nodeSize)),this._selectedImage=null,this._pendingImageInsertPos=null,this._hideImageToolbar()}_insertImageAfter(){const e=this._getSelectedImageNode();if(!e){this._triggerImageUpload();return}this._pendingImageInsertPos=e.pos+e.node.nodeSize,this._triggerImageUpload()}_getSelectedImageNode(){const e=this._editor,t=this._selectedImage?.pos;if(!e||t===void 0)return null;const i=e.state.doc.nodeAt(t);return!i||i.type.name!=="image"?null:{editor:e,pos:t,node:i}}_insertImageAt(e,t){const i=this._editor;if(!i)return 0;const o=typeof e=="number"?{from:Math.max(0,Math.min(e,i.state.doc.content.size)),to:Math.max(0,Math.min(e,i.state.doc.content.size))}:{from:Math.max(0,Math.min(e.from,i.state.doc.content.size)),to:Math.max(0,Math.min(e.to,i.state.doc.content.size))},r=o.from,n=i.chain().focus();if(typeof n.insertContentAt=="function"){let s=n.insertContentAt(o,{type:"image",attrs:t});typeof s?.setNodeSelection=="function"&&(s=s.setNodeSelection(r)),s.run();const c=i.state.doc.nodeAt(r)?.nodeSize??1;return r+c}return typeof n.setImage=="function"?(n.setImage(t).run(),r+1):r}_updateSelectedImageAttributes(e){const t=this._getSelectedImageNode();if(!t)return;const{editor:i,pos:o,node:r}=t;i.view.dispatch(i.state.tr.setNodeMarkup(o,void 0,{...r.attrs,...e}))}_setImageWidth(e){const t=Math.max(v,Math.min(this._getImageMaxWidth(),Math.round(e)));this._updateSelectedImageAttributes({width:t})}_handleImageWidthInput(e){const t=e.target.value.trim();if(!t)return;const i=Number(t);Number.isFinite(i)&&this._setImageWidth(i)}_setImageAlignLeft(){this._updateSelectedImageAttributes({align:"left"})}_setImageAlignCenter(){this._updateSelectedImageAttributes({align:"center"})}_setImageAlignRight(){this._updateSelectedImageAttributes({align:"right"})}_getTextLabel(){const e=this._editor;return e?e.isActive("heading",{level:1})?"标题 1":e.isActive("heading",{level:2})?"标题 2":e.isActive("heading",{level:3})?"标题 3":"正文":"正文"}_getAlignLabel(){const e=this._editor;return e?e.isActive({textAlign:"center"})?"居中":e.isActive({textAlign:"right"})?"右对齐":"左对齐":"对齐"}_renderImageControls(){const e=this._selectedImage;return e?l`
|
|
9
|
+
<button class="bubble-btn danger" title="删除图片" @click=${this._deleteImage}>
|
|
10
|
+
<svg viewBox="0 0 24 24"><polyline points="3 6 5 6 21 6"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/></svg>
|
|
11
|
+
</button>
|
|
12
|
+
<button class="bubble-btn" title="添加图片" @click=${this._insertImageAfter}>
|
|
13
|
+
<svg viewBox="0 0 24 24"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>
|
|
14
|
+
</button>
|
|
15
|
+
<div class="bubble-divider"></div>
|
|
16
|
+
<span class="image-control-label">对齐</span>
|
|
17
|
+
<button class="bubble-btn ${e.align==="left"?"is-active":""}" title="左对齐" @click=${this._setImageAlignLeft}>
|
|
18
|
+
<svg viewBox="0 0 24 24"><line x1="3" y1="6" x2="21" y2="6"/><line x1="3" y1="12" x2="15" y2="12"/><line x1="3" y1="18" x2="18" y2="18"/></svg>
|
|
19
|
+
</button>
|
|
20
|
+
<button class="bubble-btn ${e.align==="center"?"is-active":""}" title="居中" @click=${this._setImageAlignCenter}>
|
|
21
|
+
<svg viewBox="0 0 24 24"><line x1="3" y1="6" x2="21" y2="6"/><line x1="6" y1="12" x2="18" y2="12"/><line x1="4" y1="18" x2="20" y2="18"/></svg>
|
|
22
|
+
</button>
|
|
23
|
+
<button class="bubble-btn ${e.align==="right"?"is-active":""}" title="右对齐" @click=${this._setImageAlignRight}>
|
|
24
|
+
<svg viewBox="0 0 24 24"><line x1="3" y1="6" x2="21" y2="6"/><line x1="9" y1="12" x2="21" y2="12"/><line x1="6" y1="18" x2="21" y2="18"/></svg>
|
|
25
|
+
</button>
|
|
26
|
+
<div class="image-size-control">
|
|
27
|
+
<span class="image-size-label">宽度</span>
|
|
28
|
+
<input
|
|
29
|
+
class="image-size-range"
|
|
30
|
+
type="number"
|
|
31
|
+
min="${v}"
|
|
32
|
+
max="${this._getImageMaxWidth()}"
|
|
33
|
+
.value=${String(e.width)}
|
|
34
|
+
@input=${this._handleImageWidthInput}
|
|
35
|
+
/>
|
|
36
|
+
</div>
|
|
37
|
+
`:""}_joinToolbarGroups(e){return e.flatMap((t,i)=>i===0?[t]:[l`<div class="bubble-divider"></div>`,t])}_renderFormatToolbarGroup(e){return l`
|
|
38
|
+
${this._renderToolbarButton("bold",{title:"加粗",active:e?.isActive("bold"),onClick:this._toggleBold,icon:l`<svg viewBox="0 0 24 24"><path d="M6 4h8a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"/><path d="M6 12h9a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"/></svg>`})}
|
|
39
|
+
${this._renderToolbarButton("italic",{title:"斜体",active:e?.isActive("italic"),onClick:this._toggleItalic,icon:l`<svg viewBox="0 0 24 24"><line x1="19" y1="4" x2="10" y2="4"/><line x1="14" y1="20" x2="5" y2="20"/><line x1="15" y1="4" x2="9" y2="20"/></svg>`})}
|
|
40
|
+
${this._renderToolbarButton("underline",{title:"下划线",active:e?.isActive("underline"),onClick:this._toggleUnderline,icon:l`<svg viewBox="0 0 24 24"><path d="M6 3v7a6 6 0 0 0 6 6 6 6 0 0 0 6-6V3"/><line x1="4" y1="21" x2="20" y2="21"/></svg>`})}
|
|
41
|
+
${this._renderToolbarButton("strike",{title:"删除线",active:e?.isActive("strike"),onClick:this._toggleStrike,icon:l`<svg viewBox="0 0 24 24"><path d="M17.3 4.9c-2.3-.6-4.4-1-6.2-.9-2.7 0-5.3.7-5.3 3.6 0 1.5 1.8 3.3 5.3 3.9h.2m8.2 3.2c.3.4.4.8.4 1.3 0 2.9-2.7 3.6-6.2 3.6-2.3 0-4.4-.3-6.2-.9M4 12h16"/></svg>`})}
|
|
42
|
+
`}_renderHeadingToolbarGroup(e){return l`
|
|
43
|
+
<div class="bubble-dropdown">
|
|
44
|
+
<button class="bubble-dropdown-btn">
|
|
45
|
+
${this._getTextLabel()}
|
|
46
|
+
<svg viewBox="0 0 24 24"><polyline points="6 9 12 15 18 9"/></svg>
|
|
47
|
+
</button>
|
|
48
|
+
<div class="bubble-dropdown-menu">
|
|
49
|
+
<button class="bubble-dropdown-item ${e?.isActive("heading")?"":"is-active"}" @click=${this._setParagraph}>正文</button>
|
|
50
|
+
<button class="bubble-dropdown-item ${e?.isActive("heading",{level:1})?"is-active":""}" @click=${()=>this._setHeading(1)}>标题 1</button>
|
|
51
|
+
<button class="bubble-dropdown-item ${e?.isActive("heading",{level:2})?"is-active":""}" @click=${()=>this._setHeading(2)}>标题 2</button>
|
|
52
|
+
<button class="bubble-dropdown-item ${e?.isActive("heading",{level:3})?"is-active":""}" @click=${()=>this._setHeading(3)}>标题 3</button>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
`}_renderAlignToolbarGroup(e){return l`
|
|
56
|
+
<div class="bubble-dropdown">
|
|
57
|
+
<button class="bubble-dropdown-btn">
|
|
58
|
+
${this._getAlignLabel()}
|
|
59
|
+
<svg viewBox="0 0 24 24"><polyline points="6 9 12 15 18 9"/></svg>
|
|
60
|
+
</button>
|
|
61
|
+
<div class="bubble-dropdown-menu">
|
|
62
|
+
<button class="bubble-dropdown-item ${e?.isActive({textAlign:"left"})?"is-active":""}" @click=${()=>this._setTextAlign("left")}>
|
|
63
|
+
<svg viewBox="0 0 24 24"><line x1="3" y1="6" x2="21" y2="6"/><line x1="3" y1="12" x2="15" y2="12"/><line x1="3" y1="18" x2="18" y2="18"/></svg>
|
|
64
|
+
左对齐
|
|
65
|
+
</button>
|
|
66
|
+
<button class="bubble-dropdown-item ${e?.isActive({textAlign:"center"})?"is-active":""}" @click=${()=>this._setTextAlign("center")}>
|
|
67
|
+
<svg viewBox="0 0 24 24"><line x1="3" y1="6" x2="21" y2="6"/><line x1="6" y1="12" x2="18" y2="12"/><line x1="4" y1="18" x2="20" y2="18"/></svg>
|
|
68
|
+
居中
|
|
69
|
+
</button>
|
|
70
|
+
<button class="bubble-dropdown-item ${e?.isActive({textAlign:"right"})?"is-active":""}" @click=${()=>this._setTextAlign("right")}>
|
|
71
|
+
<svg viewBox="0 0 24 24"><line x1="3" y1="6" x2="21" y2="6"/><line x1="9" y1="12" x2="21" y2="12"/><line x1="6" y1="18" x2="21" y2="18"/></svg>
|
|
72
|
+
右对齐
|
|
73
|
+
</button>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
`}_renderCodeLinkImageToolbarGroup(e){return l`
|
|
77
|
+
${this._hasToolbarItem("code")?this._renderToolbarButton("code",{title:"行内代码",active:e?.isActive("code"),onClick:this._toggleCode,icon:l`<svg viewBox="0 0 24 24"><polyline points="16 18 22 12 16 6"/><polyline points="8 6 2 12 8 18"/></svg>`}):""}
|
|
78
|
+
${this._hasToolbarItem("link")?this._renderToolbarButton("link",{title:"链接",active:e?.isActive("link"),onClick:this._setLink,icon:l`<svg viewBox="0 0 24 24"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg>`}):""}
|
|
79
|
+
${this._hasToolbarItem("image")?this._renderToolbarButton("image",{title:"图片",onClick:this._triggerImageUpload,icon:l`<svg viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"/><circle cx="8.5" cy="8.5" r="1.5"/><polyline points="21 15 16 10 5 21"/></svg>`}):""}
|
|
80
|
+
`}_renderCodeToolbarButton(e){return this._renderToolbarButton("code",{title:"行内代码",active:e?.isActive("code"),onClick:this._toggleCode,icon:l`<svg viewBox="0 0 24 24"><polyline points="16 18 22 12 16 6"/><polyline points="8 6 2 12 8 18"/></svg>`})}_renderLinkToolbarButton(e){return this._renderToolbarButton("link",{title:"链接",active:e?.isActive("link"),onClick:this._setLink,icon:l`<svg viewBox="0 0 24 24"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg>`})}_renderImageToolbarButton(){return this._renderToolbarButton("image",{title:"图片",onClick:this._triggerImageUpload,icon:l`<svg viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"/><circle cx="8.5" cy="8.5" r="1.5"/><polyline points="21 15 16 10 5 21"/></svg>`})}_renderListToolbarGroup(e){return l`
|
|
81
|
+
${this._renderToolbarButton("bulletList",{title:"无序列表",active:e?.isActive("bulletList"),onClick:this._toggleBulletList,icon:l`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
82
|
+
<line x1="9" y1="6" x2="20" y2="6"/>
|
|
83
|
+
<line x1="9" y1="12" x2="20" y2="12"/>
|
|
84
|
+
<line x1="9" y1="18" x2="20" y2="18"/>
|
|
85
|
+
<circle cx="4" cy="6" r="0.5" fill="currentColor" stroke="none"/>
|
|
86
|
+
<circle cx="4" cy="12" r="0.5" fill="currentColor" stroke="none"/>
|
|
87
|
+
<circle cx="4" cy="18" r="0.5" fill="currentColor" stroke="none"/>
|
|
88
|
+
</svg>`})}
|
|
89
|
+
${this._renderToolbarButton("orderedList",{title:"有序列表",active:e?.isActive("orderedList"),onClick:this._toggleOrderedList,icon:l`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
90
|
+
<line x1="10" y1="6" x2="21" y2="6"/>
|
|
91
|
+
<line x1="10" y1="12" x2="21" y2="12"/>
|
|
92
|
+
<line x1="10" y1="18" x2="21" y2="18"/>
|
|
93
|
+
<path d="M4 6h1v4"/>
|
|
94
|
+
<path d="M4 10h2"/>
|
|
95
|
+
<path d="M6 18H4c0-1 2-2 2-3s-1-1.5-2-1.5"/>
|
|
96
|
+
</svg>`})}
|
|
97
|
+
${this._renderToolbarButton("taskList",{title:"待办列表",active:e?.isActive("taskList"),onClick:this._toggleTaskList,icon:l`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
98
|
+
<rect x="3" y="5" width="4" height="4" rx="1"/>
|
|
99
|
+
<polyline points="4 7 5 8 6.5 6.5"/>
|
|
100
|
+
<line x1="10" y1="7" x2="21" y2="7"/>
|
|
101
|
+
<rect x="3" y="15" width="4" height="4" rx="1"/>
|
|
102
|
+
<line x1="10" y1="17" x2="21" y2="17"/>
|
|
103
|
+
</svg>`})}
|
|
104
|
+
`}_renderBlockquoteToolbarGroup(e){return l`
|
|
105
|
+
${this._renderToolbarButton("blockquote",{title:"引用",active:e?.isActive("blockquote"),onClick:this._toggleBlockquote,icon:l`<svg viewBox="0 0 24 24"><path d="M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V21z"/><path d="M15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3c0 1 0 1 1 1z"/></svg>`})}
|
|
106
|
+
`}_renderTableToolbarGroup(){const e=this._getHeaderToolbarLabel("table");return l`
|
|
107
|
+
<div
|
|
108
|
+
class="bubble-dropdown ${this._tableDropdownOpen?"is-open":""}"
|
|
109
|
+
@mouseenter=${()=>{this._tableDropdownOpen=!0,this._hoverRow=0,this._hoverCol=0}}
|
|
110
|
+
@mouseleave=${()=>this._tableDropdownOpen=!1}
|
|
111
|
+
>
|
|
112
|
+
<button class="bubble-dropdown-btn ${e?"has-label":""}" title="表格">
|
|
113
|
+
<svg viewBox="0 0 24 24" style="width:18px;height:18px;stroke:currentColor;stroke-width:2;fill:none;"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"/><line x1="3" y1="9" x2="21" y2="9"/><line x1="3" y1="15" x2="21" y2="15"/><line x1="9" y1="3" x2="9" y2="21"/><line x1="15" y1="3" x2="15" y2="21"/></svg>
|
|
114
|
+
${e?l`<span class="bubble-dropdown-btn__label">${e}</span>`:null}
|
|
115
|
+
</button>
|
|
116
|
+
<div class="bubble-dropdown-menu">
|
|
117
|
+
<div class="table-grid-preview">
|
|
118
|
+
${this._renderTableGrid()}
|
|
119
|
+
</div>
|
|
120
|
+
<div class="table-size-hint">
|
|
121
|
+
<span>${this._hoverRow>0?`${this._hoverRow} × ${this._hoverCol}`:`${this._tableRows} × ${this._tableCols}`}</span>
|
|
122
|
+
</div>
|
|
123
|
+
</div>
|
|
124
|
+
</div>
|
|
125
|
+
`}_getToolbarMergeKey(e){return e==="code"||e==="link"||e==="image"?"code-link-image":e}_renderToolbarItemByKey(e,t){switch(t){case"format":return this._renderFormatToolbarGroup(e);case"heading":return this._renderHeadingToolbarGroup(e);case"align":return this._renderAlignToolbarGroup(e);case"code":return this._renderCodeToolbarButton(e);case"link":return this._renderLinkToolbarButton(e);case"image":return this._renderImageToolbarButton();case"list":return this._renderListToolbarGroup(e);case"blockquote":return this._renderBlockquoteToolbarGroup(e);case"table":return this._renderTableToolbarGroup();default:return null}}_renderTextToolbar(e){const t=[];let i="",o=[];const r=()=>{o.length&&(t.push([...o]),o=[])};for(const n of this._toolbarItemsValue){const s=this._renderToolbarItemByKey(e,n);if(!s)continue;const c=this._getToolbarMergeKey(n);o.length&&c!==i&&r(),i=c,o.push(s)}return r(),this._joinToolbarGroups(t)}_updateBubbleMenuPosition(){this._toolbarModeValue==="slash"&&requestAnimationFrame(()=>{const e=this.shadowRoot?.querySelector(".bubble-menu"),t=this.shadowRoot?.querySelector(".ProseMirror"),i=this.shadowRoot?.querySelector(".editor-wrapper");if(!e||!t||!i)return;const o=this._editor,r=o?.isActive("table")??!1,{selection:n}=o?.state??{selection:null};if(r&&n&&!n.empty&&o){const{from:f,to:$}=n,_=o.state.doc.resolve(f),T=o.state.doc.resolve($);let x=!1;for(let y=_.depth;y>=0;y--)if(_.node(y).type.name==="table"){x=!0;break}const B=_.node(_.depth),R=T.node(T.depth);if((B.type.name==="table"||R.type.name==="table")&&(x=!0),x){e.style.opacity="0",e.style.visibility="hidden";return}}if(!(n&&!n.empty)){if(!n||n.empty&&!this._hasSlashCommand){e.style.opacity="0",e.style.visibility="hidden";return}}const s=i.getBoundingClientRect(),c=e.getBoundingClientRect(),{from:u}=n,g=this._editor?.view.coordsAtPos(u);if(!g)return;let p=g.left-s.left,m=g.top-s.top-40;p+c.width>s.width&&(p=s.width-c.width-8),p<0&&(p=8),m<0&&(m=g.bottom-s.top+8),e.style.left=`${p}px`,e.style.top=`${m}px`,e.style.opacity="1",e.style.visibility="visible"})}render(){const e=this._editor,t=!this._previewValue&&this._toolbarModeValue==="header"?l`
|
|
126
|
+
<div class="editor-header ${this._isHeaderVisible()?"is-visible":""}">
|
|
127
|
+
<div class="editor-header__inner" @mousedown=${this._handleHeaderToolbarMouseDown}>
|
|
128
|
+
${this._selectedImage?this._renderImageControls():this._renderTextToolbar(e)}
|
|
129
|
+
</div>
|
|
130
|
+
</div>
|
|
131
|
+
`:null,i=this._showCharacterCountValue&&!this._previewValue;return l`
|
|
132
|
+
<div
|
|
133
|
+
class="editor-wrapper ${e?"":"loading"} ${this._previewValue?"preview":""} ${this._toolbarPositionValue==="bottom"?"toolbar-bottom":""}"
|
|
134
|
+
style=${this._wrapperStyleValue}
|
|
135
|
+
@mousedown=${this._handleWrapperMouseDown}
|
|
136
|
+
@focusin=${this._handleWrapperFocusIn}
|
|
137
|
+
@focusout=${this._handleWrapperFocusOut}
|
|
138
|
+
>
|
|
139
|
+
${e?"":l`
|
|
140
|
+
<div class="loading-placeholder">
|
|
141
|
+
<div class="loading-spinner"></div>
|
|
142
|
+
<span>编辑器加载中...</span>
|
|
143
|
+
</div>
|
|
144
|
+
`}
|
|
145
|
+
<input
|
|
146
|
+
type="file"
|
|
147
|
+
accept="image/*"
|
|
148
|
+
multiple
|
|
149
|
+
class="image-input"
|
|
150
|
+
@change=${this._handleImageUpload}
|
|
151
|
+
/>
|
|
152
|
+
|
|
153
|
+
${this._toolbarPositionValue==="top"?t:null}
|
|
154
|
+
|
|
155
|
+
<!-- Bubble Menu (悬浮操作栏) -->
|
|
156
|
+
${!this._previewValue&&this._toolbarModeValue==="slash"?l`
|
|
157
|
+
<div class="bubble-menu">
|
|
158
|
+
${this._renderTextToolbar(e)}
|
|
159
|
+
</div>
|
|
160
|
+
`:""}
|
|
161
|
+
|
|
162
|
+
<div class="editor-content" data-empty-hint=${this._resolvedPlaceholder}></div>
|
|
163
|
+
|
|
164
|
+
${this._toolbarPositionValue==="bottom"?t:null}
|
|
165
|
+
|
|
166
|
+
${i?l`<div class="editor-footer">${this._getEditorCharacterCount()} 字符</div>`:null}
|
|
167
|
+
|
|
168
|
+
${this._linkEditor.visible?l`
|
|
169
|
+
<div
|
|
170
|
+
class="link-editor"
|
|
171
|
+
style="left: ${this._linkEditor.x}px; top: ${this._linkEditor.y}px;"
|
|
172
|
+
@mousedown=${o=>o.stopPropagation()}
|
|
173
|
+
@click=${o=>o.stopPropagation()}
|
|
174
|
+
>
|
|
175
|
+
<div class="link-editor__field">
|
|
176
|
+
<span class="link-editor__label">链接地址</span>
|
|
177
|
+
<input
|
|
178
|
+
class="link-editor__input"
|
|
179
|
+
data-field="url"
|
|
180
|
+
type="text"
|
|
181
|
+
placeholder="输入或粘贴链接"
|
|
182
|
+
.value=${this._linkEditor.url}
|
|
183
|
+
@input=${this._handleLinkEditorInput}
|
|
184
|
+
@keydown=${this._handleLinkEditorKeydown}
|
|
185
|
+
/>
|
|
186
|
+
</div>
|
|
187
|
+
<div class="link-editor__field">
|
|
188
|
+
<span class="link-editor__label">链接名字</span>
|
|
189
|
+
<input
|
|
190
|
+
class="link-editor__input"
|
|
191
|
+
data-field="label"
|
|
192
|
+
type="text"
|
|
193
|
+
placeholder="输入展示名称"
|
|
194
|
+
.value=${this._linkEditor.label}
|
|
195
|
+
@input=${this._handleLinkEditorInput}
|
|
196
|
+
@keydown=${this._handleLinkEditorKeydown}
|
|
197
|
+
/>
|
|
198
|
+
</div>
|
|
199
|
+
<div class="link-editor__actions">
|
|
200
|
+
<button class="link-editor__action primary" title="应用链接" @click=${this._applyLink}>应用</button>
|
|
201
|
+
<button class="link-editor__action" title="取消链接编辑" @click=${this._closeLinkEditor}>取消</button>
|
|
202
|
+
${e?.isActive("link")||this._linkEditor.url?l`<button class="link-editor__action danger" title="移除链接" @click=${this._removeLink}>移除</button>`:""}
|
|
203
|
+
</div>
|
|
204
|
+
</div>
|
|
205
|
+
`:""}
|
|
206
|
+
|
|
207
|
+
<!-- Table Cell Toolbar -->
|
|
208
|
+
${this._tableCellToolbar.visible&&e?.isActive("table")?l`
|
|
209
|
+
<div
|
|
210
|
+
class="table-cell-toolbar"
|
|
211
|
+
style="left: ${this._tableCellToolbar.x}px; top: ${this._tableCellToolbar.y}px;"
|
|
212
|
+
@mousedown=${o=>o.preventDefault()}
|
|
213
|
+
>
|
|
214
|
+
${this._tableCellToolbar.cellRow===0?l`
|
|
215
|
+
<button class="table-cell-toolbar-btn" title="上方添加行" @click=${this._addTableRowAbove}>
|
|
216
|
+
<svg viewBox="0 0 24 24" width="16" height="16" stroke="currentColor" stroke-width="2" fill="none"><rect x="4" y="8" width="16" height="8" rx="1"/><line x1="12" y1="3" x2="12" y2="7"/><line x1="10" y1="5" x2="14" y2="5"/></svg>
|
|
217
|
+
</button>
|
|
218
|
+
<button class="table-cell-toolbar-btn" title="下方添加行" @click=${this._addTableRowBelow}>
|
|
219
|
+
<svg viewBox="0 0 24 24" width="16" height="16" stroke="currentColor" stroke-width="2" fill="none"><rect x="4" y="8" width="16" height="8" rx="1"/><line x1="12" y1="21" x2="12" y2="17"/><line x1="10" y1="19" x2="14" y2="19"/></svg>
|
|
220
|
+
</button>
|
|
221
|
+
<button class="table-cell-toolbar-btn danger" title="删除行" @click=${this._deleteTableRow}>
|
|
222
|
+
<svg viewBox="0 0 24 24" width="16" height="16" stroke="currentColor" stroke-width="2" fill="none"><rect x="4" y="8" width="16" height="8" rx="1"/><line x1="9" y1="10" x2="9" y2="14"/><line x1="15" y1="10" x2="15" y2="14"/></svg>
|
|
223
|
+
</button>
|
|
224
|
+
`:""}
|
|
225
|
+
${this._tableCellToolbar.cellCol===0?l`
|
|
226
|
+
${this._tableCellToolbar.cellRow!==0?l`<div style="width:1px;height:20px;background:#e3e3e3;margin:0 4px;"></div>`:""}
|
|
227
|
+
<button class="table-cell-toolbar-btn" title="左侧添加列" @click=${this._addTableColumnLeft}>
|
|
228
|
+
<svg viewBox="0 0 24 24" width="16" height="16" stroke="currentColor" stroke-width="2" fill="none"><rect x="8" y="4" width="8" height="16" rx="1"/><line x1="3" y1="12" x2="7" y2="12"/><line x1="5" y1="10" x2="5" y2="14"/></svg>
|
|
229
|
+
</button>
|
|
230
|
+
<button class="table-cell-toolbar-btn" title="右侧添加列" @click=${this._addTableColumnRight}>
|
|
231
|
+
<svg viewBox="0 0 24 24" width="16" height="16" stroke="currentColor" stroke-width="2" fill="none"><rect x="8" y="4" width="8" height="16" rx="1"/><line x1="21" y1="12" x2="17" y2="12"/><line x1="19" y1="10" x2="19" y2="14"/></svg>
|
|
232
|
+
</button>
|
|
233
|
+
<button class="table-cell-toolbar-btn danger" title="删除列" @click=${this._deleteTableColumn}>
|
|
234
|
+
<svg viewBox="0 0 24 24" width="16" height="16" stroke="currentColor" stroke-width="2" fill="none"><rect x="8" y="4" width="8" height="16" rx="1"/><line x1="10" y1="9" x2="14" y2="9"/><line x1="10" y1="15" x2="14" y2="15"/></svg>
|
|
235
|
+
</button>
|
|
236
|
+
`:""}
|
|
237
|
+
${this._tableCellToolbar.cellRow===0&&this._tableCellToolbar.cellCol===0?l`
|
|
238
|
+
<div style="width:1px;height:20px;background:#e3e3e3;margin:0 4px;"></div>
|
|
239
|
+
<button class="table-cell-toolbar-btn danger" title="删除表格" @click=${this._deleteTable}>
|
|
240
|
+
<svg viewBox="0 0 24 24" width="16" height="16" stroke="currentColor" stroke-width="2" fill="none"><polyline points="3 6 5 6 21 6"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/></svg>
|
|
241
|
+
</button>
|
|
242
|
+
`:""}
|
|
243
|
+
</div>
|
|
244
|
+
`:""}
|
|
245
|
+
|
|
246
|
+
<!-- Image Toolbar -->
|
|
247
|
+
${this._toolbarModeValue==="slash"&&this._imageToolbar.visible?l`
|
|
248
|
+
<div
|
|
249
|
+
class="image-toolbar"
|
|
250
|
+
style="left: ${this._imageToolbar.x}px; top: ${this._imageToolbar.y}px;"
|
|
251
|
+
@mousedown=${o=>o.preventDefault()}
|
|
252
|
+
>
|
|
253
|
+
${this._renderImageControls()}
|
|
254
|
+
</div>
|
|
255
|
+
`:""}
|
|
256
|
+
</div>
|
|
257
|
+
`}_renderTableGrid(){const e=[];for(let t=0;t<100;t++){const i=Math.floor(t/10)+1,o=t%10+1,r=this._hoverRow>0&&i<=this._hoverRow&&o<=this._hoverCol;e.push(l`
|
|
258
|
+
<div
|
|
259
|
+
class="table-cell ${r?"selected":""}"
|
|
260
|
+
@click=${()=>{this._insertTableByClick(i,o),this._tableDropdownOpen=!1}}
|
|
261
|
+
@mouseenter=${()=>{this._hoverRow=i,this._hoverCol=o}}
|
|
262
|
+
@mouseleave=${()=>{this._hoverRow=0,this._hoverCol=0}}
|
|
263
|
+
></div>
|
|
264
|
+
`)}return e}};a.styles=ne`
|
|
265
|
+
:host {
|
|
266
|
+
display: block;
|
|
267
|
+
font-family: inherit;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.editor-wrapper {
|
|
271
|
+
border: 1px solid #e3e3e3;
|
|
272
|
+
border-radius: 12px;
|
|
273
|
+
background: #fff;
|
|
274
|
+
overflow: visible;
|
|
275
|
+
position: relative;
|
|
276
|
+
min-height: var(--qxs-editor-min-height, 80px);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.editor-wrapper:focus-within {
|
|
280
|
+
border-color: var(--qxs-color-primary, #3D61E3);
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
.editor-wrapper.preview {
|
|
284
|
+
border: none;
|
|
285
|
+
border-radius: 0;
|
|
286
|
+
background: transparent;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.editor-wrapper.preview .editor-content {
|
|
290
|
+
padding: 8px 12px;
|
|
291
|
+
min-height: unset;
|
|
292
|
+
max-height: none;
|
|
293
|
+
overflow: visible;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
.editor-wrapper.toolbar-bottom .editor-header {
|
|
297
|
+
border-bottom: none;
|
|
298
|
+
border-top: 1px solid transparent;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.editor-wrapper.toolbar-bottom .editor-header.is-visible {
|
|
302
|
+
border-top-color: #eef1f5;
|
|
303
|
+
border-bottom-color: transparent;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.editor-header {
|
|
307
|
+
max-height: 0;
|
|
308
|
+
opacity: 0;
|
|
309
|
+
overflow: hidden;
|
|
310
|
+
padding: 0 16px;
|
|
311
|
+
border-bottom: 1px solid transparent;
|
|
312
|
+
transition:
|
|
313
|
+
max-height 0.24s ease,
|
|
314
|
+
opacity 0.18s ease,
|
|
315
|
+
padding 0.24s ease,
|
|
316
|
+
border-color 0.24s ease;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
.editor-header.is-visible {
|
|
320
|
+
max-height: 132px;
|
|
321
|
+
opacity: 1;
|
|
322
|
+
overflow: visible;
|
|
323
|
+
padding: 10px 12px;
|
|
324
|
+
border-bottom-color: #eef1f5;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
.editor-header__inner {
|
|
328
|
+
display: flex;
|
|
329
|
+
align-items: center;
|
|
330
|
+
flex-wrap: wrap;
|
|
331
|
+
overflow: visible;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
.editor-content {
|
|
335
|
+
padding: 12px 16px;
|
|
336
|
+
min-height: var(--qxs-editor-min-height, 80px);
|
|
337
|
+
max-height: var(--qxs-editor-max-height, none);
|
|
338
|
+
overflow-y: var(--qxs-editor-overflow-y, visible);
|
|
339
|
+
cursor: text;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
.editor-content:empty::before {
|
|
343
|
+
content: attr(data-empty-hint);
|
|
344
|
+
color: #c0c0c0;
|
|
345
|
+
pointer-events: none;
|
|
346
|
+
display: block;
|
|
347
|
+
padding-top: 28px;
|
|
348
|
+
text-align: center;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
.editor-wrapper:not(.preview) .ProseMirror {
|
|
352
|
+
min-height: var(--qxs-editor-min-height, 80px);
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
.editor-footer {
|
|
356
|
+
display: flex;
|
|
357
|
+
justify-content: flex-end;
|
|
358
|
+
padding: 0 16px 12px;
|
|
359
|
+
color: #909399;
|
|
360
|
+
font-size: 12px;
|
|
361
|
+
line-height: 1;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
.ProseMirror p.is-editor-empty:first-child::before {
|
|
365
|
+
content: attr(data-placeholder);
|
|
366
|
+
color: #c0c0c0;
|
|
367
|
+
pointer-events: none;
|
|
368
|
+
float: left;
|
|
369
|
+
height: 0;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
.ProseMirror p.is-empty:only-child::before,
|
|
373
|
+
.ProseMirror p.is-empty:only-child > br:first-child + *::before {
|
|
374
|
+
content: attr(data-placeholder);
|
|
375
|
+
color: #c0c0c0;
|
|
376
|
+
pointer-events: none;
|
|
377
|
+
float: left;
|
|
378
|
+
height: 0;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
.editor-wrapper.loading {
|
|
382
|
+
display: flex;
|
|
383
|
+
align-items: center;
|
|
384
|
+
justify-content: center;
|
|
385
|
+
min-height: 200px;
|
|
386
|
+
background: #fafafa;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
.loading-placeholder {
|
|
390
|
+
display: flex;
|
|
391
|
+
flex-direction: column;
|
|
392
|
+
align-items: center;
|
|
393
|
+
gap: 12px;
|
|
394
|
+
color: #909399;
|
|
395
|
+
font-size: 14px;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
.loading-spinner {
|
|
399
|
+
width: 24px;
|
|
400
|
+
height: 24px;
|
|
401
|
+
border: 2px solid #e3e3e3;
|
|
402
|
+
border-top-color: var(--qxs-color-primary, #3D61E3);
|
|
403
|
+
border-radius: 50%;
|
|
404
|
+
animation: spin 0.8s linear infinite;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
@keyframes spin {
|
|
408
|
+
to { transform: rotate(360deg); }
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
.ProseMirror {
|
|
412
|
+
outline: none;
|
|
413
|
+
line-height: 1.7;
|
|
414
|
+
color: #37352f;
|
|
415
|
+
font-size: 15px;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
.ProseMirror > * + * {
|
|
419
|
+
margin-top: 0.5em;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
.ProseMirror > *:first-child {
|
|
423
|
+
margin-top: 0 !important;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
.ProseMirror p {
|
|
427
|
+
margin: 0;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
.ProseMirror h1 {
|
|
431
|
+
font-size: 1.875em;
|
|
432
|
+
font-weight: 700;
|
|
433
|
+
margin: 0 0 0.25em;
|
|
434
|
+
line-height: 1.3;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
.ProseMirror > h1:first-child {
|
|
438
|
+
margin-top: 0 !important;
|
|
439
|
+
line-height: 1.15;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
.ProseMirror > p:first-child {
|
|
443
|
+
margin-top: 0 !important;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
.ProseMirror h2 {
|
|
447
|
+
font-size: 1.5em;
|
|
448
|
+
font-weight: 600;
|
|
449
|
+
margin: 0.5em 0 0.25em;
|
|
450
|
+
line-height: 1.3;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
.ProseMirror h3 {
|
|
454
|
+
font-size: 1.25em;
|
|
455
|
+
font-weight: 600;
|
|
456
|
+
margin: 0.5em 0 0.25em;
|
|
457
|
+
line-height: 1.3;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
.ProseMirror ul,
|
|
461
|
+
.ProseMirror ol {
|
|
462
|
+
padding-left: 1.5em;
|
|
463
|
+
margin: 0;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
.ProseMirror ul[data-type="taskList"] {
|
|
467
|
+
padding-left: 0;
|
|
468
|
+
list-style: none;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
.ProseMirror li[data-type="taskItem"] {
|
|
472
|
+
display: flex;
|
|
473
|
+
align-items: flex-start;
|
|
474
|
+
gap: 8px;
|
|
475
|
+
list-style: none;
|
|
476
|
+
margin: 0.2em 0;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
.ProseMirror li[data-type="taskItem"] > label {
|
|
480
|
+
display: inline-flex;
|
|
481
|
+
align-items: center;
|
|
482
|
+
justify-content: center;
|
|
483
|
+
width: 18px;
|
|
484
|
+
height: 28px;
|
|
485
|
+
flex: 0 0 18px;
|
|
486
|
+
cursor: pointer;
|
|
487
|
+
user-select: none;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
.ProseMirror li[data-type="taskItem"] > label > input {
|
|
491
|
+
width: 14px;
|
|
492
|
+
height: 14px;
|
|
493
|
+
margin: 0;
|
|
494
|
+
cursor: pointer;
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
.ProseMirror li[data-type="taskItem"] > label > span {
|
|
498
|
+
display: none;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
.ProseMirror li[data-type="taskItem"] > div {
|
|
502
|
+
flex: 1;
|
|
503
|
+
min-width: 0;
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
.ProseMirror li[data-type="taskItem"][data-checked="true"] > div p {
|
|
507
|
+
color: #8a8f98;
|
|
508
|
+
text-decoration: line-through;
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
.ProseMirror li {
|
|
512
|
+
margin: 0.1em 0;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
.ProseMirror li::marker {
|
|
516
|
+
color: #37352f;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
.ProseMirror strong {
|
|
520
|
+
font-weight: 700;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
.ProseMirror em {
|
|
524
|
+
font-style: italic;
|
|
525
|
+
font-synthesis: none;
|
|
526
|
+
transform: skewX(-12deg);
|
|
527
|
+
display: inline-block;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
.ProseMirror u {
|
|
531
|
+
text-decoration: underline;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
.ProseMirror s {
|
|
535
|
+
text-decoration: line-through;
|
|
536
|
+
color: #787774;
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
.ProseMirror code {
|
|
540
|
+
background: rgba(135, 131, 120, 0.14);
|
|
541
|
+
color: #eb5757;
|
|
542
|
+
padding: 2px 4px;
|
|
543
|
+
border-radius: 4px;
|
|
544
|
+
font-family: 'SFMono-Regular', Menlo, Consolas, monospace;
|
|
545
|
+
font-size: 85%;
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
.ProseMirror pre {
|
|
549
|
+
background: #f6f6f7;
|
|
550
|
+
border-radius: 8px;
|
|
551
|
+
padding: 12px 16px;
|
|
552
|
+
overflow-x: auto;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
.ProseMirror pre code {
|
|
556
|
+
background: none;
|
|
557
|
+
padding: 0;
|
|
558
|
+
color: #37352f;
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
.ProseMirror blockquote {
|
|
562
|
+
border-left: 3px solid #e3e3e3;
|
|
563
|
+
padding-left: 1em;
|
|
564
|
+
margin: 0.75em 0;
|
|
565
|
+
color: #787774;
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
.ProseMirror hr {
|
|
569
|
+
border: none;
|
|
570
|
+
border-top: 1px solid #e3e3e3;
|
|
571
|
+
margin: 1.5em 0;
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
.ProseMirror img {
|
|
575
|
+
max-width: 100%;
|
|
576
|
+
height: auto;
|
|
577
|
+
border-radius: 8px;
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
.ProseMirror img[data-align="left"] {
|
|
581
|
+
display: block !important;
|
|
582
|
+
margin: 16px auto 16px 0 !important;
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
.ProseMirror img[data-align="center"] {
|
|
586
|
+
display: block !important;
|
|
587
|
+
margin: 16px auto !important;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
.ProseMirror img[data-align="right"] {
|
|
591
|
+
display: block !important;
|
|
592
|
+
margin: 16px 0 16px auto !important;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
.ProseMirror a {
|
|
596
|
+
color: var(--qxs-color-primary, #3D61E3);
|
|
597
|
+
text-decoration: underline;
|
|
598
|
+
cursor: pointer;
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
.ProseMirror img.ProseMirror-selectednode {
|
|
602
|
+
outline: 2px solid var(--qxs-color-primary, #3D61E3);
|
|
603
|
+
outline-offset: 2px;
|
|
604
|
+
box-shadow: 0 0 0 4px rgba(61, 97, 227, 0.12);
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
/* Table styles */
|
|
608
|
+
.ProseMirror table {
|
|
609
|
+
border-collapse: collapse;
|
|
610
|
+
width: 100%;
|
|
611
|
+
margin: 1em 0;
|
|
612
|
+
border: 1px solid #e3e3e3;
|
|
613
|
+
border-radius: 8px;
|
|
614
|
+
overflow: hidden;
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
.ProseMirror th,
|
|
618
|
+
.ProseMirror td {
|
|
619
|
+
border: 1px solid #e3e3e3;
|
|
620
|
+
padding: 8px 12px;
|
|
621
|
+
text-align: left;
|
|
622
|
+
vertical-align: top;
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
.ProseMirror th {
|
|
626
|
+
background: #fafafa;
|
|
627
|
+
font-weight: 600;
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
.ProseMirror .selectedCell {
|
|
631
|
+
background: rgba(30, 150, 252, 0.1);
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
/* Table Cell Toolbar */
|
|
635
|
+
.table-cell-toolbar {
|
|
636
|
+
position: absolute;
|
|
637
|
+
z-index: 50;
|
|
638
|
+
display: flex;
|
|
639
|
+
gap: 2px;
|
|
640
|
+
padding: 4px;
|
|
641
|
+
background: #fff;
|
|
642
|
+
border: 1px solid #e3e3e3;
|
|
643
|
+
border-radius: 6px;
|
|
644
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
.table-cell-toolbar-btn {
|
|
648
|
+
display: flex;
|
|
649
|
+
align-items: center;
|
|
650
|
+
justify-content: center;
|
|
651
|
+
width: 28px;
|
|
652
|
+
height: 28px;
|
|
653
|
+
border: none;
|
|
654
|
+
background: transparent;
|
|
655
|
+
border-radius: 4px;
|
|
656
|
+
cursor: pointer;
|
|
657
|
+
color: #606266;
|
|
658
|
+
transition: all 0.15s;
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
.table-cell-toolbar-btn:hover {
|
|
662
|
+
background: #ecf5ff;
|
|
663
|
+
color: var(--qxs-color-primary, #3D61E3);
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
.table-cell-toolbar-btn.danger:hover {
|
|
667
|
+
background: #fef0f0;
|
|
668
|
+
color: #f56c6c;
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
/* Bubble Menu */
|
|
672
|
+
.bubble-menu {
|
|
673
|
+
position: absolute;
|
|
674
|
+
display: flex;
|
|
675
|
+
align-items: center;
|
|
676
|
+
gap: 2px;
|
|
677
|
+
padding: 4px 6px;
|
|
678
|
+
background: #fff;
|
|
679
|
+
border: 1px solid #e3e3e3;
|
|
680
|
+
border-radius: 8px;
|
|
681
|
+
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
|
|
682
|
+
z-index: 100;
|
|
683
|
+
opacity: 0;
|
|
684
|
+
visibility: hidden;
|
|
685
|
+
transition: opacity 0.15s, visibility 0.15s, transform 0.15s;
|
|
686
|
+
transform: translateY(4px);
|
|
687
|
+
max-width: calc(100vw - 40px);
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
.bubble-menu.is-visible {
|
|
691
|
+
opacity: 1;
|
|
692
|
+
visibility: visible;
|
|
693
|
+
transform: translateY(0);
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
.bubble-btn {
|
|
697
|
+
display: flex;
|
|
698
|
+
align-items: center;
|
|
699
|
+
justify-content: center;
|
|
700
|
+
width: 28px;
|
|
701
|
+
height: 28px;
|
|
702
|
+
border: none;
|
|
703
|
+
background: transparent;
|
|
704
|
+
color: #37352f;
|
|
705
|
+
border-radius: 4px;
|
|
706
|
+
cursor: pointer;
|
|
707
|
+
transition: all 0.15s;
|
|
708
|
+
position: relative;
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
.bubble-btn.has-label {
|
|
712
|
+
gap: 6px;
|
|
713
|
+
width: auto;
|
|
714
|
+
padding: 0 10px;
|
|
715
|
+
white-space: nowrap;
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
.bubble-btn:hover {
|
|
719
|
+
background: rgba(55, 53, 47, 0.08);
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
.bubble-btn.is-active {
|
|
723
|
+
background: var(--qxs-color-primary, #3D61E3);
|
|
724
|
+
color: #fff;
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
.bubble-btn.danger:hover {
|
|
728
|
+
background: #fef0f0;
|
|
729
|
+
color: #f56c6c;
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
.bubble-btn svg {
|
|
733
|
+
width: 16px;
|
|
734
|
+
height: 16px;
|
|
735
|
+
stroke: currentColor;
|
|
736
|
+
stroke-width: 2;
|
|
737
|
+
fill: none;
|
|
738
|
+
flex: 0 0 auto;
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
.bubble-btn__label {
|
|
742
|
+
font-size: 12px;
|
|
743
|
+
font-weight: 500;
|
|
744
|
+
line-height: 1;
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
.bubble-divider {
|
|
748
|
+
width: 1px;
|
|
749
|
+
height: 16px;
|
|
750
|
+
background: #e3e3e3;
|
|
751
|
+
margin: 0 3px;
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
/* Dropdown */
|
|
755
|
+
.bubble-dropdown {
|
|
756
|
+
position: relative;
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
.bubble-dropdown-btn {
|
|
760
|
+
display: flex;
|
|
761
|
+
align-items: center;
|
|
762
|
+
gap: 4px;
|
|
763
|
+
padding: 0 6px;
|
|
764
|
+
height: 28px;
|
|
765
|
+
border: none;
|
|
766
|
+
background: transparent;
|
|
767
|
+
color: #37352f;
|
|
768
|
+
border-radius: 4px;
|
|
769
|
+
cursor: pointer;
|
|
770
|
+
font-size: 12px;
|
|
771
|
+
font-weight: 500;
|
|
772
|
+
font-family: inherit;
|
|
773
|
+
transition: all 0.15s;
|
|
774
|
+
white-space: nowrap;
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
.bubble-dropdown-btn.has-label {
|
|
778
|
+
gap: 6px;
|
|
779
|
+
padding: 0 10px;
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
.bubble-dropdown-btn:hover {
|
|
783
|
+
background: rgba(55, 53, 47, 0.08);
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
.bubble-dropdown-btn svg {
|
|
787
|
+
width: 12px;
|
|
788
|
+
height: 12px;
|
|
789
|
+
stroke: currentColor;
|
|
790
|
+
stroke-width: 2;
|
|
791
|
+
fill: none;
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
.bubble-dropdown-btn__label {
|
|
795
|
+
font-size: 12px;
|
|
796
|
+
font-weight: 500;
|
|
797
|
+
line-height: 1;
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
.bubble-dropdown-menu {
|
|
801
|
+
position: absolute;
|
|
802
|
+
top: 100%;
|
|
803
|
+
left: 0;
|
|
804
|
+
margin-top: 4px;
|
|
805
|
+
min-width: 120px;
|
|
806
|
+
background: #fff;
|
|
807
|
+
border: 1px solid #e3e3e3;
|
|
808
|
+
border-radius: 6px;
|
|
809
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
|
|
810
|
+
padding: 4px;
|
|
811
|
+
opacity: 0;
|
|
812
|
+
visibility: hidden;
|
|
813
|
+
transform: translateY(-4px);
|
|
814
|
+
transition: all 0.15s;
|
|
815
|
+
z-index: 101;
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
.bubble-dropdown:hover .bubble-dropdown-menu,
|
|
819
|
+
.bubble-dropdown.is-open .bubble-dropdown-menu {
|
|
820
|
+
opacity: 1;
|
|
821
|
+
visibility: visible;
|
|
822
|
+
transform: translateY(0);
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
.bubble-dropdown-item {
|
|
826
|
+
display: flex;
|
|
827
|
+
align-items: center;
|
|
828
|
+
gap: 6px;
|
|
829
|
+
width: 100%;
|
|
830
|
+
padding: 6px 8px;
|
|
831
|
+
border: none;
|
|
832
|
+
background: transparent;
|
|
833
|
+
color: #37352f;
|
|
834
|
+
border-radius: 4px;
|
|
835
|
+
cursor: pointer;
|
|
836
|
+
font-size: 12px;
|
|
837
|
+
font-weight: 500;
|
|
838
|
+
font-family: inherit;
|
|
839
|
+
text-align: left;
|
|
840
|
+
transition: all 0.15s;
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
.bubble-dropdown-item:hover {
|
|
844
|
+
background: rgba(55, 53, 47, 0.08);
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
.bubble-dropdown-item.is-active {
|
|
848
|
+
background: var(--qxs-color-primary, #3D61E3);
|
|
849
|
+
color: #fff;
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
.bubble-dropdown-item svg {
|
|
853
|
+
width: 16px;
|
|
854
|
+
height: 16px;
|
|
855
|
+
stroke: currentColor;
|
|
856
|
+
stroke-width: 2;
|
|
857
|
+
fill: none;
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
/* Keep the file input programmatically clickable inside shadow hosts. */
|
|
861
|
+
.image-input {
|
|
862
|
+
position: absolute;
|
|
863
|
+
inset: 0 auto auto 0;
|
|
864
|
+
width: 1px;
|
|
865
|
+
height: 1px;
|
|
866
|
+
padding: 0;
|
|
867
|
+
margin: 0;
|
|
868
|
+
opacity: 0;
|
|
869
|
+
pointer-events: none;
|
|
870
|
+
}
|
|
871
|
+
|
|
872
|
+
.table-grid-preview {
|
|
873
|
+
display: grid;
|
|
874
|
+
grid-template-columns: repeat(10, 18px);
|
|
875
|
+
gap: 2px;
|
|
876
|
+
padding: 8px;
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
.table-grid-preview .table-cell {
|
|
880
|
+
width: 18px;
|
|
881
|
+
height: 18px;
|
|
882
|
+
border: 1px solid #e3e3e3;
|
|
883
|
+
border-radius: 2px;
|
|
884
|
+
background: #fff;
|
|
885
|
+
cursor: pointer;
|
|
886
|
+
transition: all 0.1s;
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
.table-grid-preview .table-cell:hover {
|
|
890
|
+
background: rgba(30, 150, 252, 0.3);
|
|
891
|
+
border-color: var(--qxs-color-primary, #3D61E3);
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
.table-grid-preview .table-cell.selected {
|
|
895
|
+
background: rgba(30, 150, 252, 0.15);
|
|
896
|
+
border-color: rgba(30, 150, 252, 0.5);
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
.table-size-hint {
|
|
900
|
+
text-align: center;
|
|
901
|
+
padding: 4px 8px 6px;
|
|
902
|
+
font-size: 10px;
|
|
903
|
+
color: #8c8c8c;
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
.image-size-control {
|
|
907
|
+
display: flex;
|
|
908
|
+
align-items: center;
|
|
909
|
+
gap: 6px;
|
|
910
|
+
padding-left: 8px;
|
|
911
|
+
margin-left: 2px;
|
|
912
|
+
border-left: 1px solid #e3e3e3;
|
|
913
|
+
white-space: nowrap;
|
|
914
|
+
}
|
|
915
|
+
|
|
916
|
+
.image-size-label {
|
|
917
|
+
font-size: 12px;
|
|
918
|
+
color: #7a7f88;
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
.image-size-range {
|
|
922
|
+
width: 72px;
|
|
923
|
+
height: 26px;
|
|
924
|
+
padding: 0 8px;
|
|
925
|
+
border: 1px solid #d8dde6;
|
|
926
|
+
border-radius: 6px;
|
|
927
|
+
font-size: 12px;
|
|
928
|
+
color: #37352f;
|
|
929
|
+
background: #fff;
|
|
930
|
+
outline: none;
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
.image-size-range:focus {
|
|
934
|
+
border-color: var(--qxs-color-primary, #3D61E3);
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
.link-editor {
|
|
938
|
+
position: absolute;
|
|
939
|
+
z-index: 120;
|
|
940
|
+
display: grid;
|
|
941
|
+
gap: 8px;
|
|
942
|
+
min-width: 320px;
|
|
943
|
+
padding: 10px;
|
|
944
|
+
background: #fff;
|
|
945
|
+
border: 1px solid #e3e3e3;
|
|
946
|
+
border-radius: 10px;
|
|
947
|
+
box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
|
|
948
|
+
}
|
|
949
|
+
|
|
950
|
+
.link-editor__field {
|
|
951
|
+
display: grid;
|
|
952
|
+
gap: 4px;
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
.link-editor__label {
|
|
956
|
+
font-size: 12px;
|
|
957
|
+
color: #6b7280;
|
|
958
|
+
line-height: 1;
|
|
959
|
+
}
|
|
960
|
+
|
|
961
|
+
.link-editor__input {
|
|
962
|
+
min-width: 0;
|
|
963
|
+
height: 32px;
|
|
964
|
+
padding: 0 10px;
|
|
965
|
+
border: 1px solid #d8dde6;
|
|
966
|
+
border-radius: 8px;
|
|
967
|
+
outline: none;
|
|
968
|
+
font-size: 13px;
|
|
969
|
+
color: #37352f;
|
|
970
|
+
background: #fff;
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
.link-editor__input:focus {
|
|
974
|
+
border-color: var(--qxs-color-primary, #3D61E3);
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
.link-editor__actions {
|
|
978
|
+
display: flex;
|
|
979
|
+
align-items: center;
|
|
980
|
+
gap: 8px;
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
.link-editor__action {
|
|
984
|
+
height: 32px;
|
|
985
|
+
padding: 0 12px;
|
|
986
|
+
border: 1px solid #d8dde6;
|
|
987
|
+
border-radius: 8px;
|
|
988
|
+
background: #fff;
|
|
989
|
+
color: #4b5563;
|
|
990
|
+
font-size: 12px;
|
|
991
|
+
font-family: inherit;
|
|
992
|
+
cursor: pointer;
|
|
993
|
+
transition: all 0.15s ease;
|
|
994
|
+
white-space: nowrap;
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
.link-editor__action:hover {
|
|
998
|
+
border-color: #c3cad5;
|
|
999
|
+
background: #f8fafc;
|
|
1000
|
+
}
|
|
1001
|
+
|
|
1002
|
+
.link-editor__action.primary {
|
|
1003
|
+
border-color: var(--qxs-color-primary, #3D61E3);
|
|
1004
|
+
background: var(--qxs-color-primary, #3D61E3);
|
|
1005
|
+
color: #fff;
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
.link-editor__action.danger {
|
|
1009
|
+
color: #f56c6c;
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1012
|
+
/* Image Toolbar */
|
|
1013
|
+
.image-toolbar {
|
|
1014
|
+
position: absolute;
|
|
1015
|
+
display: flex;
|
|
1016
|
+
align-items: center;
|
|
1017
|
+
gap: 2px;
|
|
1018
|
+
padding: 4px 6px;
|
|
1019
|
+
background: #fff;
|
|
1020
|
+
border: 1px solid #e3e3e3;
|
|
1021
|
+
border-radius: 6px;
|
|
1022
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
|
|
1023
|
+
z-index: 100;
|
|
1024
|
+
transform: translateX(-50%);
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
.image-toolbar-btn {
|
|
1028
|
+
display: flex;
|
|
1029
|
+
align-items: center;
|
|
1030
|
+
justify-content: center;
|
|
1031
|
+
width: 28px;
|
|
1032
|
+
height: 28px;
|
|
1033
|
+
border: none;
|
|
1034
|
+
background: transparent;
|
|
1035
|
+
border-radius: 4px;
|
|
1036
|
+
cursor: pointer;
|
|
1037
|
+
color: #595959;
|
|
1038
|
+
transition: all 0.15s;
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
.image-toolbar-btn:hover {
|
|
1042
|
+
background: #f5f5f5;
|
|
1043
|
+
color: var(--qxs-color-primary, #3D61E3);
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
.image-toolbar-btn.danger:hover {
|
|
1047
|
+
background: #fff1f0;
|
|
1048
|
+
color: #ff4d4f;
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
.image-toolbar-btn svg {
|
|
1052
|
+
width: 16px;
|
|
1053
|
+
height: 16px;
|
|
1054
|
+
stroke: currentColor;
|
|
1055
|
+
stroke-width: 2;
|
|
1056
|
+
fill: none;
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
.image-toolbar-divider {
|
|
1060
|
+
width: 1px;
|
|
1061
|
+
height: 20px;
|
|
1062
|
+
background: #e3e3e3;
|
|
1063
|
+
margin: 0 4px;
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
.image-control-label {
|
|
1067
|
+
display: inline-flex;
|
|
1068
|
+
align-items: center;
|
|
1069
|
+
padding: 0 4px;
|
|
1070
|
+
font-size: 12px;
|
|
1071
|
+
color: #909399;
|
|
1072
|
+
user-select: none;
|
|
1073
|
+
white-space: nowrap;
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1076
|
+
/* Image More Menu */
|
|
1077
|
+
.image-more-menu {
|
|
1078
|
+
position: absolute;
|
|
1079
|
+
top: 100%;
|
|
1080
|
+
right: 0;
|
|
1081
|
+
margin-top: 4px;
|
|
1082
|
+
padding: 4px;
|
|
1083
|
+
background: #fff;
|
|
1084
|
+
border: 1px solid #e3e3e3;
|
|
1085
|
+
border-radius: 6px;
|
|
1086
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
|
|
1087
|
+
z-index: 101;
|
|
1088
|
+
min-width: 120px;
|
|
1089
|
+
}
|
|
1090
|
+
|
|
1091
|
+
.image-more-menu-item {
|
|
1092
|
+
display: flex;
|
|
1093
|
+
align-items: center;
|
|
1094
|
+
gap: 8px;
|
|
1095
|
+
padding: 8px 12px;
|
|
1096
|
+
border: none;
|
|
1097
|
+
background: transparent;
|
|
1098
|
+
width: 100%;
|
|
1099
|
+
text-align: left;
|
|
1100
|
+
font-size: 13px;
|
|
1101
|
+
color: #595959;
|
|
1102
|
+
border-radius: 4px;
|
|
1103
|
+
cursor: pointer;
|
|
1104
|
+
transition: all 0.15s;
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1107
|
+
.image-more-menu-item:hover {
|
|
1108
|
+
background: #f5f5f5;
|
|
1109
|
+
color: var(--qxs-color-primary, #3D61E3);
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1112
|
+
.image-more-menu-item svg {
|
|
1113
|
+
width: 14px;
|
|
1114
|
+
height: 14px;
|
|
1115
|
+
stroke: currentColor;
|
|
1116
|
+
stroke-width: 2;
|
|
1117
|
+
fill: none;
|
|
1118
|
+
}
|
|
1119
|
+
|
|
1120
|
+
/* Selected Image */
|
|
1121
|
+
.ProseMirror img.selected {
|
|
1122
|
+
outline: 2px solid var(--qxs-color-primary, #3D61E3);
|
|
1123
|
+
outline-offset: 2px;
|
|
1124
|
+
}
|
|
1125
|
+
`;d([h({type:String,attribute:"content"})],a.prototype,"content",2);d([h({type:String,attribute:"model-value"})],a.prototype,"model-value",2);d([h({type:String,attribute:"placeholder"})],a.prototype,"placeholder",2);d([h({type:String,attribute:"toolbar-mode"})],a.prototype,"toolbar-mode",2);d([h({attribute:"toolbar"})],a.prototype,"toolbar",2);d([h({type:String,attribute:"toolbar-preset"})],a.prototype,"toolbar-preset",2);d([h({attribute:"header-toolbar-labels"})],a.prototype,"header-toolbar-labels",2);d([h({type:String,attribute:"header-always-visible"})],a.prototype,"header-always-visible",2);d([h({type:String,attribute:"use-model"})],a.prototype,"use-model",2);d([h({type:String,attribute:"readonly"})],a.prototype,"readonly",2);d([h({type:String,attribute:"preview"})],a.prototype,"preview",2);d([h({attribute:"editable"})],a.prototype,"editable",2);d([h({type:String,attribute:"min-height"})],a.prototype,"min-height",2);d([h({type:String,attribute:"max-height"})],a.prototype,"max-height",2);d([h({type:String,attribute:"show-character-count"})],a.prototype,"show-character-count",2);d([h({type:String,attribute:"toolbar-position"})],a.prototype,"toolbar-position",2);d([h({type:String,attribute:"custom-styles"})],a.prototype,"custom-styles",2);d([h({type:String,attribute:"content-format"})],a.prototype,"content-format",2);d([h({type:Object,attribute:"deserialize-content"})],a.prototype,"deserialize-content",2);d([h({type:Object,attribute:"serialize-content"})],a.prototype,"serialize-content",2);d([h({type:Object,attribute:"upload-image"})],a.prototype,"upload-image",2);d([b()],a.prototype,"_editor",2);d([b()],a.prototype,"_hoverRow",2);d([b()],a.prototype,"_hoverCol",2);d([b()],a.prototype,"_tableDropdownOpen",2);d([b()],a.prototype,"_tableCellToolbar",2);d([b()],a.prototype,"_imageToolbar",2);d([b()],a.prototype,"_linkEditor",2);d([b()],a.prototype,"_isEditorFocused",2);d([b()],a.prototype,"_selectedImage",2);a=d([he("qxs-blocksuite-editor")],a);export{a as QxsBlocksuiteEditor};
|
|
1126
|
+
//# sourceMappingURL=blocksuite-editor.mjs.map
|