jj 2.4.0 β†’ 2.6.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.
Files changed (73) hide show
  1. package/README.md +37 -48
  2. package/SKILL.md +671 -0
  3. package/lib/bundle.cjs +2031 -0
  4. package/lib/bundle.cjs.map +1 -0
  5. package/lib/bundle.d.cts +1782 -0
  6. package/lib/bundle.d.ts +1782 -1
  7. package/lib/bundle.global.js +1953 -0
  8. package/lib/bundle.global.js.map +1 -0
  9. package/lib/bundle.js +864 -848
  10. package/lib/bundle.js.map +1 -7
  11. package/lib/bundle.min.cjs +2 -0
  12. package/lib/bundle.min.cjs.map +1 -0
  13. package/lib/bundle.min.d.cts +1782 -0
  14. package/lib/bundle.min.d.ts +1782 -1
  15. package/lib/bundle.min.global.js +2 -0
  16. package/lib/bundle.min.global.js.map +1 -0
  17. package/lib/bundle.min.js +2 -2
  18. package/lib/bundle.min.js.map +1 -0
  19. package/package.json +14 -6
  20. package/lib/JJD.d.ts +0 -76
  21. package/lib/JJD.js +0 -91
  22. package/lib/JJD.js.map +0 -1
  23. package/lib/JJDF.d.ts +0 -60
  24. package/lib/JJDF.js +0 -68
  25. package/lib/JJDF.js.map +0 -1
  26. package/lib/JJE.d.ts +0 -313
  27. package/lib/JJE.js +0 -412
  28. package/lib/JJE.js.map +0 -1
  29. package/lib/JJHE.d.ts +0 -120
  30. package/lib/JJHE.js +0 -164
  31. package/lib/JJHE.js.map +0 -1
  32. package/lib/JJN.d.ts +0 -234
  33. package/lib/JJN.js +0 -323
  34. package/lib/JJN.js.map +0 -1
  35. package/lib/JJSE.d.ts +0 -148
  36. package/lib/JJSE.js +0 -190
  37. package/lib/JJSE.js.map +0 -1
  38. package/lib/JJSR.d.ts +0 -67
  39. package/lib/JJSR.js +0 -85
  40. package/lib/JJSR.js.map +0 -1
  41. package/lib/JJT.d.ts +0 -79
  42. package/lib/JJT.js +0 -108
  43. package/lib/JJT.js.map +0 -1
  44. package/lib/case.d.ts +0 -60
  45. package/lib/case.js +0 -92
  46. package/lib/case.js.map +0 -1
  47. package/lib/case.test.d.ts +0 -1
  48. package/lib/case.test.js +0 -79
  49. package/lib/case.test.js.map +0 -1
  50. package/lib/components.d.ts +0 -147
  51. package/lib/components.js +0 -286
  52. package/lib/components.js.map +0 -1
  53. package/lib/helpers.d.ts +0 -158
  54. package/lib/helpers.js +0 -231
  55. package/lib/helpers.js.map +0 -1
  56. package/lib/index.d.ts +0 -15
  57. package/lib/index.js +0 -16
  58. package/lib/index.js.map +0 -1
  59. package/lib/mixin-types.d.ts +0 -143
  60. package/lib/mixin-types.js +0 -2
  61. package/lib/mixin-types.js.map +0 -1
  62. package/lib/mixins.d.ts +0 -77
  63. package/lib/mixins.js +0 -336
  64. package/lib/mixins.js.map +0 -1
  65. package/lib/types.d.ts +0 -77
  66. package/lib/types.js +0 -2
  67. package/lib/types.js.map +0 -1
  68. package/lib/util.d.ts +0 -96
  69. package/lib/util.js +0 -122
  70. package/lib/util.js.map +0 -1
  71. package/lib/util.test.d.ts +0 -1
  72. package/lib/util.test.js +0 -46
  73. package/lib/util.test.js.map +0 -1
package/README.md CHANGED
@@ -1,77 +1,66 @@
1
1
  # Just JavaScript!
2
2
 
3
- **Do you know what runs faster than VDOM? No VDOM!**
4
- **Do you know what's faster than transpilation? No transpilation!**
3
+ **Faster than VDOM. No Build Step. Use the Platform!**
5
4
 
6
- **JJ** A human readable WYWIWIR (what you write is what is run) DSL for creating and manipulating HTML and CSS for modern browsers.
5
+ **JJ** is a lightweight, no-transpilation library for modern web development. What You Write Is What Is Run (WYWIWIR).
7
6
 
