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 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";
@@ -4,4 +4,4 @@ export {
4
4
  jsx as createElement,
5
5
  jsx as jsxDEV,
6
6
  jsx as jsxs,
7
- } from ".";
7
+ } from "./index.mjs";
@@ -4,4 +4,4 @@ export {
4
4
  jsx as createElement,
5
5
  jsx as jsxDEV,
6
6
  jsx as jsxs,
7
- } from "./index";
7
+ } from "./index.mjs";
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 "../client/index";
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
@@ -1,5 +1,5 @@
1
1
  import setup from "@vanjs/setup";
2
- import { getTagKey } from "./helpers";
2
+ import { getTagKey } from "./helpers.mjs";
3
3
 
4
4
  /** @typedef {typeof import("./types.d.ts").getHeadTags} GetTags */
5
5
  /** @typedef {typeof import("./types.d.ts").createHeadTags} CreateTags */
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
@@ -1,5 +1,5 @@
1
1
  import van from "vanjs-core";
2
- import { addMeta } from "./Head";
2
+ import { addMeta } from "./Head.mjs";
3
3
 
4
4
  /** @typedef {import("vanjs-core").PropsWithKnownKeys} PropsWithKnownKeys */
5
5
  /** @typedef {import("./types.d.ts").TagProps} TagProps */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plugin-vanjs",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "author": "thednp",
5
5
  "license": "MIT",
6
6
  "description": "A mini meta-framework for VanJS powered by Vite",
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 "../setup/index";
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
@@ -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 "../setup/index.mjs";
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
@@ -24,8 +24,7 @@ export default function VitePluginVanJS() {
24
24
  },
25
25
  esbuild: {
26
26
  jsx: "automatic",
27
- jsxFactory: "jsx",
28
- jsxFragment: "Fragment",
27
+ jsxImportSource: "@vanjs/jsx",
29
28
  },
30
29
  };
31
30
  },
package/src/types.d.ts CHANGED
@@ -15,8 +15,7 @@ declare const VitePluginVanJS: () => {
15
15
  };
16
16
  esBuild: {
17
17
  jsx: "string";
18
- jsxFactory: "string";
19
- jsxFragment: "string";
18
+ jsxImportSource: "string";
20
19
  };
21
20
  };
22
21
  transform(code: string, id?: string): {