@srfnstack/fntags 0.4.6 → 0.4.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@srfnstack/fntags",
3
- "version": "0.4.6",
3
+ "version": "0.4.7",
4
4
  "author": "Robert Kempton <r@snow87.com>",
5
5
  "private": false,
6
6
  "homepage": "https://github.com/srfnstack/fntags",
package/src/fnroute.d.mts CHANGED
@@ -22,17 +22,17 @@
22
22
  * )
23
23
  * )
24
24
  *
25
- * @param {Object|Node} children The attributes and children of this element.
25
+ * @param {(Object|Node)[]} children The attributes and children of this element.
26
26
  * @returns {HTMLDivElement} A div element that will only be displayed if the current route starts with the path attribute.
27
27
  */
28
- export function route(...children: any | Node): HTMLDivElement;
28
+ export function route(...children: (any | Node)[]): HTMLDivElement;
29
29
  /**
30
30
  * An element that only renders the first route that matches and updates when the route is changed
31
31
  * The primary purpose of this element is to provide catchall routes for not found pages and path variables
32
- * @param {any} children
32
+ * @param {(Object|Node)[]} children
33
33
  * @returns {Node|(()=>Node)}
34
34
  */
35
- export function routeSwitch(...children: any): Node | (() => Node);
35
+ export function routeSwitch(...children: (any | Node)[]): Node | (() => Node);
36
36
  /**
37
37
  * The main function of this library. It will load the route at the specified path and render it into the container element.
38
38
  * @param {object} options
@@ -54,10 +54,10 @@ export function modRouter({ routePath, attrs, onerror, frame, sendRawPath, forma
54
54
  }): HTMLElement;
55
55
  /**
56
56
  * A link element that is a link to another route in this single page app
57
- * @param {any} children The attributes of the anchor element and any children
57
+ * @param {(Object|Node)[]} children The attributes of the anchor element and any children
58
58
  * @returns {HTMLAnchorElement} An anchor element that will navigate to the specified route when clicked
59
59
  */
