@djangocfg/ui-tools 2.1.409 → 2.1.412
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/package.json +13 -13
- package/src/{tools/Chat/highlight → lib/browser-bridge}/README.md +46 -18
- package/src/lib/browser-bridge/commands/chat.ts +42 -0
- package/src/lib/browser-bridge/commands/highlight.ts +70 -0
- package/src/lib/browser-bridge/commands/index.ts +15 -0
- package/src/lib/browser-bridge/commands/inspect.ts +31 -0
- package/src/lib/browser-bridge/commands/scroll.ts +31 -0
- package/src/lib/browser-bridge/commands/write.ts +45 -0
- package/src/lib/browser-bridge/directive-bus.ts +120 -0
- package/src/lib/browser-bridge/index.ts +56 -0
- package/src/lib/browser-bridge/logger.ts +27 -0
- package/src/{tools/Chat/highlight → lib/browser-bridge/overlay}/HighlightOverlay.tsx +14 -0
- package/src/{tools/Chat/highlight → lib/browser-bridge/overlay}/__tests__/HighlightOverlay.test.tsx +52 -0
- package/src/{tools/Chat/highlight → lib/browser-bridge/overlay}/__tests__/resolveRef.test.ts +39 -0
- package/src/{tools/Chat/highlight → lib/browser-bridge/overlay}/index.ts +8 -5
- package/src/{tools/Chat/highlight → lib/browser-bridge/overlay}/resolveRef.ts +5 -0
- package/src/{tools/Chat/highlight → lib/browser-bridge/overlay}/useHighlightTargets.ts +58 -27
- package/src/lib/browser-bridge/overlay/waitForVisible.ts +70 -0
- package/src/lib/browser-bridge/registry.ts +41 -0
- package/src/lib/browser-bridge/setBridgeResolver.ts +42 -0
- package/src/lib/browser-bridge/window.ts +76 -0
- package/src/lib/page-snapshot/capture/walk.ts +13 -5
- package/src/lib/page-snapshot/engine.ts +9 -4
- package/src/lib/page-snapshot/index.ts +5 -0
- package/src/lib/page-snapshot/react/provider.tsx +70 -3
- package/src/lib/page-snapshot/react/use-page-snapshot.ts +10 -0
- package/src/lib/page-snapshot/refs/__tests__/locator.test.ts +94 -0
- package/src/lib/page-snapshot/refs/__tests__/registry.test.ts +59 -3
- package/src/lib/page-snapshot/refs/locator.ts +218 -0
- package/src/lib/page-snapshot/refs/registry.ts +29 -14
- package/src/tools/Chat/README.md +1 -1
- package/src/tools/Chat/composer/AttachContext.tsx +22 -0
- package/src/tools/Chat/composer/Composer.tsx +108 -6
- package/src/tools/Chat/composer/ComposerMenuButton.tsx +39 -2
- package/src/tools/Chat/composer/fileToAttachment.ts +53 -0
- package/src/tools/Chat/composer/index.ts +16 -1
- package/src/tools/Chat/composer/types.ts +71 -0
- package/src/tools/Chat/composer/useComposerAttach.tsx +218 -0
- package/src/tools/Chat/constants.ts +24 -1
- package/src/tools/Chat/context/ChatProvider.tsx +17 -2
- package/src/tools/Chat/core/logger.ts +15 -2
- package/src/tools/Chat/hooks/useChat.ts +32 -0
- package/src/tools/Chat/hooks/useChatComposer.ts +13 -0
- package/src/tools/Chat/index.ts +34 -2
- package/src/tools/Chat/launcher/ChatDock.tsx +13 -3
- package/src/tools/Chat/launcher/ChatFAB.tsx +4 -2
- package/src/tools/Chat/launcher/ChatGreeting.tsx +3 -2
- package/src/tools/Chat/launcher/ChatLauncher.tsx +42 -7
- package/src/tools/Chat/launcher/ChatUnreadPreview.tsx +3 -2
- package/src/tools/Chat/launcher/header/ChatHeader.tsx +2 -0
- package/src/tools/Chat/launcher/header/ChatHeaderActionButton.tsx +2 -0
- package/src/tools/Chat/launcher/header/ChatHeaderLanguageButton.tsx +2 -2
- package/src/tools/Chat/launcher/header/HeaderSlots.tsx +16 -9
- package/src/tools/Chat/lazy.tsx +34 -2
- package/src/tools/Chat/messages/MessageBubble.tsx +1 -1
- package/src/tools/Chat/public.ts +17 -0
- package/src/tools/Chat/settings/README.md +87 -0
- package/src/tools/Chat/settings/__tests__/useChatSettings.test.tsx +84 -0
- package/src/tools/Chat/settings/__tests__/useLocalStorage.test.tsx +138 -0
- package/src/tools/Chat/settings/index.ts +23 -0
- package/src/tools/Chat/settings/types.ts +108 -0
- package/src/tools/Chat/settings/useChatSettings.ts +168 -0
- package/src/tools/Chat/types/events.ts +50 -0
- package/src/tools/Chat/types/index.ts +1 -1
- package/src/tools/Chat/types/message.ts +5 -0
- package/src/tools/CronScheduler/CronScheduler.client.tsx +42 -15
- package/src/tools/CronScheduler/components/CustomInput.tsx +26 -7
- package/src/tools/CronScheduler/components/DayChips.tsx +20 -7
- package/src/tools/CronScheduler/components/MonthDayGrid.tsx +35 -10
- package/src/tools/CronScheduler/components/SchedulePreview.tsx +8 -5
- package/src/tools/CronScheduler/components/ScheduleTypeSelector.tsx +12 -3
- package/src/tools/CronScheduler/components/TimeSelector.tsx +36 -13
- package/src/tools/CronScheduler/context/CronSchedulerContext.tsx +4 -0
- package/src/tools/CronScheduler/context/hooks.ts +8 -0
- package/src/tools/CronScheduler/context/index.ts +1 -0
- package/src/tools/CronScheduler/index.tsx +2 -0
- package/src/tools/CronScheduler/lazy.tsx +1 -0
- package/src/tools/CronScheduler/types/index.ts +18 -1
- package/src/tools/Map/lazy.tsx +11 -4
- package/src/tools/Uploader/hooks/useClipboardPaste.ts +3 -1
- package/src/tools/index.ts +2 -0
- /package/src/{tools/Chat/highlight → lib/browser-bridge/overlay}/SpotlightCanvas.tsx +0 -0
- /package/src/{tools/Chat/highlight → lib/browser-bridge/overlay}/types.ts +0 -0
|
@@ -50,6 +50,7 @@ function CronSchedulerFallback() {
|
|
|
50
50
|
// Re-export types
|
|
51
51
|
export type {
|
|
52
52
|
CronSchedulerProps,
|
|
53
|
+
CronSchedulerSize,
|
|
53
54
|
ScheduleType,
|
|
54
55
|
WeekDay,
|
|
55
56
|
MonthDay,
|
|
@@ -67,6 +68,7 @@ export {
|
|
|
67
68
|
useCronMonthDays,
|
|
68
69
|
useCronCustom,
|
|
69
70
|
useCronPreview,
|
|
71
|
+
useCronSize,
|
|
70
72
|
useCronScheduler,
|
|
71
73
|
} from './context';
|
|
72
74
|
|
|
@@ -10,6 +10,13 @@
|
|
|
10
10
|
|
|
11
11
|
export type ScheduleType = 'daily' | 'weekly' | 'monthly' | 'custom';
|
|
12
12
|
|
|
13
|
+
/**
|
|
14
|
+
* Visual density of the scheduler fields.
|
|
15
|
+
* - `default` — full-size fields (unchanged).
|
|
16
|
+
* - `sm` — compact fields for narrow side panels / modals (~360-420px).
|
|
17
|
+
*/
|
|
18
|
+
export type CronSchedulerSize = 'default' | 'sm';
|
|
19
|
+
|
|
13
20
|
/** Day of week: 0 = Sunday, 1 = Monday, ..., 6 = Saturday */
|
|
14
21
|
export type WeekDay = 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
15
22
|
|
|
@@ -79,7 +86,10 @@ export interface CronSchedulerActions {
|
|
|
79
86
|
export interface CronSchedulerContextValue
|
|
80
87
|
extends CronSchedulerState,
|
|
81
88
|
CronSchedulerComputed,
|
|
82
|
-
CronSchedulerActions {
|
|
89
|
+
CronSchedulerActions {
|
|
90
|
+
/** Visual density of the fields (`default` | `sm`) */
|
|
91
|
+
size: CronSchedulerSize;
|
|
92
|
+
}
|
|
83
93
|
|
|
84
94
|
// ============================================================================
|
|
85
95
|
// Component Props
|
|
@@ -107,6 +117,11 @@ export interface CronSchedulerProps {
|
|
|
107
117
|
inline?: boolean;
|
|
108
118
|
/** Trigger text shown when no schedule is set (compact mode only) */
|
|
109
119
|
placeholder?: string;
|
|
120
|
+
/**
|
|
121
|
+
* Visual density of the fields. `sm` renders smaller, tighter fields
|
|
122
|
+
* suited for narrow side panels / modals. Default: `default`.
|
|
123
|
+
*/
|
|
124
|
+
size?: CronSchedulerSize;
|
|
110
125
|
/** Additional CSS classes */
|
|
111
126
|
className?: string;
|
|
112
127
|
}
|
|
@@ -116,4 +131,6 @@ export interface CronSchedulerProviderProps {
|
|
|
116
131
|
value?: string;
|
|
117
132
|
onChange?: (cron: string) => void;
|
|
118
133
|
defaultType?: ScheduleType;
|
|
134
|
+
/** Visual density propagated to all field components. Default: `default`. */
|
|
135
|
+
size?: CronSchedulerSize;
|
|
119
136
|
}
|
package/src/tools/Map/lazy.tsx
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
import * as React from 'react';
|
|
14
14
|
import { createLazyComponent, MapLoadingFallback } from '../../components';
|
|
15
|
+
import type { MapContainerProps } from './components';
|
|
15
16
|
|
|
16
17
|
// ============================================================================
|
|
17
18
|
// Lazy Components
|
|
@@ -22,8 +23,11 @@ import { createLazyComponent, MapLoadingFallback } from '../../components';
|
|
|
22
23
|
*
|
|
23
24
|
* Automatically shows loading state while MapLibre GL loads (~800KB)
|
|
24
25
|
*/
|
|
25
|
-
export const LazyMapContainer = createLazyComponent(
|
|
26
|
-
() =>
|
|
26
|
+
export const LazyMapContainer = createLazyComponent<MapContainerProps>(
|
|
27
|
+
() =>
|
|
28
|
+
import('./components/MapContainer').then((mod) => ({
|
|
29
|
+
default: mod.MapContainer,
|
|
30
|
+
})),
|
|
27
31
|
{
|
|
28
32
|
displayName: 'LazyMapContainer',
|
|
29
33
|
fallback: <MapLoadingFallback minHeight={400} />,
|
|
@@ -33,8 +37,11 @@ export const LazyMapContainer = createLazyComponent(
|
|
|
33
37
|
/**
|
|
34
38
|
* LazyMapView - Lazy-loaded map view (alias for MapContainer)
|
|
35
39
|
*/
|
|
36
|
-
export const LazyMapView = createLazyComponent(
|
|
37
|
-
() =>
|
|
40
|
+
export const LazyMapView = createLazyComponent<Omit<MapContainerProps, 'initialViewport'>>(
|
|
41
|
+
() =>
|
|
42
|
+
import('./components/MapContainer').then((mod) => ({
|
|
43
|
+
default: mod.MapView,
|
|
44
|
+
})),
|
|
38
45
|
{
|
|
39
46
|
displayName: 'LazyMapView',
|
|
40
47
|
fallback: <MapLoadingFallback minHeight={400} />,
|
|
@@ -87,7 +87,9 @@ async function resolveClipboardFiles(
|
|
|
87
87
|
}
|
|
88
88
|
return [file];
|
|
89
89
|
} catch (err) {
|
|
90
|
-
logger.warn('Failed to fetch pasted URL',
|
|
90
|
+
logger.warn('Failed to fetch pasted URL', {
|
|
91
|
+
error: err instanceof Error ? err.message : String(err),
|
|
92
|
+
});
|
|
91
93
|
return [];
|
|
92
94
|
}
|
|
93
95
|
}
|
package/src/tools/index.ts
CHANGED
|
@@ -112,6 +112,7 @@ export {
|
|
|
112
112
|
useCronMonthDays,
|
|
113
113
|
useCronCustom,
|
|
114
114
|
useCronPreview,
|
|
115
|
+
useCronSize,
|
|
115
116
|
useCronScheduler,
|
|
116
117
|
// Utilities
|
|
117
118
|
buildCron,
|
|
@@ -128,6 +129,7 @@ export {
|
|
|
128
129
|
} from './CronScheduler';
|
|
129
130
|
export type {
|
|
130
131
|
CronSchedulerProps,
|
|
132
|
+
CronSchedulerSize,
|
|
131
133
|
ScheduleType,
|
|
132
134
|
WeekDay,
|
|
133
135
|
MonthDay,
|
|
File without changes
|
|
File without changes
|