@djangocfg/ui-nextjs 2.1.42 → 2.1.43

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 (70) hide show
  1. package/package.json +4 -4
  2. package/src/animations/AnimatedBackground.tsx +1 -0
  3. package/src/blocks/ArticleCard.tsx +6 -7
  4. package/src/blocks/ArticleList.tsx +14 -13
  5. package/src/blocks/FeatureSection.tsx +87 -15
  6. package/src/blocks/SuperHero.tsx +10 -4
  7. package/src/components/breadcrumb-navigation.tsx +6 -9
  8. package/src/components/breadcrumb.tsx +6 -5
  9. package/src/components/button-download.tsx +7 -5
  10. package/src/components/dropdown-menu.tsx +6 -5
  11. package/src/components/markdown/MarkdownMessage.tsx +5 -2
  12. package/src/components/menubar.tsx +6 -5
  13. package/src/components/multi-select-pro/async.tsx +8 -18
  14. package/src/components/multi-select-pro/index.tsx +8 -18
  15. package/src/components/navigation-menu.tsx +7 -6
  16. package/src/components/otp/index.tsx +7 -9
  17. package/src/components/otp/use-otp-input.ts +2 -1
  18. package/src/components/pagination-static.tsx +7 -10
  19. package/src/components/pagination.tsx +6 -5
  20. package/src/components/phone-input.tsx +11 -10
  21. package/src/components/sidebar.tsx +11 -21
  22. package/src/components/sonner.tsx +2 -2
  23. package/src/components/ssr-pagination.tsx +6 -9
  24. package/src/hooks/useDeviceDetect.ts +1 -1
  25. package/src/hooks/useHotkey.ts +2 -1
  26. package/src/hooks/useLocalStorage.ts +1 -1
  27. package/src/hooks/useQueryParams.ts +1 -1
  28. package/src/theme/ForceTheme.tsx +1 -0
  29. package/src/theme/ThemeProvider.tsx +1 -0
  30. package/src/theme/ThemeToggle.tsx +4 -2
  31. package/src/tools/JsonForm/JsonSchemaForm.tsx +12 -21
  32. package/src/tools/JsonForm/examples/BotConfigExample.tsx +7 -3
  33. package/src/tools/JsonForm/examples/RealBotConfigExample.tsx +7 -3
  34. package/src/tools/JsonForm/templates/ArrayFieldItemTemplate.tsx +2 -1
  35. package/src/tools/JsonForm/templates/ArrayFieldTemplate.tsx +3 -2
  36. package/src/tools/JsonForm/templates/BaseInputTemplate.tsx +3 -2
  37. package/src/tools/JsonForm/templates/ErrorListTemplate.tsx +3 -2
  38. package/src/tools/JsonForm/templates/FieldTemplate.tsx +2 -1
  39. package/src/tools/JsonForm/templates/ObjectFieldTemplate.tsx +4 -7
  40. package/src/tools/JsonForm/utils.ts +2 -1
  41. package/src/tools/JsonForm/widgets/CheckboxWidget.tsx +2 -1
  42. package/src/tools/JsonForm/widgets/ColorWidget.tsx +3 -2
  43. package/src/tools/JsonForm/widgets/NumberWidget.tsx +3 -2
  44. package/src/tools/JsonForm/widgets/SelectWidget.tsx +4 -7
  45. package/src/tools/JsonForm/widgets/SliderWidget.tsx +4 -3
  46. package/src/tools/JsonForm/widgets/SwitchWidget.tsx +2 -1
  47. package/src/tools/JsonForm/widgets/TextWidget.tsx +3 -2
  48. package/src/tools/JsonTree/index.tsx +2 -1
  49. package/src/tools/LottiePlayer/LottiePlayer.client.tsx +1 -0
  50. package/src/tools/LottiePlayer/index.tsx +1 -0
  51. package/src/tools/LottiePlayer/useLottie.ts +2 -1
  52. package/src/tools/Mermaid/Mermaid.client.tsx +3 -2
  53. package/src/tools/Mermaid/components/MermaidFullscreenModal.tsx +1 -0
  54. package/src/tools/Mermaid/hooks/useMermaidFullscreen.ts +1 -1
  55. package/src/tools/Mermaid/hooks/useMermaidRenderer.ts +3 -2
  56. package/src/tools/OpenapiViewer/components/EndpointInfo.tsx +22 -16
  57. package/src/tools/OpenapiViewer/components/EndpointsLibrary.tsx +12 -4
  58. package/src/tools/OpenapiViewer/components/PlaygroundLayout.tsx +4 -2
  59. package/src/tools/OpenapiViewer/components/PlaygroundStepper.tsx +3 -1
  60. package/src/tools/OpenapiViewer/components/RequestBuilder.tsx +9 -6
  61. package/src/tools/OpenapiViewer/components/RequestParametersForm.tsx +7 -7
  62. package/src/tools/OpenapiViewer/components/ResponseViewer.tsx +8 -4
  63. package/src/tools/OpenapiViewer/components/VersionSelector.tsx +7 -3
  64. package/src/tools/OpenapiViewer/context/PlaygroundContext.tsx +9 -3
  65. package/src/tools/OpenapiViewer/hooks/useOpenApiSchema.ts +3 -7
  66. package/src/tools/OpenapiViewer/index.tsx +3 -1
  67. package/src/tools/PrettyCode/PrettyCode.client.tsx +2 -0
  68. package/src/tools/PrettyCode/index.tsx +1 -0
  69. package/src/tools/VideoPlayer/VideoControls.tsx +4 -3
  70. package/src/tools/VideoPlayer/VideoPlayer.tsx +9 -8
