oasis-editor 0.0.343 → 0.0.345
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/OasisEditorApp-Ci2InMc8.js +1 -0
- package/dist/app/controllers/EditorCommandsController.d.ts +2 -2
- package/dist/core/model/index.d.ts +1 -1
- package/dist/core/model/types/layout.d.ts +11 -1
- package/dist/defaultToolbar-B3p4kAw2.js +1 -0
- package/dist/export/pdf/draw/fragment/pdfEmphasisAndTabLeaders.d.ts +2 -2
- package/dist/i18n/locales/en.d.ts +9 -0
- package/dist/i18n/locales/pt-BR.d.ts +9 -0
- package/dist/oasis-editor.css +1 -1
- package/dist/oasis-editor.js +1 -1
- package/dist/oasis-editor.umd.cjs +1 -1
- package/dist/plugins/internal/essentialsCapabilities.d.ts +1 -1
- package/dist/ui/app/createAppCommandsController.d.ts +2 -2
- package/dist/ui/app/createEditorCommandRuntime.d.ts +1 -1
- package/dist/ui/app/essentials/types.d.ts +1 -1
- package/dist/ui/canvas/paragraph/canvasTabLeaders.d.ts +2 -2
- package/dist/ui/components/Dialogs/TabStopsDialog.d.ts +4 -1
- package/dist/ui/components/Dialogs/paragraph-dialog/ParagraphDialogTypes.d.ts +5 -0
- package/dist/ui/components/Dialogs/paragraph-dialog/useParagraphDialogController.d.ts +3 -0
- package/dist/ui/components/Ruler/rulerGeometry.d.ts +3 -0
- package/dist/ui/textMeasurement/tabStops.d.ts +12 -1
- package/package.json +1 -1
- package/dist/OasisEditorApp-B9Wryu1u.js +0 -1
- package/dist/defaultToolbar-THqAGan9.js +0 -1
|
@@ -554,7 +554,7 @@ export interface EssentialsFieldsCapability {
|
|
|
554
554
|
}
|
|
555
555
|
export interface EssentialsDialogCapability {
|
|
556
556
|
openFontDialog: () => void;
|
|
557
|
-
openParagraphDialog: () => void;
|
|
557
|
+
openParagraphDialog: (tabPosition?: number) => void;
|
|
558
558
|
requestAcceptAllRevisions: () => void;
|
|
559
559
|
requestRejectAllRevisions: () => void;
|
|
560
560
|
}
|
|
@@ -79,7 +79,7 @@ declare function createAppCommandsControllerImpl(deps: AppCommandsControllerDeps
|
|
|
79
79
|
applyLinkCommand: (href: string | null) => void;
|
|
80
80
|
promptForLink: () => void;
|
|
81
81
|
openFontDialog: () => void;
|
|
82
|
-
openParagraphDialog: () => void;
|
|
82
|
+
openParagraphDialog: (tabPosition?: number) => void;
|
|
83
83
|
openStylesDialog: () => void;
|
|
84
84
|
openPageSetupDialog: () => void;
|
|
85
85
|
removeLinkCommand: () => void;
|
|
@@ -136,7 +136,7 @@ declare function createAppCommandsControllerImpl(deps: AppCommandsControllerDeps
|
|
|
136
136
|
applyLinkCommand: (href: string | null) => void;
|
|
137
137
|
promptForLink: () => void;
|
|
138
138
|
openFontDialog: () => void;
|
|
139
|
-
openParagraphDialog: () => void;
|
|
139
|
+
openParagraphDialog: (tabPosition?: number) => void;
|
|
140
140
|
openStylesDialog: () => void;
|
|
141
141
|
openPageSetupDialog: () => void;
|
|
142
142
|
removeLinkCommand: () => void;
|
|
@@ -138,7 +138,7 @@ declare function createEditorCommandRuntimeImpl(deps: EditorCommandRuntimeDeps):
|
|
|
138
138
|
applyLinkCommand: (href: string | null) => void;
|
|
139
139
|
promptForLink: () => void;
|
|
140
140
|
openFontDialog: () => void;
|
|
141
|
-
openParagraphDialog: () => void;
|
|
141
|
+
openParagraphDialog: (tabPosition?: number) => void;
|
|
142
142
|
openStylesDialog: () => void;
|
|
143
143
|
openPageSetupDialog: () => void;
|
|
144
144
|
removeLinkCommand: () => void;
|
|
@@ -46,7 +46,7 @@ export interface CreateEditorEssentialsPluginOptions {
|
|
|
46
46
|
/** Opens the Font dialog. */
|
|
47
47
|
openFontDialog: () => void;
|
|
48
48
|
/** Opens the Paragraph dialog. */
|
|
49
|
-
openParagraphDialog: () => void;
|
|
49
|
+
openParagraphDialog: (tabPosition?: number) => void;
|
|
50
50
|
/** Opens the Accept All confirmation dialog. */
|
|
51
51
|
requestAcceptAllRevisions: () => void;
|
|
52
52
|
/** Opens the Reject All confirmation dialog. */
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { EditorLayoutLine,
|
|
2
|
-
export declare function resolveTabLeader(
|
|
1
|
+
import { EditorLayoutLine, EditorResolvedTab } from '../../../core/model.js';
|
|
2
|
+
export declare function resolveTabLeader(line: EditorLayoutLine, offset: number): EditorResolvedTab["leader"];
|
|
3
3
|
export declare function drawTabLeader(ctx: CanvasRenderingContext2D, leader: NonNullable<ReturnType<typeof resolveTabLeader>>, x1: number, x2: number, y: number): void;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { JSX } from 'solid-js';
|
|
2
2
|
import { EditorTabStop } from '../../../core/model.js';
|
|
3
|
+
import { ParagraphTabStopsChange } from '../../../core/commands/paragraphTabs.js';
|
|
3
4
|
export interface TabStopsDialogProps {
|
|
4
5
|
isOpen: boolean;
|
|
5
6
|
initial: EditorTabStop[];
|
|
7
|
+
initialDefault?: number;
|
|
8
|
+
selectedPosition?: number;
|
|
6
9
|
onClose: () => void;
|
|
7
|
-
onApply: (tabs: EditorTabStop[]) => void;
|
|
10
|
+
onApply: (tabs: EditorTabStop[], changes: ParagraphTabStopsChange[]) => void;
|
|
8
11
|
}
|
|
9
12
|
export declare function TabStopsDialog(props: TabStopsDialogProps): JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ParagraphTabStopsChange } from '../../../../core/commands/paragraphTabs.js';
|
|
1
2
|
import { EditorBorderStyle, EditorParagraphStyle, EditorTabStop } from '../../../../core/model.js';
|
|
2
3
|
export type SpecialIndent = "none" | "firstLine" | "hanging";
|
|
3
4
|
export type BorderStyleValue = "none" | "solid" | "dashed" | "dotted";
|
|
@@ -34,6 +35,9 @@ export interface ParagraphDialogInitialValues {
|
|
|
34
35
|
keepLinesTogether: boolean;
|
|
35
36
|
widowControl: boolean;
|
|
36
37
|
tabs: EditorTabStop[];
|
|
38
|
+
defaultTabStop?: number;
|
|
39
|
+
tabsOnly?: boolean;
|
|
40
|
+
selectedTabPosition?: number;
|
|
37
41
|
}
|
|
38
42
|
export interface ParagraphDialogBorders {
|
|
39
43
|
top: EditorBorderStyle | null;
|
|
@@ -65,6 +69,7 @@ export interface ParagraphDialogApplyValues {
|
|
|
65
69
|
keepLinesTogether: boolean;
|
|
66
70
|
widowControl: boolean;
|
|
67
71
|
tabs: EditorTabStop[];
|
|
72
|
+
tabChanges?: ParagraphTabStopsChange[];
|
|
68
73
|
}
|
|
69
74
|
export interface ParagraphDialogProps {
|
|
70
75
|
isOpen: boolean;
|
|
@@ -57,6 +57,9 @@ export declare function useParagraphDialogController(props: ParagraphDialogProps
|
|
|
57
57
|
setWidowControl: import('solid-js').Setter<boolean>;
|
|
58
58
|
tabs: import('solid-js').Accessor<EditorTabStop[]>;
|
|
59
59
|
setTabs: import('solid-js').Setter<EditorTabStop[]>;
|
|
60
|
+
defaultTabStop: import('solid-js').Accessor<number>;
|
|
61
|
+
setDefaultTabStop: import('solid-js').Setter<number>;
|
|
62
|
+
setTabChanges: import('solid-js').Setter<import('../../../../core/commands/paragraphTabs.js').ParagraphTabStopsChange[]>;
|
|
60
63
|
atEnabled: () => boolean;
|
|
61
64
|
previewStyle: import('solid-js').Accessor<Record<string, string | undefined>>;
|
|
62
65
|
handleApply: () => void;
|
|
@@ -60,3 +60,6 @@ export interface RulerTick {
|
|
|
60
60
|
* left content edge; numbers grow outward in both directions, like Word.
|
|
61
61
|
*/
|
|
62
62
|
export declare function computeRulerTicks(pageWidth: number, contentLeft: number, unit: "in" | "cm"): RulerTick[];
|
|
63
|
+
/** Inverse ruler transforms: tab positions are stored in pt, page geometry in px. */
|
|
64
|
+
export declare function tabPositionToPageX(positionPt: number, originPx: number): number;
|
|
65
|
+
export declare function rulerPointerToTabPosition(clientX: number, pageClientLeft: number, zoom: number, originPx: number, endPx: number, unit: "in" | "cm", free?: boolean): number;
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
-
import { EditorNamedStyle, EditorParagraphNode } from '../../core/model.js';
|
|
1
|
+
import { EditorNamedStyle, EditorParagraphNode, EditorResolvedTab, EditorTabStop } from '../../core/model.js';
|
|
2
2
|
import { MeasuredChar } from './types.js';
|
|
3
|
+
export interface PreparedTabLayout {
|
|
4
|
+
barPositionsPx: number[];
|
|
5
|
+
resolve: (currentLeftPx: number, offset: number) => {
|
|
6
|
+
advancePx: number;
|
|
7
|
+
stop: EditorResolvedTab;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
/** All coordinates are relative to the column/cell text margin, in CSS px.
|
|
11
|
+
* A bar never advances text. The same selected stop identity is passed to both
|
|
12
|
+
* painters; neither painter is permitted to choose a stop independently. */
|
|
13
|
+
export declare function prepareTabLayout(tabs: readonly EditorTabStop[], defaultTabStop: number | undefined, chars: readonly MeasuredChar[]): PreparedTabLayout;
|
|
3
14
|
export declare function resolveTabAdvancePx(paragraph: EditorParagraphNode, styles: Record<string, EditorNamedStyle> | undefined, defaultTabStop: number | undefined, lineStartInset: number, lineWidth: number, tabOffset: number, measuredChars: MeasuredChar[]): number;
|