@satanwagen/reviewkit 0.1.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/LICENSE +21 -0
- package/README.md +284 -0
- package/cli/emblema-sync.mjs +636 -0
- package/dist/chunk-4YNLMSCK.js +234 -0
- package/dist/chunk-4YNLMSCK.js.map +1 -0
- package/dist/chunk-YWBFAV57.js +8057 -0
- package/dist/chunk-YWBFAV57.js.map +1 -0
- package/dist/client/index.cjs +8311 -0
- package/dist/client/index.cjs.map +1 -0
- package/dist/client/index.d.cts +28 -0
- package/dist/client/index.d.ts +28 -0
- package/dist/client/index.js +4 -0
- package/dist/client/index.js.map +1 -0
- package/dist/index-BbucFgZi.d.ts +49 -0
- package/dist/index-CBlJrKkm.d.cts +49 -0
- package/dist/index.cjs +8302 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/dist/schema.cjs +130 -0
- package/dist/schema.cjs.map +1 -0
- package/dist/schema.d.cts +226 -0
- package/dist/schema.d.ts +226 -0
- package/dist/schema.js +3 -0
- package/dist/schema.js.map +1 -0
- package/package.json +72 -0
- package/schema/review-session.schema.json +210 -0
package/package.json
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@satanwagen/reviewkit",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Drop-in visual review & feedback layer for React sites. Reviewers annotate the live page; nothing is ever applied \u2014 changes are recorded as a portable session for a coding agent.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"sideEffects": false,
|
|
8
|
+
"main": "./dist/index.cjs",
|
|
9
|
+
"module": "./dist/index.js",
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"import": "./dist/index.js",
|
|
15
|
+
"require": "./dist/index.cjs"
|
|
16
|
+
},
|
|
17
|
+
"./client": {
|
|
18
|
+
"types": "./dist/client/index.d.ts",
|
|
19
|
+
"import": "./dist/client/index.js",
|
|
20
|
+
"require": "./dist/client/index.cjs"
|
|
21
|
+
},
|
|
22
|
+
"./schema": {
|
|
23
|
+
"types": "./dist/schema.d.ts",
|
|
24
|
+
"import": "./dist/schema.js",
|
|
25
|
+
"require": "./dist/schema.cjs"
|
|
26
|
+
},
|
|
27
|
+
"./package.json": "./package.json"
|
|
28
|
+
},
|
|
29
|
+
"files": [
|
|
30
|
+
"dist",
|
|
31
|
+
"schema",
|
|
32
|
+
"README.md",
|
|
33
|
+
"LICENSE",
|
|
34
|
+
"cli/emblema-sync.mjs"
|
|
35
|
+
],
|
|
36
|
+
"scripts": {
|
|
37
|
+
"build": "tsup",
|
|
38
|
+
"typecheck": "tsc --noEmit",
|
|
39
|
+
"lint": "eslint src",
|
|
40
|
+
"test": "node --test \"cli/**/*.test.mjs\"",
|
|
41
|
+
"prepublishOnly": "npm run typecheck && npm run lint && npm test && npm run build"
|
|
42
|
+
},
|
|
43
|
+
"publishConfig": {
|
|
44
|
+
"access": "public"
|
|
45
|
+
},
|
|
46
|
+
"keywords": [
|
|
47
|
+
"review",
|
|
48
|
+
"feedback",
|
|
49
|
+
"annotation",
|
|
50
|
+
"react",
|
|
51
|
+
"vite",
|
|
52
|
+
"nextjs"
|
|
53
|
+
],
|
|
54
|
+
"peerDependencies": {
|
|
55
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
56
|
+
"react-dom": "^18.0.0 || ^19.0.0"
|
|
57
|
+
},
|
|
58
|
+
"devDependencies": {
|
|
59
|
+
"@types/react": "^19.0.0",
|
|
60
|
+
"@types/react-dom": "^19.0.0",
|
|
61
|
+
"eslint": "^9.20.0",
|
|
62
|
+
"eslint-plugin-react-hooks": "^5.1.0",
|
|
63
|
+
"react": "^19.0.0",
|
|
64
|
+
"react-dom": "^19.0.0",
|
|
65
|
+
"tsup": "^8.3.6",
|
|
66
|
+
"typescript": "^5.7.3",
|
|
67
|
+
"typescript-eslint": "^8.24.0"
|
|
68
|
+
},
|
|
69
|
+
"bin": {
|
|
70
|
+
"reviewkit-emblema": "./cli/emblema-sync.mjs"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://review-kit.dev/schema/review-session.schema.json",
|
|
4
|
+
"title": "ReviewSession",
|
|
5
|
+
"description": "A review-kit feedback session: proposed changes recorded against a live site, never applied to it. Unknown fields and unknown item types are allowed everywhere (forward compatibility).",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["schemaVersion", "id", "createdAt", "updatedAt", "site", "author", "items"],
|
|
8
|
+
"additionalProperties": true,
|
|
9
|
+
"properties": {
|
|
10
|
+
"schemaVersion": { "type": "number", "const": 1 },
|
|
11
|
+
"id": { "type": "string", "minLength": 1 },
|
|
12
|
+
"createdAt": { "type": "string", "format": "date-time" },
|
|
13
|
+
"updatedAt": { "type": "string", "format": "date-time" },
|
|
14
|
+
"author": { "type": "string" },
|
|
15
|
+
"site": {
|
|
16
|
+
"type": "object",
|
|
17
|
+
"required": ["origin", "route", "viewport", "userAgent"],
|
|
18
|
+
"additionalProperties": true,
|
|
19
|
+
"properties": {
|
|
20
|
+
"origin": { "type": "string" },
|
|
21
|
+
"route": { "type": "string" },
|
|
22
|
+
"viewport": {
|
|
23
|
+
"type": "object",
|
|
24
|
+
"required": ["width", "height"],
|
|
25
|
+
"additionalProperties": true,
|
|
26
|
+
"properties": {
|
|
27
|
+
"width": { "type": "number" },
|
|
28
|
+
"height": { "type": "number" }
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"userAgent": { "type": "string" }
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"items": {
|
|
35
|
+
"type": "array",
|
|
36
|
+
"items": { "$ref": "#/definitions/reviewItem" }
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"definitions": {
|
|
40
|
+
"boundingBox": {
|
|
41
|
+
"type": "object",
|
|
42
|
+
"required": ["x", "y", "width", "height"],
|
|
43
|
+
"additionalProperties": true,
|
|
44
|
+
"properties": {
|
|
45
|
+
"x": { "type": "number" },
|
|
46
|
+
"y": { "type": "number" },
|
|
47
|
+
"width": { "type": "number" },
|
|
48
|
+
"height": { "type": "number" }
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"targetAttrs": {
|
|
52
|
+
"type": "object",
|
|
53
|
+
"additionalProperties": true,
|
|
54
|
+
"properties": {
|
|
55
|
+
"id": { "type": "string" },
|
|
56
|
+
"classList": { "type": "array", "items": { "type": "string" } },
|
|
57
|
+
"alt": { "type": "string" },
|
|
58
|
+
"src": { "type": "string" },
|
|
59
|
+
"href": { "type": "string" },
|
|
60
|
+
"ariaLabel": { "type": "string" },
|
|
61
|
+
"data": { "type": "object", "additionalProperties": { "type": "string" } }
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"target": {
|
|
65
|
+
"type": "object",
|
|
66
|
+
"required": ["selector", "tagName", "textSnippet", "attrs", "nthOfType", "boundingBox"],
|
|
67
|
+
"additionalProperties": true,
|
|
68
|
+
"properties": {
|
|
69
|
+
"selector": { "type": "string" },
|
|
70
|
+
"tagName": { "type": "string" },
|
|
71
|
+
"textSnippet": { "type": "string", "maxLength": 160 },
|
|
72
|
+
"attrs": { "$ref": "#/definitions/targetAttrs" },
|
|
73
|
+
"nthOfType": { "type": "array", "items": { "type": "integer", "minimum": 1 } },
|
|
74
|
+
"boundingBox": { "$ref": "#/definitions/boundingBox" },
|
|
75
|
+
"sourceFile": { "type": "string" },
|
|
76
|
+
"sourceLine": { "type": "integer" },
|
|
77
|
+
"anchor": {
|
|
78
|
+
"type": "object",
|
|
79
|
+
"required": ["ox", "oy"],
|
|
80
|
+
"additionalProperties": true,
|
|
81
|
+
"description": "Fractional point inside the element's box (0..1 each axis) this item refers to — used by cursor-placed comments.",
|
|
82
|
+
"properties": { "ox": { "type": "number" }, "oy": { "type": "number" } }
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"reviewItem": {
|
|
87
|
+
"type": "object",
|
|
88
|
+
"required": ["id", "createdAt", "type", "status", "route", "target", "priority"],
|
|
89
|
+
"additionalProperties": true,
|
|
90
|
+
"properties": {
|
|
91
|
+
"id": { "type": "string", "minLength": 1 },
|
|
92
|
+
"createdAt": { "type": "string", "format": "date-time" },
|
|
93
|
+
"author": {
|
|
94
|
+
"type": "object",
|
|
95
|
+
"required": ["id", "name"],
|
|
96
|
+
"additionalProperties": true,
|
|
97
|
+
"description": "Who created the item (additive since the first release; older sessions may lack it).",
|
|
98
|
+
"properties": {
|
|
99
|
+
"id": { "type": "string" },
|
|
100
|
+
"name": { "type": "string" },
|
|
101
|
+
"color": { "type": "string" }
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"type": { "type": "string", "minLength": 1 },
|
|
105
|
+
"status": { "enum": ["open", "accepted", "rejected", "applied"] },
|
|
106
|
+
"route": { "type": "string" },
|
|
107
|
+
"target": { "$ref": "#/definitions/target" },
|
|
108
|
+
"note": { "type": "string" },
|
|
109
|
+
"priority": { "enum": ["must", "nice"] },
|
|
110
|
+
"payload": {}
|
|
111
|
+
},
|
|
112
|
+
"allOf": [
|
|
113
|
+
{
|
|
114
|
+
"if": { "properties": { "type": { "const": "copy" } } },
|
|
115
|
+
"then": {
|
|
116
|
+
"properties": {
|
|
117
|
+
"payload": {
|
|
118
|
+
"type": "object",
|
|
119
|
+
"required": ["before", "after"],
|
|
120
|
+
"additionalProperties": true,
|
|
121
|
+
"properties": {
|
|
122
|
+
"before": { "type": "string" },
|
|
123
|
+
"after": { "type": "string" }
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"if": { "properties": { "type": { "const": "image" } } },
|
|
131
|
+
"then": {
|
|
132
|
+
"properties": {
|
|
133
|
+
"payload": {
|
|
134
|
+
"type": "object",
|
|
135
|
+
"required": ["beforeSrc"],
|
|
136
|
+
"additionalProperties": true,
|
|
137
|
+
"properties": {
|
|
138
|
+
"beforeSrc": { "type": "string", "description": "src of the image being replaced, at capture time." },
|
|
139
|
+
"afterSrc": {
|
|
140
|
+
"type": "string",
|
|
141
|
+
"format": "uri",
|
|
142
|
+
"description": "Replacement image by reference — an external URL that could not be (or was chosen not to be) embedded, e.g. when CORS blocks fetching or the file exceeds the embed cap. Mutually exclusive in practice with afterDataUrl."
|
|
143
|
+
},
|
|
144
|
+
"afterDataUrl": {
|
|
145
|
+
"type": "string",
|
|
146
|
+
"description": "Replacement image embedded inline as a data: URL (2 MB cap at capture)."
|
|
147
|
+
},
|
|
148
|
+
"description": { "type": "string" }
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"if": { "properties": { "type": { "const": "comment" } } },
|
|
156
|
+
"then": {
|
|
157
|
+
"properties": {
|
|
158
|
+
"payload": {
|
|
159
|
+
"type": "object",
|
|
160
|
+
"required": ["text"],
|
|
161
|
+
"additionalProperties": true,
|
|
162
|
+
"properties": { "text": { "type": "string" } }
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"if": { "properties": { "type": { "const": "delete" } } },
|
|
169
|
+
"then": {
|
|
170
|
+
"properties": {
|
|
171
|
+
"payload": {
|
|
172
|
+
"type": "object",
|
|
173
|
+
"additionalProperties": true,
|
|
174
|
+
"properties": { "reason": { "type": "string" } }
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"if": { "properties": { "type": { "const": "move" } } },
|
|
181
|
+
"then": {
|
|
182
|
+
"properties": {
|
|
183
|
+
"payload": {
|
|
184
|
+
"type": "object",
|
|
185
|
+
"additionalProperties": true,
|
|
186
|
+
"properties": {
|
|
187
|
+
"direction": { "enum": ["up", "down", "first", "last"] },
|
|
188
|
+
"targetDescription": { "type": "string" }
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"if": { "properties": { "type": { "const": "style" } } },
|
|
196
|
+
"then": {
|
|
197
|
+
"properties": {
|
|
198
|
+
"payload": {
|
|
199
|
+
"type": "object",
|
|
200
|
+
"required": ["description"],
|
|
201
|
+
"additionalProperties": true,
|
|
202
|
+
"properties": { "description": { "type": "string" } }
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
]
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|