jails-js 6.9.7 → 6.9.9

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/readme.md CHANGED
@@ -1,13 +1,16 @@
1
- <p align="center">
2
- <img width="200" src="https://github.com/user-attachments/assets/8b4dbfb9-f05e-4b83-8d42-8847038a97e2" alt="Jails" />
3
- </p>
4
1
 
5
- <h1 align="center">Jails</h1>
6
2
 
7
- <h3 align="center">An Elegant and Minimalistic<br /> Web Components Micro-Framework</h3>
3
+ <p align="center" height="100">
4
+ <img width="250" alt="Jails - A minimalistic Micro Framework" src="https://github.com/user-attachments/assets/5e2eee1a-5f8f-4eed-abba-7422a5258245" />
5
+
6
+ </p>
7
+
8
+ <h1 align="center">An Elegant and Minimalistic<br /> Micro-Framework</h3>
8
9
 
9
10
  <div align="center">
10
- <table align="center" border="0">
11
+ <br />
12
+ <br />
13
+ <table width="100%" align="center" border="0">
11
14
  <tr><td align="center">🏝 Built for <br/><a href="https://www.patterns.dev/posts/islands-architecture/" target="_blank">Island Architecture</a></td</tr>
12
15
  <td align="center">ƛ Inspired by <br/><a href="https://guide.elm-lang.org/architecture/" target="_blank">Elm Architecture</a></td>
13
16
  <td align="center">🔗 Ready for <br/><a href="https://htmx.org/essays/hypermedia-driven-applications" target="_blank">hypermedia applications</a></td></tr>
@@ -28,9 +31,19 @@
28
31
  The JavaScript ecosystem, including browsers and tools, has undergone significant evolution over the years. However, it's evident that many of the complexities introduced by frameworks today may not be essential for the majority of web applications. The prevailing trend in modern app development seems to prioritize expertise in frameworks over mastery of the language itself, often leading to a sense of being confined within the framework ecosystem.
29
32
 
30
33
  Jails was designed to be:
31
- - **Decoupled** - Backend-agnostic, our solution seamlessly integrates with any backend framework or programming language. It refrains from importing styles and ensures a clean demarcation by avoiding mixing HTML within the codebase.
32
- - **Lightweight** - Lightweight, weighing in at just around 5kb when gzipped. It enhances your application's performance by progressively lightening the load, separating HTML from your JavaScript code. This practice results in smaller bundles and a more streamlined application.
33
- - **Interoperable** - It seamlessly integrates and functions alongside any other vanilla UI or behavioral libraries. You no longer need to wait for a specific Jails Chart.js library to be available; simply integrate it into your application hassle-free.
34
+
35
+ <table width="100%" align="center" border="0">
36
+ <tr>
37
+ <th>🧩 Decoupled</th>
38
+ <th>⚡️ Lightweight</th>
39
+ <th>📦 Interoperable</th>
40
+ </tr>
41
+ <tr>
42
+ <td align="center">Backend-agnostic, our solution seamlessly integrates with any backend framework or back-end programming language.</td>
43
+ <td align="center">Lightweight, just around 5kb when gzipped. It enhances your application's performance by progressively, separating HTML from your JavaScript code. </td>
44
+ <td align="center">It seamlessly integrates and functions alongside any other vanilla UI or behavioral libraries. </td>
45
+ </tr>
46
+ </table>
34
47
 
35
48
  <br clear="all" />
36
49
  <br />
@@ -111,7 +111,8 @@ const transformTemplate = ( clone ) => {
111
111
 
112
112
  if (htmlClass) {
113
113
  element.removeAttribute('html-class')
114
- element.className = (element.className + ` %%_=${htmlClass}_%%`).trim()
114
+ const value = element.getAttribute('class') || ''
115
+ element.setAttribute('class', `${value} %%_=${htmlClass}_%%`)
115
116
  }
116
117
 
117
118
  if( element.localName === 'template' ) {
package/tsconfig.json CHANGED
@@ -2,7 +2,6 @@
2
2
  "compilerOptions": {
3
3
  "declaration": true,
4
4
  "emitDeclarationOnly": true,
5
- "outDir": "dist",
6
5
  /* Visit https://aka.ms/tsconfig to read more about this file */
7
6
 
8
7
  /* Projects */
package/types.d.ts CHANGED
@@ -9,7 +9,7 @@ export declare const templateConfig: (options: any) => void;
9
9
  export declare const register: (name: string, module: any, dependencies?: any) => void
10
10
  export declare const start: (target?: HTMLElement) => void;
11
11
  export declare const subscribe:( subject: string, callback: (data:any) => void ) => Function
12
- export declare const publish: ( subject: string, data :any ) => void
12
+ export declare const publish: ( subject: string, data ?:any ) => void
13
13
 
14
14
  export type Component = {
15
15
 
@@ -24,11 +24,11 @@ export type Component = {
24
24
  getRaw() : any
25
25
  }
26
26
 
27
- effect( callback: ( state: any ) => Promise<any> | void )
27
+ effect( callback: ( state: any ) => Promise<any> | void ): void
28
28
 
29
29
  main( mainArgs: ( t: Component ) => void ): void
30
30
 
31
- publish( name: string, value: any ) : void
31
+ publish( name: string, value?: any ) : void
32
32
 
33
33
  subscribe( name: string, value: Function ) : Function
34
34