@makefully/notefully 0.1.60 → 0.2.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 +18 -1
- package/dist/notefully.iife.js +41 -41
- package/dist/notefully.js +3646 -1184
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -34,11 +34,16 @@ Notefully.init({
|
|
|
34
34
|
// Pause host shortcuts / game input while the dialog is open:
|
|
35
35
|
// onOpen: () => engine.pauseInput(),
|
|
36
36
|
// onClose: () => engine.resumeInput(),
|
|
37
|
+
// Locale (BCP 47 / browser tags). Default: options.locale → <html lang> → navigator.language → en-US
|
|
38
|
+
// locale: 'fr',
|
|
39
|
+
// Optional per-key overlays on top of shipped catalogs:
|
|
40
|
+
// translations: { 'form.submit': 'Envoyer' },
|
|
37
41
|
});
|
|
38
42
|
|
|
39
43
|
// Notefully.isOpen() — true from open() start until close() (incl. capture / sticky success)
|
|
44
|
+
// Notefully.getLocale() / Notefully.setLocale('de') — change UI language at runtime
|
|
40
45
|
|
|
41
|
-
// Update settings later without remounting (theme, hideLauncher, video, …):
|
|
46
|
+
// Update settings later without remounting (theme, hideLauncher, video, locale, …):
|
|
42
47
|
Notefully.configure({ theme: 'quiet-night' });
|
|
43
48
|
Notefully.setTheme('all-business');
|
|
44
49
|
Notefully.setVisible(false); // hides launcher and closes an open dialog
|
|
@@ -69,6 +74,18 @@ Or via the IIFE build:
|
|
|
69
74
|
Bundlers should prefer the package export `import '@makefully/notefully/notefully.css'` (see Embed above). The `dist/` path is for static / IIFE hosts.
|
|
70
75
|
With `hideLauncher: true`, call `Notefully.open()` / `Notefully.submit()` from your own UI.
|
|
71
76
|
|
|
77
|
+
### Localization
|
|
78
|
+
|
|
79
|
+
The widget ships its own UI catalogs (BCP 47 tags such as `en-US`, `fr`, `nb`, `fil`, `zh-CN`, `es-419`, …). Pass `locale` on `init` / `configure`, or call `Notefully.setLocale('ja')`. Resolution falls back by tag (`fr-CA` → `fr` → `en-US`). Custom `kinds` labels stay host-owned; default Bug / Idea / Other labels follow the active catalog. Report bodies, logs, and diagnostic *values* are never translated.
|
|
80
|
+
|
|
81
|
+
Regenerate catalogs via [Dutifully](https://www.npmjs.com/package/@makefully/dutifully) → Cheerfully (`format: "catalog"` in `cheerfully.json`) when you change English copy:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
# Needs ./env-cheerfully.json (gitignored). First run copies from Entanglement if present.
|
|
85
|
+
# Or copy env-cheerfully.json.example and set accessToken / server.
|
|
86
|
+
npm run translate:locales
|
|
87
|
+
```
|
|
88
|
+
|
|
72
89
|
### Screenshots
|
|
73
90
|
|
|
74
91
|
On open, Notefully captures the page automatically: optional `onBeforeCapture` / `capture` hooks first, then a canvas-aware DOM rasterize sized to the viewport (so absolutely positioned apps still capture). Empty results are treated as no screenshot—markup tools stay hidden and the camera **Recapture** control sits beside the mic. With a shot, **Discard** and **Recapture** sit on the far right of the edit tools. Recapture hides the dialog and tries the browser share picker (`getDisplayMedia`); if that fails or is cancelled, it falls back to the automatic path.
|