@lssm/lib.design-system 1.11.1 → 1.41.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 +6 -1
- package/dist/_virtual/rolldown_runtime.js +9 -4
- package/dist/components/agent/ApprovalQueue.js +1 -1
- package/dist/components/atoms/Button.js +4 -5
- package/dist/components/atoms/ButtonLink.js +2 -2
- package/dist/components/atoms/Cta.js +4 -5
- package/dist/components/atoms/EmptyState.js +4 -4
- package/dist/components/atoms/ErrorState.js +1 -2
- package/dist/components/atoms/Input.js +5 -6
- package/dist/components/atoms/Link.js +1 -2
- package/dist/components/atoms/Link.web.js +4 -2
- package/dist/components/atoms/LoaderCircular.js +1 -2
- package/dist/components/atoms/Stepper.js +4 -4
- package/dist/components/atoms/Textarea.js +8 -9
- package/dist/components/data-view/DataViewRenderer.js +2 -2
- package/dist/components/forms/ActionForm.js +18 -0
- package/dist/components/forms/FormOneByOneLayout.js +3 -3
- package/dist/components/forms/FormStepsLayout.js +3 -3
- package/dist/components/forms/ZodForm.js +1 -1
- package/dist/components/legal/atoms/LegalCallout.js +1 -1
- package/dist/components/legal/atoms/LegalHeading.js +1 -1
- package/dist/components/legal/atoms/LegalList.js +1 -1
- package/dist/components/legal/atoms/LegalSection.js +1 -1
- package/dist/components/legal/atoms/LegalText.js +1 -1
- package/dist/components/legal/molecules/ContactFields.js +8 -8
- package/dist/components/legal/molecules/LegalTOC.js +1 -1
- package/dist/components/legal/organisms/ContactForm.js +3 -3
- package/dist/components/legal/organisms/GDPRDataRequest.js +2 -2
- package/dist/components/legal/templates/ContactTemplate.js +3 -3
- package/dist/components/marketing/MarketingCard.js +20 -0
- package/dist/components/marketing/MarketingCardsSection.js +28 -0
- package/dist/components/marketing/MarketingComparisonSection.js +52 -0
- package/dist/components/marketing/MarketingIconCard.js +73 -0
- package/dist/components/marketing/MarketingSection.js +61 -0
- package/dist/components/marketing/MarketingStepCard.js +36 -0
- package/dist/components/molecules/AiLinkButton.js +4 -4
- package/dist/components/molecules/Breadcrumbs.js +2 -2
- package/dist/components/molecules/CommandPalette.js +3 -3
- package/dist/components/molecules/CommandSearchTrigger.js +3 -3
- package/dist/components/molecules/FiltersToolbar.js +5 -5
- package/dist/components/molecules/HoverPreview.js +2 -2
- package/dist/components/molecules/LangSwitchDropdown.js +2 -2
- package/dist/components/molecules/LoaderBlock.js +1 -2
- package/dist/components/molecules/OverviewCard.js +5 -4
- package/dist/components/molecules/SkeletonBlock/index.web.js +1 -2
- package/dist/components/molecules/SkeletonCircle/index.web.js +1 -2
- package/dist/components/molecules/SkeletonList/index.web.js +4 -5
- package/dist/components/organisms/AcademyLayout.js +2 -2
- package/dist/components/organisms/AppLayout.js +2 -2
- package/dist/components/organisms/EmptySearchResult.js +5 -5
- package/dist/components/organisms/FAQSection.js +2 -2
- package/dist/components/organisms/Footer.js +2 -4
- package/dist/components/organisms/MarketingHeader.js +5 -5
- package/dist/components/organisms/MarketingHeaderMobile.js +2 -2
- package/dist/components/organisms/MarketingLayout.js +1 -0
- package/dist/components/templates/lists/ListPageTemplate/index.web.js +2 -2
- package/dist/hooks/useListUrlState.js +7 -7
- package/dist/index.js +9 -1
- package/dist/lib/keyboard.js +1 -172
- package/dist/node_modules/@swc/helpers/cjs/_interop_require_default.js +14 -0
- package/dist/node_modules/@swc/helpers/cjs/_interop_require_wildcard.js +35 -0
- package/dist/node_modules/next/dist/client/add-base-path.js +30 -0
- package/dist/node_modules/next/dist/client/add-locale.js +29 -0
- package/dist/node_modules/next/dist/client/detect-domain-locale.js +26 -0
- package/dist/node_modules/next/dist/client/get-domain-locale.js +41 -0
- package/dist/node_modules/next/dist/client/has-base-path.js +28 -0
- package/dist/node_modules/next/dist/client/link.js +311 -0
- package/dist/node_modules/next/dist/client/normalize-locale-path.js +30 -0
- package/dist/node_modules/next/dist/client/normalize-trailing-slash.js +34 -0
- package/dist/node_modules/next/dist/client/request-idle-callback.js +44 -0
- package/dist/node_modules/next/dist/client/resolve-href.js +86 -0
- package/dist/node_modules/next/dist/client/use-intersection.js +104 -0
- package/dist/node_modules/next/dist/client/use-merged-ref.js +56 -0
- package/dist/node_modules/next/dist/compiled/path-to-regexp/index.js +372 -0
- package/dist/node_modules/next/dist/lib/constants.js +316 -0
- package/dist/node_modules/next/dist/lib/route-pattern-normalizer.js +69 -0
- package/dist/node_modules/next/dist/shared/lib/escape-regexp.js +23 -0
- package/dist/node_modules/next/dist/shared/lib/i18n/detect-domain-locale.js +22 -0
- package/dist/node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js +42 -0
- package/dist/node_modules/next/dist/shared/lib/invariant-error.js +23 -0
- package/dist/node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js +23 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/add-locale.js +30 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js +24 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/app-paths.js +41 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/format-url.js +78 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/get-dynamic-param.js +151 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/get-segment-param.js +77 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/index.js +32 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/interception-routes.js +92 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/interpolate-as.js +41 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/is-dynamic.js +26 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/is-local-url.js +31 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/omit.js +24 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/parse-loader-tree.js +33 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/parse-path.js +36 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js +24 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/querystring.js +56 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js +26 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/route-match-utils.js +94 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/route-matcher.js +46 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/route-regex.js +203 -0
- package/dist/node_modules/next/dist/shared/lib/router/utils/sorted-routes.js +167 -0
- package/dist/node_modules/next/dist/shared/lib/router-context.shared-runtime.js +20 -0
- package/dist/node_modules/next/dist/shared/lib/segment.js +80 -0
- package/dist/node_modules/next/dist/shared/lib/utils/error-once.js +25 -0
- package/dist/node_modules/next/dist/shared/lib/utils.js +172 -0
- package/dist/node_modules/next/link.js +12 -0
- package/dist/platform/useColorScheme.js +3 -3
- package/dist/platform/useReducedMotion.js +3 -3
- package/dist/platform/useResponsive.js +4 -4
- package/dist/renderers/form-contract.js +1 -1
- package/package.json +13 -304
- package/dist/components/agent/AgentMonitor.d.ts +0 -28
- package/dist/components/agent/ApprovalQueue.d.ts +0 -25
- package/dist/components/atoms/ActionButtons.d.ts +0 -25
- package/dist/components/atoms/Button.d.ts +0 -39
- package/dist/components/atoms/Button.mobile.d.ts +0 -21
- package/dist/components/atoms/Button.mobile.js +0 -34
- package/dist/components/atoms/ButtonLink.d.ts +0 -21
- package/dist/components/atoms/ButtonLink.mobile.d.ts +0 -19
- package/dist/components/atoms/ButtonLink.mobile.js +0 -41
- package/dist/components/atoms/Cta.d.ts +0 -20
- package/dist/components/atoms/Cta.mobile.d.ts +0 -14
- package/dist/components/atoms/Cta.mobile.js +0 -38
- package/dist/components/atoms/DataChips.d.ts +0 -37
- package/dist/components/atoms/EmptyState.d.ts +0 -7
- package/dist/components/atoms/ErrorState.d.ts +0 -28
- package/dist/components/atoms/ErrorState.mobile.d.ts +0 -28
- package/dist/components/atoms/ErrorState.mobile.js +0 -41
- package/dist/components/atoms/Input.d.ts +0 -39
- package/dist/components/atoms/Input.mobile.d.ts +0 -37
- package/dist/components/atoms/Input.mobile.js +0 -27
- package/dist/components/atoms/Link.d.ts +0 -11
- package/dist/components/atoms/Link.native.d.ts +0 -1
- package/dist/components/atoms/Link.native.js +0 -0
- package/dist/components/atoms/Link.web.d.ts +0 -23
- package/dist/components/atoms/LoaderCircular.d.ts +0 -22
- package/dist/components/atoms/LoaderCircular.mobile.d.ts +0 -17
- package/dist/components/atoms/LoaderCircular.mobile.js +0 -26
- package/dist/components/atoms/NavBrand.d.ts +0 -18
- package/dist/components/atoms/Stepper.d.ts +0 -7
- package/dist/components/atoms/Textarea.d.ts +0 -41
- package/dist/components/atoms/Textarea.mobile.d.ts +0 -37
- package/dist/components/atoms/Textarea.mobile.js +0 -27
- package/dist/components/data-view/DataViewDetail.d.ts +0 -21
- package/dist/components/data-view/DataViewList.d.ts +0 -23
- package/dist/components/data-view/DataViewRenderer.d.ts +0 -47
- package/dist/components/data-view/DataViewTable.d.ts +0 -25
- package/dist/components/data-view/utils.d.ts +0 -5
- package/dist/components/forms/FormCardLayout.d.ts +0 -22
- package/dist/components/forms/FormDialog.d.ts +0 -24
- package/dist/components/forms/FormLayout.d.ts +0 -29
- package/dist/components/forms/FormOneByOneLayout.d.ts +0 -25
- package/dist/components/forms/FormStepsLayout.d.ts +0 -26
- package/dist/components/forms/ZodForm.d.ts +0 -21
- package/dist/components/legal/atoms/DefinitionList.d.ts +0 -16
- package/dist/components/legal/atoms/KeyValueList.d.ts +0 -16
- package/dist/components/legal/atoms/LegalCallout.d.ts +0 -17
- package/dist/components/legal/atoms/LegalHeading.d.ts +0 -24
- package/dist/components/legal/atoms/LegalList.d.ts +0 -20
- package/dist/components/legal/atoms/LegalSection.d.ts +0 -21
- package/dist/components/legal/atoms/LegalText.d.ts +0 -24
- package/dist/components/legal/molecules/Consent.d.ts +0 -35
- package/dist/components/legal/molecules/ContactFields.d.ts +0 -24
- package/dist/components/legal/molecules/LegalMeta.d.ts +0 -14
- package/dist/components/legal/molecules/LegalTOC.d.ts +0 -30
- package/dist/components/legal/organisms/ContactForm.d.ts +0 -29
- package/dist/components/legal/organisms/GDPRDataRequest.d.ts +0 -18
- package/dist/components/legal/organisms/GDPRRights.d.ts +0 -13
- package/dist/components/legal/organisms/LegalPageLayout.d.ts +0 -23
- package/dist/components/legal/templates/ContactTemplate.d.ts +0 -23
- package/dist/components/legal/templates/CookiesTemplate.d.ts +0 -32
- package/dist/components/legal/templates/PrivacyTemplate.d.ts +0 -32
- package/dist/components/legal/templates/SalesTermsTemplate.d.ts +0 -27
- package/dist/components/legal/templates/TermsTemplate.d.ts +0 -27
- package/dist/components/molecules/AiLinkButton.d.ts +0 -15
- package/dist/components/molecules/Breadcrumbs.d.ts +0 -15
- package/dist/components/molecules/CommandPalette.d.ts +0 -26
- package/dist/components/molecules/CommandSearchTrigger.d.ts +0 -18
- package/dist/components/molecules/DropdownMenu.d.ts +0 -1
- package/dist/components/molecules/DropdownMenu.js +0 -0
- package/dist/components/molecules/EntityCard.d.ts +0 -37
- package/dist/components/molecules/FiltersToolbar.d.ts +0 -35
- package/dist/components/molecules/FiltersToolbar.mobile.d.ts +0 -18
- package/dist/components/molecules/FiltersToolbar.mobile.js +0 -48
- package/dist/components/molecules/HoverPreview.d.ts +0 -20
- package/dist/components/molecules/LangSwitch.d.ts +0 -22
- package/dist/components/molecules/LangSwitchDropdown.d.ts +0 -21
- package/dist/components/molecules/LoaderBlock.d.ts +0 -18
- package/dist/components/molecules/LoaderBlock.mobile.d.ts +0 -18
- package/dist/components/molecules/LoaderBlock.mobile.js +0 -25
- package/dist/components/molecules/MobileNavMenu.d.ts +0 -13
- package/dist/components/molecules/NavItemCard.d.ts +0 -14
- package/dist/components/molecules/NavMain.d.ts +0 -13
- package/dist/components/molecules/NavUser.d.ts +0 -17
- package/dist/components/molecules/OverviewCard.d.ts +0 -20
- package/dist/components/molecules/SkeletonBlock/index.d.ts +0 -3
- package/dist/components/molecules/SkeletonBlock/index.js +0 -3
- package/dist/components/molecules/SkeletonBlock/index.mobile.d.ts +0 -12
- package/dist/components/molecules/SkeletonBlock/index.mobile.js +0 -18
- package/dist/components/molecules/SkeletonBlock/index.web.d.ts +0 -12
- package/dist/components/molecules/SkeletonBlock/types.d.ts +0 -9
- package/dist/components/molecules/SkeletonBlock/types.js +0 -0
- package/dist/components/molecules/SkeletonCircle/index.d.ts +0 -3
- package/dist/components/molecules/SkeletonCircle/index.js +0 -3
- package/dist/components/molecules/SkeletonCircle/index.mobile.d.ts +0 -11
- package/dist/components/molecules/SkeletonCircle/index.mobile.js +0 -23
- package/dist/components/molecules/SkeletonCircle/index.web.d.ts +0 -11
- package/dist/components/molecules/SkeletonCircle/types.d.ts +0 -8
- package/dist/components/molecules/SkeletonCircle/types.js +0 -0
- package/dist/components/molecules/SkeletonList/index.d.ts +0 -3
- package/dist/components/molecules/SkeletonList/index.js +0 -3
- package/dist/components/molecules/SkeletonList/index.mobile.d.ts +0 -10
- package/dist/components/molecules/SkeletonList/index.mobile.js +0 -22
- package/dist/components/molecules/SkeletonList/index.web.d.ts +0 -10
- package/dist/components/molecules/SkeletonList/types.d.ts +0 -7
- package/dist/components/molecules/SkeletonList/types.js +0 -0
- package/dist/components/molecules/StatCard.d.ts +0 -36
- package/dist/components/molecules/StatusChip.d.ts +0 -26
- package/dist/components/molecules/hover-previews/Doc.d.ts +0 -27
- package/dist/components/molecules/hover-previews/Media.d.ts +0 -20
- package/dist/components/molecules/hover-previews/Simple.d.ts +0 -25
- package/dist/components/molecules/hover-previews/Stats.d.ts +0 -22
- package/dist/components/molecules/hover-previews/User.d.ts +0 -25
- package/dist/components/native/BottomTabs.mobile.d.ts +0 -20
- package/dist/components/native/BottomTabs.mobile.js +0 -27
- package/dist/components/native/FlatListScreen.mobile.d.ts +0 -43
- package/dist/components/native/FlatListScreen.mobile.js +0 -63
- package/dist/components/native/SheetMenu.mobile.d.ts +0 -17
- package/dist/components/native/SheetMenu.mobile.js +0 -21
- package/dist/components/organisms/AcademyLayout.d.ts +0 -29
- package/dist/components/organisms/AppHeader.d.ts +0 -18
- package/dist/components/organisms/AppHeader.mobile.d.ts +0 -21
- package/dist/components/organisms/AppHeader.mobile.js +0 -52
- package/dist/components/organisms/AppLayout.d.ts +0 -28
- package/dist/components/organisms/AppSidebar.d.ts +0 -23
- package/dist/components/organisms/AppSidebar.mobile.d.ts +0 -1
- package/dist/components/organisms/AppSidebar.mobile.js +0 -0
- package/dist/components/organisms/EmptyDataList.d.ts +0 -20
- package/dist/components/organisms/EmptyDataList.mobile.d.ts +0 -20
- package/dist/components/organisms/EmptyDataList.mobile.js +0 -27
- package/dist/components/organisms/EmptyDataList.types.d.ts +0 -19
- package/dist/components/organisms/EmptyDataList.types.js +0 -1
- package/dist/components/organisms/EmptySearchResult.d.ts +0 -24
- package/dist/components/organisms/FAQSection.d.ts +0 -31
- package/dist/components/organisms/FeatureCarousel.d.ts +0 -18
- package/dist/components/organisms/FeaturesSection.d.ts +0 -19
- package/dist/components/organisms/Footer.d.ts +0 -25
- package/dist/components/organisms/GridLayout.d.ts +0 -25
- package/dist/components/organisms/GridLayout.js +0 -28
- package/dist/components/organisms/Header.d.ts +0 -37
- package/dist/components/organisms/Header.mobile.d.ts +0 -24
- package/dist/components/organisms/Header.mobile.js +0 -18
- package/dist/components/organisms/HeroResponsive.d.ts +0 -14
- package/dist/components/organisms/HeroSection.d.ts +0 -29
- package/dist/components/organisms/ListCardPage.d.ts +0 -36
- package/dist/components/organisms/ListGridPage.d.ts +0 -36
- package/dist/components/organisms/ListPageResponsive.d.ts +0 -7
- package/dist/components/organisms/ListTablePage.d.ts +0 -33
- package/dist/components/organisms/MarketingHeader.d.ts +0 -36
- package/dist/components/organisms/MarketingHeaderDesktop.d.ts +0 -15
- package/dist/components/organisms/MarketingHeaderMobile.d.ts +0 -12
- package/dist/components/organisms/MarketingLayout.d.ts +0 -18
- package/dist/components/organisms/PageHeaderResponsive.d.ts +0 -8
- package/dist/components/organisms/PageHeaderResponsive.mobile.d.ts +0 -22
- package/dist/components/organisms/PageHeaderResponsive.mobile.js +0 -32
- package/dist/components/organisms/PricingCarousel.d.ts +0 -24
- package/dist/components/organisms/PricingSection.d.ts +0 -18
- package/dist/components/organisms/TestimonialCarousel.d.ts +0 -19
- package/dist/components/templates/lists/ListPageTemplate/index.d.ts +0 -3
- package/dist/components/templates/lists/ListPageTemplate/index.js +0 -3
- package/dist/components/templates/lists/ListPageTemplate/index.mobile.d.ts +0 -21
- package/dist/components/templates/lists/ListPageTemplate/index.mobile.js +0 -32
- package/dist/components/templates/lists/ListPageTemplate/index.web.d.ts +0 -22
- package/dist/components/templates/lists/ListPageTemplate/types.d.ts +0 -25
- package/dist/components/templates/lists/ListPageTemplate/types.js +0 -1
- package/dist/hooks/useListUrlState.d.ts +0 -30
- package/dist/index.d.ts +0 -108
- package/dist/lib/keyboard.d.ts +0 -14
- package/dist/lib/utils.d.ts +0 -6
- package/dist/platform/useColorScheme.d.ts +0 -5
- package/dist/platform/useColorScheme.mobile.d.ts +0 -5
- package/dist/platform/useColorScheme.mobile.js +0 -20
- package/dist/platform/useReducedMotion.d.ts +0 -4
- package/dist/platform/useReducedMotion.mobile.d.ts +0 -4
- package/dist/platform/useReducedMotion.mobile.js +0 -28
- package/dist/platform/useResponsive.d.ts +0 -23
- package/dist/platform/useResponsive.mobile.d.ts +0 -23
- package/dist/platform/useResponsive.mobile.js +0 -42
- package/dist/platform/withPlatformUI.d.ts +0 -28
- package/dist/renderers/form-contract.d.ts +0 -11
- package/dist/renderers/index.d.ts +0 -2
- package/dist/renderers/index.js +0 -3
- package/dist/theme/tokenBridge.d.ts +0 -19
- package/dist/theme/tokens.d.ts +0 -50
- package/dist/theme/variants.d.ts +0 -21
- package/dist/types/nativewind-env.d.ts +0 -1
- package/dist/types/navigation.d.ts +0 -44
- package/dist/types/navigation.js +0 -1
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { __commonJSMin, __require } from "../../../../_virtual/rolldown_runtime.js";
|
|
4
|
+
import { require__interop_require_wildcard } from "../../../@swc/helpers/cjs/_interop_require_wildcard.js";
|
|
5
|
+
import { require_format_url } from "../shared/lib/router/utils/format-url.js";
|
|
6
|
+
import { require_utils } from "../shared/lib/utils.js";
|
|
7
|
+
import { require_is_local_url } from "../shared/lib/router/utils/is-local-url.js";
|
|
8
|
+
import { require_resolve_href } from "./resolve-href.js";
|
|
9
|
+
import { require_add_locale } from "./add-locale.js";
|
|
10
|
+
import { require_router_context_shared_runtime } from "../shared/lib/router-context.shared-runtime.js";
|
|
11
|
+
import { require_use_intersection } from "./use-intersection.js";
|
|
12
|
+
import { require_get_domain_locale } from "./get-domain-locale.js";
|
|
13
|
+
import { require_add_base_path } from "./add-base-path.js";
|
|
14
|
+
import { require_use_merged_ref } from "./use-merged-ref.js";
|
|
15
|
+
import { require_error_once } from "../shared/lib/utils/error-once.js";
|
|
16
|
+
|
|
17
|
+
//#region ../../../node_modules/next/dist/client/link.js
|
|
18
|
+
var require_link = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
function _export(target, all) {
|
|
21
|
+
for (var name in all) Object.defineProperty(target, name, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: all[name]
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
_export(exports, {
|
|
27
|
+
default: function() {
|
|
28
|
+
return _default;
|
|
29
|
+
},
|
|
30
|
+
useLinkStatus: function() {
|
|
31
|
+
return useLinkStatus;
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
const _interop_require_wildcard = require__interop_require_wildcard();
|
|
35
|
+
const _jsxruntime = __require("react/jsx-runtime");
|
|
36
|
+
const _react = /* @__PURE__ */ _interop_require_wildcard._(__require("react"));
|
|
37
|
+
const _resolvehref = require_resolve_href();
|
|
38
|
+
const _islocalurl = require_is_local_url();
|
|
39
|
+
const _formaturl = require_format_url();
|
|
40
|
+
const _utils = require_utils();
|
|
41
|
+
const _addlocale = require_add_locale();
|
|
42
|
+
const _routercontextsharedruntime = require_router_context_shared_runtime();
|
|
43
|
+
const _useintersection = require_use_intersection();
|
|
44
|
+
const _getdomainlocale = require_get_domain_locale();
|
|
45
|
+
const _addbasepath = require_add_base_path();
|
|
46
|
+
const _usemergedref = require_use_merged_ref();
|
|
47
|
+
const _erroronce = require_error_once();
|
|
48
|
+
const prefetched = /* @__PURE__ */ new Set();
|
|
49
|
+
function prefetch(router, href, as, options) {
|
|
50
|
+
if (typeof window === "undefined") return;
|
|
51
|
+
if (!(0, _islocalurl.isLocalURL)(href)) return;
|
|
52
|
+
if (!options.bypassPrefetchedCheck) {
|
|
53
|
+
const locale = typeof options.locale !== "undefined" ? options.locale : "locale" in router ? router.locale : void 0;
|
|
54
|
+
const prefetchedKey = href + "%" + as + "%" + locale;
|
|
55
|
+
if (prefetched.has(prefetchedKey)) return;
|
|
56
|
+
prefetched.add(prefetchedKey);
|
|
57
|
+
}
|
|
58
|
+
router.prefetch(href, as, options).catch((err) => {
|
|
59
|
+
throw err;
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
function isModifiedEvent(event) {
|
|
63
|
+
const target = event.currentTarget.getAttribute("target");
|
|
64
|
+
return target && target !== "_self" || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey || event.nativeEvent && event.nativeEvent.which === 2;
|
|
65
|
+
}
|
|
66
|
+
function linkClicked(e, router, href, as, replace, shallow, scroll, locale, onNavigate) {
|
|
67
|
+
const { nodeName } = e.currentTarget;
|
|
68
|
+
if (nodeName.toUpperCase() === "A" && isModifiedEvent(e) || e.currentTarget.hasAttribute("download")) return;
|
|
69
|
+
if (!(0, _islocalurl.isLocalURL)(href)) {
|
|
70
|
+
if (replace) {
|
|
71
|
+
e.preventDefault();
|
|
72
|
+
location.replace(href);
|
|
73
|
+
}
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
e.preventDefault();
|
|
77
|
+
const navigate = () => {
|
|
78
|
+
if (onNavigate) {
|
|
79
|
+
let isDefaultPrevented = false;
|
|
80
|
+
onNavigate({ preventDefault: () => {
|
|
81
|
+
isDefaultPrevented = true;
|
|
82
|
+
} });
|
|
83
|
+
if (isDefaultPrevented) return;
|
|
84
|
+
}
|
|
85
|
+
const routerScroll = scroll ?? true;
|
|
86
|
+
if ("beforePopState" in router) router[replace ? "replace" : "push"](href, as, {
|
|
87
|
+
shallow,
|
|
88
|
+
locale,
|
|
89
|
+
scroll: routerScroll
|
|
90
|
+
});
|
|
91
|
+
else router[replace ? "replace" : "push"](as || href, { scroll: routerScroll });
|
|
92
|
+
};
|
|
93
|
+
navigate();
|
|
94
|
+
}
|
|
95
|
+
function formatStringOrUrl(urlObjOrString) {
|
|
96
|
+
if (typeof urlObjOrString === "string") return urlObjOrString;
|
|
97
|
+
return (0, _formaturl.formatUrl)(urlObjOrString);
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* A React component that extends the HTML `<a>` element to provide [prefetching](https://nextjs.org/docs/app/building-your-application/routing/linking-and-navigating#2-prefetching)
|
|
101
|
+
* and client-side navigation between routes.
|
|
102
|
+
*
|
|
103
|
+
* It is the primary way to navigate between routes in Next.js.
|
|
104
|
+
*
|
|
105
|
+
* Read more: [Next.js docs: `<Link>`](https://nextjs.org/docs/app/api-reference/components/link)
|
|
106
|
+
*/ const Link = /* @__PURE__ */ _react.default.forwardRef(function LinkComponent(props, forwardedRef) {
|
|
107
|
+
let children;
|
|
108
|
+
const { href: hrefProp, as: asProp, children: childrenProp, prefetch: prefetchProp = null, passHref, replace, shallow, scroll, locale, onClick, onNavigate, onMouseEnter: onMouseEnterProp, onTouchStart: onTouchStartProp, legacyBehavior = false, ...restProps } = props;
|
|
109
|
+
children = childrenProp;
|
|
110
|
+
if (legacyBehavior && (typeof children === "string" || typeof children === "number")) children = /* @__PURE__ */ (0, _jsxruntime.jsx)("a", { children });
|
|
111
|
+
const router = _react.default.useContext(_routercontextsharedruntime.RouterContext);
|
|
112
|
+
const prefetchEnabled = prefetchProp !== false;
|
|
113
|
+
{
|
|
114
|
+
function createPropError(args) {
|
|
115
|
+
return Object.defineProperty(/* @__PURE__ */ new Error(`Failed prop type: The prop \`${args.key}\` expects a ${args.expected} in \`<Link>\`, but got \`${args.actual}\` instead.` + (typeof window !== "undefined" ? "\nOpen your browser's console to view the Component stack trace." : "")), "__NEXT_ERROR_CODE", {
|
|
116
|
+
value: "E319",
|
|
117
|
+
enumerable: false,
|
|
118
|
+
configurable: true
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
Object.keys({ href: true }).forEach((key) => {
|
|
122
|
+
if (key === "href") {
|
|
123
|
+
if (props[key] == null || typeof props[key] !== "string" && typeof props[key] !== "object") throw createPropError({
|
|
124
|
+
key,
|
|
125
|
+
expected: "`string` or `object`",
|
|
126
|
+
actual: props[key] === null ? "null" : typeof props[key]
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
Object.keys({
|
|
131
|
+
as: true,
|
|
132
|
+
replace: true,
|
|
133
|
+
scroll: true,
|
|
134
|
+
shallow: true,
|
|
135
|
+
passHref: true,
|
|
136
|
+
prefetch: true,
|
|
137
|
+
locale: true,
|
|
138
|
+
onClick: true,
|
|
139
|
+
onMouseEnter: true,
|
|
140
|
+
onTouchStart: true,
|
|
141
|
+
legacyBehavior: true,
|
|
142
|
+
onNavigate: true
|
|
143
|
+
}).forEach((key) => {
|
|
144
|
+
const valType = typeof props[key];
|
|
145
|
+
if (key === "as") {
|
|
146
|
+
if (props[key] && valType !== "string" && valType !== "object") throw createPropError({
|
|
147
|
+
key,
|
|
148
|
+
expected: "`string` or `object`",
|
|
149
|
+
actual: valType
|
|
150
|
+
});
|
|
151
|
+
} else if (key === "locale") {
|
|
152
|
+
if (props[key] && valType !== "string") throw createPropError({
|
|
153
|
+
key,
|
|
154
|
+
expected: "`string`",
|
|
155
|
+
actual: valType
|
|
156
|
+
});
|
|
157
|
+
} else if (key === "onClick" || key === "onMouseEnter" || key === "onTouchStart" || key === "onNavigate") {
|
|
158
|
+
if (props[key] && valType !== "function") throw createPropError({
|
|
159
|
+
key,
|
|
160
|
+
expected: "`function`",
|
|
161
|
+
actual: valType
|
|
162
|
+
});
|
|
163
|
+
} else if (key === "replace" || key === "scroll" || key === "shallow" || key === "passHref" || key === "legacyBehavior") {
|
|
164
|
+
if (props[key] != null && valType !== "boolean") throw createPropError({
|
|
165
|
+
key,
|
|
166
|
+
expected: "`boolean`",
|
|
167
|
+
actual: valType
|
|
168
|
+
});
|
|
169
|
+
} else if (key === "prefetch") {
|
|
170
|
+
if (props[key] != null && valType !== "boolean" && props[key] !== "auto") throw createPropError({
|
|
171
|
+
key,
|
|
172
|
+
expected: "`boolean | \"auto\"`",
|
|
173
|
+
actual: valType
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
const { href, as } = _react.default.useMemo(() => {
|
|
179
|
+
if (!router) {
|
|
180
|
+
const resolvedHref$1 = formatStringOrUrl(hrefProp);
|
|
181
|
+
return {
|
|
182
|
+
href: resolvedHref$1,
|
|
183
|
+
as: asProp ? formatStringOrUrl(asProp) : resolvedHref$1
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
const [resolvedHref, resolvedAs] = (0, _resolvehref.resolveHref)(router, hrefProp, true);
|
|
187
|
+
return {
|
|
188
|
+
href: resolvedHref,
|
|
189
|
+
as: asProp ? (0, _resolvehref.resolveHref)(router, asProp) : resolvedAs || resolvedHref
|
|
190
|
+
};
|
|
191
|
+
}, [
|
|
192
|
+
router,
|
|
193
|
+
hrefProp,
|
|
194
|
+
asProp
|
|
195
|
+
]);
|
|
196
|
+
const previousHref = _react.default.useRef(href);
|
|
197
|
+
const previousAs = _react.default.useRef(as);
|
|
198
|
+
let child;
|
|
199
|
+
if (legacyBehavior) {
|
|
200
|
+
if (onClick) console.warn(`"onClick" was passed to <Link> with \`href\` of \`${hrefProp}\` but "legacyBehavior" was set. The legacy behavior requires onClick be set on the child of next/link`);
|
|
201
|
+
if (onMouseEnterProp) console.warn(`"onMouseEnter" was passed to <Link> with \`href\` of \`${hrefProp}\` but "legacyBehavior" was set. The legacy behavior requires onMouseEnter be set on the child of next/link`);
|
|
202
|
+
try {
|
|
203
|
+
child = _react.default.Children.only(children);
|
|
204
|
+
} catch (err) {
|
|
205
|
+
if (!children) throw Object.defineProperty(/* @__PURE__ */ new Error(`No children were passed to <Link> with \`href\` of \`${hrefProp}\` but one child is required https://nextjs.org/docs/messages/link-no-children`), "__NEXT_ERROR_CODE", {
|
|
206
|
+
value: "E320",
|
|
207
|
+
enumerable: false,
|
|
208
|
+
configurable: true
|
|
209
|
+
});
|
|
210
|
+
throw Object.defineProperty(/* @__PURE__ */ new Error(`Multiple children were passed to <Link> with \`href\` of \`${hrefProp}\` but only one child is supported https://nextjs.org/docs/messages/link-multiple-children` + (typeof window !== "undefined" ? " \nOpen your browser's console to view the Component stack trace." : "")), "__NEXT_ERROR_CODE", {
|
|
211
|
+
value: "E266",
|
|
212
|
+
enumerable: false,
|
|
213
|
+
configurable: true
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
} else if (children?.type === "a") throw Object.defineProperty(/* @__PURE__ */ new Error("Invalid <Link> with <a> child. Please remove <a> or use <Link legacyBehavior>.\nLearn more: https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor"), "__NEXT_ERROR_CODE", {
|
|
217
|
+
value: "E209",
|
|
218
|
+
enumerable: false,
|
|
219
|
+
configurable: true
|
|
220
|
+
});
|
|
221
|
+
const childRef = legacyBehavior ? child && typeof child === "object" && child.ref : forwardedRef;
|
|
222
|
+
const [setIntersectionRef, isVisible, resetVisible] = (0, _useintersection.useIntersection)({ rootMargin: "200px" });
|
|
223
|
+
const setIntersectionWithResetRef = _react.default.useCallback((el) => {
|
|
224
|
+
if (previousAs.current !== as || previousHref.current !== href) {
|
|
225
|
+
resetVisible();
|
|
226
|
+
previousAs.current = as;
|
|
227
|
+
previousHref.current = href;
|
|
228
|
+
}
|
|
229
|
+
setIntersectionRef(el);
|
|
230
|
+
}, [
|
|
231
|
+
as,
|
|
232
|
+
href,
|
|
233
|
+
resetVisible,
|
|
234
|
+
setIntersectionRef
|
|
235
|
+
]);
|
|
236
|
+
const setRef = (0, _usemergedref.useMergedRef)(setIntersectionWithResetRef, childRef);
|
|
237
|
+
_react.default.useEffect(() => {}, [
|
|
238
|
+
as,
|
|
239
|
+
href,
|
|
240
|
+
isVisible,
|
|
241
|
+
locale,
|
|
242
|
+
prefetchEnabled,
|
|
243
|
+
router?.locale,
|
|
244
|
+
router
|
|
245
|
+
]);
|
|
246
|
+
const childProps = {
|
|
247
|
+
ref: setRef,
|
|
248
|
+
onClick(e) {
|
|
249
|
+
if (!e) throw Object.defineProperty(/* @__PURE__ */ new Error(`Component rendered inside next/link has to pass click event to "onClick" prop.`), "__NEXT_ERROR_CODE", {
|
|
250
|
+
value: "E312",
|
|
251
|
+
enumerable: false,
|
|
252
|
+
configurable: true
|
|
253
|
+
});
|
|
254
|
+
if (!legacyBehavior && typeof onClick === "function") onClick(e);
|
|
255
|
+
if (legacyBehavior && child.props && typeof child.props.onClick === "function") child.props.onClick(e);
|
|
256
|
+
if (!router) return;
|
|
257
|
+
if (e.defaultPrevented) return;
|
|
258
|
+
linkClicked(e, router, href, as, replace, shallow, scroll, locale, onNavigate);
|
|
259
|
+
},
|
|
260
|
+
onMouseEnter(e) {
|
|
261
|
+
if (!legacyBehavior && typeof onMouseEnterProp === "function") onMouseEnterProp(e);
|
|
262
|
+
if (legacyBehavior && child.props && typeof child.props.onMouseEnter === "function") child.props.onMouseEnter(e);
|
|
263
|
+
if (!router) return;
|
|
264
|
+
prefetch(router, href, as, {
|
|
265
|
+
locale,
|
|
266
|
+
priority: true,
|
|
267
|
+
bypassPrefetchedCheck: true
|
|
268
|
+
});
|
|
269
|
+
},
|
|
270
|
+
onTouchStart: process.env.__NEXT_LINK_NO_TOUCH_START ? void 0 : function onTouchStart(e) {
|
|
271
|
+
if (!legacyBehavior && typeof onTouchStartProp === "function") onTouchStartProp(e);
|
|
272
|
+
if (legacyBehavior && child.props && typeof child.props.onTouchStart === "function") child.props.onTouchStart(e);
|
|
273
|
+
if (!router) return;
|
|
274
|
+
prefetch(router, href, as, {
|
|
275
|
+
locale,
|
|
276
|
+
priority: true,
|
|
277
|
+
bypassPrefetchedCheck: true
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
};
|
|
281
|
+
if ((0, _utils.isAbsoluteUrl)(as)) childProps.href = as;
|
|
282
|
+
else if (!legacyBehavior || passHref || child.type === "a" && !("href" in child.props)) {
|
|
283
|
+
const curLocale = typeof locale !== "undefined" ? locale : router?.locale;
|
|
284
|
+
childProps.href = router?.isLocaleDomain && (0, _getdomainlocale.getDomainLocale)(as, curLocale, router?.locales, router?.domainLocales) || (0, _addbasepath.addBasePath)((0, _addlocale.addLocale)(as, curLocale, router?.defaultLocale));
|
|
285
|
+
}
|
|
286
|
+
if (legacyBehavior) {
|
|
287
|
+
(0, _erroronce.errorOnce)("`legacyBehavior` is deprecated and will be removed in a future release. A codemod is available to upgrade your components:\n\nnpx @next/codemod@latest new-link .\n\nLearn more: https://nextjs.org/docs/app/building-your-application/upgrading/codemods#remove-a-tags-from-link-components");
|
|
288
|
+
return /* @__PURE__ */ _react.default.cloneElement(child, childProps);
|
|
289
|
+
}
|
|
290
|
+
return /* @__PURE__ */ (0, _jsxruntime.jsx)("a", {
|
|
291
|
+
...restProps,
|
|
292
|
+
...childProps,
|
|
293
|
+
children
|
|
294
|
+
});
|
|
295
|
+
});
|
|
296
|
+
const LinkStatusContext = /* @__PURE__ */ (0, _react.createContext)({ pending: false });
|
|
297
|
+
const useLinkStatus = () => {
|
|
298
|
+
return (0, _react.useContext)(LinkStatusContext);
|
|
299
|
+
};
|
|
300
|
+
const _default = Link;
|
|
301
|
+
if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
|
|
302
|
+
Object.defineProperty(exports.default, "__esModule", { value: true });
|
|
303
|
+
Object.assign(exports.default, exports);
|
|
304
|
+
module.exports = exports.default;
|
|
305
|
+
}
|
|
306
|
+
}));
|
|
307
|
+
|
|
308
|
+
//#endregion
|
|
309
|
+
export default require_link();
|
|
310
|
+
|
|
311
|
+
export { require_link };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { __commonJSMin } from "../../../../_virtual/rolldown_runtime.js";
|
|
2
|
+
import { require_normalize_locale_path as require_normalize_locale_path$1 } from "../shared/lib/i18n/normalize-locale-path.js";
|
|
3
|
+
|
|
4
|
+
//#region ../../../node_modules/next/dist/client/normalize-locale-path.js
|
|
5
|
+
var require_normalize_locale_path = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
Object.defineProperty(exports, "normalizeLocalePath", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function() {
|
|
10
|
+
return normalizeLocalePath;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
const normalizeLocalePath = (pathname, locales) => {
|
|
14
|
+
if (process.env.__NEXT_I18N_SUPPORT) return require_normalize_locale_path$1().normalizeLocalePath(pathname, locales);
|
|
15
|
+
return {
|
|
16
|
+
pathname,
|
|
17
|
+
detectedLocale: void 0
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
|
|
21
|
+
Object.defineProperty(exports.default, "__esModule", { value: true });
|
|
22
|
+
Object.assign(exports.default, exports);
|
|
23
|
+
module.exports = exports.default;
|
|
24
|
+
}
|
|
25
|
+
}));
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
export default require_normalize_locale_path();
|
|
29
|
+
|
|
30
|
+
export { require_normalize_locale_path };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { __commonJSMin } from "../../../../_virtual/rolldown_runtime.js";
|
|
2
|
+
import { require_remove_trailing_slash } from "../shared/lib/router/utils/remove-trailing-slash.js";
|
|
3
|
+
import { require_parse_path } from "../shared/lib/router/utils/parse-path.js";
|
|
4
|
+
|
|
5
|
+
//#region ../../../node_modules/next/dist/client/normalize-trailing-slash.js
|
|
6
|
+
var require_normalize_trailing_slash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
Object.defineProperty(exports, "normalizePathTrailingSlash", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function() {
|
|
11
|
+
return normalizePathTrailingSlash;
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
const _removetrailingslash = require_remove_trailing_slash();
|
|
15
|
+
const _parsepath = require_parse_path();
|
|
16
|
+
const normalizePathTrailingSlash = (path) => {
|
|
17
|
+
if (!path.startsWith("/") || process.env.__NEXT_MANUAL_TRAILING_SLASH) return path;
|
|
18
|
+
const { pathname, query, hash } = (0, _parsepath.parsePath)(path);
|
|
19
|
+
if (process.env.__NEXT_TRAILING_SLASH) if (/\.[^/]+\/?$/.test(pathname)) return `${(0, _removetrailingslash.removeTrailingSlash)(pathname)}${query}${hash}`;
|
|
20
|
+
else if (pathname.endsWith("/")) return `${pathname}${query}${hash}`;
|
|
21
|
+
else return `${pathname}/${query}${hash}`;
|
|
22
|
+
return `${(0, _removetrailingslash.removeTrailingSlash)(pathname)}${query}${hash}`;
|
|
23
|
+
};
|
|
24
|
+
if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
|
|
25
|
+
Object.defineProperty(exports.default, "__esModule", { value: true });
|
|
26
|
+
Object.assign(exports.default, exports);
|
|
27
|
+
module.exports = exports.default;
|
|
28
|
+
}
|
|
29
|
+
}));
|
|
30
|
+
|
|
31
|
+
//#endregion
|
|
32
|
+
export default require_normalize_trailing_slash();
|
|
33
|
+
|
|
34
|
+
export { require_normalize_trailing_slash };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { __commonJSMin } from "../../../../_virtual/rolldown_runtime.js";
|
|
2
|
+
|
|
3
|
+
//#region ../../../node_modules/next/dist/client/request-idle-callback.js
|
|
4
|
+
var require_request_idle_callback = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
function _export(target, all) {
|
|
7
|
+
for (var name in all) Object.defineProperty(target, name, {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: all[name]
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
_export(exports, {
|
|
13
|
+
cancelIdleCallback: function() {
|
|
14
|
+
return cancelIdleCallback;
|
|
15
|
+
},
|
|
16
|
+
requestIdleCallback: function() {
|
|
17
|
+
return requestIdleCallback;
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
const requestIdleCallback = typeof self !== "undefined" && self.requestIdleCallback && self.requestIdleCallback.bind(window) || function(cb) {
|
|
21
|
+
let start = Date.now();
|
|
22
|
+
return self.setTimeout(function() {
|
|
23
|
+
cb({
|
|
24
|
+
didTimeout: false,
|
|
25
|
+
timeRemaining: function() {
|
|
26
|
+
return Math.max(0, 50 - (Date.now() - start));
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
}, 1);
|
|
30
|
+
};
|
|
31
|
+
const cancelIdleCallback = typeof self !== "undefined" && self.cancelIdleCallback && self.cancelIdleCallback.bind(window) || function(id) {
|
|
32
|
+
return clearTimeout(id);
|
|
33
|
+
};
|
|
34
|
+
if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
|
|
35
|
+
Object.defineProperty(exports.default, "__esModule", { value: true });
|
|
36
|
+
Object.assign(exports.default, exports);
|
|
37
|
+
module.exports = exports.default;
|
|
38
|
+
}
|
|
39
|
+
}));
|
|
40
|
+
|
|
41
|
+
//#endregion
|
|
42
|
+
export default require_request_idle_callback();
|
|
43
|
+
|
|
44
|
+
export { require_request_idle_callback };
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { __commonJSMin } from "../../../../_virtual/rolldown_runtime.js";
|
|
2
|
+
import { require_querystring } from "../shared/lib/router/utils/querystring.js";
|
|
3
|
+
import { require_format_url } from "../shared/lib/router/utils/format-url.js";
|
|
4
|
+
import { require_omit } from "../shared/lib/router/utils/omit.js";
|
|
5
|
+
import { require_utils } from "../shared/lib/utils.js";
|
|
6
|
+
import { require_normalize_trailing_slash } from "./normalize-trailing-slash.js";
|
|
7
|
+
import { require_is_local_url } from "../shared/lib/router/utils/is-local-url.js";
|
|
8
|
+
import { require_utils as require_utils$1 } from "../shared/lib/router/utils/index.js";
|
|
9
|
+
import { require_route_matcher } from "../shared/lib/router/utils/route-matcher.js";
|
|
10
|
+
import { require_route_regex } from "../shared/lib/router/utils/route-regex.js";
|
|
11
|
+
import { require_interpolate_as } from "../shared/lib/router/utils/interpolate-as.js";
|
|
12
|
+
|
|
13
|
+
//#region ../../../node_modules/next/dist/client/resolve-href.js
|
|
14
|
+
var require_resolve_href = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
Object.defineProperty(exports, "resolveHref", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function() {
|
|
19
|
+
return resolveHref;
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
const _querystring = require_querystring();
|
|
23
|
+
const _formaturl = require_format_url();
|
|
24
|
+
const _omit = require_omit();
|
|
25
|
+
const _utils = require_utils();
|
|
26
|
+
const _normalizetrailingslash = require_normalize_trailing_slash();
|
|
27
|
+
const _islocalurl = require_is_local_url();
|
|
28
|
+
const _utils1 = require_utils$1();
|
|
29
|
+
const _interpolateas = require_interpolate_as();
|
|
30
|
+
const _routeregex = require_route_regex();
|
|
31
|
+
const _routematcher = require_route_matcher();
|
|
32
|
+
function resolveHref(router, href, resolveAs) {
|
|
33
|
+
let base;
|
|
34
|
+
let urlAsString = typeof href === "string" ? href : (0, _formaturl.formatWithValidation)(href);
|
|
35
|
+
const urlProtoMatch = urlAsString.match(/^[a-z][a-z0-9+.-]*:\/\//i);
|
|
36
|
+
const urlAsStringNoProto = urlProtoMatch ? urlAsString.slice(urlProtoMatch[0].length) : urlAsString;
|
|
37
|
+
if ((urlAsStringNoProto.split("?", 1)[0] || "").match(/(\/\/|\\)/)) {
|
|
38
|
+
console.error(`Invalid href '${urlAsString}' passed to next/router in page: '${router.pathname}'. Repeated forward-slashes (//) or backslashes \\ are not valid in the href.`);
|
|
39
|
+
const normalizedUrl = (0, _utils.normalizeRepeatedSlashes)(urlAsStringNoProto);
|
|
40
|
+
urlAsString = (urlProtoMatch ? urlProtoMatch[0] : "") + normalizedUrl;
|
|
41
|
+
}
|
|
42
|
+
if (!(0, _islocalurl.isLocalURL)(urlAsString)) return resolveAs ? [urlAsString] : urlAsString;
|
|
43
|
+
try {
|
|
44
|
+
let baseBase = urlAsString.startsWith("#") ? router.asPath : router.pathname;
|
|
45
|
+
if (urlAsString.startsWith("?")) {
|
|
46
|
+
baseBase = router.asPath;
|
|
47
|
+
if ((0, _utils1.isDynamicRoute)(router.pathname)) {
|
|
48
|
+
baseBase = router.pathname;
|
|
49
|
+
const routeRegex = (0, _routeregex.getRouteRegex)(router.pathname);
|
|
50
|
+
if (!(0, _routematcher.getRouteMatcher)(routeRegex)(router.asPath)) baseBase = router.asPath;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
base = new URL(baseBase, "http://n");
|
|
54
|
+
} catch (_) {
|
|
55
|
+
base = new URL("/", "http://n");
|
|
56
|
+
}
|
|
57
|
+
try {
|
|
58
|
+
const finalUrl = new URL(urlAsString, base);
|
|
59
|
+
finalUrl.pathname = (0, _normalizetrailingslash.normalizePathTrailingSlash)(finalUrl.pathname);
|
|
60
|
+
let interpolatedAs = "";
|
|
61
|
+
if ((0, _utils1.isDynamicRoute)(finalUrl.pathname) && finalUrl.searchParams && resolveAs) {
|
|
62
|
+
const query = (0, _querystring.searchParamsToUrlQuery)(finalUrl.searchParams);
|
|
63
|
+
const { result, params } = (0, _interpolateas.interpolateAs)(finalUrl.pathname, finalUrl.pathname, query);
|
|
64
|
+
if (result) interpolatedAs = (0, _formaturl.formatWithValidation)({
|
|
65
|
+
pathname: result,
|
|
66
|
+
hash: finalUrl.hash,
|
|
67
|
+
query: (0, _omit.omit)(query, params)
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
const resolvedHref = finalUrl.origin === base.origin ? finalUrl.href.slice(finalUrl.origin.length) : finalUrl.href;
|
|
71
|
+
return resolveAs ? [resolvedHref, interpolatedAs || resolvedHref] : resolvedHref;
|
|
72
|
+
} catch (_) {
|
|
73
|
+
return resolveAs ? [urlAsString] : urlAsString;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
|
|
77
|
+
Object.defineProperty(exports.default, "__esModule", { value: true });
|
|
78
|
+
Object.assign(exports.default, exports);
|
|
79
|
+
module.exports = exports.default;
|
|
80
|
+
}
|
|
81
|
+
}));
|
|
82
|
+
|
|
83
|
+
//#endregion
|
|
84
|
+
export default require_resolve_href();
|
|
85
|
+
|
|
86
|
+
export { require_resolve_href };
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { __commonJSMin, __require } from "../../../../_virtual/rolldown_runtime.js";
|
|
2
|
+
import { require_request_idle_callback } from "./request-idle-callback.js";
|
|
3
|
+
|
|
4
|
+
//#region ../../../node_modules/next/dist/client/use-intersection.js
|
|
5
|
+
var require_use_intersection = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
Object.defineProperty(exports, "useIntersection", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function() {
|
|
10
|
+
return useIntersection;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
const _react = __require("react");
|
|
14
|
+
const _requestidlecallback = require_request_idle_callback();
|
|
15
|
+
const hasIntersectionObserver = typeof IntersectionObserver === "function";
|
|
16
|
+
const observers = /* @__PURE__ */ new Map();
|
|
17
|
+
const idList = [];
|
|
18
|
+
function createObserver(options) {
|
|
19
|
+
const id = {
|
|
20
|
+
root: options.root || null,
|
|
21
|
+
margin: options.rootMargin || ""
|
|
22
|
+
};
|
|
23
|
+
const existing = idList.find((obj) => obj.root === id.root && obj.margin === id.margin);
|
|
24
|
+
let instance;
|
|
25
|
+
if (existing) {
|
|
26
|
+
instance = observers.get(existing);
|
|
27
|
+
if (instance) return instance;
|
|
28
|
+
}
|
|
29
|
+
const elements = /* @__PURE__ */ new Map();
|
|
30
|
+
instance = {
|
|
31
|
+
id,
|
|
32
|
+
observer: new IntersectionObserver((entries) => {
|
|
33
|
+
entries.forEach((entry) => {
|
|
34
|
+
const callback = elements.get(entry.target);
|
|
35
|
+
const isVisible = entry.isIntersecting || entry.intersectionRatio > 0;
|
|
36
|
+
if (callback && isVisible) callback(isVisible);
|
|
37
|
+
});
|
|
38
|
+
}, options),
|
|
39
|
+
elements
|
|
40
|
+
};
|
|
41
|
+
idList.push(id);
|
|
42
|
+
observers.set(id, instance);
|
|
43
|
+
return instance;
|
|
44
|
+
}
|
|
45
|
+
function observe(element, callback, options) {
|
|
46
|
+
const { id, observer, elements } = createObserver(options);
|
|
47
|
+
elements.set(element, callback);
|
|
48
|
+
observer.observe(element);
|
|
49
|
+
return function unobserve() {
|
|
50
|
+
elements.delete(element);
|
|
51
|
+
observer.unobserve(element);
|
|
52
|
+
if (elements.size === 0) {
|
|
53
|
+
observer.disconnect();
|
|
54
|
+
observers.delete(id);
|
|
55
|
+
const index = idList.findIndex((obj) => obj.root === id.root && obj.margin === id.margin);
|
|
56
|
+
if (index > -1) idList.splice(index, 1);
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
function useIntersection({ rootRef, rootMargin, disabled }) {
|
|
61
|
+
const isDisabled = disabled || !hasIntersectionObserver;
|
|
62
|
+
const [visible, setVisible] = (0, _react.useState)(false);
|
|
63
|
+
const elementRef = (0, _react.useRef)(null);
|
|
64
|
+
const setElement = (0, _react.useCallback)((element) => {
|
|
65
|
+
elementRef.current = element;
|
|
66
|
+
}, []);
|
|
67
|
+
(0, _react.useEffect)(() => {
|
|
68
|
+
if (hasIntersectionObserver) {
|
|
69
|
+
if (isDisabled || visible) return;
|
|
70
|
+
const element = elementRef.current;
|
|
71
|
+
if (element && element.tagName) return observe(element, (isVisible) => isVisible && setVisible(isVisible), {
|
|
72
|
+
root: rootRef?.current,
|
|
73
|
+
rootMargin
|
|
74
|
+
});
|
|
75
|
+
} else if (!visible) {
|
|
76
|
+
const idleCallback = (0, _requestidlecallback.requestIdleCallback)(() => setVisible(true));
|
|
77
|
+
return () => (0, _requestidlecallback.cancelIdleCallback)(idleCallback);
|
|
78
|
+
}
|
|
79
|
+
}, [
|
|
80
|
+
isDisabled,
|
|
81
|
+
rootMargin,
|
|
82
|
+
rootRef,
|
|
83
|
+
visible,
|
|
84
|
+
elementRef.current
|
|
85
|
+
]);
|
|
86
|
+
return [
|
|
87
|
+
setElement,
|
|
88
|
+
visible,
|
|
89
|
+
(0, _react.useCallback)(() => {
|
|
90
|
+
setVisible(false);
|
|
91
|
+
}, [])
|
|
92
|
+
];
|
|
93
|
+
}
|
|
94
|
+
if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
|
|
95
|
+
Object.defineProperty(exports.default, "__esModule", { value: true });
|
|
96
|
+
Object.assign(exports.default, exports);
|
|
97
|
+
module.exports = exports.default;
|
|
98
|
+
}
|
|
99
|
+
}));
|
|
100
|
+
|
|
101
|
+
//#endregion
|
|
102
|
+
export default require_use_intersection();
|
|
103
|
+
|
|
104
|
+
export { require_use_intersection };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { __commonJSMin, __require } from "../../../../_virtual/rolldown_runtime.js";
|
|
2
|
+
|
|
3
|
+
//#region ../../../node_modules/next/dist/client/use-merged-ref.js
|
|
4
|
+
var require_use_merged_ref = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
Object.defineProperty(exports, "useMergedRef", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function() {
|
|
9
|
+
return useMergedRef;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
const _react = __require("react");
|
|
13
|
+
function useMergedRef(refA, refB) {
|
|
14
|
+
const cleanupA = (0, _react.useRef)(null);
|
|
15
|
+
const cleanupB = (0, _react.useRef)(null);
|
|
16
|
+
return (0, _react.useCallback)((current) => {
|
|
17
|
+
if (current === null) {
|
|
18
|
+
const cleanupFnA = cleanupA.current;
|
|
19
|
+
if (cleanupFnA) {
|
|
20
|
+
cleanupA.current = null;
|
|
21
|
+
cleanupFnA();
|
|
22
|
+
}
|
|
23
|
+
const cleanupFnB = cleanupB.current;
|
|
24
|
+
if (cleanupFnB) {
|
|
25
|
+
cleanupB.current = null;
|
|
26
|
+
cleanupFnB();
|
|
27
|
+
}
|
|
28
|
+
} else {
|
|
29
|
+
if (refA) cleanupA.current = applyRef(refA, current);
|
|
30
|
+
if (refB) cleanupB.current = applyRef(refB, current);
|
|
31
|
+
}
|
|
32
|
+
}, [refA, refB]);
|
|
33
|
+
}
|
|
34
|
+
function applyRef(refA, current) {
|
|
35
|
+
if (typeof refA === "function") {
|
|
36
|
+
const cleanup = refA(current);
|
|
37
|
+
if (typeof cleanup === "function") return cleanup;
|
|
38
|
+
else return () => refA(null);
|
|
39
|
+
} else {
|
|
40
|
+
refA.current = current;
|
|
41
|
+
return () => {
|
|
42
|
+
refA.current = null;
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
if ((typeof exports.default === "function" || typeof exports.default === "object" && exports.default !== null) && typeof exports.default.__esModule === "undefined") {
|
|
47
|
+
Object.defineProperty(exports.default, "__esModule", { value: true });
|
|
48
|
+
Object.assign(exports.default, exports);
|
|
49
|
+
module.exports = exports.default;
|
|
50
|
+
}
|
|
51
|
+
}));
|
|
52
|
+
|
|
53
|
+
//#endregion
|
|
54
|
+
export default require_use_merged_ref();
|
|
55
|
+
|
|
56
|
+
export { require_use_merged_ref };
|