@jupytergis/base 0.12.0 → 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.
Files changed (55) hide show
  1. package/lib/constants.d.ts +3 -2
  2. package/lib/dialogs/layerBrowserDialog.d.ts +3 -3
  3. package/lib/dialogs/layerBrowserDialog.js +9 -10
  4. package/lib/formbuilder/objectform/StoryEditorForm.js +19 -2
  5. package/lib/mainview/mainView.d.ts +8 -2
  6. package/lib/mainview/mainView.js +40 -11
  7. package/lib/mainview/mainviewwidget.js +2 -2
  8. package/lib/panelview/leftpanel.d.ts +2 -1
  9. package/lib/panelview/leftpanel.js +46 -29
  10. package/lib/panelview/rightpanel.d.ts +2 -1
  11. package/lib/panelview/rightpanel.js +13 -18
  12. package/lib/panelview/story-maps/MobileSpectaPanel.d.ts +7 -0
  13. package/lib/panelview/story-maps/MobileSpectaPanel.js +114 -0
  14. package/lib/panelview/story-maps/StoryNavBar.d.ts +3 -2
  15. package/lib/panelview/story-maps/StoryNavBar.js +18 -6
  16. package/lib/panelview/story-maps/StoryViewerPanel.d.ts +10 -0
  17. package/lib/panelview/story-maps/StoryViewerPanel.js +44 -18
  18. package/lib/panelview/story-maps/components/StoryImageSection.d.ts +2 -7
  19. package/lib/panelview/story-maps/components/StoryImageSection.js +2 -4
  20. package/lib/panelview/story-maps/components/StorySubtitleSection.d.ts +2 -6
  21. package/lib/panelview/story-maps/components/StorySubtitleSection.js +2 -4
  22. package/lib/panelview/story-maps/components/StoryTitleSection.d.ts +2 -7
  23. package/lib/panelview/story-maps/components/StoryTitleSection.js +2 -3
  24. package/lib/shared/components/Button.js +2 -2
  25. package/lib/shared/components/Calendar.js +0 -1
  26. package/lib/shared/components/Checkbox.d.ts +1 -1
  27. package/lib/shared/components/Checkbox.js +1 -1
  28. package/lib/shared/components/Dialog.d.ts +1 -1
  29. package/lib/shared/components/Dialog.js +1 -1
  30. package/lib/shared/components/Drawer.d.ts +13 -0
  31. package/lib/shared/components/Drawer.js +59 -0
  32. package/lib/shared/components/DropdownMenu.d.ts +1 -1
  33. package/lib/shared/components/DropdownMenu.js +1 -1
  34. package/lib/shared/components/Popover.d.ts +1 -1
  35. package/lib/shared/components/Popover.js +1 -1
  36. package/lib/shared/components/RadioGroup.d.ts +1 -1
  37. package/lib/shared/components/RadioGroup.js +1 -1
  38. package/lib/shared/components/Sheet.d.ts +15 -0
  39. package/lib/shared/components/Sheet.js +64 -0
  40. package/lib/shared/components/Switch.d.ts +1 -1
  41. package/lib/shared/components/Switch.js +1 -1
  42. package/lib/shared/components/Tabs.d.ts +1 -1
  43. package/lib/shared/components/Tabs.js +1 -1
  44. package/lib/shared/components/ToggleGroup.d.ts +1 -1
  45. package/lib/shared/components/ToggleGroup.js +1 -1
  46. package/lib/shared/hooks/useMediaQuery.d.ts +9 -0
  47. package/lib/shared/hooks/useMediaQuery.js +32 -0
  48. package/lib/tools.d.ts +2 -1
  49. package/lib/tools.js +33 -38
  50. package/package.json +5 -13
  51. package/style/base.css +23 -8
  52. package/style/shared/drawer.css +154 -0
  53. package/style/shared/sheet.css +258 -0
  54. package/style/shared/tabs.css +0 -6
  55. package/style/storyPanel.css +39 -9
