textbrowser 0.39.0 → 0.40.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/.eslintrc.js +2 -0
- package/.ncurc.js +8 -0
- package/CHANGES.md +32 -0
- package/README.md +21 -16
- package/dist/WorkInfo-es.js +4659 -0
- package/dist/activateCallback-es.js +158 -0
- package/dist/index-es.js +83 -85
- package/dist/index-es.min.js +1 -1
- package/dist/index-umd.js +84 -86
- package/dist/index-umd.min.js +1 -1
- package/package.json +44 -44
- package/resources/index.js +1 -1
- package/resources/utils/Metadata.js +6 -1
- package/resources/utils/ServiceWorker.js +3 -1
- package/resources/workDisplay.js +0 -1
- package/server/main-cjs.js +186 -26
- package/server/main.js +1 -3
- package/sw-sample.js +17 -24
- package/.remarkrc +0 -11
- package/dist/WorkInfo-umd.js +0 -4666
- package/dist/activateCallback-umd.js +0 -166
package/.eslintrc.js
CHANGED
|
@@ -15,6 +15,7 @@ module.exports = {
|
|
|
15
15
|
'document.dir',
|
|
16
16
|
'document.querySelector',
|
|
17
17
|
'document.querySelectorAll',
|
|
18
|
+
'document.title',
|
|
18
19
|
'DOMParser',
|
|
19
20
|
'Error',
|
|
20
21
|
'fetch',
|
|
@@ -54,6 +55,7 @@ module.exports = {
|
|
|
54
55
|
}, {
|
|
55
56
|
files: ['sw-sample.js'],
|
|
56
57
|
rules: {
|
|
58
|
+
'import/no-unresolved': 0,
|
|
57
59
|
'import/unambiguous': 0,
|
|
58
60
|
strict: 0
|
|
59
61
|
}
|
package/.ncurc.js
ADDED
package/CHANGES.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# textbrowser CHANGES
|
|
2
2
|
|
|
3
|
+
## 0.40.3
|
|
4
|
+
|
|
5
|
+
### User-facing
|
|
6
|
+
|
|
7
|
+
- fix: clear out extra query string, e.g., from Facebook when querying for
|
|
8
|
+
metadata file
|
|
9
|
+
- chore: update deps.
|
|
10
|
+
|
|
11
|
+
### Dev-facing
|
|
12
|
+
|
|
13
|
+
- chore: lint and add ncurc.js
|
|
14
|
+
- chore: update devDeps.
|
|
15
|
+
|
|
16
|
+
## 0.40.2
|
|
17
|
+
|
|
18
|
+
- Fix: Add ESM `dist` versions for `activateCallback` and `WorkInfo`
|
|
19
|
+
|
|
20
|
+
## 0.40.1
|
|
21
|
+
|
|
22
|
+
- npm: Bump `indexeddbshim`
|
|
23
|
+
|
|
24
|
+
## 0.40.0
|
|
25
|
+
|
|
26
|
+
### User-facing
|
|
27
|
+
|
|
28
|
+
- Breaking change: Switch to ESM for service worker; remove CJS dependencies
|
|
29
|
+
- npm: Update `@babel/core` (patch), `@babel/register` (minor)
|
|
30
|
+
|
|
31
|
+
### Dev-facing
|
|
32
|
+
|
|
33
|
+
- npm: Update devDeps.
|
|
34
|
+
|
|
3
35
|
## 0.39.0
|
|
4
36
|
|
|
5
37
|
### User-facing
|
package/README.md
CHANGED
|
@@ -736,6 +736,11 @@ it supports the following arguments:
|
|
|
736
736
|
|
|
737
737
|
## To-dos (Highest priority)
|
|
738
738
|
|
|
739
|
+
1. Document and add **screen-casts** along with one for developers showing
|
|
740
|
+
JSON format, metadata, and schemas); also use with shortcuts (including
|
|
741
|
+
Bahá'í Library Online ones)
|
|
742
|
+
1. Fix so as to ignore other items of query string such as `?fbclid=...`
|
|
743
|
+
from Facebook.
|
|
739
744
|
0. Progressive web app? / Electron?
|
|
740
745
|
1. Adapt approach of <https://suttacentral.net/offline> in providing form for
|
|
741
746
|
choice of items to offline (also add to individual work pages).
|
|
@@ -751,12 +756,10 @@ it supports the following arguments:
|
|
|
751
756
|
1. Ensure works with `pnpm` in all environments (didn't work when deployed,
|
|
752
757
|
but would need to recall the problem and resolve)
|
|
753
758
|
1. Simplify `languages.json` by using `Intl.DisplayNames` (`type: 'language'`)
|
|
754
|
-
to localize language names (and can avoid direction if
|
|
755
|
-
|
|
759
|
+
to localize language names (and can avoid direction if
|
|
760
|
+
[intl-locale-info proposal](https://github.com/tc39/proposal-intl-locale-info)
|
|
761
|
+
is implemented); consider using with plugins so can, e.g., show language
|
|
756
762
|
visibly into which a targeted content language field was translated
|
|
757
|
-
1. Document and add screen-casts along with one for developers showing
|
|
758
|
-
JSON format, metadata, and schemas); also use with shortcuts (including
|
|
759
|
-
Bahá'í Library Online ones)
|
|
760
763
|
1. For plugins, allow export of `stylesheets` array to add to
|
|
761
764
|
`loadStylesheets`, so they don't have to do the importing and executing.
|
|
762
765
|
1. **Progress meter** with hidden console to avoid intimidating loading
|
|
@@ -777,7 +780,7 @@ it supports the following arguments:
|
|
|
777
780
|
1. Fix limitation that 0's don't change to 1's if
|
|
778
781
|
not present as a minimum (e.g., if no 0 for Chapter
|
|
779
782
|
number, then won't show anything).
|
|
780
|
-
1. Avoid need for separate
|
|
783
|
+
1. Avoid need for separate `<work name>-startEnd` for browse set;
|
|
781
784
|
e.g., parse Rodwell or Sale?
|
|
782
785
|
1. Ideally work across even book
|
|
783
786
|
1. Support anchor portion (e.g., `1:2:3-1:2:5#1:2:4`)
|
|
@@ -785,6 +788,7 @@ it supports the following arguments:
|
|
|
785
788
|
`activateCallback.js`
|
|
786
789
|
1. Have **IndexedDB handle all pages** language select, work select, and
|
|
787
790
|
work display be part of too?
|
|
791
|
+
1. `indexedDB` for JSON data
|
|
788
792
|
1. **Node.js** (or PHP?)
|
|
789
793
|
1. Delivery of HTML content by same URL so third parties can
|
|
790
794
|
consume without JavaScript and optimized when not offline
|
|
@@ -910,7 +914,9 @@ it supports the following arguments:
|
|
|
910
914
|
and/or syntax (generic to *TextBrowser* and/or canonical, ideally
|
|
911
915
|
human-readable based on JSON-supplied information; e.g., for the
|
|
912
916
|
Bible, `Matt. 5:10-12`); use with `postMessage` to-do to supply
|
|
913
|
-
syntax back to another site
|
|
917
|
+
syntax back to another site; see
|
|
918
|
+
[Scroll To Text fragment](https://wicg.github.io/ScrollToTextFragment/);
|
|
919
|
+
[Stack answer](https://stackoverflow.com/a/62162093/271577)
|
|
914
920
|
1. Correct any field easily by links within TB to editing interface
|
|
915
921
|
1. Add an "overlay" column like interlinear, but which overlays by
|
|
916
922
|
tooltip if any data is present; can also use metadata if the
|
|
@@ -966,11 +972,13 @@ it supports the following arguments:
|
|
|
966
972
|
<https://github.com/json-schema-org/json-schema-spec/issues/587#issuecomment-389726603>
|
|
967
973
|
by using initial `$`?
|
|
968
974
|
1. Find way to avoid need for `!important` in column CSS
|
|
969
|
-
1.
|
|
975
|
+
1. Redirect automatically by accepted language, though have a link or
|
|
976
|
+
preference to change the default
|
|
977
|
+
1. Offer more **border styling** tuning controls (including right/left/top/bottom,
|
|
970
978
|
color, etc.); then offer this along with other styles if we replace CSS
|
|
971
979
|
input box with pop-up styling form (like Advanced Formatting, but for columns)
|
|
972
|
-
1. Refactoring: Try to use `deserialize` of `form-serialization` fork for
|
|
973
|
-
or hash change?
|
|
980
|
+
1. Refactoring: Try to use `deserialize` of `form-serialization` fork for
|
|
981
|
+
initial population or hash change? (if not `FormData`)
|
|
974
982
|
1. We should try to allow `onByDefault` and `placement` for non-plugin
|
|
975
983
|
fields also
|
|
976
984
|
1. [ES6 Modules in browser](https://jakearchibald.com/2017/es-modules-in-browsers/):
|
|
@@ -1044,8 +1052,8 @@ it supports the following arguments:
|
|
|
1044
1052
|
with multiselect
|
|
1045
1053
|
1. Preview styling changes (or move all controls to results page for
|
|
1046
1054
|
immediate real feedback)
|
|
1047
|
-
1. Separate formatting within Jamilih code to CSS; unit test and
|
|
1048
|
-
by being able to use a natively stringifying version of Jamilih
|
|
1055
|
+
1. Separate **formatting within Jamilih code** to CSS; unit test and
|
|
1056
|
+
performance by being able to use a natively stringifying version of Jamilih
|
|
1049
1057
|
(once complete)
|
|
1050
1058
|
1. Utilize meta-data properties, `primary_text_field`, `orig_lang_field`,
|
|
1051
1059
|
`orig_langs`, e.g., to allow for user to display main language and
|
|
@@ -1105,7 +1113,7 @@ it supports the following arguments:
|
|
|
1105
1113
|
|
|
1106
1114
|
1. Waiting: Avoid superagent warning:
|
|
1107
1115
|
<https://github.com/whitlockjc/path-loader/issues/17>
|
|
1108
|
-
1. Remember columns enabled
|
|
1116
|
+
1. **Remember columns enabled**, etc. since last visit, and/or saved as
|
|
1109
1117
|
preferences.
|
|
1110
1118
|
1. Allow copy-pasting a search as a custom web protocol (make
|
|
1111
1119
|
site-configurable), e.g., to support `web+bahaiwritings:` links per
|
|
@@ -1124,8 +1132,6 @@ it supports the following arguments:
|
|
|
1124
1132
|
1. Preference to remember enabled checkboxes and formatting
|
|
1125
1133
|
1. Change to utilize history.pushState?
|
|
1126
1134
|
<https://developer.mozilla.org/en-US/docs/Web/API/History_API>
|
|
1127
|
-
1. Use ES6 modules (babel)
|
|
1128
|
-
1. dynamic or hierarchical loading of CSS too?
|
|
1129
1135
|
1. Sort file selection listing per locale?
|
|
1130
1136
|
1. Node.js synchronization of locale files?
|
|
1131
1137
|
1. Could allow Node to built schemas, optionally allowing or disallowing
|
|
@@ -1142,7 +1148,6 @@ it supports the following arguments:
|
|
|
1142
1148
|
the i18n of "lang"?).
|
|
1143
1149
|
1. `window.postMessage` API (since CORS is only for Ajax and
|
|
1144
1150
|
`document.domain` is only for subdomains).
|
|
1145
|
-
1. `indexedDB` for JSON data
|
|
1146
1151
|
1. Restore `tabindex` usage
|
|
1147
1152
|
1. Restore option from work page to have a checkbox on whether to go to
|
|
1148
1153
|
"Advanced mode", opening the styling options by default or not.
|