@perspective-dev/viewer 4.2.0 → 4.4.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/dist/cdn/perspective-viewer.js +2 -2
- package/dist/cdn/perspective-viewer.js.map +4 -4
- package/dist/css/botanical.css +1 -0
- package/dist/css/dracula.css +1 -1
- package/dist/css/gruvbox-dark.css +1 -1
- package/dist/css/gruvbox.css +1 -1
- package/dist/css/icons.css +1 -1
- package/dist/css/intl/de.css +1 -1
- package/dist/css/intl/es.css +1 -1
- package/dist/css/intl/fr.css +1 -1
- package/dist/css/intl/ja.css +1 -1
- package/dist/css/intl/pt.css +1 -1
- package/dist/css/intl/zh.css +1 -1
- package/dist/css/intl.css +1 -1
- package/dist/css/monokai.css +1 -1
- package/dist/css/pro-dark.css +1 -1
- package/dist/css/pro.css +1 -1
- package/dist/css/solarized-dark.css +1 -1
- package/dist/css/solarized.css +1 -1
- package/dist/css/themes.css +1 -1
- package/dist/css/vaporwave.css +1 -1
- package/dist/esm/extensions.d.ts +32 -1
- package/dist/esm/perspective-viewer.d.ts +1 -0
- package/dist/esm/perspective-viewer.inline.js +2 -2
- package/dist/esm/perspective-viewer.inline.js.map +4 -4
- package/dist/esm/perspective-viewer.js +2 -2
- package/dist/esm/perspective-viewer.js.map +4 -4
- package/dist/esm/ts-rs/GroupRollupMode.d.ts +1 -0
- package/dist/esm/ts-rs/ViewerConfigUpdate.d.ts +2 -0
- package/dist/wasm/perspective-viewer.d.ts +57 -53
- package/dist/wasm/perspective-viewer.js +197 -164
- package/dist/wasm/perspective-viewer.wasm +0 -0
- package/dist/wasm/perspective-viewer.wasm.d.ts +17 -18
- package/package.json +9 -6
- package/src/{less/aggregate-selector.less → css/aggregate-selector.css} +23 -20
- package/src/css/column-dropdown.css +109 -0
- package/src/{less/column-selector.less → css/column-selector.css} +161 -159
- package/src/{less/column-settings-panel.less → css/column-settings-panel.css} +69 -59
- package/src/{less/column-style.less → css/column-style.css} +52 -66
- package/src/{less/column-symbol-attributes.less → css/column-symbol-attributes.css} +15 -14
- package/src/css/config-selector.css +441 -0
- package/src/{less/containers/dropdown-menu.less → css/containers/dropdown-menu.css} +20 -19
- package/src/{less/containers/pairs-list.less → css/containers/pairs-list.css} +13 -12
- package/src/{themes/variables.less → css/containers/scroll-panel.css} +25 -22
- package/src/{less/containers/split-panel.less → css/containers/split-panel.css} +15 -14
- package/src/{less/containers/tabs.less → css/containers/tabs.css} +17 -19
- package/src/css/dom/checkbox.css +102 -0
- package/src/css/dom/scrollbar.css +35 -0
- package/src/{less/dom/select.less → css/dom/select.css} +17 -18
- package/src/{less/empty-column.less → css/empty-column.css} +19 -18
- package/src/{less/expression-editor.less → css/expression-editor.css} +19 -18
- package/src/{less/filter-dropdown.less → css/filter-dropdown.css} +12 -11
- package/src/{less/filter-item.less → css/filter-item.css} +16 -15
- package/src/{less/form/code-editor.less → css/form/code-editor.css} +26 -30
- package/src/{less/form/debug.less → css/form/debug.css} +19 -18
- package/src/{less/function-dropdown.less → css/function-dropdown.css} +12 -11
- package/src/css/plugin-selector.css +261 -0
- package/src/{less/render-warning.less → css/render-warning.css} +18 -17
- package/src/{less/status-bar.less → css/status-bar.css} +156 -144
- package/src/css/type-icon.css +116 -0
- package/src/{less/viewer.less → css/viewer.css} +112 -146
- package/src/rust/components/column_dropdown.rs +229 -119
- package/src/rust/components/column_selector/active_column.rs +81 -62
- package/src/rust/components/column_selector/add_expression_button.rs +1 -0
- package/src/rust/components/column_selector/aggregate_selector.rs +25 -15
- package/src/rust/components/column_selector/config_selector.rs +374 -185
- package/src/rust/components/column_selector/empty_column.rs +2 -2
- package/src/rust/components/column_selector/expr_edit_button.rs +8 -2
- package/src/rust/components/column_selector/filter_column.rs +37 -26
- package/src/rust/components/column_selector/inactive_column.rs +41 -29
- package/src/rust/components/column_selector/invalid_column.rs +7 -18
- package/src/rust/components/column_selector/pivot_column.rs +21 -10
- package/src/rust/components/column_selector/sort_column.rs +23 -13
- package/src/rust/components/column_selector.rs +189 -100
- package/src/rust/components/column_settings_sidebar/style_tab/symbol/row_selector.rs +1 -1
- package/src/rust/components/column_settings_sidebar/style_tab/symbol/symbol_pairs.rs +3 -2
- package/src/rust/components/column_settings_sidebar/style_tab/symbol/symbol_pairs_item.rs +3 -2
- package/src/rust/components/column_settings_sidebar/style_tab/symbol/symbol_selector.rs +2 -3
- package/src/rust/components/column_settings_sidebar/style_tab/symbol.rs +7 -1
- package/src/rust/components/column_settings_sidebar/style_tab.rs +153 -112
- package/src/rust/components/column_settings_sidebar.rs +91 -53
- package/src/rust/components/containers/dragdrop_list.rs +29 -7
- package/src/rust/components/containers/scroll_panel.rs +8 -1
- package/src/rust/components/containers/select.rs +3 -3
- package/src/rust/components/containers/sidebar_close_button.rs +1 -1
- package/src/rust/components/containers/split_panel.rs +3 -2
- package/src/rust/components/containers/tab_list.rs +1 -1
- package/src/rust/components/copy_dropdown.rs +7 -28
- package/src/rust/components/datetime_column_style/custom.rs +2 -2
- package/src/rust/components/datetime_column_style/simple.rs +2 -2
- package/src/rust/components/datetime_column_style.rs +4 -2
- package/src/rust/components/editable_header.rs +7 -4
- package/src/rust/components/empty_row.rs +1 -1
- package/src/rust/components/export_dropdown.rs +4 -30
- package/src/rust/components/expression_editor.rs +19 -10
- package/src/rust/components/filter_dropdown.rs +246 -102
- package/src/rust/components/font_loader.rs +11 -28
- package/src/rust/components/form/code_editor.rs +17 -2
- package/src/rust/components/form/color_range_selector.rs +19 -6
- package/src/rust/components/form/debug.rs +30 -13
- package/src/rust/components/function_dropdown.rs +186 -113
- package/src/rust/components/main_panel.rs +71 -89
- package/src/rust/components/mod.rs +1 -1
- package/src/rust/components/modal.rs +7 -1
- package/src/rust/components/number_column_style.rs +22 -7
- package/src/rust/components/plugin_selector.rs +34 -92
- package/src/rust/components/portal.rs +274 -0
- package/src/rust/components/render_warning.rs +72 -123
- package/src/rust/components/settings_panel.rs +115 -11
- package/src/rust/components/status_bar.rs +222 -98
- package/src/rust/components/status_bar_counter.rs +8 -20
- package/src/rust/components/status_indicator.rs +64 -111
- package/src/rust/components/string_column_style.rs +2 -2
- package/src/rust/components/style/style_cache.rs +5 -1
- package/src/rust/components/viewer.rs +391 -39
- package/src/rust/custom_elements/copy_dropdown.rs +102 -21
- package/src/rust/custom_elements/export_dropdown.rs +102 -20
- package/src/rust/custom_elements/mod.rs +0 -7
- package/src/rust/custom_elements/modal.rs +7 -103
- package/src/rust/custom_elements/viewer.rs +99 -35
- package/src/rust/custom_events.rs +23 -2
- package/src/rust/dragdrop.rs +149 -10
- package/src/{less/containers/scroll-panel.less → rust/engines.rs} +15 -13
- package/src/rust/js/plugin.rs +20 -1
- package/src/rust/lib.rs +5 -4
- package/src/rust/presentation/props.rs +39 -0
- package/src/rust/presentation/sheets.rs +3 -3
- package/src/rust/presentation.rs +44 -8
- package/src/rust/renderer/limits.rs +32 -3
- package/src/{less/dom/scrollbar.less → rust/renderer/props.rs} +18 -19
- package/src/rust/renderer/registry.rs +8 -1
- package/src/rust/renderer.rs +83 -9
- package/src/rust/session/column_defaults_update.rs +18 -0
- package/src/rust/session/metadata.rs +23 -2
- package/src/rust/session/props.rs +178 -0
- package/src/rust/session/replace_expression_update.rs +1 -0
- package/src/rust/session.rs +124 -117
- package/src/rust/tasks/column_locator.rs +133 -0
- package/src/rust/{model → tasks}/columns_iter_set.rs +14 -23
- package/src/rust/{model → tasks}/edit_expression.rs +34 -10
- package/src/rust/{model → tasks}/eject.rs +2 -2
- package/src/rust/{model → tasks}/get_viewer_config.rs +0 -11
- package/src/rust/{model → tasks}/intersection_observer.rs +22 -4
- package/src/{less/containers/radio-list.less → rust/tasks/is_invalid_drop.rs} +21 -14
- package/src/rust/tasks/mod.rs +52 -0
- package/src/rust/{model → tasks}/plugin_column_styles.rs +69 -46
- package/src/rust/{model → tasks}/resize_observer.rs +39 -6
- package/src/rust/{model → tasks}/send_plugin_config.rs +1 -1
- package/src/rust/tasks/structural.rs +53 -0
- package/src/rust/utils/mod.rs +4 -0
- package/src/rust/utils/modal_position.rs +110 -0
- package/src/rust/utils/ptr_eq_rc.rs +74 -0
- package/src/rust/utils/pubsub.rs +11 -1
- package/src/svg/bg-pattern.png +0 -0
- package/src/svg/close-icon.svg +1 -1
- package/src/svg/expression.svg +1 -1
- package/src/svg/mega-menu-icons-candlestick.svg +1 -1
- package/src/svg/mega-menu-icons-datagrid.svg +1 -2
- package/src/svg/mega-menu-icons-heatmap.svg +1 -1
- package/src/svg/mega-menu-icons-map-scatter.svg +1 -1
- package/src/svg/mega-menu-icons-ohlc.svg +1 -1
- package/src/svg/mega-menu-icons-sunburst.svg +1 -1
- package/src/svg/mega-menu-icons-treemap.svg +1 -1
- package/src/svg/mega-menu-icons-x-bar.svg +1 -1
- package/src/svg/mega-menu-icons-x-y-line.svg +1 -1
- package/src/svg/mega-menu-icons-x-y-scatter.svg +1 -1
- package/src/svg/mega-menu-icons-y-area.svg +1 -1
- package/src/svg/mega-menu-icons-y-bar.svg +1 -1
- package/src/svg/mega-menu-icons-y-line.svg +1 -1
- package/src/svg/mega-menu-icons-y-scatter.svg +1 -1
- package/src/svg/radio-hover.svg +1 -1
- package/src/svg/radio-off.svg +1 -1
- package/src/svg/radio-on.svg +1 -1
- package/src/themes/botanical.css +157 -0
- package/src/themes/defaults.css +139 -0
- package/src/themes/dracula.css +233 -0
- package/src/themes/gruvbox-dark.css +255 -0
- package/src/themes/gruvbox.css +134 -0
- package/src/themes/icons.css +124 -0
- package/src/themes/intl/de.css +102 -0
- package/src/themes/intl/es.css +102 -0
- package/src/themes/intl/fr.css +102 -0
- package/src/themes/intl/ja.css +102 -0
- package/src/themes/intl/pt.css +102 -0
- package/src/themes/intl/zh.css +102 -0
- package/src/themes/intl.css +102 -0
- package/src/themes/monokai.css +233 -0
- package/src/themes/pro-dark.css +158 -0
- package/src/themes/{themes.less → pro.css} +17 -20
- package/src/themes/solarized-dark.css +135 -0
- package/src/themes/solarized.css +95 -0
- package/src/themes/themes.css +22 -0
- package/src/themes/vaporwave.css +256 -0
- package/src/ts/extensions.ts +73 -2
- package/src/ts/perspective-viewer.ts +1 -0
- package/src/ts/ts-rs/GroupRollupMode.ts +3 -0
- package/src/ts/ts-rs/ViewerConfigUpdate.ts +2 -1
- package/tsconfig.json +1 -0
- package/dist/css/variables.css +0 -0
- package/src/less/column-dropdown.less +0 -95
- package/src/less/config-selector.less +0 -363
- package/src/less/dom/checkbox.less +0 -100
- package/src/less/plugin-selector.less +0 -183
- package/src/less/type-icon.less +0 -68
- package/src/rust/components/error_message.rs +0 -56
- package/src/rust/custom_elements/column_dropdown.rs +0 -123
- package/src/rust/custom_elements/filter_dropdown.rs +0 -179
- package/src/rust/custom_elements/function_dropdown.rs +0 -115
- package/src/rust/model/column_locator.rs +0 -82
- package/src/rust/model/is_invalid_drop.rs +0 -36
- package/src/rust/model/mod.rs +0 -100
- package/src/rust/model/reset_all.rs +0 -38
- package/src/rust/model/structural.rs +0 -244
- package/src/themes/dracula.less +0 -101
- package/src/themes/gruvbox-dark.less +0 -116
- package/src/themes/gruvbox.less +0 -152
- package/src/themes/icons.less +0 -130
- package/src/themes/intl/de.less +0 -102
- package/src/themes/intl/es.less +0 -102
- package/src/themes/intl/fr.less +0 -102
- package/src/themes/intl/ja.less +0 -102
- package/src/themes/intl/pt.less +0 -102
- package/src/themes/intl/zh.less +0 -102
- package/src/themes/intl.less +0 -102
- package/src/themes/monokai.less +0 -107
- package/src/themes/pro-dark.less +0 -147
- package/src/themes/pro.less +0 -186
- package/src/themes/solarized-dark.less +0 -78
- package/src/themes/solarized.less +0 -102
- package/src/themes/vaporwave.less +0 -145
- /package/dist/wasm/snippets/{perspective-viewer-1586156e058be573 → perspective-viewer-68fef752754ffbc6}/inline0.js +0 -0
- /package/dist/wasm/snippets/{perspective-viewer-1586156e058be573 → perspective-viewer-68fef752754ffbc6}/inline1.js +0 -0
- /package/dist/wasm/snippets/{perspective-viewer-1586156e058be573 → perspective-viewer-68fef752754ffbc6}/inline2.js +0 -0
- /package/dist/wasm/snippets/{perspective-viewer-1586156e058be573 → perspective-viewer-68fef752754ffbc6}/inline3.js +0 -0
- /package/dist/wasm/snippets/{perspective-viewer-1586156e058be573 → perspective-viewer-68fef752754ffbc6}/inline4.js +0 -0
- /package/src/rust/{model → tasks}/copy_export.rs +0 -0
- /package/src/rust/{model → tasks}/export_app.rs +0 -0
- /package/src/rust/{model → tasks}/export_method.rs +0 -0
- /package/src/rust/{model → tasks}/restore_and_render.rs +0 -0
- /package/src/rust/{model → tasks}/update_and_render.rs +0 -0
package/src/rust/model/mod.rs
DELETED
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
// ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
|
|
2
|
-
// ┃ ██████ ██████ ██████ █ █ █ █ █ █▄ ▀███ █ ┃
|
|
3
|
-
// ┃ ▄▄▄▄▄█ █▄▄▄▄▄ ▄▄▄▄▄█ ▀▀▀▀▀█▀▀▀▀▀ █ ▀▀▀▀▀█ ████████▌▐███ ███▄ ▀█ █ ▀▀▀▀▀ ┃
|
|
4
|
-
// ┃ █▀▀▀▀▀ █▀▀▀▀▀ █▀██▀▀ ▄▄▄▄▄ █ ▄▄▄▄▄█ ▄▄▄▄▄█ ████████▌▐███ █████▄ █ ▄▄▄▄▄ ┃
|
|
5
|
-
// ┃ █ ██████ █ ▀█▄ █ ██████ █ ███▌▐███ ███████▄ █ ┃
|
|
6
|
-
// ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
|
|
7
|
-
// ┃ Copyright (c) 2017, the Perspective Authors. ┃
|
|
8
|
-
// ┃ ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ ┃
|
|
9
|
-
// ┃ This file is part of the Perspective library, distributed under the terms ┃
|
|
10
|
-
// ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
|
|
11
|
-
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
|
|
12
|
-
|
|
13
|
-
//! Here lies Perspective's attempt to avoid a monolithic Application State
|
|
14
|
-
//! object. The major components which hold `PerspectiveViewer`-scoped state
|
|
15
|
-
//! are broken up roughly by some single resource responsibility -
|
|
16
|
-
//!
|
|
17
|
-
//! - `Session` manages the `@perspective-dev/client` engine `Table` and `View`
|
|
18
|
-
//! objects, plus caches some related metadata `Schema`.
|
|
19
|
-
//! - `Renderer` manages the JavaScript Custom Element plugin.
|
|
20
|
-
//! - .. etc.
|
|
21
|
-
//!
|
|
22
|
-
//! For complex tasks which involve overlapping state/coordination between >1 of
|
|
23
|
-
//! these Application State objects, Perspective uses a set of respective `Has*`
|
|
24
|
-
//! traits, (e.g. `HasSession`), to provide extra functions for object which
|
|
25
|
-
//! implement more than one such trait. These can be conveniently derived by
|
|
26
|
-
//! consistently naming the application state object clones when used as struct
|
|
27
|
-
//! fields, then applying the `derive_model!()` macro for the state object you
|
|
28
|
-
//! wish to expose.
|
|
29
|
-
//!
|
|
30
|
-
//! # Examples
|
|
31
|
-
//!
|
|
32
|
-
//! ```rust
|
|
33
|
-
//! #[derive(PerspectiveProperties!)]
|
|
34
|
-
//! struct A {
|
|
35
|
-
//! session: Session,
|
|
36
|
-
//! }
|
|
37
|
-
//!
|
|
38
|
-
//! #[derive(PerspectiveProperties!)]
|
|
39
|
-
//! struct B {
|
|
40
|
-
//! renderer: Renderer,
|
|
41
|
-
//! }
|
|
42
|
-
//!
|
|
43
|
-
//! #[derive(PerspectiveProperties!)]
|
|
44
|
-
//! struct C {
|
|
45
|
-
//! session: Session,
|
|
46
|
-
//! renderer: Renderer,
|
|
47
|
-
//! }
|
|
48
|
-
//!
|
|
49
|
-
//! trait SessionRenderModel: HasSession + HasRenderer {
|
|
50
|
-
//! fn render_session_now(&self) {
|
|
51
|
-
//! // Do some thing that requires `.session()` and `.renderer()`
|
|
52
|
-
//! }
|
|
53
|
-
//! }
|
|
54
|
-
//!
|
|
55
|
-
//! impl<T: HasSession + HasRenderer> SessionRenderModel for T {}
|
|
56
|
-
//!
|
|
57
|
-
//! fn test(session: Session, renderer: Renderer) {
|
|
58
|
-
//! // Type errors
|
|
59
|
-
//! (A { session }).render_session_now();
|
|
60
|
-
//! (B { renderer }).render_session_now();
|
|
61
|
-
//!
|
|
62
|
-
//! // The method exists only when both state object clones exist
|
|
63
|
-
//! (C { session, renderer }).render_session_now();
|
|
64
|
-
//! }
|
|
65
|
-
//! ```
|
|
66
|
-
|
|
67
|
-
mod column_locator;
|
|
68
|
-
mod columns_iter_set;
|
|
69
|
-
mod copy_export;
|
|
70
|
-
mod edit_expression;
|
|
71
|
-
mod eject;
|
|
72
|
-
mod export_app;
|
|
73
|
-
mod export_method;
|
|
74
|
-
mod get_viewer_config;
|
|
75
|
-
mod intersection_observer;
|
|
76
|
-
mod is_invalid_drop;
|
|
77
|
-
mod plugin_column_styles;
|
|
78
|
-
mod reset_all;
|
|
79
|
-
mod resize_observer;
|
|
80
|
-
mod restore_and_render;
|
|
81
|
-
mod send_plugin_config;
|
|
82
|
-
mod structural;
|
|
83
|
-
mod update_and_render;
|
|
84
|
-
|
|
85
|
-
pub use self::column_locator::*;
|
|
86
|
-
pub use self::columns_iter_set::*;
|
|
87
|
-
pub use self::copy_export::*;
|
|
88
|
-
pub use self::edit_expression::*;
|
|
89
|
-
pub use self::eject::*;
|
|
90
|
-
pub use self::export_method::*;
|
|
91
|
-
pub use self::get_viewer_config::*;
|
|
92
|
-
pub use self::intersection_observer::*;
|
|
93
|
-
pub use self::is_invalid_drop::*;
|
|
94
|
-
pub use self::plugin_column_styles::*;
|
|
95
|
-
pub use self::reset_all::*;
|
|
96
|
-
pub use self::resize_observer::*;
|
|
97
|
-
pub use self::restore_and_render::*;
|
|
98
|
-
pub use self::send_plugin_config::*;
|
|
99
|
-
pub use self::structural::*;
|
|
100
|
-
pub use self::update_and_render::*;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
// ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
|
|
2
|
-
// ┃ ██████ ██████ ██████ █ █ █ █ █ █▄ ▀███ █ ┃
|
|
3
|
-
// ┃ ▄▄▄▄▄█ █▄▄▄▄▄ ▄▄▄▄▄█ ▀▀▀▀▀█▀▀▀▀▀ █ ▀▀▀▀▀█ ████████▌▐███ ███▄ ▀█ █ ▀▀▀▀▀ ┃
|
|
4
|
-
// ┃ █▀▀▀▀▀ █▀▀▀▀▀ █▀██▀▀ ▄▄▄▄▄ █ ▄▄▄▄▄█ ▄▄▄▄▄█ ████████▌▐███ █████▄ █ ▄▄▄▄▄ ┃
|
|
5
|
-
// ┃ █ ██████ █ ▀█▄ █ ██████ █ ███▌▐███ ███████▄ █ ┃
|
|
6
|
-
// ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
|
|
7
|
-
// ┃ Copyright (c) 2017, the Perspective Authors. ┃
|
|
8
|
-
// ┃ ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ ┃
|
|
9
|
-
// ┃ This file is part of the Perspective library, distributed under the terms ┃
|
|
10
|
-
// ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
|
|
11
|
-
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
|
|
12
|
-
|
|
13
|
-
use super::structural::*;
|
|
14
|
-
use crate::session::ResetOptions;
|
|
15
|
-
use crate::utils::*;
|
|
16
|
-
use crate::*;
|
|
17
|
-
|
|
18
|
-
pub trait ResetAll: HasRenderer + HasSession + HasPresentation {
|
|
19
|
-
/// Completely reset viewer state
|
|
20
|
-
fn reset_all(&self) -> ApiFuture<()> {
|
|
21
|
-
clone!(self.session(), self.renderer(), self.presentation());
|
|
22
|
-
ApiFuture::new(async move {
|
|
23
|
-
session
|
|
24
|
-
.reset(ResetOptions {
|
|
25
|
-
config: true,
|
|
26
|
-
expressions: true,
|
|
27
|
-
..ResetOptions::default()
|
|
28
|
-
})
|
|
29
|
-
.await?;
|
|
30
|
-
presentation.reset_columns_configs();
|
|
31
|
-
renderer.reset(None).await?;
|
|
32
|
-
presentation.reset_available_themes(None).await;
|
|
33
|
-
Ok(())
|
|
34
|
-
})
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
impl<T: HasRenderer + HasSession + HasPresentation> ResetAll for T {}
|
|
@@ -1,244 +0,0 @@
|
|
|
1
|
-
// ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
|
|
2
|
-
// ┃ ██████ ██████ ██████ █ █ █ █ █ █▄ ▀███ █ ┃
|
|
3
|
-
// ┃ ▄▄▄▄▄█ █▄▄▄▄▄ ▄▄▄▄▄█ ▀▀▀▀▀█▀▀▀▀▀ █ ▀▀▀▀▀█ ████████▌▐███ ███▄ ▀█ █ ▀▀▀▀▀ ┃
|
|
4
|
-
// ┃ █▀▀▀▀▀ █▀▀▀▀▀ █▀██▀▀ ▄▄▄▄▄ █ ▄▄▄▄▄█ ▄▄▄▄▄█ ████████▌▐███ █████▄ █ ▄▄▄▄▄ ┃
|
|
5
|
-
// ┃ █ ██████ █ ▀█▄ █ ██████ █ ███▌▐███ ███████▄ █ ┃
|
|
6
|
-
// ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
|
|
7
|
-
// ┃ Copyright (c) 2017, the Perspective Authors. ┃
|
|
8
|
-
// ┃ ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ ┃
|
|
9
|
-
// ┃ This file is part of the Perspective library, distributed under the terms ┃
|
|
10
|
-
// ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
|
|
11
|
-
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
|
|
12
|
-
|
|
13
|
-
//! A simple "structurally-typed" method extension implementation. This
|
|
14
|
-
//! collection of `trait`s allows methods to be automatically defined for
|
|
15
|
-
//! `struct`s only if the define accessors for the necessary applications state
|
|
16
|
-
//! objects (which are conviently derivable with the `derive_model!` macro).
|
|
17
|
-
|
|
18
|
-
use yew::Component;
|
|
19
|
-
|
|
20
|
-
use crate::custom_events::*;
|
|
21
|
-
use crate::dragdrop::*;
|
|
22
|
-
use crate::presentation::*;
|
|
23
|
-
use crate::renderer::*;
|
|
24
|
-
use crate::root::*;
|
|
25
|
-
use crate::session::*;
|
|
26
|
-
|
|
27
|
-
pub trait HasCustomEvents {
|
|
28
|
-
fn custom_events(&self) -> &'_ CustomEvents;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
pub trait HasDragDrop {
|
|
32
|
-
fn dragdrop(&self) -> &'_ DragDrop;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
pub trait HasPresentation {
|
|
36
|
-
fn presentation(&self) -> &'_ Presentation;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
pub trait HasRoot {
|
|
40
|
-
/// Use an assoociated type to prevent a (circular) dependency on
|
|
41
|
-
/// [`crate::components`].
|
|
42
|
-
type RootComponent: Component;
|
|
43
|
-
fn root(&self) -> &'_ Root<Self::RootComponent>;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
pub trait HasRenderer {
|
|
47
|
-
fn renderer(&self) -> &'_ Renderer;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
pub trait HasSession {
|
|
51
|
-
fn session(&self) -> &'_ Session;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
impl HasSession for Session {
|
|
55
|
-
fn session(&self) -> &'_ Session {
|
|
56
|
-
self
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
#[macro_export]
|
|
61
|
-
macro_rules! PerspectiveProperties {
|
|
62
|
-
// (impl @tuple $name:ident CustomEvents $x:tt) => {
|
|
63
|
-
// impl $crate::model::HasCustomEvents for $name {
|
|
64
|
-
// fn custom_events(&self) -> &'_ CustomEvents {
|
|
65
|
-
// &self.$x
|
|
66
|
-
// }
|
|
67
|
-
// }
|
|
68
|
-
// };
|
|
69
|
-
|
|
70
|
-
// (impl @tuple $name:ident DragDrop $x:tt) => {
|
|
71
|
-
// impl $crate::model::HasDragDrop for $name {
|
|
72
|
-
// fn dragdrop(&self) -> &'_ DragDrop {
|
|
73
|
-
// &self.$x
|
|
74
|
-
// }
|
|
75
|
-
// }
|
|
76
|
-
// };
|
|
77
|
-
|
|
78
|
-
// (impl @tuple $name:ident Presentatio $x:tt) => {
|
|
79
|
-
// impl $crate::model::HasPresentation for $name {
|
|
80
|
-
// fn presentation(&self) -> &'_ Presentation {
|
|
81
|
-
// &self.$x
|
|
82
|
-
// }
|
|
83
|
-
// }
|
|
84
|
-
// };
|
|
85
|
-
|
|
86
|
-
// (impl @tuple $name:ident Renderer $x:tt) => {
|
|
87
|
-
// impl $crate::model::HasRenderer for $name {
|
|
88
|
-
// fn renderer(&self) -> &'_ Renderer {
|
|
89
|
-
// &self.$x
|
|
90
|
-
// }
|
|
91
|
-
// }
|
|
92
|
-
// };
|
|
93
|
-
|
|
94
|
-
// (impl @tuple $name:ident Root $x:tt) => {
|
|
95
|
-
// impl $crate::model::HasRoot for $name {
|
|
96
|
-
// type RootComponent = $crate::components::viewer::PerspectiveViewer;
|
|
97
|
-
// fn root(&self) -> &'_ Root<Self::RootComponent> {
|
|
98
|
-
// &self.$x
|
|
99
|
-
// }
|
|
100
|
-
// }
|
|
101
|
-
// };
|
|
102
|
-
|
|
103
|
-
// (impl @tuple $name:ident Session $x:tt) => {
|
|
104
|
-
// impl $crate::model::HasSession for $name {
|
|
105
|
-
// fn session(&self) -> &'_ Session {
|
|
106
|
-
// &self.$x
|
|
107
|
-
// }
|
|
108
|
-
// }
|
|
109
|
-
// };
|
|
110
|
-
|
|
111
|
-
// (impl @tuple $name:ident *_x:tt $x:tt) => {};
|
|
112
|
-
|
|
113
|
-
(impl @field $name:ident custom_events $value:ty) => {
|
|
114
|
-
impl $crate::model::HasCustomEvents for $name {
|
|
115
|
-
fn custom_events(&self) -> &'_ $value {
|
|
116
|
-
&self.custom_events
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
(impl @field $name:ident dragdrop $value:ty) => {
|
|
122
|
-
impl $crate::model::HasDragDrop for $name {
|
|
123
|
-
fn dragdrop(&self) -> &'_ $value {
|
|
124
|
-
&self.dragdrop
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
};
|
|
128
|
-
|
|
129
|
-
(impl @field $name:ident presentation $value:ty) => {
|
|
130
|
-
impl $crate::model::HasPresentation for $name {
|
|
131
|
-
fn presentation(&self) -> &'_ $value {
|
|
132
|
-
&self.presentation
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
};
|
|
136
|
-
|
|
137
|
-
(impl @field $name:ident renderer $value:ty) => {
|
|
138
|
-
impl $crate::model::HasRenderer for $name {
|
|
139
|
-
fn renderer(&self) -> &'_ $value {
|
|
140
|
-
&self.renderer
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
};
|
|
144
|
-
|
|
145
|
-
(impl @field $name:ident root $value:ty) => {
|
|
146
|
-
impl $crate::model::HasRoot for $name {
|
|
147
|
-
type RootComponent = $crate::components::viewer::PerspectiveViewer;
|
|
148
|
-
fn root(&self) -> &'_ $value {
|
|
149
|
-
&self.root
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
};
|
|
153
|
-
|
|
154
|
-
(impl @field $name:ident session $value:ty) => {
|
|
155
|
-
impl $crate::model::HasSession for $name {
|
|
156
|
-
fn session(&self) -> &'_ $value {
|
|
157
|
-
&self.session
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
};
|
|
161
|
-
|
|
162
|
-
(impl @field $name:ident $x:ident $value:ty) => {};
|
|
163
|
-
|
|
164
|
-
(impl @fields_provider $name:ident {$($x:tt : $y:ty,)*} custom_events, $($field:ident,)*) => {
|
|
165
|
-
PerspectiveProperties!(impl @fields_provider $name { custom_events : CustomEvents, $($x : $y,)*} $($field,)*);
|
|
166
|
-
};
|
|
167
|
-
|
|
168
|
-
(impl @fields_provider $name:ident {$($x:tt : $y:ty,)*} dragdrop, $($field:ident,)*) => {
|
|
169
|
-
PerspectiveProperties!(impl @fields_provider $name { dragdrop : DragDrop, $($x : $y,)*} $($field,)*);
|
|
170
|
-
};
|
|
171
|
-
|
|
172
|
-
(impl @fields_provider $name:ident {$($x:tt : $y:ty,)*} presentation, $($field:ident,)*) => {
|
|
173
|
-
PerspectiveProperties!(impl @fields_provider $name { presentation : Presentation, $($x : $y,)*} $($field,)*);
|
|
174
|
-
};
|
|
175
|
-
|
|
176
|
-
(impl @fields_provider $name:ident {$($x:tt : $y:ty,)*} renderer, $($field:ident,)*) => {
|
|
177
|
-
PerspectiveProperties!(impl @fields_provider $name { renderer : Renderer, $($x : $y,)*} $($field,)*);
|
|
178
|
-
};
|
|
179
|
-
|
|
180
|
-
(impl @fields_provider $name:ident {$($x:tt : $y:ty,)*} root, $($field:ident,)*) => {
|
|
181
|
-
PerspectiveProperties!(impl @fields_provider $name { root : Root<$crate::components::viewer::PerspectiveViewer>, $($x : $y,)*} $($field,)*);
|
|
182
|
-
};
|
|
183
|
-
|
|
184
|
-
(impl @fields_provider $name:ident {$($x:tt : $y:ty,)*} session, $($field:ident,)*) => {
|
|
185
|
-
PerspectiveProperties!(impl @fields_provider $name { session : Session, $($x : $y,)*} $($field,)*);
|
|
186
|
-
};
|
|
187
|
-
|
|
188
|
-
(impl @fields_provider $name:ident {$($x:tt : $y:ty,)*} $_x:ident, $($field:ident,)*) => {
|
|
189
|
-
PerspectiveProperties!(impl @fields_provider $name {$($x : $y,)*} $($field,)*);
|
|
190
|
-
};
|
|
191
|
-
|
|
192
|
-
(impl @fields_provider $name:ident {}) => {};
|
|
193
|
-
|
|
194
|
-
(impl @fields_provider $name:ident {$($x:tt : $y:ty,)*}) => {
|
|
195
|
-
perspective_client::vendor::paste::paste! {
|
|
196
|
-
#[derive(PartialEq, Clone)]
|
|
197
|
-
pub struct [< $name State >] {
|
|
198
|
-
$($x: $y,)*
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
impl $crate::model::StateProvider for $name {
|
|
202
|
-
type State = [< $name State >];
|
|
203
|
-
fn clone_state(&self) -> Self::State {
|
|
204
|
-
Self::State {
|
|
205
|
-
$($x : self.$x.clone(),)*
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
PerspectiveProperties!(impl @fields [< $name State >] $($x : $y,)*);
|
|
211
|
-
}
|
|
212
|
-
};
|
|
213
|
-
|
|
214
|
-
(impl @fields $name:ident $field:ident : $value:ty, $($field_tail:ident : $value_tail:ty,)*) => {
|
|
215
|
-
PerspectiveProperties!(impl @field $name $field $value);
|
|
216
|
-
PerspectiveProperties!(impl @fields $name $($field_tail : $value_tail,)*);
|
|
217
|
-
};
|
|
218
|
-
|
|
219
|
-
(impl @fields $name:ident) => {};
|
|
220
|
-
|
|
221
|
-
// (impl @tuples $name:ident $value:tt : $acc:tt, $($value_tail:tt : $acc_tail:tt,)*) => {
|
|
222
|
-
// PerspectiveProperties!(impl @tuple $name $value $acc);
|
|
223
|
-
// PerspectiveProperties!(impl @tuples $name $($value_tail : $acc_tail,)*);
|
|
224
|
-
// };
|
|
225
|
-
|
|
226
|
-
// (impl @tuples $name:ident) => {};
|
|
227
|
-
|
|
228
|
-
($(#[$m:meta])* $pub:vis struct $name:ident { $($(#[$_m:meta])* $_p:vis $field:ident : $value:ty),* $(,)? }) => {
|
|
229
|
-
PerspectiveProperties!(impl @fields $name $($field : $value,)*);
|
|
230
|
-
PerspectiveProperties!(impl @fields_provider $name {} $($field,)*);
|
|
231
|
-
};
|
|
232
|
-
|
|
233
|
-
// ($(#[$m:meta])* $pub:vis struct $name:ident ( $($(#[$_m:meta])* $value:tt $(< $_ttt:ty >)?),* $(,)? );) => {
|
|
234
|
-
// PerspectiveProperties!(impl @tuples $name $($value : ${index()} ,)*);
|
|
235
|
-
// };
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
pub trait StateProvider {
|
|
239
|
-
type State: Clone + 'static;
|
|
240
|
-
|
|
241
|
-
/// Clones _just_ the state objects fields into a new dedicated state
|
|
242
|
-
/// struct (generated by [`PerspectiveProperties`]).
|
|
243
|
-
fn clone_state(&self) -> Self::State;
|
|
244
|
-
}
|
package/src/themes/dracula.less
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
// ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
|
|
2
|
-
// ┃ ██████ ██████ ██████ █ █ █ █ █ █▄ ▀███ █ ┃
|
|
3
|
-
// ┃ ▄▄▄▄▄█ █▄▄▄▄▄ ▄▄▄▄▄█ ▀▀▀▀▀█▀▀▀▀▀ █ ▀▀▀▀▀█ ████████▌▐███ ███▄ ▀█ █ ▀▀▀▀▀ ┃
|
|
4
|
-
// ┃ █▀▀▀▀▀ █▀▀▀▀▀ █▀██▀▀ ▄▄▄▄▄ █ ▄▄▄▄▄█ ▄▄▄▄▄█ ████████▌▐███ █████▄ █ ▄▄▄▄▄ ┃
|
|
5
|
-
// ┃ █ ██████ █ ▀█▄ █ ██████ █ ███▌▐███ ███████▄ █ ┃
|
|
6
|
-
// ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
|
|
7
|
-
// ┃ Copyright (c) 2017, the Perspective Authors. ┃
|
|
8
|
-
// ┃ ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ ┃
|
|
9
|
-
// ┃ This file is part of the Perspective library, distributed under the terms ┃
|
|
10
|
-
// ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
|
|
11
|
-
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
|
|
12
|
-
|
|
13
|
-
@import "icons.less";
|
|
14
|
-
|
|
15
|
-
@import url("ref://pro-dark.less");
|
|
16
|
-
|
|
17
|
-
perspective-viewer,
|
|
18
|
-
perspective-viewer[theme="Dracula"] {
|
|
19
|
-
--theme-name: "Dracula";
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
perspective-viewer[theme="Dracula"] {
|
|
23
|
-
@include perspective-viewer-pro-dark;
|
|
24
|
-
@include perspective-viewer-dracula--colors;
|
|
25
|
-
@include perspective-viewer-dracula--animation;
|
|
26
|
-
@include perspective-viewer-dracula--fonts;
|
|
27
|
-
@include perspective-viewer-dracula--datagrid;
|
|
28
|
-
@include perspective-viewer-dracula--d3fc;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
perspective-copy-menu[theme="Dracula"],
|
|
32
|
-
perspective-export-menu[theme="Dracula"],
|
|
33
|
-
perspective-dropdown[theme="Dracula"] {
|
|
34
|
-
@include perspective-modal-pro-dark;
|
|
35
|
-
@include perspective-viewer-dracula--colors;
|
|
36
|
-
background-color: var(--theme-bg0);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
@mixin perspective-viewer-dracula--colors {
|
|
40
|
-
--theme-bg0: #191a22;
|
|
41
|
-
--theme-bg1: #282a36;
|
|
42
|
-
--theme-bg2: #44475a;
|
|
43
|
-
|
|
44
|
-
--theme-gray: #928374;
|
|
45
|
-
|
|
46
|
-
--theme-fg0: #f8f8f2;
|
|
47
|
-
--theme-fg1: #6272a4;
|
|
48
|
-
--theme-fg2: #44475a;
|
|
49
|
-
|
|
50
|
-
--theme-red: #ff5555;
|
|
51
|
-
--theme-green: #50fa7b;
|
|
52
|
-
--theme-yellow: #f1fa8c;
|
|
53
|
-
--theme-blue: #8be9fd;
|
|
54
|
-
--theme-purple: #bd93f9;
|
|
55
|
-
--theme-orange: #ffb86c;
|
|
56
|
-
--theme-pink: #ff79c6;
|
|
57
|
-
|
|
58
|
-
color: var(--theme-fg0);
|
|
59
|
-
background-color: var(--theme-bg0);
|
|
60
|
-
--icon--color: var(--theme-fg1);
|
|
61
|
-
--inactive--color: var(--theme-fg2);
|
|
62
|
-
--inactive--border-color: var(--theme-bg2);
|
|
63
|
-
--plugin--background: var(--theme-bg1);
|
|
64
|
-
--status-icon-connected--color: var(--theme-green);
|
|
65
|
-
--status-icon-initializing--color: var(--theme-yellow);
|
|
66
|
-
--status-icon-error--color: var(--theme-red);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
@mixin perspective-viewer-dracula--datagrid {
|
|
70
|
-
--rt-pos-cell--color: var(--theme-blue);
|
|
71
|
-
--rt-neg-cell--color: var(--theme-red);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
@mixin perspective-viewer-dracula--d3fc {
|
|
75
|
-
--d3fc-axis-ticks--color: var(--theme-fg1);
|
|
76
|
-
--d3fc-gridline--color: var(--theme-bg2);
|
|
77
|
-
--d3fc-series: var(--theme-blue);
|
|
78
|
-
--d3fc-series-1: var(--theme-blue);
|
|
79
|
-
--d3fc-series-2: var(--theme-red);
|
|
80
|
-
--d3fc-series-3: var(--theme-green);
|
|
81
|
-
--d3fc-series-4: var(--theme-yellow);
|
|
82
|
-
--d3fc-series-5: var(--theme-purple);
|
|
83
|
-
--d3fc-series-6: var(--theme-pink);
|
|
84
|
-
--d3fc-series-7: var(--theme-orange);
|
|
85
|
-
|
|
86
|
-
--d3fc-negative--gradient: linear-gradient(
|
|
87
|
-
var(--theme-bg0),
|
|
88
|
-
var(--theme-red)
|
|
89
|
-
) !important;
|
|
90
|
-
|
|
91
|
-
--d3fc-positive--gradient: linear-gradient(
|
|
92
|
-
var(--theme-bg0),
|
|
93
|
-
var(--theme-blue)
|
|
94
|
-
) !important;
|
|
95
|
-
|
|
96
|
-
--d3fc-full--gradient: linear-gradient(
|
|
97
|
-
var(--theme-red),
|
|
98
|
-
var(--theme-bg0),
|
|
99
|
-
var(--theme-blue)
|
|
100
|
-
) !important;
|
|
101
|
-
}
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
// ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
|
|
2
|
-
// ┃ ██████ ██████ ██████ █ █ █ █ █ █▄ ▀███ █ ┃
|
|
3
|
-
// ┃ ▄▄▄▄▄█ █▄▄▄▄▄ ▄▄▄▄▄█ ▀▀▀▀▀█▀▀▀▀▀ █ ▀▀▀▀▀█ ████████▌▐███ ███▄ ▀█ █ ▀▀▀▀▀ ┃
|
|
4
|
-
// ┃ █▀▀▀▀▀ █▀▀▀▀▀ █▀██▀▀ ▄▄▄▄▄ █ ▄▄▄▄▄█ ▄▄▄▄▄█ ████████▌▐███ █████▄ █ ▄▄▄▄▄ ┃
|
|
5
|
-
// ┃ █ ██████ █ ▀█▄ █ ██████ █ ███▌▐███ ███████▄ █ ┃
|
|
6
|
-
// ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
|
|
7
|
-
// ┃ Copyright (c) 2017, the Perspective Authors. ┃
|
|
8
|
-
// ┃ ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ ┃
|
|
9
|
-
// ┃ This file is part of the Perspective library, distributed under the terms ┃
|
|
10
|
-
// ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
|
|
11
|
-
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
|
|
12
|
-
|
|
13
|
-
@import "icons.less";
|
|
14
|
-
|
|
15
|
-
@import url("ref://pro-dark.less");
|
|
16
|
-
|
|
17
|
-
perspective-viewer,
|
|
18
|
-
perspective-viewer[theme="Gruvbox Dark"] {
|
|
19
|
-
--theme-name: "Gruvbox Dark";
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
perspective-viewer[theme="Gruvbox Dark"] {
|
|
23
|
-
@include perspective-viewer-pro-dark;
|
|
24
|
-
@include perspective-viewer-gruvbox-dark--colors;
|
|
25
|
-
@include perspective-viewer-gruvbox-dark--animation;
|
|
26
|
-
@include perspective-viewer-gruvbox-dark--fonts;
|
|
27
|
-
@include perspective-viewer-gruvbox-dark--datagrid;
|
|
28
|
-
@include perspective-viewer-gruvbox-dark--d3fc;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
perspective-copy-menu[theme="Gruvbox Dark"],
|
|
32
|
-
perspective-export-menu[theme="Gruvbox Dark"],
|
|
33
|
-
perspective-dropdown[theme="Gruvbox Dark"] {
|
|
34
|
-
@include perspective-modal-pro-dark;
|
|
35
|
-
@include perspective-viewer-gruvbox-dark--colors;
|
|
36
|
-
background-color: var(--theme-bg0);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
@mixin perspective-viewer-gruvbox-dark--colors {
|
|
40
|
-
--theme-bg0: #282828;
|
|
41
|
-
--theme-bg1: #3c3836;
|
|
42
|
-
--theme-bg2: #7c6f64;
|
|
43
|
-
|
|
44
|
-
--theme-gray: #928374;
|
|
45
|
-
|
|
46
|
-
--theme-fg0: #fbf1c7;
|
|
47
|
-
--theme-fg1: #ebdbb2;
|
|
48
|
-
--theme-fg2: #a89984;
|
|
49
|
-
|
|
50
|
-
--theme-red: #cc241d;
|
|
51
|
-
--theme-green: #98871a;
|
|
52
|
-
--theme-yellow: #d79921;
|
|
53
|
-
--theme-blue: #458588;
|
|
54
|
-
--theme-purple: #b16286;
|
|
55
|
-
--theme-aqua: #689d5a;
|
|
56
|
-
--theme-orange: #d65d0e;
|
|
57
|
-
|
|
58
|
-
--theme-alt-red: #fb4934;
|
|
59
|
-
--theme-alt-green: #b8bb26;
|
|
60
|
-
--theme-alt-yellow: #fabd2f;
|
|
61
|
-
--theme-alt-blue: #83a598;
|
|
62
|
-
--theme-alt-purple: #d3869b;
|
|
63
|
-
--theme-alt-aqua: #8ec07c;
|
|
64
|
-
--theme-alt-orange: #fe8019;
|
|
65
|
-
|
|
66
|
-
color: var(--theme-fg0);
|
|
67
|
-
background-color: var(--theme-bg0);
|
|
68
|
-
--icon--color: var(--theme-fg1);
|
|
69
|
-
--inactive--color: var(--theme-fg2);
|
|
70
|
-
--inactive--border-color: var(--theme-bg2);
|
|
71
|
-
--plugin--background: var(--theme-bg1);
|
|
72
|
-
--status-icon-connected--color: var(--theme-aqua);
|
|
73
|
-
--status-icon-initializing--color: var(--theme-yellow);
|
|
74
|
-
--status-icon-error--color: var(--theme-red);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
@mixin perspective-viewer-gruvbox-dark--datagrid {
|
|
78
|
-
--rt-pos-cell--color: var(--theme-alt-blue);
|
|
79
|
-
--rt-neg-cell--color: var(--theme-alt-red);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
@mixin perspective-viewer-gruvbox-dark--d3fc {
|
|
83
|
-
--d3fc-axis-ticks--color: var(--theme-fg1);
|
|
84
|
-
--d3fc-gridline--color: var(--theme-bg2);
|
|
85
|
-
--d3fc-series: var(--theme-blue);
|
|
86
|
-
--d3fc-series-1: var(--theme-blue);
|
|
87
|
-
--d3fc-series-2: var(--theme-red);
|
|
88
|
-
--d3fc-series-3: var(--theme-green);
|
|
89
|
-
--d3fc-series-4: var(--theme-purple);
|
|
90
|
-
--d3fc-series-5: var(--theme-aqua);
|
|
91
|
-
--d3fc-series-6: var(--theme-alt-blue);
|
|
92
|
-
--d3fc-series-7: var(--theme-alt-red);
|
|
93
|
-
--d3fc-series-8: var(--theme-alt-green);
|
|
94
|
-
--d3fc-series-9: var(--theme-alt-purple);
|
|
95
|
-
--d3fc-series-10: var(--theme-alt-aqua);
|
|
96
|
-
|
|
97
|
-
--d3fc-negative--gradient: linear-gradient(
|
|
98
|
-
var(--theme-bg0),
|
|
99
|
-
var(--theme-red),
|
|
100
|
-
var(--theme-alt-red)
|
|
101
|
-
) !important;
|
|
102
|
-
|
|
103
|
-
--d3fc-positive--gradient: linear-gradient(
|
|
104
|
-
var(--theme-bg0),
|
|
105
|
-
var(--theme-blue),
|
|
106
|
-
var(--theme-alt-blue)
|
|
107
|
-
) !important;
|
|
108
|
-
|
|
109
|
-
--d3fc-full--gradient: linear-gradient(
|
|
110
|
-
var(--theme-alt-red),
|
|
111
|
-
var(--theme-red),
|
|
112
|
-
var(--theme-bg0),
|
|
113
|
-
var(--theme-blue),
|
|
114
|
-
var(--theme-alt-blue)
|
|
115
|
-
) !important;
|
|
116
|
-
}
|