@designfever/web-review-kit 0.1.0 → 0.3.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 +77 -179
- package/dist/{chunk-U5K2YGGL.js → chunk-I76WEDLA.js} +2248 -2722
- package/dist/chunk-I76WEDLA.js.map +1 -0
- package/dist/index.cjs +2346 -2603
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -6
- package/dist/index.d.ts +10 -6
- package/dist/index.js +220 -7
- package/dist/index.js.map +1 -1
- package/dist/react-shell.cjs +8953 -6632
- package/dist/react-shell.cjs.map +1 -1
- package/dist/react-shell.d.cts +8 -3
- package/dist/react-shell.d.ts +8 -3
- package/dist/react-shell.js +5956 -3636
- package/dist/react-shell.js.map +1 -1
- package/dist/{types-D_mNjOHx.d.cts → types-Cf2x5ky6.d.cts} +8 -14
- package/dist/{types-D_mNjOHx.d.ts → types-Cf2x5ky6.d.ts} +8 -14
- package/dist/vite.cjs +186 -0
- package/dist/vite.cjs.map +1 -0
- package/dist/vite.d.cts +16 -0
- package/dist/vite.d.ts +16 -0
- package/dist/vite.js +161 -0
- package/dist/vite.js.map +1 -0
- package/docs/README.md +21 -30
- package/docs/adaptor.sample.ts +182 -0
- package/docs/architecture.md +125 -0
- package/docs/db-setup.md +253 -0
- package/docs/figma-overlay.md +52 -0
- package/docs/grid-overlay.md +38 -0
- package/docs/installation.md +108 -40
- package/package.json +22 -6
- package/dist/chunk-U5K2YGGL.js.map +0 -1
- package/docs/adapter-handoff.md +0 -146
- package/docs/concept.md +0 -102
- package/docs/df-sheet-adapter.md +0 -336
- package/docs/df-sheet-next.md +0 -222
- package/docs/initial-plan.md +0 -226
- package/docs/package-split-checkpoint.md +0 -79
- package/docs/presence-handoff.md +0 -138
- package/docs/review-feedback-2026-06-20.md +0 -267
- package/docs/smoke-baseline-2026-06-20.md +0 -41
- package/docs/stabilize-ui-work-guide.md +0 -243
- package/docs/supabase-presence.md +0 -198
- package/docs/supabase-review-items.md +0 -365
- package/docs/supabase.md +0 -205
package/docs/installation.md
CHANGED
|
@@ -1,30 +1,29 @@
|
|
|
1
1
|
# Installation
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Install `df-web-review-kit` in a host project and mount the review shell on a `/review` route.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
The default setup is local-only. Remote DB and presence are optional adapters.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## Package Install
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
10
|
pnpm add @designfever/web-review-kit react react-dom
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
Supabase
|
|
13
|
+
Supabase is optional. Install it only in host projects that use the Supabase adapter.
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
16
|
pnpm add @supabase/supabase-js
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
## Vite Route
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
"@designfever/web-review-kit": "file:packages/df-web-review-kit"
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## Vite route
|
|
21
|
+
Create a review entry such as:
|
|
26
22
|
|
|
27
|
-
|
|
23
|
+
```txt
|
|
24
|
+
page/review/index.html
|
|
25
|
+
page/review/index.tsx
|
|
26
|
+
```
|
|
28
27
|
|
|
29
28
|
Minimal `index.html`:
|
|
30
29
|
|
|
@@ -33,7 +32,7 @@ Minimal `index.html`:
|
|
|
33
32
|
<script type="module" src="./index.tsx"></script>
|
|
34
33
|
```
|
|
35
34
|
|
|
36
|
-
Minimal `index.tsx`:
|
|
35
|
+
Minimal local-only `index.tsx`:
|
|
37
36
|
|
|
38
37
|
```tsx
|
|
39
38
|
import {
|
|
@@ -46,6 +45,8 @@ import {
|
|
|
46
45
|
} from '@designfever/web-review-kit';
|
|
47
46
|
|
|
48
47
|
const REVIEW_PROJECT_ID = 'my-project';
|
|
48
|
+
const REVIEW_PATH_PREFIX = '/review';
|
|
49
|
+
|
|
49
50
|
const local = localAdapter({
|
|
50
51
|
storageKey: `${REVIEW_PROJECT_ID}-review-items`,
|
|
51
52
|
});
|
|
@@ -69,13 +70,13 @@ mountReviewShell({
|
|
|
69
70
|
remove: (id) => local.remove(id),
|
|
70
71
|
},
|
|
71
72
|
],
|
|
72
|
-
reviewPathPrefix:
|
|
73
|
+
reviewPathPrefix: REVIEW_PATH_PREFIX,
|
|
73
74
|
});
|
|
74
75
|
```
|
|
75
76
|
|
|
76
|
-
## Supabase
|
|
77
|
+
## Supabase Adapter
|
|
77
78
|
|
|
78
|
-
|
|
79
|
+
Host projects that choose Supabase create the client themselves and pass it into the package adapter.
|
|
79
80
|
|
|
80
81
|
```tsx
|
|
81
82
|
import {
|
|
@@ -93,7 +94,7 @@ import {
|
|
|
93
94
|
} from '@designfever/web-review-kit';
|
|
94
95
|
import { createClient } from '@supabase/supabase-js';
|
|
95
96
|
|
|
96
|
-
const REVIEW_PROJECT_ID = '
|
|
97
|
+
const REVIEW_PROJECT_ID = 'my-project';
|
|
97
98
|
const REVIEW_PATH_PREFIX = '/review';
|
|
98
99
|
|
|
99
100
|
const local = localAdapter({
|
|
@@ -157,13 +158,68 @@ const presence = supabaseClient
|
|
|
157
158
|
localPresence
|
|
158
159
|
)
|
|
159
160
|
: localPresence;
|
|
161
|
+
|
|
162
|
+
mountReviewShell({
|
|
163
|
+
projectId: REVIEW_PROJECT_ID,
|
|
164
|
+
pages,
|
|
165
|
+
adapters,
|
|
166
|
+
presence,
|
|
167
|
+
reviewPathPrefix: REVIEW_PATH_PREFIX,
|
|
168
|
+
});
|
|
160
169
|
```
|
|
161
170
|
|
|
162
|
-
|
|
171
|
+
See [DB setup](db-setup.md) before enabling Supabase in a shared environment.
|
|
172
|
+
|
|
173
|
+
## Source Locator
|
|
174
|
+
|
|
175
|
+
Host projects can opt into source file hints for local QA. The Vite plugin wraps React's dev JSX runtime and writes source attributes to rendered DOM nodes.
|
|
176
|
+
|
|
177
|
+
```ts
|
|
178
|
+
import { defineConfig } from 'vite';
|
|
179
|
+
import { reviewSourceLocator } from '@designfever/web-review-kit/vite';
|
|
180
|
+
|
|
181
|
+
export default defineConfig({
|
|
182
|
+
plugins: [
|
|
183
|
+
reviewSourceLocator({
|
|
184
|
+
enabled: true,
|
|
185
|
+
include: ['src'],
|
|
186
|
+
filePath: 'absolute',
|
|
187
|
+
}),
|
|
188
|
+
],
|
|
189
|
+
});
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
Captured DOM nodes will include `data-wrk-source-file`, `data-wrk-source-line`, and `data-wrk-source-column`. In the review shell, `Option` + click inside the target iframe opens that source in VS Code. If the file path is absolute, it opens directly. If the plugin stores relative paths, pass `sourceRoot` when mounting the shell.
|
|
193
|
+
|
|
194
|
+
```tsx
|
|
195
|
+
mountReviewShell({
|
|
196
|
+
projectId: REVIEW_PROJECT_ID,
|
|
197
|
+
pages,
|
|
198
|
+
adapters,
|
|
199
|
+
reviewPathPrefix: REVIEW_PATH_PREFIX,
|
|
200
|
+
sourceRoot: import.meta.env.VITE_REVIEW_SOURCE_ROOT,
|
|
201
|
+
});
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
Use this only in dev/review builds. Source paths are written into the browser DOM and can be persisted with QA items.
|
|
205
|
+
|
|
206
|
+
## Custom Adapter
|
|
207
|
+
|
|
208
|
+
If a team or host project owns its own QA backend, keep that adapter in the host project or in a separate package. Start from [adaptor.sample.ts](adaptor.sample.ts) and map its `WebReviewKitAdapter` methods to your backend API.
|
|
209
|
+
|
|
210
|
+
The sample explains the main interfaces:
|
|
211
|
+
|
|
212
|
+
- `ReviewItem`: the full QA payload to persist as structured JSON.
|
|
213
|
+
- `ReviewItemQuery`: filters used by page lists and sitemap counts.
|
|
214
|
+
- `WebReviewKitAdapter`: core CRUD contract.
|
|
215
|
+
- `ReviewShellAdapter`: React shell wiring for source labels, write modes, status updates, and delete actions.
|
|
216
|
+
|
|
217
|
+
Private keys, admin credentials, canonical numbering, and permission checks should stay in your backend, not in browser code.
|
|
163
218
|
|
|
164
219
|
## Environment
|
|
165
220
|
|
|
166
221
|
```env
|
|
222
|
+
VITE_REVIEW_PROJECT_ID=df-web-review-kit
|
|
167
223
|
VITE_REVIEW_SUPABASE_URL=https://your-project.supabase.co
|
|
168
224
|
VITE_REVIEW_SUPABASE_ANON_KEY=
|
|
169
225
|
VITE_REVIEW_SUPABASE_TABLE=review_items
|
|
@@ -172,13 +228,13 @@ VITE_REVIEW_SUPABASE_PRESENCE_PRIVATE=false
|
|
|
172
228
|
|
|
173
229
|
Rules:
|
|
174
230
|
|
|
175
|
-
-
|
|
176
|
-
- `service_role`
|
|
177
|
-
-
|
|
231
|
+
- Browser env uses a Supabase `anon` key only.
|
|
232
|
+
- Never expose `service_role` in browser env.
|
|
233
|
+
- OpenClaw/operator secrets stay outside the host browser and outside this package.
|
|
178
234
|
|
|
179
|
-
## Viewport
|
|
235
|
+
## Viewport Presets
|
|
180
236
|
|
|
181
|
-
|
|
237
|
+
Pass `presets` when a project has custom design widths.
|
|
182
238
|
|
|
183
239
|
```tsx
|
|
184
240
|
mountReviewShell({
|
|
@@ -194,29 +250,41 @@ mountReviewShell({
|
|
|
194
250
|
});
|
|
195
251
|
```
|
|
196
252
|
|
|
197
|
-
##
|
|
198
|
-
|
|
199
|
-
Lexus repo 기준:
|
|
253
|
+
## Local Dev Harness
|
|
200
254
|
|
|
201
255
|
```bash
|
|
202
256
|
pnpm dev:review
|
|
203
|
-
pnpm review-kit:typecheck
|
|
204
|
-
pnpm typecheck:review
|
|
205
|
-
pnpm review-kit:build
|
|
206
|
-
pnpm build:review
|
|
207
257
|
```
|
|
208
258
|
|
|
209
|
-
|
|
259
|
+
Open `http://127.0.0.1:5177/review/`.
|
|
260
|
+
|
|
261
|
+
Fixture pages:
|
|
262
|
+
|
|
263
|
+
- `/`: note, area, and DOM marker creation
|
|
264
|
+
- `/components/`: controls and panel spacing
|
|
265
|
+
- `/long-form/`: scroll and anchor restore
|
|
210
266
|
|
|
211
|
-
##
|
|
267
|
+
## Checks
|
|
268
|
+
|
|
269
|
+
Package repo:
|
|
270
|
+
|
|
271
|
+
```bash
|
|
272
|
+
pnpm typecheck
|
|
273
|
+
pnpm build
|
|
274
|
+
pnpm typecheck:dev
|
|
275
|
+
pnpm build:dev
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
Host repo:
|
|
279
|
+
|
|
280
|
+
```bash
|
|
281
|
+
pnpm typecheck
|
|
282
|
+
pnpm build
|
|
283
|
+
```
|
|
212
284
|
|
|
213
|
-
|
|
285
|
+
Manual smoke:
|
|
214
286
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
- local item을 remote로 등록하면 local draft 삭제 확인
|
|
220
|
-
- remote source에서 status update/delete 확인
|
|
221
|
-
- `/review?source=supabase&target=...&item=...` restore 확인
|
|
222
|
-
- Supabase `reviewNumber`가 삭제 후 재사용되지 않는지 확인
|
|
287
|
+
1. Open `/review`.
|
|
288
|
+
2. Create local note, DOM marker, and area marker.
|
|
289
|
+
3. If Supabase is enabled, submit a local item to remote.
|
|
290
|
+
4. Confirm local draft removal, remote list display, status update, delete, and deep-link restore.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@designfever/web-review-kit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Designfever web page review overlay toolkit.",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -31,6 +31,11 @@
|
|
|
31
31
|
"import": "./dist/react-shell.js",
|
|
32
32
|
"require": "./dist/react-shell.cjs"
|
|
33
33
|
},
|
|
34
|
+
"./vite": {
|
|
35
|
+
"types": "./dist/vite.d.ts",
|
|
36
|
+
"import": "./dist/vite.js",
|
|
37
|
+
"require": "./dist/vite.cjs"
|
|
38
|
+
},
|
|
34
39
|
"./package.json": "./package.json"
|
|
35
40
|
},
|
|
36
41
|
"files": [
|
|
@@ -39,23 +44,34 @@
|
|
|
39
44
|
"README.md"
|
|
40
45
|
],
|
|
41
46
|
"scripts": {
|
|
42
|
-
"build": "tsup src/index.ts src/react-shell.tsx --format esm,cjs --dts --sourcemap --clean --external react --external react-dom --external react/jsx-runtime",
|
|
43
|
-
"dev": "tsup src/index.ts src/react-shell.tsx --format esm,cjs --dts --sourcemap --watch --external react --external react-dom --external react/jsx-runtime",
|
|
47
|
+
"build": "tsup src/index.ts src/react-shell.tsx src/vite.ts --format esm,cjs --dts --sourcemap --clean --external react --external react-dom --external react/jsx-runtime",
|
|
48
|
+
"dev": "tsup src/index.ts src/react-shell.tsx src/vite.ts --format esm,cjs --dts --sourcemap --watch --external react --external react-dom --external react/jsx-runtime",
|
|
49
|
+
"dev:review": "vite --config dev/vite.config.ts",
|
|
50
|
+
"build:dev": "vite build --config dev/vite.config.ts",
|
|
44
51
|
"prepare": "pnpm build",
|
|
45
|
-
"typecheck": "tsc --noEmit"
|
|
52
|
+
"typecheck": "tsc --noEmit",
|
|
53
|
+
"typecheck:dev": "tsc --noEmit -p tsconfig.dev.json"
|
|
46
54
|
},
|
|
47
55
|
"peerDependencies": {
|
|
48
56
|
"react": ">=18",
|
|
49
|
-
"react-dom": ">=18"
|
|
57
|
+
"react-dom": ">=18",
|
|
58
|
+
"vite": ">=5"
|
|
59
|
+
},
|
|
60
|
+
"peerDependenciesMeta": {
|
|
61
|
+
"vite": {
|
|
62
|
+
"optional": true
|
|
63
|
+
}
|
|
50
64
|
},
|
|
51
65
|
"devDependencies": {
|
|
66
|
+
"@supabase/supabase-js": "^2.108.2",
|
|
52
67
|
"@types/react": "^19.2.17",
|
|
53
68
|
"@types/react-dom": "^19.2.3",
|
|
54
69
|
"lucide-react": "^1.20.0",
|
|
55
70
|
"react": "^19.2.7",
|
|
56
71
|
"react-dom": "^19.2.7",
|
|
57
72
|
"tsup": "^8.3.6",
|
|
58
|
-
"typescript": "^6.0.2"
|
|
73
|
+
"typescript": "^6.0.2",
|
|
74
|
+
"vite": "^8.0.8"
|
|
59
75
|
},
|
|
60
76
|
"packageManager": "pnpm@9.0.0"
|
|
61
77
|
}
|