resuxjs 0.4.0-beta.2 → 0.4.0-beta.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/bin.d.ts +1 -1
- package/dist/bin.js +3 -2
- package/dist/bin.js.map +1 -1
- package/dist/build/index.d.ts +9 -8
- package/dist/build/index.js +2 -2
- package/dist/build/index.js.map +1 -1
- package/dist/cli.d.ts +5 -4
- package/dist/cli.js +115 -127
- package/dist/cli.js.map +1 -1
- package/dist/compiler/adapter.d.ts +6 -5
- package/dist/compiler/adapter.js +2 -1
- package/dist/compiler/adapter.js.map +1 -1
- package/dist/compiler/dev-warnings.d.ts +6 -5
- package/dist/compiler/dev-warnings.js +7 -6
- package/dist/compiler/dev-warnings.js.map +1 -1
- package/dist/compiler/directives.d.ts +4 -3
- package/dist/compiler/directives.js +2 -1
- package/dist/compiler/directives.js.map +1 -1
- package/dist/compiler/implementation.d.ts +21 -19
- package/dist/compiler/implementation.js +124 -133
- package/dist/compiler/index.d.ts +6 -5
- package/dist/compiler/index.js +2 -1
- package/dist/compiler/index.js.map +1 -1
- package/dist/core/config.d.ts +7 -5
- package/dist/core/config.js +1 -1
- package/dist/core/config.js.map +1 -1
- package/dist/core/hooks.d.ts +7 -6
- package/dist/core/hooks.js +1 -1
- package/dist/core/hooks.js.map +1 -1
- package/dist/core/index.js +2 -1
- package/dist/core/module-container.d.ts +22 -20
- package/dist/core/module-container.js +3 -3
- package/dist/core/module-container.js.map +1 -1
- package/dist/core/resux.d.ts +5 -3
- package/dist/core/resux.js +2 -1
- package/dist/core/resux.js.map +1 -1
- package/dist/create-bin.d.ts +1 -1
- package/dist/create-bin.js +3 -2
- package/dist/create-bin.js.map +1 -1
- package/dist/create.d.ts +3 -2
- package/dist/create.js +7 -10
- package/dist/create.js.map +1 -1
- package/dist/deploy/cloudflare.d.ts +3 -1
- package/dist/deploy/cloudflare.js +2 -1
- package/dist/deploy/cloudflare.js.map +1 -1
- package/dist/deploy/common.d.ts +13 -11
- package/dist/deploy/common.js +2 -1
- package/dist/deploy/common.js.map +1 -1
- package/dist/deploy/framework-runtime.d.ts +2 -1
- package/dist/deploy/framework-runtime.js +2 -1
- package/dist/deploy/framework-runtime.js.map +1 -1
- package/dist/deploy/index.d.ts +4 -2
- package/dist/deploy/index.js +4 -6
- package/dist/deploy/index.js.map +1 -1
- package/dist/deploy/netlify.d.ts +3 -1
- package/dist/deploy/netlify.js +2 -1
- package/dist/deploy/netlify.js.map +1 -1
- package/dist/deploy/node.d.ts +3 -1
- package/dist/deploy/node.js +3 -3
- package/dist/deploy/node.js.map +1 -1
- package/dist/deploy/production-report.d.ts +2 -1
- package/dist/deploy/production-report.js +2 -1
- package/dist/deploy/production-report.js.map +1 -1
- package/dist/deploy/runtime-dependencies.d.ts +5 -4
- package/dist/deploy/runtime-dependencies.js +3 -3
- package/dist/deploy/runtime-dependencies.js.map +1 -1
- package/dist/deploy/static.d.ts +3 -1
- package/dist/deploy/static.js +2 -1
- package/dist/deploy/static.js.map +1 -1
- package/dist/deploy/types.d.ts +8 -7
- package/dist/deploy/types.js +1 -1
- package/dist/deploy/vercel.d.ts +4 -2
- package/dist/deploy/vercel.js +2 -1
- package/dist/deploy/vercel.js.map +1 -1
- package/dist/fonts/index.d.ts +5 -4
- package/dist/fonts/index.js +3 -2
- package/dist/fonts/index.js.map +1 -1
- package/dist/globals.d.ts +2 -2
- package/dist/globals.js +1 -1
- package/dist/halal-core/ai/classifyProject.d.ts +5 -3
- package/dist/halal-core/ai/classifyProject.js +2 -1
- package/dist/halal-core/ai/classifyProject.js.map +1 -1
- package/dist/halal-core/ai/classifyRuntimeContent.d.ts +3 -1
- package/dist/halal-core/ai/classifyRuntimeContent.js +2 -1
- package/dist/halal-core/ai/classifyRuntimeContent.js.map +1 -1
- package/dist/halal-core/ai/createProjectSummary.d.ts +2 -1
- package/dist/halal-core/ai/createProjectSummary.js +2 -1
- package/dist/halal-core/ai/createProjectSummary.js.map +1 -1
- package/dist/halal-core/ai/halalClassifierPrompt.d.ts +2 -1
- package/dist/halal-core/ai/halalClassifierPrompt.js +1 -1
- package/dist/halal-core/ai/redactSensitiveData.d.ts +2 -1
- package/dist/halal-core/ai/redactSensitiveData.js +1 -1
- package/dist/halal-core/ai/redactSensitiveData.js.map +1 -1
- package/dist/halal-core/ai/validateAiResponse.d.ts +3 -1
- package/dist/halal-core/ai/validateAiResponse.js +3 -3
- package/dist/halal-core/ai/validateAiResponse.js.map +1 -1
- package/dist/halal-core/cli/check.d.ts +2 -1
- package/dist/halal-core/cli/check.js +3 -3
- package/dist/halal-core/cli/check.js.map +1 -1
- package/dist/halal-core/cli/explain.d.ts +2 -1
- package/dist/halal-core/cli/explain.js +3 -3
- package/dist/halal-core/cli/explain.js.map +1 -1
- package/dist/halal-core/cli/report.d.ts +2 -1
- package/dist/halal-core/cli/report.js +3 -3
- package/dist/halal-core/cli/report.js.map +1 -1
- package/dist/halal-core/cli/submitReview.d.ts +2 -1
- package/dist/halal-core/cli/submitReview.js +3 -3
- package/dist/halal-core/cli/submitReview.js.map +1 -1
- package/dist/halal-core/cli/verifyReview.d.ts +2 -1
- package/dist/halal-core/cli/verifyReview.js +3 -4
- package/dist/halal-core/cli/verifyReview.js.map +1 -1
- package/dist/halal-core/config.d.ts +9 -8
- package/dist/halal-core/config.js +2 -1
- package/dist/halal-core/config.js.map +1 -1
- package/dist/halal-core/crypto/integrity.d.ts +6 -5
- package/dist/halal-core/crypto/integrity.js +2 -1
- package/dist/halal-core/crypto/integrity.js.map +1 -1
- package/dist/halal-core/enforce.d.ts +6 -5
- package/dist/halal-core/enforce.js +13 -15
- package/dist/halal-core/enforce.js.map +1 -1
- package/dist/halal-core/index.js +2 -1
- package/dist/halal-core/lifecycle.d.ts +2 -1
- package/dist/halal-core/lifecycle.js +2 -1
- package/dist/halal-core/lifecycle.js.map +1 -1
- package/dist/halal-core/policy.d.ts +3 -1
- package/dist/halal-core/policy.js +2 -1
- package/dist/halal-core/policy.js.map +1 -1
- package/dist/halal-core/report/formatBrowserOverlay.d.ts +3 -1
- package/dist/halal-core/report/formatBrowserOverlay.js +1 -1
- package/dist/halal-core/report/formatBrowserOverlay.js.map +1 -1
- package/dist/halal-core/report/formatTerminalReport.d.ts +3 -1
- package/dist/halal-core/report/formatTerminalReport.js +1 -1
- package/dist/halal-core/report/formatTerminalReport.js.map +1 -1
- package/dist/halal-core/report/generateHalalReport.d.ts +4 -2
- package/dist/halal-core/report/generateHalalReport.js +5 -7
- package/dist/halal-core/report/generateHalalReport.js.map +1 -1
- package/dist/halal-core/report/signReport.d.ts +4 -2
- package/dist/halal-core/report/signReport.js +2 -1
- package/dist/halal-core/report/signReport.js.map +1 -1
- package/dist/halal-core/report/verifyReport.d.ts +5 -3
- package/dist/halal-core/report/verifyReport.js +4 -3
- package/dist/halal-core/report/verifyReport.js.map +1 -1
- package/dist/halal-core/review/createReviewRequest.d.ts +3 -1
- package/dist/halal-core/review/createReviewRequest.js +3 -3
- package/dist/halal-core/review/createReviewRequest.js.map +1 -1
- package/dist/halal-core/review/reviewPolicy.d.ts +4 -3
- package/dist/halal-core/review/reviewPolicy.js +1 -1
- package/dist/halal-core/review/reviewPolicy.js.map +1 -1
- package/dist/halal-core/review/signedReviewFile.d.ts +6 -4
- package/dist/halal-core/review/signedReviewFile.js +2 -1
- package/dist/halal-core/review/signedReviewFile.js.map +1 -1
- package/dist/halal-core/review/verifyReviewApproval.d.ts +3 -2
- package/dist/halal-core/review/verifyReviewApproval.js +2 -1
- package/dist/halal-core/review/verifyReviewApproval.js.map +1 -1
- package/dist/halal-core/rules/adultContentRules.d.ts +3 -2
- package/dist/halal-core/rules/adultContentRules.js +1 -1
- package/dist/halal-core/rules/adultContentRules.js.map +1 -1
- package/dist/halal-core/rules/alcoholDrugVapeRules.d.ts +3 -2
- package/dist/halal-core/rules/alcoholDrugVapeRules.js +1 -1
- package/dist/halal-core/rules/alcoholDrugVapeRules.js.map +1 -1
- package/dist/halal-core/rules/childSafetyRules.d.ts +3 -2
- package/dist/halal-core/rules/childSafetyRules.js +1 -1
- package/dist/halal-core/rules/childSafetyRules.js.map +1 -1
- package/dist/halal-core/rules/coreCategories.d.ts +3 -2
- package/dist/halal-core/rules/coreCategories.js +1 -1
- package/dist/halal-core/rules/coreCategories.js.map +1 -1
- package/dist/halal-core/rules/cyberAbuseRules.d.ts +3 -2
- package/dist/halal-core/rules/cyberAbuseRules.js +1 -1
- package/dist/halal-core/rules/cyberAbuseRules.js.map +1 -1
- package/dist/halal-core/rules/defaultBlockedRules.d.ts +3 -1
- package/dist/halal-core/rules/defaultBlockedRules.js +9 -11
- package/dist/halal-core/rules/defaultBlockedRules.js.map +1 -1
- package/dist/halal-core/rules/dependencyRules.d.ts +3 -2
- package/dist/halal-core/rules/dependencyRules.js +1 -1
- package/dist/halal-core/rules/dependencyRules.js.map +1 -1
- package/dist/halal-core/rules/endpointRules.d.ts +3 -2
- package/dist/halal-core/rules/endpointRules.js +1 -1
- package/dist/halal-core/rules/endpointRules.js.map +1 -1
- package/dist/halal-core/rules/environmentalHarmRules.d.ts +3 -2
- package/dist/halal-core/rules/environmentalHarmRules.js +1 -1
- package/dist/halal-core/rules/environmentalHarmRules.js.map +1 -1
- package/dist/halal-core/rules/financeRibaRules.d.ts +3 -2
- package/dist/halal-core/rules/financeRibaRules.js +1 -1
- package/dist/halal-core/rules/financeRibaRules.js.map +1 -1
- package/dist/halal-core/rules/gamblingRules.d.ts +3 -2
- package/dist/halal-core/rules/gamblingRules.js +1 -1
- package/dist/halal-core/rules/gamblingRules.js.map +1 -1
- package/dist/halal-core/rules/generalHarmRules.d.ts +3 -2
- package/dist/halal-core/rules/generalHarmRules.js +1 -1
- package/dist/halal-core/rules/generalHarmRules.js.map +1 -1
- package/dist/halal-core/rules/healthHarmRules.d.ts +3 -2
- package/dist/halal-core/rules/healthHarmRules.js +1 -1
- package/dist/halal-core/rules/healthHarmRules.js.map +1 -1
- package/dist/halal-core/rules/keywordRules.d.ts +2 -1
- package/dist/halal-core/rules/keywordRules.js +1 -1
- package/dist/halal-core/rules/keywordRules.js.map +1 -1
- package/dist/halal-core/rules/privacyAbuseRules.d.ts +3 -2
- package/dist/halal-core/rules/privacyAbuseRules.js +1 -1
- package/dist/halal-core/rules/privacyAbuseRules.js.map +1 -1
- package/dist/halal-core/rules/scamFraudRules.d.ts +3 -2
- package/dist/halal-core/rules/scamFraudRules.js +1 -1
- package/dist/halal-core/rules/scamFraudRules.js.map +1 -1
- package/dist/halal-core/rules/selfHarmRules.d.ts +3 -2
- package/dist/halal-core/rules/selfHarmRules.js +1 -1
- package/dist/halal-core/rules/selfHarmRules.js.map +1 -1
- package/dist/halal-core/rules/violenceExtremismRules.d.ts +3 -2
- package/dist/halal-core/rules/violenceExtremismRules.js +1 -1
- package/dist/halal-core/rules/violenceExtremismRules.js.map +1 -1
- package/dist/halal-core/runtime/guard.d.ts +5 -3
- package/dist/halal-core/runtime/guard.js +2 -1
- package/dist/halal-core/runtime/guard.js.map +1 -1
- package/dist/halal-core/runtime/index.js +2 -1
- package/dist/halal-core/runtime/reviewedMemory.d.ts +6 -4
- package/dist/halal-core/runtime/reviewedMemory.js +3 -2
- package/dist/halal-core/runtime/reviewedMemory.js.map +1 -1
- package/dist/halal-core/runtime/serializeRuntimeContent.d.ts +7 -5
- package/dist/halal-core/runtime/serializeRuntimeContent.js +4 -3
- package/dist/halal-core/runtime/serializeRuntimeContent.js.map +1 -1
- package/dist/halal-core/runtime/types.d.ts +11 -9
- package/dist/halal-core/runtime/types.js +1 -1
- package/dist/halal-core/scanner/scanApiRoutes.d.ts +2 -1
- package/dist/halal-core/scanner/scanApiRoutes.js +2 -1
- package/dist/halal-core/scanner/scanApiRoutes.js.map +1 -1
- package/dist/halal-core/scanner/scanComponents.d.ts +2 -1
- package/dist/halal-core/scanner/scanComponents.js +2 -1
- package/dist/halal-core/scanner/scanComponents.js.map +1 -1
- package/dist/halal-core/scanner/scanContent.d.ts +3 -2
- package/dist/halal-core/scanner/scanContent.js +4 -3
- package/dist/halal-core/scanner/scanContent.js.map +1 -1
- package/dist/halal-core/scanner/scanDependencies.d.ts +2 -1
- package/dist/halal-core/scanner/scanDependencies.js +2 -1
- package/dist/halal-core/scanner/scanDependencies.js.map +1 -1
- package/dist/halal-core/scanner/scanDomains.d.ts +2 -1
- package/dist/halal-core/scanner/scanDomains.js +1 -1
- package/dist/halal-core/scanner/scanDomains.js.map +1 -1
- package/dist/halal-core/scanner/scanEnvNames.d.ts +2 -1
- package/dist/halal-core/scanner/scanEnvNames.js +2 -1
- package/dist/halal-core/scanner/scanEnvNames.js.map +1 -1
- package/dist/halal-core/scanner/scanMetadata.d.ts +3 -2
- package/dist/halal-core/scanner/scanMetadata.js +2 -1
- package/dist/halal-core/scanner/scanMetadata.js.map +1 -1
- package/dist/halal-core/scanner/scanPages.d.ts +2 -1
- package/dist/halal-core/scanner/scanPages.js +2 -1
- package/dist/halal-core/scanner/scanPages.js.map +1 -1
- package/dist/halal-core/scanner/scanProject.d.ts +4 -2
- package/dist/halal-core/scanner/scanProject.js +2 -1
- package/dist/halal-core/scanner/scanProject.js.map +1 -1
- package/dist/halal-core/scanner/scanRoutes.d.ts +2 -1
- package/dist/halal-core/scanner/scanRoutes.js +2 -1
- package/dist/halal-core/scanner/scanRoutes.js.map +1 -1
- package/dist/halal-core/scanner/scanTranslations.d.ts +2 -1
- package/dist/halal-core/scanner/scanTranslations.js +2 -1
- package/dist/halal-core/scanner/scanTranslations.js.map +1 -1
- package/dist/halal-core/status.d.ts +3 -2
- package/dist/halal-core/status.js +1 -1
- package/dist/halal-core/tamper/verifyCoreIntegrity.d.ts +2 -1
- package/dist/halal-core/tamper/verifyCoreIntegrity.js +2 -1
- package/dist/halal-core/tamper/verifyCoreIntegrity.js.map +1 -1
- package/dist/halal-core/tamper/verifyLifecycleHooks.d.ts +2 -1
- package/dist/halal-core/tamper/verifyLifecycleHooks.js +1 -1
- package/dist/halal-core/tamper/verifyLifecycleHooks.js.map +1 -1
- package/dist/halal-core/tamper/verifyReportSignature.d.ts +3 -1
- package/dist/halal-core/tamper/verifyReportSignature.js +3 -3
- package/dist/halal-core/tamper/verifyReportSignature.js.map +1 -1
- package/dist/halal.js +2 -1
- package/dist/i18n/index.d.ts +12 -11
- package/dist/i18n/index.js +5 -6
- package/dist/i18n/index.js.map +1 -1
- package/dist/i18n/shared.d.ts +15 -14
- package/dist/i18n/shared.js +4 -4
- package/dist/i18n/shared.js.map +1 -1
- package/dist/icons/index.d.ts +20 -18
- package/dist/icons/index.js +5 -4
- package/dist/icons/index.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -1
- package/dist/kit/index.d.ts +23 -21
- package/dist/kit/index.js +2 -1
- package/dist/kit/index.js.map +1 -1
- package/dist/nitro-server/index.d.ts +3 -2
- package/dist/nitro-server/index.js +1 -1
- package/dist/nitro-server/index.js.map +1 -1
- package/dist/node.d.ts +4 -2
- package/dist/node.js +7 -6
- package/dist/node.js.map +1 -1
- package/dist/reactivity/computed.d.ts +5 -3
- package/dist/reactivity/computed.js +3 -3
- package/dist/reactivity/computed.js.map +1 -1
- package/dist/reactivity/effect.d.ts +15 -13
- package/dist/reactivity/effect.js +9 -10
- package/dist/reactivity/effect.js.map +1 -1
- package/dist/reactivity/index.js +2 -1
- package/dist/reactivity/reactive.d.ts +6 -5
- package/dist/reactivity/reactive.js +5 -4
- package/dist/reactivity/reactive.js.map +1 -1
- package/dist/reactivity/readonly.js +2 -1
- package/dist/reactivity/ref.d.ts +9 -7
- package/dist/reactivity/ref.js +2 -4
- package/dist/reactivity/ref.js.map +1 -1
- package/dist/reactivity/scheduler.d.ts +5 -4
- package/dist/reactivity/scheduler.js +1 -1
- package/dist/reactivity/scheduler.js.map +1 -1
- package/dist/reactivity/types.d.ts +12 -11
- package/dist/reactivity/types.js +1 -1
- package/dist/reactivity/utils.d.ts +10 -9
- package/dist/reactivity/utils.js +1 -1
- package/dist/reactivity/utils.js.map +1 -1
- package/dist/reactivity/watch.d.ts +4 -2
- package/dist/reactivity/watch.js +4 -5
- package/dist/reactivity/watch.js.map +1 -1
- package/dist/runtime/core.d.ts +5 -4
- package/dist/runtime/core.js +9 -10
- package/dist/runtime/core.js.map +1 -1
- package/dist/runtime/index.d.ts +123 -122
- package/dist/runtime/index.js +45 -58
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/reactivity.js +2 -1
- package/dist/runtime/resume.d.ts +15 -14
- package/dist/runtime/resume.js +3 -3
- package/dist/runtime/resume.js.map +1 -1
- package/dist/runtime/router.d.ts +5 -4
- package/dist/runtime/router.js +1 -1
- package/dist/runtime/router.js.map +1 -1
- package/dist/runtime/streaming.d.ts +7 -6
- package/dist/runtime/streaming.js +3 -3
- package/dist/runtime/streaming.js.map +1 -1
- package/dist/security/media-fetch.d.ts +11 -10
- package/dist/security/media-fetch.js +5 -4
- package/dist/security/media-fetch.js.map +1 -1
- package/dist/security/path-boundary.d.ts +5 -4
- package/dist/security/path-boundary.js +2 -1
- package/dist/security/path-boundary.js.map +1 -1
- package/dist/ui/index.d.ts +195 -193
- package/dist/ui/index.js +7 -8
- package/dist/ui/index.js.map +1 -1
- package/dist/vite-builder/index.d.ts +3 -2
- package/dist/vite-builder/index.js +1 -1
- package/dist/vite-builder/index.js.map +1 -1
- package/package.json +2 -2
package/dist/runtime/index.d.ts
CHANGED
|
@@ -4,69 +4,70 @@ import { isReactive, isReadonly, reactive, readonly } from "../reactivity/reacti
|
|
|
4
4
|
import { computed } from "../reactivity/computed.js";
|
|
5
5
|
import { watch, watchEffect } from "../reactivity/watch.js";
|
|
6
6
|
import { nextTick } from "../reactivity/scheduler.js";
|
|
7
|
+
|
|
7
8
|
//#region src/runtime/index.d.ts
|
|
8
|
-
|
|
9
|
+
type JsonValue = null | boolean | number | string | JsonValue[] | {
|
|
9
10
|
[key: string]: JsonValue;
|
|
10
11
|
};
|
|
11
|
-
|
|
12
|
+
interface AsyncDataError {
|
|
12
13
|
name: string;
|
|
13
14
|
message: string;
|
|
14
15
|
}
|
|
15
|
-
|
|
16
|
+
interface ResuxError extends Error {
|
|
16
17
|
statusCode?: number;
|
|
17
18
|
fatal?: boolean;
|
|
18
19
|
data?: JsonValue;
|
|
19
20
|
}
|
|
20
|
-
|
|
21
|
+
interface AsyncDataResource<T = unknown> {
|
|
21
22
|
data: Ref<T | undefined>;
|
|
22
23
|
value: Ref<T | undefined>;
|
|
23
24
|
pending: Ref<boolean>;
|
|
24
25
|
error: Ref<AsyncDataError | null>;
|
|
25
26
|
then<TResult1 = AwaitedAsyncDataResource<T>, TResult2 = never>(onfulfilled?: ((value: AwaitedAsyncDataResource<T>) => TResult1 | PromiseLike<TResult1>) | null, onrejected?: ((reason: unknown) => TResult2 | PromiseLike<TResult2>) | null): PromiseLike<TResult1 | TResult2>;
|
|
26
27
|
}
|
|
27
|
-
|
|
28
|
+
interface AwaitedAsyncDataResource<T = unknown> {
|
|
28
29
|
data: Ref<T | undefined>;
|
|
29
30
|
value: Ref<T | undefined>;
|
|
30
31
|
pending: Ref<boolean>;
|
|
31
32
|
error: Ref<AsyncDataError | null>;
|
|
32
33
|
}
|
|
33
|
-
|
|
34
|
+
interface AsyncDataHandlerContext {
|
|
34
35
|
signal?: AbortSignal;
|
|
35
36
|
}
|
|
36
|
-
|
|
37
|
+
interface RouteContext {
|
|
37
38
|
path: string;
|
|
38
39
|
params: Record<string, string>;
|
|
39
40
|
query: Record<string, string | string[]>;
|
|
40
41
|
origin?: string;
|
|
41
42
|
userAgent?: string;
|
|
42
43
|
}
|
|
43
|
-
|
|
44
|
+
interface ResuxRouter {
|
|
44
45
|
push(to: string): Promise<void> | void;
|
|
45
46
|
replace(to: string): Promise<void> | void;
|
|
46
47
|
back(): void;
|
|
47
48
|
forward(): void;
|
|
48
49
|
go(delta: number): void;
|
|
49
50
|
}
|
|
50
|
-
|
|
51
|
+
interface PageMeta {
|
|
51
52
|
layout?: string | false;
|
|
52
53
|
middleware?: string | string[];
|
|
53
54
|
title?: string | Record<string, string>;
|
|
54
55
|
meta?: Array<Record<string, string>>;
|
|
55
56
|
}
|
|
56
|
-
|
|
57
|
+
interface HeadEntry {
|
|
57
58
|
title?: string;
|
|
58
59
|
meta?: Array<Record<string, string>>;
|
|
59
60
|
link?: Array<Record<string, string>>;
|
|
60
61
|
style?: ComponentStyle[];
|
|
61
62
|
htmlAttrs?: Record<string, string>;
|
|
62
63
|
}
|
|
63
|
-
|
|
64
|
+
interface ComponentStyle {
|
|
64
65
|
id: string;
|
|
65
66
|
css: string;
|
|
66
67
|
scoped?: boolean;
|
|
67
68
|
}
|
|
68
|
-
|
|
69
|
-
|
|
69
|
+
type SeoMetaValue = string | number | boolean | null | undefined;
|
|
70
|
+
interface SeoMetaInput {
|
|
70
71
|
title?: SeoMetaValue;
|
|
71
72
|
description?: SeoMetaValue | SeoMetaValue[];
|
|
72
73
|
keywords?: SeoMetaValue | SeoMetaValue[];
|
|
@@ -99,17 +100,17 @@ export interface SeoMetaInput {
|
|
|
99
100
|
twitterUrl?: SeoMetaValue;
|
|
100
101
|
[key: string]: SeoMetaValue | SeoMetaValue[];
|
|
101
102
|
}
|
|
102
|
-
|
|
103
|
+
interface RuntimeConfig {
|
|
103
104
|
public: Record<string, JsonValue>;
|
|
104
105
|
[key: string]: unknown;
|
|
105
106
|
}
|
|
106
|
-
|
|
107
|
-
|
|
107
|
+
type ResuxImageFit = "cover" | "contain" | "fill" | "inside" | "outside";
|
|
108
|
+
type ResuxImageCacheInput = boolean | string | number | {
|
|
108
109
|
maxAge?: number | string;
|
|
109
110
|
expiresIn?: number | string;
|
|
110
111
|
ttl?: number | string;
|
|
111
112
|
};
|
|
112
|
-
|
|
113
|
+
interface ResuxImageModifiers {
|
|
113
114
|
width?: number;
|
|
114
115
|
height?: number;
|
|
115
116
|
quality?: number | false;
|
|
@@ -117,11 +118,11 @@ export interface ResuxImageModifiers {
|
|
|
117
118
|
fit?: ResuxImageFit;
|
|
118
119
|
[key: string]: string | number | boolean | undefined;
|
|
119
120
|
}
|
|
120
|
-
|
|
121
|
+
interface ResuxImageProviderConfig {
|
|
121
122
|
baseURL?: string;
|
|
122
123
|
modifiers?: ResuxImageModifiers;
|
|
123
124
|
}
|
|
124
|
-
|
|
125
|
+
interface ResuxImageConfig {
|
|
125
126
|
provider?: string;
|
|
126
127
|
quality?: number;
|
|
127
128
|
format?: string;
|
|
@@ -129,7 +130,7 @@ export interface ResuxImageConfig {
|
|
|
129
130
|
densities?: number[];
|
|
130
131
|
providers?: Record<string, ResuxImageProviderConfig>;
|
|
131
132
|
}
|
|
132
|
-
|
|
133
|
+
interface UseResuxImageOptions {
|
|
133
134
|
provider?: string;
|
|
134
135
|
modifiers?: ResuxImageModifiers;
|
|
135
136
|
width?: number;
|
|
@@ -139,16 +140,16 @@ export interface UseResuxImageOptions {
|
|
|
139
140
|
format?: string;
|
|
140
141
|
cache?: ResuxImageCacheInput;
|
|
141
142
|
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
143
|
+
type ResuxImageBuilder = (src: string, options?: UseResuxImageOptions) => string;
|
|
144
|
+
interface ResuxAppInjections {}
|
|
145
|
+
type ResuxSupportMode = "all" | "server" | "client";
|
|
146
|
+
interface ClientPluginManifestRecord {
|
|
146
147
|
id: string;
|
|
147
148
|
file: string;
|
|
148
149
|
mode: ResuxSupportMode;
|
|
149
150
|
src: string;
|
|
150
151
|
}
|
|
151
|
-
|
|
152
|
+
interface ClientRouteMiddlewareManifestRecord {
|
|
152
153
|
id: string;
|
|
153
154
|
name: string;
|
|
154
155
|
file: string;
|
|
@@ -156,8 +157,8 @@ export interface ClientRouteMiddlewareManifestRecord {
|
|
|
156
157
|
mode: ResuxSupportMode;
|
|
157
158
|
src: string;
|
|
158
159
|
}
|
|
159
|
-
|
|
160
|
-
|
|
160
|
+
type ResuxAppProvides = ResuxAppInjections & Record<string, unknown>;
|
|
161
|
+
interface ResuxAppLike {
|
|
161
162
|
route: RouteContext;
|
|
162
163
|
payload: ResuxPayload;
|
|
163
164
|
$config: RuntimeConfig;
|
|
@@ -166,8 +167,8 @@ export interface ResuxAppLike {
|
|
|
166
167
|
provide<Key extends string, Value>(key: Key, value: Value): void;
|
|
167
168
|
vueApp?: any;
|
|
168
169
|
}
|
|
169
|
-
|
|
170
|
-
|
|
170
|
+
type ResuxPlugin = (resuxApp: ResuxAppLike) => unknown | Promise<unknown>;
|
|
171
|
+
interface ResuxModuleContext {
|
|
171
172
|
rootDir: string;
|
|
172
173
|
buildDir: string;
|
|
173
174
|
options: Record<string, unknown>;
|
|
@@ -232,7 +233,7 @@ export interface ResuxModuleContext {
|
|
|
232
233
|
addVitePlugin(plugin: unknown): void;
|
|
233
234
|
addPrerenderRoutes(route: string | string[]): void;
|
|
234
235
|
}
|
|
235
|
-
|
|
236
|
+
type ResuxModule<TOptions = Record<string, unknown>> = ((options: TOptions, context: ResuxModuleContext) => unknown | Promise<unknown>) | {
|
|
236
237
|
meta?: {
|
|
237
238
|
name?: string;
|
|
238
239
|
configKey?: string;
|
|
@@ -240,12 +241,12 @@ export type ResuxModule<TOptions = Record<string, unknown>> = ((options: TOption
|
|
|
240
241
|
defaults?: TOptions;
|
|
241
242
|
setup: (options: TOptions, context: ResuxModuleContext) => unknown | Promise<unknown>;
|
|
242
243
|
};
|
|
243
|
-
|
|
244
|
-
|
|
244
|
+
type ResuxDeployTarget = "auto" | "node" | "vercel" | "netlify" | "cloudflare" | "static";
|
|
245
|
+
interface ResuxDeployOptions {
|
|
245
246
|
target?: ResuxDeployTarget;
|
|
246
247
|
nitroPreset?: string;
|
|
247
248
|
}
|
|
248
|
-
|
|
249
|
+
interface ResuxConfigInput extends Record<string, unknown> {
|
|
249
250
|
builder?: string;
|
|
250
251
|
serverBuilder?: string;
|
|
251
252
|
buildDir?: string;
|
|
@@ -255,14 +256,14 @@ export interface ResuxConfigInput extends Record<string, unknown> {
|
|
|
255
256
|
packages?: ResuxPackagesConfig;
|
|
256
257
|
video?: Record<string, unknown>;
|
|
257
258
|
}
|
|
258
|
-
|
|
259
|
+
interface ResuxPackageCssMap {
|
|
259
260
|
[packageName: string]: string[];
|
|
260
261
|
}
|
|
261
|
-
|
|
262
|
-
|
|
262
|
+
type ResuxPackageMode = "ssr" | "clientOnly" | "serverOnly" | "progressive";
|
|
263
|
+
interface ResuxPackageModeMap {
|
|
263
264
|
[packageName: string]: ResuxPackageMode;
|
|
264
265
|
}
|
|
265
|
-
|
|
266
|
+
interface ResuxPackagesConfig {
|
|
266
267
|
lazy?: boolean | string[];
|
|
267
268
|
clientOnly?: string[];
|
|
268
269
|
serverOnly?: string[];
|
|
@@ -276,24 +277,24 @@ export interface ResuxPackagesConfig {
|
|
|
276
277
|
guards?: boolean;
|
|
277
278
|
diagnostics?: boolean;
|
|
278
279
|
}
|
|
279
|
-
|
|
280
|
+
interface ResuxClientPackageImportRegistry {
|
|
280
281
|
importers?: string[];
|
|
281
282
|
css?: Record<string, string[]>;
|
|
282
283
|
declared?: string[];
|
|
283
284
|
}
|
|
284
|
-
|
|
285
|
+
interface ClientRuntimeSourceOptions {
|
|
285
286
|
packageRegistry?: ResuxClientPackageImportRegistry;
|
|
286
287
|
}
|
|
287
|
-
|
|
288
|
+
interface ResuxLazyPackageOptions {
|
|
288
289
|
clientOnly?: boolean;
|
|
289
290
|
mode?: ResuxPackageMode;
|
|
290
291
|
css?: string[];
|
|
291
292
|
exportName?: string;
|
|
292
293
|
preferDefault?: boolean;
|
|
293
294
|
}
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
295
|
+
type ResuxLazyPackageLoader<T = unknown> = () => Promise<T>;
|
|
296
|
+
type ClientEnhancementTrigger = "visible" | "interaction" | "idle" | "immediate" | "manual" | "page-load";
|
|
297
|
+
interface ClientEnhancementContext {
|
|
297
298
|
trigger: ClientEnhancementTrigger;
|
|
298
299
|
options?: Record<string, unknown>;
|
|
299
300
|
__resux?: {
|
|
@@ -302,18 +303,18 @@ export interface ClientEnhancementContext {
|
|
|
302
303
|
};
|
|
303
304
|
[key: string]: unknown;
|
|
304
305
|
}
|
|
305
|
-
|
|
306
|
-
|
|
306
|
+
type ClientEnhancementSetup = (target: Element, context: ClientEnhancementContext) => void | (() => void | Promise<void>) | Promise<void | (() => void | Promise<void>)>;
|
|
307
|
+
interface UseClientEnhancementOptions {
|
|
307
308
|
target?: Element | string;
|
|
308
309
|
trigger?: ClientEnhancementTrigger;
|
|
309
310
|
options?: Record<string, unknown>;
|
|
310
311
|
}
|
|
311
|
-
|
|
312
|
+
interface PackageAdapterContext {
|
|
312
313
|
packageName: string;
|
|
313
314
|
mode: ResuxPackageMode;
|
|
314
315
|
modules: unknown[];
|
|
315
316
|
}
|
|
316
|
-
|
|
317
|
+
interface PackageAdapterDefinition<TOptions extends Record<string, unknown> = Record<string, unknown>> {
|
|
317
318
|
name: string;
|
|
318
319
|
packageName?: string;
|
|
319
320
|
mode?: ResuxPackageMode;
|
|
@@ -323,7 +324,7 @@ export interface PackageAdapterDefinition<TOptions extends Record<string, unknow
|
|
|
323
324
|
validateOptions?: (options: TOptions) => void;
|
|
324
325
|
enhance: (target: Element, options: TOptions, context: PackageAdapterContext) => void | (() => void | Promise<void>) | Promise<void | (() => void | Promise<void>)>;
|
|
325
326
|
}
|
|
326
|
-
|
|
327
|
+
type RouteMiddlewareResult = void | string | false | {
|
|
327
328
|
redirect: string | {
|
|
328
329
|
to: string;
|
|
329
330
|
statusCode?: number;
|
|
@@ -337,8 +338,8 @@ export type RouteMiddlewareResult = void | string | false | {
|
|
|
337
338
|
message?: string;
|
|
338
339
|
statusCode?: number;
|
|
339
340
|
};
|
|
340
|
-
|
|
341
|
-
|
|
341
|
+
type ResuxRouteMiddleware = (to: RouteContext, from: RouteContext) => RouteMiddlewareResult | Promise<RouteMiddlewareResult>;
|
|
342
|
+
interface EventHandlerEvent {
|
|
342
343
|
path: string;
|
|
343
344
|
method: string;
|
|
344
345
|
query: Record<string, string | string[]>;
|
|
@@ -348,47 +349,47 @@ export interface EventHandlerEvent {
|
|
|
348
349
|
res: unknown;
|
|
349
350
|
};
|
|
350
351
|
}
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
352
|
+
type EventHandler = (event: EventHandlerEvent) => unknown | Promise<unknown>;
|
|
353
|
+
type ServerMiddlewareResult = unknown | Promise<unknown>;
|
|
354
|
+
type ServerMiddleware = (event: EventHandlerEvent) => ServerMiddlewareResult;
|
|
355
|
+
type TemplateNode = TextTemplateNode | InterpolationTemplateNode | ElementTemplateNode;
|
|
356
|
+
interface TextTemplateNode {
|
|
356
357
|
type: "text";
|
|
357
358
|
value: string;
|
|
358
359
|
}
|
|
359
|
-
|
|
360
|
+
interface InterpolationTemplateNode {
|
|
360
361
|
type: "interpolation";
|
|
361
362
|
expression: string;
|
|
362
363
|
bindingId: string;
|
|
363
364
|
}
|
|
364
|
-
|
|
365
|
+
interface TemplateAttribute {
|
|
365
366
|
kind: "static" | "dynamic";
|
|
366
367
|
name: string;
|
|
367
368
|
value: string;
|
|
368
369
|
bindingId?: string;
|
|
369
370
|
}
|
|
370
|
-
|
|
371
|
+
interface TemplateEvent {
|
|
371
372
|
name: string;
|
|
372
373
|
handler: string;
|
|
373
374
|
modifiers?: string[];
|
|
374
375
|
/** Template-local bindings captured by an inline resumable handler. */
|
|
375
376
|
locals?: string[];
|
|
376
377
|
}
|
|
377
|
-
|
|
378
|
+
interface IfDirective {
|
|
378
379
|
expression: string;
|
|
379
380
|
blockId: string;
|
|
380
381
|
}
|
|
381
|
-
|
|
382
|
+
interface ForDirective {
|
|
382
383
|
source: string;
|
|
383
384
|
value: string;
|
|
384
385
|
index?: string;
|
|
385
386
|
blockId: string;
|
|
386
387
|
}
|
|
387
|
-
|
|
388
|
+
interface HtmlDirective {
|
|
388
389
|
expression: string;
|
|
389
390
|
bindingId: string;
|
|
390
391
|
}
|
|
391
|
-
|
|
392
|
+
interface ElementTemplateNode {
|
|
392
393
|
type: "element";
|
|
393
394
|
tag: string;
|
|
394
395
|
attrs: TemplateAttribute[];
|
|
@@ -398,7 +399,7 @@ export interface ElementTemplateNode {
|
|
|
398
399
|
for?: ForDirective;
|
|
399
400
|
html?: HtmlDirective;
|
|
400
401
|
}
|
|
401
|
-
|
|
402
|
+
interface SetupContext {
|
|
402
403
|
props: Record<string, unknown>;
|
|
403
404
|
ref: typeof ref;
|
|
404
405
|
reactive: typeof reactive;
|
|
@@ -465,7 +466,7 @@ export interface SetupContext {
|
|
|
465
466
|
$t(key: string, params?: Record<string, unknown>): string;
|
|
466
467
|
$tm(key: string): unknown;
|
|
467
468
|
}
|
|
468
|
-
|
|
469
|
+
interface ComponentDefinition {
|
|
469
470
|
id: string;
|
|
470
471
|
name: string;
|
|
471
472
|
file: string;
|
|
@@ -476,7 +477,7 @@ export interface ComponentDefinition {
|
|
|
476
477
|
styleScopeId?: string;
|
|
477
478
|
meta?: PageMeta;
|
|
478
479
|
}
|
|
479
|
-
|
|
480
|
+
interface SerializedScope {
|
|
480
481
|
id: string;
|
|
481
482
|
moduleId: string;
|
|
482
483
|
props?: Record<string, JsonValue>;
|
|
@@ -484,12 +485,12 @@ export interface SerializedScope {
|
|
|
484
485
|
globalStateKeys?: string[];
|
|
485
486
|
asyncData: Record<string, SerializedAsyncData>;
|
|
486
487
|
}
|
|
487
|
-
|
|
488
|
+
interface SerializedAsyncData {
|
|
488
489
|
value: JsonValue;
|
|
489
490
|
pending: boolean;
|
|
490
491
|
error: AsyncDataError | null;
|
|
491
492
|
}
|
|
492
|
-
|
|
493
|
+
interface ResuxPayload {
|
|
493
494
|
route: RouteContext;
|
|
494
495
|
scopes: Record<string, SerializedScope>;
|
|
495
496
|
globalState?: Record<string, JsonValue>;
|
|
@@ -500,7 +501,7 @@ export interface ResuxPayload {
|
|
|
500
501
|
middleware?: ClientRouteMiddlewareManifestRecord[];
|
|
501
502
|
pageMeta?: PageMeta;
|
|
502
503
|
}
|
|
503
|
-
|
|
504
|
+
interface RouteRecord {
|
|
504
505
|
id: string;
|
|
505
506
|
path: string;
|
|
506
507
|
file: string;
|
|
@@ -508,7 +509,7 @@ export interface RouteRecord {
|
|
|
508
509
|
component: ComponentDefinition;
|
|
509
510
|
match(pathname: string): Record<string, string> | null;
|
|
510
511
|
}
|
|
511
|
-
|
|
512
|
+
interface RenderAppOptions {
|
|
512
513
|
app?: ComponentDefinition;
|
|
513
514
|
page: ComponentDefinition;
|
|
514
515
|
pageProps?: Record<string, unknown>;
|
|
@@ -522,12 +523,12 @@ export interface RenderAppOptions {
|
|
|
522
523
|
appHead?: HeadEntry;
|
|
523
524
|
plugins?: ResuxPlugin[];
|
|
524
525
|
}
|
|
525
|
-
|
|
526
|
+
interface RenderResult {
|
|
526
527
|
html: string;
|
|
527
528
|
payload: ResuxPayload;
|
|
528
529
|
head: HeadEntry;
|
|
529
530
|
}
|
|
530
|
-
|
|
531
|
+
interface RenderDocumentOptions {
|
|
531
532
|
devReload?: boolean;
|
|
532
533
|
isStatic?: boolean;
|
|
533
534
|
}
|
|
@@ -547,13 +548,13 @@ interface RenderTemplateContext {
|
|
|
547
548
|
renderLayout?: (name: string | false | undefined, slot: () => Promise<string>) => Promise<string>;
|
|
548
549
|
}
|
|
549
550
|
type ComponentProps = Record<string, unknown>;
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
551
|
+
declare function defineComponent(definition: ComponentDefinition): ComponentDefinition;
|
|
552
|
+
declare function defineResuxConfig<T extends ResuxConfigInput>(config: T): T;
|
|
553
|
+
declare function defineResuxModule<TOptions = Record<string, unknown>>(module: ResuxModule<TOptions>): ResuxModule<TOptions>;
|
|
554
|
+
declare function defineResuxPlugin(plugin: ResuxPlugin): ResuxPlugin;
|
|
555
|
+
declare function defineResuxRouteMiddleware(middleware: ResuxRouteMiddleware): ResuxRouteMiddleware;
|
|
556
|
+
declare function useResuxApp(): ResuxAppLike;
|
|
557
|
+
interface DeviceInfo {
|
|
557
558
|
isMobile: boolean;
|
|
558
559
|
isTablet: boolean;
|
|
559
560
|
isDesktop: boolean;
|
|
@@ -561,53 +562,53 @@ export interface DeviceInfo {
|
|
|
561
562
|
isAndroid: boolean;
|
|
562
563
|
[key: string]: boolean;
|
|
563
564
|
}
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
565
|
+
declare function parseUserAgent(ua?: string): DeviceInfo;
|
|
566
|
+
declare function useDevice(): DeviceInfo;
|
|
567
|
+
declare function useRoute(): RouteContext;
|
|
568
|
+
declare function useRouter(): ResuxRouter;
|
|
569
|
+
declare function useRuntimeConfig(): RuntimeConfig;
|
|
570
|
+
declare function useResuxImage(): ResuxImageBuilder;
|
|
571
|
+
declare function navigateTo(to: string, options?: {
|
|
571
572
|
statusCode?: number;
|
|
572
573
|
}): RouteMiddlewareResult;
|
|
573
|
-
|
|
574
|
+
declare function abortNavigation(message?: string, options?: {
|
|
574
575
|
statusCode?: number;
|
|
575
576
|
}): RouteMiddlewareResult;
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
577
|
+
declare function createError(input: string | Partial<ResuxError>): ResuxError;
|
|
578
|
+
declare function useError(): Ref<ResuxError | null>;
|
|
579
|
+
declare function showError(input: string | Partial<ResuxError>): never;
|
|
580
|
+
declare function clearError(): void;
|
|
581
|
+
declare function useLazyPackage<T = unknown>(name: string, options?: ResuxLazyPackageOptions): Promise<T>;
|
|
582
|
+
declare function useClientPackage<T = unknown>(name: string, options?: Omit<ResuxLazyPackageOptions, "clientOnly" | "mode">): Promise<T>;
|
|
583
|
+
declare function usePackageReady(name: string): boolean;
|
|
584
|
+
declare function defineLazyPackage<T = unknown>(name: string, options?: ResuxLazyPackageOptions): ResuxLazyPackageLoader<T>;
|
|
585
|
+
declare function defineClientOnlyPackage<T = unknown>(name: string, options?: Omit<ResuxLazyPackageOptions, "clientOnly" | "mode">): ResuxLazyPackageLoader<T>;
|
|
586
|
+
declare function definePackageAdapter<TOptions extends Record<string, unknown> = Record<string, unknown>>(definition: PackageAdapterDefinition<TOptions>): {
|
|
586
587
|
name: string;
|
|
587
588
|
setup: ClientEnhancementSetup;
|
|
588
589
|
};
|
|
589
|
-
|
|
590
|
+
declare function defineClientEnhancement(name: string, setup: ClientEnhancementSetup): {
|
|
590
591
|
name: string;
|
|
591
592
|
setup: ClientEnhancementSetup;
|
|
592
593
|
};
|
|
593
|
-
|
|
594
|
+
declare function useClientEnhancement(name: string, options?: UseClientEnhancementOptions): Promise<{
|
|
594
595
|
ready: boolean;
|
|
595
596
|
activate: () => Promise<void>;
|
|
596
597
|
dispose: () => Promise<void>;
|
|
597
598
|
}>;
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
599
|
+
declare function disposeClientEnhancements(): Promise<void>;
|
|
600
|
+
declare function hasClientEnhancement(name: string): boolean;
|
|
601
|
+
declare function getClientEnhancement(name: string): ClientEnhancementSetup | undefined;
|
|
602
|
+
declare function scanClientEnhancements(root?: ParentNode): Promise<void>;
|
|
603
|
+
declare function defineEventHandler(handler: EventHandler): EventHandler;
|
|
604
|
+
declare const eventHandler: typeof defineEventHandler;
|
|
605
|
+
declare function defineServerMiddleware(middleware: ServerMiddleware): ServerMiddleware;
|
|
606
|
+
declare function readBody<T = unknown>(event: EventHandlerEvent): Promise<T>;
|
|
607
|
+
declare function getQuery(event: EventHandlerEvent): Record<string, string | string[]>;
|
|
608
|
+
declare function setHeader(event: EventHandlerEvent, name: string, value: number | string | string[]): void;
|
|
609
|
+
declare function renderApp(options: RenderAppOptions): Promise<RenderResult>;
|
|
610
|
+
type ResuxClientBootMode = "none" | "interaction" | "eager";
|
|
611
|
+
interface ResuxClientBootPlan {
|
|
611
612
|
mode: ResuxClientBootMode;
|
|
612
613
|
eventNames: string[];
|
|
613
614
|
deferEnhancements: boolean;
|
|
@@ -624,13 +625,13 @@ export interface ResuxClientBootPlan {
|
|
|
624
625
|
* (pending data, plugins/middleware, immediate islands/enhancements, and
|
|
625
626
|
* managed media).
|
|
626
627
|
*/
|
|
627
|
-
|
|
628
|
+
declare function getClientRuntimeBootPlan(result: RenderResult): ResuxClientBootPlan;
|
|
628
629
|
/** Returns whether a document needs any Resux browser execution. */
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
630
|
+
declare function shouldLoadClientRuntime(result: RenderResult): boolean;
|
|
631
|
+
declare function renderDocument(result: RenderResult, title?: string, options?: RenderDocumentOptions): string;
|
|
632
|
+
declare function createServerSetupContext(route: RouteContext, props: ComponentProps, stateRefs: Record<string, Ref<unknown>>, asyncDataRefs: Record<string, AsyncDataResource<unknown>>, headEntries: HeadEntry[], resuxApp: ResuxAppLike, runtimeConfig: RuntimeConfig, globalStateRefs?: Record<string, Ref<unknown>>, globalStateKeys?: Set<string>): SetupContext;
|
|
633
|
+
declare function renderTemplateNodesAsync(nodes: TemplateNode[], context: RenderTemplateContext, renderComponent: (component: ComponentDefinition, props?: ComponentProps, renderSlot?: () => Promise<string>) => Promise<string>, locals?: Record<string, unknown>): Promise<string>;
|
|
634
|
+
declare class AsyncResuxRenderer {
|
|
634
635
|
private readonly route;
|
|
635
636
|
private readonly components;
|
|
636
637
|
private readonly modules;
|
|
@@ -650,8 +651,8 @@ export declare class AsyncResuxRenderer {
|
|
|
650
651
|
renderLayout(name: string | false | undefined, renderSlot: () => Promise<string>): Promise<string>;
|
|
651
652
|
createPayload(): ResuxPayload;
|
|
652
653
|
}
|
|
653
|
-
|
|
654
|
-
|
|
654
|
+
declare function renderAppAsync(options: RenderAppOptions): Promise<RenderResult>;
|
|
655
|
+
declare function evaluateExpression(expression: string, scope: Record<string, unknown>, locals?: Record<string, unknown>): unknown;
|
|
655
656
|
type ClientPatch = {
|
|
656
657
|
type: "text";
|
|
657
658
|
id: string;
|
|
@@ -670,8 +671,8 @@ type ClientPatch = {
|
|
|
670
671
|
id: string;
|
|
671
672
|
value: string;
|
|
672
673
|
};
|
|
673
|
-
|
|
674
|
-
|
|
674
|
+
declare function renderClientPatches(template: TemplateNode[], scope: Record<string, unknown>, scopeId: string, styleScopeId?: string): ClientPatch[];
|
|
675
|
+
declare function getClientRuntimeSource(options?: ClientRuntimeSourceOptions): string;
|
|
675
676
|
//#endregion
|
|
676
|
-
export { type ComputedRef, type MaybeRef, type MaybeRefOrGetter, type ReactiveEffectOptions, type ReactiveEffectRunner, type Ref, type WatchCallback, type WatchOptions, type WatchSource, type WatchStopHandle, computed, isReactive, isReadonly, isRef, nextTick, reactive, readonly, ref, toRef, toRefs, unref, watch, watchEffect };
|
|
677
|
+
export { AsyncDataError, AsyncDataHandlerContext, AsyncDataResource, AsyncResuxRenderer, AwaitedAsyncDataResource, ClientEnhancementContext, ClientEnhancementSetup, ClientEnhancementTrigger, ClientPluginManifestRecord, ClientRouteMiddlewareManifestRecord, ClientRuntimeSourceOptions, ComponentDefinition, ComponentStyle, type ComputedRef, DeviceInfo, ElementTemplateNode, EventHandler, EventHandlerEvent, ForDirective, HeadEntry, HtmlDirective, IfDirective, InterpolationTemplateNode, JsonValue, type MaybeRef, type MaybeRefOrGetter, PackageAdapterContext, PackageAdapterDefinition, PageMeta, type ReactiveEffectOptions, type ReactiveEffectRunner, type Ref, RenderAppOptions, RenderDocumentOptions, RenderResult, ResuxAppInjections, ResuxAppLike, ResuxAppProvides, ResuxClientBootMode, ResuxClientBootPlan, ResuxClientPackageImportRegistry, ResuxConfigInput, ResuxDeployOptions, ResuxDeployTarget, ResuxError, ResuxImageBuilder, ResuxImageCacheInput, ResuxImageConfig, ResuxImageFit, ResuxImageModifiers, ResuxImageProviderConfig, ResuxLazyPackageLoader, ResuxLazyPackageOptions, ResuxModule, ResuxModuleContext, ResuxPackageCssMap, ResuxPackageMode, ResuxPackageModeMap, ResuxPackagesConfig, ResuxPayload, ResuxPlugin, ResuxRouteMiddleware, ResuxRouter, ResuxSupportMode, RouteContext, RouteMiddlewareResult, RouteRecord, RuntimeConfig, SeoMetaInput, SeoMetaValue, SerializedAsyncData, SerializedScope, ServerMiddleware, ServerMiddlewareResult, SetupContext, TemplateAttribute, TemplateEvent, TemplateNode, TextTemplateNode, UseClientEnhancementOptions, UseResuxImageOptions, type WatchCallback, type WatchOptions, type WatchSource, type WatchStopHandle, abortNavigation, clearError, computed, createError, createServerSetupContext, defineClientEnhancement, defineClientOnlyPackage, defineComponent, defineEventHandler, defineLazyPackage, definePackageAdapter, defineResuxConfig, defineResuxModule, defineResuxPlugin, defineResuxRouteMiddleware, defineServerMiddleware, disposeClientEnhancements, evaluateExpression, eventHandler, getClientEnhancement, getClientRuntimeBootPlan, getClientRuntimeSource, getQuery, hasClientEnhancement, isReactive, isReadonly, isRef, navigateTo, nextTick, parseUserAgent, reactive, readBody, readonly, ref, renderApp, renderAppAsync, renderClientPatches, renderDocument, renderTemplateNodesAsync, scanClientEnhancements, setHeader, shouldLoadClientRuntime, showError, toRef, toRefs, unref, useClientEnhancement, useClientPackage, useDevice, useError, useLazyPackage, usePackageReady, useResuxApp, useResuxImage, useRoute, useRouter, useRuntimeConfig, watch, watchEffect };
|
|
677
678
|
//# sourceMappingURL=index.d.ts.map
|