textbrowser 0.45.1 → 0.46.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/.eslintrc.cjs CHANGED
@@ -7,6 +7,9 @@ module.exports = {
7
7
  requireConfigFile: false
8
8
  },
9
9
  settings: {
10
+ jsdoc: {
11
+ mode: 'typescript'
12
+ },
10
13
  polyfills: [
11
14
  'Array.isArray',
12
15
  'Blob',
package/CHANGES.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # CHANGES to `textbrowser`
2
2
 
3
+ ## 0.46.0
4
+
5
+ - BREAKING chore: require Node 14.19.1+
6
+ - feat: routine to utilize updated `json-refs`
7
+ - feat: `imf` -> `intl-dom`
8
+ - refactor: linting/TS fixes
9
+ - chore: update babel/core, indexeddbshim, jsdom, babel/core deps.
10
+ - chore: update devDeps.
11
+
12
+ ## 0.45.2
13
+
14
+ - fix: issue with `next`
15
+
3
16
  ## 0.45.1
4
17
 
5
18
  - fix: issue with `next`
package/README.md CHANGED
@@ -6,7 +6,9 @@ potentially intimidating to those unfamiliar with how to work it. There are
6
6
  also some bugs to iron out such as with localization.*
7
7
 
8
8
  See the [web app within an app using TextBrowser](https://bahai-browser.org/)
9
- or see some videos [introducing the app](https://bahai-library.com/zamir_textbrowser_bahaiwritings_browser).
9
+ or see some videos [introducing the app](https://bahai-library.com/zamir_textbrowser_bahaiwritings_browser). For use with [shortcuts](https://bahai-library.com/zamir_efficient_searches_shortcuts),
10
+ see the [video](https://bahai-library.com/zamir/shortcuts/Efficient-Searches-and-Shortcuts-5-SD-480p.webm)
11
+ at 5:25.
10
12
 
11
13
  *TextBrowser* supports power-user browsing of arbitrary multi-linear
12
14
  texts following the "offline first" motto.
@@ -567,7 +569,7 @@ methods.
567
569
  the plug-in (from `files.json`). `applicableFieldLang` is the default
568
570
  lang when there is no target language or plugin lang; it is the `lang`
569
571
  of the applicable field.
570
- - `getFieldAliasOrName({locales, lf, targetLanguage, applicableField, applicableFieldI18N, meta, metaApplicableField, targetLanguageI18N})` -
572
+ - `getFieldAliasOrName({locales, workI18n, targetLanguage, applicableField, applicableFieldI18N, meta, metaApplicableField, targetLanguageI18N})` -
571
573
  Called for each plug-in (after `getTargetLanguage`). Sets the `fieldInfo`
572
574
  `fieldAliasOrName` which is used for labeling the field. Besides
573
575
  properties shared with other methods, `getFieldAliasOrName` is passed
@@ -575,8 +577,8 @@ methods.
575
577
  - `locales` - The app `lang` array (URL-specified `lang` languages or
576
578
  fallback-specified ones from `navigator.languages` that are
577
579
  supported by the app)
578
- - `lf` - An [imf](https://github.com/brettz9/imf) locale formatter based
579
- on `files.json` locale strings.
580
+ - `workI18n` - An [intl-dom](https://github.com/brettz9/intl-dom) locale
581
+ formatter based on `files.json` locale strings.
580
582
  - `applicableFieldI18N` - The localized metadata `fieldnames` `applicableField`
581
583
  - `targetLanguageI18N` - The localized name of `targetLanguage`
582
584
  - `targetLanguage` - The result of `getTargetLanguage` (or the
@@ -745,9 +747,6 @@ it supports the following arguments:
745
747
 
746
748
  ## To-dos (Highest priority)
747
749
 
748
- 1. Document and add **screen-casts** along with one for developers showing
749
- JSON format, metadata, and schemas); also use with shortcuts (including
750
- Bahá'í Library Online ones)
751
750
  1. Progressive web app? / Electron?
752
751
  1. Adapt approach of <https://suttacentral.net/offline> in providing form for
753
752
  choice of items to offline (also add to individual work pages).
@@ -758,15 +757,15 @@ it supports the following arguments:
758
757
  1. Also have `&checked1=Yes` omitted when generating results display
759
758
  (since now defaulting to this)
760
759
  1. Drop unused fields in URL by default
761
- 1. Switch from IMF i18n to [intl-dom](https://github.com/brettz9/intl-dom) and
762
- as needed [i18nizeElement](https://github.com/brettz9/i18nizeElement)
763
760
  1. Ensure works with `pnpm` in all environments (didn't work when deployed,
764
761
  but would need to recall the problem and resolve)
765
- 1. Simplify `languages.json` by using `Intl.DisplayNames` (`type: 'language'`)
766
- to localize language names (and can avoid direction if
762
+ 1. Waiting: Avoid `rtl-detect` if
767
763
  [intl-locale-info proposal](https://github.com/tc39/proposal-intl-locale-info)
768
- is implemented); consider using with plugins so can, e.g., show language
769
- visibly into which a targeted content language field was translated
764
+ gets implemented)
765
+ 1. [`navigator.storage.estimate`](https://developers.google.com/web/updates/2017/08/estimating-available-storage-space)
766
+ 1. Consider using `Intl.DisplayNames` (`type: 'language'`) with plugins so
767
+ can, e.g., show language visibly into which a targeted content language
768
+ field was translated? Avoid need for `languages.json` codes and directions?
770
769
  1. For plugins, allow export of `stylesheets` array to add to
771
770
  `loadStylesheets`, so they don't have to do the importing and executing.
772
771
  1. **Progress meter** with hidden console to avoid intimidating loading
@@ -1120,8 +1119,13 @@ it supports the following arguments:
1120
1119
 
1121
1120
  ## To-dos (Lower priority)
1122
1121
 
1123
- 1. Waiting: Avoid superagent warning:
1124
- <https://github.com/whitlockjc/path-loader/issues/17>
1122
+ 1. Use or publish [rollup-plugin-postprocess](git+https://github.com/brettz9/rollup-plugin-postprocess.git#update)
1123
+ as stable version?
1124
+ 1. Check if still getting superagent warning:
1125
+ <https://github.com/whitlockjc/path-loader/issues/17> (if `json-refs` can
1126
+ be updated to stable version)
1127
+ 1. Use [i18nizeElement](https://github.com/brettz9/i18nizeElement)? (probably
1128
+ not as need RTL detection for more than setting on element)
1125
1129
  1. **Remember columns enabled**, etc. since last visit, and/or saved as
1126
1130
  preferences.
1127
1131
  1. Allow copy-pasting a search as a custom web protocol (make