8
- Modern browsers are very powerful out of the box and get you pretty far without having to "compile" (transpile) an interpreted language (`.jsx`, `.vue`, etc.) to an earlier version of it (ES5). This is a proof of concept to show how far we can go without having to compile the code.
9
-
10
- ## Install
7
+ ## ⚑ Quick Start
11
8
 
12
9
  ```bash
13
10
  npm i jj
14
11
  ```
15
12
 
16
- # Usage
17
-
18
- CDN:
19
-
20
13
  ```js
21
- import { nextAnimationFrame, on } from 'https://unpkg.com/browse/jj/dist/bundle.js'
22
- ```
14
+ import { JJHE } from 'jj'
23
15
 
24
- From NPM:
25
-
26
- ```js
27
- import { nextAnimationFrame, on } from 'jj'
16
+ JJHE.create('div')
17
+ .addClass('card')
18
+ .setText('Hello World!')
19
+ .on('click', () => console.log('Hi'))
20
+ .appendToBody()
28
21
  ```
29
22
 
30
- ## Design principals
23
+ ## πŸš€ Why JJ?
31
24
 
32
- - Modern: take full advantage of ever-green browser features. No support for legacy browsers
33
- - Sugar but not magic: it'll let you write shorter code but it won't do much logic behind the scene
34
- - Excplicit: make the code more readable and easier to follow
35
- - Basic: use plain old javascript objects (POJOs) for describing HTML and CSS
25
+ - **Zero Build** – Runs directly in modern browsers
26
+ - **Native Speed** – Direct DOM manipulation, no VDOM overhead
27
+ - **Web Standards** – First-class Web Components support
28
+ - **Fluent API** – Chainable methods for cleaner code
36
29
 
37
- # Install
30
+ ## πŸ“š Learn More
38
31
 
39
- One of the main points of using this library is to avoid compiling your code.
40
- You can directly import it from UNPKG at https://unpkg.com/browse/jj/dist/jj.js
32
+ **πŸ‘‰ [Visit the full site with tutorials, examples, and API docs](https://alexewerlof.github.io/jj)**
41
33
 
42
- But if you prefer to install it via NPM:
34
+ ## πŸ€– AI-Optimized Development
43
35
 
44
- ```
45
- npm i jj
36
+ JJ is designed for AI-assisted development. Install the skill for intelligent code suggestions:
37
+
38
+ ```bash
39
+ npx skills add alexewerlof/jj
46
40
  ```
47
41
 
48
- # Use
42
+ Once installed, AI agents (GitHub Copilot, Cursor, Claude Code, Windsurf, etc.) will:
49
43
 
50
- ```html
51
- <html>
52
- <body>
53
- <script type="module" src="index.js" defer async></script>
54
- </body>
55
- </html>
56
- ```
44
+ - Follow JJ's patterns and conventions automatically
45
+ - Know when to use `.ref` for native DOM access
46
+ - Suggest correct framework translations (React/Vue/jQuery/Svelte β†’ JJ)
47
+ - Generate idiomatic, type-safe code
57
48
 
58
- ```javascript
59
- // If you installed via NPM
60
- import { ready, html } from '/node_modules/jj/dist/jj.js'
61
- // Is you want to directly use it via UNPKG
62
- import { ready, html } from 'https://unpkg.com/browse/jj/dist/jj.js'
49
+ The skill definition (`SKILL.md`) is also included in the npm package at `node_modules/jj/SKILL.md`.
63
50
 
64
- ready(() => {
65
- html.div('Hello world!').appendToBody()
66
- })
67
- ```
51
+ ## βœ… Testing
68
52
 
69
- # Docs
53
+ The entire public API is tested thoroghly.
54
+ Tests live in the `test/` folder and mirror the source filenames (e.g., `test/JJE.test.ts` for `src/JJE.ts`) while importing the target from `./src/index.js`.
70
55
 
71
- _Will be written when we reach a stable API._
56
+ Run tests with:
57
+
58
+ ```bash
59
+ npm test
60
+ ```
72
61
 
73
- # Licence
62
+ ## License
74
63
 
75
64
  MIT
76
65
 
77
- _Made in Sweden πŸ‡ΈπŸ‡ͺ by [@alexewerlof](https://mobile.twitter.com/alexewerlof)_
66
+ _Made in Sweden πŸ‡ΈπŸ‡ͺ by [Alex EwerlΓΆf](https://alexewerlof.com/)_