react-science 19.10.4 → 20.0.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.
- package/lib/components/accordion/accordion.d.ts +2 -2
- package/lib/components/accordion/accordion.d.ts.map +1 -1
- package/lib/components/accordion/accordion_context_provider.d.ts +1 -1
- package/lib/components/accordion/accordion_context_provider.d.ts.map +1 -1
- package/lib/components/activity_bar/activity_bar.d.ts +2 -2
- package/lib/components/activity_bar/activity_bar.d.ts.map +1 -1
- package/lib/components/activity_bar/activity_bar.js +5 -1
- package/lib/components/activity_bar/activity_bar.js.map +1 -1
- package/lib/components/activity_panel/activity_panel.d.ts +2 -2
- package/lib/components/activity_panel/activity_panel.d.ts.map +1 -1
- package/lib/components/button/Button.d.ts +1 -1
- package/lib/components/button/Button.d.ts.map +1 -1
- package/lib/components/button/Button.js +30 -22
- package/lib/components/button/Button.js.map +1 -1
- package/lib/components/color-picker/color-picker-dropdown/ColorPickerDropdown.d.ts +3 -3
- package/lib/components/color-picker/color-picker-dropdown/ColorPickerDropdown.d.ts.map +1 -1
- package/lib/components/color-picker/color-picker-dropdown/ColorPickerDropdown.js +2 -2
- package/lib/components/color-picker/color-picker-dropdown/ColorPickerDropdown.js.map +1 -1
- package/lib/components/color-picker/gradient_select/gradient_select.d.ts +1 -1
- package/lib/components/color-picker/gradient_select/gradient_select.d.ts.map +1 -1
- package/lib/components/color-picker/gradient_select/gradient_select.js +1 -1
- package/lib/components/color-picker/gradient_select/gradient_select.js.map +1 -1
- package/lib/components/color-picker/preview/ColorPreview.d.ts +1 -1
- package/lib/components/color-picker/preview/ColorPreview.d.ts.map +1 -1
- package/lib/components/color-picker/preview/FixedColorPreview.d.ts +1 -1
- package/lib/components/color-picker/preview/FixedColorPreview.d.ts.map +1 -1
- package/lib/components/color-picker/preview/FixedGradientPreview.d.ts +1 -1
- package/lib/components/color-picker/preview/FixedGradientPreview.d.ts.map +1 -1
- package/lib/components/color-picker/react-color/ColorPicker.d.ts +1 -1
- package/lib/components/color-picker/react-color/ColorPicker.d.ts.map +1 -1
- package/lib/components/color-picker/react-color/ColorPicker.js +2 -2
- package/lib/components/color-picker/react-color/ColorPicker.js.map +1 -1
- package/lib/components/color-picker/react-color/common/Alpha.d.ts +1 -1
- package/lib/components/color-picker/react-color/common/Alpha.d.ts.map +1 -1
- package/lib/components/color-picker/react-color/common/CheckBoard.d.ts +1 -1
- package/lib/components/color-picker/react-color/common/CheckBoard.d.ts.map +1 -1
- package/lib/components/color-picker/react-color/common/EditableInput.d.ts +1 -1
- package/lib/components/color-picker/react-color/common/EditableInput.d.ts.map +1 -1
- package/lib/components/color-picker/react-color/common/EditableInput.js +2 -3
- package/lib/components/color-picker/react-color/common/EditableInput.js.map +1 -1
- package/lib/components/color-picker/react-color/common/Hue.d.ts +1 -1
- package/lib/components/color-picker/react-color/common/Hue.d.ts.map +1 -1
- package/lib/components/color-picker/react-color/common/Hue.js +7 -7
- package/lib/components/color-picker/react-color/common/Hue.js.map +1 -1
- package/lib/components/color-picker/react-color/common/Saturation.d.ts +1 -1
- package/lib/components/color-picker/react-color/common/Saturation.d.ts.map +1 -1
- package/lib/components/color-picker/react-color/sketch/SketchFields.d.ts +2 -2
- package/lib/components/color-picker/react-color/sketch/SketchFields.d.ts.map +1 -1
- package/lib/components/color-picker/react-color/sketch/SketchPresetColors.d.ts +1 -1
- package/lib/components/color-picker/react-color/sketch/SketchPresetColors.d.ts.map +1 -1
- package/lib/components/dialog/ConfirmDialog.d.ts +1 -1
- package/lib/components/dialog/ConfirmDialog.d.ts.map +1 -1
- package/lib/components/doi/doi.d.ts +1 -1
- package/lib/components/doi/doi.d.ts.map +1 -1
- package/lib/components/doi/doi_logo.d.ts +1 -1
- package/lib/components/doi/doi_logo.d.ts.map +1 -1
- package/lib/components/drop-zone/DropZone.d.ts +2 -2
- package/lib/components/drop-zone/DropZone.d.ts.map +1 -1
- package/lib/components/form/components/input/checkbox.d.ts +1 -1
- package/lib/components/form/components/input/checkbox.d.ts.map +1 -1
- package/lib/components/form/components/input/color_picker.d.ts +1 -1
- package/lib/components/form/components/input/color_picker.d.ts.map +1 -1
- package/lib/components/form/components/input/input.d.ts +1 -1
- package/lib/components/form/components/input/input.d.ts.map +1 -1
- package/lib/components/form/components/input/numeric_input.d.ts +1 -1
- package/lib/components/form/components/input/numeric_input.d.ts.map +1 -1
- package/lib/components/form/components/input/radio_group.d.ts +1 -1
- package/lib/components/form/components/input/radio_group.d.ts.map +1 -1
- package/lib/components/form/components/input/radio_group.js.map +1 -1
- package/lib/components/form/components/input/reset_button.d.ts +1 -1
- package/lib/components/form/components/input/reset_button.d.ts.map +1 -1
- package/lib/components/form/components/input/select.d.ts +1 -1
- package/lib/components/form/components/input/select.d.ts.map +1 -1
- package/lib/components/form/components/input/submit_button.d.ts +1 -1
- package/lib/components/form/components/input/submit_button.d.ts.map +1 -1
- package/lib/components/form/components/input/switch.d.ts +1 -1
- package/lib/components/form/components/input/switch.d.ts.map +1 -1
- package/lib/components/form/components/input_groups/form.d.ts +1 -1
- package/lib/components/form/components/input_groups/form.d.ts.map +1 -1
- package/lib/components/form/components/input_groups/form_group.d.ts +1 -1
- package/lib/components/form/components/input_groups/form_group.d.ts.map +1 -1
- package/lib/components/form/components/layout/Section.d.ts +1 -1
- package/lib/components/form/components/layout/Section.d.ts.map +1 -1
- package/lib/components/fullscreen/fullscreen_context.provider.d.ts +3 -3
- package/lib/components/fullscreen/fullscreen_context.provider.d.ts.map +1 -1
- package/lib/components/fullscreen/fullscreen_toolbar_button.d.ts +1 -1
- package/lib/components/fullscreen/fullscreen_toolbar_button.d.ts.map +1 -1
- package/lib/components/header/Header.d.ts +1 -1
- package/lib/components/header/Header.d.ts.map +1 -1
- package/lib/components/header/PanelHeader.d.ts +1 -1
- package/lib/components/header/PanelHeader.d.ts.map +1 -1
- package/lib/components/icon.d.ts +1 -1
- package/lib/components/icon.d.ts.map +1 -1
- package/lib/components/info-panel/InfoPanel.d.ts +1 -1
- package/lib/components/info-panel/InfoPanel.d.ts.map +1 -1
- package/lib/components/info-panel/InfoPanel.js +13 -10
- package/lib/components/info-panel/InfoPanel.js.map +1 -1
- package/lib/components/inline_editable_renderer/inline_editable_renderer.d.ts +1 -1
- package/lib/components/inline_editable_renderer/inline_editable_renderer.d.ts.map +1 -1
- package/lib/components/input/radio-button-group/RadioButton.d.ts +1 -1
- package/lib/components/input/radio-button-group/RadioButton.d.ts.map +1 -1
- package/lib/components/input/radio-button-group/RadioButtonGroup.d.ts +1 -1
- package/lib/components/input/radio-button-group/RadioButtonGroup.d.ts.map +1 -1
- package/lib/components/input/radio-button-group/RadioButtonGroup.js +5 -4
- package/lib/components/input/radio-button-group/RadioButtonGroup.js.map +1 -1
- package/lib/components/input/utils/SubText.d.ts +1 -1
- package/lib/components/input/utils/SubText.d.ts.map +1 -1
- package/lib/components/logger/FifoLoggerDialog.d.ts +1 -1
- package/lib/components/logger/FifoLoggerDialog.d.ts.map +1 -1
- package/lib/components/logger/FifoLoggerProvider.d.ts +1 -1
- package/lib/components/logger/FifoLoggerProvider.d.ts.map +1 -1
- package/lib/components/logger/FifoLoggerToolbarItem.d.ts +1 -1
- package/lib/components/logger/FifoLoggerToolbarItem.d.ts.map +1 -1
- package/lib/components/root-layout/root_layout.d.ts +1 -1
- package/lib/components/root-layout/root_layout.d.ts.map +1 -1
- package/lib/components/root-layout/root_layout.js +1 -2
- package/lib/components/root-layout/root_layout.js.map +1 -1
- package/lib/components/root-layout/root_layout_context.provider.d.ts +1 -1
- package/lib/components/root-layout/root_layout_context.provider.d.ts.map +1 -1
- package/lib/components/selected-total/SelectedTotal.d.ts +1 -1
- package/lib/components/selected-total/SelectedTotal.d.ts.map +1 -1
- package/lib/components/split_pane/split_pane.d.ts +1 -1
- package/lib/components/split_pane/split_pane.d.ts.map +1 -1
- package/lib/components/split_pane/use_split_pane_size.d.ts +1 -1
- package/lib/components/split_pane/use_split_pane_size.d.ts.map +1 -1
- package/lib/components/svg/styled/svg_styled_line.d.ts +1 -1
- package/lib/components/svg/styled/svg_styled_line.d.ts.map +1 -1
- package/lib/components/svg/styled/svg_styled_path.d.ts +1 -1
- package/lib/components/svg/styled/svg_styled_path.d.ts.map +1 -1
- package/lib/components/svg/styled/svg_styled_text.d.ts +1 -1
- package/lib/components/svg/styled/svg_styled_text.d.ts.map +1 -1
- package/lib/components/table/default_table_cell.d.ts +1 -1
- package/lib/components/table/default_table_cell.d.ts.map +1 -1
- package/lib/components/table/flash_row/flashed_row_provider.d.ts +1 -1
- package/lib/components/table/flash_row/flashed_row_provider.d.ts.map +1 -1
- package/lib/components/table/flash_row/use_flash_row_effect.d.ts +1 -1
- package/lib/components/table/flash_row/use_flash_row_effect.d.ts.map +1 -1
- package/lib/components/table/flash_row/use_flash_row_effect.js.map +1 -1
- package/lib/components/table/preview_table.d.ts +1 -1
- package/lib/components/table/preview_table.d.ts.map +1 -1
- package/lib/components/table/reorder_rows/draggable_row_context.d.ts +1 -1
- package/lib/components/table/reorder_rows/draggable_row_context.d.ts.map +1 -1
- package/lib/components/table/reorder_rows/draggable_row_tr.d.ts +1 -1
- package/lib/components/table/reorder_rows/draggable_row_tr.d.ts.map +1 -1
- package/lib/components/table/reorder_rows/draggable_row_tr.js.map +1 -1
- package/lib/components/table/reorder_rows/item_data.d.ts +1 -1
- package/lib/components/table/reorder_rows/item_data.d.ts.map +1 -1
- package/lib/components/table/reorder_rows/item_data.js.map +1 -1
- package/lib/components/table/reorder_rows/item_order_provider.d.ts +1 -1
- package/lib/components/table/reorder_rows/item_order_provider.d.ts.map +1 -1
- package/lib/components/table/reorder_rows/item_order_provider.js +10 -5
- package/lib/components/table/reorder_rows/item_order_provider.js.map +1 -1
- package/lib/components/table/reorder_rows/table_drag_row_handler.d.ts +1 -1
- package/lib/components/table/reorder_rows/table_drag_row_handler.d.ts.map +1 -1
- package/lib/components/table/reorder_rows/use_drop_monitor.d.ts +1 -1
- package/lib/components/table/reorder_rows/use_drop_monitor.d.ts.map +1 -1
- package/lib/components/table/reorder_rows/use_drop_monitor.js.map +1 -1
- package/lib/components/table/table_body.d.ts +1 -1
- package/lib/components/table/table_body.d.ts.map +1 -1
- package/lib/components/table/table_body.js +1 -1
- package/lib/components/table/table_body.js.map +1 -1
- package/lib/components/table/table_header.d.ts +1 -1
- package/lib/components/table/table_header.d.ts.map +1 -1
- package/lib/components/table/table_header_cell.d.ts +1 -1
- package/lib/components/table/table_header_cell.d.ts.map +1 -1
- package/lib/components/table/table_root.d.ts +2 -2
- package/lib/components/table/table_root.d.ts.map +1 -1
- package/lib/components/table/table_root.js +4 -1
- package/lib/components/table/table_root.js.map +1 -1
- package/lib/components/table/table_row.d.ts +3 -3
- package/lib/components/table/table_row.d.ts.map +1 -1
- package/lib/components/table/table_row.js.map +1 -1
- package/lib/components/table/table_row_cell.d.ts +1 -1
- package/lib/components/table/table_row_cell.d.ts.map +1 -1
- package/lib/components/table/table_scroll_container.d.ts +2 -2
- package/lib/components/table/table_scroll_container.d.ts.map +1 -1
- package/lib/components/table/use_table_scroll.d.ts +1 -1
- package/lib/components/table/use_table_scroll.d.ts.map +1 -1
- package/lib/components/table/use_table_scroll.js +0 -1
- package/lib/components/table/use_table_scroll.js.map +1 -1
- package/lib/components/toolbar/OverflowButton.d.ts +3 -3
- package/lib/components/toolbar/OverflowButton.d.ts.map +1 -1
- package/lib/components/toolbar/OverflowButton.js +2 -4
- package/lib/components/toolbar/OverflowButton.js.map +1 -1
- package/lib/components/toolbar/PanelPreferencesToolbar.d.ts +1 -1
- package/lib/components/toolbar/PanelPreferencesToolbar.d.ts.map +1 -1
- package/lib/components/toolbar/Toolbar.d.ts +10 -303
- package/lib/components/toolbar/Toolbar.d.ts.map +1 -1
- package/lib/components/toolbar/Toolbar.js +16 -16
- package/lib/components/toolbar/Toolbar.js.map +1 -1
- package/lib/components/toolbar/TooltipHelpContent.d.ts +1 -1
- package/lib/components/toolbar/TooltipHelpContent.d.ts.map +1 -1
- package/lib/components/toolbar/TooltipHelpContent.js +1 -3
- package/lib/components/toolbar/TooltipHelpContent.js.map +1 -1
- package/lib/components/toolbar/useCheckOverflow.d.ts +2 -1
- package/lib/components/toolbar/useCheckOverflow.d.ts.map +1 -1
- package/lib/components/toolbar/useCheckOverflow.js.map +1 -1
- package/lib/components/utils/index.d.ts +1 -0
- package/lib/components/utils/index.d.ts.map +1 -1
- package/lib/components/utils/index.js +1 -0
- package/lib/components/utils/index.js.map +1 -1
- package/lib/components/utils/svg.d.ts +42 -0
- package/lib/components/utils/svg.d.ts.map +1 -0
- package/lib/components/utils/svg.js +60 -0
- package/lib/components/utils/svg.js.map +1 -0
- package/lib/components/value-renderers/Boolean.d.ts +1 -1
- package/lib/components/value-renderers/Boolean.d.ts.map +1 -1
- package/lib/components/value-renderers/Color.d.ts +1 -1
- package/lib/components/value-renderers/Color.d.ts.map +1 -1
- package/lib/components/value-renderers/Component.d.ts +1 -1
- package/lib/components/value-renderers/Component.d.ts.map +1 -1
- package/lib/components/value-renderers/Number.d.ts +1 -1
- package/lib/components/value-renderers/Number.d.ts.map +1 -1
- package/lib/components/value-renderers/ObjectRenderer.d.ts +1 -1
- package/lib/components/value-renderers/ObjectRenderer.d.ts.map +1 -1
- package/lib/components/value-renderers/Text.d.ts +1 -1
- package/lib/components/value-renderers/Text.d.ts.map +1 -1
- package/lib/components/value-renderers/Title.d.ts +1 -1
- package/lib/components/value-renderers/Title.d.ts.map +1 -1
- package/package.json +58 -61
- package/src/components/activity_bar/activity_bar.tsx +5 -1
- package/src/components/button/Button.tsx +39 -42
- package/src/components/color-picker/color-picker-dropdown/ColorPickerDropdown.tsx +8 -6
- package/src/components/color-picker/gradient_select/gradient_select.tsx +1 -1
- package/src/components/color-picker/react-color/ColorPicker.tsx +8 -4
- package/src/components/color-picker/react-color/common/EditableInput.tsx +2 -4
- package/src/components/color-picker/react-color/common/Hue.tsx +16 -9
- package/src/components/color-picker/react-color/sketch/SketchFields.tsx +1 -1
- package/src/components/form/components/input/radio_group.tsx +2 -2
- package/src/components/fullscreen/fullscreen_context.provider.tsx +2 -2
- package/src/components/info-panel/InfoPanel.tsx +13 -12
- package/src/components/input/radio-button-group/RadioButtonGroup.tsx +9 -4
- package/src/components/root-layout/root_layout.tsx +2 -4
- package/src/components/split_pane/split_pane.tsx +1 -1
- package/src/components/split_pane/use_split_pane_size.tsx +1 -1
- package/src/components/table/flash_row/use_flash_row_effect.ts +1 -1
- package/src/components/table/reorder_rows/draggable_row_context.ts +1 -1
- package/src/components/table/reorder_rows/draggable_row_tr.tsx +1 -1
- package/src/components/table/reorder_rows/item_data.ts +4 -1
- package/src/components/table/reorder_rows/item_order_provider.tsx +8 -6
- package/src/components/table/reorder_rows/use_drop_monitor.ts +1 -1
- package/src/components/table/table_body.tsx +4 -2
- package/src/components/table/table_root.tsx +3 -1
- package/src/components/table/table_row.tsx +3 -3
- package/src/components/table/table_scroll_container.tsx +3 -3
- package/src/components/table/use_table_scroll.ts +1 -2
- package/src/components/toolbar/OverflowButton.tsx +9 -10
- package/src/components/toolbar/Toolbar.tsx +48 -31
- package/src/components/toolbar/useCheckOverflow.tsx +2 -1
- package/src/components/utils/index.ts +1 -0
- package/src/components/utils/svg.ts +120 -0
|
@@ -7,5 +7,5 @@ export interface TooltipItem {
|
|
|
7
7
|
link?: string;
|
|
8
8
|
style?: CSSProperties;
|
|
9
9
|
}
|
|
10
|
-
export declare function TooltipHelpContent(props: TooltipItem): import("react
|
|
10
|
+
export declare function TooltipHelpContent(props: TooltipItem): import("react").JSX.Element;
|
|
11
11
|
//# sourceMappingURL=TooltipHelpContent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TooltipHelpContent.d.ts","sourceRoot":"","sources":["../../../src/components/toolbar/TooltipHelpContent.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAyE3C,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,SAAS,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,WAAW,EAAE,OAAO,GAAG,WAAW,CAAC,CAAC,CAAC;IAC5D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,WAAW
|
|
1
|
+
{"version":3,"file":"TooltipHelpContent.d.ts","sourceRoot":"","sources":["../../../src/components/toolbar/TooltipHelpContent.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAyE3C,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,SAAS,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,WAAW,EAAE,OAAO,GAAG,WAAW,CAAC,CAAC,CAAC;IAC5D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,WAAW,+BA0CpD"}
|
|
@@ -76,9 +76,7 @@ function ShortCuts({ shortcuts }) {
|
|
|
76
76
|
display: 'flex',
|
|
77
77
|
textWrap: 'nowrap',
|
|
78
78
|
}, children: shortcuts.map((shortcut, index) => {
|
|
79
|
-
return (
|
|
80
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
81
|
-
_jsx(ShortcutItem, { children: _jsx("span", { children: shortcut }) }, `${index}`));
|
|
79
|
+
return (_jsx(ShortcutItem, { children: _jsx("span", { children: shortcut }) }, `${index}`));
|
|
82
80
|
}) }));
|
|
83
81
|
}
|
|
84
82
|
function SubTitles({ items }) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TooltipHelpContent.js","sourceRoot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,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CACxC,KAAC,YAAY,cACX,MAAC,aAAa,eACZ,KAAC,KAAK,IAAC,IAAI,EAAC,QAAQ,YAAE,KAAK,GAAS,EACpC,KAAC,SAAS,IAAC,SAAS,EAAE,SAAS,GAAI,IACrB,IAJC,KAAK,CAKT,CAChB,CAAC,GACC,CACN,CAAC;AACJ,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import type { RefObject } from 'react';
|
|
1
2
|
import type { Overflow } from './Toolbar.tsx';
|
|
2
3
|
interface UseCheckOverflowOptions {
|
|
3
|
-
containerRef:
|
|
4
|
+
containerRef: RefObject<HTMLDivElement | null>;
|
|
4
5
|
vertical: boolean;
|
|
5
6
|
overflow: Overflow;
|
|
6
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCheckOverflow.d.ts","sourceRoot":"","sources":["../../../src/components/toolbar/useCheckOverflow.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useCheckOverflow.d.ts","sourceRoot":"","sources":["../../../src/components/toolbar/useCheckOverflow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE9C,UAAU,uBAAuB;IAC/B,YAAY,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAC/C,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,uBAAuB,WA2BhE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCheckOverflow.js","sourceRoot":"","sources":["../../../src/components/toolbar/useCheckOverflow.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useCheckOverflow.js","sourceRoot":"","sources":["../../../src/components/toolbar/useCheckOverflow.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAUlD,MAAM,UAAU,gBAAgB,CAAC,OAAgC;IAC/D,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC;IACrD,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACpD,eAAe,CAAC,GAAG,EAAE;QACnB,IAAI,QAAQ,KAAK,UAAU;YAAE,OAAO;QAEpC,MAAM,SAAS,GAAG,YAAY,CAAC,OAAO,CAAC;QAEvC,IAAI,CAAC,SAAS;YAAE,OAAO;QAEvB,MAAM,aAAa,GAAG,GAAG,EAAE;YACzB,IAAI,UAAU,GAAG,KAAK,CAAC;YACvB,IAAI,QAAQ,EAAE,CAAC;gBACb,UAAU,GAAG,SAAS,CAAC,YAAY,GAAG,SAAS,CAAC,YAAY,CAAC;YAC/D,CAAC;iBAAM,CAAC;gBACN,UAAU,GAAG,SAAS,CAAC,WAAW,GAAG,SAAS,CAAC,WAAW,CAAC;YAC7D,CAAC;YACD,aAAa,CAAC,UAAU,CAAC,CAAC;QAC5B,CAAC,CAAC;QAEF,aAAa,EAAE,CAAC;QAEhB,MAAM,QAAQ,GAAG,IAAI,cAAc,CAAC,aAAa,CAAC,CAAC;QACnD,QAAQ,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QAC5B,OAAO,GAAG,EAAE,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC;IACrC,CAAC,EAAE,CAAC,YAAY,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC;IACvC,OAAO,UAAU,CAAC;AACpB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export interface ExportSVGOptions {
|
|
2
|
+
/**
|
|
3
|
+
* CSS Selector to remove from the SVG.
|
|
4
|
+
*
|
|
5
|
+
* @example '[data-no-export="true"]' And add `data-no-export="true"` attribute to the elements you don't want in the exported SVG.
|
|
6
|
+
* @default undefined (Will not remove any elements)
|
|
7
|
+
*/
|
|
8
|
+
removeFromSelector?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Add a background to the SVG. It can be useful to integrate exported svg in diapositive documents.
|
|
11
|
+
*
|
|
12
|
+
* @default false
|
|
13
|
+
*/
|
|
14
|
+
addBackground?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Background color of the SVG. You can use any valid CSS color.
|
|
17
|
+
*
|
|
18
|
+
* @default 'white' (It needs `addBackground: true` to work)
|
|
19
|
+
*/
|
|
20
|
+
backgroundColor?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Custom mutations to apply to the SVG.
|
|
23
|
+
*/
|
|
24
|
+
customMutations?: (svg: SVGSVGElement) => void;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Export an SVG element to a string.
|
|
28
|
+
*
|
|
29
|
+
* @param base
|
|
30
|
+
* @param options
|
|
31
|
+
*
|
|
32
|
+
* @return The outerHTML of the SVG element.
|
|
33
|
+
*/
|
|
34
|
+
export declare function exportSVG(base: SVGSVGElement, options?: ExportSVGOptions): string;
|
|
35
|
+
/**
|
|
36
|
+
* Export an SVG element to a PNG blob.
|
|
37
|
+
*
|
|
38
|
+
* @param base
|
|
39
|
+
* @param options
|
|
40
|
+
*/
|
|
41
|
+
export declare function exportSVGAsPNG(base: SVGSVGElement, options?: ExportSVGOptions): Promise<Blob>;
|
|
42
|
+
//# sourceMappingURL=svg.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"svg.d.ts","sourceRoot":"","sources":["../../../src/components/utils/svg.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,gBAAgB;IAC/B;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,eAAe,CAAC,EAAE,CAAC,GAAG,EAAE,aAAa,KAAK,IAAI,CAAC;CAChD;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CACvB,IAAI,EAAE,aAAa,EACnB,OAAO,GAAE,gBAAqB,GAC7B,MAAM,CAkCR;AAED;;;;;GAKG;AACH,wBAAsB,cAAc,CAClC,IAAI,EAAE,aAAa,EACnB,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,IAAI,CAAC,CAgCf"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { assert } from "./assert.js";
|
|
2
|
+
/**
|
|
3
|
+
* Export an SVG element to a string.
|
|
4
|
+
*
|
|
5
|
+
* @param base
|
|
6
|
+
* @param options
|
|
7
|
+
*
|
|
8
|
+
* @return The outerHTML of the SVG element.
|
|
9
|
+
*/
|
|
10
|
+
export function exportSVG(base, options = {}) {
|
|
11
|
+
const { removeFromSelector, addBackground = false, backgroundColor = 'white', customMutations, } = options;
|
|
12
|
+
const svg = base.cloneNode(true);
|
|
13
|
+
// cleanup svg
|
|
14
|
+
if (removeFromSelector) {
|
|
15
|
+
const items = svg.querySelectorAll(removeFromSelector);
|
|
16
|
+
for (const item of items) {
|
|
17
|
+
item.remove();
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
if (addBackground) {
|
|
21
|
+
const background = document.createElementNS('http://www.w3.org/2000/svg', 'rect');
|
|
22
|
+
background.setAttribute('x', '0');
|
|
23
|
+
background.setAttribute('y', '0');
|
|
24
|
+
background.setAttribute('width', '100%');
|
|
25
|
+
background.setAttribute('height', '100%');
|
|
26
|
+
background.setAttribute('fill', backgroundColor);
|
|
27
|
+
svg.prepend(background);
|
|
28
|
+
}
|
|
29
|
+
customMutations?.(svg);
|
|
30
|
+
return svg.outerHTML;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Export an SVG element to a PNG blob.
|
|
34
|
+
*
|
|
35
|
+
* @param base
|
|
36
|
+
* @param options
|
|
37
|
+
*/
|
|
38
|
+
export async function exportSVGAsPNG(base, options = {}) {
|
|
39
|
+
const { removeFromSelector, addBackground = false, backgroundColor = 'white', customMutations, } = options;
|
|
40
|
+
const svg = exportSVG(base, {
|
|
41
|
+
removeFromSelector,
|
|
42
|
+
addBackground: false,
|
|
43
|
+
customMutations,
|
|
44
|
+
});
|
|
45
|
+
const svgBlob = new Blob([svg], { type: 'image/svg+xml' });
|
|
46
|
+
const img = new Image();
|
|
47
|
+
img.src = URL.createObjectURL(svgBlob);
|
|
48
|
+
await img.decode().finally(() => URL.revokeObjectURL(img.src));
|
|
49
|
+
const canvas = new OffscreenCanvas(img.naturalWidth, img.naturalHeight);
|
|
50
|
+
const ctx = canvas.getContext('2d');
|
|
51
|
+
assert(ctx);
|
|
52
|
+
if (addBackground) {
|
|
53
|
+
ctx.fillStyle = backgroundColor;
|
|
54
|
+
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
|
55
|
+
}
|
|
56
|
+
ctx.drawImage(img, 0, 0);
|
|
57
|
+
const png = await canvas.convertToBlob({ type: 'image/png' });
|
|
58
|
+
return png;
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=svg.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"svg.js","sourceRoot":"","sources":["../../../src/components/utils/svg.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AA+BrC;;;;;;;GAOG;AACH,MAAM,UAAU,SAAS,CACvB,IAAmB,EACnB,UAA4B,EAAE;IAE9B,MAAM,EACJ,kBAAkB,EAClB,aAAa,GAAG,KAAK,EACrB,eAAe,GAAG,OAAO,EACzB,eAAe,GAChB,GAAG,OAAO,CAAC;IAEZ,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAkB,CAAC;IAElD,cAAc;IACd,IAAI,kBAAkB,EAAE,CAAC;QACvB,MAAM,KAAK,GAAG,GAAG,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,CAAC;QACvD,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,IAAI,CAAC,MAAM,EAAE,CAAC;QAChB,CAAC;IACH,CAAC;IAED,IAAI,aAAa,EAAE,CAAC;QAClB,MAAM,UAAU,GAAG,QAAQ,CAAC,eAAe,CACzC,4BAA4B,EAC5B,MAAM,CACP,CAAC;QACF,UAAU,CAAC,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QAClC,UAAU,CAAC,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QAClC,UAAU,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QACzC,UAA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AAQ,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;IAClD,CAAC;IAED,GAAG,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAEzB,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,CAAC;IAC9D,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -2,6 +2,6 @@ import type { ValueRenderersProps } from './index.js';
|
|
|
2
2
|
interface BooleanProps extends ValueRenderersProps {
|
|
3
3
|
value?: boolean;
|
|
4
4
|
}
|
|
5
|
-
export declare function Boolean({ value, ...other }: BooleanProps): import("react
|
|
5
|
+
export declare function Boolean({ value, ...other }: BooleanProps): import("react").JSX.Element;
|
|
6
6
|
export {};
|
|
7
7
|
//# sourceMappingURL=Boolean.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Boolean.d.ts","sourceRoot":"","sources":["../../../src/components/value-renderers/Boolean.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,UAAU,YAAa,SAAQ,mBAAmB;IAChD,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,wBAAgB,OAAO,CAAC,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,YAAY
|
|
1
|
+
{"version":3,"file":"Boolean.d.ts","sourceRoot":"","sources":["../../../src/components/value-renderers/Boolean.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,UAAU,YAAa,SAAQ,mBAAmB;IAChD,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,wBAAgB,OAAO,CAAC,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,YAAY,+BAExD"}
|
|
@@ -2,6 +2,6 @@ import type { ValueRenderersProps } from './index.js';
|
|
|
2
2
|
interface ColorProps extends ValueRenderersProps {
|
|
3
3
|
value?: string;
|
|
4
4
|
}
|
|
5
|
-
export declare function Color({ value, style, onClick }: ColorProps): import("react
|
|
5
|
+
export declare function Color({ value, style, onClick }: ColorProps): import("react").JSX.Element;
|
|
6
6
|
export {};
|
|
7
7
|
//# sourceMappingURL=Color.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Color.d.ts","sourceRoot":"","sources":["../../../src/components/value-renderers/Color.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,UAAU,UAAW,SAAQ,mBAAmB;IAC9C,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAOD,wBAAgB,KAAK,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,UAAU
|
|
1
|
+
{"version":3,"file":"Color.d.ts","sourceRoot":"","sources":["../../../src/components/value-renderers/Color.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,UAAU,UAAW,SAAQ,mBAAmB;IAC9C,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAOD,wBAAgB,KAAK,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,UAAU,+BAU1D"}
|
|
@@ -3,6 +3,6 @@ import type { ValueRenderersProps } from './index.js';
|
|
|
3
3
|
interface ComponentProps extends ValueRenderersProps {
|
|
4
4
|
children?: ReactElement | ReactElement[];
|
|
5
5
|
}
|
|
6
|
-
export declare function Component({ children, ...other }: ComponentProps): import("react
|
|
6
|
+
export declare function Component({ children, ...other }: ComponentProps): import("react").JSX.Element;
|
|
7
7
|
export {};
|
|
8
8
|
//# sourceMappingURL=Component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Component.d.ts","sourceRoot":"","sources":["../../../src/components/value-renderers/Component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,UAAU,cAAe,SAAQ,mBAAmB;IAClD,QAAQ,CAAC,EAAE,YAAY,GAAG,YAAY,EAAE,CAAC;CAC1C;AAED,wBAAgB,SAAS,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc
|
|
1
|
+
{"version":3,"file":"Component.d.ts","sourceRoot":"","sources":["../../../src/components/value-renderers/Component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,UAAU,cAAe,SAAQ,mBAAmB;IAClD,QAAQ,CAAC,EAAE,YAAY,GAAG,YAAY,EAAE,CAAC;CAC1C;AAED,wBAAgB,SAAS,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,+BAE/D"}
|
|
@@ -3,6 +3,6 @@ interface NumberProps extends ValueRenderersProps {
|
|
|
3
3
|
value?: number;
|
|
4
4
|
fixed?: number;
|
|
5
5
|
}
|
|
6
|
-
export declare function Number({ value, fixed, ...other }: NumberProps): import("react
|
|
6
|
+
export declare function Number({ value, fixed, ...other }: NumberProps): import("react").JSX.Element;
|
|
7
7
|
export {};
|
|
8
8
|
//# sourceMappingURL=Number.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Number.d.ts","sourceRoot":"","sources":["../../../src/components/value-renderers/Number.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,UAAU,WAAY,SAAQ,mBAAmB;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,MAAM,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,WAAW
|
|
1
|
+
{"version":3,"file":"Number.d.ts","sourceRoot":"","sources":["../../../src/components/value-renderers/Number.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,UAAU,WAAY,SAAQ,mBAAmB;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,MAAM,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,WAAW,+BAM7D"}
|
|
@@ -2,6 +2,6 @@ import type { ValueRenderersProps } from './index.js';
|
|
|
2
2
|
interface ObjectRendererProps extends ValueRenderersProps {
|
|
3
3
|
value?: object;
|
|
4
4
|
}
|
|
5
|
-
export declare function ObjectRenderer({ value, ...other }: ObjectRendererProps): import("react
|
|
5
|
+
export declare function ObjectRenderer({ value, ...other }: ObjectRendererProps): import("react").JSX.Element;
|
|
6
6
|
export {};
|
|
7
7
|
//# sourceMappingURL=ObjectRenderer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ObjectRenderer.d.ts","sourceRoot":"","sources":["../../../src/components/value-renderers/ObjectRenderer.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,UAAU,mBAAoB,SAAQ,mBAAmB;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,mBAAmB
|
|
1
|
+
{"version":3,"file":"ObjectRenderer.d.ts","sourceRoot":"","sources":["../../../src/components/value-renderers/ObjectRenderer.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,UAAU,mBAAoB,SAAQ,mBAAmB;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,mBAAmB,+BAEtE"}
|
|
@@ -2,6 +2,6 @@ import type { ValueRenderersProps } from './index.js';
|
|
|
2
2
|
interface TextProps extends ValueRenderersProps {
|
|
3
3
|
value?: string;
|
|
4
4
|
}
|
|
5
|
-
export declare function Text({ value, ...other }: TextProps): import("react
|
|
5
|
+
export declare function Text({ value, ...other }: TextProps): import("react").JSX.Element;
|
|
6
6
|
export {};
|
|
7
7
|
//# sourceMappingURL=Text.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../src/components/value-renderers/Text.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,UAAU,SAAU,SAAQ,mBAAmB;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAMD,wBAAgB,IAAI,CAAC,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,SAAS
|
|
1
|
+
{"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../src/components/value-renderers/Text.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,UAAU,SAAU,SAAQ,mBAAmB;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAMD,wBAAgB,IAAI,CAAC,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,SAAS,+BAElD"}
|
|
@@ -2,5 +2,5 @@ import type { ValueRenderersProps } from './index.js';
|
|
|
2
2
|
export interface TitleProps extends ValueRenderersProps {
|
|
3
3
|
value?: string;
|
|
4
4
|
}
|
|
5
|
-
export declare function Title({ value, ...other }: TitleProps): import("react
|
|
5
|
+
export declare function Title({ value, ...other }: TitleProps): import("react").JSX.Element;
|
|
6
6
|
//# sourceMappingURL=Title.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Title.d.ts","sourceRoot":"","sources":["../../../src/components/value-renderers/Title.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,MAAM,WAAW,UAAW,SAAQ,mBAAmB;IACrD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAMD,wBAAgB,KAAK,CAAC,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU
|
|
1
|
+
{"version":3,"file":"Title.d.ts","sourceRoot":"","sources":["../../../src/components/value-renderers/Title.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,MAAM,WAAW,UAAW,SAAQ,mBAAmB;IACrD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAMD,wBAAgB,KAAK,CAAC,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,+BAEpD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-science",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "20.0.0",
|
|
4
4
|
"description": "React components to build scientific applications UI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"createData": "npm run prepack && node scripts/createData",
|
|
24
24
|
"dev": "echo Use npm run dev-app or npm run storybook && exit 1",
|
|
25
25
|
"dev-app": "vite --open /pages/demo.html",
|
|
26
|
-
"eslint": "eslint . --cache",
|
|
26
|
+
"eslint": "eslint . --cache --max-warnings=39",
|
|
27
27
|
"eslint-fix": "npm run eslint -- --fix",
|
|
28
28
|
"playwright": "npm run playwright-ct -- --project chromium && npm run playwright-e2e -- --project chromium",
|
|
29
29
|
"playwright-ct": "playwright test -c playwright-ct.config.mts",
|
|
@@ -48,91 +48,88 @@
|
|
|
48
48
|
},
|
|
49
49
|
"homepage": "https://github.com/zakodium-oss/react-science#readme",
|
|
50
50
|
"peerDependencies": {
|
|
51
|
-
"@blueprintjs/core": "^6.
|
|
52
|
-
"@blueprintjs/icons": "^6.
|
|
53
|
-
"@blueprintjs/select": "^6.
|
|
54
|
-
"fifo-logger": "^
|
|
55
|
-
"react": "
|
|
56
|
-
"react-dom": "
|
|
51
|
+
"@blueprintjs/core": "^6.16.0",
|
|
52
|
+
"@blueprintjs/icons": "^6.11.0",
|
|
53
|
+
"@blueprintjs/select": "^6.3.0",
|
|
54
|
+
"fifo-logger": "^2.0.1",
|
|
55
|
+
"react": "^19.2.7",
|
|
56
|
+
"react-dom": "^19.2.7"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@atlaskit/pragmatic-drag-and-drop": "^1.
|
|
59
|
+
"@atlaskit/pragmatic-drag-and-drop": "^1.8.1",
|
|
60
60
|
"@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^2.1.5",
|
|
61
|
-
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.
|
|
61
|
+
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.2.0",
|
|
62
62
|
"@emotion/styled": "^11.14.1",
|
|
63
|
-
"@radix-ui/react-use-controllable-state": "^1.2.
|
|
64
|
-
"@tanstack/react-form": "^1.
|
|
63
|
+
"@radix-ui/react-use-controllable-state": "^1.2.3",
|
|
64
|
+
"@tanstack/react-form": "^1.33.0",
|
|
65
65
|
"@tanstack/react-table": "^8.21.3",
|
|
66
|
-
"@tanstack/react-virtual": "^3.
|
|
66
|
+
"@tanstack/react-virtual": "^3.14.2",
|
|
67
67
|
"@zakodium/pdnd-esm": "^1.0.2",
|
|
68
68
|
"d3-scale-chromatic": "^3.1.0",
|
|
69
69
|
"react-d3-utils": "^3.1.2",
|
|
70
70
|
"react-dropzone": "^15.0.0",
|
|
71
71
|
"react-full-screen": "^1.1.1",
|
|
72
|
-
"react-icons": "^5.
|
|
72
|
+
"react-icons": "^5.6.0",
|
|
73
73
|
"react-inspector": "^9.0.0",
|
|
74
74
|
"tinycolor2": "^1.6.0",
|
|
75
75
|
"ts-pattern": "^5.9.0",
|
|
76
|
-
"zod": "^4.3
|
|
76
|
+
"zod": "^4.4.3"
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|
|
79
|
-
"@blueprintjs/core": "6.
|
|
80
|
-
"@blueprintjs/icons": "6.
|
|
81
|
-
"@blueprintjs/select": "6.
|
|
82
|
-
"@floating-ui/react": "^0.27.
|
|
83
|
-
"@playwright/experimental-ct-react": "
|
|
84
|
-
"@playwright/test": "
|
|
85
|
-
"@storybook/addon-docs": "^10.
|
|
86
|
-
"@storybook/react-vite": "^10.
|
|
87
|
-
"@tanstack/react-query": "^5.
|
|
79
|
+
"@blueprintjs/core": "6.16.0",
|
|
80
|
+
"@blueprintjs/icons": "6.11.0",
|
|
81
|
+
"@blueprintjs/select": "6.3.0",
|
|
82
|
+
"@floating-ui/react": "^0.27.19",
|
|
83
|
+
"@playwright/experimental-ct-react": "^1.60.0",
|
|
84
|
+
"@playwright/test": "^1.60.0",
|
|
85
|
+
"@storybook/addon-docs": "^10.4.3",
|
|
86
|
+
"@storybook/react-vite": "^10.4.3",
|
|
87
|
+
"@tanstack/react-query": "^5.101.0",
|
|
88
88
|
"@types/babel__core": "^7.20.5",
|
|
89
89
|
"@types/d3-scale-chromatic": "^3.1.0",
|
|
90
|
-
"@types/node": "^24.
|
|
91
|
-
"@types/react": "^
|
|
92
|
-
"@types/react-dom": "^
|
|
90
|
+
"@types/node": "^24.13.1",
|
|
91
|
+
"@types/react": "^19.2.17",
|
|
92
|
+
"@types/react-dom": "^19.2.3",
|
|
93
93
|
"@types/tinycolor2": "^1.4.6",
|
|
94
|
-
"@vitejs/plugin-react": "^
|
|
95
|
-
"@vitest/coverage-v8": "^4.
|
|
96
|
-
"@zakodium/tsconfig": "^1.0.
|
|
97
|
-
"biologic-converter": "^0.
|
|
98
|
-
"cheminfo-font": "^1.
|
|
99
|
-
"cheminfo-types": "^1.
|
|
94
|
+
"@vitejs/plugin-react": "^6.0.2",
|
|
95
|
+
"@vitest/coverage-v8": "^4.1.8",
|
|
96
|
+
"@zakodium/tsconfig": "^1.0.5",
|
|
97
|
+
"biologic-converter": "^1.0.0",
|
|
98
|
+
"cheminfo-font": "^1.27.0",
|
|
99
|
+
"cheminfo-types": "^1.15.0",
|
|
100
100
|
"cross-env": "^10.1.0",
|
|
101
|
-
"eslint": "^9.39.
|
|
102
|
-
"eslint-config-zakodium": "^
|
|
103
|
-
"eslint-plugin-storybook": "^10.
|
|
104
|
-
"fifo-logger": "
|
|
101
|
+
"eslint": "^9.39.4",
|
|
102
|
+
"eslint-config-zakodium": "^20.0.0",
|
|
103
|
+
"eslint-plugin-storybook": "^10.4.3",
|
|
104
|
+
"fifo-logger": "2.0.1",
|
|
105
105
|
"filelist-utils": "^1.11.3",
|
|
106
|
-
"immer": "^11.1.
|
|
107
|
-
"jcampconverter": "^12.
|
|
108
|
-
"ml-gsd": "^
|
|
109
|
-
"ml-peak-shape-generator": "^
|
|
110
|
-
"ml-signal-processing": "^2.2.
|
|
111
|
-
"ml-spectra-processing": "^14.
|
|
112
|
-
"ms-spectrum": "^3.
|
|
113
|
-
"netcdfjs": "^
|
|
106
|
+
"immer": "^11.1.8",
|
|
107
|
+
"jcampconverter": "^12.3.3",
|
|
108
|
+
"ml-gsd": "^14.1.0",
|
|
109
|
+
"ml-peak-shape-generator": "^5.1.0",
|
|
110
|
+
"ml-signal-processing": "^2.2.1",
|
|
111
|
+
"ml-spectra-processing": "^14.29.0",
|
|
112
|
+
"ms-spectrum": "^3.10.1",
|
|
113
|
+
"netcdfjs": "^4.0.0",
|
|
114
114
|
"postcss-styled-syntax": "^0.7.1",
|
|
115
|
-
"prettier": "^3.8.
|
|
116
|
-
"react": "
|
|
117
|
-
"react-dom": "
|
|
118
|
-
"react-error-boundary": "^6.1.
|
|
115
|
+
"prettier": "^3.8.4",
|
|
116
|
+
"react": "19.2.7",
|
|
117
|
+
"react-dom": "19.2.7",
|
|
118
|
+
"react-error-boundary": "^6.1.2",
|
|
119
119
|
"react-kbs": "^3.1.0",
|
|
120
|
-
"react-ocl": "^8.
|
|
120
|
+
"react-ocl": "^8.7.1",
|
|
121
121
|
"react-plot": "^3.1.2",
|
|
122
122
|
"rimraf": "^6.1.3",
|
|
123
|
-
"spc-parser": "^
|
|
124
|
-
"storybook": "^10.
|
|
125
|
-
"stylelint": "^17.
|
|
123
|
+
"spc-parser": "^2.0.0",
|
|
124
|
+
"storybook": "^10.4.3",
|
|
125
|
+
"stylelint": "^17.13.0",
|
|
126
126
|
"stylelint-config-standard": "^40.0.0",
|
|
127
|
-
"typescript": "^
|
|
128
|
-
"vite": "^
|
|
129
|
-
"vitest": "^4.
|
|
130
|
-
"wdf-parser": "^0.
|
|
127
|
+
"typescript": "^6.0.3",
|
|
128
|
+
"vite": "^8.0.16",
|
|
129
|
+
"vitest": "^4.1.8",
|
|
130
|
+
"wdf-parser": "^1.0.0"
|
|
131
131
|
},
|
|
132
132
|
"volta": {
|
|
133
|
-
"node": "24.
|
|
134
|
-
},
|
|
135
|
-
"overrides": {
|
|
136
|
-
"storybook": "$storybook"
|
|
133
|
+
"node": "24.16.0"
|
|
137
134
|
}
|
|
138
135
|
}
|
|
@@ -43,8 +43,12 @@ export function ActivityBar(props: ActivityBarProps) {
|
|
|
43
43
|
const ActivityButton = styled(Button)`
|
|
44
44
|
font-size: 1.125em;
|
|
45
45
|
width: fit-content;
|
|
46
|
+
|
|
47
|
+
/* Override the padding set by the large button group */
|
|
48
|
+
padding: var(--bp-surface-spacing) calc(var(--bp-surface-spacing) * 2) !important;
|
|
49
|
+
|
|
46
50
|
.${Classes.ICON} {
|
|
47
|
-
color: ${Colors.DARK_GRAY3};
|
|
51
|
+
color: ${Colors.DARK_GRAY3} !important;
|
|
48
52
|
}
|
|
49
53
|
|
|
50
54
|
.${Classes.TAG} {
|
|
@@ -7,11 +7,10 @@ import type {
|
|
|
7
7
|
import {
|
|
8
8
|
AnchorButton,
|
|
9
9
|
Button as BlueprintButton,
|
|
10
|
-
|
|
10
|
+
Classes,
|
|
11
11
|
Tag,
|
|
12
12
|
Tooltip,
|
|
13
13
|
} from '@blueprintjs/core';
|
|
14
|
-
import type { CSSObject } from '@emotion/styled';
|
|
15
14
|
import styled from '@emotion/styled';
|
|
16
15
|
import type { ReactNode } from 'react';
|
|
17
16
|
|
|
@@ -41,21 +40,40 @@ const ButtonTag = styled(Tag)`
|
|
|
41
40
|
z-index: 20;
|
|
42
41
|
`;
|
|
43
42
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
43
|
+
interface InnerButtonProps {
|
|
44
|
+
isIconButton: boolean;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/*
|
|
48
|
+
Setting the line-height makes sure that when passing regular text in icons instead of an svg, they are vertically centered
|
|
49
|
+
max-width makes sure buttons with tag or hoverability indicator (both implying absolutely positioned elements) keep their intended width
|
|
50
|
+
When a button just has an icon, we override BP styles and remove the margin-right, because if it also has tag prop this is required to keep the layout correct.
|
|
51
|
+
*/
|
|
52
|
+
const buttonStyles = ({ isIconButton }: InnerButtonProps) => `
|
|
53
|
+
line-height: 1em;
|
|
54
|
+
position: relative;
|
|
55
|
+
max-width: ${isIconButton ? '30px' : 'none'};
|
|
56
|
+
|
|
57
|
+
& .${Classes.ICON} {
|
|
58
|
+
${isIconButton ? 'margin-right: 0px;' : ''}
|
|
59
|
+
}
|
|
60
|
+
`;
|
|
51
61
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
62
|
+
function shouldForwardButtonProp(propName: string) {
|
|
63
|
+
return propName !== 'isIconButton';
|
|
64
|
+
}
|
|
55
65
|
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
)
|
|
66
|
+
const TooltipAnchorButton = styled(AnchorButton, {
|
|
67
|
+
shouldForwardProp: shouldForwardButtonProp,
|
|
68
|
+
})<InnerButtonProps>`
|
|
69
|
+
${(props) => buttonStyles(props)}
|
|
70
|
+
`;
|
|
71
|
+
|
|
72
|
+
const TooltipButton = styled(BlueprintButton, {
|
|
73
|
+
shouldForwardProp: shouldForwardButtonProp,
|
|
74
|
+
})<InnerButtonProps>`
|
|
75
|
+
${(props) => buttonStyles(props)}
|
|
76
|
+
`;
|
|
59
77
|
|
|
60
78
|
export function Button(props: ButtonProps) {
|
|
61
79
|
const { tooltipProps = {}, children, tag, tagProps, ...buttonProps } = props;
|
|
@@ -80,34 +98,13 @@ export function Button(props: ButtonProps) {
|
|
|
80
98
|
<InnerButton
|
|
81
99
|
{...targetProps}
|
|
82
100
|
{...buttonProps}
|
|
83
|
-
|
|
84
|
-
/*
|
|
85
|
-
icon and children will be children of the same node.
|
|
86
|
-
Blueprintjs' stylesheet treats the presence of multiple child elements
|
|
87
|
-
as there being icon and text, styling the icon with a right margin
|
|
88
|
-
so that the text is not right next to it.
|
|
89
|
-
In blueprint alone, this only happens when the button has children.
|
|
90
|
-
Here, we need to handle the case when the button has a tag, which
|
|
91
|
-
adds a sibling but should not affect the margin on its own.
|
|
92
|
-
*/
|
|
93
|
-
tag ? (
|
|
94
|
-
<>
|
|
95
|
-
{children ? (
|
|
96
|
-
<Icon icon={buttonProps.icon} />
|
|
97
|
-
) : (
|
|
98
|
-
<div style={{ display: 'contents' }}>
|
|
99
|
-
<Icon icon={buttonProps.icon} />
|
|
100
|
-
</div>
|
|
101
|
-
)}
|
|
102
|
-
<ButtonTag round intent="success" {...tagProps}>
|
|
103
|
-
{tag}
|
|
104
|
-
</ButtonTag>
|
|
105
|
-
</>
|
|
106
|
-
) : (
|
|
107
|
-
buttonProps.icon
|
|
108
|
-
)
|
|
109
|
-
}
|
|
101
|
+
isIconButton={!children && !buttonProps.text}
|
|
110
102
|
>
|
|
103
|
+
{tag && (
|
|
104
|
+
<ButtonTag round intent="success" {...tagProps}>
|
|
105
|
+
{tag}
|
|
106
|
+
</ButtonTag>
|
|
107
|
+
)}
|
|
111
108
|
{children}
|
|
112
109
|
</InnerButton>
|
|
113
110
|
)}
|