visual-feedback 0.3.1 → 0.3.3
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/CHANGELOG.md +13 -0
- package/README.md +2 -0
- package/dist/index.mjs +1 -1
- package/dist/react.mjs +1 -1
- package/dist/{widget-Ryu07XUU.mjs → widget-IwlLFJCu.mjs} +4 -7
- package/docs/SPEC.md +5 -4
- package/docs/THEMING.md +1 -1
- package/package.json +2 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.3 (2026-10-13)
|
|
4
|
+
|
|
5
|
+
- The trigger stands out more: a swirl icon that fills it, in place of the speech bubble, ringed
|
|
6
|
+
by a 1px border in the same colour (`--vf-text`). With `triggerText`, the icon stays small
|
|
7
|
+
beside the label.
|
|
8
|
+
- The demo site shows a "Click here" hint at the trigger, and its thumbnails rest at 20% colour and
|
|
9
|
+
fade to full colour on hover.
|
|
10
|
+
|
|
11
|
+
## 0.3.2 (2026-10-13)
|
|
12
|
+
|
|
13
|
+
- The README links a live demo: the playground on GitHub Pages, at
|
|
14
|
+
https://dorumrr.github.io/visual-feedback/. The widget itself is unchanged.
|
|
15
|
+
|
|
3
16
|
## 0.3.1 (2026-10-12)
|
|
4
17
|
|
|
5
18
|
- The trigger shows its name as a tooltip. With a `shortcut` set, the tooltip names it too, the way
|
package/README.md
CHANGED
|
@@ -4,6 +4,8 @@ A small button lets your users screenshot the page, mark it up and write a note.
|
|
|
4
4
|
report and store it where you want. It has no service, no tracking and no global CSS, and it fits
|
|
5
5
|
any design.
|
|
6
6
|
|
|
7
|
+
**Try it [here](https://dorumrr.github.io/visual-feedback/)**. A report you send stays in the page, as the site's own list.
|
|
8
|
+
|
|
7
9
|

|
|
8
10
|
|
|
9
11
|
```sh
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
export { t as createFeedback, n as discardDraft } from "./widget-
|
|
2
|
+
export { t as createFeedback, n as discardDraft } from "./widget-IwlLFJCu.mjs";
|
package/dist/react.mjs
CHANGED
|
@@ -164,21 +164,18 @@ function sheet(text) {
|
|
|
164
164
|
function variables() {
|
|
165
165
|
return `.vf{--_r:var(--vf-radius,var(--_pr,16px));--_s:var(--vf-surface,var(--_ps,Canvas));--_t:var(--vf-text,var(--_pt,CanvasText));--_m:var(--vf-muted,var(--_pm,color-mix(in srgb,var(--_t) 60%,transparent)));--_b:var(--vf-border,color-mix(in srgb,var(--_t) 15%,transparent));--_a:var(--vf-accent,var(--_pa,${CSS.supports("color", "AccentColor") ? "AccentColor" : "#0b57d0"}));--_at:var(--vf-accent-text,#fff);--_f:var(--vf-focus,var(--_a));--_mark:var(--vf-mark,#e5243b);--_bd:var(--vf-backdrop,rgb(0 0 0/45%));--_sh:var(--vf-shadow,0 12px 32px -12px rgb(0 0 0/35%));--_size:var(--vf-trigger-size,2.5em);--_off:var(--vf-offset,16px);--_z:var(--vf-z,2147483000)}`;
|
|
166
166
|
}
|
|
167
|
-
const LAYOUT = `.vf{display:contents;font-family:var(--vf-font,inherit);color-scheme:light dark}.trigger{font:inherit;position:fixed;z-index:var(--_z);box-sizing:border-box;height:var(--_size);margin:0;padding:0 14px 0 12px;display:flex;align-items:center;gap:8px;white-space:nowrap}.trigger[data-icon]{width:var(--_size);padding:0;justify-content:center}[data-y=bottom]{bottom:calc(var(--_off) + env(safe-area-inset-bottom,0px))}[data-y=top]{top:calc(var(--_off) + env(safe-area-inset-top,0px))}[data-x=right]{right:calc(var(--_off) + env(safe-area-inset-right,0px))}[data-x=left]{left:calc(var(--_off) + env(safe-area-inset-left,0px))}.trigger svg{width:1.15em;height:1.15em}.capturing,.capturing .backdrop{visibility:hidden}.still .trigger{transition:none!important}:focus-visible{outline:2px solid var(--_f);outline-offset:2px}@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}`;
|
|
168
|
-
const THEME = `.trigger{font-weight:600;border:1px solid var(--
|
|
167
|
+
const LAYOUT = `.vf{display:contents;font-family:var(--vf-font,inherit);color-scheme:light dark}.trigger{font:inherit;position:fixed;z-index:var(--_z);box-sizing:border-box;height:var(--_size);margin:0;padding:0 14px 0 12px;display:flex;align-items:center;gap:8px;white-space:nowrap}.trigger[data-icon]{width:var(--_size);padding:0;justify-content:center}.trigger[data-icon] svg{width:100%;height:100%}[data-y=bottom]{bottom:calc(var(--_off) + env(safe-area-inset-bottom,0px))}[data-y=top]{top:calc(var(--_off) + env(safe-area-inset-top,0px))}[data-x=right]{right:calc(var(--_off) + env(safe-area-inset-right,0px))}[data-x=left]{left:calc(var(--_off) + env(safe-area-inset-left,0px))}.trigger svg{width:1.15em;height:1.15em}.capturing,.capturing .backdrop{visibility:hidden}.still .trigger{transition:none!important}:focus-visible{outline:2px solid var(--_f);outline-offset:2px}@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}`;
|
|
168
|
+
const THEME = `.trigger{font-weight:600;border:1px solid var(--_t);border-radius:999px;background:var(--_s);color:var(--_t);box-shadow:var(--_sh);cursor:pointer;transition:background-color .15s}.trigger:hover{background:color-mix(in srgb,var(--_s) 90%,var(--_t))}`;
|
|
169
169
|
function icon() {
|
|
170
170
|
const svg = document.createElementNS(SVG, "svg");
|
|
171
171
|
const path = document.createElementNS(SVG, "path");
|
|
172
172
|
for (const [name, value] of Object.entries({
|
|
173
173
|
viewBox: "0 0 24 24",
|
|
174
174
|
"aria-hidden": "true",
|
|
175
|
-
fill: "
|
|
176
|
-
stroke: "currentColor",
|
|
177
|
-
"stroke-width": "2",
|
|
178
|
-
"stroke-linejoin": "round",
|
|
175
|
+
fill: "currentColor",
|
|
179
176
|
part: "trigger-icon"
|
|
180
177
|
})) svg.setAttribute(name, value);
|
|
181
|
-
path.setAttribute("d", "
|
|
178
|
+
path.setAttribute("d", "M12 12Q17.2 7.9 24 12L22.6 17.6Q16.2 11.6 12 12zM12 12Q18.1 14.5 18 22.4L12.4 24Q14.5 15.4 12 12zM12 12Q12.9 18.5 6 22.4L1.8 18.4Q10.3 15.8 12 12zM12 12Q6.8 16.1 0 12L1.4 6.4Q7.8 12.4 12 12zM12 12Q5.9 9.5 6 1.6L11.6 0Q9.5 8.6 12 12zM12 12Q11.1 5.5 18 1.6L22.2 5.6Q13.7 8.2 12 12z");
|
|
182
179
|
svg.append(path);
|
|
183
180
|
return svg;
|
|
184
181
|
}
|
package/docs/SPEC.md
CHANGED
|
@@ -49,10 +49,11 @@ annotating, draft --Cancel (it may ask first, below) / Discard--> idle
|
|
|
49
49
|
|
|
50
50
|
## 3. The trigger
|
|
51
51
|
- It is a small round button, 2.5em across by default (40 px on a 16 px site), in a corner
|
|
52
|
-
(`position`),
|
|
53
|
-
gets that short label beside
|
|
54
|
-
the name too. A host that sets both keeps `triggerText`
|
|
55
|
-
speech control can say what it sees. It has no badge, and it does not move
|
|
52
|
+
(`position`), filled by a swirl icon edged by a ring in the same colour, with the `trigger`
|
|
53
|
+
accessible name. A host that gives `triggerText` gets that short label beside a small icon, as a pill; with
|
|
54
|
+
only `triggerText` given, that text is the name too. A host that sets both keeps `triggerText`
|
|
55
|
+
inside `trigger`, so speech control can say what it sees. It has no badge, and it does not move
|
|
56
|
+
or pulse.
|
|
56
57
|
- Its tooltip (`title`) is its name, as for the dialog's icon buttons. With a `shortcut` that can
|
|
57
58
|
match, it is the name and the keys, each modifier once, joined by ` + `, as the platform's
|
|
58
59
|
keyboards name them: Option, Command, Control and Shift on a Mac, iPhone or iPad
|
package/docs/THEMING.md
CHANGED
|
@@ -40,7 +40,7 @@ Set these on `visual-feedback` (or on any ancestor). Custom properties cross the
|
|
|
40
40
|
| `--vf-font` | `inherit` | font family of all text, such as `Inter, sans-serif` |
|
|
41
41
|
| `--vf-radius` | from the page's button corners, so the widget's buttons match them up to 15px (this is 1.6 times theirs, up to `24px`), else `16px` | panel and composer, and a share of it for buttons and the image |
|
|
42
42
|
| `--vf-surface` | with `theme: "auto"` the page's background, else `Canvas` | panel, tool rail and composer background |
|
|
43
|
-
| `--vf-text` | with `theme: "auto"` the page's text colour, else `CanvasText` | text |
|
|
43
|
+
| `--vf-text` | with `theme: "auto"` the page's text colour, else `CanvasText` | text, and the trigger's icon and border |
|
|
44
44
|
| `--vf-muted` | text at 60%, more on a page whose text would make that too faint | hints, counters |
|
|
45
45
|
| `--vf-border` | text at 15% | hairlines |
|
|
46
46
|
| `--vf-accent` | the page's accent, else `AccentColor`, or `#0b57d0` where the browser has no `AccentColor` | Send button and its menu button, "Capture this view", active tool, chosen screenshot |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "visual-feedback",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"description": "A small button lets your users screenshot the page, mark it up and write a note. You receive one report and store it where you want.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"feedback",
|
|
@@ -66,13 +66,13 @@
|
|
|
66
66
|
"prepack": "npm run --silent build -- --logLevel warn",
|
|
67
67
|
"dev": "node tests/dev.mjs",
|
|
68
68
|
"demo": "node tests/demo.mjs",
|
|
69
|
+
"site": "node tests/site.mjs",
|
|
69
70
|
"release": "node tests/release.mjs"
|
|
70
71
|
},
|
|
71
72
|
"devDependencies": {
|
|
72
73
|
"@axe-core/playwright": "^4.13.0",
|
|
73
74
|
"@biomejs/biome": "^2.5.15",
|
|
74
75
|
"@electric-sql/pglite": "0.5.8",
|
|
75
|
-
"@electric-sql/pglite-socket": "^0.2.11",
|
|
76
76
|
"@playwright/test": "^1.64.0",
|
|
77
77
|
"@size-limit/preset-small-lib": "^14.2.0",
|
|
78
78
|
"@supabase/supabase-js": "^2.117.3",
|
|
@@ -80,7 +80,6 @@
|
|
|
80
80
|
"@types/react": "^19.3.0",
|
|
81
81
|
"aws4fetch": "^1.0.20",
|
|
82
82
|
"next": "^16.4.0",
|
|
83
|
-
"postgres": "^3.4.9",
|
|
84
83
|
"publint": "^0.3.25",
|
|
85
84
|
"react": "^19.3.0",
|
|
86
85
|
"react-dom": "^19.3.0",
|