@designfever/web-review-kit 0.4.0 → 0.4.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.
- package/dist/{chunk-QFNYQCTA.js → chunk-6L2KJ7XL.js} +160 -116
- package/dist/chunk-6L2KJ7XL.js.map +1 -0
- package/dist/index.cjs +159 -115
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/react-shell.cjs +319 -170
- package/dist/react-shell.cjs.map +1 -1
- package/dist/react-shell.js +181 -76
- package/dist/react-shell.js.map +1 -1
- package/docs/adaptor.sample.ts +2 -0
- package/docs/installation.md +19 -0
- package/package.json +1 -1
- package/dist/chunk-QFNYQCTA.js.map +0 -1
package/docs/adaptor.sample.ts
CHANGED
|
@@ -98,6 +98,7 @@ export function createRemoteReviewAdapter(
|
|
|
98
98
|
* label becomes the URL source, for example /review?source=remote.
|
|
99
99
|
* create controls whether the shell can write to this adapter.
|
|
100
100
|
* canWrite can be true or limited to ['dom', 'note', 'area'].
|
|
101
|
+
* update enables comment edits in the QA panel.
|
|
101
102
|
* updateStatus drives the status buttons in the QA panel.
|
|
102
103
|
* remove enables delete actions for this source.
|
|
103
104
|
*/
|
|
@@ -111,6 +112,7 @@ export function createRemoteReviewShellAdapter(
|
|
|
111
112
|
get: (id) => adapter.get(id),
|
|
112
113
|
list: (query) => adapter.list(query),
|
|
113
114
|
create: (item) => adapter.create(item),
|
|
115
|
+
update: (id, patch) => adapter.update(id, patch),
|
|
114
116
|
canWrite: true,
|
|
115
117
|
statusOptions: REVIEW_WORKFLOW_STATUS_OPTIONS,
|
|
116
118
|
updateStatus: ({ id, status }) =>
|
package/docs/installation.md
CHANGED
|
@@ -64,6 +64,7 @@ mountReviewShell({
|
|
|
64
64
|
get: (id) => local.get(id),
|
|
65
65
|
list: (query) => local.list(query),
|
|
66
66
|
create: (item) => local.create(item),
|
|
67
|
+
update: (id, patch) => local.update(id, patch),
|
|
67
68
|
statusOptions: REVIEW_WORKFLOW_STATUS_OPTIONS,
|
|
68
69
|
updateStatus: ({ id, status }) => local.update(id, { status }),
|
|
69
70
|
syncSubmission: ({ id, patch }) => local.update(id, patch),
|
|
@@ -74,6 +75,22 @@ mountReviewShell({
|
|
|
74
75
|
});
|
|
75
76
|
```
|
|
76
77
|
|
|
78
|
+
## Adjustment Label
|
|
79
|
+
|
|
80
|
+
DOM adjust mode appends adjustment metrics to the saved QA comment. Use `adjustmentLabel` when a host project wants that prompt line to match its own responsive CSS workflow.
|
|
81
|
+
|
|
82
|
+
```tsx
|
|
83
|
+
mountReviewShell({
|
|
84
|
+
projectId: REVIEW_PROJECT_ID,
|
|
85
|
+
pages,
|
|
86
|
+
adapters,
|
|
87
|
+
adjustmentLabel: 'Responsive CSS px adjustments',
|
|
88
|
+
reviewPathPrefix: REVIEW_PATH_PREFIX,
|
|
89
|
+
});
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
If omitted, the default label is `Responsive CSS px adjustments`. This option only changes the label before the generated `x`, `y`, and `scale` values.
|
|
93
|
+
|
|
77
94
|
## Supabase Adapter
|
|
78
95
|
|
|
79
96
|
Host projects that choose Supabase create the client themselves and pass it into the package adapter.
|
|
@@ -124,6 +141,7 @@ const adapters = [
|
|
|
124
141
|
get: (id) => local.get(id),
|
|
125
142
|
list: (query) => local.list(query),
|
|
126
143
|
create: (item) => local.create(item),
|
|
144
|
+
update: (id, patch) => local.update(id, patch),
|
|
127
145
|
statusOptions: REVIEW_WORKFLOW_STATUS_OPTIONS,
|
|
128
146
|
updateStatus: ({ id, status }) => local.update(id, { status }),
|
|
129
147
|
syncSubmission: ({ id, patch }) => local.update(id, patch),
|
|
@@ -136,6 +154,7 @@ const adapters = [
|
|
|
136
154
|
get: (id) => remote.get(id),
|
|
137
155
|
list: (query) => remote.list(query),
|
|
138
156
|
create: (item) => remote.create(item),
|
|
157
|
+
update: (id, patch) => remote.update(id, patch),
|
|
139
158
|
statusOptions: REVIEW_WORKFLOW_STATUS_OPTIONS,
|
|
140
159
|
updateStatus: ({ id, status }) => remote.update(id, { status }),
|
|
141
160
|
remove: (id) => remote.remove(id),
|