@makefully/notefully 0.2.15 → 0.2.17

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 CHANGED
@@ -125,6 +125,27 @@ Unknown keys are ignored and warned in the console. Identity is attached to each
125
125
 
126
126
  When any identify field is set, the widget hides the Author input and uses that identity as the reporter (`displayName`, else `email`, else `userId`). Without `identify()`, the Author field stays visible (prefilled from `localStorage`) so guests can name themselves.
127
127
 
128
+ ### Diagnostic fields
129
+
130
+ Each report attaches auto-collected diagnostics (`url`, `title`, `userAgent`, `os`, `browser`, `language`, `timezone`, `viewport`, `screen`, `user`). Hosts can add more — or overwrite those builtins — via `init({ fields })` and `setField` / `setFields`. Custom fields appear in the privacy redact panel and in the submitted `context` payload alongside the builtins.
131
+
132
+ ```js
133
+ Notefully.init({
134
+ // …
135
+ fields: {
136
+ platform: 'web',
137
+ // Or with an explicit redact/tracker label:
138
+ build: { value: '42', label: 'Build' }
139
+ }
140
+ });
141
+
142
+ Notefully.setField('platform', 'steam');
143
+ Notefully.setFields({ channel: 'beta', experiment: { value: 'A', label: 'Experiment' } });
144
+ Notefully.clearFields(); // host fields only; auto diagnostics still apply
145
+ ```
146
+
147
+ Reserved keys (`console`, `author`, `screenshotMeta`, `screenshotError`) cannot be set as fields.
148
+
128
149
  ### Report kinds
129
150
 
130
151
  By default the dialog offers **Bug**, **Idea**, and **Other**. Pass `kinds` to replace that list entirely: