htmx-router 1.0.0-pre5 → 1.0.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.
- package/cookies.js +2 -1
- package/internal/compile/manifest.js +2 -0
- package/internal/mount.js +1 -0
- package/package.json +6 -2
package/cookies.js
CHANGED
|
@@ -47,8 +47,9 @@ export class Cookies {
|
|
|
47
47
|
options.path ||= "/";
|
|
48
48
|
this.config[name] = options;
|
|
49
49
|
this.map[name] = value;
|
|
50
|
-
if (typeof this.source === "object")
|
|
50
|
+
if (this.source !== null && typeof this.source === "object") {
|
|
51
51
|
document.cookie = `${encodeURIComponent(name)}=${encodeURIComponent(value)}`;
|
|
52
|
+
}
|
|
52
53
|
}
|
|
53
54
|
unset(name) {
|
|
54
55
|
this.parse();
|
package/internal/mount.js
CHANGED
|
@@ -46,6 +46,7 @@ function ClientMounter() {
|
|
|
46
46
|
if (!func)
|
|
47
47
|
throw new Error(`Component ${funcName} is missing from client manifest`);
|
|
48
48
|
func(element, json);
|
|
49
|
+
element.setAttribute("component", funcName);
|
|
49
50
|
element.setAttribute("mounted", "yes");
|
|
50
51
|
}
|
|
51
52
|
function MountAll() {
|
package/package.json
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "htmx-router",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "A lightweight SSR framework with server+client islands",
|
|
5
5
|
"keywords": [
|
|
6
|
-
"htmx",
|
|
6
|
+
"htmx",
|
|
7
|
+
"router",
|
|
8
|
+
"client islands",
|
|
9
|
+
"ssr",
|
|
10
|
+
"vite"
|
|
7
11
|
],
|
|
8
12
|
"main": "./index.js",
|
|
9
13
|
"type": "module",
|