@agilehub/agile-editor 1.8.2 → 1.8.3

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.
@@ -718,6 +718,56 @@ export declare const useI18n: () => import("vue-i18n").Composer<{
718
718
  "selection-required": string;
719
719
  "invalid-number": string;
720
720
  };
721
+ "figure-caption-numbering": {
722
+ text: string;
723
+ tip: string;
724
+ title: string;
725
+ fullscreen: string;
726
+ "exit-fullscreen": string;
727
+ readonly: string;
728
+ rule: string;
729
+ "rule-source": string;
730
+ "first-caption": string;
731
+ "manual-rule": string;
732
+ "source-caption": string;
733
+ template: string;
734
+ "fixed-prefix": string;
735
+ "start-sequence": string;
736
+ "sequence-width": string;
737
+ "caption-separator": string;
738
+ "separator-placeholder": string;
739
+ summary: string;
740
+ "candidate-count": string;
741
+ "empty-count": string;
742
+ "replace-count": string;
743
+ "append-count": string;
744
+ "warning-count": string;
745
+ preview: string;
746
+ order: string;
747
+ image: string;
748
+ "old-caption": string;
749
+ "new-caption": string;
750
+ status: string;
751
+ "edit-caption": string;
752
+ "save-caption": string;
753
+ "caption-required": string;
754
+ "empty-caption": string;
755
+ "status-keep": string;
756
+ "status-replace": string;
757
+ "status-append": string;
758
+ "status-empty": string;
759
+ "status-warning": string;
760
+ "warning-title": string;
761
+ "unparsed-label": string;
762
+ "error-no-caption": string;
763
+ "error-unrecognized": string;
764
+ "manual-confirm": string;
765
+ "no-changes": string;
766
+ "doc-changed": string;
767
+ success: string;
768
+ "no-candidates": string;
769
+ confirm: string;
770
+ };
721
771
  math: {
722
772
  text: string;
723
773
  insert: string;
@@ -1112,6 +1162,9 @@ export declare const useI18n: () => import("vue-i18n").Composer<{
1112
1162
  convertToNode: string;
1113
1163
  convertToInline: string;
1114
1164
  };
1165
+ imageText: {
1166
+ edit: string;
1167
+ };
1115
1168
  textBox: {
1116
1169
  background: string;
1117
1170
  border: string;
@@ -2117,6 +2170,56 @@ export declare const useI18n: () => import("vue-i18n").Composer<{
2117
2170
  "selection-required": string;
2118
2171
  "invalid-number": string;
2119
2172
  };
2173
+ "figure-caption-numbering": {
2174
+ text: string;
2175
+ tip: string;
2176
+ title: string;
2177
+ fullscreen: string;
2178
+ "exit-fullscreen": string;
2179
+ readonly: string;
2180
+ rule: string;
2181
+ "rule-source": string;
2182
+ "first-caption": string;
2183
+ "manual-rule": string;
2184
+ "source-caption": string;
2185
+ template: string;
2186
+ "fixed-prefix": string;
2187
+ "start-sequence": string;
2188
+ "sequence-width": string;
2189
+ "caption-separator": string;
2190
+ "separator-placeholder": string;
2191
+ summary: string;
2192
+ "candidate-count": string;
2193
+ "empty-count": string;
2194
+ "replace-count": string;
2195
+ "append-count": string;
2196
+ "warning-count": string;
2197
+ preview: string;
2198
+ order: string;
2199
+ image: string;
2200
+ "old-caption": string;
2201
+ "new-caption": string;
2202
+ status: string;
2203
+ "edit-caption": string;
2204
+ "save-caption": string;
2205
+ "caption-required": string;
2206
+ "empty-caption": string;
2207
+ "status-keep": string;
2208
+ "status-replace": string;
2209
+ "status-append": string;
2210
+ "status-empty": string;
2211
+ "status-warning": string;
2212
+ "warning-title": string;
2213
+ "unparsed-label": string;
2214
+ "error-no-caption": string;
2215
+ "error-unrecognized": string;
2216
+ "manual-confirm": string;
2217
+ "no-changes": string;
2218
+ "doc-changed": string;
2219
+ success: string;
2220
+ "no-candidates": string;
2221
+ confirm: string;
2222
+ };
2120
2223
  math: {
2121
2224
  text: string;
2122
2225
  insert: string;
@@ -2512,6 +2615,9 @@ export declare const useI18n: () => import("vue-i18n").Composer<{
2512
2615
  convertToNode: string;
2513
2616
  convertToInline: string;
2514
2617
  };
2618
+ imageText: {
2619
+ edit: string;
2620
+ };
2515
2621
  textBox: {
2516
2622
  background: string;
2517
2623
  border: string;
@@ -3504,6 +3610,56 @@ export declare const useI18n: () => import("vue-i18n").Composer<{
3504
3610
  "selection-required": string;
3505
3611
  "invalid-number": string;
3506
3612
  };
3613
+ "figure-caption-numbering": {
3614
+ text: string;
3615
+ tip: string;
3616
+ title: string;
3617
+ fullscreen: string;
3618
+ "exit-fullscreen": string;
3619
+ readonly: string;
3620
+ rule: string;
3621
+ "rule-source": string;
3622
+ "first-caption": string;
3623
+ "manual-rule": string;
3624
+ "source-caption": string;
3625
+ template: string;
3626
+ "fixed-prefix": string;
3627
+ "start-sequence": string;
3628
+ "sequence-width": string;
3629
+ "caption-separator": string;
3630
+ "separator-placeholder": string;
3631
+ summary: string;
3632
+ "candidate-count": string;
3633
+ "empty-count": string;
3634
+ "replace-count": string;
3635
+ "append-count": string;
3636
+ "warning-count": string;
3637
+ preview: string;
3638
+ order: string;
3639
+ image: string;
3640
+ "old-caption": string;
3641
+ "new-caption": string;
3642
+ status: string;
3643
+ "edit-caption": string;
3644
+ "save-caption": string;
3645
+ "caption-required": string;
3646
+ "empty-caption": string;
3647
+ "status-keep": string;
3648
+ "status-replace": string;
3649
+ "status-append": string;
3650
+ "status-empty": string;
3651
+ "status-warning": string;
3652
+ "warning-title": string;
3653
+ "unparsed-label": string;
3654
+ "error-no-caption": string;
3655
+ "error-unrecognized": string;
3656
+ "manual-confirm": string;
3657
+ "no-changes": string;
3658
+ "doc-changed": string;
3659
+ success: string;
3660
+ "no-candidates": string;
3661
+ confirm: string;
3662
+ };
3507
3663
  math: {
3508
3664
  text: string;
3509
3665
  insert: string;
@@ -3899,6 +4055,9 @@ export declare const useI18n: () => import("vue-i18n").Composer<{
3899
4055
  convertToNode: string;
3900
4056
  convertToInline: string;
3901
4057
  };
4058
+ imageText: {
4059
+ edit: string;
4060
+ };
3902
4061
  textBox: {
3903
4062
  background: string;
3904
4063
  border: string;
@@ -705,6 +705,56 @@ export declare const i18n: import("vue-i18n").I18n<{
705
705
  "selection-required": string;
706
706
  "invalid-number": string;
707
707
  };
708
+ "figure-caption-numbering": {
709
+ text: string;
710
+ tip: string;
711
+ title: string;
712
+ fullscreen: string;
713
+ "exit-fullscreen": string;
714
+ readonly: string;
715
+ rule: string;
716
+ "rule-source": string;
717
+ "first-caption": string;
718
+ "manual-rule": string;
719
+ "source-caption": string;
720
+ template: string;
721
+ "fixed-prefix": string;
722
+ "start-sequence": string;
723
+ "sequence-width": string;
724
+ "caption-separator": string;
725
+ "separator-placeholder": string;
726
+ summary: string;
727
+ "candidate-count": string;
728
+ "empty-count": string;
729
+ "replace-count": string;
730
+ "append-count": string;
731
+ "warning-count": string;
732
+ preview: string;
733
+ order: string;
734
+ image: string;
735
+ "old-caption": string;
736
+ "new-caption": string;
737
+ status: string;
738
+ "edit-caption": string;
739
+ "save-caption": string;
740
+ "caption-required": string;
741
+ "empty-caption": string;
742
+ "status-keep": string;
743
+ "status-replace": string;
744
+ "status-append": string;
745
+ "status-empty": string;
746
+ "status-warning": string;
747
+ "warning-title": string;
748
+ "unparsed-label": string;
749
+ "error-no-caption": string;
750
+ "error-unrecognized": string;
751
+ "manual-confirm": string;
752
+ "no-changes": string;
753
+ "doc-changed": string;
754
+ success: string;
755
+ "no-candidates": string;
756
+ confirm: string;
757
+ };
708
758
  math: {
709
759
  text: string;
710
760
  insert: string;
@@ -1099,6 +1149,9 @@ export declare const i18n: import("vue-i18n").I18n<{
1099
1149
  convertToNode: string;
1100
1150
  convertToInline: string;
1101
1151
  };
1152
+ imageText: {
1153
+ edit: string;
1154
+ };
1102
1155
  textBox: {
1103
1156
  background: string;
1104
1157
  border: string;
@@ -2104,6 +2157,56 @@ export declare const i18n: import("vue-i18n").I18n<{
2104
2157
  "selection-required": string;
2105
2158
  "invalid-number": string;
2106
2159
  };
2160
+ "figure-caption-numbering": {
2161
+ text: string;
2162
+ tip: string;
2163
+ title: string;
2164
+ fullscreen: string;
2165
+ "exit-fullscreen": string;
2166
+ readonly: string;
2167
+ rule: string;
2168
+ "rule-source": string;
2169
+ "first-caption": string;
2170
+ "manual-rule": string;
2171
+ "source-caption": string;
2172
+ template: string;
2173
+ "fixed-prefix": string;
2174
+ "start-sequence": string;
2175
+ "sequence-width": string;
2176
+ "caption-separator": string;
2177
+ "separator-placeholder": string;
2178
+ summary: string;
2179
+ "candidate-count": string;
2180
+ "empty-count": string;
2181
+ "replace-count": string;
2182
+ "append-count": string;
2183
+ "warning-count": string;
2184
+ preview: string;
2185
+ order: string;
2186
+ image: string;
2187
+ "old-caption": string;
2188
+ "new-caption": string;
2189
+ status: string;
2190
+ "edit-caption": string;
2191
+ "save-caption": string;
2192
+ "caption-required": string;
2193
+ "empty-caption": string;
2194
+ "status-keep": string;
2195
+ "status-replace": string;
2196
+ "status-append": string;
2197
+ "status-empty": string;
2198
+ "status-warning": string;
2199
+ "warning-title": string;
2200
+ "unparsed-label": string;
2201
+ "error-no-caption": string;
2202
+ "error-unrecognized": string;
2203
+ "manual-confirm": string;
2204
+ "no-changes": string;
2205
+ "doc-changed": string;
2206
+ success: string;
2207
+ "no-candidates": string;
2208
+ confirm: string;
2209
+ };
2107
2210
  math: {
2108
2211
  text: string;
2109
2212
  insert: string;
@@ -2499,6 +2602,9 @@ export declare const i18n: import("vue-i18n").I18n<{
2499
2602
  convertToNode: string;
2500
2603
  convertToInline: string;
2501
2604
  };
2605
+ imageText: {
2606
+ edit: string;
2607
+ };
2502
2608
  textBox: {
2503
2609
  background: string;
2504
2610
  border: string;
@@ -3491,6 +3597,56 @@ export declare const i18n: import("vue-i18n").I18n<{
3491
3597
  "selection-required": string;
3492
3598
  "invalid-number": string;
3493
3599
  };
3600
+ "figure-caption-numbering": {
3601
+ text: string;
3602
+ tip: string;
3603
+ title: string;
3604
+ fullscreen: string;
3605
+ "exit-fullscreen": string;
3606
+ readonly: string;
3607
+ rule: string;
3608
+ "rule-source": string;
3609
+ "first-caption": string;
3610
+ "manual-rule": string;
3611
+ "source-caption": string;
3612
+ template: string;
3613
+ "fixed-prefix": string;
3614
+ "start-sequence": string;
3615
+ "sequence-width": string;
3616
+ "caption-separator": string;
3617
+ "separator-placeholder": string;
3618
+ summary: string;
3619
+ "candidate-count": string;
3620
+ "empty-count": string;
3621
+ "replace-count": string;
3622
+ "append-count": string;
3623
+ "warning-count": string;
3624
+ preview: string;
3625
+ order: string;
3626
+ image: string;
3627
+ "old-caption": string;
3628
+ "new-caption": string;
3629
+ status: string;
3630
+ "edit-caption": string;
3631
+ "save-caption": string;
3632
+ "caption-required": string;
3633
+ "empty-caption": string;
3634
+ "status-keep": string;
3635
+ "status-replace": string;
3636
+ "status-append": string;
3637
+ "status-empty": string;
3638
+ "status-warning": string;
3639
+ "warning-title": string;
3640
+ "unparsed-label": string;
3641
+ "error-no-caption": string;
3642
+ "error-unrecognized": string;
3643
+ "manual-confirm": string;
3644
+ "no-changes": string;
3645
+ "doc-changed": string;
3646
+ success: string;
3647
+ "no-candidates": string;
3648
+ confirm: string;
3649
+ };
3494
3650
  math: {
3495
3651
  text: string;
3496
3652
  insert: string;
@@ -3886,6 +4042,9 @@ export declare const i18n: import("vue-i18n").I18n<{
3886
4042
  convertToNode: string;
3887
4043
  convertToInline: string;
3888
4044
  };
4045
+ imageText: {
4046
+ edit: string;
4047
+ };
3889
4048
  textBox: {
3890
4049
  background: string;
3891
4050
  border: string;
@@ -0,0 +1,9 @@
1
+ import type { Editor } from '@tiptap/vue-3';
2
+ type Attributes = Record<string, unknown>;
3
+ /**
4
+ * Large selections make Tiptap's generic isActive helpers repeatedly scan the
5
+ * whole document. A large mixed selection can only be active when its first
6
+ * relevant content matches, so reject the common negative case in O(1).
7
+ */
8
+ export declare const getLargeSelectionActiveShortcut: (editor: Editor, nameOrAttributes: string | Attributes, attributes?: Attributes) => boolean;
9
+ export {};
@@ -0,0 +1,63 @@
1
+ import type { Node as ProseMirrorNode } from '@tiptap/pm/model';
2
+ export type FigureCaptionPreviewStatus = 'keep' | 'replace' | 'append' | 'empty' | 'warning';
3
+ export interface FigureCaptionRule {
4
+ fixedPrefix: string;
5
+ startSequence: number;
6
+ sequenceWidth: number;
7
+ captionSeparator: string;
8
+ }
9
+ export interface ParsedFigureCaption {
10
+ label: string;
11
+ title: string;
12
+ fixedPrefix: string;
13
+ sequence: number;
14
+ sequenceWidth: number;
15
+ captionSeparator: string;
16
+ replaceLength: number;
17
+ }
18
+ export interface FigureCaptionCandidate {
19
+ order: number;
20
+ pos: number;
21
+ node: ProseMirrorNode;
22
+ rawCaption: string;
23
+ normalizedCaption: string;
24
+ }
25
+ export interface FigureCaptionAnalysis {
26
+ candidates: FigureCaptionCandidate[];
27
+ seed: FigureCaptionCandidate | null;
28
+ autoRule: FigureCaptionRule | null;
29
+ error: 'no-caption' | 'unrecognized' | null;
30
+ }
31
+ export interface FigureCaptionPreviewItem {
32
+ order: number;
33
+ pos: number;
34
+ nodeId: string | null;
35
+ name: string;
36
+ oldCaption: string;
37
+ newCaption: string;
38
+ replacementText: string;
39
+ replaceLength: number;
40
+ replaceWholeCaption?: boolean;
41
+ status: FigureCaptionPreviewStatus;
42
+ apply: boolean;
43
+ warning: string;
44
+ }
45
+ export interface FigureCaptionPreview {
46
+ items: FigureCaptionPreviewItem[];
47
+ candidateCount: number;
48
+ emptyCount: number;
49
+ replaceCount: number;
50
+ appendCount: number;
51
+ warningCount: number;
52
+ changeCount: number;
53
+ }
54
+ export declare const normalizeFigureCaptionText: (value: unknown) => string;
55
+ export declare const normalizeFigureCaptionRule: (rule: Partial<FigureCaptionRule>) => FigureCaptionRule;
56
+ export declare const isValidFigureCaptionRule: (rule: FigureCaptionRule) => boolean;
57
+ export declare const formatFigureCaptionLabel: (rule: FigureCaptionRule, sequence: number) => string;
58
+ export declare const parseFigureCaption: (value: unknown) => ParsedFigureCaption | null;
59
+ export declare const createFigureCaptionRuleFromCaption: (value: unknown) => FigureCaptionRule | null;
60
+ export declare const collectFigureCaptionCandidates: (doc: ProseMirrorNode) => FigureCaptionCandidate[];
61
+ export declare const analyzeFigureCaptions: (doc: ProseMirrorNode) => FigureCaptionAnalysis;
62
+ export declare const createFigureCaptionPreview: (candidates: FigureCaptionCandidate[], rule: FigureCaptionRule) => FigureCaptionPreview;
63
+ export declare const applyFigureCaptionPreview: (editor: any, items: FigureCaptionPreviewItem[]) => boolean;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * 去掉文件名最后一个扩展名,保留无扩展名文件名和隐藏文件兜底值。
3
+ */
4
+ export declare const getFileNameWithoutExtension: (name: unknown, fallback?: string) => string;
@@ -1,11 +1,11 @@
1
1
  /**
2
- * @agilehub/agile-editor 1.8.2
2
+ * @agilehub/agile-editor 1.8.3
3
3
  * @license Apache-2.0
4
4
  * @author undefined undefined
5
5
  * @see undefined
6
6
  **/
7
7
  import "./agile-editor.css";
8
- import { a as e, n as t } from "./i18n-DID6uqiw.js";
8
+ import { a as e, n as t } from "./i18n-E7gk29NK.js";
9
9
  import { createBlock as n, createElementBlock as r, createElementVNode as i, createVNode as a, defineComponent as o, guardReactiveProps as s, markRaw as c, normalizeProps as l, onMounted as u, openBlock as d, ref as f, renderSlot as p, resolveDynamicComponent as m, shallowRef as h, toDisplayString as g, unref as _, withCtx as v } from "vue";
10
10
  //#region src/extensions/smart-sheet/viewer.vue?vue&type=script&setup=true&lang.ts
11
11
  var y = { class: "agile-smart-sheet-viewer" }, b = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agilehub/agile-editor",
3
- "version": "1.8.2",
3
+ "version": "1.8.3",
4
4
  "description": "Rich text editor based on Vue 3 and Tiptap 3",
5
5
  "keywords": [
6
6
  "docs editor",
@@ -43,7 +43,7 @@
43
43
  },
44
44
  "scripts": {
45
45
  "build": "vue-tsc --noEmit && vite build && vue-tsc -p tsconfig.types.json",
46
- "test:style-target": "node --test tests/style-target.test.mjs tests/style-schema.test.mjs tests/iframe.test.mjs tests/bookmark-transaction.test.mjs tests/thousands-separator.test.mjs tests/font-style.test.mjs tests/font-size.test.mjs tests/callout-indent.test.mjs tests/indent.test.mjs tests/style-mark-update.test.mjs",
46
+ "test:style-target": "node --test tests/style-target.test.mjs tests/style-schema.test.mjs tests/iframe.test.mjs tests/bookmark-transaction.test.mjs tests/thousands-separator.test.mjs tests/font-style.test.mjs tests/font-size.test.mjs tests/callout-indent.test.mjs tests/indent.test.mjs tests/style-mark-update.test.mjs tests/figure-caption-numbering.test.mjs tests/file-name.test.mjs",
47
47
  "typecheck": "vue-tsc --noEmit",
48
48
  "dev": "vite --port 9000 --open --force",
49
49
  "format": "oxfmt --write .",