@srfnstack/fntags 1.2.4 → 1.2.5
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 +1 -1
- package/src/fntags.d.mts +5 -8
- package/src/fntags.d.mts.map +1 -1
- package/src/fntags.mjs +6 -5
package/package.json
CHANGED
package/src/fntags.d.mts
CHANGED
|
@@ -104,18 +104,15 @@ export function styled<T extends HTMLElement | SVGElement>(style: object | strin
|
|
|
104
104
|
*/
|
|
105
105
|
export function registeredState(id: string, initialValue: any, mapKey?: (v: any) => string): any;
|
|
106
106
|
/**
|
|
107
|
-
* Create an HMR-aware root mount point.
|
|
108
|
-
*
|
|
109
|
-
*
|
|
107
|
+
* Create an HMR-aware root mount point. Renders the app into the container and
|
|
108
|
+
* registers a global rerender callback so the vite plugin can trigger re-renders
|
|
109
|
+
* automatically when modules are hot-updated.
|
|
110
110
|
*
|
|
111
111
|
* @param {HTMLElement} container The DOM element to mount into
|
|
112
112
|
* @param {(()=>Node)|Node} appFn A function that returns the app's root element, or the element itself
|
|
113
|
-
* @returns {
|
|
113
|
+
* @returns {HTMLElement} The container element
|
|
114
114
|
*/
|
|
115
|
-
export function hmrRoot(container: HTMLElement, appFn: (() => Node) | Node):
|
|
116
|
-
container: HTMLElement;
|
|
117
|
-
rerender: () => void;
|
|
118
|
-
};
|
|
115
|
+
export function hmrRoot(container: HTMLElement, appFn: (() => Node) | Node): HTMLElement;
|
|
119
116
|
/**
|
|
120
117
|
* Create a compiled template function. The returned function takes a single object that contains the properties
|
|
121
118
|
* defined in the template.
|
package/src/fntags.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fntags.d.mts","sourceRoot":"","sources":["fntags.mjs"],"names":[],"mappings":"AAcA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,2DALW,MAAM,eACH,CAAC,IAAI,MAAO,CAAC,OA6C1B;AAUD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0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JkB,IAAI,iBACH,IAAI,CA+DtB;;;;;;;;;kCAl7BmC,CAAC,YAAY,CAAC,KAAG,CAAC,IAAI,GAAC,GAAG,CAAC,KAAG,IAAI;;;;;;2BAE/C,CAAC,MAAI,CAAC,IAAI,GAAC,GAAG,CAAC,CAAC,GAAC,GAAG,GAAC,IAAI,gCAAkC,CAAC,IAAI,GAAC,GAAG,CAAC,KAAG,IAAI;;;;;qBAG9E,MAAM,KAAG,IAAI;;;;sCAEI,CAAC,YAAY,CAAC,KAAG,CAAC,MAAM,GAAC,GAAG,CAAC,KAAG,GAAG;;;;mCACvC,CAAC,YAAY,CAAC,KAAG,MAAM,KAAK,MAAM;;;;yCAC7B,GAAG,KAAG,CAAC,IAAI,GAAC,GAAG,CAAC,KAAG,IAAI;;;;+CACrB,GAAG,KAAG,CAAC,MAAM,GAAC,GAAG,CAAC,KAAG,GAAG;;;;;;kBAC7C,GAAG,KAAG,IAAI;;;;cAGhB,MAAK,GAAG;;;;;qBACC,CAAC,KAAG,IAAI;;;;;;oBAEV,MAAM,KAAG,GAAG;;;;oBAGZ,MAAM,SAAS,GAAG,mBAAmB,OAAO,KAAG,IAAI;;;;uCAClC,CAAC,YAAY,CAAC,KAAG,IAAI,KAAK,IAAI;;;;eACtD,OAAO;;;;;sDAKqB,CAAC,KAAG,CAAC"}
|
package/src/fntags.mjs
CHANGED
|
@@ -937,13 +937,13 @@ export function registeredState (id, initialValue, mapKey) {
|
|
|
937
937
|
}
|
|
938
938
|
|
|
939
939
|
/**
|
|
940
|
-
* Create an HMR-aware root mount point.
|
|
941
|
-
*
|
|
942
|
-
*
|
|
940
|
+
* Create an HMR-aware root mount point. Renders the app into the container and
|
|
941
|
+
* registers a global rerender callback so the vite plugin can trigger re-renders
|
|
942
|
+
* automatically when modules are hot-updated.
|
|
943
943
|
*
|
|
944
944
|
* @param {HTMLElement} container The DOM element to mount into
|
|
945
945
|
* @param {(()=>Node)|Node} appFn A function that returns the app's root element, or the element itself
|
|
946
|
-
* @returns {
|
|
946
|
+
* @returns {HTMLElement} The container element
|
|
947
947
|
*/
|
|
948
948
|
export function hmrRoot (container, appFn) {
|
|
949
949
|
const render = () => {
|
|
@@ -952,7 +952,8 @@ export function hmrRoot (container, appFn) {
|
|
|
952
952
|
container.appendChild(renderNode(result))
|
|
953
953
|
}
|
|
954
954
|
render()
|
|
955
|
-
|
|
955
|
+
globalThis.__fntags_hmr_rerender = render
|
|
956
|
+
return container
|
|
956
957
|
}
|
|
957
958
|
|
|
958
959
|
/**
|