@designfever/web-review-kit 0.6.0 → 0.7.1

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 (43) hide show
  1. package/.env.sample +32 -0
  2. package/README.md +35 -10
  3. package/dist/chunk-2ZLU5FTD.js +602 -0
  4. package/dist/chunk-2ZLU5FTD.js.map +1 -0
  5. package/dist/{chunk-IN36JHEU.js → chunk-RPVLRULC.js} +504 -143
  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 +1037 -144
  10. package/dist/index.cjs.map +1 -1
  11. package/dist/index.d.cts +29 -3
  12. package/dist/index.d.ts +29 -3
  13. package/dist/index.js +50 -3
  14. package/dist/index.js.map +1 -1
  15. package/dist/react-shell.cjs +10339 -5168
  16. package/dist/react-shell.cjs.map +1 -1
  17. package/dist/react-shell.d.cts +39 -4
  18. package/dist/react-shell.d.ts +39 -4
  19. package/dist/react-shell.js +9687 -4856
  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-DFHHVRBc.d.cts → types-DT9Z66mV.d.cts} +13 -1
  24. package/dist/{types-DFHHVRBc.d.ts → types-DT9Z66mV.d.ts} +13 -1
  25. package/dist/vite.cjs +1144 -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 +829 -5
  30. package/dist/vite.js.map +1 -1
  31. package/docs/README.md +13 -7
  32. package/docs/adapters.md +128 -0
  33. package/docs/adaptor.sample.ts +13 -1
  34. package/docs/architecture.md +2 -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 +330 -0
  38. package/docs/figma-overlay.md +11 -4
  39. package/docs/installation.md +42 -7
  40. package/docs/release-notes-0.7.0.md +132 -0
  41. package/docs/release-notes-0.7.1.md +34 -0
  42. package/package.json +6 -2
  43. package/dist/chunk-IN36JHEU.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-DFHHVRBc.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;
