@perspective-dev/workspace 4.3.0 → 4.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22,7 +22,7 @@ export declare class PerspectiveViewerWidget extends Widget {
22
22
  toggleConfig(): Promise<void>;
23
23
  load(table: psp.Table | Promise<psp.Table>): Promise<void>;
24
24
  restore(config: psp_viewer.ViewerConfigUpdate): Promise<any>;
25
- save(): Promise<any>;
25
+ save(): Promise<import("@perspective-dev/viewer/dist/wasm/perspective-viewer.js").ViewerConfig>;
26
26
  addClass(name: string): void;
27
27
  removeClass(name: string): void;
28
28
  setCallback(callback?: (event: MouseEvent) => {}): void;
@@ -1,6 +1,6 @@
1
1
  import { SplitPanel } from "@lumino/widgets";
2
2
  import { DebouncedFuncLeading } from "lodash";
3
- import type { HTMLPerspectiveViewerElement } from "@perspective-dev/viewer";
3
+ import type { HTMLPerspectiveViewerElement, ViewerConfig } from "@perspective-dev/viewer";
4
4
  import type * as psp from "@perspective-dev/client";
5
5
  import type * as psp_viewer from "@perspective-dev/viewer";
6
6
  import { PerspectiveDockPanel } from "./dockpanel";
@@ -84,9 +84,11 @@ export declare class PerspectiveWorkspace extends SplitPanel {
84
84
  _unmaximize(): void;
85
85
  toggleSingleDocument(widget: PerspectiveViewerWidget): void;
86
86
  _filterViewer(viewer: HTMLPerspectiveViewerElement, removeFilters: psp.Filter[], insertFilters: psp.Filter[], candidates: Set<string>): Promise<void>;
87
- onPerspectiveSelect(event: CustomEvent): Promise<void>;
87
+ onPerspectiveSelect(filterFun: (config: ViewerConfig) => boolean, event: CustomEvent): Promise<void>;
88
+ private on_select_callback;
89
+ private on_global_filter_callback;
88
90
  makeMaster(widget: PerspectiveViewerWidget): Promise<void>;
89
- makeDetail(widget: PerspectiveViewerWidget): void;
91
+ makeDetail(widget: PerspectiveViewerWidget): Promise<void>;
90
92
  /***************************************************************************
91
93
  *
92
94
  * Context Menu
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@perspective-dev/workspace",
3
- "version": "4.3.0",
3
+ "version": "4.4.1",
4
4
  "description": "Perspective Workspace",
5
5
  "files": [
6
6
  "dist/**/*",
@@ -41,7 +41,7 @@
41
41
  },
42
42
  "devDependencies": {
43
43
  "@perspective-dev/viewer": "",
44
- "@prospective.co/procss": "0.1.18",
44
+ "lightningcss": "^1.29.0",
45
45
  "@perspective-dev/esbuild-plugin": "",
46
46
  "@perspective-dev/test": "",
47
47
  "@types/lodash": "^4.17.20",
@@ -0,0 +1,110 @@
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
+
14
+ :host {
15
+ .lm-DockPanel {
16
+ overflow: var(--dock-panel--overflow, hidden);
17
+ position: absolute;
18
+ background-color: var(--detail--background-color, transparent);
19
+ padding: var(--psp-workspace--spacing);
20
+ top: 0;
21
+ left: 0;
22
+ right: 0;
23
+ bottom: 0;
24
+ &[data-mode="single-document"] {
25
+ padding: 0px;
26
+ }
27
+ }
28
+
29
+ .lm-Widget,
30
+ .lm-Widget {
31
+ cursor: inherit;
32
+ }
33
+
34
+ .lm-DockPanel.ew,
35
+ .lm-DockPanel.ew .lm-Widget,
36
+ .lm-SplitPanel.ew,
37
+ .lm-SplitPanel.ew .lm-Widget {
38
+ cursor: ew-resize !important;
39
+ }
40
+
41
+ .lm-DockPanel.ns,
42
+ .lm-DockPanel.ns .lm-Widget,
43
+ .lm-SplitPanel.ns,
44
+ .lm-SplitPanel.ns .lm-Widget {
45
+ cursor: ns-resize !important;
46
+ }
47
+
48
+ .workspace-master-widget {
49
+ min-width: 100px !important;
50
+ }
51
+
52
+ .lm-DockPanel.resizing ::slotted(perspective-viewer),
53
+ .lm-SplitPanel.resizing ::slotted(perspective-viewer) {
54
+ pointer-events: none;
55
+ }
56
+
57
+ .widget-blur ::slotted(perspective-viewer) {
58
+ opacity: 0.5;
59
+ }
60
+
61
+ .lm-DockPanel-handle.resizing {
62
+ background-color: rgba(0, 0, 0, 0.05);
63
+ }
64
+
65
+ .perspective-scroll-panel {
66
+ overflow: auto !important;
67
+ }
68
+
69
+ .lm-Panel {
70
+ min-height: 100%;
71
+ }
72
+
73
+ .lm-DockPanel-handle {
74
+ background-color: none;
75
+ }
76
+
77
+ .lm-SplitPanel-handle {
78
+ background-color: var(
79
+ --psp-workspace--split-panel-handle--background-color
80
+ );
81
+ }
82
+
83
+ .lm-SplitPanel-handle,
84
+ .lm-DockPanel-handle {
85
+ transition: background-color 0.3s ease-out;
86
+ &:hover {
87
+ background-color: rgba(0, 0, 0, 0.05);
88
+ }
89
+ }
90
+
91
+ .lm-DockPanel-handle[data-orientation="horizontal"] {
92
+ width: 10px !important;
93
+ margin-left: -5px;
94
+ }
95
+
96
+ .lm-DockPanel-handle[data-orientation="vertical"] {
97
+ height: 10px !important;
98
+ margin-top: -5px;
99
+ }
100
+
101
+ .lm-DockPanel-overlay {
102
+ background: rgba(75, 75, 75, 0.2);
103
+ border: 1px dashed #666;
104
+ border-radius: 6px;
105
+ transition-property: top, left, right, bottom;
106
+ transition-duration: 50ms;
107
+ transition-timing-function: linear;
108
+ margin: 0px;
109
+ }
110
+ }
@@ -1,14 +1,15 @@
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
- // ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
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
+ */
12
13
 
13
- @import "./viewer.less";
14
- @import "./menu.less";
14
+ @import "./viewer.css";
15
+ @import "./menu.css";
@@ -0,0 +1,130 @@
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
+
14
+ @import "@lumino/widgets/style/menu.css";
15
+
16
+ :host {
17
+ .lm-Menu {
18
+ font-size: 12px;
19
+ padding: 8px;
20
+ background-color: var(--psp--background-color);
21
+ color: var(--psp--color);
22
+ border: 1px solid var(--psp-inactive--color);
23
+ border-radius: 3px;
24
+ max-width: 350px;
25
+ top: 0;
26
+ left: 0;
27
+ }
28
+
29
+ .lm-Menu.perspective-workspace-menu {
30
+ .lm-Menu-item {
31
+ padding-left: 37px !important;
32
+ }
33
+ }
34
+
35
+ .lm-Menu-item.lm-mod-active {
36
+ background-color: var(--psp--color);
37
+ color: var(--psp--background-color);
38
+ }
39
+
40
+ .lm-Menu-item.lm-mod-disabled {
41
+ opacity: 0.5;
42
+ }
43
+
44
+ .lm-Menu-itemIcon {
45
+ width: 24px;
46
+ height: 12px;
47
+ margin-right: 4px;
48
+ }
49
+
50
+ .lm-Menu-itemLabel {
51
+ flex: 1 1;
52
+ padding: 4px 2px 4px 2px;
53
+ }
54
+
55
+ .lm-Menu-itemMnemonic {
56
+ text-decoration: underline;
57
+ }
58
+
59
+ .lm-Menu-itemShortcut {
60
+ padding: 4px 0px;
61
+ }
62
+
63
+ .lm-Menu-itemSubmenuIcon {
64
+ width: 24px;
65
+ height: 18px;
66
+ }
67
+
68
+ .lm-Menu-item {
69
+ display: flex;
70
+ align-items: center;
71
+ outline: none;
72
+
73
+ margin: 0 -8px;
74
+ padding: 0 8px;
75
+ }
76
+
77
+ .lm-Menu-item[data-type="separator"] > div {
78
+ padding: 0;
79
+ height: 9px;
80
+ }
81
+
82
+ .lm-Menu-item[data-type="separator"] > div::after {
83
+ content: "";
84
+ display: block;
85
+ position: relative;
86
+ top: 4px;
87
+ border-top: 1px solid;
88
+ }
89
+
90
+ .lm-MenuBar-menu {
91
+ transform: translateY(-1px);
92
+ }
93
+
94
+ .lm-MenuBar-item {
95
+ padding: 10px 32px;
96
+ border-left: 1px solid transparent;
97
+ border-right: 1px solid transparent;
98
+ color: #737373 !important;
99
+ }
100
+
101
+ .lm-MenuBar-item.lm-mod-active {
102
+ background: rgba(0, 0, 0, 0.2);
103
+ }
104
+
105
+ .lm-MenuBar.lm-mod-active .lm-MenuBar-item.lm-mod-active {
106
+ z-index: 10001;
107
+ background: rgba(0, 0, 0, 0.2);
108
+ /* border-left: 1px solid #c0c0c0; */
109
+ /* border-right: 1px solid #c0c0c0; */
110
+ }
111
+
112
+ .lm-Menu-itemIcon:before {
113
+ content: attr(content);
114
+ font-family:
115
+ "ui-monospace", "SFMono-Regular", "SF Mono", "Menlo", "Consolas",
116
+ "Liberation Mono", monospace;
117
+ }
118
+
119
+ [data-type="submenu"] .lm-Menu-itemSubmenuIcon:before {
120
+ content: ">";
121
+ font-family:
122
+ "ui-monospace", "SFMono-Regular", "SF Mono", "Menlo", "Consolas",
123
+ "Liberation Mono", monospace;
124
+ height: 18px;
125
+ }
126
+
127
+ .lm-mod-drag-image.lm-TabBar-tab {
128
+ display: none;
129
+ }
130
+ }