resuxjs 0.3.11 → 0.4.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -1
- package/dist/bin.d.ts +1 -2
- package/dist/bin.js +4 -0
- package/dist/bin.js.map +1 -1
- package/dist/build/index.d.ts +28 -0
- package/dist/build/index.js +51 -0
- package/dist/build/index.js.map +1 -0
- package/dist/cli.d.ts +15 -5
- package/dist/cli.js +2648 -3671
- package/dist/cli.js.map +1 -1
- package/dist/compiler/adapter.d.ts +14 -11
- package/dist/compiler/adapter.js +68 -93
- package/dist/compiler/adapter.js.map +1 -1
- package/dist/compiler/dev-warnings.d.ts +8 -5
- package/dist/compiler/dev-warnings.js +248 -321
- package/dist/compiler/dev-warnings.js.map +1 -1
- package/dist/compiler/directives.d.ts +3 -0
- package/dist/compiler/directives.js +124 -150
- package/dist/compiler/directives.js.map +1 -1
- package/dist/compiler/implementation.d.ts +96 -93
- package/dist/compiler/implementation.js +2967 -3430
- package/dist/compiler/index.d.ts +14 -11
- package/dist/compiler/index.js +68 -93
- package/dist/compiler/index.js.map +1 -1
- package/dist/core/config.d.ts +12 -5
- package/dist/core/config.js +42 -25
- package/dist/core/config.js.map +1 -1
- package/dist/core/hooks.d.ts +127 -126
- package/dist/core/hooks.js +45 -55
- package/dist/core/hooks.js.map +1 -1
- package/dist/core/index.d.ts +5 -4
- package/dist/core/index.js +5 -5
- package/dist/core/module-container.d.ts +76 -74
- package/dist/core/module-container.js +181 -186
- package/dist/core/module-container.js.map +1 -1
- package/dist/core/resux.d.ts +15 -12
- package/dist/core/resux.js +17 -13
- package/dist/core/resux.js.map +1 -1
- package/dist/create-bin.d.ts +1 -2
- package/dist/create-bin.js +4 -0
- package/dist/create-bin.js.map +1 -1
- package/dist/create.d.ts +3 -0
- package/dist/create.js +499 -638
- package/dist/create.js.map +1 -1
- package/dist/deploy/cloudflare.d.ts +4 -1
- package/dist/deploy/cloudflare.js +30 -34
- package/dist/deploy/cloudflare.js.map +1 -1
- package/dist/deploy/common.d.ts +6 -4
- package/dist/deploy/common.js +118 -188
- package/dist/deploy/common.js.map +1 -1
- package/dist/deploy/framework-runtime.d.ts +3 -0
- package/dist/deploy/framework-runtime.js +43 -48
- package/dist/deploy/framework-runtime.js.map +1 -1
- package/dist/deploy/index.d.ts +4 -1
- package/dist/deploy/index.js +58 -80
- package/dist/deploy/index.js.map +1 -1
- package/dist/deploy/netlify.d.ts +4 -1
- package/dist/deploy/netlify.js +40 -41
- package/dist/deploy/netlify.js.map +1 -1
- package/dist/deploy/node.d.ts +4 -1
- package/dist/deploy/node.js +24 -19
- package/dist/deploy/node.js.map +1 -1
- package/dist/deploy/production-report.d.ts +3 -0
- package/dist/deploy/production-report.js +14 -14
- package/dist/deploy/production-report.js.map +1 -1
- package/dist/deploy/runtime-dependencies.d.ts +3 -0
- package/dist/deploy/runtime-dependencies.js +158 -220
- package/dist/deploy/runtime-dependencies.js.map +1 -1
- package/dist/deploy/static.d.ts +4 -1
- package/dist/deploy/static.js +16 -14
- package/dist/deploy/static.js.map +1 -1
- package/dist/deploy/types.d.ts +25 -22
- package/dist/deploy/types.js +0 -1
- package/dist/deploy/vercel.d.ts +4 -1
- package/dist/deploy/vercel.js +137 -188
- package/dist/deploy/vercel.js.map +1 -1
- package/dist/fonts/index.d.ts +15 -11
- package/dist/fonts/index.js +114 -134
- package/dist/fonts/index.js.map +1 -1
- package/dist/globals.d.ts +79 -78
- package/dist/globals.js +0 -1
- package/dist/halal-core/ai/classifyProject.d.ts +4 -1
- package/dist/halal-core/ai/classifyProject.js +81 -95
- package/dist/halal-core/ai/classifyProject.js.map +1 -1
- package/dist/halal-core/ai/classifyRuntimeContent.d.ts +5 -2
- package/dist/halal-core/ai/classifyRuntimeContent.js +77 -95
- package/dist/halal-core/ai/classifyRuntimeContent.js.map +1 -1
- package/dist/halal-core/ai/createProjectSummary.d.ts +38 -35
- package/dist/halal-core/ai/createProjectSummary.js +38 -39
- package/dist/halal-core/ai/createProjectSummary.js.map +1 -1
- package/dist/halal-core/ai/halalClassifierPrompt.d.ts +3 -0
- package/dist/halal-core/ai/halalClassifierPrompt.js +5 -1
- package/dist/halal-core/ai/halalClassifierPrompt.js.map +1 -1
- package/dist/halal-core/ai/redactSensitiveData.d.ts +3 -0
- package/dist/halal-core/ai/redactSensitiveData.js +82 -110
- package/dist/halal-core/ai/redactSensitiveData.js.map +1 -1
- package/dist/halal-core/ai/validateAiResponse.d.ts +4 -1
- package/dist/halal-core/ai/validateAiResponse.js +58 -85
- package/dist/halal-core/ai/validateAiResponse.js.map +1 -1
- package/dist/halal-core/cli/check.d.ts +3 -0
- package/dist/halal-core/cli/check.js +28 -30
- package/dist/halal-core/cli/check.js.map +1 -1
- package/dist/halal-core/cli/explain.d.ts +3 -0
- package/dist/halal-core/cli/explain.js +27 -31
- package/dist/halal-core/cli/explain.js.map +1 -1
- package/dist/halal-core/cli/report.d.ts +3 -0
- package/dist/halal-core/cli/report.js +14 -10
- package/dist/halal-core/cli/report.js.map +1 -1
- package/dist/halal-core/cli/submitReview.d.ts +3 -0
- package/dist/halal-core/cli/submitReview.js +13 -9
- package/dist/halal-core/cli/submitReview.js.map +1 -1
- package/dist/halal-core/cli/verifyReview.d.ts +3 -0
- package/dist/halal-core/cli/verifyReview.js +18 -15
- package/dist/halal-core/cli/verifyReview.js.map +1 -1
- package/dist/halal-core/config.d.ts +30 -27
- package/dist/halal-core/config.js +76 -118
- package/dist/halal-core/config.js.map +1 -1
- package/dist/halal-core/crypto/integrity.d.ts +6 -3
- package/dist/halal-core/crypto/integrity.js +64 -87
- package/dist/halal-core/crypto/integrity.js.map +1 -1
- package/dist/halal-core/enforce.d.ts +3 -0
- package/dist/halal-core/enforce.js +92 -105
- package/dist/halal-core/enforce.js.map +1 -1
- package/dist/halal-core/index.d.ts +20 -16
- package/dist/halal-core/index.js +18 -19
- package/dist/halal-core/lifecycle.d.ts +3 -0
- package/dist/halal-core/lifecycle.js +15 -13
- package/dist/halal-core/lifecycle.js.map +1 -1
- package/dist/halal-core/policy.d.ts +4 -1
- package/dist/halal-core/policy.js +6 -2
- package/dist/halal-core/policy.js.map +1 -1
- package/dist/halal-core/report/formatBrowserOverlay.d.ts +4 -1
- package/dist/halal-core/report/formatBrowserOverlay.js +10 -8
- package/dist/halal-core/report/formatBrowserOverlay.js.map +1 -1
- package/dist/halal-core/report/formatTerminalReport.d.ts +4 -1
- package/dist/halal-core/report/formatTerminalReport.js +27 -37
- package/dist/halal-core/report/formatTerminalReport.js.map +1 -1
- package/dist/halal-core/report/generateHalalReport.d.ts +7 -4
- package/dist/halal-core/report/generateHalalReport.js +26 -26
- package/dist/halal-core/report/generateHalalReport.js.map +1 -1
- package/dist/halal-core/report/signReport.d.ts +4 -1
- package/dist/halal-core/report/signReport.js +16 -12
- package/dist/halal-core/report/signReport.js.map +1 -1
- package/dist/halal-core/report/verifyReport.d.ts +9 -6
- package/dist/halal-core/report/verifyReport.js +51 -41
- package/dist/halal-core/report/verifyReport.js.map +1 -1
- package/dist/halal-core/review/createReviewRequest.d.ts +4 -1
- package/dist/halal-core/review/createReviewRequest.js +21 -17
- package/dist/halal-core/review/createReviewRequest.js.map +1 -1
- package/dist/halal-core/review/reviewPolicy.d.ts +3 -0
- package/dist/halal-core/review/reviewPolicy.js +19 -17
- package/dist/halal-core/review/reviewPolicy.js.map +1 -1
- package/dist/halal-core/review/signedReviewFile.d.ts +11 -8
- package/dist/halal-core/review/signedReviewFile.js +24 -22
- package/dist/halal-core/review/signedReviewFile.js.map +1 -1
- package/dist/halal-core/review/verifyReviewApproval.d.ts +9 -6
- package/dist/halal-core/review/verifyReviewApproval.js +68 -62
- package/dist/halal-core/review/verifyReviewApproval.js.map +1 -1
- package/dist/halal-core/rules/adultContentRules.d.ts +3 -0
- package/dist/halal-core/rules/adultContentRules.js +23 -23
- package/dist/halal-core/rules/adultContentRules.js.map +1 -1
- package/dist/halal-core/rules/alcoholDrugVapeRules.d.ts +3 -0
- package/dist/halal-core/rules/alcoholDrugVapeRules.js +22 -22
- package/dist/halal-core/rules/alcoholDrugVapeRules.js.map +1 -1
- package/dist/halal-core/rules/childSafetyRules.d.ts +3 -0
- package/dist/halal-core/rules/childSafetyRules.js +19 -19
- package/dist/halal-core/rules/childSafetyRules.js.map +1 -1
- package/dist/halal-core/rules/coreCategories.d.ts +7 -4
- package/dist/halal-core/rules/coreCategories.js +237 -110
- package/dist/halal-core/rules/coreCategories.js.map +1 -1
- package/dist/halal-core/rules/cyberAbuseRules.d.ts +3 -0
- package/dist/halal-core/rules/cyberAbuseRules.js +27 -27
- package/dist/halal-core/rules/cyberAbuseRules.js.map +1 -1
- package/dist/halal-core/rules/defaultBlockedRules.d.ts +21 -18
- package/dist/halal-core/rules/defaultBlockedRules.js +158 -199
- package/dist/halal-core/rules/defaultBlockedRules.js.map +1 -1
- package/dist/halal-core/rules/dependencyRules.d.ts +8 -5
- package/dist/halal-core/rules/dependencyRules.js +50 -56
- package/dist/halal-core/rules/dependencyRules.js.map +1 -1
- package/dist/halal-core/rules/endpointRules.d.ts +6 -3
- package/dist/halal-core/rules/endpointRules.js +21 -23
- package/dist/halal-core/rules/endpointRules.js.map +1 -1
- package/dist/halal-core/rules/environmentalHarmRules.d.ts +3 -0
- package/dist/halal-core/rules/environmentalHarmRules.js +17 -17
- package/dist/halal-core/rules/environmentalHarmRules.js.map +1 -1
- package/dist/halal-core/rules/financeRibaRules.d.ts +3 -0
- package/dist/halal-core/rules/financeRibaRules.js +20 -20
- package/dist/halal-core/rules/financeRibaRules.js.map +1 -1
- package/dist/halal-core/rules/gamblingRules.d.ts +3 -0
- package/dist/halal-core/rules/gamblingRules.js +22 -22
- package/dist/halal-core/rules/gamblingRules.js.map +1 -1
- package/dist/halal-core/rules/generalHarmRules.d.ts +3 -0
- package/dist/halal-core/rules/generalHarmRules.js +15 -15
- package/dist/halal-core/rules/generalHarmRules.js.map +1 -1
- package/dist/halal-core/rules/healthHarmRules.d.ts +3 -0
- package/dist/halal-core/rules/healthHarmRules.js +19 -19
- package/dist/halal-core/rules/healthHarmRules.js.map +1 -1
- package/dist/halal-core/rules/keywordRules.d.ts +11 -8
- package/dist/halal-core/rules/keywordRules.js +90 -39
- package/dist/halal-core/rules/keywordRules.js.map +1 -1
- package/dist/halal-core/rules/privacyAbuseRules.d.ts +3 -0
- package/dist/halal-core/rules/privacyAbuseRules.js +21 -21
- package/dist/halal-core/rules/privacyAbuseRules.js.map +1 -1
- package/dist/halal-core/rules/scamFraudRules.d.ts +3 -0
- package/dist/halal-core/rules/scamFraudRules.js +29 -29
- package/dist/halal-core/rules/scamFraudRules.js.map +1 -1
- package/dist/halal-core/rules/selfHarmRules.d.ts +3 -0
- package/dist/halal-core/rules/selfHarmRules.js +17 -17
- package/dist/halal-core/rules/selfHarmRules.js.map +1 -1
- package/dist/halal-core/rules/violenceExtremismRules.d.ts +3 -0
- package/dist/halal-core/rules/violenceExtremismRules.js +30 -30
- package/dist/halal-core/rules/violenceExtremismRules.js.map +1 -1
- package/dist/halal-core/runtime/guard.d.ts +17 -14
- package/dist/halal-core/runtime/guard.js +162 -183
- package/dist/halal-core/runtime/guard.js.map +1 -1
- package/dist/halal-core/runtime/index.d.ts +5 -4
- package/dist/halal-core/runtime/index.js +4 -5
- package/dist/halal-core/runtime/reviewedMemory.d.ts +4 -1
- package/dist/halal-core/runtime/reviewedMemory.js +74 -110
- package/dist/halal-core/runtime/reviewedMemory.js.map +1 -1
- package/dist/halal-core/runtime/serializeRuntimeContent.d.ts +10 -7
- package/dist/halal-core/runtime/serializeRuntimeContent.js +132 -156
- package/dist/halal-core/runtime/serializeRuntimeContent.js.map +1 -1
- package/dist/halal-core/runtime/types.d.ts +44 -41
- package/dist/halal-core/runtime/types.js +0 -1
- package/dist/halal-core/scanner/scanApiRoutes.d.ts +3 -0
- package/dist/halal-core/scanner/scanApiRoutes.js +32 -36
- package/dist/halal-core/scanner/scanApiRoutes.js.map +1 -1
- package/dist/halal-core/scanner/scanComponents.d.ts +3 -0
- package/dist/halal-core/scanner/scanComponents.js +12 -13
- package/dist/halal-core/scanner/scanComponents.js.map +1 -1
- package/dist/halal-core/scanner/scanContent.d.ts +5 -2
- package/dist/halal-core/scanner/scanContent.js +193 -263
- package/dist/halal-core/scanner/scanContent.js.map +1 -1
- package/dist/halal-core/scanner/scanDependencies.d.ts +3 -0
- package/dist/halal-core/scanner/scanDependencies.js +16 -15
- package/dist/halal-core/scanner/scanDependencies.js.map +1 -1
- package/dist/halal-core/scanner/scanDomains.d.ts +5 -2
- package/dist/halal-core/scanner/scanDomains.js +12 -12
- package/dist/halal-core/scanner/scanDomains.js.map +1 -1
- package/dist/halal-core/scanner/scanEnvNames.d.ts +3 -0
- package/dist/halal-core/scanner/scanEnvNames.js +23 -26
- package/dist/halal-core/scanner/scanEnvNames.js.map +1 -1
- package/dist/halal-core/scanner/scanMetadata.d.ts +6 -3
- package/dist/halal-core/scanner/scanMetadata.js +20 -29
- package/dist/halal-core/scanner/scanMetadata.js.map +1 -1
- package/dist/halal-core/scanner/scanPages.d.ts +3 -0
- package/dist/halal-core/scanner/scanPages.js +12 -15
- package/dist/halal-core/scanner/scanPages.js.map +1 -1
- package/dist/halal-core/scanner/scanProject.d.ts +15 -10
- package/dist/halal-core/scanner/scanProject.js +43 -49
- package/dist/halal-core/scanner/scanProject.js.map +1 -1
- package/dist/halal-core/scanner/scanRoutes.d.ts +3 -0
- package/dist/halal-core/scanner/scanRoutes.js +32 -39
- package/dist/halal-core/scanner/scanRoutes.js.map +1 -1
- package/dist/halal-core/scanner/scanTranslations.d.ts +3 -0
- package/dist/halal-core/scanner/scanTranslations.js +21 -29
- package/dist/halal-core/scanner/scanTranslations.js.map +1 -1
- package/dist/halal-core/status.d.ts +14 -11
- package/dist/halal-core/status.js +0 -1
- package/dist/halal-core/tamper/verifyCoreIntegrity.d.ts +3 -0
- package/dist/halal-core/tamper/verifyCoreIntegrity.js +26 -24
- package/dist/halal-core/tamper/verifyCoreIntegrity.js.map +1 -1
- package/dist/halal-core/tamper/verifyLifecycleHooks.d.ts +3 -0
- package/dist/halal-core/tamper/verifyLifecycleHooks.js +13 -12
- package/dist/halal-core/tamper/verifyLifecycleHooks.js.map +1 -1
- package/dist/halal-core/tamper/verifyReportSignature.d.ts +6 -3
- package/dist/halal-core/tamper/verifyReportSignature.js +20 -14
- package/dist/halal-core/tamper/verifyReportSignature.js.map +1 -1
- package/dist/halal.d.ts +20 -1
- package/dist/halal.js +18 -2
- package/dist/i18n/index.d.ts +34 -31
- package/dist/i18n/index.js +219 -288
- package/dist/i18n/index.js.map +1 -1
- package/dist/i18n/shared.d.ts +18 -15
- package/dist/i18n/shared.js +204 -266
- package/dist/i18n/shared.js.map +1 -1
- package/dist/icons/index.d.ts +143 -139
- package/dist/icons/index.js +322 -273
- package/dist/icons/index.js.map +1 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +7 -2
- package/dist/kit/index.d.ts +9 -6
- package/dist/kit/index.js +45 -43
- package/dist/kit/index.js.map +1 -1
- package/dist/nitro-server/index.d.ts +7 -4
- package/dist/nitro-server/index.js +6 -2
- package/dist/nitro-server/index.js.map +1 -1
- package/dist/node.d.ts +6 -3
- package/dist/node.js +88 -116
- package/dist/node.js.map +1 -1
- package/dist/reactivity/computed.d.ts +6 -3
- package/dist/reactivity/computed.js +46 -53
- package/dist/reactivity/computed.js.map +1 -1
- package/dist/reactivity/effect.d.ts +8 -5
- package/dist/reactivity/effect.js +105 -146
- package/dist/reactivity/effect.js.map +1 -1
- package/dist/reactivity/index.d.ts +8 -8
- package/dist/reactivity/index.js +7 -8
- package/dist/reactivity/reactive.d.ts +3 -0
- package/dist/reactivity/reactive.js +93 -133
- package/dist/reactivity/reactive.js.map +1 -1
- package/dist/reactivity/readonly.d.ts +2 -1
- package/dist/reactivity/readonly.js +2 -2
- package/dist/reactivity/ref.d.ts +15 -15
- package/dist/reactivity/ref.js +73 -81
- package/dist/reactivity/ref.js.map +1 -1
- package/dist/reactivity/scheduler.d.ts +3 -1
- package/dist/reactivity/scheduler.js +67 -69
- package/dist/reactivity/scheduler.js.map +1 -1
- package/dist/reactivity/types.d.ts +17 -14
- package/dist/reactivity/types.js +0 -1
- package/dist/reactivity/utils.d.ts +7 -4
- package/dist/reactivity/utils.js +25 -24
- package/dist/reactivity/utils.js.map +1 -1
- package/dist/reactivity/watch.d.ts +4 -2
- package/dist/reactivity/watch.js +75 -103
- package/dist/reactivity/watch.js.map +1 -1
- package/dist/runtime/core.d.ts +31 -0
- package/dist/runtime/core.js +156 -0
- package/dist/runtime/core.js.map +1 -0
- package/dist/runtime/index.d.ts +487 -461
- package/dist/runtime/index.js +4129 -5254
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/reactivity.d.ts +7 -0
- package/dist/runtime/reactivity.js +6 -0
- package/dist/runtime/resume.d.ts +79 -0
- package/dist/runtime/resume.js +482 -0
- package/dist/runtime/resume.js.map +1 -0
- package/dist/runtime/router.d.ts +20 -0
- package/dist/runtime/router.js +60 -0
- package/dist/runtime/router.js.map +1 -0
- package/dist/runtime/streaming.d.ts +24 -0
- package/dist/runtime/streaming.js +200 -0
- package/dist/runtime/streaming.js.map +1 -0
- package/dist/security/media-fetch.d.ts +32 -0
- package/dist/security/media-fetch.js +301 -0
- package/dist/security/media-fetch.js.map +1 -0
- package/dist/security/path-boundary.d.ts +7 -0
- package/dist/security/path-boundary.js +70 -0
- package/dist/security/path-boundary.js.map +1 -0
- package/dist/ui/index.d.ts +1580 -1576
- package/dist/ui/index.js +975 -674
- package/dist/ui/index.js.map +1 -1
- package/dist/vite-builder/index.d.ts +6 -3
- package/dist/vite-builder/index.js +6 -2
- package/dist/vite-builder/index.js.map +1 -1
- package/package.json +46 -86
- package/dist/compiler/implementation.js.map +0 -1
- package/dist/core/index.js.map +0 -1
- package/dist/deploy/types.js.map +0 -1
- package/dist/globals.js.map +0 -1
- package/dist/halal-core/index.js.map +0 -1
- package/dist/halal-core/runtime/index.js.map +0 -1
- package/dist/halal-core/runtime/types.js.map +0 -1
- package/dist/halal-core/status.js.map +0 -1
- package/dist/halal.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/reactivity/index.js.map +0 -1
- package/dist/reactivity/readonly.js.map +0 -1
- package/dist/reactivity/types.js.map +0 -1
package/dist/icons/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/icons/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,SAAS,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC;AACvF,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAUvD,MAAM,UAAU,qBAAqB,CAAC,WAAqB;IACzD,OAAO,EAAE,WAAW,EAAE,CAAC;AACzB,CAAC;AAcD,MAAM,CAAC,MAAM,YAAY,GAA6B;IACpD,uBAAuB,EAAE,EAAE,IAAI,EAAE,8NAA8N,EAAE;IACjQ,MAAM,EAAE,EAAE,IAAI,EAAE,8NAA8N,EAAE;IAChP,uBAAuB,EAAE,EAAE,IAAI,EAAE,gHAAgH,EAAE;IACnJ,2CAA2C,EAAE,EAAE,IAAI,EAAE,gHAAgH,EAAE;IACvK,+BAA+B,EAAE,EAAE,IAAI,EAAE,gHAAgH,EAAE;IAC3J,MAAM,EAAE,EAAE,IAAI,EAAE,gHAAgH,EAAE;IAClI,8CAA8C,EAAE,EAAE,IAAI,EAAE,6JAA6J,EAAE;IACvN,UAAU,EAAE,EAAE,IAAI,EAAE,6JAA6J,EAAE;IACnL,0BAA0B,EAAE,EAAE,IAAI,EAAE,oDAAoD,EAAE;IAC1F,SAAS,EAAE,EAAE,IAAI,EAAE,oDAAoD,EAAE;IACzE,wBAAwB,EAAE,EAAE,IAAI,EAAE,kGAAkG,EAAE;IACtI,OAAO,EAAE,EAAE,I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,CAAC,CAAC;IACL,CAAC;CACF,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/icons/index.ts"],"sourcesContent":["import { defineComponent, h, computed, ref, onMounted, onUnmounted, watch } from \"vue\";\nimport { defineResuxModule } from \"../kit/index.js\";\nimport { useRuntimeConfig } from \"../runtime/index.js\";\n\nexport interface ResuxIconsModuleOptions {\n collections?: string[];\n component?: string;\n mode?: \"css\" | \"svg\";\n apiProvider?: string;\n lazy?: boolean;\n}\n\nexport function defineIconCollections(collections: string[]): ResuxIconsModuleOptions {\n return { collections };\n}\n\nexport interface IconPathData {\n d: string;\n opacity?: string;\n}\n\nexport interface IconData {\n path?: string;\n paths?: IconPathData[];\n opacity?: string;\n viewBox?: string;\n}\n\nexport const iconRegistry: Record<string, IconData> = {\n \"material-symbols:call\": { path: \"M6.62 10.79a15.15 15.15 0 0 0 6.59 6.59l2.2-2.2a1 1 0 0 1 1.11-.27c1.12.37 2.33.57 3.57.57a1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.57 3.57a1 1 0 0 1-.26 1.02l-2.2 2.2z\" },\n \"call\": { path: \"M6.62 10.79a15.15 15.15 0 0 0 6.59 6.59l2.2-2.2a1 1 0 0 1 1.11-.27c1.12.37 2.33.57 3.57.57a1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.57 3.57a1 1 0 0 1-.26 1.02l-2.2 2.2z\" },\n \"material-symbols:mail\": { path: \"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5l-8-5V6l8 5l8-5v2z\" },\n \"material-symbols-light:mail-outline-sharp\": { path: \"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5l-8-5V6l8 5l8-5v2z\" },\n \"material-symbols:mail-outline\": { path: \"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5l-8-5V6l8 5l8-5v2z\" },\n \"mail\": { path: \"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5l-8-5V6l8 5l8-5v2z\" },\n \"material-symbols:location-on-outline-rounded\": { path: \"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5s-1.12 2.5-2.5 2.5z\" },\n \"location\": { path: \"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5s-1.12 2.5-2.5 2.5z\" },\n \"material-symbols:warning\": { path: \"M1 21h22L12 2L1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z\" },\n \"warning\": { path: \"M1 21h22L12 2L1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z\" },\n \"material-symbols:error\": { path: \"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z\" },\n \"error\": { path: \"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z\" },\n \"material-symbols:close\": { path: \"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12z\" },\n \"close\": { path: \"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12z\" },\n \"material-symbols:add\": { path: \"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z\" },\n \"add\": { path: \"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z\" },\n \"material-symbols:keyboard-arrow-down\": { path: \"m12 15.4l-6-6L7.4 8l4.6 4.6L16.6 8L18 9.4z\" },\n \"arrow-down\": { path: \"m12 15.4l-6-6L7.4 8l4.6 4.6L16.6 8L18 9.4z\" },\n \"mdi:facebook\": { path: \"M12 2.04C6.5 2.04 2 6.53 2 12.06C2 17.06 5.66 21.21 10.44 21.96V14.96H7.9V12.06H10.44V9.85C10.44 7.34 11.93 5.96 14.22 5.96C15.31 5.96 16.45 6.15 16.45 6.15V8.62H15.19C13.95 8.62 13.56 9.39 13.56 10.18V12.06H16.34L15.89 14.96H13.56V21.96A10 10 0 0 0 22 12.06C22 6.53 17.5 2.04 12 2.04Z\" },\n \"mdi:facebook-box\": { path: \"M19 3a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14m-.5 15.5v-5.3h-1.8v-2.2h1.8V9.3c0-1.8 1.1-2.8 2.7-2.8c.8 0 1.5.1 1.7.1v2h-1.2c-.9 0-1 .4-1 1v1.3h2.2l-.3 2.2h-1.9v5.3h-2.2z\" },\n \"facebook\": { path: \"M19 3a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14m-.5 15.5v-5.3h-1.8v-2.2h1.8V9.3c0-1.8 1.1-2.8 2.7-2.8c.8 0 1.5.1 1.7.1v2h-1.2c-.9 0-1 .4-1 1v1.3h2.2l-.3 2.2h-1.9v5.3h-2.2z\" },\n \"mingcute:instagram-fill\": { path: \"M16 3a5 5 0 0 1 5 5v8a5 5 0 0 1-5 5H8a5 5 0 0 1-5-5V8a5 5 0 0 1 5-5zm-4 5a4 4 0 1 0 0 8a4 4 0 0 0 0-8m0 2a2 2 0 1 1 0 4a2 2 0 0 1 0-4m4.5-3.5a1 1 0 1 0 0 2a1 1 0 0 0 0-2\" },\n \"instagram\": { path: \"M16 3a5 5 0 0 1 5 5v8a5 5 0 0 1-5 5H8a5 5 0 0 1-5-5V8a5 5 0 0 1 5-5zm-4 5a4 4 0 1 0 0 8a4 4 0 0 0 0-8m0 2a2 2 0 1 1 0 4a2 2 0 0 1 0-4m4.5-3.5a1 1 0 1 0 0 2a1 1 0 0 0 0-2\" },\n \"cib:linkedin\": { path: \"M27.26 27.271h-4.733v-7.427c0-1.771-.037-4.047-2.475-4.047c-2.468 0-2.844 1.921-2.844 3.916v7.557h-4.739V11.999h4.552v2.083h.061c.636-1.203 2.183-2.468 4.491-2.468c4.801 0 5.692 3.161 5.692 7.271v8.385zM7.115 9.912a2.75 2.75 0 0 1-2.751-2.756a2.753 2.753 0 1 1 2.751 2.756m2.374 17.359H4.74V12h4.749zM29.636 0H2.36C1.057 0 0 1.031 0 2.307v27.387c0 1.276 1.057 2.307 2.36 2.307h27.271c1.301 0 2.369-1.031 2.369-2.307V2.307C32 1.031 30.932 0 29.636 0z\" },\n \"lineicons:linkedin\": { path: \"M27.26 27.271h-4.733v-7.427c0-1.771-.037-4.047-2.475-4.047c-2.468 0-2.844 1.921-2.844 3.916v7.557h-4.739V11.999h4.552v2.083h.061c.636-1.203 2.183-2.468 4.491-2.468c4.801 0 5.692 3.161 5.692 7.271v8.385zM7.115 9.912a2.75 2.75 0 0 1-2.751-2.756a2.753 2.753 0 1 1 2.751 2.756m2.374 17.359H4.74V12h4.749zM29.636 0H2.36C1.057 0 0 1.031 0 2.307v27.387c0 1.276 1.057 2.307 2.36 2.307h27.271c1.301 0 2.369-1.031 2.369-2.307V2.307C32 1.031 30.932 0 29.636 0z\" },\n \"linkedin\": { path: \"M27.26 27.271h-4.733v-7.427c0-1.771-.037-4.047-2.475-4.047c-2.468 0-2.844 1.921-2.844 3.916v7.557h-4.739V11.999h4.552v2.083h.061c.636-1.203 2.183-2.468 4.491-2.468c4.801 0 5.692 3.161 5.692 7.271v8.385zM7.115 9.912a2.75 2.75 0 0 1-2.751-2.756a2.753 2.753 0 1 1 2.751 2.756m2.374 17.359H4.74V12h4.749zM29.636 0H2.36C1.057 0 0 1.031 0 2.307v27.387c0 1.276 1.057 2.307 2.36 2.307h27.271c1.301 0 2.369-1.031 2.369-2.307V2.307C32 1.031 30.932 0 29.636 0z\" },\n \"uil:youtube\": { path: \"M23 9.71a8.5 8.5 0 0 0-.91-4.13a2.92 2.92 0 0 0-1.72-1A78 78 0 0 0 12 4.27a79 79 0 0 0-8.34.3a2.87 2.87 0 0 0-1.46.74c-.9.83-1 2.25-1.1 3.45a48 48 0 0 0 0 6.48a9.6 9.6 0 0 0 .3 2a3.14 3.14 0 0 0 .71 1.36a2.86 2.86 0 0 0 1.49.78a45 45 0 0 0 6.5.33c3.5.05 6.57 0 10.2-.28a2.9 2.9 0 0 0 1.53-.78a2.5 2.5 0 0 0 .61-1a10.6 10.6 0 0 0 .52-3.4c.04-.56.04-3.94.04-4.54M9.74 14.85V8.66l5.92 3.11c-1.66.92-3.85 1.96-5.92 3.08\" },\n \"youtube\": { path: \"M23 9.71a8.5 8.5 0 0 0-.91-4.13a2.92 2.92 0 0 0-1.72-1A78 78 0 0 0 12 4.27a79 79 0 0 0-8.34.3a2.87 2.87 0 0 0-1.46.74c-.9.83-1 2.25-1.1 3.45a48 48 0 0 0 0 6.48a9.6 9.6 0 0 0 .3 2a3.14 3.14 0 0 0 .71 1.36a2.86 2.86 0 0 0 1.49.78a45 45 0 0 0 6.5.33c3.5.05 6.57 0 10.2-.28a2.9 2.9 0 0 0 1.53-.78a2.5 2.5 0 0 0 .61-1a10.6 10.6 0 0 0 .52-3.4c.04-.56.04-3.94.04-4.54M9.74 14.85V8.66l5.92 3.11c-1.66.92-3.85 1.96-5.92 3.08\" },\n \"line-md:twitter-x\": { path: \"M18.244 2.25h3.308l-7.227 8.26l8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z\" },\n \"twitter\": { path: \"M18.244 2.25h3.308l-7.227 8.26l8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z\" },\n \"ic:baseline-whatsapp\": { path: \"M12.04 2c-5.46 0-9.91 4.45-9.91 9.91c0 1.75.46 3.45 1.32 4.95L2.05 22l5.25-1.38c1.45.79 3.08 1.21 4.74 1.21c5.46 0 9.91-4.45 9.91-9.91c0-2.65-1.03-5.14-2.9-7.01A9.816 9.816 0 0 0 12.04 2zm.01 1.67c4.55 0 8.25 3.7 8.25 8.25c0 4.55-3.7 8.25-8.25 8.25c-1.47 0-2.88-.39-4.12-1.12l-.3-.18l-3.07.81l.82-2.99l-.19-.31A8.204 8.204 0 0 1 3.8 11.92c0-4.55 3.7-8.25 8.25-8.25z\" },\n \"streamline:interface-validation-check-circle-checkmark-addition-circle-success-check-validation-add-form\": { path: \"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5l1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z\" },\n \"ph:check-circle-thin\": { path: \"M12 2a10 10 0 1 0 10 10A10.011 10.011 0 0 0 12 2zm0 19a9 9 0 1 1 9-9a9.01 9.01 0 0 1-9 9zm4.53-11.47a.5.5 0 0 1 0 .71l-5 5a.5.5 0 0 1-.71 0l-2.5-2.5a.5.5 0 1 1 .71-.71L11.17 14.4l4.65-4.65a.5.5 0 0 1 .71 0z\" },\n \"solar:check-circle-linear\": { path: \"M12 2a10 10 0 1 0 10 10A10.011 10.011 0 0 0 12 2zm0 19a9 9 0 1 1 9-9a9.01 9.01 0 0 1-9 9zm4.53-11.47a.5.5 0 0 1 0 .71l-5 5a.5.5 0 0 1-.71 0l-2.5-2.5a.5.5 0 1 1 .71-.71L11.17 14.4l4.65-4.65a.5.5 0 0 1 .71 0z\" },\n \"lucide-lab:flower-lotus\": { path: \"M12 21c-4.418 0-8-3.582-8-8c0-3.5 3.5-7 8-11c4.5 4 8 7.5 8 11c0 4.418-3.582 8-8 8z\" },\n \"solar:leaf-outline\": { path: \"M12 21c-4.418 0-8-3.582-8-8c0-3.5 3.5-7 8-11c4.5 4 8 7.5 8 11c0 4.418-3.582 8-8 8z\" },\n \"solar:command-linear\": { path: \"M8.5 5A3.5 3.5 0 0 0 5 8.5v.5A3.5 3.5 0 0 0 8.5 12.5H9v-1h-.5A2.5 2.5 0 0 1 6 9v-.5A2.5 2.5 0 0 1 8.5 6H9V5h-.5zm7 0H15v1h.5a2.5 2.5 0 0 1 2.5 2.5v.5a2.5 2.5 0 0 1-2.5 2.5H15v1h.5a3.5 3.5 0 0 0 3.5-3.5v-.5A3.5 3.5 0 0 0 15.5 5z\" },\n \"gg:mouse\": { path: \"M12 5a1 1 0 0 0-1 1v4a1 1 0 1 0 2 0V6a1 1 0 0 0-1-1M4 8a8 8 0 1 1 16 0v8a8 8 0 1 1-16 0zm14 0v8a6 6 0 0 1-12 0V8a6 6 0 1 1 12 0\" },\n \"mouse\": { path: \"M12 5a1 1 0 0 0-1 1v4a1 1 0 1 0 2 0V6a1 1 0 0 0-1-1M4 8a8 8 0 1 1 16 0v8a8 8 0 1 1-16 0zm14 0v8a6 6 0 0 1-12 0V8a6 6 0 1 1 12 0\" },\n \"iconoir:flash\": { path: \"M13 10V3L5 14h6v7l8-11z\" },\n \"flash\": { path: \"M13 10V3L5 14h6v7l8-11z\" },\n \"hugeicons:search-01\": { path: \"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5A6.5 6.5 0 1 0 9.5 16a6.471 6.471 0 0 0 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5S14 7.01 14 9.5S11.99 14 9.5 14z\" },\n \"search\": { path: \"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5A6.5 6.5 0 1 0 9.5 16a6.471 6.471 0 0 0 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5S14 7.01 14 9.5S11.99 14 9.5 14z\" },\n \"solar:info-circle-outline\": { path: \"M12 17.75a.75.75 0 0 0 .75-.75v-6a.75.75 0 0 0-1.5 0v6c0 .414.336.75.75.75M12 7a1 1 0 1 1 0 2a1 1 0 0 1 0-2M1.25 12C1.25 6.063 6.063 1.25 12 1.25S22.75 6.063 22.75 12S17.937 22.75 12 22.75S1.25 17.937 1.25 12M12 2.75a9.25 9.25 0 1 0 0 18.5a9.25 9.25 0 0 0 0-18.5\" },\n \"ic:sharp-tag-faces\": { path: \"M12.01 2C6.49 2 2.02 6.48 2.02 12s4.47 10 9.99 10c5.53 0 10.01-4.48 10.01-10S17.54 2 12.01 2m.01 18c-4.42 0-8-3.58-8-8s3.58-8 8-8s8 3.58 8 8s-3.58 8-8 8m3.5-9c.83 0 1.5-.67 1.5-1.5S16.35 8 15.52 8s-1.5.67-1.5 1.5s.67 1.5 1.5 1.5m-7 0c.83 0 1.5-.67 1.5-1.5S9.35 8 8.52 8s-1.5.67-1.5 1.5s.67 1.5 1.5 1.5m3.5 6.5c2.33 0 4.31-1.46 5.11-3.5H6.91c.8 2.04 2.78 3.5 5.11 3.5\" },\n \"hamburger\": { path: \"M3 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z\" },\n \"svg-spinners:ring-resize\": { path: \"M12 2a10 10 0 1 0 10 10A10 10 0 0 0 12 2zm0 18a8 8 0 1 1 8-8 8 8 0 0 1-8 8z\" }\n};\n\nif (typeof globalThis !== \"undefined\") {\n (globalThis as any).__RESUX_ICON_REGISTRY__ = iconRegistry;\n}\n\nconst DEFAULT_ICON_API_PROVIDER = \"https://api.iconify.design\";\nconst ICON_FETCH_TIMEOUT_MS = 10_000;\nconst ICON_FETCH_MAX_BYTES = 256 * 1024;\nconst ICON_FETCH_CACHE_MAX_ENTRIES = 256;\nconst ICON_FETCH_MAX_IN_FLIGHT = 32;\nconst ICON_FETCH_QUEUE_MAX_ENTRIES = 512;\nconst pendingFetches = new Map<string, Promise<IconData | null>>();\nconst fetchedIconCache = new Map<string, IconData>();\nconst iconFetchQueue: Array<() => void> = [];\nlet activeIconFetches = 0;\n\nfunction stripTrailingSlashes(value: string): string {\n let end = value.length;\n while (end > 0 && value.charCodeAt(end - 1) === 47) {\n end -= 1;\n }\n return value.slice(0, end);\n}\n\nexport function normalizeIconApiProvider(value: unknown): string {\n const raw = typeof value === \"string\" ? stripTrailingSlashes(value.trim()) : \"\";\n if (!raw) {\n return DEFAULT_ICON_API_PROVIDER;\n }\n if (raw.startsWith(\"//\")) {\n return DEFAULT_ICON_API_PROVIDER;\n }\n if (raw.startsWith(\"/\")) {\n return raw;\n }\n try {\n const url = new URL(raw);\n if (url.protocol === \"https:\" || url.protocol === \"http:\") {\n return stripTrailingSlashes(url.toString());\n }\n } catch {\n // Fall back to the public provider for malformed values.\n }\n return DEFAULT_ICON_API_PROVIDER;\n}\n\nasync function readBoundedIconSvg(response: Response): Promise<string | null> {\n const rawLength = response.headers?.get?.(\"content-length\");\n if (rawLength) {\n const contentLength = Number(rawLength);\n if (Number.isFinite(contentLength) && contentLength > ICON_FETCH_MAX_BYTES) {\n return null;\n }\n }\n\n if (!response.body?.getReader) {\n const text = await response.text();\n return new TextEncoder().encode(text).byteLength <= ICON_FETCH_MAX_BYTES ? text : null;\n }\n\n const reader = response.body.getReader();\n const decoder = new TextDecoder();\n let totalBytes = 0;\n let text = \"\";\n try {\n while (true) {\n const { done, value } = await reader.read();\n if (done) break;\n totalBytes += value.byteLength;\n if (totalBytes > ICON_FETCH_MAX_BYTES) {\n await reader.cancel().catch(() => undefined);\n return null;\n }\n text += decoder.decode(value, { stream: true });\n }\n text += decoder.decode();\n return text;\n } finally {\n reader.releaseLock();\n }\n}\n\nfunction readFetchedIcon(cacheKey: string): IconData | undefined {\n const cached = fetchedIconCache.get(cacheKey);\n if (!cached) return undefined;\n fetchedIconCache.delete(cacheKey);\n fetchedIconCache.set(cacheKey, cached);\n return cached;\n}\n\nfunction rememberFetchedIcon(cacheKey: string, data: IconData): void {\n fetchedIconCache.delete(cacheKey);\n fetchedIconCache.set(cacheKey, data);\n while (fetchedIconCache.size > ICON_FETCH_CACHE_MAX_ENTRIES) {\n const oldestKey = fetchedIconCache.keys().next().value;\n if (oldestKey === undefined) break;\n fetchedIconCache.delete(oldestKey);\n }\n}\n\nfunction runWithIconFetchSlot(\n task: () => Promise<IconData | null>,\n): Promise<IconData | null> {\n if (activeIconFetches >= ICON_FETCH_MAX_IN_FLIGHT\n && iconFetchQueue.length >= ICON_FETCH_QUEUE_MAX_ENTRIES) {\n return Promise.resolve(null);\n }\n\n return new Promise((resolve) => {\n const run = () => {\n activeIconFetches += 1;\n void task()\n .then(resolve, () => resolve(null))\n .finally(() => {\n activeIconFetches = Math.max(0, activeIconFetches - 1);\n iconFetchQueue.shift()?.();\n });\n };\n if (activeIconFetches < ICON_FETCH_MAX_IN_FLIGHT) {\n run();\n } else {\n iconFetchQueue.push(run);\n }\n });\n}\n\nexport function fetchIconifyIcon(\n name: string,\n apiProvider: string = DEFAULT_ICON_API_PROVIDER,\n): Promise<IconData | null> {\n const normalized = String(name || \"\").trim().toLowerCase();\n if (!normalized || normalized.length > 256) return Promise.resolve(null);\n if (iconRegistry[normalized]) {\n return Promise.resolve(iconRegistry[normalized]);\n }\n\n const parts = normalized.split(\":\");\n if (parts.length !== 2 || !parts[0] || !parts[1]) {\n return Promise.resolve(null);\n }\n\n const provider = normalizeIconApiProvider(apiProvider);\n const cacheKey = provider + \"::\" + normalized;\n const cached = readFetchedIcon(cacheKey);\n if (cached) {\n return Promise.resolve(cached);\n }\n const pending = pendingFetches.get(cacheKey);\n if (pending) {\n return pending;\n }\n const prefix = parts[0];\n const iconName = parts[1];\n const url = provider + \"/\" + encodeURIComponent(prefix) + \"/\" + encodeURIComponent(iconName) + \".svg\";\n\n const fetchPromise = runWithIconFetchSlot(async () => {\n const controller = typeof AbortController === \"function\" ? new AbortController() : null;\n const timeout = setTimeout(() => controller?.abort(), ICON_FETCH_TIMEOUT_MS);\n try {\n const response = await fetch(url, controller ? { signal: controller.signal } : undefined);\n if (!response.ok) return null;\n const svgText = await readBoundedIconSvg(response);\n if (!svgText) return null;\n const viewBox = readSvgAttribute(svgText, \"viewBox\") || \"0 0 24 24\";\n const paths = [...svgText.matchAll(/<path\\b[^>]*>/gi)]\n .slice(0, 128)\n .map((match) => ({\n d: readSvgAttribute(match[0], \"d\").slice(0, 65_536),\n opacity: readSvgAttribute(match[0], \"opacity\") || undefined,\n }))\n .filter((entry) => Boolean(entry.d));\n if (!paths.length) {\n return null;\n }\n const data: IconData = {\n path: paths[0].d,\n paths,\n viewBox,\n };\n rememberFetchedIcon(cacheKey, data);\n return data;\n } catch {\n return null;\n } finally {\n clearTimeout(timeout);\n }\n }).finally(() => {\n pendingFetches.delete(cacheKey);\n });\n\n pendingFetches.set(cacheKey, fetchPromise);\n return fetchPromise;\n}\n\nfunction readSvgAttribute(source: string, name: string): string {\n const escapedName = name.replace(/[.*+?^${}()|[\\]\\\\]/g, String.raw`\\$&`);\n const match = new RegExp(\n String.raw`\\b${escapedName}\\s*=\\s*(?:\"([^\"]*)\"|'([^']*)')`,\n \"i\",\n ).exec(source);\n return (match?.[1] ?? match?.[2] ?? \"\").trim();\n}\n\nexport const Icon = defineComponent({\n name: \"ResuxIcon\",\n props: {\n name: { type: String, required: true },\n size: { type: [String, Number], default: \"1.25rem\" },\n mode: { type: String, default: \"svg\" },\n lazy: { type: Boolean, default: false },\n loading: { type: String, default: \"eager\" },\n apiProvider: { type: String, default: \"\" },\n class: { type: String, default: \"\" }\n },\n setup(props, { attrs }) {\n const iconRef = ref<HTMLElement | null>(null);\n const isVisible = ref(false);\n const iconName = computed(() => String(props.name || \"\").trim().toLowerCase());\n const runtimeConfig = useRuntimeConfig();\n const configuredProvider = (runtimeConfig.public?.icons as { apiProvider?: unknown } | undefined)?.apiProvider;\n const apiProvider = computed(() => normalizeIconApiProvider(props.apiProvider || configuredProvider));\n const dynamicData = ref<IconData | null>(null);\n\n const isLazy = computed(() => props.lazy || props.loading === \"lazy\");\n\n const iconData = computed<IconData>(() => {\n if (iconRegistry[iconName.value]) {\n return iconRegistry[iconName.value];\n }\n if (dynamicData.value) {\n return dynamicData.value;\n }\n return {\n path: \"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2S2 6.477 2 12s4.477 10 10 10zm0-2a8 8 0 1 1 0-16 8 8 0 0 1 0 16z\",\n opacity: \".35\",\n viewBox: \"0 0 24 24\"\n };\n });\n\n let requestRevision = 0;\n const loadDynamicIcon = () => {\n const requestedName = iconName.value;\n const requestedProvider = apiProvider.value;\n const revision = ++requestRevision;\n if (iconRegistry[requestedName]) {\n return;\n }\n fetchIconifyIcon(requestedName, requestedProvider).then((result) => {\n if (\n result\n && revision === requestRevision\n && requestedName === iconName.value\n && requestedProvider === apiProvider.value\n ) {\n dynamicData.value = result;\n }\n });\n };\n\n let observer: IntersectionObserver | null = null;\n\n onMounted(() => {\n if (isLazy.value && typeof window !== \"undefined\" && \"IntersectionObserver\" in window) {\n observer = new IntersectionObserver(\n (entries) => {\n if (entries.some((entry) => entry.isIntersecting)) {\n isVisible.value = true;\n loadDynamicIcon();\n if (observer && iconRef.value) {\n observer.unobserve(iconRef.value);\n }\n }\n },\n { rootMargin: \"100px\" }\n );\n if (iconRef.value) {\n observer.observe(iconRef.value);\n }\n } else {\n isVisible.value = true;\n loadDynamicIcon();\n }\n });\n\n onUnmounted(() => {\n requestRevision += 1;\n if (observer) {\n observer.disconnect();\n }\n });\n\n watch([iconName, apiProvider], () => {\n dynamicData.value = null;\n if (!isLazy.value || isVisible.value) {\n loadDynamicIcon();\n }\n });\n\n const sizeValue = computed(() =>\n typeof props.size === \"number\" ? `${props.size}px` : (String(props.size || \"\").trim() || \"1.25rem\")\n );\n\n return () => {\n const data = iconData.value;\n return h(\n \"svg\",\n {\n ref: iconRef,\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: data.viewBox || \"0 0 24 24\",\n width: sizeValue.value,\n height: sizeValue.value,\n fill: \"currentColor\",\n class: [\"inline-block shrink-0 align-middle\", props.class].filter(Boolean).join(\" \"),\n style: { width: sizeValue.value, height: sizeValue.value },\n \"aria-hidden\": \"true\",\n \"data-icon-name\": props.name,\n \"data-icon-lazy\": isLazy.value ? \"true\" : \"false\",\n ...attrs\n },\n (data.paths?.length ? data.paths : [{ d: data.path || \"\", opacity: data.opacity }])\n .map((entry, index) => h(\"path\", {\n key: index,\n d: entry.d,\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n opacity: entry.opacity || \"1\"\n }))\n );\n };\n }\n});\n\nexport const ResuxIcon = Icon;\n\nexport default defineResuxModule<ResuxIconsModuleOptions>({\n defaults: {\n collections: [],\n component: \"Icon\",\n mode: \"svg\",\n apiProvider: DEFAULT_ICON_API_PROVIDER,\n lazy: false\n },\n setup(options, resux) {\n const collections = Array.isArray(options.collections)\n ? [...new Set(options.collections.map((entry) => String(entry).trim()).filter(Boolean))]\n : [];\n resux.extendRuntimeConfig({\n public: {\n icons: {\n component: typeof options.component === \"string\" ? options.component : \"Icon\",\n collections,\n mode: options.mode || \"svg\",\n apiProvider: normalizeIconApiProvider(options.apiProvider),\n lazy: options.lazy === true\n }\n }\n });\n }\n});\n"],"mappings":";;;;AAYA,SAAgB,sBAAsB,aAAgD;CACpF,OAAO,EAAE,YAAY;AACvB;AAcA,MAAa,eAAyC;CACpD,yBAAyB,EAAE,MAAM,+NAA+N;CAChQ,QAAQ,EAAE,MAAM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AAU;EACR,aAAa,CAAC;EACd,WAAW;EACX,MAAM;EACN,aAAa;EACb,MAAM;CACR;CACA,MAAM,SAAS,OAAO;EACpB,MAAM,cAAc,MAAM,QAAQ,QAAQ,WAAW,IACjD,CAAC,GAAG,IAAI,IAAI,QAAQ,YAAY,KAAK,UAAU,OAAO,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,IACrF,CAAC;EACL,MAAM,oBAAoB,EACxB,QAAQ,EACN,OAAO;GACL,WAAW,OAAO,QAAQ,cAAc,WAAW,QAAQ,YAAY;GACvE;GACA,MAAM,QAAQ,QAAQ;GACtB,aAAa,yBAAyB,QAAQ,WAAW;GACzD,MAAM,QAAQ,SAAS;EACzB,EACF,EACF,CAAC;CACH;AACF,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import { ComputedRef, MaybeRef, MaybeRefOrGetter, ReactiveEffectOptions, ReactiveEffectRunner, Ref, WatchCallback, WatchOptions, WatchSource, WatchStopHandle } from "./reactivity/types.js";
|
|
2
|
+
import { isRef, ref, toRef, toRefs, unref } from "./reactivity/ref.js";
|
|
3
|
+
import { isReactive, isReadonly, reactive, readonly } from "./reactivity/reactive.js";
|
|
4
|
+
import { computed } from "./reactivity/computed.js";
|
|
5
|
+
import { watch, watchEffect } from "./reactivity/watch.js";
|
|
6
|
+
import { nextTick } from "./reactivity/scheduler.js";
|
|
7
|
+
import { AsyncDataError, AsyncDataHandlerContext, AsyncDataResource, AsyncResuxRenderer, AwaitedAsyncDataResource, ClientEnhancementContext, ClientEnhancementSetup, ClientEnhancementTrigger, ClientPluginManifestRecord, ClientRouteMiddlewareManifestRecord, ClientRuntimeSourceOptions, ComponentDefinition, ComponentStyle, DeviceInfo, ElementTemplateNode, EventHandler, EventHandlerEvent, ForDirective, HeadEntry, HtmlDirective, IfDirective, InterpolationTemplateNode, JsonValue, PackageAdapterContext, PackageAdapterDefinition, PageMeta, RenderAppOptions, RenderDocumentOptions, RenderResult, ResuxAppInjections, ResuxAppLike, ResuxAppProvides, ResuxClientBootMode, ResuxClientBootPlan, ResuxClientPackageImportRegistry, ResuxConfigInput, ResuxDeployOptions, ResuxDeployTarget, ResuxError, ResuxImageBuilder, ResuxImageCacheInput, ResuxImageConfig, ResuxImageFit, ResuxImageModifiers, ResuxImageProviderConfig, ResuxLazyPackageLoader, ResuxLazyPackageOptions, ResuxModule, ResuxModuleContext, ResuxPackageCssMap, ResuxPackageMode, ResuxPackageModeMap, ResuxPackagesConfig, ResuxPayload, ResuxPlugin, ResuxRouteMiddleware, ResuxRouter, ResuxSupportMode, RouteContext, RouteMiddlewareResult, RouteRecord, RuntimeConfig, SeoMetaInput, SeoMetaValue, SerializedAsyncData, SerializedScope, ServerMiddleware, ServerMiddlewareResult, SetupContext, TemplateAttribute, TemplateEvent, TemplateNode, TextTemplateNode, UseClientEnhancementOptions, UseResuxImageOptions, abortNavigation, clearError, createError, createServerSetupContext, defineClientEnhancement, defineClientOnlyPackage, defineComponent, defineEventHandler, defineLazyPackage, definePackageAdapter, defineResuxConfig, defineResuxModule, defineResuxPlugin, defineResuxRouteMiddleware, defineServerMiddleware, disposeClientEnhancements, evaluateExpression, eventHandler, getClientEnhancement, getClientRuntimeBootPlan, getClientRuntimeSource, getQuery, hasClientEnhancement, navigateTo, parseUserAgent, readBody, renderApp, renderAppAsync, renderClientPatches, renderDocument, renderTemplateNodesAsync, scanClientEnhancements, setHeader, shouldLoadClientRuntime, showError, useClientEnhancement, useClientPackage, useDevice, useError, useLazyPackage, usePackageReady, useResuxApp, useResuxImage, useRoute, useRouter, useRuntimeConfig } from "./runtime/index.js";
|
|
8
|
+
export { AsyncDataError, AsyncDataHandlerContext, AsyncDataResource, AsyncResuxRenderer, AwaitedAsyncDataResource, ClientEnhancementContext, ClientEnhancementSetup, ClientEnhancementTrigger, ClientPluginManifestRecord, ClientRouteMiddlewareManifestRecord, ClientRuntimeSourceOptions, ComponentDefinition, ComponentStyle, type ComputedRef, DeviceInfo, ElementTemplateNode, EventHandler, EventHandlerEvent, ForDirective, HeadEntry, HtmlDirective, IfDirective, InterpolationTemplateNode, JsonValue, type MaybeRef, type MaybeRefOrGetter, PackageAdapterContext, PackageAdapterDefinition, PageMeta, type ReactiveEffectOptions, type ReactiveEffectRunner, type Ref, RenderAppOptions, RenderDocumentOptions, RenderResult, ResuxAppInjections, ResuxAppLike, ResuxAppProvides, ResuxClientBootMode, ResuxClientBootPlan, ResuxClientPackageImportRegistry, ResuxConfigInput, ResuxDeployOptions, ResuxDeployTarget, ResuxError, ResuxImageBuilder, ResuxImageCacheInput, ResuxImageConfig, ResuxImageFit, ResuxImageModifiers, ResuxImageProviderConfig, ResuxLazyPackageLoader, ResuxLazyPackageOptions, ResuxModule, ResuxModuleContext, ResuxPackageCssMap, ResuxPackageMode, ResuxPackageModeMap, ResuxPackagesConfig, ResuxPayload, ResuxPlugin, ResuxRouteMiddleware, ResuxRouter, ResuxSupportMode, RouteContext, RouteMiddlewareResult, RouteRecord, RuntimeConfig, SeoMetaInput, SeoMetaValue, SerializedAsyncData, SerializedScope, ServerMiddleware, ServerMiddlewareResult, SetupContext, TemplateAttribute, TemplateEvent, TemplateNode, TextTemplateNode, UseClientEnhancementOptions, UseResuxImageOptions, type WatchCallback, type WatchOptions, type WatchSource, type WatchStopHandle, abortNavigation, clearError, computed, createError, createServerSetupContext, defineClientEnhancement, defineClientOnlyPackage, defineComponent, defineEventHandler, defineLazyPackage, definePackageAdapter, defineResuxConfig, defineResuxModule, defineResuxPlugin, defineResuxRouteMiddleware, defineServerMiddleware, disposeClientEnhancements, evaluateExpression, eventHandler, getClientEnhancement, getClientRuntimeBootPlan, getClientRuntimeSource, getQuery, hasClientEnhancement, isReactive, isReadonly, isRef, navigateTo, nextTick, parseUserAgent, reactive, readBody, readonly, ref, renderApp, renderAppAsync, renderClientPatches, renderDocument, renderTemplateNodesAsync, scanClientEnhancements, setHeader, shouldLoadClientRuntime, showError, toRef, toRefs, unref, useClientEnhancement, useClientPackage, useDevice, useError, useLazyPackage, usePackageReady, useResuxApp, useResuxImage, useRoute, useRouter, useRuntimeConfig, watch, watchEffect };
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { isReactive, isReadonly, reactive, readonly } from "./reactivity/reactive.js";
|
|
2
|
+
import { isRef, ref, toRef, toRefs, unref } from "./reactivity/ref.js";
|
|
3
|
+
import { computed } from "./reactivity/computed.js";
|
|
4
|
+
import { nextTick } from "./reactivity/scheduler.js";
|
|
5
|
+
import { watch, watchEffect } from "./reactivity/watch.js";
|
|
6
|
+
import { AsyncResuxRenderer, abortNavigation, clearError, createError, createServerSetupContext, defineClientEnhancement, defineClientOnlyPackage, defineComponent, defineEventHandler, defineLazyPackage, definePackageAdapter, defineResuxConfig, defineResuxModule, defineResuxPlugin, defineResuxRouteMiddleware, defineServerMiddleware, disposeClientEnhancements, evaluateExpression, eventHandler, getClientEnhancement, getClientRuntimeBootPlan, getClientRuntimeSource, getQuery, hasClientEnhancement, navigateTo, parseUserAgent, readBody, renderApp, renderAppAsync, renderClientPatches, renderDocument, renderTemplateNodesAsync, scanClientEnhancements, setHeader, shouldLoadClientRuntime, showError, useClientEnhancement, useClientPackage, useDevice, useError, useLazyPackage, usePackageReady, useResuxApp, useResuxImage, useRoute, useRouter, useRuntimeConfig } from "./runtime/index.js";
|
|
7
|
+
export { AsyncResuxRenderer, abortNavigation, clearError, computed, createError, createServerSetupContext, defineClientEnhancement, defineClientOnlyPackage, defineComponent, defineEventHandler, defineLazyPackage, definePackageAdapter, defineResuxConfig, defineResuxModule, defineResuxPlugin, defineResuxRouteMiddleware, defineServerMiddleware, disposeClientEnhancements, evaluateExpression, eventHandler, getClientEnhancement, getClientRuntimeBootPlan, getClientRuntimeSource, getQuery, hasClientEnhancement, isReactive, isReadonly, isRef, navigateTo, nextTick, parseUserAgent, reactive, readBody, readonly, ref, renderApp, renderAppAsync, renderClientPatches, renderDocument, renderTemplateNodesAsync, scanClientEnhancements, setHeader, shouldLoadClientRuntime, showError, toRef, toRefs, unref, useClientEnhancement, useClientPackage, useDevice, useError, useLazyPackage, usePackageReady, useResuxApp, useResuxImage, useRoute, useRouter, useRuntimeConfig, watch, watchEffect };
|
package/dist/kit/index.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { NitroConfigExtender, PagesExtender, ResuxComponentInput, ResuxComponentsDirInput, ResuxImportInput, ResuxModuleContext, ResuxPluginInput, ResuxRouteMiddlewareInput, ResuxServerHandlerInput, ResuxTemplateInput, ResuxTypeTemplateInput, ViteConfigExtender } from "../core/module-container.js";
|
|
2
|
+
//#region src/kit/index.d.ts
|
|
2
3
|
export interface ResuxModuleMeta {
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
name?: string;
|
|
5
|
+
configKey?: string;
|
|
5
6
|
}
|
|
6
7
|
export interface ResuxModuleDefinition<TOptions = Record<string, unknown>> {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
meta?: ResuxModuleMeta;
|
|
9
|
+
defaults?: TOptions;
|
|
10
|
+
setup: (options: TOptions, resux: ResuxModuleContext) => void | Promise<void>;
|
|
10
11
|
}
|
|
11
12
|
export declare function withResuxKitContext<T>(context: ResuxModuleContext, run: () => Promise<T> | T): Promise<T> | T;
|
|
12
13
|
export declare function defineResuxModule<TOptions = Record<string, unknown>>(module: ResuxModuleDefinition<TOptions>): ResuxModuleDefinition<TOptions>;
|
|
@@ -27,3 +28,5 @@ export declare function extendNitroConfig(extender: NitroConfigExtender): void;
|
|
|
27
28
|
export declare function addVitePlugin(plugin: unknown): void;
|
|
28
29
|
export declare function addRouteRule(path: string, rule: Record<string, unknown>): void;
|
|
29
30
|
export declare function addPrerenderRoutes(route: string | string[]): void;
|
|
31
|
+
//#endregion
|
|
32
|
+
//# sourceMappingURL=index.d.ts.map
|
package/dist/kit/index.js
CHANGED
|
@@ -1,67 +1,69 @@
|
|
|
1
1
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
2
|
+
//#region src/kit/index.ts
|
|
2
3
|
const kitContextStorage = new AsyncLocalStorage();
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
function withResuxKitContext(context, run) {
|
|
5
|
+
return kitContextStorage.run(context, run);
|
|
5
6
|
}
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
function defineResuxModule(module) {
|
|
8
|
+
return module;
|
|
8
9
|
}
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
function addComponent(component) {
|
|
11
|
+
useContext("addComponent").addComponent(component);
|
|
11
12
|
}
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
function addComponentsDir(dir) {
|
|
14
|
+
useContext("addComponentsDir").addComponentsDir(dir);
|
|
14
15
|
}
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
function addImports(imports) {
|
|
17
|
+
useContext("addImports").addImports(imports);
|
|
17
18
|
}
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
function addImportsDir(dir) {
|
|
20
|
+
useContext("addImportsDir").addImportsDir(dir);
|
|
20
21
|
}
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
function addPlugin(plugin) {
|
|
23
|
+
useContext("addPlugin").addPlugin(plugin);
|
|
23
24
|
}
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
function addRouteMiddleware(middleware) {
|
|
26
|
+
useContext("addRouteMiddleware").addRouteMiddleware(middleware);
|
|
26
27
|
}
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
function addServerHandler(handler) {
|
|
29
|
+
useContext("addServerHandler").addServerHandler(handler);
|
|
29
30
|
}
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
function addServerPlugin(plugin) {
|
|
32
|
+
useContext("addServerPlugin").addServerPlugin(plugin);
|
|
32
33
|
}
|
|
33
|
-
|
|
34
|
-
|
|
34
|
+
function addTemplate(template) {
|
|
35
|
+
useContext("addTemplate").addTemplate(template);
|
|
35
36
|
}
|
|
36
|
-
|
|
37
|
-
|
|
37
|
+
function addTypeTemplate(template) {
|
|
38
|
+
useContext("addTypeTemplate").addTypeTemplate(template);
|
|
38
39
|
}
|
|
39
|
-
|
|
40
|
-
|
|
40
|
+
function extendPages(extender) {
|
|
41
|
+
useContext("extendPages").extendPages(extender);
|
|
41
42
|
}
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
function extendRuntimeConfig(config) {
|
|
44
|
+
useContext("extendRuntimeConfig").extendRuntimeConfig(config);
|
|
44
45
|
}
|
|
45
|
-
|
|
46
|
-
|
|
46
|
+
function extendViteConfig(extender) {
|
|
47
|
+
useContext("extendViteConfig").extendViteConfig(extender);
|
|
47
48
|
}
|
|
48
|
-
|
|
49
|
-
|
|
49
|
+
function extendNitroConfig(extender) {
|
|
50
|
+
useContext("extendNitroConfig").extendNitroConfig(extender);
|
|
50
51
|
}
|
|
51
|
-
|
|
52
|
-
|
|
52
|
+
function addVitePlugin(plugin) {
|
|
53
|
+
useContext("addVitePlugin").addVitePlugin(plugin);
|
|
53
54
|
}
|
|
54
|
-
|
|
55
|
-
|
|
55
|
+
function addRouteRule(path, rule) {
|
|
56
|
+
useContext("addRouteRule").addRouteRule(path, rule);
|
|
56
57
|
}
|
|
57
|
-
|
|
58
|
-
|
|
58
|
+
function addPrerenderRoutes(route) {
|
|
59
|
+
useContext("addPrerenderRoutes").addPrerenderRoutes(route);
|
|
59
60
|
}
|
|
60
61
|
function useContext(api) {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
return context;
|
|
62
|
+
const context = kitContextStorage.getStore();
|
|
63
|
+
if (!context) throw new Error(`Resux Kit "${api}" was called outside of a module setup context.`);
|
|
64
|
+
return context;
|
|
66
65
|
}
|
|
66
|
+
//#endregion
|
|
67
|
+
export { addComponent, addComponentsDir, addImports, addImportsDir, addPlugin, addPrerenderRoutes, addRouteMiddleware, addRouteRule, addServerHandler, addServerPlugin, addTemplate, addTypeTemplate, addVitePlugin, defineResuxModule, extendNitroConfig, extendPages, extendRuntimeConfig, extendViteConfig, withResuxKitContext };
|
|
68
|
+
|
|
67
69
|
//# sourceMappingURL=index.js.map
|
package/dist/kit/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/kit/index.ts"],"sourcesContent":["import { AsyncLocalStorage } from \"node:async_hooks\";\nimport type {\n PagesExtender,\n ResuxComponentInput,\n ResuxComponentsDirInput,\n ResuxImportInput,\n ResuxModuleContext,\n ResuxPluginInput,\n ResuxRouteMiddlewareInput,\n ResuxServerHandlerInput,\n ResuxTemplateInput,\n ResuxTypeTemplateInput,\n ViteConfigExtender,\n NitroConfigExtender\n} from \"../core/module-container.js\";\n\nexport interface ResuxModuleMeta {\n name?: string;\n configKey?: string;\n}\n\nexport interface ResuxModuleDefinition<TOptions = Record<string, unknown>> {\n meta?: ResuxModuleMeta;\n defaults?: TOptions;\n setup: (options: TOptions, resux: ResuxModuleContext) => void | Promise<void>;\n}\n\nconst kitContextStorage = new AsyncLocalStorage<ResuxModuleContext>();\n\nexport function withResuxKitContext<T>(context: ResuxModuleContext, run: () => Promise<T> | T): Promise<T> | T {\n return kitContextStorage.run(context, run);\n}\n\nexport function defineResuxModule<TOptions = Record<string, unknown>>(module: ResuxModuleDefinition<TOptions>): ResuxModuleDefinition<TOptions> {\n return module;\n}\n\nexport function addComponent(component: ResuxComponentInput | string): void {\n useContext(\"addComponent\").addComponent(component);\n}\n\nexport function addComponentsDir(dir: ResuxComponentsDirInput | string): void {\n useContext(\"addComponentsDir\").addComponentsDir(dir);\n}\n\nexport function addImports(imports: ResuxImportInput | ResuxImportInput[]): void {\n useContext(\"addImports\").addImports(imports);\n}\n\nexport function addImportsDir(dir: string): void {\n useContext(\"addImportsDir\").addImportsDir(dir);\n}\n\nexport function addPlugin(plugin: ResuxPluginInput | string): void {\n useContext(\"addPlugin\").addPlugin(plugin);\n}\n\nexport function addRouteMiddleware(middleware: ResuxRouteMiddlewareInput): void {\n useContext(\"addRouteMiddleware\").addRouteMiddleware(middleware);\n}\n\nexport function addServerHandler(handler: ResuxServerHandlerInput): void {\n useContext(\"addServerHandler\").addServerHandler(handler);\n}\n\nexport function addServerPlugin(plugin: string): void {\n useContext(\"addServerPlugin\").addServerPlugin(plugin);\n}\n\nexport function addTemplate(template: ResuxTemplateInput): void {\n useContext(\"addTemplate\").addTemplate(template);\n}\n\nexport function addTypeTemplate(template: ResuxTypeTemplateInput): void {\n useContext(\"addTypeTemplate\").addTypeTemplate(template);\n}\n\nexport function extendPages(extender: PagesExtender): void {\n useContext(\"extendPages\").extendPages(extender);\n}\n\nexport function extendRuntimeConfig(config: Record<string, unknown>): void {\n useContext(\"extendRuntimeConfig\").extendRuntimeConfig(config);\n}\n\nexport function extendViteConfig(extender: ViteConfigExtender): void {\n useContext(\"extendViteConfig\").extendViteConfig(extender);\n}\n\nexport function extendNitroConfig(extender: NitroConfigExtender): void {\n useContext(\"extendNitroConfig\").extendNitroConfig(extender);\n}\n\nexport function addVitePlugin(plugin: unknown): void {\n useContext(\"addVitePlugin\").addVitePlugin(plugin);\n}\n\nexport function addRouteRule(path: string, rule: Record<string, unknown>): void {\n useContext(\"addRouteRule\").addRouteRule(path, rule);\n}\n\nexport function addPrerenderRoutes(route: string | string[]): void {\n useContext(\"addPrerenderRoutes\").addPrerenderRoutes(route);\n}\n\nfunction useContext(api: string): ResuxModuleContext {\n const context = kitContextStorage.getStore();\n if (!context) {\n throw new Error(`Resux Kit \"${api}\" was called outside of a module setup context.`);\n }\n return context;\n}\n"],"mappings":";;AA2BA,MAAM,oBAAoB,IAAI,kBAAsC;AAEpE,SAAgB,oBAAuB,SAA6B,KAA2C;CAC7G,OAAO,kBAAkB,IAAI,SAAS,GAAG;AAC3C;AAEA,SAAgB,kBAAsD,QAA0E;CAC9I,OAAO;AACT;A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9E,WAAW,cAAc,CAAC,CAAC,aAAa,MAAM,IAAI;AACpD;AAEA,SAAgB,mBAAmB,OAAgC;CACjE,WAAW,oBAAoB,CAAC,CAAC,mBAAmB,KAAK;AAC3D;AAEA,SAAS,WAAW,KAAiC;CACnD,MAAM,UAAU,kBAAkB,SAAS;CAC3C,IAAI,CAAC,SACH,MAAM,IAAI,MAAM,cAAc,IAAI,gDAAgD;CAEpF,OAAO;AACT"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
//#region src/nitro-server/index.d.ts
|
|
1
2
|
export interface ResuxNitroServerOptions {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
appRoot: string;
|
|
4
|
+
outDir: string;
|
|
5
|
+
preset?: string;
|
|
6
|
+
compatibilityDate?: string;
|
|
6
7
|
}
|
|
7
8
|
export declare function createNitroServerOptions(options: ResuxNitroServerOptions): ResuxNitroServerOptions;
|
|
9
|
+
//#endregion
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
//#region src/nitro-server/index.ts
|
|
2
|
+
function createNitroServerOptions(options) {
|
|
3
|
+
return options;
|
|
3
4
|
}
|
|
5
|
+
//#endregion
|
|
6
|
+
export { createNitroServerOptions };
|
|
7
|
+
|
|
4
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/nitro-server/index.ts"],"sourcesContent":["export interface ResuxNitroServerOptions {\n appRoot: string;\n outDir: string;\n preset?: string;\n compatibilityDate?: string;\n}\n\nexport function createNitroServerOptions(options: ResuxNitroServerOptions): ResuxNitroServerOptions {\n return options;\n}\n"],"mappings":";AAOA,SAAgB,yBAAyB,SAA2D;CAClG,OAAO;AACT"}
|
package/dist/node.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { ResuxNodeHandlerOptions } from "./cli.js";
|
|
2
|
+
import { ServerResponse } from "node:http";
|
|
3
|
+
//#region src/node.d.ts
|
|
4
4
|
export declare function createResuxNodeHandler(options?: ResuxNodeHandlerOptions): (request: import("http").IncomingMessage, response: ServerResponse) => void;
|
|
5
|
+
//#endregion
|
|
6
|
+
export type { ResuxNodeHandlerOptions };
|
|
7
|
+
//# sourceMappingURL=node.d.ts.map
|
package/dist/node.js
CHANGED
|
@@ -1,134 +1,106 @@
|
|
|
1
|
-
import { createResuxNodeHandler as
|
|
1
|
+
import { createResuxNodeHandler as createResuxNodeHandler$1 } from "./cli.js";
|
|
2
|
+
//#region src/node.ts
|
|
2
3
|
const GENERATED_IMAGE_PREFIX = "/_resux/generated/images/";
|
|
3
4
|
const GENERATED_VIDEO_PREFIX = "/_resux/generated/videos/";
|
|
4
5
|
const STATELESS_IMAGE_PATH = "/__resux/image";
|
|
5
6
|
const STATELESS_VIDEO_PATH = "/__resux/video";
|
|
6
|
-
const CACHE_BOOLEAN_TRUE = new Set([
|
|
7
|
-
|
|
7
|
+
const CACHE_BOOLEAN_TRUE = /* @__PURE__ */ new Set([
|
|
8
|
+
"true",
|
|
9
|
+
"1",
|
|
10
|
+
"yes",
|
|
11
|
+
"on"
|
|
12
|
+
]);
|
|
13
|
+
const CACHE_BOOLEAN_FALSE = /* @__PURE__ */ new Set([
|
|
14
|
+
"false",
|
|
15
|
+
"0",
|
|
16
|
+
"off",
|
|
17
|
+
"no"
|
|
18
|
+
]);
|
|
8
19
|
const CACHE_UNIT_SECONDS = {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
20
|
+
s: 1,
|
|
21
|
+
m: 60,
|
|
22
|
+
h: 3600,
|
|
23
|
+
d: 86400,
|
|
24
|
+
w: 604800
|
|
14
25
|
};
|
|
15
26
|
function positiveRoundedSeconds(value) {
|
|
16
|
-
|
|
17
|
-
? Math.max(1, Math.round(value))
|
|
18
|
-
: undefined;
|
|
27
|
+
return Number.isFinite(value) && value > 0 ? Math.max(1, Math.round(value)) : void 0;
|
|
19
28
|
}
|
|
20
29
|
function parseCacheMaxAgeSeconds(value) {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
const duration = /^(\d+)\s*([smhdw])$/.exec(normalized);
|
|
33
|
-
if (!duration) {
|
|
34
|
-
return undefined;
|
|
35
|
-
}
|
|
36
|
-
const amount = Number(duration[1]);
|
|
37
|
-
const unitSeconds = CACHE_UNIT_SECONDS[duration[2] ?? ""];
|
|
38
|
-
return unitSeconds ? positiveRoundedSeconds(amount * unitSeconds) : undefined;
|
|
30
|
+
const normalized = value?.trim().toLowerCase();
|
|
31
|
+
if (!normalized || CACHE_BOOLEAN_FALSE.has(normalized)) return;
|
|
32
|
+
if (CACHE_BOOLEAN_TRUE.has(normalized)) return 86400;
|
|
33
|
+
const numericSeconds = positiveRoundedSeconds(Number(normalized));
|
|
34
|
+
if (numericSeconds) return numericSeconds;
|
|
35
|
+
const duration = /^(\d+)\s*([smhdw])$/.exec(normalized);
|
|
36
|
+
if (!duration) return;
|
|
37
|
+
const amount = Number(duration[1]);
|
|
38
|
+
const unitSeconds = CACHE_UNIT_SECONDS[duration[2] ?? ""];
|
|
39
|
+
return unitSeconds ? positiveRoundedSeconds(amount * unitSeconds) : void 0;
|
|
39
40
|
}
|
|
40
41
|
function isStatelessDeploymentRuntime() {
|
|
41
|
-
|
|
42
|
-
|| process.env.VERCEL_ENV
|
|
43
|
-
|| process.env.AWS_LAMBDA_FUNCTION_NAME
|
|
44
|
-
|| process.env.LAMBDA_TASK_ROOT
|
|
45
|
-
|| process.env.NETLIFY);
|
|
42
|
+
return Boolean(process.env.VERCEL || process.env.VERCEL_ENV || process.env.AWS_LAMBDA_FUNCTION_NAME || process.env.LAMBDA_TASK_ROOT || process.env.NETLIFY);
|
|
46
43
|
}
|
|
47
44
|
function resolveStatelessGeneratedMediaRequest(rawUrl) {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|| requestUrl.searchParams.get("original"));
|
|
66
|
-
if (!hasSource) {
|
|
67
|
-
return null;
|
|
68
|
-
}
|
|
69
|
-
if (requestUrl.pathname.startsWith(GENERATED_IMAGE_PREFIX)) {
|
|
70
|
-
requestUrl.pathname = STATELESS_IMAGE_PATH;
|
|
71
|
-
}
|
|
72
|
-
else if (requestUrl.pathname.startsWith(GENERATED_VIDEO_PREFIX)) {
|
|
73
|
-
requestUrl.pathname = STATELESS_VIDEO_PATH;
|
|
74
|
-
}
|
|
75
|
-
else {
|
|
76
|
-
return null;
|
|
77
|
-
}
|
|
78
|
-
return {
|
|
79
|
-
url: `${requestUrl.pathname}${requestUrl.search}`,
|
|
80
|
-
maxAgeSeconds,
|
|
81
|
-
};
|
|
45
|
+
if (!rawUrl) return null;
|
|
46
|
+
let requestUrl;
|
|
47
|
+
try {
|
|
48
|
+
requestUrl = new URL(rawUrl, "https://resux.invalid");
|
|
49
|
+
} catch {
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
const maxAgeSeconds = parseCacheMaxAgeSeconds(requestUrl.searchParams.get("cache") ?? requestUrl.searchParams.get("c"));
|
|
53
|
+
if (!maxAgeSeconds) return null;
|
|
54
|
+
if (!Boolean(requestUrl.searchParams.get("src") || requestUrl.searchParams.get("url") || requestUrl.searchParams.get("original"))) return null;
|
|
55
|
+
if (requestUrl.pathname.startsWith(GENERATED_IMAGE_PREFIX)) requestUrl.pathname = STATELESS_IMAGE_PATH;
|
|
56
|
+
else if (requestUrl.pathname.startsWith(GENERATED_VIDEO_PREFIX)) requestUrl.pathname = STATELESS_VIDEO_PATH;
|
|
57
|
+
else return null;
|
|
58
|
+
return {
|
|
59
|
+
url: `${requestUrl.pathname}${requestUrl.search}`,
|
|
60
|
+
maxAgeSeconds
|
|
61
|
+
};
|
|
82
62
|
}
|
|
83
63
|
function withGeneratedMediaCacheHeaders(response, maxAgeSeconds) {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
for (const [name, value] of Object.entries(overrides)) {
|
|
111
|
-
if (value !== undefined) {
|
|
112
|
-
response.setHeader(name, value);
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
return originalWriteHead(statusCode, ...args);
|
|
118
|
-
});
|
|
64
|
+
const originalWriteHead = response.writeHead.bind(response);
|
|
65
|
+
const cacheControl = `public, max-age=${maxAgeSeconds}, s-maxage=${maxAgeSeconds}`;
|
|
66
|
+
const cdnCacheControl = `public, max-age=${maxAgeSeconds}`;
|
|
67
|
+
const overrides = {
|
|
68
|
+
"cache-control": cacheControl,
|
|
69
|
+
"cdn-cache-control": cdnCacheControl,
|
|
70
|
+
"vercel-cdn-cache-control": cdnCacheControl,
|
|
71
|
+
"x-resux-cache": "stateless"
|
|
72
|
+
};
|
|
73
|
+
response.writeHead = ((statusCode, ...args) => {
|
|
74
|
+
if (statusCode >= 200 && statusCode < 300) {
|
|
75
|
+
if (typeof args[0] === "string") {
|
|
76
|
+
if (args[1] && typeof args[1] === "object" && !Array.isArray(args[1])) args[1] = {
|
|
77
|
+
...args[1],
|
|
78
|
+
...overrides
|
|
79
|
+
};
|
|
80
|
+
else if (!args[1]) args[1] = { ...overrides };
|
|
81
|
+
} else if (args[0] && typeof args[0] === "object" && !Array.isArray(args[0])) args[0] = {
|
|
82
|
+
...args[0],
|
|
83
|
+
...overrides
|
|
84
|
+
};
|
|
85
|
+
else if (!args[0]) args[0] = { ...overrides };
|
|
86
|
+
else for (const [name, value] of Object.entries(overrides)) if (value !== void 0) response.setHeader(name, value);
|
|
87
|
+
}
|
|
88
|
+
return originalWriteHead(statusCode, ...args);
|
|
89
|
+
});
|
|
119
90
|
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
handler(request, response);
|
|
132
|
-
};
|
|
91
|
+
function createResuxNodeHandler(options = {}) {
|
|
92
|
+
const handler = createResuxNodeHandler$1(options);
|
|
93
|
+
if (!isStatelessDeploymentRuntime()) return handler;
|
|
94
|
+
return (request, response) => {
|
|
95
|
+
const rewritten = resolveStatelessGeneratedMediaRequest(request.url);
|
|
96
|
+
if (rewritten) {
|
|
97
|
+
request.url = rewritten.url;
|
|
98
|
+
withGeneratedMediaCacheHeaders(response, rewritten.maxAgeSeconds);
|
|
99
|
+
}
|
|
100
|
+
handler(request, response);
|
|
101
|
+
};
|
|
133
102
|
}
|
|
103
|
+
//#endregion
|
|
104
|
+
export { createResuxNodeHandler };
|
|
105
|
+
|
|
134
106
|
//# sourceMappingURL=node.js.map
|