bitwrench 2.0.9 → 2.0.10
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/dist/bitwrench-code-edit.cjs.js +1 -1
- package/dist/bitwrench-code-edit.es5.js +1 -1
- package/dist/bitwrench-code-edit.es5.min.js +1 -1
- package/dist/bitwrench-code-edit.esm.js +1 -1
- package/dist/bitwrench-code-edit.esm.min.js +1 -1
- package/dist/bitwrench-code-edit.umd.js +1 -1
- package/dist/bitwrench-code-edit.umd.min.js +1 -1
- package/dist/bitwrench.cjs.js +3 -3
- package/dist/bitwrench.cjs.min.js +2 -2
- package/dist/bitwrench.es5.js +3 -3
- package/dist/bitwrench.es5.min.js +2 -2
- package/dist/bitwrench.esm.js +3 -3
- package/dist/bitwrench.esm.min.js +2 -2
- package/dist/bitwrench.umd.js +3 -3
- package/dist/bitwrench.umd.min.js +2 -2
- package/dist/builds.json +87 -32
- package/dist/sri.json +17 -12
- package/package.json +3 -2
- package/readme.html +98 -121
- package/src/version.js +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! bitwrench v2.0.
|
|
1
|
+
/*! bitwrench v2.0.10 | BSD-2-Clause | http://deftio.com/bitwrench */
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! bitwrench v2.0.
|
|
1
|
+
/*! bitwrench v2.0.10 | BSD-2-Clause | http://deftio.com/bitwrench */
|
|
2
2
|
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).bwCodeEdit={})}(this,function(e){"use strict";
|
|
3
3
|
/**
|
|
4
4
|
* bitwrench-code-edit.js - syntax-highlighted contenteditable code editor addon
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! bitwrench v2.0.
|
|
1
|
+
/*! bitwrench v2.0.10 | BSD-2-Clause | http://deftio.com/bitwrench */
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! bitwrench v2.0.
|
|
1
|
+
/*! bitwrench v2.0.10 | BSD-2-Clause | http://deftio.com/bitwrench */
|
|
2
2
|
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).bwCodeEdit={})}(this,function(e){"use strict";
|
|
3
3
|
/**
|
|
4
4
|
* bitwrench-code-edit.js - syntax-highlighted contenteditable code editor addon
|
package/dist/bitwrench.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! bitwrench v2.0.
|
|
1
|
+
/*! bitwrench v2.0.10 | BSD-2-Clause | http://deftio.com/bitwrench */
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -7,14 +7,14 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
const VERSION_INFO = {
|
|
10
|
-
version: '2.0.
|
|
10
|
+
version: '2.0.10',
|
|
11
11
|
name: 'bitwrench',
|
|
12
12
|
description: 'A library for javascript UI functions.',
|
|
13
13
|
license: 'BSD-2-Clause',
|
|
14
14
|
homepage: 'http://deftio.com/bitwrench',
|
|
15
15
|
repository: 'git+https://github.com/deftio/bitwrench.git',
|
|
16
16
|
author: 'manu a. chatterjee <deftio@deftio.com> (https://deftio.com/)',
|
|
17
|
-
buildDate: '2026-03-
|
|
17
|
+
buildDate: '2026-03-07T03:14:16.606Z'
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! bitwrench v2.0.
|
|
2
|
-
"use strict";const e={version:"2.0.
|
|
1
|
+
/*! bitwrench v2.0.10 | BSD-2-Clause | http://deftio.com/bitwrench */
|
|
2
|
+
"use strict";const e={version:"2.0.10",name:"bitwrench",description:"A library for javascript UI functions.",license:"BSD-2-Clause",homepage:"http://deftio.com/bitwrench",repository:"git+https://github.com/deftio/bitwrench.git",author:"manu a. chatterjee <deftio@deftio.com> (https://deftio.com/)",buildDate:"2026-03-07T03:14:16.606Z"};
|
|
3
3
|
/**
|
|
4
4
|
* Bitwrench Color Utilities
|
|
5
5
|
*
|
package/dist/bitwrench.es5.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! bitwrench v2.0.
|
|
1
|
+
/*! bitwrench v2.0.10 | BSD-2-Clause | http://deftio.com/bitwrench */
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(factory) :
|
|
@@ -203,14 +203,14 @@
|
|
|
203
203
|
*/
|
|
204
204
|
|
|
205
205
|
var VERSION_INFO = {
|
|
206
|
-
version: '2.0.
|
|
206
|
+
version: '2.0.10',
|
|
207
207
|
name: 'bitwrench',
|
|
208
208
|
description: 'A library for javascript UI functions.',
|
|
209
209
|
license: 'BSD-2-Clause',
|
|
210
210
|
homepage: 'http://deftio.com/bitwrench',
|
|
211
211
|
repository: 'git+https://github.com/deftio/bitwrench.git',
|
|
212
212
|
author: 'manu a. chatterjee <deftio@deftio.com> (https://deftio.com/)',
|
|
213
|
-
buildDate: '2026-03-
|
|
213
|
+
buildDate: '2026-03-07T03:14:16.606Z'
|
|
214
214
|
};
|
|
215
215
|
|
|
216
216
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! bitwrench v2.0.
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).bw=t()}(this,function(){"use strict";function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=Array(t);r<t;r++)a[r]=e[r];return a}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,r){return t&&function(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,s(a.key),a)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e,t,r){return(t=s(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,a)}return r}function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach(function(t){a(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function i(e,t){if(null==e)return{};var r,a,n=function(e,t){if(null==e)return{};var r={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==t.indexOf(a))continue;r[a]=e[a]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a,n,o,i,c=[],l=!0,s=!1;try{if(o=(r=r.call(e)).next,0===t);else for(;!(l=(a=o.call(r)).done)&&(c.push(a.value),c.length!==t);l=!0);}catch(e){s=!0,n=e}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(s)throw n}}return c}}(e,t)||b(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(t){return function(t){if(Array.isArray(t))return e(t)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||b(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t);if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function b(t,r){if(t){if("string"==typeof t)return e(t,r);var a={}.toString.call(t).slice(8,-1);return"Object"===a&&t.constructor&&(a=t.constructor.name),"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?e(t,r):void 0}}var u,m,f={version:"2.0.
|
|
1
|
+
/*! bitwrench v2.0.10 | BSD-2-Clause | http://deftio.com/bitwrench */
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).bw=t()}(this,function(){"use strict";function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=Array(t);r<t;r++)a[r]=e[r];return a}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,r){return t&&function(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,s(a.key),a)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e,t,r){return(t=s(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,a)}return r}function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach(function(t){a(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function i(e,t){if(null==e)return{};var r,a,n=function(e,t){if(null==e)return{};var r={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==t.indexOf(a))continue;r[a]=e[a]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a,n,o,i,c=[],l=!0,s=!1;try{if(o=(r=r.call(e)).next,0===t);else for(;!(l=(a=o.call(r)).done)&&(c.push(a.value),c.length!==t);l=!0);}catch(e){s=!0,n=e}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(s)throw n}}return c}}(e,t)||b(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(t){return function(t){if(Array.isArray(t))return e(t)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||b(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t);if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function b(t,r){if(t){if("string"==typeof t)return e(t,r);var a={}.toString.call(t).slice(8,-1);return"Object"===a&&t.constructor&&(a=t.constructor.name),"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?e(t,r):void 0}}var u,m,f={version:"2.0.10",name:"bitwrench",description:"A library for javascript UI functions.",license:"BSD-2-Clause",homepage:"http://deftio.com/bitwrench",repository:"git+https://github.com/deftio/bitwrench.git",author:"manu a. chatterjee <deftio@deftio.com> (https://deftio.com/)",buildDate:"2026-03-07T03:14:16.606Z"};
|
|
3
3
|
/**
|
|
4
4
|
* Bitwrench Color Utilities
|
|
5
5
|
*
|
package/dist/bitwrench.esm.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
/*! bitwrench v2.0.
|
|
1
|
+
/*! bitwrench v2.0.10 | BSD-2-Clause | http://deftio.com/bitwrench */
|
|
2
2
|
/**
|
|
3
3
|
* Auto-generated version file from package.json
|
|
4
4
|
* DO NOT EDIT DIRECTLY - Use npm run generate-version
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
const VERSION_INFO = {
|
|
8
|
-
version: '2.0.
|
|
8
|
+
version: '2.0.10',
|
|
9
9
|
name: 'bitwrench',
|
|
10
10
|
description: 'A library for javascript UI functions.',
|
|
11
11
|
license: 'BSD-2-Clause',
|
|
12
12
|
homepage: 'http://deftio.com/bitwrench',
|
|
13
13
|
repository: 'git+https://github.com/deftio/bitwrench.git',
|
|
14
14
|
author: 'manu a. chatterjee <deftio@deftio.com> (https://deftio.com/)',
|
|
15
|
-
buildDate: '2026-03-
|
|
15
|
+
buildDate: '2026-03-07T03:14:16.606Z'
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! bitwrench v2.0.
|
|
2
|
-
const e={version:"2.0.
|
|
1
|
+
/*! bitwrench v2.0.10 | BSD-2-Clause | http://deftio.com/bitwrench */
|
|
2
|
+
const e={version:"2.0.10",name:"bitwrench",description:"A library for javascript UI functions.",license:"BSD-2-Clause",homepage:"http://deftio.com/bitwrench",repository:"git+https://github.com/deftio/bitwrench.git",author:"manu a. chatterjee <deftio@deftio.com> (https://deftio.com/)",buildDate:"2026-03-07T03:14:16.606Z"};
|
|
3
3
|
/**
|
|
4
4
|
* Bitwrench Color Utilities
|
|
5
5
|
*
|
package/dist/bitwrench.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! bitwrench v2.0.
|
|
1
|
+
/*! bitwrench v2.0.10 | BSD-2-Clause | http://deftio.com/bitwrench */
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(factory) :
|
|
@@ -11,14 +11,14 @@
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
const VERSION_INFO = {
|
|
14
|
-
version: '2.0.
|
|
14
|
+
version: '2.0.10',
|
|
15
15
|
name: 'bitwrench',
|
|
16
16
|
description: 'A library for javascript UI functions.',
|
|
17
17
|
license: 'BSD-2-Clause',
|
|
18
18
|
homepage: 'http://deftio.com/bitwrench',
|
|
19
19
|
repository: 'git+https://github.com/deftio/bitwrench.git',
|
|
20
20
|
author: 'manu a. chatterjee <deftio@deftio.com> (https://deftio.com/)',
|
|
21
|
-
buildDate: '2026-03-
|
|
21
|
+
buildDate: '2026-03-07T03:14:16.606Z'
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! bitwrench v2.0.
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).bw=t()}(this,function(){"use strict";const e={version:"2.0.
|
|
1
|
+
/*! bitwrench v2.0.10 | BSD-2-Clause | http://deftio.com/bitwrench */
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).bw=t()}(this,function(){"use strict";const e={version:"2.0.10",name:"bitwrench",description:"A library for javascript UI functions.",license:"BSD-2-Clause",homepage:"http://deftio.com/bitwrench",repository:"git+https://github.com/deftio/bitwrench.git",author:"manu a. chatterjee <deftio@deftio.com> (https://deftio.com/)",buildDate:"2026-03-07T03:14:16.606Z"};
|
|
3
3
|
/**
|
|
4
4
|
* Bitwrench Color Utilities
|
|
5
5
|
*
|
package/dist/builds.json
CHANGED
|
@@ -1,17 +1,28 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.0.
|
|
3
|
-
"buildDate": "2026-03-
|
|
2
|
+
"version": "2.0.10",
|
|
3
|
+
"buildDate": "2026-03-07",
|
|
4
4
|
"files": [
|
|
5
|
+
{
|
|
6
|
+
"file": "bitwrench-code-edit.cjs.js",
|
|
7
|
+
"format": "CJS",
|
|
8
|
+
"ver": "2.x",
|
|
9
|
+
"component": "code-edit",
|
|
10
|
+
"minified": false,
|
|
11
|
+
"raw": 21181,
|
|
12
|
+
"gzipped": 5365,
|
|
13
|
+
"sourceMap": true,
|
|
14
|
+
"integrity": "sha384-ZDG4T26c2Kd/atSxXUF6Z6QADRf5++AzJPxU85csAj3T4kg+cRh/THQmBV0O1Dz6"
|
|
15
|
+
},
|
|
5
16
|
{
|
|
6
17
|
"file": "bitwrench.cjs.js",
|
|
7
18
|
"format": "CJS",
|
|
8
19
|
"ver": "2.x",
|
|
9
20
|
"component": "core",
|
|
10
21
|
"minified": false,
|
|
11
|
-
"raw":
|
|
12
|
-
"gzipped":
|
|
22
|
+
"raw": 230544,
|
|
23
|
+
"gzipped": 57136,
|
|
13
24
|
"sourceMap": true,
|
|
14
|
-
"integrity": "sha384-
|
|
25
|
+
"integrity": "sha384-Tq09raROch+iyRC9Xkr6aIpvznMyrWeEQ+u78882CXs/i+wCDfQhyfnOYoT2W72X"
|
|
15
26
|
},
|
|
16
27
|
{
|
|
17
28
|
"file": "bitwrench.cjs.min.js",
|
|
@@ -19,10 +30,10 @@
|
|
|
19
30
|
"ver": "2.x",
|
|
20
31
|
"component": "core",
|
|
21
32
|
"minified": true,
|
|
22
|
-
"raw":
|
|
23
|
-
"gzipped":
|
|
33
|
+
"raw": 87485,
|
|
34
|
+
"gzipped": 25466,
|
|
24
35
|
"sourceMap": true,
|
|
25
|
-
"integrity": "sha384-
|
|
36
|
+
"integrity": "sha384-6eP9NKzyYNSZYWxFDIkO4gFQ5tixtvOihgNEzifSW4ELPqMuD1m67Lzr8SuWXewz"
|
|
26
37
|
},
|
|
27
38
|
{
|
|
28
39
|
"file": "bitwrench.css",
|
|
@@ -35,16 +46,38 @@
|
|
|
35
46
|
"sourceMap": false,
|
|
36
47
|
"integrity": "sha384-dEPy+0GGtrozVasm9ZPP9V7pRp/ZmmLH5tZU5UF/kYTtu1RNkOeRu+3jS2Jm7Aq/"
|
|
37
48
|
},
|
|
49
|
+
{
|
|
50
|
+
"file": "bitwrench-code-edit.es5.js",
|
|
51
|
+
"format": "ES5 (UMD)",
|
|
52
|
+
"ver": "2.x",
|
|
53
|
+
"component": "code-edit",
|
|
54
|
+
"minified": false,
|
|
55
|
+
"raw": 25712,
|
|
56
|
+
"gzipped": 5697,
|
|
57
|
+
"sourceMap": true,
|
|
58
|
+
"integrity": "sha384-ge8NNKcd4A7oybNMKdJ3M0gn3QEsnlLg8ulPZzSBIcqdjMkWIynv008HrwTuYSVT"
|
|
59
|
+
},
|
|
38
60
|
{
|
|
39
61
|
"file": "bitwrench.es5.js",
|
|
40
62
|
"format": "ES5 (UMD)",
|
|
41
63
|
"ver": "2.x",
|
|
42
64
|
"component": "core",
|
|
43
65
|
"minified": false,
|
|
44
|
-
"raw":
|
|
45
|
-
"gzipped":
|
|
66
|
+
"raw": 279011,
|
|
67
|
+
"gzipped": 62837,
|
|
46
68
|
"sourceMap": true,
|
|
47
|
-
"integrity": "sha384-
|
|
69
|
+
"integrity": "sha384-Wb1ZP5WjsQjsj/Uz0+opLBNmrvvmyimVBHR7IBdbkqUxbQJjP/w8PgNsJvc5jDx7"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"file": "bitwrench-code-edit.es5.min.js",
|
|
73
|
+
"format": "ES5 (UMD)",
|
|
74
|
+
"ver": "2.x",
|
|
75
|
+
"component": "code-edit",
|
|
76
|
+
"minified": true,
|
|
77
|
+
"raw": 10813,
|
|
78
|
+
"gzipped": 3901,
|
|
79
|
+
"sourceMap": true,
|
|
80
|
+
"integrity": "sha384-kPTwk+olOnervV5AWVTym7m1hIDAv0UqYoVuRbPdrR8ZVyKiptLpyF7DlD9Ks65P"
|
|
48
81
|
},
|
|
49
82
|
{
|
|
50
83
|
"file": "bitwrench.es5.min.js",
|
|
@@ -52,10 +85,21 @@
|
|
|
52
85
|
"ver": "2.x",
|
|
53
86
|
"component": "core",
|
|
54
87
|
"minified": true,
|
|
55
|
-
"raw":
|
|
56
|
-
"gzipped":
|
|
88
|
+
"raw": 99070,
|
|
89
|
+
"gzipped": 27956,
|
|
57
90
|
"sourceMap": true,
|
|
58
|
-
"integrity": "sha384-
|
|
91
|
+
"integrity": "sha384-0fcDXn6q211cB+ElxriMQ3pmqCPjE/cdgN6t6/ep3uKX6r4H/8EGj4RFGbbfwwKB"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"file": "bitwrench-code-edit.esm.js",
|
|
95
|
+
"format": "ESM",
|
|
96
|
+
"ver": "2.x",
|
|
97
|
+
"component": "code-edit",
|
|
98
|
+
"minified": false,
|
|
99
|
+
"raw": 20962,
|
|
100
|
+
"gzipped": 5286,
|
|
101
|
+
"sourceMap": true,
|
|
102
|
+
"integrity": "sha384-ykFG0PpuDXuqV80tCUH16VcioD1mZlZAPJNNs6o4K8Fj07zyTUggt80UUhJhNuSM"
|
|
59
103
|
},
|
|
60
104
|
{
|
|
61
105
|
"file": "bitwrench.esm.js",
|
|
@@ -63,10 +107,21 @@
|
|
|
63
107
|
"ver": "2.x",
|
|
64
108
|
"component": "core",
|
|
65
109
|
"minified": false,
|
|
66
|
-
"raw":
|
|
67
|
-
"gzipped":
|
|
110
|
+
"raw": 230534,
|
|
111
|
+
"gzipped": 57133,
|
|
112
|
+
"sourceMap": true,
|
|
113
|
+
"integrity": "sha384-gyB73n8O1KWJKHEqNNIXDdaYfjifuYtwQ0PTqtY3FJ1W6qG/bNTIzsHi0zaI12oY"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"file": "bitwrench-code-edit.esm.min.js",
|
|
117
|
+
"format": "ESM",
|
|
118
|
+
"ver": "2.x",
|
|
119
|
+
"component": "code-edit",
|
|
120
|
+
"minified": true,
|
|
121
|
+
"raw": 10515,
|
|
122
|
+
"gzipped": 3804,
|
|
68
123
|
"sourceMap": true,
|
|
69
|
-
"integrity": "sha384-
|
|
124
|
+
"integrity": "sha384-XEyi3eFWu94o6A12dygwAEv0Xe4kaGPuEX4NFc/fPZ5qE1uSseK3gVTQuahyikNE"
|
|
70
125
|
},
|
|
71
126
|
{
|
|
72
127
|
"file": "bitwrench.esm.min.js",
|
|
@@ -74,10 +129,10 @@
|
|
|
74
129
|
"ver": "2.x",
|
|
75
130
|
"component": "core",
|
|
76
131
|
"minified": true,
|
|
77
|
-
"raw":
|
|
78
|
-
"gzipped":
|
|
132
|
+
"raw": 87476,
|
|
133
|
+
"gzipped": 25463,
|
|
79
134
|
"sourceMap": true,
|
|
80
|
-
"integrity": "sha384-
|
|
135
|
+
"integrity": "sha384-NaA3/D3uGsr7Bw0l51I6nVDm7r1QvUmT4KmDIjgUR+BX/0+pHvSPSMNp8i4QDT7Y"
|
|
81
136
|
},
|
|
82
137
|
{
|
|
83
138
|
"file": "bitwrench-code-edit.umd.js",
|
|
@@ -85,10 +140,10 @@
|
|
|
85
140
|
"ver": "2.x",
|
|
86
141
|
"component": "code-edit",
|
|
87
142
|
"minified": false,
|
|
88
|
-
"raw":
|
|
89
|
-
"gzipped":
|
|
143
|
+
"raw": 22677,
|
|
144
|
+
"gzipped": 5528,
|
|
90
145
|
"sourceMap": true,
|
|
91
|
-
"integrity": "sha384-
|
|
146
|
+
"integrity": "sha384-2nvhpi52V19v0MqyZVvqKZAuq65mOHKgZZJUPsu+N8J0PaQVHtFsAjhz0qG6u/kc"
|
|
92
147
|
},
|
|
93
148
|
{
|
|
94
149
|
"file": "bitwrench.umd.js",
|
|
@@ -96,10 +151,10 @@
|
|
|
96
151
|
"ver": "2.x",
|
|
97
152
|
"component": "core",
|
|
98
153
|
"minified": false,
|
|
99
|
-
"raw":
|
|
100
|
-
"gzipped":
|
|
154
|
+
"raw": 244356,
|
|
155
|
+
"gzipped": 58032,
|
|
101
156
|
"sourceMap": true,
|
|
102
|
-
"integrity": "sha384-
|
|
157
|
+
"integrity": "sha384-DWVbNIn8H6/tQA91Z0bN5fAKN7xTTCQQ4Gu42TwXJ/r7nzEfEIl0JLoiCFLI589s"
|
|
103
158
|
},
|
|
104
159
|
{
|
|
105
160
|
"file": "bitwrench-code-edit.umd.min.js",
|
|
@@ -107,10 +162,10 @@
|
|
|
107
162
|
"ver": "2.x",
|
|
108
163
|
"component": "code-edit",
|
|
109
164
|
"minified": true,
|
|
110
|
-
"raw":
|
|
111
|
-
"gzipped":
|
|
165
|
+
"raw": 10813,
|
|
166
|
+
"gzipped": 3900,
|
|
112
167
|
"sourceMap": true,
|
|
113
|
-
"integrity": "sha384-
|
|
168
|
+
"integrity": "sha384-z9KVAIouchHaK+2IKhvYNuTxCJUuzusG7xE+CBDazXeDt/HJzNW3l3PxYJtIAVkA"
|
|
114
169
|
},
|
|
115
170
|
{
|
|
116
171
|
"file": "bitwrench.umd.min.js",
|
|
@@ -118,10 +173,10 @@
|
|
|
118
173
|
"ver": "2.x",
|
|
119
174
|
"component": "core",
|
|
120
175
|
"minified": true,
|
|
121
|
-
"raw":
|
|
122
|
-
"gzipped":
|
|
176
|
+
"raw": 87802,
|
|
177
|
+
"gzipped": 25547,
|
|
123
178
|
"sourceMap": true,
|
|
124
|
-
"integrity": "sha384-
|
|
179
|
+
"integrity": "sha384-u4R4325YoQoK9NkGIvdyXFDjE7aHqBqOG0ITov2bTwdn/apIkjOBCwSdVLcUYRp5"
|
|
125
180
|
}
|
|
126
181
|
]
|
|
127
182
|
}
|
package/dist/sri.json
CHANGED
|
@@ -1,18 +1,23 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.0.
|
|
2
|
+
"version": "2.0.10",
|
|
3
3
|
"algorithm": "sha384",
|
|
4
|
-
"generated": "2026-03-
|
|
4
|
+
"generated": "2026-03-07",
|
|
5
5
|
"files": {
|
|
6
|
-
"bitwrench-code-edit.
|
|
7
|
-
"bitwrench-code-edit.
|
|
8
|
-
"bitwrench.
|
|
9
|
-
"bitwrench.
|
|
6
|
+
"bitwrench-code-edit.cjs.js": "sha384-ZDG4T26c2Kd/atSxXUF6Z6QADRf5++AzJPxU85csAj3T4kg+cRh/THQmBV0O1Dz6",
|
|
7
|
+
"bitwrench-code-edit.es5.js": "sha384-ge8NNKcd4A7oybNMKdJ3M0gn3QEsnlLg8ulPZzSBIcqdjMkWIynv008HrwTuYSVT",
|
|
8
|
+
"bitwrench-code-edit.es5.min.js": "sha384-kPTwk+olOnervV5AWVTym7m1hIDAv0UqYoVuRbPdrR8ZVyKiptLpyF7DlD9Ks65P",
|
|
9
|
+
"bitwrench-code-edit.esm.js": "sha384-ykFG0PpuDXuqV80tCUH16VcioD1mZlZAPJNNs6o4K8Fj07zyTUggt80UUhJhNuSM",
|
|
10
|
+
"bitwrench-code-edit.esm.min.js": "sha384-XEyi3eFWu94o6A12dygwAEv0Xe4kaGPuEX4NFc/fPZ5qE1uSseK3gVTQuahyikNE",
|
|
11
|
+
"bitwrench-code-edit.umd.js": "sha384-2nvhpi52V19v0MqyZVvqKZAuq65mOHKgZZJUPsu+N8J0PaQVHtFsAjhz0qG6u/kc",
|
|
12
|
+
"bitwrench-code-edit.umd.min.js": "sha384-z9KVAIouchHaK+2IKhvYNuTxCJUuzusG7xE+CBDazXeDt/HJzNW3l3PxYJtIAVkA",
|
|
13
|
+
"bitwrench.cjs.js": "sha384-Tq09raROch+iyRC9Xkr6aIpvznMyrWeEQ+u78882CXs/i+wCDfQhyfnOYoT2W72X",
|
|
14
|
+
"bitwrench.cjs.min.js": "sha384-6eP9NKzyYNSZYWxFDIkO4gFQ5tixtvOihgNEzifSW4ELPqMuD1m67Lzr8SuWXewz",
|
|
10
15
|
"bitwrench.css": "sha384-dEPy+0GGtrozVasm9ZPP9V7pRp/ZmmLH5tZU5UF/kYTtu1RNkOeRu+3jS2Jm7Aq/",
|
|
11
|
-
"bitwrench.es5.js": "sha384-
|
|
12
|
-
"bitwrench.es5.min.js": "sha384-
|
|
13
|
-
"bitwrench.esm.js": "sha384-
|
|
14
|
-
"bitwrench.esm.min.js": "sha384-
|
|
15
|
-
"bitwrench.umd.js": "sha384-
|
|
16
|
-
"bitwrench.umd.min.js": "sha384-
|
|
16
|
+
"bitwrench.es5.js": "sha384-Wb1ZP5WjsQjsj/Uz0+opLBNmrvvmyimVBHR7IBdbkqUxbQJjP/w8PgNsJvc5jDx7",
|
|
17
|
+
"bitwrench.es5.min.js": "sha384-0fcDXn6q211cB+ElxriMQ3pmqCPjE/cdgN6t6/ep3uKX6r4H/8EGj4RFGbbfwwKB",
|
|
18
|
+
"bitwrench.esm.js": "sha384-gyB73n8O1KWJKHEqNNIXDdaYfjifuYtwQ0PTqtY3FJ1W6qG/bNTIzsHi0zaI12oY",
|
|
19
|
+
"bitwrench.esm.min.js": "sha384-NaA3/D3uGsr7Bw0l51I6nVDm7r1QvUmT4KmDIjgUR+BX/0+pHvSPSMNp8i4QDT7Y",
|
|
20
|
+
"bitwrench.umd.js": "sha384-DWVbNIn8H6/tQA91Z0bN5fAKN7xTTCQQ4Gu42TwXJ/r7nzEfEIl0JLoiCFLI589s",
|
|
21
|
+
"bitwrench.umd.min.js": "sha384-u4R4325YoQoK9NkGIvdyXFDjE7aHqBqOG0ITov2bTwdn/apIkjOBCwSdVLcUYRp5"
|
|
17
22
|
}
|
|
18
23
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bitwrench",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.10",
|
|
4
4
|
"description": "A library for javascript UI functions.",
|
|
5
5
|
"main": "./dist/bitwrench.umd.js",
|
|
6
6
|
"repository": {
|
|
@@ -103,7 +103,8 @@
|
|
|
103
103
|
"build:api-reference": "node tools/build-api-reference.js",
|
|
104
104
|
"build:builds": "node tools/build-builds-manifest.js",
|
|
105
105
|
"build:generated": "npm run generate-sri && npm run build:builds && npm run build:readme && npm run build:api-reference",
|
|
106
|
-
"build:release": "npm run cleanbuild && npm run test && node tools/build-release.js"
|
|
106
|
+
"build:release": "npm run cleanbuild && npm run test && node tools/build-release.js",
|
|
107
|
+
"release": "node tools/release.js"
|
|
107
108
|
},
|
|
108
109
|
"homepage": "http://deftio.com/bitwrench",
|
|
109
110
|
"overrides": {
|
package/readme.html
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<meta name="generator" content="bitwrench v2.0.
|
|
6
|
+
<meta name="generator" content="bitwrench v2.0.10">
|
|
7
7
|
<title>bitwrench.js - README</title>
|
|
8
8
|
<link rel="icon" type="image/x-icon" href="images/favicon.ico">
|
|
9
9
|
<script src="dist/bitwrench.umd.js"></script>
|
|
@@ -70,9 +70,10 @@
|
|
|
70
70
|
<div class="demo-content">
|
|
71
71
|
<div class="readme-body">
|
|
72
72
|
<h1 class="quikdown-h1">bitwrench.js</h1>
|
|
73
|
-
<
|
|
74
|
-
<
|
|
75
|
-
|
|
73
|
+
<a class="quikdown-a" href="https://opensource.org/licenses/BSD-2-Clause" rel="noopener noreferrer"><img class="quikdown-img" src="https://img.shields.io/badge/License-BSD%202--Clause-blue.svg" alt="License"></a>
|
|
74
|
+
<a class="quikdown-a" href="https://www.npmjs.com/package/bitwrench" rel="noopener noreferrer"><img class="quikdown-img" src="https://img.shields.io/npm/v/bitwrench.svg?style=flat-square" alt="NPM version"></a>
|
|
75
|
+
<a class="quikdown-a" href="https://github.com/deftio/bitwrench/actions/workflows/ci.yml" rel="noopener noreferrer"><img class="quikdown-img" src="https://github.com/deftio/bitwrench/actions/workflows/ci.yml/badge.svg" alt="CI"></a></p><p><a class="quikdown-a" href="https://deftio.github.io/bitwrench/pages/" rel="noopener noreferrer"><img class="quikdown-img" src="./images/bitwrench-logo-med.png" alt="bitwrench"></a></p><p>Bitwrench is a UI library in a single script that provides HTML generation, reactive state, CSS and theme generation, 30+ components, and a static site CLI — all from plain JavaScript objects, with zero dependencies and zero compile steps. Works in browsers (including IE11) and Node.js.</p><h2 class="quikdown-h2">Quick Example</h2>
|
|
76
|
+
<p><pre class="quikdown-pre"><code class="language-javascript">const card = {
|
|
76
77
|
t: 'div', a: { class: 'bw-card' },
|
|
77
78
|
c: [
|
|
78
79
|
{ t: 'h3', c: 'Hello bitwrench' },
|
|
@@ -80,35 +81,28 @@ const card = {
|
|
|
80
81
|
]
|
|
81
82
|
};
|
|
82
83
|
|
|
83
|
-
//
|
|
84
|
+
// Mount to the DOM
|
|
84
85
|
bw.DOM('#app', card);
|
|
85
86
|
|
|
86
|
-
// Or render to an HTML string (
|
|
87
|
-
const html = bw.html(card);</code></pre></p><h2 class="quikdown-h2">
|
|
88
|
-
<ul class="quikdown-ul">
|
|
89
|
-
<li class="quikdown-li"><strong class="quikdown-strong">TACO format</strong> — <code class="quikdown-code">{ t, a, c, o }</code> objects describe UI; nest them, loop them, compose them with plain JS</li>
|
|
90
|
-
<li class="quikdown-li"><strong class="quikdown-strong">Zero dependencies</strong> — under 45 KB gzipped, IE11+ compatible</li>
|
|
91
|
-
<li class="quikdown-li"><strong class="quikdown-strong">Batteries-included components</strong> — grid, buttons, cards, forms, tables, alerts, badges, tabs, navbars</li>
|
|
92
|
-
<li class="quikdown-li"><strong class="quikdown-strong">Server & client rendering</strong> — <code class="quikdown-code">bw.html()</code> returns strings, <code class="quikdown-code">bw.DOM()</code> mounts to the DOM</li>
|
|
93
|
-
<li class="quikdown-li"><strong class="quikdown-strong">Dynamic CSS & theming</strong> — <code class="quikdown-code">bw.css()</code> generates stylesheets from objects, <code class="quikdown-code">bw.generateTheme()</code> builds full themes from seed colors, dark mode toggle included</li>
|
|
94
|
-
<li class="quikdown-li"><strong class="quikdown-strong">State management</strong> — <code class="quikdown-code">bw.patch()</code> for targeted DOM updates, <code class="quikdown-code">bw.update()</code> for re-renders, <code class="quikdown-code">bw.pub()</code>/<code class="quikdown-code">bw.sub()</code> for app-wide messaging</li>
|
|
95
|
-
<li class="quikdown-li"><strong class="quikdown-strong">CLI tool</strong> — the <code class="quikdown-code">bitwrench</code> command converts Markdown, HTML, and JSON files into styled pages</li>
|
|
96
|
-
<li class="quikdown-li"><strong class="quikdown-strong">Utilities</strong> — color functions, random data, lorem ipsum, cookies, URL params, file I/O</li>
|
|
97
|
-
</ul><h2 class="quikdown-h2">Installation</h2>
|
|
98
|
-
<h3 class="quikdown-h3">npm</h3>
|
|
87
|
+
// Or render to an HTML string (Node.js, emails, static pages)
|
|
88
|
+
const html = bw.html(card);</code></pre></p><p>Each object has four keys: <strong class="quikdown-strong">t</strong> (tag), <strong class="quikdown-strong">a</strong> (attributes), <strong class="quikdown-strong">c</strong> (content), and optionally <strong class="quikdown-strong">o</strong> (options for state and lifecycle). Nest them, loop them, compose them — it's just JavaScript.</p><h2 class="quikdown-h2">Installation</h2>
|
|
99
89
|
<p><pre class="quikdown-pre"><code class="language-bash">npm install bitwrench</code></pre></p><pre class="quikdown-pre"><code class="language-javascript">// ES module
|
|
100
90
|
import bw from 'bitwrench';
|
|
101
91
|
|
|
102
92
|
// CommonJS
|
|
103
|
-
const bw = require('bitwrench');</code></pre><
|
|
104
|
-
<
|
|
105
|
-
<
|
|
106
|
-
<
|
|
93
|
+
const bw = require('bitwrench');</code></pre><p>Or include directly in a page:</p><pre class="quikdown-pre"><code class="language-html"><script src="https://cdn.jsdelivr.net/npm/bitwrench/dist/bitwrench.umd.min.js"></script></code></pre><h2 class="quikdown-h2">Features</h2>
|
|
94
|
+
<ul class="quikdown-ul">
|
|
95
|
+
<li class="quikdown-li"><strong class="quikdown-strong">HTML from plain objects</strong> — describe UI as JavaScript objects, render to live DOM with <code class="quikdown-code">bw.DOM()</code> or to HTML strings with <code class="quikdown-code">bw.html()</code> for server-side rendering, emails, and static pages</li>
|
|
96
|
+
<li class="quikdown-li"><strong class="quikdown-strong">Built-in reactivity</strong> — <code class="quikdown-code">bw.update()</code> re-renders components when state changes, <code class="quikdown-code">bw.patch()</code> updates individual elements by ID, <code class="quikdown-code">bw.pub()</code>/<code class="quikdown-code">bw.sub()</code> provides decoupled messaging between any part of the application</li>
|
|
97
|
+
<li class="quikdown-li"><strong class="quikdown-strong">CSS and theme generation</strong> — <code class="quikdown-code">bw.css()</code> generates stylesheets from objects, <code class="quikdown-code">bw.generateTheme()</code> derives a complete visual theme (buttons, alerts, badges, cards, forms, tables, dark mode) from 2-3 seed colors</li>
|
|
98
|
+
<li class="quikdown-li"><strong class="quikdown-strong">30+ ready-made components</strong> — cards, buttons, sortable tables, form inputs, alerts, badges, tabs, navbars, spinners, progress bars — each a single function call that returns a composable object</li>
|
|
99
|
+
<li class="quikdown-li"><strong class="quikdown-strong">Static site CLI</strong> — the <code class="quikdown-code">bitwrench</code> command converts Markdown, HTML, and JSON files into styled, self-contained pages with theme support</li>
|
|
100
|
+
<li class="quikdown-li"><strong class="quikdown-strong">Utilities</strong> — color interpolation, random data generation, lorem ipsum, cookies, URL params, file I/O for both browser and Node.js</li>
|
|
101
|
+
</ul><h2 class="quikdown-h2">Getting Started</h2>
|
|
107
102
|
<p><pre class="quikdown-pre"><code class="language-html"><!DOCTYPE html>
|
|
108
103
|
<html lang="en">
|
|
109
104
|
<head>
|
|
110
|
-
<
|
|
111
|
-
<script src="dist/bitwrench.umd.js"></script>
|
|
105
|
+
<script src="https://cdn.jsdelivr.net/npm/bitwrench/dist/bitwrench.umd.min.js"></script>
|
|
112
106
|
</head>
|
|
113
107
|
<body>
|
|
114
108
|
<div id="app"></div>
|
|
@@ -119,23 +113,43 @@ const bw = require('bitwrench');</code></pre><h3 class="quikdown-h3">Bro
|
|
|
119
113
|
t: 'div', a: { class: 'bw-container' },
|
|
120
114
|
c: [
|
|
121
115
|
{ t: 'h1', c: 'My App' },
|
|
122
|
-
{
|
|
116
|
+
bw.makeCard({
|
|
117
|
+
title: 'Welcome',
|
|
118
|
+
content: 'Built with plain JavaScript objects.'
|
|
119
|
+
}),
|
|
120
|
+
bw.makeButton({ label: 'Click me', variant: 'primary' })
|
|
123
121
|
]
|
|
124
122
|
});
|
|
125
123
|
</script>
|
|
126
124
|
</body>
|
|
127
|
-
</html></code></pre></p><
|
|
128
|
-
<p><pre class="quikdown-pre"><code class="language-javascript">
|
|
125
|
+
</html></code></pre></p><h2 class="quikdown-h2">Adding State</h2>
|
|
126
|
+
<p>The <code class="quikdown-code">o</code> key adds state and a render function to any element. When state changes, call <code class="quikdown-code">bw.update()</code> to re-render:</p><pre class="quikdown-pre"><code class="language-javascript">bw.DOM('#counter', {
|
|
127
|
+
t: 'div',
|
|
128
|
+
o: {
|
|
129
|
+
state: { count: 0 },
|
|
130
|
+
render: function(el) {
|
|
131
|
+
var s = el._bw_state;
|
|
132
|
+
bw.DOM(el, {
|
|
133
|
+
t: 'div', c: [
|
|
134
|
+
{ t: 'span', c: 'Count: ' + s.count },
|
|
135
|
+
{ t: 'button', a: {
|
|
136
|
+
onclick: function() { s.count++; bw.update(el); }
|
|
137
|
+
}, c: '+1' }
|
|
138
|
+
]
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
});</code></pre><p>For communication between components, use pub/sub:</p><pre class="quikdown-pre"><code class="language-javascript">bw.sub('item-added', function(detail) {
|
|
143
|
+
console.log('New item:', detail.name);
|
|
144
|
+
});
|
|
129
145
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
{ t: 'p', c: 'Generated with bw.html() in Node.js.' }
|
|
135
|
-
]
|
|
146
|
+
bw.pub('item-added', { name: 'Widget' });</code></pre><h2 class="quikdown-h2">Theming</h2>
|
|
147
|
+
<p>Generate a complete theme from two seed colors. All components — buttons, alerts, badges, cards, forms, tables — are styled automatically:</p><pre class="quikdown-pre"><code class="language-javascript">bw.generateTheme('my-theme', {
|
|
148
|
+
primary: '#336699',
|
|
149
|
+
secondary: '#cc6633'
|
|
136
150
|
});
|
|
137
151
|
|
|
138
|
-
|
|
152
|
+
bw.toggleDarkMode();</code></pre><h2 class="quikdown-h2">Core API</h2>
|
|
139
153
|
<table class="quikdown-table">
|
|
140
154
|
<thead class="quikdown-thead">
|
|
141
155
|
<tr class="quikdown-tr">
|
|
@@ -145,136 +159,99 @@ console.log(page);</code></pre></p><h2 class="quikdown-h2">Core API</h2>
|
|
|
145
159
|
</thead>
|
|
146
160
|
<tbody class="quikdown-tbody">
|
|
147
161
|
<tr class="quikdown-tr">
|
|
148
|
-
<td class="quikdown-td"><code class="quikdown-code">bw.html(
|
|
149
|
-
<td class="quikdown-td">Convert
|
|
162
|
+
<td class="quikdown-td"><code class="quikdown-code">bw.html(obj)</code></td>
|
|
163
|
+
<td class="quikdown-td">Convert an object to an HTML string</td>
|
|
150
164
|
</tr>
|
|
151
165
|
<tr class="quikdown-tr">
|
|
152
|
-
<td class="quikdown-td"><code class="quikdown-code">bw.DOM(selector,
|
|
153
|
-
<td class="quikdown-td">Mount
|
|
166
|
+
<td class="quikdown-td"><code class="quikdown-code">bw.DOM(selector, obj)</code></td>
|
|
167
|
+
<td class="quikdown-td">Mount an object to a DOM element</td>
|
|
154
168
|
</tr>
|
|
155
169
|
<tr class="quikdown-tr">
|
|
156
170
|
<td class="quikdown-td"><code class="quikdown-code">bw.css(rules)</code></td>
|
|
157
|
-
<td class="quikdown-td">Generate
|
|
171
|
+
<td class="quikdown-td">Generate CSS from a JS object</td>
|
|
158
172
|
</tr>
|
|
159
173
|
<tr class="quikdown-tr">
|
|
160
174
|
<td class="quikdown-td"><code class="quikdown-code">bw.loadDefaultStyles()</code></td>
|
|
161
|
-
<td class="quikdown-td">Inject the built-in
|
|
175
|
+
<td class="quikdown-td">Inject the built-in stylesheet</td>
|
|
162
176
|
</tr>
|
|
163
177
|
<tr class="quikdown-tr">
|
|
164
178
|
<td class="quikdown-td"><code class="quikdown-code">bw.generateTheme(name, config)</code></td>
|
|
165
179
|
<td class="quikdown-td">Generate a scoped theme from seed colors</td>
|
|
166
180
|
</tr>
|
|
167
181
|
<tr class="quikdown-tr">
|
|
168
|
-
<td class="quikdown-td"><code class="quikdown-code">bw.patch(
|
|
169
|
-
<td class="quikdown-td">Update a specific element
|
|
182
|
+
<td class="quikdown-td"><code class="quikdown-code">bw.patch(id, content)</code></td>
|
|
183
|
+
<td class="quikdown-td">Update a specific element by UUID</td>
|
|
170
184
|
</tr>
|
|
171
185
|
<tr class="quikdown-tr">
|
|
172
186
|
<td class="quikdown-td"><code class="quikdown-code">bw.update(el)</code></td>
|
|
173
|
-
<td class="quikdown-td">Re-render
|
|
187
|
+
<td class="quikdown-td">Re-render via the element's <code class="quikdown-code">o.render</code> function</td>
|
|
174
188
|
</tr>
|
|
175
189
|
<tr class="quikdown-tr">
|
|
176
190
|
<td class="quikdown-td"><code class="quikdown-code">bw.pub(topic, detail)</code></td>
|
|
177
|
-
<td class="quikdown-td">Publish a message to
|
|
191
|
+
<td class="quikdown-td">Publish a message to subscribers</td>
|
|
178
192
|
</tr>
|
|
179
193
|
<tr class="quikdown-tr">
|
|
180
194
|
<td class="quikdown-td"><code class="quikdown-code">bw.sub(topic, handler)</code></td>
|
|
181
|
-
<td class="quikdown-td">Subscribe to a topic; returns an
|
|
182
|
-
</tr>
|
|
183
|
-
<tr class="quikdown-tr">
|
|
184
|
-
<td class="quikdown-td"><code class="quikdown-code">bw.makeTable(data, opts)</code></td>
|
|
185
|
-
<td class="quikdown-td">Create a sortable table (returns TACO)</td>
|
|
186
|
-
</tr>
|
|
187
|
-
<tr class="quikdown-tr">
|
|
188
|
-
<td class="quikdown-td"><code class="quikdown-code">bw.makeCard(opts)</code></td>
|
|
189
|
-
<td class="quikdown-td">Create a card component (returns TACO)</td>
|
|
190
|
-
</tr>
|
|
191
|
-
<tr class="quikdown-tr">
|
|
192
|
-
<td class="quikdown-td"><code class="quikdown-code">bw.colorInterp(x, in0, in1, colors)</code></td>
|
|
193
|
-
<td class="quikdown-td">Interpolate between colors</td>
|
|
195
|
+
<td class="quikdown-td">Subscribe to a topic; returns an unsub function</td>
|
|
194
196
|
</tr>
|
|
195
197
|
</tbody>
|
|
196
|
-
</table><p>See the full <a class="quikdown-a" href="
|
|
198
|
+
</table><p>See the full <a class="quikdown-a" href="https://deftio.github.io/bitwrench/pages/08-api-reference.html" rel="noopener noreferrer">API Reference</a> for all functions.</p><h2 class="quikdown-h2">CLI</h2>
|
|
199
|
+
<p>Convert Markdown, HTML, or JSON files to styled standalone pages:</p><pre class="quikdown-pre"><code class="language-bash"># Convert Markdown to a self-contained HTML page
|
|
200
|
+
bitwrench README.md -o index.html --standalone
|
|
201
|
+
|
|
202
|
+
# Apply a theme preset
|
|
203
|
+
bitwrench doc.md -o doc.html --standalone --theme ocean
|
|
204
|
+
|
|
205
|
+
# Custom colors
|
|
206
|
+
bitwrench doc.md -o doc.html --standalone --theme "#336699,#cc6633"</code></pre><p>Flags: <code class="quikdown-code">--output/-o</code>, <code class="quikdown-code">--standalone/-s</code>, <code class="quikdown-code">--cdn</code>, <code class="quikdown-code">--theme/-t</code>, <code class="quikdown-code">--css/-c</code>, <code class="quikdown-code">--title</code>, <code class="quikdown-code">--favicon/-f</code>, <code class="quikdown-code">--highlight</code>, <code class="quikdown-code">--verbose/-v</code></p><h2 class="quikdown-h2">Build Formats</h2>
|
|
197
207
|
<table class="quikdown-table">
|
|
198
208
|
<thead class="quikdown-thead">
|
|
199
209
|
<tr class="quikdown-tr">
|
|
200
|
-
<th class="quikdown-th">
|
|
201
|
-
<th class="quikdown-th">
|
|
210
|
+
<th class="quikdown-th">Format</th>
|
|
211
|
+
<th class="quikdown-th">File</th>
|
|
212
|
+
<th class="quikdown-th">Use case</th>
|
|
202
213
|
</tr>
|
|
203
214
|
</thead>
|
|
204
215
|
<tbody class="quikdown-tbody">
|
|
205
216
|
<tr class="quikdown-tr">
|
|
206
|
-
<td class="quikdown-td"
|
|
207
|
-
<td class="quikdown-td"
|
|
208
|
-
</
|
|
209
|
-
<tr class="quikdown-tr">
|
|
210
|
-
<td class="quikdown-td"><a class="quikdown-a" href="./pages/01-components.html">Components</a></td>
|
|
211
|
-
<td class="quikdown-td">Buttons, cards, alerts, badges, navbars</td>
|
|
212
|
-
</tr>
|
|
213
|
-
<tr class="quikdown-tr">
|
|
214
|
-
<td class="quikdown-td"><a class="quikdown-a" href="./pages/02-tables-forms.html">Tables & Forms</a></td>
|
|
215
|
-
<td class="quikdown-td">Sortable tables, form inputs, validation</td>
|
|
216
|
-
</tr>
|
|
217
|
-
<tr class="quikdown-tr">
|
|
218
|
-
<td class="quikdown-td"><a class="quikdown-a" href="./pages/03-styling.html">Styling</a></td>
|
|
219
|
-
<td class="quikdown-td">CSS generation, inline styles, theming strategies</td>
|
|
220
|
-
</tr>
|
|
221
|
-
<tr class="quikdown-tr">
|
|
222
|
-
<td class="quikdown-td"><a class="quikdown-a" href="./pages/04-dashboard.html">Dashboard</a></td>
|
|
223
|
-
<td class="quikdown-td">Full-page app with grid layout and charts</td>
|
|
217
|
+
<td class="quikdown-td">UMD</td>
|
|
218
|
+
<td class="quikdown-td"><code class="quikdown-code">bitwrench.umd.min.js</code></td>
|
|
219
|
+
<td class="quikdown-td">Browsers and Node.js</td>
|
|
224
220
|
</tr>
|
|
225
221
|
<tr class="quikdown-tr">
|
|
226
|
-
<td class="quikdown-td"
|
|
227
|
-
<td class="quikdown-td"><code class="quikdown-code">
|
|
222
|
+
<td class="quikdown-td">ESM</td>
|
|
223
|
+
<td class="quikdown-td"><code class="quikdown-code">bitwrench.esm.min.js</code></td>
|
|
224
|
+
<td class="quikdown-td">Modern bundlers (Vite, webpack, etc.)</td>
|
|
228
225
|
</tr>
|
|
229
226
|
<tr class="quikdown-tr">
|
|
230
|
-
<td class="quikdown-td"
|
|
231
|
-
<td class="quikdown-td">
|
|
227
|
+
<td class="quikdown-td">CJS</td>
|
|
228
|
+
<td class="quikdown-td"><code class="quikdown-code">bitwrench.cjs.min.js</code></td>
|
|
229
|
+
<td class="quikdown-td">Node.js <code class="quikdown-code">require()</code></td>
|
|
232
230
|
</tr>
|
|
233
231
|
<tr class="quikdown-tr">
|
|
234
|
-
<td class="quikdown-td"
|
|
235
|
-
<td class="quikdown-td">bitwrench
|
|
236
|
-
</
|
|
237
|
-
<tr class="quikdown-tr">
|
|
238
|
-
<td class="quikdown-td"><a class="quikdown-a" href="./pages/08-api-reference.html">API Reference</a></td>
|
|
239
|
-
<td class="quikdown-td">Full function listing with signatures</td>
|
|
240
|
-
</tr>
|
|
241
|
-
<tr class="quikdown-tr">
|
|
242
|
-
<td class="quikdown-td"><a class="quikdown-a" href="./pages/09-builds.html">Builds & Downloads</a></td>
|
|
243
|
-
<td class="quikdown-td">All dist formats, bundle sizes, SRI hashes</td>
|
|
244
|
-
</tr>
|
|
245
|
-
<tr class="quikdown-tr">
|
|
246
|
-
<td class="quikdown-td"><a class="quikdown-a" href="./pages/10-themes.html">Themes</a></td>
|
|
247
|
-
<td class="quikdown-td">Theme generator, presets, dark mode</td>
|
|
232
|
+
<td class="quikdown-td">ES5</td>
|
|
233
|
+
<td class="quikdown-td"><code class="quikdown-code">bitwrench.es5.min.js</code></td>
|
|
234
|
+
<td class="quikdown-td">Legacy browsers (IE11)</td>
|
|
248
235
|
</tr>
|
|
249
236
|
</tbody>
|
|
250
|
-
</table><h2 class="quikdown-h2">
|
|
251
|
-
<
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
# Custom colors (primary, secondary)
|
|
261
|
-
bitwrench doc.md -o doc.html --standalone --theme "#336699,#cc6633"</code></pre><p><strong class="quikdown-strong">Flags:</strong> <code class="quikdown-code">--output/-o</code>, <code class="quikdown-code">--standalone/-s</code> (inline bitwrench), <code class="quikdown-code">--cdn</code> (CDN link), <code class="quikdown-code">--theme/-t</code>, <code class="quikdown-code">--css/-c</code>, <code class="quikdown-code">--title</code>, <code class="quikdown-code">--favicon/-f</code>, <code class="quikdown-code">--highlight</code>, <code class="quikdown-code">--verbose/-v</code></p><h2 class="quikdown-h2">Development</h2>
|
|
237
|
+
</table><p>All formats include source maps. A separate CSS file (<code class="quikdown-code">bitwrench.css</code>) is also available for use without JavaScript.</p><h2 class="quikdown-h2">Documentation</h2>
|
|
238
|
+
<ul class="quikdown-ul">
|
|
239
|
+
<li class="quikdown-li"><a class="quikdown-a" href="https://deftio.github.io/bitwrench/pages/" rel="noopener noreferrer">Interactive docs and demos</a> — full tutorial site with live examples</li>
|
|
240
|
+
<li class="quikdown-li"><a class="quikdown-a" href="https://deftio.github.io/bitwrench/pages/00-quick-start.html" rel="noopener noreferrer">Quick Start</a> — first steps with <code class="quikdown-code">bw.DOM()</code></li>
|
|
241
|
+
<li class="quikdown-li"><a class="quikdown-a" href="https://deftio.github.io/bitwrench/pages/01-components.html" rel="noopener noreferrer">Components</a> — buttons, cards, alerts, badges, navbars</li>
|
|
242
|
+
<li class="quikdown-li"><a class="quikdown-a" href="https://deftio.github.io/bitwrench/pages/03-styling.html" rel="noopener noreferrer">Styling & Theming</a> — CSS generation and theming strategies</li>
|
|
243
|
+
<li class="quikdown-li"><a class="quikdown-a" href="https://deftio.github.io/bitwrench/pages/05-state.html" rel="noopener noreferrer">State & Interactivity</a> — <code class="quikdown-code">bw.patch()</code>, <code class="quikdown-code">bw.update()</code>, pub/sub</li>
|
|
244
|
+
<li class="quikdown-li"><a class="quikdown-a" href="https://deftio.github.io/bitwrench/pages/06-tic-tac-toe-tutorial.html" rel="noopener noreferrer">Tic Tac Toe Tutorial</a> — step-by-step game with state management</li>
|
|
245
|
+
<li class="quikdown-li"><a class="quikdown-a" href="https://deftio.github.io/bitwrench/pages/07-framework-comparison.html" rel="noopener noreferrer">Framework Comparison</a> — bitwrench vs React, Vue, Svelte</li>
|
|
246
|
+
</ul><h2 class="quikdown-h2">Development</h2>
|
|
262
247
|
<p><pre class="quikdown-pre"><code class="language-bash">npm install # install dev dependencies
|
|
263
|
-
npm run build # build all dist formats
|
|
264
|
-
npm test # run unit tests (
|
|
248
|
+
npm run build # build all dist formats (UMD, ESM, CJS, ES5)
|
|
249
|
+
npm test # run unit tests (284 tests)
|
|
265
250
|
npm run test:cli # run CLI tests (49 tests)
|
|
266
251
|
npm run test:e2e # run Playwright browser tests
|
|
267
|
-
npm run
|
|
268
|
-
|
|
269
|
-
<
|
|
270
|
-
<li class="quikdown-li"><a class="quikdown-a" href="https://deftio.github.io/bitwrench/pages/" rel="noopener noreferrer">Interactive Docs & Demos</a> — full tutorial site with live examples</li>
|
|
271
|
-
<li class="quikdown-li"><a class="quikdown-a" href="./pages/index.html">Local Docs</a> — browse the docs locally if you've cloned the repo</li>
|
|
272
|
-
</ul><h2 class="quikdown-h2">Links</h2>
|
|
273
|
-
<ul class="quikdown-ul">
|
|
274
|
-
<li class="quikdown-li"><a class="quikdown-a" href="https://github.com/deftio/bitwrench" rel="noopener noreferrer">GitHub</a></li>
|
|
275
|
-
<li class="quikdown-li"><a class="quikdown-a" href="https://www.npmjs.com/package/bitwrench" rel="noopener noreferrer">npm</a></li>
|
|
276
|
-
<li class="quikdown-li"><a class="quikdown-a" href="http://deftio.com/bitwrench" rel="noopener noreferrer">Homepage</a></li>
|
|
277
|
-
</ul>
|
|
252
|
+
npm run lint # run ESLint
|
|
253
|
+
npm run cleanbuild # full production build with SRI hashes</code></pre></p><h2 class="quikdown-h2">License</h2>
|
|
254
|
+
<a class="quikdown-a" href="./LICENSE.txt">BSD-2-Clause</a> — (c) M. A. Chatterjee / <a class="quikdown-a" href="https://github.com/deftio" rel="noopener noreferrer">deftio</a>
|
|
278
255
|
</p>
|
|
279
256
|
</div>
|
|
280
257
|
</div>
|
package/src/version.js
CHANGED
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
* DO NOT EDIT DIRECTLY - Use npm run generate-version
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
export const VERSION = '2.0.
|
|
6
|
+
export const VERSION = '2.0.10';
|
|
7
7
|
export const VERSION_INFO = {
|
|
8
|
-
version: '2.0.
|
|
8
|
+
version: '2.0.10',
|
|
9
9
|
name: 'bitwrench',
|
|
10
10
|
description: 'A library for javascript UI functions.',
|
|
11
11
|
license: 'BSD-2-Clause',
|
|
12
12
|
homepage: 'http://deftio.com/bitwrench',
|
|
13
13
|
repository: 'git+https://github.com/deftio/bitwrench.git',
|
|
14
14
|
author: 'manu a. chatterjee <deftio@deftio.com> (https://deftio.com/)',
|
|
15
|
-
buildDate: '2026-03-
|
|
15
|
+
buildDate: '2026-03-07T03:14:16.606Z'
|
|
16
16
|
};
|