@designfever/web-review-kit 0.7.3 → 0.8.0
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/README.md +7 -4
- package/dist/{chunk-RPVLRULC.js → chunk-4ZP7B7R6.js} +2345 -1786
- package/dist/chunk-4ZP7B7R6.js.map +1 -0
- package/dist/index.cjs +2348 -1793
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -4
- package/dist/index.d.ts +11 -4
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/dist/react-shell.cjs +14508 -11099
- package/dist/react-shell.cjs.map +1 -1
- package/dist/react-shell.d.cts +5 -4
- package/dist/react-shell.d.ts +5 -4
- package/dist/react-shell.js +10634 -7710
- package/dist/react-shell.js.map +1 -1
- package/dist/{types-DT9Z66mV.d.cts → types-BM8E7BFV.d.cts} +63 -3
- package/dist/{types-DT9Z66mV.d.ts → types-BM8E7BFV.d.ts} +63 -3
- package/dist/vite.cjs +344 -48
- package/dist/vite.cjs.map +1 -1
- package/dist/vite.d.cts +2 -0
- package/dist/vite.d.ts +2 -0
- package/dist/vite.js +345 -49
- package/dist/vite.js.map +1 -1
- package/docs/README.md +19 -13
- package/docs/adapters.md +27 -4
- package/docs/adaptor.sample.ts +53 -3
- package/docs/architecture.md +117 -3
- package/docs/figma-overlay.md +51 -0
- package/docs/grid-overlay.md +5 -0
- package/docs/installation.md +23 -8
- package/docs/release-notes-0.8.0.md +175 -0
- package/docs/testing.md +68 -0
- package/package.json +14 -5
- package/dist/chunk-RPVLRULC.js.map +0 -1
- package/docs/code-review-0.6.0.md +0 -232
- package/docs/figma-image-mvp-0.7.0.md +0 -330
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
type ReviewItemKind = '
|
|
1
|
+
type ReviewItemKind = 'dom' | 'area';
|
|
2
2
|
type ReviewItemScope = 'mobile' | 'tablet' | 'desktop' | 'wide' | 'dom';
|
|
3
3
|
type ReviewWorkflowStatus = 'todo' | 'doing' | 'review' | 'hold' | 'done';
|
|
4
4
|
type ReviewItemStatus = 'open' | 'resolved' | ReviewWorkflowStatus;
|
|
5
|
-
type ReviewMode = 'idle' | '
|
|
5
|
+
type ReviewMode = 'idle' | 'element' | 'area';
|
|
6
6
|
type ReviewSource = 'local' | 'supabase' | (string & {});
|
|
7
7
|
type ReviewSubmitStatus = 'idle' | 'submitting' | 'submitted' | 'failed';
|
|
8
8
|
type ReviewViewportScope = Exclude<ReviewItemScope, 'dom'>;
|
|
@@ -44,6 +44,61 @@ interface ReviewAssigneeOption {
|
|
|
44
44
|
value: string;
|
|
45
45
|
label: string;
|
|
46
46
|
}
|
|
47
|
+
type ReviewExternalLinkIcon = 'external' | 'github' | 'issue' | 'jira' | 'sheet' | (string & {});
|
|
48
|
+
interface ReviewExternalLink {
|
|
49
|
+
label: string;
|
|
50
|
+
url: string;
|
|
51
|
+
title?: string;
|
|
52
|
+
icon?: ReviewExternalLinkIcon;
|
|
53
|
+
}
|
|
54
|
+
type ReviewAttachmentKind = 'file' | 'image' | 'capture' | (string & {});
|
|
55
|
+
interface ReviewAttachment {
|
|
56
|
+
id?: string;
|
|
57
|
+
url: string;
|
|
58
|
+
name: string;
|
|
59
|
+
mime: string;
|
|
60
|
+
size: number;
|
|
61
|
+
kind?: ReviewAttachmentKind;
|
|
62
|
+
width?: number;
|
|
63
|
+
height?: number;
|
|
64
|
+
metadata?: Record<string, unknown>;
|
|
65
|
+
createdAt?: string;
|
|
66
|
+
}
|
|
67
|
+
interface ReviewAttachmentUploadInput {
|
|
68
|
+
file: File | Blob;
|
|
69
|
+
name?: string;
|
|
70
|
+
mime?: string;
|
|
71
|
+
kind?: ReviewAttachmentKind;
|
|
72
|
+
item?: ReviewItem;
|
|
73
|
+
metadata?: Record<string, unknown>;
|
|
74
|
+
}
|
|
75
|
+
type ReviewAttachmentUploadErrorReason = 'quota-exceeded' | 'storage-full' | 'unsupported-type' | 'permission-denied' | 'upload-failed' | (string & {});
|
|
76
|
+
interface ReviewAttachmentUploadError extends Error {
|
|
77
|
+
reason: ReviewAttachmentUploadErrorReason;
|
|
78
|
+
}
|
|
79
|
+
interface ReviewViewportCaptureInput {
|
|
80
|
+
routeKey: string;
|
|
81
|
+
pageUrl: string;
|
|
82
|
+
originalUrl?: string;
|
|
83
|
+
viewport: ViewportSize;
|
|
84
|
+
captureRegion?: RelativeSelection;
|
|
85
|
+
devicePixelRatio?: number;
|
|
86
|
+
scroll: {
|
|
87
|
+
x: number;
|
|
88
|
+
y: number;
|
|
89
|
+
};
|
|
90
|
+
marker?: ReviewMarker;
|
|
91
|
+
selection?: ReviewSelection;
|
|
92
|
+
timestamp: string;
|
|
93
|
+
}
|
|
94
|
+
interface ReviewViewportCaptureResult {
|
|
95
|
+
file: Blob;
|
|
96
|
+
name?: string;
|
|
97
|
+
mime?: string;
|
|
98
|
+
width?: number;
|
|
99
|
+
height?: number;
|
|
100
|
+
metadata?: Record<string, unknown>;
|
|
101
|
+
}
|
|
47
102
|
interface ReviewPoint {
|
|
48
103
|
x: number;
|
|
49
104
|
y: number;
|
|
@@ -81,8 +136,10 @@ interface ReviewItem {
|
|
|
81
136
|
anchor?: DomAnchor;
|
|
82
137
|
marker?: ReviewMarker;
|
|
83
138
|
selection?: ReviewSelection;
|
|
139
|
+
attachments?: ReviewAttachment[];
|
|
84
140
|
externalIssueId?: string;
|
|
85
141
|
externalIssueUrl?: string;
|
|
142
|
+
externalLinks?: ReviewExternalLink[];
|
|
86
143
|
submittedAt?: string;
|
|
87
144
|
submitStatus?: ReviewSubmitStatus;
|
|
88
145
|
submitError?: string;
|
|
@@ -102,6 +159,7 @@ interface WebReviewKitAdapter {
|
|
|
102
159
|
list(query: ReviewItemQuery): Promise<ReviewItem[]>;
|
|
103
160
|
create(item: ReviewItem): Promise<ReviewItem>;
|
|
104
161
|
update(id: string, patch: Partial<Omit<ReviewItem, 'id' | 'createdAt'>>): Promise<ReviewItem>;
|
|
162
|
+
uploadAttachment?(input: ReviewAttachmentUploadInput): Promise<ReviewAttachment>;
|
|
105
163
|
remove(id: string): Promise<void>;
|
|
106
164
|
}
|
|
107
165
|
interface LocalAdapterOptions {
|
|
@@ -163,6 +221,7 @@ interface WebReviewKitOptions {
|
|
|
163
221
|
onModeChange?: (mode: ReviewMode) => void;
|
|
164
222
|
ui?: {
|
|
165
223
|
panel?: boolean;
|
|
224
|
+
markers?: 'inline' | 'external';
|
|
166
225
|
};
|
|
167
226
|
modules?: {
|
|
168
227
|
qa?: boolean;
|
|
@@ -189,6 +248,7 @@ interface WebReviewKitTarget {
|
|
|
189
248
|
getViewportRect?: () => Pick<DOMRect, 'left' | 'top' | 'width' | 'height'>;
|
|
190
249
|
getOverlayRect?: () => Pick<DOMRect, 'left' | 'top' | 'width' | 'height'>;
|
|
191
250
|
getComposerHost?: () => HTMLElement | null | undefined;
|
|
251
|
+
captureViewport?: (input: ReviewViewportCaptureInput) => Promise<ReviewViewportCaptureResult>;
|
|
192
252
|
}
|
|
193
253
|
|
|
194
|
-
export type { DomAnchor as D, LocalAdapterOptions as L, NumberedReviewItem as N, ReviewWorkflowStatus as R, SupabaseReviewAdapterOptions as S, ViewportSize as V, WebReviewKitAdapter as W, ReviewItemStatus as a, WebReviewKitOptions as b, WebReviewKitController as c, ReviewViewportPreset as d, ReviewItem as e, ReviewItemScope as f, DomAnchorCandidate as g, DomAnchorStrategy as h, DomSourceHint as i, RelativeSelection as j, ReviewAssigneeOption as k,
|
|
254
|
+
export type { ReviewSubmitStatus as A, ReviewViewportScope as B, SupabaseReviewClient as C, DomAnchor as D, WebReviewKitTarget as E, ReviewFieldsConfig as F, LocalAdapterOptions as L, NumberedReviewItem as N, ReviewWorkflowStatus as R, SupabaseReviewAdapterOptions as S, ViewportSize as V, WebReviewKitAdapter as W, ReviewItemStatus as a, WebReviewKitOptions as b, WebReviewKitController as c, ReviewViewportPreset as d, ReviewItem as e, ReviewItemScope as f, DomAnchorCandidate as g, DomAnchorStrategy as h, DomSourceHint as i, RelativeSelection as j, ReviewAssigneeOption as k, ReviewAttachment as l, ReviewAttachmentKind as m, ReviewAttachmentUploadError as n, ReviewAttachmentUploadErrorReason as o, ReviewAttachmentUploadInput as p, ReviewExternalLink as q, ReviewExternalLinkIcon as r, ReviewItemKind as s, ReviewItemQuery as t, ReviewMarker as u, ReviewMode as v, ReviewPoint as w, ReviewRulerConfig as x, ReviewSelection as y, ReviewSource as z };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
type ReviewItemKind = '
|
|
1
|
+
type ReviewItemKind = 'dom' | 'area';
|
|
2
2
|
type ReviewItemScope = 'mobile' | 'tablet' | 'desktop' | 'wide' | 'dom';
|
|
3
3
|
type ReviewWorkflowStatus = 'todo' | 'doing' | 'review' | 'hold' | 'done';
|
|
4
4
|
type ReviewItemStatus = 'open' | 'resolved' | ReviewWorkflowStatus;
|
|
5
|
-
type ReviewMode = 'idle' | '
|
|
5
|
+
type ReviewMode = 'idle' | 'element' | 'area';
|
|
6
6
|
type ReviewSource = 'local' | 'supabase' | (string & {});
|
|
7
7
|
type ReviewSubmitStatus = 'idle' | 'submitting' | 'submitted' | 'failed';
|
|
8
8
|
type ReviewViewportScope = Exclude<ReviewItemScope, 'dom'>;
|
|
@@ -44,6 +44,61 @@ interface ReviewAssigneeOption {
|
|
|
44
44
|
value: string;
|
|
45
45
|
label: string;
|
|
46
46
|
}
|
|
47
|
+
type ReviewExternalLinkIcon = 'external' | 'github' | 'issue' | 'jira' | 'sheet' | (string & {});
|
|
48
|
+
interface ReviewExternalLink {
|
|
49
|
+
label: string;
|
|
50
|
+
url: string;
|
|
51
|
+
title?: string;
|
|
52
|
+
icon?: ReviewExternalLinkIcon;
|
|
53
|
+
}
|
|
54
|
+
type ReviewAttachmentKind = 'file' | 'image' | 'capture' | (string & {});
|
|
55
|
+
interface ReviewAttachment {
|
|
56
|
+
id?: string;
|
|
57
|
+
url: string;
|
|
58
|
+
name: string;
|
|
59
|
+
mime: string;
|
|
60
|
+
size: number;
|
|
61
|
+
kind?: ReviewAttachmentKind;
|
|
62
|
+
width?: number;
|
|
63
|
+
height?: number;
|
|
64
|
+
metadata?: Record<string, unknown>;
|
|
65
|
+
createdAt?: string;
|
|
66
|
+
}
|
|
67
|
+
interface ReviewAttachmentUploadInput {
|
|
68
|
+
file: File | Blob;
|
|
69
|
+
name?: string;
|
|
70
|
+
mime?: string;
|
|
71
|
+
kind?: ReviewAttachmentKind;
|
|
72
|
+
item?: ReviewItem;
|
|
73
|
+
metadata?: Record<string, unknown>;
|
|
74
|
+
}
|
|
75
|
+
type ReviewAttachmentUploadErrorReason = 'quota-exceeded' | 'storage-full' | 'unsupported-type' | 'permission-denied' | 'upload-failed' | (string & {});
|
|
76
|
+
interface ReviewAttachmentUploadError extends Error {
|
|
77
|
+
reason: ReviewAttachmentUploadErrorReason;
|
|
78
|
+
}
|
|
79
|
+
interface ReviewViewportCaptureInput {
|
|
80
|
+
routeKey: string;
|
|
81
|
+
pageUrl: string;
|
|
82
|
+
originalUrl?: string;
|
|
83
|
+
viewport: ViewportSize;
|
|
84
|
+
captureRegion?: RelativeSelection;
|
|
85
|
+
devicePixelRatio?: number;
|
|
86
|
+
scroll: {
|
|
87
|
+
x: number;
|
|
88
|
+
y: number;
|
|
89
|
+
};
|
|
90
|
+
marker?: ReviewMarker;
|
|
91
|
+
selection?: ReviewSelection;
|
|
92
|
+
timestamp: string;
|
|
93
|
+
}
|
|
94
|
+
interface ReviewViewportCaptureResult {
|
|
95
|
+
file: Blob;
|
|
96
|
+
name?: string;
|
|
97
|
+
mime?: string;
|
|
98
|
+
width?: number;
|
|
99
|
+
height?: number;
|
|
100
|
+
metadata?: Record<string, unknown>;
|
|
101
|
+
}
|
|
47
102
|
interface ReviewPoint {
|
|
48
103
|
x: number;
|
|
49
104
|
y: number;
|
|
@@ -81,8 +136,10 @@ interface ReviewItem {
|
|
|
81
136
|
anchor?: DomAnchor;
|
|
82
137
|
marker?: ReviewMarker;
|
|
83
138
|
selection?: ReviewSelection;
|
|
139
|
+
attachments?: ReviewAttachment[];
|
|
84
140
|
externalIssueId?: string;
|
|
85
141
|
externalIssueUrl?: string;
|
|
142
|
+
externalLinks?: ReviewExternalLink[];
|
|
86
143
|
submittedAt?: string;
|
|
87
144
|
submitStatus?: ReviewSubmitStatus;
|
|
88
145
|
submitError?: string;
|
|
@@ -102,6 +159,7 @@ interface WebReviewKitAdapter {
|
|
|
102
159
|
list(query: ReviewItemQuery): Promise<ReviewItem[]>;
|
|
103
160
|
create(item: ReviewItem): Promise<ReviewItem>;
|
|
104
161
|
update(id: string, patch: Partial<Omit<ReviewItem, 'id' | 'createdAt'>>): Promise<ReviewItem>;
|
|
162
|
+
uploadAttachment?(input: ReviewAttachmentUploadInput): Promise<ReviewAttachment>;
|
|
105
163
|
remove(id: string): Promise<void>;
|
|
106
164
|
}
|
|
107
165
|
interface LocalAdapterOptions {
|
|
@@ -163,6 +221,7 @@ interface WebReviewKitOptions {
|
|
|
163
221
|
onModeChange?: (mode: ReviewMode) => void;
|
|
164
222
|
ui?: {
|
|
165
223
|
panel?: boolean;
|
|
224
|
+
markers?: 'inline' | 'external';
|
|
166
225
|
};
|
|
167
226
|
modules?: {
|
|
168
227
|
qa?: boolean;
|
|
@@ -189,6 +248,7 @@ interface WebReviewKitTarget {
|
|
|
189
248
|
getViewportRect?: () => Pick<DOMRect, 'left' | 'top' | 'width' | 'height'>;
|
|
190
249
|
getOverlayRect?: () => Pick<DOMRect, 'left' | 'top' | 'width' | 'height'>;
|
|
191
250
|
getComposerHost?: () => HTMLElement | null | undefined;
|
|
251
|
+
captureViewport?: (input: ReviewViewportCaptureInput) => Promise<ReviewViewportCaptureResult>;
|
|
192
252
|
}
|
|
193
253
|
|
|
194
|
-
export type { DomAnchor as D, LocalAdapterOptions as L, NumberedReviewItem as N, ReviewWorkflowStatus as R, SupabaseReviewAdapterOptions as S, ViewportSize as V, WebReviewKitAdapter as W, ReviewItemStatus as a, WebReviewKitOptions as b, WebReviewKitController as c, ReviewViewportPreset as d, ReviewItem as e, ReviewItemScope as f, DomAnchorCandidate as g, DomAnchorStrategy as h, DomSourceHint as i, RelativeSelection as j, ReviewAssigneeOption as k,
|
|
254
|
+
export type { ReviewSubmitStatus as A, ReviewViewportScope as B, SupabaseReviewClient as C, DomAnchor as D, WebReviewKitTarget as E, ReviewFieldsConfig as F, LocalAdapterOptions as L, NumberedReviewItem as N, ReviewWorkflowStatus as R, SupabaseReviewAdapterOptions as S, ViewportSize as V, WebReviewKitAdapter as W, ReviewItemStatus as a, WebReviewKitOptions as b, WebReviewKitController as c, ReviewViewportPreset as d, ReviewItem as e, ReviewItemScope as f, DomAnchorCandidate as g, DomAnchorStrategy as h, DomSourceHint as i, RelativeSelection as j, ReviewAssigneeOption as k, ReviewAttachment as l, ReviewAttachmentKind as m, ReviewAttachmentUploadError as n, ReviewAttachmentUploadErrorReason as o, ReviewAttachmentUploadInput as p, ReviewExternalLink as q, ReviewExternalLinkIcon as r, ReviewItemKind as s, ReviewItemQuery as t, ReviewMarker as u, ReviewMode as v, ReviewPoint as w, ReviewRulerConfig as x, ReviewSelection as y, ReviewSource as z };
|