@designfever/web-review-kit 0.5.0 → 0.7.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/.env.sample +29 -0
- package/README.md +36 -10
- package/dist/chunk-AB5B6O77.js +584 -0
- package/dist/chunk-AB5B6O77.js.map +1 -0
- package/dist/{chunk-TWCSIBMY.js → chunk-RPVLRULC.js} +736 -201
- package/dist/chunk-RPVLRULC.js.map +1 -0
- package/dist/image.types-BmzkFSPX.d.cts +71 -0
- package/dist/image.types-BmzkFSPX.d.ts +71 -0
- package/dist/index.cjs +1251 -202
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +27 -3
- package/dist/index.d.ts +27 -3
- package/dist/index.js +50 -3
- package/dist/index.js.map +1 -1
- package/dist/react-shell.cjs +10135 -4070
- package/dist/react-shell.cjs.map +1 -1
- package/dist/react-shell.d.cts +37 -4
- package/dist/react-shell.d.ts +37 -4
- package/dist/react-shell.js +9258 -3707
- package/dist/react-shell.js.map +1 -1
- package/dist/token-Dt-ZH-YO.d.cts +88 -0
- package/dist/token-nJXPPdYX.d.ts +88 -0
- package/dist/{types-RvVa5ns-.d.cts → types-DT9Z66mV.d.cts} +14 -1
- package/dist/{types-RvVa5ns-.d.ts → types-DT9Z66mV.d.ts} +14 -1
- package/dist/vite.cjs +1116 -5
- package/dist/vite.cjs.map +1 -1
- package/dist/vite.d.cts +45 -1
- package/dist/vite.d.ts +45 -1
- package/dist/vite.js +800 -5
- package/dist/vite.js.map +1 -1
- package/docs/README.md +11 -5
- package/docs/adapters.md +126 -0
- package/docs/adaptor.sample.ts +13 -1
- package/docs/architecture.md +6 -1
- package/docs/code-review-0.6.0.md +232 -0
- package/docs/db-setup.md +4 -2
- package/docs/figma-image-mvp-0.7.0.md +327 -0
- package/docs/installation.md +44 -8
- package/docs/release-notes-0.6.0.md +108 -0
- package/docs/release-notes-0.7.0.md +128 -0
- package/package.json +6 -2
- package/dist/chunk-TWCSIBMY.js.map +0 -1
package/dist/react-shell.d.cts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { f as ReviewItemScope,
|
|
2
|
-
import
|
|
1
|
+
import { f as ReviewItemScope, s as ReviewSource, o as ReviewMode, W as WebReviewKitAdapter, x as ReviewFieldsConfig, a as ReviewItemStatus, k as ReviewAssigneeOption, e as ReviewItem, q as ReviewRulerConfig } from './types-DT9Z66mV.cjs';
|
|
2
|
+
import { R as ReviewFigmaImageStore, a as ReviewFigmaImageFormat } from './image.types-BmzkFSPX.cjs';
|
|
3
|
+
import * as react from 'react';
|
|
3
4
|
|
|
4
5
|
type ReviewShellViewportKind = Exclude<ReviewItemScope, 'dom'>;
|
|
5
6
|
type ReviewShellViewportPreset = {
|
|
@@ -42,6 +43,7 @@ type ReviewShellStatusOption = {
|
|
|
42
43
|
value: ReviewItemStatus;
|
|
43
44
|
label: string;
|
|
44
45
|
};
|
|
46
|
+
type ReviewShellAssigneeOption = ReviewAssigneeOption;
|
|
45
47
|
type ReviewShellWriteMode = 'dom' | 'note' | 'area';
|
|
46
48
|
type ReviewShellUpdateStatusInput = {
|
|
47
49
|
id: string;
|
|
@@ -50,6 +52,14 @@ type ReviewShellUpdateStatusInput = {
|
|
|
50
52
|
statusOption: ReviewShellStatusOption;
|
|
51
53
|
statusIndex: number;
|
|
52
54
|
};
|
|
55
|
+
type ReviewShellUpdateAssigneeInput = {
|
|
56
|
+
id: string;
|
|
57
|
+
item: ReviewItem;
|
|
58
|
+
assigneeId: string | null;
|
|
59
|
+
assigneeName?: string;
|
|
60
|
+
assigneeOption?: ReviewShellAssigneeOption;
|
|
61
|
+
assigneeIndex: number;
|
|
62
|
+
};
|
|
53
63
|
type ReviewShellSubmissionPatch = Partial<Pick<ReviewItem, 'externalIssueId' | 'externalIssueUrl' | 'submittedAt' | 'submitStatus' | 'submitError'>>;
|
|
54
64
|
type ReviewShellSyncSubmissionInput = {
|
|
55
65
|
id: string;
|
|
@@ -63,9 +73,13 @@ type ReviewShellAdapter = {
|
|
|
63
73
|
list: WebReviewKitAdapter['list'];
|
|
64
74
|
create?: WebReviewKitAdapter['create'];
|
|
65
75
|
update?: WebReviewKitAdapter['update'];
|
|
76
|
+
fields?: ReviewFieldsConfig;
|
|
66
77
|
statusOptions?: readonly ReviewShellStatusOption[];
|
|
78
|
+
assigneeTitle?: string;
|
|
79
|
+
assigneeOptions?: readonly ReviewShellAssigneeOption[];
|
|
67
80
|
canWrite?: boolean | readonly ReviewShellWriteMode[];
|
|
68
81
|
updateStatus?: (input: ReviewShellUpdateStatusInput) => Promise<ReviewItem>;
|
|
82
|
+
updateAssignee?: (input: ReviewShellUpdateAssigneeInput) => Promise<ReviewItem>;
|
|
69
83
|
syncSubmission?: (input: ReviewShellSyncSubmissionInput) => Promise<ReviewItem>;
|
|
70
84
|
remove?: WebReviewKitAdapter['remove'];
|
|
71
85
|
};
|
|
@@ -116,6 +130,11 @@ type ReviewPresenceAdapter = {
|
|
|
116
130
|
label: string;
|
|
117
131
|
connect: (context: ReviewPresenceContext) => Promise<ReviewPresenceSession> | ReviewPresenceSession;
|
|
118
132
|
};
|
|
133
|
+
type ReviewShellFigmaImagesOptions = {
|
|
134
|
+
enabled?: boolean;
|
|
135
|
+
store?: ReviewFigmaImageStore;
|
|
136
|
+
imageFormat?: ReviewFigmaImageFormat;
|
|
137
|
+
};
|
|
119
138
|
interface CreateReviewPagesOptions {
|
|
120
139
|
root?: string;
|
|
121
140
|
exclude?: (href: string) => boolean;
|
|
@@ -132,12 +151,26 @@ interface ReviewShellProps {
|
|
|
132
151
|
sourceRoot?: string;
|
|
133
152
|
sourceInspector?: ReviewSourceInspectorOptions;
|
|
134
153
|
presence?: ReviewPresenceAdapter;
|
|
154
|
+
figmaImages?: ReviewShellFigmaImagesOptions;
|
|
135
155
|
}
|
|
136
156
|
interface ReviewShellMountOptions extends ReviewShellProps {
|
|
137
157
|
rootId?: string;
|
|
138
158
|
}
|
|
139
159
|
|
|
140
|
-
declare const ReviewShell: ({ projectId, pages, adapters, presets, ruler, initialPrompt, adjustmentLabel, reviewPathPrefix, sourceRoot, sourceInspector, presence }: ReviewShellProps) =>
|
|
160
|
+
declare const ReviewShell: ({ projectId, pages, adapters, presets, ruler, initialPrompt, adjustmentLabel, reviewPathPrefix, sourceRoot, sourceInspector, presence, figmaImages, }: ReviewShellProps) => react.JSX.Element;
|
|
161
|
+
|
|
162
|
+
interface FigmaDevOverlayMountOptions {
|
|
163
|
+
rootId?: string;
|
|
164
|
+
projectId: string;
|
|
165
|
+
presets?: ReviewShellViewportPreset[];
|
|
166
|
+
reviewPathPrefix?: string;
|
|
167
|
+
figmaImages?: ReviewShellFigmaImagesOptions;
|
|
168
|
+
pageUrl?: string | (() => string);
|
|
169
|
+
}
|
|
170
|
+
interface FigmaDevOverlayController {
|
|
171
|
+
destroy(): void;
|
|
172
|
+
}
|
|
173
|
+
declare const mountFigmaDevOverlay: (options: FigmaDevOverlayMountOptions) => FigmaDevOverlayController;
|
|
141
174
|
|
|
142
175
|
declare const createReviewPagesFromGlob: (entries: ReviewShellGlobEntries, options?: CreateReviewPagesOptions) => ReviewShellPage[];
|
|
143
176
|
|
|
@@ -184,4 +217,4 @@ declare const createSupabasePresenceAdapter: ({ client, channelPrefix, private:
|
|
|
184
217
|
|
|
185
218
|
declare const mountReviewShell: (options: ReviewShellMountOptions) => void;
|
|
186
219
|
|
|
187
|
-
export { type CreateReviewPagesOptions, DEFAULT_REVIEW_VIEWPORT_PRESETS, type LocalPresenceAdapterOptions, type ReviewPresenceAdapter, type ReviewPresenceContext, type ReviewPresenceSession, type ReviewPresenceState, type ReviewPresenceStatus, type ReviewPresenceUser, ReviewShell, type ReviewShellAdapter, type ReviewShellAdapters, type ReviewShellGlobEntries, type ReviewShellMountOptions, type ReviewShellPage, type ReviewShellProps, type ReviewShellStatusOption, type ReviewShellViewportKind, type ReviewShellViewportPreset, type ReviewSourceEditor, type ReviewSourceInspectorOptions, type SupabasePresenceAdapterOptions, type SupabasePresenceClient, createFallbackPresenceAdapter, createLocalPresenceAdapter, createReviewPagesFromGlob, createSupabasePresenceAdapter, mountReviewShell };
|
|
220
|
+
export { type CreateReviewPagesOptions, DEFAULT_REVIEW_VIEWPORT_PRESETS, type FigmaDevOverlayController, type FigmaDevOverlayMountOptions, type LocalPresenceAdapterOptions, type ReviewPresenceAdapter, type ReviewPresenceContext, type ReviewPresenceSession, type ReviewPresenceState, type ReviewPresenceStatus, type ReviewPresenceUser, ReviewShell, type ReviewShellAdapter, type ReviewShellAdapters, type ReviewShellAssigneeOption, type ReviewShellFigmaImagesOptions, type ReviewShellGlobEntries, type ReviewShellMountOptions, type ReviewShellPage, type ReviewShellProps, type ReviewShellStatusOption, type ReviewShellUpdateAssigneeInput, type ReviewShellUpdateStatusInput, type ReviewShellViewportKind, type ReviewShellViewportPreset, type ReviewSourceEditor, type ReviewSourceInspectorOptions, type SupabasePresenceAdapterOptions, type SupabasePresenceClient, createFallbackPresenceAdapter, createLocalPresenceAdapter, createReviewPagesFromGlob, createSupabasePresenceAdapter, mountFigmaDevOverlay, mountReviewShell };
|
package/dist/react-shell.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { f as ReviewItemScope,
|
|
2
|
-
import
|
|
1
|
+
import { f as ReviewItemScope, s as ReviewSource, o as ReviewMode, W as WebReviewKitAdapter, x as ReviewFieldsConfig, a as ReviewItemStatus, k as ReviewAssigneeOption, e as ReviewItem, q as ReviewRulerConfig } from './types-DT9Z66mV.js';
|
|
2
|
+
import { R as ReviewFigmaImageStore, a as ReviewFigmaImageFormat } from './image.types-BmzkFSPX.js';
|
|
3
|
+
import * as react from 'react';
|
|
3
4
|
|
|
4
5
|
type ReviewShellViewportKind = Exclude<ReviewItemScope, 'dom'>;
|
|
5
6
|
type ReviewShellViewportPreset = {
|
|
@@ -42,6 +43,7 @@ type ReviewShellStatusOption = {
|
|
|
42
43
|
value: ReviewItemStatus;
|
|
43
44
|
label: string;
|
|
44
45
|
};
|
|
46
|
+
type ReviewShellAssigneeOption = ReviewAssigneeOption;
|
|
45
47
|
type ReviewShellWriteMode = 'dom' | 'note' | 'area';
|
|
46
48
|
type ReviewShellUpdateStatusInput = {
|
|
47
49
|
id: string;
|
|
@@ -50,6 +52,14 @@ type ReviewShellUpdateStatusInput = {
|
|
|
50
52
|
statusOption: ReviewShellStatusOption;
|
|
51
53
|
statusIndex: number;
|
|
52
54
|
};
|
|
55
|
+
type ReviewShellUpdateAssigneeInput = {
|
|
56
|
+
id: string;
|
|
57
|
+
item: ReviewItem;
|
|
58
|
+
assigneeId: string | null;
|
|
59
|
+
assigneeName?: string;
|
|
60
|
+
assigneeOption?: ReviewShellAssigneeOption;
|
|
61
|
+
assigneeIndex: number;
|
|
62
|
+
};
|
|
53
63
|
type ReviewShellSubmissionPatch = Partial<Pick<ReviewItem, 'externalIssueId' | 'externalIssueUrl' | 'submittedAt' | 'submitStatus' | 'submitError'>>;
|
|
54
64
|
type ReviewShellSyncSubmissionInput = {
|
|
55
65
|
id: string;
|
|
@@ -63,9 +73,13 @@ type ReviewShellAdapter = {
|
|
|
63
73
|
list: WebReviewKitAdapter['list'];
|
|
64
74
|
create?: WebReviewKitAdapter['create'];
|
|
65
75
|
update?: WebReviewKitAdapter['update'];
|
|
76
|
+
fields?: ReviewFieldsConfig;
|
|
66
77
|
statusOptions?: readonly ReviewShellStatusOption[];
|
|
78
|
+
assigneeTitle?: string;
|
|
79
|
+
assigneeOptions?: readonly ReviewShellAssigneeOption[];
|
|
67
80
|
canWrite?: boolean | readonly ReviewShellWriteMode[];
|
|
68
81
|
updateStatus?: (input: ReviewShellUpdateStatusInput) => Promise<ReviewItem>;
|
|
82
|
+
updateAssignee?: (input: ReviewShellUpdateAssigneeInput) => Promise<ReviewItem>;
|
|
69
83
|
syncSubmission?: (input: ReviewShellSyncSubmissionInput) => Promise<ReviewItem>;
|
|
70
84
|
remove?: WebReviewKitAdapter['remove'];
|
|
71
85
|
};
|
|
@@ -116,6 +130,11 @@ type ReviewPresenceAdapter = {
|
|
|
116
130
|
label: string;
|
|
117
131
|
connect: (context: ReviewPresenceContext) => Promise<ReviewPresenceSession> | ReviewPresenceSession;
|
|
118
132
|
};
|
|
133
|
+
type ReviewShellFigmaImagesOptions = {
|
|
134
|
+
enabled?: boolean;
|
|
135
|
+
store?: ReviewFigmaImageStore;
|
|
136
|
+
imageFormat?: ReviewFigmaImageFormat;
|
|
137
|
+
};
|
|
119
138
|
interface CreateReviewPagesOptions {
|
|
120
139
|
root?: string;
|
|
121
140
|
exclude?: (href: string) => boolean;
|
|
@@ -132,12 +151,26 @@ interface ReviewShellProps {
|
|
|
132
151
|
sourceRoot?: string;
|
|
133
152
|
sourceInspector?: ReviewSourceInspectorOptions;
|
|
134
153
|
presence?: ReviewPresenceAdapter;
|
|
154
|
+
figmaImages?: ReviewShellFigmaImagesOptions;
|
|
135
155
|
}
|
|
136
156
|
interface ReviewShellMountOptions extends ReviewShellProps {
|
|
137
157
|
rootId?: string;
|
|
138
158
|
}
|
|
139
159
|
|
|
140
|
-
declare const ReviewShell: ({ projectId, pages, adapters, presets, ruler, initialPrompt, adjustmentLabel, reviewPathPrefix, sourceRoot, sourceInspector, presence }: ReviewShellProps) =>
|
|
160
|
+
declare const ReviewShell: ({ projectId, pages, adapters, presets, ruler, initialPrompt, adjustmentLabel, reviewPathPrefix, sourceRoot, sourceInspector, presence, figmaImages, }: ReviewShellProps) => react.JSX.Element;
|
|
161
|
+
|
|
162
|
+
interface FigmaDevOverlayMountOptions {
|
|
163
|
+
rootId?: string;
|
|
164
|
+
projectId: string;
|
|
165
|
+
presets?: ReviewShellViewportPreset[];
|
|
166
|
+
reviewPathPrefix?: string;
|
|
167
|
+
figmaImages?: ReviewShellFigmaImagesOptions;
|
|
168
|
+
pageUrl?: string | (() => string);
|
|
169
|
+
}
|
|
170
|
+
interface FigmaDevOverlayController {
|
|
171
|
+
destroy(): void;
|
|
172
|
+
}
|
|
173
|
+
declare const mountFigmaDevOverlay: (options: FigmaDevOverlayMountOptions) => FigmaDevOverlayController;
|
|
141
174
|
|
|
142
175
|
declare const createReviewPagesFromGlob: (entries: ReviewShellGlobEntries, options?: CreateReviewPagesOptions) => ReviewShellPage[];
|
|
143
176
|
|
|
@@ -184,4 +217,4 @@ declare const createSupabasePresenceAdapter: ({ client, channelPrefix, private:
|
|
|
184
217
|
|
|
185
218
|
declare const mountReviewShell: (options: ReviewShellMountOptions) => void;
|
|
186
219
|
|
|
187
|
-
export { type CreateReviewPagesOptions, DEFAULT_REVIEW_VIEWPORT_PRESETS, type LocalPresenceAdapterOptions, type ReviewPresenceAdapter, type ReviewPresenceContext, type ReviewPresenceSession, type ReviewPresenceState, type ReviewPresenceStatus, type ReviewPresenceUser, ReviewShell, type ReviewShellAdapter, type ReviewShellAdapters, type ReviewShellGlobEntries, type ReviewShellMountOptions, type ReviewShellPage, type ReviewShellProps, type ReviewShellStatusOption, type ReviewShellViewportKind, type ReviewShellViewportPreset, type ReviewSourceEditor, type ReviewSourceInspectorOptions, type SupabasePresenceAdapterOptions, type SupabasePresenceClient, createFallbackPresenceAdapter, createLocalPresenceAdapter, createReviewPagesFromGlob, createSupabasePresenceAdapter, mountReviewShell };
|
|
220
|
+
export { type CreateReviewPagesOptions, DEFAULT_REVIEW_VIEWPORT_PRESETS, type FigmaDevOverlayController, type FigmaDevOverlayMountOptions, type LocalPresenceAdapterOptions, type ReviewPresenceAdapter, type ReviewPresenceContext, type ReviewPresenceSession, type ReviewPresenceState, type ReviewPresenceStatus, type ReviewPresenceUser, ReviewShell, type ReviewShellAdapter, type ReviewShellAdapters, type ReviewShellAssigneeOption, type ReviewShellFigmaImagesOptions, type ReviewShellGlobEntries, type ReviewShellMountOptions, type ReviewShellPage, type ReviewShellProps, type ReviewShellStatusOption, type ReviewShellUpdateAssigneeInput, type ReviewShellUpdateStatusInput, type ReviewShellViewportKind, type ReviewShellViewportPreset, type ReviewSourceEditor, type ReviewSourceInspectorOptions, type SupabasePresenceAdapterOptions, type SupabasePresenceClient, createFallbackPresenceAdapter, createLocalPresenceAdapter, createReviewPagesFromGlob, createSupabasePresenceAdapter, mountFigmaDevOverlay, mountReviewShell };
|