ovr 0.1.0 → 1.0.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
@@ -1,6 +1,18 @@
1
1
  # ovr
2
2
 
3
- **ovr** is a lightweight toolkit for building fast, streaming web applications using asynchronous JSX and a modern Fetch API-based router.
3
+ ```bash
4
+ npm i ovr
5
+ ```
6
+
7
+ **ovr** is a [lightweight](https://bundlephobia.com/package/ovr) toolkit for building fast, streaming web applications using asynchronous JSX and a modern Fetch API-based router.
8
+
9
+ ```tsx
10
+ async function* Component() {
11
+ yield <p>start</p>; // streamed immediately
12
+ await promise;
13
+ yield <p>after</p>;
14
+ }
15
+ ```
4
16
 
5
17
  It's designed for server-side rendering (SSR) where performance and Time-To-First-Byte (TTFB) matter. ovr evaluates components concurrently but streams the resulting HTML **in order**, allowing browsers to render content progressively as it arrives.
6
18
 
@@ -28,10 +40,6 @@ Crucially, ovr ensures that these HTML chunks are yielded in the original source
28
40
 
29
41
  For example, ovr will immediately send the `<head>` of your document for the browser to start requesting the linked assets. Then the rest of the page streams in as it becomes available.
30
42
 
31
- > [!WARNING]
32
- >
33
- > ovr does not escape HTML automatically, use the `escape` function provided.
34
-
35
43
  ### Configuration
36
44
 
37
45
  Add the following to your `tsconfig.json` to enable the JSX transform,
@@ -107,6 +115,10 @@ function* DataTypes() {
107
115
  }
108
116
  ```
109
117
 
118
+ > [!WARNING]
119
+ >
120
+ > ovr does not escape HTML automatically, use the `escape` function provided.
121
+
110
122
  ## Router
111
123
 
112
124
  ```ts
@@ -18,6 +18,7 @@ type ExtractMultiParams<Patterns extends string[]> = Patterns extends [
18
18
  ] ? Rest["length"] extends 0 ? ExtractParams<First> : ExtractParams<First> | ExtractMultiParams<Rest> : never;
19
19
  export declare class Router<State = null> {
20
20
  #private;
21
+ [key: string]: any;
21
22
  constructor(config?: {
22
23
  /**
23
24
  * - `"never"` - Not found requests with a trailing slash will be redirected to the same path without a trailing slash
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "ovr",
3
- "version": "0.1.0",
3
+ "version": "1.0.0",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/rossrobino/ovr.git"
8
8
  },
9
9
  "type": "module",
10
+ "sideEffects": false,
10
11
  "types": "./dist/index.d.ts",
11
12
  "main": "./dist/index.js",
12
13
  "exports": {