alepha 0.15.1 → 0.15.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +68 -80
- package/dist/api/audits/index.d.ts +10 -33
- package/dist/api/audits/index.d.ts.map +1 -1
- package/dist/api/audits/index.js +10 -33
- package/dist/api/audits/index.js.map +1 -1
- package/dist/api/files/index.d.ts +10 -3
- package/dist/api/files/index.d.ts.map +1 -1
- package/dist/api/files/index.js +10 -3
- package/dist/api/files/index.js.map +1 -1
- package/dist/api/jobs/index.d.ts +162 -155
- package/dist/api/jobs/index.d.ts.map +1 -1
- package/dist/api/jobs/index.js +10 -3
- package/dist/api/jobs/index.js.map +1 -1
- package/dist/api/keys/index.d.ts +413 -0
- package/dist/api/keys/index.d.ts.map +1 -0
- package/dist/api/keys/index.js +476 -0
- package/dist/api/keys/index.js.map +1 -0
- package/dist/api/notifications/index.d.ts +10 -4
- package/dist/api/notifications/index.d.ts.map +1 -1
- package/dist/api/notifications/index.js +10 -4
- package/dist/api/notifications/index.js.map +1 -1
- package/dist/api/parameters/index.d.ts +43 -50
- package/dist/api/parameters/index.d.ts.map +1 -1
- package/dist/api/parameters/index.js +30 -37
- package/dist/api/parameters/index.js.map +1 -1
- package/dist/api/users/index.d.ts +1081 -760
- package/dist/api/users/index.d.ts.map +1 -1
- package/dist/api/users/index.js +2539 -218
- package/dist/api/users/index.js.map +1 -1
- package/dist/api/verifications/index.d.ts +138 -132
- package/dist/api/verifications/index.d.ts.map +1 -1
- package/dist/api/verifications/index.js +12 -4
- package/dist/api/verifications/index.js.map +1 -1
- package/dist/batch/index.d.ts +20 -40
- package/dist/batch/index.d.ts.map +1 -1
- package/dist/batch/index.js +31 -44
- package/dist/batch/index.js.map +1 -1
- package/dist/bucket/index.d.ts +440 -8
- package/dist/bucket/index.d.ts.map +1 -1
- package/dist/bucket/index.js +1861 -12
- package/dist/bucket/index.js.map +1 -1
- package/dist/cache/core/index.d.ts +179 -7
- package/dist/cache/core/index.d.ts.map +1 -1
- package/dist/cache/core/index.js +213 -7
- package/dist/cache/core/index.js.map +1 -1
- package/dist/cache/redis/index.d.ts +1 -0
- package/dist/cache/redis/index.d.ts.map +1 -1
- package/dist/cache/redis/index.js +4 -0
- package/dist/cache/redis/index.js.map +1 -1
- package/dist/cli/index.d.ts +638 -5645
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +2550 -368
- package/dist/cli/index.js.map +1 -1
- package/dist/command/index.d.ts +203 -45
- package/dist/command/index.d.ts.map +1 -1
- package/dist/command/index.js +2060 -71
- package/dist/command/index.js.map +1 -1
- package/dist/core/index.browser.js +70 -40
- package/dist/core/index.browser.js.map +1 -1
- package/dist/core/index.d.ts +34 -13
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +90 -40
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.native.js +70 -40
- package/dist/core/index.native.js.map +1 -1
- package/dist/datetime/index.d.ts +15 -0
- package/dist/datetime/index.d.ts.map +1 -1
- package/dist/datetime/index.js +15 -0
- package/dist/datetime/index.js.map +1 -1
- package/dist/email/index.d.ts +323 -20
- package/dist/email/index.d.ts.map +1 -1
- package/dist/email/index.js +1857 -7
- package/dist/email/index.js.map +1 -1
- package/dist/fake/index.d.ts +90 -8
- package/dist/fake/index.d.ts.map +1 -1
- package/dist/fake/index.js +91 -20
- package/dist/fake/index.js.map +1 -1
- package/dist/lock/core/index.d.ts +11 -4
- package/dist/lock/core/index.d.ts.map +1 -1
- package/dist/lock/core/index.js +11 -4
- package/dist/lock/core/index.js.map +1 -1
- package/dist/logger/index.d.ts +17 -66
- package/dist/logger/index.d.ts.map +1 -1
- package/dist/logger/index.js +14 -63
- package/dist/logger/index.js.map +1 -1
- package/dist/mcp/index.d.ts +10 -30
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +12 -35
- package/dist/mcp/index.js.map +1 -1
- package/dist/orm/index.browser.js +3 -3
- package/dist/orm/index.browser.js.map +1 -1
- package/dist/orm/index.bun.js +39 -20
- package/dist/orm/index.bun.js.map +1 -1
- package/dist/orm/index.d.ts +517 -540
- package/dist/orm/index.d.ts.map +1 -1
- package/dist/orm/index.js +58 -71
- package/dist/orm/index.js.map +1 -1
- package/dist/queue/core/index.d.ts +18 -10
- package/dist/queue/core/index.d.ts.map +1 -1
- package/dist/queue/core/index.js +14 -6
- package/dist/queue/core/index.js.map +1 -1
- package/dist/react/auth/index.browser.js +108 -0
- package/dist/react/auth/index.browser.js.map +1 -0
- package/dist/react/auth/index.d.ts +100 -0
- package/dist/react/auth/index.d.ts.map +1 -0
- package/dist/react/auth/index.js +145 -0
- package/dist/react/auth/index.js.map +1 -0
- package/dist/react/core/index.d.ts +469 -0
- package/dist/react/core/index.d.ts.map +1 -0
- package/dist/react/core/index.js +464 -0
- package/dist/react/core/index.js.map +1 -0
- package/dist/react/form/index.d.ts +232 -0
- package/dist/react/form/index.d.ts.map +1 -0
- package/dist/react/form/index.js +432 -0
- package/dist/react/form/index.js.map +1 -0
- package/dist/react/head/index.browser.js +423 -0
- package/dist/react/head/index.browser.js.map +1 -0
- package/dist/react/head/index.d.ts +288 -0
- package/dist/react/head/index.d.ts.map +1 -0
- package/dist/react/head/index.js +465 -0
- package/dist/react/head/index.js.map +1 -0
- package/dist/react/i18n/index.d.ts +175 -0
- package/dist/react/i18n/index.d.ts.map +1 -0
- package/dist/react/i18n/index.js +224 -0
- package/dist/react/i18n/index.js.map +1 -0
- package/dist/react/router/index.browser.js +1974 -0
- package/dist/react/router/index.browser.js.map +1 -0
- package/dist/react/router/index.d.ts +1956 -0
- package/dist/react/router/index.d.ts.map +1 -0
- package/dist/react/router/index.js +4722 -0
- package/dist/react/router/index.js.map +1 -0
- package/dist/react/websocket/index.d.ts +117 -0
- package/dist/react/websocket/index.d.ts.map +1 -0
- package/dist/react/websocket/index.js +107 -0
- package/dist/react/websocket/index.js.map +1 -0
- package/dist/redis/index.bun.js +4 -0
- package/dist/redis/index.bun.js.map +1 -1
- package/dist/redis/index.d.ts +41 -44
- package/dist/redis/index.d.ts.map +1 -1
- package/dist/redis/index.js +16 -25
- package/dist/redis/index.js.map +1 -1
- package/dist/retry/index.d.ts +11 -2
- package/dist/retry/index.d.ts.map +1 -1
- package/dist/retry/index.js +11 -2
- package/dist/retry/index.js.map +1 -1
- package/dist/scheduler/index.d.ts +11 -2
- package/dist/scheduler/index.d.ts.map +1 -1
- package/dist/scheduler/index.js +11 -2
- package/dist/scheduler/index.js.map +1 -1
- package/dist/security/index.d.ts +140 -49
- package/dist/security/index.d.ts.map +1 -1
- package/dist/security/index.js +164 -32
- package/dist/security/index.js.map +1 -1
- package/dist/server/auth/index.d.ts +12 -7
- package/dist/server/auth/index.d.ts.map +1 -1
- package/dist/server/auth/index.js +12 -7
- package/dist/server/auth/index.js.map +1 -1
- package/dist/server/cache/index.d.ts +7 -22
- package/dist/server/cache/index.d.ts.map +1 -1
- package/dist/server/cache/index.js +7 -22
- package/dist/server/cache/index.js.map +1 -1
- package/dist/server/compress/index.d.ts +10 -2
- package/dist/server/compress/index.d.ts.map +1 -1
- package/dist/server/compress/index.js +10 -2
- package/dist/server/compress/index.js.map +1 -1
- package/dist/server/cookies/index.d.ts +40 -16
- package/dist/server/cookies/index.d.ts.map +1 -1
- package/dist/server/cookies/index.js +7 -5
- package/dist/server/cookies/index.js.map +1 -1
- package/dist/server/core/index.d.ts +124 -23
- package/dist/server/core/index.d.ts.map +1 -1
- package/dist/server/core/index.js +231 -14
- package/dist/server/core/index.js.map +1 -1
- package/dist/server/cors/index.d.ts +13 -23
- package/dist/server/cors/index.d.ts.map +1 -1
- package/dist/server/cors/index.js +7 -21
- package/dist/server/cors/index.js.map +1 -1
- package/dist/server/health/index.d.ts +8 -2
- package/dist/server/health/index.d.ts.map +1 -1
- package/dist/server/health/index.js +8 -2
- package/dist/server/health/index.js.map +1 -1
- package/dist/server/helmet/index.d.ts +11 -3
- package/dist/server/helmet/index.d.ts.map +1 -1
- package/dist/server/helmet/index.js +11 -3
- package/dist/server/helmet/index.js.map +1 -1
- package/dist/server/links/index.d.ts +11 -6
- package/dist/server/links/index.d.ts.map +1 -1
- package/dist/server/links/index.js +11 -6
- package/dist/server/links/index.js.map +1 -1
- package/dist/server/metrics/index.d.ts +10 -3
- package/dist/server/metrics/index.d.ts.map +1 -1
- package/dist/server/metrics/index.js +10 -3
- package/dist/server/metrics/index.js.map +1 -1
- package/dist/server/multipart/index.d.ts +9 -3
- package/dist/server/multipart/index.d.ts.map +1 -1
- package/dist/server/multipart/index.js +9 -3
- package/dist/server/multipart/index.js.map +1 -1
- package/dist/server/proxy/index.d.ts +8 -2
- package/dist/server/proxy/index.d.ts.map +1 -1
- package/dist/server/proxy/index.js +8 -2
- package/dist/server/proxy/index.js.map +1 -1
- package/dist/server/rate-limit/index.d.ts +30 -35
- package/dist/server/rate-limit/index.d.ts.map +1 -1
- package/dist/server/rate-limit/index.js +18 -55
- package/dist/server/rate-limit/index.js.map +1 -1
- package/dist/server/static/index.d.ts +137 -4
- package/dist/server/static/index.d.ts.map +1 -1
- package/dist/server/static/index.js +1853 -5
- package/dist/server/static/index.js.map +1 -1
- package/dist/server/swagger/index.d.ts +309 -6
- package/dist/server/swagger/index.d.ts.map +1 -1
- package/dist/server/swagger/index.js +1854 -6
- package/dist/server/swagger/index.js.map +1 -1
- package/dist/sms/index.d.ts +309 -7
- package/dist/sms/index.d.ts.map +1 -1
- package/dist/sms/index.js +1856 -7
- package/dist/sms/index.js.map +1 -1
- package/dist/system/index.browser.js +1218 -0
- package/dist/system/index.browser.js.map +1 -0
- package/dist/{file → system}/index.d.ts +343 -16
- package/dist/system/index.d.ts.map +1 -0
- package/dist/{file → system}/index.js +419 -22
- package/dist/system/index.js.map +1 -0
- package/dist/thread/index.d.ts +11 -2
- package/dist/thread/index.d.ts.map +1 -1
- package/dist/thread/index.js +11 -2
- package/dist/thread/index.js.map +1 -1
- package/dist/topic/core/index.d.ts +12 -5
- package/dist/topic/core/index.d.ts.map +1 -1
- package/dist/topic/core/index.js +12 -5
- package/dist/topic/core/index.js.map +1 -1
- package/dist/vite/index.d.ts +5 -6272
- package/dist/vite/index.d.ts.map +1 -1
- package/dist/vite/index.js +23 -10
- package/dist/vite/index.js.map +1 -1
- package/dist/websocket/index.d.ts +12 -8
- package/dist/websocket/index.d.ts.map +1 -1
- package/dist/websocket/index.js +12 -8
- package/dist/websocket/index.js.map +1 -1
- package/package.json +82 -11
- package/src/api/audits/index.ts +10 -33
- package/src/api/files/__tests__/$bucket.spec.ts +1 -1
- package/src/api/files/controllers/AdminFileStatsController.spec.ts +1 -1
- package/src/api/files/controllers/FileController.spec.ts +1 -1
- package/src/api/files/index.ts +10 -3
- package/src/api/files/jobs/FileJobs.spec.ts +1 -1
- package/src/api/files/services/FileService.spec.ts +1 -1
- package/src/api/jobs/index.ts +10 -3
- package/src/api/keys/controllers/AdminApiKeyController.ts +75 -0
- package/src/api/keys/controllers/ApiKeyController.ts +103 -0
- package/src/api/keys/entities/apiKeyEntity.ts +41 -0
- package/src/api/keys/index.ts +49 -0
- package/src/api/keys/schemas/adminApiKeyQuerySchema.ts +7 -0
- package/src/api/keys/schemas/adminApiKeyResourceSchema.ts +17 -0
- package/src/api/keys/schemas/createApiKeyBodySchema.ts +7 -0
- package/src/api/keys/schemas/createApiKeyResponseSchema.ts +11 -0
- package/src/api/keys/schemas/listApiKeyResponseSchema.ts +15 -0
- package/src/api/keys/schemas/revokeApiKeyParamsSchema.ts +5 -0
- package/src/api/keys/schemas/revokeApiKeyResponseSchema.ts +5 -0
- package/src/api/keys/services/ApiKeyService.spec.ts +553 -0
- package/src/api/keys/services/ApiKeyService.ts +306 -0
- package/src/api/logs/TODO.md +55 -0
- package/src/api/notifications/index.ts +10 -4
- package/src/api/parameters/index.ts +9 -30
- package/src/api/parameters/primitives/$config.ts +12 -4
- package/src/api/parameters/services/ConfigStore.ts +9 -3
- package/src/api/users/__tests__/ApiKeys-integration.spec.ts +1035 -0
- package/src/api/users/__tests__/ApiKeys.spec.ts +401 -0
- package/src/api/users/index.ts +14 -3
- package/src/api/users/primitives/$realm.ts +33 -5
- package/src/api/users/providers/RealmProvider.ts +1 -12
- package/src/api/users/services/SessionService.ts +1 -1
- package/src/api/verifications/controllers/VerificationController.ts +2 -0
- package/src/api/verifications/index.ts +10 -4
- package/src/batch/index.ts +9 -36
- package/src/batch/primitives/$batch.ts +0 -8
- package/src/batch/providers/BatchProvider.ts +29 -2
- package/src/bucket/__tests__/shared.ts +1 -1
- package/src/bucket/index.ts +13 -6
- package/src/bucket/primitives/$bucket.ts +1 -1
- package/src/bucket/providers/LocalFileStorageProvider.ts +1 -1
- package/src/bucket/providers/MemoryFileStorageProvider.ts +1 -1
- package/src/cache/core/__tests__/shared.ts +30 -0
- package/src/cache/core/index.ts +11 -6
- package/src/cache/core/primitives/$cache.spec.ts +5 -0
- package/src/cache/core/providers/CacheProvider.ts +17 -0
- package/src/cache/core/providers/MemoryCacheProvider.ts +300 -1
- package/src/cache/redis/__tests__/cache-redis.spec.ts +5 -0
- package/src/cache/redis/providers/RedisCacheProvider.ts +9 -0
- package/src/cli/apps/AlephaCli.ts +1 -14
- package/src/cli/apps/AlephaPackageBuilderCli.ts +10 -1
- package/src/cli/atoms/buildOptions.ts +99 -9
- package/src/cli/commands/build.ts +150 -37
- package/src/cli/commands/db.ts +22 -18
- package/src/cli/commands/deploy.ts +1 -1
- package/src/cli/commands/dev.ts +1 -20
- package/src/cli/commands/gen/env.ts +5 -2
- package/src/cli/commands/gen/openapi.ts +5 -2
- package/src/cli/commands/init.spec.ts +588 -0
- package/src/cli/commands/init.ts +115 -58
- package/src/cli/commands/lint.ts +7 -1
- package/src/cli/commands/typecheck.ts +11 -0
- package/src/cli/providers/AppEntryProvider.ts +1 -1
- package/src/cli/providers/ViteBuildProvider.ts +8 -50
- package/src/cli/providers/ViteDevServerProvider.ts +35 -16
- package/src/cli/services/AlephaCliUtils.ts +52 -121
- package/src/cli/services/PackageManagerUtils.ts +129 -11
- package/src/cli/services/ProjectScaffolder.spec.ts +97 -0
- package/src/cli/services/ProjectScaffolder.ts +148 -81
- package/src/cli/services/ViteUtils.ts +82 -0
- package/src/cli/{assets/claudeMd.ts → templates/agentMd.ts} +37 -24
- package/src/cli/templates/apiAppSecurityTs.ts +11 -0
- package/src/cli/templates/apiIndexTs.ts +30 -0
- package/src/cli/templates/gitignore.ts +39 -0
- package/src/cli/{assets → templates}/mainCss.ts +11 -2
- package/src/cli/templates/mainServerTs.ts +33 -0
- package/src/cli/templates/webAppRouterTs.ts +74 -0
- package/src/cli/templates/webHelloComponentTsx.ts +30 -0
- package/src/command/helpers/Runner.spec.ts +139 -0
- package/src/command/helpers/Runner.ts +7 -22
- package/src/command/index.ts +12 -4
- package/src/command/providers/CliProvider.spec.ts +1392 -0
- package/src/command/providers/CliProvider.ts +320 -47
- package/src/core/Alepha.ts +34 -27
- package/src/core/__tests__/Alepha-start.spec.ts +4 -4
- package/src/core/helpers/jsonSchemaToTypeBox.spec.ts +771 -0
- package/src/core/helpers/jsonSchemaToTypeBox.ts +62 -10
- package/src/core/index.shared.ts +1 -0
- package/src/core/index.ts +20 -0
- package/src/core/providers/EventManager.spec.ts +0 -71
- package/src/core/providers/EventManager.ts +3 -15
- package/src/core/providers/Json.ts +2 -14
- package/src/datetime/index.ts +15 -0
- package/src/email/index.ts +10 -5
- package/src/email/providers/LocalEmailProvider.spec.ts +1 -1
- package/src/email/providers/LocalEmailProvider.ts +1 -1
- package/src/fake/__tests__/keyName.example.ts +1 -1
- package/src/fake/__tests__/keyName.spec.ts +5 -5
- package/src/fake/index.ts +9 -6
- package/src/fake/providers/FakeProvider.spec.ts +258 -40
- package/src/fake/providers/FakeProvider.ts +133 -19
- package/src/lock/core/index.ts +11 -4
- package/src/logger/index.ts +17 -66
- package/src/mcp/index.ts +10 -27
- package/src/mcp/transports/SseMcpTransport.ts +0 -11
- package/src/orm/__tests__/PostgresProvider.spec.ts +2 -2
- package/src/orm/index.browser.ts +2 -2
- package/src/orm/index.bun.ts +5 -3
- package/src/orm/index.ts +23 -53
- package/src/orm/providers/drivers/BunSqliteProvider.ts +5 -1
- package/src/orm/providers/drivers/CloudflareD1Provider.ts +57 -30
- package/src/orm/providers/drivers/DatabaseProvider.ts +9 -1
- package/src/orm/providers/drivers/NodeSqliteProvider.ts +4 -1
- package/src/orm/services/Repository.ts +7 -3
- package/src/queue/core/index.ts +14 -6
- package/src/react/auth/__tests__/$auth.spec.ts +202 -0
- package/src/react/auth/hooks/useAuth.ts +32 -0
- package/src/react/auth/index.browser.ts +13 -0
- package/src/react/auth/index.shared.ts +2 -0
- package/src/react/auth/index.ts +48 -0
- package/src/react/auth/providers/ReactAuthProvider.ts +16 -0
- package/src/react/auth/services/ReactAuth.ts +135 -0
- package/src/react/core/__tests__/Router.spec.tsx +169 -0
- package/src/react/core/components/ClientOnly.tsx +49 -0
- package/src/react/core/components/ErrorBoundary.tsx +73 -0
- package/src/react/core/contexts/AlephaContext.ts +7 -0
- package/src/react/core/contexts/AlephaProvider.tsx +42 -0
- package/src/react/core/hooks/useAction.browser.spec.tsx +569 -0
- package/src/react/core/hooks/useAction.ts +480 -0
- package/src/react/core/hooks/useAlepha.ts +26 -0
- package/src/react/core/hooks/useClient.ts +17 -0
- package/src/react/core/hooks/useEvents.ts +51 -0
- package/src/react/core/hooks/useInject.ts +12 -0
- package/src/react/core/hooks/useStore.ts +52 -0
- package/src/react/core/index.ts +90 -0
- package/src/react/form/components/FormState.tsx +17 -0
- package/src/react/form/errors/FormValidationError.ts +18 -0
- package/src/react/form/hooks/useForm.browser.spec.tsx +366 -0
- package/src/react/form/hooks/useForm.ts +47 -0
- package/src/react/form/hooks/useFormState.ts +130 -0
- package/src/react/form/index.ts +44 -0
- package/src/react/form/services/FormModel.ts +614 -0
- package/src/react/head/helpers/SeoExpander.spec.ts +203 -0
- package/src/react/head/helpers/SeoExpander.ts +142 -0
- package/src/react/head/hooks/useHead.spec.tsx +288 -0
- package/src/react/head/hooks/useHead.ts +62 -0
- package/src/react/head/index.browser.ts +26 -0
- package/src/react/head/index.ts +44 -0
- package/src/react/head/interfaces/Head.ts +105 -0
- package/src/react/head/primitives/$head.ts +25 -0
- package/src/react/head/providers/BrowserHeadProvider.browser.spec.ts +196 -0
- package/src/react/head/providers/BrowserHeadProvider.ts +212 -0
- package/src/react/head/providers/HeadProvider.ts +168 -0
- package/src/react/head/providers/ServerHeadProvider.ts +31 -0
- package/src/react/i18n/__tests__/integration.spec.tsx +239 -0
- package/src/react/i18n/components/Localize.spec.tsx +357 -0
- package/src/react/i18n/components/Localize.tsx +35 -0
- package/src/react/i18n/hooks/useI18n.browser.spec.tsx +438 -0
- package/src/react/i18n/hooks/useI18n.ts +18 -0
- package/src/react/i18n/index.ts +41 -0
- package/src/react/i18n/primitives/$dictionary.ts +69 -0
- package/src/react/i18n/providers/I18nProvider.spec.ts +389 -0
- package/src/react/i18n/providers/I18nProvider.ts +278 -0
- package/src/react/router/__tests__/page-head-browser.browser.spec.ts +95 -0
- package/src/react/router/__tests__/page-head.spec.ts +48 -0
- package/src/react/router/__tests__/seo-head.spec.ts +125 -0
- package/src/react/router/atoms/ssrManifestAtom.ts +58 -0
- package/src/react/router/components/ErrorViewer.tsx +872 -0
- package/src/react/router/components/Link.tsx +23 -0
- package/src/react/router/components/NestedView.tsx +223 -0
- package/src/react/router/components/NotFound.tsx +30 -0
- package/src/react/router/constants/PAGE_PRELOAD_KEY.ts +6 -0
- package/src/react/router/contexts/RouterLayerContext.ts +12 -0
- package/src/react/router/errors/Redirection.ts +28 -0
- package/src/react/router/hooks/useActive.ts +52 -0
- package/src/react/router/hooks/useQueryParams.ts +63 -0
- package/src/react/router/hooks/useRouter.ts +20 -0
- package/src/react/router/hooks/useRouterState.ts +11 -0
- package/src/react/router/index.browser.ts +45 -0
- package/src/react/router/index.shared.ts +19 -0
- package/src/react/router/index.ts +146 -0
- package/src/react/router/primitives/$page.browser.spec.tsx +851 -0
- package/src/react/router/primitives/$page.spec.tsx +676 -0
- package/src/react/router/primitives/$page.ts +489 -0
- package/src/react/router/providers/ReactBrowserProvider.ts +312 -0
- package/src/react/router/providers/ReactBrowserRendererProvider.ts +25 -0
- package/src/react/router/providers/ReactBrowserRouterProvider.ts +168 -0
- package/src/react/router/providers/ReactPageProvider.ts +726 -0
- package/src/react/router/providers/ReactPreloadProvider.spec.ts +142 -0
- package/src/react/router/providers/ReactPreloadProvider.ts +85 -0
- package/src/react/router/providers/ReactServerProvider.spec.tsx +316 -0
- package/src/react/router/providers/ReactServerProvider.ts +487 -0
- package/src/react/router/providers/ReactServerTemplateProvider.spec.ts +210 -0
- package/src/react/router/providers/ReactServerTemplateProvider.ts +542 -0
- package/src/react/router/providers/SSRManifestProvider.ts +334 -0
- package/src/react/router/services/ReactPageServerService.ts +48 -0
- package/src/react/router/services/ReactPageService.ts +27 -0
- package/src/react/router/services/ReactRouter.ts +262 -0
- package/src/react/websocket/hooks/useRoom.tsx +242 -0
- package/src/react/websocket/index.ts +7 -0
- package/src/redis/__tests__/redis.spec.ts +13 -0
- package/src/redis/index.ts +9 -25
- package/src/redis/providers/BunRedisProvider.ts +9 -0
- package/src/redis/providers/NodeRedisProvider.ts +8 -0
- package/src/redis/providers/RedisProvider.ts +16 -0
- package/src/retry/index.ts +11 -2
- package/src/router/index.ts +15 -0
- package/src/scheduler/index.ts +11 -2
- package/src/security/__tests__/BasicAuth.spec.ts +2 -0
- package/src/security/__tests__/ServerSecurityProvider.spec.ts +90 -5
- package/src/security/index.ts +15 -10
- package/src/security/interfaces/IssuerResolver.ts +27 -0
- package/src/security/primitives/$issuer.ts +55 -0
- package/src/security/providers/SecurityProvider.ts +179 -0
- package/src/security/providers/ServerBasicAuthProvider.ts +6 -2
- package/src/security/providers/ServerSecurityProvider.ts +63 -41
- package/src/server/auth/index.ts +12 -7
- package/src/server/cache/index.ts +7 -22
- package/src/server/compress/index.ts +10 -2
- package/src/server/cookies/index.ts +7 -5
- package/src/server/cookies/primitives/$cookie.ts +33 -11
- package/src/server/core/index.ts +16 -6
- package/src/server/core/interfaces/ServerRequest.ts +83 -1
- package/src/server/core/primitives/$action.spec.ts +1 -1
- package/src/server/core/primitives/$action.ts +8 -3
- package/src/server/core/providers/NodeHttpServerProvider.spec.ts +9 -3
- package/src/server/core/providers/NodeHttpServerProvider.ts +9 -3
- package/src/server/core/services/ServerRequestParser.spec.ts +520 -0
- package/src/server/core/services/ServerRequestParser.ts +306 -13
- package/src/server/cors/index.ts +7 -21
- package/src/server/cors/primitives/$cors.ts +6 -2
- package/src/server/health/index.ts +8 -2
- package/src/server/helmet/index.ts +11 -3
- package/src/server/links/index.ts +11 -6
- package/src/server/metrics/index.ts +10 -3
- package/src/server/multipart/index.ts +9 -3
- package/src/server/proxy/index.ts +8 -2
- package/src/server/rate-limit/index.ts +21 -25
- package/src/server/rate-limit/primitives/$rateLimit.ts +6 -2
- package/src/server/rate-limit/providers/ServerRateLimitProvider.spec.ts +38 -14
- package/src/server/rate-limit/providers/ServerRateLimitProvider.ts +22 -56
- package/src/server/static/index.ts +8 -2
- package/src/server/static/providers/ServerStaticProvider.ts +1 -1
- package/src/server/swagger/index.ts +9 -4
- package/src/server/swagger/providers/ServerSwaggerProvider.ts +1 -1
- package/src/sms/index.ts +9 -5
- package/src/sms/providers/LocalSmsProvider.spec.ts +1 -1
- package/src/sms/providers/LocalSmsProvider.ts +1 -1
- package/src/system/index.browser.ts +36 -0
- package/src/system/index.ts +62 -0
- package/src/system/index.workerd.ts +1 -0
- package/src/{file → system}/providers/FileSystemProvider.ts +24 -0
- package/src/{file → system}/providers/MemoryFileSystemProvider.ts +116 -3
- package/src/system/providers/MemoryShellProvider.ts +164 -0
- package/src/{file → system}/providers/NodeFileSystemProvider.spec.ts +2 -2
- package/src/{file → system}/providers/NodeFileSystemProvider.ts +47 -2
- package/src/system/providers/NodeShellProvider.ts +184 -0
- package/src/system/providers/ShellProvider.ts +74 -0
- package/src/{file → system}/services/FileDetector.spec.ts +2 -2
- package/src/thread/index.ts +11 -2
- package/src/topic/core/index.ts +12 -5
- package/src/vite/tasks/buildClient.ts +2 -7
- package/src/vite/tasks/buildServer.ts +19 -13
- package/src/vite/tasks/generateCloudflare.ts +10 -7
- package/src/vite/tasks/generateDocker.ts +4 -0
- package/src/websocket/index.ts +12 -8
- package/dist/file/index.d.ts.map +0 -1
- package/dist/file/index.js.map +0 -1
- package/src/cli/assets/apiIndexTs.ts +0 -16
- package/src/cli/assets/mainServerTs.ts +0 -24
- package/src/cli/assets/webAppRouterTs.ts +0 -16
- package/src/cli/assets/webHelloComponentTsx.ts +0 -20
- package/src/cli/providers/ViteTemplateProvider.ts +0 -27
- package/src/file/index.ts +0 -43
- /package/src/cli/{assets → templates}/apiHelloControllerTs.ts +0 -0
- /package/src/cli/{assets → templates}/biomeJson.ts +0 -0
- /package/src/cli/{assets → templates}/dummySpecTs.ts +0 -0
- /package/src/cli/{assets → templates}/editorconfig.ts +0 -0
- /package/src/cli/{assets → templates}/mainBrowserTs.ts +0 -0
- /package/src/cli/{assets → templates}/tsconfigJson.ts +0 -0
- /package/src/cli/{assets → templates}/webIndexTs.ts +0 -0
- /package/src/{file → system}/errors/FileError.ts +0 -0
- /package/src/{file → system}/services/FileDetector.ts +0 -0
|
@@ -0,0 +1,1956 @@
|
|
|
1
|
+
import * as alepha6 from "alepha";
|
|
2
|
+
import { Alepha, AlephaError, Async, FileLike, Json, KIND, Primitive, Static, StreamLike, TObject, TSchema } from "alepha";
|
|
3
|
+
import { DateTimeProvider } from "alepha/datetime";
|
|
4
|
+
import { ClientOnlyProps } from "alepha/react";
|
|
5
|
+
import { ServerHandler, ServerRequest, ServerRouterProvider } from "alepha/server";
|
|
6
|
+
import { ServerRouteCache } from "alepha/server/cache";
|
|
7
|
+
import { LinkProvider } from "alepha/server/links";
|
|
8
|
+
import * as alepha_logger0 from "alepha/logger";
|
|
9
|
+
import * as react0 from "react";
|
|
10
|
+
import { AnchorHTMLAttributes, CSSProperties, FC, ReactNode } from "react";
|
|
11
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
12
|
+
import { BrowserHeadProvider, Head, ServerHeadProvider, SimpleHead } from "alepha/react/head";
|
|
13
|
+
import { ServerStaticProvider } from "alepha/server/static";
|
|
14
|
+
import { Readable } from "node:stream";
|
|
15
|
+
import { Route, RouterProvider } from "alepha/router";
|
|
16
|
+
|
|
17
|
+
//#region ../../src/react/router/constants/PAGE_PRELOAD_KEY.d.ts
|
|
18
|
+
/**
|
|
19
|
+
* Symbol key for SSR module preloading path.
|
|
20
|
+
* Using Symbol.for() allows the Vite plugin to inject this at build time.
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
23
|
+
declare const PAGE_PRELOAD_KEY: unique symbol;
|
|
24
|
+
//#endregion
|
|
25
|
+
//#region ../../src/react/router/errors/Redirection.d.ts
|
|
26
|
+
/**
|
|
27
|
+
* Used for Redirection during the page loading.
|
|
28
|
+
*
|
|
29
|
+
* Depends on the context, it can be thrown or just returned.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```ts
|
|
33
|
+
* import { Redirection } from "alepha/react";
|
|
34
|
+
*
|
|
35
|
+
* const MyPage = $page({
|
|
36
|
+
* loader: async () => {
|
|
37
|
+
* if (needRedirect) {
|
|
38
|
+
* throw new Redirection("/new-path");
|
|
39
|
+
* }
|
|
40
|
+
* },
|
|
41
|
+
* });
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
declare class Redirection extends AlephaError {
|
|
45
|
+
readonly redirect: string;
|
|
46
|
+
constructor(redirect: string);
|
|
47
|
+
}
|
|
48
|
+
//#endregion
|
|
49
|
+
//#region ../../src/react/router/providers/ReactPageProvider.d.ts
|
|
50
|
+
declare const envSchema$1: alepha6.TObject<{
|
|
51
|
+
REACT_STRICT_MODE: alepha6.TBoolean;
|
|
52
|
+
}>;
|
|
53
|
+
declare module "alepha" {
|
|
54
|
+
interface Env extends Partial<Static<typeof envSchema$1>> {}
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Handle page routes for React applications. (Browser and Server)
|
|
58
|
+
*/
|
|
59
|
+
declare class ReactPageProvider {
|
|
60
|
+
protected readonly log: alepha_logger0.Logger;
|
|
61
|
+
protected readonly env: {
|
|
62
|
+
REACT_STRICT_MODE: boolean;
|
|
63
|
+
};
|
|
64
|
+
protected readonly alepha: Alepha;
|
|
65
|
+
protected readonly pages: PageRoute[];
|
|
66
|
+
getPages(): PageRoute[];
|
|
67
|
+
getConcretePages(): ConcretePageRoute[];
|
|
68
|
+
page(name: string): PageRoute;
|
|
69
|
+
pathname(name: string, options?: {
|
|
70
|
+
params?: Record<string, string>;
|
|
71
|
+
query?: Record<string, string>;
|
|
72
|
+
}): string;
|
|
73
|
+
url(name: string, options?: {
|
|
74
|
+
params?: Record<string, string>;
|
|
75
|
+
host?: string;
|
|
76
|
+
}): URL;
|
|
77
|
+
root(state: ReactRouterState): ReactNode;
|
|
78
|
+
protected convertStringObjectToObject: (schema?: TSchema, value?: any) => any;
|
|
79
|
+
/**
|
|
80
|
+
* Create a new RouterState based on a given route and request.
|
|
81
|
+
* This method resolves the layers for the route, applying any query and params schemas defined in the route.
|
|
82
|
+
* It also handles errors and redirects.
|
|
83
|
+
*/
|
|
84
|
+
createLayers(route: PageRoute, state: ReactRouterState, previous?: PreviousLayerData[]): Promise<CreateLayersResult>;
|
|
85
|
+
protected getErrorHandler(route: PageRoute): ErrorHandler | undefined;
|
|
86
|
+
protected createElement(page: PageRoute, props: Record<string, any>): Promise<ReactNode>;
|
|
87
|
+
renderError(error: Error): ReactNode;
|
|
88
|
+
renderEmptyView(): ReactNode;
|
|
89
|
+
href(page: {
|
|
90
|
+
options: {
|
|
91
|
+
name?: string;
|
|
92
|
+
};
|
|
93
|
+
}, params?: Record<string, any>): string;
|
|
94
|
+
compile(path: string, params?: Record<string, string>): string;
|
|
95
|
+
protected renderView(index: number, path: string, view: ReactNode | undefined, page: PageRoute): ReactNode;
|
|
96
|
+
protected readonly configure: alepha6.HookPrimitive<"configure">;
|
|
97
|
+
protected map(pages: Array<PagePrimitive>, target: PagePrimitive): PageRouteEntry;
|
|
98
|
+
add(entry: PageRouteEntry): void;
|
|
99
|
+
protected createMatch(page: PageRoute): string;
|
|
100
|
+
protected _next: number;
|
|
101
|
+
protected nextId(): string;
|
|
102
|
+
}
|
|
103
|
+
declare const isPageRoute: (it: any) => it is PageRoute;
|
|
104
|
+
interface PageRouteEntry extends Omit<PagePrimitiveOptions, "children" | "parent"> {
|
|
105
|
+
children?: PageRouteEntry[];
|
|
106
|
+
}
|
|
107
|
+
interface ConcretePageRoute extends PageRoute {
|
|
108
|
+
/**
|
|
109
|
+
* When exported, static routes can be split into multiple pages with different params.
|
|
110
|
+
* We replace 'name' by the new name for each static entry, and old 'name' becomes 'staticName'.
|
|
111
|
+
*/
|
|
112
|
+
staticName?: string;
|
|
113
|
+
params?: Record<string, string>;
|
|
114
|
+
}
|
|
115
|
+
interface PageRoute extends PageRouteEntry {
|
|
116
|
+
type: "page";
|
|
117
|
+
name: string;
|
|
118
|
+
parent?: PageRoute;
|
|
119
|
+
match: string;
|
|
120
|
+
}
|
|
121
|
+
interface Layer {
|
|
122
|
+
config?: {
|
|
123
|
+
query?: Record<string, any>;
|
|
124
|
+
params?: Record<string, any>;
|
|
125
|
+
context?: Record<string, any>;
|
|
126
|
+
};
|
|
127
|
+
name: string;
|
|
128
|
+
props?: Record<string, any>;
|
|
129
|
+
error?: Error;
|
|
130
|
+
part?: string;
|
|
131
|
+
element: ReactNode;
|
|
132
|
+
index: number;
|
|
133
|
+
path: string;
|
|
134
|
+
route?: PageRoute;
|
|
135
|
+
cache?: boolean;
|
|
136
|
+
}
|
|
137
|
+
type PreviousLayerData = Omit<Layer, "element" | "index" | "path">;
|
|
138
|
+
interface AnchorProps {
|
|
139
|
+
href: string;
|
|
140
|
+
onClick: (ev?: any) => any;
|
|
141
|
+
}
|
|
142
|
+
interface ReactRouterState {
|
|
143
|
+
/**
|
|
144
|
+
* Stack of layers for the current page.
|
|
145
|
+
*/
|
|
146
|
+
layers: Array<Layer>;
|
|
147
|
+
/**
|
|
148
|
+
* URL of the current page.
|
|
149
|
+
*/
|
|
150
|
+
url: URL;
|
|
151
|
+
/**
|
|
152
|
+
* Error handler for the current page.
|
|
153
|
+
*/
|
|
154
|
+
onError: ErrorHandler;
|
|
155
|
+
/**
|
|
156
|
+
* Params extracted from the URL for the current page.
|
|
157
|
+
*/
|
|
158
|
+
params: Record<string, any>;
|
|
159
|
+
/**
|
|
160
|
+
* Query parameters extracted from the URL for the current page.
|
|
161
|
+
*/
|
|
162
|
+
query: Record<string, string>;
|
|
163
|
+
/**
|
|
164
|
+
* Optional meta information associated with the current page.
|
|
165
|
+
*/
|
|
166
|
+
meta: Record<string, any>;
|
|
167
|
+
/**
|
|
168
|
+
* Head configuration for the current page (title, meta tags, etc.).
|
|
169
|
+
* Populated by HeadProvider during SSR.
|
|
170
|
+
*/
|
|
171
|
+
head: Head;
|
|
172
|
+
name?: string;
|
|
173
|
+
}
|
|
174
|
+
interface RouterStackItem {
|
|
175
|
+
route: PageRoute;
|
|
176
|
+
config?: Record<string, any>;
|
|
177
|
+
props?: Record<string, any>;
|
|
178
|
+
error?: Error;
|
|
179
|
+
cache?: boolean;
|
|
180
|
+
}
|
|
181
|
+
interface TransitionOptions {
|
|
182
|
+
previous?: PreviousLayerData[];
|
|
183
|
+
}
|
|
184
|
+
interface CreateLayersResult {
|
|
185
|
+
redirect?: string;
|
|
186
|
+
state?: ReactRouterState;
|
|
187
|
+
}
|
|
188
|
+
//#endregion
|
|
189
|
+
//#region ../../src/react/router/services/ReactPageService.d.ts
|
|
190
|
+
/**
|
|
191
|
+
* $page methods interface.
|
|
192
|
+
*/
|
|
193
|
+
declare abstract class ReactPageService {
|
|
194
|
+
fetch(pathname: string, options?: PagePrimitiveRenderOptions): Promise<{
|
|
195
|
+
html: string;
|
|
196
|
+
response: Response;
|
|
197
|
+
}>;
|
|
198
|
+
render(name: string, options?: PagePrimitiveRenderOptions): Promise<PagePrimitiveRenderResult>;
|
|
199
|
+
}
|
|
200
|
+
//#endregion
|
|
201
|
+
//#region ../../src/react/router/primitives/$page.d.ts
|
|
202
|
+
/**
|
|
203
|
+
* Main primitive for defining a React route in the application.
|
|
204
|
+
*
|
|
205
|
+
* The $page primitive is the core building block for creating type-safe, SSR-enabled React routes.
|
|
206
|
+
* It provides a declarative way to define pages with powerful features:
|
|
207
|
+
*
|
|
208
|
+
* **Routing & Navigation**
|
|
209
|
+
* - URL pattern matching with parameters (e.g., `/users/:id`)
|
|
210
|
+
* - Nested routing with parent-child relationships
|
|
211
|
+
* - Type-safe URL parameter and query string validation
|
|
212
|
+
*
|
|
213
|
+
* **Data Loading**
|
|
214
|
+
* - Server-side data fetching with the `loader` function
|
|
215
|
+
* - Automatic serialization and hydration for SSR
|
|
216
|
+
* - Access to request context, URL params, and parent data
|
|
217
|
+
*
|
|
218
|
+
* **Component Loading**
|
|
219
|
+
* - Direct component rendering or lazy loading for code splitting
|
|
220
|
+
* - Client-only rendering when browser APIs are needed
|
|
221
|
+
* - Automatic fallback handling during hydration
|
|
222
|
+
*
|
|
223
|
+
* **Performance Optimization**
|
|
224
|
+
* - Static generation for pre-rendered pages at build time
|
|
225
|
+
* - Server-side caching with configurable TTL and providers
|
|
226
|
+
* - Code splitting through lazy component loading
|
|
227
|
+
*
|
|
228
|
+
* **Error Handling**
|
|
229
|
+
* - Custom error handlers with support for redirects
|
|
230
|
+
* - Hierarchical error handling (child → parent)
|
|
231
|
+
* - HTTP status code handling (404, 401, etc.)
|
|
232
|
+
*
|
|
233
|
+
* **Page Animations**
|
|
234
|
+
* - CSS-based enter/exit animations
|
|
235
|
+
* - Dynamic animations based on page state
|
|
236
|
+
* - Custom timing and easing functions
|
|
237
|
+
*
|
|
238
|
+
* **Lifecycle Management**
|
|
239
|
+
* - Server response hooks for headers and status codes
|
|
240
|
+
* - Page leave handlers for cleanup (browser only)
|
|
241
|
+
* - Permission-based access control
|
|
242
|
+
*
|
|
243
|
+
* @example Simple page with data fetching
|
|
244
|
+
* ```typescript
|
|
245
|
+
* const userProfile = $page({
|
|
246
|
+
* path: "/users/:id",
|
|
247
|
+
* schema: {
|
|
248
|
+
* params: t.object({ id: t.integer() }),
|
|
249
|
+
* query: t.object({ tab: t.optional(t.text()) })
|
|
250
|
+
* },
|
|
251
|
+
* loader: async ({ params }) => {
|
|
252
|
+
* const user = await userApi.getUser(params.id);
|
|
253
|
+
* return { user };
|
|
254
|
+
* },
|
|
255
|
+
* lazy: () => import("./UserProfile.tsx")
|
|
256
|
+
* });
|
|
257
|
+
* ```
|
|
258
|
+
*
|
|
259
|
+
* @example Nested routing with error handling
|
|
260
|
+
* ```typescript
|
|
261
|
+
* const projectSection = $page({
|
|
262
|
+
* path: "/projects/:id",
|
|
263
|
+
* children: () => [projectBoard, projectSettings],
|
|
264
|
+
* loader: async ({ params }) => {
|
|
265
|
+
* const project = await projectApi.get(params.id);
|
|
266
|
+
* return { project };
|
|
267
|
+
* },
|
|
268
|
+
* errorHandler: (error) => {
|
|
269
|
+
* if (HttpError.is(error, 404)) {
|
|
270
|
+
* return <ProjectNotFound />;
|
|
271
|
+
* }
|
|
272
|
+
* }
|
|
273
|
+
* });
|
|
274
|
+
* ```
|
|
275
|
+
*
|
|
276
|
+
* @example Static generation with caching
|
|
277
|
+
* ```typescript
|
|
278
|
+
* const blogPost = $page({
|
|
279
|
+
* path: "/blog/:slug",
|
|
280
|
+
* static: {
|
|
281
|
+
* entries: posts.map(p => ({ params: { slug: p.slug } }))
|
|
282
|
+
* },
|
|
283
|
+
* loader: async ({ params }) => {
|
|
284
|
+
* const post = await loadPost(params.slug);
|
|
285
|
+
* return { post };
|
|
286
|
+
* }
|
|
287
|
+
* });
|
|
288
|
+
* ```
|
|
289
|
+
*/
|
|
290
|
+
declare const $page: {
|
|
291
|
+
<TConfig extends PageConfigSchema = PageConfigSchema, TProps extends object = any, TPropsParent extends object = TPropsParentDefault>(options: PagePrimitiveOptions<TConfig, TProps, TPropsParent>): PagePrimitive<TConfig, TProps, TPropsParent>;
|
|
292
|
+
[KIND]: typeof PagePrimitive;
|
|
293
|
+
};
|
|
294
|
+
interface PagePrimitiveOptions<TConfig extends PageConfigSchema = PageConfigSchema, TProps extends object = TPropsDefault, TPropsParent extends object = TPropsParentDefault> {
|
|
295
|
+
/**
|
|
296
|
+
* Identifier name for the page. Must be unique.
|
|
297
|
+
*
|
|
298
|
+
* @default Primitive key
|
|
299
|
+
*/
|
|
300
|
+
name?: string;
|
|
301
|
+
/**
|
|
302
|
+
* Add a pathname to the page.
|
|
303
|
+
*
|
|
304
|
+
* Pathname can contain parameters, like `/post/:slug`.
|
|
305
|
+
*
|
|
306
|
+
* @default ""
|
|
307
|
+
*/
|
|
308
|
+
path?: string;
|
|
309
|
+
/**
|
|
310
|
+
* Add an input schema to define:
|
|
311
|
+
* - `params`: parameters from the pathname.
|
|
312
|
+
* - `query`: query parameters from the URL.
|
|
313
|
+
*/
|
|
314
|
+
schema?: TConfig;
|
|
315
|
+
/**
|
|
316
|
+
* Load data before rendering the page.
|
|
317
|
+
*
|
|
318
|
+
* This function receives
|
|
319
|
+
* - the request context (params, query, etc.)
|
|
320
|
+
* - the parent props (if page has a parent)
|
|
321
|
+
*
|
|
322
|
+
* > In SSR, the returned data will be serialized and sent to the client, then reused during the client-side hydration.
|
|
323
|
+
*
|
|
324
|
+
* Loader can be stopped by throwing an error, which will be handled by the `errorHandler` function.
|
|
325
|
+
* It's common to throw a `NotFoundError` to display a 404 page.
|
|
326
|
+
*
|
|
327
|
+
* RedirectError can be thrown to redirect the user to another page.
|
|
328
|
+
*/
|
|
329
|
+
loader?: (context: PageLoader<TConfig, TPropsParent>) => Async<TProps>;
|
|
330
|
+
/**
|
|
331
|
+
* Default props to pass to the component when rendering the page.
|
|
332
|
+
*
|
|
333
|
+
* Resolved props from the `resolve` function will override these default props.
|
|
334
|
+
*/
|
|
335
|
+
props?: () => Partial<TProps>;
|
|
336
|
+
/**
|
|
337
|
+
* The component to render when the page is loaded.
|
|
338
|
+
*
|
|
339
|
+
* If `lazy` is defined, this will be ignored.
|
|
340
|
+
* Prefer using `lazy` to improve the initial loading time.
|
|
341
|
+
*/
|
|
342
|
+
component?: FC<TProps & TPropsParent>;
|
|
343
|
+
/**
|
|
344
|
+
* Lazy load the component when the page is loaded.
|
|
345
|
+
*
|
|
346
|
+
* It's recommended to use this for components to improve the initial loading time
|
|
347
|
+
* and enable code-splitting.
|
|
348
|
+
*/
|
|
349
|
+
lazy?: () => Promise<{
|
|
350
|
+
default: FC<TProps & TPropsParent>;
|
|
351
|
+
}>;
|
|
352
|
+
/**
|
|
353
|
+
* Attach child pages to create nested routes.
|
|
354
|
+
* This will make the page a parent route.
|
|
355
|
+
*/
|
|
356
|
+
children?: Array<PagePrimitive> | (() => Array<PagePrimitive>);
|
|
357
|
+
/**
|
|
358
|
+
* Define a parent page for nested routing.
|
|
359
|
+
*/
|
|
360
|
+
parent?: PagePrimitive<PageConfigSchema, TPropsParent, any>;
|
|
361
|
+
/**
|
|
362
|
+
* Function to determine if the page can be accessed.
|
|
363
|
+
*
|
|
364
|
+
* If it returns false, the page will not be accessible and a 403 Forbidden error will be returned.
|
|
365
|
+
* This function can be used to implement permission-based access control.
|
|
366
|
+
*/
|
|
367
|
+
can?: () => boolean;
|
|
368
|
+
/**
|
|
369
|
+
* Catch any error from the `loader` function or during `rendering`.
|
|
370
|
+
*
|
|
371
|
+
* Expected to return one of the following:
|
|
372
|
+
* - a ReactNode to render an error page
|
|
373
|
+
* - a Redirection to redirect the user
|
|
374
|
+
* - undefined to let the error propagate
|
|
375
|
+
*
|
|
376
|
+
* If not defined, the error will be thrown and handled by the server or client error handler.
|
|
377
|
+
* If a leaf $page does not define an error handler, the error can be caught by parent pages.
|
|
378
|
+
*
|
|
379
|
+
* @example Catch a 404 from API and render a custom not found component:
|
|
380
|
+
* ```ts
|
|
381
|
+
* loader: async ({ params, query }) => {
|
|
382
|
+
* api.fetch("/api/resource", { params, query });
|
|
383
|
+
* },
|
|
384
|
+
* errorHandler: (error, context) => {
|
|
385
|
+
* if (HttpError.is(error, 404)) {
|
|
386
|
+
* return <ResourceNotFound />;
|
|
387
|
+
* }
|
|
388
|
+
* }
|
|
389
|
+
* ```
|
|
390
|
+
*
|
|
391
|
+
* @example Catch an 401 error and redirect the user to the login page:
|
|
392
|
+
* ```ts
|
|
393
|
+
* loader: async ({ params, query }) => {
|
|
394
|
+
* // but the user is not authenticated
|
|
395
|
+
* api.fetch("/api/resource", { params, query });
|
|
396
|
+
* },
|
|
397
|
+
* errorHandler: (error, context) => {
|
|
398
|
+
* if (HttpError.is(error, 401)) {
|
|
399
|
+
* // throwing a Redirection is also valid!
|
|
400
|
+
* return new Redirection("/login");
|
|
401
|
+
* }
|
|
402
|
+
* }
|
|
403
|
+
* ```
|
|
404
|
+
*/
|
|
405
|
+
errorHandler?: ErrorHandler;
|
|
406
|
+
/**
|
|
407
|
+
* If true, the page will be considered as a static page, immutable and cacheable.
|
|
408
|
+
* Replace boolean by an object to define static entries. (e.g. list of params/query)
|
|
409
|
+
*
|
|
410
|
+
* Browser-side: it only works with `alepha/vite`, which can pre-render the page at build time.
|
|
411
|
+
*
|
|
412
|
+
* Server-side: It will act as timeless cached page. You can use `cache` to configure the cache behavior.
|
|
413
|
+
*/
|
|
414
|
+
static?: boolean | {
|
|
415
|
+
entries?: Array<Partial<PageRequestConfig<TConfig>>>;
|
|
416
|
+
};
|
|
417
|
+
cache?: ServerRouteCache;
|
|
418
|
+
/**
|
|
419
|
+
* If true, force the page to be rendered only on the client-side (browser).
|
|
420
|
+
* It uses the `<ClientOnly/>` component to render the page.
|
|
421
|
+
*/
|
|
422
|
+
client?: boolean | ClientOnlyProps;
|
|
423
|
+
/**
|
|
424
|
+
* Called before the server response is sent to the client. (server only)
|
|
425
|
+
*/
|
|
426
|
+
onServerResponse?: (request: ServerRequest) => unknown;
|
|
427
|
+
/**
|
|
428
|
+
* Called when user enters the page. (browser only)
|
|
429
|
+
*
|
|
430
|
+
* Useful for browser-only side effects like analytics, scroll management,
|
|
431
|
+
* or focus handling that don't need to return data to the component.
|
|
432
|
+
*
|
|
433
|
+
* @example
|
|
434
|
+
* ```ts
|
|
435
|
+
* onEnter: () => {
|
|
436
|
+
* analytics.trackPageView("/dashboard");
|
|
437
|
+
* window.scrollTo(0, 0);
|
|
438
|
+
* }
|
|
439
|
+
* ```
|
|
440
|
+
*/
|
|
441
|
+
onEnter?: () => void;
|
|
442
|
+
/**
|
|
443
|
+
* Called when user leaves the page. (browser only)
|
|
444
|
+
*/
|
|
445
|
+
onLeave?: () => void;
|
|
446
|
+
/**
|
|
447
|
+
* @experimental
|
|
448
|
+
*
|
|
449
|
+
* Add a css animation when the page is loaded or unloaded.
|
|
450
|
+
* It uses CSS animations, so you need to define the keyframes in your CSS.
|
|
451
|
+
*
|
|
452
|
+
* @example Simple animation name
|
|
453
|
+
* ```ts
|
|
454
|
+
* animation: "fadeIn"
|
|
455
|
+
* ```
|
|
456
|
+
*
|
|
457
|
+
* CSS example:
|
|
458
|
+
* ```css
|
|
459
|
+
* @keyframes fadeIn {
|
|
460
|
+
* from { opacity: 0; }
|
|
461
|
+
* to { opacity: 1; }
|
|
462
|
+
* }
|
|
463
|
+
* ```
|
|
464
|
+
*
|
|
465
|
+
* @example Detailed animation
|
|
466
|
+
* ```ts
|
|
467
|
+
* animation: {
|
|
468
|
+
* enter: { name: "fadeIn", duration: 300 },
|
|
469
|
+
* exit: { name: "fadeOut", duration: 200, timing: "ease-in-out" },
|
|
470
|
+
* }
|
|
471
|
+
* ```
|
|
472
|
+
*
|
|
473
|
+
* @example Only exit animation
|
|
474
|
+
* ```ts
|
|
475
|
+
* animation: {
|
|
476
|
+
* exit: "fadeOut"
|
|
477
|
+
* }
|
|
478
|
+
* ```
|
|
479
|
+
*
|
|
480
|
+
* @example With custom timing function
|
|
481
|
+
* ```ts
|
|
482
|
+
* animation: {
|
|
483
|
+
* enter: { name: "fadeIn", duration: 300, timing: "cubic-bezier(0.4, 0, 0.2, 1)" },
|
|
484
|
+
* exit: { name: "fadeOut", duration: 200, timing: "ease-in-out" },
|
|
485
|
+
* }
|
|
486
|
+
* ```
|
|
487
|
+
*/
|
|
488
|
+
animation?: PageAnimation;
|
|
489
|
+
/**
|
|
490
|
+
* Head configuration for the page (title, meta tags, etc.).
|
|
491
|
+
*
|
|
492
|
+
* Can be a static object or a function that receives resolved props.
|
|
493
|
+
*
|
|
494
|
+
* @example Static head
|
|
495
|
+
* ```ts
|
|
496
|
+
* head: {
|
|
497
|
+
* title: "My Page",
|
|
498
|
+
* description: "Page description",
|
|
499
|
+
* }
|
|
500
|
+
* ```
|
|
501
|
+
*
|
|
502
|
+
* @example Dynamic head based on props
|
|
503
|
+
* ```ts
|
|
504
|
+
* head: (props) => ({
|
|
505
|
+
* title: props.user.name,
|
|
506
|
+
* description: `Profile of ${props.user.name}`,
|
|
507
|
+
* })
|
|
508
|
+
* ```
|
|
509
|
+
*/
|
|
510
|
+
head?: Head | ((props: TProps, previous?: Head) => Head);
|
|
511
|
+
/**
|
|
512
|
+
* Source path for SSR module preloading.
|
|
513
|
+
*
|
|
514
|
+
* This is automatically injected by the viteAlephaPreload plugin.
|
|
515
|
+
* It maps to the source file path used in Vite's SSR manifest.
|
|
516
|
+
*
|
|
517
|
+
* @internal
|
|
518
|
+
*/
|
|
519
|
+
[PAGE_PRELOAD_KEY]?: string;
|
|
520
|
+
}
|
|
521
|
+
declare class PagePrimitive<TConfig extends PageConfigSchema = PageConfigSchema, TProps extends object = TPropsDefault, TPropsParent extends object = TPropsParentDefault> extends Primitive<PagePrimitiveOptions<TConfig, TProps, TPropsParent>> {
|
|
522
|
+
protected readonly reactPageService: ReactPageService;
|
|
523
|
+
protected onInit(): void;
|
|
524
|
+
get name(): string;
|
|
525
|
+
/**
|
|
526
|
+
* For testing or build purposes.
|
|
527
|
+
*
|
|
528
|
+
* This will render the page (HTML layout included or not) and return the HTML + context.
|
|
529
|
+
* Only valid for server-side rendering, it will throw an error if called on the client-side.
|
|
530
|
+
*/
|
|
531
|
+
render(options?: PagePrimitiveRenderOptions): Promise<PagePrimitiveRenderResult>;
|
|
532
|
+
fetch(options?: PagePrimitiveRenderOptions): Promise<{
|
|
533
|
+
html: string;
|
|
534
|
+
response: Response;
|
|
535
|
+
}>;
|
|
536
|
+
}
|
|
537
|
+
type ErrorHandler = (error: Error, state: ReactRouterState) => ReactNode | Redirection | undefined;
|
|
538
|
+
interface PageConfigSchema {
|
|
539
|
+
query?: TSchema;
|
|
540
|
+
params?: TSchema;
|
|
541
|
+
}
|
|
542
|
+
type TPropsDefault = any;
|
|
543
|
+
type TPropsParentDefault = {};
|
|
544
|
+
interface PagePrimitiveRenderOptions {
|
|
545
|
+
params?: Record<string, string>;
|
|
546
|
+
query?: Record<string, string>;
|
|
547
|
+
/**
|
|
548
|
+
* If true, the HTML layout will be included in the response.
|
|
549
|
+
* If false, only the page content will be returned.
|
|
550
|
+
*
|
|
551
|
+
* @default true
|
|
552
|
+
*/
|
|
553
|
+
html?: boolean;
|
|
554
|
+
hydration?: boolean;
|
|
555
|
+
}
|
|
556
|
+
interface PagePrimitiveRenderResult {
|
|
557
|
+
html: string;
|
|
558
|
+
state: ReactRouterState;
|
|
559
|
+
redirect?: string;
|
|
560
|
+
}
|
|
561
|
+
interface PageRequestConfig<TConfig extends PageConfigSchema = PageConfigSchema> {
|
|
562
|
+
params: TConfig["params"] extends TSchema ? Static<TConfig["params"]> : Record<string, string>;
|
|
563
|
+
query: TConfig["query"] extends TSchema ? Static<TConfig["query"]> : Record<string, string>;
|
|
564
|
+
}
|
|
565
|
+
type PageLoader<TConfig extends PageConfigSchema = PageConfigSchema, TPropsParent extends object = TPropsParentDefault> = PageRequestConfig<TConfig> & TPropsParent & Omit<ReactRouterState, "layers" | "onError">;
|
|
566
|
+
type PageAnimation = PageAnimationObject | ((state: ReactRouterState) => PageAnimationObject | undefined);
|
|
567
|
+
type PageAnimationObject = CssAnimationName | {
|
|
568
|
+
enter?: CssAnimation | CssAnimationName;
|
|
569
|
+
exit?: CssAnimation | CssAnimationName;
|
|
570
|
+
};
|
|
571
|
+
type CssAnimationName = string;
|
|
572
|
+
type CssAnimation = {
|
|
573
|
+
name: string;
|
|
574
|
+
duration?: number;
|
|
575
|
+
timing?: string;
|
|
576
|
+
};
|
|
577
|
+
//#endregion
|
|
578
|
+
//#region ../../src/react/router/services/ReactRouter.d.ts
|
|
579
|
+
interface RouterPushOptions {
|
|
580
|
+
replace?: boolean;
|
|
581
|
+
params?: Record<string, string>;
|
|
582
|
+
query?: Record<string, string>;
|
|
583
|
+
meta?: Record<string, any>;
|
|
584
|
+
/**
|
|
585
|
+
* Recreate the whole page, ignoring the current state.
|
|
586
|
+
*/
|
|
587
|
+
force?: boolean;
|
|
588
|
+
}
|
|
589
|
+
/**
|
|
590
|
+
* Friendly browser router API.
|
|
591
|
+
*
|
|
592
|
+
* Can be safely used server-side, but most methods will be no-op.
|
|
593
|
+
*/
|
|
594
|
+
declare class ReactRouter<T extends object> {
|
|
595
|
+
protected readonly alepha: Alepha;
|
|
596
|
+
protected readonly pageApi: ReactPageProvider;
|
|
597
|
+
get state(): ReactRouterState;
|
|
598
|
+
get pages(): PageRoute[];
|
|
599
|
+
get concretePages(): ConcretePageRoute[];
|
|
600
|
+
get browser(): ReactBrowserProvider | undefined;
|
|
601
|
+
isActive(href: string, options?: {
|
|
602
|
+
startWith?: boolean;
|
|
603
|
+
}): boolean;
|
|
604
|
+
node(name: keyof VirtualRouter<T> | string, config?: {
|
|
605
|
+
params?: Record<string, any>;
|
|
606
|
+
query?: Record<string, any>;
|
|
607
|
+
}): any;
|
|
608
|
+
path(name: keyof VirtualRouter<T> | string, config?: {
|
|
609
|
+
params?: Record<string, any>;
|
|
610
|
+
query?: Record<string, any>;
|
|
611
|
+
}): string;
|
|
612
|
+
/**
|
|
613
|
+
* Reload the current page.
|
|
614
|
+
* This is equivalent to calling `go()` with the current pathname and search.
|
|
615
|
+
*/
|
|
616
|
+
reload(): Promise<void>;
|
|
617
|
+
getURL(): URL;
|
|
618
|
+
get location(): Location;
|
|
619
|
+
get current(): ReactRouterState;
|
|
620
|
+
get pathname(): string;
|
|
621
|
+
get query(): Record<string, string>;
|
|
622
|
+
back(): Promise<void>;
|
|
623
|
+
forward(): Promise<void>;
|
|
624
|
+
invalidate(props?: Record<string, any>): Promise<void>;
|
|
625
|
+
push(path: string, options?: RouterPushOptions): Promise<void>;
|
|
626
|
+
push(path: keyof VirtualRouter<T>, options?: RouterPushOptions): Promise<void>;
|
|
627
|
+
anchor(path: string, options?: RouterPushOptions): AnchorProps;
|
|
628
|
+
anchor(path: keyof VirtualRouter<T>, options?: RouterPushOptions): AnchorProps;
|
|
629
|
+
base(path: string): string;
|
|
630
|
+
/**
|
|
631
|
+
* Set query params.
|
|
632
|
+
*
|
|
633
|
+
* @param record
|
|
634
|
+
* @param options
|
|
635
|
+
*/
|
|
636
|
+
setQueryParams(record: Record<string, any> | ((queryParams: Record<string, any>) => Record<string, any>), options?: {
|
|
637
|
+
/**
|
|
638
|
+
* If true, this will add a new entry to the history stack.
|
|
639
|
+
*/
|
|
640
|
+
push?: boolean;
|
|
641
|
+
}): void;
|
|
642
|
+
}
|
|
643
|
+
type VirtualRouter<T> = { [K in keyof T as T[K] extends PagePrimitive ? K : never]: T[K] };
|
|
644
|
+
//#endregion
|
|
645
|
+
//#region ../../src/react/router/providers/ReactBrowserRouterProvider.d.ts
|
|
646
|
+
interface BrowserRoute extends Route {
|
|
647
|
+
page: PageRoute;
|
|
648
|
+
}
|
|
649
|
+
/**
|
|
650
|
+
* Implementation of AlephaRouter for React in browser environment.
|
|
651
|
+
*/
|
|
652
|
+
declare class ReactBrowserRouterProvider extends RouterProvider<BrowserRoute> {
|
|
653
|
+
protected readonly log: alepha_logger0.Logger;
|
|
654
|
+
protected readonly alepha: Alepha;
|
|
655
|
+
protected readonly pageApi: ReactPageProvider;
|
|
656
|
+
protected readonly browserHeadProvider: BrowserHeadProvider;
|
|
657
|
+
add(entry: PageRouteEntry): void;
|
|
658
|
+
protected readonly configure: alepha6.HookPrimitive<"configure">;
|
|
659
|
+
transition(url: URL, previous?: PreviousLayerData[], meta?: {}): Promise<string | void>;
|
|
660
|
+
root(state: ReactRouterState): ReactNode;
|
|
661
|
+
}
|
|
662
|
+
//#endregion
|
|
663
|
+
//#region ../../src/react/router/providers/ReactBrowserProvider.d.ts
|
|
664
|
+
/**
|
|
665
|
+
* React browser renderer configuration atom
|
|
666
|
+
*/
|
|
667
|
+
declare const reactBrowserOptions: alepha6.Atom<alepha6.TObject<{
|
|
668
|
+
scrollRestoration: alepha6.TUnsafe<"top" | "manual">;
|
|
669
|
+
}>, "alepha.react.browser.options">;
|
|
670
|
+
type ReactBrowserRendererOptions = Static<typeof reactBrowserOptions.schema>;
|
|
671
|
+
declare module "alepha" {
|
|
672
|
+
interface State {
|
|
673
|
+
[reactBrowserOptions.key]: ReactBrowserRendererOptions;
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
declare class ReactBrowserProvider {
|
|
677
|
+
protected readonly log: alepha_logger0.Logger;
|
|
678
|
+
protected readonly client: LinkProvider;
|
|
679
|
+
protected readonly alepha: Alepha;
|
|
680
|
+
protected readonly router: ReactBrowserRouterProvider;
|
|
681
|
+
protected readonly dateTimeProvider: DateTimeProvider;
|
|
682
|
+
protected readonly browserHeadProvider: BrowserHeadProvider;
|
|
683
|
+
protected readonly options: Readonly<{
|
|
684
|
+
scrollRestoration: "top" | "manual";
|
|
685
|
+
}>;
|
|
686
|
+
get rootId(): string;
|
|
687
|
+
protected getRootElement(): HTMLElement;
|
|
688
|
+
transitioning?: {
|
|
689
|
+
to: string;
|
|
690
|
+
from?: string;
|
|
691
|
+
};
|
|
692
|
+
get state(): ReactRouterState;
|
|
693
|
+
/**
|
|
694
|
+
* Accessor for Document DOM API.
|
|
695
|
+
*/
|
|
696
|
+
get document(): Document;
|
|
697
|
+
/**
|
|
698
|
+
* Accessor for History DOM API.
|
|
699
|
+
*/
|
|
700
|
+
get history(): History;
|
|
701
|
+
/**
|
|
702
|
+
* Accessor for Location DOM API.
|
|
703
|
+
*/
|
|
704
|
+
get location(): Location;
|
|
705
|
+
get base(): string;
|
|
706
|
+
get url(): string;
|
|
707
|
+
pushState(path: string, replace?: boolean): void;
|
|
708
|
+
invalidate(props?: Record<string, any>): Promise<void>;
|
|
709
|
+
push(url: string, options?: RouterPushOptions): Promise<void>;
|
|
710
|
+
protected render(options?: RouterRenderOptions): Promise<void>;
|
|
711
|
+
/**
|
|
712
|
+
* Get embedded layers from the server.
|
|
713
|
+
*/
|
|
714
|
+
protected getHydrationState(): ReactHydrationState | undefined;
|
|
715
|
+
protected readonly onTransitionEnd: alepha6.HookPrimitive<"react:transition:end">;
|
|
716
|
+
readonly ready: alepha6.HookPrimitive<"ready">;
|
|
717
|
+
}
|
|
718
|
+
type ReactHydrationState = {
|
|
719
|
+
layers?: Array<PreviousLayerData>;
|
|
720
|
+
} & {
|
|
721
|
+
[key: string]: any;
|
|
722
|
+
};
|
|
723
|
+
interface RouterRenderOptions {
|
|
724
|
+
url?: string;
|
|
725
|
+
previous?: PreviousLayerData[];
|
|
726
|
+
meta?: Record<string, any>;
|
|
727
|
+
}
|
|
728
|
+
//#endregion
|
|
729
|
+
//#region ../../src/react/router/components/ErrorViewer.d.ts
|
|
730
|
+
interface ErrorViewerProps {
|
|
731
|
+
error: Error;
|
|
732
|
+
alepha: Alepha;
|
|
733
|
+
}
|
|
734
|
+
/**
|
|
735
|
+
* Error viewer component - Terminal/brutalist aesthetic
|
|
736
|
+
*/
|
|
737
|
+
declare const ErrorViewer: ({
|
|
738
|
+
error,
|
|
739
|
+
alepha
|
|
740
|
+
}: ErrorViewerProps) => react_jsx_runtime0.JSX.Element;
|
|
741
|
+
//#endregion
|
|
742
|
+
//#region ../../src/react/router/components/Link.d.ts
|
|
743
|
+
interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
744
|
+
href: string;
|
|
745
|
+
}
|
|
746
|
+
/**
|
|
747
|
+
* Link component for client-side navigation.
|
|
748
|
+
*
|
|
749
|
+
* It's a simple wrapper around an anchor (`<a>`) element using the `useRouter` hook.
|
|
750
|
+
*/
|
|
751
|
+
declare const Link: (props: LinkProps) => react0.DetailedReactHTMLElement<{
|
|
752
|
+
href: string;
|
|
753
|
+
onClick: (ev?: any) => any;
|
|
754
|
+
download?: any;
|
|
755
|
+
hrefLang?: string | undefined;
|
|
756
|
+
media?: string | undefined;
|
|
757
|
+
ping?: string | undefined;
|
|
758
|
+
target?: react0.HTMLAttributeAnchorTarget | undefined;
|
|
759
|
+
type?: string | undefined;
|
|
760
|
+
referrerPolicy?: react0.HTMLAttributeReferrerPolicy | undefined;
|
|
761
|
+
defaultChecked?: boolean | undefined;
|
|
762
|
+
defaultValue?: string | number | readonly string[] | undefined;
|
|
763
|
+
suppressContentEditableWarning?: boolean | undefined;
|
|
764
|
+
suppressHydrationWarning?: boolean | undefined;
|
|
765
|
+
accessKey?: string | undefined;
|
|
766
|
+
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {});
|
|
767
|
+
autoFocus?: boolean | undefined;
|
|
768
|
+
className?: string | undefined;
|
|
769
|
+
contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
770
|
+
contextMenu?: string | undefined;
|
|
771
|
+
dir?: string | undefined;
|
|
772
|
+
draggable?: (boolean | "true" | "false") | undefined;
|
|
773
|
+
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined;
|
|
774
|
+
hidden?: boolean | undefined;
|
|
775
|
+
id?: string | undefined;
|
|
776
|
+
lang?: string | undefined;
|
|
777
|
+
nonce?: string | undefined;
|
|
778
|
+
slot?: string | undefined;
|
|
779
|
+
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
780
|
+
style?: react0.CSSProperties | undefined;
|
|
781
|
+
tabIndex?: number | undefined;
|
|
782
|
+
title?: string | undefined;
|
|
783
|
+
translate?: "yes" | "no" | undefined;
|
|
784
|
+
radioGroup?: string | undefined;
|
|
785
|
+
role?: react0.AriaRole | undefined;
|
|
786
|
+
about?: string | undefined;
|
|
787
|
+
content?: string | undefined;
|
|
788
|
+
datatype?: string | undefined;
|
|
789
|
+
inlist?: any;
|
|
790
|
+
prefix?: string | undefined;
|
|
791
|
+
property?: string | undefined;
|
|
792
|
+
rel?: string | undefined;
|
|
793
|
+
resource?: string | undefined;
|
|
794
|
+
rev?: string | undefined;
|
|
795
|
+
typeof?: string | undefined;
|
|
796
|
+
vocab?: string | undefined;
|
|
797
|
+
autoCorrect?: string | undefined;
|
|
798
|
+
autoSave?: string | undefined;
|
|
799
|
+
color?: string | undefined;
|
|
800
|
+
itemProp?: string | undefined;
|
|
801
|
+
itemScope?: boolean | undefined;
|
|
802
|
+
itemType?: string | undefined;
|
|
803
|
+
itemID?: string | undefined;
|
|
804
|
+
itemRef?: string | undefined;
|
|
805
|
+
results?: number | undefined;
|
|
806
|
+
security?: string | undefined;
|
|
807
|
+
unselectable?: "on" | "off" | undefined;
|
|
808
|
+
popover?: "" | "auto" | "manual" | "hint" | undefined;
|
|
809
|
+
popoverTargetAction?: "toggle" | "show" | "hide" | undefined;
|
|
810
|
+
popoverTarget?: string | undefined;
|
|
811
|
+
inert?: boolean | undefined;
|
|
812
|
+
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined;
|
|
813
|
+
is?: string | undefined;
|
|
814
|
+
exportparts?: string | undefined;
|
|
815
|
+
part?: string | undefined;
|
|
816
|
+
"aria-activedescendant"?: string | undefined;
|
|
817
|
+
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
818
|
+
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined;
|
|
819
|
+
"aria-braillelabel"?: string | undefined;
|
|
820
|
+
"aria-brailleroledescription"?: string | undefined;
|
|
821
|
+
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
822
|
+
"aria-checked"?: boolean | "false" | "mixed" | "true" | undefined;
|
|
823
|
+
"aria-colcount"?: number | undefined;
|
|
824
|
+
"aria-colindex"?: number | undefined;
|
|
825
|
+
"aria-colindextext"?: string | undefined;
|
|
826
|
+
"aria-colspan"?: number | undefined;
|
|
827
|
+
"aria-controls"?: string | undefined;
|
|
828
|
+
"aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined;
|
|
829
|
+
"aria-describedby"?: string | undefined;
|
|
830
|
+
"aria-description"?: string | undefined;
|
|
831
|
+
"aria-details"?: string | undefined;
|
|
832
|
+
"aria-disabled"?: (boolean | "true" | "false") | undefined;
|
|
833
|
+
"aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined;
|
|
834
|
+
"aria-errormessage"?: string | undefined;
|
|
835
|
+
"aria-expanded"?: (boolean | "true" | "false") | undefined;
|
|
836
|
+
"aria-flowto"?: string | undefined;
|
|
837
|
+
"aria-grabbed"?: (boolean | "true" | "false") | undefined;
|
|
838
|
+
"aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined;
|
|
839
|
+
"aria-hidden"?: (boolean | "true" | "false") | undefined;
|
|
840
|
+
"aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
|
|
841
|
+
"aria-keyshortcuts"?: string | undefined;
|
|
842
|
+
"aria-label"?: string | undefined;
|
|
843
|
+
"aria-labelledby"?: string | undefined;
|
|
844
|
+
"aria-level"?: number | undefined;
|
|
845
|
+
"aria-live"?: "off" | "assertive" | "polite" | undefined;
|
|
846
|
+
"aria-modal"?: (boolean | "true" | "false") | undefined;
|
|
847
|
+
"aria-multiline"?: (boolean | "true" | "false") | undefined;
|
|
848
|
+
"aria-multiselectable"?: (boolean | "true" | "false") | undefined;
|
|
849
|
+
"aria-orientation"?: "horizontal" | "vertical" | undefined;
|
|
850
|
+
"aria-owns"?: string | undefined;
|
|
851
|
+
"aria-placeholder"?: string | undefined;
|
|
852
|
+
"aria-posinset"?: number | undefined;
|
|
853
|
+
"aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined;
|
|
854
|
+
"aria-readonly"?: (boolean | "true" | "false") | undefined;
|
|
855
|
+
"aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined;
|
|
856
|
+
"aria-required"?: (boolean | "true" | "false") | undefined;
|
|
857
|
+
"aria-roledescription"?: string | undefined;
|
|
858
|
+
"aria-rowcount"?: number | undefined;
|
|
859
|
+
"aria-rowindex"?: number | undefined;
|
|
860
|
+
"aria-rowindextext"?: string | undefined;
|
|
861
|
+
"aria-rowspan"?: number | undefined;
|
|
862
|
+
"aria-selected"?: (boolean | "true" | "false") | undefined;
|
|
863
|
+
"aria-setsize"?: number | undefined;
|
|
864
|
+
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
|
|
865
|
+
"aria-valuemax"?: number | undefined;
|
|
866
|
+
"aria-valuemin"?: number | undefined;
|
|
867
|
+
"aria-valuenow"?: number | undefined;
|
|
868
|
+
"aria-valuetext"?: string | undefined;
|
|
869
|
+
children?: react0.ReactNode | undefined;
|
|
870
|
+
dangerouslySetInnerHTML?: {
|
|
871
|
+
__html: string | TrustedHTML;
|
|
872
|
+
} | undefined;
|
|
873
|
+
onCopy?: react0.ClipboardEventHandler<HTMLAnchorElement> | undefined;
|
|
874
|
+
onCopyCapture?: react0.ClipboardEventHandler<HTMLAnchorElement> | undefined;
|
|
875
|
+
onCut?: react0.ClipboardEventHandler<HTMLAnchorElement> | undefined;
|
|
876
|
+
onCutCapture?: react0.ClipboardEventHandler<HTMLAnchorElement> | undefined;
|
|
877
|
+
onPaste?: react0.ClipboardEventHandler<HTMLAnchorElement> | undefined;
|
|
878
|
+
onPasteCapture?: react0.ClipboardEventHandler<HTMLAnchorElement> | undefined;
|
|
879
|
+
onCompositionEnd?: react0.CompositionEventHandler<HTMLAnchorElement> | undefined;
|
|
880
|
+
onCompositionEndCapture?: react0.CompositionEventHandler<HTMLAnchorElement> | undefined;
|
|
881
|
+
onCompositionStart?: react0.CompositionEventHandler<HTMLAnchorElement> | undefined;
|
|
882
|
+
onCompositionStartCapture?: react0.CompositionEventHandler<HTMLAnchorElement> | undefined;
|
|
883
|
+
onCompositionUpdate?: react0.CompositionEventHandler<HTMLAnchorElement> | undefined;
|
|
884
|
+
onCompositionUpdateCapture?: react0.CompositionEventHandler<HTMLAnchorElement> | undefined;
|
|
885
|
+
onFocus?: react0.FocusEventHandler<HTMLAnchorElement> | undefined;
|
|
886
|
+
onFocusCapture?: react0.FocusEventHandler<HTMLAnchorElement> | undefined;
|
|
887
|
+
onBlur?: react0.FocusEventHandler<HTMLAnchorElement> | undefined;
|
|
888
|
+
onBlurCapture?: react0.FocusEventHandler<HTMLAnchorElement> | undefined;
|
|
889
|
+
onChange?: react0.ChangeEventHandler<HTMLAnchorElement, Element> | undefined;
|
|
890
|
+
onChangeCapture?: react0.ChangeEventHandler<HTMLAnchorElement, Element> | undefined;
|
|
891
|
+
onBeforeInput?: react0.InputEventHandler<HTMLAnchorElement> | undefined;
|
|
892
|
+
onBeforeInputCapture?: react0.InputEventHandler<HTMLAnchorElement> | undefined;
|
|
893
|
+
onInput?: react0.InputEventHandler<HTMLAnchorElement> | undefined;
|
|
894
|
+
onInputCapture?: react0.InputEventHandler<HTMLAnchorElement> | undefined;
|
|
895
|
+
onReset?: react0.ReactEventHandler<HTMLAnchorElement> | undefined;
|
|
896
|
+
onResetCapture?: react0.ReactEventHandler<HTMLAnchorElement> | undefined;
|
|
897
|
+
onSubmit?: react0.SubmitEventHandler<HTMLAnchorElement> | undefined;
|
|
898
|
+
onSubmitCapture?: react0.SubmitEventHandler<HTMLAnchorElement> | undefined;
|
|
899
|
+
onInvalid?: react0.ReactEventHandler<HTMLAnchorElement> | undefined;
|
|
900
|
+
onInvalidCapture?: react0.ReactEventHandler<HTMLAnchorElement> | undefined;
|
|
901
|
+
onLoad?: react0.ReactEventHandler<HTMLAnchorElement> | undefined;
|
|
902
|
+
onLoadCapture?: react0.ReactEventHandler<HTMLAnchorElement> | undefined;
|
|
903
|
+
onError?: react0.ReactEventHandler<HTMLAnchorElement> | undefined;
|
|
904
|
+
onErrorCapture?: react0.ReactEventHandler<HTMLAnchorElement> | undefined;
|
|
905
|
+
onKeyDown?: react0.KeyboardEventHandler<HTMLAnchorElement> | undefined;
|
|
906
|
+
onKeyDownCapture?: react0.KeyboardEventHandler<HTMLAnchorElement> | undefined;
|
|
907
|
+
onKeyPress?: react0.KeyboardEventHandler<HTMLAnchorElement> | undefined;
|
|
908
|
+
onKeyPressCapture?: react0.KeyboardEventHandler<HTMLAnchorElement> | undefined;
|
|
909
|
+
onKeyUp?: react0.KeyboardEventHandler<HTMLAnchorElement> | undefined;
|
|
910
|
+
onKeyUpCapture?: react0.KeyboardEventHandler<HTMLAnchorElement> | undefined;
|
|
911
|
+
onAbort?: react0.ReactEventHandler<HTMLAnchorElement> | undefined;
|
|
912
|
+
onAbortCapture?: react0.ReactEventHandler<HTMLAnchorElement> | undefined;
|
|
913
|
+
onCanPlay?: react0.ReactEventHandler<HTMLAnchorElement> | undefined;
|
|
914
|
+
onCanPlayCapture?: react0.ReactEventHandler<HTMLAnchorElement> | undefined;
|
|
915
|
+
onCanPlayThrough?: react0.ReactEventHandler<HTMLAnchorElement> | undefined;
|
|
916
|
+
onCanPlayThroughCapture?: react0.ReactEventHandler<HTMLAnchorElement> | undefined;
|
|
917
|
+
onDurationChange?: react0.ReactEventHandler<HTMLAnchorElement> | undefined;
|
|
918
|
+
onDurationChangeCapture?: react0.ReactEventHandler<HTMLAnchorElement> | undefined;
|
|
919
|
+
onEmptied?: react0.ReactEventHandler<HTMLAnchorElement> | undefined;
|
|
920
|
+
onEmptiedCapture?: react0.ReactEventHandler<HTMLAnchorElement> | undefined;
|
|
921
|
+
onEncrypted?: react0.ReactEventHandler<HTMLAnchorElement> | undefined;
|
|
922
|
+
onEncryptedCapture?: react0.ReactEventHandler<HTMLAnchorElement> | undefined;
|
|
923
|
+
onEnded?: react0.ReactEventHandler<HTMLAnchorElement> | undefined;
|
|
924
|
+
onEndedCapture?: react0.ReactEventHandler<HTMLAnchorElement> | undefined;
|
|
925
|
+
onLoadedData?: react0.ReactEventHandler<HTMLAnchorElement> | undefined;
|
|
926
|
+
onLoadedDataCapture?: react0.ReactEventHandler<HTMLAnchorElement> | undefined;
|
|
927
|
+
onLoadedMetadata?: react0.ReactEventHandler<HTMLAnchorElement> | undefined;
|
|
928
|
+
onLoadedMetadataCapture?: react0.ReactEventHandler<HTMLAnchorElement> | undefined;
|
|
929
|
+
onLoadStart?: react0.ReactEventHandler<HTMLAnchorElement> | undefined;
|
|
930
|
+
onLoadStartCapture?: react0.ReactEventHandler<HTMLAnchorElement> | undefined;
|
|
931
|
+
onPause?: react0.ReactEventHandler<HTMLAnchorElement> | undefined;
|
|
932
|
+
onPauseCapture?: react0.ReactEventHandler<HTMLAnchorElement> | undefined;
|
|
933
|
+
onPlay?: react0.ReactEventHandler<HTMLAnchorElement> | undefined;
|
|
934
|
+
onPlayCapture?: react0.ReactEventHandler<HTMLAnchorElement> | undefined;
|
|
935
|
+
onPlaying?: react0.ReactEventHandler<HTMLAnchorElement> | undefined;
|
|
936
|
+
onPlayingCapture?: react0.ReactEventHandler<HTMLAnchorElement> | undefined;
|
|
937
|
+
onProgress?: react0.ReactEventHandler<HTMLAnchorElement> | undefined;
|
|
938
|
+
onProgressCapture?: react0.ReactEventHandler<HTMLAnchorElement> | undefined;
|
|
939
|
+
onRateChange?: react0.ReactEventHandler<HTMLAnchorElement> | undefined;
|
|
940
|
+
onRateChangeCapture?: react0.ReactEventHandler<HTMLAnchorElement> | undefined;
|
|
941
|
+
onSeeked?: react0.ReactEventHandler<HTMLAnchorElement> | undefined;
|
|
942
|
+
onSeekedCapture?: react0.ReactEventHandler<HTMLAnchorElement> | undefined;
|
|
943
|
+
onSeeking?: react0.ReactEventHandler<HTMLAnchorElement> | undefined;
|
|
944
|
+
onSeekingCapture?: react0.ReactEventHandler<HTMLAnchorElement> | undefined;
|
|
945
|
+
onStalled?: react0.ReactEventHandler<HTMLAnchorElement> | undefined;
|
|
946
|
+
onStalledCapture?: react0.ReactEventHandler<HTMLAnchorElement> | undefined;
|
|
947
|
+
onSuspend?: react0.ReactEventHandler<HTMLAnchorElement> | undefined;
|
|
948
|
+
onSuspendCapture?: react0.ReactEventHandler<HTMLAnchorElement> | undefined;
|
|
949
|
+
onTimeUpdate?: react0.ReactEventHandler<HTMLAnchorElement> | undefined;
|
|
950
|
+
onTimeUpdateCapture?: react0.ReactEventHandler<HTMLAnchorElement> | undefined;
|
|
951
|
+
onVolumeChange?: react0.ReactEventHandler<HTMLAnchorElement> | undefined;
|
|
952
|
+
onVolumeChangeCapture?: react0.ReactEventHandler<HTMLAnchorElement> | undefined;
|
|
953
|
+
onWaiting?: react0.ReactEventHandler<HTMLAnchorElement> | undefined;
|
|
954
|
+
onWaitingCapture?: react0.ReactEventHandler<HTMLAnchorElement> | undefined;
|
|
955
|
+
onAuxClick?: react0.MouseEventHandler<HTMLAnchorElement> | undefined;
|
|
956
|
+
onAuxClickCapture?: react0.MouseEventHandler<HTMLAnchorElement> | undefined;
|
|
957
|
+
onClickCapture?: react0.MouseEventHandler<HTMLAnchorElement> | undefined;
|
|
958
|
+
onContextMenu?: react0.MouseEventHandler<HTMLAnchorElement> | undefined;
|
|
959
|
+
onContextMenuCapture?: react0.MouseEventHandler<HTMLAnchorElement> | undefined;
|
|
960
|
+
onDoubleClick?: react0.MouseEventHandler<HTMLAnchorElement> | undefined;
|
|
961
|
+
onDoubleClickCapture?: react0.MouseEventHandler<HTMLAnchorElement> | undefined;
|
|
962
|
+
onDrag?: react0.DragEventHandler<HTMLAnchorElement> | undefined;
|
|
963
|
+
onDragCapture?: react0.DragEventHandler<HTMLAnchorElement> | undefined;
|
|
964
|
+
onDragEnd?: react0.DragEventHandler<HTMLAnchorElement> | undefined;
|
|
965
|
+
onDragEndCapture?: react0.DragEventHandler<HTMLAnchorElement> | undefined;
|
|
966
|
+
onDragEnter?: react0.DragEventHandler<HTMLAnchorElement> | undefined;
|
|
967
|
+
onDragEnterCapture?: react0.DragEventHandler<HTMLAnchorElement> | undefined;
|
|
968
|
+
onDragExit?: react0.DragEventHandler<HTMLAnchorElement> | undefined;
|
|
969
|
+
onDragExitCapture?: react0.DragEventHandler<HTMLAnchorElement> | undefined;
|
|
970
|
+
onDragLeave?: react0.DragEventHandler<HTMLAnchorElement> | undefined;
|
|
971
|
+
onDragLeaveCapture?: react0.DragEventHandler<HTMLAnchorElement> | undefined;
|
|
972
|
+
onDragOver?: react0.DragEventHandler<HTMLAnchorElement> | undefined;
|
|
973
|
+
onDragOverCapture?: react0.DragEventHandler<HTMLAnchorElement> | undefined;
|
|
974
|
+
onDragStart?: react0.DragEventHandler<HTMLAnchorElement> | undefined;
|
|
975
|
+
onDragStartCapture?: react0.DragEventHandler<HTMLAnchorElement> | undefined;
|
|
976
|
+
onDrop?: react0.DragEventHandler<HTMLAnchorElement> | undefined;
|
|
977
|
+
onDropCapture?: react0.DragEventHandler<HTMLAnchorElement> | undefined;
|
|
978
|
+
onMouseDown?: react0.MouseEventHandler<HTMLAnchorElement> | undefined;
|
|
979
|
+
onMouseDownCapture?: react0.MouseEventHandler<HTMLAnchorElement> | undefined;
|
|
980
|
+
onMouseEnter?: react0.MouseEventHandler<HTMLAnchorElement> | undefined;
|
|
981
|
+
onMouseLeave?: react0.MouseEventHandler<HTMLAnchorElement> | undefined;
|
|
982
|
+
onMouseMove?: react0.MouseEventHandler<HTMLAnchorElement> | undefined;
|
|
983
|
+
onMouseMoveCapture?: react0.MouseEventHandler<HTMLAnchorElement> | undefined;
|
|
984
|
+
onMouseOut?: react0.MouseEventHandler<HTMLAnchorElement> | undefined;
|
|
985
|
+
onMouseOutCapture?: react0.MouseEventHandler<HTMLAnchorElement> | undefined;
|
|
986
|
+
onMouseOver?: react0.MouseEventHandler<HTMLAnchorElement> | undefined;
|
|
987
|
+
onMouseOverCapture?: react0.MouseEventHandler<HTMLAnchorElement> | undefined;
|
|
988
|
+
onMouseUp?: react0.MouseEventHandler<HTMLAnchorElement> | undefined;
|
|
989
|
+
onMouseUpCapture?: react0.MouseEventHandler<HTMLAnchorElement> | undefined;
|
|
990
|
+
onSelect?: react0.ReactEventHandler<HTMLAnchorElement> | undefined;
|
|
991
|
+
onSelectCapture?: react0.ReactEventHandler<HTMLAnchorElement> | undefined;
|
|
992
|
+
onTouchCancel?: react0.TouchEventHandler<HTMLAnchorElement> | undefined;
|
|
993
|
+
onTouchCancelCapture?: react0.TouchEventHandler<HTMLAnchorElement> | undefined;
|
|
994
|
+
onTouchEnd?: react0.TouchEventHandler<HTMLAnchorElement> | undefined;
|
|
995
|
+
onTouchEndCapture?: react0.TouchEventHandler<HTMLAnchorElement> | undefined;
|
|
996
|
+
onTouchMove?: react0.TouchEventHandler<HTMLAnchorElement> | undefined;
|
|
997
|
+
onTouchMoveCapture?: react0.TouchEventHandler<HTMLAnchorElement> | undefined;
|
|
998
|
+
onTouchStart?: react0.TouchEventHandler<HTMLAnchorElement> | undefined;
|
|
999
|
+
onTouchStartCapture?: react0.TouchEventHandler<HTMLAnchorElement> | undefined;
|
|
1000
|
+
onPointerDown?: react0.PointerEventHandler<HTMLAnchorElement> | undefined;
|
|
1001
|
+
onPointerDownCapture?: react0.PointerEventHandler<HTMLAnchorElement> | undefined;
|
|
1002
|
+
onPointerMove?: react0.PointerEventHandler<HTMLAnchorElement> | undefined;
|
|
1003
|
+
onPointerMoveCapture?: react0.PointerEventHandler<HTMLAnchorElement> | undefined;
|
|
1004
|
+
onPointerUp?: react0.PointerEventHandler<HTMLAnchorElement> | undefined;
|
|
1005
|
+
onPointerUpCapture?: react0.PointerEventHandler<HTMLAnchorElement> | undefined;
|
|
1006
|
+
onPointerCancel?: react0.PointerEventHandler<HTMLAnchorElement> | undefined;
|
|
1007
|
+
onPointerCancelCapture?: react0.PointerEventHandler<HTMLAnchorElement> | undefined;
|
|
1008
|
+
onPointerEnter?: react0.PointerEventHandler<HTMLAnchorElement> | undefined;
|
|
1009
|
+
onPointerLeave?: react0.PointerEventHandler<HTMLAnchorElement> | undefined;
|
|
1010
|
+
onPointerOver?: react0.PointerEventHandler<HTMLAnchorElement> | undefined;
|
|
1011
|
+
onPointerOverCapture?: react0.PointerEventHandler<HTMLAnchorElement> | undefined;
|
|
1012
|
+
onPointerOut?: react0.PointerEventHandler<HTMLAnchorElement> | undefined;
|
|
1013
|
+
onPointerOutCapture?: react0.PointerEventHandler<HTMLAnchorElement> | undefined;
|
|
1014
|
+
onGotPointerCapture?: react0.PointerEventHandler<HTMLAnchorElement> | undefined;
|
|
1015
|
+
onGotPointerCaptureCapture?: react0.PointerEventHandler<HTMLAnchorElement> | undefined;
|
|
1016
|
+
onLostPointerCapture?: react0.PointerEventHandler<HTMLAnchorElement> | undefined;
|
|
1017
|
+
onLostPointerCaptureCapture?: react0.PointerEventHandler<HTMLAnchorElement> | undefined;
|
|
1018
|
+
onScroll?: react0.UIEventHandler<HTMLAnchorElement> | undefined;
|
|
1019
|
+
onScrollCapture?: react0.UIEventHandler<HTMLAnchorElement> | undefined;
|
|
1020
|
+
onScrollEnd?: react0.UIEventHandler<HTMLAnchorElement> | undefined;
|
|
1021
|
+
onScrollEndCapture?: react0.UIEventHandler<HTMLAnchorElement> | undefined;
|
|
1022
|
+
onWheel?: react0.WheelEventHandler<HTMLAnchorElement> | undefined;
|
|
1023
|
+
onWheelCapture?: react0.WheelEventHandler<HTMLAnchorElement> | undefined;
|
|
1024
|
+
onAnimationStart?: react0.AnimationEventHandler<HTMLAnchorElement> | undefined;
|
|
1025
|
+
onAnimationStartCapture?: react0.AnimationEventHandler<HTMLAnchorElement> | undefined;
|
|
1026
|
+
onAnimationEnd?: react0.AnimationEventHandler<HTMLAnchorElement> | undefined;
|
|
1027
|
+
onAnimationEndCapture?: react0.AnimationEventHandler<HTMLAnchorElement> | undefined;
|
|
1028
|
+
onAnimationIteration?: react0.AnimationEventHandler<HTMLAnchorElement> | undefined;
|
|
1029
|
+
onAnimationIterationCapture?: react0.AnimationEventHandler<HTMLAnchorElement> | undefined;
|
|
1030
|
+
onToggle?: react0.ToggleEventHandler<HTMLAnchorElement> | undefined;
|
|
1031
|
+
onBeforeToggle?: react0.ToggleEventHandler<HTMLAnchorElement> | undefined;
|
|
1032
|
+
onTransitionCancel?: react0.TransitionEventHandler<HTMLAnchorElement> | undefined;
|
|
1033
|
+
onTransitionCancelCapture?: react0.TransitionEventHandler<HTMLAnchorElement> | undefined;
|
|
1034
|
+
onTransitionEnd?: react0.TransitionEventHandler<HTMLAnchorElement> | undefined;
|
|
1035
|
+
onTransitionEndCapture?: react0.TransitionEventHandler<HTMLAnchorElement> | undefined;
|
|
1036
|
+
onTransitionRun?: react0.TransitionEventHandler<HTMLAnchorElement> | undefined;
|
|
1037
|
+
onTransitionRunCapture?: react0.TransitionEventHandler<HTMLAnchorElement> | undefined;
|
|
1038
|
+
onTransitionStart?: react0.TransitionEventHandler<HTMLAnchorElement> | undefined;
|
|
1039
|
+
onTransitionStartCapture?: react0.TransitionEventHandler<HTMLAnchorElement> | undefined;
|
|
1040
|
+
}, HTMLElement>;
|
|
1041
|
+
//#endregion
|
|
1042
|
+
//#region ../../src/react/router/components/NestedView.d.ts
|
|
1043
|
+
interface NestedViewProps {
|
|
1044
|
+
children?: ReactNode;
|
|
1045
|
+
errorBoundary?: false | ((error: Error) => ReactNode);
|
|
1046
|
+
}
|
|
1047
|
+
declare const _default: react0.MemoExoticComponent<(props: NestedViewProps) => react_jsx_runtime0.JSX.Element>;
|
|
1048
|
+
//#endregion
|
|
1049
|
+
//#region ../../src/react/router/components/NotFound.d.ts
|
|
1050
|
+
/**
|
|
1051
|
+
* Default 404 Not Found page component.
|
|
1052
|
+
*/
|
|
1053
|
+
declare const NotFound: (props: {
|
|
1054
|
+
style?: CSSProperties;
|
|
1055
|
+
}) => react_jsx_runtime0.JSX.Element;
|
|
1056
|
+
//#endregion
|
|
1057
|
+
//#region ../../src/react/router/contexts/RouterLayerContext.d.ts
|
|
1058
|
+
interface RouterLayerContextValue {
|
|
1059
|
+
index: number;
|
|
1060
|
+
path: string;
|
|
1061
|
+
onError: ErrorHandler;
|
|
1062
|
+
}
|
|
1063
|
+
declare const RouterLayerContext: react0.Context<RouterLayerContextValue | undefined>;
|
|
1064
|
+
//#endregion
|
|
1065
|
+
//#region ../../src/react/router/hooks/useActive.d.ts
|
|
1066
|
+
interface UseActiveOptions {
|
|
1067
|
+
href: string;
|
|
1068
|
+
startWith?: boolean;
|
|
1069
|
+
}
|
|
1070
|
+
/**
|
|
1071
|
+
* Hook to determine if a given route is active and to provide anchor props for navigation.
|
|
1072
|
+
* This hook refreshes on router state changes.
|
|
1073
|
+
*/
|
|
1074
|
+
declare const useActive: (args: string | UseActiveOptions) => UseActiveHook;
|
|
1075
|
+
interface UseActiveHook {
|
|
1076
|
+
isActive: boolean;
|
|
1077
|
+
anchorProps: AnchorProps;
|
|
1078
|
+
isPending: boolean;
|
|
1079
|
+
}
|
|
1080
|
+
//#endregion
|
|
1081
|
+
//#region ../../src/react/router/hooks/useQueryParams.d.ts
|
|
1082
|
+
/**
|
|
1083
|
+
* Hook to manage query parameters in the URL using a defined schema.
|
|
1084
|
+
*/
|
|
1085
|
+
declare const useQueryParams: <T extends TObject>(schema: T, options?: UseQueryParamsHookOptions) => [Partial<Static<T>>, (data: Static<T>) => void];
|
|
1086
|
+
interface UseQueryParamsHookOptions {
|
|
1087
|
+
format?: "base64" | "querystring";
|
|
1088
|
+
key?: string;
|
|
1089
|
+
push?: boolean;
|
|
1090
|
+
}
|
|
1091
|
+
//#endregion
|
|
1092
|
+
//#region ../../src/react/router/hooks/useRouter.d.ts
|
|
1093
|
+
/**
|
|
1094
|
+
* Use this hook to access the React Router instance.
|
|
1095
|
+
*
|
|
1096
|
+
* You can add a type parameter to specify the type of your application.
|
|
1097
|
+
* This will allow you to use the router in a typesafe way.
|
|
1098
|
+
*
|
|
1099
|
+
* @example
|
|
1100
|
+
* class App {
|
|
1101
|
+
* home = $page();
|
|
1102
|
+
* }
|
|
1103
|
+
*
|
|
1104
|
+
* const router = useRouter<App>();
|
|
1105
|
+
* router.push("home"); // typesafe
|
|
1106
|
+
*/
|
|
1107
|
+
declare const useRouter: <T extends object = any>() => ReactRouter<T>;
|
|
1108
|
+
//#endregion
|
|
1109
|
+
//#region ../../src/react/router/hooks/useRouterState.d.ts
|
|
1110
|
+
declare const useRouterState: () => ReactRouterState;
|
|
1111
|
+
//#endregion
|
|
1112
|
+
//#region ../../src/react/router/atoms/ssrManifestAtom.d.ts
|
|
1113
|
+
/**
|
|
1114
|
+
* Schema for the SSR manifest atom.
|
|
1115
|
+
*/
|
|
1116
|
+
declare const ssrManifestAtomSchema: alepha6.TObject<{
|
|
1117
|
+
/**
|
|
1118
|
+
* Base path for assets (from Vite's base config).
|
|
1119
|
+
* Used to prefix asset URLs when serving from a subpath.
|
|
1120
|
+
* @example "/devtools" or "/"
|
|
1121
|
+
*/
|
|
1122
|
+
base: alepha6.TOptional<alepha6.TString>;
|
|
1123
|
+
/**
|
|
1124
|
+
* Preload manifest mapping short keys to source paths.
|
|
1125
|
+
* Generated by viteAlephaSsrPreload plugin at build time.
|
|
1126
|
+
*/
|
|
1127
|
+
preload: alepha6.TOptional<alepha6.TRecord<"^.*$", alepha6.TString>>;
|
|
1128
|
+
/**
|
|
1129
|
+
* Client manifest mapping source files to their output information.
|
|
1130
|
+
* Only includes fields actually used for preloading.
|
|
1131
|
+
*/
|
|
1132
|
+
client: alepha6.TOptional<alepha6.TRecord<"^.*$", alepha6.TObject<{
|
|
1133
|
+
file: alepha6.TString;
|
|
1134
|
+
isEntry: alepha6.TOptional<alepha6.TBoolean>;
|
|
1135
|
+
imports: alepha6.TOptional<alepha6.TArray<alepha6.TString>>;
|
|
1136
|
+
css: alepha6.TOptional<alepha6.TArray<alepha6.TString>>;
|
|
1137
|
+
}>>>;
|
|
1138
|
+
}>;
|
|
1139
|
+
/**
|
|
1140
|
+
* Type for the SSR manifest schema.
|
|
1141
|
+
*/
|
|
1142
|
+
type SsrManifestAtomSchema = typeof ssrManifestAtomSchema;
|
|
1143
|
+
//#endregion
|
|
1144
|
+
//#region ../../src/react/router/providers/SSRManifestProvider.d.ts
|
|
1145
|
+
/**
|
|
1146
|
+
* Provider for SSR manifest data used for module preloading.
|
|
1147
|
+
*
|
|
1148
|
+
* The manifest is populated at build time by embedding data into the
|
|
1149
|
+
* generated index.js via the ssrManifestAtom. This eliminates filesystem
|
|
1150
|
+
* reads at runtime, making it optimal for serverless deployments.
|
|
1151
|
+
*
|
|
1152
|
+
* Manifest files are generated during `vite build`:
|
|
1153
|
+
* - manifest.json (client manifest)
|
|
1154
|
+
* - preload-manifest.json (from viteAlephaSsrPreload plugin)
|
|
1155
|
+
*/
|
|
1156
|
+
declare class SSRManifestProvider {
|
|
1157
|
+
protected readonly alepha: Alepha;
|
|
1158
|
+
/**
|
|
1159
|
+
* Get the manifest from the store at runtime.
|
|
1160
|
+
* This ensures the manifest is available even when set after module load.
|
|
1161
|
+
*/
|
|
1162
|
+
protected get manifest(): Static<SsrManifestAtomSchema>;
|
|
1163
|
+
/**
|
|
1164
|
+
* Get the base path for assets (from Vite's base config).
|
|
1165
|
+
* Returns empty string if base is "/" (default), otherwise returns the base path.
|
|
1166
|
+
*/
|
|
1167
|
+
protected get base(): string;
|
|
1168
|
+
/**
|
|
1169
|
+
* Get the preload manifest.
|
|
1170
|
+
*/
|
|
1171
|
+
protected get preloadManifest(): PreloadManifest | undefined;
|
|
1172
|
+
/**
|
|
1173
|
+
* Get the client manifest.
|
|
1174
|
+
*/
|
|
1175
|
+
protected get clientManifest(): ClientManifest | undefined;
|
|
1176
|
+
/**
|
|
1177
|
+
* Resolve a preload key to its source path.
|
|
1178
|
+
*
|
|
1179
|
+
* The key is a short hash injected by viteAlephaSsrPreload plugin,
|
|
1180
|
+
* which maps to the full source path in the preload manifest.
|
|
1181
|
+
*
|
|
1182
|
+
* @param key - Short hash key (e.g., "a1b2c3d4")
|
|
1183
|
+
* @returns Source path (e.g., "src/pages/UserDetail.tsx") or undefined
|
|
1184
|
+
*/
|
|
1185
|
+
resolvePreloadKey(key: string): string | undefined;
|
|
1186
|
+
/**
|
|
1187
|
+
* Get all chunks required for a source file, including transitive dependencies.
|
|
1188
|
+
*
|
|
1189
|
+
* Uses the client manifest to recursively resolve all imported chunks.
|
|
1190
|
+
*
|
|
1191
|
+
* @param sourcePath - Source file path (e.g., "src/pages/Home.tsx")
|
|
1192
|
+
* @returns Array of chunk URLs to preload, or empty array if not found
|
|
1193
|
+
*/
|
|
1194
|
+
getChunks(sourcePath: string): string[];
|
|
1195
|
+
/**
|
|
1196
|
+
* Find manifest entry for a source path, trying different extensions.
|
|
1197
|
+
*/
|
|
1198
|
+
protected findManifestEntry(sourcePath: string): {
|
|
1199
|
+
file: string;
|
|
1200
|
+
isEntry?: boolean;
|
|
1201
|
+
imports?: string[];
|
|
1202
|
+
css?: string[];
|
|
1203
|
+
} | undefined;
|
|
1204
|
+
/**
|
|
1205
|
+
* Recursively collect all chunk URLs for a manifest entry.
|
|
1206
|
+
*/
|
|
1207
|
+
protected collectChunksRecursive(key: string, chunks: Set<string>, visited: Set<string>): void;
|
|
1208
|
+
/**
|
|
1209
|
+
* Collect modulepreload links for a route and its parent chain.
|
|
1210
|
+
*/
|
|
1211
|
+
collectPreloadLinks(route: PageRoute): Array<{
|
|
1212
|
+
rel: string;
|
|
1213
|
+
href: string;
|
|
1214
|
+
as?: string;
|
|
1215
|
+
crossorigin?: string;
|
|
1216
|
+
}>;
|
|
1217
|
+
/**
|
|
1218
|
+
* Get all chunks for multiple source files.
|
|
1219
|
+
*
|
|
1220
|
+
* @param sourcePaths - Array of source file paths
|
|
1221
|
+
* @returns Deduplicated array of chunk URLs
|
|
1222
|
+
*/
|
|
1223
|
+
getChunksForMultiple(sourcePaths: string[]): string[];
|
|
1224
|
+
/**
|
|
1225
|
+
* Check if manifest is loaded and available.
|
|
1226
|
+
*/
|
|
1227
|
+
isAvailable(): boolean;
|
|
1228
|
+
/**
|
|
1229
|
+
* Cached entry assets - computed once at first access.
|
|
1230
|
+
*/
|
|
1231
|
+
protected cachedEntryAssets: EntryAssets | null;
|
|
1232
|
+
/**
|
|
1233
|
+
* Get the entry point assets (main entry.js and associated CSS files).
|
|
1234
|
+
*
|
|
1235
|
+
* These assets are always required for all pages and can be preloaded
|
|
1236
|
+
* before page-specific loaders run.
|
|
1237
|
+
*
|
|
1238
|
+
* @returns Entry assets with js and css paths, or null if manifest unavailable
|
|
1239
|
+
*/
|
|
1240
|
+
getEntryAssets(): EntryAssets | null;
|
|
1241
|
+
/**
|
|
1242
|
+
* Build preload link tags for entry assets.
|
|
1243
|
+
*
|
|
1244
|
+
* @returns Array of link objects ready to be rendered
|
|
1245
|
+
*/
|
|
1246
|
+
getEntryPreloadLinks(): Array<{
|
|
1247
|
+
rel: string;
|
|
1248
|
+
href: string;
|
|
1249
|
+
as?: string;
|
|
1250
|
+
crossorigin?: string;
|
|
1251
|
+
}>;
|
|
1252
|
+
}
|
|
1253
|
+
/**
|
|
1254
|
+
* Entry assets structure containing the main entry JS and associated CSS files.
|
|
1255
|
+
*/
|
|
1256
|
+
interface EntryAssets {
|
|
1257
|
+
/** Main entry JavaScript file (e.g., "/assets/entry.abc123.js") */
|
|
1258
|
+
js?: string;
|
|
1259
|
+
/** Associated CSS files (e.g., ["/assets/style.abc123.css"]) */
|
|
1260
|
+
css: string[];
|
|
1261
|
+
}
|
|
1262
|
+
/**
|
|
1263
|
+
* Client manifest structure from Vite.
|
|
1264
|
+
* Only includes fields actually used for preloading.
|
|
1265
|
+
*/
|
|
1266
|
+
interface ClientManifest {
|
|
1267
|
+
[key: string]: {
|
|
1268
|
+
file: string;
|
|
1269
|
+
isEntry?: boolean;
|
|
1270
|
+
imports?: string[];
|
|
1271
|
+
css?: string[];
|
|
1272
|
+
};
|
|
1273
|
+
}
|
|
1274
|
+
/**
|
|
1275
|
+
* Preload manifest mapping short keys to source paths.
|
|
1276
|
+
* Generated by viteAlephaSsrPreload plugin at build time.
|
|
1277
|
+
*/
|
|
1278
|
+
type PreloadManifest = Record<string, string>;
|
|
1279
|
+
//#endregion
|
|
1280
|
+
//#region ../../src/react/router/providers/ReactPreloadProvider.d.ts
|
|
1281
|
+
/**
|
|
1282
|
+
* Adds HTTP Link headers for preloading entry assets.
|
|
1283
|
+
*
|
|
1284
|
+
* Benefits:
|
|
1285
|
+
* - Early Hints (103): Servers can send preload hints before the full response
|
|
1286
|
+
* - CDN optimization: Many CDNs use Link headers to optimize asset delivery
|
|
1287
|
+
* - Browser prefetching: Browsers can start fetching resources earlier
|
|
1288
|
+
*
|
|
1289
|
+
* The Link header is computed once at first request and cached for reuse.
|
|
1290
|
+
*/
|
|
1291
|
+
declare class ReactPreloadProvider {
|
|
1292
|
+
protected readonly alepha: Alepha;
|
|
1293
|
+
protected readonly ssrManifest: SSRManifestProvider;
|
|
1294
|
+
/**
|
|
1295
|
+
* Cached Link header value - computed once, reused for all requests.
|
|
1296
|
+
*/
|
|
1297
|
+
protected cachedLinkHeader: string | null | undefined;
|
|
1298
|
+
/**
|
|
1299
|
+
* Build the Link header string from entry assets.
|
|
1300
|
+
*
|
|
1301
|
+
* Format: <url>; rel=preload; as=type, <url>; rel=modulepreload
|
|
1302
|
+
*
|
|
1303
|
+
* @returns Link header string or null if no assets
|
|
1304
|
+
*/
|
|
1305
|
+
protected buildLinkHeader(): string | null;
|
|
1306
|
+
/**
|
|
1307
|
+
* Get the cached Link header, computing it on first access.
|
|
1308
|
+
*/
|
|
1309
|
+
protected getLinkHeader(): string | null;
|
|
1310
|
+
/**
|
|
1311
|
+
* Add Link header to HTML responses for asset preloading.
|
|
1312
|
+
*/
|
|
1313
|
+
protected readonly onResponse: alepha6.HookPrimitive<"server:onResponse">;
|
|
1314
|
+
}
|
|
1315
|
+
//#endregion
|
|
1316
|
+
//#region ../../src/system/providers/FileSystemProvider.d.ts
|
|
1317
|
+
/**
|
|
1318
|
+
* Options for creating a file from a URL
|
|
1319
|
+
*/
|
|
1320
|
+
interface CreateFileFromUrlOptions {
|
|
1321
|
+
/**
|
|
1322
|
+
* The URL to load the file from (file://, http://, or https://)
|
|
1323
|
+
*/
|
|
1324
|
+
url: string;
|
|
1325
|
+
/**
|
|
1326
|
+
* The MIME type of the file (optional, will be detected from filename if not provided)
|
|
1327
|
+
*/
|
|
1328
|
+
type?: string;
|
|
1329
|
+
/**
|
|
1330
|
+
* The name of the file (optional, will be extracted from URL if not provided)
|
|
1331
|
+
*/
|
|
1332
|
+
name?: string;
|
|
1333
|
+
}
|
|
1334
|
+
/**
|
|
1335
|
+
* Options for creating a file from a path (URL with file:// scheme)
|
|
1336
|
+
*/
|
|
1337
|
+
interface CreateFileFromPathOptions {
|
|
1338
|
+
/**
|
|
1339
|
+
* The path to the file on the local filesystem
|
|
1340
|
+
*/
|
|
1341
|
+
path: string;
|
|
1342
|
+
/**
|
|
1343
|
+
* The MIME type of the file (optional, will be detected from filename if not provided)
|
|
1344
|
+
*/
|
|
1345
|
+
type?: string;
|
|
1346
|
+
/**
|
|
1347
|
+
* The name of the file (optional, will be extracted from URL if not provided)
|
|
1348
|
+
*/
|
|
1349
|
+
name?: string;
|
|
1350
|
+
}
|
|
1351
|
+
/**
|
|
1352
|
+
* Options for creating a file from a Buffer
|
|
1353
|
+
*/
|
|
1354
|
+
interface CreateFileFromBufferOptions {
|
|
1355
|
+
/**
|
|
1356
|
+
* The Buffer containing the file data
|
|
1357
|
+
*/
|
|
1358
|
+
buffer: Buffer;
|
|
1359
|
+
/**
|
|
1360
|
+
* The MIME type of the file (optional, will be detected from name if not provided)
|
|
1361
|
+
*/
|
|
1362
|
+
type?: string;
|
|
1363
|
+
/**
|
|
1364
|
+
* The name of the file (required for proper content type detection)
|
|
1365
|
+
*/
|
|
1366
|
+
name?: string;
|
|
1367
|
+
}
|
|
1368
|
+
/**
|
|
1369
|
+
* Options for creating a file from a stream
|
|
1370
|
+
*/
|
|
1371
|
+
interface CreateFileFromStreamOptions {
|
|
1372
|
+
/**
|
|
1373
|
+
* The readable stream containing the file data
|
|
1374
|
+
*/
|
|
1375
|
+
stream: StreamLike;
|
|
1376
|
+
/**
|
|
1377
|
+
* The MIME type of the file (optional, will be detected from name if not provided)
|
|
1378
|
+
*/
|
|
1379
|
+
type?: string;
|
|
1380
|
+
/**
|
|
1381
|
+
* The name of the file (required for proper content type detection)
|
|
1382
|
+
*/
|
|
1383
|
+
name?: string;
|
|
1384
|
+
/**
|
|
1385
|
+
* The size of the file in bytes (optional)
|
|
1386
|
+
*/
|
|
1387
|
+
size?: number;
|
|
1388
|
+
}
|
|
1389
|
+
/**
|
|
1390
|
+
* Options for creating a file from text content
|
|
1391
|
+
*/
|
|
1392
|
+
interface CreateFileFromTextOptions {
|
|
1393
|
+
/**
|
|
1394
|
+
* The text content to create the file from
|
|
1395
|
+
*/
|
|
1396
|
+
text: string;
|
|
1397
|
+
/**
|
|
1398
|
+
* The MIME type of the file (default: text/plain)
|
|
1399
|
+
*/
|
|
1400
|
+
type?: string;
|
|
1401
|
+
/**
|
|
1402
|
+
* The name of the file (default: "file.txt")
|
|
1403
|
+
*/
|
|
1404
|
+
name?: string;
|
|
1405
|
+
}
|
|
1406
|
+
interface CreateFileFromResponseOptions {
|
|
1407
|
+
/**
|
|
1408
|
+
* The Response object containing the file data
|
|
1409
|
+
*/
|
|
1410
|
+
response: Response;
|
|
1411
|
+
/**
|
|
1412
|
+
* Override the name (optional, uses filename from Content-Disposition header if not provided)
|
|
1413
|
+
*/
|
|
1414
|
+
name?: string;
|
|
1415
|
+
/**
|
|
1416
|
+
* Override the MIME type (optional, uses file.type if not provided)
|
|
1417
|
+
*/
|
|
1418
|
+
type?: string;
|
|
1419
|
+
}
|
|
1420
|
+
/**
|
|
1421
|
+
* Options for creating a file from a Web File object
|
|
1422
|
+
*/
|
|
1423
|
+
interface CreateFileFromWebFileOptions {
|
|
1424
|
+
/**
|
|
1425
|
+
* The Web File object
|
|
1426
|
+
*/
|
|
1427
|
+
file: File;
|
|
1428
|
+
/**
|
|
1429
|
+
* Override the MIME type (optional, uses file.type if not provided)
|
|
1430
|
+
*/
|
|
1431
|
+
type?: string;
|
|
1432
|
+
/**
|
|
1433
|
+
* Override the name (optional, uses file.name if not provided)
|
|
1434
|
+
*/
|
|
1435
|
+
name?: string;
|
|
1436
|
+
/**
|
|
1437
|
+
* Override the size (optional, uses file.size if not provided)
|
|
1438
|
+
*/
|
|
1439
|
+
size?: number;
|
|
1440
|
+
}
|
|
1441
|
+
/**
|
|
1442
|
+
* Options for creating a file from an ArrayBuffer
|
|
1443
|
+
*/
|
|
1444
|
+
interface CreateFileFromArrayBufferOptions {
|
|
1445
|
+
/**
|
|
1446
|
+
* The ArrayBuffer containing the file data
|
|
1447
|
+
*/
|
|
1448
|
+
arrayBuffer: ArrayBuffer;
|
|
1449
|
+
/**
|
|
1450
|
+
* The MIME type of the file (optional, will be detected from name if not provided)
|
|
1451
|
+
*/
|
|
1452
|
+
type?: string;
|
|
1453
|
+
/**
|
|
1454
|
+
* The name of the file (required for proper content type detection)
|
|
1455
|
+
*/
|
|
1456
|
+
name?: string;
|
|
1457
|
+
}
|
|
1458
|
+
/**
|
|
1459
|
+
* Union type for all createFile options
|
|
1460
|
+
*/
|
|
1461
|
+
type CreateFileOptions = CreateFileFromUrlOptions | CreateFileFromPathOptions | CreateFileFromBufferOptions | CreateFileFromStreamOptions | CreateFileFromTextOptions | CreateFileFromWebFileOptions | CreateFileFromResponseOptions | CreateFileFromArrayBufferOptions;
|
|
1462
|
+
/**
|
|
1463
|
+
* Options for rm (remove) operation
|
|
1464
|
+
*/
|
|
1465
|
+
interface RmOptions {
|
|
1466
|
+
/**
|
|
1467
|
+
* If true, removes directories and their contents recursively
|
|
1468
|
+
*/
|
|
1469
|
+
recursive?: boolean;
|
|
1470
|
+
/**
|
|
1471
|
+
* If true, no error will be thrown if the path does not exist
|
|
1472
|
+
*/
|
|
1473
|
+
force?: boolean;
|
|
1474
|
+
}
|
|
1475
|
+
/**
|
|
1476
|
+
* Options for cp (copy) operation
|
|
1477
|
+
*/
|
|
1478
|
+
interface CpOptions {
|
|
1479
|
+
/**
|
|
1480
|
+
* If true, copy directories recursively
|
|
1481
|
+
*/
|
|
1482
|
+
recursive?: boolean;
|
|
1483
|
+
/**
|
|
1484
|
+
* If true, overwrite existing destination
|
|
1485
|
+
*/
|
|
1486
|
+
force?: boolean;
|
|
1487
|
+
}
|
|
1488
|
+
/**
|
|
1489
|
+
* Options for mkdir operation
|
|
1490
|
+
*/
|
|
1491
|
+
interface MkdirOptions {
|
|
1492
|
+
/**
|
|
1493
|
+
* If true, creates parent directories as needed
|
|
1494
|
+
*
|
|
1495
|
+
* @default true
|
|
1496
|
+
*/
|
|
1497
|
+
recursive?: boolean;
|
|
1498
|
+
/**
|
|
1499
|
+
* If true, does not throw an error if the directory already exists
|
|
1500
|
+
*
|
|
1501
|
+
* @default true
|
|
1502
|
+
*/
|
|
1503
|
+
force?: boolean;
|
|
1504
|
+
/**
|
|
1505
|
+
* File mode (permission and sticky bits)
|
|
1506
|
+
*/
|
|
1507
|
+
mode?: number;
|
|
1508
|
+
}
|
|
1509
|
+
/**
|
|
1510
|
+
* Options for ls (list) operation
|
|
1511
|
+
*/
|
|
1512
|
+
interface LsOptions {
|
|
1513
|
+
/**
|
|
1514
|
+
* If true, list contents of directories recursively
|
|
1515
|
+
*/
|
|
1516
|
+
recursive?: boolean;
|
|
1517
|
+
/**
|
|
1518
|
+
* If true, include hidden files (starting with .)
|
|
1519
|
+
*/
|
|
1520
|
+
hidden?: boolean;
|
|
1521
|
+
}
|
|
1522
|
+
/**
|
|
1523
|
+
* FileSystem interface providing utilities for working with files.
|
|
1524
|
+
*/
|
|
1525
|
+
declare abstract class FileSystemProvider {
|
|
1526
|
+
/**
|
|
1527
|
+
* Joins multiple path segments into a single path.
|
|
1528
|
+
*
|
|
1529
|
+
* @param paths - The path segments to join
|
|
1530
|
+
* @returns The joined path
|
|
1531
|
+
*/
|
|
1532
|
+
abstract join(...paths: string[]): string;
|
|
1533
|
+
/**
|
|
1534
|
+
* Creates a FileLike object from various sources.
|
|
1535
|
+
*
|
|
1536
|
+
* @param options - Options for creating the file
|
|
1537
|
+
* @returns A FileLike object
|
|
1538
|
+
*/
|
|
1539
|
+
abstract createFile(options: CreateFileOptions): FileLike;
|
|
1540
|
+
/**
|
|
1541
|
+
* Removes a file or directory.
|
|
1542
|
+
*
|
|
1543
|
+
* @param path - The path to remove
|
|
1544
|
+
* @param options - Remove options
|
|
1545
|
+
*/
|
|
1546
|
+
abstract rm(path: string, options?: RmOptions): Promise<void>;
|
|
1547
|
+
/**
|
|
1548
|
+
* Copies a file or directory.
|
|
1549
|
+
*
|
|
1550
|
+
* @param src - Source path
|
|
1551
|
+
* @param dest - Destination path
|
|
1552
|
+
* @param options - Copy options
|
|
1553
|
+
*/
|
|
1554
|
+
abstract cp(src: string, dest: string, options?: CpOptions): Promise<void>;
|
|
1555
|
+
/**
|
|
1556
|
+
* Moves/renames a file or directory.
|
|
1557
|
+
*
|
|
1558
|
+
* @param src - Source path
|
|
1559
|
+
* @param dest - Destination path
|
|
1560
|
+
*/
|
|
1561
|
+
abstract mv(src: string, dest: string): Promise<void>;
|
|
1562
|
+
/**
|
|
1563
|
+
* Creates a directory.
|
|
1564
|
+
*
|
|
1565
|
+
* @param path - The directory path to create
|
|
1566
|
+
* @param options - Mkdir options
|
|
1567
|
+
*/
|
|
1568
|
+
abstract mkdir(path: string, options?: MkdirOptions): Promise<void>;
|
|
1569
|
+
/**
|
|
1570
|
+
* Lists files in a directory.
|
|
1571
|
+
*
|
|
1572
|
+
* @param path - The directory path to list
|
|
1573
|
+
* @param options - List options
|
|
1574
|
+
* @returns Array of filenames
|
|
1575
|
+
*/
|
|
1576
|
+
abstract ls(path: string, options?: LsOptions): Promise<string[]>;
|
|
1577
|
+
/**
|
|
1578
|
+
* Checks if a file or directory exists.
|
|
1579
|
+
*
|
|
1580
|
+
* @param path - The path to check
|
|
1581
|
+
* @returns True if the path exists, false otherwise
|
|
1582
|
+
*/
|
|
1583
|
+
abstract exists(path: string): Promise<boolean>;
|
|
1584
|
+
/**
|
|
1585
|
+
* Reads the content of a file.
|
|
1586
|
+
*
|
|
1587
|
+
* @param path - The file path to read
|
|
1588
|
+
* @returns The file content as a Buffer
|
|
1589
|
+
*/
|
|
1590
|
+
abstract readFile(path: string): Promise<Buffer>;
|
|
1591
|
+
/**
|
|
1592
|
+
* Writes data to a file.
|
|
1593
|
+
*
|
|
1594
|
+
* @param path - The file path to write to
|
|
1595
|
+
* @param data - The data to write (Buffer or string)
|
|
1596
|
+
*/
|
|
1597
|
+
abstract writeFile(path: string, data: Uint8Array | Buffer | string | FileLike): Promise<void>;
|
|
1598
|
+
/**
|
|
1599
|
+
* Reads the content of a file as a string.
|
|
1600
|
+
*
|
|
1601
|
+
* @param path - The file path to read
|
|
1602
|
+
* @returns The file content as a string
|
|
1603
|
+
*/
|
|
1604
|
+
abstract readTextFile(path: string): Promise<string>;
|
|
1605
|
+
/**
|
|
1606
|
+
* Reads the content of a file as JSON.
|
|
1607
|
+
*
|
|
1608
|
+
* @param path - The file path to read
|
|
1609
|
+
* @returns The parsed JSON content
|
|
1610
|
+
*/
|
|
1611
|
+
abstract readJsonFile<T = unknown>(path: string): Promise<T>;
|
|
1612
|
+
}
|
|
1613
|
+
//#endregion
|
|
1614
|
+
//#region ../../src/react/router/providers/ReactServerTemplateProvider.d.ts
|
|
1615
|
+
/**
|
|
1616
|
+
* Handles HTML streaming for SSR.
|
|
1617
|
+
*
|
|
1618
|
+
* Uses hardcoded HTML structure - all customization via $head primitive.
|
|
1619
|
+
* Pre-encodes static parts as Uint8Array for zero-copy streaming.
|
|
1620
|
+
*/
|
|
1621
|
+
declare class ReactServerTemplateProvider {
|
|
1622
|
+
protected readonly log: alepha_logger0.Logger;
|
|
1623
|
+
protected readonly alepha: Alepha;
|
|
1624
|
+
/**
|
|
1625
|
+
* Shared TextEncoder - reused across all requests.
|
|
1626
|
+
*/
|
|
1627
|
+
protected readonly encoder: TextEncoder;
|
|
1628
|
+
/**
|
|
1629
|
+
* Pre-encoded static HTML parts for zero-copy streaming.
|
|
1630
|
+
*/
|
|
1631
|
+
protected readonly SLOTS: {
|
|
1632
|
+
readonly DOCTYPE: Uint8Array<ArrayBuffer>;
|
|
1633
|
+
readonly HTML_OPEN: Uint8Array<ArrayBuffer>;
|
|
1634
|
+
readonly HTML_CLOSE: Uint8Array<ArrayBuffer>;
|
|
1635
|
+
readonly HEAD_OPEN: Uint8Array<ArrayBuffer>;
|
|
1636
|
+
readonly HEAD_CLOSE: Uint8Array<ArrayBuffer>;
|
|
1637
|
+
readonly BODY_OPEN: Uint8Array<ArrayBuffer>;
|
|
1638
|
+
readonly BODY_CLOSE: Uint8Array<ArrayBuffer>;
|
|
1639
|
+
readonly ROOT_OPEN: Uint8Array<ArrayBuffer>;
|
|
1640
|
+
readonly ROOT_CLOSE: Uint8Array<ArrayBuffer>;
|
|
1641
|
+
readonly BODY_HTML_CLOSE: Uint8Array<ArrayBuffer>;
|
|
1642
|
+
readonly HYDRATION_PREFIX: Uint8Array<ArrayBuffer>;
|
|
1643
|
+
readonly HYDRATION_SUFFIX: Uint8Array<ArrayBuffer>;
|
|
1644
|
+
};
|
|
1645
|
+
/**
|
|
1646
|
+
* Early head content (charset, viewport, entry assets).
|
|
1647
|
+
* Set once during configuration, reused for all requests.
|
|
1648
|
+
*/
|
|
1649
|
+
protected earlyHeadContent: string;
|
|
1650
|
+
/**
|
|
1651
|
+
* Root element ID for React mounting.
|
|
1652
|
+
*/
|
|
1653
|
+
readonly rootId = "root";
|
|
1654
|
+
/**
|
|
1655
|
+
* Regex for extracting root div content from HTML.
|
|
1656
|
+
*/
|
|
1657
|
+
readonly rootDivRegex: RegExp;
|
|
1658
|
+
/**
|
|
1659
|
+
* Extract content inside the root div from HTML.
|
|
1660
|
+
*/
|
|
1661
|
+
extractRootContent(html: string): string | undefined;
|
|
1662
|
+
/**
|
|
1663
|
+
* Set early head content (charset, viewport, entry assets).
|
|
1664
|
+
* Called once during server configuration.
|
|
1665
|
+
*/
|
|
1666
|
+
setEarlyHeadContent(entryAssets: string, globalHead?: SimpleHead): void;
|
|
1667
|
+
/**
|
|
1668
|
+
* Render attributes record to HTML string.
|
|
1669
|
+
*/
|
|
1670
|
+
renderAttributes(attrs?: Record<string, string>): string;
|
|
1671
|
+
/**
|
|
1672
|
+
* Render head content (title, meta, link, script tags).
|
|
1673
|
+
*/
|
|
1674
|
+
renderHeadContent(head?: SimpleHead): string;
|
|
1675
|
+
/**
|
|
1676
|
+
* Escape HTML special characters.
|
|
1677
|
+
*/
|
|
1678
|
+
escapeHtml(str: string): string;
|
|
1679
|
+
/**
|
|
1680
|
+
* Safely serialize data to JSON for embedding in HTML.
|
|
1681
|
+
*/
|
|
1682
|
+
safeJsonSerialize(data: unknown): string;
|
|
1683
|
+
/**
|
|
1684
|
+
* Build hydration data from router state.
|
|
1685
|
+
*/
|
|
1686
|
+
buildHydrationData(state: ReactRouterState): HydrationData;
|
|
1687
|
+
/**
|
|
1688
|
+
* Pipe React stream to controller with backpressure handling.
|
|
1689
|
+
* Returns true if stream completed successfully, false if error occurred.
|
|
1690
|
+
*/
|
|
1691
|
+
protected pipeReactStream(controller: ReadableStreamDefaultController<Uint8Array>, reactStream: ReadableStream<Uint8Array>, state: ReactRouterState): Promise<boolean>;
|
|
1692
|
+
/**
|
|
1693
|
+
* Stream complete HTML document (head already closed).
|
|
1694
|
+
* Used by both createHtmlStream and late phase of createEarlyHtmlStream.
|
|
1695
|
+
*/
|
|
1696
|
+
protected streamBodyAndClose(controller: ReadableStreamDefaultController<Uint8Array>, reactStream: ReadableStream<Uint8Array>, state: ReactRouterState, hydration: boolean): Promise<void>;
|
|
1697
|
+
/**
|
|
1698
|
+
* Create HTML stream with early head optimization.
|
|
1699
|
+
*
|
|
1700
|
+
* Flow:
|
|
1701
|
+
* 1. Send DOCTYPE, <html>, <head> open, entry preloads (IMMEDIATE)
|
|
1702
|
+
* 2. Run async work (page loaders)
|
|
1703
|
+
* 3. Send rest of head, body, React content, hydration
|
|
1704
|
+
*/
|
|
1705
|
+
createEarlyHtmlStream(globalHead: SimpleHead, asyncWork: () => Promise<{
|
|
1706
|
+
state: ReactRouterState;
|
|
1707
|
+
reactStream: ReadableStream<Uint8Array>;
|
|
1708
|
+
} | {
|
|
1709
|
+
redirect: string;
|
|
1710
|
+
} | null>, options?: {
|
|
1711
|
+
hydration?: boolean;
|
|
1712
|
+
onError?: (error: unknown) => void;
|
|
1713
|
+
}): ReadableStream<Uint8Array>;
|
|
1714
|
+
/**
|
|
1715
|
+
* Create HTML stream (non-early version, for testing/prerender).
|
|
1716
|
+
*/
|
|
1717
|
+
createHtmlStream(reactStream: ReadableStream<Uint8Array>, state: ReactRouterState, options?: {
|
|
1718
|
+
hydration?: boolean;
|
|
1719
|
+
onError?: (error: unknown) => void;
|
|
1720
|
+
}): ReadableStream<Uint8Array>;
|
|
1721
|
+
/**
|
|
1722
|
+
* Inject error HTML when streaming fails.
|
|
1723
|
+
*/
|
|
1724
|
+
protected injectErrorHtml(controller: ReadableStreamDefaultController<Uint8Array>, error: unknown, routerState: ReactRouterState | undefined, streamState: {
|
|
1725
|
+
headClosed: boolean;
|
|
1726
|
+
bodyStarted: boolean;
|
|
1727
|
+
}): void;
|
|
1728
|
+
/**
|
|
1729
|
+
* Render error to HTML string.
|
|
1730
|
+
*/
|
|
1731
|
+
protected renderErrorToString(error: Error, routerState: ReactRouterState | undefined): string;
|
|
1732
|
+
}
|
|
1733
|
+
/**
|
|
1734
|
+
* Hydration state serialized to window.__ssr
|
|
1735
|
+
*/
|
|
1736
|
+
interface HydrationData {
|
|
1737
|
+
layers: Array<{
|
|
1738
|
+
data?: unknown;
|
|
1739
|
+
error?: {
|
|
1740
|
+
name: string;
|
|
1741
|
+
message: string;
|
|
1742
|
+
stack?: string;
|
|
1743
|
+
};
|
|
1744
|
+
}>;
|
|
1745
|
+
[key: string]: unknown;
|
|
1746
|
+
}
|
|
1747
|
+
//#endregion
|
|
1748
|
+
//#region ../../src/react/router/providers/ReactServerProvider.d.ts
|
|
1749
|
+
/**
|
|
1750
|
+
* React server provider responsible for SSR and static file serving.
|
|
1751
|
+
*
|
|
1752
|
+
* Coordinates between:
|
|
1753
|
+
* - ReactPageProvider: Page routing and layer resolution
|
|
1754
|
+
* - ReactServerTemplateProvider: HTML template parsing and streaming
|
|
1755
|
+
* - ServerHeadProvider: Head content management
|
|
1756
|
+
* - SSRManifestProvider: Module preload link collection
|
|
1757
|
+
*
|
|
1758
|
+
* Uses `react-dom/server` under the hood.
|
|
1759
|
+
*/
|
|
1760
|
+
declare class ReactServerProvider {
|
|
1761
|
+
/**
|
|
1762
|
+
* SSR response headers - pre-allocated to avoid object creation per request.
|
|
1763
|
+
*/
|
|
1764
|
+
protected readonly SSR_HEADERS: {
|
|
1765
|
+
readonly "content-type": "text/html";
|
|
1766
|
+
readonly "cache-control": "no-store, no-cache, must-revalidate, proxy-revalidate";
|
|
1767
|
+
readonly pragma: "no-cache";
|
|
1768
|
+
readonly expires: "0";
|
|
1769
|
+
};
|
|
1770
|
+
protected readonly fs: FileSystemProvider;
|
|
1771
|
+
protected readonly log: alepha_logger0.Logger;
|
|
1772
|
+
protected readonly alepha: Alepha;
|
|
1773
|
+
protected readonly env: {
|
|
1774
|
+
REACT_SSR_ENABLED?: boolean | undefined;
|
|
1775
|
+
};
|
|
1776
|
+
protected readonly pageApi: ReactPageProvider;
|
|
1777
|
+
protected readonly templateProvider: ReactServerTemplateProvider;
|
|
1778
|
+
protected readonly serverHeadProvider: ServerHeadProvider;
|
|
1779
|
+
protected readonly serverStaticProvider: ServerStaticProvider;
|
|
1780
|
+
protected readonly serverRouterProvider: ServerRouterProvider;
|
|
1781
|
+
protected readonly ssrManifestProvider: SSRManifestProvider;
|
|
1782
|
+
/**
|
|
1783
|
+
* Cached check for ServerLinksProvider - avoids has() lookup per request.
|
|
1784
|
+
*/
|
|
1785
|
+
protected hasServerLinksProvider: boolean;
|
|
1786
|
+
protected readonly options: Readonly<{
|
|
1787
|
+
publicDir: string;
|
|
1788
|
+
staticServer: {
|
|
1789
|
+
disabled: boolean;
|
|
1790
|
+
path: string;
|
|
1791
|
+
};
|
|
1792
|
+
}>;
|
|
1793
|
+
/**
|
|
1794
|
+
* Configure the React server provider.
|
|
1795
|
+
*/
|
|
1796
|
+
readonly onConfigure: alepha6.HookPrimitive<"configure">;
|
|
1797
|
+
/**
|
|
1798
|
+
* Register all pages as server routes.
|
|
1799
|
+
*/
|
|
1800
|
+
protected registerPages(): void;
|
|
1801
|
+
/**
|
|
1802
|
+
* Set up early head content with entry assets.
|
|
1803
|
+
*
|
|
1804
|
+
* This content is sent immediately when streaming starts, before page loaders run,
|
|
1805
|
+
* allowing the browser to start downloading entry.js and CSS files early.
|
|
1806
|
+
*/
|
|
1807
|
+
protected setupEarlyHeadContent(): void;
|
|
1808
|
+
/**
|
|
1809
|
+
* Get the public directory path where static files are located.
|
|
1810
|
+
*/
|
|
1811
|
+
protected getPublicDirectory(): Promise<string>;
|
|
1812
|
+
/**
|
|
1813
|
+
* Configure the static file server to serve files from the given root directory.
|
|
1814
|
+
*/
|
|
1815
|
+
protected configureStaticServer(root: string): Promise<void>;
|
|
1816
|
+
/**
|
|
1817
|
+
* Create the request handler for a page route.
|
|
1818
|
+
*/
|
|
1819
|
+
protected createHandler(route: PageRoute): ServerHandler;
|
|
1820
|
+
/**
|
|
1821
|
+
* Core page rendering logic shared between SSR handler and static prerendering.
|
|
1822
|
+
*
|
|
1823
|
+
* Handles:
|
|
1824
|
+
* - Layer resolution (loaders)
|
|
1825
|
+
* - Redirect detection
|
|
1826
|
+
* - Head content filling
|
|
1827
|
+
* - Preload link collection
|
|
1828
|
+
* - React stream rendering
|
|
1829
|
+
*
|
|
1830
|
+
* @param route - The page route to render
|
|
1831
|
+
* @param state - The router state
|
|
1832
|
+
* @returns Render result with redirect or React stream
|
|
1833
|
+
*/
|
|
1834
|
+
protected renderPage(route: PageRoute, state: ReactRouterState): Promise<{
|
|
1835
|
+
redirect?: string;
|
|
1836
|
+
reactStream?: ReadableStream<Uint8Array>;
|
|
1837
|
+
}>;
|
|
1838
|
+
/**
|
|
1839
|
+
* For testing purposes, renders a page to HTML string.
|
|
1840
|
+
* Uses the same streaming code path as production, then collects to string.
|
|
1841
|
+
*
|
|
1842
|
+
* @param name - Page name to render
|
|
1843
|
+
* @param options - Render options (params, query, html, hydration)
|
|
1844
|
+
*/
|
|
1845
|
+
render(name: string, options?: PagePrimitiveRenderOptions): Promise<PagePrimitiveRenderResult>;
|
|
1846
|
+
/**
|
|
1847
|
+
* Collect a ReadableStream into a string.
|
|
1848
|
+
*/
|
|
1849
|
+
protected streamToString(stream: ReadableStream<Uint8Array>): Promise<string>;
|
|
1850
|
+
}
|
|
1851
|
+
declare const envSchema: alepha6.TObject<{
|
|
1852
|
+
REACT_SSR_ENABLED: alepha6.TOptional<alepha6.TBoolean>;
|
|
1853
|
+
}>;
|
|
1854
|
+
declare module "alepha" {
|
|
1855
|
+
interface Env extends Partial<Static<typeof envSchema>> {}
|
|
1856
|
+
interface State {
|
|
1857
|
+
"alepha.react.server.ssr"?: boolean;
|
|
1858
|
+
}
|
|
1859
|
+
}
|
|
1860
|
+
/**
|
|
1861
|
+
* React server provider configuration atom
|
|
1862
|
+
*/
|
|
1863
|
+
declare const reactServerOptions: alepha6.Atom<alepha6.TObject<{
|
|
1864
|
+
publicDir: alepha6.TString;
|
|
1865
|
+
staticServer: alepha6.TObject<{
|
|
1866
|
+
disabled: alepha6.TBoolean;
|
|
1867
|
+
path: alepha6.TString;
|
|
1868
|
+
}>;
|
|
1869
|
+
}>, "alepha.react.server.options">;
|
|
1870
|
+
type ReactServerProviderOptions = Static<typeof reactServerOptions.schema>;
|
|
1871
|
+
declare module "alepha" {
|
|
1872
|
+
interface State {
|
|
1873
|
+
[reactServerOptions.key]: ReactServerProviderOptions;
|
|
1874
|
+
}
|
|
1875
|
+
}
|
|
1876
|
+
//#endregion
|
|
1877
|
+
//#region ../../src/react/router/index.d.ts
|
|
1878
|
+
declare module "alepha" {
|
|
1879
|
+
interface State {
|
|
1880
|
+
"alepha.react.router.state"?: ReactRouterState;
|
|
1881
|
+
}
|
|
1882
|
+
interface Hooks {
|
|
1883
|
+
/**
|
|
1884
|
+
* Fires when the React application is starting to be rendered on the server.
|
|
1885
|
+
*/
|
|
1886
|
+
"react:server:render:begin": {
|
|
1887
|
+
request?: ServerRequest;
|
|
1888
|
+
state: ReactRouterState;
|
|
1889
|
+
};
|
|
1890
|
+
/**
|
|
1891
|
+
* Fires when the React application has been rendered on the server.
|
|
1892
|
+
*/
|
|
1893
|
+
"react:server:render:end": {
|
|
1894
|
+
request?: ServerRequest;
|
|
1895
|
+
state: ReactRouterState;
|
|
1896
|
+
html: string;
|
|
1897
|
+
};
|
|
1898
|
+
/**
|
|
1899
|
+
* Fires when the React application is being rendered on the browser.
|
|
1900
|
+
*
|
|
1901
|
+
* Note: this one is not really necessary, it's a hack because we need to isolate renderer from server code in order
|
|
1902
|
+
* to avoid including react-dom/client in server bundles.
|
|
1903
|
+
*/
|
|
1904
|
+
"react:browser:render": {
|
|
1905
|
+
root: HTMLElement;
|
|
1906
|
+
element: ReactNode;
|
|
1907
|
+
state: ReactRouterState;
|
|
1908
|
+
hydration?: ReactHydrationState;
|
|
1909
|
+
};
|
|
1910
|
+
/**
|
|
1911
|
+
* Fires when a route transition is starting.
|
|
1912
|
+
*/
|
|
1913
|
+
"react:transition:begin": {
|
|
1914
|
+
previous: ReactRouterState;
|
|
1915
|
+
state: ReactRouterState;
|
|
1916
|
+
animation?: PageAnimation;
|
|
1917
|
+
};
|
|
1918
|
+
/**
|
|
1919
|
+
* Fires when a route transition has succeeded.
|
|
1920
|
+
*/
|
|
1921
|
+
"react:transition:success": {
|
|
1922
|
+
state: ReactRouterState;
|
|
1923
|
+
};
|
|
1924
|
+
/**
|
|
1925
|
+
* Fires when a route transition has failed.
|
|
1926
|
+
*/
|
|
1927
|
+
"react:transition:error": {
|
|
1928
|
+
state: ReactRouterState;
|
|
1929
|
+
error: Error;
|
|
1930
|
+
};
|
|
1931
|
+
/**
|
|
1932
|
+
* Fires when a route transition has completed, regardless of success or failure.
|
|
1933
|
+
*/
|
|
1934
|
+
"react:transition:end": {
|
|
1935
|
+
state: ReactRouterState;
|
|
1936
|
+
};
|
|
1937
|
+
}
|
|
1938
|
+
}
|
|
1939
|
+
/**
|
|
1940
|
+
* Provides declarative routing with the `$page` primitive for building type-safe React routes.
|
|
1941
|
+
*
|
|
1942
|
+
* This module enables:
|
|
1943
|
+
* - URL pattern matching with parameters (e.g., `/users/:id`)
|
|
1944
|
+
* - Nested routing with parent-child relationships
|
|
1945
|
+
* - Type-safe URL parameter and query string validation
|
|
1946
|
+
* - Server-side data fetching with the `loader` function
|
|
1947
|
+
* - Lazy loading and code splitting
|
|
1948
|
+
* - Page animations and error handling
|
|
1949
|
+
*
|
|
1950
|
+
* @see {@link $page}
|
|
1951
|
+
* @module alepha.react.router
|
|
1952
|
+
*/
|
|
1953
|
+
declare const AlephaReactRouter: alepha6.Service<alepha6.Module>;
|
|
1954
|
+
//#endregion
|
|
1955
|
+
export { $page, AlephaReactRouter, AnchorProps, ClientManifest, ConcretePageRoute, CreateLayersResult, EntryAssets, ErrorHandler, ErrorViewer, HydrationData, Layer, Link, type LinkProps, _default as NestedView, NestedViewProps, NotFound, PAGE_PRELOAD_KEY, PageAnimation, PageConfigSchema, PageLoader, PagePrimitive, PagePrimitiveOptions, PagePrimitiveRenderOptions, PagePrimitiveRenderResult, PageRequestConfig, PageRoute, PageRouteEntry, PreloadManifest, PreviousLayerData, ReactBrowserProvider, ReactBrowserRendererOptions, ReactHydrationState, ReactPageProvider, ReactPageService, ReactPreloadProvider, ReactRouter, ReactRouterState, ReactServerProvider, ReactServerProviderOptions, ReactServerTemplateProvider, Redirection, RouterLayerContext, RouterLayerContextValue, type RouterPushOptions, RouterRenderOptions, RouterStackItem, SSRManifestProvider, TPropsDefault, TPropsParentDefault, TransitionOptions, UseActiveHook, UseActiveOptions, UseQueryParamsHookOptions, VirtualRouter, isPageRoute, reactBrowserOptions, reactServerOptions, useActive, useQueryParams, useRouter, useRouterState };
|
|
1956
|
+
//# sourceMappingURL=index.d.ts.map
|