@finesoft/front 0.5.2 → 0.5.3
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/dist/{browser-DIU6Sxl3.mjs → browser-CR5vhgXg.mjs} +84 -4
- package/dist/browser.d.mts +2 -2
- package/dist/browser.mjs +4 -4
- package/dist/{cookies-Bpf9VayB.d.mts → cookies-BiRlUanX.d.mts} +9 -2
- package/dist/index-node.d.mts +3 -3
- package/dist/index-node.mjs +6 -6
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +6 -6
- package/dist/portable.d.mts +3 -3
- package/dist/portable.mjs +6 -6
- package/dist/proxy-z02VvGIj.mjs +7520 -0
- package/dist/{src-qwx7Vw8g.mjs → src-BQBfaaPO.mjs} +20 -2
- package/dist/{ssr-BEUNDvbj.d.mts → ssr-BLzYP4wU.d.mts} +1 -4
- package/dist/{ssr-C8xnYXoY.mjs → ssr-Tn4YkuxM.mjs} +3 -3
- package/dist/ssr.d.mts +1 -1
- package/dist/ssr.mjs +2 -2
- package/dist/{types-BuaZHRG7.mjs → types-B1BT0N3t.mjs} +2 -2
- package/dist/vite.mjs +1 -1
- package/dist/web.d.mts +2 -2
- package/dist/web.mjs +3 -3
- package/docs/04-rendering-and-hydration.md +2 -0
- package/docs/pitfalls/ssr-hydration-mismatch.md +10 -0
- package/docs/zh/04-rendering-and-hydration.md +2 -0
- package/docs/zh/pitfalls/ssr-hydration-mismatch.md +10 -0
- package/package.json +8 -8
- package/dist/proxy-1SphZ7x7.mjs +0 -436
|
@@ -1537,6 +1537,24 @@ var PrefetchedIntents = class PrefetchedIntents {
|
|
|
1537
1537
|
}
|
|
1538
1538
|
};
|
|
1539
1539
|
//#endregion
|
|
1540
|
+
//#region ../web/src/hydration-digest.ts
|
|
1541
|
+
/** @internal A versioned DOM change detector, not a security or authenticity check. */
|
|
1542
|
+
function createHydrationDigest() {
|
|
1543
|
+
let first = 2166136261;
|
|
1544
|
+
let second = 2654435769;
|
|
1545
|
+
const update = (value) => {
|
|
1546
|
+
first = Math.imul(first ^ value, 16777619);
|
|
1547
|
+
second = Math.imul(second ^ value, 2246822507);
|
|
1548
|
+
};
|
|
1549
|
+
return {
|
|
1550
|
+
write(value) {
|
|
1551
|
+
update(value.length);
|
|
1552
|
+
for (let index = 0; index < value.length; index++) update(value.charCodeAt(index));
|
|
1553
|
+
},
|
|
1554
|
+
value: () => `v1:${(first >>> 0).toString(16)}:${(second >>> 0).toString(16)}`
|
|
1555
|
+
};
|
|
1556
|
+
}
|
|
1557
|
+
//#endregion
|
|
1540
1558
|
//#region ../web/src/bootstrap/define-routes.ts
|
|
1541
1559
|
/**
|
|
1542
1560
|
* 构造一条强类型路由定义。
|
|
@@ -3802,6 +3820,6 @@ function parseCookieString(str) {
|
|
|
3802
3820
|
return map;
|
|
3803
3821
|
}
|
|
3804
3822
|
//#endregion
|
|
3805
|
-
export { isLeafNode as $, createActiveLeafCodec as A,
|
|
3823
|
+
export { isLeafNode as $, createActiveLeafCodec as A, getLocaleAttributes as At, findNode as B, secureFetch as Bt, runBeforeLoadGuards as C, defineApp as Ct, SERVER_REQUEST as D, implementOperation as Dt, SERVER_CONTROLLER as E, implementController as Et, serializeNavigation as F, englishPlural as Ft, push as G, ReportingLoggerFactory as Gt, pop as H, enforceHostGuard as Ht, serializeNavigationStable as I, interpolate as It, selectColumn as J, CompositeLogger as Jt, replaceTop as K, ConsoleLogger as Kt, collectAllLeaves as L, resolvePluralKey as Lt, decodeNavigationTreeParam as M, isRtl as Mt, encodeNavigationTreeParam as N, makeLocaleInfo as Nt, controllerContext as O, SimpleTranslator as Ot, deserializeNavigation as P, resolveLocaleFromUrl as Pt, resourceKey as Q, Container as Qt, collectVisibleDestinations as R, generateUuid as Rt, runAfterLoadGuards as S, createRuntime as St, getWebPlan as T, defineOperation as Tt, popTo as U, stableStringify as Ut, mapNavigationLeaves as V, fetchWithRedirects as Vt, popToRoot as W, ReportingLogger as Wt, setVisibility as X, isMultiValueSchema as Xt, selectTab as Y, CompositeLoggerFactory as Yt, visibleSplitColumns as Z, list as Zt, SERVER_CONTROLLER_PATH as _, isExternalUrlAction as _t, createSessionStore as a, stack as at, decodeWireEnvelope as b, makeFlowAction as bt, decodeSnapshot as c, NavigationError as ct, createWebSession as d, createHydrationDigest as dt, isSplitNode as et, SESSION_DEFAULT_KEY as f, PrefetchedIntents as ft, loadPage as g, isCompoundAction as gt, StorageUnavailableError as h, ACTION_KINDS as ht, createWebRuntime as i, split as it, createFullStateCodec as j, getTextDirection as jt, DEFAULT_NAV_PARAM as k, resolveMessages as kt, encodeSnapshot as l, SPLIT_VISIBILITIES as lt, SessionError as m, ActionDispatcher as mt, definePage as n, isTabsNode as nt, collectLeafKeys as o, tabs as ot, SESSION_DEFAULT_VERSION as p, Router as pt, resolveActivePath as q, ConsoleLoggerFactory as qt, resolveInitialNavigation as r, leaf as rt, createNavigationScopedState as s, NAVIGATION_NODE_KINDS as st, parseCookieString as t, isStackNode as tt, NavigationCommitError as u, route as ut, ServerControllerProxy as v, isFlowAction as vt, defineWebApp as w, defineModule as wt, getFrameworkBuildId as x, provide as xt, FRAMEWORK_PROTOCOL_VERSION as y, makeExternalUrlAction as yt, findNearestStack as z, detectPlatform as zt };
|
|
3806
3824
|
|
|
3807
|
-
//# sourceMappingURL=src-
|
|
3825
|
+
//# sourceMappingURL=src-BQBfaaPO.mjs.map
|
|
@@ -56,9 +56,6 @@ declare function createSSRRender<Definition extends WebAppDefinition>(config: SS
|
|
|
56
56
|
};
|
|
57
57
|
//#endregion
|
|
58
58
|
//#region ../ssr/src/inject.d.ts
|
|
59
|
-
/**
|
|
60
|
-
* injectSSRContent — 将 SSR 渲染结果注入 HTML 模板
|
|
61
|
-
*/
|
|
62
59
|
/** SSR HTML 模板占位符常量 */
|
|
63
60
|
declare const SSR_PLACEHOLDERS: {
|
|
64
61
|
readonly HEAD: "<!--ssr-head-->";
|
|
@@ -207,4 +204,4 @@ interface SSRHandler extends HttpHandler {
|
|
|
207
204
|
declare function createSSRHandler<TData = unknown>(options: SSRHandlerOptions<TData>): SSRHandler;
|
|
208
205
|
//#endregion
|
|
209
206
|
export { createSSRRender as C, SSRRenderResult as E, SSRRenderConfig as S, SSRContext as T, serializeServerData as _, SSRRequestContext as a, injectCSRShell as b, matchRenderModeOverride as c, ServerControllerContext as d, ServerControllerInput as f, materializeServerData as g, SerializeServerDataOptions as h, SSRModule as i, BaseServerController as l, createServerContext as m, SSRHandler as n, SSRResponseResult as o, ServerContextOptions as p, SSRHandlerOptions as r, createSSRHandler as s, SSRCache as t, CookieOptions as u, InjectSSROptions as v, SSRAppResult as w, injectSSRContent as x, SSR_PLACEHOLDERS as y };
|
|
210
|
-
//# sourceMappingURL=ssr-
|
|
207
|
+
//# sourceMappingURL=ssr-BLzYP4wU.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { D as SERVER_REQUEST, E as SERVER_CONTROLLER, F as serializeNavigation, P as deserializeNavigation, T as getWebPlan, at as stack, d as createWebSession, i as createWebRuntime, r as resolveInitialNavigation, rt as leaf, t as parseCookieString, x as getFrameworkBuildId } from "./src-
|
|
1
|
+
import { D as SERVER_REQUEST, E as SERVER_CONTROLLER, F as serializeNavigation, P as deserializeNavigation, T as getWebPlan, at as stack, d as createWebSession, i as createWebRuntime, r as resolveInitialNavigation, rt as leaf, t as parseCookieString, x as getFrameworkBuildId } from "./src-BQBfaaPO.mjs";
|
|
2
2
|
import { n as ExecutionError } from "./path-CGFl2w7D.mjs";
|
|
3
3
|
import { i as getPublicFields, n as BASE_PAGE_FIELDS, s as BaseController, t as resolveConfiguredMessages } from "./messages-CAt2QdGr.mjs";
|
|
4
4
|
import "./src-Ftl_0rhu.mjs";
|
|
5
|
-
import "./proxy-
|
|
5
|
+
import "./proxy-z02VvGIj.mjs";
|
|
6
6
|
//#region ../ssr/src/server-data.ts
|
|
7
7
|
const MATERIALIZED = Symbol("materialized-public-data");
|
|
8
8
|
/** Copy declared public data now; never keep request-backed objects/getters in a response. */
|
|
@@ -354,4 +354,4 @@ var BaseServerController = class extends BaseController {
|
|
|
354
354
|
//#endregion
|
|
355
355
|
export { serializeServerData as a, materializeServerData as i, createServerContext as n, createSSRRender as r, BaseServerController as t };
|
|
356
356
|
|
|
357
|
-
//# sourceMappingURL=ssr-
|
|
357
|
+
//# sourceMappingURL=ssr-Tn4YkuxM.mjs.map
|
package/dist/ssr.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { C as createSSRRender, E as SSRRenderResult, S as SSRRenderConfig, T as SSRContext, _ as serializeServerData, a as SSRRequestContext, b as injectCSRShell, c as matchRenderModeOverride, d as ServerControllerContext, f as ServerControllerInput, g as materializeServerData, h as SerializeServerDataOptions, i as SSRModule, l as BaseServerController, m as createServerContext, n as SSRHandler, o as SSRResponseResult, p as ServerContextOptions, r as SSRHandlerOptions, s as createSSRHandler, t as SSRCache, u as CookieOptions, v as InjectSSROptions, w as SSRAppResult, x as injectSSRContent, y as SSR_PLACEHOLDERS } from "./ssr-
|
|
1
|
+
import { C as createSSRRender, E as SSRRenderResult, S as SSRRenderConfig, T as SSRContext, _ as serializeServerData, a as SSRRequestContext, b as injectCSRShell, c as matchRenderModeOverride, d as ServerControllerContext, f as ServerControllerInput, g as materializeServerData, h as SerializeServerDataOptions, i as SSRModule, l as BaseServerController, m as createServerContext, n as SSRHandler, o as SSRResponseResult, p as ServerContextOptions, r as SSRHandlerOptions, s as createSSRHandler, t as SSRCache, u as CookieOptions, v as InjectSSROptions, w as SSRAppResult, x as injectSSRContent, y as SSR_PLACEHOLDERS } from "./ssr-BLzYP4wU.mjs";
|
|
2
2
|
import { a as registerProxyRoutes, n as ProxyRouteConfig, r as ProxyRouter, t as ProxyAuthConfig } from "./proxy-2dSWO-Xw.mjs";
|
|
3
3
|
export { BaseServerController, type CookieOptions, type InjectSSROptions, type ProxyAuthConfig, type ProxyRouteConfig, type ProxyRouter, type SSRAppResult, SSRCache, type SSRContext, SSRHandler, SSRHandlerOptions, SSRModule, type SSRRenderConfig, type SSRRenderResult, SSRRequestContext, SSRResponseResult, SSR_PLACEHOLDERS, type SerializeServerDataOptions, type ServerContextOptions, type ServerControllerContext, type ServerControllerInput, createSSRHandler, createSSRRender, createServerContext, injectCSRShell, injectSSRContent, matchRenderModeOverride, materializeServerData, registerProxyRoutes, serializeServerData };
|
package/dist/ssr.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as serializeServerData, i as materializeServerData, n as createServerContext, r as createSSRRender, t as BaseServerController } from "./ssr-
|
|
2
|
-
import { c as injectSSRContent, i as matchRenderModeOverride, n as registerProxyRoutes, o as SSR_PLACEHOLDERS, r as createSSRHandler, s as injectCSRShell } from "./proxy-
|
|
1
|
+
import { a as serializeServerData, i as materializeServerData, n as createServerContext, r as createSSRRender, t as BaseServerController } from "./ssr-Tn4YkuxM.mjs";
|
|
2
|
+
import { c as injectSSRContent, i as matchRenderModeOverride, n as registerProxyRoutes, o as SSR_PLACEHOLDERS, r as createSSRHandler, s as injectCSRShell } from "./proxy-z02VvGIj.mjs";
|
|
3
3
|
export { BaseServerController, SSR_PLACEHOLDERS, createSSRHandler, createSSRRender, createServerContext, injectCSRShell, injectSSRContent, matchRenderModeOverride, materializeServerData, registerProxyRoutes, serializeServerData };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Bt as secureFetch, Xt as isMultiValueSchema } from "./src-BQBfaaPO.mjs";
|
|
2
2
|
import { i as HttpError } from "./host-guard-DDWxLpFL.mjs";
|
|
3
3
|
//#region ../core/src/schema/standard.ts
|
|
4
4
|
/** 工厂:从一个 validate 函数构造实现了 ~standard 的 codec */
|
|
@@ -399,4 +399,4 @@ function deny(status = 403, message = "Forbidden") {
|
|
|
399
399
|
//#endregion
|
|
400
400
|
export { bool as C, str as D, oneOf as E, uuid as O, withDefault as S, num as T, mapEach as _, safeErrorPage as a, HttpClient as b, ConsoleEventRecorder as c, getBaseUrl as d, removeHost as f, isSome as g, isNone as h, rewrite as i, makeSchema as k, CompositeEventRecorder as l, removeScheme as m, next as n, WithFieldsRecorder as o, removeQueryParams as p, redirect as r, VoidEventRecorder as s, deny as t, buildUrl as u, pipe as v, int as w, optional as x, pipeAsync as y };
|
|
401
401
|
|
|
402
|
-
//# sourceMappingURL=types-
|
|
402
|
+
//# sourceMappingURL=types-B1BT0N3t.mjs.map
|
package/dist/vite.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as isPublicSSRResult, i as matchRenderModeOverride, n as registerProxyRoutes, r as createSSRHandler, t as generateProxyCode } from "./proxy-
|
|
1
|
+
import { a as isPublicSSRResult, i as matchRenderModeOverride, n as registerProxyRoutes, r as createSSRHandler, t as generateProxyCode } from "./proxy-z02VvGIj.mjs";
|
|
2
2
|
import { r as dynamicImport, t as nodeSafeFetchOptions } from "./fetch-policy-BHT8RtrL.mjs";
|
|
3
3
|
import { n as createControllerTypeWatcher, r as generateControllerTypes, t as generateFrontTypes } from "./public-types-BcJM-AYc.mjs";
|
|
4
4
|
import { createRequire } from "node:module";
|
package/dist/web.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { A as makeSchema, C as ImpressionEntry, D as StandardIssue, E as ParamSchema, F as Token, I as createToken, M as Provider, N as ProviderContext, O as StandardResult, P as provide, S as EventRecorder, T as InferOutput, _ as OperationPolicy, a as compilePath, b as RuntimeOptions, c as ExecutionContext, d as ExecutionHandle, f as Implementation, g as OperationHandler, h as Operation, i as PathParams, j as Container, k as StandardSchemaV1, l as ExecutionError, m as ModuleDefinition, n as PathDescriptor, o as AnyOperation, p as Invocation, r as PathParameterDescriptor, s as AppDefinition, t as CompiledPath, u as ExecutionErrorCode, v as QueryCache, w as MetricsFieldsProvider, x as executionErrorFromHttp, y as RuntimeHandle } from "./path-CXT6xGPO.mjs";
|
|
2
2
|
import { $ as createActiveLeafCodec, $n as list, $t as MiddlewareResult, A as SessionStore, An as PlatformInfo, At as isCompoundAction, B as ControllerContext, Bn as ConsoleLoggerFactory, Bt as NavigationPath, C as SessionFailure, Cn as Storage, Ct as ACTION_KINDS, D as SessionSlice, Dn as LocaleInfo, Dt as ExternalUrlAction, E as SessionRestoreResult, En as LocaleAttributes, Et as CompoundAction, F as WebRuntime, Fn as ReportCallback, Ft as LeafNode, G as controllerContext, Gn as InferParams, Gt as SplitColumn, H as SERVER_CONTROLLER, Hn as Logger, Ht as NavigationSnapshot, I as WebRuntimeOptions, In as ReportingLogger, It as NAVIGATION_NODE_KINDS, J as resolveConfiguredMessages, Jn as QuerySchemaMap, Jt as StackNode, K as MessagesLoader, Kn as InferQuery, Kt as SplitNode, L as createWebRuntime, Ln as ReportingLoggerFactory, Lt as NavigationError, M as SessionWriteResult, Mn as BaseController, Mt as isFlowAction, N as StorageUnavailableError, Nn as ControllerFailure, Nt as makeExternalUrlAction, O as SessionSnapshot, On as TextDirection, Ot as FlowAction, P as WebConfiguration, Pn as ControllerInput, Pt as makeFlowAction, Q as NavigationRouterLike, Qn as isMultiValueSchema, Qt as DenyResult, R as PageControllerDefinition, Rn as ReportingLoggerOptions, Rt as NavigationNode, S as SessionErrorContext, Sn as FeatureFlagsProvider, St as ActionHandler, T as SessionNavigation, Tn as resolveMessages, Tt as ActionInvocation, U as SERVER_REQUEST, Un as LoggerFactory, Ut as ResolvedDestination, V as PageControllerInput, Vn as LogFilter, Vt as NavigationPathStep, W as ServerRequestState, Wn as ExtractParamNames, Wt as SPLIT_VISIBILITIES, X as FullStateCodecOptions, Xn as ListOptions, Xt as AfterLoadGuard, Y as DEFAULT_NAV_PARAM, Yn as StripOptional, Yt as TabsNode, Z as NavigationCodec, Zn as MultiValueSchema, Zt as BeforeLoadGuard, _ as AsyncStorage, _n as RouteInput, _t as PrefetchedIntents, a as NavigationCommitContext, an as deny, at as SerializedSplit, b as SESSION_DEFAULT_VERSION, bn as DEP_KEYS, bt as Router, c as NavigationTransactionContext, cn as rewrite, ct as SerializedTabs, d as createWebSession, dn as FINESOFT_PUBLIC, dt as serializeNavigationStable, en as NavigationContext, er as Intent, et as createFullStateCodec, f as AppSnapshot, fn as PublicProjection, ft as PageRoute, g as WebAppView, gn as markPublic, gt as PrefetchedIntent, h as ViewProps, hn as isPublicMarked, ht as route, i as BeforeNavigateResult, in as RewriteResult, it as SerializedNavigation, j as SessionStoreOptions, jn as detectPlatform, jt as isExternalUrlAction, k as SessionStateProvider, kn as Translator, kt as TreeAction, l as WebSession, ln as BASE_PAGE_FIELDS, lt as deserializeNavigation, m as ViewEntry, mn as getPublicFields, mt as RouteDefinition, n as BeforeCommitResult, nn as PostLoadContext, nt as encodeNavigationTreeParam, o as NavigationCommitError, on as next, ot as SerializedSplitColumn, p as NavigationSummary, pn as PublicValueCodec, pt as RenderMode, q as MessagesLoaderContext, qn as ParamsFor, qt as SplitVisibility, r as BeforeNavigatePolicy, rn as RedirectResult, rt as SerializedLeaf, s as NavigationContextInput, sn as redirect, st as SerializedStack, t as BeforeCommitPolicy, tn as NextResult, tt as decodeNavigationTreeParam, u as WebSessionOptions, un as BasePage, ut as serializeNavigation, v as NavigationScopedState, vn as RouteIntent, vt as RouteAddOptions, w as SessionLoadResult, wn as TranslationMessages, wt as Action, x as SessionError, xn as FeatureFlags, xt as ActionDispatcher, y as SESSION_DEFAULT_KEY, yn as RouteParams, yt as RouteMatch, z as WebAppDefinition, zn as ConsoleLogger, zt as NavigationNodeKind } from "./session-DnB4ZC3x.mjs";
|
|
3
|
-
import { $ as
|
|
3
|
+
import { $ as SimpleTranslator, $t as str, A as setVisibility, At as pipeAsync, B as split, Bt as HostGuardError, C as popTo, Ct as isNone, D as resolveActivePath, Dt as Mapper, E as replaceTop, Et as AsyncMapper, F as isLeafNode, Ft as HttpClient, G as SafeErrorPageOptions, Gt as optional, H as tabs, Ht as stableStringify, I as isSplitNode, It as HttpClientConfig, J as defineApp, Jt as StrOptions, K as safeErrorPage, Kt as withDefault, L as isStackNode, Lt as HttpRequestOptions, M as resourceKey, Mt as HostCheckResult, N as SplitColumnInit, Nt as classifyHost, O as selectColumn, Ot as mapEach, P as TabsInit, Pt as classifyUrl, Q as implementOperation, Qt as oneOf, R as isTabsNode, Rt as RequestInterceptor, S as pop, St as Optional, T as push, Tt as LruMap, U as RouteInputFor, Ut as CompositeLogger, V as stack, Vt as HttpError, W as createHydrationDigest, Wt as CompositeLoggerFactory, X as defineOperation, Xt as int, Y as defineModule, Yt as bool, Z as implementController, Zt as num, _ as collectAllLeaves, _t as getBaseUrl, a as LoadPageOptions, at as resolveLocaleFromUrl, b as findNode, bt as removeScheme, c as defineWebApp, ct as englishPlural, d as runBeforeLoadGuards, dt as WithFieldsRecorder, en as uuid, et as SimpleTranslatorOptions, f as createSessionStore, ft as VoidEventRecorder, g as encodeSnapshot, gt as buildUrl, h as decodeSnapshot, ht as generateUuid, i as resolveInitialNavigation, it as makeLocaleInfo, j as visibleSplitColumns, jt as fetchWithRedirects, k as selectTab, kt as pipe, l as getWebPlan, lt as interpolate, m as createNavigationScopedState, mt as CompositeEventRecorder, n as PageReference, nt as getTextDirection, o as PageLoadResult, ot as PluralCategory, p as collectLeafKeys, pt as ConsoleEventRecorder, q as createRuntime, qt as NumOptions, r as definePage, rt as isRtl, s as loadPage, st as PluralRuleProvider, t as parseCookieString, tt as getLocaleAttributes, u as runAfterLoadGuards, ut as resolvePluralKey, v as collectVisibleDestinations, vt as removeHost, w as popToRoot, wt as isSome, x as mapNavigationLeaves, xt as None, y as findNearestStack, yt as removeQueryParams, z as leaf, zt as ResponseInterceptor } from "./cookies-BiRlUanX.mjs";
|
|
4
4
|
import { a as enforceHostGuard, i as TargetGuardOptions, n as secureFetch, r as DnsLookup, t as SecureFetchOptions } from "./secure-fetch-Xlht2jd7.mjs";
|
|
5
5
|
import { a as WebHydration, c as decodeWireEnvelope, i as FRAMEWORK_PROTOCOL_VERSION, l as getFrameworkBuildId, n as ServerControllerProxy, o as WireDecodeResult, r as ServerControllerRequest, s as WireEnvelope, t as SERVER_CONTROLLER_PATH } from "./server-controller-proxy-BkVuVWVD.mjs";
|
|
6
|
-
export { ACTION_KINDS, type Action, ActionDispatcher, type ActionHandler, type ActionInvocation, type AfterLoadGuard, AnyOperation, AppDefinition, AppSnapshot, type AsyncMapper, type AsyncStorage, BASE_PAGE_FIELDS, BaseController, type BasePage, type BeforeCommitPolicy, type BeforeCommitResult, type BeforeLoadGuard, type BeforeNavigatePolicy, type BeforeNavigateResult, type CompiledPath, CompositeEventRecorder, CompositeLogger, CompositeLoggerFactory, type CompoundAction, ConsoleEventRecorder, ConsoleLogger, ConsoleLoggerFactory, Container, ControllerContext, type ControllerFailure, type ControllerInput, DEFAULT_NAV_PARAM, DEP_KEYS, type DenyResult, type DnsLookup, type EventRecorder, ExecutionContext, ExecutionError, ExecutionErrorCode, ExecutionHandle, type ExternalUrlAction, type ExtractParamNames, FINESOFT_PUBLIC, FRAMEWORK_PROTOCOL_VERSION, type FeatureFlags, type FeatureFlagsProvider, type FlowAction, type FullStateCodecOptions, type HostCheckResult, HostGuardError, HttpClient, type HttpClientConfig, HttpError, type HttpRequestOptions, Implementation, type ImpressionEntry, type InferOutput, type InferParams, type InferQuery, type Intent, Invocation, type LeafNode, type ListOptions, type LoadPageOptions, type LocaleAttributes, type LocaleInfo, type LogFilter, type Logger, type LoggerFactory, LruMap, type Mapper, type MessagesLoader, type MessagesLoaderContext, type MetricsFieldsProvider, type MiddlewareResult, ModuleDefinition, type MultiValueSchema, NAVIGATION_NODE_KINDS, type NavigationCodec, type NavigationCommitContext, NavigationCommitError, type NavigationContext, type NavigationContextInput, NavigationError, type NavigationNode, type NavigationNodeKind, type NavigationPath, type NavigationPathStep, type NavigationRouterLike, type NavigationScopedState, type NavigationSnapshot, NavigationSummary, type NavigationTransactionContext, type NextResult, type None, type NumOptions, Operation, OperationHandler, OperationPolicy, type Optional, type PageControllerDefinition, PageControllerInput, type PageLoadResult, type PageReference, type PageRoute, type ParamSchema, type ParamsFor, type PathDescriptor, type PathParameterDescriptor, type PathParams, type PlatformInfo, type PluralCategory, type PluralRuleProvider, type PostLoadContext, type PrefetchedIntent, PrefetchedIntents, type Provider, type ProviderContext, type PublicProjection, type PublicValueCodec, QueryCache, type QuerySchemaMap, type RedirectResult, type RenderMode, type ReportCallback, ReportingLogger, ReportingLoggerFactory, type ReportingLoggerOptions, type RequestInterceptor, type ResolvedDestination, type ResponseInterceptor, type RewriteResult, type RouteAddOptions, type RouteDefinition, type RouteInput, type RouteInputFor, type RouteIntent, type RouteMatch, type RouteParams, Router, RuntimeHandle, RuntimeOptions, SERVER_CONTROLLER, SERVER_CONTROLLER_PATH, SERVER_REQUEST, SESSION_DEFAULT_KEY, SESSION_DEFAULT_VERSION, SPLIT_VISIBILITIES, type SafeErrorPageOptions, type SecureFetchOptions, type SerializedLeaf, type SerializedNavigation, type SerializedSplit, type SerializedSplitColumn, type SerializedStack, type SerializedTabs, ServerControllerProxy, type ServerControllerRequest, ServerRequestState, SessionError, type SessionErrorContext, type SessionFailure, type SessionLoadResult, type SessionNavigation, type SessionRestoreResult, type SessionSlice, type SessionSnapshot, type SessionStateProvider, type SessionStore, type SessionStoreOptions, type SessionWriteResult, SimpleTranslator, type SimpleTranslatorOptions, type SplitColumn, type SplitColumnInit, type SplitNode, type SplitVisibility, type StackNode, type StandardIssue, type StandardResult, type StandardSchemaV1, type Storage, StorageUnavailableError, type StrOptions, type StripOptional, type TabsInit, type TabsNode, type TargetGuardOptions, type TextDirection, type Token, type TranslationMessages, type Translator, type TreeAction, ViewEntry, ViewProps, VoidEventRecorder, type WebAppDefinition, WebAppView, type WebConfiguration, type WebHydration, type WebRuntime, type WebRuntimeOptions, type WebSession, type WebSessionOptions, type WireDecodeResult, type WireEnvelope, WithFieldsRecorder, bool, buildUrl, classifyHost, classifyUrl, collectAllLeaves, collectLeafKeys, collectVisibleDestinations, compilePath, controllerContext, createActiveLeafCodec, createFullStateCodec, createNavigationScopedState, createRuntime, createSessionStore, createToken, createWebRuntime, createWebSession, decodeNavigationTreeParam, decodeSnapshot, decodeWireEnvelope, defineApp, defineModule, defineOperation, definePage, defineWebApp, deny, deserializeNavigation, detectPlatform, encodeNavigationTreeParam, encodeSnapshot, enforceHostGuard, englishPlural, executionErrorFromHttp, fetchWithRedirects, findNearestStack, findNode, generateUuid, getBaseUrl, getFrameworkBuildId, getLocaleAttributes, getPublicFields, getTextDirection, getWebPlan, implementController, implementOperation, int, interpolate, isCompoundAction, isExternalUrlAction, isFlowAction, isLeafNode, isMultiValueSchema, isNone, isPublicMarked, isRtl, isSome, isSplitNode, isStackNode, isTabsNode, leaf, list, loadPage, makeExternalUrlAction, makeFlowAction, makeLocaleInfo, makeSchema, mapEach, mapNavigationLeaves, markPublic, next, num, oneOf, optional, parseCookieString, pipe, pipeAsync, pop, popTo, popToRoot, provide, push, redirect, removeHost, removeQueryParams, removeScheme, replaceTop, resolveActivePath, resolveConfiguredMessages, resolveInitialNavigation, resolveLocaleFromUrl, resolveMessages, resolvePluralKey, resourceKey, rewrite, route, runAfterLoadGuards, runBeforeLoadGuards, safeErrorPage, secureFetch, selectColumn, selectTab, serializeNavigation, serializeNavigationStable, setVisibility, split, stableStringify, stack, str, tabs, uuid, visibleSplitColumns, withDefault };
|
|
6
|
+
export { ACTION_KINDS, type Action, ActionDispatcher, type ActionHandler, type ActionInvocation, type AfterLoadGuard, AnyOperation, AppDefinition, AppSnapshot, type AsyncMapper, type AsyncStorage, BASE_PAGE_FIELDS, BaseController, type BasePage, type BeforeCommitPolicy, type BeforeCommitResult, type BeforeLoadGuard, type BeforeNavigatePolicy, type BeforeNavigateResult, type CompiledPath, CompositeEventRecorder, CompositeLogger, CompositeLoggerFactory, type CompoundAction, ConsoleEventRecorder, ConsoleLogger, ConsoleLoggerFactory, Container, ControllerContext, type ControllerFailure, type ControllerInput, DEFAULT_NAV_PARAM, DEP_KEYS, type DenyResult, type DnsLookup, type EventRecorder, ExecutionContext, ExecutionError, ExecutionErrorCode, ExecutionHandle, type ExternalUrlAction, type ExtractParamNames, FINESOFT_PUBLIC, FRAMEWORK_PROTOCOL_VERSION, type FeatureFlags, type FeatureFlagsProvider, type FlowAction, type FullStateCodecOptions, type HostCheckResult, HostGuardError, HttpClient, type HttpClientConfig, HttpError, type HttpRequestOptions, Implementation, type ImpressionEntry, type InferOutput, type InferParams, type InferQuery, type Intent, Invocation, type LeafNode, type ListOptions, type LoadPageOptions, type LocaleAttributes, type LocaleInfo, type LogFilter, type Logger, type LoggerFactory, LruMap, type Mapper, type MessagesLoader, type MessagesLoaderContext, type MetricsFieldsProvider, type MiddlewareResult, ModuleDefinition, type MultiValueSchema, NAVIGATION_NODE_KINDS, type NavigationCodec, type NavigationCommitContext, NavigationCommitError, type NavigationContext, type NavigationContextInput, NavigationError, type NavigationNode, type NavigationNodeKind, type NavigationPath, type NavigationPathStep, type NavigationRouterLike, type NavigationScopedState, type NavigationSnapshot, NavigationSummary, type NavigationTransactionContext, type NextResult, type None, type NumOptions, Operation, OperationHandler, OperationPolicy, type Optional, type PageControllerDefinition, PageControllerInput, type PageLoadResult, type PageReference, type PageRoute, type ParamSchema, type ParamsFor, type PathDescriptor, type PathParameterDescriptor, type PathParams, type PlatformInfo, type PluralCategory, type PluralRuleProvider, type PostLoadContext, type PrefetchedIntent, PrefetchedIntents, type Provider, type ProviderContext, type PublicProjection, type PublicValueCodec, QueryCache, type QuerySchemaMap, type RedirectResult, type RenderMode, type ReportCallback, ReportingLogger, ReportingLoggerFactory, type ReportingLoggerOptions, type RequestInterceptor, type ResolvedDestination, type ResponseInterceptor, type RewriteResult, type RouteAddOptions, type RouteDefinition, type RouteInput, type RouteInputFor, type RouteIntent, type RouteMatch, type RouteParams, Router, RuntimeHandle, RuntimeOptions, SERVER_CONTROLLER, SERVER_CONTROLLER_PATH, SERVER_REQUEST, SESSION_DEFAULT_KEY, SESSION_DEFAULT_VERSION, SPLIT_VISIBILITIES, type SafeErrorPageOptions, type SecureFetchOptions, type SerializedLeaf, type SerializedNavigation, type SerializedSplit, type SerializedSplitColumn, type SerializedStack, type SerializedTabs, ServerControllerProxy, type ServerControllerRequest, ServerRequestState, SessionError, type SessionErrorContext, type SessionFailure, type SessionLoadResult, type SessionNavigation, type SessionRestoreResult, type SessionSlice, type SessionSnapshot, type SessionStateProvider, type SessionStore, type SessionStoreOptions, type SessionWriteResult, SimpleTranslator, type SimpleTranslatorOptions, type SplitColumn, type SplitColumnInit, type SplitNode, type SplitVisibility, type StackNode, type StandardIssue, type StandardResult, type StandardSchemaV1, type Storage, StorageUnavailableError, type StrOptions, type StripOptional, type TabsInit, type TabsNode, type TargetGuardOptions, type TextDirection, type Token, type TranslationMessages, type Translator, type TreeAction, ViewEntry, ViewProps, VoidEventRecorder, type WebAppDefinition, WebAppView, type WebConfiguration, type WebHydration, type WebRuntime, type WebRuntimeOptions, type WebSession, type WebSessionOptions, type WireDecodeResult, type WireEnvelope, WithFieldsRecorder, bool, buildUrl, classifyHost, classifyUrl, collectAllLeaves, collectLeafKeys, collectVisibleDestinations, compilePath, controllerContext, createActiveLeafCodec, createFullStateCodec, createHydrationDigest, createNavigationScopedState, createRuntime, createSessionStore, createToken, createWebRuntime, createWebSession, decodeNavigationTreeParam, decodeSnapshot, decodeWireEnvelope, defineApp, defineModule, defineOperation, definePage, defineWebApp, deny, deserializeNavigation, detectPlatform, encodeNavigationTreeParam, encodeSnapshot, enforceHostGuard, englishPlural, executionErrorFromHttp, fetchWithRedirects, findNearestStack, findNode, generateUuid, getBaseUrl, getFrameworkBuildId, getLocaleAttributes, getPublicFields, getTextDirection, getWebPlan, implementController, implementOperation, int, interpolate, isCompoundAction, isExternalUrlAction, isFlowAction, isLeafNode, isMultiValueSchema, isNone, isPublicMarked, isRtl, isSome, isSplitNode, isStackNode, isTabsNode, leaf, list, loadPage, makeExternalUrlAction, makeFlowAction, makeLocaleInfo, makeSchema, mapEach, mapNavigationLeaves, markPublic, next, num, oneOf, optional, parseCookieString, pipe, pipeAsync, pop, popTo, popToRoot, provide, push, redirect, removeHost, removeQueryParams, removeScheme, replaceTop, resolveActivePath, resolveConfiguredMessages, resolveInitialNavigation, resolveLocaleFromUrl, resolveMessages, resolvePluralKey, resourceKey, rewrite, route, runAfterLoadGuards, runBeforeLoadGuards, safeErrorPage, secureFetch, selectColumn, selectTab, serializeNavigation, serializeNavigationStable, setVisibility, split, stableStringify, stack, str, tabs, uuid, visibleSplitColumns, withDefault };
|
package/dist/web.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { $ as isLeafNode, A as createActiveLeafCodec, At as
|
|
2
|
-
import { C as bool, D as str, E as oneOf, O as uuid, S as withDefault, T as num, _ as mapEach, a as safeErrorPage, b as HttpClient, c as ConsoleEventRecorder, d as getBaseUrl, f as removeHost, g as isSome, h as isNone, i as rewrite, k as makeSchema, l as CompositeEventRecorder, m as removeScheme, n as next, o as WithFieldsRecorder, p as removeQueryParams, r as redirect, s as VoidEventRecorder, t as deny, u as buildUrl, v as pipe, w as int, x as optional, y as pipeAsync } from "./types-
|
|
1
|
+
import { $ as isLeafNode, A as createActiveLeafCodec, At as getLocaleAttributes, B as findNode, Bt as secureFetch, C as runBeforeLoadGuards, Ct as defineApp, D as SERVER_REQUEST, Dt as implementOperation, E as SERVER_CONTROLLER, Et as implementController, F as serializeNavigation, Ft as englishPlural, G as push, Gt as ReportingLoggerFactory, H as pop, Ht as enforceHostGuard, I as serializeNavigationStable, It as interpolate, J as selectColumn, Jt as CompositeLogger, K as replaceTop, Kt as ConsoleLogger, L as collectAllLeaves, Lt as resolvePluralKey, M as decodeNavigationTreeParam, Mt as isRtl, N as encodeNavigationTreeParam, Nt as makeLocaleInfo, O as controllerContext, Ot as SimpleTranslator, P as deserializeNavigation, Pt as resolveLocaleFromUrl, Q as resourceKey, Qt as Container, R as collectVisibleDestinations, Rt as generateUuid, S as runAfterLoadGuards, St as createRuntime, T as getWebPlan, Tt as defineOperation, U as popTo, Ut as stableStringify, V as mapNavigationLeaves, Vt as fetchWithRedirects, W as popToRoot, Wt as ReportingLogger, X as setVisibility, Xt as isMultiValueSchema, Y as selectTab, Yt as CompositeLoggerFactory, Z as visibleSplitColumns, Zt as list, _ as SERVER_CONTROLLER_PATH, _t as isExternalUrlAction, a as createSessionStore, at as stack, b as decodeWireEnvelope, bt as makeFlowAction, c as decodeSnapshot, ct as NavigationError, d as createWebSession, dt as createHydrationDigest, et as isSplitNode, f as SESSION_DEFAULT_KEY, ft as PrefetchedIntents, g as loadPage, gt as isCompoundAction, h as StorageUnavailableError, ht as ACTION_KINDS, i as createWebRuntime, it as split, j as createFullStateCodec, jt as getTextDirection, k as DEFAULT_NAV_PARAM, kt as resolveMessages, l as encodeSnapshot, lt as SPLIT_VISIBILITIES, m as SessionError, mt as ActionDispatcher, n as definePage, nt as isTabsNode, o as collectLeafKeys, ot as tabs, p as SESSION_DEFAULT_VERSION, pt as Router, q as resolveActivePath, qt as ConsoleLoggerFactory, r as resolveInitialNavigation, rt as leaf, s as createNavigationScopedState, st as NAVIGATION_NODE_KINDS, t as parseCookieString, tt as isStackNode, u as NavigationCommitError, ut as route, v as ServerControllerProxy, vt as isFlowAction, w as defineWebApp, wt as defineModule, x as getFrameworkBuildId, xt as provide, y as FRAMEWORK_PROTOCOL_VERSION, yt as makeExternalUrlAction, z as findNearestStack, zt as detectPlatform } from "./src-BQBfaaPO.mjs";
|
|
2
|
+
import { C as bool, D as str, E as oneOf, O as uuid, S as withDefault, T as num, _ as mapEach, a as safeErrorPage, b as HttpClient, c as ConsoleEventRecorder, d as getBaseUrl, f as removeHost, g as isSome, h as isNone, i as rewrite, k as makeSchema, l as CompositeEventRecorder, m as removeScheme, n as next, o as WithFieldsRecorder, p as removeQueryParams, r as redirect, s as VoidEventRecorder, t as deny, u as buildUrl, v as pipe, w as int, x as optional, y as pipeAsync } from "./types-B1BT0N3t.mjs";
|
|
3
3
|
import { i as HttpError, n as classifyUrl, r as HostGuardError, t as classifyHost } from "./host-guard-DDWxLpFL.mjs";
|
|
4
4
|
import { n as ExecutionError, r as executionErrorFromHttp, t as compilePath } from "./path-CGFl2w7D.mjs";
|
|
5
5
|
import { a as isPublicMarked, i as getPublicFields, n as BASE_PAGE_FIELDS, o as markPublic, r as FINESOFT_PUBLIC, s as BaseController, t as resolveConfiguredMessages } from "./messages-CAt2QdGr.mjs";
|
|
6
6
|
import { t as LruMap } from "./lru-map-BKoUAySU.mjs";
|
|
7
7
|
import { n as createToken, t as DEP_KEYS } from "./src-Ftl_0rhu.mjs";
|
|
8
|
-
export { ACTION_KINDS, ActionDispatcher, BASE_PAGE_FIELDS, BaseController, CompositeEventRecorder, CompositeLogger, CompositeLoggerFactory, ConsoleEventRecorder, ConsoleLogger, ConsoleLoggerFactory, Container, DEFAULT_NAV_PARAM, DEP_KEYS, ExecutionError, FINESOFT_PUBLIC, FRAMEWORK_PROTOCOL_VERSION, HostGuardError, HttpClient, HttpError, LruMap, NAVIGATION_NODE_KINDS, NavigationCommitError, NavigationError, PrefetchedIntents, ReportingLogger, ReportingLoggerFactory, Router, SERVER_CONTROLLER, SERVER_CONTROLLER_PATH, SERVER_REQUEST, SESSION_DEFAULT_KEY, SESSION_DEFAULT_VERSION, SPLIT_VISIBILITIES, ServerControllerProxy, SessionError, SimpleTranslator, StorageUnavailableError, VoidEventRecorder, WithFieldsRecorder, bool, buildUrl, classifyHost, classifyUrl, collectAllLeaves, collectLeafKeys, collectVisibleDestinations, compilePath, controllerContext, createActiveLeafCodec, createFullStateCodec, createNavigationScopedState, createRuntime, createSessionStore, createToken, createWebRuntime, createWebSession, decodeNavigationTreeParam, decodeSnapshot, decodeWireEnvelope, defineApp, defineModule, defineOperation, definePage, defineWebApp, deny, deserializeNavigation, detectPlatform, encodeNavigationTreeParam, encodeSnapshot, enforceHostGuard, englishPlural, executionErrorFromHttp, fetchWithRedirects, findNearestStack, findNode, generateUuid, getBaseUrl, getFrameworkBuildId, getLocaleAttributes, getPublicFields, getTextDirection, getWebPlan, implementController, implementOperation, int, interpolate, isCompoundAction, isExternalUrlAction, isFlowAction, isLeafNode, isMultiValueSchema, isNone, isPublicMarked, isRtl, isSome, isSplitNode, isStackNode, isTabsNode, leaf, list, loadPage, makeExternalUrlAction, makeFlowAction, makeLocaleInfo, makeSchema, mapEach, mapNavigationLeaves, markPublic, next, num, oneOf, optional, parseCookieString, pipe, pipeAsync, pop, popTo, popToRoot, provide, push, redirect, removeHost, removeQueryParams, removeScheme, replaceTop, resolveActivePath, resolveConfiguredMessages, resolveInitialNavigation, resolveLocaleFromUrl, resolveMessages, resolvePluralKey, resourceKey, rewrite, route, runAfterLoadGuards, runBeforeLoadGuards, safeErrorPage, secureFetch, selectColumn, selectTab, serializeNavigation, serializeNavigationStable, setVisibility, split, stableStringify, stack, str, tabs, uuid, visibleSplitColumns, withDefault };
|
|
8
|
+
export { ACTION_KINDS, ActionDispatcher, BASE_PAGE_FIELDS, BaseController, CompositeEventRecorder, CompositeLogger, CompositeLoggerFactory, ConsoleEventRecorder, ConsoleLogger, ConsoleLoggerFactory, Container, DEFAULT_NAV_PARAM, DEP_KEYS, ExecutionError, FINESOFT_PUBLIC, FRAMEWORK_PROTOCOL_VERSION, HostGuardError, HttpClient, HttpError, LruMap, NAVIGATION_NODE_KINDS, NavigationCommitError, NavigationError, PrefetchedIntents, ReportingLogger, ReportingLoggerFactory, Router, SERVER_CONTROLLER, SERVER_CONTROLLER_PATH, SERVER_REQUEST, SESSION_DEFAULT_KEY, SESSION_DEFAULT_VERSION, SPLIT_VISIBILITIES, ServerControllerProxy, SessionError, SimpleTranslator, StorageUnavailableError, VoidEventRecorder, WithFieldsRecorder, bool, buildUrl, classifyHost, classifyUrl, collectAllLeaves, collectLeafKeys, collectVisibleDestinations, compilePath, controllerContext, createActiveLeafCodec, createFullStateCodec, createHydrationDigest, createNavigationScopedState, createRuntime, createSessionStore, createToken, createWebRuntime, createWebSession, decodeNavigationTreeParam, decodeSnapshot, decodeWireEnvelope, defineApp, defineModule, defineOperation, definePage, defineWebApp, deny, deserializeNavigation, detectPlatform, encodeNavigationTreeParam, encodeSnapshot, enforceHostGuard, englishPlural, executionErrorFromHttp, fetchWithRedirects, findNearestStack, findNode, generateUuid, getBaseUrl, getFrameworkBuildId, getLocaleAttributes, getPublicFields, getTextDirection, getWebPlan, implementController, implementOperation, int, interpolate, isCompoundAction, isExternalUrlAction, isFlowAction, isLeafNode, isMultiValueSchema, isNone, isPublicMarked, isRtl, isSome, isSplitNode, isStackNode, isTabsNode, leaf, list, loadPage, makeExternalUrlAction, makeFlowAction, makeLocaleInfo, makeSchema, mapEach, mapNavigationLeaves, markPublic, next, num, oneOf, optional, parseCookieString, pipe, pipeAsync, pop, popTo, popToRoot, provide, push, redirect, removeHost, removeQueryParams, removeScheme, replaceTop, resolveActivePath, resolveConfiguredMessages, resolveInitialNavigation, resolveLocaleFromUrl, resolveMessages, resolvePluralKey, resourceKey, rewrite, route, runAfterLoadGuards, runBeforeLoadGuards, safeErrorPage, secureFetch, selectColumn, selectTab, serializeNavigation, serializeNavigationStable, setVisibility, split, stableStringify, stack, str, tabs, uuid, visibleSplitColumns, withDefault };
|
|
@@ -8,4 +8,6 @@ Outlet subscribes to stable `AppSnapshot` values. EntryId keeps its wrapper stab
|
|
|
8
8
|
|
|
9
9
|
SSR materializes public projections while request resources are alive and performs one native render. Hydration explicitly carries `{ tree, pages }`, with page results associated with entries. Protocol/build mismatches trigger fresh loading; persisted sessions have their own version. Denied data does not enter the wire.
|
|
10
10
|
|
|
11
|
+
The standard SSR assembler fingerprints the initial DOM. Before native mounting, changed markup can select a fresh mount with the same SSR data when no protected browser state would be discarded. This does not require extension-specific rules. See [hydration recovery and its limits](./pitfalls/ssr-hydration-mismatch.md).
|
|
12
|
+
|
|
11
13
|
CSR returns an HTML shell. Prerender produces static HTML. Runtime public HTML reuse still executes current guards and rendering, so it is not a render-skipping guarantee. During cleanup, await session disposal before unmounting the application's native root.
|
|
@@ -5,3 +5,13 @@ Share the same page definition, App and Outlet view registry between browser and
|
|
|
5
5
|
Hydrate the server snapshot before restoring persisted state. Avoid random values, time or browser globals during the first render. Do not await ready before mounting or manually mutate Outlet's child tree.
|
|
6
6
|
|
|
7
7
|
Declare explicit public projections; nested data needs a nested declaration or codec. Wire/buildId mismatches trigger fresh loading. Inspect browser warnings, DOM, requests and entry identity when diagnosing a mismatch.
|
|
8
|
+
|
|
9
|
+
Declare the site's locale in `defineWebApp({ configuration: { locale: "en" }, ... })` so SSR and the browser use the same value. The SSR assembler writes `lang` and `dir` on `<html>`. The browser also scopes those attributes to the selected app target, together with `data-fs-app`, so embedded applications can retain their own locale without changing the containing document. A static `<html lang="en">` alone does not configure the server runtime's locale.
|
|
10
|
+
|
|
11
|
+
`injectSSRContent` also stamps a compact fingerprint of the data script's parent container. `createBrowserApp` compares that fingerprint immediately before returning the native mount handle, after consuming valid SSR data. This detects changed attributes, text, comments and structure without identifying browser extensions. The comparison follows parsed HTML rather than raw HTML strings; custom element hosts and their contents are opaque to this check. Root attributes and nodes outside the app are outside its scope.
|
|
12
|
+
|
|
13
|
+
When the DOM changed and replacement is safe, `shouldHydrate` is false: the existing React/Vue/Svelte template mounts a fresh native root using the SSR page data. It does not restart the page controller. The host logs `source: "hydration", code: "dom-changed", recovery: "native-mount"`. No plugin rules, global console filters or repeated recovery loop are installed. Normal markup continues to hydrate, and SPA navigation does not repeat the check.
|
|
14
|
+
|
|
15
|
+
The host keeps native hydration when it detects existing focus, selection, edited controls, scrolling, editable content, active media, custom elements, nested apps or opaque browser contexts. That path logs `recovery: "deferred"`; native warnings and native hydration behavior remain in effect. It avoids an additional destructive remount, but cannot guarantee preservation if the native renderer itself fails hydration. Manually assembled HTML without a fingerprint, or a data script outside the selected target, retains the usual native hydration behavior.
|
|
16
|
+
|
|
17
|
+
This is a startup recovery boundary, not extension isolation or a security check. A changed fingerprint does not identify the cause: an extension, application script or HTML rewriter can all modify DOM. Head styles, opaque component internals, changes after inspection and errors in an extension's own execution context are not repaired. Native mismatches with an unchanged server DOM are still reported normally.
|
|
@@ -8,4 +8,6 @@ Outlet 订阅稳定的 `AppSnapshot`,以 EntryId 保持外层元素,以 Entr
|
|
|
8
8
|
|
|
9
9
|
SSR 在释放请求资源前物化公开投影,原生组件只渲染一次。水合协议明确包含 `{ tree, pages }`,每份页面数据关联 entry。协议版本或 buildId 不匹配时重新加载;会话持久化另有版本。被守卫拒绝的页面数据不进入 wire。
|
|
10
10
|
|
|
11
|
+
标准 SSR 组装流程会生成初始 DOM 的校验值。原生挂载前发现 DOM 已变化,且没有需要保留的浏览器状态时,框架会使用同一份 SSR 数据选择重新挂载,无需按插件编写规则。详见[水合恢复及其边界](./pitfalls/ssr-hydration-mismatch.md)。
|
|
12
|
+
|
|
11
13
|
CSR 返回 HTML shell。prerender 输出静态 HTML;运行时公开 HTML 缓存仍先运行本次守卫与渲染,不能视为跳过业务执行。清理时应用先等待会话 dispose,再卸载自己的原生根。
|
|
@@ -5,3 +5,13 @@
|
|
|
5
5
|
先水合服务器快照,再恢复持久化状态。避免首次渲染读取随机数、时间或浏览器独有全局。不要在挂载前等待 ready,也不要手动改动 Outlet 的子树。
|
|
6
6
|
|
|
7
7
|
显式声明公开数据投影;嵌套对象需要嵌套声明或 codec。wire/buildId 不匹配时重新加载。排查时同时检查实际浏览器警告、页面 DOM、网络请求和 entry 身份。
|
|
8
|
+
|
|
9
|
+
整站语言应在 `defineWebApp({ configuration: { locale: "en" }, ... })` 中声明,让 SSR 与浏览器使用同一个值。SSR 组装器在 `<html>` 上输出 `lang`、`dir`;浏览器还会在所选应用容器上设置这两个属性和 `data-fs-app`,使嵌入应用能使用自己的语言而不改动宿主文档。仅在静态模板中写 `<html lang="en">`,不会配置服务端运行时的 locale。
|
|
10
|
+
|
|
11
|
+
`injectSSRContent` 会在数据脚本上附带其父容器的 DOM 校验值。`createBrowserApp` 消费有效的 SSR 数据后,在返回原生挂载句柄前核对校验值,检测属性、文本、注释和结构变化,不识别具体浏览器插件。比较对象是解析后的 HTML,不是原始 HTML 字符串;自定义元素的宿主属性及内部内容由组件自己管理,不进入比较。根容器自身的属性和应用外部节点也不在检查范围内。
|
|
12
|
+
|
|
13
|
+
DOM 已变化且可以安全替换时,`shouldHydrate` 返回 false,现有 React/Vue/Svelte 模板使用 SSR 页面数据重新挂载原生根,不重新执行页面控制器。宿主记录 `source: "hydration", code: "dom-changed", recovery: "native-mount"`。没有插件名单、全局日志过滤或反复重建循环。正常 DOM 继续水合,SPA 导航不重复检查。
|
|
14
|
+
|
|
15
|
+
存在焦点、选区、已修改表单、滚动、可编辑内容、活动媒体、自定义元素、嵌套应用或不透明的浏览器上下文时,宿主继续原生水合,记录 `recovery: "deferred"`,保留原生水合行为及诊断。这避免框架额外强制重建,但原生渲染器自身水合失败时仍不能保证状态保留。手工组装 HTML 未附带校验值,或数据脚本不直接位于所选 target 内时,保持通常的原生水合流程。
|
|
16
|
+
|
|
17
|
+
这是启动恢复边界,不是插件隔离或安全校验。校验值变化不能确定来源:插件、应用脚本及 HTML 改写服务都可能修改 DOM。它不修复 head 中的样式、组件自己的内部结构、检查之后发生的改动或扩展自身运行环境中的错误。服务端 DOM 未变化时,应用自身的水合错误仍正常报告。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finesoft/front",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.3",
|
|
4
4
|
"description": "Application runtime, routing, native UI and platform hosts through one public API",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -12,12 +12,12 @@
|
|
|
12
12
|
"finesoft-types": "./dist/typegen-cli.mjs"
|
|
13
13
|
},
|
|
14
14
|
"files": [
|
|
15
|
-
"dist/browser-
|
|
15
|
+
"dist/browser-CR5vhgXg.mjs",
|
|
16
16
|
"dist/browser-kFMjlLGT.d.mts",
|
|
17
17
|
"dist/browser.d.mts",
|
|
18
18
|
"dist/browser.mjs",
|
|
19
19
|
"dist/controller-types-CgmJ6-le.d.mts",
|
|
20
|
-
"dist/cookies-
|
|
20
|
+
"dist/cookies-BiRlUanX.d.mts",
|
|
21
21
|
"dist/fetch-policy-BHT8RtrL.mjs",
|
|
22
22
|
"dist/host-guard-DDWxLpFL.mjs",
|
|
23
23
|
"dist/http-B6CJqDyf.d.mts",
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"dist/portable-CaxrMD1A.d.mts",
|
|
49
49
|
"dist/portable.d.mts",
|
|
50
50
|
"dist/portable.mjs",
|
|
51
|
-
"dist/proxy-1SphZ7x7.mjs",
|
|
52
51
|
"dist/proxy-2dSWO-Xw.d.mts",
|
|
52
|
+
"dist/proxy-z02VvGIj.mjs",
|
|
53
53
|
"dist/public-types-BcJM-AYc.mjs",
|
|
54
54
|
"dist/react-DhwBRw01.d.mts",
|
|
55
55
|
"dist/react.d.mts",
|
|
@@ -58,10 +58,10 @@
|
|
|
58
58
|
"dist/secure-fetch-Xlht2jd7.d.mts",
|
|
59
59
|
"dist/server-controller-proxy-BkVuVWVD.d.mts",
|
|
60
60
|
"dist/session-DnB4ZC3x.d.mts",
|
|
61
|
+
"dist/src-BQBfaaPO.mjs",
|
|
61
62
|
"dist/src-Ftl_0rhu.mjs",
|
|
62
|
-
"dist/
|
|
63
|
-
"dist/ssr-
|
|
64
|
-
"dist/ssr-C8xnYXoY.mjs",
|
|
63
|
+
"dist/ssr-BLzYP4wU.d.mts",
|
|
64
|
+
"dist/ssr-Tn4YkuxM.mjs",
|
|
65
65
|
"dist/ssr.d.mts",
|
|
66
66
|
"dist/ssr.mjs",
|
|
67
67
|
"dist/svelte-Dr5to3SE.d.mts",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"dist/typegen-cli.mjs",
|
|
73
73
|
"dist/typegen.d.mts",
|
|
74
74
|
"dist/typegen.mjs",
|
|
75
|
-
"dist/types-
|
|
75
|
+
"dist/types-B1BT0N3t.mjs",
|
|
76
76
|
"dist/undici-CPfL25Hr.mjs",
|
|
77
77
|
"dist/vite-Cj4SPA8D.d.mts",
|
|
78
78
|
"dist/vite.d.mts",
|