bitwrench 1.2.16 → 2.0.7

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.
Files changed (130) hide show
  1. package/README.md +160 -158
  2. package/bin/bitwrench.js +3 -0
  3. package/dist/bitwrench-code-edit.cjs.js +639 -0
  4. package/dist/bitwrench-code-edit.es5.js +875 -0
  5. package/dist/bitwrench-code-edit.es5.min.js +15 -0
  6. package/dist/bitwrench-code-edit.esm.js +628 -0
  7. package/dist/bitwrench-code-edit.esm.min.js +15 -0
  8. package/dist/bitwrench-code-edit.umd.js +645 -0
  9. package/dist/bitwrench-code-edit.umd.min.js +15 -0
  10. package/dist/bitwrench.cjs.js +6983 -0
  11. package/dist/bitwrench.cjs.min.js +62 -0
  12. package/dist/bitwrench.css +5100 -0
  13. package/dist/bitwrench.es5.js +8446 -0
  14. package/dist/bitwrench.es5.min.js +31 -0
  15. package/dist/bitwrench.esm.js +6981 -0
  16. package/dist/bitwrench.esm.min.js +62 -0
  17. package/dist/bitwrench.umd.js +6989 -0
  18. package/dist/bitwrench.umd.min.js +62 -0
  19. package/dist/builds.json +127 -0
  20. package/dist/sri.json +18 -0
  21. package/package.json +86 -24
  22. package/readme.html +288 -0
  23. package/src/bitwrench-code-edit.js +627 -0
  24. package/src/bitwrench-color-utils.js +311 -0
  25. package/src/bitwrench-component-base.js +736 -0
  26. package/src/bitwrench-components-inline.js +374 -0
  27. package/src/bitwrench-components-v2.js +1879 -0
  28. package/src/bitwrench-components.js +610 -0
  29. package/src/bitwrench-styles.js +3240 -0
  30. package/src/bitwrench.js +3367 -0
  31. package/src/cli/convert.js +205 -0
  32. package/src/cli/index.js +122 -0
  33. package/src/cli/inject.js +55 -0
  34. package/src/cli/layout-default.js +142 -0
  35. package/src/generate-css.js +381 -0
  36. package/src/vendor/quikdown.js +654 -0
  37. package/src/version.js +16 -0
  38. package/.eslintrc.json +0 -27
  39. package/.github/workflows/codeql-analysis.yml +0 -72
  40. package/.travis.yml +0 -34
  41. package/bitwrench.css +0 -92
  42. package/bitwrench.js +0 -3348
  43. package/bitwrench.js_sri.txt +0 -1
  44. package/bitwrench.min.js +0 -1
  45. package/bitwrench.min.js_sri.txt +0 -1
  46. package/bitwrench_ESM.js +0 -3207
  47. package/bitwrench_ESM.js_sri.txt +0 -1
  48. package/bitwrench_ESM.min.js +0 -1
  49. package/bitwrench_ESM.min.js_sri.txt +0 -1
  50. package/dev/bitwrench-todo.md +0 -215
  51. package/dev/css-arrows.md +0 -23
  52. package/dev/docStringDev.js +0 -124
  53. package/dev/docStringParseDev.js +0 -171
  54. package/dev/example11-load-mjs-page.html +0 -17
  55. package/dev/figures.html +0 -37
  56. package/dev/html_gen.js +0 -349
  57. package/dev/htmld.md +0 -250
  58. package/dev/htmldev.html +0 -45
  59. package/dev/index-old.html +0 -87
  60. package/dev/misc-notes.md +0 -21
  61. package/dev/norm.css +0 -30
  62. package/dev/notes.md +0 -2
  63. package/dev/pageData.mjs +0 -69
  64. package/dev/sizes.html +0 -49
  65. package/dev/universal-js-module.js +0 -37
  66. package/examples/example1.html +0 -78
  67. package/examples/example10.html +0 -84
  68. package/examples/example11.html +0 -17
  69. package/examples/example12.html +0 -18
  70. package/examples/example2.html +0 -44
  71. package/examples/example3.html +0 -50
  72. package/examples/example4.html +0 -22
  73. package/examples/example5.html +0 -82
  74. package/examples/example6.html +0 -128
  75. package/examples/example7.html +0 -91
  76. package/examples/example8.html +0 -27
  77. package/examples/example9.html +0 -102
  78. package/examples/examplePageData12.mjs +0 -73
  79. package/examples/pageData.mjs +0 -69
  80. package/examples/pico.min.css +0 -5
  81. package/icon/bitwrench-dark-tall.png +0 -0
  82. package/icon/bitwrench-dark.png +0 -0
  83. package/icon/bitwrench-icon-lt-grey.png +0 -0
  84. package/icon/bitwrench-icon.vsd +0 -0
  85. package/icon/bitwrench-logo-dark.png +0 -0
  86. package/icon/bitwrench-logo-full.png +0 -0
  87. package/icon/bitwrench-logo-green.png +0 -0
  88. package/icon/bitwrench-logo-grey.png +0 -0
  89. package/icon/bitwrench-logo-white.png +0 -0
  90. package/icon/bitwrench-logos-colors.png +0 -0
  91. package/icon/bitwrench-thick-logo.png +0 -0
  92. package/icon/bitwrench-thick-teal/android-chrome-192x192.png +0 -0
  93. package/icon/bitwrench-thick-teal/android-chrome-512x512.png +0 -0
  94. package/icon/bitwrench-thick-teal/apple-touch-icon.png +0 -0
  95. package/icon/bitwrench-thick-teal/browserconfig.xml +0 -9
  96. package/icon/bitwrench-thick-teal/favicon-16x16.png +0 -0
  97. package/icon/bitwrench-thick-teal/favicon-32x32.png +0 -0
  98. package/icon/bitwrench-thick-teal/favicon.ico +0 -0
  99. package/icon/bitwrench-thick-teal/mstile-144x144.png +0 -0
  100. package/icon/bitwrench-thick-teal/mstile-150x150.png +0 -0
  101. package/icon/bitwrench-thick-teal/mstile-310x150.png +0 -0
  102. package/icon/bitwrench-thick-teal/mstile-310x310.png +0 -0
  103. package/icon/bitwrench-thick-teal/mstile-70x70.png +0 -0
  104. package/icon/bitwrench-thick-teal/site.webmanifest +0 -19
  105. package/icon/bitwrench-thick-teal.ico +0 -0
  106. package/icon/bitwrench-thick-teal.svg +0 -44
  107. package/icon/bitwrench-thick-teal.zip +0 -0
  108. package/icon/favicon-test.html +0 -20
  109. package/icon/logos-test.PNG +0 -0
  110. package/images/bitwrench-512x512.png +0 -0
  111. package/images/bitwrench-logo-med.png +0 -0
  112. package/images/bitwrench-thick-logo.png +0 -0
  113. package/images/bitwrench-thick-logo.svg +0 -64
  114. package/images/bitwrench-thick-teal.ico +0 -0
  115. package/images/favicon.ico +0 -0
  116. package/index.html +0 -282
  117. package/instr_tmp/bitwrench.js +0 -1350
  118. package/karma.conf.js +0 -140
  119. package/makefile +0 -21
  120. package/quick-docs.html +0 -206
  121. package/test/bitwrench_test.js +0 -1255
  122. package/test/karma-test.js +0 -1081
  123. package/tools/bw_deprecatedNames.js +0 -19
  124. package/tools/bwconsole.js +0 -20
  125. package/tools/createSimpleHTMLPage.js +0 -41
  126. package/tools/emitreadme.sh +0 -4
  127. package/tools/export-bw-default-css.js +0 -41
  128. package/tools/umd2ModuleHack.js +0 -32
  129. package/tools/update-bw-package.js +0 -36
  130. package/tools/updatereadme.js +0 -34
