vinext 1.3.0 → 1.4.0
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 +5 -2
- package/THIRD_PARTY_LICENSES.md +47 -0
- package/dist/_virtual/_rolldown/runtime.js +4 -3
- package/dist/build/action-owner-manifest.d.ts +3 -2
- package/dist/build/action-owner-manifest.js +18 -2
- package/dist/build/app-page-static-eligibility.d.ts +17 -1
- package/dist/build/app-page-static-eligibility.js +80 -13
- package/dist/build/clean-output.d.ts +2 -1
- package/dist/build/client-build-config.d.ts +13 -3
- package/dist/build/client-build-config.js +46 -9
- package/dist/build/client-reference-async.d.ts +48 -0
- package/dist/build/client-reference-async.js +123 -0
- package/dist/build/client-reference-chunks.d.ts +32 -0
- package/dist/build/client-reference-chunks.js +111 -0
- package/dist/build/client-reference-groups.d.ts +9 -1
- package/dist/build/client-reference-groups.js +40 -2
- package/dist/build/css-url-assets.d.ts +2 -1
- package/dist/build/google-fonts/fallback-metrics.d.ts +2 -1
- package/dist/build/google-fonts/find-font-files-in-css.d.ts +1 -0
- package/dist/build/google-fonts/find-font-files-in-css.js +17 -4
- package/dist/build/google-fonts/font-metadata.d.ts +2 -1
- package/dist/build/google-fonts/validate.d.ts +2 -1
- package/dist/build/inline-css.d.ts +2 -1
- package/dist/build/module-dependency-cache.d.ts +2 -1
- package/dist/build/next-client-runtime-manifests.d.ts +2 -1
- package/dist/build/precompress.d.ts +2 -1
- package/dist/build/precompress.js +1 -1
- package/dist/build/prerender-paths.d.ts +2 -1
- package/dist/build/prerender-phase.d.ts +2 -1
- package/dist/build/prerender-server-pool.js +1 -1
- package/dist/build/prerender.d.ts +3 -2
- package/dist/build/prerender.js +6 -5
- package/dist/build/report.d.ts +2 -15
- package/dist/build/report.js +1 -51
- package/dist/build/run-prerender.d.ts +2 -1
- package/dist/build/server-actions-encryption-key.d.ts +2 -1
- package/dist/build/ssr-manifest.js +25 -2
- package/dist/build/standalone.d.ts +2 -1
- package/dist/cache/cache-adapters-virtual.d.ts +2 -1
- package/dist/cache.js +1 -2
- package/dist/check.d.ts +2 -1
- package/dist/check.js +5 -1
- package/dist/cli-args.d.ts +2 -1
- package/dist/cli.js +5 -0
- package/dist/client/client-redirect-matcher.js +2 -1
- package/dist/client/client-redirects.d.ts +4 -3
- package/dist/client/client-redirects.js +2 -1
- package/dist/client/client-rewrites.d.ts +2 -1
- package/dist/client/dev-error-overlay-store.d.ts +2 -1
- package/dist/client/dev-error-overlay.js +1 -1
- package/dist/client/index.js +1 -2
- package/dist/client/instrumentation-client-state.js +5 -5
- package/dist/client/navigation-runtime.d.ts +16 -2
- package/dist/client/navigation-runtime.js +2 -2
- package/dist/client/pages-router-link-navigation.d.ts +2 -1
- package/dist/client/vinext-next-data.d.ts +25 -1
- package/dist/client/window-next.d.ts +2 -1
- package/dist/config/config-matchers.d.ts +12 -1
- package/dist/config/config-matchers.js +111 -16
- package/dist/config/dotenv.d.ts +2 -1
- package/dist/config/next-config.d.ts +32 -1
- package/dist/config/next-config.js +93 -5
- package/dist/config/tsconfig-paths.d.ts +2 -1
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/encodings/dbcs-codec.js +327 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/encodings/dbcs-data.js +123 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/encodings/index.js +29 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/encodings/internal.js +134 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/encodings/sbcs-codec.js +50 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/encodings/sbcs-data-generated.js +455 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/encodings/sbcs-data.js +147 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/encodings/tables/big5-added.json.js +169 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/encodings/tables/cp936.json.js +2584 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/encodings/tables/cp949.json.js +2220 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/encodings/tables/cp950.json.js +227 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/encodings/tables/eucjp.json.js +425 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/encodings/tables/gb18030-ranges.json.js +427 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/encodings/tables/gbk-added.json.js +229 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/encodings/tables/shiftjis.json.js +292 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/encodings/utf16.js +106 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/encodings/utf7.js +182 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/lib/bom-handling.js +42 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/lib/extend-node.js +147 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/lib/index.js +94 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/lib/streams.js +95 -0
- package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/detector.js +23 -0
- package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/index.js +2 -0
- package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/lookup.js +25 -0
- package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/bmp.js +11 -0
- package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/cur.js +15 -0
- package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/dds.js +11 -0
- package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/gif.js +12 -0
- package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/heif.js +55 -0
- package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/icns.js +76 -0
- package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/ico.js +39 -0
- package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/index.js +46 -0
- package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/j2c.js +11 -0
- package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/jp2.js +21 -0
- package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/jpg.js +71 -0
- package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/jxl-stream.js +42 -0
- package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/jxl.js +46 -0
- package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/ktx.js +19 -0
- package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/png.js +28 -0
- package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/pnm.js +54 -0
- package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/psd.js +11 -0
- package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/svg.js +79 -0
- package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/tga.js +15 -0
- package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/tiff.js +96 -0
- package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/utils.js +53 -0
- package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/webp.js +45 -0
- package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/utils/bit-reader.js +38 -0
- package/dist/deps/.pnpm/safer-buffer@2.1.2/deps/safer-buffer/safer.js +45 -0
- package/dist/deps/.pnpm/ua-parser-js@1.0.35/deps/ua-parser-js/src/ua-parser.js +2 -2
- package/dist/entries/app-browser-entry.d.ts +20 -5
- package/dist/entries/app-browser-entry.js +79 -6
- package/dist/entries/app-rsc-entry.d.ts +2 -1
- package/dist/entries/app-rsc-entry.js +59 -60
- package/dist/entries/app-rsc-manifest.d.ts +2 -1
- package/dist/entries/app-rsc-manifest.js +56 -4
- package/dist/entries/app-ssr-entry.js +1 -0
- package/dist/entries/pages-entry-helpers.js +1 -2
- package/dist/entries/pages-server-entry.d.ts +2 -1
- package/dist/entries/pages-server-entry.js +34 -9
- package/dist/entries/runtime-entry-module.d.ts +1 -0
- package/dist/entries/runtime-entry-module.js +4 -1
- package/dist/image/image-adapters-virtual.d.ts +2 -1
- package/dist/index.js +184 -103
- package/dist/init-cloudflare.d.ts +1 -3
- package/dist/init-cloudflare.js +10 -48
- package/dist/init-platform.d.ts +2 -0
- package/dist/init-platform.js +4 -0
- package/dist/plugins/client-compile-hints.d.ts +30 -0
- package/dist/plugins/client-compile-hints.js +88 -0
- package/dist/plugins/client-reference-dedup.d.ts +2 -1
- package/dist/plugins/cloudflare-dev-module-urls.d.ts +2 -1
- package/dist/plugins/dynamic-preload-metadata.d.ts +3 -1
- package/dist/plugins/dynamic-preload-metadata.js +1 -1
- package/dist/plugins/environment.d.ts +2 -1
- package/dist/plugins/extensionless-dynamic-import.js +6 -2
- package/dist/plugins/fonts.js +9 -12
- package/dist/plugins/ignore-dynamic-requests.d.ts +2 -1
- package/dist/plugins/import-meta-url.d.ts +2 -1
- package/dist/plugins/next-intl-catalog.d.ts +12 -0
- package/dist/plugins/next-intl-catalog.js +85 -0
- package/dist/plugins/og-assets.d.ts +2 -1
- package/dist/plugins/og-assets.js +2 -3
- package/dist/plugins/optimize-imports.d.ts +2 -1
- package/dist/plugins/pages-node-externals.d.ts +3 -1
- package/dist/plugins/pages-node-externals.js +1 -1
- package/dist/plugins/remove-console.d.ts +2 -1
- package/dist/plugins/require-condition-resolution.d.ts +2 -1
- package/dist/plugins/rsc-client-reference-loaders.d.ts +8 -0
- package/dist/plugins/rsc-client-reference-loaders.js +170 -68
- package/dist/plugins/rsc-client-shim-excludes.js +2 -0
- package/dist/plugins/sass.d.ts +2 -1
- package/dist/plugins/strip-server-exports.d.ts +2 -1
- package/dist/plugins/styled-jsx.d.ts +2 -1
- package/dist/plugins/transform-result.d.ts +2 -1
- package/dist/plugins/typeof-window.d.ts +2 -1
- package/dist/plugins/use-cache-callable.d.ts +1 -1
- package/dist/plugins/use-cache-callable.js +136 -94
- package/dist/plugins/worker-image-imports.js +1 -1
- package/dist/plugins/worker-use-server.d.ts +2 -1
- package/dist/routing/app-route-graph.d.ts +46 -0
- package/dist/routing/app-route-graph.js +131 -51
- package/dist/routing/browser-route-manifest.d.ts +2 -1
- package/dist/routing/optimistic-route-trie.d.ts +2 -1
- package/dist/routing/route-matching.d.ts +2 -1
- package/dist/routing/route-pattern.d.ts +2 -1
- package/dist/server/accept-encoding.d.ts +2 -1
- package/dist/server/api-handler.js +19 -4
- package/dist/server/app-action-forwarding.d.ts +2 -1
- package/dist/server/app-bfcache-identity.d.ts +2 -1
- package/dist/server/app-bfcache-identity.js +1 -1
- package/dist/server/app-browser-action-result.d.ts +2 -1
- package/dist/server/app-browser-entry.js +106 -66
- package/dist/server/app-browser-error.d.ts +2 -1
- package/dist/server/app-browser-history-controller.d.ts +7 -5
- package/dist/server/app-browser-history-controller.js +93 -15
- package/dist/server/app-browser-hydration.d.ts +2 -1
- package/dist/server/app-browser-interception-context.d.ts +2 -1
- package/dist/server/app-browser-navigation-controller.d.ts +2 -2
- package/dist/server/app-browser-navigation-controller.js +16 -12
- package/dist/server/app-browser-popstate.d.ts +2 -1
- package/dist/server/app-browser-rsc-redirect.d.ts +2 -1
- package/dist/server/app-browser-rsc-redirect.js +4 -4
- package/dist/server/app-browser-server-action-client.d.ts +4 -1
- package/dist/server/app-browser-server-action-client.js +4 -3
- package/dist/server/app-browser-state.d.ts +2 -4
- package/dist/server/app-browser-state.js +9 -4
- package/dist/server/app-browser-stream.d.ts +2 -1
- package/dist/server/app-browser-supplemental-refresh.js +16 -1
- package/dist/server/app-browser-visible-commit.d.ts +3 -2
- package/dist/server/app-browser-visible-commit.js +2 -12
- package/dist/server/app-client-reference-manifest.d.ts +31 -0
- package/dist/server/app-client-reference-manifest.js +46 -0
- package/dist/server/app-client-reference-preloader.d.ts +25 -5
- package/dist/server/app-client-reference-preloader.js +22 -7
- package/dist/server/app-elements-wire.d.ts +8 -39
- package/dist/server/app-elements-wire.js +4 -41
- package/dist/server/app-elements.d.ts +4 -2
- package/dist/server/app-elements.js +4 -2
- package/dist/server/app-fallback-renderer.d.ts +9 -2
- package/dist/server/app-fallback-renderer.js +4 -1
- package/dist/server/app-history-state.d.ts +4 -3
- package/dist/server/app-history-state.js +5 -2
- package/dist/server/app-inline-css-client.d.ts +2 -1
- package/dist/server/app-metadata-tracing.d.ts +2 -1
- package/dist/server/app-mounted-layouts.d.ts +21 -0
- package/dist/server/app-mounted-layouts.js +67 -0
- package/dist/server/app-optimistic-routing.d.ts +37 -2
- package/dist/server/app-optimistic-routing.js +75 -2
- package/dist/server/app-page-boundary-render.d.ts +20 -2
- package/dist/server/app-page-boundary-render.js +224 -40
- package/dist/server/app-page-boundary.d.ts +34 -5
- package/dist/server/app-page-boundary.js +41 -8
- package/dist/server/app-page-cache-finalizer.d.ts +14 -2
- package/dist/server/app-page-cache-finalizer.js +71 -30
- package/dist/server/app-page-cache-render.d.ts +10 -2
- package/dist/server/app-page-cache-render.js +14 -2
- package/dist/server/app-page-cache.d.ts +13 -1
- package/dist/server/app-page-cache.js +33 -11
- package/dist/server/app-page-dispatch.d.ts +39 -11
- package/dist/server/app-page-dispatch.js +236 -177
- package/dist/server/app-page-element-builder.d.ts +19 -3
- package/dist/server/app-page-element-builder.js +193 -71
- package/dist/server/app-page-execution.d.ts +43 -51
- package/dist/server/app-page-execution.js +205 -92
- package/dist/server/app-page-head.d.ts +108 -3
- package/dist/server/app-page-head.js +337 -154
- package/dist/server/app-page-http-access-fallback-metadata.d.ts +49 -2
- package/dist/server/app-page-http-access-fallback-metadata.js +77 -2
- package/dist/server/app-page-layout-gate.d.ts +35 -0
- package/dist/server/app-page-layout-gate.js +50 -0
- package/dist/server/app-page-method.d.ts +2 -1
- package/dist/server/app-page-params.d.ts +0 -1
- package/dist/server/app-page-params.js +1 -14
- package/dist/server/app-page-probe.d.ts +5 -22
- package/dist/server/app-page-probe.js +4 -37
- package/dist/server/app-page-render-identity.d.ts +2 -1
- package/dist/server/app-page-render.d.ts +9 -13
- package/dist/server/app-page-render.js +108 -214
- package/dist/server/app-page-request.d.ts +15 -4
- package/dist/server/app-page-request.js +2 -2
- package/dist/server/app-page-response.js +3 -3
- package/dist/server/app-page-route-wiring.d.ts +65 -8
- package/dist/server/app-page-route-wiring.js +259 -103
- package/dist/server/app-page-rsc-render-status.d.ts +29 -2
- package/dist/server/app-page-rsc-render-status.js +121 -13
- package/dist/server/app-page-search-params-observation.d.ts +7 -2
- package/dist/server/app-page-search-params-observation.js +8 -1
- package/dist/server/app-page-segment-plan.d.ts +2 -1
- package/dist/server/app-page-stream.d.ts +33 -1
- package/dist/server/app-page-stream.js +25 -6
- package/dist/server/app-pages-bridge.d.ts +6 -1
- package/dist/server/app-pages-bridge.js +7 -3
- package/dist/server/app-ppr-fallback-shell-render.d.ts +2 -1
- package/dist/server/app-ppr-fallback-shell.d.ts +2 -1
- package/dist/server/app-prerender-endpoints.d.ts +2 -1
- package/dist/server/app-prerender-static-params.d.ts +2 -1
- package/dist/server/app-render-dependency.d.ts +21 -4
- package/dist/server/app-render-dependency.js +100 -33
- package/dist/server/app-request-stage-dispatch.js +1 -1
- package/dist/server/app-request-stage-independent-entry.d.ts +2 -1
- package/dist/server/app-response-stage-entry.d.ts +2 -1
- package/dist/server/app-route-handler-cache.d.ts +2 -1
- package/dist/server/app-route-handler-cache.js +2 -2
- package/dist/server/app-route-handler-dispatch.d.ts +2 -1
- package/dist/server/app-route-handler-dispatch.js +15 -10
- package/dist/server/app-route-handler-execution.d.ts +2 -1
- package/dist/server/app-route-handler-execution.js +8 -3
- package/dist/server/app-route-handler-policy.d.ts +1 -1
- package/dist/server/app-route-handler-policy.js +3 -3
- package/dist/server/app-route-handler-response.d.ts +2 -1
- package/dist/server/app-route-handler-response.js +1 -1
- package/dist/server/app-route-handler-runtime.d.ts +2 -1
- package/dist/server/app-route-handler-runtime.js +17 -4
- package/dist/server/app-route-module-loader.d.ts +18 -1
- package/dist/server/app-route-module-loader.js +8 -0
- package/dist/server/app-route-tree-prefetch.d.ts +2 -1
- package/dist/server/app-rsc-cache-busting.d.ts +2 -2
- package/dist/server/app-rsc-cache-busting.js +4 -4
- package/dist/server/app-rsc-error-handler.d.ts +4 -2
- package/dist/server/app-rsc-error-handler.js +9 -1
- package/dist/server/app-rsc-errors.d.ts +10 -1
- package/dist/server/app-rsc-errors.js +8 -1
- package/dist/server/app-rsc-handler.d.ts +7 -6
- package/dist/server/app-rsc-handler.js +36 -34
- package/dist/server/app-rsc-request-normalization.d.ts +0 -4
- package/dist/server/app-rsc-request-normalization.js +1 -4
- package/dist/server/app-rsc-response-finalizer.d.ts +2 -1
- package/dist/server/app-rsc-response-finalizer.js +2 -2
- package/dist/server/app-rsc-response-stage.js +5 -3
- package/dist/server/app-rsc-route-matching.d.ts +38 -1
- package/dist/server/app-rsc-route-matching.js +24 -0
- package/dist/server/app-segment-config.d.ts +2 -1
- package/dist/server/app-segment-config.js +1 -14
- package/dist/server/app-server-action-execution.d.ts +5 -2
- package/dist/server/app-server-action-execution.js +10 -7
- package/dist/server/app-ssr-entry.d.ts +8 -0
- package/dist/server/app-ssr-entry.js +98 -50
- package/dist/server/app-ssr-error-meta.d.ts +2 -1
- package/dist/server/app-ssr-search-params-gate.d.ts +2 -1
- package/dist/server/app-ssr-stream.d.ts +22 -10
- package/dist/server/app-ssr-stream.js +300 -68
- package/dist/server/app-static-generation.d.ts +2 -1
- package/dist/server/app-streamed-client-references.d.ts +39 -0
- package/dist/server/app-streamed-client-references.js +156 -0
- package/dist/server/app-visited-response-cache.d.ts +38 -2
- package/dist/server/app-visited-response-cache.js +46 -5
- package/dist/server/app-worker-stages.d.ts +27 -4
- package/dist/server/app-worker-stages.js +45 -6
- package/dist/server/artifact-compatibility.d.ts +2 -2
- package/dist/server/artifact-compatibility.js +1 -10
- package/dist/server/bfcache-identity.d.ts +2 -1
- package/dist/server/cache-headers.d.ts +2 -1
- package/dist/server/cache-proof.d.ts +1 -115
- package/dist/server/cache-proof.js +1 -544
- package/dist/server/cacheability-request.d.ts +2 -1
- package/dist/server/cacheability-request.js +13 -8
- package/dist/server/config-headers.d.ts +2 -1
- package/dist/server/csp.d.ts +2 -1
- package/dist/server/default-global-not-found-module.d.ts +2 -1
- package/dist/server/default-http-access-fallback-modules.d.ts +33 -0
- package/dist/server/default-http-access-fallback-modules.js +31 -0
- package/dist/server/defer-until-stream-consumed.d.ts +34 -0
- package/dist/server/defer-until-stream-consumed.js +154 -21
- package/dist/server/dev-lockfile.d.ts +32 -2
- package/dist/server/dev-lockfile.js +46 -2
- package/dist/server/dev-module-runner.d.ts +2 -1
- package/dist/server/dev-server.js +14 -6
- package/dist/server/fetch-handler.js +1 -2
- package/dist/server/file-based-metadata.d.ts +2 -1
- package/dist/server/framework-tracer.d.ts +2 -1
- package/dist/server/headers.d.ts +6 -3
- package/dist/server/headers.js +9 -5
- package/dist/server/html.d.ts +1 -0
- package/dist/server/html.js +19 -1
- package/dist/server/http-conditional.d.ts +2 -1
- package/dist/server/http-error-responses.d.ts +2 -1
- package/dist/server/implicit-tags.d.ts +2 -1
- package/dist/server/isr-cache.d.ts +8 -2
- package/dist/server/isr-cache.js +26 -1
- package/dist/server/metadata-route-build-data.d.ts +2 -1
- package/dist/server/metadata-route-build-data.js +1 -1
- package/dist/server/metadata-route-response.d.ts +2 -1
- package/dist/server/metadata-route-response.js +32 -15
- package/dist/server/metadata-routes.d.ts +2 -1
- package/dist/server/middleware-runtime.d.ts +2 -1
- package/dist/server/multi-stage.d.ts +52 -11
- package/dist/server/multi-stage.js +13 -1
- package/dist/server/navigation-planner.js +1 -1
- package/dist/server/navigation-trace.d.ts +2 -1
- package/dist/server/next-error-digest.d.ts +2 -1
- package/dist/server/nitro-public-files-plugin.d.ts +2 -1
- package/dist/server/nitro-public-files.d.ts +2 -1
- package/dist/server/opentelemetry-api.d.ts +2 -1
- package/dist/server/operation-token.d.ts +2 -1
- package/dist/server/pages-api-route.d.ts +2 -1
- package/dist/server/pages-api-route.js +28 -19
- package/dist/server/pages-asset-tags.d.ts +2 -1
- package/dist/server/pages-body-parser-config.d.ts +2 -1
- package/dist/server/pages-client-assets.d.ts +4 -0
- package/dist/server/pages-data-route.d.ts +2 -1
- package/dist/server/pages-document-asset-props.d.ts +2 -1
- package/dist/server/pages-document-initial-props.d.ts +2 -1
- package/dist/server/pages-execution-tracing.d.ts +2 -1
- package/dist/server/pages-execution-tracing.js +1 -1
- package/dist/server/pages-get-initial-props.d.ts +2 -1
- package/dist/server/pages-media-type.d.ts +21 -1
- package/dist/server/pages-media-type.js +69 -5
- package/dist/server/pages-node-compat.js +52 -27
- package/dist/server/pages-page-data.d.ts +7 -1
- package/dist/server/pages-page-data.js +35 -12
- package/dist/server/pages-page-handler.d.ts +3 -2
- package/dist/server/pages-page-handler.js +27 -27
- package/dist/server/pages-page-method.d.ts +2 -1
- package/dist/server/pages-page-response.d.ts +2 -1
- package/dist/server/pages-preview.d.ts +2 -1
- package/dist/server/pages-readiness.d.ts +2 -1
- package/dist/server/pages-request-pipeline.d.ts +10 -1
- package/dist/server/pages-request-pipeline.js +6 -7
- package/dist/server/pages-request-stage-entry.d.ts +2 -1
- package/dist/server/pages-request-stage-entry.js +14 -12
- package/dist/server/pages-response-stage-entry.d.ts +2 -1
- package/dist/server/pages-response-stage-entry.js +9 -3
- package/dist/server/pages-route-data-kind.d.ts +2 -1
- package/dist/server/prerender-cache-life-header.d.ts +2 -1
- package/dist/server/prerender-route-params.d.ts +2 -1
- package/dist/server/prod-server.js +14 -4
- package/dist/server/request-log.d.ts +2 -1
- package/dist/server/request-pipeline.d.ts +6 -0
- package/dist/server/request-pipeline.js +21 -1
- package/dist/server/request-tracing.d.ts +2 -1
- package/dist/server/request-tracing.js +1 -1
- package/dist/server/response-start-tracing.js +7 -29
- package/dist/server/rsc-render-stream.d.ts +4 -0
- package/dist/server/rsc-render-stream.js +25 -0
- package/dist/server/seed-cache.d.ts +2 -1
- package/dist/server/seed-cache.js +1 -1
- package/dist/server/shared-cache-identity.d.ts +23 -0
- package/dist/server/shared-cache-identity.js +36 -0
- package/dist/server/static-file-cache.d.ts +2 -1
- package/dist/server/static-file-cache.js +1 -0
- package/dist/server/worker-revalidation-context.d.ts +2 -1
- package/dist/server/worker-stages.d.ts +18 -4
- package/dist/server/worker-stages.js +23 -4
- package/dist/shims/app.d.ts +2 -1
- package/dist/shims/cache-callable-runtime.d.ts +2 -1
- package/dist/shims/cache-handler.d.ts +8 -3
- package/dist/shims/cache-handler.js +31 -11
- package/dist/shims/cache-request-state.d.ts +17 -20
- package/dist/shims/cache-request-state.js +16 -21
- package/dist/shims/cache-runtime.js +27 -11
- package/dist/shims/cache.d.ts +8 -7
- package/dist/shims/cache.js +17 -19
- package/dist/shims/cacheability-classification.d.ts +2 -0
- package/dist/shims/caught-not-found-boundaries.d.ts +15 -0
- package/dist/shims/caught-not-found-boundaries.js +48 -0
- package/dist/shims/cdn-cache.d.ts +22 -5
- package/dist/shims/cdn-purge-routes.d.ts +2 -1
- package/dist/shims/client-locale.js +2 -1
- package/dist/shims/client-page-root.d.ts +2 -1
- package/dist/shims/client-page-root.js +2 -2
- package/dist/shims/config.d.ts +2 -1
- package/dist/shims/default-forbidden.d.ts +4 -0
- package/dist/shims/default-forbidden.js +18 -0
- package/dist/shims/default-not-found.d.ts +0 -5
- package/dist/shims/default-not-found.js +5 -41
- package/dist/shims/default-unauthorized.d.ts +4 -0
- package/dist/shims/default-unauthorized.js +18 -0
- package/dist/shims/dynamic.js +9 -6
- package/dist/shims/error-boundary.d.ts +39 -3
- package/dist/shims/error-boundary.js +33 -18
- package/dist/shims/fetch-cache-state.d.ts +5 -1
- package/dist/shims/fetch-cache-state.js +1 -3
- package/dist/shims/fetch-cache.d.ts +2 -1
- package/dist/shims/fetch-cache.js +34 -24
- package/dist/shims/font-google.js +1 -2
- package/dist/shims/font-utils.d.ts +3 -2
- package/dist/shims/font-utils.js +5 -3
- package/dist/shims/form.js +3 -3
- package/dist/shims/headers.d.ts +8 -23
- package/dist/shims/headers.js +17 -67
- package/dist/shims/http-access-error-fallback.d.ts +7 -0
- package/dist/shims/http-access-error-fallback.js +47 -0
- package/dist/shims/image.d.ts +1 -22
- package/dist/shims/internal/app-prefetch-fetch-queue.d.ts +22 -2
- package/dist/shims/internal/app-prefetch-fetch-queue.js +71 -18
- package/dist/shims/internal/app-route-prefetch-policy.d.ts +14 -3
- package/dist/shims/internal/app-route-prefetch-policy.js +29 -4
- package/dist/shims/internal/cache-context-accessor.d.ts +2 -1
- package/dist/shims/internal/client-reference-loader.d.ts +7 -0
- package/dist/shims/internal/client-reference-loader.js +91 -0
- package/dist/shims/internal/cookie-serialize.d.ts +2 -1
- package/dist/shims/internal/cookies.js +1 -2
- package/dist/shims/internal/headers-state.d.ts +2 -0
- package/dist/shims/internal/headers-state.js +6 -1
- package/dist/shims/internal/hybrid-client-route-owner-direct.d.ts +2 -1
- package/dist/shims/internal/interpolate-as.d.ts +2 -1
- package/dist/shims/internal/navigation-untracked.js +1 -1
- package/dist/shims/internal/pages-data-target.d.ts +2 -1
- package/dist/shims/internal/pages-data-url.d.ts +2 -1
- package/dist/shims/internal/thenable-well-known-properties.d.ts +2 -1
- package/dist/shims/link.js +197 -52
- package/dist/shims/metadata.d.ts +52 -29
- package/dist/shims/metadata.js +142 -42
- package/dist/shims/navigation-errors.d.ts +2 -1
- package/dist/shims/navigation-server.js +1 -1
- package/dist/shims/navigation.d.ts +95 -8
- package/dist/shims/navigation.js +255 -47
- package/dist/shims/navigation.react-server.js +2 -2
- package/dist/shims/pages-router-runtime.d.ts +2 -1
- package/dist/shims/ppr-fallback-shell.d.ts +2 -1
- package/dist/shims/request-state-types.d.ts +2 -2
- package/dist/shims/router.js +14 -3
- package/dist/shims/slot.d.ts +12 -0
- package/dist/shims/slot.js +37 -9
- package/dist/shims/unified-request-context.d.ts +1 -1
- package/dist/shims/unified-request-context.js +5 -6
- package/dist/typegen.d.ts +2 -1
- package/dist/utils/cache-control-metadata.d.ts +5 -0
- package/dist/utils/cache-control-metadata.js +9 -1
- package/dist/utils/client-build-manifest.d.ts +4 -1
- package/dist/utils/client-build-manifest.js +9 -2
- package/dist/utils/client-entry-manifest.d.ts +13 -0
- package/dist/utils/client-entry-manifest.js +20 -1
- package/dist/utils/client-reference-chunks.d.ts +45 -0
- package/dist/utils/client-reference-chunks.js +30 -0
- package/dist/utils/client-runtime-metadata.d.ts +9 -1
- package/dist/utils/client-runtime-metadata.js +40 -9
- package/dist/utils/compare.d.ts +9 -0
- package/dist/utils/compare.js +15 -1
- package/dist/utils/lazy-chunks.d.ts +14 -0
- package/dist/utils/lazy-chunks.js +27 -1
- package/dist/utils/middleware-request-headers.d.ts +2 -1
- package/dist/utils/project.d.ts +4 -3
- package/dist/utils/project.js +12 -17
- package/dist/utils/query.d.ts +2 -1
- package/dist/utils/regex.d.ts +5 -0
- package/dist/utils/regex.js +11 -1
- package/dist/utils/text-stream.d.ts +10 -5
- package/dist/utils/text-stream.js +6 -6
- package/dist/utils/vite-cli-invocation.d.ts +2 -1
- package/package.json +6 -5
- package/dist/build/layout-classification-types.d.ts +0 -60
- package/dist/build/layout-classification-types.js +0 -1
- package/dist/build/layout-classification.d.ts +0 -61
- package/dist/build/layout-classification.js +0 -98
- package/dist/build/route-classification-injector.d.ts +0 -32
- package/dist/build/route-classification-injector.js +0 -59
- package/dist/build/route-classification-manifest.d.ts +0 -53
- package/dist/build/route-classification-manifest.js +0 -143
- package/dist/deps/.pnpm/image-size@2.0.2/deps/image-size/dist/index.js +0 -808
- package/dist/server/app-browser-client-reuse-manifest.d.ts +0 -10
- package/dist/server/app-browser-client-reuse-manifest.js +0 -101
- package/dist/server/app-layout-param-observation.d.ts +0 -41
- package/dist/server/app-layout-param-observation.js +0 -168
- package/dist/server/client-reuse-manifest.d.ts +0 -102
- package/dist/server/client-reuse-manifest.js +0 -209
- package/dist/server/default-not-found-module.d.ts +0 -19
- package/dist/server/default-not-found-module.js +0 -18
- package/dist/server/rsc-stream-hints.d.ts +0 -21
- package/dist/server/rsc-stream-hints.js +0 -227
- package/dist/server/skip-cache-proof.d.ts +0 -60
- package/dist/server/skip-cache-proof.js +0 -168
- package/dist/server/static-layout-client-reuse-proof.d.ts +0 -13
- package/dist/server/static-layout-client-reuse-proof.js +0 -33
- package/dist/utils/sorted-array.d.ts +0 -7
- package/dist/utils/sorted-array.js +0 -20
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { __commonJSMin, __require } from "../../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
//#region ../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/lib/extend-node.js
|
|
3
|
+
var require_extend_node = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4
|
+
var Buffer = __require("buffer").Buffer;
|
|
5
|
+
module.exports = function(iconv) {
|
|
6
|
+
var original = void 0;
|
|
7
|
+
iconv.supportsNodeEncodingsExtension = !(Buffer.from || new Buffer(0) instanceof Uint8Array);
|
|
8
|
+
iconv.extendNodeEncodings = function extendNodeEncodings() {
|
|
9
|
+
if (original) return;
|
|
10
|
+
original = {};
|
|
11
|
+
if (!iconv.supportsNodeEncodingsExtension) {
|
|
12
|
+
console.error("ACTION NEEDED: require('iconv-lite').extendNodeEncodings() is not supported in your version of Node");
|
|
13
|
+
console.error("See more info at https://github.com/ashtuchkin/iconv-lite/wiki/Node-v4-compatibility");
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
var nodeNativeEncodings = {
|
|
17
|
+
"hex": true,
|
|
18
|
+
"utf8": true,
|
|
19
|
+
"utf-8": true,
|
|
20
|
+
"ascii": true,
|
|
21
|
+
"binary": true,
|
|
22
|
+
"base64": true,
|
|
23
|
+
"ucs2": true,
|
|
24
|
+
"ucs-2": true,
|
|
25
|
+
"utf16le": true,
|
|
26
|
+
"utf-16le": true
|
|
27
|
+
};
|
|
28
|
+
Buffer.isNativeEncoding = function(enc) {
|
|
29
|
+
return enc && nodeNativeEncodings[enc.toLowerCase()];
|
|
30
|
+
};
|
|
31
|
+
var SlowBuffer = __require("buffer").SlowBuffer;
|
|
32
|
+
original.SlowBufferToString = SlowBuffer.prototype.toString;
|
|
33
|
+
SlowBuffer.prototype.toString = function(encoding, start, end) {
|
|
34
|
+
encoding = String(encoding || "utf8").toLowerCase();
|
|
35
|
+
if (Buffer.isNativeEncoding(encoding)) return original.SlowBufferToString.call(this, encoding, start, end);
|
|
36
|
+
if (typeof start == "undefined") start = 0;
|
|
37
|
+
if (typeof end == "undefined") end = this.length;
|
|
38
|
+
return iconv.decode(this.slice(start, end), encoding);
|
|
39
|
+
};
|
|
40
|
+
original.SlowBufferWrite = SlowBuffer.prototype.write;
|
|
41
|
+
SlowBuffer.prototype.write = function(string, offset, length, encoding) {
|
|
42
|
+
if (isFinite(offset)) {
|
|
43
|
+
if (!isFinite(length)) {
|
|
44
|
+
encoding = length;
|
|
45
|
+
length = void 0;
|
|
46
|
+
}
|
|
47
|
+
} else {
|
|
48
|
+
var swap = encoding;
|
|
49
|
+
encoding = offset;
|
|
50
|
+
offset = length;
|
|
51
|
+
length = swap;
|
|
52
|
+
}
|
|
53
|
+
offset = +offset || 0;
|
|
54
|
+
var remaining = this.length - offset;
|
|
55
|
+
if (!length) length = remaining;
|
|
56
|
+
else {
|
|
57
|
+
length = +length;
|
|
58
|
+
if (length > remaining) length = remaining;
|
|
59
|
+
}
|
|
60
|
+
encoding = String(encoding || "utf8").toLowerCase();
|
|
61
|
+
if (Buffer.isNativeEncoding(encoding)) return original.SlowBufferWrite.call(this, string, offset, length, encoding);
|
|
62
|
+
if (string.length > 0 && (length < 0 || offset < 0)) throw new RangeError("attempt to write beyond buffer bounds");
|
|
63
|
+
var buf = iconv.encode(string, encoding);
|
|
64
|
+
if (buf.length < length) length = buf.length;
|
|
65
|
+
buf.copy(this, offset, 0, length);
|
|
66
|
+
return length;
|
|
67
|
+
};
|
|
68
|
+
original.BufferIsEncoding = Buffer.isEncoding;
|
|
69
|
+
Buffer.isEncoding = function(encoding) {
|
|
70
|
+
return Buffer.isNativeEncoding(encoding) || iconv.encodingExists(encoding);
|
|
71
|
+
};
|
|
72
|
+
original.BufferByteLength = Buffer.byteLength;
|
|
73
|
+
Buffer.byteLength = SlowBuffer.byteLength = function(str, encoding) {
|
|
74
|
+
encoding = String(encoding || "utf8").toLowerCase();
|
|
75
|
+
if (Buffer.isNativeEncoding(encoding)) return original.BufferByteLength.call(this, str, encoding);
|
|
76
|
+
return iconv.encode(str, encoding).length;
|
|
77
|
+
};
|
|
78
|
+
original.BufferToString = Buffer.prototype.toString;
|
|
79
|
+
Buffer.prototype.toString = function(encoding, start, end) {
|
|
80
|
+
encoding = String(encoding || "utf8").toLowerCase();
|
|
81
|
+
if (Buffer.isNativeEncoding(encoding)) return original.BufferToString.call(this, encoding, start, end);
|
|
82
|
+
if (typeof start == "undefined") start = 0;
|
|
83
|
+
if (typeof end == "undefined") end = this.length;
|
|
84
|
+
return iconv.decode(this.slice(start, end), encoding);
|
|
85
|
+
};
|
|
86
|
+
original.BufferWrite = Buffer.prototype.write;
|
|
87
|
+
Buffer.prototype.write = function(string, offset, length, encoding) {
|
|
88
|
+
var _offset = offset, _length = length, _encoding = encoding;
|
|
89
|
+
if (isFinite(offset)) {
|
|
90
|
+
if (!isFinite(length)) {
|
|
91
|
+
encoding = length;
|
|
92
|
+
length = void 0;
|
|
93
|
+
}
|
|
94
|
+
} else {
|
|
95
|
+
var swap = encoding;
|
|
96
|
+
encoding = offset;
|
|
97
|
+
offset = length;
|
|
98
|
+
length = swap;
|
|
99
|
+
}
|
|
100
|
+
encoding = String(encoding || "utf8").toLowerCase();
|
|
101
|
+
if (Buffer.isNativeEncoding(encoding)) return original.BufferWrite.call(this, string, _offset, _length, _encoding);
|
|
102
|
+
offset = +offset || 0;
|
|
103
|
+
var remaining = this.length - offset;
|
|
104
|
+
if (!length) length = remaining;
|
|
105
|
+
else {
|
|
106
|
+
length = +length;
|
|
107
|
+
if (length > remaining) length = remaining;
|
|
108
|
+
}
|
|
109
|
+
if (string.length > 0 && (length < 0 || offset < 0)) throw new RangeError("attempt to write beyond buffer bounds");
|
|
110
|
+
var buf = iconv.encode(string, encoding);
|
|
111
|
+
if (buf.length < length) length = buf.length;
|
|
112
|
+
buf.copy(this, offset, 0, length);
|
|
113
|
+
return length;
|
|
114
|
+
};
|
|
115
|
+
if (iconv.supportsStreams) {
|
|
116
|
+
var Readable = __require("stream").Readable;
|
|
117
|
+
original.ReadableSetEncoding = Readable.prototype.setEncoding;
|
|
118
|
+
Readable.prototype.setEncoding = function setEncoding(enc, options) {
|
|
119
|
+
this._readableState.decoder = iconv.getDecoder(enc, options);
|
|
120
|
+
this._readableState.encoding = enc;
|
|
121
|
+
};
|
|
122
|
+
Readable.prototype.collect = iconv._collect;
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
iconv.undoExtendNodeEncodings = function undoExtendNodeEncodings() {
|
|
126
|
+
if (!iconv.supportsNodeEncodingsExtension) return;
|
|
127
|
+
if (!original) throw new Error("require('iconv-lite').undoExtendNodeEncodings(): Nothing to undo; extendNodeEncodings() is not called.");
|
|
128
|
+
delete Buffer.isNativeEncoding;
|
|
129
|
+
var SlowBuffer = __require("buffer").SlowBuffer;
|
|
130
|
+
SlowBuffer.prototype.toString = original.SlowBufferToString;
|
|
131
|
+
SlowBuffer.prototype.write = original.SlowBufferWrite;
|
|
132
|
+
Buffer.isEncoding = original.BufferIsEncoding;
|
|
133
|
+
Buffer.byteLength = original.BufferByteLength;
|
|
134
|
+
Buffer.prototype.toString = original.BufferToString;
|
|
135
|
+
Buffer.prototype.write = original.BufferWrite;
|
|
136
|
+
if (iconv.supportsStreams) {
|
|
137
|
+
var Readable = __require("stream").Readable;
|
|
138
|
+
Readable.prototype.setEncoding = original.ReadableSetEncoding;
|
|
139
|
+
delete Readable.prototype.collect;
|
|
140
|
+
}
|
|
141
|
+
original = void 0;
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
}));
|
|
145
|
+
//#endregion
|
|
146
|
+
export default require_extend_node();
|
|
147
|
+
export { require_extend_node };
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { __commonJSMin } from "../../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { require_safer } from "../../../../safer-buffer@2.1.2/deps/safer-buffer/safer.js";
|
|
3
|
+
import { require_bom_handling } from "./bom-handling.js";
|
|
4
|
+
import { require_encodings } from "../encodings/index.js";
|
|
5
|
+
import { require_streams } from "./streams.js";
|
|
6
|
+
import { require_extend_node } from "./extend-node.js";
|
|
7
|
+
//#region ../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/lib/index.js
|
|
8
|
+
var require_lib = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
9
|
+
var Buffer = require_safer().Buffer;
|
|
10
|
+
var bomHandling = require_bom_handling();
|
|
11
|
+
var iconv = module.exports;
|
|
12
|
+
iconv.encodings = null;
|
|
13
|
+
iconv.defaultCharUnicode = "�";
|
|
14
|
+
iconv.defaultCharSingleByte = "?";
|
|
15
|
+
iconv.encode = function encode(str, encoding, options) {
|
|
16
|
+
str = "" + (str || "");
|
|
17
|
+
var encoder = iconv.getEncoder(encoding, options);
|
|
18
|
+
var res = encoder.write(str);
|
|
19
|
+
var trail = encoder.end();
|
|
20
|
+
return trail && trail.length > 0 ? Buffer.concat([res, trail]) : res;
|
|
21
|
+
};
|
|
22
|
+
iconv.decode = function decode(buf, encoding, options) {
|
|
23
|
+
if (typeof buf === "string") {
|
|
24
|
+
if (!iconv.skipDecodeWarning) {
|
|
25
|
+
console.error("Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding");
|
|
26
|
+
iconv.skipDecodeWarning = true;
|
|
27
|
+
}
|
|
28
|
+
buf = Buffer.from("" + (buf || ""), "binary");
|
|
29
|
+
}
|
|
30
|
+
var decoder = iconv.getDecoder(encoding, options);
|
|
31
|
+
var res = decoder.write(buf);
|
|
32
|
+
var trail = decoder.end();
|
|
33
|
+
return trail ? res + trail : res;
|
|
34
|
+
};
|
|
35
|
+
iconv.encodingExists = function encodingExists(enc) {
|
|
36
|
+
try {
|
|
37
|
+
iconv.getCodec(enc);
|
|
38
|
+
return true;
|
|
39
|
+
} catch (e) {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
iconv.toEncoding = iconv.encode;
|
|
44
|
+
iconv.fromEncoding = iconv.decode;
|
|
45
|
+
iconv._codecDataCache = {};
|
|
46
|
+
iconv.getCodec = function getCodec(encoding) {
|
|
47
|
+
if (!iconv.encodings) iconv.encodings = require_encodings();
|
|
48
|
+
var enc = iconv._canonicalizeEncoding(encoding);
|
|
49
|
+
var codecOptions = {};
|
|
50
|
+
while (true) {
|
|
51
|
+
var codec = iconv._codecDataCache[enc];
|
|
52
|
+
if (codec) return codec;
|
|
53
|
+
var codecDef = iconv.encodings[enc];
|
|
54
|
+
switch (typeof codecDef) {
|
|
55
|
+
case "string":
|
|
56
|
+
enc = codecDef;
|
|
57
|
+
break;
|
|
58
|
+
case "object":
|
|
59
|
+
for (var key in codecDef) codecOptions[key] = codecDef[key];
|
|
60
|
+
if (!codecOptions.encodingName) codecOptions.encodingName = enc;
|
|
61
|
+
enc = codecDef.type;
|
|
62
|
+
break;
|
|
63
|
+
case "function":
|
|
64
|
+
if (!codecOptions.encodingName) codecOptions.encodingName = enc;
|
|
65
|
+
codec = new codecDef(codecOptions, iconv);
|
|
66
|
+
iconv._codecDataCache[codecOptions.encodingName] = codec;
|
|
67
|
+
return codec;
|
|
68
|
+
default: throw new Error("Encoding not recognized: '" + encoding + "' (searched as: '" + enc + "')");
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
iconv._canonicalizeEncoding = function(encoding) {
|
|
73
|
+
return ("" + encoding).toLowerCase().replace(/:\d{4}$|[^0-9a-z]/g, "");
|
|
74
|
+
};
|
|
75
|
+
iconv.getEncoder = function getEncoder(encoding, options) {
|
|
76
|
+
var codec = iconv.getCodec(encoding), encoder = new codec.encoder(options, codec);
|
|
77
|
+
if (codec.bomAware && options && options.addBOM) encoder = new bomHandling.PrependBOM(encoder, options);
|
|
78
|
+
return encoder;
|
|
79
|
+
};
|
|
80
|
+
iconv.getDecoder = function getDecoder(encoding, options) {
|
|
81
|
+
var codec = iconv.getCodec(encoding), decoder = new codec.decoder(options, codec);
|
|
82
|
+
if (codec.bomAware && !(options && options.stripBOM === false)) decoder = new bomHandling.StripBOM(decoder, options);
|
|
83
|
+
return decoder;
|
|
84
|
+
};
|
|
85
|
+
var nodeVer = typeof process !== "undefined" && process.versions && process.versions.node;
|
|
86
|
+
if (nodeVer) {
|
|
87
|
+
var nodeVerArr = nodeVer.split(".").map(Number);
|
|
88
|
+
if (nodeVerArr[0] > 0 || nodeVerArr[1] >= 10) require_streams()(iconv);
|
|
89
|
+
require_extend_node()(iconv);
|
|
90
|
+
}
|
|
91
|
+
}));
|
|
92
|
+
//#endregion
|
|
93
|
+
export default require_lib();
|
|
94
|
+
export {};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { __commonJSMin, __require } from "../../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
//#region ../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/lib/streams.js
|
|
3
|
+
var require_streams = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4
|
+
var Buffer = __require("buffer").Buffer;
|
|
5
|
+
var Transform = __require("stream").Transform;
|
|
6
|
+
module.exports = function(iconv) {
|
|
7
|
+
iconv.encodeStream = function encodeStream(encoding, options) {
|
|
8
|
+
return new IconvLiteEncoderStream(iconv.getEncoder(encoding, options), options);
|
|
9
|
+
};
|
|
10
|
+
iconv.decodeStream = function decodeStream(encoding, options) {
|
|
11
|
+
return new IconvLiteDecoderStream(iconv.getDecoder(encoding, options), options);
|
|
12
|
+
};
|
|
13
|
+
iconv.supportsStreams = true;
|
|
14
|
+
iconv.IconvLiteEncoderStream = IconvLiteEncoderStream;
|
|
15
|
+
iconv.IconvLiteDecoderStream = IconvLiteDecoderStream;
|
|
16
|
+
iconv._collect = IconvLiteDecoderStream.prototype.collect;
|
|
17
|
+
};
|
|
18
|
+
function IconvLiteEncoderStream(conv, options) {
|
|
19
|
+
this.conv = conv;
|
|
20
|
+
options = options || {};
|
|
21
|
+
options.decodeStrings = false;
|
|
22
|
+
Transform.call(this, options);
|
|
23
|
+
}
|
|
24
|
+
IconvLiteEncoderStream.prototype = Object.create(Transform.prototype, { constructor: { value: IconvLiteEncoderStream } });
|
|
25
|
+
IconvLiteEncoderStream.prototype._transform = function(chunk, encoding, done) {
|
|
26
|
+
if (typeof chunk != "string") return done(/* @__PURE__ */ new Error("Iconv encoding stream needs strings as its input."));
|
|
27
|
+
try {
|
|
28
|
+
var res = this.conv.write(chunk);
|
|
29
|
+
if (res && res.length) this.push(res);
|
|
30
|
+
done();
|
|
31
|
+
} catch (e) {
|
|
32
|
+
done(e);
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
IconvLiteEncoderStream.prototype._flush = function(done) {
|
|
36
|
+
try {
|
|
37
|
+
var res = this.conv.end();
|
|
38
|
+
if (res && res.length) this.push(res);
|
|
39
|
+
done();
|
|
40
|
+
} catch (e) {
|
|
41
|
+
done(e);
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
IconvLiteEncoderStream.prototype.collect = function(cb) {
|
|
45
|
+
var chunks = [];
|
|
46
|
+
this.on("error", cb);
|
|
47
|
+
this.on("data", function(chunk) {
|
|
48
|
+
chunks.push(chunk);
|
|
49
|
+
});
|
|
50
|
+
this.on("end", function() {
|
|
51
|
+
cb(null, Buffer.concat(chunks));
|
|
52
|
+
});
|
|
53
|
+
return this;
|
|
54
|
+
};
|
|
55
|
+
function IconvLiteDecoderStream(conv, options) {
|
|
56
|
+
this.conv = conv;
|
|
57
|
+
options = options || {};
|
|
58
|
+
options.encoding = this.encoding = "utf8";
|
|
59
|
+
Transform.call(this, options);
|
|
60
|
+
}
|
|
61
|
+
IconvLiteDecoderStream.prototype = Object.create(Transform.prototype, { constructor: { value: IconvLiteDecoderStream } });
|
|
62
|
+
IconvLiteDecoderStream.prototype._transform = function(chunk, encoding, done) {
|
|
63
|
+
if (!Buffer.isBuffer(chunk)) return done(/* @__PURE__ */ new Error("Iconv decoding stream needs buffers as its input."));
|
|
64
|
+
try {
|
|
65
|
+
var res = this.conv.write(chunk);
|
|
66
|
+
if (res && res.length) this.push(res, this.encoding);
|
|
67
|
+
done();
|
|
68
|
+
} catch (e) {
|
|
69
|
+
done(e);
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
IconvLiteDecoderStream.prototype._flush = function(done) {
|
|
73
|
+
try {
|
|
74
|
+
var res = this.conv.end();
|
|
75
|
+
if (res && res.length) this.push(res, this.encoding);
|
|
76
|
+
done();
|
|
77
|
+
} catch (e) {
|
|
78
|
+
done(e);
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
IconvLiteDecoderStream.prototype.collect = function(cb) {
|
|
82
|
+
var res = "";
|
|
83
|
+
this.on("error", cb);
|
|
84
|
+
this.on("data", function(chunk) {
|
|
85
|
+
res += chunk;
|
|
86
|
+
});
|
|
87
|
+
this.on("end", function() {
|
|
88
|
+
cb(null, res);
|
|
89
|
+
});
|
|
90
|
+
return this;
|
|
91
|
+
};
|
|
92
|
+
}));
|
|
93
|
+
//#endregion
|
|
94
|
+
export default require_streams();
|
|
95
|
+
export { require_streams };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { typeHandlers, types } from "./types/index.js";
|
|
2
|
+
//#region ../../node_modules/.pnpm/image-size@2.0.4/node_modules/image-size/dist/esm/detector.js
|
|
3
|
+
const firstBytes = /* @__PURE__ */ new Map([
|
|
4
|
+
[0, "heif"],
|
|
5
|
+
[56, "psd"],
|
|
6
|
+
[66, "bmp"],
|
|
7
|
+
[68, "dds"],
|
|
8
|
+
[71, "gif"],
|
|
9
|
+
[73, "tiff"],
|
|
10
|
+
[77, "tiff"],
|
|
11
|
+
[82, "webp"],
|
|
12
|
+
[105, "icns"],
|
|
13
|
+
[137, "png"],
|
|
14
|
+
[255, "jpg"]
|
|
15
|
+
]);
|
|
16
|
+
function detector(input) {
|
|
17
|
+
const byte = input[0];
|
|
18
|
+
const type = firstBytes.get(byte);
|
|
19
|
+
if (type && typeHandlers.get(type)?.validate(input)) return type;
|
|
20
|
+
return types.find((type) => typeHandlers.get(type)?.validate(input));
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
export { detector };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { typeHandlers } from "./types/index.js";
|
|
2
|
+
import { detector } from "./detector.js";
|
|
3
|
+
//#region ../../node_modules/.pnpm/image-size@2.0.4/node_modules/image-size/dist/esm/lookup.js
|
|
4
|
+
const globalOptions = { disabledTypes: [] };
|
|
5
|
+
function imageSize(input) {
|
|
6
|
+
const type = detector(input);
|
|
7
|
+
if (typeof type !== "undefined") {
|
|
8
|
+
if (globalOptions.disabledTypes.indexOf(type) > -1) throw new TypeError(`disabled file type: ${type}`);
|
|
9
|
+
const size = typeHandlers.get(type)?.calculate(input);
|
|
10
|
+
if (size !== void 0) {
|
|
11
|
+
size.type = size.type ?? type;
|
|
12
|
+
if (size.images && size.images.length > 1) {
|
|
13
|
+
const largestImage = size.images.reduce((largest, current) => {
|
|
14
|
+
return current.width * current.height > largest.width * largest.height ? current : largest;
|
|
15
|
+
}, size.images[0]);
|
|
16
|
+
size.width = largestImage.width;
|
|
17
|
+
size.height = largestImage.height;
|
|
18
|
+
}
|
|
19
|
+
return size;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
throw new TypeError(`unsupported file type: ${type}`);
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
export { imageSize };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { readInt32LE, readUInt32LE, toUTF8String } from "./utils.js";
|
|
2
|
+
//#region ../../node_modules/.pnpm/image-size@2.0.4/node_modules/image-size/dist/esm/types/bmp.js
|
|
3
|
+
const BMP = {
|
|
4
|
+
validate: (input) => toUTF8String(input, 0, 2) === "BM",
|
|
5
|
+
calculate: (input) => ({
|
|
6
|
+
height: Math.abs(readInt32LE(input, 22)),
|
|
7
|
+
width: readUInt32LE(input, 18)
|
|
8
|
+
})
|
|
9
|
+
};
|
|
10
|
+
//#endregion
|
|
11
|
+
export { BMP };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { readUInt16LE } from "./utils.js";
|
|
2
|
+
import { ICO } from "./ico.js";
|
|
3
|
+
//#region ../../node_modules/.pnpm/image-size@2.0.4/node_modules/image-size/dist/esm/types/cur.js
|
|
4
|
+
const TYPE_CURSOR = 2;
|
|
5
|
+
const CUR = {
|
|
6
|
+
validate(input) {
|
|
7
|
+
const reserved = readUInt16LE(input, 0);
|
|
8
|
+
const imageCount = readUInt16LE(input, 4);
|
|
9
|
+
if (reserved !== 0 || imageCount === 0) return false;
|
|
10
|
+
return readUInt16LE(input, 2) === TYPE_CURSOR;
|
|
11
|
+
},
|
|
12
|
+
calculate: (input) => ICO.calculate(input)
|
|
13
|
+
};
|
|
14
|
+
//#endregion
|
|
15
|
+
export { CUR };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { readUInt32LE } from "./utils.js";
|
|
2
|
+
//#region ../../node_modules/.pnpm/image-size@2.0.4/node_modules/image-size/dist/esm/types/dds.js
|
|
3
|
+
const DDS = {
|
|
4
|
+
validate: (input) => readUInt32LE(input, 0) === 542327876,
|
|
5
|
+
calculate: (input) => ({
|
|
6
|
+
height: readUInt32LE(input, 12),
|
|
7
|
+
width: readUInt32LE(input, 16)
|
|
8
|
+
})
|
|
9
|
+
};
|
|
10
|
+
//#endregion
|
|
11
|
+
export { DDS };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { readUInt16LE, toUTF8String } from "./utils.js";
|
|
2
|
+
//#region ../../node_modules/.pnpm/image-size@2.0.4/node_modules/image-size/dist/esm/types/gif.js
|
|
3
|
+
const gifRegexp = /^GIF8[79]a/;
|
|
4
|
+
const GIF = {
|
|
5
|
+
validate: (input) => gifRegexp.test(toUTF8String(input, 0, 6)),
|
|
6
|
+
calculate: (input) => ({
|
|
7
|
+
height: readUInt16LE(input, 8),
|
|
8
|
+
width: readUInt16LE(input, 6)
|
|
9
|
+
})
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { GIF };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { findBox, readUInt32BE, toUTF8String } from "./utils.js";
|
|
2
|
+
//#region ../../node_modules/.pnpm/image-size@2.0.4/node_modules/image-size/dist/esm/types/heif.js
|
|
3
|
+
const brandMap = {
|
|
4
|
+
avif: "avif",
|
|
5
|
+
mif1: "heif",
|
|
6
|
+
msf1: "heif",
|
|
7
|
+
heic: "heic",
|
|
8
|
+
heix: "heic",
|
|
9
|
+
hevc: "heic",
|
|
10
|
+
hevx: "heic"
|
|
11
|
+
};
|
|
12
|
+
const HEIF = {
|
|
13
|
+
validate(input) {
|
|
14
|
+
if (toUTF8String(input, 4, 8) !== "ftyp") return false;
|
|
15
|
+
const ftypBox = findBox(input, "ftyp", 0);
|
|
16
|
+
if (!ftypBox) return false;
|
|
17
|
+
return toUTF8String(input, ftypBox.offset + 8, ftypBox.offset + 12) in brandMap;
|
|
18
|
+
},
|
|
19
|
+
calculate(input) {
|
|
20
|
+
const metaBox = findBox(input, "meta", 0);
|
|
21
|
+
const iprpBox = metaBox && findBox(input, "iprp", metaBox.offset + 12);
|
|
22
|
+
const ipcoBox = iprpBox && findBox(input, "ipco", iprpBox.offset + 8);
|
|
23
|
+
if (!ipcoBox) throw new TypeError("Invalid HEIF, no ipco box found");
|
|
24
|
+
const type = toUTF8String(input, 8, 12);
|
|
25
|
+
const images = [];
|
|
26
|
+
let currentOffset = ipcoBox.offset + 8;
|
|
27
|
+
while (currentOffset < ipcoBox.offset + ipcoBox.size) {
|
|
28
|
+
const ispeBox = findBox(input, "ispe", currentOffset);
|
|
29
|
+
if (!ispeBox) break;
|
|
30
|
+
if (ispeBox.size < 20) throw new TypeError("Invalid HEIF");
|
|
31
|
+
const rawWidth = readUInt32BE(input, ispeBox.offset + 12);
|
|
32
|
+
const rawHeight = readUInt32BE(input, ispeBox.offset + 16);
|
|
33
|
+
const clapBox = findBox(input, "clap", currentOffset);
|
|
34
|
+
let width = rawWidth;
|
|
35
|
+
const height = rawHeight;
|
|
36
|
+
if (clapBox && clapBox.size >= 16 && clapBox.offset < ipcoBox.offset + ipcoBox.size) width = rawWidth - readUInt32BE(input, clapBox.offset + 12);
|
|
37
|
+
images.push({
|
|
38
|
+
height,
|
|
39
|
+
width
|
|
40
|
+
});
|
|
41
|
+
const nextOffset = ispeBox.offset + ispeBox.size;
|
|
42
|
+
if (nextOffset <= currentOffset) throw new TypeError("Invalid HEIF");
|
|
43
|
+
currentOffset = nextOffset;
|
|
44
|
+
}
|
|
45
|
+
if (images.length === 0) throw new TypeError("Invalid HEIF, no sizes found");
|
|
46
|
+
return {
|
|
47
|
+
width: images[0].width,
|
|
48
|
+
height: images[0].height,
|
|
49
|
+
type,
|
|
50
|
+
...images.length > 1 ? { images } : {}
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
//#endregion
|
|
55
|
+
export { HEIF };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { readUInt32BE, toUTF8String } from "./utils.js";
|
|
2
|
+
//#region ../../node_modules/.pnpm/image-size@2.0.4/node_modules/image-size/dist/esm/types/icns.js
|
|
3
|
+
const SIZE_HEADER = 8;
|
|
4
|
+
const FILE_LENGTH_OFFSET = 4;
|
|
5
|
+
const ENTRY_LENGTH_OFFSET = 4;
|
|
6
|
+
const ICON_TYPE_SIZE = {
|
|
7
|
+
ICON: 32,
|
|
8
|
+
"ICN#": 32,
|
|
9
|
+
"icm#": 16,
|
|
10
|
+
icm4: 16,
|
|
11
|
+
icm8: 16,
|
|
12
|
+
"ics#": 16,
|
|
13
|
+
ics4: 16,
|
|
14
|
+
ics8: 16,
|
|
15
|
+
is32: 16,
|
|
16
|
+
s8mk: 16,
|
|
17
|
+
icp4: 16,
|
|
18
|
+
icl4: 32,
|
|
19
|
+
icl8: 32,
|
|
20
|
+
il32: 32,
|
|
21
|
+
l8mk: 32,
|
|
22
|
+
icp5: 32,
|
|
23
|
+
ic11: 32,
|
|
24
|
+
ich4: 48,
|
|
25
|
+
ich8: 48,
|
|
26
|
+
ih32: 48,
|
|
27
|
+
h8mk: 48,
|
|
28
|
+
icp6: 64,
|
|
29
|
+
ic12: 32,
|
|
30
|
+
it32: 128,
|
|
31
|
+
t8mk: 128,
|
|
32
|
+
ic07: 128,
|
|
33
|
+
ic08: 256,
|
|
34
|
+
ic13: 256,
|
|
35
|
+
ic09: 512,
|
|
36
|
+
ic14: 512,
|
|
37
|
+
ic10: 1024
|
|
38
|
+
};
|
|
39
|
+
function readImageHeader(input, imageOffset) {
|
|
40
|
+
const imageLengthOffset = imageOffset + ENTRY_LENGTH_OFFSET;
|
|
41
|
+
if (imageLengthOffset + 4 > input.length) throw new TypeError("Invalid ICNS");
|
|
42
|
+
return [toUTF8String(input, imageOffset, imageLengthOffset), readUInt32BE(input, imageLengthOffset)];
|
|
43
|
+
}
|
|
44
|
+
function getImageSize(type) {
|
|
45
|
+
const size = ICON_TYPE_SIZE[type];
|
|
46
|
+
return {
|
|
47
|
+
width: size,
|
|
48
|
+
height: size,
|
|
49
|
+
type
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
const ICNS = {
|
|
53
|
+
validate: (input) => toUTF8String(input, 0, 4) === "icns",
|
|
54
|
+
calculate(input) {
|
|
55
|
+
const inputLength = input.length;
|
|
56
|
+
const fileLength = readUInt32BE(input, FILE_LENGTH_OFFSET);
|
|
57
|
+
let imageOffset = SIZE_HEADER;
|
|
58
|
+
const images = [];
|
|
59
|
+
while (imageOffset < fileLength && imageOffset < inputLength) {
|
|
60
|
+
const imageHeader = readImageHeader(input, imageOffset);
|
|
61
|
+
const entryLength = imageHeader[1];
|
|
62
|
+
if (entryLength < 8) throw new TypeError("Invalid ICNS");
|
|
63
|
+
const imageSize = getImageSize(imageHeader[0]);
|
|
64
|
+
images.push(imageSize);
|
|
65
|
+
imageOffset += entryLength;
|
|
66
|
+
}
|
|
67
|
+
if (images.length === 0) throw new TypeError("Invalid ICNS, no sizes found");
|
|
68
|
+
return {
|
|
69
|
+
width: images[0].width,
|
|
70
|
+
height: images[0].height,
|
|
71
|
+
...images.length > 1 ? { images } : {}
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
//#endregion
|
|
76
|
+
export { ICNS };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { readUInt16LE } from "./utils.js";
|
|
2
|
+
//#region ../../node_modules/.pnpm/image-size@2.0.4/node_modules/image-size/dist/esm/types/ico.js
|
|
3
|
+
const TYPE_ICON = 1;
|
|
4
|
+
const SIZE_HEADER = 6;
|
|
5
|
+
const SIZE_IMAGE_ENTRY = 16;
|
|
6
|
+
function getSizeFromOffset(input, offset) {
|
|
7
|
+
const value = input[offset];
|
|
8
|
+
return value === 0 ? 256 : value;
|
|
9
|
+
}
|
|
10
|
+
function getImageSize(input, imageIndex) {
|
|
11
|
+
const offset = SIZE_HEADER + imageIndex * SIZE_IMAGE_ENTRY;
|
|
12
|
+
return {
|
|
13
|
+
height: getSizeFromOffset(input, offset + 1),
|
|
14
|
+
width: getSizeFromOffset(input, offset)
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
const ICO = {
|
|
18
|
+
validate(input) {
|
|
19
|
+
const reserved = readUInt16LE(input, 0);
|
|
20
|
+
const imageCount = readUInt16LE(input, 4);
|
|
21
|
+
if (reserved !== 0 || imageCount === 0) return false;
|
|
22
|
+
return readUInt16LE(input, 2) === TYPE_ICON;
|
|
23
|
+
},
|
|
24
|
+
calculate(input) {
|
|
25
|
+
const nbImages = readUInt16LE(input, 4);
|
|
26
|
+
if (SIZE_HEADER + nbImages * SIZE_IMAGE_ENTRY > input.length) throw new TypeError("Invalid ICO");
|
|
27
|
+
const imageSize = getImageSize(input, 0);
|
|
28
|
+
if (nbImages === 1) return imageSize;
|
|
29
|
+
const images = [];
|
|
30
|
+
for (let imageIndex = 0; imageIndex < nbImages; imageIndex += 1) images.push(getImageSize(input, imageIndex));
|
|
31
|
+
return {
|
|
32
|
+
width: imageSize.width,
|
|
33
|
+
height: imageSize.height,
|
|
34
|
+
images
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
//#endregion
|
|
39
|
+
export { ICO };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { BMP } from "./bmp.js";
|
|
2
|
+
import { ICO } from "./ico.js";
|
|
3
|
+
import { CUR } from "./cur.js";
|
|
4
|
+
import { DDS } from "./dds.js";
|
|
5
|
+
import { GIF } from "./gif.js";
|
|
6
|
+
import { HEIF } from "./heif.js";
|
|
7
|
+
import { ICNS } from "./icns.js";
|
|
8
|
+
import { J2C } from "./j2c.js";
|
|
9
|
+
import { JP2 } from "./jp2.js";
|
|
10
|
+
import { JPG } from "./jpg.js";
|
|
11
|
+
import { JXLStream } from "./jxl-stream.js";
|
|
12
|
+
import { JXL } from "./jxl.js";
|
|
13
|
+
import { KTX } from "./ktx.js";
|
|
14
|
+
import { PNG } from "./png.js";
|
|
15
|
+
import { PNM } from "./pnm.js";
|
|
16
|
+
import { PSD } from "./psd.js";
|
|
17
|
+
import { SVG } from "./svg.js";
|
|
18
|
+
import { TGA } from "./tga.js";
|
|
19
|
+
import { TIFF } from "./tiff.js";
|
|
20
|
+
import { WEBP } from "./webp.js";
|
|
21
|
+
//#region ../../node_modules/.pnpm/image-size@2.0.4/node_modules/image-size/dist/esm/types/index.js
|
|
22
|
+
const typeHandlers = /* @__PURE__ */ new Map([
|
|
23
|
+
["bmp", BMP],
|
|
24
|
+
["cur", CUR],
|
|
25
|
+
["dds", DDS],
|
|
26
|
+
["gif", GIF],
|
|
27
|
+
["heif", HEIF],
|
|
28
|
+
["icns", ICNS],
|
|
29
|
+
["ico", ICO],
|
|
30
|
+
["j2c", J2C],
|
|
31
|
+
["jp2", JP2],
|
|
32
|
+
["jpg", JPG],
|
|
33
|
+
["jxl", JXL],
|
|
34
|
+
["jxl-stream", JXLStream],
|
|
35
|
+
["ktx", KTX],
|
|
36
|
+
["png", PNG],
|
|
37
|
+
["pnm", PNM],
|
|
38
|
+
["psd", PSD],
|
|
39
|
+
["svg", SVG],
|
|
40
|
+
["tga", TGA],
|
|
41
|
+
["tiff", TIFF],
|
|
42
|
+
["webp", WEBP]
|
|
43
|
+
]);
|
|
44
|
+
const types = Array.from(typeHandlers.keys());
|
|
45
|
+
//#endregion
|
|
46
|
+
export { typeHandlers, types };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { readUInt32BE } from "./utils.js";
|
|
2
|
+
//#region ../../node_modules/.pnpm/image-size@2.0.4/node_modules/image-size/dist/esm/types/j2c.js
|
|
3
|
+
const J2C = {
|
|
4
|
+
validate: (input) => readUInt32BE(input, 0) === 4283432785,
|
|
5
|
+
calculate: (input) => ({
|
|
6
|
+
height: readUInt32BE(input, 12),
|
|
7
|
+
width: readUInt32BE(input, 8)
|
|
8
|
+
})
|
|
9
|
+
};
|
|
10
|
+
//#endregion
|
|
11
|
+
export { J2C };
|