60
- export function fnlink(...children: any): HTMLAnchorElement;
60
+ export function fnlink(...children: (any | Node)[]): HTMLAnchorElement;
61
61
  /**
62
62
  * A function to navigate to the specified route
63
63
  * @param {string} route The route to navigate to
@@ -1 +1 @@
1
- {"version":3,"file":"fnroute.d.mts","sourceRoot":"","sources":["fnroute.mjs"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,mCAHW,MAAO,IAAI,GACT,cAAc,CAoB1B;AAED;;;;;GAKG;AACH,yCAHW,GAAG,GACD,IAAI,GAAC,CAAC,MAAI,IAAI,CAAC,CAwB3B;AAeD;;;;;;;;;;GAUG;AACH;eARW,MAAM;WACN,MAAM;qBACE,KAAK,gBAAgB,MAAM,KAAG,IAAI,GAAC,IAAI;kBACxC,IAAI,UAAU,MAAM,KAAG,IAAI;iBAClC,OAAO;uBACA,MAAM,KAAG,MAAM;IACrB,WAAW,CA0DtB;AAwBD;;;;GAIG;AACH,oCAHW,GAAG,GACD,iBAAiB,CAuB7B;AAED;;;;;;GAMG;AACH,4BALW,MAAM,WACN,GAAG,YACH,OAAO,WACP,OAAO,QA6CjB;AA6DD;;;;;;GAMG;AACH,qDAFY,MAAI,IAAI,CAanB;AAED;;;GAGG;AACH,sCAFW,MAAM,QAOhB;AApFD;;;GAGG;AAEH;;;GAGG;AACH,6BAFU,OAAO,cAAc,EAAE,OAAO,CAAC,cAAc,CAAC,CAEf;AAEzC;;;GAGG;AAEH;;;GAGG;AACH,wBAFU,OAAO,cAAc,EAAE,OAAO,CAAC,SAAS,CAAC,CAO/C;AAEJ;;GAEG;AACH;;;GAGG;AACH,gCAFU,UAAU,CAEgC;AACpD;;;GAGG;AACH,+BAFU,UAAU,CAE8B;AAClD;;;GAGG;AACH,kCAFU,UAAU,CAEoC;;;;;;;;wBA/B3C;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,GAAG,CAAA;CAAC;yBAetD,MAAM"}
1
+ {"version":3,"file":"fnroute.d.mts","sourceRoot":"","sources":["fnroute.mjs"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,mCAHW,CAAC,MAAO,IAAI,CAAC,EAAE,GACb,cAAc,CAoB1B;AAED;;;;;GAKG;AACH,yCAHW,CAAC,MAAO,IAAI,CAAC,EAAE,GACb,IAAI,GAAC,CAAC,MAAI,IAAI,CAAC,CAwB3B;AAeD;;;;;;;;;;GAUG;AACH;eARW,MAAM;WACN,MAAM;qBACE,KAAK,gBAAgB,MAAM,KAAG,IAAI,GAAC,IAAI;kBACxC,IAAI,UAAU,MAAM,KAAG,IAAI;iBAClC,OAAO;uBACA,MAAM,KAAG,MAAM;IACrB,WAAW,CA0DtB;AAwBD;;;;GAIG;AACH,oCAHW,CAAC,MAAO,IAAI,CAAC,EAAE,GACb,iBAAiB,CAuB7B;AAED;;;;;;GAMG;AACH,4BALW,MAAM,WACN,GAAG,YACH,OAAO,WACP,OAAO,QA6CjB;AA6DD;;;;;;GAMG;AACH,qDAFY,MAAI,IAAI,CAanB;AAED;;;GAGG;AACH,sCAFW,MAAM,QAOhB;AApFD;;;GAGG;AAEH;;;GAGG;AACH,6BAFU,OAAO,cAAc,EAAE,OAAO,CAAC,cAAc,CAAC,CAEf;AAEzC;;;GAGG;AAEH;;;GAGG;AACH,wBAFU,OAAO,cAAc,EAAE,OAAO,CAAC,SAAS,CAAC,CAO/C;AAEJ;;GAEG;AACH;;;GAGG;AACH,gCAFU,UAAU,CAEgC;AACpD;;;GAGG;AACH,+BAFU,UAAU,CAE8B;AAClD;;;GAGG;AACH,kCAFU,UAAU,CAEoC;;;;;;;;wBA/B3C;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,GAAG,CAAA;CAAC;yBAetD,MAAM"}
package/src/fnroute.mjs CHANGED
@@ -28,7 +28,7 @@ import { fnstate, getAttrs, h, isAttrs, renderNode } from './fntags.mjs'
28
28
  * )
29
29
  * )
30
30
  *
31
- * @param {Object|Node} children The attributes and children of this element.
31
+ * @param {(Object|Node)[]} children The attributes and children of this element.
32
32
  * @returns {HTMLDivElement} A div element that will only be displayed if the current route starts with the path attribute.
33
33
  */
34
34
  export function route (...children) {
@@ -54,7 +54,7 @@ export function route (...children) {
54
54
  /**
55
55
  * An element that only renders the first route that matches and updates when the route is changed
56
56
  * The primary purpose of this element is to provide catchall routes for not found pages and path variables
57
- * @param {any} children
57
+ * @param {(Object|Node)[]} children
58
58
  * @returns {Node|(()=>Node)}
59
59
  */
60
60
  export function routeSwitch (...children) {
@@ -187,7 +187,7 @@ function updatePathParameters () {
187
187
 
188
188
  /**
189
189
  * A link element that is a link to another route in this single page app
190
- * @param {any} children The attributes of the anchor element and any children
190
+ * @param {(Object|Node)[]} children The attributes of the anchor element and any children
191
191
  * @returns {HTMLAnchorElement} An anchor element that will navigate to the specified route when clicked
192
192
  */
193
193
  export function fnlink (...children) {