@@ -0,0 +1,64 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import { XIcon } from 'lucide-react';
13
+ import { Dialog as SheetPrimitive } from 'radix-ui';
14
+ import * as React from 'react';
15
+ import { Button } from './Button';
16
+ import { cn } from './utils';
17
+ function Sheet(_a) {
18
+ var props = __rest(_a, []);
19
+ return React.createElement(SheetPrimitive.Root, Object.assign({ "data-slot": "sheet" }, props));
20
+ }
21
+ function SheetTrigger(_a) {
22
+ var props = __rest(_a, []);
23
+ return React.createElement(SheetPrimitive.Trigger, Object.assign({ "data-slot": "sheet-trigger" }, props));
24
+ }
25
+ function SheetClose(_a) {
26
+ var props = __rest(_a, []);
27
+ return React.createElement(SheetPrimitive.Close, Object.assign({ "data-slot": "sheet-close" }, props));
28
+ }
29
+ function SheetPortal(_a) {
30
+ var props = __rest(_a, []);
31
+ return React.createElement(SheetPrimitive.Portal, Object.assign({ "data-slot": "sheet-portal" }, props));
32
+ }
33
+ function SheetOverlay(_a) {
34
+ var { className } = _a, props = __rest(_a, ["className"]);
35
+ return (React.createElement(SheetPrimitive.Overlay, Object.assign({ "data-slot": "sheet-overlay", className: cn('jgis-sheet-overlay', className) }, props)));
36
+ }
37
+ function SheetContent(_a) {
38
+ var { className, children, side = 'right', showCloseButton = true, container } = _a, props = __rest(_a, ["className", "children", "side", "showCloseButton", "container"]);
39
+ return (React.createElement(SheetPortal, null,
40
+ React.createElement(SheetOverlay, null),
41
+ React.createElement(SheetPrimitive.Content, Object.assign({ "data-slot": "sheet-content", "data-side": side, className: cn('jgis-sheet-content', className) }, props),
42
+ children,
43
+ showCloseButton && (React.createElement(SheetPrimitive.Close, { "data-slot": "sheet-close", asChild: true },
44
+ React.createElement(Button, { variant: "ghost", className: "jgis-sheet-close", size: "icon-sm" },
45
+ React.createElement(XIcon, null),
46
+ React.createElement("span", { className: "jgis-sr-only" }, "Close")))))));
47
+ }
48
+ function SheetHeader(_a) {
49
+ var { className } = _a, props = __rest(_a, ["className"]);
50
+ return (React.createElement("div", Object.assign({ "data-slot": "sheet-header", className: cn('jgis-sheet-header', className) }, props)));
51
+ }
52
+ function SheetFooter(_a) {
53
+ var { className } = _a, props = __rest(_a, ["className"]);
54
+ return (React.createElement("div", Object.assign({ "data-slot": "sheet-footer", className: cn('jgis-sheet-footer', className) }, props)));
55
+ }
56
+ function SheetTitle(_a) {
57
+ var { className } = _a, props = __rest(_a, ["className"]);
58
+ return (React.createElement(SheetPrimitive.Title, Object.assign({ "data-slot": "sheet-title", className: cn('jgis-sheet-title', className) }, props)));
59
+ }
60
+ function SheetDescription(_a) {
61
+ var { className } = _a, props = __rest(_a, ["className"]);
62
+ return (React.createElement(SheetPrimitive.Description, Object.assign({ "data-slot": "sheet-description", className: cn('jgis-sheet-description', className) }, props)));
63
+ }
64
+ export { Sheet, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, };
@@ -1,4 +1,4 @@
1
- import * as SwitchPrimitive from '@radix-ui/react-switch';
1
+ import { Switch as SwitchPrimitive } from 'radix-ui';
2
2
  import * as React from 'react';
3
3
  declare function Switch({ className, ...props }: React.ComponentProps<typeof SwitchPrimitive.Root>): React.JSX.Element;
