vasille-jsx 4.0.1 → 4.1.0

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/README.md CHANGED
@@ -97,10 +97,20 @@ All of these are supported:
97
97
  * [x] `100%` Test Coverage fot babel plugin.
98
98
  * [x] Add CSS support (define styles in components).
99
99
  * [x] Add router.
100
- * [ ] Add SSG (static site generation).
100
+ * [x] Add SSG (static site generation).
101
101
  * [ ] Add SSR (server side rendering).
102
102
  * [ ] Develop tools extension for debugging.
103
103
 
104
+ ## Change log
105
+
106
+ ### 4.0.0
107
+
108
+ Initial version of the framework with file based routing and building scripts (`vasille-web dev` and `vasille-web build spa`).
109
+
110
+ ## 4.1.0
111
+
112
+ Added SSG (static site generation) as build option `vasille-web build static`.
113
+
104
114
  ## Questions
105
115
 
106
116
  If you have questions, feel free to contact the maintainer of the project:
package/lib/components.js CHANGED
@@ -4,7 +4,7 @@ export function Slot({ model, slot, ...options }, ctx, defaultSlot) {
4
4
  model(options, ctx);
5
5
  }
6
6
  else {
7
- (slot ?? defaultSlot)?.(ctx);
7
+ (slot ?? defaultSlot)?.({}, ctx);
8
8
  }
9
9
  }
10
10
  export function Switch(options, ctx) {
package/lib/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export { Debug, Delay, For, Slot, Watch, Switch } from "./components.js";
2
2
  export { view, mount, model, store } from "./compose.js";
3
3
  export { awaited } from "./library.js";
4
- export { ref, arrayModel, backward, mapModel, expr, setModel, forward, set, ensure } from "./internal.js";
4
+ export { ref, arrayModel, backward, mapModel, expr, setModel, forward, set, ensure, match } from "./internal.js";
5
5
  export { setErrorHandler } from "vasille";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vasille-jsx",
3
- "version": "4.0.1",
4
- "description": "The framework designed to build bulletproof frontends (JSX components)",
3
+ "version": "4.1.0",
4
+ "description": "The same framework which is designed to build bulletproof frontends (JSX components)",
5
5
  "main": "lib/index.js",
6
6
  "exports": {
7
7
  "types": "./types/index.d.ts",
@@ -44,7 +44,7 @@
44
44
  "opera 15"
45
45
  ],
46
46
  "dependencies": {
47
- "vasille": "^4.0.0"
47
+ "vasille": "^4.1.0"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@types/jest": "^30.0.0",
@@ -1,9 +1,9 @@
1
1
  import { Fragment, IValue } from "vasille";
2
2
  interface SlotOptions<Node, Element, TagOptions extends object, T extends object> {
3
3
  model?: (input: T, ctx: Fragment<Node, Element, TagOptions>) => void;
4
- slot?: (ctx: Fragment<Node, Element, TagOptions>) => void;
4
+ slot?: (input: object, ctx: Fragment<Node, Element, TagOptions>) => void;
5
5
  }
6
- export declare function Slot<Node, Element, TagOptions extends object, T extends object = {}>({ model, slot, ...options }: SlotOptions<Node, Element, TagOptions, T> & T, ctx: Fragment<Node, Element, TagOptions>, defaultSlot?: (ctx: Fragment<Node, Element, TagOptions>) => void): void;
6
+ export declare function Slot<Node, Element, TagOptions extends object, T extends object = {}>({ model, slot, ...options }: SlotOptions<Node, Element, TagOptions, T> & T, ctx: Fragment<Node, Element, TagOptions>, defaultSlot?: (input: object, ctx: Fragment<Node, Element, TagOptions>) => void): void;
7
7
  interface SwitchOptions<Node, Element, TagOptions extends object> {
8
8
  cases: {
9
9
  $case: IValue<unknown>;
package/types/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { Debug, Delay, For, Slot, Watch, Switch } from "./components.js";
2
2
  export { view, mount, model, store, type Composed } from "./compose.js";
3
3
  export { awaited } from "./library.js";
4
- export { ref, arrayModel, backward, mapModel, expr, setModel, forward, set, ensure } from "./internal.js";
4
+ export { ref, arrayModel, backward, mapModel, expr, setModel, forward, set, ensure, match } from "./internal.js";
5
5
  export { setErrorHandler } from "vasille";
package/eslint.config.js DELETED
@@ -1,25 +0,0 @@
1
- import compat from "eslint-plugin-compat";
2
- import tseslint from "typescript-eslint";
3
- import { globalIgnores } from "eslint/config";
4
-
5
- export default tseslint.config(
6
- tseslint.configs.base,
7
- {
8
- name: "compat check",
9
- files: ["src/**/*.ts", "src/**/*.tsx"],
10
- plugins: { compat },
11
- rules: {
12
- "compat/compat": "error",
13
- },
14
- settings: {
15
- polyfills: [],
16
- },
17
- languageOptions: {
18
- parserOptions: {
19
- projectService: false,
20
- tsconfigRootDir: import.meta.dirname,
21
- },
22
- },
23
- },
24
- globalIgnores(["node_modules", "lib/**/*", "types", "coverage/**/*"]),
25
- );