resuxjs 0.3.11 → 0.4.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -1
- package/dist/bin.d.ts +1 -2
- package/dist/bin.js +5 -0
- package/dist/bin.js.map +1 -1
- package/dist/build/index.d.ts +29 -0
- package/dist/build/index.js +51 -0
- package/dist/build/index.js.map +1 -0
- package/dist/cli.d.ts +19 -8
- package/dist/cli.js +2653 -3688
- package/dist/cli.js.map +1 -1
- package/dist/compiler/adapter.d.ts +19 -15
- package/dist/compiler/adapter.js +69 -93
- package/dist/compiler/adapter.js.map +1 -1
- package/dist/compiler/dev-warnings.d.ts +14 -10
- package/dist/compiler/dev-warnings.js +247 -319
- package/dist/compiler/dev-warnings.js.map +1 -1
- package/dist/compiler/directives.d.ts +7 -3
- package/dist/compiler/directives.js +125 -150
- package/dist/compiler/directives.js.map +1 -1
- package/dist/compiler/implementation.d.ts +117 -112
- package/dist/compiler/implementation.js +2954 -3426
- package/dist/compiler/index.d.ts +19 -15
- package/dist/compiler/index.js +69 -93
- package/dist/compiler/index.js.map +1 -1
- package/dist/core/config.d.ts +19 -10
- package/dist/core/config.js +42 -25
- package/dist/core/config.js.map +1 -1
- package/dist/core/hooks.d.ts +133 -131
- 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 +6 -5
- package/dist/core/module-container.d.ts +97 -93
- package/dist/core/module-container.js +180 -185
- package/dist/core/module-container.js.map +1 -1
- package/dist/core/resux.d.ts +20 -15
- package/dist/core/resux.js +18 -13
- package/dist/core/resux.js.map +1 -1
- package/dist/create-bin.d.ts +1 -2
- package/dist/create-bin.js +5 -0
- package/dist/create-bin.js.map +1 -1
- package/dist/create.d.ts +6 -2
- package/dist/create.js +496 -638
- package/dist/create.js.map +1 -1
- package/dist/deploy/cloudflare.d.ts +7 -2
- package/dist/deploy/cloudflare.js +31 -34
- package/dist/deploy/cloudflare.js.map +1 -1
- package/dist/deploy/common.d.ts +19 -15
- package/dist/deploy/common.js +119 -188
- package/dist/deploy/common.js.map +1 -1
- package/dist/deploy/framework-runtime.d.ts +5 -1
- package/dist/deploy/framework-runtime.js +44 -48
- package/dist/deploy/framework-runtime.js.map +1 -1
- package/dist/deploy/index.d.ts +8 -3
- package/dist/deploy/index.js +56 -80
- package/dist/deploy/index.js.map +1 -1
- package/dist/deploy/netlify.d.ts +7 -2
- package/dist/deploy/netlify.js +41 -41
- package/dist/deploy/netlify.js.map +1 -1
- package/dist/deploy/node.d.ts +7 -2
- package/dist/deploy/node.js +24 -19
- package/dist/deploy/node.js.map +1 -1
- package/dist/deploy/production-report.d.ts +5 -1
- package/dist/deploy/production-report.js +15 -14
- package/dist/deploy/production-report.js.map +1 -1
- package/dist/deploy/runtime-dependencies.d.ts +8 -4
- package/dist/deploy/runtime-dependencies.js +158 -220
- package/dist/deploy/runtime-dependencies.js.map +1 -1
- package/dist/deploy/static.d.ts +7 -2
- package/dist/deploy/static.js +17 -14
- package/dist/deploy/static.js.map +1 -1
- package/dist/deploy/types.d.ts +33 -29
- package/dist/deploy/types.js +1 -2
- package/dist/deploy/vercel.d.ts +8 -3
- package/dist/deploy/vercel.js +138 -188
- package/dist/deploy/vercel.js.map +1 -1
- package/dist/fonts/index.d.ts +19 -14
- package/dist/fonts/index.js +115 -134
- package/dist/fonts/index.js.map +1 -1
- package/dist/globals.d.ts +79 -78
- package/dist/globals.js +1 -2
- package/dist/halal-core/ai/classifyProject.d.ts +9 -4
- package/dist/halal-core/ai/classifyProject.js +82 -95
- package/dist/halal-core/ai/classifyProject.js.map +1 -1
- package/dist/halal-core/ai/classifyRuntimeContent.d.ts +8 -3
- package/dist/halal-core/ai/classifyRuntimeContent.js +78 -95
- package/dist/halal-core/ai/classifyRuntimeContent.js.map +1 -1
- package/dist/halal-core/ai/createProjectSummary.d.ts +40 -36
- package/dist/halal-core/ai/createProjectSummary.js +39 -39
- package/dist/halal-core/ai/createProjectSummary.js.map +1 -1
- package/dist/halal-core/ai/halalClassifierPrompt.d.ts +5 -1
- 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 +5 -1
- 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 +7 -2
- package/dist/halal-core/ai/validateAiResponse.js +56 -83
- package/dist/halal-core/ai/validateAiResponse.js.map +1 -1
- package/dist/halal-core/cli/check.d.ts +5 -1
- 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 +5 -1
- 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 +5 -1
- 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 +5 -1
- 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 +5 -1
- package/dist/halal-core/cli/verifyReview.js +17 -15
- package/dist/halal-core/cli/verifyReview.js.map +1 -1
- package/dist/halal-core/config.d.ts +39 -35
- package/dist/halal-core/config.js +77 -118
- package/dist/halal-core/config.js.map +1 -1
- package/dist/halal-core/crypto/integrity.d.ts +12 -8
- package/dist/halal-core/crypto/integrity.js +65 -87
- package/dist/halal-core/crypto/integrity.js.map +1 -1
- package/dist/halal-core/enforce.d.ts +9 -5
- package/dist/halal-core/enforce.js +90 -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 +19 -19
- package/dist/halal-core/lifecycle.d.ts +5 -1
- package/dist/halal-core/lifecycle.js +16 -13
- package/dist/halal-core/lifecycle.js.map +1 -1
- package/dist/halal-core/policy.d.ts +7 -2
- package/dist/halal-core/policy.js +7 -2
- package/dist/halal-core/policy.js.map +1 -1
- package/dist/halal-core/report/formatBrowserOverlay.d.ts +7 -2
- 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 +7 -2
- 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 +11 -6
- package/dist/halal-core/report/generateHalalReport.js +25 -27
- package/dist/halal-core/report/generateHalalReport.js.map +1 -1
- package/dist/halal-core/report/signReport.d.ts +8 -3
- package/dist/halal-core/report/signReport.js +17 -12
- package/dist/halal-core/report/signReport.js.map +1 -1
- package/dist/halal-core/report/verifyReport.d.ts +14 -9
- package/dist/halal-core/report/verifyReport.js +52 -41
- package/dist/halal-core/report/verifyReport.js.map +1 -1
- package/dist/halal-core/review/createReviewRequest.d.ts +7 -2
- 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 +7 -3
- 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 +17 -12
- package/dist/halal-core/review/signedReviewFile.js +25 -22
- package/dist/halal-core/review/signedReviewFile.js.map +1 -1
- package/dist/halal-core/review/verifyReviewApproval.d.ts +12 -8
- package/dist/halal-core/review/verifyReviewApproval.js +69 -62
- package/dist/halal-core/review/verifyReviewApproval.js.map +1 -1
- package/dist/halal-core/rules/adultContentRules.d.ts +6 -2
- 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 +6 -2
- 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 +6 -2
- 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 +10 -6
- 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 +6 -2
- 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 +24 -19
- package/dist/halal-core/rules/defaultBlockedRules.js +156 -199
- package/dist/halal-core/rules/defaultBlockedRules.js.map +1 -1
- package/dist/halal-core/rules/dependencyRules.d.ts +11 -7
- 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 +9 -5
- 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 +6 -2
- 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 +6 -2
- 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 +6 -2
- 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 +6 -2
- 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 +6 -2
- 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 +13 -9
- 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 +6 -2
- 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 +6 -2
- 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 +6 -2
- 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 +6 -2
- 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 +22 -17
- package/dist/halal-core/runtime/guard.js +163 -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 +5 -5
- package/dist/halal-core/runtime/reviewedMemory.d.ts +10 -5
- package/dist/halal-core/runtime/reviewedMemory.js +75 -110
- package/dist/halal-core/runtime/reviewedMemory.js.map +1 -1
- package/dist/halal-core/runtime/serializeRuntimeContent.d.ts +17 -12
- package/dist/halal-core/runtime/serializeRuntimeContent.js +133 -156
- package/dist/halal-core/runtime/serializeRuntimeContent.js.map +1 -1
- package/dist/halal-core/runtime/types.d.ts +55 -50
- package/dist/halal-core/runtime/types.js +1 -2
- package/dist/halal-core/scanner/scanApiRoutes.d.ts +5 -1
- package/dist/halal-core/scanner/scanApiRoutes.js +33 -36
- package/dist/halal-core/scanner/scanApiRoutes.js.map +1 -1
- package/dist/halal-core/scanner/scanComponents.d.ts +5 -1
- package/dist/halal-core/scanner/scanComponents.js +13 -13
- package/dist/halal-core/scanner/scanComponents.js.map +1 -1
- package/dist/halal-core/scanner/scanContent.d.ts +8 -4
- package/dist/halal-core/scanner/scanContent.js +192 -261
- package/dist/halal-core/scanner/scanContent.js.map +1 -1
- package/dist/halal-core/scanner/scanDependencies.d.ts +5 -1
- package/dist/halal-core/scanner/scanDependencies.js +17 -15
- package/dist/halal-core/scanner/scanDependencies.js.map +1 -1
- package/dist/halal-core/scanner/scanDomains.d.ts +7 -3
- 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 +5 -1
- package/dist/halal-core/scanner/scanEnvNames.js +24 -26
- package/dist/halal-core/scanner/scanEnvNames.js.map +1 -1
- package/dist/halal-core/scanner/scanMetadata.d.ts +9 -5
- package/dist/halal-core/scanner/scanMetadata.js +21 -29
- package/dist/halal-core/scanner/scanMetadata.js.map +1 -1
- package/dist/halal-core/scanner/scanPages.d.ts +5 -1
- package/dist/halal-core/scanner/scanPages.js +13 -15
- package/dist/halal-core/scanner/scanPages.js.map +1 -1
- package/dist/halal-core/scanner/scanProject.d.ts +19 -12
- package/dist/halal-core/scanner/scanProject.js +44 -49
- package/dist/halal-core/scanner/scanProject.js.map +1 -1
- package/dist/halal-core/scanner/scanRoutes.d.ts +5 -1
- package/dist/halal-core/scanner/scanRoutes.js +33 -39
- package/dist/halal-core/scanner/scanRoutes.js.map +1 -1
- package/dist/halal-core/scanner/scanTranslations.d.ts +5 -1
- package/dist/halal-core/scanner/scanTranslations.js +22 -29
- package/dist/halal-core/scanner/scanTranslations.js.map +1 -1
- package/dist/halal-core/status.d.ts +17 -13
- package/dist/halal-core/status.js +1 -2
- package/dist/halal-core/tamper/verifyCoreIntegrity.d.ts +5 -1
- package/dist/halal-core/tamper/verifyCoreIntegrity.js +27 -24
- package/dist/halal-core/tamper/verifyCoreIntegrity.js.map +1 -1
- package/dist/halal-core/tamper/verifyLifecycleHooks.d.ts +5 -1
- 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 +9 -4
- 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 +19 -2
- package/dist/i18n/index.d.ts +44 -40
- package/dist/i18n/index.js +218 -288
- package/dist/i18n/index.js.map +1 -1
- package/dist/i18n/shared.d.ts +33 -29
- package/dist/i18n/shared.js +204 -266
- package/dist/i18n/shared.js.map +1 -1
- package/dist/icons/index.d.ts +160 -154
- package/dist/icons/index.js +323 -273
- package/dist/icons/index.js.map +1 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +8 -2
- package/dist/kit/index.d.ts +32 -27
- package/dist/kit/index.js +46 -43
- package/dist/kit/index.js.map +1 -1
- package/dist/nitro-server/index.d.ts +10 -6
- package/dist/nitro-server/index.js +6 -2
- package/dist/nitro-server/index.js.map +1 -1
- package/dist/node.d.ts +9 -4
- package/dist/node.js +89 -116
- package/dist/node.js.map +1 -1
- package/dist/reactivity/computed.d.ts +11 -6
- package/dist/reactivity/computed.js +46 -53
- package/dist/reactivity/computed.js.map +1 -1
- package/dist/reactivity/effect.d.ts +23 -18
- package/dist/reactivity/effect.js +105 -147
- package/dist/reactivity/effect.js.map +1 -1
- package/dist/reactivity/index.d.ts +8 -8
- package/dist/reactivity/index.js +8 -8
- package/dist/reactivity/reactive.d.ts +9 -5
- package/dist/reactivity/reactive.js +95 -134
- package/dist/reactivity/reactive.js.map +1 -1
- package/dist/reactivity/readonly.d.ts +2 -1
- package/dist/reactivity/readonly.js +3 -2
- package/dist/reactivity/ref.d.ts +23 -21
- package/dist/reactivity/ref.js +71 -81
- package/dist/reactivity/ref.js.map +1 -1
- package/dist/reactivity/scheduler.d.ts +8 -5
- package/dist/reactivity/scheduler.js +67 -69
- package/dist/reactivity/scheduler.js.map +1 -1
- package/dist/reactivity/types.d.ts +29 -25
- package/dist/reactivity/types.js +1 -2
- package/dist/reactivity/utils.d.ts +17 -13
- package/dist/reactivity/utils.js +25 -24
- package/dist/reactivity/utils.js.map +1 -1
- package/dist/reactivity/watch.d.ts +8 -4
- package/dist/reactivity/watch.js +74 -103
- package/dist/reactivity/watch.js.map +1 -1
- package/dist/runtime/core.d.ts +32 -0
- package/dist/runtime/core.js +155 -0
- package/dist/runtime/core.js.map +1 -0
- package/dist/runtime/index.d.ts +649 -622
- package/dist/runtime/index.js +4105 -5243
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/reactivity.d.ts +7 -0
- package/dist/runtime/reactivity.js +7 -0
- package/dist/runtime/resume.d.ts +80 -0
- package/dist/runtime/resume.js +482 -0
- package/dist/runtime/resume.js.map +1 -0
- package/dist/runtime/router.d.ts +21 -0
- package/dist/runtime/router.js +60 -0
- package/dist/runtime/router.js.map +1 -0
- package/dist/runtime/streaming.d.ts +25 -0
- package/dist/runtime/streaming.js +200 -0
- package/dist/runtime/streaming.js.map +1 -0
- package/dist/security/media-fetch.d.ts +33 -0
- package/dist/security/media-fetch.js +302 -0
- package/dist/security/media-fetch.js.map +1 -0
- package/dist/security/path-boundary.d.ts +8 -0
- package/dist/security/path-boundary.js +71 -0
- package/dist/security/path-boundary.js.map +1 -0
- package/dist/ui/index.d.ts +1774 -1768
- package/dist/ui/index.js +974 -674
- package/dist/ui/index.js.map +1 -1
- package/dist/vite-builder/index.d.ts +9 -5
- 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":["text"],"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;AACpF,QAAO,EAAE,aAAa;;AAexB,MAAa,eAAyC;CACpD,yBAAyB,EAAE,MAAM,gOAAgO;CACjQ,QAAQ,EAAE,MAAM,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AAc,WAAW,QAAQ,YAAY;GACvE;GACA,MAAM,QAAQ,QAAQ;GACtB,aAAa,yBAAyB,QAAQ,YAAY;GAC1D,MAAM,QAAQ,SAAS;GACxB,EACF,EACF,CAAC;;CAEL,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, ComputedRef, DeviceInfo, ElementTemplateNode, EventHandler, EventHandlerEvent, ForDirective, HeadEntry, HtmlDirective, IfDirective, InterpolationTemplateNode, JsonValue, MaybeRef, MaybeRefOrGetter, PackageAdapterContext, PackageAdapterDefinition, PageMeta, ReactiveEffectOptions, ReactiveEffectRunner, 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, WatchCallback, WatchOptions, WatchSource, 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,8 @@
|
|
|
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
|
+
|
|
8
|
+
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,29 +1,34 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { NitroConfigExtender, PagesExtender, ResuxComponentInput, ResuxComponentsDirInput, ResuxImportInput, ResuxModuleContext, ResuxPluginInput, ResuxRouteMiddlewareInput, ResuxServerHandlerInput, ResuxTemplateInput, ResuxTypeTemplateInput, ViteConfigExtender } from "../core/module-container.js";
|
|
2
|
+
|
|
3
|
+
//#region src/kit/index.d.ts
|
|
4
|
+
interface ResuxModuleMeta {
|
|
5
|
+
name?: string;
|
|
6
|
+
configKey?: string;
|
|
5
7
|
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
interface ResuxModuleDefinition<TOptions = Record<string, unknown>> {
|
|
9
|
+
meta?: ResuxModuleMeta;
|
|
10
|
+
defaults?: TOptions;
|
|
11
|
+
setup: (options: TOptions, resux: ResuxModuleContext) => void | Promise<void>;
|
|
10
12
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
13
|
+
declare function withResuxKitContext<T>(context: ResuxModuleContext, run: () => Promise<T> | T): Promise<T> | T;
|
|
14
|
+
declare function defineResuxModule<TOptions = Record<string, unknown>>(module: ResuxModuleDefinition<TOptions>): ResuxModuleDefinition<TOptions>;
|
|
15
|
+
declare function addComponent(component: ResuxComponentInput | string): void;
|
|
16
|
+
declare function addComponentsDir(dir: ResuxComponentsDirInput | string): void;
|
|
17
|
+
declare function addImports(imports: ResuxImportInput | ResuxImportInput[]): void;
|
|
18
|
+
declare function addImportsDir(dir: string): void;
|
|
19
|
+
declare function addPlugin(plugin: ResuxPluginInput | string): void;
|
|
20
|
+
declare function addRouteMiddleware(middleware: ResuxRouteMiddlewareInput): void;
|
|
21
|
+
declare function addServerHandler(handler: ResuxServerHandlerInput): void;
|
|
22
|
+
declare function addServerPlugin(plugin: string): void;
|
|
23
|
+
declare function addTemplate(template: ResuxTemplateInput): void;
|
|
24
|
+
declare function addTypeTemplate(template: ResuxTypeTemplateInput): void;
|
|
25
|
+
declare function extendPages(extender: PagesExtender): void;
|
|
26
|
+
declare function extendRuntimeConfig(config: Record<string, unknown>): void;
|
|
27
|
+
declare function extendViteConfig(extender: ViteConfigExtender): void;
|
|
28
|
+
declare function extendNitroConfig(extender: NitroConfigExtender): void;
|
|
29
|
+
declare function addVitePlugin(plugin: unknown): void;
|
|
30
|
+
declare function addRouteRule(path: string, rule: Record<string, unknown>): void;
|
|
31
|
+
declare function addPrerenderRoutes(route: string | string[]): void;
|
|
32
|
+
//#endregion
|
|
33
|
+
export { ResuxModuleDefinition, ResuxModuleMeta, addComponent, addComponentsDir, addImports, addImportsDir, addPlugin, addPrerenderRoutes, addRouteMiddleware, addRouteRule, addServerHandler, addServerPlugin, addTemplate, addTypeTemplate, addVitePlugin, defineResuxModule, extendNitroConfig, extendPages, extendRuntimeConfig, extendViteConfig, withResuxKitContext };
|
|
34
|
+
//# sourceMappingURL=index.d.ts.map
|
package/dist/kit/index.js
CHANGED
|
@@ -1,67 +1,70 @@
|
|
|
1
1
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
2
|
+
|
|
3
|
+
//#region src/kit/index.ts
|
|
2
4
|
const kitContextStorage = new AsyncLocalStorage();
|
|
3
|
-
|
|
4
|
-
|
|
5
|
+
function withResuxKitContext(context, run) {
|
|
6
|
+
return kitContextStorage.run(context, run);
|
|
5
7
|
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
+
function defineResuxModule(module) {
|
|
9
|
+
return module;
|
|
8
10
|
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
+
function addComponent(component) {
|
|
12
|
+
useContext("addComponent").addComponent(component);
|
|
11
13
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
+
function addComponentsDir(dir) {
|
|
15
|
+
useContext("addComponentsDir").addComponentsDir(dir);
|
|
14
16
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
function addImports(imports) {
|
|
18
|
+
useContext("addImports").addImports(imports);
|
|
17
19
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
+
function addImportsDir(dir) {
|
|
21
|
+
useContext("addImportsDir").addImportsDir(dir);
|
|
20
22
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
+
function addPlugin(plugin) {
|
|
24
|
+
useContext("addPlugin").addPlugin(plugin);
|
|
23
25
|
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
+
function addRouteMiddleware(middleware) {
|
|
27
|
+
useContext("addRouteMiddleware").addRouteMiddleware(middleware);
|
|
26
28
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
function addServerHandler(handler) {
|
|
30
|
+
useContext("addServerHandler").addServerHandler(handler);
|
|
29
31
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
function addServerPlugin(plugin) {
|
|
33
|
+
useContext("addServerPlugin").addServerPlugin(plugin);
|
|
32
34
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
+
function addTemplate(template) {
|
|
36
|
+
useContext("addTemplate").addTemplate(template);
|
|
35
37
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
+
function addTypeTemplate(template) {
|
|
39
|
+
useContext("addTypeTemplate").addTypeTemplate(template);
|
|
38
40
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
+
function extendPages(extender) {
|
|
42
|
+
useContext("extendPages").extendPages(extender);
|
|
41
43
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
+
function extendRuntimeConfig(config) {
|
|
45
|
+
useContext("extendRuntimeConfig").extendRuntimeConfig(config);
|
|
44
46
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
+
function extendViteConfig(extender) {
|
|
48
|
+
useContext("extendViteConfig").extendViteConfig(extender);
|
|
47
49
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
+
function extendNitroConfig(extender) {
|
|
51
|
+
useContext("extendNitroConfig").extendNitroConfig(extender);
|
|
50
52
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
+
function addVitePlugin(plugin) {
|
|
54
|
+
useContext("addVitePlugin").addVitePlugin(plugin);
|
|
53
55
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
+
function addRouteRule(path, rule) {
|
|
57
|
+
useContext("addRouteRule").addRouteRule(path, rule);
|
|
56
58
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
+
function addPrerenderRoutes(route) {
|
|
60
|
+
useContext("addPrerenderRoutes").addPrerenderRoutes(route);
|
|
59
61
|
}
|
|
60
62
|
function useContext(api) {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
return context;
|
|
63
|
+
const context = kitContextStorage.getStore();
|
|
64
|
+
if (!context) throw new Error(`Resux Kit "${api}" was called outside of a module setup context.`);
|
|
65
|
+
return context;
|
|
66
66
|
}
|
|
67
|
+
|
|
68
|
+
//#endregion
|
|
69
|
+
export { addComponent, addComponentsDir, addImports, addImportsDir, addPlugin, addPrerenderRoutes, addRouteMiddleware, addRouteRule, addServerHandler, addServerPlugin, addTemplate, addTypeTemplate, addVitePlugin, defineResuxModule, extendNitroConfig, extendPages, extendRuntimeConfig, extendViteConfig, withResuxKitContext };
|
|
67
70
|
//# 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,mBAAuC;AAErE,SAAgB,oBAAuB,SAA6B,KAA2C;AAC7G,QAAO,kBAAkB,IAAI,SAAS,IAAI;;AAG5C,SAAgB,kBAAsD,QAA0E;AAC9I,QAAO;;AAGT,SAAgB,aAAa,WAA+C;AAC1E,YAAW,eAAe,CAAC,aAAa,UAAU;;AAGpD,SAAgB,iBAAiB,KAA6C;AAC5E,YAAW,mBAAmB,CAAC,iBAAiB,IAAI;;AAGtD,SAAgB,WAAW,SAAsD;AAC/E,YAAW,aAAa,CAAC,WAAW,QAAQ;;AAG9C,SAAgB,cAAc,KAAmB;AAC/C,YAAW,gBAAgB,CAAC,cAAc,IAAI;;AAGhD,SAAgB,UAAU,QAAyC;AACjE,YAAW,YAAY,CAAC,UAAU,OAAO;;AAG3C,SAAgB,mBAAmB,YAA6C;AAC9E,YAAW,qBAAqB,CAAC,mBAAmB,WAAW;;AAGjE,SAAgB,iBAAiB,SAAwC;AACvE,YAAW,mBAAmB,CAAC,iBAAiB,QAAQ;;AAG1D,SAAgB,gBAAgB,QAAsB;AACpD,YAAW,kBAAkB,CAAC,gBAAgB,OAAO;;AAGvD,SAAgB,YAAY,UAAoC;AAC9D,YAAW,cAAc,CAAC,YAAY,SAAS;;AAGjD,SAAgB,gBAAgB,UAAwC;AACtE,YAAW,kBAAkB,CAAC,gBAAgB,SAAS;;AAGzD,SAAgB,YAAY,UAA+B;AACzD,YAAW,cAAc,CAAC,YAAY,SAAS;;AAGjD,SAAgB,oBAAoB,QAAuC;AACzE,YAAW,sBAAsB,CAAC,oBAAoB,OAAO;;AAG/D,SAAgB,iBAAiB,UAAoC;AACnE,YAAW,mBAAmB,CAAC,iBAAiB,SAAS;;AAG3D,SAAgB,kBAAkB,UAAqC;AACrE,YAAW,oBAAoB,CAAC,kBAAkB,SAAS;;AAG7D,SAAgB,cAAc,QAAuB;AACnD,YAAW,gBAAgB,CAAC,cAAc,OAAO;;AAGnD,SAAgB,aAAa,MAAc,MAAqC;AAC9E,YAAW,eAAe,CAAC,aAAa,MAAM,KAAK;;AAGrD,SAAgB,mBAAmB,OAAgC;AACjE,YAAW,qBAAqB,CAAC,mBAAmB,MAAM;;AAG5D,SAAS,WAAW,KAAiC;CACnD,MAAM,UAAU,kBAAkB,UAAU;AAC5C,KAAI,CAAC,QACH,OAAM,IAAI,MAAM,cAAc,IAAI,iDAAiD;AAErF,QAAO"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
//#region src/nitro-server/index.d.ts
|
|
2
|
+
interface ResuxNitroServerOptions {
|
|
3
|
+
appRoot: string;
|
|
4
|
+
outDir: string;
|
|
5
|
+
preset?: string;
|
|
6
|
+
compatibilityDate?: string;
|
|
6
7
|
}
|
|
7
|
-
|
|
8
|
+
declare function createNitroServerOptions(options: ResuxNitroServerOptions): ResuxNitroServerOptions;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { ResuxNitroServerOptions, createNitroServerOptions };
|
|
11
|
+
//# 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
|
+
|
|
6
|
+
//#endregion
|
|
7
|
+
export { createNitroServerOptions };
|
|
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;AAClG,QAAO"}
|
package/dist/node.d.ts
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { ResuxNodeHandlerOptions } from "./cli.js";
|
|
2
|
+
import { ServerResponse } from "node:http";
|
|
3
|
+
import * as http0 from "http";
|
|
4
|
+
|
|
5
|
+
//#region src/node.d.ts
|
|
6
|
+
declare function createResuxNodeHandler(options?: ResuxNodeHandlerOptions): (request: http0.IncomingMessage, response: ServerResponse) => void;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { type ResuxNodeHandlerOptions, createResuxNodeHandler };
|
|
9
|
+
//# sourceMappingURL=node.d.ts.map
|
package/dist/node.js
CHANGED
|
@@ -1,134 +1,107 @@
|
|
|
1
|
-
import { createResuxNodeHandler as
|
|
1
|
+
import { createResuxNodeHandler as createResuxNodeHandler$1 } from "./cli.js";
|
|
2
|
+
|
|
3
|
+
//#region src/node.ts
|
|
2
4
|
const GENERATED_IMAGE_PREFIX = "/_resux/generated/images/";
|
|
3
5
|
const GENERATED_VIDEO_PREFIX = "/_resux/generated/videos/";
|
|
4
6
|
const STATELESS_IMAGE_PATH = "/__resux/image";
|
|
5
7
|
const STATELESS_VIDEO_PATH = "/__resux/video";
|
|
6
|
-
const CACHE_BOOLEAN_TRUE = new Set([
|
|
7
|
-
|
|
8
|
+
const CACHE_BOOLEAN_TRUE = new Set([
|
|
9
|
+
"true",
|
|
10
|
+
"1",
|
|
11
|
+
"yes",
|
|
12
|
+
"on"
|
|
13
|
+
]);
|
|
14
|
+
const CACHE_BOOLEAN_FALSE = new Set([
|
|
15
|
+
"false",
|
|
16
|
+
"0",
|
|
17
|
+
"off",
|
|
18
|
+
"no"
|
|
19
|
+
]);
|
|
8
20
|
const CACHE_UNIT_SECONDS = {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
21
|
+
s: 1,
|
|
22
|
+
m: 60,
|
|
23
|
+
h: 3600,
|
|
24
|
+
d: 1440 * 60,
|
|
25
|
+
w: 10080 * 60
|
|
14
26
|
};
|
|
15
27
|
function positiveRoundedSeconds(value) {
|
|
16
|
-
|
|
17
|
-
? Math.max(1, Math.round(value))
|
|
18
|
-
: undefined;
|
|
28
|
+
return Number.isFinite(value) && value > 0 ? Math.max(1, Math.round(value)) : void 0;
|
|
19
29
|
}
|
|
20
30
|
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;
|
|
31
|
+
const normalized = value?.trim().toLowerCase();
|
|
32
|
+
if (!normalized || CACHE_BOOLEAN_FALSE.has(normalized)) return;
|
|
33
|
+
if (CACHE_BOOLEAN_TRUE.has(normalized)) return 1440 * 60;
|
|
34
|
+
const numericSeconds = positiveRoundedSeconds(Number(normalized));
|
|
35
|
+
if (numericSeconds) return numericSeconds;
|
|
36
|
+
const duration = /^(\d+)\s*([smhdw])$/.exec(normalized);
|
|
37
|
+
if (!duration) return;
|
|
38
|
+
const amount = Number(duration[1]);
|
|
39
|
+
const unitSeconds = CACHE_UNIT_SECONDS[duration[2] ?? ""];
|
|
40
|
+
return unitSeconds ? positiveRoundedSeconds(amount * unitSeconds) : void 0;
|
|
39
41
|
}
|
|
40
42
|
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);
|
|
43
|
+
return Boolean(process.env.VERCEL || process.env.VERCEL_ENV || process.env.AWS_LAMBDA_FUNCTION_NAME || process.env.LAMBDA_TASK_ROOT || process.env.NETLIFY);
|
|
46
44
|
}
|
|
47
45
|
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
|
-
};
|
|
46
|
+
if (!rawUrl) return null;
|
|
47
|
+
let requestUrl;
|
|
48
|
+
try {
|
|
49
|
+
requestUrl = new URL(rawUrl, "https://resux.invalid");
|
|
50
|
+
} catch {
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
const maxAgeSeconds = parseCacheMaxAgeSeconds(requestUrl.searchParams.get("cache") ?? requestUrl.searchParams.get("c"));
|
|
54
|
+
if (!maxAgeSeconds) return null;
|
|
55
|
+
if (!Boolean(requestUrl.searchParams.get("src") || requestUrl.searchParams.get("url") || requestUrl.searchParams.get("original"))) return null;
|
|
56
|
+
if (requestUrl.pathname.startsWith(GENERATED_IMAGE_PREFIX)) requestUrl.pathname = STATELESS_IMAGE_PATH;
|
|
57
|
+
else if (requestUrl.pathname.startsWith(GENERATED_VIDEO_PREFIX)) requestUrl.pathname = STATELESS_VIDEO_PATH;
|
|
58
|
+
else return null;
|
|
59
|
+
return {
|
|
60
|
+
url: `${requestUrl.pathname}${requestUrl.search}`,
|
|
61
|
+
maxAgeSeconds
|
|
62
|
+
};
|
|
82
63
|
}
|
|
83
64
|
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
|
-
});
|
|
65
|
+
const originalWriteHead = response.writeHead.bind(response);
|
|
66
|
+
const cacheControl = `public, max-age=${maxAgeSeconds}, s-maxage=${maxAgeSeconds}`;
|
|
67
|
+
const cdnCacheControl = `public, max-age=${maxAgeSeconds}`;
|
|
68
|
+
const overrides = {
|
|
69
|
+
"cache-control": cacheControl,
|
|
70
|
+
"cdn-cache-control": cdnCacheControl,
|
|
71
|
+
"vercel-cdn-cache-control": cdnCacheControl,
|
|
72
|
+
"x-resux-cache": "stateless"
|
|
73
|
+
};
|
|
74
|
+
response.writeHead = ((statusCode, ...args) => {
|
|
75
|
+
if (statusCode >= 200 && statusCode < 300) {
|
|
76
|
+
if (typeof args[0] === "string") {
|
|
77
|
+
if (args[1] && typeof args[1] === "object" && !Array.isArray(args[1])) args[1] = {
|
|
78
|
+
...args[1],
|
|
79
|
+
...overrides
|
|
80
|
+
};
|
|
81
|
+
else if (!args[1]) args[1] = { ...overrides };
|
|
82
|
+
} else if (args[0] && typeof args[0] === "object" && !Array.isArray(args[0])) args[0] = {
|
|
83
|
+
...args[0],
|
|
84
|
+
...overrides
|
|
85
|
+
};
|
|
86
|
+
else if (!args[0]) args[0] = { ...overrides };
|
|
87
|
+
else for (const [name, value] of Object.entries(overrides)) if (value !== void 0) response.setHeader(name, value);
|
|
88
|
+
}
|
|
89
|
+
return originalWriteHead(statusCode, ...args);
|
|
90
|
+
});
|
|
119
91
|
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
handler(request, response);
|
|
132
|
-
};
|
|
92
|
+
function createResuxNodeHandler(options = {}) {
|
|
93
|
+
const handler = createResuxNodeHandler$1(options);
|
|
94
|
+
if (!isStatelessDeploymentRuntime()) return handler;
|
|
95
|
+
return (request, response) => {
|
|
96
|
+
const rewritten = resolveStatelessGeneratedMediaRequest(request.url);
|
|
97
|
+
if (rewritten) {
|
|
98
|
+
request.url = rewritten.url;
|
|
99
|
+
withGeneratedMediaCacheHeaders(response, rewritten.maxAgeSeconds);
|
|
100
|
+
}
|
|
101
|
+
handler(request, response);
|
|
102
|
+
};
|
|
133
103
|
}
|
|
104
|
+
|
|
105
|
+
//#endregion
|
|
106
|
+
export { createResuxNodeHandler };
|
|
134
107
|
//# sourceMappingURL=node.js.map
|