@perspective-dev/workspace 4.0.1 → 4.1.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.
@@ -2,12 +2,13 @@ import { DockLayout, DockPanel, TabBar, Widget } from "@lumino/widgets";
2
2
  import { PerspectiveWorkspace } from "./workspace";
3
3
  import { PerspectiveViewerWidget } from "./widget";
4
4
  export declare class PerspectiveDockPanel extends DockPanel {
5
+ _workspace: PerspectiveWorkspace;
5
6
  constructor(workspace: PerspectiveWorkspace);
6
7
  _onTabDetachRequested(sender: TabBar<Widget>, args: TabBar.ITabDetachRequestedArgs<Widget>): void;
7
8
  static getWidgets(layout: DockPanel.ILayoutConfig): PerspectiveViewerWidget[];
8
9
  static getAreaWidgets(layout: DockLayout.AreaConfig): PerspectiveViewerWidget[];
9
10
  widgets(): IterableIterator<PerspectiveViewerWidget>;
10
- static mapWidgets(widgetFunc: (widget: any) => any, layout: any): DockPanel.ILayoutConfig;
11
- static mapAreaWidgets(widgetFunc: (widget: any) => any, layout: DockLayout.AreaConfig): DockLayout.AreaConfig;
11
+ static mapWidgets(widgetFunc: (widget: any) => Promise<any>, layout: any): Promise<DockPanel.ILayoutConfig>;
12
+ static mapAreaWidgets(widgetFunc: (widget: any) => Promise<any>, layout: DockLayout.AreaConfig): Promise<DockLayout.AreaConfig>;
12
13
  onAfterAttach(): void;
13
14
  }
@@ -14,6 +14,4 @@ export declare class PerspectiveTabBarRenderer extends TabBar.Renderer {
14
14
  }): import("@lumino/virtualdom").VirtualElement;
15
15
  renderInert(): import("@lumino/virtualdom").VirtualElement;
16
16
  renderTab(data: TabBar.IRenderData<any>, onclick?: (this: HTMLElement, event: MouseEvent) => any): import("@lumino/virtualdom").VirtualElement;
17
- renderDragHandle(): import("@lumino/virtualdom").VirtualElement;
18
- renderCloseIcon(): import("@lumino/virtualdom").VirtualElement;
19
17
  }
@@ -2,26 +2,31 @@ import { Widget } from "@lumino/widgets";
2
2
  import { Message } from "@lumino/messaging";
3
3
  import type * as psp_viewer from "@perspective-dev/viewer";
4
4
  import type * as psp from "@perspective-dev/client";
5
+ import { PerspectiveTabBar } from "./tabbar";
5
6
  interface IPerspectiveViewerWidgetOptions {
6
7
  node: HTMLElement;
7
8
  viewer: psp_viewer.HTMLPerspectiveViewerElement;
9
+ onAttach?: () => void;
8
10
  }
9
11
  export declare class PerspectiveViewerWidget extends Widget {
10
12
  viewer: psp_viewer.HTMLPerspectiveViewerElement;
11
13
  _title: string;
12
- _is_table_loaded: boolean;
13
14
  _is_pivoted: boolean;
14
15
  _restore_config?: () => Promise<void>;
15
- task?: Promise<void>;
16
- constructor({ viewer, node }: IPerspectiveViewerWidgetOptions);
16
+ _onAttach?: () => void;
17
+ _titlebar?: PerspectiveTabBar;
18
+ _deleted: boolean;
19
+ _titlebar_callback?: (event: MouseEvent) => {};
20
+ constructor({ viewer, node, onAttach }: IPerspectiveViewerWidgetOptions);
17
21
  get name(): string;
18
22
  toggleConfig(): Promise<void>;
19
23
  load(table: psp.Table | Promise<psp.Table>): Promise<void>;
20
- restore(config: psp_viewer.ViewerConfigUpdate & {
21
- table: string;
22
- }): Promise<any> | undefined;
24
+ restore(config: psp_viewer.ViewerConfigUpdate): Promise<any>;
23
25
  save(): Promise<any>;
26
+ addClass(name: string): void;
24
27
  removeClass(name: string): void;
28
+ setCallback(callback?: (event: MouseEvent) => {}): void;
29
+ protected onAfterAttach(msg: Message): void;
25
30
  onCloseRequest(msg: Message): Promise<void>;
26
31
  }
