@finesoft/front 0.5.1 → 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/README.md +4 -4
- package/dist/Outlet.svelte +39 -0
- package/dist/Outlet.svelte.d.ts +7 -0
- package/dist/browser-CR5vhgXg.mjs +1317 -0
- package/dist/browser-kFMjlLGT.d.mts +262 -0
- package/dist/browser.d.mts +7 -2
- package/dist/browser.mjs +9 -1
- package/dist/controller-types-CgmJ6-le.d.mts +16 -0
- package/dist/cookies-BiRlUanX.d.mts +786 -0
- package/dist/fetch-policy-BHT8RtrL.mjs +82 -0
- package/dist/host-guard-DDWxLpFL.mjs +222 -0
- package/dist/http-B6CJqDyf.d.mts +46 -0
- package/dist/http-CaxrMD1A.d.mts +1 -0
- package/dist/http-D70PL72H.mjs +257 -0
- package/dist/http.d.mts +3 -0
- package/dist/http.mjs +2 -0
- package/dist/index-node.d.mts +15 -0
- package/dist/index-node.mjs +15 -0
- package/dist/index.d.mts +48 -697
- package/dist/index.mjs +44 -261
- package/dist/load-node.d.mts +5 -0
- package/dist/load-node.mjs +10 -0
- package/dist/load-portable.d.mts +5 -0
- package/dist/load-portable.mjs +8 -0
- package/dist/lru-map-BKoUAySU.mjs +50 -0
- package/dist/messages-CAt2QdGr.mjs +140 -0
- package/dist/native-contract-DuR25hYB.d.mts +14 -0
- package/dist/native-contract.d.mts +2 -0
- package/dist/native-contract.mjs +1 -0
- package/dist/node-D9hB4dsz.d.mts +35 -0
- package/dist/node.d.mts +2 -0
- package/dist/node.mjs +59 -0
- package/dist/path-CGFl2w7D.mjs +113 -0
- package/dist/path-CXT6xGPO.d.mts +261 -0
- package/dist/portable-CaxrMD1A.d.mts +1 -0
- package/dist/portable.d.mts +11 -0
- package/dist/portable.mjs +12 -0
- package/dist/proxy-2dSWO-Xw.d.mts +53 -0
- package/dist/proxy-z02VvGIj.mjs +7520 -0
- package/dist/public-types-BcJM-AYc.mjs +835 -0
- package/dist/react-DhwBRw01.d.mts +16 -0
- package/dist/react.d.mts +3 -0
- package/dist/react.mjs +29 -0
- package/dist/rolldown-runtime-B4iAMlE-.mjs +35 -0
- package/dist/secure-fetch-Xlht2jd7.d.mts +30 -0
- package/dist/server-controller-proxy-BkVuVWVD.d.mts +38 -0
- package/dist/session-DnB4ZC3x.d.mts +1279 -0
- package/dist/src-BQBfaaPO.mjs +3825 -0
- package/dist/src-Ftl_0rhu.mjs +28 -0
- package/dist/ssr-BLzYP4wU.d.mts +207 -0
- package/dist/ssr-Tn4YkuxM.mjs +357 -0
- package/dist/ssr.d.mts +3 -0
- package/dist/ssr.mjs +3 -0
- package/dist/svelte-Dr5to3SE.d.mts +16 -0
- package/dist/svelte.d.mts +3 -0
- package/dist/svelte.mjs +13 -0
- package/dist/typegen-C-WeJCtf.d.mts +12 -0
- package/dist/typegen-cli.d.mts +1 -0
- package/dist/typegen-cli.mjs +11 -0
- package/dist/typegen.d.mts +3 -0
- package/dist/typegen.mjs +2 -0
- package/dist/types-B1BT0N3t.mjs +402 -0
- package/dist/undici-CPfL25Hr.mjs +22262 -0
- package/dist/vite-Cj4SPA8D.d.mts +277 -0
- package/dist/vite.d.mts +4 -0
- package/dist/vite.mjs +2354 -0
- package/dist/vue-DGmzuKho.d.mts +32 -0
- package/dist/vue.d.mts +3 -0
- package/dist/vue.mjs +56 -0
- package/dist/web.d.mts +6 -0
- package/dist/web.mjs +8 -0
- package/dist/worker.d.mts +2 -0
- package/dist/worker.mjs +2 -0
- package/docs/01-getting-started.md +67 -199
- package/docs/02-routing-and-controllers.md +163 -241
- package/docs/03-middleware.md +10 -212
- package/docs/04-rendering-and-hydration.md +7 -332
- package/docs/05-i18n.md +7 -237
- package/docs/06-http-client.md +20 -263
- package/docs/07-di-container.md +23 -257
- package/docs/08-observability.md +6 -286
- package/docs/09-server-and-deployment.md +59 -219
- package/docs/10-features-platform-pwa.md +7 -231
- package/docs/11-navigation.md +143 -288
- package/docs/12-session-restoration.md +6 -214
- package/docs/README.md +7 -7
- package/docs/advanced/custom-action-handler.md +29 -229
- package/docs/advanced/custom-adapter.md +7 -259
- package/docs/advanced/custom-event-recorder.md +7 -312
- package/docs/advanced/inline-proxy-codegen.md +6 -185
- package/docs/advanced/multi-tenant-scopes.md +10 -323
- package/docs/engineering/ci-release-flow.md +35 -222
- package/docs/engineering/project-structure.md +34 -277
- package/docs/engineering/testing.md +8 -310
- package/docs/pitfalls/container-scope-leak.md +2 -214
- package/docs/pitfalls/i18n-bundle-size.md +6 -176
- package/docs/pitfalls/proxy-binary-payloads.md +8 -12
- package/docs/pitfalls/ssr-hydration-mismatch.md +9 -155
- package/docs/pitfalls/ssr-vs-csr-globals.md +9 -170
- package/docs/zh/01-getting-started.md +67 -199
- package/docs/zh/02-routing-and-controllers.md +166 -244
- package/docs/zh/03-middleware.md +10 -212
- package/docs/zh/04-rendering-and-hydration.md +7 -332
- package/docs/zh/05-i18n.md +7 -237
- package/docs/zh/06-http-client.md +20 -263
- package/docs/zh/07-di-container.md +23 -257
- package/docs/zh/08-observability.md +6 -283
- package/docs/zh/09-server-and-deployment.md +59 -219
- package/docs/zh/10-features-platform-pwa.md +7 -231
- package/docs/zh/11-navigation.md +130 -290
- package/docs/zh/12-session-restoration.md +6 -214
- package/docs/zh/README.md +4 -4
- package/docs/zh/advanced/custom-action-handler.md +29 -229
- package/docs/zh/advanced/custom-adapter.md +7 -259
- package/docs/zh/advanced/custom-event-recorder.md +7 -312
- package/docs/zh/advanced/inline-proxy-codegen.md +6 -185
- package/docs/zh/advanced/multi-tenant-scopes.md +10 -323
- package/docs/zh/engineering/ci-release-flow.md +35 -222
- package/docs/zh/engineering/project-structure.md +34 -277
- package/docs/zh/engineering/testing.md +8 -310
- package/docs/zh/pitfalls/container-scope-leak.md +2 -214
- package/docs/zh/pitfalls/i18n-bundle-size.md +6 -176
- package/docs/zh/pitfalls/proxy-binary-payloads.md +8 -12
- package/docs/zh/pitfalls/ssr-hydration-mismatch.md +9 -155
- package/docs/zh/pitfalls/ssr-vs-csr-globals.md +9 -170
- package/package.json +118 -20
- package/dist/browser-BHhVWXik.mjs +0 -2
- package/dist/browser-BV2BBXm7.d.mts +0 -2811
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { f as AppSnapshot, g as WebAppView, h as ViewProps } from "./session-DnB4ZC3x.mjs";
|
|
2
|
+
import { Component, PropType } from "vue";
|
|
3
|
+
declare namespace vue_d_exports {
|
|
4
|
+
export { NativeView, NativeViews, Outlet, ViewProps, WebAppView, useSnapshot };
|
|
5
|
+
}
|
|
6
|
+
type NativeView = Component;
|
|
7
|
+
type NativeViews = Readonly<Record<string, NativeView>>;
|
|
8
|
+
declare function useSnapshot(app: WebAppView): import("vue").ShallowRef<AppSnapshot, AppSnapshot>;
|
|
9
|
+
declare const Outlet: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
10
|
+
app: {
|
|
11
|
+
type: PropType<WebAppView>;
|
|
12
|
+
required: true;
|
|
13
|
+
};
|
|
14
|
+
views: {
|
|
15
|
+
type: PropType<NativeViews>;
|
|
16
|
+
required: true;
|
|
17
|
+
};
|
|
18
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
19
|
+
[key: string]: any;
|
|
20
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
21
|
+
app: {
|
|
22
|
+
type: PropType<WebAppView>;
|
|
23
|
+
required: true;
|
|
24
|
+
};
|
|
25
|
+
views: {
|
|
26
|
+
type: PropType<NativeViews>;
|
|
27
|
+
required: true;
|
|
28
|
+
};
|
|
29
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
30
|
+
//#endregion
|
|
31
|
+
export { vue_d_exports as a, useSnapshot as i, NativeViews as n, Outlet as r, NativeView as t };
|
|
32
|
+
//# sourceMappingURL=vue-DGmzuKho.d.mts.map
|
package/dist/vue.d.mts
ADDED
package/dist/vue.mjs
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { defineComponent, h, nextTick, onMounted, onUnmounted, onUpdated, shallowRef } from "vue";
|
|
2
|
+
//#region src/vue.ts
|
|
3
|
+
function useSnapshot(app) {
|
|
4
|
+
const snapshot = shallowRef(app.getSnapshot());
|
|
5
|
+
const unsubscribe = app.subscribe(() => {
|
|
6
|
+
snapshot.value = app.getSnapshot();
|
|
7
|
+
});
|
|
8
|
+
onUnmounted(unsubscribe);
|
|
9
|
+
return snapshot;
|
|
10
|
+
}
|
|
11
|
+
const Outlet = defineComponent({
|
|
12
|
+
name: "FinesoftOutlet",
|
|
13
|
+
props: {
|
|
14
|
+
app: {
|
|
15
|
+
type: Object,
|
|
16
|
+
required: true
|
|
17
|
+
},
|
|
18
|
+
views: {
|
|
19
|
+
type: Object,
|
|
20
|
+
required: true
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
setup(props) {
|
|
24
|
+
const snapshot = useSnapshot(props.app);
|
|
25
|
+
let renderedRevision = snapshot.value.revision;
|
|
26
|
+
const commit = () => {
|
|
27
|
+
const revision = renderedRevision;
|
|
28
|
+
nextTick(() => props.app.commit(revision));
|
|
29
|
+
};
|
|
30
|
+
onMounted(commit);
|
|
31
|
+
onUpdated(commit);
|
|
32
|
+
return () => {
|
|
33
|
+
renderedRevision = snapshot.value.revision;
|
|
34
|
+
return h("main", { "data-fs-outlet": "" }, snapshot.value.entries.map((entry) => {
|
|
35
|
+
const View = props.views[entry.page.pageType] ?? props.views["*"];
|
|
36
|
+
if (!View) throw Error("Missing view: " + entry.page.pageType);
|
|
37
|
+
return h("div", {
|
|
38
|
+
key: entry.entryId,
|
|
39
|
+
hidden: !entry.visible,
|
|
40
|
+
"data-fs-entry": entry.entryId,
|
|
41
|
+
"data-fs-key": entry.entryId,
|
|
42
|
+
"data-fs-intent": entry.intent
|
|
43
|
+
}, [h(View, {
|
|
44
|
+
key: entry.entryId + ":" + entry.page.pageType,
|
|
45
|
+
page: entry.page,
|
|
46
|
+
app: props.app,
|
|
47
|
+
entry
|
|
48
|
+
})]);
|
|
49
|
+
}));
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
//#endregion
|
|
54
|
+
export { Outlet, useSnapshot };
|
|
55
|
+
|
|
56
|
+
//# sourceMappingURL=vue.mjs.map
|
package/dist/web.d.mts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
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
|
+
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 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
|
+
import { a as enforceHostGuard, i as TargetGuardOptions, n as secureFetch, r as DnsLookup, t as SecureFetchOptions } from "./secure-fetch-Xlht2jd7.mjs";
|
|
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, 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
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
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
|
+
import { i as HttpError, n as classifyUrl, r as HostGuardError, t as classifyHost } from "./host-guard-DDWxLpFL.mjs";
|
|
4
|
+
import { n as ExecutionError, r as executionErrorFromHttp, t as compilePath } from "./path-CGFl2w7D.mjs";
|
|
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
|
+
import { t as LruMap } from "./lru-map-BKoUAySU.mjs";
|
|
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, 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 };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as HttpHost, i as HttpHandlerOptions, l as runManagedTask, o as ManagedTask, r as HttpHandler, s as createHttpHandler } from "./http-B6CJqDyf.mjs";
|
|
2
|
+
export { type HttpHandler, type HttpHandlerOptions, type HttpHost, type ManagedTask, createHttpHandler, runManagedTask };
|
package/dist/worker.mjs
ADDED
|
@@ -1,230 +1,98 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Getting started
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
All framework APIs use `from "@finesoft/front"`. The application creates one native React, Vue or Svelte root; its layout and providers surround Outlet. All six templates use this same model.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
- Node.js `>= 22.12.0`
|
|
8
|
-
- A package manager: pnpm (recommended), npm, or yarn
|
|
9
|
-
- A view layer (Vue 3, React 19, or Svelte 5) — these docs use Vue, but every example translates one-to-one
|
|
10
|
-
|
|
11
|
-
## Scaffold a new app
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
npx @finesoft/create-app my-app
|
|
15
|
-
cd my-app
|
|
16
|
-
pnpm install
|
|
17
|
-
pnpm dev
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
The scaffolder generates a runnable app with routing, SSR, and proxy already wired. Open <http://localhost:5173>.
|
|
21
|
-
|
|
22
|
-
If you want to understand what was generated, the rest of this page builds the same setup from scratch.
|
|
23
|
-
|
|
24
|
-
## Add to an existing project
|
|
5
|
+
Install dependencies first. Node must satisfy `^22.18.0 || >=24.11.0`; use Vite+ for project tooling. Full demonstrates products, search and guards; minimal demonstrates tabs/stacks, drafts and session restoration.
|
|
25
6
|
|
|
26
7
|
```bash
|
|
27
|
-
|
|
28
|
-
|
|
8
|
+
vp dlx @finesoft/create-app my-app
|
|
9
|
+
vp install
|
|
29
10
|
```
|
|
30
11
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
## Minimal project layout
|
|
34
|
-
|
|
35
|
-
```
|
|
36
|
-
my-app/
|
|
37
|
-
├── src/
|
|
38
|
-
│ ├── bootstrap.ts # routes + controllers (shared SSR + CSR)
|
|
39
|
-
│ ├── main.ts # browser entry
|
|
40
|
-
│ ├── ssr.ts # SSR entry
|
|
41
|
-
│ ├── App.vue # root component
|
|
42
|
-
│ └── lib/
|
|
43
|
-
│ └── controllers/
|
|
44
|
-
│ └── home.ts
|
|
45
|
-
├── index.html
|
|
46
|
-
├── vite.config.ts
|
|
47
|
-
├── package.json
|
|
48
|
-
└── tsconfig.json
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
## Vite config
|
|
12
|
+
## Page and route
|
|
52
13
|
|
|
53
14
|
```ts
|
|
54
|
-
//
|
|
55
|
-
import {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
adapter: "auto",
|
|
66
|
-
}),
|
|
67
|
-
],
|
|
15
|
+
// src/app-definition.ts
|
|
16
|
+
import { definePage, defineWebApp, markPublic } from "@finesoft/front";
|
|
17
|
+
export const home = definePage({
|
|
18
|
+
id: "home",
|
|
19
|
+
routes: ["/"],
|
|
20
|
+
handler: () => markPublic({ id: "home", pageType: "home" as const, title: "Home" }, []),
|
|
21
|
+
});
|
|
22
|
+
export const app = defineWebApp({
|
|
23
|
+
id: "example",
|
|
24
|
+
pages: [home],
|
|
25
|
+
getErrorPage: (status, title) => ({ id: String(status), pageType: "error", title }),
|
|
68
26
|
});
|
|
69
27
|
```
|
|
70
28
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
defineRoutes(framework, [{ path: "/", intentId: "home", controller: new HomeController() }]);
|
|
29
|
+
## Native application root
|
|
30
|
+
|
|
31
|
+
```tsx
|
|
32
|
+
// src/App.tsx
|
|
33
|
+
import { Outlet as selectOutlet, type WebAppView } from "@finesoft/front";
|
|
34
|
+
import Home from "./pages/Home";
|
|
35
|
+
import ErrorPage from "./pages/ErrorPage";
|
|
36
|
+
const Outlet = selectOutlet("react");
|
|
37
|
+
const views = { home: Home, error: ErrorPage };
|
|
38
|
+
export default function App({ app }: { app: WebAppView }) {
|
|
39
|
+
return (
|
|
40
|
+
<div className="layout">
|
|
41
|
+
<Outlet app={app} views={views} />
|
|
42
|
+
</div>
|
|
43
|
+
);
|
|
87
44
|
}
|
|
88
45
|
```
|
|
89
46
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
## Controller
|
|
93
|
-
|
|
94
|
-
```ts
|
|
95
|
-
// src/lib/controllers/home.ts
|
|
96
|
-
import { BaseController, type Container } from "@finesoft/front";
|
|
97
|
-
|
|
98
|
-
interface HomePage {
|
|
99
|
-
kind: "home";
|
|
100
|
-
title: string;
|
|
101
|
-
items: string[];
|
|
102
|
-
}
|
|
47
|
+
Page components receive `{ page, app, entry }` and inherit native context from their layout. Real `<a href>` links use the same navigation flow; composed actions use `app.perform(action)`. Class-based loaders may use `BaseController.execute({ params, query, context })`.
|
|
103
48
|
|
|
104
|
-
|
|
105
|
-
readonly intentId = "home";
|
|
106
|
-
|
|
107
|
-
async execute(_params: Record<string, string>, _container: Container): Promise<HomePage> {
|
|
108
|
-
return {
|
|
109
|
-
kind: "home",
|
|
110
|
-
title: "Welcome",
|
|
111
|
-
items: ["one", "two", "three"],
|
|
112
|
-
};
|
|
113
|
-
}
|
|
49
|
+
## Browser entry
|
|
114
50
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
}
|
|
51
|
+
```tsx
|
|
52
|
+
// src/main.tsx
|
|
53
|
+
import { createBrowserApp } from "@finesoft/front";
|
|
54
|
+
import { createRoot, hydrateRoot } from "react-dom/client";
|
|
55
|
+
import { app as definition } from "./app-definition";
|
|
56
|
+
import App from "./App";
|
|
57
|
+
const target = document.getElementById("app")!;
|
|
58
|
+
const app = await createBrowserApp({ definition, target });
|
|
59
|
+
const root = app.shouldHydrate ? hydrateRoot(target, <App app={app} />) : createRoot(target);
|
|
60
|
+
if (!app.shouldHydrate) root.render(<App app={app} />);
|
|
61
|
+
await app.ready;
|
|
62
|
+
// Cleanup owned by the application:
|
|
63
|
+
// try { await app.dispose(); } finally { root.unmount(); }
|
|
119
64
|
```
|
|
120
65
|
|
|
121
|
-
`
|
|
66
|
+
`createBrowserApp` returns a session ready to mount. Mount first, then await `ready`. Outlet acknowledges the native commit before session restoration starts. Awaiting ready before mounting would deadlock.
|
|
122
67
|
|
|
123
|
-
## SSR
|
|
124
|
-
|
|
125
|
-
```ts
|
|
126
|
-
// src/ssr.ts
|
|
127
|
-
import { createSSRRender, serializeServerData } from "@finesoft/front";
|
|
128
|
-
import { createSSRApp } from "vue";
|
|
129
|
-
import { renderToString } from "vue/server-renderer";
|
|
130
|
-
import App from "./App.vue";
|
|
131
|
-
import { bootstrap } from "./bootstrap";
|
|
68
|
+
## SSR
|
|
132
69
|
|
|
70
|
+
```tsx
|
|
71
|
+
// src/ssr.tsx
|
|
72
|
+
import { renderToString } from "react-dom/server";
|
|
73
|
+
import { createSSRRender } from "@finesoft/front";
|
|
74
|
+
import { app as definition } from "./app-definition";
|
|
75
|
+
import App from "./App";
|
|
133
76
|
export const render = createSSRRender({
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
async renderApp(page) {
|
|
137
|
-
const html = await renderToString(createSSRApp(App, { page }));
|
|
138
|
-
return { html, head: `<title>${(page as { title: string }).title}</title>`, css: "" };
|
|
139
|
-
},
|
|
77
|
+
definition,
|
|
78
|
+
render: (app) => renderToString(<App app={app} />),
|
|
140
79
|
});
|
|
141
|
-
|
|
142
|
-
export { serializeServerData };
|
|
80
|
+
export { serializeServerData } from "@finesoft/front";
|
|
143
81
|
```
|
|
144
82
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
## Browser entry
|
|
83
|
+
## Vite
|
|
148
84
|
|
|
149
85
|
```ts
|
|
150
|
-
|
|
151
|
-
import
|
|
152
|
-
import {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
startBrowserApp({
|
|
157
|
-
bootstrap,
|
|
158
|
-
mount(target, { framework }) {
|
|
159
|
-
const app = createSSRApp(App, { framework });
|
|
160
|
-
app.mount(target);
|
|
161
|
-
},
|
|
86
|
+
import { defineConfig } from "vite-plus";
|
|
87
|
+
import react from "@vitejs/plugin-react";
|
|
88
|
+
import { finesoftFrontViteConfig } from "@finesoft/front";
|
|
89
|
+
export default defineConfig({
|
|
90
|
+
plugins: [react(), finesoftFrontViteConfig({ adapter: "node", ssr: { entry: "src/ssr.tsx" } })],
|
|
162
91
|
});
|
|
163
92
|
```
|
|
164
93
|
|
|
165
|
-
`
|
|
166
|
-
|
|
167
|
-
Import from `@finesoft/front/browser` (not `@finesoft/front`) on the client to avoid pulling server-only modules into your client bundle.
|
|
168
|
-
|
|
169
|
-
## Root component (Vue example)
|
|
170
|
-
|
|
171
|
-
```vue
|
|
172
|
-
<!-- src/App.vue -->
|
|
173
|
-
<script setup lang="ts">
|
|
174
|
-
import { computed } from "vue";
|
|
175
|
-
import type { Framework } from "@finesoft/front";
|
|
176
|
-
|
|
177
|
-
const props = defineProps<{ framework?: Framework; page?: { title: string; items: string[] } }>();
|
|
178
|
-
|
|
179
|
-
// SSR receives `page` directly; CSR pulls the current page from the framework.
|
|
180
|
-
const page = computed(() => props.page ?? props.framework?.getCurrentPage());
|
|
181
|
-
</script>
|
|
182
|
-
|
|
183
|
-
<template>
|
|
184
|
-
<main>
|
|
185
|
-
<h1>{{ page?.title }}</h1>
|
|
186
|
-
<ul>
|
|
187
|
-
<li v-for="item in page?.items" :key="item">{{ item }}</li>
|
|
188
|
-
</ul>
|
|
189
|
-
</main>
|
|
190
|
-
</template>
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
## index.html
|
|
194
|
-
|
|
195
|
-
```html
|
|
196
|
-
<!doctype html>
|
|
197
|
-
<html lang="en">
|
|
198
|
-
<head>
|
|
199
|
-
<meta charset="UTF-8" />
|
|
200
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
201
|
-
<!--head-->
|
|
202
|
-
</head>
|
|
203
|
-
<body>
|
|
204
|
-
<div id="app"><!--ssr--></div>
|
|
205
|
-
<script type="module" src="/src/main.ts"></script>
|
|
206
|
-
</body>
|
|
207
|
-
</html>
|
|
208
|
-
```
|
|
209
|
-
|
|
210
|
-
The `<!--head-->` and `<!--ssr-->` placeholders are where the framework injects the SSR head fragment and rendered HTML. The placeholder names are exported as `SSR_PLACEHOLDERS` if you need them.
|
|
211
|
-
|
|
212
|
-
## Run it
|
|
213
|
-
|
|
214
|
-
```bash
|
|
215
|
-
pnpm dev # development with HMR
|
|
216
|
-
pnpm build # production build
|
|
217
|
-
pnpm preview # serve the production build locally
|
|
218
|
-
```
|
|
219
|
-
|
|
220
|
-
Done. You have an app that:
|
|
221
|
-
|
|
222
|
-
- Renders on the server with prefetched data
|
|
223
|
-
- Hydrates without an extra fetch (SSR data is reused via `PrefetchedIntents`)
|
|
224
|
-
- Routes client-side without page reloads
|
|
225
|
-
- Is ready to deploy to any of the supported adapters
|
|
94
|
+
Vue selects `Outlet("vue")` and uses `createSSRApp` / `createApp` with `renderToString`. Svelte selects `Outlet("svelte")` and uses `hydrate` / `mount` with `render` from `svelte/server`. See the matching templates. Before a fresh Svelte `mount`, clear the target when `hydrate` is false so rejected SSR markup cannot remain beside the new app.
|
|
226
95
|
|
|
227
|
-
|
|
96
|
+
`useSnapshot("react", app)` returns a snapshot, `useSnapshot("vue", app)` a native ref, and `useSnapshot("svelte", app)` a store. Use a string literal for the renderer. The Vite plugin resolves the selected native implementation at build time, preserving component identity, subscriptions and cleanup.
|
|
228
97
|
|
|
229
|
-
|
|
230
|
-
- [Project structure](./engineering/project-structure.md) — recommended layout once the app grows past a handful of pages
|
|
98
|
+
On initialization the plugin generates `.finesoft/front.d.ts` and maintains the exact `@finesoft/front` type path in `tsconfig.json`. Only the selected UI peers are required. Ignore `.finesoft/` in Git and restart development after dependency changes. For standalone `tsc` or Node projects, run `vp exec finesoft-types` first, or call `generateFrontTypes({ root })` from the unified entry. The alias affects types only; runtime imports resolve the published package.
|