4
4
  export { Switch };
@@ -9,7 +9,7 @@ var __rest = (this && this.__rest) || function (s, e) {
9
9
  }
10
10
  return t;
11
11
  };
12
- import * as SwitchPrimitive from '@radix-ui/react-switch';
12
+ import { Switch as SwitchPrimitive } from 'radix-ui';
13
13
  import * as React from 'react';
14
14
  import { cn } from './utils';
15
15
  function Switch(_a) {
@@ -1,4 +1,4 @@
1
- import * as TabsPrimitive from '@radix-ui/react-tabs';
1
+ import { Tabs as TabsPrimitive } from 'radix-ui';
2
2
  import * as React from 'react';
3
3
  interface IPanelTabProps {
4
4
  className: string;
@@ -9,7 +9,7 @@ var __rest = (this && this.__rest) || function (s, e) {
9
9
  }
10
10
  return t;
11
11
  };
12
- import * as TabsPrimitive from '@radix-ui/react-tabs';
12
+ import { Tabs as TabsPrimitive } from 'radix-ui';
13
13
  import * as React from 'react';
14
14
  import { cn } from './utils';
15
15
  const Tabs = (_a) => {
@@ -1,5 +1,5 @@
1
- import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
2
1
  import { type VariantProps } from 'class-variance-authority';
2
+ import { ToggleGroup as ToggleGroupPrimitive } from 'radix-ui';
3
3
  import * as React from 'react';
4
4
  declare const ToggleGroup: React.ForwardRefExoticComponent<((Omit<ToggleGroupPrimitive.ToggleGroupSingleProps & React.RefAttributes<HTMLDivElement>, "ref"> | Omit<ToggleGroupPrimitive.ToggleGroupMultipleProps & React.RefAttributes<HTMLDivElement>, "ref">) & VariantProps<(props?: ({
5
5
  variant?: "default" | "outline" | null | undefined;
@@ -9,8 +9,8 @@ var __rest = (this && this.__rest) || function (s, e) {
9
9
  }
10
10
  return t;
11
11
  };
12
- import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
13
12
  import { cva } from 'class-variance-authority';
13
+ import { ToggleGroup as ToggleGroupPrimitive } from 'radix-ui';
14
14
  import * as React from 'react';
15
15
  import { cn } from './utils';
16
16
  const toggleVariants = cva('jgis-toggle', {
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Subscribes to a media query and returns whether it currently matches.
3
+ * Updates when the viewport changes (resize, orientation).
4
+ *
5
+ * @param query - Media query string (e.g. '(max-width: 768px)').
6
+ * @returns True if the query matches, false otherwise (and when window is unavailable).
7
+ */
8
+ declare function useMediaQuery(query: string): boolean;
9
+ export default useMediaQuery;
@@ -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.d.ts CHANGED
@@ -5,7 +5,8 @@ export declare const debounce: (func: CallableFunction, timeout?: number) => Cal
5
5
  export declare function throttle<T extends (...args: any[]) => void>(callback: T, delay?: number): T;
6
6
  export declare function getElementFromProperty(filePath?: string | null, prop?: string | null): HTMLElement | undefined | null;
7
7
  export declare function nearest(n: number, tol: number): number;
8
- export declare function getCSSVariableColor(name: string): string;
8
+ /** Read a CSS variable from the document root and return the value. */
9
+ export declare function getCssVarAsColor(cssVar: string): string;
9
10
  /**
10
11
  * Call the API extension
11
12
  *
package/lib/tools.js CHANGED
@@ -2,11 +2,10 @@ import { showErrorMessage } from '@jupyterlab/apputils';
2
2
  import { PathExt, URLExt } from '@jupyterlab/coreutils';
3
3
  import { ServerConnection } from '@jupyterlab/services';
4
4
  import { VectorTile } from '@mapbox/vector-tile';
5
- import * as d3Color from 'd3-color';
6
5
  import { compressors } from 'hyparquet-compressors';
7
6
  import Protobuf from 'pbf';
8
7
  import shp from 'shpjs';
9
- import RASTER_LAYER_GALLERY from "../rasterlayer_gallery/raster_layer_gallery.json";
8
+ import LAYER_GALLERY from "../layer_gallery.json";
10
9
  export const debounce = (func, timeout = 100) => {
11
10
  let timeoutId;
12
11
  return (...args) => {
@@ -53,9 +52,18 @@ export function nearest(n, tol) {
53
52
  return n;
54
53
  }
55
54
  }
56
- export function getCSSVariableColor(name) {
57
- const color = window.getComputedStyle(document.body).getPropertyValue(name) || '#ffffff';
58
- return d3Color.rgb(color).formatHex();
55
+ /** Read a CSS variable from the document root and return the value. */
56
+ export function getCssVarAsColor(cssVar) {
57
+ if (typeof document === 'undefined') {
58
+ return '';
59
+ }
60
+ const value = getComputedStyle(document.documentElement)
61
+ .getPropertyValue(cssVar)
62
+ .trim();
63
+ if (!value) {
64
+ return '';
65
+ }
66
+ return value;
59
67
  }
60
68
  /**
61
69
  * Call the API extension
@@ -104,27 +112,29 @@ export function deepCopy(value) {
104
112
  * @param layerBrowserRegistry Registry to add layers to
105
113
  */
106
114
  export function createDefaultLayerRegistry(layerBrowserRegistry) {
107
- const RASTER_THUMBNAILS = {};
115
+ const LAYER_THUMBNAILS = {};
108
116
  /**
109
117
  * Generate object to hold thumbnail URLs
110
118
  */
111
119
  const importAll = (r) => {
112
120
  r.keys().forEach(key => {
113
121
  const imageName = key.replace('./', '').replace(/\.\w+$/, '');
114
- RASTER_THUMBNAILS[imageName] = r(key);
122
+ LAYER_THUMBNAILS[imageName] = r(key);
115
123
  });
116
124
  };
117
- const context = require.context('../rasterlayer_gallery', false, /\.(png|jpe?g|gif|svg)$/);
125
+ const context = require.context('../layer_gallery', false, /\.(png|jpe?g|gif|svg)$/);
118
126
  importAll(context);
119
- for (const entry of Object.keys(RASTER_LAYER_GALLERY)) {
120
- const xyzprovider = RASTER_LAYER_GALLERY[entry];
121
- if ('url' in xyzprovider) {
122
- const tile = convertToRegistryEntry(entry, xyzprovider);
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);
123
132
  layerBrowserRegistry.addRegistryLayer(tile);
124
133
  }
125
134
  else {
126
- Object.keys(xyzprovider).forEach(mapName => {
127
- const tile = convertToRegistryEntry(xyzprovider[mapName]['name'], xyzprovider[mapName], entry);
135
+ /* nested layer provider */
136
+ Object.keys(layerProvider).forEach(mapName => {
137
+ const tile = convertToRegistryEntry(layerProvider[mapName]['name'], layerProvider[mapName], entry);
128
138
  layerBrowserRegistry.addRegistryLayer(tile);
129
139
  });
130
140
  }
@@ -134,35 +144,20 @@ export function createDefaultLayerRegistry(layerBrowserRegistry) {
134
144
  * Parse tile information from providers to be usable in the layer registry
135
145
  *
136
146
  * @param entry - The name of the entry, which may also serve as the default provider name if none is specified.
137
- * @param xyzprovider - An object containing the XYZ provider's details, including name, URL, zoom levels, attribution, and possibly other properties relevant to the provider.
147
+ * @param layerProvider - An object containing the provider's details, including name, URL, zoom levels, attribution, and possibly other properties relevant to the provider.
138
148
  * @param provider - Optional. Specifies the provider name. If not provided, the `entry` parameter is used as the default provider name.
139
149
  * @returns - An object representing the registry entry
140
150
  */
141
- function convertToRegistryEntry(entry, xyzprovider, provider) {
142
- const urlParameters = {};
143
- if (xyzprovider.time) {
144
- urlParameters.time = xyzprovider.time;
145
- }
146
- if (xyzprovider.variant) {
147
- urlParameters.variant = xyzprovider.variant;
148
- }
149
- if (xyzprovider.tilematrixset) {
150
- urlParameters.tilematrixset = xyzprovider.tilematrixset;
151
- }
152
- if (xyzprovider.format) {
153
- urlParameters.format = xyzprovider.format;
154
- }
151
+ function convertToRegistryEntry(entry, layerProvider, provider) {
155
152
  return {
156
153
  name: entry,
157
- thumbnail: RASTER_THUMBNAILS[xyzprovider['name'].replace('.', '-')],
158
- source: {
159
- url: xyzprovider['url'],
160
- minZoom: xyzprovider['min_zoom'] || 0,
161
- maxZoom: xyzprovider['max_zoom'] || 24,
162
- attribution: xyzprovider['attribution'] || '',
163
- provider: provider !== null && provider !== void 0 ? provider : entry,
164
- urlParameters,
165
- },
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'],
166
161
  };
167
162
  }
168
163
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jupytergis/base",
3
- "version": "0.12.0",
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.0",
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",
@@ -80,7 +71,6 @@
80
71
  "clsx": "^2.1.1",
81
72
  "cmdk": "^1.1.1",
82
73
  "colormap": "^2.3.2",
83
- "d3-color": "^3.1.0",
84
74
  "date-fns": "^4.1.0",
85
75
  "gdal3.js": "^2.8.1",
86
76
  "geojson-vt": "^4.0.2",
@@ -95,6 +85,7 @@
95
85
  "pmtiles": "^3.0.7",
96
86
  "proj4": "2.19.3",
97
87
  "proj4-list": "1.0.4",
88
+ "radix-ui": "^1.4.3",
98
89
  "react": "^18.0.1",
99
90
  "react-day-picker": "^9.7.0",
100
91
  "react-markdown": "^10.1.0",
@@ -102,7 +93,8 @@
102
93
  "styled-components": "^5.3.6",
103
94
  "three": "^0.135.0",
104
95
  "three-mesh-bvh": "^0.5.17",
105
- "uuid": "^11.0.3"
96
+ "uuid": "^11.0.3",
97
+ "vaul": "^1.1.2"
106
98
  },
107
99
  "devDependencies": {
108
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');
@@ -95,20 +97,28 @@ button.jp-mod-styled.jp-mod-reject {
95
97
  border-width: 0;
96
98
  }
97
99
 
98
- .jgis-right-panel-container {
99
- width: 330px;
100
- right: 0px;
100
+ /* Height constrained to 0.5rem less than .jGIS-Mainview-Container */
101
+ .jgis-right-panel-container,
102
+ .jgis-left-panel-container {
101
103
  position: absolute;
102
- margin: 5px;
104
+ margin: 0.25rem;
103
105
  z-index: 40;
106
+ max-height: calc(100% - 0.5rem);
107
+ overflow-y: auto;
108
+ border-radius: 8px;
109
+ box-shadow:
110
+ 0 4px 8px 0 rgba(0, 0, 0, 0.2),
111
+ 0 6px 20px 0 rgba(0, 0, 0, 0.19);
112
+ }
113
+
114
+ .jgis-right-panel-container {
115
+ width: 330px;
116
+ right: 0;
104
117
  }
105
118
 
106
119
  .jgis-left-panel-container {
107
- position: absolute;
108
120
  width: 250px;
109
- left: 0px;
110
- margin: 5px;
111
- z-index: 40;
121
+ left: 0;
112
122
  }
113
123
 
114
124
  .jgis-icon-adjust {
@@ -162,3 +172,8 @@ button.jp-mod-styled.jp-mod-reject {
162
172
  margin: 0;
163
173
  }
164
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
+ }