@monolith-forensics/monolith-ui 1.9.1-dev.9 → 1.9.3-dev.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/Charts/BarChart/BarChart.js +28 -14
- package/dist/Charts/BarChart/BarChart.styled.d.ts +7 -2
- package/dist/Charts/BarChart/BarChart.styled.js +5 -1
- package/dist/Charts/BarChart/BarChart.types.d.ts +13 -5
- package/dist/Charts/ChartUtils/chartSizing.d.ts +20 -0
- package/dist/Charts/ChartUtils/chartSizing.js +83 -0
- package/dist/Charts/ChartUtils/index.d.ts +1 -0
- package/dist/Charts/ChartUtils/index.js +1 -0
- package/dist/Charts/HeatMap/HeatMap.js +28 -7
- package/dist/Charts/HeatMap/HeatMap.styled.d.ts +6 -2
- package/dist/Charts/HeatMap/HeatMap.styled.js +3 -0
- package/dist/Charts/HeatMap/HeatMap.types.d.ts +7 -1
- package/dist/Charts/LineChart/LineChart.js +34 -15
- package/dist/Charts/LineChart/LineChart.styled.d.ts +7 -2
- package/dist/Charts/LineChart/LineChart.styled.js +5 -1
- package/dist/Charts/LineChart/LineChart.types.d.ts +13 -5
- package/dist/Charts/PieChart/PieChart.js +48 -33
- package/dist/Charts/PieChart/PieChart.styled.d.ts +7 -2
- package/dist/Charts/PieChart/PieChart.styled.js +6 -1
- package/dist/Charts/PieChart/PieChart.types.d.ts +7 -3
- package/dist/DropDownMenu/components/MenuItemList.js +32 -12
- package/dist/DropDownMenu/components/StyledContent.js +1 -1
- package/dist/DropDownMenu/components/StyledInnerItemContainer.js +1 -0
- package/dist/FieldLabel/FieldLabel.js +3 -18
- package/dist/FileViewer/FileViewer.js +32 -8
- package/dist/FileViewer/viewers/ImageViewer.d.ts +1 -0
- package/dist/FileViewer/viewers/ImageViewer.js +36 -15
- package/dist/MonolithUIProvider/MonolithUIProvider.d.ts +23 -0
- package/dist/RichTextEditor/Components/BubbleMenu.d.ts +3 -3
- package/dist/RichTextEditor/Components/BubbleMenu.js +190 -51
- package/dist/RichTextEditor/Components/CodeBlockBaseButton.d.ts +18 -0
- package/dist/RichTextEditor/Components/CodeBlockBaseButton.js +6 -0
- package/dist/RichTextEditor/Components/CodeBlockCopyButton.d.ts +9 -0
- package/dist/RichTextEditor/Components/CodeBlockCopyButton.js +42 -0
- package/dist/RichTextEditor/Components/CodeBlockFormatButton.d.ts +10 -0
- package/dist/RichTextEditor/Components/CodeBlockFormatButton.js +60 -0
- package/dist/RichTextEditor/Components/CodeBlockLanguageSelect.d.ts +9 -0
- package/dist/RichTextEditor/Components/CodeBlockLanguageSelect.js +30 -0
- package/dist/RichTextEditor/Components/CodeBlockNodeView.d.ts +3 -0
- package/dist/RichTextEditor/Components/CodeBlockNodeView.js +28 -0
- package/dist/RichTextEditor/Components/CodeBlockWrapButton.d.ts +10 -0
- package/dist/RichTextEditor/Components/CodeBlockWrapButton.js +17 -0
- package/dist/RichTextEditor/Components/LinkEditor.d.ts +8 -0
- package/dist/RichTextEditor/Components/LinkEditor.js +94 -0
- package/dist/RichTextEditor/Components/TableTools/TableCornerMenu.d.ts +2 -0
- package/dist/RichTextEditor/Components/TableTools/TableCornerMenu.js +19 -0
- package/dist/RichTextEditor/Components/TableTools/TableInsertControls.d.ts +2 -0
- package/dist/RichTextEditor/Components/TableTools/TableInsertControls.js +24 -0
- package/dist/RichTextEditor/Components/TableTools/TableRails.d.ts +2 -0
- package/dist/RichTextEditor/Components/TableTools/TableRails.js +180 -0
- package/dist/RichTextEditor/Components/TableTools/TableToolMenu.d.ts +5 -0
- package/dist/RichTextEditor/Components/TableTools/TableToolMenu.js +6 -0
- package/dist/RichTextEditor/Components/TableTools/TableTools.actions.d.ts +5 -0
- package/dist/RichTextEditor/Components/TableTools/TableTools.actions.js +183 -0
- package/dist/RichTextEditor/Components/TableTools/TableTools.commands.d.ts +16 -0
- package/dist/RichTextEditor/Components/TableTools/TableTools.commands.js +217 -0
- package/dist/RichTextEditor/Components/TableTools/TableTools.constants.d.ts +8 -0
- package/dist/RichTextEditor/Components/TableTools/TableTools.constants.js +11 -0
- package/dist/RichTextEditor/Components/TableTools/TableTools.d.ts +3 -0
- package/dist/RichTextEditor/Components/TableTools/TableTools.geometry.d.ts +23 -0
- package/dist/RichTextEditor/Components/TableTools/TableTools.geometry.js +75 -0
- package/dist/RichTextEditor/Components/TableTools/TableTools.js +3 -0
- package/dist/RichTextEditor/Components/TableTools/TableTools.selectors.d.ts +16 -0
- package/dist/RichTextEditor/Components/TableTools/TableTools.selectors.js +53 -0
- package/dist/RichTextEditor/Components/TableTools/TableTools.styled.d.ts +40 -0
- package/dist/RichTextEditor/Components/TableTools/TableTools.styled.js +167 -0
- package/dist/RichTextEditor/Components/TableTools/TableTools.types.d.ts +76 -0
- package/dist/RichTextEditor/Components/TableTools/TableTools.types.js +1 -0
- package/dist/RichTextEditor/Components/TableTools/TableTools.utils.d.ts +4 -0
- package/dist/RichTextEditor/Components/TableTools/TableTools.utils.js +4 -0
- package/dist/RichTextEditor/Components/TableTools/TableToolsPopover.d.ts +2 -0
- package/dist/RichTextEditor/Components/TableTools/TableToolsPopover.js +12 -0
- package/dist/RichTextEditor/Components/TableTools/index.d.ts +3 -0
- package/dist/RichTextEditor/Components/TableTools/index.js +2 -0
- package/dist/RichTextEditor/Enums/Controls.d.ts +7 -1
- package/dist/RichTextEditor/Enums/Controls.js +6 -0
- package/dist/RichTextEditor/Enums/Extensions.d.ts +4 -0
- package/dist/RichTextEditor/Enums/Extensions.js +4 -0
- package/dist/RichTextEditor/Enums/HighlightColors.d.ts +9 -0
- package/dist/RichTextEditor/Enums/HighlightColors.js +10 -0
- package/dist/RichTextEditor/Enums/SlashCommands.d.ts +4 -1
- package/dist/RichTextEditor/Enums/SlashCommands.js +3 -0
- package/dist/RichTextEditor/Extensions/SlashCommandList.js +0 -1
- package/dist/RichTextEditor/Extensions/getSlashCommand.d.ts +23 -3
- package/dist/RichTextEditor/Extensions/getSlashCommand.js +53 -7
- package/dist/RichTextEditor/Extensions/getTiptapExtensions.d.ts +15 -2
- package/dist/RichTextEditor/Extensions/getTiptapExtensions.js +159 -24
- package/dist/RichTextEditor/Plugins/ImageActionsPlugin.js +4 -7
- package/dist/RichTextEditor/RichTextEditor.d.ts +9 -4
- package/dist/RichTextEditor/RichTextEditor.js +352 -14
- package/dist/RichTextEditor/Toolbar/Control.d.ts +6 -2
- package/dist/RichTextEditor/Toolbar/Control.js +13 -6
- package/dist/RichTextEditor/Toolbar/Controls.d.ts +6 -0
- package/dist/RichTextEditor/Toolbar/Controls.js +118 -1
- package/dist/RichTextEditor/Toolbar/ControlsGroup.js +17 -6
- package/dist/RichTextEditor/Toolbar/Labels.d.ts +1 -0
- package/dist/RichTextEditor/Toolbar/Labels.js +1 -0
- package/dist/RichTextEditor/Toolbar/Toolbar.d.ts +1 -2
- package/dist/RichTextEditor/Toolbar/Toolbar.js +32 -67
- package/dist/RichTextEditor/Utils/codeBlockUtils.d.ts +20 -0
- package/dist/RichTextEditor/Utils/codeBlockUtils.js +137 -0
- package/dist/RichTextEditor/Utils/codeUtils.d.ts +3 -0
- package/dist/RichTextEditor/Utils/codeUtils.js +12 -0
- package/dist/RichTextEditor/Utils/linkUtils.d.ts +19 -0
- package/dist/RichTextEditor/Utils/linkUtils.js +57 -0
- package/dist/RichTextEditor/Utils/tableUtils.d.ts +1 -0
- package/dist/RichTextEditor/Utils/tableUtils.js +1 -0
- package/dist/SegmentedControl/SegmentedControl.js +1 -1
- package/dist/SegmentedControl/SegmentedControl.styles.d.ts +1 -0
- package/dist/SegmentedControl/SegmentedControl.styles.js +30 -14
- package/dist/SegmentedControl/SegmentedControl.utils.d.ts +1 -0
- package/dist/SegmentedControl/SegmentedControl.utils.js +5 -2
- package/dist/Table/Table.js +4 -3
- package/dist/Table/TableComponents.d.ts +3 -0
- package/dist/Table/TableComponents.js +47 -0
- package/dist/Table/TableHeader.js +1 -1
- package/dist/Table/TableMenu/TableMenu.js +4 -3
- package/dist/Table/TableProvider.js +39 -0
- package/dist/Table/TableRow.js +1 -1
- package/dist/Table/types.d.ts +6 -0
- package/dist/Utilities/getImageTextContent.d.ts +78 -0
- package/dist/Utilities/getImageTextContent.js +222 -0
- package/dist/core/controlSizes.js +9 -9
- package/dist/theme/variants.js +46 -0
- package/package.json +8 -1
|
@@ -175,6 +175,36 @@ export const TableListElement = styled.div `
|
|
|
175
175
|
flex-direction: column;
|
|
176
176
|
min-width: 100%;
|
|
177
177
|
`;
|
|
178
|
+
export const TableEmptyState = styled.div `
|
|
179
|
+
box-sizing: border-box;
|
|
180
|
+
position: absolute;
|
|
181
|
+
inset: 0;
|
|
182
|
+
z-index: 2;
|
|
183
|
+
width: 100%;
|
|
184
|
+
height: 100%;
|
|
185
|
+
padding: 24px;
|
|
186
|
+
display: flex;
|
|
187
|
+
flex-direction: column;
|
|
188
|
+
align-items: center;
|
|
189
|
+
gap: 10px;
|
|
190
|
+
color: ${({ theme }) => theme.palette.text.secondary};
|
|
191
|
+
background-color: ${({ theme }) => theme.palette.background.default};
|
|
192
|
+
text-align: center;
|
|
193
|
+
font-size: 12px;
|
|
194
|
+
|
|
195
|
+
svg {
|
|
196
|
+
color: ${({ theme }) => theme.palette.text.secondary};
|
|
197
|
+
}
|
|
198
|
+
`;
|
|
199
|
+
export const TableEmptyStateTitle = styled.div `
|
|
200
|
+
color: ${({ theme }) => theme.palette.text.primary};
|
|
201
|
+
font-size: 16px;
|
|
202
|
+
font-weight: 600;
|
|
203
|
+
`;
|
|
204
|
+
export const TableEmptyStateDescription = styled.div `
|
|
205
|
+
max-width: 320px;
|
|
206
|
+
line-height: 1.45;
|
|
207
|
+
`;
|
|
178
208
|
export const TableWrapper = styled.div `
|
|
179
209
|
position: relative;
|
|
180
210
|
flex: 1 1 auto;
|
|
@@ -189,6 +219,17 @@ export const StyledTable = styled.div `
|
|
|
189
219
|
display: flex;
|
|
190
220
|
flex-direction: column;
|
|
191
221
|
|
|
222
|
+
&::after {
|
|
223
|
+
content: "";
|
|
224
|
+
position: absolute;
|
|
225
|
+
inset: 0;
|
|
226
|
+
z-index: 1;
|
|
227
|
+
pointer-events: none;
|
|
228
|
+
box-shadow:
|
|
229
|
+
inset 1px 0 ${({ theme }) => theme.palette.divider},
|
|
230
|
+
inset -1px 0 ${({ theme }) => theme.palette.divider};
|
|
231
|
+
}
|
|
232
|
+
|
|
192
233
|
&[data-compact="true"] .mfui-tr,
|
|
193
234
|
&[data-compact="true"] .mfui-thr,
|
|
194
235
|
&[data-compact="true"] .mfui-td {
|
|
@@ -213,4 +254,10 @@ export const StyledTable = styled.div `
|
|
|
213
254
|
pointer-events: auto;
|
|
214
255
|
visibility: visible;
|
|
215
256
|
}
|
|
257
|
+
|
|
258
|
+
&[data-all-columns-hidden="true"] .mfui-thead,
|
|
259
|
+
&[data-all-columns-hidden="true"] .mfui-tbody-viewport {
|
|
260
|
+
visibility: hidden;
|
|
261
|
+
pointer-events: none;
|
|
262
|
+
}
|
|
216
263
|
`;
|
|
@@ -58,7 +58,7 @@ const TableHeader = ({ headerRowElm }) => {
|
|
|
58
58
|
flexShrink: 0,
|
|
59
59
|
justifyContent: "center",
|
|
60
60
|
alignItems: "center",
|
|
61
|
-
}, children: _jsx(InnerCellContent, { className: "mfui inner-cell-content", children: disableSelectAll !== true && (_jsx(CheckBox, { value: selectionState.selectionStatus === "all", partialCheck: (_a = selectionState.selectionStatus) === null || _a === void 0 ? void 0 : _a.includes("some"), onChange: handleChangeSelection })) }) })), enableActionButton && (_jsx(TH, { className: `mfui-th column-action`, style: {
|
|
61
|
+
}, children: _jsx(InnerCellContent, { className: "mfui inner-cell-content", children: disableSelectAll !== true && (_jsx(CheckBox, { size: "xs", value: selectionState.selectionStatus === "all", partialCheck: (_a = selectionState.selectionStatus) === null || _a === void 0 ? void 0 : _a.includes("some"), onChange: handleChangeSelection })) }) })), enableActionButton && (_jsx(TH, { className: `mfui-th column-action`, style: {
|
|
62
62
|
width: TableDefaults.actionCell.width,
|
|
63
63
|
minWidth: TableDefaults.actionCell.minWidth,
|
|
64
64
|
maxWidth: TableDefaults.actionCell.maxWidth,
|
|
@@ -30,7 +30,7 @@ const FlexedRow = styled.div `
|
|
|
30
30
|
`;
|
|
31
31
|
const TableMenu = () => {
|
|
32
32
|
var _a, _b, _c, _d, _e;
|
|
33
|
-
const { data, columnState, searchState,
|
|
33
|
+
const { data, columnState, searchState, setVisibleColumns, tableMenuOptions, runSearch, enableSelection, compactState, toggleCompact, totalRecords, getCalculatedSelectionTotal, handleTableExport, filterState, handleFilterChange, } = useTable();
|
|
34
34
|
const inputRef = useRef(null);
|
|
35
35
|
if ((tableMenuOptions === null || tableMenuOptions === void 0 ? void 0 : tableMenuOptions.enabled) !== true)
|
|
36
36
|
return null;
|
|
@@ -116,13 +116,14 @@ const TableMenu = () => {
|
|
|
116
116
|
}, children: _jsx(DownloadIcon, { size: 14 }) })), (compactOptions === null || compactOptions === void 0 ? void 0 : compactOptions.enabled) === true && (_jsx(Button, { variant: "outlined", title: "Toggle Compact", size: "xxs", style: { padding: "0px 4px" }, onClick: () => toggleCompact(), children: compactState ? _jsx(Rows4Icon, { size: 14 }) : _jsx(Rows3Icon, { size: 14 }) })), (columnSelectorOptions === null || columnSelectorOptions === void 0 ? void 0 : columnSelectorOptions.enabled) === true && (_jsx(DropDownMenu, { variant: "outlined", size: "xs", data: columnState.map((col) => ({
|
|
117
117
|
label: (col === null || col === void 0 ? void 0 : col.caption) || col.dataField,
|
|
118
118
|
value: col.dataField,
|
|
119
|
-
onClick: () => toggleColumnVisibility(col.dataField),
|
|
120
119
|
})), defaultValue: columnState
|
|
121
120
|
.filter((col) => col.visible !== false)
|
|
122
121
|
.map((col) => ({
|
|
123
122
|
label: (col === null || col === void 0 ? void 0 : col.caption) || col.dataField,
|
|
124
123
|
value: col.dataField,
|
|
125
|
-
})), multiselect: true, searchable: true,
|
|
124
|
+
})), multiselect: true, enableSelectAll: true, searchable: true, onChange: (e) => {
|
|
125
|
+
setVisibleColumns(e.map((item) => item.value));
|
|
126
|
+
}, buttonProps: {
|
|
126
127
|
title: "Show/Hide Columns",
|
|
127
128
|
size: "xs",
|
|
128
129
|
style: { padding: "0px 4px", height: 24 },
|
|
@@ -595,6 +595,39 @@ const TableProvider = (_a) => {
|
|
|
595
595
|
});
|
|
596
596
|
updateColumnState(newColumnState);
|
|
597
597
|
};
|
|
598
|
+
const setVisibleColumns = (dataFields) => {
|
|
599
|
+
const newColumnState = columnState.map((col) => {
|
|
600
|
+
if (dataFields.includes(col.dataField)) {
|
|
601
|
+
return Object.assign(Object.assign({}, col), { visible: true });
|
|
602
|
+
}
|
|
603
|
+
return Object.assign(Object.assign({}, col), { visible: false });
|
|
604
|
+
});
|
|
605
|
+
updateColumnState(newColumnState);
|
|
606
|
+
};
|
|
607
|
+
const showColumn = (dataField) => {
|
|
608
|
+
const column = columnState.find((col) => col.dataField === dataField);
|
|
609
|
+
if (column && column.visible === false) {
|
|
610
|
+
const newColumnState = columnState.map((col) => {
|
|
611
|
+
if (col.dataField === dataField) {
|
|
612
|
+
return Object.assign(Object.assign({}, col), { visible: true });
|
|
613
|
+
}
|
|
614
|
+
return col;
|
|
615
|
+
});
|
|
616
|
+
updateColumnState(newColumnState);
|
|
617
|
+
}
|
|
618
|
+
};
|
|
619
|
+
const hideColumn = (dataField) => {
|
|
620
|
+
const column = columnState.find((col) => col.dataField === dataField);
|
|
621
|
+
if (column && column.visible === true) {
|
|
622
|
+
const newColumnState = columnState.map((col) => {
|
|
623
|
+
if (col.dataField === dataField) {
|
|
624
|
+
return Object.assign(Object.assign({}, col), { visible: false });
|
|
625
|
+
}
|
|
626
|
+
return col;
|
|
627
|
+
});
|
|
628
|
+
updateColumnState(newColumnState);
|
|
629
|
+
}
|
|
630
|
+
};
|
|
598
631
|
const toggleCompact = () => {
|
|
599
632
|
setCompactState((prev) => !prev);
|
|
600
633
|
};
|
|
@@ -852,6 +885,9 @@ const TableProvider = (_a) => {
|
|
|
852
885
|
setColumnState: updateColumnState,
|
|
853
886
|
getColumnState,
|
|
854
887
|
toggleColumnVisibility,
|
|
888
|
+
showColumn,
|
|
889
|
+
hideColumn,
|
|
890
|
+
setVisibleColumns,
|
|
855
891
|
getColumnVisibility,
|
|
856
892
|
getSelectedRows,
|
|
857
893
|
getSelectedRowKeys,
|
|
@@ -900,6 +936,9 @@ const TableProvider = (_a) => {
|
|
|
900
936
|
selectAllRows,
|
|
901
937
|
clearSelections,
|
|
902
938
|
toggleColumnVisibility,
|
|
939
|
+
setVisibleColumns,
|
|
940
|
+
showColumn,
|
|
941
|
+
hideColumn,
|
|
903
942
|
runSearch,
|
|
904
943
|
clearSearch,
|
|
905
944
|
handleTableExport,
|
package/dist/Table/TableRow.js
CHANGED
|
@@ -13,7 +13,7 @@ const TableRow = ({ rowData, loading, rowStyle }) => {
|
|
|
13
13
|
const handleSelectionChange = (e) => {
|
|
14
14
|
e === true ? selectRow(rowData) : deselectRow(rowData);
|
|
15
15
|
};
|
|
16
|
-
return (_jsxs(TR, { className: "mfui-tr", "data-key": rowData.__key, "data-selected": selected, "data-focused": focused, style: Object.assign(Object.assign({}, rowStyle), { width: tableLayout.contentWidth }), children: [enableSelection && (_jsx(ActionCell, { className: `mfui-td column-select`, children: _jsx(InnerCellContent, { className: "mfui inner-cell-content row-action row-selection-action", children: _jsx(CheckBox, { className: `mfui-checkbox`, value: selected, onChange: (e) => handleSelectionChange(e) }) }) })), enableActionButton && (_jsx(ActionCell, { className: `mfui-td column-action`, children: _jsx(InnerCellContent, { className: "mfui inner-cell-content row-action", children: _jsx(ActionButton, { variant: "subtle", onClick: () => onActionButtonClick === null || onActionButtonClick === void 0 ? void 0 : onActionButtonClick(rowData), children: Icon ? _jsx(Icon, { size: 14 }) : _jsx(Maximize2Icon, { size: 14 }) }) }) })), columnState.map((column, index) => {
|
|
16
|
+
return (_jsxs(TR, { className: "mfui-tr", "data-key": rowData.__key, "data-selected": selected, "data-focused": focused, style: Object.assign(Object.assign({}, rowStyle), { width: tableLayout.contentWidth }), children: [enableSelection && (_jsx(ActionCell, { className: `mfui-td column-select`, children: _jsx(InnerCellContent, { className: "mfui inner-cell-content row-action row-selection-action", children: _jsx(CheckBox, { className: `mfui-checkbox`, size: "xs", value: selected, onChange: (e) => handleSelectionChange(e) }) }) })), enableActionButton && (_jsx(ActionCell, { className: `mfui-td column-action`, children: _jsx(InnerCellContent, { className: "mfui inner-cell-content row-action", children: _jsx(ActionButton, { variant: "subtle", onClick: () => onActionButtonClick === null || onActionButtonClick === void 0 ? void 0 : onActionButtonClick(rowData), children: Icon ? _jsx(Icon, { size: 14 }) : _jsx(Maximize2Icon, { size: 14 }) }) }) })), columnState.map((column, index) => {
|
|
17
17
|
var _a;
|
|
18
18
|
if (column.visible === false)
|
|
19
19
|
return null;
|
package/dist/Table/types.d.ts
CHANGED
|
@@ -168,6 +168,9 @@ export type TableContextType = {
|
|
|
168
168
|
focusedRowId?: string | number;
|
|
169
169
|
toggleCompact: () => void;
|
|
170
170
|
toggleColumnVisibility: (dataField: string) => void;
|
|
171
|
+
setVisibleColumns: (dataFields: string[]) => void;
|
|
172
|
+
showColumn: (dataField: string) => void;
|
|
173
|
+
hideColumn: (dataField: string) => void;
|
|
171
174
|
runSearch: (query: string) => void;
|
|
172
175
|
clearSearch: () => void;
|
|
173
176
|
handleTableExport: (e: TableExportOptions) => Promise<void> | void;
|
|
@@ -388,6 +391,9 @@ export type TableInstance = {
|
|
|
388
391
|
onColumnReorder?: (e: OnColumnChangeProps) => void;
|
|
389
392
|
onColumnStateChange?: (e: ColumnState[]) => void;
|
|
390
393
|
toggleColumnVisibility: (dataField: string) => void;
|
|
394
|
+
setVisibleColumns: (dataFields: string[]) => void;
|
|
395
|
+
showColumn: (dataField: string) => void;
|
|
396
|
+
hideColumn: (dataField: string) => void;
|
|
391
397
|
getColumnVisibility: (dataField: string) => boolean;
|
|
392
398
|
getSelectedRows: () => any[];
|
|
393
399
|
getSelectedRowKeys: () => string[];
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
export type ImageOcrProgress = {
|
|
2
|
+
status: string;
|
|
3
|
+
progress: number;
|
|
4
|
+
};
|
|
5
|
+
export type ImageOcrLine = {
|
|
6
|
+
text: string;
|
|
7
|
+
confidence?: number;
|
|
8
|
+
bbox?: {
|
|
9
|
+
x0: number;
|
|
10
|
+
y0: number;
|
|
11
|
+
x1: number;
|
|
12
|
+
y1: number;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export type ImageTextContent = {
|
|
16
|
+
text: string;
|
|
17
|
+
confidence?: number;
|
|
18
|
+
language: string;
|
|
19
|
+
lines: ImageOcrLine[];
|
|
20
|
+
};
|
|
21
|
+
export declare const ImageOcrPageSegModes: {
|
|
22
|
+
readonly OSD_ONLY: "0";
|
|
23
|
+
readonly AUTO_OSD: "1";
|
|
24
|
+
readonly AUTO_ONLY: "2";
|
|
25
|
+
readonly AUTO: "3";
|
|
26
|
+
readonly SINGLE_COLUMN: "4";
|
|
27
|
+
readonly SINGLE_BLOCK_VERT_TEXT: "5";
|
|
28
|
+
readonly SINGLE_BLOCK: "6";
|
|
29
|
+
readonly SINGLE_LINE: "7";
|
|
30
|
+
readonly SINGLE_WORD: "8";
|
|
31
|
+
readonly CIRCLE_WORD: "9";
|
|
32
|
+
readonly SINGLE_CHAR: "10";
|
|
33
|
+
readonly SPARSE_TEXT: "11";
|
|
34
|
+
readonly SPARSE_TEXT_OSD: "12";
|
|
35
|
+
readonly RAW_LINE: "13";
|
|
36
|
+
};
|
|
37
|
+
export type ImageOcrPageSegMode = (typeof ImageOcrPageSegModes)[keyof typeof ImageOcrPageSegModes];
|
|
38
|
+
export type ImageOcrPreprocessOptions = {
|
|
39
|
+
grayscale?: boolean;
|
|
40
|
+
contrast?: number;
|
|
41
|
+
scale?: number;
|
|
42
|
+
threshold?: number;
|
|
43
|
+
maxDimension?: number;
|
|
44
|
+
};
|
|
45
|
+
export type ImageOcrRectangle = {
|
|
46
|
+
left: number;
|
|
47
|
+
top: number;
|
|
48
|
+
width: number;
|
|
49
|
+
height: number;
|
|
50
|
+
};
|
|
51
|
+
export type ImageOcrRecognizeOptions = {
|
|
52
|
+
rectangle?: ImageOcrRectangle;
|
|
53
|
+
rotateAuto?: boolean;
|
|
54
|
+
rotateRadians?: number;
|
|
55
|
+
};
|
|
56
|
+
export type ImageOcrParameters = {
|
|
57
|
+
tessedit_pageseg_mode?: ImageOcrPageSegMode;
|
|
58
|
+
tessedit_char_whitelist?: string;
|
|
59
|
+
tessedit_char_blacklist?: string;
|
|
60
|
+
preserve_interword_spaces?: "0" | "1";
|
|
61
|
+
user_defined_dpi?: string;
|
|
62
|
+
[key: string]: string | undefined;
|
|
63
|
+
};
|
|
64
|
+
export type ImageOcrPreset = "default" | "document" | "driver-license";
|
|
65
|
+
export type GetImageTextContentOptions = {
|
|
66
|
+
language?: string;
|
|
67
|
+
preset?: ImageOcrPreset;
|
|
68
|
+
onProgress?: (progress: ImageOcrProgress) => void;
|
|
69
|
+
preprocess?: ImageOcrPreprocessOptions;
|
|
70
|
+
recognizeOptions?: ImageOcrRecognizeOptions;
|
|
71
|
+
parameters?: ImageOcrParameters;
|
|
72
|
+
workerOptions?: {
|
|
73
|
+
workerPath?: string;
|
|
74
|
+
corePath?: string;
|
|
75
|
+
langPath?: string;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
export declare const getImageTextContent: (image: File, options?: GetImageTextContentOptions) => Promise<ImageTextContent>;
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
export const ImageOcrPageSegModes = {
|
|
11
|
+
OSD_ONLY: "0",
|
|
12
|
+
AUTO_OSD: "1",
|
|
13
|
+
AUTO_ONLY: "2",
|
|
14
|
+
AUTO: "3",
|
|
15
|
+
SINGLE_COLUMN: "4",
|
|
16
|
+
SINGLE_BLOCK_VERT_TEXT: "5",
|
|
17
|
+
SINGLE_BLOCK: "6",
|
|
18
|
+
SINGLE_LINE: "7",
|
|
19
|
+
SINGLE_WORD: "8",
|
|
20
|
+
CIRCLE_WORD: "9",
|
|
21
|
+
SINGLE_CHAR: "10",
|
|
22
|
+
SPARSE_TEXT: "11",
|
|
23
|
+
SPARSE_TEXT_OSD: "12",
|
|
24
|
+
RAW_LINE: "13",
|
|
25
|
+
};
|
|
26
|
+
const defaultDocumentOptions = {
|
|
27
|
+
preprocess: {
|
|
28
|
+
grayscale: true,
|
|
29
|
+
contrast: 1.25,
|
|
30
|
+
scale: 2,
|
|
31
|
+
maxDimension: 2800,
|
|
32
|
+
},
|
|
33
|
+
recognizeOptions: {
|
|
34
|
+
rotateAuto: true,
|
|
35
|
+
},
|
|
36
|
+
parameters: {
|
|
37
|
+
tessedit_pageseg_mode: ImageOcrPageSegModes.AUTO,
|
|
38
|
+
preserve_interword_spaces: "1",
|
|
39
|
+
user_defined_dpi: "300",
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
const defaultDriverLicenseOptions = {
|
|
43
|
+
preprocess: {
|
|
44
|
+
grayscale: true,
|
|
45
|
+
contrast: 1.45,
|
|
46
|
+
scale: 2.5,
|
|
47
|
+
maxDimension: 3200,
|
|
48
|
+
},
|
|
49
|
+
recognizeOptions: {
|
|
50
|
+
rotateAuto: true,
|
|
51
|
+
},
|
|
52
|
+
parameters: {
|
|
53
|
+
tessedit_pageseg_mode: ImageOcrPageSegModes.SPARSE_TEXT,
|
|
54
|
+
preserve_interword_spaces: "1",
|
|
55
|
+
user_defined_dpi: "300",
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
const mergeOptions = (defaults, options) => {
|
|
59
|
+
var _a, _b;
|
|
60
|
+
return Object.assign(Object.assign(Object.assign({}, defaults), options), { language: (_b = (_a = options.language) !== null && _a !== void 0 ? _a : defaults.language) !== null && _b !== void 0 ? _b : "eng", preprocess: Object.assign(Object.assign({}, defaults.preprocess), options.preprocess), recognizeOptions: Object.assign(Object.assign({}, defaults.recognizeOptions), options.recognizeOptions), parameters: Object.assign(Object.assign({}, defaults.parameters), options.parameters), workerOptions: Object.assign(Object.assign({}, defaults.workerOptions), options.workerOptions) });
|
|
61
|
+
};
|
|
62
|
+
const getResolvedOptions = (options) => {
|
|
63
|
+
switch (options.preset) {
|
|
64
|
+
case "document":
|
|
65
|
+
return mergeOptions(defaultDocumentOptions, options);
|
|
66
|
+
case "driver-license":
|
|
67
|
+
return mergeOptions(defaultDriverLicenseOptions, options);
|
|
68
|
+
default:
|
|
69
|
+
return mergeOptions({}, options);
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
const getFallbackLines = (text) => {
|
|
73
|
+
return text
|
|
74
|
+
.split(/\r?\n/)
|
|
75
|
+
.map((line) => line.trim())
|
|
76
|
+
.filter(Boolean)
|
|
77
|
+
.map((line) => ({ text: line }));
|
|
78
|
+
};
|
|
79
|
+
const getLinesFromPage = (page) => {
|
|
80
|
+
var _a, _b;
|
|
81
|
+
const lines = (_b = (_a = page.blocks) === null || _a === void 0 ? void 0 : _a.flatMap((block) => block.paragraphs.flatMap((paragraph) => paragraph.lines))) !== null && _b !== void 0 ? _b : [];
|
|
82
|
+
if (!lines.length) {
|
|
83
|
+
return getFallbackLines(page.text);
|
|
84
|
+
}
|
|
85
|
+
return lines
|
|
86
|
+
.filter((line) => line.text.trim().length > 0)
|
|
87
|
+
.map((line) => ({
|
|
88
|
+
text: line.text,
|
|
89
|
+
confidence: line.confidence,
|
|
90
|
+
bbox: line.bbox
|
|
91
|
+
? {
|
|
92
|
+
x0: line.bbox.x0,
|
|
93
|
+
y0: line.bbox.y0,
|
|
94
|
+
x1: line.bbox.x1,
|
|
95
|
+
y1: line.bbox.y1,
|
|
96
|
+
}
|
|
97
|
+
: undefined,
|
|
98
|
+
}));
|
|
99
|
+
};
|
|
100
|
+
const loadImageBitmap = (image) => __awaiter(void 0, void 0, void 0, function* () {
|
|
101
|
+
if (typeof createImageBitmap === "function") {
|
|
102
|
+
return createImageBitmap(image);
|
|
103
|
+
}
|
|
104
|
+
const objectUrl = URL.createObjectURL(image);
|
|
105
|
+
try {
|
|
106
|
+
const img = new Image();
|
|
107
|
+
img.decoding = "async";
|
|
108
|
+
img.src = objectUrl;
|
|
109
|
+
yield img.decode();
|
|
110
|
+
const canvas = document.createElement("canvas");
|
|
111
|
+
canvas.width = img.naturalWidth;
|
|
112
|
+
canvas.height = img.naturalHeight;
|
|
113
|
+
const context = canvas.getContext("2d");
|
|
114
|
+
if (!context) {
|
|
115
|
+
throw new Error("Canvas rendering is not available.");
|
|
116
|
+
}
|
|
117
|
+
context.drawImage(img, 0, 0);
|
|
118
|
+
return createImageBitmap(canvas);
|
|
119
|
+
}
|
|
120
|
+
finally {
|
|
121
|
+
URL.revokeObjectURL(objectUrl);
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
const hasPreprocessOptions = (preprocess) => {
|
|
125
|
+
return Boolean((preprocess === null || preprocess === void 0 ? void 0 : preprocess.grayscale) ||
|
|
126
|
+
(preprocess === null || preprocess === void 0 ? void 0 : preprocess.contrast) ||
|
|
127
|
+
(preprocess === null || preprocess === void 0 ? void 0 : preprocess.threshold) !== undefined ||
|
|
128
|
+
(preprocess === null || preprocess === void 0 ? void 0 : preprocess.scale));
|
|
129
|
+
};
|
|
130
|
+
const clampByte = (value) => Math.max(0, Math.min(255, value));
|
|
131
|
+
const preprocessImage = (image, preprocess) => __awaiter(void 0, void 0, void 0, function* () {
|
|
132
|
+
var _a, _b, _c;
|
|
133
|
+
if (!hasPreprocessOptions(preprocess)) {
|
|
134
|
+
return image;
|
|
135
|
+
}
|
|
136
|
+
const bitmap = yield loadImageBitmap(image);
|
|
137
|
+
const requestedScale = (_a = preprocess === null || preprocess === void 0 ? void 0 : preprocess.scale) !== null && _a !== void 0 ? _a : 1;
|
|
138
|
+
const maxDimension = (_b = preprocess === null || preprocess === void 0 ? void 0 : preprocess.maxDimension) !== null && _b !== void 0 ? _b : 3000;
|
|
139
|
+
const largestSourceDimension = Math.max(bitmap.width, bitmap.height);
|
|
140
|
+
const scale = Math.min(Math.max(requestedScale, 1), maxDimension / largestSourceDimension);
|
|
141
|
+
const width = Math.max(1, Math.round(bitmap.width * scale));
|
|
142
|
+
const height = Math.max(1, Math.round(bitmap.height * scale));
|
|
143
|
+
const canvas = document.createElement("canvas");
|
|
144
|
+
canvas.width = width;
|
|
145
|
+
canvas.height = height;
|
|
146
|
+
const context = canvas.getContext("2d", { willReadFrequently: true });
|
|
147
|
+
if (!context) {
|
|
148
|
+
throw new Error("Canvas rendering is not available.");
|
|
149
|
+
}
|
|
150
|
+
context.imageSmoothingEnabled = true;
|
|
151
|
+
context.imageSmoothingQuality = "high";
|
|
152
|
+
context.drawImage(bitmap, 0, 0, width, height);
|
|
153
|
+
bitmap.close();
|
|
154
|
+
const imageData = context.getImageData(0, 0, width, height);
|
|
155
|
+
const { data } = imageData;
|
|
156
|
+
const contrast = (_c = preprocess === null || preprocess === void 0 ? void 0 : preprocess.contrast) !== null && _c !== void 0 ? _c : 1;
|
|
157
|
+
const contrastFactor = contrast === 1 ? 1 : (259 * (255 * contrast - 255 + 255)) / (255 * (259 - (255 * contrast - 255)));
|
|
158
|
+
for (let index = 0; index < data.length; index += 4) {
|
|
159
|
+
let red = data[index];
|
|
160
|
+
let green = data[index + 1];
|
|
161
|
+
let blue = data[index + 2];
|
|
162
|
+
if ((preprocess === null || preprocess === void 0 ? void 0 : preprocess.grayscale) || (preprocess === null || preprocess === void 0 ? void 0 : preprocess.threshold) !== undefined) {
|
|
163
|
+
const luminance = 0.299 * red + 0.587 * green + 0.114 * blue;
|
|
164
|
+
red = luminance;
|
|
165
|
+
green = luminance;
|
|
166
|
+
blue = luminance;
|
|
167
|
+
}
|
|
168
|
+
if (contrast !== 1) {
|
|
169
|
+
red = clampByte(contrastFactor * (red - 128) + 128);
|
|
170
|
+
green = clampByte(contrastFactor * (green - 128) + 128);
|
|
171
|
+
blue = clampByte(contrastFactor * (blue - 128) + 128);
|
|
172
|
+
}
|
|
173
|
+
if ((preprocess === null || preprocess === void 0 ? void 0 : preprocess.threshold) !== undefined) {
|
|
174
|
+
const threshold = clampByte(preprocess.threshold);
|
|
175
|
+
const value = red >= threshold ? 255 : 0;
|
|
176
|
+
red = value;
|
|
177
|
+
green = value;
|
|
178
|
+
blue = value;
|
|
179
|
+
}
|
|
180
|
+
data[index] = red;
|
|
181
|
+
data[index + 1] = green;
|
|
182
|
+
data[index + 2] = blue;
|
|
183
|
+
}
|
|
184
|
+
context.putImageData(imageData, 0, 0);
|
|
185
|
+
return new Promise((resolve, reject) => {
|
|
186
|
+
canvas.toBlob((blob) => {
|
|
187
|
+
if (!blob) {
|
|
188
|
+
reject(new Error("Unable to prepare image for OCR."));
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
resolve(blob);
|
|
192
|
+
}, "image/png");
|
|
193
|
+
});
|
|
194
|
+
});
|
|
195
|
+
export const getImageTextContent = (image_1, ...args_1) => __awaiter(void 0, [image_1, ...args_1], void 0, function* (image, options = {}) {
|
|
196
|
+
if (!image.type.startsWith("image/")) {
|
|
197
|
+
throw new Error("getImageTextContent requires an image File.");
|
|
198
|
+
}
|
|
199
|
+
const { language, onProgress, parameters, preprocess, recognizeOptions, workerOptions, } = getResolvedOptions(options);
|
|
200
|
+
const { createWorker } = yield import("tesseract.js");
|
|
201
|
+
let worker;
|
|
202
|
+
try {
|
|
203
|
+
worker = yield createWorker(language, undefined, Object.assign(Object.assign({}, workerOptions), { logger: ({ progress, status }) => {
|
|
204
|
+
onProgress === null || onProgress === void 0 ? void 0 : onProgress({ progress, status });
|
|
205
|
+
} }));
|
|
206
|
+
if (parameters && Object.keys(parameters).length > 0) {
|
|
207
|
+
yield worker.setParameters(parameters);
|
|
208
|
+
}
|
|
209
|
+
const ocrImage = yield preprocessImage(image, preprocess);
|
|
210
|
+
const result = yield worker.recognize(ocrImage, recognizeOptions, { text: true, blocks: true });
|
|
211
|
+
const { data } = result;
|
|
212
|
+
return {
|
|
213
|
+
text: data.text,
|
|
214
|
+
confidence: data.confidence,
|
|
215
|
+
language,
|
|
216
|
+
lines: getLinesFromPage(data),
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
finally {
|
|
220
|
+
yield (worker === null || worker === void 0 ? void 0 : worker.terminate());
|
|
221
|
+
}
|
|
222
|
+
});
|
|
@@ -26,7 +26,7 @@ const CONTROL_SIZE_TOKENS = {
|
|
|
26
26
|
pillPaddingX: 6,
|
|
27
27
|
pillIconSize: 10,
|
|
28
28
|
pillGap: 4,
|
|
29
|
-
segmentedHeight:
|
|
29
|
+
segmentedHeight: 24,
|
|
30
30
|
segmentedFontSize: 11,
|
|
31
31
|
sectionTitleFontSize: 12,
|
|
32
32
|
sectionIconSize: 12,
|
|
@@ -57,7 +57,7 @@ const CONTROL_SIZE_TOKENS = {
|
|
|
57
57
|
pillPaddingX: 8,
|
|
58
58
|
pillIconSize: 12,
|
|
59
59
|
pillGap: 5,
|
|
60
|
-
segmentedHeight:
|
|
60
|
+
segmentedHeight: 28,
|
|
61
61
|
segmentedFontSize: 12,
|
|
62
62
|
sectionTitleFontSize: 13,
|
|
63
63
|
sectionIconSize: 12,
|
|
@@ -89,7 +89,7 @@ const CONTROL_SIZE_TOKENS = {
|
|
|
89
89
|
pillIconSize: 14,
|
|
90
90
|
pillGap: 5,
|
|
91
91
|
segmentedHeight: 32,
|
|
92
|
-
segmentedFontSize:
|
|
92
|
+
segmentedFontSize: 13,
|
|
93
93
|
sectionTitleFontSize: 14,
|
|
94
94
|
sectionIconSize: 14,
|
|
95
95
|
},
|
|
@@ -119,8 +119,8 @@ const CONTROL_SIZE_TOKENS = {
|
|
|
119
119
|
pillPaddingX: 12,
|
|
120
120
|
pillIconSize: 16,
|
|
121
121
|
pillGap: 5,
|
|
122
|
-
segmentedHeight:
|
|
123
|
-
segmentedFontSize:
|
|
122
|
+
segmentedHeight: 36,
|
|
123
|
+
segmentedFontSize: 14,
|
|
124
124
|
sectionTitleFontSize: 16,
|
|
125
125
|
sectionIconSize: 18,
|
|
126
126
|
},
|
|
@@ -150,8 +150,8 @@ const CONTROL_SIZE_TOKENS = {
|
|
|
150
150
|
pillPaddingX: 14,
|
|
151
151
|
pillIconSize: 18,
|
|
152
152
|
pillGap: 5,
|
|
153
|
-
segmentedHeight:
|
|
154
|
-
segmentedFontSize:
|
|
153
|
+
segmentedHeight: 44,
|
|
154
|
+
segmentedFontSize: 15,
|
|
155
155
|
sectionTitleFontSize: 18,
|
|
156
156
|
sectionIconSize: 24,
|
|
157
157
|
},
|
|
@@ -181,8 +181,8 @@ const CONTROL_SIZE_TOKENS = {
|
|
|
181
181
|
pillPaddingX: 16,
|
|
182
182
|
pillIconSize: 20,
|
|
183
183
|
pillGap: 5,
|
|
184
|
-
segmentedHeight:
|
|
185
|
-
segmentedFontSize:
|
|
184
|
+
segmentedHeight: 52,
|
|
185
|
+
segmentedFontSize: 16,
|
|
186
186
|
sectionTitleFontSize: 20,
|
|
187
187
|
sectionIconSize: 28,
|
|
188
188
|
},
|
package/dist/theme/variants.js
CHANGED
|
@@ -122,6 +122,29 @@ const lightVariant = {
|
|
|
122
122
|
action: {
|
|
123
123
|
hover: "rgba(0, 0, 0, 0.1)",
|
|
124
124
|
},
|
|
125
|
+
codeBlock: {
|
|
126
|
+
background: "#f6f8fa",
|
|
127
|
+
text: "#24292f",
|
|
128
|
+
border: "#d0d7de",
|
|
129
|
+
selection: "#0969da2e",
|
|
130
|
+
syntax: {
|
|
131
|
+
comment: "#6e7781",
|
|
132
|
+
punctuation: "#24292f",
|
|
133
|
+
property: "#0550ae",
|
|
134
|
+
selector: "#116329",
|
|
135
|
+
operator: "#cf222e",
|
|
136
|
+
keyword: "#cf222e",
|
|
137
|
+
string: "#0a3069",
|
|
138
|
+
number: "#0550ae",
|
|
139
|
+
function: "#8250df",
|
|
140
|
+
variable: "#953800",
|
|
141
|
+
tag: "#116329",
|
|
142
|
+
attribute: "#0550ae",
|
|
143
|
+
literal: "#0550ae",
|
|
144
|
+
deleted: "#82071e",
|
|
145
|
+
inserted: "#116329",
|
|
146
|
+
},
|
|
147
|
+
},
|
|
125
148
|
divider: "rgba(0, 0, 0, 0.3)",
|
|
126
149
|
},
|
|
127
150
|
header: {
|
|
@@ -282,6 +305,29 @@ const darkVariant = merge(lightVariant, {
|
|
|
282
305
|
dataGrid: {
|
|
283
306
|
hover: "#2f2f2f",
|
|
284
307
|
},
|
|
308
|
+
codeBlock: {
|
|
309
|
+
background: "#191919",
|
|
310
|
+
text: "#c9d1d9",
|
|
311
|
+
border: "rgba(255, 255, 255, 0.15)",
|
|
312
|
+
selection: "#1f6feb40",
|
|
313
|
+
syntax: {
|
|
314
|
+
comment: "#8b949e",
|
|
315
|
+
punctuation: "#c9d1d9",
|
|
316
|
+
property: "#79c0ff",
|
|
317
|
+
selector: "#7ee787",
|
|
318
|
+
operator: "#ff7b72",
|
|
319
|
+
keyword: "#ff7b72",
|
|
320
|
+
string: "#a5d6ff",
|
|
321
|
+
number: "#79c0ff",
|
|
322
|
+
function: "#d2a8ff",
|
|
323
|
+
variable: "#ffa657",
|
|
324
|
+
tag: "#7ee787",
|
|
325
|
+
attribute: "#79c0ff",
|
|
326
|
+
literal: "#79c0ff",
|
|
327
|
+
deleted: "#ffa198",
|
|
328
|
+
inserted: "#aff5b4",
|
|
329
|
+
},
|
|
330
|
+
},
|
|
285
331
|
},
|
|
286
332
|
header: {
|
|
287
333
|
color: grey[300],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@monolith-forensics/monolith-ui",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.3-dev.1",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"author": "Matt Danner (Monolith Forensics LLC)",
|
|
@@ -41,9 +41,13 @@
|
|
|
41
41
|
"@radix-ui/react-tooltip": "^1.0.7",
|
|
42
42
|
"@tabler/icons-react": "^3.11.0",
|
|
43
43
|
"@tiptap/core": "3.22.4",
|
|
44
|
+
"@tiptap/extension-code-block": "3.22.4",
|
|
45
|
+
"@tiptap/extension-code-block-lowlight": "3.22.4",
|
|
44
46
|
"@tiptap/extension-color": "3.22.4",
|
|
47
|
+
"@tiptap/extension-highlight": "3.22.4",
|
|
45
48
|
"@tiptap/extension-horizontal-rule": "3.22.4",
|
|
46
49
|
"@tiptap/extension-image": "3.22.4",
|
|
50
|
+
"@tiptap/extension-link": "3.22.4",
|
|
47
51
|
"@tiptap/extension-table": "3.22.4",
|
|
48
52
|
"@tiptap/extension-text-align": "3.22.4",
|
|
49
53
|
"@tiptap/extension-text-style": "3.22.4",
|
|
@@ -58,10 +62,13 @@
|
|
|
58
62
|
"d3-shape": "^3.2.0",
|
|
59
63
|
"deepmerge": "^4.3.1",
|
|
60
64
|
"exceljs": "^4.4.0",
|
|
65
|
+
"highlight.js": "^11.11.1",
|
|
66
|
+
"lowlight": "^3.3.0",
|
|
61
67
|
"lucide-react": "^0.469.0",
|
|
62
68
|
"moment": "^2.29.1",
|
|
63
69
|
"overlayscrollbars": "^2.6.0",
|
|
64
70
|
"overlayscrollbars-react": "^0.5.6",
|
|
71
|
+
"prettier": "^3.8.3",
|
|
65
72
|
"react-dropzone": "^14.2.3",
|
|
66
73
|
"react-icons": "^5.2.1",
|
|
67
74
|
"react-pdf": "^9.1.1",
|