@@ -59,13 +69,18 @@ type ReviewShellSyncSubmissionInput = {
59
69
  type ReviewShellAdapter = {
60
70
  label: ReviewSource;
61
71
  pageId?: string;
72
+ defaultUserId?: string;
62
73
  get: WebReviewKitAdapter['get'];
63
74
  list: WebReviewKitAdapter['list'];
64
75
  create?: WebReviewKitAdapter['create'];
65
76
  update?: WebReviewKitAdapter['update'];
77
+ fields?: ReviewFieldsConfig;
66
78
  statusOptions?: readonly ReviewShellStatusOption[];
79
+ assigneeTitle?: string;
80
+ assigneeOptions?: readonly ReviewShellAssigneeOption[];
67
81
  canWrite?: boolean | readonly ReviewShellWriteMode[];
68
82
  updateStatus?: (input: ReviewShellUpdateStatusInput) => Promise<ReviewItem>;
83
+ updateAssignee?: (input: ReviewShellUpdateAssigneeInput) => Promise<ReviewItem>;
69
84
  syncSubmission?: (input: ReviewShellSyncSubmissionInput) => Promise<ReviewItem>;
70
85
  remove?: WebReviewKitAdapter['remove'];
71
86
  };
@@ -73,6 +88,7 @@ type ReviewShellAdapterMap = {
73
88
  local: WebReviewKitAdapter;
74
89
  remote?: WebReviewKitAdapter | null;
75
90
  remotePageId?: string;
91
+ defaultUserId?: string;
76
92
  };
77
93
  type ReviewShellAdapters = ReviewShellAdapterMap | ReviewShellAdapter[];
78
94
  type ReviewPresenceStatus = 'idle' | 'reviewing' | 'editing';
@@ -116,6 +132,11 @@ type ReviewPresenceAdapter = {
116
132
  label: string;
117
133
  connect: (context: ReviewPresenceContext) => Promise<ReviewPresenceSession> | ReviewPresenceSession;
118
134
  };
135
+ type ReviewShellFigmaImagesOptions = {
136
+ enabled?: boolean;
137
+ store?: ReviewFigmaImageStore;
138
+ imageFormat?: ReviewFigmaImageFormat;
139
+ };
119
140
  interface CreateReviewPagesOptions {
120
141
  root?: string;
121
142
  exclude?: (href: string) => boolean;
@@ -132,12 +153,26 @@ interface ReviewShellProps {
132
153
  sourceRoot?: string;
133
154
  sourceInspector?: ReviewSourceInspectorOptions;
134
155
  presence?: ReviewPresenceAdapter;
156
+ figmaImages?: ReviewShellFigmaImagesOptions;
135
157
  }
136
158
  interface ReviewShellMountOptions extends ReviewShellProps {
137
159
  rootId?: string;
138
160
  }
139
161
 
140
- declare const ReviewShell: ({ projectId, pages, adapters, presets, ruler, initialPrompt, adjustmentLabel, reviewPathPrefix, sourceRoot, sourceInspector, presence }: ReviewShellProps) => React.JSX.Element;
162
+ declare const ReviewShell: ({ projectId, pages, adapters, presets, ruler, initialPrompt, adjustmentLabel, reviewPathPrefix, sourceRoot, sourceInspector, presence, figmaImages, }: ReviewShellProps) => react.JSX.Element;
163
+
164
+ interface FigmaDevOverlayMountOptions {
165
+ rootId?: string;
166
+ projectId: string;
167
+ presets?: ReviewShellViewportPreset[];
168
+ reviewPathPrefix?: string;
169
+ figmaImages?: ReviewShellFigmaImagesOptions;
170
+ pageUrl?: string | (() => string);
171
+ }
172
+ interface FigmaDevOverlayController {
173
+ destroy(): void;
174
+ }
175
+ declare const mountFigmaDevOverlay: (options: FigmaDevOverlayMountOptions) => FigmaDevOverlayController;
141
176
 
142
177
  declare const createReviewPagesFromGlob: (entries: ReviewShellGlobEntries, options?: CreateReviewPagesOptions) => ReviewShellPage[];
143
178
 
@@ -184,4 +219,4 @@ declare const createSupabasePresenceAdapter: ({ client, channelPrefix, private:
184
219
 
185
220
  declare const mountReviewShell: (options: ReviewShellMountOptions) => void;
186
221
 
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 };
222
+ 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-DFHHVRBc.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;
@@ -59,13 +69,18 @@ type ReviewShellSyncSubmissionInput = {
59
69
  type ReviewShellAdapter = {
60
70
  label: ReviewSource;
61
71
  pageId?: string;
72
+ defaultUserId?: string;
62
73
  get: WebReviewKitAdapter['get'];
63
74
  list: WebReviewKitAdapter['list'];
64
75
  create?: WebReviewKitAdapter['create'];
65
76
  update?: WebReviewKitAdapter['update'];
77
+ fields?: ReviewFieldsConfig;
66
78
  statusOptions?: readonly ReviewShellStatusOption[];
79
+ assigneeTitle?: string;
80
+ assigneeOptions?: readonly ReviewShellAssigneeOption[];
67
81
  canWrite?: boolean | readonly ReviewShellWriteMode[];
68
82
  updateStatus?: (input: ReviewShellUpdateStatusInput) => Promise<ReviewItem>;
83
+ updateAssignee?: (input: ReviewShellUpdateAssigneeInput) => Promise<ReviewItem>;
69
84
  syncSubmission?: (input: ReviewShellSyncSubmissionInput) => Promise<ReviewItem>;
70
85
  remove?: WebReviewKitAdapter['remove'];
71
86
  };
@@ -73,6 +88,7 @@ type ReviewShellAdapterMap = {
73
88
  local: WebReviewKitAdapter;
74
89
  remote?: WebReviewKitAdapter | null;
75
90
  remotePageId?: string;
91
+ defaultUserId?: string;
76
92
  };
77
93
  type ReviewShellAdapters = ReviewShellAdapterMap | ReviewShellAdapter[];
78
94
  type ReviewPresenceStatus = 'idle' | 'reviewing' | 'editing';
@@ -116,6 +132,11 @@ type ReviewPresenceAdapter = {
116
132
  label: string;
117
133
  connect: (context: ReviewPresenceContext) => Promise<ReviewPresenceSession> | ReviewPresenceSession;
118
134
  };
135
+ type ReviewShellFigmaImagesOptions = {
136
+ enabled?: boolean;
137
+ store?: ReviewFigmaImageStore;
138
+ imageFormat?: ReviewFigmaImageFormat;
139
+ };
119
140
  interface CreateReviewPagesOptions {
120
141
  root?: string;
121
142
  exclude?: (href: string) => boolean;
@@ -132,12 +153,26 @@ interface ReviewShellProps {
132
153
  sourceRoot?: string;
133
154
  sourceInspector?: ReviewSourceInspectorOptions;
134
155
  presence?: ReviewPresenceAdapter;
156
+ figmaImages?: ReviewShellFigmaImagesOptions;
135
157
  }
136
158
  interface ReviewShellMountOptions extends ReviewShellProps {
137
159
  rootId?: string;
138
160
  }
139
161
 
140
- declare const ReviewShell: ({ projectId, pages, adapters, presets, ruler, initialPrompt, adjustmentLabel, reviewPathPrefix, sourceRoot, sourceInspector, presence }: ReviewShellProps) => React.JSX.Element;
162
+ declare const ReviewShell: ({ projectId, pages, adapters, presets, ruler, initialPrompt, adjustmentLabel, reviewPathPrefix, sourceRoot, sourceInspector, presence, figmaImages, }: ReviewShellProps) => react.JSX.Element;
163
+
164
+ interface FigmaDevOverlayMountOptions {
165
+ rootId?: string;
166
+ projectId: string;
167
+ presets?: ReviewShellViewportPreset[];
168
+ reviewPathPrefix?: string;
169
+ figmaImages?: ReviewShellFigmaImagesOptions;
170
+ pageUrl?: string | (() => string);
171
+ }
172
+ interface FigmaDevOverlayController {
173
+ destroy(): void;
174
+ }
175
+ declare const mountFigmaDevOverlay: (options: FigmaDevOverlayMountOptions) => FigmaDevOverlayController;
141
176
 
142
177
  declare const createReviewPagesFromGlob: (entries: ReviewShellGlobEntries, options?: CreateReviewPagesOptions) => ReviewShellPage[];
143
178
 
@@ -184,4 +219,4 @@ declare const createSupabasePresenceAdapter: ({ client, channelPrefix, private:
184
219
 
185
220
  declare const mountReviewShell: (options: ReviewShellMountOptions) => void;
186
221
 
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 };
222
+ 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 };