htmx-router 0.0.9 → 0.0.11

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/bin/components.js CHANGED
@@ -26,6 +26,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.Link = void 0;
27
27
  const elements = __importStar(require("typed-html"));
28
28
  function Link(props, contents) {
29
- return elements.createElement("a", { target: props.target || "", style: props.style || "", href: props.to, "hx-get": props.to, "hx-headers": '{"hx-headless": "true", "Cache-Control": "no-cache"}' }, contents);
29
+ return elements.createElement("a", { target: props.target || "", style: props.style || "", href: props.to, "hx-get": props.to, "hx-headers": '{"hx-headless": "true"}' }, contents);
30
30
  }
31
31
  exports.Link = Link;
package/bin/router.js CHANGED
@@ -167,6 +167,7 @@ class RouteTree {
167
167
  try {
168
168
  const depth = BuildOutlet(this, args, from);
169
169
  if (from) {
170
+ res.setHeader('Vary', "HX-Push-Url");
170
171
  res.setHeader('HX-Push-Url', req.url || "/");
171
172
  if (depth > 0) {
172
173
  res.setHeader('HX-Retarget', `#hx-route-${depth.toString(16)}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "htmx-router",
3
- "version": "0.0.9",
3
+ "version": "0.0.11",
4
4
  "description": "A remix.js style file path router for htmX websites",
5
5
  "main": "./bin/index.js",
6
6
  "scripts": {