@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.
Files changed (42) hide show
  1. package/.env.sample +29 -0
  2. package/README.md +36 -10
  3. package/dist/chunk-AB5B6O77.js +584 -0
  4. package/dist/chunk-AB5B6O77.js.map +1 -0
  5. package/dist/{chunk-TWCSIBMY.js → chunk-RPVLRULC.js} +736 -201
  6. package/dist/chunk-RPVLRULC.js.map +1 -0
  7. package/dist/image.types-BmzkFSPX.d.cts +71 -0
  8. package/dist/image.types-BmzkFSPX.d.ts +71 -0
  9. package/dist/index.cjs +1251 -202
  10. package/dist/index.cjs.map +1 -1
  11. package/dist/index.d.cts +27 -3
  12. package/dist/index.d.ts +27 -3
  13. package/dist/index.js +50 -3
  14. package/dist/index.js.map +1 -1
  15. package/dist/react-shell.cjs +10135 -4070
  16. package/dist/react-shell.cjs.map +1 -1
  17. package/dist/react-shell.d.cts +37 -4
  18. package/dist/react-shell.d.ts +37 -4
  19. package/dist/react-shell.js +9258 -3707
  20. package/dist/react-shell.js.map +1 -1
  21. package/dist/token-Dt-ZH-YO.d.cts +88 -0
  22. package/dist/token-nJXPPdYX.d.ts +88 -0
  23. package/dist/{types-RvVa5ns-.d.cts → types-DT9Z66mV.d.cts} +14 -1
  24. package/dist/{types-RvVa5ns-.d.ts → types-DT9Z66mV.d.ts} +14 -1
  25. package/dist/vite.cjs +1116 -5
  26. package/dist/vite.cjs.map +1 -1
  27. package/dist/vite.d.cts +45 -1
  28. package/dist/vite.d.ts +45 -1
  29. package/dist/vite.js +800 -5
  30. package/dist/vite.js.map +1 -1
  31. package/docs/README.md +11 -5
  32. package/docs/adapters.md +126 -0
  33. package/docs/adaptor.sample.ts +13 -1
  34. package/docs/architecture.md +6 -1
  35. package/docs/code-review-0.6.0.md +232 -0
  36. package/docs/db-setup.md +4 -2
  37. package/docs/figma-image-mvp-0.7.0.md +327 -0
  38. package/docs/installation.md +44 -8
  39. package/docs/release-notes-0.6.0.md +108 -0
  40. package/docs/release-notes-0.7.0.md +128 -0
  41. package/package.json +6 -2
  42. package/dist/chunk-TWCSIBMY.js.map +0 -1
@@ -1,5 +1,6 @@
1
- import { f as ReviewItemScope, r as ReviewSource, n as ReviewMode, W as WebReviewKitAdapter, a as ReviewItemStatus, e as ReviewItem, p as ReviewRulerConfig } from './types-RvVa5ns-.cjs';
2
- import React from 'react';
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) => React.JSX.Element;
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 };
@@ -1,5 +1,6 @@
1
- import { f as ReviewItemScope, r as ReviewSource, n as ReviewMode, W as WebReviewKitAdapter, a as ReviewItemStatus, e as ReviewItem, p as ReviewRulerConfig } from './types-RvVa5ns-.js';
2
- import React from 'react';
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) => React.JSX.Element;
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 };