@dryui/feedback 0.0.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/dist/components/annotation-marker.svelte +163 -0
- package/dist/components/annotation-marker.svelte.d.ts +11 -0
- package/dist/components/annotation-popup.svelte +669 -0
- package/dist/components/annotation-popup.svelte.d.ts +42 -0
- package/dist/components/highlight-overlay.svelte +48 -0
- package/dist/components/highlight-overlay.svelte.d.ts +8 -0
- package/dist/components/settings-panel.svelte +446 -0
- package/dist/components/settings-panel.svelte.d.ts +24 -0
- package/dist/components/toolbar.svelte +1111 -0
- package/dist/components/toolbar.svelte.d.ts +46 -0
- package/dist/constants.d.ts +9 -0
- package/dist/constants.js +37 -0
- package/dist/feedback.svelte +2879 -0
- package/dist/feedback.svelte.d.ts +4 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +7 -0
- package/dist/layout-mode/catalog.d.ts +16 -0
- package/dist/layout-mode/catalog.js +81 -0
- package/dist/layout-mode/component-actions.svelte +84 -0
- package/dist/layout-mode/component-actions.svelte.d.ts +18 -0
- package/dist/layout-mode/component-picker.svelte +73 -0
- package/dist/layout-mode/component-picker.svelte.d.ts +10 -0
- package/dist/layout-mode/design-mode.svelte +1115 -0
- package/dist/layout-mode/design-mode.svelte.d.ts +24 -0
- package/dist/layout-mode/design-palette.svelte +396 -0
- package/dist/layout-mode/design-palette.svelte.d.ts +20 -0
- package/dist/layout-mode/element-heuristics.d.ts +5 -0
- package/dist/layout-mode/element-heuristics.js +51 -0
- package/dist/layout-mode/freeze.d.ts +6 -0
- package/dist/layout-mode/freeze.js +163 -0
- package/dist/layout-mode/generated-library.d.ts +940 -0
- package/dist/layout-mode/generated-library.js +1445 -0
- package/dist/layout-mode/geometry.d.ts +38 -0
- package/dist/layout-mode/geometry.js +133 -0
- package/dist/layout-mode/history.d.ts +10 -0
- package/dist/layout-mode/history.js +45 -0
- package/dist/layout-mode/index.d.ts +23 -0
- package/dist/layout-mode/index.js +18 -0
- package/dist/layout-mode/live-mount.d.ts +20 -0
- package/dist/layout-mode/live-mount.js +70 -0
- package/dist/layout-mode/output.d.ts +26 -0
- package/dist/layout-mode/output.js +550 -0
- package/dist/layout-mode/placement-skeleton.d.ts +9 -0
- package/dist/layout-mode/placement-skeleton.js +535 -0
- package/dist/layout-mode/rearrange-overlay.svelte +1293 -0
- package/dist/layout-mode/rearrange-overlay.svelte.d.ts +18 -0
- package/dist/layout-mode/responsive-bar.svelte +39 -0
- package/dist/layout-mode/responsive-bar.svelte.d.ts +8 -0
- package/dist/layout-mode/route-creator.svelte +70 -0
- package/dist/layout-mode/route-creator.svelte.d.ts +8 -0
- package/dist/layout-mode/section-detection.d.ts +6 -0
- package/dist/layout-mode/section-detection.js +214 -0
- package/dist/layout-mode/spatial.d.ts +42 -0
- package/dist/layout-mode/spatial.js +156 -0
- package/dist/layout-mode/types.d.ts +144 -0
- package/dist/layout-mode/types.js +84 -0
- package/dist/types.d.ts +157 -0
- package/dist/types.js +1 -0
- package/dist/utils/dryui-detection.d.ts +1 -0
- package/dist/utils/dryui-detection.js +219 -0
- package/dist/utils/element-id.d.ts +12 -0
- package/dist/utils/element-id.js +333 -0
- package/dist/utils/freeze.d.ts +7 -0
- package/dist/utils/freeze.js +168 -0
- package/dist/utils/output.d.ts +15 -0
- package/dist/utils/output.js +245 -0
- package/dist/utils/selection.d.ts +22 -0
- package/dist/utils/selection.js +58 -0
- package/dist/utils/shadow-dom.d.ts +4 -0
- package/dist/utils/shadow-dom.js +39 -0
- package/dist/utils/storage.d.ts +30 -0
- package/dist/utils/storage.js +206 -0
- package/dist/utils/svelte-detection.d.ts +8 -0
- package/dist/utils/svelte-detection.js +86 -0
- package/dist/utils/svelte-meta.d.ts +6 -0
- package/dist/utils/svelte-meta.js +69 -0
- package/dist/utils/sync.d.ts +18 -0
- package/dist/utils/sync.js +62 -0
- package/package.json +65 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Toolbar } from '@dryui/ui/toolbar';
|
|
2
|
+
import type { ConnectionStatus, FeedbackSettings } from '../types.js';
|
|
3
|
+
interface Props {
|
|
4
|
+
annotationCount: number;
|
|
5
|
+
hasOutput?: boolean;
|
|
6
|
+
placementCount?: number;
|
|
7
|
+
sectionCount?: number;
|
|
8
|
+
copyLabel?: string;
|
|
9
|
+
copyState?: 'idle' | 'copied';
|
|
10
|
+
copyDisabled?: boolean;
|
|
11
|
+
submitLabel?: string;
|
|
12
|
+
submitState?: 'idle' | 'sending' | 'sent' | 'failed';
|
|
13
|
+
submitDisabled?: boolean;
|
|
14
|
+
active: boolean;
|
|
15
|
+
hidden?: boolean;
|
|
16
|
+
paused?: boolean;
|
|
17
|
+
layoutActive?: boolean;
|
|
18
|
+
rearrangeActive?: boolean;
|
|
19
|
+
markersVisible?: boolean;
|
|
20
|
+
connectionStatus?: ConnectionStatus;
|
|
21
|
+
endpoint?: string;
|
|
22
|
+
sessionId?: string | null;
|
|
23
|
+
settings?: FeedbackSettings;
|
|
24
|
+
webhookUrl?: string;
|
|
25
|
+
shortcut?: string;
|
|
26
|
+
onToggleActive: () => void;
|
|
27
|
+
onCopy: () => void;
|
|
28
|
+
canSubmit?: boolean;
|
|
29
|
+
onSubmit?: () => void;
|
|
30
|
+
onClear: () => void;
|
|
31
|
+
onSettingsChange?: (settings: FeedbackSettings) => void;
|
|
32
|
+
onLayout?: () => void;
|
|
33
|
+
onRearrange?: () => void;
|
|
34
|
+
onPause?: () => void;
|
|
35
|
+
onToggleMarkers?: () => void;
|
|
36
|
+
onHide?: () => void;
|
|
37
|
+
canUndo?: boolean;
|
|
38
|
+
canRedo?: boolean;
|
|
39
|
+
onUndo?: () => void;
|
|
40
|
+
onRedo?: () => void;
|
|
41
|
+
onNewPage?: () => void;
|
|
42
|
+
class?: string;
|
|
43
|
+
}
|
|
44
|
+
declare const Toolbar: import("svelte").Component<Props, {}, "">;
|
|
45
|
+
type Toolbar = ReturnType<typeof Toolbar>;
|
|
46
|
+
export default Toolbar;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { AnnotationColor, FeedbackSettings } from './types.js';
|
|
2
|
+
export interface AnnotationColorOption {
|
|
3
|
+
readonly value: AnnotationColor;
|
|
4
|
+
readonly label: string;
|
|
5
|
+
readonly swatch: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const DEFAULT_SETTINGS: FeedbackSettings;
|
|
8
|
+
export declare const ANNOTATION_COLOR_OPTIONS: AnnotationColorOption[];
|
|
9
|
+
export declare function normalizeAnnotationColor(color: string | null | undefined): AnnotationColor;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export const DEFAULT_SETTINGS = {
|
|
2
|
+
outputDetail: 'standard',
|
|
3
|
+
autoClearAfterCopy: false,
|
|
4
|
+
annotationColor: 'brand',
|
|
5
|
+
blockInteractions: true,
|
|
6
|
+
svelteDetection: true,
|
|
7
|
+
markerClickBehavior: 'edit',
|
|
8
|
+
theme: 'dark',
|
|
9
|
+
webhookUrl: '',
|
|
10
|
+
webhooksEnabled: true,
|
|
11
|
+
};
|
|
12
|
+
export const ANNOTATION_COLOR_OPTIONS = [
|
|
13
|
+
{ value: 'brand', label: 'Brand', swatch: 'var(--dry-color-fill-brand, #4f46e5)' },
|
|
14
|
+
{ value: 'info', label: 'Info', swatch: 'var(--dry-color-fill-info, #0ea5e9)' },
|
|
15
|
+
{ value: 'success', label: 'Success', swatch: 'var(--dry-color-fill-success, #16a34a)' },
|
|
16
|
+
{ value: 'warning', label: 'Warning', swatch: 'var(--dry-color-fill-warning, #d97706)' },
|
|
17
|
+
{ value: 'error', label: 'Error', swatch: 'var(--dry-color-fill-error, #dc2626)' },
|
|
18
|
+
{ value: 'neutral', label: 'Neutral', swatch: 'var(--dry-color-fill, #6b7280)' },
|
|
19
|
+
];
|
|
20
|
+
const LEGACY_ANNOTATION_COLOR_MAP = {
|
|
21
|
+
indigo: 'brand',
|
|
22
|
+
blue: 'info',
|
|
23
|
+
cyan: 'info',
|
|
24
|
+
green: 'success',
|
|
25
|
+
yellow: 'warning',
|
|
26
|
+
orange: 'warning',
|
|
27
|
+
red: 'error',
|
|
28
|
+
};
|
|
29
|
+
export function normalizeAnnotationColor(color) {
|
|
30
|
+
if (!color)
|
|
31
|
+
return DEFAULT_SETTINGS.annotationColor;
|
|
32
|
+
if (color in LEGACY_ANNOTATION_COLOR_MAP) {
|
|
33
|
+
return LEGACY_ANNOTATION_COLOR_MAP[color];
|
|
34
|
+
}
|
|
35
|
+
return (ANNOTATION_COLOR_OPTIONS.find((option) => option.value === color)?.value ??
|
|
36
|
+
DEFAULT_SETTINGS.annotationColor);
|
|
37
|
+
}
|