@jupyterlab/apputils 4.5.0-beta.0 → 4.5.0-beta.2

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.
@@ -37,6 +37,11 @@ export class SemanticCommand {
37
37
  */
38
38
  static readonly DEFAULT_RANK = 500;
39
39
 
40
+ /**
41
+ * The `args` key for a semantic command's current widget ID.
42
+ */
43
+ static readonly WIDGET = 'semanticWidget';
44
+
40
45
  /**
41
46
  * The command IDs used by this semantic command.
42
47
  */
package/src/tokens.ts CHANGED
@@ -9,6 +9,7 @@ import { IDisposable } from '@lumino/disposable';
9
9
  import { ISignal } from '@lumino/signaling';
10
10
  import { CommandPalette, Widget } from '@lumino/widgets';
11
11
  import { ISessionContext } from './sessioncontext';
12
+ import { Licenses } from './licenses';
12
13
 
13
14
  /**
14
15
  * The command palette token.
@@ -71,6 +72,29 @@ export interface IKernelStatusModel {
71
72
  ) => void;
72
73
  }
73
74
 
75
+ /**
76
+ * The license client for fetching licenses.
77
+ */
78
+ export const ILicensesClient = new Token<ILicensesClient>(
79
+ '@jupyterlab/apputils:ILicensesClient',
80
+ 'A service for fetching licenses.'
81
+ );
82
+
83
+ /**
84
+ * An interface for the license client.
85
+ */
86
+ export interface ILicensesClient {
87
+ /**
88
+ * Fetch the license bundles from the server.
89
+ */
90
+ getBundles(): Promise<Licenses.ILicenseResponse>;
91
+
92
+ /**
93
+ * Download the licenses in the requested format.
94
+ */
95
+ download(options: Licenses.IDownloadOptions): Promise<void>;
96
+ }
97
+
74
98
  /**
75
99
  * An interface for the session context dialogs.
76
100
  */
package/style/base.css CHANGED
@@ -6,6 +6,7 @@
6
6
  @import './commandpalette.css';
7
7
  @import './dialog.css';
8
8
  @import './inputdialog.css';
9
+ @import './licenses.css';
9
10
  @import './mainareawidget.css';
10
11
  @import './materialcolors.css';
11
12
  @import './toolbar.css';
package/style/dialog.css CHANGED
@@ -124,6 +124,8 @@ button.jp-Dialog-close-button {
124
124
 
125
125
  .jp-Dialog-checkbox {
126
126
  padding-right: 5px;
127
+ display: flex;
128
+ align-items: center;
127
129
  }
128
130
 
129
131
  .jp-Dialog-spacer {
@@ -0,0 +1,184 @@
1
+ /*-----------------------------------------------------------------------------
2
+ | Copyright (c) Jupyter Development Team.
3
+ | Distributed under the terms of the Modified BSD License.
4
+ |----------------------------------------------------------------------------*/
5
+
6
+ /* licenses */
7
+ .jp-Licenses {
8
+ display: flex;
9
+ flex-direction: row;
10
+ align-items: stretch;
11
+ background-color: var(--jp-layout-color0);
12
+ }
13
+
14
+ .jp-Licenses-FormArea {
15
+ display: flex;
16
+ flex-direction: column;
17
+ min-width: calc(10 * var(--jp-ui-font-size1));
18
+ width: calc(18 * var(--jp-ui-font-size1));
19
+ }
20
+
21
+ .jp-Licenses .lm-SplitPanel-handle:hover {
22
+ background-color: var(--jp-brand-color2);
23
+ }
24
+
25
+ /* filters */
26
+ .jp-Licenses-Filters {
27
+ padding: var(--jp-ui-font-size1) calc(var(--jp-ui-font-size1) / 2) 0
28
+ var(--jp-ui-font-size1);
29
+ }
30
+
31
+ .jp-Licenses-Filters label {
32
+ display: block;
33
+ }
34
+
35
+ .jp-Licenses-Filters-title {
36
+ font-weight: 600;
37
+ text-transform: uppercase;
38
+ letter-spacing: 1px;
39
+ font-size: var(--jp-ui-font-size0);
40
+ color: var(--jp-ui-font-color0);
41
+ }
42
+
43
+ .jp-RenderedHTMLCommon.jp-Licenses-Filters ul,
44
+ .jp-RenderedHTMLCommon.jp-Licenses-Filters li {
45
+ list-style: none;
46
+ color: var(--jp-ui-font-color0);
47
+ }
48
+
49
+ .jp-Licenses-Filters input {
50
+ width: 100%;
51
+ }
52
+
53
+ .jp-RenderedHTMLCommon.jp-Licenses-Filters ul {
54
+ padding: 0 0 var(--jp-ui-font-size1) 0;
55
+ margin: 0;
56
+ padding-bottom: var(--jp-ui-font-size1);
57
+ }
58
+
59
+ /* bundles */
60
+ .jp-Licenses-Bundles {
61
+ background-color: var(--jp-layout-color2);
62
+ overflow-y: auto;
63
+ flex: 1;
64
+ }
65
+
66
+ .jp-Licenses-Bundles .lm-TabBar-content {
67
+ width: 100%;
68
+ }
69
+
70
+ .jp-Licenses-Bundles .lm-TabBar-tab {
71
+ padding: calc(var(--jp-ui-font-size1) / 2);
72
+ background-color: var(--jp-layout-color1);
73
+ color: var(--jp-ui-font-color1);
74
+ }
75
+
76
+ .jp-Licenses-Bundles .lm-TabBar-tabLabel {
77
+ text-overflow: ellipsis;
78
+ }
79
+
80
+ .jp-Licenses-Bundles .lm-TabBar-tab label {
81
+ background-color: var(--jp-layout-color2);
82
+ border-radius: var(--jp-ui-font-size1);
83
+ width: calc(2.5 * var(--jp-ui-font-size1));
84
+ padding: 0 calc(var(--jp-ui-font-size1) / 2);
85
+ text-align: center;
86
+ margin-left: calc(var(--jp-ui-font-size1) / 2);
87
+ }
88
+
89
+ .jp-Licenses-Bundles .lm-TabBar-tab.lm-mod-current {
90
+ background-color: var(--jp-brand-color1);
91
+ color: #fff;
92
+ }
93
+
94
+ .jp-Licenses-Bundles .lm-TabBar-tab.lm-mod-current label {
95
+ background-color: #fff;
96
+ color: var(--jp-brand-color1);
97
+ }
98
+
99
+ /* license grid */
100
+ .jp-Licenses-Grid.jp-RenderedHTMLCommon {
101
+ min-width: calc(var(--jp-ui-font-size1) * 10);
102
+ display: flex;
103
+ flex-direction: column;
104
+ padding: 0;
105
+ }
106
+
107
+ .jp-Licenses-Grid.jp-RenderedHTMLCommon form {
108
+ flex: 1;
109
+ display: flex;
110
+ flex-direction: column;
111
+ overflow-y: scroll;
112
+ margin: 0;
113
+ padding: 0;
114
+ }
115
+
116
+ .jp-RenderedHTMLCommon.jp-Licenses-Grid table {
117
+ flex: 1;
118
+ max-width: 100%;
119
+ border: solid var(--jp-border-width) var(--jp-border-color2);
120
+ border-top: 0;
121
+ border-bottom: 0;
122
+ margin: 0;
123
+ }
124
+
125
+ .jp-Licenses-Grid.jp-RenderedHTMLCommon td,
126
+ .jp-Licenses-Grid.jp-RenderedHTMLCommon th {
127
+ text-align: left;
128
+ }
129
+
130
+ .jp-Licenses-Grid td:nth-child(1) {
131
+ max-width: calc(2 * var(--jp-ui-font-size1));
132
+ }
133
+
134
+ .jp-Licenses-Grid label {
135
+ width: 100%;
136
+ }
137
+
138
+ .jp-Licenses .jp-Licenses-Grid.jp-RenderedHTMLCommon code {
139
+ background-color: transparent;
140
+ padding: 0;
141
+ }
142
+
143
+ .jp-Licenses-Grid.jp-RenderedHTMLCommon tr.jp-mod-selected {
144
+ background-color: var(--jp-brand-color1);
145
+ color: #fff;
146
+ }
147
+
148
+ .jp-Licenses-Grid.jp-RenderedHTMLCommon .jp-mod-selected code {
149
+ color: #fff;
150
+ }
151
+
152
+ /* license text */
153
+ .jp-Licenses-Text {
154
+ min-width: calc(10 * var(--jp-ui-font-size1));
155
+ padding: 0 0 0 var(--jp-ui-font-size1);
156
+ display: flex;
157
+ flex-direction: column;
158
+ }
159
+
160
+ .jp-Licenses-Text h1 {
161
+ flex: initial;
162
+ margin-bottom: 0;
163
+ }
164
+
165
+ .jp-Licenses-Text h1:empty {
166
+ display: none;
167
+ }
168
+
169
+ .jp-Licenses-Text blockquote {
170
+ flex: initial;
171
+ }
172
+
173
+ .jp-Licenses-Text.jp-RenderedHTMLCommon code {
174
+ overflow-wrap: anywhere;
175
+ overflow-y: auto;
176
+ flex: 1;
177
+ padding-right: var(--jp-ui-font-size1);
178
+ margin-bottom: 0;
179
+ padding-bottom: var(--jp-ui-font-size1);
180
+ }
181
+
182
+ .jp-Licenses-Text code:empty {
183
+ display: none;
184
+ }