vite-plugin-vanjs 0.0.4 → 0.0.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/jsx/index.mjs +3 -3
- package/jsx/jsx-dev-runtime.mjs +1 -1
- package/jsx/jsx-runtime.mjs +1 -1
- package/jsx/jsx.mjs +1 -1
- package/meta/Head.mjs +1 -1
- package/meta/index.mjs +3 -3
- package/meta/tags.mjs +1 -1
- package/package.json +1 -1
- package/router/a.mjs +3 -3
- package/router/helpers.mjs +2 -2
- package/router/index.mjs +7 -6
- package/router/lazy.mjs +1 -1
- package/router/router.mjs +3 -3
- package/router/routes.mjs +2 -2
- package/router/state.mjs +1 -1
- package/src/index.mjs +1 -2
- package/src/types.d.ts +1 -2
package/jsx/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// Export everything through the main entry point
|
|
2
|
-
export { Fragment } from "./fragment";
|
|
3
|
-
export { jsx } from "./jsx";
|
|
4
|
-
export { jsx as createElement, jsx as jsxDEV, jsx as jsxs } from "./jsx";
|
|
2
|
+
export { Fragment } from "./fragment.mjs";
|
|
3
|
+
export { jsx } from "./jsx.mjs";
|
|
4
|
+
export { jsx as createElement, jsx as jsxDEV, jsx as jsxs } from "./jsx.mjs";
|
package/jsx/jsx-dev-runtime.mjs
CHANGED
package/jsx/jsx-runtime.mjs
CHANGED
package/jsx/jsx.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import van from "@vanjs/van";
|
|
2
2
|
import setup from "@vanjs/setup";
|
|
3
|
-
import { setAttribute, styleToString } from "
|
|
3
|
+
import { setAttribute, styleToString } from "@vanjs/client";
|
|
4
4
|
|
|
5
5
|
export const jsx = (jsxTag, { children, ref, style, ...props }) => {
|
|
6
6
|
if (typeof jsxTag === "string") {
|
package/meta/Head.mjs
CHANGED
package/meta/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "./Head";
|
|
2
|
-
export * from "./tags";
|
|
3
|
-
export * from "./helpers";
|
|
1
|
+
export * from "./Head.mjs";
|
|
2
|
+
export * from "./tags.mjs";
|
|
3
|
+
export * from "./helpers.mjs";
|
package/meta/tags.mjs
CHANGED
package/package.json
CHANGED
package/router/a.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// router/a.mjs
|
|
2
2
|
import van from "vanjs-core";
|
|
3
|
-
import setup from "
|
|
4
|
-
import { matchRoute } from "./routes";
|
|
5
|
-
import { executeLifecycle, isCurrentPage, navigate } from "./helpers";
|
|
3
|
+
import setup from "@vanjs/setup";
|
|
4
|
+
import { matchRoute } from "./routes.mjs";
|
|
5
|
+
import { executeLifecycle, isCurrentPage, navigate } from "./helpers.mjs";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @param {Partial<HTMLAnchorElement>} props
|
package/router/helpers.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import setup from "@vanjs/setup";
|
|
2
2
|
import van from "vanjs-core";
|
|
3
|
-
import { routerState, setRouterState } from "./state";
|
|
4
|
-
import { matchRoute } from "./routes";
|
|
3
|
+
import { routerState, setRouterState } from "./state.mjs";
|
|
4
|
+
import { matchRoute } from "./routes.mjs";
|
|
5
5
|
|
|
6
6
|
/** @typedef {import("./types.d.ts").Route} Route */
|
|
7
7
|
/** @typedef {import("./types.d.ts").VanNode} VanNode */
|
package/router/index.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export * from "./router";
|
|
2
|
-
export * from "./routes";
|
|
3
|
-
export * from "./a";
|
|
4
|
-
export * from "./state";
|
|
5
|
-
export * from "./lazy";
|
|
6
|
-
export * from "./helpers";
|
|
1
|
+
export * from "./router.mjs";
|
|
2
|
+
export * from "./routes.mjs";
|
|
3
|
+
export * from "./a.mjs";
|
|
4
|
+
export * from "./state.mjs";
|
|
5
|
+
export * from "./lazy.mjs";
|
|
6
|
+
export * from "./helpers.mjs";
|
|
7
|
+
export * from "./cache.mjs";
|
package/router/lazy.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import setup from "@vanjs/setup";
|
|
2
2
|
import van from "vanjs-core";
|
|
3
|
-
import { cache, getCached } from "./cache";
|
|
3
|
+
import { cache, getCached } from "./cache.mjs";
|
|
4
4
|
|
|
5
5
|
/** @typedef {import('./types').VanNode} VanNode */
|
|
6
6
|
/** @typedef {import('./types').ComponentModule} ComponentModule */
|
package/router/router.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import van from "vanjs-core";
|
|
2
2
|
import setup from "@vanjs/setup";
|
|
3
|
-
import { routerState } from "./state";
|
|
4
|
-
import { matchRoute } from "./routes";
|
|
5
|
-
import { executeLifecycle, unwrap } from "./helpers";
|
|
3
|
+
import { routerState } from "./state.mjs";
|
|
4
|
+
import { matchRoute } from "./routes.mjs";
|
|
5
|
+
import { executeLifecycle, unwrap } from "./helpers.mjs";
|
|
6
6
|
|
|
7
7
|
export const Router = () => {
|
|
8
8
|
const { div } = van.tags;
|
package/router/routes.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// router/routes.mjs
|
|
2
|
-
import { extractParams, isLazyComponent } from "./helpers";
|
|
3
|
-
import { lazy } from "./lazy";
|
|
2
|
+
import { extractParams, isLazyComponent } from "./helpers.mjs";
|
|
3
|
+
import { lazy } from "./lazy.mjs";
|
|
4
4
|
|
|
5
5
|
/** @typedef {import("./types.d.ts").RouteEntry} RouteEntry */
|
|
6
6
|
/** @typedef {import("./types.d.ts").RouteProps} RouteProps */
|
package/router/state.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// router/state.js
|
|
2
2
|
import van from "vanjs-core";
|
|
3
|
-
import setup from "
|
|
3
|
+
import setup from "@vanjs/setup";
|
|
4
4
|
|
|
5
5
|
const initialPath = !setup.isServer ? globalThis.location.pathname : "/";
|
|
6
6
|
const initialSearch = !setup.isServer ? globalThis.location.search : "";
|
package/src/index.mjs
CHANGED