@shellui/core 0.0.20 → 0.0.22

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 (33) hide show
  1. package/package.json +2 -2
  2. package/src/components/ContentView.tsx +1 -1
  3. package/src/components/NotFoundView.tsx +2 -2
  4. package/src/components/RouteErrorBoundary.tsx +1 -1
  5. package/src/components/ui/alert-dialog.tsx +3 -3
  6. package/src/components/ui/breadcrumb.tsx +1 -1
  7. package/src/components/ui/button-group.tsx +1 -1
  8. package/src/components/ui/button.tsx +1 -1
  9. package/src/components/ui/dialog.tsx +2 -2
  10. package/src/components/ui/drawer.tsx +2 -2
  11. package/src/components/ui/select.tsx +1 -1
  12. package/src/components/ui/sidebar.tsx +2 -2
  13. package/src/components/ui/sonner.tsx +2 -2
  14. package/src/components/ui/switch.tsx +1 -1
  15. package/src/features/alertDialog/DialogContext.tsx +3 -3
  16. package/src/features/cookieConsent/CookieConsentModal.tsx +1 -1
  17. package/src/features/cookieConsent/CookiePreferencesView.tsx +2 -2
  18. package/src/features/drawer/DrawerContext.tsx +1 -1
  19. package/src/features/layouts/DefaultLayout.tsx +3 -3
  20. package/src/features/layouts/OverlayShell.tsx +4 -4
  21. package/src/features/layouts/WindowsLayout.tsx +3 -3
  22. package/src/features/settings/SettingsView.tsx +5 -5
  23. package/src/features/settings/components/Advanced.tsx +4 -4
  24. package/src/features/settings/components/Appearance.tsx +5 -5
  25. package/src/features/settings/components/DataPrivacy.tsx +4 -4
  26. package/src/features/settings/components/Develop.tsx +3 -3
  27. package/src/features/settings/components/LanguageAndRegion.tsx +6 -6
  28. package/src/features/settings/components/ServiceWorker.tsx +3 -3
  29. package/src/features/settings/components/UpdateApp.tsx +3 -3
  30. package/src/features/settings/components/develop/DialogTestButtons.tsx +1 -1
  31. package/src/features/settings/components/develop/DrawerTestButtons.tsx +2 -2
  32. package/src/features/settings/components/develop/ModalTestButtons.tsx +2 -2
  33. package/src/features/settings/components/develop/ToastTestButtons.tsx +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shellui/core",
3
- "version": "0.0.20",
3
+ "version": "0.0.22",
4
4
  "description": "ShellUI Core - Core React application runtime",
5
5
  "main": "src/index.ts",
6
6
  "type": "module",
@@ -57,7 +57,7 @@
57
57
  "workbox-strategies": "^7.1.0",
58
58
  "workbox-cacheable-response": "^7.1.0",
59
59
  "workbox-expiration": "^7.1.0",
60
- "@shellui/sdk": "0.0.20"
60
+ "@shellui/sdk": "0.0.22"
61
61
  },
