bitwrench 2.0.32 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/README.md +211 -125
  2. package/dist/bitwrench-bccl.cjs.js +349 -188
  3. package/dist/bitwrench-bccl.cjs.min.js +2 -39
  4. package/dist/bitwrench-bccl.cjs.min.js.gz +0 -0
  5. package/dist/bitwrench-bccl.esm.js +349 -188
  6. package/dist/bitwrench-bccl.esm.min.js +2 -39
  7. package/dist/bitwrench-bccl.esm.min.js.gz +0 -0
  8. package/dist/bitwrench-bccl.umd.js +349 -188
  9. package/dist/bitwrench-bccl.umd.min.js +2 -39
  10. package/dist/bitwrench-bccl.umd.min.js.gz +0 -0
  11. package/dist/bitwrench-code-edit.cjs.js +17 -6
  12. package/dist/bitwrench-code-edit.cjs.min.js +2 -20
  13. package/dist/bitwrench-code-edit.es5.js +8 -3
  14. package/dist/bitwrench-code-edit.es5.min.js +2 -19
  15. package/dist/bitwrench-code-edit.esm.js +17 -6
  16. package/dist/bitwrench-code-edit.esm.min.js +2 -19
  17. package/dist/bitwrench-code-edit.umd.js +17 -6
  18. package/dist/bitwrench-code-edit.umd.min.js +2 -19
  19. package/dist/bitwrench-code-edit.umd.min.js.gz +0 -0
  20. package/dist/bitwrench-debug.js +1 -1
  21. package/dist/bitwrench-debug.min.js +1 -1
  22. package/dist/bitwrench-lean.cjs.js +2492 -1628
  23. package/dist/bitwrench-lean.cjs.min.js +2 -80
  24. package/dist/bitwrench-lean.cjs.min.js.gz +0 -0
  25. package/dist/bitwrench-lean.es5.js +2740 -1838
  26. package/dist/bitwrench-lean.es5.min.js +2 -49
  27. package/dist/bitwrench-lean.es5.min.js.gz +0 -0
  28. package/dist/bitwrench-lean.esm.js +2492 -1628
  29. package/dist/bitwrench-lean.esm.min.js +2 -80
  30. package/dist/bitwrench-lean.esm.min.js.gz +0 -0
  31. package/dist/bitwrench-lean.umd.js +2492 -1628
  32. package/dist/bitwrench-lean.umd.min.js +2 -80
  33. package/dist/bitwrench-lean.umd.min.js.gz +0 -0
  34. package/dist/bitwrench-util-color.cjs.js +251 -0
  35. package/dist/bitwrench-util-color.cjs.min.js +3 -0
  36. package/dist/bitwrench-util-color.es5.js +256 -0
  37. package/dist/bitwrench-util-color.es5.min.js +3 -0
  38. package/dist/bitwrench-util-color.esm.js +241 -0
  39. package/dist/bitwrench-util-color.esm.min.js +3 -0
  40. package/dist/bitwrench-util-color.umd.js +257 -0
  41. package/dist/bitwrench-util-color.umd.min.js +3 -0
  42. package/dist/bitwrench-util-css.cjs.js +2 -1
  43. package/dist/bitwrench-util-css.cjs.min.js +2 -21
  44. package/dist/bitwrench-util-css.es5.js +2 -1
  45. package/dist/bitwrench-util-css.es5.min.js +2 -20
  46. package/dist/bitwrench-util-css.esm.js +2 -1
  47. package/dist/bitwrench-util-css.esm.min.js +1 -19
  48. package/dist/bitwrench-util-css.umd.js +2 -1
  49. package/dist/bitwrench-util-css.umd.min.js +2 -20
  50. package/dist/bitwrench-util-css.umd.min.js.gz +0 -0
  51. package/dist/bitwrench.cjs.js +2826 -1801
  52. package/dist/bitwrench.cjs.min.js +2 -99
  53. package/dist/bitwrench.cjs.min.js.gz +0 -0
  54. package/dist/bitwrench.css +403 -479
  55. package/dist/bitwrench.d.ts +70 -73
  56. package/dist/bitwrench.es5.js +3106 -2020
  57. package/dist/bitwrench.es5.min.js +2 -67
  58. package/dist/bitwrench.es5.min.js.gz +0 -0
  59. package/dist/bitwrench.esm.js +2826 -1801
  60. package/dist/bitwrench.esm.min.js +2 -99
  61. package/dist/bitwrench.esm.min.js.gz +0 -0
  62. package/dist/bitwrench.min.css +1 -1
  63. package/dist/bitwrench.umd.js +2826 -1801
  64. package/dist/bitwrench.umd.min.js +2 -99
  65. package/dist/bitwrench.umd.min.js.gz +0 -0
  66. package/dist/builds.json +222 -134
  67. package/dist/bwserve.cjs.js +289 -282
  68. package/dist/bwserve.d.ts +157 -0
  69. package/dist/bwserve.esm.js +290 -283
  70. package/dist/sri.json +54 -46
  71. package/docs/README.md +6 -3
  72. package/docs/app-patterns.md +7 -6
  73. package/docs/bitwrench-for-wasm.md +53 -54
  74. package/docs/bitwrench-mcp.md +2 -2
  75. package/docs/bitwrench-northstar-principles.md +406 -0
  76. package/docs/bitwrench-taco-schema-discussion.md +2 -2
  77. package/docs/bitwrench_api.md +191 -106
  78. package/docs/bitwrench_typescript_usage.md +5 -5
  79. package/docs/bw-attach.md +29 -75
  80. package/docs/bwserve.md +200 -168
  81. package/docs/cli.md +36 -12
  82. package/docs/component-cheatsheet.md +2 -2
  83. package/docs/component-library.md +4 -4
  84. package/docs/component-lifecycle.md +234 -0
  85. package/docs/drift-lint.md +268 -0
  86. package/docs/framework-translation-table.md +4 -4
  87. package/docs/llm-bitwrench-guide.md +60 -50
  88. package/docs/routing.md +11 -13
  89. package/docs/state-management.md +110 -109
  90. package/docs/taco-format.md +13 -14
  91. package/docs/theming.md +13 -3
  92. package/docs/thinking-in-bitwrench.md +858 -983
  93. package/docs/tutorial-bwserve.md +37 -36
  94. package/docs/tutorial-embedded.md +10 -21
  95. package/docs/tutorial-website.md +2 -2
  96. package/package.json +38 -7
  97. package/readme.html +262 -161
  98. package/src/bitwrench-bccl-entry.js +2 -2
  99. package/src/bitwrench-bccl.js +346 -185
  100. package/src/bitwrench-code-edit.js +16 -5
  101. package/src/bitwrench-color-utils.js +117 -181
  102. package/src/bitwrench-file-ops.js +2 -2
  103. package/src/bitwrench-lean.js +4 -3
  104. package/src/bitwrench-router.js +5 -2
  105. package/src/bitwrench-styles.js +420 -504
  106. package/src/bitwrench-util-color.js +240 -0
  107. package/src/bitwrench-util-css.js +1 -0
  108. package/src/bitwrench-utils.js +4 -0
  109. package/src/bitwrench.d.ts +70 -73
  110. package/src/bitwrench.h +5 -0
  111. package/src/bitwrench.js +1939 -933
  112. package/src/bwserve/attach.js +0 -1
  113. package/src/bwserve/bwclient.js +172 -32
  114. package/src/bwserve/bwshell.js +0 -4
  115. package/src/bwserve/client.js +59 -220
  116. package/src/bwserve/index.js +59 -26
  117. package/src/bwserve.d.ts +157 -0
  118. package/src/bwserve.h +5 -0
  119. package/src/cli/attach.js +12 -75
  120. package/src/cli/convert.js +2 -2
  121. package/src/cli/serve.js +37 -35
  122. package/src/generate-css.js +1 -1
  123. package/src/mcp/knowledge.js +4 -4
  124. package/src/mcp/live.js +21 -13
  125. package/src/mcp/tools.js +0 -1
  126. package/src/version.js +3 -7
