@agilehub/agile-editor 1.8.1 → 1.8.2
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/dist/agile-editor.css +1 -1
- package/dist/agile-editor.js +7580 -6926
- package/dist/{i18n-DkkDy5cy.js → i18n-DID6uqiw.js} +5 -1
- package/dist/types/components/index.vue.d.ts +6 -0
- package/dist/types/composables/i18n.d.ts +6 -0
- package/dist/types/extensions/bookmark-anchor.d.ts +3 -0
- package/dist/types/extensions/callout/paragraph.d.ts +2 -0
- package/dist/types/extensions/font-style.d.ts +2 -0
- package/dist/types/extensions/imported-style-normalizer.d.ts +26 -0
- package/dist/types/extensions/indent.d.ts +1 -0
- package/dist/types/extensions/index.d.ts +1 -1
- package/dist/types/i18n.d.ts +6 -0
- package/dist/types/utils/default-paragraph-indent.d.ts +4 -0
- package/dist/types/utils/font-size.d.ts +13 -0
- package/dist/types/utils/inline-style.d.ts +8 -0
- package/dist/types/utils/style-mark-update.d.ts +8 -0
- package/dist/types/utils/style-target.d.ts +1 -0
- package/dist/types/utils/text-style-cleanup.d.ts +16 -0
- package/dist/{viewer-BLXXdsVI.js → viewer-CoKl4QoQ.js} +2 -2
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @agilehub/agile-editor 1.8.
|
|
2
|
+
* @agilehub/agile-editor 1.8.2
|
|
3
3
|
* @license Apache-2.0
|
|
4
4
|
* @author undefined undefined
|
|
5
5
|
* @see undefined
|
|
@@ -1137,8 +1137,10 @@ var o = ["width", "height"], s = ["xlink:href", "fill"], c = /* @__PURE__ */ n({
|
|
|
1137
1137
|
background: "Background Color",
|
|
1138
1138
|
border: "Border Settings",
|
|
1139
1139
|
borderColor: "Border Color",
|
|
1140
|
+
borderRadius: "Corner Radius",
|
|
1140
1141
|
borderStyle: "Border Style",
|
|
1141
1142
|
noBorder: "No Border",
|
|
1143
|
+
showBorder: "Show Border",
|
|
1142
1144
|
writingMode: "Writing Mode",
|
|
1143
1145
|
horizontalTb: "Horizontal Text",
|
|
1144
1146
|
verticalLr: "Vertical Text (Left to Right)",
|
|
@@ -2526,8 +2528,10 @@ var o = ["width", "height"], s = ["xlink:href", "fill"], c = /* @__PURE__ */ n({
|
|
|
2526
2528
|
background: "背景颜色",
|
|
2527
2529
|
border: "边框设置",
|
|
2528
2530
|
borderColor: "边框颜色",
|
|
2531
|
+
borderRadius: "圆角",
|
|
2529
2532
|
borderStyle: "边框样式",
|
|
2530
2533
|
noBorder: "不显示边框",
|
|
2534
|
+
showBorder: "显示边框",
|
|
2531
2535
|
writingMode: "文字排列方式",
|
|
2532
2536
|
horizontalTb: "默认",
|
|
2533
2537
|
verticalLr: "垂直排列(从左到右)",
|
|
@@ -1160,8 +1160,10 @@ declare const __VLS_base: import("vue").DefineComponent<{}, {
|
|
|
1160
1160
|
background: string;
|
|
1161
1161
|
border: string;
|
|
1162
1162
|
borderColor: string;
|
|
1163
|
+
borderRadius: string;
|
|
1163
1164
|
borderStyle: string;
|
|
1164
1165
|
noBorder: string;
|
|
1166
|
+
showBorder: string;
|
|
1165
1167
|
writingMode: string;
|
|
1166
1168
|
horizontalTb: string;
|
|
1167
1169
|
verticalLr: string;
|
|
@@ -2558,8 +2560,10 @@ declare const __VLS_base: import("vue").DefineComponent<{}, {
|
|
|
2558
2560
|
background: string;
|
|
2559
2561
|
border: string;
|
|
2560
2562
|
borderColor: string;
|
|
2563
|
+
borderRadius: string;
|
|
2561
2564
|
borderStyle: string;
|
|
2562
2565
|
noBorder: string;
|
|
2566
|
+
showBorder: string;
|
|
2563
2567
|
writingMode: string;
|
|
2564
2568
|
horizontalTb: string;
|
|
2565
2569
|
verticalLr: string;
|
|
@@ -3943,8 +3947,10 @@ declare const __VLS_base: import("vue").DefineComponent<{}, {
|
|
|
3943
3947
|
background: string;
|
|
3944
3948
|
border: string;
|
|
3945
3949
|
borderColor: string;
|
|
3950
|
+
borderRadius: string;
|
|
3946
3951
|
borderStyle: string;
|
|
3947
3952
|
noBorder: string;
|
|
3953
|
+
showBorder: string;
|
|
3948
3954
|
writingMode: string;
|
|
3949
3955
|
horizontalTb: string;
|
|
3950
3956
|
verticalLr: string;
|
|
@@ -1116,8 +1116,10 @@ export declare const useI18n: () => import("vue-i18n").Composer<{
|
|
|
1116
1116
|
background: string;
|
|
1117
1117
|
border: string;
|
|
1118
1118
|
borderColor: string;
|
|
1119
|
+
borderRadius: string;
|
|
1119
1120
|
borderStyle: string;
|
|
1120
1121
|
noBorder: string;
|
|
1122
|
+
showBorder: string;
|
|
1121
1123
|
writingMode: string;
|
|
1122
1124
|
horizontalTb: string;
|
|
1123
1125
|
verticalLr: string;
|
|
@@ -2514,8 +2516,10 @@ export declare const useI18n: () => import("vue-i18n").Composer<{
|
|
|
2514
2516
|
background: string;
|
|
2515
2517
|
border: string;
|
|
2516
2518
|
borderColor: string;
|
|
2519
|
+
borderRadius: string;
|
|
2517
2520
|
borderStyle: string;
|
|
2518
2521
|
noBorder: string;
|
|
2522
|
+
showBorder: string;
|
|
2519
2523
|
writingMode: string;
|
|
2520
2524
|
horizontalTb: string;
|
|
2521
2525
|
verticalLr: string;
|
|
@@ -3899,8 +3903,10 @@ export declare const useI18n: () => import("vue-i18n").Composer<{
|
|
|
3899
3903
|
background: string;
|
|
3900
3904
|
border: string;
|
|
3901
3905
|
borderColor: string;
|
|
3906
|
+
borderRadius: string;
|
|
3902
3907
|
borderStyle: string;
|
|
3903
3908
|
noBorder: string;
|
|
3909
|
+
showBorder: string;
|
|
3904
3910
|
writingMode: string;
|
|
3905
3911
|
horizontalTb: string;
|
|
3906
3912
|
verticalLr: string;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Extension } from '@tiptap/core';
|
|
2
|
+
import type { Node as ProseMirrorNode } from '@tiptap/pm/model';
|
|
3
|
+
type TextCleanup = {
|
|
4
|
+
attributes: Set<string>;
|
|
5
|
+
from: number;
|
|
6
|
+
properties: Set<string>;
|
|
7
|
+
to: number;
|
|
8
|
+
};
|
|
9
|
+
type NodeCleanup = {
|
|
10
|
+
node: ProseMirrorNode;
|
|
11
|
+
position: number;
|
|
12
|
+
properties: Set<string>;
|
|
13
|
+
};
|
|
14
|
+
export declare const collectImportedTextStyleCleanups: (oldDoc: ProseMirrorNode, newDoc: ProseMirrorNode, ranges: Array<{
|
|
15
|
+
newRange: {
|
|
16
|
+
from: number;
|
|
17
|
+
to: number;
|
|
18
|
+
};
|
|
19
|
+
oldRange: any;
|
|
20
|
+
}>) => TextCleanup[];
|
|
21
|
+
export declare const collectImportedNodeStyleCleanups: (oldDoc: ProseMirrorNode, newDoc: ProseMirrorNode, ranges: Array<{
|
|
22
|
+
from: number;
|
|
23
|
+
to: number;
|
|
24
|
+
}>) => NodeCleanup[];
|
|
25
|
+
declare const _default: Extension<any, any>;
|
|
26
|
+
export default _default;
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* 注意事项:表格内段落默认不缩进,但允许用户手动设置。
|
|
5
5
|
*/
|
|
6
6
|
import { Extension } from '@tiptap/core';
|
|
7
|
+
export declare const resolveIndentAttributes: (attrs: any, indent: any, minLevel: any, config: any, fallbackUnit?: string) => any;
|
|
7
8
|
declare const _default: Extension<{
|
|
8
9
|
types: string[];
|
|
9
10
|
minLevel: number;
|
|
@@ -9,7 +9,7 @@ export declare const getDefaultExtensions: ({ container, options, uploadFileMap
|
|
|
9
9
|
container: any;
|
|
10
10
|
options: any;
|
|
11
11
|
uploadFileMap: any;
|
|
12
|
-
}) => (import("@tiptap/core").Extension<any, any> | import("@tiptap/core").
|
|
12
|
+
}) => (import("@tiptap/core").Extension<any, any> | import("@tiptap/core").Node<any, any> | import("@tiptap/core").Mark<any, any>)[];
|
|
13
13
|
/**
|
|
14
14
|
* 根据文档配置决定是否启用 Markdown 输入和粘贴规则。
|
|
15
15
|
* @param options - 包含 Markdown 开关的响应式编辑器配置。
|
package/dist/types/i18n.d.ts
CHANGED
|
@@ -1103,8 +1103,10 @@ export declare const i18n: import("vue-i18n").I18n<{
|
|
|
1103
1103
|
background: string;
|
|
1104
1104
|
border: string;
|
|
1105
1105
|
borderColor: string;
|
|
1106
|
+
borderRadius: string;
|
|
1106
1107
|
borderStyle: string;
|
|
1107
1108
|
noBorder: string;
|
|
1109
|
+
showBorder: string;
|
|
1108
1110
|
writingMode: string;
|
|
1109
1111
|
horizontalTb: string;
|
|
1110
1112
|
verticalLr: string;
|
|
@@ -2501,8 +2503,10 @@ export declare const i18n: import("vue-i18n").I18n<{
|
|
|
2501
2503
|
background: string;
|
|
2502
2504
|
border: string;
|
|
2503
2505
|
borderColor: string;
|
|
2506
|
+
borderRadius: string;
|
|
2504
2507
|
borderStyle: string;
|
|
2505
2508
|
noBorder: string;
|
|
2509
|
+
showBorder: string;
|
|
2506
2510
|
writingMode: string;
|
|
2507
2511
|
horizontalTb: string;
|
|
2508
2512
|
verticalLr: string;
|
|
@@ -3886,8 +3890,10 @@ export declare const i18n: import("vue-i18n").I18n<{
|
|
|
3886
3890
|
background: string;
|
|
3887
3891
|
border: string;
|
|
3888
3892
|
borderColor: string;
|
|
3893
|
+
borderRadius: string;
|
|
3889
3894
|
borderStyle: string;
|
|
3890
3895
|
noBorder: string;
|
|
3896
|
+
showBorder: string;
|
|
3891
3897
|
writingMode: string;
|
|
3892
3898
|
horizontalTb: string;
|
|
3893
3899
|
verticalLr: string;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Fragment } from '@tiptap/pm/model';
|
|
2
|
+
export declare const createZeroIndentParagraph: (schema: any) => any;
|
|
3
|
+
export declare const normalizeDefaultParagraphIndent: (content: Fragment) => Fragment;
|
|
4
|
+
export declare const resetParagraphIndent: (content: Fragment) => Fragment;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const FONT_SIZE_STEPS: readonly ["12px", "14px", "16px", "18px", "20px", "22px", "24px", "26px", "28px", "30px", "32px", "34px", "36px"];
|
|
2
|
+
/**
|
|
3
|
+
* 将 pt 字号按 1pt = 96/72px 换算为最接近的偶数像素。
|
|
4
|
+
* 非 pt 单位和不合法值保持原样。
|
|
5
|
+
*/
|
|
6
|
+
export declare const convertFontSizeToPx: (value: string) => string;
|
|
7
|
+
/**
|
|
8
|
+
* 按当前字号单位计算相邻字号。
|
|
9
|
+
*
|
|
10
|
+
* 绝对单位和关键字会映射到工具栏 px 档位;em、rem 和百分比按相对幅度
|
|
11
|
+
* 调整,避免导入的 pt 字号导致增大/减小按钮无响应。
|
|
12
|
+
*/
|
|
13
|
+
export declare const stepFontSize: (current: string | null | undefined, direction: 1 | -1, steps?: readonly string[]) => string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 从内联样式中移除指定 CSS 属性,保留其他声明及其顺序。
|
|
3
|
+
*
|
|
4
|
+
* 浏览器内使用 CSSStyleDeclaration 解析,避免破坏 data URI 等复杂值;无 DOM
|
|
5
|
+
* 环境使用等价的声明扫描逻辑,便于在 Node 单元测试中验证。
|
|
6
|
+
*/
|
|
7
|
+
export declare const removeInlineStyleProperties: (styleText: string | null | undefined, properties: string[]) => string;
|
|
8
|
+
export declare const setInlineStyleProperty: (styleText: string | null | undefined, property: string, value: string) => string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Transaction } from '@tiptap/pm/state';
|
|
2
|
+
export declare const updateMatchingMarkRanges: (transaction: Transaction, options: {
|
|
3
|
+
from: number;
|
|
4
|
+
markAttrs?: Record<string, unknown>;
|
|
5
|
+
markName: string;
|
|
6
|
+
nextAttrs: Record<string, unknown>;
|
|
7
|
+
to: number;
|
|
8
|
+
}) => number;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Transaction } from '@tiptap/pm/state';
|
|
2
|
+
/**
|
|
3
|
+
* 清理选区内的重复文本样式声明。
|
|
4
|
+
*
|
|
5
|
+
* textStyle 和语义 mark 是权威样式;customStyle 与原始内联样式只保留其余
|
|
6
|
+
* 声明,避免导入文档中的旧样式覆盖菜单设置。
|
|
7
|
+
*/
|
|
8
|
+
export declare const stripTextStyleProperties: (transaction: Transaction, from: number, to: number, properties: string[]) => boolean;
|
|
9
|
+
/**
|
|
10
|
+
* 清除 textStyle mark 上的指定属性。
|
|
11
|
+
*/
|
|
12
|
+
export declare const stripTextStyleMarkAttributes: (transaction: Transaction, from: number, to: number, attributes: string[]) => boolean;
|
|
13
|
+
/**
|
|
14
|
+
* 清理块节点自身内联样式中的重复声明。
|
|
15
|
+
*/
|
|
16
|
+
export declare const stripNodeStyleProperties: (transaction: Transaction, from: number, to: number, properties: string[], nodeTypes?: string[]) => boolean;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @agilehub/agile-editor 1.8.
|
|
2
|
+
* @agilehub/agile-editor 1.8.2
|
|
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-
|
|
8
|
+
import { a as e, n as t } from "./i18n-DID6uqiw.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.
|
|
3
|
+
"version": "1.8.2",
|
|
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",
|
|
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",
|
|
47
47
|
"typecheck": "vue-tsc --noEmit",
|
|
48
48
|
"dev": "vite --port 9000 --open --force",
|
|
49
49
|
"format": "oxfmt --write .",
|