@jupytergis/base 0.12.1 → 0.12.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.
- package/lib/dialogs/layerBrowserDialog.d.ts +3 -3
- package/lib/dialogs/layerBrowserDialog.js +9 -10
- package/lib/formbuilder/objectform/StoryEditorForm.js +5 -5
- package/lib/mainview/mainView.d.ts +8 -2
- package/lib/mainview/mainView.js +36 -7
- package/lib/mainview/mainviewwidget.js +2 -2
- package/lib/panelview/leftpanel.d.ts +2 -1
- package/lib/panelview/leftpanel.js +28 -20
- package/lib/panelview/rightpanel.d.ts +2 -1
- package/lib/panelview/rightpanel.js +12 -18
- package/lib/panelview/story-maps/MobileSpectaPanel.d.ts +7 -0
- package/lib/panelview/story-maps/MobileSpectaPanel.js +114 -0
- package/lib/panelview/story-maps/StoryNavBar.d.ts +3 -2
- package/lib/panelview/story-maps/StoryNavBar.js +18 -6
- package/lib/panelview/story-maps/StoryViewerPanel.d.ts +10 -0
- package/lib/panelview/story-maps/StoryViewerPanel.js +44 -18
- package/lib/panelview/story-maps/components/StoryImageSection.d.ts +2 -7
- package/lib/panelview/story-maps/components/StoryImageSection.js +2 -4
- package/lib/panelview/story-maps/components/StorySubtitleSection.d.ts +2 -6
- package/lib/panelview/story-maps/components/StorySubtitleSection.js +2 -4
- package/lib/panelview/story-maps/components/StoryTitleSection.d.ts +2 -7
- package/lib/panelview/story-maps/components/StoryTitleSection.js +2 -3
- package/lib/shared/components/Button.js +2 -2
- package/lib/shared/components/Calendar.js +0 -1
- package/lib/shared/components/Checkbox.d.ts +1 -1
- package/lib/shared/components/Checkbox.js +1 -1
- package/lib/shared/components/Dialog.d.ts +1 -1
- package/lib/shared/components/Dialog.js +1 -1
- package/lib/shared/components/Drawer.d.ts +13 -0
- package/lib/shared/components/Drawer.js +59 -0
- package/lib/shared/components/DropdownMenu.d.ts +1 -1
- package/lib/shared/components/DropdownMenu.js +1 -1
- package/lib/shared/components/Popover.d.ts +1 -1
- package/lib/shared/components/Popover.js +1 -1
- package/lib/shared/components/RadioGroup.d.ts +1 -1
- package/lib/shared/components/RadioGroup.js +1 -1
- package/lib/shared/components/Sheet.d.ts +15 -0
- package/lib/shared/components/Sheet.js +64 -0
- package/lib/shared/components/Switch.d.ts +1 -1
- package/lib/shared/components/Switch.js +1 -1
- package/lib/shared/components/Tabs.d.ts +1 -1
- package/lib/shared/components/Tabs.js +1 -1
- package/lib/shared/components/ToggleGroup.d.ts +1 -1
- package/lib/shared/components/ToggleGroup.js +1 -1
- package/lib/shared/hooks/useMediaQuery.d.ts +9 -0
- package/lib/shared/hooks/useMediaQuery.js +32 -0
- package/lib/tools.js +21 -34
- package/package.json +5 -12
- package/style/base.css +7 -0
- package/style/shared/drawer.css +154 -0
- package/style/shared/sheet.css +258 -0
- package/style/storyPanel.css +32 -4
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Subscribes to a media query and returns whether it currently matches.
|
|
4
|
+
* Updates when the viewport changes (resize, orientation).
|
|
5
|
+
*
|
|
6
|
+
* @param query - Media query string (e.g. '(max-width: 768px)').
|
|
7
|
+
* @returns True if the query matches, false otherwise (and when window is unavailable).
|
|
8
|
+
*/
|
|
9
|
+
function useMediaQuery(query) {
|
|
10
|
+
const [matches, setMatches] = useState(() => {
|
|
11
|
+
if (typeof window === 'undefined') {
|
|
12
|
+
return false;
|
|
13
|
+
}
|
|
14
|
+
return window.matchMedia(query).matches;
|
|
15
|
+
});
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
if (typeof window === 'undefined') {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
const mediaQuery = window.matchMedia(query);
|
|
21
|
+
const handleChange = (event) => {
|
|
22
|
+
setMatches(event.matches);
|
|
23
|
+
};
|
|
24
|
+
setMatches(mediaQuery.matches);
|
|
25
|
+
mediaQuery.addEventListener('change', handleChange);
|
|
26
|
+
return () => {
|
|
27
|
+
mediaQuery.removeEventListener('change', handleChange);
|
|
28
|
+
};
|
|
29
|
+
}, [query]);
|
|
30
|
+
return matches;
|
|
31
|
+
}
|
|
32
|
+
export default useMediaQuery;
|
package/lib/tools.js
CHANGED
|
@@ -5,7 +5,7 @@ import { VectorTile } from '@mapbox/vector-tile';
|
|
|
5
5
|
import { compressors } from 'hyparquet-compressors';
|
|
6
6
|
import Protobuf from 'pbf';
|
|
7
7
|
import shp from 'shpjs';
|
|
8
|
-
import
|
|
8
|
+
import LAYER_GALLERY from "../layer_gallery.json";
|
|
9
9
|
export const debounce = (func, timeout = 100) => {
|
|
10
10
|
let timeoutId;
|
|
11
11
|
return (...args) => {
|
|
@@ -112,27 +112,29 @@ export function deepCopy(value) {
|
|
|
112
112
|
* @param layerBrowserRegistry Registry to add layers to
|
|
113
113
|
*/
|
|
114
114
|
export function createDefaultLayerRegistry(layerBrowserRegistry) {
|
|
115
|
-
const
|
|
115
|
+
const LAYER_THUMBNAILS = {};
|
|
116
116
|
/**
|
|
117
117
|
* Generate object to hold thumbnail URLs
|
|
118
118
|
*/
|
|
119
119
|
const importAll = (r) => {
|
|
120
120
|
r.keys().forEach(key => {
|
|
121
121
|
const imageName = key.replace('./', '').replace(/\.\w+$/, '');
|
|
122
|
-
|
|
122
|
+
LAYER_THUMBNAILS[imageName] = r(key);
|
|
123
123
|
});
|
|
124
124
|
};
|
|
125
|
-
const context = require.context('../
|
|
125
|
+
const context = require.context('../layer_gallery', false, /\.(png|jpe?g|gif|svg)$/);
|
|
126
126
|
importAll(context);
|
|
127
|
-
for (const entry of Object.keys(
|
|
128
|
-
const
|
|
129
|
-
if ('
|
|
130
|
-
|
|
127
|
+
for (const entry of Object.keys(LAYER_GALLERY)) {
|
|
128
|
+
const layerProvider = LAYER_GALLERY[entry];
|
|
129
|
+
if ('thumbnailPath' in layerProvider) {
|
|
130
|
+
/*flat layer provider*/
|
|
131
|
+
const tile = convertToRegistryEntry(entry, layerProvider);
|
|
131
132
|
layerBrowserRegistry.addRegistryLayer(tile);
|
|
132
133
|
}
|
|
133
134
|
else {
|
|
134
|
-
|
|
135
|
-
|
|
135
|
+
/* nested layer provider */
|
|
136
|
+
Object.keys(layerProvider).forEach(mapName => {
|
|
137
|
+
const tile = convertToRegistryEntry(layerProvider[mapName]['name'], layerProvider[mapName], entry);
|
|
136
138
|
layerBrowserRegistry.addRegistryLayer(tile);
|
|
137
139
|
});
|
|
138
140
|
}
|
|
@@ -142,35 +144,20 @@ export function createDefaultLayerRegistry(layerBrowserRegistry) {
|
|
|
142
144
|
* Parse tile information from providers to be usable in the layer registry
|
|
143
145
|
*
|
|
144
146
|
* @param entry - The name of the entry, which may also serve as the default provider name if none is specified.
|
|
145
|
-
* @param
|
|
147
|
+
* @param layerProvider - An object containing the provider's details, including name, URL, zoom levels, attribution, and possibly other properties relevant to the provider.
|
|
146
148
|
* @param provider - Optional. Specifies the provider name. If not provided, the `entry` parameter is used as the default provider name.
|
|
147
149
|
* @returns - An object representing the registry entry
|
|
148
150
|
*/
|
|
149
|
-
function convertToRegistryEntry(entry,
|
|
150
|
-
const urlParameters = {};
|
|
151
|
-
if (xyzprovider.time) {
|
|
152
|
-
urlParameters.time = xyzprovider.time;
|
|
153
|
-
}
|
|
154
|
-
if (xyzprovider.variant) {
|
|
155
|
-
urlParameters.variant = xyzprovider.variant;
|
|
156
|
-
}
|
|
157
|
-
if (xyzprovider.tilematrixset) {
|
|
158
|
-
urlParameters.tilematrixset = xyzprovider.tilematrixset;
|
|
159
|
-
}
|
|
160
|
-
if (xyzprovider.format) {
|
|
161
|
-
urlParameters.format = xyzprovider.format;
|
|
162
|
-
}
|
|
151
|
+
function convertToRegistryEntry(entry, layerProvider, provider) {
|
|
163
152
|
return {
|
|
164
153
|
name: entry,
|
|
165
|
-
thumbnail:
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
urlParameters,
|
|
173
|
-
},
|
|
154
|
+
thumbnail: LAYER_THUMBNAILS[layerProvider['name'].replace('.', '-')],
|
|
155
|
+
sourceType: layerProvider['sourceType'],
|
|
156
|
+
layerType: layerProvider['layerType'],
|
|
157
|
+
sourceParameters: layerProvider['sourceParameters'],
|
|
158
|
+
layerParameters: layerProvider['layerParameters'],
|
|
159
|
+
provider: provider !== null && provider !== void 0 ? provider : entry.split('.', 1)[0],
|
|
160
|
+
description: layerProvider['description'],
|
|
174
161
|
};
|
|
175
162
|
}
|
|
176
163
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jupytergis/base",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.2",
|
|
4
4
|
"description": "A JupyterLab extension for 3D modelling.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jupyter",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@jupyter/collaboration": "^4",
|
|
45
45
|
"@jupyter/react-components": "^0.16.6",
|
|
46
46
|
"@jupyter/ydoc": "^2.0.0 || ^3.0.0",
|
|
47
|
-
"@jupytergis/schema": "^0.12.
|
|
47
|
+
"@jupytergis/schema": "^0.12.2",
|
|
48
48
|
"@jupyterlab/application": "^4.3.0",
|
|
49
49
|
"@jupyterlab/apputils": "^4.3.0",
|
|
50
50
|
"@jupyterlab/completer": "^4.3.0",
|
|
@@ -64,15 +64,6 @@
|
|
|
64
64
|
"@lumino/widgets": "^2.0.0",
|
|
65
65
|
"@mapbox/vector-tile": "^2.0.3",
|
|
66
66
|
"@naisutech/react-tree": "^3.0.1",
|
|
67
|
-
"@radix-ui/react-checkbox": "^1.3.2",
|
|
68
|
-
"@radix-ui/react-dialog": "^1.1.15",
|
|
69
|
-
"@radix-ui/react-dropdown-menu": "^2.1.15",
|
|
70
|
-
"@radix-ui/react-popover": "^1.1.14",
|
|
71
|
-
"@radix-ui/react-radio-group": "^1.3.8",
|
|
72
|
-
"@radix-ui/react-slot": "^1.2.3",
|
|
73
|
-
"@radix-ui/react-switch": "^1.2.6",
|
|
74
|
-
"@radix-ui/react-tabs": "^1.1.12",
|
|
75
|
-
"@radix-ui/react-toggle-group": "^1.1.10",
|
|
76
67
|
"@rjsf/core": "^4.2.0",
|
|
77
68
|
"@rjsf/validator-ajv8": "^5.23.1",
|
|
78
69
|
"ajv": "^8.14.0",
|
|
@@ -94,6 +85,7 @@
|
|
|
94
85
|
"pmtiles": "^3.0.7",
|
|
95
86
|
"proj4": "2.19.3",
|
|
96
87
|
"proj4-list": "1.0.4",
|
|
88
|
+
"radix-ui": "^1.4.3",
|
|
97
89
|
"react": "^18.0.1",
|
|
98
90
|
"react-day-picker": "^9.7.0",
|
|
99
91
|
"react-markdown": "^10.1.0",
|
|
@@ -101,7 +93,8 @@
|
|
|
101
93
|
"styled-components": "^5.3.6",
|
|
102
94
|
"three": "^0.135.0",
|
|
103
95
|
"three-mesh-bvh": "^0.5.17",
|
|
104
|
-
"uuid": "^11.0.3"
|
|
96
|
+
"uuid": "^11.0.3",
|
|
97
|
+
"vaul": "^1.1.2"
|
|
105
98
|
},
|
|
106
99
|
"devDependencies": {
|
|
107
100
|
"@apidevtools/json-schema-ref-parser": "^9.0.9",
|
package/style/base.css
CHANGED
|
@@ -24,6 +24,8 @@
|
|
|
24
24
|
@import url('./shared/checkbox.css');
|
|
25
25
|
@import url('./shared/radioGroup.css');
|
|
26
26
|
@import url('./shared/dialog.css');
|
|
27
|
+
@import url('./shared/drawer.css');
|
|
28
|
+
@import url('./shared/sheet.css');
|
|
27
29
|
@import url('./shared/switch.css');
|
|
28
30
|
@import url('./shared/popover.css');
|
|
29
31
|
@import url('./shared/command.css');
|
|
@@ -170,3 +172,8 @@ button.jp-mod-styled.jp-mod-reject {
|
|
|
170
172
|
margin: 0;
|
|
171
173
|
}
|
|
172
174
|
}
|
|
175
|
+
|
|
176
|
+
/* Fix for map in mobile specta view */
|
|
177
|
+
body[data-notebook='specta'] #main.jp-ThemedContainer {
|
|
178
|
+
overflow: visible;
|
|
179
|
+
}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
@keyframes drawer-fade-in {
|
|
2
|
+
from {
|
|
3
|
+
opacity: 0;
|
|
4
|
+
}
|
|
5
|
+
to {
|
|
6
|
+
opacity: 1;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@keyframes drawer-fade-out {
|
|
11
|
+
from {
|
|
12
|
+
opacity: 1;
|
|
13
|
+
}
|
|
14
|
+
to {
|
|
15
|
+
opacity: 0;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.jgis-drawer-overlay {
|
|
20
|
+
position: fixed;
|
|
21
|
+
inset: 0;
|
|
22
|
+
z-index: 50;
|
|
23
|
+
background-color: color-mix(in srgb, black, transparent 90%);
|
|
24
|
+
backdrop-filter: blur(2px);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.jgis-drawer-overlay[data-state='open'] {
|
|
28
|
+
animation: drawer-fade-in 0.2s ease-out;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.jgis-drawer-overlay[data-state='closed'] {
|
|
32
|
+
animation: drawer-fade-out 0.2s ease-in;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.jgis-drawer-content {
|
|
36
|
+
position: fixed;
|
|
37
|
+
z-index: 50;
|
|
38
|
+
display: flex;
|
|
39
|
+
flex-direction: column;
|
|
40
|
+
font-size: 0.875rem;
|
|
41
|
+
background-color: var(--jp-layout-color0);
|
|
42
|
+
color: var(--jp-ui-font-color0);
|
|
43
|
+
border-color: var(--jp-border-color0);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* Bottom */
|
|
47
|
+
.jgis-drawer-content[data-vaul-drawer-direction='bottom'] {
|
|
48
|
+
left: 0;
|
|
49
|
+
right: 0;
|
|
50
|
+
bottom: 0;
|
|
51
|
+
margin-top: 6rem;
|
|
52
|
+
max-height: 80vh;
|
|
53
|
+
border-top-width: 1px;
|
|
54
|
+
border-top-style: solid;
|
|
55
|
+
border-radius: 0.75rem 0.75rem 0 0;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* Top */
|
|
59
|
+
.jgis-drawer-content[data-vaul-drawer-direction='top'] {
|
|
60
|
+
left: 0;
|
|
61
|
+
right: 0;
|
|
62
|
+
top: 0;
|
|
63
|
+
margin-bottom: 6rem;
|
|
64
|
+
max-height: 80vh;
|
|
65
|
+
border-bottom-width: 1px;
|
|
66
|
+
border-bottom-style: solid;
|
|
67
|
+
border-radius: 0 0 0.75rem 0.75rem;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/* Left */
|
|
71
|
+
.jgis-drawer-content[data-vaul-drawer-direction='left'] {
|
|
72
|
+
top: 0;
|
|
73
|
+
bottom: 0;
|
|
74
|
+
left: 0;
|
|
75
|
+
width: 75%;
|
|
76
|
+
border-right-width: 1px;
|
|
77
|
+
border-right-style: solid;
|
|
78
|
+
border-radius: 0 0.75rem 0.75rem 0;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
@media (min-width: 640px) {
|
|
82
|
+
.jgis-drawer-content[data-vaul-drawer-direction='left'] {
|
|
83
|
+
max-width: 24rem;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* Right */
|
|
88
|
+
.jgis-drawer-content[data-vaul-drawer-direction='right'] {
|
|
89
|
+
top: 0;
|
|
90
|
+
bottom: 0;
|
|
91
|
+
right: 0;
|
|
92
|
+
width: 75%;
|
|
93
|
+
border-left-width: 1px;
|
|
94
|
+
border-left-style: solid;
|
|
95
|
+
border-radius: 0.75rem 0 0 0.75rem;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
@media (min-width: 640px) {
|
|
99
|
+
.jgis-drawer-content[data-vaul-drawer-direction='right'] {
|
|
100
|
+
max-width: 24rem;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.jgis-drawer-handle {
|
|
105
|
+
display: none;
|
|
106
|
+
margin: 1rem auto 0;
|
|
107
|
+
height: 0.25rem;
|
|
108
|
+
width: 100px;
|
|
109
|
+
flex-shrink: 0;
|
|
110
|
+
border-radius: 9999px;
|
|
111
|
+
background-color: var(--jp-layout-color2);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.jgis-drawer-content[data-vaul-drawer-direction='bottom'] .jgis-drawer-handle {
|
|
115
|
+
display: block;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.jgis-drawer-header {
|
|
119
|
+
display: flex;
|
|
120
|
+
flex-direction: column;
|
|
121
|
+
gap: 0.125rem;
|
|
122
|
+
padding: 1rem;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.jgis-drawer-content[data-vaul-drawer-direction='bottom'] .jgis-drawer-header,
|
|
126
|
+
.jgis-drawer-content[data-vaul-drawer-direction='top'] .jgis-drawer-header {
|
|
127
|
+
text-align: center;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
@media (min-width: 768px) {
|
|
131
|
+
.jgis-drawer-header {
|
|
132
|
+
gap: 0.125rem;
|
|
133
|
+
text-align: left;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.jgis-drawer-footer {
|
|
138
|
+
display: flex;
|
|
139
|
+
flex-direction: column;
|
|
140
|
+
gap: 0.5rem;
|
|
141
|
+
padding: 1rem;
|
|
142
|
+
margin-top: auto;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.jgis-drawer-title {
|
|
146
|
+
font-size: 1rem;
|
|
147
|
+
font-weight: 500;
|
|
148
|
+
color: var(--jp-ui-font-color0);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.jgis-drawer-description {
|
|
152
|
+
font-size: 0.875rem;
|
|
153
|
+
color: var(--jp-ui-font-color2);
|
|
154
|
+
}
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
@keyframes sheet-fade-in {
|
|
2
|
+
from {
|
|
3
|
+
opacity: 0;
|
|
4
|
+
}
|
|
5
|
+
to {
|
|
6
|
+
opacity: 1;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@keyframes sheet-fade-out {
|
|
11
|
+
from {
|
|
12
|
+
opacity: 1;
|
|
13
|
+
}
|
|
14
|
+
to {
|
|
15
|
+
opacity: 0;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@keyframes sheet-slide-in-right {
|
|
20
|
+
from {
|
|
21
|
+
transform: translateX(100%);
|
|
22
|
+
}
|
|
23
|
+
to {
|
|
24
|
+
transform: translateX(0);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@keyframes sheet-slide-out-right {
|
|
29
|
+
from {
|
|
30
|
+
transform: translateX(0);
|
|
31
|
+
}
|
|
32
|
+
to {
|
|
33
|
+
transform: translateX(100%);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@keyframes sheet-slide-in-left {
|
|
38
|
+
from {
|
|
39
|
+
transform: translateX(-100%);
|
|
40
|
+
}
|
|
41
|
+
to {
|
|
42
|
+
transform: translateX(0);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@keyframes sheet-slide-out-left {
|
|
47
|
+
from {
|
|
48
|
+
transform: translateX(0);
|
|
49
|
+
}
|
|
50
|
+
to {
|
|
51
|
+
transform: translateX(-100%);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@keyframes sheet-slide-in-top {
|
|
56
|
+
from {
|
|
57
|
+
transform: translateY(-100%);
|
|
58
|
+
}
|
|
59
|
+
to {
|
|
60
|
+
transform: translateY(0);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
@keyframes sheet-slide-out-top {
|
|
65
|
+
from {
|
|
66
|
+
transform: translateY(0);
|
|
67
|
+
}
|
|
68
|
+
to {
|
|
69
|
+
transform: translateY(-100%);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@keyframes sheet-slide-in-bottom {
|
|
74
|
+
from {
|
|
75
|
+
transform: translateY(100%);
|
|
76
|
+
}
|
|
77
|
+
to {
|
|
78
|
+
transform: translateY(0);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
@keyframes sheet-slide-out-bottom {
|
|
83
|
+
from {
|
|
84
|
+
transform: translateY(0);
|
|
85
|
+
}
|
|
86
|
+
to {
|
|
87
|
+
transform: translateY(100%);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.jgis-sheet-overlay {
|
|
92
|
+
position: fixed;
|
|
93
|
+
inset: 0;
|
|
94
|
+
z-index: 50;
|
|
95
|
+
background-color: color-mix(in srgb, black, transparent 90%);
|
|
96
|
+
backdrop-filter: blur(2px);
|
|
97
|
+
transition-duration: 0.1s;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.jgis-sheet-overlay[data-state='open'] {
|
|
101
|
+
animation: sheet-fade-in 0.1s ease-out;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.jgis-sheet-overlay[data-state='closed'] {
|
|
105
|
+
animation: sheet-fade-out 0.1s ease-in;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.jgis-sheet-content {
|
|
109
|
+
position: fixed;
|
|
110
|
+
z-index: 50;
|
|
111
|
+
display: flex;
|
|
112
|
+
flex-direction: column;
|
|
113
|
+
gap: 1rem;
|
|
114
|
+
font-size: 0.875rem;
|
|
115
|
+
background-color: var(--jp-layout-color0);
|
|
116
|
+
color: var(--jp-ui-font-color0);
|
|
117
|
+
border-color: var(--jp-border-color0);
|
|
118
|
+
box-shadow:
|
|
119
|
+
0 10px 15px -3px rgba(0, 0, 0, 0.1),
|
|
120
|
+
0 4px 6px -2px rgba(0, 0, 0, 0.05);
|
|
121
|
+
transition-duration: 0.2s;
|
|
122
|
+
transition-timing-function: ease-in-out;
|
|
123
|
+
background-clip: padding-box;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/* Right */
|
|
127
|
+
.jgis-sheet-content[data-side='right'] {
|
|
128
|
+
top: 0;
|
|
129
|
+
right: 0;
|
|
130
|
+
bottom: 0;
|
|
131
|
+
height: 100%;
|
|
132
|
+
width: 75%;
|
|
133
|
+
border-left-width: 1px;
|
|
134
|
+
border-left-style: solid;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.jgis-sheet-content[data-side='right'][data-state='open'] {
|
|
138
|
+
animation:
|
|
139
|
+
sheet-fade-in 0.2s ease-out,
|
|
140
|
+
sheet-slide-in-right 0.2s ease-out;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.jgis-sheet-content[data-side='right'][data-state='closed'] {
|
|
144
|
+
animation:
|
|
145
|
+
sheet-fade-out 0.2s ease-in,
|
|
146
|
+
sheet-slide-out-right 0.2s ease-in;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
@media (min-width: 640px) {
|
|
150
|
+
.jgis-sheet-content[data-side='right'] {
|
|
151
|
+
max-width: 24rem;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/* Left */
|
|
156
|
+
.jgis-sheet-content[data-side='left'] {
|
|
157
|
+
top: 0;
|
|
158
|
+
bottom: 0;
|
|
159
|
+
left: 0;
|
|
160
|
+
height: 100%;
|
|
161
|
+
width: 75%;
|
|
162
|
+
border-right-width: 1px;
|
|
163
|
+
border-right-style: solid;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.jgis-sheet-content[data-side='left'][data-state='open'] {
|
|
167
|
+
animation:
|
|
168
|
+
sheet-fade-in 0.2s ease-out,
|
|
169
|
+
sheet-slide-in-left 0.2s ease-out;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.jgis-sheet-content[data-side='left'][data-state='closed'] {
|
|
173
|
+
animation:
|
|
174
|
+
sheet-fade-out 0.2s ease-in,
|
|
175
|
+
sheet-slide-out-left 0.2s ease-in;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
@media (min-width: 640px) {
|
|
179
|
+
.jgis-sheet-content[data-side='left'] {
|
|
180
|
+
max-width: 24rem;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/* Top */
|
|
185
|
+
.jgis-sheet-content[data-side='top'] {
|
|
186
|
+
left: 0;
|
|
187
|
+
right: 0;
|
|
188
|
+
top: 0;
|
|
189
|
+
height: auto;
|
|
190
|
+
border-bottom-width: 1px;
|
|
191
|
+
border-bottom-style: solid;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.jgis-sheet-content[data-side='top'][data-state='open'] {
|
|
195
|
+
animation:
|
|
196
|
+
sheet-fade-in 0.2s ease-out,
|
|
197
|
+
sheet-slide-in-top 0.2s ease-out;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.jgis-sheet-content[data-side='top'][data-state='closed'] {
|
|
201
|
+
animation:
|
|
202
|
+
sheet-fade-out 0.2s ease-in,
|
|
203
|
+
sheet-slide-out-top 0.2s ease-in;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/* Bottom */
|
|
207
|
+
.jgis-sheet-content[data-side='bottom'] {
|
|
208
|
+
left: 0;
|
|
209
|
+
right: 0;
|
|
210
|
+
bottom: 0;
|
|
211
|
+
height: auto;
|
|
212
|
+
border-top-width: 1px;
|
|
213
|
+
border-top-style: solid;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.jgis-sheet-content[data-side='bottom'][data-state='open'] {
|
|
217
|
+
animation:
|
|
218
|
+
sheet-fade-in 0.2s ease-out,
|
|
219
|
+
sheet-slide-in-bottom 0.2s ease-out;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.jgis-sheet-content[data-side='bottom'][data-state='closed'] {
|
|
223
|
+
animation:
|
|
224
|
+
sheet-fade-out 0.2s ease-in,
|
|
225
|
+
sheet-slide-out-bottom 0.2s ease-in;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.jgis-sheet-close {
|
|
229
|
+
position: absolute;
|
|
230
|
+
top: 0.75rem;
|
|
231
|
+
right: 0.75rem;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.jgis-sheet-header {
|
|
235
|
+
display: flex;
|
|
236
|
+
flex-direction: column;
|
|
237
|
+
gap: 0.125rem;
|
|
238
|
+
padding: 1rem;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.jgis-sheet-footer {
|
|
242
|
+
display: flex;
|
|
243
|
+
flex-direction: column;
|
|
244
|
+
gap: 0.5rem;
|
|
245
|
+
padding: 1rem;
|
|
246
|
+
margin-top: auto;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.jgis-sheet-title {
|
|
250
|
+
font-size: 1rem;
|
|
251
|
+
font-weight: 500;
|
|
252
|
+
color: var(--jp-ui-font-color0);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.jgis-sheet-description {
|
|
256
|
+
font-size: 0.875rem;
|
|
257
|
+
color: var(--jp-ui-font-color2);
|
|
258
|
+
}
|
package/style/storyPanel.css
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.jgis-story-viewer-panel {
|
|
2
2
|
padding: 1rem;
|
|
3
|
-
overflow:
|
|
3
|
+
overflow: auto;
|
|
4
4
|
position: relative;
|
|
5
5
|
}
|
|
6
6
|
|
|
@@ -77,14 +77,36 @@
|
|
|
77
77
|
justify-content: center;
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
+
.jgis-story-navbar .jgis-button.jgis-story-navbar-button {
|
|
81
|
+
color: var(--jp-ui-inverse-font-color0);
|
|
82
|
+
background-color: var(--jp-inverse-layout-color0);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.jgis-story-viewer-image-container
|
|
86
|
+
.jgis-story-viewer-nav-container
|
|
87
|
+
.jgis-story-navbar
|
|
88
|
+
.jgis-story-navbar-button {
|
|
89
|
+
color: var(--jp-ui-font-color0);
|
|
90
|
+
background-color: var(--jp-layout-color0);
|
|
91
|
+
}
|
|
92
|
+
|
|
80
93
|
.jgis-story-viewer-subtitle-container {
|
|
81
94
|
display: flex;
|
|
82
95
|
align-items: center;
|
|
83
|
-
/* justify-content: space-between; */
|
|
84
|
-
/* gap: 1rem; */
|
|
85
96
|
padding-top: 1rem;
|
|
86
97
|
}
|
|
87
98
|
|
|
99
|
+
.jgis-story-viewer-nav-container-specta-mobile {
|
|
100
|
+
position: absolute;
|
|
101
|
+
left: 0;
|
|
102
|
+
width: 100%;
|
|
103
|
+
padding: 0 1rem;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.jgis-story-viewer-nav-container-specta-mobile .jgis-story-navbar {
|
|
107
|
+
justify-content: space-between;
|
|
108
|
+
}
|
|
109
|
+
|
|
88
110
|
.jgis-story-navbar.jgis-story-navbar-specta-mod {
|
|
89
111
|
position: fixed;
|
|
90
112
|
top: 50%;
|
|
@@ -182,6 +204,12 @@
|
|
|
182
204
|
.jp-FormGroup-content
|
|
183
205
|
fieldset
|
|
184
206
|
.jp-inputFieldWrapper
|
|
185
|
-
> input#
|
|
207
|
+
> input#root_presentationTextColor {
|
|
186
208
|
height: revert;
|
|
187
209
|
}
|
|
210
|
+
|
|
211
|
+
.jgis-mobile-specta-trigger-wrapper {
|
|
212
|
+
position: fixed;
|
|
213
|
+
bottom: 0.125rem;
|
|
214
|
+
right: 0.125rem;
|
|
215
|
+
}
|