@@ -1,4 +1,4 @@
1
- /*! bitwrench-util-css v2.0.32 | BSD-2-Clause | https://deftio.github.com/bitwrench/pages */
1
+ /*! bitwrench-util-css v2.1.1 | BSD-2-Clause | https://deftio.github.io/bitwrench/pages */
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) :
@@ -227,6 +227,7 @@
227
227
  }
228
228
 
229
229
  // Auto-install if bw is on window (script tag usage)
230
+ /* c8 ignore next 3 -- module-level auto-install; only runs at import time in browser */
230
231
  if (typeof window !== 'undefined' && window.bw) {
231
232
  install(window.bw);
232
233
  }
@@ -1,21 +1,3 @@
1
- /*! bitwrench-util-css v2.0.32 | BSD-2-Clause | https://deftio.github.com/bitwrench/pages */
2
- !function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).bwUtilCSS={})}(this,function(t){"use strict";
3
- /**
4
- * bitwrench-util-css.js - Rule-based CSS utility parser plugin
5
- *
6
- * Replaces the old static `bw.u` dictionary with a parser that generates
7
- * style objects, CSS strings, or class names from shorthand tokens.
8
- *
9
- * Three output methods:
10
- * bw.u('flex gap4 p4') → { display: 'flex', gap: '1rem', padding: '1rem' }
11
- * bw.u.css('flex gap4 p4') → "display:flex;gap:1rem;padding:1rem"
12
- * bw.u.cls('flex gap4 p4') → "bw_flex bw_gap_4 bw_p_4"
13
- * bw.u.extend({ name: fn }) → register custom rules
14
- *
15
- * Can be loaded standalone (browser script tag after bitwrench.umd.js),
16
- * or imported as an ES module / CJS module.
17
- *
18
- * @module bitwrench-util-css
19
- * @license BSD-2-Clause
20
- */function n(t){return.25*t+"rem"}var e={p:function(t){return{padding:n(t)}},pt:function(t){return{paddingTop:n(t)}},pb:function(t){return{paddingBottom:n(t)}},pl:function(t){return{paddingLeft:n(t)}},pr:function(t){return{paddingRight:n(t)}},px:function(t){return{paddingLeft:n(t),paddingRight:n(t)}},py:function(t){return{paddingTop:n(t),paddingBottom:n(t)}},m:function(t){return{margin:n(t)}},mt:function(t){return{marginTop:n(t)}},mb:function(t){return{marginBottom:n(t)}},ml:function(t){return{marginLeft:n(t)}},mr:function(t){return{marginRight:n(t)}},mx:function(t){return{marginLeft:n(t),marginRight:n(t)}},my:function(t){return{marginTop:n(t),marginBottom:n(t)}},gap:function(t){return{gap:n(t)}},w:function(t){return{width:n(t)}},h:function(t){return{height:n(t)}},rounded:function(t){return{borderRadius:n(t)}},textSm:function(){return{fontSize:"0.875rem"}},textBase:function(){return{fontSize:"1rem"}},textLg:function(){return{fontSize:"1.125rem"}},textXl:function(){return{fontSize:"1.25rem"}},text2xl:function(){return{fontSize:"1.5rem"}},text3xl:function(){return{fontSize:"1.875rem"}}},r={flex:{display:"flex"},flexCol:{display:"flex",flexDirection:"column"},flexRow:{display:"flex",flexDirection:"row"},flexWrap:{display:"flex",flexWrap:"wrap"},block:{display:"block"},inline:{display:"inline"},hidden:{display:"none"},bold:{fontWeight:"700"},semibold:{fontWeight:"600"},italic:{fontStyle:"italic"},textCenter:{textAlign:"center"},textRight:{textAlign:"right"},justifyCenter:{justifyContent:"center"},justifyBetween:{justifyContent:"space-between"},justifyEnd:{justifyContent:"flex-end"},alignCenter:{alignItems:"center"},alignStart:{alignItems:"flex-start"},alignEnd:{alignItems:"flex-end"},wFull:{width:"100%"},hFull:{height:"100%"},transition:{transition:"all 0.2s ease"}},i={},o=/\s+/,f=/^([a-zA-Z]+?)(\d+)$/,u=/^bg-\[([^\]]+)\]$/,l=/^text-\[([^\]]+)\]$/,a=/^bg-(.+)$/,c=/^text-(.+)$/;function d(t){if(i[t]){var n=i[t];return"function"==typeof n?n(t):n}if(r[t])return r[t];var o=f.exec(t);if(o){var d=o[1],g=parseInt(o[2],10);if(e[d])return e[d](g)}if(e[t])return e[t]();var p=u.exec(t);if(p)return{background:p[1]};var s=l.exec(t);if(s)return{color:s[1]};var x=a.exec(t);if(x)return{background:x[1]};var m=c.exec(t);return m?{color:m[1]}:null}function g(t){if(!t||"string"!=typeof t)return{};for(var n=t.trim().split(o),e={},r=0;r<n.length;r++){var i=d(n[r]);if(i)for(var f=Object.keys(i),u=0;u<f.length;u++)e[f[u]]=i[f[u]]}return e}function p(t){t&&(t.utilCSS=g,t.u=g)}g.css=function(t){for(var n=g(t),e=[],r=Object.keys(n),i=0;i<r.length;i++){var o=r[i].replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()});e.push(o+":"+n[r[i]])}return e.join(";")},g.cls=function(t){if(!t||"string"!=typeof t)return"";for(var n=t.trim().split(o),e=[],r=0;r<n.length;r++){var i=n[r];if(d(i)){var f="bw_"+i.replace(/([A-Z])/g,function(t){return"_"+t.toLowerCase()}).replace(/(\d+)/g,function(t){return"_"+t});e.push(f)}}return e.join(" ")},g.extend=function(t){if(t&&"object"==typeof t)for(var n=Object.keys(t),e=0;e<n.length;e++)i[n[e]]=t[n[e]]},"undefined"!=typeof window&&window.bw&&p(window.bw);var s={utilCSS:g,install:p};t.default=s,t.install=p,t.utilCSS=g,Object.defineProperty(t,"__esModule",{value:!0})});
1
+ /*! bitwrench-util-css v2.1.1 | BSD-2-Clause | https://deftio.github.io/bitwrench/pages */
2
+ !function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).bwUtilCSS={})}(this,function(t){"use strict";function n(t){return.25*t+"rem"}var e={p:function(t){return{padding:n(t)}},pt:function(t){return{paddingTop:n(t)}},pb:function(t){return{paddingBottom:n(t)}},pl:function(t){return{paddingLeft:n(t)}},pr:function(t){return{paddingRight:n(t)}},px:function(t){return{paddingLeft:n(t),paddingRight:n(t)}},py:function(t){return{paddingTop:n(t),paddingBottom:n(t)}},m:function(t){return{margin:n(t)}},mt:function(t){return{marginTop:n(t)}},mb:function(t){return{marginBottom:n(t)}},ml:function(t){return{marginLeft:n(t)}},mr:function(t){return{marginRight:n(t)}},mx:function(t){return{marginLeft:n(t),marginRight:n(t)}},my:function(t){return{marginTop:n(t),marginBottom:n(t)}},gap:function(t){return{gap:n(t)}},w:function(t){return{width:n(t)}},h:function(t){return{height:n(t)}},rounded:function(t){return{borderRadius:n(t)}},textSm:function(){return{fontSize:"0.875rem"}},textBase:function(){return{fontSize:"1rem"}},textLg:function(){return{fontSize:"1.125rem"}},textXl:function(){return{fontSize:"1.25rem"}},text2xl:function(){return{fontSize:"1.5rem"}},text3xl:function(){return{fontSize:"1.875rem"}}},r={flex:{display:"flex"},flexCol:{display:"flex",flexDirection:"column"},flexRow:{display:"flex",flexDirection:"row"},flexWrap:{display:"flex",flexWrap:"wrap"},block:{display:"block"},inline:{display:"inline"},hidden:{display:"none"},bold:{fontWeight:"700"},semibold:{fontWeight:"600"},italic:{fontStyle:"italic"},textCenter:{textAlign:"center"},textRight:{textAlign:"right"},justifyCenter:{justifyContent:"center"},justifyBetween:{justifyContent:"space-between"},justifyEnd:{justifyContent:"flex-end"},alignCenter:{alignItems:"center"},alignStart:{alignItems:"flex-start"},alignEnd:{alignItems:"flex-end"},wFull:{width:"100%"},hFull:{height:"100%"},transition:{transition:"all 0.2s ease"}},i={},o=/\s+/,f=/^([a-zA-Z]+?)(\d+)$/,u=/^bg-\[([^\]]+)\]$/,l=/^text-\[([^\]]+)\]$/,a=/^bg-(.+)$/,c=/^text-(.+)$/;function d(t){if(i[t]){var n=i[t];return"function"==typeof n?n(t):n}if(r[t])return r[t];var o=f.exec(t);if(o){var d=o[1],g=parseInt(o[2],10);if(e[d])return e[d](g)}if(e[t])return e[t]();var p=u.exec(t);if(p)return{background:p[1]};var s=l.exec(t);if(s)return{color:s[1]};var x=a.exec(t);if(x)return{background:x[1]};var m=c.exec(t);return m?{color:m[1]}:null}function g(t){if(!t||"string"!=typeof t)return{};for(var n=t.trim().split(o),e={},r=0;r<n.length;r++){var i=d(n[r]);if(i)for(var f=Object.keys(i),u=0;u<f.length;u++)e[f[u]]=i[f[u]]}return e}function p(t){t&&(t.utilCSS=g,t.u=g)}g.css=function(t){for(var n=g(t),e=[],r=Object.keys(n),i=0;i<r.length;i++){var o=r[i].replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()});e.push(o+":"+n[r[i]])}return e.join(";")},g.cls=function(t){if(!t||"string"!=typeof t)return"";for(var n=t.trim().split(o),e=[],r=0;r<n.length;r++){var i=n[r];if(d(i)){var f="bw_"+i.replace(/([A-Z])/g,function(t){return"_"+t.toLowerCase()}).replace(/(\d+)/g,function(t){return"_"+t});e.push(f)}}return e.join(" ")},g.extend=function(t){if(t&&"object"==typeof t)for(var n=Object.keys(t),e=0;e<n.length;e++)i[n[e]]=t[n[e]]},"undefined"!=typeof window&&window.bw&&p(window.bw);var s={utilCSS:g,install:p};t.default=s,t.install=p,t.utilCSS=g,Object.defineProperty(t,"__esModule",{value:!0})});
21
3
  //# sourceMappingURL=bitwrench-util-css.umd.min.js.map