@agilehub/agile-editor 1.9.0 → 1.9.1
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 +9203 -8553
- package/dist/{i18n-CChALhQN.js → i18n-isaO-7Rd.js} +52 -6
- package/dist/types/components/editor/table-padding-control.vue.d.ts +7 -0
- package/dist/types/components/editor/table-property-section.vue.d.ts +5 -2
- package/dist/types/components/index.vue.d.ts +69 -0
- package/dist/types/components/menus/toolbar/view/break-marks.vue.d.ts +3 -0
- package/dist/types/components/menus/toolbar/view/line-number.vue.d.ts +3 -0
- package/dist/types/components/toolbar/classic.vue.d.ts +8 -8
- package/dist/types/components/toolbar/ribbon.vue.d.ts +8 -8
- package/dist/types/composables/i18n.d.ts +69 -0
- package/dist/types/extensions/table.d.ts +2 -0
- package/dist/types/i18n.d.ts +69 -0
- package/dist/types/utils/table-border.d.ts +8 -0
- package/dist/types/utils/table-cell-padding.d.ts +6 -0
- package/dist/types/utils/table-repair.d.ts +8 -0
- package/dist/{viewer-Cv5V0Gjs.js → viewer-P9wgj_Yv.js} +2 -2
- package/package.json +4 -3
package/dist/types/i18n.d.ts
CHANGED
|
@@ -564,6 +564,7 @@ export declare const i18n: import("vue-i18n").I18n<{
|
|
|
564
564
|
selectAll: string;
|
|
565
565
|
quickTools: {
|
|
566
566
|
tableProperties: string;
|
|
567
|
+
closeProperties: string;
|
|
567
568
|
rowProperties: string;
|
|
568
569
|
cellProperties: string;
|
|
569
570
|
layout: string;
|
|
@@ -611,6 +612,15 @@ export declare const i18n: import("vue-i18n").I18n<{
|
|
|
611
612
|
removeImage: string;
|
|
612
613
|
uploadFailed: string;
|
|
613
614
|
clearBackground: string;
|
|
615
|
+
cellPadding: string;
|
|
616
|
+
mixedPadding: string;
|
|
617
|
+
paddingCell: string;
|
|
618
|
+
paddingSides: {
|
|
619
|
+
top: string;
|
|
620
|
+
right: string;
|
|
621
|
+
bottom: string;
|
|
622
|
+
left: string;
|
|
623
|
+
};
|
|
614
624
|
apply: string;
|
|
615
625
|
borderLines: {
|
|
616
626
|
hidden: string;
|
|
@@ -753,6 +763,18 @@ export declare const i18n: import("vue-i18n").I18n<{
|
|
|
753
763
|
fix: {
|
|
754
764
|
text: string;
|
|
755
765
|
tip: string;
|
|
766
|
+
title: string;
|
|
767
|
+
apply: string;
|
|
768
|
+
structure: string;
|
|
769
|
+
structureTip: string;
|
|
770
|
+
wrapping: string;
|
|
771
|
+
wrappingTip: string;
|
|
772
|
+
fitWidth: string;
|
|
773
|
+
fitWidthTip: string;
|
|
774
|
+
rowHeight: string;
|
|
775
|
+
rowHeightTip: string;
|
|
776
|
+
finished: string;
|
|
777
|
+
unchanged: string;
|
|
756
778
|
};
|
|
757
779
|
insert: {
|
|
758
780
|
text: string;
|
|
@@ -1276,6 +1298,7 @@ export declare const i18n: import("vue-i18n").I18n<{
|
|
|
1276
1298
|
common: string;
|
|
1277
1299
|
clearFormat: string;
|
|
1278
1300
|
duplicate: string;
|
|
1301
|
+
insertBelow: string;
|
|
1279
1302
|
copy: string;
|
|
1280
1303
|
cut: string;
|
|
1281
1304
|
delete: string;
|
|
@@ -2322,6 +2345,7 @@ export declare const i18n: import("vue-i18n").I18n<{
|
|
|
2322
2345
|
selectAll: string;
|
|
2323
2346
|
quickTools: {
|
|
2324
2347
|
tableProperties: string;
|
|
2348
|
+
closeProperties: string;
|
|
2325
2349
|
rowProperties: string;
|
|
2326
2350
|
cellProperties: string;
|
|
2327
2351
|
layout: string;
|
|
@@ -2369,6 +2393,15 @@ export declare const i18n: import("vue-i18n").I18n<{
|
|
|
2369
2393
|
removeImage: string;
|
|
2370
2394
|
uploadFailed: string;
|
|
2371
2395
|
clearBackground: string;
|
|
2396
|
+
cellPadding: string;
|
|
2397
|
+
mixedPadding: string;
|
|
2398
|
+
paddingCell: string;
|
|
2399
|
+
paddingSides: {
|
|
2400
|
+
top: string;
|
|
2401
|
+
right: string;
|
|
2402
|
+
bottom: string;
|
|
2403
|
+
left: string;
|
|
2404
|
+
};
|
|
2372
2405
|
apply: string;
|
|
2373
2406
|
borderLines: {
|
|
2374
2407
|
hidden: string;
|
|
@@ -2515,6 +2548,18 @@ export declare const i18n: import("vue-i18n").I18n<{
|
|
|
2515
2548
|
fix: {
|
|
2516
2549
|
text: string;
|
|
2517
2550
|
tip: string;
|
|
2551
|
+
title: string;
|
|
2552
|
+
apply: string;
|
|
2553
|
+
structure: string;
|
|
2554
|
+
structureTip: string;
|
|
2555
|
+
wrapping: string;
|
|
2556
|
+
wrappingTip: string;
|
|
2557
|
+
fitWidth: string;
|
|
2558
|
+
fitWidthTip: string;
|
|
2559
|
+
rowHeight: string;
|
|
2560
|
+
rowHeightTip: string;
|
|
2561
|
+
finished: string;
|
|
2562
|
+
unchanged: string;
|
|
2518
2563
|
};
|
|
2519
2564
|
insert: {
|
|
2520
2565
|
text: string;
|
|
@@ -3032,6 +3077,7 @@ export declare const i18n: import("vue-i18n").I18n<{
|
|
|
3032
3077
|
common: string;
|
|
3033
3078
|
clearFormat: string;
|
|
3034
3079
|
duplicate: string;
|
|
3080
|
+
insertBelow: string;
|
|
3035
3081
|
copy: string;
|
|
3036
3082
|
cut: string;
|
|
3037
3083
|
delete: string;
|
|
@@ -4072,6 +4118,7 @@ export declare const i18n: import("vue-i18n").I18n<{
|
|
|
4072
4118
|
selectAll: string;
|
|
4073
4119
|
quickTools: {
|
|
4074
4120
|
tableProperties: string;
|
|
4121
|
+
closeProperties: string;
|
|
4075
4122
|
rowProperties: string;
|
|
4076
4123
|
cellProperties: string;
|
|
4077
4124
|
layout: string;
|
|
@@ -4119,6 +4166,15 @@ export declare const i18n: import("vue-i18n").I18n<{
|
|
|
4119
4166
|
removeImage: string;
|
|
4120
4167
|
uploadFailed: string;
|
|
4121
4168
|
clearBackground: string;
|
|
4169
|
+
cellPadding: string;
|
|
4170
|
+
mixedPadding: string;
|
|
4171
|
+
paddingCell: string;
|
|
4172
|
+
paddingSides: {
|
|
4173
|
+
top: string;
|
|
4174
|
+
right: string;
|
|
4175
|
+
bottom: string;
|
|
4176
|
+
left: string;
|
|
4177
|
+
};
|
|
4122
4178
|
apply: string;
|
|
4123
4179
|
borderLines: {
|
|
4124
4180
|
hidden: string;
|
|
@@ -4265,6 +4321,18 @@ export declare const i18n: import("vue-i18n").I18n<{
|
|
|
4265
4321
|
fix: {
|
|
4266
4322
|
text: string;
|
|
4267
4323
|
tip: string;
|
|
4324
|
+
title: string;
|
|
4325
|
+
apply: string;
|
|
4326
|
+
structure: string;
|
|
4327
|
+
structureTip: string;
|
|
4328
|
+
wrapping: string;
|
|
4329
|
+
wrappingTip: string;
|
|
4330
|
+
fitWidth: string;
|
|
4331
|
+
fitWidthTip: string;
|
|
4332
|
+
rowHeight: string;
|
|
4333
|
+
rowHeightTip: string;
|
|
4334
|
+
finished: string;
|
|
4335
|
+
unchanged: string;
|
|
4268
4336
|
};
|
|
4269
4337
|
insert: {
|
|
4270
4338
|
text: string;
|
|
@@ -4782,6 +4850,7 @@ export declare const i18n: import("vue-i18n").I18n<{
|
|
|
4782
4850
|
common: string;
|
|
4783
4851
|
clearFormat: string;
|
|
4784
4852
|
duplicate: string;
|
|
4853
|
+
insertBelow: string;
|
|
4785
4854
|
copy: string;
|
|
4786
4855
|
cut: string;
|
|
4787
4856
|
delete: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Node as ProseMirrorNode } from '@tiptap/pm/model';
|
|
1
2
|
export type TableBorderLineStyle = 'none' | 'hidden' | 'dotted' | 'dashed' | 'solid' | 'double' | 'groove' | 'ridge' | 'inset' | 'outset';
|
|
2
3
|
export type TableBorderSide = 'Top' | 'Right' | 'Bottom' | 'Left';
|
|
3
4
|
export type TableBorderValues = {
|
|
@@ -15,6 +16,7 @@ export declare const parseTableBorderStyle: (value: string) => {
|
|
|
15
16
|
lineStyle: TableBorderLineStyle;
|
|
16
17
|
};
|
|
17
18
|
export declare const normalizeTableBorderWidth: (width: number | string, lineStyle: TableBorderLineStyle | string) => number;
|
|
19
|
+
export declare const getTableBorderMinWidth: (lineStyle: string) => 1 | 3;
|
|
18
20
|
export declare const createTableBorderStyle: (width: number | string, lineStyle: TableBorderLineStyle | string) => string;
|
|
19
21
|
export declare const normalizeTableBorderStyle: (value: string) => string;
|
|
20
22
|
/**
|
|
@@ -22,6 +24,8 @@ export declare const normalizeTableBorderStyle: (value: string) => string;
|
|
|
22
24
|
* values into the document.
|
|
23
25
|
*/
|
|
24
26
|
export declare const resolveTableBorder: (cellAttrs?: Record<string, any>, tableAttrs?: Record<string, any>) => TableBorderValues;
|
|
27
|
+
/** Normalize imported CSS colors so matching preset swatches remain selected. */
|
|
28
|
+
export declare const normalizeTableThemeColor: (color: string) => string;
|
|
25
29
|
export declare const hasTableBorderPatch: (patch: TableBorderPatch) => any;
|
|
26
30
|
export declare const getTableBorderPatch: (current: TableBorderValues, baseline: TableBorderValues) => TableBorderPatch;
|
|
27
31
|
export declare const updateTableCellBorderAttributes: (cellAttrs: Record<string, any>, tableAttrs: Record<string, any>, patch: TableBorderPatch) => {
|
|
@@ -30,6 +34,10 @@ export declare const updateTableCellBorderAttributes: (cellAttrs: Record<string,
|
|
|
30
34
|
export declare const updateTableCellSideBorderAttributes: (cellAttrs: Record<string, any>, tableAttrs: Record<string, any>, patch: TableBorderPatch, side: TableBorderSide) => {
|
|
31
35
|
[x: string]: any;
|
|
32
36
|
};
|
|
37
|
+
export declare const getTableCellBorderUpdates: (table: ProseMirrorNode, tableStart: number, positions: number[], patch: TableBorderPatch) => {
|
|
38
|
+
position: number;
|
|
39
|
+
attrs: Record<string, any>;
|
|
40
|
+
}[];
|
|
33
41
|
/**
|
|
34
42
|
* Render modeled cell borders as independent CSS longhands. Omitting an
|
|
35
43
|
* inherited color is intentional: the table-level border color must remain
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { EditorState } from '@tiptap/pm/state';
|
|
2
|
+
export type TablePaddingScope = 'table' | 'row' | 'cell';
|
|
3
|
+
export declare const tablePaddingSides: readonly ["top", "right", "bottom", "left"];
|
|
4
|
+
export type TableCellPadding = Record<(typeof tablePaddingSides)[number], number | null>;
|
|
5
|
+
/** TableMap includes row-spanning cells and deduplicates merged cell positions. */
|
|
6
|
+
export declare const getTablePaddingPositions: (state: EditorState, scope: TablePaddingScope) => number[];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { EditorState, Transaction } from '@tiptap/pm/state';
|
|
2
|
+
export type TableRepairOptions = {
|
|
3
|
+
structure: boolean;
|
|
4
|
+
wrapping: boolean;
|
|
5
|
+
fitWidth: boolean;
|
|
6
|
+
rowHeight: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare const repairCurrentTable: (state: EditorState, tr: Transaction, options: TableRepairOptions, availableWidth?: number) => boolean;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @agilehub/agile-editor 1.9.
|
|
2
|
+
* @agilehub/agile-editor 1.9.1
|
|
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-isaO-7Rd.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.9.
|
|
3
|
+
"version": "1.9.1",
|
|
4
4
|
"description": "Rich text editor based on Vue 3 and Tiptap 3",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"docs editor",
|
|
@@ -43,7 +43,8 @@
|
|
|
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/image-display-size.test.mjs tests/style-schema.test.mjs tests/link.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.test.mjs tests/callout-indent.test.mjs tests/indent.test.mjs tests/style-mark-update.test.mjs tests/figure-caption-numbering.test.mjs tests/table-caption-numbering.test.mjs tests/file-name.test.mjs tests/timeline.test.mjs tests/caption-defaults.test.mjs tests/table-caption-visibility.test.mjs tests/details-collapse.test.mjs tests/editor-view.test.mjs tests/table-selection.test.mjs tests/table-appearance.test.mjs tests/table-border.test.mjs tests/table-properties.test.mjs tests/table-column-resize.test.mjs tests/table-layout.test.mjs tests/table-reset.test.mjs tests/document-loading.test.mjs tests/document-loading-i18n.test.mjs tests/document-save.test.mjs tests/attribute-roundtrip.test.mjs tests/table-attributes.test.mjs tests/bubble-note-selection.test.mjs tests/bubble-note-rich-content.test.mjs tests/bubble-note-image.test.mjs tests/bubble-note-render.test.mjs tests/bubble-note-default-limits.test.mjs tests/image-replacement.test.mjs tests/image-paste.test.mjs tests/insert-newline.test.mjs tests/table-row-resize.test.mjs tests/courseware-reader.test.mjs tests/pointer-hover-scheduler.test.mjs tests/tiptap-upgrade.test.mjs",
|
|
46
|
+
"test:style-target": "node --test tests/style-target.test.mjs tests/image-display-size.test.mjs tests/style-schema.test.mjs tests/link.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.test.mjs tests/callout-indent.test.mjs tests/indent.test.mjs tests/style-mark-update.test.mjs tests/figure-caption-numbering.test.mjs tests/table-caption-numbering.test.mjs tests/file-name.test.mjs tests/timeline.test.mjs tests/caption-defaults.test.mjs tests/table-caption-visibility.test.mjs tests/details-collapse.test.mjs tests/editor-view.test.mjs tests/table-selection.test.mjs tests/table-appearance.test.mjs tests/table-border.test.mjs tests/table-properties.test.mjs tests/table-cell-padding.test.mjs tests/table-column-resize.test.mjs tests/table-layout.test.mjs tests/table-reset.test.mjs tests/document-loading.test.mjs tests/document-loading-i18n.test.mjs tests/document-save.test.mjs tests/attribute-roundtrip.test.mjs tests/table-attributes.test.mjs tests/bubble-note-selection.test.mjs tests/bubble-note-rich-content.test.mjs tests/bubble-note-image.test.mjs tests/bubble-note-render.test.mjs tests/bubble-note-default-limits.test.mjs tests/image-replacement.test.mjs tests/image-paste.test.mjs tests/insert-newline.test.mjs tests/table-row-resize.test.mjs tests/courseware-reader.test.mjs tests/pointer-hover-scheduler.test.mjs tests/tiptap-upgrade.test.mjs",
|
|
47
|
+
"test:table-repair": "node --test tests/table-repair.test.mjs",
|
|
47
48
|
"typecheck": "vue-tsc --noEmit",
|
|
48
49
|
"dev": "vite --port 9000 --open --force",
|
|
49
50
|
"format": "oxfmt --write .",
|
|
@@ -163,4 +164,4 @@
|
|
|
163
164
|
"engines": {
|
|
164
165
|
"node": "^22.22.1 || ^24.11.0 || >=26.0.0"
|
|
165
166
|
}
|
|
166
|
-
}
|
|
167
|
+
}
|