textbrowser 0.40.1 → 0.41.1
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/.editorconfig +3 -0
- package/.eslintrc.js +1 -0
- package/.ncurc.js +8 -0
- package/CHANGES.md +31 -0
- package/README.md +27 -17
- package/dist/WorkInfo-es.js +4659 -0
- package/dist/activateCallback-es.js +158 -0
- package/dist/index-es.js +105 -157
- package/dist/index-es.min.js +2 -2
- package/dist/index-umd.js +106 -158
- package/dist/index-umd.min.js +2 -2
- package/general-schemas/array-of-arrays.jsonschema +11 -1
- package/general-schemas/table.jsonschema +29 -1
- package/package.json +31 -31
- package/resources/index.js +6 -3
- package/resources/templates/workDisplay.js +7 -82
- package/resources/utils/Metadata.js +6 -1
- package/resources/workDisplay.js +3 -2
- package/server/main-cjs.js +31 -92
- package/site.json +3 -0
- package/sw-sample.js +19 -18
package/.editorconfig
CHANGED
package/.eslintrc.js
CHANGED
package/.ncurc.js
ADDED
package/CHANGES.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# textbrowser CHANGES
|
|
2
2
|
|
|
3
|
+
## 0.41.1
|
|
4
|
+
|
|
5
|
+
- fix: fix dialog polyfill CSS link
|
|
6
|
+
- refactor: make array-of-arrays schema more precise
|
|
7
|
+
- refactor: make table.jsonschema more precise
|
|
8
|
+
- refactor: drop redundant locale file listing in sample service worker
|
|
9
|
+
- chore: update `.editorconfig`, devDeps. and deps. (babel-related,
|
|
10
|
+
`command-line-args`)
|
|
11
|
+
|
|
12
|
+
## 0.41.0
|
|
13
|
+
|
|
14
|
+
- feat: factor out undocumented Bahá'í Writings-specific bookmark generator
|
|
15
|
+
to new generic `preferencesPlugin` option
|
|
16
|
+
|
|
17
|
+
## 0.40.3
|
|
18
|
+
|
|
19
|
+
### User-facing
|
|
20
|
+
|
|
21
|
+
- fix: clear out extra query string, e.g., from Facebook when querying for
|
|
22
|
+
metadata file
|
|
23
|
+
- chore: update deps.
|
|
24
|
+
|
|
25
|
+
### Dev-facing
|
|
26
|
+
|
|
27
|
+
- chore: lint and add ncurc.js
|
|
28
|
+
- chore: update devDeps.
|
|
29
|
+
|
|
30
|
+
## 0.40.2
|
|
31
|
+
|
|
32
|
+
- Fix: Add ESM `dist` versions for `activateCallback` and `WorkInfo`
|
|
33
|
+
|
|
3
34
|
## 0.40.1
|
|
4
35
|
|
|
5
36
|
- npm: Bump `indexeddbshim`
|
package/README.md
CHANGED
|
@@ -680,6 +680,11 @@ as a `npm` dependency).
|
|
|
680
680
|
This section might be changed to a plugin in the future in which case
|
|
681
681
|
you'd just avoid designating it within `files.json`.
|
|
682
682
|
|
|
683
|
+
- `preferencesPlugin` - A function to be passed the following arguments
|
|
684
|
+
and to return a Jamilih array: `$`, `l`, `jml`, `paramsSetter`,
|
|
685
|
+
`getDataForSerializingParamsAsURL`, `work`, `replaceHash`,
|
|
686
|
+
`getFieldAliasOrNames`
|
|
687
|
+
|
|
683
688
|
- `interlinearSeparator` - HTML code to be injected between each
|
|
684
689
|
interlinear entry; this is not exposed to the user for
|
|
685
690
|
security reasons (preventing [cross-site scripting](https://en.wikipedia.org/wiki/Cross-site_scripting)
|
|
@@ -736,7 +741,10 @@ it supports the following arguments:
|
|
|
736
741
|
|
|
737
742
|
## To-dos (Highest priority)
|
|
738
743
|
|
|
739
|
-
|
|
744
|
+
1. Document and add **screen-casts** along with one for developers showing
|
|
745
|
+
JSON format, metadata, and schemas); also use with shortcuts (including
|
|
746
|
+
Bahá'í Library Online ones)
|
|
747
|
+
1. Progressive web app? / Electron?
|
|
740
748
|
1. Adapt approach of <https://suttacentral.net/offline> in providing form for
|
|
741
749
|
choice of items to offline (also add to individual work pages).
|
|
742
750
|
1. Mention idea that it works offline
|
|
@@ -751,12 +759,10 @@ it supports the following arguments:
|
|
|
751
759
|
1. Ensure works with `pnpm` in all environments (didn't work when deployed,
|
|
752
760
|
but would need to recall the problem and resolve)
|
|
753
761
|
1. Simplify `languages.json` by using `Intl.DisplayNames` (`type: 'language'`)
|
|
754
|
-
to localize language names (and can avoid direction if
|
|
755
|
-
|
|
762
|
+
to localize language names (and can avoid direction if
|
|
763
|
+
[intl-locale-info proposal](https://github.com/tc39/proposal-intl-locale-info)
|
|
764
|
+
is implemented); consider using with plugins so can, e.g., show language
|
|
756
765
|
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
766
|
1. For plugins, allow export of `stylesheets` array to add to
|
|
761
767
|
`loadStylesheets`, so they don't have to do the importing and executing.
|
|
762
768
|
1. **Progress meter** with hidden console to avoid intimidating loading
|
|
@@ -777,7 +783,7 @@ it supports the following arguments:
|
|
|
777
783
|
1. Fix limitation that 0's don't change to 1's if
|
|
778
784
|
not present as a minimum (e.g., if no 0 for Chapter
|
|
779
785
|
number, then won't show anything).
|
|
780
|
-
1. Avoid need for separate
|
|
786
|
+
1. Avoid need for separate `<work name>-startEnd` for browse set;
|
|
781
787
|
e.g., parse Rodwell or Sale?
|
|
782
788
|
1. Ideally work across even book
|
|
783
789
|
1. Support anchor portion (e.g., `1:2:3-1:2:5#1:2:4`)
|
|
@@ -785,6 +791,7 @@ it supports the following arguments:
|
|
|
785
791
|
`activateCallback.js`
|
|
786
792
|
1. Have **IndexedDB handle all pages** language select, work select, and
|
|
787
793
|
work display be part of too?
|
|
794
|
+
1. `indexedDB` for JSON data
|
|
788
795
|
1. **Node.js** (or PHP?)
|
|
789
796
|
1. Delivery of HTML content by same URL so third parties can
|
|
790
797
|
consume without JavaScript and optimized when not offline
|
|
@@ -910,7 +917,9 @@ it supports the following arguments:
|
|
|
910
917
|
and/or syntax (generic to *TextBrowser* and/or canonical, ideally
|
|
911
918
|
human-readable based on JSON-supplied information; e.g., for the
|
|
912
919
|
Bible, `Matt. 5:10-12`); use with `postMessage` to-do to supply
|
|
913
|
-
syntax back to another site
|
|
920
|
+
syntax back to another site; see
|
|
921
|
+
[Scroll To Text fragment](https://wicg.github.io/ScrollToTextFragment/);
|
|
922
|
+
[Stack answer](https://stackoverflow.com/a/62162093/271577)
|
|
914
923
|
1. Correct any field easily by links within TB to editing interface
|
|
915
924
|
1. Add an "overlay" column like interlinear, but which overlays by
|
|
916
925
|
tooltip if any data is present; can also use metadata if the
|
|
@@ -966,11 +975,13 @@ it supports the following arguments:
|
|
|
966
975
|
<https://github.com/json-schema-org/json-schema-spec/issues/587#issuecomment-389726603>
|
|
967
976
|
by using initial `$`?
|
|
968
977
|
1. Find way to avoid need for `!important` in column CSS
|
|
969
|
-
1.
|
|
978
|
+
1. Redirect automatically by accepted language, though have a link or
|
|
979
|
+
preference to change the default
|
|
980
|
+
1. Offer more **border styling** tuning controls (including right/left/top/bottom,
|
|
970
981
|
color, etc.); then offer this along with other styles if we replace CSS
|
|
971
982
|
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?
|
|
983
|
+
1. Refactoring: Try to use `deserialize` of `form-serialization` fork for
|
|
984
|
+
initial population or hash change? (if not `FormData`)
|
|
974
985
|
1. We should try to allow `onByDefault` and `placement` for non-plugin
|
|
975
986
|
fields also
|
|
976
987
|
1. [ES6 Modules in browser](https://jakearchibald.com/2017/es-modules-in-browsers/):
|
|
@@ -1035,6 +1046,8 @@ it supports the following arguments:
|
|
|
1035
1046
|
|
|
1036
1047
|
## To-dos (Medium Priority)
|
|
1037
1048
|
|
|
1049
|
+
1. Build "Preferred language(s)" to use awareness of content languages rather
|
|
1050
|
+
than locales.
|
|
1038
1051
|
1. Remove need for separate metadata
|
|
1039
1052
|
files per
|
|
1040
1053
|
<https://github.com/json-schema-org/json-schema-spec/issues/587#issuecomment-389726603>
|
|
@@ -1044,8 +1057,8 @@ it supports the following arguments:
|
|
|
1044
1057
|
with multiselect
|
|
1045
1058
|
1. Preview styling changes (or move all controls to results page for
|
|
1046
1059
|
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
|
|
1060
|
+
1. Separate **formatting within Jamilih code** to CSS; unit test and
|
|
1061
|
+
performance by being able to use a natively stringifying version of Jamilih
|
|
1049
1062
|
(once complete)
|
|
1050
1063
|
1. Utilize meta-data properties, `primary_text_field`, `orig_lang_field`,
|
|
1051
1064
|
`orig_langs`, e.g., to allow for user to display main language and
|
|
@@ -1105,7 +1118,7 @@ it supports the following arguments:
|
|
|
1105
1118
|
|
|
1106
1119
|
1. Waiting: Avoid superagent warning:
|
|
1107
1120
|
<https://github.com/whitlockjc/path-loader/issues/17>
|
|
1108
|
-
1. Remember columns enabled
|
|
1121
|
+
1. **Remember columns enabled**, etc. since last visit, and/or saved as
|
|
1109
1122
|
preferences.
|
|
1110
1123
|
1. Allow copy-pasting a search as a custom web protocol (make
|
|
1111
1124
|
site-configurable), e.g., to support `web+bahaiwritings:` links per
|
|
@@ -1124,8 +1137,6 @@ it supports the following arguments:
|
|
|
1124
1137
|
1. Preference to remember enabled checkboxes and formatting
|
|
1125
1138
|
1. Change to utilize history.pushState?
|
|
1126
1139
|
<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
1140
|
1. Sort file selection listing per locale?
|
|
1130
1141
|
1. Node.js synchronization of locale files?
|
|
1131
1142
|
1. Could allow Node to built schemas, optionally allowing or disallowing
|
|
@@ -1142,7 +1153,6 @@ it supports the following arguments:
|
|
|
1142
1153
|
the i18n of "lang"?).
|
|
1143
1154
|
1. `window.postMessage` API (since CORS is only for Ajax and
|
|
1144
1155
|
`document.domain` is only for subdomains).
|
|
1145
|
-
1. `indexedDB` for JSON data
|
|
1146
1156
|
1. Restore `tabindex` usage
|
|
1147
1157
|
1. Restore option from work page to have a checkbox on whether to go to
|
|
1148
1158
|
"Advanced mode", opening the styling options by default or not.
|