unicode-input-toolconverter 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/.babelrc.json +3 -0
- package/.editorconfig +16 -0
- package/.nojekyll +0 -0
- package/.nyc_output/out.json +173804 -0
- package/.nyc_output/processinfo/index.json +1 -0
- package/CHANGES.md +11 -0
- package/COPYING.LESSER.txt +180 -0
- package/COPYING.txt +687 -0
- package/README.md +65 -0
- package/_locales/en-US/messages.json +3126 -0
- package/_locales/hu-HU/messages.json +3126 -0
- package/_locales/pt-BR/messages.json +3126 -0
- package/_locales/sv-SE/messages.json +3126 -0
- package/babel.config.json +5 -0
- package/browser_action/characterSelection.js +91 -0
- package/browser_action/charrefConverters.js +389 -0
- package/browser_action/chartBuild.js +155 -0
- package/browser_action/encodingBehaviors.js +72 -0
- package/browser_action/encodings.js +97 -0
- package/browser_action/entities.js +12 -0
- package/browser_action/entityBehaviors.js +96 -0
- package/browser_action/index-es.html +15 -0
- package/browser_action/index-instrumented.html +16 -0
- package/browser_action/index-pages.html +16 -0
- package/browser_action/index.html +16 -0
- package/browser_action/index.iife.min.js +2 -0
- package/browser_action/index.iife.min.js.map +1 -0
- package/browser_action/index.instrumented.iife.min.js +2 -0
- package/browser_action/index.instrumented.iife.min.js.map +1 -0
- package/browser_action/index.js +95 -0
- package/browser_action/preferences/prefDefaults.js +52 -0
- package/browser_action/service-worker/sw-activateCallback.js +53 -0
- package/browser_action/service-worker/sw-locales.json +6 -0
- package/browser_action/service-worker/sw-resources.json +73 -0
- package/browser_action/service-worker/sw-unicode-data.json +3 -0
- package/browser_action/styles/unicode-dialog.css +391 -0
- package/browser_action/templateUtils/elements.js +12 -0
- package/browser_action/templateUtils/fill.js +3 -0
- package/browser_action/templateUtils/validation.js +6 -0
- package/browser_action/templates/chartBuild.js +185 -0
- package/browser_action/templates/index.js +1304 -0
- package/browser_action/templatesElementCustomization/widgets.js +56 -0
- package/browser_action/unicode/UnicodeConverter.js +793 -0
- package/browser_action/unicode/charrefunicodeDb.js +258 -0
- package/browser_action/unicode/getScriptInfoForCodePoint.js +646 -0
- package/browser_action/unicode/hangul.js +253 -0
- package/browser_action/unicode/lastScriptNames.json +5 -0
- package/browser_action/unicode/parseUnihanFromTextFileStrings.js +56 -0
- package/browser_action/unicode/unicodeFieldInfo.js +120 -0
- package/browser_action/unicode/unicodeScripts.js +4912 -0
- package/browser_action/unicode/unihan.js +129 -0
- package/browser_action/unicode/unihanDbPopulate.js +26 -0
- package/browser_action/unicodecharref.js +1480 -0
- package/browser_action/utils/DOMUtils.js +122 -0
- package/browser_action/utils/FetchUtils.js +19 -0
- package/browser_action/utils/TextUtils.js +28 -0
- package/browser_action/utils/TypedArrayUtils.js +21 -0
- package/browser_action/utils/semicolonSeparatedToArray.js +12 -0
- package/browser_action/utils/setupServiceWorker.js +193 -0
- package/cypress.config.js +21 -0
- package/download/entities/copyright-software-20021231.html +70 -0
- package/download/entities/html5-uppercase.ent +54 -0
- package/download/entities/htmlmathml-f.ent +2164 -0
- package/download/entities/isoamsa.ent +201 -0
- package/download/entities/isoamsb.ent +177 -0
- package/download/entities/isoamsc.ent +77 -0
- package/download/entities/isoamsn.ent +148 -0
- package/download/entities/isoamso.ent +107 -0
- package/download/entities/isoamsr.ent +238 -0
- package/download/entities/isobox.ent +95 -0
- package/download/entities/isocyr1.ent +122 -0
- package/download/entities/isocyr2.ent +81 -0
- package/download/entities/isodia.ent +69 -0
- package/download/entities/isogrk1.ent +104 -0
- package/download/entities/isogrk2.ent +75 -0
- package/download/entities/isogrk3.ent +98 -0
- package/download/entities/isogrk4.ent +98 -0
- package/download/entities/isolat1.ent +117 -0
- package/download/entities/isolat2.ent +176 -0
- package/download/entities/isomfrk.ent +107 -0
- package/download/entities/isomopf.ent +81 -0
- package/download/entities/isomscr.ent +107 -0
- package/download/entities/isonum.ent +131 -0
- package/download/entities/isopub.ent +140 -0
- package/download/entities/isotech.ent +216 -0
- package/download/entities/mmlalias.ent +598 -0
- package/download/entities/mmlextra.ent +154 -0
- package/download/entities/predefined.ent +52 -0
- package/download/entities/w3centities-f.ent +2276 -0
- package/download/entities/xhtml1-lat1.ent +143 -0
- package/download/entities/xhtml1-special.ent +78 -0
- package/download/entities/xhtml1-symbol.ent +171 -0
- package/eslint.config.js +66 -0
- package/icons/openWindow16.png +0 -0
- package/icons/openWindow24.png +0 -0
- package/lgtm.yml +5 -0
- package/lib/background.html +11 -0
- package/lib/background.js +13 -0
- package/lib/overlay.css +6 -0
- package/manifest.json +37 -0
- package/package.json +121 -0
- package/polyfills/browser-polyfill.min.js +8 -0
- package/polyfills/browser-polyfill.min.js.map +1 -0
- package/server.js +61 -0
- package/sw.js +259 -0
- package/tools/entities-import.js +62 -0
- package/tools/findEsResources.js +30 -0
- package/tools/list-locales.js +17 -0
- package/tools/parseUnicodeCharts.js +428 -0
- package/tools/ucd-import.js +24 -0
- package/tools/unicode-charts.html +596 -0
- package/tools/unihan-import.js +72 -0
- package/unicode_copyright.txt +46 -0
- package/vendor/camelcase/index.js +110 -0
- package/vendor/fflate/esm/browser.js +2665 -0
- package/vendor/intl-dom/dist/index.esm.js +2962 -0
- package/vendor/jamilih/dist/jml-es.js +2359 -0
- package/vendor/jquery/dist/jquery.js +10716 -0
- package/vendor/json-6/dist/index.mjs +1783 -0
- package/vendor/miller-columns/dist/index-es.min.js +1 -0
- package/vendor/miller-columns/miller-columns.css +75 -0
- package/vendor/simple-prefs/dist/index.esm.js +286 -0
- package/web-ext-config.cjs +13 -0
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import {i18n, setJSONExtra} from '../vendor/intl-dom/dist/index.esm.js';
|
|
2
|
+
// Currently not bundling json-6
|
|
3
|
+
import jsonExtra from '../vendor/json-6/dist/index.mjs';
|
|
4
|
+
|
|
5
|
+
import {makeTabBox} from './templatesElementCustomization/widgets.js';
|
|
6
|
+
import {code, link} from './templateUtils/elements.js';
|
|
7
|
+
|
|
8
|
+
import {setPrefDefaultVars} from
|
|
9
|
+
'./preferences/prefDefaults.js';
|
|
10
|
+
import {getUnicodeConverter} from './unicode/UnicodeConverter.js';
|
|
11
|
+
import unicodecharref, {shareVars as shareVarsUresults} from
|
|
12
|
+
'./unicodecharref.js';
|
|
13
|
+
import indexTemplate from './templates/index.js';
|
|
14
|
+
|
|
15
|
+
import setupServiceWorker from './utils/setupServiceWorker.js';
|
|
16
|
+
|
|
17
|
+
import activateCallback from
|
|
18
|
+
'./service-worker/sw-activateCallback.js';
|
|
19
|
+
|
|
20
|
+
import {
|
|
21
|
+
shareVars as shareVarsEntity, setupEntityEvents
|
|
22
|
+
} from './entityBehaviors.js';
|
|
23
|
+
import {
|
|
24
|
+
shareVars as shareVarsCharrefConverter
|
|
25
|
+
} from './charrefConverters.js';
|
|
26
|
+
import characterSelection from './characterSelection.js';
|
|
27
|
+
// import {setupEncodingEvents} from './encodingBehaviors.js';
|
|
28
|
+
|
|
29
|
+
setJSONExtra(jsonExtra);
|
|
30
|
+
|
|
31
|
+
// SETUP
|
|
32
|
+
|
|
33
|
+
// Todo: Support hash searchParams / streamline with `pushState`
|
|
34
|
+
const {searchParams} = new URL(location);
|
|
35
|
+
|
|
36
|
+
const lang = searchParams.get('lang');
|
|
37
|
+
|
|
38
|
+
// ['sv-SE']; // ['pt-BR']; // ['hu-HU'];
|
|
39
|
+
const locales = [...new Set([
|
|
40
|
+
// Ensure there is at least one working language!
|
|
41
|
+
...(lang ? [lang] : [...navigator.languages]),
|
|
42
|
+
'en-US'
|
|
43
|
+
])];
|
|
44
|
+
|
|
45
|
+
// eslint-disable-next-line unicorn/prefer-top-level-await -- No iife export
|
|
46
|
+
(async () => {
|
|
47
|
+
const _ = await i18n({
|
|
48
|
+
locales, defaults: false, localesBasePath: '../',
|
|
49
|
+
substitutions: {code, link}
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
if (searchParams.get('serviceWorker')) {
|
|
53
|
+
// Doesn't work in FF as SW using ESM so putting behind switch for now
|
|
54
|
+
await setupServiceWorker();
|
|
55
|
+
} else if (searchParams.get('characterDescriptions')) {
|
|
56
|
+
const namespace = 'unicode-input-toolconverter';
|
|
57
|
+
await activateCallback({
|
|
58
|
+
namespace
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
setPrefDefaultVars({_});
|
|
63
|
+
const charrefunicodeConverter = new (getUnicodeConverter())({_});
|
|
64
|
+
shareVarsUresults({_, charrefunicodeConverter});
|
|
65
|
+
shareVarsEntity({charrefunicodeConverter});
|
|
66
|
+
shareVarsCharrefConverter({charrefunicodeConverter});
|
|
67
|
+
|
|
68
|
+
// MAIN TEMPLATE
|
|
69
|
+
// Slows down loading so putting behind switch
|
|
70
|
+
const fonts = searchParams.get('fonts')
|
|
71
|
+
? await (await fetch('/fonts')).json()
|
|
72
|
+
: [];
|
|
73
|
+
|
|
74
|
+
indexTemplate({_, fonts});
|
|
75
|
+
|
|
76
|
+
// ADD GENERAL BEHAVIORS
|
|
77
|
+
makeTabBox('.tabbox');
|
|
78
|
+
|
|
79
|
+
// TAB-SPECIFIC
|
|
80
|
+
await characterSelection({
|
|
81
|
+
_, charrefunicodeConverter
|
|
82
|
+
});
|
|
83
|
+
// setupEncodingEvents({_});
|
|
84
|
+
setupEntityEvents();
|
|
85
|
+
|
|
86
|
+
// Todo: Move functionality to relevant files
|
|
87
|
+
await unicodecharref.initialize({
|
|
88
|
+
customProtocol: searchParams.get('customProtocol'),
|
|
89
|
+
options: searchParams.get('options'),
|
|
90
|
+
// Todo: Add-ons API for conversions
|
|
91
|
+
// convert: window.getSelection().toString()
|
|
92
|
+
convert: searchParams.get('convert'),
|
|
93
|
+
targetid: searchParams.get('targetid')
|
|
94
|
+
});
|
|
95
|
+
})();
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
// hexstyleLwr: return true; // Could use but better not to
|
|
2
|
+
// change for XML-compatibility
|
|
3
|
+
|
|
4
|
+
import {SimplePrefs} from '../../vendor/simple-prefs/dist/index.esm.js';
|
|
5
|
+
|
|
6
|
+
let _;
|
|
7
|
+
export const setPrefDefaultVars = ({_: __}) => {
|
|
8
|
+
_ = __;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const getUnicodeDefaults = () => {
|
|
12
|
+
return new SimplePrefs({
|
|
13
|
+
namespace: 'unicode-input-toolconverter-',
|
|
14
|
+
defaults: getPrefDefaults()
|
|
15
|
+
}).bind();
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const getPrefDefaults = () => ({
|
|
19
|
+
hexLettersUpper: false,
|
|
20
|
+
onlyentsyes: false,
|
|
21
|
+
asciiLt128: false,
|
|
22
|
+
startCharInMiddleOfChart: false,
|
|
23
|
+
multiline: false,
|
|
24
|
+
xhtmlentmode: false,
|
|
25
|
+
showImg: false,
|
|
26
|
+
ampspace: false,
|
|
27
|
+
// showComplexWindow: false,
|
|
28
|
+
hexyes: true,
|
|
29
|
+
decyes: true,
|
|
30
|
+
unicodeyes: true,
|
|
31
|
+
buttonyes: true,
|
|
32
|
+
entyes: true,
|
|
33
|
+
xmlentkeep: true,
|
|
34
|
+
ampkeep: true,
|
|
35
|
+
showAllDetailedView: true,
|
|
36
|
+
showAllDetailedCJKView: true,
|
|
37
|
+
cssUnambiguous: true,
|
|
38
|
+
appendtohtmldtd: true,
|
|
39
|
+
outerWidth: 0,
|
|
40
|
+
fontsizetextbox: 13,
|
|
41
|
+
tblrowsset: 4,
|
|
42
|
+
tblcolsset: 3,
|
|
43
|
+
tblfontsize: 13,
|
|
44
|
+
DTDtextbox: '',
|
|
45
|
+
font: '',
|
|
46
|
+
cssWhitespace: ' ',
|
|
47
|
+
initialTab: 'charts',
|
|
48
|
+
defaultStartCharCode: _('startCharCode').codePointAt() - 1, // 'a'
|
|
49
|
+
currentStartCharCode: _('startCharCode').codePointAt() - 1, // 'a'
|
|
50
|
+
lang: _('langCode'), // 'en-US'
|
|
51
|
+
dropdownArr: []
|
|
52
|
+
});
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import {UnicodeDatabase} from '../unicode/charrefunicodeDb.js';
|
|
2
|
+
import {getText} from '../utils/FetchUtils.js';
|
|
3
|
+
import semicolonSeparatedToArray from '../utils/semicolonSeparatedToArray.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @param {string} db
|
|
7
|
+
* @returns {Promise<void>}
|
|
8
|
+
*/
|
|
9
|
+
function deleteDatabase (db) {
|
|
10
|
+
// eslint-disable-next-line promise/avoid-new -- No API
|
|
11
|
+
return new Promise((resolve) => {
|
|
12
|
+
const req = indexedDB.deleteDatabase(db);
|
|
13
|
+
req.addEventListener('success', () => {
|
|
14
|
+
resolve();
|
|
15
|
+
});
|
|
16
|
+
req.addEventListener(
|
|
17
|
+
'error',
|
|
18
|
+
/* istanbul ignore next -- Just for protection */
|
|
19
|
+
() => {
|
|
20
|
+
resolve();
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
req.addEventListener(
|
|
24
|
+
'blocked',
|
|
25
|
+
/* istanbul ignore next -- Just for protection */
|
|
26
|
+
() => {
|
|
27
|
+
resolve();
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* @param {PlainObject} cfg
|
|
35
|
+
* @param {string} cfg.namespace
|
|
36
|
+
* @returns {Promise<void>}
|
|
37
|
+
*/
|
|
38
|
+
async function activateCallback ({namespace /* , log */}) {
|
|
39
|
+
await deleteDatabase(namespace); // Chrome sometimes doesn't complete
|
|
40
|
+
const charrefunicodeDb = new UnicodeDatabase({
|
|
41
|
+
name: namespace,
|
|
42
|
+
// We don't peg to package major version as database version may vary
|
|
43
|
+
// independently
|
|
44
|
+
version: 1
|
|
45
|
+
});
|
|
46
|
+
const unicodeData = (await getText('/download/UCD/UnicodeData.txt')).trim();
|
|
47
|
+
const updateUnicodeData = semicolonSeparatedToArray(unicodeData);
|
|
48
|
+
await charrefunicodeDb.connect({
|
|
49
|
+
updateUnicodeData
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export default activateCallback;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
[
|
|
2
|
+
"/browser_action/characterSelection.js",
|
|
3
|
+
"/browser_action/charrefConverters.js",
|
|
4
|
+
"/browser_action/chartBuild.js",
|
|
5
|
+
"/browser_action/encodingBehaviors.js",
|
|
6
|
+
"/browser_action/encodings.js",
|
|
7
|
+
"/browser_action/entities.js",
|
|
8
|
+
"/browser_action/entityBehaviors.js",
|
|
9
|
+
"/browser_action/index.html",
|
|
10
|
+
"/browser_action/index.iife.min.js",
|
|
11
|
+
"/browser_action/index.js",
|
|
12
|
+
"/browser_action/preferences/prefDefaults.js",
|
|
13
|
+
"/browser_action/styles/unicode-dialog.css",
|
|
14
|
+
"/browser_action/templateUtils/elements.js",
|
|
15
|
+
"/browser_action/templateUtils/fill.js",
|
|
16
|
+
"/browser_action/templateUtils/validation.js",
|
|
17
|
+
"/browser_action/templates/chartBuild.js",
|
|
18
|
+
"/browser_action/templates/index.js",
|
|
19
|
+
"/browser_action/templatesElementCustomization/widgets.js",
|
|
20
|
+
"/browser_action/unicode/UnicodeConverter.js",
|
|
21
|
+
"/browser_action/unicode/charrefunicodeDb.js",
|
|
22
|
+
"/browser_action/unicode/getScriptInfoForCodePoint.js",
|
|
23
|
+
"/browser_action/unicode/hangul.js",
|
|
24
|
+
"/browser_action/unicode/parseUnihanFromTextFileStrings.js",
|
|
25
|
+
"/browser_action/unicode/unicodeScripts.js",
|
|
26
|
+
"/browser_action/unicode/unihan.js",
|
|
27
|
+
"/browser_action/unicode/unihanDbPopulate.js",
|
|
28
|
+
"/browser_action/unicodecharref.js",
|
|
29
|
+
"/browser_action/utils/DOMUtils.js",
|
|
30
|
+
"/browser_action/utils/TextUtils.js",
|
|
31
|
+
"/browser_action/utils/TypedArrayUtils.js",
|
|
32
|
+
"/browser_action/utils/setupServiceWorker.js",
|
|
33
|
+
"/download/entities/html5-uppercase.ent",
|
|
34
|
+
"/download/entities/htmlmathml-f.ent",
|
|
35
|
+
"/download/entities/isoamsa.ent",
|
|
36
|
+
"/download/entities/isoamsb.ent",
|
|
37
|
+
"/download/entities/isoamsc.ent",
|
|
38
|
+
"/download/entities/isoamsn.ent",
|
|
39
|
+
"/download/entities/isoamso.ent",
|
|
40
|
+
"/download/entities/isoamsr.ent",
|
|
41
|
+
"/download/entities/isobox.ent",
|
|
42
|
+
"/download/entities/isocyr1.ent",
|
|
43
|
+
"/download/entities/isocyr2.ent",
|
|
44
|
+
"/download/entities/isodia.ent",
|
|
45
|
+
"/download/entities/isogrk1.ent",
|
|
46
|
+
"/download/entities/isogrk2.ent",
|
|
47
|
+
"/download/entities/isogrk3.ent",
|
|
48
|
+
"/download/entities/isogrk4.ent",
|
|
49
|
+
"/download/entities/isolat1.ent",
|
|
50
|
+
"/download/entities/isolat2.ent",
|
|
51
|
+
"/download/entities/isomfrk.ent",
|
|
52
|
+
"/download/entities/isomopf.ent",
|
|
53
|
+
"/download/entities/isomscr.ent",
|
|
54
|
+
"/download/entities/isonum.ent",
|
|
55
|
+
"/download/entities/isopub.ent",
|
|
56
|
+
"/download/entities/isotech.ent",
|
|
57
|
+
"/download/entities/mmlalias.ent",
|
|
58
|
+
"/download/entities/mmlextra.ent",
|
|
59
|
+
"/download/entities/predefined.ent",
|
|
60
|
+
"/download/entities/w3centities-f.ent",
|
|
61
|
+
"/download/entities/xhtml1-lat1.ent",
|
|
62
|
+
"/download/entities/xhtml1-special.ent",
|
|
63
|
+
"/download/entities/xhtml1-symbol.ent",
|
|
64
|
+
"/icons/openWindow24.png",
|
|
65
|
+
"/vendor/fflate/esm/browser.js",
|
|
66
|
+
"/vendor/intl-dom/dist/index.esm.js",
|
|
67
|
+
"/vendor/jamilih/dist/jml-es.js",
|
|
68
|
+
"/vendor/jquery/dist/jquery.js",
|
|
69
|
+
"/vendor/json-6/dist/index.mjs",
|
|
70
|
+
"/vendor/miller-columns/dist/index-es.min.js",
|
|
71
|
+
"/vendor/miller-columns/miller-columns.css",
|
|
72
|
+
"/vendor/simple-prefs/dist/index.esm.js"
|
|
73
|
+
]
|
|
@@ -0,0 +1,391 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright 2007-2018 Brett Zamir
|
|
3
|
+
|
|
4
|
+
This file is part of Unicode Input Tool/Converter.
|
|
5
|
+
|
|
6
|
+
Unicode Input Tool/Converter is free software: you can redistribute it and/or modify
|
|
7
|
+
it under the terms of the GNU Lesser General Public License as published by
|
|
8
|
+
the Free Software Foundation, either version 3 of the License, or
|
|
9
|
+
(at your option) any later version.
|
|
10
|
+
|
|
11
|
+
Unicode Input Tool/Converter is distributed in the hope that it will be useful,
|
|
12
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
+
GNU Lesser General Public License for more details.
|
|
15
|
+
|
|
16
|
+
You should have received a copy of the GNU Lesser General Public License
|
|
17
|
+
along with Unicode Input Tool/Converter. If not, see <http://www.gnu.org/licenses/>.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
/*
|
|
21
|
+
Find and load font(s) to capture as many as possible by default
|
|
22
|
+
#tableholder {
|
|
23
|
+
font-family: 'Arial Unicode MS';
|
|
24
|
+
}
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
.searchBox {
|
|
28
|
+
min-height: 20px;
|
|
29
|
+
}
|
|
30
|
+
#rowsset, #colsset {
|
|
31
|
+
max-width: 50px;
|
|
32
|
+
}
|
|
33
|
+
#clearoutput {
|
|
34
|
+
margin-top: 2em;
|
|
35
|
+
height: 50px;
|
|
36
|
+
width: 50px;
|
|
37
|
+
}
|
|
38
|
+
#insertText {
|
|
39
|
+
height: 70px;
|
|
40
|
+
}
|
|
41
|
+
#insertText, #displayUnicodeDesc {
|
|
42
|
+
width: 400px;
|
|
43
|
+
}
|
|
44
|
+
.entity {
|
|
45
|
+
background-color: yellow;
|
|
46
|
+
}
|
|
47
|
+
/*
|
|
48
|
+
.leftlabel {
|
|
49
|
+
float:left;
|
|
50
|
+
width: 15%;
|
|
51
|
+
}
|
|
52
|
+
#displayUnicodeDesc {
|
|
53
|
+
float:left;
|
|
54
|
+
}
|
|
55
|
+
*/
|
|
56
|
+
a.text-link {
|
|
57
|
+
color: blue;
|
|
58
|
+
text-decoration: underline;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
table.unicodetablecell {
|
|
62
|
+
border-collapse: collapse;
|
|
63
|
+
min-width: 500px;
|
|
64
|
+
width: 500px;
|
|
65
|
+
max-width: 500px;
|
|
66
|
+
/*
|
|
67
|
+
overflow: auto;
|
|
68
|
+
min-height: 300px;
|
|
69
|
+
height: 300px;
|
|
70
|
+
max-height: 300px;
|
|
71
|
+
*/
|
|
72
|
+
}
|
|
73
|
+
td.unicodetablecell {
|
|
74
|
+
border-style: inset;
|
|
75
|
+
overflow: auto;
|
|
76
|
+
max-height: 20px !important;
|
|
77
|
+
height:20px !important;
|
|
78
|
+
min-height:20px !important;
|
|
79
|
+
}
|
|
80
|
+
.outputcopybutton {
|
|
81
|
+
width: 100px;
|
|
82
|
+
}
|
|
83
|
+
.fontsize, .charthbox, .dtdbutton {
|
|
84
|
+
display: inline; /* Doesn't seem to work on Mac at least */
|
|
85
|
+
}
|
|
86
|
+
.dtdbutton {
|
|
87
|
+
width: 100px;
|
|
88
|
+
padding-bottom: 7px;
|
|
89
|
+
}
|
|
90
|
+
#DTDtextbox {
|
|
91
|
+
width: 50%;
|
|
92
|
+
height: 300px;
|
|
93
|
+
margin-right: 10px;
|
|
94
|
+
}
|
|
95
|
+
.centered {
|
|
96
|
+
text-align: center;
|
|
97
|
+
}
|
|
98
|
+
button.reconvert {
|
|
99
|
+
color: black;
|
|
100
|
+
margin: 2px;
|
|
101
|
+
}
|
|
102
|
+
.buttonactive {
|
|
103
|
+
color: red;
|
|
104
|
+
}
|
|
105
|
+
/* Since the dialogheader doesn't seem to work on the Mac (and since I may switch away in the future away from a "dialog" window proper), I've changed it to a description tag with a "dialogheader" class and styled it similarly */
|
|
106
|
+
.dialogheader {
|
|
107
|
+
text-align: center;
|
|
108
|
+
font-size: large;
|
|
109
|
+
background-color: aqua;
|
|
110
|
+
margin-top: 10px;
|
|
111
|
+
margin-bottom: 10px;
|
|
112
|
+
padding-top: 10px;
|
|
113
|
+
padding-bottom: 10px;
|
|
114
|
+
}
|
|
115
|
+
.aboutdescription {
|
|
116
|
+
display: block;
|
|
117
|
+
margin-bottom: 20px;
|
|
118
|
+
text-indent: 20px;
|
|
119
|
+
}
|
|
120
|
+
.notesdescription, .usage_notesdescription {
|
|
121
|
+
display: block;
|
|
122
|
+
margin-bottom: 20px;
|
|
123
|
+
text-indent: 20px;
|
|
124
|
+
}
|
|
125
|
+
.chartLayout {
|
|
126
|
+
margin-bottom: 10px;
|
|
127
|
+
}
|
|
128
|
+
#convertEncoding {
|
|
129
|
+
margin-top: 10px;
|
|
130
|
+
}
|
|
131
|
+
#convertFromEncoding {
|
|
132
|
+
margin-bottom: 10px;
|
|
133
|
+
}
|
|
134
|
+
/*
|
|
135
|
+
.aboutdescription, .prefdescription, .conversionhbox {
|
|
136
|
+
}
|
|
137
|
+
*/
|
|
138
|
+
.indentedradio {
|
|
139
|
+
margin-left: 70px;
|
|
140
|
+
}
|
|
141
|
+
.firstbox {
|
|
142
|
+
margin-top: 30px;
|
|
143
|
+
}
|
|
144
|
+
.chartBox {
|
|
145
|
+
width: 50%;
|
|
146
|
+
}
|
|
147
|
+
#DownloadButtonBox, #DownloadProgressBox, #UnihanInstalled {
|
|
148
|
+
text-align: center;
|
|
149
|
+
}
|
|
150
|
+
#DownloadButtonBox > div {
|
|
151
|
+
margin-bottom: 3px;
|
|
152
|
+
}
|
|
153
|
+
#resetdefaultbutton {
|
|
154
|
+
margin-top: 20px;
|
|
155
|
+
}
|
|
156
|
+
radiogroup {
|
|
157
|
+
border-left-style: solid;
|
|
158
|
+
border-left-width: 1px;
|
|
159
|
+
border-right-style: solid;
|
|
160
|
+
border-right-width: 1px;
|
|
161
|
+
}
|
|
162
|
+
#outputButtons {
|
|
163
|
+
margin-top: 5px;
|
|
164
|
+
}
|
|
165
|
+
.boxed {
|
|
166
|
+
border-style: solid;
|
|
167
|
+
border-width: 1px;
|
|
168
|
+
padding: 5px;
|
|
169
|
+
}
|
|
170
|
+
.boxed, .boxedbottom {
|
|
171
|
+
padding: 5px;
|
|
172
|
+
border-bottom-style: solid;
|
|
173
|
+
border-bottom-width: 1px;
|
|
174
|
+
border-left-style: solid;
|
|
175
|
+
border-left-width: 1px;
|
|
176
|
+
border-right-style: solid;
|
|
177
|
+
border-right-width: 1px;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.detailedViewContainer {
|
|
181
|
+
overflow: auto;
|
|
182
|
+
height: 550px;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/* .detailedView, .detailedCJKView {
|
|
186
|
+
overflow: auto;
|
|
187
|
+
height: 20px;
|
|
188
|
+
} */
|
|
189
|
+
.detailedView > .description.heading, .detailedCJKView > .description.heading {
|
|
190
|
+
display: block;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.heading {
|
|
194
|
+
font-weight: bold;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
#viewTabs {
|
|
198
|
+
overflow: auto;
|
|
199
|
+
min-height: 20px;
|
|
200
|
+
}
|
|
201
|
+
#searchGrid {
|
|
202
|
+
/* Makes longer (along with change below), but no dropmarkers overflow-y:auto;max-height:180px;width:400px;overflow-x:hidden;*/
|
|
203
|
+
overflow: auto;
|
|
204
|
+
max-width: 400px;
|
|
205
|
+
width: 400px;
|
|
206
|
+
}
|
|
207
|
+
#searchGridCJK {
|
|
208
|
+
overflow: auto;
|
|
209
|
+
min-width: 330px;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/*
|
|
213
|
+
.searchMenu {
|
|
214
|
+
/* -moz-box-flex: 1; *
|
|
215
|
+
}
|
|
216
|
+
*/
|
|
217
|
+
|
|
218
|
+
#chart_selectchar_persist_vbox {
|
|
219
|
+
margin-right: 10px;
|
|
220
|
+
/* max-height: 630px; */
|
|
221
|
+
}
|
|
222
|
+
#chart_selectchar_persist {
|
|
223
|
+
overflow: auto;
|
|
224
|
+
margin-top: 10px;
|
|
225
|
+
min-height: 20px;
|
|
226
|
+
}
|
|
227
|
+
.miller-columns {
|
|
228
|
+
display: none;
|
|
229
|
+
overflow: hidden !important;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
#chart_layout_persist {
|
|
233
|
+
overflow: auto;
|
|
234
|
+
min-height: 20px;
|
|
235
|
+
}
|
|
236
|
+
#charts {
|
|
237
|
+
/* Make this bigger than rest of tabbox */
|
|
238
|
+
min-width: 1200px;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
#toconvert_persist {
|
|
242
|
+
margin-top: 10px;
|
|
243
|
+
}
|
|
244
|
+
.noteDescriptionBox {
|
|
245
|
+
overflow: auto;
|
|
246
|
+
width: 50%;
|
|
247
|
+
padding-bottom: 20px;
|
|
248
|
+
padding-right: 20px;
|
|
249
|
+
padding-left: 20px;
|
|
250
|
+
}
|
|
251
|
+
.convertBox {
|
|
252
|
+
width: 100%;
|
|
253
|
+
height: 200px;
|
|
254
|
+
}
|
|
255
|
+
.conversionSection {
|
|
256
|
+
width: 50%;
|
|
257
|
+
}
|
|
258
|
+
#conversion_buttons_persist {
|
|
259
|
+
margin-right: 10px;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
#tabbox {
|
|
263
|
+
overflow: auto;
|
|
264
|
+
/* max-width: 1050px;
|
|
265
|
+
max-height: 710px; */
|
|
266
|
+
}
|
|
267
|
+
#chartcontent {
|
|
268
|
+
overflow: auto;
|
|
269
|
+
min-width: 500px;
|
|
270
|
+
}
|
|
271
|
+
#tableholder {
|
|
272
|
+
overflow: auto;
|
|
273
|
+
min-height: 20px;
|
|
274
|
+
}
|
|
275
|
+
#displayUnicodeDescContainer h3, #displayUnihanArea h3 {
|
|
276
|
+
/* Override Chrome default styling of 1em */
|
|
277
|
+
margin-block-start: 5px;
|
|
278
|
+
margin-block-end: 5px;
|
|
279
|
+
}
|
|
280
|
+
.displayUnicodeDescContainer {
|
|
281
|
+
margin-bottom: 10px;
|
|
282
|
+
}
|
|
283
|
+
.detailedViewRows, .detailedCJKViewRows {
|
|
284
|
+
min-height: 150px;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
#unicodeDescArea {
|
|
288
|
+
overflow: auto;
|
|
289
|
+
}
|
|
290
|
+
#displayUnihanArea {
|
|
291
|
+
overflow: auto;
|
|
292
|
+
}
|
|
293
|
+
#displayUnicodeDesc2, #displayUnicodeDescUnihan {
|
|
294
|
+
width: 480px;
|
|
295
|
+
max-width: 500px;
|
|
296
|
+
min-width: 480px;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
#conversion_buttons_persist {
|
|
300
|
+
min-width: 20px;
|
|
301
|
+
overflow: auto;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
#unicodeTabBox > .tabs > .tab {
|
|
305
|
+
width: 100px;
|
|
306
|
+
padding: 6px;
|
|
307
|
+
border-radius: 5px 5px;
|
|
308
|
+
}
|
|
309
|
+
#tabboxSearch > .tabs > .tab {
|
|
310
|
+
width: 100px;
|
|
311
|
+
padding: 6px;
|
|
312
|
+
border-radius: 5px 5px;
|
|
313
|
+
}
|
|
314
|
+
#viewTabs > .tabs > .tab {
|
|
315
|
+
width: 150px;
|
|
316
|
+
height: 1em;
|
|
317
|
+
padding: 6px;
|
|
318
|
+
border-radius: 5px 5px;
|
|
319
|
+
}
|
|
320
|
+
#viewTabs > .tabs {
|
|
321
|
+
margin-top: 10px;
|
|
322
|
+
margin-bottom: 10px;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
.tab {
|
|
326
|
+
float: left;
|
|
327
|
+
/* Although h1 for accessibility, reduce size */
|
|
328
|
+
font-weight: normal;
|
|
329
|
+
font-size: inherit !important;
|
|
330
|
+
}
|
|
331
|
+
.tab[data-selected] {
|
|
332
|
+
border-collapse: collapse;
|
|
333
|
+
border: black outset 1px;
|
|
334
|
+
background-color: lightblue;
|
|
335
|
+
}
|
|
336
|
+
.tab[data-selected]:hover {
|
|
337
|
+
background-color: blue;
|
|
338
|
+
color: white;
|
|
339
|
+
}
|
|
340
|
+
.tab:not([data-selected]) {
|
|
341
|
+
border-collapse: collapse;
|
|
342
|
+
border: black inset 1px;
|
|
343
|
+
background-color: lightgray;
|
|
344
|
+
}
|
|
345
|
+
.tab:not([data-selected]):hover {
|
|
346
|
+
background-color: blue;
|
|
347
|
+
color: white;
|
|
348
|
+
}
|
|
349
|
+
.tabpanel:not([data-selected]) {
|
|
350
|
+
display: none;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
code {
|
|
354
|
+
border: 1px dotted black;
|
|
355
|
+
background-color: lightgray;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
.vbox {
|
|
359
|
+
display: flex;
|
|
360
|
+
flex-direction: column;
|
|
361
|
+
}
|
|
362
|
+
.hbox {
|
|
363
|
+
display: flex;
|
|
364
|
+
flex-direction: row;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
#chart_selectchar_persist_vbox > fieldset {
|
|
368
|
+
display: flex;
|
|
369
|
+
flex-direction: column;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
#chart_selectchar_persist_vbox .hbox {
|
|
373
|
+
display: flex;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
#chart_selectchar_persist_vbox .hbox > div {
|
|
377
|
+
flex: 1;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
#chart_selectchar_persist_vbox .hbox > input {
|
|
381
|
+
flex: 1;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
/* Odd behavior whereby hidden doesn't work with display: flex */
|
|
385
|
+
[hidden] {
|
|
386
|
+
display:none;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
#insertEntityFile {
|
|
390
|
+
width: 200px;
|
|
391
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {jml} from '../../vendor/jamilih/dist/jml-es.js';
|
|
2
|
+
|
|
3
|
+
export const code = function ({arg}) {
|
|
4
|
+
return jml('code', [arg]);
|
|
5
|
+
};
|
|
6
|
+
export const link = function ({arg}) {
|
|
7
|
+
// Todo: Could parse arg for link different from text
|
|
8
|
+
return jml('a', {
|
|
9
|
+
href: arg,
|
|
10
|
+
target: '_blank'
|
|
11
|
+
}, [arg]);
|
|
12
|
+
};
|