@@ -1,19 +0,0 @@
1
- //now that bitwrench as emerged from alpha status some old names were dropped use this functions to map old names to current functions.
2
- function useDepcreatedNames(bitwrenchInstance) {
3
-
4
- var names = {
5
- "HTMLSafeStr" : "htmlSafeStr",
6
- "makeHTML" : "html",
7
- "buildHTMLObjString": "html",
8
- "makeHTMLList" : "htmlList",
9
- "makeHTMLTabs" : "htmlTabs",
10
- "makeHTMLTableStr" : "htmlTable",
11
- "markElement" : "DOMClass",
12
- "bwSimpleStyles" : "CSSSimpleStyles",
13
- "naturalSort" : "naturalCompare",
14
- "bwSimpleThemes" : "CSSSimpleThemes"
15
-
16
- for (i in names)
17
- bitwrenchInstance[i] = bitwrenchInstance[names[i]];
18
- return bitwrenchInstance;
19
- }
@@ -1,20 +0,0 @@
1
- #!/bin/sh
2
- ':' //; exec "$(command -v nodejs || command -v node)" "$0" "$@"
3
-
4
- //The above shenbang allows running on systems whether nodejs exec is called 'node'
5
- //or called 'nodejs' which is common on many debian systems such as Ubuntu.
6
-
7
- //more traditional shebang would be:
8
- //#!/usr/bin/env node
9
-
10
- //===============================================
11
- // bitwrench console apps starter
12
- //begin actual javascript below
13
-
14
- var fs = require('fs');
15
- var bw = require('../bitwrench.js')
16
-
17
- console.log ("bitwrench version:"+bw.version()["version"]);
18
-
19
- // do stuff with bitwrench.js at command line
20
-
@@ -1,41 +0,0 @@
1
- #!/bin/sh
2
- ':' //; exec "$(command -v nodejs || command -v node)" "$0" "$@"
3
-
4
- //The above shenbang allows running on systems whether nodejs exec is called 'node'
5
- //or called 'nodejs' which is common on many debian systems such as Ubuntu.
6
-
7
- //more traditional shebang would be:
8
- //#!/usr/bin/env node
9
-
10
- //begin actual javascript below
11
-
12
- var bw = require('../bitwrench.js');
13
-
14
- console.log ("Create simple web page\n using bw version:"+bw.version()["version"]+"\n ");
15
-
16
- /* process cmd line notes
17
-
18
- process.argv[0] --> nodejs executable
19
- process.argv[1] --> /full/path/to/this/file/createSimpleHTMLPage.js
20
- process.argv[2] --> export_filename
21
-
22
- */
23
-
24
- if (bw.typeOf(process.argv[2]) == "string") {
25
- var pageHTML = bw.makeHTMLPage(
26
- "\n"+
27
- bw.buildHTMLObjString(["title",{},"Simple HTML Page"])+
28
- '\n'+
29
- bw.bwSimpleStyles(true,{"basics":"load","exportCSS":true})
30
- ,
31
- [
32
- ["h2",{},"Simple Page"],
33
- ["p" ,{},bw.loremIpsum(800)],
34
- ["h3",{},"another heading"],
35
- ["p" ,{},bw.loremIpsum(800)]
36
- ].map(function(x){return bw.buildHTMLObjString(x) }).join("\n")
37
- )
38
-
39
-
40
- bw.saveClientFile(process.argv[2],pageHTML); // if running on node this internally uses ==> var fs = require('fs');
41
- }
@@ -1,4 +0,0 @@
1
- ../docbat/src/docbat-old.js -i README.md -o index.html
2
- #<link rel="stylesheet" href="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.18.0/build/styles/default.min.css">
3
- #<script src="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.18.0/build/highlight.min.js"></script>
4
- #<script>hljs.initHighlightingOnLoad();</script>
@@ -1,41 +0,0 @@
1
- #!/bin/sh
2
- ':' //; exec "$(command -v nodejs || command -v node)" "$0" "$@"
3
-
4
- //The above shenbang allows running on systems whether nodejs exec is called 'node'
5
- //or called 'nodejs' which is common on many debian systems such as Ubuntu.
6
-
7
- //more traditional shebang would be:
8
- //#!/usr/bin/env node
9
-
10
- //begin actual javascript below
11
-
12
- var bw = require('../bitwrench.js');
13
-
14
- console.log ("Export bitwrench css: using bw version:"+bw.version()["version"]+"\n ");
15
-
16
- /* process cmd line notes
17
-
18
- process.argv[0] --> nodejs executable
19
- process.argv[1] --> /full/path/to/this/file/update-bw-package.js
20
- process.argv[2] --> export_filename
21
-
22
- */
23
-
24
- if (process.argv.length <=1 ) {//no parameters specified
25
- console.log("bitwrench in-built css exporter\n\n");
26
- console.log("arguments:\n");
27
- console.log("export-bw-default-css.js filename-to-export ==> exports in-built css classes to specified filename");
28
- console.log("export-bw-default.css.js filename-to-export false|load ==> exports in-built css turning on/off global container defs");
29
- }
30
-
31
- if (bw.typeOf(process.argv[2]) == "string") {
32
- var bwCSSExport = "";
33
- bwCSSExport += "/*\"\"\"\n";
34
- bwCSSExport += "bitwrench.css version " + bw.version()["version"]+ "\n";
35
- bwCSSExport += "bitwrench.js exported css classes (auto generated)\nThis file contains the same css classes (styles used by bitwrench.js) and can be used stand-alone.\n\nIt is not required to load this file when using bitwrench.js since its built in to the bitwrench.js library and autoloaded.\n\n";
36
- bwCSSExport += "This file can be generated at runtime via bw.CSSSimpleStyles(false,{\"basics\":\"load\"}) and saving the data. Also note that this version includes global css (* {}) rules which aren't required but useful for quick-n-dirty development";
37
- bwCSSExport += "\n\n\"\"\"*/";
38
- bwCSSExport += bw.CSSSimpleStyles(false,{"globals":process.argv[3]});
39
-
40
- bw.saveClientFile(process.argv[2],bwCSSExport); // if running on node this internally uses ==> var fs = require('fs');
41
- }
@@ -1,32 +0,0 @@
1
- #!/bin/sh
2
- ':' //; exec "$(command -v nodejs || command -v node)" "$0" "$@"
3
-
4
- // the above is a 'unversal' shebang regardless of whether node or nodejs is installed.
5
-
6
- const fs=require('fs');
7
- var umdlib = require('../bitwrench.js');
8
-
9
- console.log ("running UMD converter hack..");
10
-
11
- s= fs.readFile('./bitwrench.js','utf8', (err,is)=>
12
- {
13
- src= String(is);
14
-
15
- r = /\/\/BEGIN_LIBRARY_CODE([\s\SA-Za-z0-9.]+)\/\/END_LIBRARY_CODE/gm
16
- let a = src.match(r);
17
- let lcode = a[0].substring("//BEGIN_LIBRARY_CODE".length,a[0].length-("//END_LIBRARY_CODE".length));
18
-
19
-
20
- let mcode = "export let "+ umdlib.exportName+" = (()=>{\n"+lcode+"\n})();\n";
21
- mcode += "export default " + umdlib.exportName +";\n";
22
-
23
- try {
24
- fs.writeFileSync("./bitwrench_ESM.js", mcode);
25
- }
26
- catch (err) {
27
- console.error(err);
28
- }
29
-
30
-
31
-
32
- });
@@ -1,36 +0,0 @@
1
- #!/bin/sh
2
- ':' //; exec "$(command -v nodejs || command -v node)" "$0" "$@"
3
-
4
- //The above shenbang allows running on systems whether nodejs exec is called 'node'
5
- //or called 'nodejs' which is common on many debian systems such as Ubuntu.
6
-
7
- //more traditional shebang would be:
8
- //#!/usr/bin/env node
9
-
10
- //begin actual javascript below
11
-
12
- var bw = require('../bitwrench.js');
13
-
14
- //console.log ("bitwrench version:"+bw.version()["version"]+" package version updater loaded.\n ");
15
-
16
- /* process cmd line
17
- process.argv[0] --> nodejs executable
18
- process.argv[1] --> /full/path/to/this/file/update-bw-package.js
19
- process.argv[2] --> input_filename
20
- process.argv[3] --> output_filename
21
-
22
- */
23
-
24
- if (process.argv.length <=2) {
25
- console.log("update-bw-package: no arguments supplied (no operations performed). \nThis tool updates the version number in package.json\n\n");
26
- console.log("usage:\n ./udpate-bw-package original-package.json updated.json\n\n");
27
- }
28
- else {
29
- if ((bw.typeOf(process.argv[2]) == "string") && (bw.typeOf(process.argv[3]) == "string")) {
30
- var savePackage = function (data) {
31
- data["version"] = bw.version()["version"]; // get bitwrench version from itself...
32
- bw.saveClientFile(process.argv[3],JSON.stringify(data, null, "\t")); // use bitwrench internal file ops to write json file back
33
- }
34
- bw.getJSONFile(process.argv[2], savePackage); // use bitwrench internal ops to fetch original json file
35
- }
36
- }
@@ -1,34 +0,0 @@
1
- #!/bin/sh
2
- ':' //; exec "$(command -v nodejs || command -v node)" "$0" "$@"
3
- //begin actual javascript below
4
-
5
- var bw = require('../bitwrench.js');
6
-
7
- //console.log ("bitwrench version:"+bw.version()["version"]+" package version updater loaded.\n ");
8
-
9
- /* process cmd line
10
- process.argv[0] --> nodejs executable
11
- process.argv[1] --> /full/path/to/this/file/update-bw-package.js
12
- process.argv[2] --> input_filename
13
- process.argv[3] --> output_filename
14
-
15
- */
16
-
17
- if (process.argv.length <=2) {
18
- console.log("update-bw-package: no arguments supplied (no operations performed). \nThis tool updates index.html to have highlighths support. \nNote that in the future docbat.js will handle this.\n\n");
19
- console.log("usage:\n ./udpatereadme index.html index.html\n\n");
20
- }
21
- else {
22
- if ((bw.typeOf(process.argv[2]) == "string") && (bw.typeOf(process.argv[3]) == "string")) {
23
- var update = function (data) {
24
- var hl =
25
- `
26
- <link rel="stylesheet" href="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.18.0/build/styles/default.min.css">
27
- <script src="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.18.0/build/highlight.min.js"></script>
28
- <script>hljs.initHighlightingOnLoad();</script>`;
29
-
30
- bw.saveClientFile(process.argv[3],data.replace("<head>","\n<head>\n"+hl+"\n")); // use bitwrench internal file ops to write json file back
31
- }
32
- bw.getFile(process.argv[2], update); // use bitwrench internal ops to fetch original json file
33
- }
34
- }