62
62
  "peerDependencies": {
63
63
  "react": "^18.0.0 || ^19.0.0",
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable no-console */
2
- import type { NavigationItem } from '@/features/config/types';
2
+ import type { NavigationItem } from '../features/config/types';
3
3
  import {
4
4
  addIframe,
5
5
  removeIframe,
@@ -1,7 +1,7 @@
1
1
  import { useTranslation } from 'react-i18next';
2
2
  import { shellui } from '@shellui/sdk';
3
- import { useConfig } from '@/features/config/useConfig';
4
- import type { NavigationItem, NavigationGroup } from '@/features/config/types';
3
+ import { useConfig } from '../features/config/useConfig';
4
+ import type { NavigationItem, NavigationGroup } from '../features/config/types';
5
5
 
6
6
  const flattenNavigationItems = (
7
7
  navigation: (NavigationItem | NavigationGroup)[],
@@ -1,7 +1,7 @@
1
1
  import { useRouteError, isRouteErrorResponse } from 'react-router';
2
2
  import { useTranslation } from 'react-i18next';
3
3
  import { shellui } from '@shellui/sdk';
4
- import { Button } from '@/components/ui/button';
4
+ import { Button } from './ui/button';
5
5
 
6
6
  function isChunkLoadError(error: unknown): boolean {
7
7
  if (error instanceof Error) {
@@ -6,9 +6,9 @@ import {
6
6
  } from 'react';
7
7
  import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
8
8
  import { cva, type VariantProps } from 'class-variance-authority';
9
- import { cn } from '@/lib/utils';
10
- import { Z_INDEX } from '@/lib/z-index';
11
- import { Button, type ButtonProps } from '@/components/ui/button';
9
+ import { cn } from '../../lib/utils';
10
+ import { Z_INDEX } from '../../lib/z-index';
11
+ import { Button, type ButtonProps } from './button';
12
12
 
13
13
  const AlertDialog = AlertDialogPrimitive.Root;
14
14
 
@@ -5,7 +5,7 @@ import {
5
5
  type ReactNode,
6
6
  } from 'react';
7
7
  import { Slot } from '@radix-ui/react-slot';
8
- import { cn } from '@/lib/utils';
8
+ import { cn } from '../../lib/utils';
9
9
 
10
10
  const Breadcrumb = forwardRef<
11
11
  HTMLElement,
@@ -7,7 +7,7 @@ import {
7
7
  type ReactNode,
8
8
  type ReactElement,
9
9
  } from 'react';
10
- import { cn } from '@/lib/utils';
10
+ import { cn } from '../../lib/utils';
11
11
 
12
12
  export interface ButtonGroupProps extends HTMLAttributes<HTMLDivElement> {
13
13
  children: ReactNode;
@@ -1,7 +1,7 @@
1
1
  import { forwardRef, type ButtonHTMLAttributes } from 'react';
2
2
  import { Slot } from '@radix-ui/react-slot';
3
3
  import { cva, type VariantProps } from 'class-variance-authority';
4
- import { cn } from '@/lib/utils';
4
+ import { cn } from '../../lib/utils';
5
5
 
6
6
  const buttonVariants = cva(
7
7
  'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 cursor-pointer disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',
@@ -8,8 +8,8 @@ import {
8
8
  type HTMLAttributes,
9
9
  } from 'react';
10
10
  import * as DialogPrimitive from '@radix-ui/react-dialog';
11
- import { cn } from '@/lib/utils';
12
- import { Z_INDEX } from '@/lib/z-index';
11
+ import { cn } from '../../lib/utils';
12
+ import { Z_INDEX } from '../../lib/z-index';
13
13
 
14
14
  const Dialog = DialogPrimitive.Root;
15
15
 
@@ -10,8 +10,8 @@ import {
10
10
  type HTMLAttributes,
11
11
  } from 'react';
12
12
  import { Drawer as VaulDrawer } from 'vaul';
13
- import { cn } from '@/lib/utils';
14
- import { Z_INDEX } from '@/lib/z-index';
13
+ import { cn } from '../../lib/utils';
14
+ import { Z_INDEX } from '../../lib/z-index';
15
15
 
16
16
  export type DrawerDirection = 'top' | 'bottom' | 'left' | 'right';
17
17
 
@@ -1,5 +1,5 @@
1
1
  import { forwardRef, type SelectHTMLAttributes } from 'react';
2
- import { cn } from '@/lib/utils';
2
+ import { cn } from '../../lib/utils';
3
3
 
4
4
  export type SelectProps = SelectHTMLAttributes<HTMLSelectElement>;
5
5
 
@@ -11,8 +11,8 @@ import {
11
11
  } from 'react';
12
12
  import { Slot } from '@radix-ui/react-slot';
13
13
  import { cva, type VariantProps } from 'class-variance-authority';
14
- import { cn } from '@/lib/utils';
15
- import { Z_INDEX } from '@/lib/z-index';
14
+ import { cn } from '../../lib/utils';
15
+ import { Z_INDEX } from '../../lib/z-index';
16
16
 
17
17
  type SidebarContextValue = {
18
18
  isCollapsed: boolean;
@@ -1,7 +1,7 @@
1
1
  import type { ComponentProps } from 'react';
2
- import { useSettings } from '@/features/settings/hooks/useSettings';
2
+ import { useSettings } from '../../features/settings/hooks/useSettings';
3
3
  import { Toaster as Sonner } from 'sonner';
4
- import { Z_INDEX } from '@/lib/z-index';
4
+ import { Z_INDEX } from '../../lib/z-index';
5
5
 
6
6
  type ToasterProps = ComponentProps<typeof Sonner>;
7
7
 
@@ -1,5 +1,5 @@
1
1
  import { forwardRef, type InputHTMLAttributes, type ChangeEvent } from 'react';
2
- import { cn } from '@/lib/utils';
2
+ import { cn } from '../../lib/utils';
3
3
 
4
4
  export interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> {
5
5
  checked?: boolean;
@@ -8,8 +8,8 @@ import {
8
8
  useState,
9
9
  type ReactNode,
10
10
  } from 'react';
11
- import { Button } from '@/components/ui/button';
12
- import { Z_INDEX } from '@/lib/z-index';
11
+ import { Button } from '../../components/ui/button';
12
+ import { Z_INDEX } from '../../lib/z-index';
13
13
 
14
14
  /** Match exit animation duration in index.css (overlay + content ~0.1s + buffer) */
15
15
  const DIALOG_EXIT_ANIMATION_MS = 200;
@@ -25,7 +25,7 @@ import {
25
25
  AlertDialogTitle,
26
26
  AlertDialogOverlay,
27
27
  AlertDialogPortal,
28
- } from '@/components/ui/alert-dialog';
28
+ } from '../../components/ui/alert-dialog';
29
29
  import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
30
30
 
31
31
  /** Trash icon (matches lucide trash-2) */
@@ -4,7 +4,7 @@ import { shellui } from '@shellui/sdk';
4
4
  import { useDialog } from '../alertDialog/DialogContext';
5
5
  import { useConfig } from '../config/useConfig';
6
6
  import { useSettings } from '../settings/hooks/useSettings';
7
- import urls from '@/constants/urls';
7
+ import urls from '../../constants/urls';
8
8
 
9
9
  /**
10
10
  * Shows a friendly cookie consent modal on first visit (when user has not yet consented).
@@ -2,8 +2,8 @@ import { useState, useCallback, useMemo, useEffect, useRef } from 'react';
2
2
  import { useTranslation } from 'react-i18next';
3
3
  import { useLocation } from 'react-router';
4
4
  import { shellui } from '@shellui/sdk';
5
- import { Button } from '@/components/ui/button';
6
- import { Switch } from '@/components/ui/switch';
5
+ import { Button } from '../../components/ui/button';
6
+ import { Switch } from '../../components/ui/switch';
7
7
  import { useConfig } from '../config/useConfig';
8
8
  import { useSettings } from '../settings/hooks/useSettings';
9
9
  import { resolveLocalizedString } from '../layouts/utils';
@@ -1,6 +1,6 @@
1
1
  import { shellui, type ShellUIMessage } from '@shellui/sdk';
2
2
  import { createContext, useContext, useState, useEffect, useCallback, type ReactNode } from 'react';
3
- import type { DrawerDirection } from '@/components/ui/drawer';
3
+ import type { DrawerDirection } from '../../components/ui/drawer';
4
4
  import { useModal } from '../modal/ModalContext';
5
5
 
6
6
  /**
@@ -15,9 +15,9 @@ import {
15
15
  SidebarMenu,
16
16
  SidebarMenuItem,
17
17
  SidebarMenuButton,
18
- } from '@/components/ui/sidebar';
19
- import { cn } from '@/lib/utils';
20
- import { Z_INDEX } from '@/lib/z-index';
18
+ } from '../../components/ui/sidebar';
19
+ import { cn } from '../../lib/utils';
20
+ import { Z_INDEX } from '../../lib/z-index';
21
21
  import {
22
22
  filterNavigationByViewport,
23
23
  filterNavigationForSidebar,
@@ -3,10 +3,10 @@ import { useNavigate } from 'react-router';
3
3
  import { useTranslation } from 'react-i18next';
4
4
  import { shellui } from '@shellui/sdk';
5
5
  import type { NavigationItem } from '../config/types';
6
- import { Dialog, DialogContent, DialogTitle, DialogDescription } from '@/components/ui/dialog';
7
- import { Drawer, DrawerContent } from '@/components/ui/drawer';
8
- import { Toaster } from '@/components/ui/sonner';
9
- import { ContentView } from '@/components/ContentView';
6
+ import { Dialog, DialogContent, DialogTitle, DialogDescription } from '../../components/ui/dialog';
7
+ import { Drawer, DrawerContent } from '../../components/ui/drawer';
8
+ import { Toaster } from '../../components/ui/sonner';
9
+ import { ContentView } from '../../components/ContentView';
10
10
  import { useModal } from '../modal/ModalContext';
11
11
  import { useDrawer } from '../drawer/DrawerContext';
12
12
  import { resolveLocalizedString } from './utils';
@@ -17,9 +17,9 @@ import {
17
17
  import { useSettings } from '../settings/hooks/useSettings';
18
18
  import { LayoutProviders } from './LayoutProviders';
19
19
  import { OverlayShell } from './OverlayShell';
20
- import { ContentView } from '@/components/ContentView';
21
- import { cn } from '@/lib/utils';
22
- import { Z_INDEX } from '@/lib/z-index';
20
+ import { ContentView } from '../../components/ContentView';
21
+ import { cn } from '../../lib/utils';
22
+ import { Z_INDEX } from '../../lib/z-index';
23
23
 
24
24
  interface WindowsLayoutProps {
25
25
  title?: string;
@@ -5,7 +5,7 @@ import {
5
5
  BreadcrumbList,
6
6
  BreadcrumbPage,
7
7
  BreadcrumbSeparator,
8
- } from '@/components/ui/breadcrumb';
8
+ } from '../../components/ui/breadcrumb';
9
9
  import {
10
10
  Sidebar,
11
11
  SidebarContent,
@@ -16,15 +16,15 @@ import {
16
16
  SidebarMenuButton,
17
17
  SidebarMenuItem,
18
18
  SidebarProvider,
19
- } from '@/components/ui/sidebar';
19
+ } from '../../components/ui/sidebar';
20
20
  import { Route, Routes, useLocation, useNavigate, Navigate } from 'react-router';
21
21
  import { useTranslation } from 'react-i18next';
22
- import urls from '@/constants/urls';
22
+ import urls from '../../constants/urls';
23
23
  import { createSettingsRoutes } from './SettingsRoutes';
24
24
  import { useSettings } from './hooks/useSettings';
25
25
  import { useConfig } from '../config/useConfig';
26
- import { isTauri } from '@/service-worker/register';
27
- import { Button } from '@/components/ui/button';
26
+ import { isTauri } from '../../service-worker/register';
27
+ import { Button } from '../../components/ui/button';
28
28
  import { ChevronRightIcon, ChevronLeftIcon } from './SettingsIcons';
29
29
 
30
30
  export const SettingsView = () => {
@@ -1,9 +1,9 @@
1
1
  import { useTranslation } from 'react-i18next';
2
- import { Switch } from '@/components/ui/switch';
3
- import { useConfig } from '@/features/config/useConfig';
4
- import { closeSentry, initSentry } from '@/features/sentry/initSentry';
2
+ import { Switch } from '../../../components/ui/switch';
3
+ import { useConfig } from '../../config/useConfig';
4
+ import { closeSentry, initSentry } from '../../sentry/initSentry';
5
5
  import { useSettings } from '../hooks/useSettings';
6
- import { Button } from '@/components/ui/button';
6
+ import { Button } from '../../../components/ui/button';
7
7
  import { shellui } from '@shellui/sdk';
8
8
 
9
9
  export const Advanced = () => {
@@ -1,11 +1,11 @@
1
1
  import { useTranslation } from 'react-i18next';
2
2
  import { useSettings } from '../hooks/useSettings';
3
- import { useConfig } from '@/features/config/useConfig';
4
- import { Button } from '@/components/ui/button';
5
- import { ButtonGroup } from '@/components/ui/button-group';
6
- import { cn } from '@/lib/utils';
3
+ import { useConfig } from '../../config/useConfig';
4
+ import { Button } from '../../../components/ui/button';
5
+ import { ButtonGroup } from '../../../components/ui/button-group';
6
+ import { cn } from '../../../lib/utils';
7
7
  import { useEffect, useState } from 'react';
8
- import { getAllThemes, registerTheme, type ThemeDefinition } from '@/features/theme/themes';
8
+ import { getAllThemes, registerTheme, type ThemeDefinition } from '../../theme/themes';
9
9
 
10
10
  const SunIcon = () => (
11
11
  <svg
@@ -1,10 +1,10 @@
1
1
  import { useTranslation } from 'react-i18next';
2
2
  import { useSettings } from '../hooks/useSettings';
3
- import { useConfig } from '@/features/config/useConfig';
4
- import { Button } from '@/components/ui/button';
3
+ import { useConfig } from '../../config/useConfig';
4
+ import { Button } from '../../../components/ui/button';
5
5
  import { shellui } from '@shellui/sdk';
6
- import urls from '@/constants/urls';
7
- import { cn } from '@/lib/utils';
6
+ import urls from '../../../constants/urls';
7
+ import { cn } from '../../../lib/utils';
8
8
 
9
9
  export const DataPrivacy = () => {
10
10
  const { t } = useTranslation('settings');
@@ -3,9 +3,9 @@ import { shellui } from '@shellui/sdk';
3
3
  import { useSettings } from '../hooks/useSettings';
4
4
  import { useConfig } from '../../config/useConfig';
5
5
  import { flattenNavigationItems, resolveLocalizedString } from '../../layouts/utils';
6
- import { Switch } from '@/components/ui/switch';
7
- import { Select } from '@/components/ui/select';
8
- import { Button } from '@/components/ui/button';
6
+ import { Switch } from '../../../components/ui/switch';
7
+ import { Select } from '../../../components/ui/select';
8
+ import { Button } from '../../../components/ui/button';
9
9
  import { ToastTestButtons } from './develop/ToastTestButtons';
10
10
  import { DialogTestButtons } from './develop/DialogTestButtons';
11
11
  import { ModalTestButtons } from './develop/ModalTestButtons';
@@ -1,11 +1,11 @@
1
1
  import { useTranslation } from 'react-i18next';
2
2
  import { useSettings } from '../hooks/useSettings';
3
- import { useConfig } from '@/features/config/useConfig';
4
- import { getSupportedLanguages } from '@/i18n/config';
5
- import { Button } from '@/components/ui/button';
6
- import { ButtonGroup } from '@/components/ui/button-group';
7
- import { Select } from '@/components/ui/select';
8
- import { cn } from '@/lib/utils';
3
+ import { useConfig } from '../../config/useConfig';
4
+ import { getSupportedLanguages } from '../../../i18n/config';
5
+ import { Button } from '../../../components/ui/button';
6
+ import { ButtonGroup } from '../../../components/ui/button-group';
7
+ import { Select } from '../../../components/ui/select';
8
+ import { cn } from '../../../lib/utils';
9
9
  import { useState, useEffect } from 'react';
10
10
 
11
11
  const GlobeIcon = () => (
@@ -1,14 +1,14 @@
1
1
  import { useTranslation } from 'react-i18next';
2
2
  import { useSettings } from '../hooks/useSettings';
3
- import { Button } from '@/components/ui/button';
4
- import { Switch } from '@/components/ui/switch';
3
+ import { Button } from '../../../components/ui/button';
4
+ import { Switch } from '../../../components/ui/switch';
5
5
  import {
6
6
  isServiceWorkerRegistered,
7
7
  updateServiceWorker,
8
8
  getServiceWorkerStatus,
9
9
  addStatusListener,
10
10
  serviceWorkerFileExists,
11
- } from '@/service-worker/register';
11
+ } from '../../../service-worker/register';
12
12
  import { shellui } from '@shellui/sdk';
13
13
  import { useState, useEffect } from 'react';
14
14
 
@@ -1,14 +1,14 @@
1
1
  import { useTranslation } from 'react-i18next';
2
- import { useConfig } from '@/features/config/useConfig';
2
+ import { useConfig } from '../../config/useConfig';
3
3
  import { useSettings } from '../hooks/useSettings';
4
- import { Button } from '@/components/ui/button';
4
+ import { Button } from '../../../components/ui/button';
5
5
  import {
6
6
  isTauri,
7
7
  getServiceWorkerStatus,
8
8
  addStatusListener,
9
9
  checkForServiceWorkerUpdate,
10
10
  updateServiceWorker,
11
- } from '@/service-worker/register';
11
+ } from '../../../service-worker/register';
12
12
  import { shellui, getLogger } from '@shellui/sdk';
13
13
  import { CheckIcon } from '../SettingsIcons';
14
14
  import { useState, useEffect } from 'react';
@@ -1,5 +1,5 @@
1
1
  import { useTranslation } from 'react-i18next';
2
- import { Button } from '@/components/ui/button';
2
+ import { Button } from '../../../../components/ui/button';
3
3
  import { shellui } from '@shellui/sdk';
4
4
 
5
5
  export const DialogTestButtons = () => {
@@ -1,7 +1,7 @@
1
1
  import { useTranslation } from 'react-i18next';
2
- import { Button } from '@/components/ui/button';
2
+ import { Button } from '../../../../components/ui/button';
3
3
  import { shellui, type OpenDrawerOptions } from '@shellui/sdk';
4
- import urls from '@/constants/urls';
4
+ import urls from '../../../../constants/urls';
5
5
 
6
6
  export const DrawerTestButtons = () => {
7
7
  const { t } = useTranslation('settings');
@@ -1,7 +1,7 @@
1
1
  import { useTranslation } from 'react-i18next';
2
- import { Button } from '@/components/ui/button';
2
+ import { Button } from '../../../../components/ui/button';
3
3
  import { shellui } from '@shellui/sdk';
4
- import urls from '@/constants/urls';
4
+ import urls from '../../../../constants/urls';
5
5
 
6
6
  export const ModalTestButtons = () => {
7
7
  const { t } = useTranslation('settings');
@@ -1,5 +1,5 @@
1
1
  import { useTranslation } from 'react-i18next';
2
- import { Button } from '@/components/ui/button';
2
+ import { Button } from '../../../../components/ui/button';
3
3
  import { shellui } from '@shellui/sdk';
4
4
 
5
5
  export const ToastTestButtons = () => {