27
32
  export {};
@@ -1,31 +1,48 @@
1
1
  import { SplitPanel } from "@lumino/widgets";
2
- import type { HTMLPerspectiveViewerElement, ViewerConfigUpdate } from "@perspective-dev/viewer";
2
+ import { DebouncedFuncLeading } from "lodash";
3
+ import type { HTMLPerspectiveViewerElement } from "@perspective-dev/viewer";
3
4
  import type * as psp from "@perspective-dev/client";
5
+ import type * as psp_viewer from "@perspective-dev/viewer";
4
6
  import { PerspectiveDockPanel } from "./dockpanel";
5
7
  import { WorkspaceMenu } from "./menu";
6
8
  import { PerspectiveViewerWidget } from "./widget";
7
- import { ObservableMap } from "../utils/observable_map";
8
- export interface PerspectiveLayout<T> {
9
- children?: PerspectiveLayout<T>[];
10
- widgets?: T[];
11
- sizes: number[];
12
- }
13
- export interface ViewerConfigUpdateExt extends ViewerConfigUpdate {
14
- table: string;
9
+ declare class AsyncMutex {
10
+ _lock: Promise<unknown> | null;
11
+ constructor();
12
+ lock<A>(continuation: () => Promise<A>): Promise<A>;
15
13
  }
16
- export interface PerspectiveWorkspaceConfig<T> {
14
+ export type PerspectiveSplitArea = {
15
+ type: "split-area";
16
+ sizes: number[];
17
+ orientation: "horizontal" | "vertical";
18
+ children: PerspectiveLayout[];
19
+ };
20
+ export type PerspectiveTabArea = {
21
+ type: "tab-area";
22
+ currentIndex: number;
23
+ widgets: string[];
24
+ };
25
+ export type PerspectiveLayout = PerspectiveSplitArea | PerspectiveTabArea;
26
+ export interface PerspectiveWorkspaceConfig {
17
27
  sizes: number[];
18
- master: PerspectiveLayout<T>;
19
- detail: PerspectiveLayout<T>;
20
- viewers: Record<string, ViewerConfigUpdateExt>;
28
+ viewers: Record<string, psp_viewer.ViewerConfigUpdate>;
29
+ detail: {
30
+ main: PerspectiveLayout | null;
31
+ };
32
+ master?: {
33
+ sizes: number[];
34
+ widgets: string[];
35
+ };
21
36
  }
37
+ export declare function genId(workspace: PerspectiveWorkspaceConfig): string;
38
+ export declare function addViewer(workspace: PerspectiveWorkspaceConfig, config: psp_viewer.ViewerConfigUpdate, id: string): PerspectiveWorkspaceConfig;
22
39
  export declare class PerspectiveWorkspace extends SplitPanel {
23
40
  private dockpanel;
24
41
  private detailPanel;
25
42
  private masterPanel;
43
+ client: psp.Client[];
26
44
  element: HTMLElement;
27
45
  menu_elem: HTMLElement;
28
- private _tables;
29
46
  private listeners;
30
47
  private indicator;
31
48
  private commands;
@@ -34,6 +51,7 @@ export declare class PerspectiveWorkspace extends SplitPanel {
34
51
  private _minimizedLayout?;
35
52
  private _maximizedWidget?;
36
53
  private _last_updated_state?;
54
+ _mutex: AsyncMutex;
37
55
  constructor(element: HTMLElement);
38
56
  get_context_menu(): WorkspaceMenu | undefined;
39
57
  get_dock_panel(): PerspectiveDockPanel;
@@ -44,28 +62,15 @@ export declare class PerspectiveWorkspace extends SplitPanel {
44
62
  * `<perspective-workspace>` Public API
45
63
  *
46
64
  */
47
- addTable(name: string, table: Promise<psp.Table>): void;
48
- getTable(name: string): psp.Table | Promise<psp.Table>;
49
- removeTable(name: string): boolean;
50
- replaceTable(name: string, table: Promise<psp.Table>): void;
51
- get tables(): ObservableMap<string, psp.Table | Promise<psp.Table>>;
52
- save(): Promise<{
53
- viewers: Record<string, ViewerConfigUpdate>;
54
- sizes: number[];
55
- detail: import("@lumino/widgets").DockLayout.ILayoutConfig | undefined;
56
- master: {
57
- widgets: string[];
58
- sizes: number[];
59
- } | undefined;
60
- }>;
61
- restore(value: PerspectiveWorkspaceConfig<string>): Promise<void>;
65
+ save(): Promise<PerspectiveWorkspaceConfig>;
66
+ restore(value: PerspectiveWorkspaceConfig): Promise<void>;
62
67
  _capture_widgets(): Generator<PerspectiveViewerWidget[], void, unknown>;
63
68
  _capture_viewers(): Generator<HTMLPerspectiveViewerElement[], void, unknown>;
64
- _restore_callback(viewers: Record<string, ViewerConfigUpdateExt>, starting_viewers: HTMLPerspectiveViewerElement[], starting_widgets: PerspectiveViewerWidget[], master: boolean, widgetName: string): PerspectiveViewerWidget;
69
+ _restore_callback(viewers: Record<string, psp_viewer.ViewerConfigUpdate>, starting_viewers: HTMLPerspectiveViewerElement[], starting_widgets: PerspectiveViewerWidget[], master: boolean, widgetName: string): Promise<PerspectiveViewerWidget>;
65
70
  _validate(table: any): any;
66
71
  _set_listener(name: string, table: psp.Table | Promise<psp.Table>): void;
67
72
  _delete_listener(name: string): void;
68
- update_widget_for_viewer(viewer: HTMLPerspectiveViewerElement): void;
73
+ update_widget_for_viewer(viewer: HTMLPerspectiveViewerElement): Promise<void>;
69
74
  remove_unslotted_widgets(viewers: HTMLPerspectiveViewerElement[]): void;
70
75
  update_details_panel(viewers: HTMLPerspectiveViewerElement[]): void;
71
76
  /***************************************************************************
@@ -96,21 +101,21 @@ export declare class PerspectiveWorkspace extends SplitPanel {
96
101
  */
97
102
  clearLayout(): void;
98
103
  setupMasterPanel(sizes: number[]): void;
99
- addViewer(config: ViewerConfigUpdateExt, is_global_filter?: boolean): void;
104
+ addViewer(config: psp_viewer.ViewerConfigUpdate, is_global_filter?: boolean): Promise<void>;
100
105
  /*********************************************************************
101
106
  * Widget helper methods
102
107
  */
103
108
  _createWidgetAndNode({ config, slot: slotname, }: {
104
- config: ViewerConfigUpdateExt;
109
+ config: psp_viewer.ViewerConfigUpdate;
105
110
  slot?: string;
106
- }): PerspectiveViewerWidget;
111
+ }): Promise<PerspectiveViewerWidget>;
107
112
  _gen_id(): string;
108
113
  _createNode(slotname?: string): HTMLElement;
109
114
  _createWidget({ config, elem, viewer, }: {
110
- config: ViewerConfigUpdateExt;
115
+ config?: psp_viewer.ViewerConfigUpdate;
111
116
  elem?: Element;
112
117
  viewer: HTMLPerspectiveViewerElement;
113
- }): PerspectiveViewerWidget;
118
+ }): Promise<PerspectiveViewerWidget>;
114
119
  _addWidgetEventListeners(widget: PerspectiveViewerWidget): void;
115
120
  getWidgetByName(name: string): PerspectiveViewerWidget | null;
116
121
  getAllWidgets(): PerspectiveViewerWidget[];
@@ -119,5 +124,7 @@ export declare class PerspectiveWorkspace extends SplitPanel {
119
124
  * `workspace-layout-update` event
120
125
  *
121
126
  */
127
+ _throttle?: DebouncedFuncLeading<() => Promise<void>>;
122
128
  workspaceUpdated(): Promise<void>;
123
129
  }
130
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@perspective-dev/workspace",
3
- "version": "4.0.1",
3
+ "version": "4.1.1",
4
4
  "description": "Perspective Workspace",
5
5
  "files": [
6
6
  "dist/**/*",
@@ -29,7 +29,6 @@
29
29
  "license": "Apache-2.0",
30
30
  "dependencies": {
31
31
  "@perspective-dev/client": "",
32
- "@perspective-dev/viewer": "",
33
32
  "@lumino/algorithm": ">=2 <3",
34
33
  "@lumino/commands": ">=2 <3",
35
34
  "@lumino/domutils": ">=2 <3",
@@ -41,6 +40,7 @@
41
40
  "lodash": "^4.17.20"
42
41
  },
43
42
  "devDependencies": {
43
+ "@perspective-dev/viewer": "",
44
44
  "@prospective.co/procss": "0.1.17",
45
45
  "@perspective-dev/esbuild-plugin": "",
46
46
  "@perspective-dev/test": "",
@@ -14,7 +14,7 @@
14
14
  overflow: var(--dock-panel--overflow, hidden);
15
15
  position: absolute;
16
16
  background-color: var(--detail--background-color, transparent);
17
- padding: 3px;
17
+ padding: var(--workspace-spacing);
18
18
  top: 0;
19
19
  left: 0;
20
20
  right: 0;
@@ -84,6 +84,16 @@
84
84
  }
85
85
  }
86
86
 
87
+ .lm-DockPanel-handle[data-orientation="horizontal"] {
88
+ width: 10px !important;
89
+ margin-left: -5px;
90
+ }
91
+
92
+ .lm-DockPanel-handle[data-orientation="vertical"] {
93
+ height: 10px !important;
94
+ margin-top: -5px;
95
+ }
96
+
87
97
  .lm-DockPanel-overlay {
88
98
  background: rgba(75, 75, 75, 0.2);
89
99
  border: 1px dashed #666;
@@ -115,17 +115,32 @@
115
115
  }
116
116
 
117
117
  .lm-TabBar-tab .drag-handle {
118
+ pointer-events: all;
118
119
  height: 12px;
119
- width: 5px;
120
+ width: 14px;
120
121
  -webkit-mask-image: var(--column-drag-handle--mask-image);
121
122
  mask-image: var(--column-drag-handle--mask-image);
122
- margin: 0px 0 0 21.5px;
123
+ padding: 12px 0 12px 12px;
123
124
  background-repeat: no-repeat;
124
- background-color: var(--inactive--color, red);
125
+ background-color: var(--icon--color, red);
125
126
  content: "";
126
127
  display: inline-block;
127
128
  -webkit-mask-size: cover;
128
- mask-size: cover;
129
+ mask-size: auto;
130
+ mask-position: center;
131
+ mask-repeat: no-repeat;
132
+ }
133
+
134
+ .lm-TabBar {
135
+ // z-index: -1;
136
+ pointer-events: none;
137
+ .lm-TabBar-tabCloseIcon {
138
+ pointer-events: all;
139
+ }
140
+
141
+ .bookmarks-button {
142
+ pointer-events: all;
143
+ }
129
144
  }
130
145
 
131
146
  .lm-TabBar-tab.lm-mod-hidden {
@@ -141,9 +156,9 @@
141
156
  // height: 18px;
142
157
  // }
143
158
 
144
- .lm-TabBar {
145
- min-height: 40px !important;
146
- }
159
+ // .lm-TabBar {
160
+ // // min-height: 0px !important;
161
+ // }
147
162
 
148
163
  @border-color: 1px solid #eaeaea;
149
164
  @night-border-color: 1px solid #ddd;
@@ -239,6 +254,7 @@
239
254
  color: #737373;
240
255
  height: 40px !important;
241
256
  max-height: 40px !important;
257
+ margin-bottom: -40px;
242
258
  transform: none !important;
243
259
  transition: color 0.2s ease-out;
244
260
  }
@@ -296,14 +312,18 @@
296
312
 
297
313
  .lm-TabBar-content > .lm-TabBar-tab.lm-mod-current {
298
314
  color: var(--workspace-tabbar--color, #666) !important;
299
- border: var(--workspace-tabbar--border, 1px solid #ddd);
300
- border-width: var(--workspace-tabbar-tab--border-width);
301
- box-shadow: 0 13px 0 -12px var(--inactive--border-color);
302
- border-radius: var(--workspace-tabbar--border-radius, 6px)
303
- var(--workspace-tabbar--border-radius, 6px) 0 0;
304
- background-color: var(--workspace-tabbar--background-color, white);
315
+ // border: var(--workspace-tabbar--border, 1px solid #ddd);
316
+ // border-width: var(--workspace-tabbar-tab--border-width);
317
+ // box-shadow: 0 13px 0 -12px var(--inactive--border-color);
318
+ // border-radius: var(--workspace-tabbar--border-radius, 6px)
319
+ // var(--workspace-tabbar--border-radius, 6px) 0 0;
320
+ // background-color: var(--workspace-tabbar--background-color, white);
321
+ background: none;
305
322
  height: 40px !important;
306
323
  max-height: 40px !important;
324
+ margin-bottom: -40px;
325
+ border: 0 solid transparent;
326
+ border-width: 1px 1px 0px 1px;
307
327
  }
308
328
 
309
329
  .bottom .lm-TabBar-tab.lm-mod-current {
@@ -337,18 +357,21 @@
337
357
  .bookmarks-button {
338
358
  margin-left: 11px;
339
359
  margin-right: -13px;
360
+ height: 20px;
340
361
  border-radius: 3px;
341
- height: 22px;
362
+ border: 1px solid var(--inactive--color);
363
+ background-color: var(--plugin--background);
342
364
 
343
365
  &:hover {
344
366
  background-color: var(--icon--color);
367
+ border-color: var(--icon--color);
345
368
  }
346
369
  }
347
370
 
348
371
  .bookmarks {
349
- cursor: pointer;
350
372
  @include icon;
351
- width: 26px;
373
+ cursor: pointer;
374
+ width: 20px;
352
375
  height: 12px;
353
376
  -webkit-mask-image: var(--bookmarks--mask-image);
354
377
  mask-image: var(--bookmarks--mask-image);
@@ -358,7 +381,7 @@
358
381
  mask-size: auto;
359
382
  -webkit-mask-repeat: no-repeat;
360
383
  mask-repeat: no-repeat;
361
- padding: 5px;
384
+ padding: 4px 6px;
362
385
 
363
386
  &:hover {
364
387
  background-color: var(--plugin--background);
@@ -12,7 +12,8 @@
12
12
 
13
13
  @border-color: 1px solid #eaeaea;
14
14
 
15
- .workspace-master-widget {
15
+ ::slotted(.workspace-master-widget) {
16
+ --status-bar--display: none;
16
17
  --config-button-icon--content: var(
17
18
  --open-settings-button--content,
18
19
  "\1F527"
@@ -64,6 +65,10 @@
64
65
  }
65
66
  }
66
67
 
68
+ :host {
69
+ --bookmarks--mask-image: url("../svg/bookmark-icon.svg");
70
+ }
71
+
67
72
  ::slotted(perspective-viewer) {
68
73
  flex: 1;
69
74
  position: relative;
@@ -74,6 +79,26 @@
74
79
  width: 100%;
75
80
  height: 100%;
76
81
  overflow: visible !important;
82
+ --close-button--display: flex;
83
+ }
84
+
85
+ ::slotted(perspective-viewer.bookmarks-container:not([settings])) {
86
+ --status-ok-icon--mask-image: var(--bookmarks--mask-image) !important;
87
+ --status-ok-icon--border-color: var(--inactive--color);
88
+ --status-ok-icon--hover--border-color: var(--icon--color);
89
+ --status-ok-icon--hover--background-color: var(--icon--color);
90
+ --status-ok-icon--hover--color: var(--plugin--background);
91
+ --status-ok-icon--cursor: pointer;
92
+ --status-indicator--pointer-events: all;
93
+ }
94
+
95
+ ::slotted(perspective-viewer::part(status-indicator)) {
96
+ background-color: red;
97
+ border: 1px solid red;
98
+ }
99
+
100
+ ::slotted(perspective-viewer:not(.widget-maximize)) {
101
+ --status-bar--padding: 0 36px 0 8px;
77
102
  }
78
103
 
79
104
  :host-context(.lm-mod-override-cursor) {
@@ -15,7 +15,9 @@
15
15
  .lm-DockPanel:not([data-mode="single-document"]) .viewer-container {
16
16
  border: var(--workspace-tabbar--border, 1px solid var(--inactive--color));
17
17
  border-width: var(--workspace-tabbar--border-width);
18
- border-radius: 0 0 var(--workspace-tabbar--border-radius, 6px)
18
+ border-radius: var(--workspace-tabbar--border-radius, 6px)
19
+ var(--workspace-tabbar--border-radius, 6px)
20
+ var(--workspace-tabbar--border-radius, 6px)
19
21
  var(--workspace-tabbar--border-radius, 6px);
20
22
  }
21
23
 
@@ -28,7 +28,7 @@
28
28
  @import "./dockpanel.less";
29
29
  @import "./widget.less";
30
30
 
31
- background-color: hsl(210deg 18% 90%);
31
+ --workspace-spacing: 3px;
32
32
 
33
33
  // width: 100%;
34
34
  // height: 100%;
@@ -1,4 +1,4 @@
1
- <svg width="24" height="11" viewBox="0 0 24 11" fill="none" xmlns="http://www.w3.org/2000/svg">
1
+ <svg width="20" height="11" viewBox="0 0 20 11" fill="none" xmlns="http://www.w3.org/2000/svg">
2
2
  <path d="M3.66214 6.96476L0.5 9.86338V0.5H7.5V9.86338L4.33786 6.96476L4 6.65505L3.66214 6.96476Z" stroke="#042121"/>
3
- <path d="M19 4L21 6L23 4" stroke="#042121" stroke-linecap="round"/>
3
+ <path d="M15 4L17 6L19 4" stroke="#042121" stroke-linecap="round"/>
4
4
  </svg>
@@ -24,9 +24,10 @@ perspective-indicator[theme="Pro Dark"] {
24
24
 
25
25
  perspective-workspace perspective-viewer {
26
26
  --status-bar--height: 39px;
27
+ --plugin-selector--height: 47px;
27
28
  }
28
29
 
29
- perspective-workspace perspective-viewer[settings] {
30
+ perspective-workspace perspective-viewer.widget-maximize {
30
31
  --modal-panel--margin: -4px 0 -4px 0;
31
32
  --status-bar--border-radius: 6px 0 0 0;
32
33
  --main-column--margin: 3px 0 3px 3px;
@@ -48,7 +49,7 @@ perspective-workspace {
48
49
  // --workspace-tabbar--border-color: @grey500;
49
50
  --workspace-secondary--color: @grey60;
50
51
  --workspace-tabbar--border: 1px solid var(--inactive--color);
51
- --workspace-tabbar--border-width: 0px 1px 1px 1px;
52
+ --workspace-tabbar--border-width: 1px 1px 1px 1px;
52
53
  --workspace-tabbar--border-radius: 6px;
53
54
  --workspace-tabbar--border-color: var(--inactive--color);
54
55
  --workspace-tabbar-tab--border-width: 1px 1px 0 1px;
@@ -12,6 +12,10 @@
12
12
 
13
13
  @import url("ref://pro.less");
14
14
 
15
+ .lm-cursor-backdrop {
16
+ display: none;
17
+ }
18
+
15
19
  perspective-workspace,
16
20
  perspective-workspace[theme="Pro Light"],
17
21
  perspective-indicator[theme="Pro Light"] {
@@ -24,7 +28,7 @@ perspective-workspace {
24
28
  background-color: #dadada;
25
29
  }
26
30
 
27
- perspective-workspace perspective-viewer[settings] {
31
+ perspective-workspace perspective-viewer.widget-maximize {
28
32
  --modal-panel--margin: -4px 0 -4px 0;
29
33
  --status-bar--border-radius: 6px 0 0 0;
30
34
  --main-column--margin: 3px 0 3px 3px;
@@ -36,6 +40,7 @@ perspective-workspace perspective-viewer[settings] {
36
40
 
37
41
  perspective-workspace perspective-viewer {
38
42
  --status-bar--height: 39px;
43
+ --plugin-selector--height: 47px;
39
44
  }
40
45
 
41
46
  perspective-viewer[theme="Pro Light"].workspace-master-widget {
@@ -74,7 +79,7 @@ perspective-viewer[theme="Pro Light"].workspace-master-widget {
74
79
  --workspace-split-panel-handle--background-color: #f2f4f6;
75
80
 
76
81
  --workspace-tabbar--border: 1px solid var(--inactive--color);
77
- --workspace-tabbar--border-width: 0px 1px 1px 1px;
82
+ --workspace-tabbar--border-width: 1px 1px 1px 1px;
78
83
  --workspace-tabbar--border-radius: 6px;
79
84
  --workspace-tabbar--border-color: var(--inactive--color);
80
85
  --workspace-tabbar-tab--border-width: 1px 1px 0px 1px;
@@ -84,6 +89,10 @@ perspective-viewer[theme="Pro Light"].workspace-master-widget {
84
89
  --bookmarks--mask-image: url("../svg/bookmark-icon.svg");
85
90
  }
86
91
 
92
+ perspective-viewer {
93
+ --bookmarks--mask-image: url("../svg/bookmark-icon.svg");
94
+ }
95
+
87
96
  perspective-workspace-menu {
88
97
  font-family:
89
98
  "ui-monospace", "SFMono-Regular", "SF Mono", "Menlo", "Consolas",
@@ -0,0 +1,51 @@
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 { HTMLPerspectiveWorkspaceElement } from "./perspective-workspace";
14
+
15
+ type ReactPerspectiveWorkspaceAttributes<T> = React.HTMLAttributes<T>;
16
+
17
+ type JsxPerspectiveWorkspaceElement = {
18
+ class?: string;
19
+ } & React.DetailedHTMLProps<
20
+ ReactPerspectiveWorkspaceAttributes<HTMLPerspectiveWorkspaceElement>,
21
+ HTMLPerspectiveWorkspaceElement
22
+ >;
23
+
24
+ declare global {
25
+ namespace JSX {
26
+ interface IntrinsicElements {
27
+ "perspective-workspace": JsxPerspectiveWorkspaceElement;
28
+ }
29
+ }
30
+ }
31
+
32
+ // Custom Elements extensions
33
+
34
+ declare global {
35
+ interface Document {
36
+ createElement(
37
+ tagName: "perspective-workspace",
38
+ options?: ElementCreationOptions,
39
+ ): HTMLPerspectiveWorkspaceElement;
40
+ querySelector<E extends Element = Element>(selectors: string): E | null;
41
+ querySelector(
42
+ selectors: "perspective-workspace",
43
+ ): HTMLPerspectiveWorkspaceElement | null;
44
+ }
45
+
46
+ interface CustomElementRegistry {
47
+ get(
48
+ tagName: "perspective-workspace",
49
+ ): HTMLPerspectiveWorkspaceElement & typeof HTMLElement;
50
+ }
51
+ }
@@ -9,3 +9,6 @@
9
9
  // ┃ This file is part of the Perspective library, distributed under the terms ┃
10
10
  // ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
11
11
  // ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
12
+
13
+ // Reminder for future authors as to why this file exists:
14
+ // https://github.com/evanw/esbuild/issues/1663