@monolith-forensics/monolith-ui 1.8.1 → 1.9.0

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.
Files changed (179) hide show
  1. package/dist/MonolithUIProvider/MonolithUIProvider.d.ts +0 -4
  2. package/dist/Tabs/Tab.js +0 -8
  3. package/dist/TagBox/TagBox.d.ts +1 -1
  4. package/dist/TagBox/TagBox.js +135 -35
  5. package/dist/TagBox/types.d.ts +13 -0
  6. package/dist/core/controlSizes.d.ts +0 -26
  7. package/dist/core/controlSizes.js +0 -156
  8. package/dist/core/index.d.ts +1 -0
  9. package/dist/core/index.js +1 -0
  10. package/dist/theme/variants.js +0 -8
  11. package/package.json +1 -1
  12. package/dist/Charts/BarChart/BarChart.d.ts +0 -5
  13. package/dist/Charts/BarChart/BarChart.js +0 -563
  14. package/dist/Charts/BarChart/BarChart.lib.d.ts +0 -31
  15. package/dist/Charts/BarChart/BarChart.lib.js +0 -136
  16. package/dist/Charts/BarChart/BarChart.styled.d.ts +0 -56
  17. package/dist/Charts/BarChart/BarChart.styled.js +0 -119
  18. package/dist/Charts/BarChart/BarChart.types.d.ts +0 -179
  19. package/dist/Charts/BarChart/BarChart.types.js +0 -1
  20. package/dist/Charts/BarChart/index.d.ts +0 -3
  21. package/dist/Charts/BarChart/index.js +0 -2
  22. package/dist/Charts/ChartPrimitives/ChartExportControl.d.ts +0 -11
  23. package/dist/Charts/ChartPrimitives/ChartExportControl.js +0 -29
  24. package/dist/Charts/ChartPrimitives/chartActions.styled.d.ts +0 -1
  25. package/dist/Charts/ChartPrimitives/chartActions.styled.js +0 -8
  26. package/dist/Charts/ChartPrimitives/chartLegend.styled.d.ts +0 -12
  27. package/dist/Charts/ChartPrimitives/chartLegend.styled.js +0 -52
  28. package/dist/Charts/ChartPrimitives/chartTooltip.styled.d.ts +0 -19
  29. package/dist/Charts/ChartPrimitives/chartTooltip.styled.js +0 -61
  30. package/dist/Charts/ChartPrimitives/index.d.ts +0 -4
  31. package/dist/Charts/ChartPrimitives/index.js +0 -4
  32. package/dist/Charts/ChartUtils/chartColors.d.ts +0 -8
  33. package/dist/Charts/ChartUtils/chartColors.js +0 -65
  34. package/dist/Charts/ChartUtils/chartExport.d.ts +0 -47
  35. package/dist/Charts/ChartUtils/chartExport.js +0 -311
  36. package/dist/Charts/ChartUtils/chartMath.d.ts +0 -3
  37. package/dist/Charts/ChartUtils/chartMath.js +0 -3
  38. package/dist/Charts/ChartUtils/chartSizing.d.ts +0 -20
  39. package/dist/Charts/ChartUtils/chartSizing.js +0 -83
  40. package/dist/Charts/ChartUtils/index.d.ts +0 -4
  41. package/dist/Charts/ChartUtils/index.js +0 -4
  42. package/dist/Charts/HeatMap/HeatMap.d.ts +0 -5
  43. package/dist/Charts/HeatMap/HeatMap.js +0 -233
  44. package/dist/Charts/HeatMap/HeatMap.lib.d.ts +0 -30
  45. package/dist/Charts/HeatMap/HeatMap.lib.js +0 -115
  46. package/dist/Charts/HeatMap/HeatMap.styled.d.ts +0 -41
  47. package/dist/Charts/HeatMap/HeatMap.styled.js +0 -94
  48. package/dist/Charts/HeatMap/HeatMap.types.d.ts +0 -86
  49. package/dist/Charts/HeatMap/HeatMap.types.js +0 -1
  50. package/dist/Charts/HeatMap/index.d.ts +0 -3
  51. package/dist/Charts/HeatMap/index.js +0 -2
  52. package/dist/Charts/LineChart/LineChart.d.ts +0 -5
  53. package/dist/Charts/LineChart/LineChart.js +0 -548
  54. package/dist/Charts/LineChart/LineChart.lib.d.ts +0 -24
  55. package/dist/Charts/LineChart/LineChart.lib.js +0 -132
  56. package/dist/Charts/LineChart/LineChart.styled.d.ts +0 -64
  57. package/dist/Charts/LineChart/LineChart.styled.js +0 -151
  58. package/dist/Charts/LineChart/LineChart.types.d.ts +0 -201
  59. package/dist/Charts/LineChart/LineChart.types.js +0 -1
  60. package/dist/Charts/LineChart/index.d.ts +0 -3
  61. package/dist/Charts/LineChart/index.js +0 -2
  62. package/dist/Charts/PieChart/PieChart.d.ts +0 -4
  63. package/dist/Charts/PieChart/PieChart.js +0 -214
  64. package/dist/Charts/PieChart/PieChart.lib.d.ts +0 -5
  65. package/dist/Charts/PieChart/PieChart.lib.js +0 -19
  66. package/dist/Charts/PieChart/PieChart.styled.d.ts +0 -56
  67. package/dist/Charts/PieChart/PieChart.styled.js +0 -168
  68. package/dist/Charts/PieChart/PieChart.types.d.ts +0 -104
  69. package/dist/Charts/PieChart/PieChart.types.js +0 -1
  70. package/dist/Charts/PieChart/index.d.ts +0 -2
  71. package/dist/Charts/PieChart/index.js +0 -1
  72. package/dist/Charts/index.d.ts +0 -5
  73. package/dist/Charts/index.js +0 -4
  74. package/dist/QueryFilter/QueryFilter.constants.d.ts +0 -134
  75. package/dist/QueryFilter/QueryFilter.constants.js +0 -39
  76. package/dist/QueryFilter/QueryFilter.lib.d.ts +0 -14
  77. package/dist/QueryFilter/QueryFilter.lib.js +0 -84
  78. package/dist/QueryFilter/QueryFilter.styled.d.ts +0 -89
  79. package/dist/QueryFilter/QueryFilter.styled.js +0 -184
  80. package/dist/QueryFilter/QueryFilter.types.d.ts +0 -61
  81. package/dist/QueryFilter/QueryFilter.types.js +0 -1
  82. package/dist/QueryFilter/components/MultiSelectEditor.d.ts +0 -7
  83. package/dist/QueryFilter/components/MultiSelectEditor.js +0 -44
  84. package/dist/QueryFilter/components/RuleChip.d.ts +0 -8
  85. package/dist/QueryFilter/components/RuleChip.js +0 -37
  86. package/dist/QueryFilter/components/Rules.d.ts +0 -11
  87. package/dist/QueryFilter/components/Rules.js +0 -41
  88. package/dist/QueryFilter/components/UnavailableRuleChip.d.ts +0 -5
  89. package/dist/QueryFilter/components/UnavailableRuleChip.js +0 -7
  90. package/dist/QueryFilter/components/ValueEditor.d.ts +0 -7
  91. package/dist/QueryFilter/components/ValueEditor.js +0 -45
  92. package/dist/QueryFilter/components/ValueSelector.d.ts +0 -7
  93. package/dist/QueryFilter/components/ValueSelector.js +0 -34
  94. package/dist/QueryFilter/components/index.d.ts +0 -6
  95. package/dist/QueryFilter/components/index.js +0 -6
  96. package/dist/RichTextEditor/Components/CodeBlockBaseButton.d.ts +0 -18
  97. package/dist/RichTextEditor/Components/CodeBlockBaseButton.js +0 -6
  98. package/dist/RichTextEditor/Components/CodeBlockCopyButton.d.ts +0 -9
  99. package/dist/RichTextEditor/Components/CodeBlockCopyButton.js +0 -42
  100. package/dist/RichTextEditor/Components/CodeBlockFormatButton.d.ts +0 -10
  101. package/dist/RichTextEditor/Components/CodeBlockFormatButton.js +0 -60
  102. package/dist/RichTextEditor/Components/CodeBlockLanguageSelect.d.ts +0 -9
  103. package/dist/RichTextEditor/Components/CodeBlockLanguageSelect.js +0 -30
  104. package/dist/RichTextEditor/Components/CodeBlockNodeView.d.ts +0 -3
  105. package/dist/RichTextEditor/Components/CodeBlockNodeView.js +0 -28
  106. package/dist/RichTextEditor/Components/CodeBlockWrapButton.d.ts +0 -10
  107. package/dist/RichTextEditor/Components/CodeBlockWrapButton.js +0 -17
  108. package/dist/RichTextEditor/Components/LinkEditor.d.ts +0 -8
  109. package/dist/RichTextEditor/Components/LinkEditor.js +0 -94
  110. package/dist/RichTextEditor/Components/TableTools/TableCornerMenu.d.ts +0 -2
  111. package/dist/RichTextEditor/Components/TableTools/TableCornerMenu.js +0 -19
  112. package/dist/RichTextEditor/Components/TableTools/TableInsertControls.d.ts +0 -2
  113. package/dist/RichTextEditor/Components/TableTools/TableInsertControls.js +0 -24
  114. package/dist/RichTextEditor/Components/TableTools/TableRails.d.ts +0 -2
  115. package/dist/RichTextEditor/Components/TableTools/TableRails.js +0 -180
  116. package/dist/RichTextEditor/Components/TableTools/TableToolMenu.d.ts +0 -5
  117. package/dist/RichTextEditor/Components/TableTools/TableToolMenu.js +0 -6
  118. package/dist/RichTextEditor/Components/TableTools/TableTools.actions.d.ts +0 -5
  119. package/dist/RichTextEditor/Components/TableTools/TableTools.actions.js +0 -183
  120. package/dist/RichTextEditor/Components/TableTools/TableTools.commands.d.ts +0 -16
  121. package/dist/RichTextEditor/Components/TableTools/TableTools.commands.js +0 -217
  122. package/dist/RichTextEditor/Components/TableTools/TableTools.constants.d.ts +0 -8
  123. package/dist/RichTextEditor/Components/TableTools/TableTools.constants.js +0 -11
  124. package/dist/RichTextEditor/Components/TableTools/TableTools.d.ts +0 -3
  125. package/dist/RichTextEditor/Components/TableTools/TableTools.geometry.d.ts +0 -23
  126. package/dist/RichTextEditor/Components/TableTools/TableTools.geometry.js +0 -75
  127. package/dist/RichTextEditor/Components/TableTools/TableTools.js +0 -3
  128. package/dist/RichTextEditor/Components/TableTools/TableTools.selectors.d.ts +0 -16
  129. package/dist/RichTextEditor/Components/TableTools/TableTools.selectors.js +0 -53
  130. package/dist/RichTextEditor/Components/TableTools/TableTools.styled.d.ts +0 -40
  131. package/dist/RichTextEditor/Components/TableTools/TableTools.styled.js +0 -167
  132. package/dist/RichTextEditor/Components/TableTools/TableTools.types.d.ts +0 -76
  133. package/dist/RichTextEditor/Components/TableTools/TableTools.types.js +0 -1
  134. package/dist/RichTextEditor/Components/TableTools/TableTools.utils.d.ts +0 -4
  135. package/dist/RichTextEditor/Components/TableTools/TableTools.utils.js +0 -4
  136. package/dist/RichTextEditor/Components/TableTools/TableToolsPopover.d.ts +0 -2
  137. package/dist/RichTextEditor/Components/TableTools/TableToolsPopover.js +0 -12
  138. package/dist/RichTextEditor/Components/TableTools/index.d.ts +0 -3
  139. package/dist/RichTextEditor/Components/TableTools/index.js +0 -2
  140. package/dist/RichTextEditor/Enums/HighlightColors.d.ts +0 -9
  141. package/dist/RichTextEditor/Enums/HighlightColors.js +0 -10
  142. package/dist/RichTextEditor/Plugins/ImageActionsPlugin.d.ts +0 -3
  143. package/dist/RichTextEditor/Plugins/ImageActionsPlugin.js +0 -238
  144. package/dist/RichTextEditor/Utils/codeBlockUtils.d.ts +0 -20
  145. package/dist/RichTextEditor/Utils/codeBlockUtils.js +0 -137
  146. package/dist/RichTextEditor/Utils/codeUtils.d.ts +0 -3
  147. package/dist/RichTextEditor/Utils/codeUtils.js +0 -12
  148. package/dist/RichTextEditor/Utils/linkUtils.d.ts +0 -19
  149. package/dist/RichTextEditor/Utils/linkUtils.js +0 -57
  150. package/dist/RichTextEditor/Utils/tableUtils.d.ts +0 -1
  151. package/dist/RichTextEditor/Utils/tableUtils.js +0 -1
  152. package/dist/SuperDatePicker/SuperDatePicker.constants.d.ts +0 -24
  153. package/dist/SuperDatePicker/SuperDatePicker.constants.js +0 -30
  154. package/dist/SuperDatePicker/SuperDatePicker.d.ts +0 -3
  155. package/dist/SuperDatePicker/SuperDatePicker.js +0 -31
  156. package/dist/SuperDatePicker/SuperDatePicker.lib.d.ts +0 -17
  157. package/dist/SuperDatePicker/SuperDatePicker.lib.js +0 -206
  158. package/dist/SuperDatePicker/SuperDatePicker.styled.d.ts +0 -60
  159. package/dist/SuperDatePicker/SuperDatePicker.styled.js +0 -256
  160. package/dist/SuperDatePicker/SuperDatePicker.types.d.ts +0 -48
  161. package/dist/SuperDatePicker/SuperDatePicker.types.js +0 -1
  162. package/dist/SuperDatePicker/components/CommonPresetGroups.d.ts +0 -7
  163. package/dist/SuperDatePicker/components/CommonPresetGroups.js +0 -6
  164. package/dist/SuperDatePicker/components/EndpointCalendarDropdown.d.ts +0 -10
  165. package/dist/SuperDatePicker/components/EndpointCalendarDropdown.js +0 -9
  166. package/dist/SuperDatePicker/components/EndpointDateInput.d.ts +0 -16
  167. package/dist/SuperDatePicker/components/EndpointDateInput.js +0 -26
  168. package/dist/SuperDatePicker/components/EndpointPopover.d.ts +0 -18
  169. package/dist/SuperDatePicker/components/EndpointPopover.js +0 -11
  170. package/dist/SuperDatePicker/components/QuickRangeDropdown.d.ts +0 -14
  171. package/dist/SuperDatePicker/components/QuickRangeDropdown.js +0 -19
  172. package/dist/SuperDatePicker/components/QuickRangePopover.d.ts +0 -18
  173. package/dist/SuperDatePicker/components/QuickRangePopover.js +0 -12
  174. package/dist/SuperDatePicker/components/index.d.ts +0 -6
  175. package/dist/SuperDatePicker/components/index.js +0 -6
  176. package/dist/SuperDatePicker/index.d.ts +0 -3
  177. package/dist/SuperDatePicker/index.js +0 -3
  178. package/dist/SuperDatePicker/useSuperDatePicker.d.ts +0 -32
  179. package/dist/SuperDatePicker/useSuperDatePicker.js +0 -125