@@ -1,11 +1,15 @@
1
1
  'use client';
2
2
 
3
- import React, { useMemo, useCallback } from 'react';
4
- import { Badge, Button, Card, CardContent, CardHeader, CardTitle, CopyButton } from '@djangocfg/ui-core/components';
5
- import { XCircle, Download } from 'lucide-react';
3
+ import { Download, XCircle } from 'lucide-react';
4
+ import React, { useCallback, useMemo } from 'react';
5
+
6
+ import {
7
+ Badge, Button, Card, CardContent, CardHeader, CardTitle, CopyButton
8
+ } from '@djangocfg/ui-core/components';
9
+
10
+ import JsonTree from '../../JsonTree';
6
11
  import { usePlaygroundContext } from '../context/PlaygroundContext';
7
12
  import { getStatusColor } from '../utils';
8
- import JsonTree from '../../JsonTree';
9
13
 
10
14
  export const ResponseViewer: React.FC = () => {
11
15
  const { state } = usePlaygroundContext();
@@ -1,11 +1,15 @@
1
1
  'use client';
2
2
 
3
- import React from 'react';
4
- import { Badge, Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@djangocfg/ui-core/components';
5
3
  import { GitBranch, Info } from 'lucide-react';
4
+ import React from 'react';
5
+
6
+ import {
7
+ Badge, Select, SelectContent, SelectItem, SelectTrigger, SelectValue
8
+ } from '@djangocfg/ui-core/components';
9
+
6
10
  import { usePlaygroundContext } from '../context/PlaygroundContext';
7
- import { API_VERSIONS, getVersionById, getVersionStats } from '../utils/versionManager';
8
11
  import useOpenApiSchema from '../hooks/useOpenApiSchema';
12
+ import { API_VERSIONS, getVersionById, getVersionStats } from '../utils/versionManager';
9
13
 
10
14
  export const VersionSelector: React.FC = () => {
11
15
  const { state, config, setSelectedVersion } = usePlaygroundContext();
@@ -1,10 +1,16 @@
1
1
  'use client';
2
2
 
3
- import React, { createContext, ReactNode, useCallback, useContext, useEffect, useState } from 'react';
4
3
  import consola from 'consola';
5
- import { type ApiEndpoint, type ApiResponse, type PlaygroundContextType, type PlaygroundState, type PlaygroundStep, type PlaygroundConfig } from '../types';
6
- import { getDefaultVersion } from '../utils/versionManager';
4
+ import React, {
5
+ createContext, ReactNode, useCallback, useContext, useEffect, useState
6
+ } from 'react';
7
+
8
+ import type {
9
+ ApiEndpoint, ApiResponse, PlaygroundConfig, PlaygroundContextType, PlaygroundState,
10
+ PlaygroundStep
11
+ } from '../types';
7
12
  import { parseRequestHeaders, substituteUrlParameters } from '../utils';
13
+ import { getDefaultVersion } from '../utils/versionManager';
8
14
 
9
15
  const createInitialState = (): PlaygroundState => ({
10
16
  // Step management
@@ -1,13 +1,9 @@
1
1
  'use client';
2
2
 
3
- import { useCallback, useEffect, useMemo, useState } from 'react';
4
3
  import consola from 'consola';
5
- import {
6
- ApiEndpoint,
7
- OpenApiSchema,
8
- SchemaSource,
9
- UseOpenApiSchemaReturn,
10
- } from '../types';
4
+ import { useCallback, useEffect, useMemo, useState } from 'react';
5
+
6
+ import { ApiEndpoint, OpenApiSchema, SchemaSource, UseOpenApiSchemaReturn } from '../types';
11
7
 
12
8
  // Extract endpoints from OpenAPI schema (GET only)
13
9
  const extractEndpoints = (schema: OpenApiSchema): ApiEndpoint[] => {
@@ -1,8 +1,10 @@
1
1
  'use client';
2
2
 
3
- import React from 'react';
4
3
  import dynamic from 'next/dynamic';
4
+ import React from 'react';
5
+
5
6
  import { PlaygroundProvider } from './context/PlaygroundContext';
7
+
6
8
  import type { PlaygroundConfig } from './types';
7
9
 
8
10
  const PlaygroundLayout = dynamic(
@@ -2,7 +2,9 @@
2
2
 
3
3
  import { Highlight, Language, themes } from 'prism-react-renderer';
4
4
  import React from 'react';
5
+
5
6
  import { CopyButton } from '@djangocfg/ui-core/components';
7
+
6
8
  import { useResolvedTheme } from '../../hooks/useResolvedTheme';
7
9
 
8
10
  interface PrettyCodeProps {
@@ -9,6 +9,7 @@
9
9
 
10
10
  import dynamic from 'next/dynamic';
11
11
  import React from 'react';
12
+
12
13
  import type { Language } from 'prism-react-renderer';
13
14
 
14
15
  // Dynamic import with loading state
@@ -4,12 +4,13 @@
4
4
 
5
5
  'use client';
6
6
 
7
+ import { Maximize, Minimize, Pause, Play, Volume2, VolumeX } from 'lucide-react';
7
8
  import React from 'react';
8
- import { useMediaStore, useMediaRemote } from '@vidstack/react';
9
- import type { MediaPlayerInstance } from '@vidstack/react';
10
- import { Play, Pause, Volume2, VolumeX, Maximize, Minimize } from 'lucide-react';
9
+
11
10
  import { cn } from '@djangocfg/ui-core/lib';
11
+ import { useMediaRemote, useMediaStore } from '@vidstack/react';
12
12
 
13
+ import type { MediaPlayerInstance } from '@vidstack/react';
13
14
  interface VideoControlsProps {
14
15
  player: React.RefObject<MediaPlayerInstance | null>;
15
16
  className?: string;
@@ -6,20 +6,21 @@
6
6
 
7
7
  'use client';
8
8
 
9
- import React, { forwardRef, useImperativeHandle, useRef, useMemo } from 'react';
10
- import { MediaPlayer, MediaProvider, Poster } from '@vidstack/react';
11
- import { defaultLayoutIcons, DefaultVideoLayout } from '@vidstack/react/player/layouts/default';
12
- import type { MediaPlayerInstance } from '@vidstack/react';
13
- import { cn } from '@djangocfg/ui-core/lib';
14
- import { generateOgImageUrl } from '@djangocfg/ui-core/lib';
15
- import { type VideoPlayerProps, type VideoPlayerRef } from './types';
16
-
17
9
  // Import Vidstack base styles
18
10
  import '@vidstack/react/player/styles/base.css';
19
11
  // Import default theme
20
12
  import '@vidstack/react/player/styles/default/theme.css';
21
13
  import '@vidstack/react/player/styles/default/layouts/video.css';
22
14
 
15
+ import React, { forwardRef, useImperativeHandle, useMemo, useRef } from 'react';
16
+
17
+ import { cn, generateOgImageUrl } from '@djangocfg/ui-core/lib';
18
+ import { MediaPlayer, MediaProvider, Poster } from '@vidstack/react';
19
+ import { defaultLayoutIcons, DefaultVideoLayout } from '@vidstack/react/player/layouts/default';
20
+
21
+ import { type, VideoPlayerProps, VideoPlayerRef } from './types';
22
+
23
+ import type { MediaPlayerInstance } from '@vidstack/react';
23
24
  /**
24
25
  * Custom error class for invalid video URLs
25
26
  */