sibujs 1.0.5 → 1.0.6

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/dist/plugins.cjs CHANGED
@@ -2238,7 +2238,8 @@ function KeepAliveRoute(options) {
2238
2238
  }
2239
2239
  function RouterLink(props) {
2240
2240
  if (!globalRouter) throw new Error("Router not initialized. Call createRouter() first.");
2241
- const { to, replace: replace2 = false, activeClass, exactActiveClass, nodes, target, rel, ...attrs } = props;
2241
+ const { to, replace: replace2 = false, activeClass, exactActiveClass, nodes, target, rel, class: classAttr, ...attrs } = props;
2242
+ const baseClass = typeof classAttr === "string" ? classAttr : "";
2242
2243
  const routeGetter = globalRouter.routeGetter;
2243
2244
  const href = globalRouter["resolvePath"](to);
2244
2245
  const hrefPath = href.split("?")[0].split("#")[0];
@@ -2268,7 +2269,7 @@ function RouterLink(props) {
2268
2269
  if (exactActiveClass) classes.push(exactActiveClass);
2269
2270
  else if (options.linkExactActiveClass) classes.push(options.linkExactActiveClass);
2270
2271
  }
2271
- link2.className = classes.join(" ");
2272
+ link2.className = [baseClass, ...classes].filter(Boolean).join(" ");
2272
2273
  });
2273
2274
  registerDisposer(link2, effectCleanup);
2274
2275
  Object.entries(attrs).forEach(([key, value]) => {
package/dist/plugins.js CHANGED
@@ -1102,7 +1102,8 @@ function KeepAliveRoute(options) {
1102
1102
  }
1103
1103
  function RouterLink(props) {
1104
1104
  if (!globalRouter) throw new Error("Router not initialized. Call createRouter() first.");
1105
- const { to, replace: replace2 = false, activeClass, exactActiveClass, nodes, target, rel, ...attrs } = props;
1105
+ const { to, replace: replace2 = false, activeClass, exactActiveClass, nodes, target, rel, class: classAttr, ...attrs } = props;
1106
+ const baseClass = typeof classAttr === "string" ? classAttr : "";
1106
1107
  const routeGetter = globalRouter.routeGetter;
1107
1108
  const href = globalRouter["resolvePath"](to);
1108
1109
  const hrefPath = href.split("?")[0].split("#")[0];
@@ -1132,7 +1133,7 @@ function RouterLink(props) {
1132
1133
  if (exactActiveClass) classes.push(exactActiveClass);
1133
1134
  else if (options.linkExactActiveClass) classes.push(options.linkExactActiveClass);
1134
1135
  }
1135
- link.className = classes.join(" ");
1136
+ link.className = [baseClass, ...classes].filter(Boolean).join(" ");
1136
1137
  });
1137
1138
  registerDisposer(link, effectCleanup);
1138
1139
  Object.entries(attrs).forEach(([key, value]) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sibujs",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "A lightweight, function-based frontend framework that combines the best of React, Svelte, and Vue — with zero VDOM and maximum simplicity. Designed for developers who want fine-grained reactivity and full control without compilation or magic.",
5
5
  "keywords": [
6
6
  "frontend",