@@ -1,3 +0,0 @@
1
- export { TableRails } from "./TableRails";
2
- export { TableToolsContent } from "./TableInsertControls";
3
- export { TableToolsPopover } from "./TableToolsPopover";
@@ -1,23 +0,0 @@
1
- import { TableMap } from "@tiptap/pm/tables";
2
- import type { Editor } from "@tiptap/react";
3
- import type { RailKind, RailRect, RailTarget, TableRailTarget } from "./TableTools.types";
4
- export declare const getRailTargetFromCell: (editor: Editor, cell: HTMLTableCellElement) => {
5
- kind: RailKind;
6
- rowIndex: number;
7
- colIndex: number;
8
- tableElement: HTMLTableElement;
9
- tableRect: RailRect;
10
- tableContext: {
11
- node: import("prosemirror-model").Node;
12
- pos: number;
13
- start: number;
14
- map: TableMap;
15
- };
16
- rowRect: RailRect;
17
- columnRect: RailRect;
18
- } | null;
19
- export declare const getRailRect: (target: RailTarget, kind: RailKind) => RailRect;
20
- export declare const getCornerRect: (target: TableRailTarget) => {
21
- top: number;
22
- left: number;
23
- };
@@ -1,75 +0,0 @@
1
- import { findCellPos, findTable, TableMap } from "@tiptap/pm/tables";
2
- import { CORNER_BUTTON_SIZE, RAIL_THICKNESS, VIEWPORT_PADDING, } from "./TableTools.constants";
3
- const toRect = (rect) => ({
4
- top: rect.top,
5
- left: rect.left,
6
- width: rect.width,
7
- height: rect.height,
8
- });
9
- const clamp = (value, min, max) => Math.max(min, Math.min(max, value));
10
- export const getRailTargetFromCell = (editor, cell) => {
11
- const tableElement = cell.closest("table");
12
- const rowElement = cell.closest("tr");
13
- if (!tableElement || !rowElement || !editor.view.dom.contains(tableElement)) {
14
- return null;
15
- }
16
- const cellPosition = editor.view.posAtDOM(cell, 0);
17
- const $cell = findCellPos(editor.state.doc, cellPosition);
18
- if (!$cell)
19
- return null;
20
- const table = findTable($cell);
21
- if (!table)
22
- return null;
23
- const map = TableMap.get(table.node);
24
- const cellRect = map.findCell($cell.pos - table.start);
25
- const tableRect = toRect(tableElement.getBoundingClientRect());
26
- const rowRect = toRect(rowElement.getBoundingClientRect());
27
- const columnRect = toRect(cell.getBoundingClientRect());
28
- if (tableRect.width <= 0 ||
29
- tableRect.height <= 0 ||
30
- rowRect.width <= 0 ||
31
- rowRect.height <= 0 ||
32
- columnRect.width <= 0 ||
33
- columnRect.height <= 0) {
34
- return null;
35
- }
36
- return {
37
- kind: "column",
38
- rowIndex: cellRect.top,
39
- colIndex: cellRect.left,
40
- tableElement,
41
- tableRect,
42
- tableContext: {
43
- node: table.node,
44
- pos: table.pos,
45
- start: table.start,
46
- map,
47
- },
48
- rowRect,
49
- columnRect,
50
- };
51
- };
52
- export const getRailRect = (target, kind) => {
53
- if (kind === "column") {
54
- const width = target.columnRect.width;
55
- const left = clamp(target.columnRect.left, VIEWPORT_PADDING, Math.max(VIEWPORT_PADDING, window.innerWidth - width - VIEWPORT_PADDING));
56
- return {
57
- top: Math.max(VIEWPORT_PADDING, target.tableRect.top - RAIL_THICKNESS),
58
- left,
59
- width,
60
- height: RAIL_THICKNESS,
61
- };
62
- }
63
- const height = target.rowRect.height;
64
- const top = clamp(target.rowRect.top, VIEWPORT_PADDING, Math.max(VIEWPORT_PADDING, window.innerHeight - height - VIEWPORT_PADDING));
65
- return {
66
- top,
67
- left: Math.max(VIEWPORT_PADDING, target.rowRect.left - RAIL_THICKNESS),
68
- width: RAIL_THICKNESS,
69
- height,
70
- };
71
- };
72
- export const getCornerRect = (target) => ({
73
- top: Math.max(VIEWPORT_PADDING, target.tableRect.top - CORNER_BUTTON_SIZE),
74
- left: Math.max(VIEWPORT_PADDING, target.tableRect.left - CORNER_BUTTON_SIZE),
75
- });
@@ -1,3 +0,0 @@
1
- export { TableRails } from "./TableRails";
2
- export { TableToolsContent } from "./TableInsertControls";
3
- export { TableToolsPopover } from "./TableToolsPopover";
@@ -1,16 +0,0 @@
1
- import { Node as ProseMirrorNode } from "@tiptap/pm/model";
2
- import type { Editor } from "@tiptap/react";
3
- import type { RailTarget } from "./TableTools.types";
4
- export declare const clampTableSize: (value: number) => number;
5
- export declare const hasTableExtension: (editor: Editor | null) => boolean;
6
- export declare const isTableActive: (editor: Editor | null) => boolean;
7
- export declare const getCellsInTarget: (target: RailTarget) => {
8
- pos: number;
9
- node: ProseMirrorNode;
10
- }[];
11
- export declare const getCellsInTableTarget: (target: RailTarget) => {
12
- pos: number;
13
- node: ProseMirrorNode;
14
- }[];
15
- export declare const hasRiskyMergedCells: (target: RailTarget) => boolean;
16
- export declare const getTopRowIsHeader: (target: RailTarget) => boolean;
@@ -1,53 +0,0 @@
1
- import { rowIsHeader } from "@tiptap/pm/tables";
2
- import { MAX_TABLE_SIZE, MIN_TABLE_SIZE } from "./TableTools.constants";
3
- export const clampTableSize = (value) => {
4
- if (Number.isNaN(value))
5
- return MIN_TABLE_SIZE;
6
- return Math.min(MAX_TABLE_SIZE, Math.max(MIN_TABLE_SIZE, value));
7
- };
8
- export const hasTableExtension = (editor) => Boolean(editor === null || editor === void 0 ? void 0 : editor.extensionManager.extensions.find((extension) => extension.name === "table"));
9
- export const isTableActive = (editor) => Boolean((editor === null || editor === void 0 ? void 0 : editor.isActive("table")) ||
10
- (editor === null || editor === void 0 ? void 0 : editor.isActive("tableRow")) ||
11
- (editor === null || editor === void 0 ? void 0 : editor.isActive("tableCell")) ||
12
- (editor === null || editor === void 0 ? void 0 : editor.isActive("tableHeader")));
13
- export const getCellsInTarget = (target) => {
14
- const { tableContext } = target;
15
- return tableContext.map
16
- .cellsInRect(target.kind === "row"
17
- ? {
18
- left: 0,
19
- right: tableContext.map.width,
20
- top: target.rowIndex,
21
- bottom: target.rowIndex + 1,
22
- }
23
- : {
24
- left: target.colIndex,
25
- right: target.colIndex + 1,
26
- top: 0,
27
- bottom: tableContext.map.height,
28
- })
29
- .map((pos) => ({
30
- pos,
31
- node: tableContext.node.nodeAt(pos),
32
- }))
33
- .filter((cell) => Boolean(cell.node));
34
- };
35
- export const getCellsInTableTarget = (target) => {
36
- const { tableContext } = target;
37
- return tableContext.map
38
- .cellsInRect({
39
- left: 0,
40
- right: tableContext.map.width,
41
- top: 0,
42
- bottom: tableContext.map.height,
43
- })
44
- .map((pos) => ({
45
- pos,
46
- node: tableContext.node.nodeAt(pos),
47
- }))
48
- .filter((cell) => Boolean(cell.node));
49
- };
50
- export const hasRiskyMergedCells = (target) => {
51
- return getCellsInTarget(target).some((cell) => cell.node.attrs.rowspan > 1 || cell.node.attrs.colspan > 1);
52
- };
53
- export const getTopRowIsHeader = (target) => rowIsHeader(target.tableContext.map, target.tableContext.node, 0);
@@ -1,40 +0,0 @@
1
- import type { RailKind, RailRect } from "./TableTools.types";
2
- export declare const TableToolsPanel: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
3
- export declare const TableToolsSection: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
4
- export declare const TableToolsSectionTitle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("../../../FieldLabel").FieldLabelProps, never>, never>> & string;
5
- export declare const InsertGrid: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
6
- export declare const Field: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, never>> & string;
7
- export declare const SwitchRow: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
8
- export declare const RailRoot: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
9
- $rect: RailRect;
10
- $kind: RailKind;
11
- }>> & string;
12
- export declare const MenuPanel: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
13
- export declare const MenuDropdown: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("../../../Popover").PopoverDropdownProps, never>> & string & Omit<import("react").FC<import("../../../Popover").PopoverDropdownProps>, keyof import("react").Component<any, {}, any>>;
14
- export declare const MenuGroup: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
15
- $withDivider: boolean;
16
- }>> & string;
17
- export declare const MenuButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").ButtonHTMLAttributes<HTMLButtonElement> & {
18
- ref?: import("react").RefObject<HTMLButtonElement>;
19
- children?: import("react").ReactNode | string;
20
- className?: string;
21
- loading?: boolean;
22
- leftSection?: import("react").ReactNode;
23
- rightSection?: import("react").ReactNode;
24
- href?: string | null;
25
- download?: string | null;
26
- fullWidth?: boolean;
27
- size?: import("../../../core").Size;
28
- variant?: import("../../../core").Variant;
29
- color?: import("../../../Button").ButtonColor;
30
- disabled?: boolean;
31
- selected?: boolean;
32
- justify?: "start" | "center" | "end";
33
- onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
34
- }, {
35
- $danger?: boolean;
36
- }>> & string & Omit<import("react").FC<import("../../../Button").ButtonProps>, keyof import("react").Component<any, {}, any>>;
37
- export declare const CornerRoot: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
38
- $top: number;
39
- $left: number;
40
- }>> & string;
@@ -1,167 +0,0 @@
1
- import styled from "styled-components";
2
- import { Button } from "../../../Button";
3
- import { getControlSizeTokens } from "../../../core";
4
- import FieldLabel from "../../../FieldLabel";
5
- import { Popover } from "../../../Popover";
6
- import { CORNER_BUTTON_SIZE, RAIL_THICKNESS } from "./TableTools.constants";
7
- export const TableToolsPanel = styled.div `
8
- display: flex;
9
- flex-direction: column;
10
- gap: 0.75rem;
11
- min-width: 250px;
12
- color: ${({ theme }) => theme.palette.text.primary};
13
- `;
14
- export const TableToolsSection = styled.div `
15
- display: flex;
16
- flex-direction: column;
17
- gap: 0.5rem;
18
- `;
19
- export const TableToolsSectionTitle = styled(FieldLabel) `
20
- color: ${({ theme }) => theme.palette.text.secondary};
21
- font-size: 0.6875rem;
22
- font-weight: 600;
23
- line-height: 1rem;
24
- text-transform: uppercase;
25
- `;
26
- export const InsertGrid = styled.div `
27
- display: grid;
28
- grid-template-columns: repeat(2, minmax(0, 1fr));
29
- gap: 0.5rem;
30
- `;
31
- export const Field = styled.label `
32
- display: flex;
33
- flex-direction: column;
34
- gap: 0.25rem;
35
- color: ${({ theme }) => theme.palette.text.secondary};
36
- font-size: 0.75rem;
37
- line-height: 1rem;
38
- `;
39
- export const SwitchRow = styled.div `
40
- display: flex;
41
- align-items: center;
42
- justify-content: space-between;
43
- gap: 0.75rem;
44
- color: ${({ theme }) => theme.palette.text.secondary};
45
- font-size: 0.75rem;
46
- line-height: 1rem;
47
- `;
48
- export const RailRoot = styled.div `
49
- display: flex;
50
- position: fixed;
51
- top: ${({ $rect }) => `${$rect.top}px`};
52
- left: ${({ $rect }) => `${$rect.left}px`};
53
- z-index: 1500;
54
- width: ${({ $rect }) => `${$rect.width}px`};
55
- height: ${({ $rect }) => `${$rect.height}px`};
56
-
57
- top: ${({ $rect, $kind }) => $kind === "column" ? `${$rect.top + 5}px` : `${$rect.top}px`};
58
-
59
- left: ${({ $rect, $kind }) => $kind === "row" ? `${$rect.left + 4}px` : `${$rect.left}px`};
60
-
61
- button {
62
- margin: auto;
63
- width: 100%;
64
- height: 100%;
65
-
66
- width: ${({ $kind }) => $kind === "column" ? "30px" : RAIL_THICKNESS + "px"};
67
-
68
- height: ${({ $kind }) => $kind === "row" ? "30px" : RAIL_THICKNESS + "px"};
69
-
70
- min-height: 0;
71
- padding: 0;
72
- border-radius: 10px;
73
- background-color: ${({ theme }) => theme.palette.background.paper};
74
- color: ${({ theme }) => theme.palette.text.secondary};
75
-
76
- &:hover {
77
- background-color: ${({ theme }) => theme.palette.primary.main};
78
- color: white;
79
- }
80
- }
81
- `;
82
- export const MenuPanel = styled.div `
83
- display: flex;
84
- flex-direction: column;
85
- min-width: 220px;
86
- color: ${({ theme }) => theme.palette.text.primary};
87
- `;
88
- export const MenuDropdown = styled(Popover.Dropdown) `
89
- min-width: 180px;
90
- border-radius: 5px;
91
- border: 1px solid ${({ theme }) => theme.palette.divider};
92
- background-color: ${({ theme }) => theme.palette.input.background};
93
- box-shadow: none;
94
- padding: 5px;
95
- `;
96
- export const MenuGroup = styled.div `
97
- display: flex;
98
- flex-direction: column;
99
- gap: 1px;
100
- padding-top: ${({ $withDivider }) => ($withDivider ? "5px" : 0)};
101
- margin-top: ${({ $withDivider }) => ($withDivider ? "5px" : 0)};
102
- border-top: ${({ $withDivider, theme }) => $withDivider ? `1px solid ${theme.palette.divider}` : 0};
103
- `;
104
- export const MenuButton = styled(Button) `
105
- min-width: 100%;
106
- height: ${getControlSizeTokens("sm").menuRowHeight}px;
107
- min-height: ${getControlSizeTokens("sm").menuRowHeight}px;
108
- padding: 0 ${getControlSizeTokens("sm").menuItemPaddingX}px;
109
- border: none;
110
- border-radius: 3px;
111
- color: ${({ $danger, theme }) => $danger ? theme.palette.error.main : theme.palette.text.primary};
112
- font-weight: normal;
113
- justify-content: flex-start;
114
- width: 100%;
115
-
116
- .button-label {
117
- display: inline-block;
118
- min-width: 0;
119
- width: 100%;
120
- overflow: hidden;
121
- text-align: left;
122
- text-overflow: ellipsis;
123
- white-space: nowrap;
124
- }
125
-
126
- [data-position="left"] {
127
- color: currentColor;
128
- opacity: 0.8;
129
- }
130
-
131
- &:hover {
132
- background-color: ${({ theme }) => theme.palette.action.hover};
133
- color: ${({ $danger, theme }) => $danger ? theme.palette.error.main : theme.palette.text.primary};
134
- }
135
-
136
- &:active {
137
- translate: none;
138
- }
139
-
140
- &:focus {
141
- text-decoration: none;
142
- }
143
- `;
144
- export const CornerRoot = styled.div `
145
- display: flex;
146
- position: fixed;
147
- top: ${({ $top }) => `${$top}px`};
148
- left: ${({ $left }) => `${$left}px`};
149
- z-index: 1500;
150
- width: ${CORNER_BUTTON_SIZE}px;
151
- height: ${CORNER_BUTTON_SIZE}px;
152
-
153
- button {
154
- width: 100%;
155
- height: 100%;
156
- min-height: 0;
157
- padding: 0;
158
- border-radius: 6px;
159
- background-color: ${({ theme }) => theme.palette.background.paper};
160
- color: ${({ theme }) => theme.palette.text.secondary};
161
-
162
- &:hover {
163
- background-color: ${({ theme }) => theme.palette.primary.main};
164
- color: white;
165
- }
166
- }
167
- `;
@@ -1,76 +0,0 @@
1
- import type { Node as ProseMirrorNode } from "@tiptap/pm/model";
2
- import type { TableMap } from "@tiptap/pm/tables";
3
- import type { Editor } from "@tiptap/react";
4
- import type { MouseEvent as ReactMouseEvent, ReactNode } from "react";
5
- export type TableInsertOptions = {
6
- rows: number;
7
- cols: number;
8
- withHeaderRow: boolean;
9
- };
10
- export type TableToolsContentProps = {
11
- editor: Editor | null;
12
- showInsert?: boolean;
13
- onInsert?: () => void;
14
- onAction?: () => void;
15
- };
16
- export type TableToolsPopoverProps = {
17
- editor: Editor | null;
18
- };
19
- export type TableRailsProps = {
20
- editor: Editor | null;
21
- };
22
- export type RailKind = "row" | "column";
23
- export type OpenMenuKind = RailKind | "table";
24
- export type Point = {
25
- x: number;
26
- y: number;
27
- };
28
- export type RailRect = {
29
- top: number;
30
- left: number;
31
- width: number;
32
- height: number;
33
- };
34
- export type TableContext = {
35
- node: ProseMirrorNode;
36
- pos: number;
37
- start: number;
38
- map: TableMap;
39
- };
40
- export type TableRailTarget = {
41
- kind: RailKind;
42
- rowIndex: number;
43
- colIndex: number;
44
- tableElement: HTMLTableElement;
45
- tableRect: RailRect;
46
- tableContext: TableContext;
47
- rowRect: RailRect;
48
- columnRect: RailRect;
49
- };
50
- export type RailTarget = TableRailTarget;
51
- export type TableToolAction = {
52
- label: string;
53
- leftSection: ReactNode;
54
- disabled?: boolean;
55
- danger?: boolean;
56
- onClick: () => void;
57
- };
58
- export type TableToolActionGroup = {
59
- label: string;
60
- actions: TableToolAction[];
61
- };
62
- export type RailAction = TableToolAction;
63
- export type RailActionGroup = TableToolActionGroup;
64
- export type TableCornerMenuProps = {
65
- editor: Editor | null;
66
- target: TableRailTarget;
67
- opened: boolean;
68
- onOpen: () => void;
69
- onClose: () => void;
70
- onAction: () => void;
71
- onMouseEnter: () => void;
72
- onMouseLeave: () => void;
73
- onMouseDown: (event: ReactMouseEvent<HTMLButtonElement>) => void;
74
- };
75
- export type TableAction = TableToolAction;
76
- export type TableActionGroup = TableToolActionGroup;
@@ -1,4 +0,0 @@
1
- export * from "./TableTools.commands";
2
- export * from "./TableTools.constants";
3
- export * from "./TableTools.geometry";
4
- export * from "./TableTools.selectors";
@@ -1,4 +0,0 @@
1
- export * from "./TableTools.commands";
2
- export * from "./TableTools.constants";
3
- export * from "./TableTools.geometry";
4
- export * from "./TableTools.selectors";
@@ -1,2 +0,0 @@
1
- import type { TableToolsPopoverProps } from "./TableTools.types";
2
- export declare const TableToolsPopover: ({ editor }: TableToolsPopoverProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,12 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Table2Icon } from "lucide-react";
3
- import { useState } from "react";
4
- import { Button } from "../../../Button";
5
- import { Popover } from "../../../Popover";
6
- import { hasTableExtension, isTableActive } from "./TableTools.selectors";
7
- import { TableToolsContent } from "./TableInsertControls";
8
- export const TableToolsPopover = ({ editor }) => {
9
- const [opened, setOpened] = useState(false);
10
- const selected = opened || isTableActive(editor);
11
- return (_jsxs(Popover, { opened: opened, onChange: setOpened, position: "bottom", width: 285, trapFocus: true, children: [_jsx(Popover.Target, { children: _jsx(Button, { size: "xs", variant: "outlined", title: "Table", "aria-label": "Table", selected: selected, disabled: !hasTableExtension(editor), style: { padding: "1px 6px" }, children: _jsx(Table2Icon, { size: 14 }) }) }), _jsx(Popover.Dropdown, { children: _jsx(TableToolsContent, { editor: editor, showInsert: true, onInsert: () => setOpened(false) }) })] }));
12
- };
@@ -1,3 +0,0 @@
1
- export * from "./TableTools";
2
- export { hasTableExtension, isTableActive } from "./TableTools.selectors";
3
- export type { OpenMenuKind, Point, RailAction, RailActionGroup, RailKind, RailRect, RailTarget, TableAction, TableActionGroup, TableContext, TableCornerMenuProps, TableInsertOptions, TableRailTarget, TableRailsProps, TableToolAction, TableToolActionGroup, TableToolsContentProps, TableToolsPopoverProps, } from "./TableTools.types";
@@ -1,2 +0,0 @@
1
- export * from "./TableTools";
2
- export { hasTableExtension, isTableActive } from "./TableTools.selectors";
@@ -1,9 +0,0 @@
1
- declare enum HighlightColors {
2
- Yellow = "rgba(250, 204, 21, 0.38)",
3
- Green = "rgba(34, 197, 94, 0.34)",
4
- Blue = "rgba(59, 130, 246, 0.34)",
5
- Pink = "rgba(236, 72, 153, 0.32)",
6
- Purple = "rgba(168, 85, 247, 0.34)",
7
- Orange = "rgba(249, 115, 22, 0.34)"
8
- }
9
- export default HighlightColors;
@@ -1,10 +0,0 @@
1
- var HighlightColors;
2
- (function (HighlightColors) {
3
- HighlightColors["Yellow"] = "rgba(250, 204, 21, 0.38)";
4
- HighlightColors["Green"] = "rgba(34, 197, 94, 0.34)";
5
- HighlightColors["Blue"] = "rgba(59, 130, 246, 0.34)";
6
- HighlightColors["Pink"] = "rgba(236, 72, 153, 0.32)";
7
- HighlightColors["Purple"] = "rgba(168, 85, 247, 0.34)";
8
- HighlightColors["Orange"] = "rgba(249, 115, 22, 0.34)";
9
- })(HighlightColors || (HighlightColors = {}));
10
- export default HighlightColors;
@@ -1,3 +0,0 @@
1
- import { Editor } from "@tiptap/core";
2
- import { Plugin } from "@tiptap/pm/state";
3
- export declare const ImageActionsPlugin: (editor: Editor) => Plugin<any>;