htmx-router
Advanced tools
Comparing version 0.0.11 to 0.0.12
@@ -29,4 +29,4 @@ "use strict"; | ||
function Link(props, contents) { | ||
return elements.createElement("a", { target: props.target || "", style: props.style || "", href: props.to, "hx-get": props.to, "hx-headers": '{"hx-headless": "true"}' }, contents); | ||
return elements.createElement("a", { target: props.target || "", style: props.style || "", href: props.to, "hx-get": props.to }, contents); | ||
} | ||
exports.Link = Link; |
@@ -164,3 +164,4 @@ "use strict"; | ||
const args = new render_args_1.RenderArgs(req, res, url); | ||
const from = req.headers['hx-headless'] ? | ||
res.setHeader('Vary', "hx-current-url"); | ||
const from = req.headers['hx-current-url'] ? | ||
new URL(((_a = req.headers['hx-current-url']) === null || _a === void 0 ? void 0 : _a.toString()) || "/").pathname : | ||
@@ -171,3 +172,2 @@ ""; | ||
if (from) { | ||
res.setHeader('Vary', "HX-Push-Url"); | ||
res.setHeader('HX-Push-Url', req.url || "/"); | ||
@@ -174,0 +174,0 @@ if (depth > 0) { |
{ | ||
"name": "htmx-router", | ||
"version": "0.0.11", | ||
"version": "0.0.12", | ||
"description": "A remix.js style file path router for htmX websites", | ||
@@ -5,0 +5,0 @@ "main": "./bin/index.js", |
26540