@vidact/runtime 0.2.0-beta.0 → 0.2.0-beta.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/CHANGELOG.md +52 -0
- package/README.md +1 -1
- package/dist/actions.d.ts +32 -30
- package/dist/actions.d.ts.map +1 -1
- package/dist/actions.js +251 -266
- package/dist/actions.js.map +1 -1
- package/dist/async.d.ts +20 -17
- package/dist/async.d.ts.map +1 -1
- package/dist/async.js +18 -17
- package/dist/async.js.map +1 -1
- package/dist/compiled/async-resource.d.ts +9 -6
- package/dist/compiled/async-resource.d.ts.map +1 -1
- package/dist/compiled/async-resource.js +69 -77
- package/dist/compiled/async-resource.js.map +1 -1
- package/dist/compiled/core.d.ts +136 -147
- package/dist/compiled/core.d.ts.map +1 -1
- package/dist/compiled/core.js +2672 -2985
- package/dist/compiled/core.js.map +1 -1
- package/dist/compiled/types.d.ts +44 -56
- package/dist/compiled/types.d.ts.map +1 -1
- package/dist/compiled/types.js +10 -6
- package/dist/compiled/types.js.map +1 -1
- package/dist/compiled/validation.d.ts +4 -1
- package/dist/compiled/validation.d.ts.map +1 -1
- package/dist/compiled/validation.js +17 -20
- package/dist/compiled/validation.js.map +1 -1
- package/dist/component-spread.d.ts +5 -3
- package/dist/component-spread.d.ts.map +1 -1
- package/dist/component-spread.js +49 -67
- package/dist/component-spread.js.map +1 -1
- package/dist/concurrent.d.ts +20 -18
- package/dist/concurrent.d.ts.map +1 -1
- package/dist/concurrent.js +191 -210
- package/dist/concurrent.js.map +1 -1
- package/dist/direct-dom.d.ts +17 -12
- package/dist/direct-dom.d.ts.map +1 -1
- package/dist/direct-dom.js +187 -221
- package/dist/direct-dom.js.map +1 -1
- package/dist/dom/attributes.d.ts +9 -6
- package/dist/dom/attributes.d.ts.map +1 -1
- package/dist/dom/attributes.js +65 -47
- package/dist/dom/attributes.js.map +1 -1
- package/dist/dom/events.d.ts +5 -2
- package/dist/dom/events.d.ts.map +1 -1
- package/dist/dom/events.js +53 -65
- package/dist/dom/events.js.map +1 -1
- package/dist/dom/forms.d.ts +9 -6
- package/dist/dom/forms.d.ts.map +1 -1
- package/dist/dom/forms.js +152 -198
- package/dist/dom/forms.js.map +1 -1
- package/dist/dom/intrinsic.d.ts +17 -15
- package/dist/dom/intrinsic.d.ts.map +1 -1
- package/dist/dom/intrinsic.js +48 -50
- package/dist/dom/intrinsic.js.map +1 -1
- package/dist/dom/namespace.d.ts +4 -1
- package/dist/dom/namespace.d.ts.map +1 -1
- package/dist/dom/namespace.js +25 -28
- package/dist/dom/namespace.js.map +1 -1
- package/dist/dom/namespaces.d.ts +11 -8
- package/dist/dom/namespaces.d.ts.map +1 -1
- package/dist/dom/namespaces.js +14 -12
- package/dist/dom/namespaces.js.map +1 -1
- package/dist/dom/properties.d.ts +18 -16
- package/dist/dom/properties.d.ts.map +1 -1
- package/dist/dom/properties.js +273 -296
- package/dist/dom/properties.js.map +1 -1
- package/dist/dom/style-properties.d.ts +4 -1
- package/dist/dom/style-properties.d.ts.map +1 -1
- package/dist/dom/style-properties.js +49 -45
- package/dist/dom/style-properties.js.map +1 -1
- package/dist/dom/styles.d.ts +5 -2
- package/dist/dom/styles.d.ts.map +1 -1
- package/dist/dom/styles.js +47 -67
- package/dist/dom/styles.js.map +1 -1
- package/dist/dom-forms.d.ts +4 -1
- package/dist/dom-forms.d.ts.map +1 -1
- package/dist/dom-forms.js +16 -13
- package/dist/dom-forms.js.map +1 -1
- package/dist/dom-styles.d.ts +4 -1
- package/dist/dom-styles.d.ts.map +1 -1
- package/dist/dom-styles.js +10 -7
- package/dist/dom-styles.js.map +1 -1
- package/dist/framework-hydrate.d.ts +20 -17
- package/dist/framework-hydrate.d.ts.map +1 -1
- package/dist/framework-hydrate.js +128 -146
- package/dist/framework-hydrate.js.map +1 -1
- package/dist/framework-protocol.d.ts +27 -25
- package/dist/framework-protocol.d.ts.map +1 -1
- package/dist/framework-protocol.js +173 -211
- package/dist/framework-protocol.js.map +1 -1
- package/dist/framework.d.ts +34 -32
- package/dist/framework.d.ts.map +1 -1
- package/dist/framework.js +74 -93
- package/dist/framework.js.map +1 -1
- package/dist/hydrate.d.ts +11 -8
- package/dist/hydrate.d.ts.map +1 -1
- package/dist/hydrate.js +13 -9
- package/dist/hydrate.js.map +1 -1
- package/dist/hydration-bridge.d.ts +70 -58
- package/dist/hydration-bridge.d.ts.map +1 -1
- package/dist/hydration-bridge.js +77 -66
- package/dist/hydration-bridge.js.map +1 -1
- package/dist/hydration.d.ts +54 -28
- package/dist/hydration.d.ts.map +1 -1
- package/dist/hydration.js +450 -463
- package/dist/hydration.js.map +1 -1
- package/dist/index.d.ts +13 -13
- package/dist/index.js +11 -13
- package/dist/indexed-list.d.ts +8 -5
- package/dist/indexed-list.d.ts.map +1 -1
- package/dist/indexed-list.js +14 -7
- package/dist/indexed-list.js.map +1 -1
- package/dist/jsx-runtime.d.ts +10 -8
- package/dist/jsx-runtime.d.ts.map +1 -1
- package/dist/jsx-runtime.js +28 -23
- package/dist/jsx-runtime.js.map +1 -1
- package/dist/keyed-list.d.ts +13 -14
- package/dist/keyed-list.d.ts.map +1 -1
- package/dist/keyed-list.js +132 -160
- package/dist/keyed-list.js.map +1 -1
- package/dist/metadata.d.ts +6 -3
- package/dist/metadata.d.ts.map +1 -1
- package/dist/metadata.js +131 -164
- package/dist/metadata.js.map +1 -1
- package/dist/nested-prop.d.ts +4 -2
- package/dist/nested-prop.d.ts.map +1 -1
- package/dist/nested-prop.js +17 -16
- package/dist/nested-prop.js.map +1 -1
- package/dist/profiling.d.ts +11 -8
- package/dist/profiling.d.ts.map +1 -1
- package/dist/profiling.js +17 -17
- package/dist/profiling.js.map +1 -1
- package/dist/protocol.d.ts +5 -2
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js +8 -5
- package/dist/protocol.js.map +1 -1
- package/dist/raw-html.d.ts +5 -2
- package/dist/raw-html.d.ts.map +1 -1
- package/dist/raw-html.js +86 -146
- package/dist/raw-html.js.map +1 -1
- package/dist/ref.d.ts +8 -3
- package/dist/ref.d.ts.map +1 -1
- package/dist/ref.js +10 -2
- package/dist/ref.js.map +1 -1
- package/dist/renderable-protocol.d.ts +26 -8
- package/dist/renderable-protocol.d.ts.map +1 -1
- package/dist/renderable-protocol.js +30 -9
- package/dist/renderable-protocol.js.map +1 -1
- package/dist/renderable.d.ts +27 -22
- package/dist/renderable.d.ts.map +1 -1
- package/dist/renderable.js +141 -133
- package/dist/renderable.js.map +1 -1
- package/dist/retained-ui.d.ts +9 -6
- package/dist/retained-ui.d.ts.map +1 -1
- package/dist/retained-ui.js +12 -10
- package/dist/retained-ui.js.map +1 -1
- package/dist/root.d.ts +18 -15
- package/dist/root.d.ts.map +1 -1
- package/dist/root.js +73 -85
- package/dist/root.js.map +1 -1
- package/dist/scheduler.d.ts +10 -8
- package/dist/scheduler.d.ts.map +1 -1
- package/dist/scheduler.js +97 -105
- package/dist/scheduler.js.map +1 -1
- package/dist/server-framework.d.ts +45 -42
- package/dist/server-framework.d.ts.map +1 -1
- package/dist/server-framework.js +209 -217
- package/dist/server-framework.js.map +1 -1
- package/dist/server.d.ts +130 -128
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +603 -710
- package/dist/server.js.map +1 -1
- package/dist/shared/promise.d.ts +6 -3
- package/dist/shared/promise.d.ts.map +1 -1
- package/dist/shared/promise.js +21 -19
- package/dist/shared/promise.js.map +1 -1
- package/dist/source-mask.d.ts +9 -6
- package/dist/source-mask.d.ts.map +1 -1
- package/dist/source-mask.js +45 -63
- package/dist/source-mask.js.map +1 -1
- package/dist/spread.d.ts +5 -2
- package/dist/spread.d.ts.map +1 -1
- package/dist/spread.js +79 -99
- package/dist/spread.js.map +1 -1
- package/dist/state-slot.d.ts +18 -15
- package/dist/state-slot.d.ts.map +1 -1
- package/dist/state-slot.js +43 -42
- package/dist/state-slot.js.map +1 -1
- package/dist/testing.d.ts +9 -6
- package/dist/testing.d.ts.map +1 -1
- package/dist/testing.js +16 -12
- package/dist/testing.js.map +1 -1
- package/package.json +8 -7
- package/src/actions.ts +415 -0
- package/src/async.ts +78 -0
- package/src/compiled/async-resource.ts +113 -0
- package/src/compiled/core.ts +4041 -0
- package/src/compiled/types.ts +96 -0
- package/src/compiled/validation.ts +23 -0
- package/src/component-spread.ts +86 -0
- package/src/concurrent.ts +310 -0
- package/src/direct-dom.ts +365 -0
- package/src/dom/attributes.ts +55 -0
- package/src/dom/events.ts +93 -0
- package/src/dom/forms.ts +220 -0
- package/src/dom/intrinsic.ts +94 -0
- package/src/dom/namespace.ts +30 -0
- package/src/dom/namespaces.ts +14 -0
- package/src/dom/properties.ts +355 -0
- package/src/dom/style-properties.ts +46 -0
- package/src/dom/styles.ts +86 -0
- package/src/dom-forms.ts +23 -0
- package/src/dom-styles.ts +11 -0
- package/src/env.d.ts +6 -0
- package/src/framework-hydrate.ts +224 -0
- package/src/framework-protocol.ts +335 -0
- package/src/framework.ts +161 -0
- package/src/hydrate.ts +38 -0
- package/src/hydration-bridge.ts +196 -0
- package/src/hydration.ts +642 -0
- package/src/index.ts +92 -0
- package/src/indexed-list.ts +20 -0
- package/src/jsx-runtime.ts +55 -0
- package/src/keyed-list.ts +233 -0
- package/src/metadata.ts +212 -0
- package/src/nested-prop.ts +27 -0
- package/src/profiling.ts +43 -0
- package/src/protocol.ts +8 -0
- package/src/raw-html.ts +206 -0
- package/src/ref.ts +13 -0
- package/src/renderable-protocol.ts +63 -0
- package/src/renderable.ts +283 -0
- package/src/retained-ui.ts +19 -0
- package/src/root.ts +122 -0
- package/src/scheduler.ts +136 -0
- package/src/server-framework.ts +397 -0
- package/src/server.ts +1160 -0
- package/src/shared/promise.ts +28 -0
- package/src/source-mask.ts +83 -0
- package/src/spread.ts +131 -0
- package/src/state-slot.ts +76 -0
- package/src/testing.ts +27 -0
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,57 @@
|
|
|
1
1
|
# @vidact/runtime
|
|
2
2
|
|
|
3
|
+
## 0.2.0-beta.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- f7fe490: Hydration fixes for server-rendered content the client cannot reproduce immediately.
|
|
8
|
+
|
|
9
|
+
- Keep hydration markers out of raw-text elements. The server no longer emits `<!--vidact:v1:*-->` comments inside `<textarea>`, `<title>`, `<script>` and `<style>`, where the HTML parser turned them into literal text that stayed visible until hydration recovered from the mismatch. The hydrator synthesizes those markers around the element's parsed text node instead, so such elements hydrate in place.
|
|
10
|
+
- Dehydrated Suspense boundaries. When a Suspense child suspends while hydrating server-rendered content — a `lazy` chunk that has not loaded yet, for example — the boundary now keeps the server DOM on screen and swaps in the client render once the resource resolves, instead of publishing the fallback over it, mismatching, and re-mounting the whole root.
|
|
11
|
+
- `@vidact/start` renders the route tree inside a root component on the server. The client mounts the application under a compiled root of its own, which claims a component marker range; without a matching server root every client component claimed the range of the _next_ server component, which surfaced as a hydration mismatch (and a visible fallback flash) on any route whose component has more than one return.
|
|
12
|
+
- `hydrateStart` accepts `onRecoverableError`, and warns on the console by default when hydration has to recover by re-rendering. A silent recovery looks like a working page that merely flashes.
|
|
13
|
+
- Hydration mismatch messages describe the element (`DIV.class[data-x]`) instead of just its tag.
|
|
14
|
+
- Element claiming no longer prefers a candidate that contains an array marker unless the pending structural child is a list. A conditional or Suspense child triggered the same bias, so a class-less wrapper `<div>{cond ? <A/> : <B/>}</div>` could claim an unrelated sibling that happened to hold a keyed list.
|
|
15
|
+
|
|
16
|
+
- Hydration marker protocol `v2`. The server no longer wraps intrinsic elements (`s`) or scalar text (`t`) in marker comments — inside a child slot an element can only be the intrinsic child and a text node the scalar, so the hydrator infers them, splitting a text node that adjacent scalars parsed into. A scalar binding borrows its child-slot markers as its range (no DOM writes) and only creates anchor comments where there is nothing to borrow, such as inside `<textarea>`. The prefix shrank from `vidact:v1` to `v2`; together this removes about 40% of markers and 60% of marker bytes from server HTML. A `v1` render is rejected by a `v2` client and re-rendered, and vice versa.
|
|
17
|
+
|
|
18
|
+
## 0.2.0-beta.4
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- 917f0be: Re-release CLI
|
|
23
|
+
|
|
24
|
+
## 0.2.0-beta.3
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- 917f0be: Release vidact CLI
|
|
29
|
+
|
|
30
|
+
## 0.2.0-beta.2
|
|
31
|
+
|
|
32
|
+
### Patch Changes
|
|
33
|
+
|
|
34
|
+
- 9b7d659: Build every package with `tsdown` in unbundle mode instead of `tsc` plus two
|
|
35
|
+
repository scripts. `dist` still mirrors `src` file for file, with the same entry
|
|
36
|
+
points, ESM output, declarations, declaration maps, and source maps, and the
|
|
37
|
+
runtime's tree-shaking budgets are unchanged. The Vidact Start ambient route
|
|
38
|
+
module ships as written so it stays an ambient declaration rather than a module
|
|
39
|
+
augmentation.
|
|
40
|
+
|
|
41
|
+
Packages now publish their `src` directory, so the shipped source maps and
|
|
42
|
+
declaration maps resolve. Vite no longer reports "points to missing source
|
|
43
|
+
files" for Vidact modules, debugging steps into real TypeScript, and go-to-
|
|
44
|
+
definition lands on the source rather than the declaration.
|
|
45
|
+
|
|
46
|
+
## 0.2.0-beta.1
|
|
47
|
+
|
|
48
|
+
### Minor Changes
|
|
49
|
+
|
|
50
|
+
- 7765e99: Compile React-shaped dependency capsules into retained intrinsic owners, expand
|
|
51
|
+
the supported shadcn Base UI corpus, add target-specific JSX/server-edge facades,
|
|
52
|
+
preserve loader-thrown Web responses, and ship the React-free Vidact Start plus
|
|
53
|
+
headless Fumadocs docs starter with a native Popover proof.
|
|
54
|
+
|
|
3
55
|
## 0.2.0-beta.0
|
|
4
56
|
|
|
5
57
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -26,7 +26,7 @@ Capabilities compose through separate imports. Hydrate builds import
|
|
|
26
26
|
`@vidact/runtime/server` plus the framework protocol or streaming entry when
|
|
27
27
|
needed. There are no feature cross-product or target-alias facades.
|
|
28
28
|
|
|
29
|
-
The compiler and runtime validate the `vidact-runtime-
|
|
29
|
+
The compiler and runtime validate the `vidact-runtime-v2` protocol. Server and
|
|
30
30
|
hydration builds must use matching package versions.
|
|
31
31
|
|
|
32
32
|
Framework client boundaries use the closed `vidact-framework-v1` value model.
|
package/dist/actions.d.ts
CHANGED
|
@@ -1,37 +1,39 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { SourceMask } from "./source-mask.js";
|
|
2
|
+
import { CompiledScope } from "./compiled/types.js";
|
|
3
|
+
import { DirectChild, DirectProps } from "./direct-dom.js";
|
|
4
|
+
import { StateSlot } from "./state-slot.js";
|
|
5
|
+
//#region src/actions.d.ts
|
|
5
6
|
declare const FORM_ACTION_EXECUTE: unique symbol;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
interface FormStatus {
|
|
8
|
+
readonly pending: boolean;
|
|
9
|
+
readonly data: FormData | null;
|
|
10
|
+
readonly method: 'get' | 'post';
|
|
11
|
+
readonly action: FunctionFormAction | null;
|
|
11
12
|
}
|
|
12
|
-
|
|
13
|
+
type FunctionFormAction = (data: FormData) => unknown | PromiseLike<unknown>;
|
|
13
14
|
type ActionDispatch<Payload> = {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
(payload: Payload): void;
|
|
16
|
+
readonly permalink?: string;
|
|
17
|
+
readonly [FORM_ACTION_EXECUTE]: (payload: Payload) => Promise<void>;
|
|
17
18
|
};
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
interface OptimisticSlot<Value, Update> {
|
|
20
|
+
readonly get: () => Value;
|
|
21
|
+
readonly set: (update: Update) => void;
|
|
21
22
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
declare function createCompiledActionState<State, Payload>(scope: CompiledScope, stateSource: SourceMask, pendingSource: SourceMask, action: (previousState: State, payload: Payload) => State | PromiseLike<State>, initialState: State, permalink?: string): {
|
|
24
|
+
readonly get: () => {
|
|
25
|
+
readonly value: State;
|
|
26
|
+
readonly pending: boolean;
|
|
27
|
+
};
|
|
28
|
+
readonly set: ActionDispatch<Payload>;
|
|
28
29
|
};
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
30
|
+
declare function createCompiledOptimistic<Value, Update = Value>(scope: CompiledScope, reads: SourceMask, writes: SourceMask, evaluate: () => Value, reducer?: (current: Value, update: Update) => Value): OptimisticSlot<Value, Update>;
|
|
31
|
+
declare function createCompiledFormStatus(scope: CompiledScope, sourceMask: SourceMask): StateSlot<FormStatus>;
|
|
32
|
+
declare function ActionForm(props: DirectProps): DirectChild;
|
|
33
|
+
declare function compiledFormAction<Value>(value: Value): Value;
|
|
34
|
+
declare function useActionState(): never;
|
|
35
|
+
declare function useOptimistic(): never;
|
|
36
|
+
declare function useFormStatus(): never;
|
|
37
|
+
//#endregion
|
|
38
|
+
export { ActionForm, FormStatus, FunctionFormAction, OptimisticSlot, compiledFormAction, createCompiledActionState, createCompiledFormStatus, createCompiledOptimistic, useActionState, useFormStatus, useOptimistic };
|
|
37
39
|
//# sourceMappingURL=actions.d.ts.map
|
package/dist/actions.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.d.ts","
|
|
1
|
+
{"version":3,"file":"actions.d.ts","names":[],"sources":["../src/actions.ts"],"mappings":";;;;;cAwBM;UAEW;WACN;WACA,MAAM;WACN;WACA,QAAQ;;KAGP,sBAAsB,MAAM,uBAAuB;KAW1D,eAAe;GACjB,SAAS;WACD;YACC,uBAAuB,SAAS,YAAY;;UAgBvC,eAAe,OAAO;WAC5B,WAAW;WACX,MAAM,QAAQ;;iBAcT,0BAA0B,OAAO,SAC/C,OAAO,eACP,aAAa,YACb,eAAe,YACf,SAAS,eAAe,OAAO,SAAS,YAAY,QAAQ,YAAY,QACxE,cAAc,OACd;WAES;aAAsB,OAAO;aAAgB;;WAC7C,KAAK,eAAe;;iBAkGf,yBAAyB,OAAO,SAAS,OACvD,OAAO,eACP,OAAO,YACP,QAAQ,YACR,gBAAgB,OAChB,WAAU,SAAS,OAAO,QAAQ,WAAW,QAE5C,eAAe,OAAO;iBAoDT,yBACd,OAAO,eACP,YAAY,aACX,UAAU;iBAcG,WAAW,OAAO,cAAc;iBAyEhC,mBAAmB,OAAO,OAAO,QAAQ;iBAKzC;iBAIA;iBAIA"}
|