oasis-editor 0.0.115 → 0.0.117
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-C1dyjJoH.js → OasisEditorApp-DijR5F-O.js} +2183 -907
- package/dist/adapters/react.d.ts +11 -0
- package/dist/adapters/ui.d.ts +2 -0
- package/dist/adapters/vue.d.ts +23 -0
- package/dist/assets/{importDocxWorker-D0F0jbcF.js → importDocxWorker-nIS-zjkj.js} +1 -1
- package/dist/core/html/inlineImageParser.d.ts +7 -0
- package/dist/core/layoutConstants.d.ts +18 -0
- package/dist/{index-Cq3YFYX2.js → index-Comlrue1.js} +779 -738
- package/dist/layoutProjection/blocksPaginationTypes.d.ts +2 -0
- package/dist/layoutProjection/constants.d.ts +7 -1
- package/dist/layoutProjection/footnotePagination.d.ts +0 -1
- package/dist/layoutProjection/headerFooterLayoutContext.d.ts +2 -0
- package/dist/layoutProjection/paginationTrack.d.ts +2 -0
- package/dist/layoutProjection/paragraphPagination.d.ts +8 -3
- package/dist/layoutProjection/sectionPagination.d.ts +3 -0
- package/dist/layoutProjection/tableRowSlicing.d.ts +2 -1
- package/dist/oasis-editor.css +1 -1
- package/dist/oasis-editor.js +55 -55
- package/dist/oasis-editor.umd.cjs +4 -4
- package/dist/react.d.ts +7 -8
- package/dist/react.js +18 -22
- package/dist/ui/canvas/table/prepareCells.d.ts +1 -1
- package/dist/ui/canvas/table/resolveRowHeights.d.ts +1 -1
- package/dist/ui/components/Dialogs/TablePropertiesDialog.d.ts +2 -99
- package/dist/ui/components/Dialogs/font-dialog/FontTab.d.ts +2 -1
- package/dist/ui/components/Dialogs/table-properties/AltTextTabPanel.d.ts +3 -0
- package/dist/ui/components/Dialogs/table-properties/CellTabPanel.d.ts +3 -0
- package/dist/ui/components/Dialogs/table-properties/ColumnTabPanel.d.ts +3 -0
- package/dist/ui/components/Dialogs/table-properties/RowTabPanel.d.ts +3 -0
- package/dist/ui/components/Dialogs/table-properties/TablePropertiesController.d.ts +12 -0
- package/dist/ui/components/Dialogs/table-properties/TablePropertiesTypes.d.ts +160 -0
- package/dist/ui/components/Dialogs/table-properties/TableTabPanel.d.ts +6 -0
- package/dist/ui/components/Dialogs/table-properties/fields.d.ts +9 -0
- package/dist/ui/components/Dialogs/table-properties/useTablePropertiesController.d.ts +4 -0
- package/dist/ui/components/FindReplace/FindReplaceDialog.d.ts +1 -2
- package/dist/ui/components/Menubar/Menubar.d.ts +1 -2
- package/dist/ui/components/PageBreak.d.ts +1 -1
- package/dist/ui/components/Toolbar/primitives/useSurfaceRect.d.ts +20 -0
- package/dist/ui/public/FieldRow.d.ts +13 -0
- package/dist/ui/public/NumberField.d.ts +13 -0
- package/dist/ui/public/Radio.d.ts +38 -0
- package/dist/ui/public/ToggleChip.d.ts +14 -0
- package/dist/ui/public/index.d.ts +8 -0
- package/dist/ui.d.ts +2 -42
- package/dist/ui.js +19 -18
- package/dist/utils/performanceMetrics.d.ts +0 -6
- package/dist/utils/round.d.ts +7 -0
- package/dist/vue.d.ts +22 -8
- package/dist/vue.js +18 -24
- package/package.json +9 -6
package/dist/react.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { OasisEditorAppProps, OasisEditorClient } from '../index.ts';
|
|
3
3
|
|
|
4
4
|
export type ReactOasisEditorProps = OasisEditorAppProps & {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Receives the mounted Oasis client. Props are mount-only for this adapter;
|
|
7
|
+
* remount the component to apply a new editor configuration.
|
|
8
|
+
*/
|
|
9
|
+
onClient?: (client: OasisEditorClient) => void;
|
|
10
10
|
};
|
|
11
|
-
|
|
12
11
|
export declare const OasisEditor: React.FC<ReactOasisEditorProps>;
|
package/dist/react.js
CHANGED
|
@@ -1,24 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { mount } from "oasis-editor";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
props.onClient?.(instanceRef.current);
|
|
12
|
-
}
|
|
13
|
-
return () => {
|
|
14
|
-
instanceRef.current?.unmount();
|
|
15
|
-
instanceRef.current = null;
|
|
1
|
+
import f, { useRef as i, useEffect as a } from "react";
|
|
2
|
+
import { mount as m } from "oasis-editor";
|
|
3
|
+
const R = (e) => {
|
|
4
|
+
var r, u;
|
|
5
|
+
const n = i(null), t = i(null);
|
|
6
|
+
return a(() => {
|
|
7
|
+
var c;
|
|
8
|
+
return n.current && (t.current = m(n.current, e), (c = e.onClient) == null || c.call(e, t.current)), () => {
|
|
9
|
+
var l;
|
|
10
|
+
(l = t.current) == null || l.unmount(), t.current = null;
|
|
16
11
|
};
|
|
17
|
-
}, [])
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
className: props.ui?.class,
|
|
22
|
-
style: props.ui?.style,
|
|
12
|
+
}, []), f.createElement("div", {
|
|
13
|
+
ref: n,
|
|
14
|
+
className: (r = e.ui) == null ? void 0 : r.class,
|
|
15
|
+
style: (u = e.ui) == null ? void 0 : u.style
|
|
23
16
|
});
|
|
24
|
-
}
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
R as OasisEditor
|
|
20
|
+
};
|
|
@@ -44,7 +44,7 @@ export declare function prepareCells(options: {
|
|
|
44
44
|
columnOffsets: number[];
|
|
45
45
|
cellSpacingPx: number;
|
|
46
46
|
visualColumnCount: number;
|
|
47
|
-
effectiveRowStyles:
|
|
47
|
+
effectiveRowStyles: EditorTableNode["rows"][number]["style"][];
|
|
48
48
|
state: EditorState;
|
|
49
49
|
pageIndex: number;
|
|
50
50
|
}): {
|
|
@@ -4,6 +4,6 @@ import { PreparedCell } from './prepareCells.js';
|
|
|
4
4
|
export declare function resolveRowHeights(options: {
|
|
5
5
|
prepared: PreparedCell[];
|
|
6
6
|
table: EditorTableNode;
|
|
7
|
-
effectiveRowStyles:
|
|
7
|
+
effectiveRowStyles: EditorTableNode["rows"][number]["style"][];
|
|
8
8
|
estimatedHeight: number;
|
|
9
9
|
}): number[];
|
|
@@ -1,101 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TablePropertiesDialogProps } from './table-properties/TablePropertiesTypes.js';
|
|
2
2
|
|
|
3
|
-
type
|
|
4
|
-
type BorderStyleValue = "none" | "solid" | "dashed" | "dotted";
|
|
5
|
-
export interface TablePropertiesDialogInitialValues {
|
|
6
|
-
activeTab?: "table" | "row" | "column" | "cell" | "altText";
|
|
7
|
-
tableWidth: string;
|
|
8
|
-
tableWidthUnit: TableWidthUnit;
|
|
9
|
-
tableAlign: "" | "left" | "center" | "right";
|
|
10
|
-
tableIndentLeft: string;
|
|
11
|
-
tableWrapping: "none" | "around";
|
|
12
|
-
floatingSummary: string;
|
|
13
|
-
floatingHorizontalAnchor: "margin" | "page" | "text";
|
|
14
|
-
floatingVerticalAnchor: "margin" | "page" | "text";
|
|
15
|
-
floatingX: string;
|
|
16
|
-
floatingY: string;
|
|
17
|
-
floatingXAlign: "" | "left" | "center" | "right" | "inside" | "outside";
|
|
18
|
-
floatingYAlign: "" | "top" | "center" | "bottom" | "inside" | "outside";
|
|
19
|
-
floatingDistanceTop: string;
|
|
20
|
-
floatingDistanceRight: string;
|
|
21
|
-
floatingDistanceBottom: string;
|
|
22
|
-
floatingDistanceLeft: string;
|
|
23
|
-
floatingOverlap: "overlap" | "never";
|
|
24
|
-
rowHeight: string;
|
|
25
|
-
rowHeightRule: EditorTableRowHeightRule | "";
|
|
26
|
-
repeatHeader: boolean;
|
|
27
|
-
allowBreakAcrossPages: boolean;
|
|
28
|
-
hiddenRow: boolean;
|
|
29
|
-
columnWidth: string;
|
|
30
|
-
cellWidth: string;
|
|
31
|
-
cellVerticalAlign: "" | "top" | "middle" | "bottom";
|
|
32
|
-
cellTextDirection: "" | "lrTb" | "tbRl" | "btLr" | "lrTbV" | "tbRlV";
|
|
33
|
-
cellNoWrap: boolean;
|
|
34
|
-
cellFitText: boolean;
|
|
35
|
-
cellHideMark: boolean;
|
|
36
|
-
marginTop: string;
|
|
37
|
-
marginRight: string;
|
|
38
|
-
marginBottom: string;
|
|
39
|
-
marginLeft: string;
|
|
40
|
-
borderStyle: BorderStyleValue;
|
|
41
|
-
borderWidth: string;
|
|
42
|
-
borderColor: string;
|
|
43
|
-
borderTop: boolean;
|
|
44
|
-
borderRight: boolean;
|
|
45
|
-
borderBottom: boolean;
|
|
46
|
-
borderLeft: boolean;
|
|
47
|
-
borderStart: boolean;
|
|
48
|
-
borderEnd: boolean;
|
|
49
|
-
borderTopLeftToBottomRight: boolean;
|
|
50
|
-
borderTopRightToBottomLeft: boolean;
|
|
51
|
-
shading: string;
|
|
52
|
-
altTitle: string;
|
|
53
|
-
altDescription: string;
|
|
54
|
-
}
|
|
55
|
-
export interface TablePropertiesDialogBorders {
|
|
56
|
-
top: EditorBorderStyle | null;
|
|
57
|
-
right: EditorBorderStyle | null;
|
|
58
|
-
bottom: EditorBorderStyle | null;
|
|
59
|
-
left: EditorBorderStyle | null;
|
|
60
|
-
start: EditorBorderStyle | null;
|
|
61
|
-
end: EditorBorderStyle | null;
|
|
62
|
-
topLeftToBottomRight: EditorBorderStyle | null;
|
|
63
|
-
topRightToBottomLeft: EditorBorderStyle | null;
|
|
64
|
-
}
|
|
65
|
-
export interface TablePropertiesDialogApplyValues {
|
|
66
|
-
tableWidth: EditorDocxWidthValue | null;
|
|
67
|
-
tableAlign: "left" | "center" | "right" | null;
|
|
68
|
-
tableIndentLeft: EditorDocxWidthValue | null;
|
|
69
|
-
tableFloating: EditorTableFloatingLayout | null;
|
|
70
|
-
tableOverlap: "overlap" | "never" | null;
|
|
71
|
-
rowHeight: EditorDocxWidthValue | null;
|
|
72
|
-
rowHeightRule: EditorTableRowHeightRule | null;
|
|
73
|
-
repeatHeader: boolean;
|
|
74
|
-
cantSplit: boolean;
|
|
75
|
-
hiddenRow: boolean;
|
|
76
|
-
columnWidth: EditorDocxWidthValue | null;
|
|
77
|
-
cellWidth: EditorDocxWidthValue | null;
|
|
78
|
-
cellVerticalAlign: "top" | "middle" | "bottom" | null;
|
|
79
|
-
cellTextDirection: "lrTb" | "tbRl" | "btLr" | "lrTbV" | "tbRlV" | null;
|
|
80
|
-
cellNoWrap: boolean | null;
|
|
81
|
-
cellFitText: boolean | null;
|
|
82
|
-
cellHideMark: boolean | null;
|
|
83
|
-
margins: {
|
|
84
|
-
top: number | null;
|
|
85
|
-
right: number | null;
|
|
86
|
-
bottom: number | null;
|
|
87
|
-
left: number | null;
|
|
88
|
-
};
|
|
89
|
-
borders: TablePropertiesDialogBorders;
|
|
90
|
-
shading: string | null;
|
|
91
|
-
altTitle: string | null;
|
|
92
|
-
altDescription: string | null;
|
|
93
|
-
}
|
|
94
|
-
export interface TablePropertiesDialogProps {
|
|
95
|
-
isOpen: boolean;
|
|
96
|
-
initial: TablePropertiesDialogInitialValues;
|
|
97
|
-
onClose: () => void;
|
|
98
|
-
onApply: (values: TablePropertiesDialogApplyValues, original: TablePropertiesDialogInitialValues) => void;
|
|
99
|
-
}
|
|
3
|
+
export type { TablePropertiesDialogInitialValues, TablePropertiesDialogBorders, TablePropertiesDialogApplyValues, TablePropertiesDialogProps, } from './table-properties/TablePropertiesTypes.js';
|
|
100
4
|
export declare function TablePropertiesDialog(props: TablePropertiesDialogProps): import("solid-js").JSX.Element;
|
|
101
|
-
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { JSX } from 'solid-js';
|
|
1
2
|
import { FontDialogController } from './FontDialogController.js';
|
|
2
3
|
|
|
3
4
|
export interface FontTabProps {
|
|
4
5
|
ctrl: FontDialogController;
|
|
5
6
|
}
|
|
6
|
-
export declare function FontTab(props: FontTabProps):
|
|
7
|
+
export declare function FontTab(props: FontTabProps): JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SetStoreFunction } from 'solid-js/store';
|
|
2
|
+
import { TableFormState } from './TablePropertiesTypes.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* View-facing contract for the Table Properties dialog. Panels depend on this
|
|
6
|
+
* interface (not the hook implementation), mirroring `FontDialogController`.
|
|
7
|
+
*/
|
|
8
|
+
export interface TablePropertiesController {
|
|
9
|
+
form: TableFormState;
|
|
10
|
+
set: SetStoreFunction<TableFormState>;
|
|
11
|
+
handleApply: () => void;
|
|
12
|
+
}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { EditorBorderStyle, EditorDocxWidthValue, EditorTableRowHeightRule, EditorTableFloatingLayout } from '../../../../core/model.js';
|
|
2
|
+
|
|
3
|
+
export type TableWidthUnit = "points" | "percent";
|
|
4
|
+
export type BorderStyleValue = "none" | "solid" | "dashed" | "dotted";
|
|
5
|
+
export interface TablePropertiesDialogInitialValues {
|
|
6
|
+
activeTab?: "table" | "row" | "column" | "cell" | "altText";
|
|
7
|
+
tableWidth: string;
|
|
8
|
+
tableWidthUnit: TableWidthUnit;
|
|
9
|
+
tableAlign: "" | "left" | "center" | "right";
|
|
10
|
+
tableIndentLeft: string;
|
|
11
|
+
tableWrapping: "none" | "around";
|
|
12
|
+
floatingSummary: string;
|
|
13
|
+
floatingHorizontalAnchor: "margin" | "page" | "text";
|
|
14
|
+
floatingVerticalAnchor: "margin" | "page" | "text";
|
|
15
|
+
floatingX: string;
|
|
16
|
+
floatingY: string;
|
|
17
|
+
floatingXAlign: "" | "left" | "center" | "right" | "inside" | "outside";
|
|
18
|
+
floatingYAlign: "" | "top" | "center" | "bottom" | "inside" | "outside";
|
|
19
|
+
floatingDistanceTop: string;
|
|
20
|
+
floatingDistanceRight: string;
|
|
21
|
+
floatingDistanceBottom: string;
|
|
22
|
+
floatingDistanceLeft: string;
|
|
23
|
+
floatingOverlap: "overlap" | "never";
|
|
24
|
+
rowHeight: string;
|
|
25
|
+
rowHeightRule: EditorTableRowHeightRule | "";
|
|
26
|
+
repeatHeader: boolean;
|
|
27
|
+
allowBreakAcrossPages: boolean;
|
|
28
|
+
hiddenRow: boolean;
|
|
29
|
+
columnWidth: string;
|
|
30
|
+
cellWidth: string;
|
|
31
|
+
cellVerticalAlign: "" | "top" | "middle" | "bottom";
|
|
32
|
+
cellTextDirection: "" | "lrTb" | "tbRl" | "btLr" | "lrTbV" | "tbRlV";
|
|
33
|
+
cellNoWrap: boolean;
|
|
34
|
+
cellFitText: boolean;
|
|
35
|
+
cellHideMark: boolean;
|
|
36
|
+
marginTop: string;
|
|
37
|
+
marginRight: string;
|
|
38
|
+
marginBottom: string;
|
|
39
|
+
marginLeft: string;
|
|
40
|
+
borderStyle: BorderStyleValue;
|
|
41
|
+
borderWidth: string;
|
|
42
|
+
borderColor: string;
|
|
43
|
+
borderTop: boolean;
|
|
44
|
+
borderRight: boolean;
|
|
45
|
+
borderBottom: boolean;
|
|
46
|
+
borderLeft: boolean;
|
|
47
|
+
borderStart: boolean;
|
|
48
|
+
borderEnd: boolean;
|
|
49
|
+
borderTopLeftToBottomRight: boolean;
|
|
50
|
+
borderTopRightToBottomLeft: boolean;
|
|
51
|
+
shading: string;
|
|
52
|
+
altTitle: string;
|
|
53
|
+
altDescription: string;
|
|
54
|
+
}
|
|
55
|
+
export interface TablePropertiesDialogBorders {
|
|
56
|
+
top: EditorBorderStyle | null;
|
|
57
|
+
right: EditorBorderStyle | null;
|
|
58
|
+
bottom: EditorBorderStyle | null;
|
|
59
|
+
left: EditorBorderStyle | null;
|
|
60
|
+
start: EditorBorderStyle | null;
|
|
61
|
+
end: EditorBorderStyle | null;
|
|
62
|
+
topLeftToBottomRight: EditorBorderStyle | null;
|
|
63
|
+
topRightToBottomLeft: EditorBorderStyle | null;
|
|
64
|
+
}
|
|
65
|
+
export interface TablePropertiesDialogApplyValues {
|
|
66
|
+
tableWidth: EditorDocxWidthValue | null;
|
|
67
|
+
tableAlign: "left" | "center" | "right" | null;
|
|
68
|
+
tableIndentLeft: EditorDocxWidthValue | null;
|
|
69
|
+
tableFloating: EditorTableFloatingLayout | null;
|
|
70
|
+
tableOverlap: "overlap" | "never" | null;
|
|
71
|
+
rowHeight: EditorDocxWidthValue | null;
|
|
72
|
+
rowHeightRule: EditorTableRowHeightRule | null;
|
|
73
|
+
repeatHeader: boolean;
|
|
74
|
+
cantSplit: boolean;
|
|
75
|
+
hiddenRow: boolean;
|
|
76
|
+
columnWidth: EditorDocxWidthValue | null;
|
|
77
|
+
cellWidth: EditorDocxWidthValue | null;
|
|
78
|
+
cellVerticalAlign: "top" | "middle" | "bottom" | null;
|
|
79
|
+
cellTextDirection: "lrTb" | "tbRl" | "btLr" | "lrTbV" | "tbRlV" | null;
|
|
80
|
+
cellNoWrap: boolean | null;
|
|
81
|
+
cellFitText: boolean | null;
|
|
82
|
+
cellHideMark: boolean | null;
|
|
83
|
+
margins: {
|
|
84
|
+
top: number | null;
|
|
85
|
+
right: number | null;
|
|
86
|
+
bottom: number | null;
|
|
87
|
+
left: number | null;
|
|
88
|
+
};
|
|
89
|
+
borders: TablePropertiesDialogBorders;
|
|
90
|
+
shading: string | null;
|
|
91
|
+
altTitle: string | null;
|
|
92
|
+
altDescription: string | null;
|
|
93
|
+
}
|
|
94
|
+
export interface TablePropertiesDialogProps {
|
|
95
|
+
isOpen: boolean;
|
|
96
|
+
initial: TablePropertiesDialogInitialValues;
|
|
97
|
+
onClose: () => void;
|
|
98
|
+
onApply: (values: TablePropertiesDialogApplyValues, original: TablePropertiesDialogInitialValues) => void;
|
|
99
|
+
}
|
|
100
|
+
/** Single reactive store shape, replacing 40+ individual signals. */
|
|
101
|
+
export interface TableFormState {
|
|
102
|
+
activeTab: string;
|
|
103
|
+
tableWidth: string;
|
|
104
|
+
tableWidthUnit: TableWidthUnit;
|
|
105
|
+
tableAlign: TablePropertiesDialogInitialValues["tableAlign"];
|
|
106
|
+
tableIndentLeft: string;
|
|
107
|
+
tableWrapping: TablePropertiesDialogInitialValues["tableWrapping"];
|
|
108
|
+
floatingHorizontalAnchor: TablePropertiesDialogInitialValues["floatingHorizontalAnchor"];
|
|
109
|
+
floatingVerticalAnchor: TablePropertiesDialogInitialValues["floatingVerticalAnchor"];
|
|
110
|
+
floatingX: string;
|
|
111
|
+
floatingY: string;
|
|
112
|
+
floatingXAlign: TablePropertiesDialogInitialValues["floatingXAlign"];
|
|
113
|
+
floatingYAlign: TablePropertiesDialogInitialValues["floatingYAlign"];
|
|
114
|
+
floatingDistanceTop: string;
|
|
115
|
+
floatingDistanceRight: string;
|
|
116
|
+
floatingDistanceBottom: string;
|
|
117
|
+
floatingDistanceLeft: string;
|
|
118
|
+
floatingOverlap: TablePropertiesDialogInitialValues["floatingOverlap"];
|
|
119
|
+
rowHeight: string;
|
|
120
|
+
rowHeightRule: TablePropertiesDialogInitialValues["rowHeightRule"];
|
|
121
|
+
repeatHeader: boolean;
|
|
122
|
+
allowBreakAcrossPages: boolean;
|
|
123
|
+
hiddenRow: boolean;
|
|
124
|
+
columnWidth: string;
|
|
125
|
+
cellWidth: string;
|
|
126
|
+
cellVerticalAlign: TablePropertiesDialogInitialValues["cellVerticalAlign"];
|
|
127
|
+
cellTextDirection: TablePropertiesDialogInitialValues["cellTextDirection"];
|
|
128
|
+
cellNoWrap: boolean;
|
|
129
|
+
cellFitText: boolean;
|
|
130
|
+
cellHideMark: boolean;
|
|
131
|
+
marginTop: string;
|
|
132
|
+
marginRight: string;
|
|
133
|
+
marginBottom: string;
|
|
134
|
+
marginLeft: string;
|
|
135
|
+
borderStyle: BorderStyleValue;
|
|
136
|
+
borderWidth: string;
|
|
137
|
+
borderColor: string;
|
|
138
|
+
borderTop: boolean;
|
|
139
|
+
borderRight: boolean;
|
|
140
|
+
borderBottom: boolean;
|
|
141
|
+
borderLeft: boolean;
|
|
142
|
+
borderStart: boolean;
|
|
143
|
+
borderEnd: boolean;
|
|
144
|
+
borderTlBr: boolean;
|
|
145
|
+
borderTrBl: boolean;
|
|
146
|
+
shading: string;
|
|
147
|
+
altTitle: string;
|
|
148
|
+
altDescription: string;
|
|
149
|
+
}
|
|
150
|
+
export declare const DEFAULT_BORDER_WIDTH_PT = 0.5;
|
|
151
|
+
export declare const DEFAULT_BORDER_COLOR = "#000000";
|
|
152
|
+
export declare function parseNumber(value: string): number | null;
|
|
153
|
+
export declare function parseWidth(value: string, unit: TableWidthUnit): EditorDocxWidthValue | null;
|
|
154
|
+
export declare function resolveBorder(style: BorderStyleValue, widthValue: string, colorValue: string): EditorBorderStyle | null;
|
|
155
|
+
/** Fresh store with empty/default values, used before the dialog opens. */
|
|
156
|
+
export declare function createDefaultFormState(): TableFormState;
|
|
157
|
+
/** Maps the public initial-values shape onto the internal store shape. */
|
|
158
|
+
export declare function formStateFromInitial(initial: TablePropertiesDialogInitialValues): TableFormState;
|
|
159
|
+
/** Pure projection from the internal store to the public apply-values shape. */
|
|
160
|
+
export declare function buildTableApplyValues(form: TableFormState): TablePropertiesDialogApplyValues;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { JSX } from 'solid-js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Numeric field used across the table-properties panels. Thin composition over
|
|
5
|
+
* the public `TextField` (theme-aware) that keeps the grow layout and the
|
|
6
|
+
* string-based store contract, replacing the dialog's old hand-rolled
|
|
7
|
+
* `numericInput` helper.
|
|
8
|
+
*/
|
|
9
|
+
export declare function NumField(label: string, value: () => string, setter: (value: string) => void, testId: string, disabled?: boolean, allowNegative?: boolean): JSX.Element;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { JSX } from 'solid-js';
|
|
2
1
|
import { UseEditorFindReplaceResult } from '../../../app/controllers/useEditorFindReplace.js';
|
|
3
2
|
|
|
4
3
|
export interface FindReplaceDialogProps {
|
|
5
4
|
fr: UseEditorFindReplaceResult;
|
|
6
5
|
}
|
|
7
|
-
export declare function FindReplaceDialog(props: FindReplaceDialogProps): JSX.Element;
|
|
6
|
+
export declare function FindReplaceDialog(props: FindReplaceDialogProps): import("solid-js").JSX.Element;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { JSX } from 'solid-js';
|
|
2
1
|
import { MenuRegistry, MenubarHost } from './menuRegistry.js';
|
|
3
2
|
|
|
4
3
|
export interface MenubarProps {
|
|
5
4
|
host: () => MenubarHost;
|
|
6
5
|
registry: MenuRegistry;
|
|
7
6
|
}
|
|
8
|
-
export declare function Menubar(props: MenubarProps): JSX.Element;
|
|
7
|
+
export declare function Menubar(props: MenubarProps): import("solid-js").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Accessor } from 'solid-js';
|
|
2
|
+
|
|
3
|
+
export interface SurfaceRectApi {
|
|
4
|
+
/** The surface's bounding rect in viewport coordinates, or `null` if unmounted. */
|
|
5
|
+
rect: Accessor<DOMRect | null>;
|
|
6
|
+
/** Monotonic counter that bumps on every refresh, for `createMemo` invalidation. */
|
|
7
|
+
tick: Accessor<number>;
|
|
8
|
+
/** Force a re-measure (rAF-throttled), e.g. when the anchored target changes. */
|
|
9
|
+
refresh: () => void;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Tracks the bounding rect of a scroll/resize-affected surface element so that
|
|
13
|
+
* surface-relative overlays (floating table toolbar, layout-options anchor) can
|
|
14
|
+
* position themselves in viewport space.
|
|
15
|
+
*
|
|
16
|
+
* Consolidates the identical `surfaceRect` + rAF `scheduleRefresh` +
|
|
17
|
+
* scroll(capture)/resize listener block that used to be copy-pasted across
|
|
18
|
+
* `FloatingTableToolbar` and `FloatingLayoutOptions`.
|
|
19
|
+
*/
|
|
20
|
+
export declare function useSurfaceRect(surfaceRef: () => HTMLElement | undefined): SurfaceRectApi;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { JSX } from 'solid-js';
|
|
2
|
+
|
|
3
|
+
export interface FieldRowProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
/** Cross-axis alignment of the children. Defaults to `flex-end` so labelled
|
|
5
|
+
* fields of different heights line up on their inputs. */
|
|
6
|
+
align?: "start" | "center" | "end" | "stretch";
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Horizontal layout row for form fields. Replaces the ad-hoc
|
|
10
|
+
* `<div class="oasis-editor-dialog-row">` flex containers; children (typically
|
|
11
|
+
* `TextField`/`NumberField`/`SelectField`) grow to share the available width.
|
|
12
|
+
*/
|
|
13
|
+
export declare function FieldRow(props: FieldRowProps): JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { JSX } from 'solid-js';
|
|
2
|
+
import { TextFieldProps } from './TextField.js';
|
|
3
|
+
|
|
4
|
+
export interface NumberFieldProps extends Omit<TextFieldProps, "type" | "onChange"> {
|
|
5
|
+
/** Called with the parsed number, or `null` when the field is empty/invalid. */
|
|
6
|
+
onChange?: (value: number | null) => void;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* `TextField` specialised for numeric input. Wraps the raw string from the DOM
|
|
10
|
+
* in a parse so consumers receive `number | null` instead of repeating
|
|
11
|
+
* `Number(event.currentTarget.value)` at every call site.
|
|
12
|
+
*/
|
|
13
|
+
export declare function NumberField(props: NumberFieldProps): JSX.Element;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { JSX } from 'solid-js';
|
|
2
|
+
|
|
3
|
+
export interface RadioProps extends Omit<JSX.InputHTMLAttributes<HTMLInputElement>, "type" | "onChange" | "value"> {
|
|
4
|
+
label: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
value: string;
|
|
7
|
+
onChange?: (checked: boolean) => void;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* A single radio button. Reuses the checkbox visual language. Inside a
|
|
11
|
+
* `RadioGroup` it derives `name`/`checked`/disabled from context; standalone it
|
|
12
|
+
* behaves like a controlled radio driven by its own props.
|
|
13
|
+
*/
|
|
14
|
+
export declare function Radio(props: RadioProps): JSX.Element;
|
|
15
|
+
export interface RadioGroupOption {
|
|
16
|
+
value: string;
|
|
17
|
+
label: string;
|
|
18
|
+
description?: string;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface RadioGroupProps {
|
|
22
|
+
/** Shared `name` for the radios; auto-generated when omitted. */
|
|
23
|
+
name?: string;
|
|
24
|
+
label?: string;
|
|
25
|
+
value?: string;
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
onChange?: (value: string) => void;
|
|
28
|
+
/** Declarative options. Omit to provide `Radio` children directly. */
|
|
29
|
+
options?: RadioGroupOption[];
|
|
30
|
+
class?: string;
|
|
31
|
+
children?: JSX.Element;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Groups radios under one `name` and owns the selected value, mirroring the
|
|
35
|
+
* controller-style API of `SelectField`. Pass `options` for the common case or
|
|
36
|
+
* `Radio` children for custom layout.
|
|
37
|
+
*/
|
|
38
|
+
export declare function RadioGroup(props: RadioGroupProps): JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { JSX } from 'solid-js';
|
|
2
|
+
|
|
3
|
+
export interface ToggleChipProps extends Omit<JSX.InputHTMLAttributes<HTMLInputElement>, "type" | "onChange"> {
|
|
4
|
+
label: string;
|
|
5
|
+
/** Optional inline style for the label, e.g. to preview bold/italic effects. */
|
|
6
|
+
labelStyle?: JSX.CSSProperties;
|
|
7
|
+
onChange?: (checked: boolean) => void;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* A compact checkbox styled as a toggleable chip — for dense grids of boolean
|
|
11
|
+
* options (e.g. the font-effect toggles: bold, italic, small-caps...). The
|
|
12
|
+
* underlying control is a native checkbox so it stays accessible and form-aware.
|
|
13
|
+
*/
|
|
14
|
+
export declare function ToggleChip(props: ToggleChipProps): JSX.Element;
|
|
@@ -12,6 +12,14 @@ export { Checkbox } from './Checkbox.js';
|
|
|
12
12
|
export type { CheckboxProps } from './Checkbox.js';
|
|
13
13
|
export { SelectField } from './SelectField.js';
|
|
14
14
|
export type { SelectFieldOption, SelectFieldProps } from './SelectField.js';
|
|
15
|
+
export { NumberField } from './NumberField.js';
|
|
16
|
+
export type { NumberFieldProps } from './NumberField.js';
|
|
17
|
+
export { Radio, RadioGroup } from './Radio.js';
|
|
18
|
+
export type { RadioGroupOption, RadioGroupProps, RadioProps } from './Radio.js';
|
|
19
|
+
export { FieldRow } from './FieldRow.js';
|
|
20
|
+
export type { FieldRowProps } from './FieldRow.js';
|
|
21
|
+
export { ToggleChip } from './ToggleChip.js';
|
|
22
|
+
export type { ToggleChipProps } from './ToggleChip.js';
|
|
15
23
|
export { DialogFooter } from './DialogFooter.js';
|
|
16
24
|
export type { DialogFooterProps } from './DialogFooter.js';
|
|
17
25
|
export { FloatingActionButton } from './FloatingActionButton.js';
|
package/dist/ui.d.ts
CHANGED
|
@@ -1,42 +1,2 @@
|
|
|
1
|
-
export {
|
|
2
|
-
|
|
3
|
-
Checkbox,
|
|
4
|
-
ColorPicker,
|
|
5
|
-
Dialog,
|
|
6
|
-
DialogFooter,
|
|
7
|
-
GridPicker,
|
|
8
|
-
IconButton,
|
|
9
|
-
Menu,
|
|
10
|
-
Popover,
|
|
11
|
-
Select,
|
|
12
|
-
SelectField,
|
|
13
|
-
Separator,
|
|
14
|
-
SplitButton,
|
|
15
|
-
Tabs,
|
|
16
|
-
TextField,
|
|
17
|
-
ToolbarButton,
|
|
18
|
-
ToolbarColorPicker,
|
|
19
|
-
} from "oasis-editor";
|
|
20
|
-
|
|
21
|
-
export type {
|
|
22
|
-
ButtonProps,
|
|
23
|
-
CheckboxProps,
|
|
24
|
-
ColorPickerKind,
|
|
25
|
-
ColorPickerProps,
|
|
26
|
-
DialogFooterProps,
|
|
27
|
-
DialogProps,
|
|
28
|
-
GridPickerProps,
|
|
29
|
-
IconButtonProps,
|
|
30
|
-
MenuProps,
|
|
31
|
-
PopoverProps,
|
|
32
|
-
PopoverTriggerApi,
|
|
33
|
-
SelectFieldOption,
|
|
34
|
-
SelectFieldProps,
|
|
35
|
-
SeparatorProps,
|
|
36
|
-
SplitButtonProps,
|
|
37
|
-
TabsItem,
|
|
38
|
-
TabsProps,
|
|
39
|
-
TextFieldProps,
|
|
40
|
-
ToolbarButtonProps,
|
|
41
|
-
ToolbarSelectProps,
|
|
42
|
-
} from "oasis-editor";
|
|
1
|
+
export { Button, Checkbox, ColorPicker, ColorPicker as ToolbarColorPicker, Dialog, DialogFooter, GridPicker, IconButton, Menu, Popover, Select, SelectField, Separator, SplitButton, Tabs, TextField, ToolbarButton, } from '../index.ts';
|
|
2
|
+
export type { ButtonProps, CheckboxProps, ColorPickerKind, ColorPickerProps, DialogFooterProps, DialogProps, GridPickerProps, IconButtonProps, MenuProps, PopoverProps, PopoverTriggerApi, SelectFieldOption, SelectFieldProps, SeparatorProps, SplitButtonProps, TabsItem, TabsProps, TextFieldProps, ToolbarButtonProps, ToolbarSelectProps, } from '../index.ts';
|
package/dist/ui.js
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
|
+
import { Button as r, Checkbox as t, ColorPicker as l, Dialog as i, DialogFooter as a, GridPicker as c, IconButton as n, Menu as k, Popover as u, Select as P, SelectField as b, Separator as p, SplitButton as B, Tabs as C, TextField as S, ToolbarButton as T, ColorPicker as d } from "oasis-editor";
|
|
1
2
|
export {
|
|
2
|
-
Button,
|
|
3
|
-
Checkbox,
|
|
4
|
-
ColorPicker,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
3
|
+
r as Button,
|
|
4
|
+
t as Checkbox,
|
|
5
|
+
l as ColorPicker,
|
|
6
|
+
i as Dialog,
|
|
7
|
+
a as DialogFooter,
|
|
8
|
+
c as GridPicker,
|
|
9
|
+
n as IconButton,
|
|
10
|
+
k as Menu,
|
|
11
|
+
u as Popover,
|
|
12
|
+
P as Select,
|
|
13
|
+
b as SelectField,
|
|
14
|
+
p as Separator,
|
|
15
|
+
B as SplitButton,
|
|
16
|
+
C as Tabs,
|
|
17
|
+
S as TextField,
|
|
18
|
+
T as ToolbarButton,
|
|
19
|
+
d as ToolbarColorPicker
|
|
20
|
+
};
|