resuxjs 0.3.11 → 0.4.0-beta.2
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 +23 -1
- package/dist/bin.d.ts +1 -2
- package/dist/bin.js +4 -0
- package/dist/bin.js.map +1 -1
- package/dist/build/index.d.ts +28 -0
- package/dist/build/index.js +51 -0
- package/dist/build/index.js.map +1 -0
- package/dist/cli.d.ts +15 -5
- package/dist/cli.js +2648 -3671
- package/dist/cli.js.map +1 -1
- package/dist/compiler/adapter.d.ts +14 -11
- package/dist/compiler/adapter.js +68 -93
- package/dist/compiler/adapter.js.map +1 -1
- package/dist/compiler/dev-warnings.d.ts +8 -5
- package/dist/compiler/dev-warnings.js +248 -321
- package/dist/compiler/dev-warnings.js.map +1 -1
- package/dist/compiler/directives.d.ts +3 -0
- package/dist/compiler/directives.js +124 -150
- package/dist/compiler/directives.js.map +1 -1
- package/dist/compiler/implementation.d.ts +96 -93
- package/dist/compiler/implementation.js +2967 -3430
- package/dist/compiler/index.d.ts +14 -11
- package/dist/compiler/index.js +68 -93
- package/dist/compiler/index.js.map +1 -1
- package/dist/core/config.d.ts +12 -5
- package/dist/core/config.js +42 -25
- package/dist/core/config.js.map +1 -1
- package/dist/core/hooks.d.ts +127 -126
- package/dist/core/hooks.js +45 -55
- package/dist/core/hooks.js.map +1 -1
- package/dist/core/index.d.ts +5 -4
- package/dist/core/index.js +5 -5
- package/dist/core/module-container.d.ts +76 -74
- package/dist/core/module-container.js +181 -186
- package/dist/core/module-container.js.map +1 -1
- package/dist/core/resux.d.ts +15 -12
- package/dist/core/resux.js +17 -13
- package/dist/core/resux.js.map +1 -1
- package/dist/create-bin.d.ts +1 -2
- package/dist/create-bin.js +4 -0
- package/dist/create-bin.js.map +1 -1
- package/dist/create.d.ts +3 -0
- package/dist/create.js +499 -638
- package/dist/create.js.map +1 -1
- package/dist/deploy/cloudflare.d.ts +4 -1
- package/dist/deploy/cloudflare.js +30 -34
- package/dist/deploy/cloudflare.js.map +1 -1
- package/dist/deploy/common.d.ts +6 -4
- package/dist/deploy/common.js +118 -188
- package/dist/deploy/common.js.map +1 -1
- package/dist/deploy/framework-runtime.d.ts +3 -0
- package/dist/deploy/framework-runtime.js +43 -48
- package/dist/deploy/framework-runtime.js.map +1 -1
- package/dist/deploy/index.d.ts +4 -1
- package/dist/deploy/index.js +58 -80
- package/dist/deploy/index.js.map +1 -1
- package/dist/deploy/netlify.d.ts +4 -1
- package/dist/deploy/netlify.js +40 -41
- package/dist/deploy/netlify.js.map +1 -1
- package/dist/deploy/node.d.ts +4 -1
- package/dist/deploy/node.js +24 -19
- package/dist/deploy/node.js.map +1 -1
- package/dist/deploy/production-report.d.ts +3 -0
- package/dist/deploy/production-report.js +14 -14
- package/dist/deploy/production-report.js.map +1 -1
- package/dist/deploy/runtime-dependencies.d.ts +3 -0
- package/dist/deploy/runtime-dependencies.js +158 -220
- package/dist/deploy/runtime-dependencies.js.map +1 -1
- package/dist/deploy/static.d.ts +4 -1
- package/dist/deploy/static.js +16 -14
- package/dist/deploy/static.js.map +1 -1
- package/dist/deploy/types.d.ts +25 -22
- package/dist/deploy/types.js +0 -1
- package/dist/deploy/vercel.d.ts +4 -1
- package/dist/deploy/vercel.js +137 -188
- package/dist/deploy/vercel.js.map +1 -1
- package/dist/fonts/index.d.ts +15 -11
- package/dist/fonts/index.js +114 -134
- package/dist/fonts/index.js.map +1 -1
- package/dist/globals.d.ts +79 -78
- package/dist/globals.js +0 -1
- package/dist/halal-core/ai/classifyProject.d.ts +4 -1
- package/dist/halal-core/ai/classifyProject.js +81 -95
- package/dist/halal-core/ai/classifyProject.js.map +1 -1
- package/dist/halal-core/ai/classifyRuntimeContent.d.ts +5 -2
- package/dist/halal-core/ai/classifyRuntimeContent.js +77 -95
- package/dist/halal-core/ai/classifyRuntimeContent.js.map +1 -1
- package/dist/halal-core/ai/createProjectSummary.d.ts +38 -35
- package/dist/halal-core/ai/createProjectSummary.js +38 -39
- package/dist/halal-core/ai/createProjectSummary.js.map +1 -1
- package/dist/halal-core/ai/halalClassifierPrompt.d.ts +3 -0
- package/dist/halal-core/ai/halalClassifierPrompt.js +5 -1
- package/dist/halal-core/ai/halalClassifierPrompt.js.map +1 -1
- package/dist/halal-core/ai/redactSensitiveData.d.ts +3 -0
- package/dist/halal-core/ai/redactSensitiveData.js +82 -110
- package/dist/halal-core/ai/redactSensitiveData.js.map +1 -1
- package/dist/halal-core/ai/validateAiResponse.d.ts +4 -1
- package/dist/halal-core/ai/validateAiResponse.js +58 -85
- package/dist/halal-core/ai/validateAiResponse.js.map +1 -1
- package/dist/halal-core/cli/check.d.ts +3 -0
- package/dist/halal-core/cli/check.js +28 -30
- package/dist/halal-core/cli/check.js.map +1 -1
- package/dist/halal-core/cli/explain.d.ts +3 -0
- package/dist/halal-core/cli/explain.js +27 -31
- package/dist/halal-core/cli/explain.js.map +1 -1
- package/dist/halal-core/cli/report.d.ts +3 -0
- package/dist/halal-core/cli/report.js +14 -10
- package/dist/halal-core/cli/report.js.map +1 -1
- package/dist/halal-core/cli/submitReview.d.ts +3 -0
- package/dist/halal-core/cli/submitReview.js +13 -9
- package/dist/halal-core/cli/submitReview.js.map +1 -1
- package/dist/halal-core/cli/verifyReview.d.ts +3 -0
- package/dist/halal-core/cli/verifyReview.js +18 -15
- package/dist/halal-core/cli/verifyReview.js.map +1 -1
- package/dist/halal-core/config.d.ts +30 -27
- package/dist/halal-core/config.js +76 -118
- package/dist/halal-core/config.js.map +1 -1
- package/dist/halal-core/crypto/integrity.d.ts +6 -3
- package/dist/halal-core/crypto/integrity.js +64 -87
- package/dist/halal-core/crypto/integrity.js.map +1 -1
- package/dist/halal-core/enforce.d.ts +3 -0
- package/dist/halal-core/enforce.js +92 -105
- package/dist/halal-core/enforce.js.map +1 -1
- package/dist/halal-core/index.d.ts +20 -16
- package/dist/halal-core/index.js +18 -19
- package/dist/halal-core/lifecycle.d.ts +3 -0
- package/dist/halal-core/lifecycle.js +15 -13
- package/dist/halal-core/lifecycle.js.map +1 -1
- package/dist/halal-core/policy.d.ts +4 -1
- package/dist/halal-core/policy.js +6 -2
- package/dist/halal-core/policy.js.map +1 -1
- package/dist/halal-core/report/formatBrowserOverlay.d.ts +4 -1
- package/dist/halal-core/report/formatBrowserOverlay.js +10 -8
- package/dist/halal-core/report/formatBrowserOverlay.js.map +1 -1
- package/dist/halal-core/report/formatTerminalReport.d.ts +4 -1
- package/dist/halal-core/report/formatTerminalReport.js +27 -37
- package/dist/halal-core/report/formatTerminalReport.js.map +1 -1
- package/dist/halal-core/report/generateHalalReport.d.ts +7 -4
- package/dist/halal-core/report/generateHalalReport.js +26 -26
- package/dist/halal-core/report/generateHalalReport.js.map +1 -1
- package/dist/halal-core/report/signReport.d.ts +4 -1
- package/dist/halal-core/report/signReport.js +16 -12
- package/dist/halal-core/report/signReport.js.map +1 -1
- package/dist/halal-core/report/verifyReport.d.ts +9 -6
- package/dist/halal-core/report/verifyReport.js +51 -41
- package/dist/halal-core/report/verifyReport.js.map +1 -1
- package/dist/halal-core/review/createReviewRequest.d.ts +4 -1
- package/dist/halal-core/review/createReviewRequest.js +21 -17
- package/dist/halal-core/review/createReviewRequest.js.map +1 -1
- package/dist/halal-core/review/reviewPolicy.d.ts +3 -0
- package/dist/halal-core/review/reviewPolicy.js +19 -17
- package/dist/halal-core/review/reviewPolicy.js.map +1 -1
- package/dist/halal-core/review/signedReviewFile.d.ts +11 -8
- package/dist/halal-core/review/signedReviewFile.js +24 -22
- package/dist/halal-core/review/signedReviewFile.js.map +1 -1
- package/dist/halal-core/review/verifyReviewApproval.d.ts +9 -6
- package/dist/halal-core/review/verifyReviewApproval.js +68 -62
- package/dist/halal-core/review/verifyReviewApproval.js.map +1 -1
- package/dist/halal-core/rules/adultContentRules.d.ts +3 -0
- package/dist/halal-core/rules/adultContentRules.js +23 -23
- package/dist/halal-core/rules/adultContentRules.js.map +1 -1
- package/dist/halal-core/rules/alcoholDrugVapeRules.d.ts +3 -0
- package/dist/halal-core/rules/alcoholDrugVapeRules.js +22 -22
- package/dist/halal-core/rules/alcoholDrugVapeRules.js.map +1 -1
- package/dist/halal-core/rules/childSafetyRules.d.ts +3 -0
- package/dist/halal-core/rules/childSafetyRules.js +19 -19
- package/dist/halal-core/rules/childSafetyRules.js.map +1 -1
- package/dist/halal-core/rules/coreCategories.d.ts +7 -4
- package/dist/halal-core/rules/coreCategories.js +237 -110
- package/dist/halal-core/rules/coreCategories.js.map +1 -1
- package/dist/halal-core/rules/cyberAbuseRules.d.ts +3 -0
- package/dist/halal-core/rules/cyberAbuseRules.js +27 -27
- package/dist/halal-core/rules/cyberAbuseRules.js.map +1 -1
- package/dist/halal-core/rules/defaultBlockedRules.d.ts +21 -18
- package/dist/halal-core/rules/defaultBlockedRules.js +158 -199
- package/dist/halal-core/rules/defaultBlockedRules.js.map +1 -1
- package/dist/halal-core/rules/dependencyRules.d.ts +8 -5
- package/dist/halal-core/rules/dependencyRules.js +50 -56
- package/dist/halal-core/rules/dependencyRules.js.map +1 -1
- package/dist/halal-core/rules/endpointRules.d.ts +6 -3
- package/dist/halal-core/rules/endpointRules.js +21 -23
- package/dist/halal-core/rules/endpointRules.js.map +1 -1
- package/dist/halal-core/rules/environmentalHarmRules.d.ts +3 -0
- package/dist/halal-core/rules/environmentalHarmRules.js +17 -17
- package/dist/halal-core/rules/environmentalHarmRules.js.map +1 -1
- package/dist/halal-core/rules/financeRibaRules.d.ts +3 -0
- package/dist/halal-core/rules/financeRibaRules.js +20 -20
- package/dist/halal-core/rules/financeRibaRules.js.map +1 -1
- package/dist/halal-core/rules/gamblingRules.d.ts +3 -0
- package/dist/halal-core/rules/gamblingRules.js +22 -22
- package/dist/halal-core/rules/gamblingRules.js.map +1 -1
- package/dist/halal-core/rules/generalHarmRules.d.ts +3 -0
- package/dist/halal-core/rules/generalHarmRules.js +15 -15
- package/dist/halal-core/rules/generalHarmRules.js.map +1 -1
- package/dist/halal-core/rules/healthHarmRules.d.ts +3 -0
- package/dist/halal-core/rules/healthHarmRules.js +19 -19
- package/dist/halal-core/rules/healthHarmRules.js.map +1 -1
- package/dist/halal-core/rules/keywordRules.d.ts +11 -8
- package/dist/halal-core/rules/keywordRules.js +90 -39
- package/dist/halal-core/rules/keywordRules.js.map +1 -1
- package/dist/halal-core/rules/privacyAbuseRules.d.ts +3 -0
- package/dist/halal-core/rules/privacyAbuseRules.js +21 -21
- package/dist/halal-core/rules/privacyAbuseRules.js.map +1 -1
- package/dist/halal-core/rules/scamFraudRules.d.ts +3 -0
- package/dist/halal-core/rules/scamFraudRules.js +29 -29
- package/dist/halal-core/rules/scamFraudRules.js.map +1 -1
- package/dist/halal-core/rules/selfHarmRules.d.ts +3 -0
- package/dist/halal-core/rules/selfHarmRules.js +17 -17
- package/dist/halal-core/rules/selfHarmRules.js.map +1 -1
- package/dist/halal-core/rules/violenceExtremismRules.d.ts +3 -0
- package/dist/halal-core/rules/violenceExtremismRules.js +30 -30
- package/dist/halal-core/rules/violenceExtremismRules.js.map +1 -1
- package/dist/halal-core/runtime/guard.d.ts +17 -14
- package/dist/halal-core/runtime/guard.js +162 -183
- package/dist/halal-core/runtime/guard.js.map +1 -1
- package/dist/halal-core/runtime/index.d.ts +5 -4
- package/dist/halal-core/runtime/index.js +4 -5
- package/dist/halal-core/runtime/reviewedMemory.d.ts +4 -1
- package/dist/halal-core/runtime/reviewedMemory.js +74 -110
- package/dist/halal-core/runtime/reviewedMemory.js.map +1 -1
- package/dist/halal-core/runtime/serializeRuntimeContent.d.ts +10 -7
- package/dist/halal-core/runtime/serializeRuntimeContent.js +132 -156
- package/dist/halal-core/runtime/serializeRuntimeContent.js.map +1 -1
- package/dist/halal-core/runtime/types.d.ts +44 -41
- package/dist/halal-core/runtime/types.js +0 -1
- package/dist/halal-core/scanner/scanApiRoutes.d.ts +3 -0
- package/dist/halal-core/scanner/scanApiRoutes.js +32 -36
- package/dist/halal-core/scanner/scanApiRoutes.js.map +1 -1
- package/dist/halal-core/scanner/scanComponents.d.ts +3 -0
- package/dist/halal-core/scanner/scanComponents.js +12 -13
- package/dist/halal-core/scanner/scanComponents.js.map +1 -1
- package/dist/halal-core/scanner/scanContent.d.ts +5 -2
- package/dist/halal-core/scanner/scanContent.js +193 -263
- package/dist/halal-core/scanner/scanContent.js.map +1 -1
- package/dist/halal-core/scanner/scanDependencies.d.ts +3 -0
- package/dist/halal-core/scanner/scanDependencies.js +16 -15
- package/dist/halal-core/scanner/scanDependencies.js.map +1 -1
- package/dist/halal-core/scanner/scanDomains.d.ts +5 -2
- package/dist/halal-core/scanner/scanDomains.js +12 -12
- package/dist/halal-core/scanner/scanDomains.js.map +1 -1
- package/dist/halal-core/scanner/scanEnvNames.d.ts +3 -0
- package/dist/halal-core/scanner/scanEnvNames.js +23 -26
- package/dist/halal-core/scanner/scanEnvNames.js.map +1 -1
- package/dist/halal-core/scanner/scanMetadata.d.ts +6 -3
- package/dist/halal-core/scanner/scanMetadata.js +20 -29
- package/dist/halal-core/scanner/scanMetadata.js.map +1 -1
- package/dist/halal-core/scanner/scanPages.d.ts +3 -0
- package/dist/halal-core/scanner/scanPages.js +12 -15
- package/dist/halal-core/scanner/scanPages.js.map +1 -1
- package/dist/halal-core/scanner/scanProject.d.ts +15 -10
- package/dist/halal-core/scanner/scanProject.js +43 -49
- package/dist/halal-core/scanner/scanProject.js.map +1 -1
- package/dist/halal-core/scanner/scanRoutes.d.ts +3 -0
- package/dist/halal-core/scanner/scanRoutes.js +32 -39
- package/dist/halal-core/scanner/scanRoutes.js.map +1 -1
- package/dist/halal-core/scanner/scanTranslations.d.ts +3 -0
- package/dist/halal-core/scanner/scanTranslations.js +21 -29
- package/dist/halal-core/scanner/scanTranslations.js.map +1 -1
- package/dist/halal-core/status.d.ts +14 -11
- package/dist/halal-core/status.js +0 -1
- package/dist/halal-core/tamper/verifyCoreIntegrity.d.ts +3 -0
- package/dist/halal-core/tamper/verifyCoreIntegrity.js +26 -24
- package/dist/halal-core/tamper/verifyCoreIntegrity.js.map +1 -1
- package/dist/halal-core/tamper/verifyLifecycleHooks.d.ts +3 -0
- package/dist/halal-core/tamper/verifyLifecycleHooks.js +13 -12
- package/dist/halal-core/tamper/verifyLifecycleHooks.js.map +1 -1
- package/dist/halal-core/tamper/verifyReportSignature.d.ts +6 -3
- package/dist/halal-core/tamper/verifyReportSignature.js +20 -14
- package/dist/halal-core/tamper/verifyReportSignature.js.map +1 -1
- package/dist/halal.d.ts +20 -1
- package/dist/halal.js +18 -2
- package/dist/i18n/index.d.ts +34 -31
- package/dist/i18n/index.js +219 -288
- package/dist/i18n/index.js.map +1 -1
- package/dist/i18n/shared.d.ts +18 -15
- package/dist/i18n/shared.js +204 -266
- package/dist/i18n/shared.js.map +1 -1
- package/dist/icons/index.d.ts +143 -139
- package/dist/icons/index.js +322 -273
- package/dist/icons/index.js.map +1 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +7 -2
- package/dist/kit/index.d.ts +9 -6
- package/dist/kit/index.js +45 -43
- package/dist/kit/index.js.map +1 -1
- package/dist/nitro-server/index.d.ts +7 -4
- package/dist/nitro-server/index.js +6 -2
- package/dist/nitro-server/index.js.map +1 -1
- package/dist/node.d.ts +6 -3
- package/dist/node.js +88 -116
- package/dist/node.js.map +1 -1
- package/dist/reactivity/computed.d.ts +6 -3
- package/dist/reactivity/computed.js +46 -53
- package/dist/reactivity/computed.js.map +1 -1
- package/dist/reactivity/effect.d.ts +8 -5
- package/dist/reactivity/effect.js +105 -146
- package/dist/reactivity/effect.js.map +1 -1
- package/dist/reactivity/index.d.ts +8 -8
- package/dist/reactivity/index.js +7 -8
- package/dist/reactivity/reactive.d.ts +3 -0
- package/dist/reactivity/reactive.js +93 -133
- package/dist/reactivity/reactive.js.map +1 -1
- package/dist/reactivity/readonly.d.ts +2 -1
- package/dist/reactivity/readonly.js +2 -2
- package/dist/reactivity/ref.d.ts +15 -15
- package/dist/reactivity/ref.js +73 -81
- package/dist/reactivity/ref.js.map +1 -1
- package/dist/reactivity/scheduler.d.ts +3 -1
- package/dist/reactivity/scheduler.js +67 -69
- package/dist/reactivity/scheduler.js.map +1 -1
- package/dist/reactivity/types.d.ts +17 -14
- package/dist/reactivity/types.js +0 -1
- package/dist/reactivity/utils.d.ts +7 -4
- package/dist/reactivity/utils.js +25 -24
- package/dist/reactivity/utils.js.map +1 -1
- package/dist/reactivity/watch.d.ts +4 -2
- package/dist/reactivity/watch.js +75 -103
- package/dist/reactivity/watch.js.map +1 -1
- package/dist/runtime/core.d.ts +31 -0
- package/dist/runtime/core.js +156 -0
- package/dist/runtime/core.js.map +1 -0
- package/dist/runtime/index.d.ts +487 -461
- package/dist/runtime/index.js +4129 -5254
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/reactivity.d.ts +7 -0
- package/dist/runtime/reactivity.js +6 -0
- package/dist/runtime/resume.d.ts +79 -0
- package/dist/runtime/resume.js +482 -0
- package/dist/runtime/resume.js.map +1 -0
- package/dist/runtime/router.d.ts +20 -0
- package/dist/runtime/router.js +60 -0
- package/dist/runtime/router.js.map +1 -0
- package/dist/runtime/streaming.d.ts +24 -0
- package/dist/runtime/streaming.js +200 -0
- package/dist/runtime/streaming.js.map +1 -0
- package/dist/security/media-fetch.d.ts +32 -0
- package/dist/security/media-fetch.js +301 -0
- package/dist/security/media-fetch.js.map +1 -0
- package/dist/security/path-boundary.d.ts +7 -0
- package/dist/security/path-boundary.js +70 -0
- package/dist/security/path-boundary.js.map +1 -0
- package/dist/ui/index.d.ts +1580 -1576
- package/dist/ui/index.js +975 -674
- package/dist/ui/index.js.map +1 -1
- package/dist/vite-builder/index.d.ts +6 -3
- package/dist/vite-builder/index.js +6 -2
- package/dist/vite-builder/index.js.map +1 -1
- package/package.json +46 -86
- package/dist/compiler/implementation.js.map +0 -1
- package/dist/core/index.js.map +0 -1
- package/dist/deploy/types.js.map +0 -1
- package/dist/globals.js.map +0 -1
- package/dist/halal-core/index.js.map +0 -1
- package/dist/halal-core/runtime/index.js.map +0 -1
- package/dist/halal-core/runtime/types.js.map +0 -1
- package/dist/halal-core/status.js.map +0 -1
- package/dist/halal.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/reactivity/index.js.map +0 -1
- package/dist/reactivity/readonly.js.map +0 -1
- package/dist/reactivity/types.js.map +0 -1
package/dist/runtime/index.d.ts
CHANGED
|
@@ -1,548 +1,550 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { ComputedRef, MaybeRef, MaybeRefOrGetter, ReactiveEffectOptions, ReactiveEffectRunner, Ref, WatchCallback, WatchOptions, WatchSource, WatchStopHandle } from "../reactivity/types.js";
|
|
2
|
+
import { isRef, ref, toRef, toRefs, unref } from "../reactivity/ref.js";
|
|
3
|
+
import { isReactive, isReadonly, reactive, readonly } from "../reactivity/reactive.js";
|
|
4
|
+
import { computed } from "../reactivity/computed.js";
|
|
5
|
+
import { watch, watchEffect } from "../reactivity/watch.js";
|
|
6
|
+
import { nextTick } from "../reactivity/scheduler.js";
|
|
7
|
+
//#region src/runtime/index.d.ts
|
|
3
8
|
export type JsonValue = null | boolean | number | string | JsonValue[] | {
|
|
4
|
-
|
|
9
|
+
[key: string]: JsonValue;
|
|
5
10
|
};
|
|
6
|
-
export { ref, reactive, computed, watch, watchEffect, readonly, toRef, toRefs, unref, isRef, isReactive, isReadonly, nextTick };
|
|
7
|
-
export type { Ref, ComputedRef, MaybeRef, MaybeRefOrGetter, WatchSource, WatchOptions, WatchCallback, WatchStopHandle, ReactiveEffectOptions, ReactiveEffectRunner } from "../reactivity/index.js";
|
|
8
11
|
export interface AsyncDataError {
|
|
9
|
-
|
|
10
|
-
|
|
12
|
+
name: string;
|
|
13
|
+
message: string;
|
|
11
14
|
}
|
|
12
15
|
export interface ResuxError extends Error {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
+
statusCode?: number;
|
|
17
|
+
fatal?: boolean;
|
|
18
|
+
data?: JsonValue;
|
|
16
19
|
}
|
|
17
20
|
export interface AsyncDataResource<T = unknown> {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
data: Ref<T | undefined>;
|
|
22
|
+
value: Ref<T | undefined>;
|
|
23
|
+
pending: Ref<boolean>;
|
|
24
|
+
error: Ref<AsyncDataError | null>;
|
|
25
|
+
then<TResult1 = AwaitedAsyncDataResource<T>, TResult2 = never>(onfulfilled?: ((value: AwaitedAsyncDataResource<T>) => TResult1 | PromiseLike<TResult1>) | null, onrejected?: ((reason: unknown) => TResult2 | PromiseLike<TResult2>) | null): PromiseLike<TResult1 | TResult2>;
|
|
23
26
|
}
|
|
24
27
|
export interface AwaitedAsyncDataResource<T = unknown> {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
data: Ref<T | undefined>;
|
|
29
|
+
value: Ref<T | undefined>;
|
|
30
|
+
pending: Ref<boolean>;
|
|
31
|
+
error: Ref<AsyncDataError | null>;
|
|
29
32
|
}
|
|
30
33
|
export interface AsyncDataHandlerContext {
|
|
31
|
-
|
|
34
|
+
signal?: AbortSignal;
|
|
32
35
|
}
|
|
33
36
|
export interface RouteContext {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
path: string;
|
|
38
|
+
params: Record<string, string>;
|
|
39
|
+
query: Record<string, string | string[]>;
|
|
40
|
+
origin?: string;
|
|
41
|
+
userAgent?: string;
|
|
39
42
|
}
|
|
40
43
|
export interface ResuxRouter {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
push(to: string): Promise<void> | void;
|
|
45
|
+
replace(to: string): Promise<void> | void;
|
|
46
|
+
back(): void;
|
|
47
|
+
forward(): void;
|
|
48
|
+
go(delta: number): void;
|
|
46
49
|
}
|
|
47
50
|
export interface PageMeta {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
51
|
+
layout?: string | false;
|
|
52
|
+
middleware?: string | string[];
|
|
53
|
+
title?: string | Record<string, string>;
|
|
54
|
+
meta?: Array<Record<string, string>>;
|
|
52
55
|
}
|
|
53
56
|
export interface HeadEntry {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
title?: string;
|
|
58
|
+
meta?: Array<Record<string, string>>;
|
|
59
|
+
link?: Array<Record<string, string>>;
|
|
60
|
+
style?: ComponentStyle[];
|
|
61
|
+
htmlAttrs?: Record<string, string>;
|
|
59
62
|
}
|
|
60
63
|
export interface ComponentStyle {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
+
id: string;
|
|
65
|
+
css: string;
|
|
66
|
+
scoped?: boolean;
|
|
64
67
|
}
|
|
65
68
|
export type SeoMetaValue = string | number | boolean | null | undefined;
|
|
66
69
|
export interface SeoMetaInput {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
70
|
+
title?: SeoMetaValue;
|
|
71
|
+
description?: SeoMetaValue | SeoMetaValue[];
|
|
72
|
+
keywords?: SeoMetaValue | SeoMetaValue[];
|
|
73
|
+
robots?: SeoMetaValue;
|
|
74
|
+
author?: SeoMetaValue;
|
|
75
|
+
themeColor?: SeoMetaValue;
|
|
76
|
+
colorScheme?: SeoMetaValue;
|
|
77
|
+
applicationName?: SeoMetaValue;
|
|
78
|
+
referrer?: SeoMetaValue;
|
|
79
|
+
generator?: SeoMetaValue;
|
|
80
|
+
ogTitle?: SeoMetaValue;
|
|
81
|
+
ogDescription?: SeoMetaValue;
|
|
82
|
+
ogImage?: SeoMetaValue | SeoMetaValue[];
|
|
83
|
+
ogImageSecureUrl?: SeoMetaValue;
|
|
84
|
+
ogImageAlt?: SeoMetaValue;
|
|
85
|
+
ogImageWidth?: SeoMetaValue;
|
|
86
|
+
ogImageHeight?: SeoMetaValue;
|
|
87
|
+
ogUrl?: SeoMetaValue;
|
|
88
|
+
ogType?: SeoMetaValue;
|
|
89
|
+
ogSiteName?: SeoMetaValue;
|
|
90
|
+
ogLocale?: SeoMetaValue;
|
|
91
|
+
fbAppId?: SeoMetaValue;
|
|
92
|
+
twitterCard?: SeoMetaValue;
|
|
93
|
+
twitterTitle?: SeoMetaValue;
|
|
94
|
+
twitterDescription?: SeoMetaValue;
|
|
95
|
+
twitterImage?: SeoMetaValue | SeoMetaValue[];
|
|
96
|
+
twitterImageAlt?: SeoMetaValue;
|
|
97
|
+
twitterSite?: SeoMetaValue;
|
|
98
|
+
twitterCreator?: SeoMetaValue;
|
|
99
|
+
twitterUrl?: SeoMetaValue;
|
|
100
|
+
[key: string]: SeoMetaValue | SeoMetaValue[];
|
|
98
101
|
}
|
|
99
102
|
export interface RuntimeConfig {
|
|
100
|
-
|
|
101
|
-
|
|
103
|
+
public: Record<string, JsonValue>;
|
|
104
|
+
[key: string]: unknown;
|
|
102
105
|
}
|
|
103
106
|
export type ResuxImageFit = "cover" | "contain" | "fill" | "inside" | "outside";
|
|
104
107
|
export type ResuxImageCacheInput = boolean | string | number | {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
+
maxAge?: number | string;
|
|
109
|
+
expiresIn?: number | string;
|
|
110
|
+
ttl?: number | string;
|
|
108
111
|
};
|
|
109
112
|
export interface ResuxImageModifiers {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
113
|
+
width?: number;
|
|
114
|
+
height?: number;
|
|
115
|
+
quality?: number | false;
|
|
116
|
+
format?: string | false;
|
|
117
|
+
fit?: ResuxImageFit;
|
|
118
|
+
[key: string]: string | number | boolean | undefined;
|
|
116
119
|
}
|
|
117
120
|
export interface ResuxImageProviderConfig {
|
|
118
|
-
|
|
119
|
-
|
|
121
|
+
baseURL?: string;
|
|
122
|
+
modifiers?: ResuxImageModifiers;
|
|
120
123
|
}
|
|
121
124
|
export interface ResuxImageConfig {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
125
|
+
provider?: string;
|
|
126
|
+
quality?: number;
|
|
127
|
+
format?: string;
|
|
128
|
+
cache?: ResuxImageCacheInput;
|
|
129
|
+
densities?: number[];
|
|
130
|
+
providers?: Record<string, ResuxImageProviderConfig>;
|
|
128
131
|
}
|
|
129
132
|
export interface UseResuxImageOptions {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
133
|
+
provider?: string;
|
|
134
|
+
modifiers?: ResuxImageModifiers;
|
|
135
|
+
width?: number;
|
|
136
|
+
height?: number;
|
|
137
|
+
quality?: number;
|
|
138
|
+
fit?: ResuxImageFit;
|
|
139
|
+
format?: string;
|
|
140
|
+
cache?: ResuxImageCacheInput;
|
|
138
141
|
}
|
|
139
142
|
export type ResuxImageBuilder = (src: string, options?: UseResuxImageOptions) => string;
|
|
140
|
-
export interface ResuxAppInjections {
|
|
141
|
-
}
|
|
143
|
+
export interface ResuxAppInjections {}
|
|
142
144
|
export type ResuxSupportMode = "all" | "server" | "client";
|
|
143
145
|
export interface ClientPluginManifestRecord {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
146
|
+
id: string;
|
|
147
|
+
file: string;
|
|
148
|
+
mode: ResuxSupportMode;
|
|
149
|
+
src: string;
|
|
148
150
|
}
|
|
149
151
|
export interface ClientRouteMiddlewareManifestRecord {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
152
|
+
id: string;
|
|
153
|
+
name: string;
|
|
154
|
+
file: string;
|
|
155
|
+
global: boolean;
|
|
156
|
+
mode: ResuxSupportMode;
|
|
157
|
+
src: string;
|
|
156
158
|
}
|
|
157
159
|
export type ResuxAppProvides = ResuxAppInjections & Record<string, unknown>;
|
|
158
160
|
export interface ResuxAppLike {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
161
|
+
route: RouteContext;
|
|
162
|
+
payload: ResuxPayload;
|
|
163
|
+
$config: RuntimeConfig;
|
|
164
|
+
provides: ResuxAppProvides;
|
|
165
|
+
provide<Key extends keyof ResuxAppInjections & string>(key: Key, value: ResuxAppInjections[Key]): void;
|
|
166
|
+
provide<Key extends string, Value>(key: Key, value: Value): void;
|
|
167
|
+
vueApp?: any;
|
|
166
168
|
}
|
|
167
169
|
export type ResuxPlugin = (resuxApp: ResuxAppLike) => unknown | Promise<unknown>;
|
|
168
170
|
export interface ResuxModuleContext {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
171
|
+
rootDir: string;
|
|
172
|
+
buildDir: string;
|
|
173
|
+
options: Record<string, unknown>;
|
|
174
|
+
addCss(href: string): void;
|
|
175
|
+
addHead(head: Record<string, unknown>): void;
|
|
176
|
+
addRouteRule(path: string, rule: Record<string, unknown>): void;
|
|
177
|
+
extendRuntimeConfig(config: Record<string, unknown>): void;
|
|
178
|
+
hook(name: string, handler: (payload: unknown) => void | Promise<void>): () => void;
|
|
179
|
+
addComponent(component: string | {
|
|
180
|
+
file: string;
|
|
181
|
+
name?: string;
|
|
182
|
+
global?: boolean;
|
|
183
|
+
mode?: ResuxSupportMode;
|
|
184
|
+
lazy?: boolean;
|
|
185
|
+
}): void;
|
|
186
|
+
addComponentsDir(dir: string | {
|
|
187
|
+
path: string;
|
|
188
|
+
global?: boolean;
|
|
189
|
+
mode?: ResuxSupportMode;
|
|
190
|
+
pathPrefix?: boolean;
|
|
191
|
+
}): void;
|
|
192
|
+
addImports(imports: {
|
|
193
|
+
from: string;
|
|
194
|
+
name: string;
|
|
195
|
+
as?: string;
|
|
196
|
+
} | Array<{
|
|
197
|
+
from: string;
|
|
198
|
+
name: string;
|
|
199
|
+
as?: string;
|
|
200
|
+
}>): void;
|
|
201
|
+
addImportsDir(dir: string): void;
|
|
202
|
+
addPlugin(plugin: string | {
|
|
203
|
+
src: string;
|
|
204
|
+
mode?: ResuxSupportMode;
|
|
205
|
+
}): void;
|
|
206
|
+
addRouteMiddleware(middleware: {
|
|
207
|
+
name: string;
|
|
208
|
+
src: string;
|
|
209
|
+
global?: boolean;
|
|
210
|
+
mode?: ResuxSupportMode;
|
|
211
|
+
}): void;
|
|
212
|
+
addServerHandler(handler: {
|
|
213
|
+
route: string;
|
|
214
|
+
handler: string;
|
|
215
|
+
middleware?: boolean;
|
|
216
|
+
method?: string;
|
|
217
|
+
}): void;
|
|
218
|
+
addServerPlugin(plugin: string): void;
|
|
219
|
+
addTemplate(template: {
|
|
220
|
+
filename: string;
|
|
221
|
+
getContents: () => string | Promise<string>;
|
|
222
|
+
write?: boolean;
|
|
223
|
+
}): void;
|
|
224
|
+
addTypeTemplate(template: {
|
|
225
|
+
filename: string;
|
|
226
|
+
getContents: () => string | Promise<string>;
|
|
227
|
+
write?: boolean;
|
|
228
|
+
}): void;
|
|
229
|
+
extendPages(extender: (pages: Array<Record<string, unknown>>) => void | Promise<void>): void;
|
|
230
|
+
extendViteConfig(extender: (config: Record<string, unknown>) => void | Promise<void>): void;
|
|
231
|
+
extendNitroConfig(extender: (config: Record<string, unknown>) => void | Promise<void>): void;
|
|
232
|
+
addVitePlugin(plugin: unknown): void;
|
|
233
|
+
addPrerenderRoutes(route: string | string[]): void;
|
|
232
234
|
}
|
|
233
235
|
export type ResuxModule<TOptions = Record<string, unknown>> = ((options: TOptions, context: ResuxModuleContext) => unknown | Promise<unknown>) | {
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
236
|
+
meta?: {
|
|
237
|
+
name?: string;
|
|
238
|
+
configKey?: string;
|
|
239
|
+
};
|
|
240
|
+
defaults?: TOptions;
|
|
241
|
+
setup: (options: TOptions, context: ResuxModuleContext) => unknown | Promise<unknown>;
|
|
240
242
|
};
|
|
241
243
|
export type ResuxDeployTarget = "auto" | "node" | "vercel" | "netlify" | "cloudflare" | "static";
|
|
242
244
|
export interface ResuxDeployOptions {
|
|
243
|
-
|
|
244
|
-
|
|
245
|
+
target?: ResuxDeployTarget;
|
|
246
|
+
nitroPreset?: string;
|
|
245
247
|
}
|
|
246
248
|
export interface ResuxConfigInput extends Record<string, unknown> {
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
249
|
+
builder?: string;
|
|
250
|
+
serverBuilder?: string;
|
|
251
|
+
buildDir?: string;
|
|
252
|
+
compatibilityDate?: string;
|
|
253
|
+
deploy?: ResuxDeployOptions;
|
|
254
|
+
i18n?: Record<string, unknown>;
|
|
255
|
+
packages?: ResuxPackagesConfig;
|
|
256
|
+
video?: Record<string, unknown>;
|
|
255
257
|
}
|
|
256
258
|
export interface ResuxPackageCssMap {
|
|
257
|
-
|
|
259
|
+
[packageName: string]: string[];
|
|
258
260
|
}
|
|
259
261
|
export type ResuxPackageMode = "ssr" | "clientOnly" | "serverOnly" | "progressive";
|
|
260
262
|
export interface ResuxPackageModeMap {
|
|
261
|
-
|
|
263
|
+
[packageName: string]: ResuxPackageMode;
|
|
262
264
|
}
|
|
263
265
|
export interface ResuxPackagesConfig {
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
266
|
+
lazy?: boolean | string[];
|
|
267
|
+
clientOnly?: string[];
|
|
268
|
+
serverOnly?: string[];
|
|
269
|
+
mode?: ResuxPackageModeMap;
|
|
270
|
+
external?: string[];
|
|
271
|
+
noExternal?: string[];
|
|
272
|
+
transpile?: string[];
|
|
273
|
+
optimizeDeps?: string[];
|
|
274
|
+
css?: string[] | ResuxPackageCssMap;
|
|
275
|
+
aliases?: Record<string, string>;
|
|
276
|
+
guards?: boolean;
|
|
277
|
+
diagnostics?: boolean;
|
|
276
278
|
}
|
|
277
279
|
export interface ResuxClientPackageImportRegistry {
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
280
|
+
importers?: string[];
|
|
281
|
+
css?: Record<string, string[]>;
|
|
282
|
+
declared?: string[];
|
|
281
283
|
}
|
|
282
284
|
export interface ClientRuntimeSourceOptions {
|
|
283
|
-
|
|
285
|
+
packageRegistry?: ResuxClientPackageImportRegistry;
|
|
284
286
|
}
|
|
285
287
|
export interface ResuxLazyPackageOptions {
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
288
|
+
clientOnly?: boolean;
|
|
289
|
+
mode?: ResuxPackageMode;
|
|
290
|
+
css?: string[];
|
|
291
|
+
exportName?: string;
|
|
292
|
+
preferDefault?: boolean;
|
|
291
293
|
}
|
|
292
294
|
export type ResuxLazyPackageLoader<T = unknown> = () => Promise<T>;
|
|
293
295
|
export type ClientEnhancementTrigger = "visible" | "interaction" | "idle" | "immediate" | "manual" | "page-load";
|
|
294
296
|
export interface ClientEnhancementContext {
|
|
297
|
+
trigger: ClientEnhancementTrigger;
|
|
298
|
+
options?: Record<string, unknown>;
|
|
299
|
+
__resux?: {
|
|
295
300
|
trigger: ClientEnhancementTrigger;
|
|
296
301
|
options?: Record<string, unknown>;
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
options?: Record<string, unknown>;
|
|
300
|
-
};
|
|
301
|
-
[key: string]: unknown;
|
|
302
|
+
};
|
|
303
|
+
[key: string]: unknown;
|
|
302
304
|
}
|
|
303
305
|
export type ClientEnhancementSetup = (target: Element, context: ClientEnhancementContext) => void | (() => void | Promise<void>) | Promise<void | (() => void | Promise<void>)>;
|
|
304
306
|
export interface UseClientEnhancementOptions {
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
307
|
+
target?: Element | string;
|
|
308
|
+
trigger?: ClientEnhancementTrigger;
|
|
309
|
+
options?: Record<string, unknown>;
|
|
308
310
|
}
|
|
309
311
|
export interface PackageAdapterContext {
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
312
|
+
packageName: string;
|
|
313
|
+
mode: ResuxPackageMode;
|
|
314
|
+
modules: unknown[];
|
|
313
315
|
}
|
|
314
316
|
export interface PackageAdapterDefinition<TOptions extends Record<string, unknown> = Record<string, unknown>> {
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
317
|
+
name: string;
|
|
318
|
+
packageName?: string;
|
|
319
|
+
mode?: ResuxPackageMode;
|
|
320
|
+
imports?: string[];
|
|
321
|
+
css?: string[];
|
|
322
|
+
defaults?: TOptions;
|
|
323
|
+
validateOptions?: (options: TOptions) => void;
|
|
324
|
+
enhance: (target: Element, options: TOptions, context: PackageAdapterContext) => void | (() => void | Promise<void>) | Promise<void | (() => void | Promise<void>)>;
|
|
323
325
|
}
|
|
324
326
|
export type RouteMiddlewareResult = void | string | false | {
|
|
325
|
-
|
|
326
|
-
to: string;
|
|
327
|
-
statusCode?: number;
|
|
328
|
-
};
|
|
329
|
-
} | {
|
|
330
|
-
type: "redirect";
|
|
327
|
+
redirect: string | {
|
|
331
328
|
to: string;
|
|
332
329
|
statusCode?: number;
|
|
330
|
+
};
|
|
333
331
|
} | {
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
332
|
+
type: "redirect";
|
|
333
|
+
to: string;
|
|
334
|
+
statusCode?: number;
|
|
335
|
+
} | {
|
|
336
|
+
type: "abort";
|
|
337
|
+
message?: string;
|
|
338
|
+
statusCode?: number;
|
|
337
339
|
};
|
|
338
340
|
export type ResuxRouteMiddleware = (to: RouteContext, from: RouteContext) => RouteMiddlewareResult | Promise<RouteMiddlewareResult>;
|
|
339
341
|
export interface EventHandlerEvent {
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
342
|
+
path: string;
|
|
343
|
+
method: string;
|
|
344
|
+
query: Record<string, string | string[]>;
|
|
345
|
+
params: Record<string, string>;
|
|
346
|
+
node: {
|
|
347
|
+
req: unknown;
|
|
348
|
+
res: unknown;
|
|
349
|
+
};
|
|
348
350
|
}
|
|
349
351
|
export type EventHandler = (event: EventHandlerEvent) => unknown | Promise<unknown>;
|
|
350
352
|
export type ServerMiddlewareResult = unknown | Promise<unknown>;
|
|
351
353
|
export type ServerMiddleware = (event: EventHandlerEvent) => ServerMiddlewareResult;
|
|
352
354
|
export type TemplateNode = TextTemplateNode | InterpolationTemplateNode | ElementTemplateNode;
|
|
353
355
|
export interface TextTemplateNode {
|
|
354
|
-
|
|
355
|
-
|
|
356
|
+
type: "text";
|
|
357
|
+
value: string;
|
|
356
358
|
}
|
|
357
359
|
export interface InterpolationTemplateNode {
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
360
|
+
type: "interpolation";
|
|
361
|
+
expression: string;
|
|
362
|
+
bindingId: string;
|
|
361
363
|
}
|
|
362
364
|
export interface TemplateAttribute {
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
365
|
+
kind: "static" | "dynamic";
|
|
366
|
+
name: string;
|
|
367
|
+
value: string;
|
|
368
|
+
bindingId?: string;
|
|
367
369
|
}
|
|
368
370
|
export interface TemplateEvent {
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
371
|
+
name: string;
|
|
372
|
+
handler: string;
|
|
373
|
+
modifiers?: string[];
|
|
374
|
+
/** Template-local bindings captured by an inline resumable handler. */
|
|
375
|
+
locals?: string[];
|
|
374
376
|
}
|
|
375
377
|
export interface IfDirective {
|
|
376
|
-
|
|
377
|
-
|
|
378
|
+
expression: string;
|
|
379
|
+
blockId: string;
|
|
378
380
|
}
|
|
379
381
|
export interface ForDirective {
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
382
|
+
source: string;
|
|
383
|
+
value: string;
|
|
384
|
+
index?: string;
|
|
385
|
+
blockId: string;
|
|
384
386
|
}
|
|
385
387
|
export interface HtmlDirective {
|
|
386
|
-
|
|
387
|
-
|
|
388
|
+
expression: string;
|
|
389
|
+
bindingId: string;
|
|
388
390
|
}
|
|
389
391
|
export interface ElementTemplateNode {
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
392
|
+
type: "element";
|
|
393
|
+
tag: string;
|
|
394
|
+
attrs: TemplateAttribute[];
|
|
395
|
+
events: TemplateEvent[];
|
|
396
|
+
children: TemplateNode[];
|
|
397
|
+
if?: IfDirective;
|
|
398
|
+
for?: ForDirective;
|
|
399
|
+
html?: HtmlDirective;
|
|
398
400
|
}
|
|
399
401
|
export interface SetupContext {
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
402
|
+
props: Record<string, unknown>;
|
|
403
|
+
ref: typeof ref;
|
|
404
|
+
reactive: typeof reactive;
|
|
405
|
+
computed: typeof computed;
|
|
406
|
+
watch<T = unknown>(source: WatchSource<T> | WatchSource<T>[], callback: WatchCallback<T>, options?: WatchOptions): WatchStopHandle;
|
|
407
|
+
watchEffect(effect: (onCleanup: (cleanup: () => void) => void) => void, options?: WatchOptions): WatchStopHandle;
|
|
408
|
+
readonly: typeof readonly;
|
|
409
|
+
toRef: typeof toRef;
|
|
410
|
+
toRefs: typeof toRefs;
|
|
411
|
+
unref: typeof unref;
|
|
412
|
+
isRef: typeof isRef;
|
|
413
|
+
isReactive: typeof isReactive;
|
|
414
|
+
isReadonly: typeof isReadonly;
|
|
415
|
+
nextTick: typeof nextTick;
|
|
416
|
+
useState<T>(key: string, factory?: () => T): Ref<T>;
|
|
417
|
+
useGlobalState<T>(key: string, factory?: () => T): Ref<T>;
|
|
418
|
+
useAsyncData<T>(key: string, handler?: (context: AsyncDataHandlerContext) => T | Promise<T>): AsyncDataResource<T>;
|
|
419
|
+
defineProps<T extends Record<string, unknown> = Record<string, unknown>>(): T;
|
|
420
|
+
defineEmits<T = (...args: any[]) => void>(emits?: unknown): (...args: any[]) => void;
|
|
421
|
+
emit(...args: any[]): void;
|
|
422
|
+
defineExpose(exposed?: Record<string, any>): void;
|
|
423
|
+
defineSlots<T = Record<string, any>>(): T;
|
|
424
|
+
defineOptions(options?: Record<string, any>): void;
|
|
425
|
+
defineModel<T>(name?: string, options?: unknown): Ref<T>;
|
|
426
|
+
useRoute(): RouteContext;
|
|
427
|
+
useRouter(): ResuxRouter;
|
|
428
|
+
useHead(input: HeadEntry): void;
|
|
429
|
+
useSeoMeta(input: SeoMetaInput): void;
|
|
430
|
+
useRuntimeConfig(): RuntimeConfig;
|
|
431
|
+
useResuxApp(): ResuxAppLike;
|
|
432
|
+
apiURL(path: string): string;
|
|
433
|
+
useResuxImage(): ResuxImageBuilder;
|
|
434
|
+
useFetch<T>(url: string, init?: RequestInit): AsyncDataResource<T>;
|
|
435
|
+
$fetch<T>(url: string, init?: RequestInit): Promise<T>;
|
|
436
|
+
useError(): Ref<ResuxError | null>;
|
|
437
|
+
clearError(): void;
|
|
438
|
+
showError(input: string | Partial<ResuxError>): never;
|
|
439
|
+
createError(input: string | Partial<ResuxError>): ResuxError;
|
|
440
|
+
useLazyPackage<T = unknown>(name: string, options?: ResuxLazyPackageOptions): Promise<T>;
|
|
441
|
+
useClientPackage<T = unknown>(name: string, options?: Omit<ResuxLazyPackageOptions, "clientOnly" | "mode">): Promise<T>;
|
|
442
|
+
usePackageReady(name: string): boolean;
|
|
443
|
+
defineLazyPackage<T = unknown>(name: string, options?: ResuxLazyPackageOptions): ResuxLazyPackageLoader<T>;
|
|
444
|
+
defineClientOnlyPackage<T = unknown>(name: string, options?: Omit<ResuxLazyPackageOptions, "clientOnly" | "mode">): ResuxLazyPackageLoader<T>;
|
|
445
|
+
definePackageAdapter<TOptions extends Record<string, unknown> = Record<string, unknown>>(definition: PackageAdapterDefinition<TOptions>): {
|
|
446
|
+
name: string;
|
|
447
|
+
setup: ClientEnhancementSetup;
|
|
448
|
+
};
|
|
449
|
+
defineClientEnhancement(name: string, setup: ClientEnhancementSetup): {
|
|
450
|
+
name: string;
|
|
451
|
+
setup: ClientEnhancementSetup;
|
|
452
|
+
};
|
|
453
|
+
useClientEnhancement(name: string, options?: UseClientEnhancementOptions): Promise<{
|
|
454
|
+
ready: boolean;
|
|
455
|
+
activate: () => Promise<void>;
|
|
456
|
+
dispose: () => Promise<void>;
|
|
457
|
+
}>;
|
|
458
|
+
onMounted(callback: () => unknown | Promise<unknown>): void;
|
|
459
|
+
definePageMeta(_meta: PageMeta): void;
|
|
460
|
+
useI18n(): any;
|
|
461
|
+
useLocalePath(): any;
|
|
462
|
+
useSwitchLocalePath(): any;
|
|
463
|
+
useDevice(): DeviceInfo;
|
|
464
|
+
$device: DeviceInfo;
|
|
465
|
+
$t(key: string, params?: Record<string, unknown>): string;
|
|
466
|
+
$tm(key: string): unknown;
|
|
465
467
|
}
|
|
466
468
|
export interface ComponentDefinition {
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
469
|
+
id: string;
|
|
470
|
+
name: string;
|
|
471
|
+
file: string;
|
|
472
|
+
script: (ctx: SetupContext) => Record<string, unknown> | Promise<Record<string, unknown>>;
|
|
473
|
+
template: TemplateNode[];
|
|
474
|
+
handlers: string[];
|
|
475
|
+
styles?: ComponentStyle[];
|
|
476
|
+
styleScopeId?: string;
|
|
477
|
+
meta?: PageMeta;
|
|
476
478
|
}
|
|
477
479
|
export interface SerializedScope {
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
480
|
+
id: string;
|
|
481
|
+
moduleId: string;
|
|
482
|
+
props?: Record<string, JsonValue>;
|
|
483
|
+
state: Record<string, JsonValue>;
|
|
484
|
+
globalStateKeys?: string[];
|
|
485
|
+
asyncData: Record<string, SerializedAsyncData>;
|
|
484
486
|
}
|
|
485
487
|
export interface SerializedAsyncData {
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
488
|
+
value: JsonValue;
|
|
489
|
+
pending: boolean;
|
|
490
|
+
error: AsyncDataError | null;
|
|
489
491
|
}
|
|
490
492
|
export interface ResuxPayload {
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
493
|
+
route: RouteContext;
|
|
494
|
+
scopes: Record<string, SerializedScope>;
|
|
495
|
+
globalState?: Record<string, JsonValue>;
|
|
496
|
+
modules: Record<string, string>;
|
|
497
|
+
vueIslands?: Record<string, string>;
|
|
498
|
+
config?: RuntimeConfig;
|
|
499
|
+
plugins?: ClientPluginManifestRecord[];
|
|
500
|
+
middleware?: ClientRouteMiddlewareManifestRecord[];
|
|
501
|
+
pageMeta?: PageMeta;
|
|
500
502
|
}
|
|
501
503
|
export interface RouteRecord {
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
504
|
+
id: string;
|
|
505
|
+
path: string;
|
|
506
|
+
file: string;
|
|
507
|
+
params: string[];
|
|
508
|
+
component: ComponentDefinition;
|
|
509
|
+
match(pathname: string): Record<string, string> | null;
|
|
508
510
|
}
|
|
509
511
|
export interface RenderAppOptions {
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
512
|
+
app?: ComponentDefinition;
|
|
513
|
+
page: ComponentDefinition;
|
|
514
|
+
pageProps?: Record<string, unknown>;
|
|
515
|
+
pageMeta?: PageMeta;
|
|
516
|
+
route: RouteContext;
|
|
517
|
+
components?: Record<string, ComponentDefinition>;
|
|
518
|
+
layouts?: Record<string, ComponentDefinition>;
|
|
519
|
+
modules?: Record<string, string>;
|
|
520
|
+
vueIslands?: Record<string, string>;
|
|
521
|
+
runtimeConfig?: RuntimeConfig;
|
|
522
|
+
appHead?: HeadEntry;
|
|
523
|
+
plugins?: ResuxPlugin[];
|
|
522
524
|
}
|
|
523
525
|
export interface RenderResult {
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
526
|
+
html: string;
|
|
527
|
+
payload: ResuxPayload;
|
|
528
|
+
head: HeadEntry;
|
|
527
529
|
}
|
|
528
530
|
export interface RenderDocumentOptions {
|
|
529
|
-
|
|
530
|
-
|
|
531
|
+
devReload?: boolean;
|
|
532
|
+
isStatic?: boolean;
|
|
531
533
|
}
|
|
532
534
|
interface RenderTemplateContext {
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
535
|
+
scope: Record<string, unknown>;
|
|
536
|
+
scopeId: string;
|
|
537
|
+
moduleId: string;
|
|
538
|
+
styleScopeId?: string;
|
|
539
|
+
route: RouteContext;
|
|
540
|
+
runtimeConfig: RuntimeConfig;
|
|
541
|
+
components: Record<string, ComponentDefinition>;
|
|
542
|
+
layouts: Record<string, ComponentDefinition>;
|
|
543
|
+
pageMeta: PageMeta;
|
|
544
|
+
addHeadEntry?: (entry: HeadEntry) => void;
|
|
545
|
+
renderPage?: () => Promise<string>;
|
|
546
|
+
renderSlot?: () => Promise<string>;
|
|
547
|
+
renderLayout?: (name: string | false | undefined, slot: () => Promise<string>) => Promise<string>;
|
|
546
548
|
}
|
|
547
549
|
type ComponentProps = Record<string, unknown>;
|
|
548
550
|
export declare function defineComponent(definition: ComponentDefinition): ComponentDefinition;
|
|
@@ -552,12 +554,12 @@ export declare function defineResuxPlugin(plugin: ResuxPlugin): ResuxPlugin;
|
|
|
552
554
|
export declare function defineResuxRouteMiddleware(middleware: ResuxRouteMiddleware): ResuxRouteMiddleware;
|
|
553
555
|
export declare function useResuxApp(): ResuxAppLike;
|
|
554
556
|
export interface DeviceInfo {
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
557
|
+
isMobile: boolean;
|
|
558
|
+
isTablet: boolean;
|
|
559
|
+
isDesktop: boolean;
|
|
560
|
+
isIos: boolean;
|
|
561
|
+
isAndroid: boolean;
|
|
562
|
+
[key: string]: boolean;
|
|
561
563
|
}
|
|
562
564
|
export declare function parseUserAgent(ua?: string): DeviceInfo;
|
|
563
565
|
export declare function useDevice(): DeviceInfo;
|
|
@@ -566,10 +568,10 @@ export declare function useRouter(): ResuxRouter;
|
|
|
566
568
|
export declare function useRuntimeConfig(): RuntimeConfig;
|
|
567
569
|
export declare function useResuxImage(): ResuxImageBuilder;
|
|
568
570
|
export declare function navigateTo(to: string, options?: {
|
|
569
|
-
|
|
571
|
+
statusCode?: number;
|
|
570
572
|
}): RouteMiddlewareResult;
|
|
571
573
|
export declare function abortNavigation(message?: string, options?: {
|
|
572
|
-
|
|
574
|
+
statusCode?: number;
|
|
573
575
|
}): RouteMiddlewareResult;
|
|
574
576
|
export declare function createError(input: string | Partial<ResuxError>): ResuxError;
|
|
575
577
|
export declare function useError(): Ref<ResuxError | null>;
|
|
@@ -581,17 +583,17 @@ export declare function usePackageReady(name: string): boolean;
|
|
|
581
583
|
export declare function defineLazyPackage<T = unknown>(name: string, options?: ResuxLazyPackageOptions): ResuxLazyPackageLoader<T>;
|
|
582
584
|
export declare function defineClientOnlyPackage<T = unknown>(name: string, options?: Omit<ResuxLazyPackageOptions, "clientOnly" | "mode">): ResuxLazyPackageLoader<T>;
|
|
583
585
|
export declare function definePackageAdapter<TOptions extends Record<string, unknown> = Record<string, unknown>>(definition: PackageAdapterDefinition<TOptions>): {
|
|
584
|
-
|
|
585
|
-
|
|
586
|
+
name: string;
|
|
587
|
+
setup: ClientEnhancementSetup;
|
|
586
588
|
};
|
|
587
589
|
export declare function defineClientEnhancement(name: string, setup: ClientEnhancementSetup): {
|
|
588
|
-
|
|
589
|
-
|
|
590
|
+
name: string;
|
|
591
|
+
setup: ClientEnhancementSetup;
|
|
590
592
|
};
|
|
591
593
|
export declare function useClientEnhancement(name: string, options?: UseClientEnhancementOptions): Promise<{
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
594
|
+
ready: boolean;
|
|
595
|
+
activate: () => Promise<void>;
|
|
596
|
+
dispose: () => Promise<void>;
|
|
595
597
|
}>;
|
|
596
598
|
export declare function disposeClientEnhancements(): Promise<void>;
|
|
597
599
|
export declare function hasClientEnhancement(name: string): boolean;
|
|
@@ -604,48 +606,72 @@ export declare function readBody<T = unknown>(event: EventHandlerEvent): Promise
|
|
|
604
606
|
export declare function getQuery(event: EventHandlerEvent): Record<string, string | string[]>;
|
|
605
607
|
export declare function setHeader(event: EventHandlerEvent, name: string, value: number | string | string[]): void;
|
|
606
608
|
export declare function renderApp(options: RenderAppOptions): Promise<RenderResult>;
|
|
609
|
+
export type ResuxClientBootMode = "none" | "interaction" | "eager";
|
|
610
|
+
export interface ResuxClientBootPlan {
|
|
611
|
+
mode: ResuxClientBootMode;
|
|
612
|
+
eventNames: string[];
|
|
613
|
+
deferEnhancements: boolean;
|
|
614
|
+
deferVueIslands: boolean;
|
|
615
|
+
}
|
|
616
|
+
/**
|
|
617
|
+
* Plans the smallest browser boot path needed by a server-rendered document.
|
|
618
|
+
*
|
|
619
|
+
* - `none`: HTML is already complete; ship no Resux client payload or runtime.
|
|
620
|
+
* - `interaction`: ship only the tiny resume bootstrap. It waits for a
|
|
621
|
+
* resumable event or a declared enhancement/island trigger before importing
|
|
622
|
+
* the full browser runtime.
|
|
623
|
+
* - `eager`: preserve startup semantics for work that must begin immediately
|
|
624
|
+
* (pending data, plugins/middleware, immediate islands/enhancements, and
|
|
625
|
+
* managed media).
|
|
626
|
+
*/
|
|
627
|
+
export declare function getClientRuntimeBootPlan(result: RenderResult): ResuxClientBootPlan;
|
|
628
|
+
/** Returns whether a document needs any Resux browser execution. */
|
|
629
|
+
export declare function shouldLoadClientRuntime(result: RenderResult): boolean;
|
|
607
630
|
export declare function renderDocument(result: RenderResult, title?: string, options?: RenderDocumentOptions): string;
|
|
608
631
|
export 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;
|
|
609
632
|
export declare function renderTemplateNodesAsync(nodes: TemplateNode[], context: RenderTemplateContext, renderComponent: (component: ComponentDefinition, props?: ComponentProps, renderSlot?: () => Promise<string>) => Promise<string>, locals?: Record<string, unknown>): Promise<string>;
|
|
610
633
|
export declare class AsyncResuxRenderer {
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
634
|
+
private readonly route;
|
|
635
|
+
private readonly components;
|
|
636
|
+
private readonly modules;
|
|
637
|
+
private readonly vueIslands;
|
|
638
|
+
private readonly layouts;
|
|
639
|
+
private readonly pageMeta;
|
|
640
|
+
private readonly runtimeConfig;
|
|
641
|
+
private nextScopeId;
|
|
642
|
+
private readonly scopes;
|
|
643
|
+
private readonly globalStateRefs;
|
|
644
|
+
private readonly styleIds;
|
|
645
|
+
readonly headEntries: HeadEntry[];
|
|
646
|
+
readonly resuxApp: ResuxAppLike;
|
|
647
|
+
constructor(route: RouteContext, components: Record<string, ComponentDefinition>, modules: Record<string, string>, vueIslands?: Record<string, string>, layouts?: Record<string, ComponentDefinition>, pageMeta?: PageMeta, runtimeConfig?: RuntimeConfig);
|
|
648
|
+
renderComponent(definition: ComponentDefinition, renderPage?: () => Promise<string>, renderSlot?: () => Promise<string>, props?: ComponentProps): Promise<string>;
|
|
649
|
+
private collectComponentStyles;
|
|
650
|
+
renderLayout(name: string | false | undefined, renderSlot: () => Promise<string>): Promise<string>;
|
|
651
|
+
createPayload(): ResuxPayload;
|
|
629
652
|
}
|
|
630
653
|
export declare function renderAppAsync(options: RenderAppOptions): Promise<RenderResult>;
|
|
631
654
|
export declare function evaluateExpression(expression: string, scope: Record<string, unknown>, locals?: Record<string, unknown>): unknown;
|
|
632
655
|
type ClientPatch = {
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
656
|
+
type: "text";
|
|
657
|
+
id: string;
|
|
658
|
+
value: string;
|
|
636
659
|
} | {
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
660
|
+
type: "attr";
|
|
661
|
+
id: string;
|
|
662
|
+
attr: string;
|
|
663
|
+
value: string;
|
|
641
664
|
} | {
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
665
|
+
type: "html";
|
|
666
|
+
id: string;
|
|
667
|
+
value: string;
|
|
645
668
|
} | {
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
669
|
+
type: "block";
|
|
670
|
+
id: string;
|
|
671
|
+
value: string;
|
|
649
672
|
};
|
|
650
673
|
export declare function renderClientPatches(template: TemplateNode[], scope: Record<string, unknown>, scopeId: string, styleScopeId?: string): ClientPatch[];
|
|
651
674
|
export declare function getClientRuntimeSource(options?: ClientRuntimeSourceOptions): string;
|
|
675
|
+
//#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
|
+
//# sourceMappingURL=index.d.ts.map
|