vasille-web 4.1.6 → 4.3.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
@@ -35,6 +35,7 @@ $ npm create vasille
35
35
  ### Full documentation:
36
36
  * [Learn `Vasille` in 5 minutes](https://github.com/vasille-js/vasille-js/blob/v4/doc/V4-API.md)
37
37
  * [Vasille Router Documentation](https://github.com/vasille-js/vasille-js/blob/v4/doc/Router-API.md)
38
+ * [Vasille Compostion function](https://github.com/vasille-js/vasille-js/blob/v4/doc/Compositions.md)
38
39
 
39
40
  ### Examples
40
41
  * [TypeScript Example](https://github.com/vasille-js/example-typescript)
@@ -103,6 +104,14 @@ All of these are supported:
103
104
 
104
105
  ## Change log
105
106
 
107
+ ### 4.3.0
108
+
109
+ Add new function `safe` which make functions safe, errors are reported automatically.
110
+
111
+ ### 4.2.0
112
+
113
+ Add support for inlined conditions in JSX, binary `&&` and ternary `?:` operator.
114
+
106
115
  ### 4.1.0
107
116
 
108
117
  Added SSG (static site generation) as build option `vasille-web build static`.
@@ -1,4 +1,4 @@
1
- import { App } from "vasille";
1
+ import { App, Destroyable } from "vasille";
2
2
  import type { TagOptions } from "vasille/web-runner";
3
3
  import type { StyleProps } from "../spec/css.d.ts";
4
4
  import type { ScreenProps } from "vasille-router";
@@ -7,6 +7,7 @@ import type { Router } from "vasille-router/web-router";
7
7
  export type { RawStyleProps as StyleProps } from "../spec/css.d.ts";
8
8
  export type ClassItem = string | Record<string, boolean> | false;
9
9
  export type { FallbackScreenProps, ErrorScreenProps } from "vasille-router";
10
+ export { safe } from "vasille";
10
11
 
11
12
  /** Set a handler for component errors */
12
13
  export declare function setErrorHandler(handler: (e: unknown) => void): void;
@@ -115,10 +116,10 @@ export declare function Delay(props: { time?: number; slot?: unknown }): void;
115
116
  export declare function store<Return extends object>(fn: () => Return): Return;
116
117
 
117
118
  /** Creates a model (state) constructor */
118
- export declare function model<Return extends object>(fn: () => Return): () => Return;
119
+ export declare function model<Return extends object>(fn: () => Return): () => Return & Destroyable;
119
120
  export declare function model<Input extends object, Return extends object>(
120
- fn: (input: Input) => Return,
121
- ): (input: Input) => Return;
121
+ fn: (input: Input) => Return & Destroyable,
122
+ ): (input: Input) => Return & Destroyable;
122
123
 
123
124
  export { QueryParams, ScreenProps, RouteParameters } from "vasille-router";
124
125
  export { Router, NavigationMode } from "vasille-router/web-router";
package/lib/index.js CHANGED
@@ -3,6 +3,7 @@ import { Runner } from "vasille/web-runner";
3
3
  import { mount as coreMount } from "vasille-jsx";
4
4
  import { styleSheet as coreStyleSheet } from "vasille-css";
5
5
  import { routeApp as coreRouteApp } from "vasille-router/web-router";
6
+ export { safe } from "vasille";
6
7
  export { view, view as component, view as compose, forward, backward, ensure, ref, expr, expr as bind, expr as calculate, expr as watch, set, Debug, Delay, For, Slot, Watch, awaited, store, model, setModel, mapModel, arrayModel, Switch, setErrorHandler, match, } from "vasille-jsx";
7
8
  export { screen, screen as page, } from "vasille-router";
8
9
  export { Router, routeApp } from "vasille-router/web-router";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vasille-web",
3
- "version": "4.1.6",
3
+ "version": "4.3.0",
4
4
  "description": "The same framework which is designed to build bulletproof frontends.",
5
5
  "main": "index.js",
6
6
  "types": "./index.d.ts",
@@ -47,9 +47,9 @@
47
47
  "homepage": "https://github.com/vasille-js/vasille-js#readme",
48
48
  "dependencies": {
49
49
  "csstype": "^3.1.3",
50
- "vasille": "^4.1.0",
50
+ "vasille": "^4.3.1",
51
51
  "vasille-css": "^4.1.0",
52
- "vasille-jsx": "^4.1.0",
52
+ "vasille-jsx": "^4.3.0",
53
53
  "vasille-router": "^4.0.0"
54
54
  },
55
55
  "devDependencies": {
package/types/index.d.ts CHANGED
@@ -4,6 +4,7 @@ import { TagOptions } from "vasille/web-runner";
4
4
  import { WebRouterInitialization } from "vasille-router/web-router";
5
5
  export type { RawStyleProps as StyleProps } from "../spec/css.js";
6
6
  export type { ClassItem } from "./jsx-runtime.js";
7
+ export { safe } from "vasille";
7
8
  export { view, view as component, view as compose, forward, backward, ensure, ref, expr, expr as bind, expr as calculate, expr as watch, set, Debug, Delay, For, Slot, Watch, awaited, store, model, setModel, mapModel, arrayModel, Switch, setErrorHandler, match, } from "vasille-jsx";
8
9
  export { type QueryParams, type ScreenProps, type RouteParameters, screen, screen as page, type FallbackScreenProps, type ErrorScreenProps, } from "vasille-router";
9
10
  export { Router, type WebRouterInitialization, type NavigationMode, routeApp } from "vasille-router/web-router";