@pathscale/ui 0.0.115 → 0.0.116

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.
@@ -0,0 +1,8 @@
1
+ import { type Component } from "solid-js";
2
+ import type { ImmersiveLandingProps } from "./types";
3
+ declare const _default: Component<ImmersiveLandingProps> & {
4
+ Page: (props: import("./types").ImmersiveLandingPageProps) => import("solid-js").JSX.Element;
5
+ Arrows: (props: import("./types").ImmersiveLandingArrowsProps) => import("solid-js").JSX.Element;
6
+ Navigation: (props: import("./types").ImmersiveLandingNavigationProps) => import("solid-js").JSX.Element;
7
+ };
8
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import { type JSX } from "solid-js";
2
+ import type { ImmersiveLandingArrowsProps } from "./types";
3
+ declare const ImmersiveLandingArrows: (props: ImmersiveLandingArrowsProps) => JSX.Element;
4
+ export default ImmersiveLandingArrows;
@@ -0,0 +1,3 @@
1
+ import type { ImmersiveLandingContextValue } from "./types";
2
+ export declare const ImmersiveLandingContext: import("solid-js").Context<ImmersiveLandingContextValue | undefined>;
3
+ export declare function useImmersiveLandingContext(): ImmersiveLandingContextValue;
@@ -0,0 +1,4 @@
1
+ import { type JSX } from "solid-js";
2
+ import type { ImmersiveLandingNavigationProps } from "./types";
3
+ declare const ImmersiveLandingNavigation: (props: ImmersiveLandingNavigationProps) => JSX.Element;
4
+ export default ImmersiveLandingNavigation;
@@ -0,0 +1,4 @@
1
+ import { type JSX } from "solid-js";
2
+ import type { ImmersiveLandingPageProps } from "./types";
3
+ declare const ImmersiveLandingPage: (props: ImmersiveLandingPageProps) => JSX.Element;
4
+ export default ImmersiveLandingPage;
@@ -0,0 +1,4 @@
1
+ export { default } from "./ImmersiveLanding";
2
+ export { useImmersiveLanding } from "./useImmersiveLanding";
3
+ export { ImmersiveLandingContext, useImmersiveLandingContext } from "./ImmersiveLandingContext";
4
+ export type { ImmersiveLandingProps, ImmersiveLandingPageProps, ImmersiveLandingArrowsProps, ImmersiveLandingNavigationProps, ImmersiveLandingContextValue, UseImmersiveLandingOptions, UseImmersiveLandingReturn, } from "./types";
@@ -0,0 +1,65 @@
1
+ import type { JSX, Accessor } from "solid-js";
2
+ import type { IComponentBaseProps } from "../types";
3
+ export interface UseImmersiveLandingOptions {
4
+ pages: readonly string[];
5
+ initialPage?: string;
6
+ transitionDuration?: number;
7
+ onNavigate?: (fromPage: string, toPage: string) => void;
8
+ onNavigationComplete?: (page: string) => void;
9
+ enableScrollNavigation?: boolean;
10
+ }
11
+ export interface UseImmersiveLandingReturn {
12
+ activePage: Accessor<string>;
13
+ isTransitioning: Accessor<boolean>;
14
+ navigateTo: (pageId: string) => void;
15
+ goNext: () => void;
16
+ goPrev: () => void;
17
+ currentIndex: Accessor<number>;
18
+ isFirstPage: Accessor<boolean>;
19
+ isLastPage: Accessor<boolean>;
20
+ direction: Accessor<"next" | "prev" | null>;
21
+ transitionDuration: number;
22
+ }
23
+ export interface ImmersiveLandingContextValue {
24
+ activePage: Accessor<string>;
25
+ navigateTo: (pageId: string) => void;
26
+ goNext: () => void;
27
+ goPrev: () => void;
28
+ currentIndex: Accessor<number>;
29
+ totalPages: number;
30
+ isFirstPage: Accessor<boolean>;
31
+ isLastPage: Accessor<boolean>;
32
+ direction: Accessor<"next" | "prev" | null>;
33
+ transitionDuration: number;
34
+ pages: readonly string[];
35
+ }
36
+ export interface ImmersiveLandingProps extends IComponentBaseProps {
37
+ pages: readonly string[];
38
+ initialPage?: string;
39
+ transitionDuration?: number;
40
+ onNavigate?: (fromPage: string, toPage: string) => void;
41
+ onNavigationComplete?: (page: string) => void;
42
+ enableScrollNavigation?: boolean;
43
+ showNavigation?: boolean;
44
+ showArrows?: boolean;
45
+ children: JSX.Element | ((context: ImmersiveLandingContextValue) => JSX.Element);
46
+ }
47
+ export interface ImmersiveLandingPageProps extends IComponentBaseProps {
48
+ id: string;
49
+ children: JSX.Element;
50
+ }
51
+ export interface ImmersiveLandingArrowsProps extends IComponentBaseProps {
52
+ onPrev: () => void;
53
+ onNext: () => void;
54
+ isFirstPage: boolean;
55
+ isLastPage: boolean;
56
+ }
57
+ export interface ImmersiveLandingNavigationProps extends IComponentBaseProps {
58
+ pages: readonly string[];
59
+ currentPageIndex: number;
60
+ onPageDotClick: (pageId: string) => void;
61
+ onPrev: () => void;
62
+ onNext: () => void;
63
+ isFirstPage: boolean;
64
+ isLastPage: boolean;
65
+ }
@@ -0,0 +1,2 @@
1
+ import type { UseImmersiveLandingOptions, UseImmersiveLandingReturn } from "./types";
2
+ export declare function useImmersiveLanding(options: UseImmersiveLandingOptions): UseImmersiveLandingReturn;
package/dist/index.d.ts CHANGED
@@ -40,6 +40,8 @@ export { default as Grid } from "./components/grid";
40
40
  export { default as Hero } from "./components/hero";
41
41
  export type { HeroContentProps, HeroOverlayProps, HeroProps, } from "./components/hero";
42
42
  export { default as Icon } from "./components/icon";
43
+ export { default as ImmersiveLanding, useImmersiveLanding, useImmersiveLandingContext, ImmersiveLandingContext, } from "./components/immersive-landing";
44
+ export type { ImmersiveLandingProps, ImmersiveLandingPageProps, ImmersiveLandingArrowsProps, ImmersiveLandingNavigationProps, ImmersiveLandingContextValue, UseImmersiveLandingOptions, UseImmersiveLandingReturn, } from "./components/immersive-landing";
43
45
  export { default as Indicator } from "./components/indicator";
44
46
  export { default as Input } from "./components/input";
45
47
  export { default as Join } from "./components/join";
package/dist/index.js CHANGED
@@ -10622,6 +10622,427 @@ const HeroNamespaces = Object.assign(Hero, {
10622
10622
  Overlay: HeroOverlay
10623
10623
  });
10624
10624
  const hero_Hero = HeroNamespaces;
10625
+ function useImmersiveLanding(options) {
10626
+ const { pages, initialPage = pages[0], transitionDuration = 400, onNavigate, onNavigationComplete, enableScrollNavigation = true } = options;
10627
+ const [activePage, setActivePage] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createSignal)(initialPage);
10628
+ const [isTransitioning, setIsTransitioning] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createSignal)(false);
10629
+ const [direction, setDirection] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createSignal)(null);
10630
+ const currentIndex = ()=>pages.indexOf(activePage());
10631
+ const isFirstPage = ()=>0 === currentIndex();
10632
+ const isLastPage = ()=>currentIndex() === pages.length - 1;
10633
+ const navigateToInternal = (pageId)=>{
10634
+ if (isTransitioning() || !pages.includes(pageId)) return;
10635
+ if (pageId === activePage()) return;
10636
+ const fromPage = activePage();
10637
+ const fromIndex = pages.indexOf(fromPage);
10638
+ const toIndex = pages.indexOf(pageId);
10639
+ setDirection(toIndex > fromIndex ? "next" : "prev");
10640
+ setIsTransitioning(true);
10641
+ setActivePage(pageId);
10642
+ if (onNavigate) onNavigate(fromPage, pageId);
10643
+ setTimeout(()=>{
10644
+ setIsTransitioning(false);
10645
+ setDirection(null);
10646
+ const pageElement = document.getElementById(pageId);
10647
+ if (pageElement) pageElement.focus({
10648
+ preventScroll: true
10649
+ });
10650
+ if (onNavigationComplete) onNavigationComplete(pageId);
10651
+ }, transitionDuration);
10652
+ };
10653
+ const navigateTo = (pageId)=>navigateToInternal(pageId);
10654
+ const goNext = ()=>{
10655
+ const idx = currentIndex();
10656
+ if (idx < pages.length - 1) navigateToInternal(pages[idx + 1]);
10657
+ };
10658
+ const goPrev = ()=>{
10659
+ const idx = currentIndex();
10660
+ if (idx > 0) navigateToInternal(pages[idx - 1]);
10661
+ };
10662
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.onMount)(()=>{
10663
+ if ("undefined" == typeof window) return;
10664
+ if (!enableScrollNavigation) return;
10665
+ let scrollLocked = false;
10666
+ const SCROLL_COOLDOWN = 1000;
10667
+ let touchStartY = 0;
10668
+ const handleWheel = (e)=>{
10669
+ if (scrollLocked || isTransitioning()) return;
10670
+ if (e.deltaY > 0) goNext();
10671
+ else if (e.deltaY < 0) goPrev();
10672
+ scrollLocked = true;
10673
+ setTimeout(()=>{
10674
+ scrollLocked = false;
10675
+ }, SCROLL_COOLDOWN);
10676
+ };
10677
+ const handleTouchStart = (e)=>{
10678
+ touchStartY = e.touches[0].clientY;
10679
+ };
10680
+ const handleTouchEnd = (e)=>{
10681
+ if (scrollLocked || isTransitioning()) return;
10682
+ const touchEndY = e.changedTouches[0].clientY;
10683
+ const deltaY = touchStartY - touchEndY;
10684
+ if (Math.abs(deltaY) < 50) return;
10685
+ if (deltaY > 0) goNext();
10686
+ else goPrev();
10687
+ scrollLocked = true;
10688
+ setTimeout(()=>{
10689
+ scrollLocked = false;
10690
+ }, SCROLL_COOLDOWN);
10691
+ };
10692
+ const handleKeyDown = (e)=>{
10693
+ if (isTransitioning()) return;
10694
+ const target = e.target;
10695
+ if ("INPUT" === target.tagName || "TEXTAREA" === target.tagName || target.isContentEditable) return;
10696
+ switch(e.key){
10697
+ case "ArrowDown":
10698
+ case "PageDown":
10699
+ e.preventDefault();
10700
+ goNext();
10701
+ break;
10702
+ case "ArrowUp":
10703
+ case "PageUp":
10704
+ e.preventDefault();
10705
+ goPrev();
10706
+ break;
10707
+ case " ":
10708
+ if ("BUTTON" !== target.tagName && "A" !== target.tagName) {
10709
+ e.preventDefault();
10710
+ goNext();
10711
+ }
10712
+ break;
10713
+ case "Home":
10714
+ e.preventDefault();
10715
+ navigateToInternal(pages[0]);
10716
+ break;
10717
+ case "End":
10718
+ e.preventDefault();
10719
+ navigateToInternal(pages[pages.length - 1]);
10720
+ break;
10721
+ }
10722
+ };
10723
+ window.addEventListener("wheel", handleWheel, {
10724
+ passive: true
10725
+ });
10726
+ window.addEventListener("touchstart", handleTouchStart, {
10727
+ passive: true
10728
+ });
10729
+ window.addEventListener("touchend", handleTouchEnd, {
10730
+ passive: true
10731
+ });
10732
+ window.addEventListener("keydown", handleKeyDown);
10733
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.onCleanup)(()=>{
10734
+ window.removeEventListener("wheel", handleWheel);
10735
+ window.removeEventListener("touchstart", handleTouchStart);
10736
+ window.removeEventListener("touchend", handleTouchEnd);
10737
+ window.removeEventListener("keydown", handleKeyDown);
10738
+ });
10739
+ });
10740
+ return {
10741
+ activePage,
10742
+ isTransitioning,
10743
+ navigateTo,
10744
+ goNext,
10745
+ goPrev,
10746
+ currentIndex,
10747
+ isFirstPage,
10748
+ isLastPage,
10749
+ direction,
10750
+ transitionDuration
10751
+ };
10752
+ }
10753
+ const ImmersiveLandingContext = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createContext)();
10754
+ function useImmersiveLandingContext() {
10755
+ const context = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.useContext)(ImmersiveLandingContext);
10756
+ if (!context) throw new Error("useImmersiveLandingContext must be used within an ImmersiveLanding component");
10757
+ return context;
10758
+ }
10759
+ var ImmersiveLandingPage_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<section role=region><div class="relative z-10 h-full">');
10760
+ const ImmersiveLandingPage = (props)=>{
10761
+ const [local, others] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
10762
+ "id",
10763
+ "children",
10764
+ "class",
10765
+ "className",
10766
+ "style"
10767
+ ]);
10768
+ const context = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.useContext)(ImmersiveLandingContext);
10769
+ const isActive = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>context?.activePage() === local.id);
10770
+ const fadeDurationMs = 200;
10771
+ const classes = ()=>twMerge("absolute inset-0 h-full w-full overflow-hidden bg-transparent transition-opacity ease-in-out", isActive() ? "opacity-100 pointer-events-auto" : "opacity-0 pointer-events-none", local.class, local.className);
10772
+ return (()=>{
10773
+ var _el$ = ImmersiveLandingPage_tmpl$(), _el$2 = _el$.firstChild;
10774
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.spread)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)({
10775
+ get id () {
10776
+ return local.id;
10777
+ },
10778
+ get ["aria-label"] () {
10779
+ return `${local.id} section`;
10780
+ },
10781
+ get ["class"] () {
10782
+ return classes();
10783
+ },
10784
+ get style () {
10785
+ return {
10786
+ "transition-duration": `${fadeDurationMs}ms`,
10787
+ "transition-delay": isActive() ? `${fadeDurationMs}ms` : "0ms",
10788
+ ...local.style
10789
+ };
10790
+ },
10791
+ get ["aria-hidden"] () {
10792
+ return !isActive();
10793
+ }
10794
+ }, others), false, true);
10795
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$2, ()=>local.children);
10796
+ return _el$;
10797
+ })();
10798
+ };
10799
+ const immersive_landing_ImmersiveLandingPage = ImmersiveLandingPage;
10800
+ var ImmersiveLandingArrows_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<button type=button aria-label="Previous page"><svg class="w-6 h-6 text-base-content/70"fill=none viewBox="0 0 24 24"stroke=currentColor stroke-width=2><path stroke-linecap=round stroke-linejoin=round d="M15 19l-7-7 7-7">'), ImmersiveLandingArrows_tmpl$2 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<button type=button aria-label="Next page"><svg class="w-6 h-6 text-base-content/70"fill=none viewBox="0 0 24 24"stroke=currentColor stroke-width=2><path stroke-linecap=round stroke-linejoin=round d="M9 5l7 7-7 7">');
10801
+ const ImmersiveLandingArrows = (props)=>{
10802
+ const [local, others] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
10803
+ "onPrev",
10804
+ "onNext",
10805
+ "isFirstPage",
10806
+ "isLastPage",
10807
+ "class",
10808
+ "className"
10809
+ ]);
10810
+ const handleNext = ()=>{
10811
+ console.log("ImmersiveLandingArrows: handleNext called, onNext is:", typeof local.onNext);
10812
+ if (local.onNext) local.onNext();
10813
+ };
10814
+ const handlePrev = ()=>{
10815
+ console.log("ImmersiveLandingArrows: handlePrev called, onPrev is:", typeof local.onPrev);
10816
+ if (local.onPrev) local.onPrev();
10817
+ };
10818
+ const buttonClasses = "fixed top-1/2 -translate-y-1/2 z-40 hidden md:flex items-center justify-center min-w-[48px] min-h-[48px] rounded-full bg-base-content/10 hover:bg-base-content/20 transition-colors cursor-pointer";
10819
+ return [
10820
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(__WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.Show, {
10821
+ get when () {
10822
+ return !local.isFirstPage;
10823
+ },
10824
+ get children () {
10825
+ var _el$ = ImmersiveLandingArrows_tmpl$();
10826
+ _el$.$$click = handlePrev;
10827
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.spread)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)({
10828
+ get ["class"] () {
10829
+ return twMerge(buttonClasses, "left-4", local.class, local.className);
10830
+ }
10831
+ }, others), false, true);
10832
+ return _el$;
10833
+ }
10834
+ }),
10835
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(__WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.Show, {
10836
+ get when () {
10837
+ return !local.isLastPage;
10838
+ },
10839
+ get children () {
10840
+ var _el$2 = ImmersiveLandingArrows_tmpl$2();
10841
+ _el$2.$$click = handleNext;
10842
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.spread)(_el$2, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)({
10843
+ get ["class"] () {
10844
+ return twMerge(buttonClasses, "right-4", local.class, local.className);
10845
+ }
10846
+ }, others), false, true);
10847
+ return _el$2;
10848
+ }
10849
+ })
10850
+ ];
10851
+ };
10852
+ const immersive_landing_ImmersiveLandingArrows = ImmersiveLandingArrows;
10853
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.delegateEvents)([
10854
+ "click"
10855
+ ]);
10856
+ var ImmersiveLandingNavigation_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<nav aria-label="Page navigation"><div class="bg-base-100/90 backdrop-blur border border-base-content/10 rounded-full px-2 sm:px-3 py-1.5 sm:py-2 shadow-lg"><div class="flex items-center justify-center gap-2 md:gap-3"><button type=button aria-label="Previous page"><svg class="w-5 h-5"fill=none viewBox="0 0 24 24"stroke=currentColor stroke-width=2><path stroke-linecap=round stroke-linejoin=round d="M15 19l-7-7 7-7"></path></svg></button><button type=button aria-label="Next page"><svg class="w-5 h-5"fill=none viewBox="0 0 24 24"stroke=currentColor stroke-width=2><path stroke-linecap=round stroke-linejoin=round d="M9 5l7 7-7 7">'), ImmersiveLandingNavigation_tmpl$2 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<div class="hidden md:flex items-center gap-1.5 px-2">'), ImmersiveLandingNavigation_tmpl$3 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<button type=button>"), ImmersiveLandingNavigation_tmpl$4 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<span class="text-sm text-base-content/60 tabular-nums font-medium min-w-[3ch] text-center">/');
10857
+ const ImmersiveLandingNavigation = (props)=>{
10858
+ const [local, others] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
10859
+ "pages",
10860
+ "currentPageIndex",
10861
+ "onPageDotClick",
10862
+ "onPrev",
10863
+ "onNext",
10864
+ "isFirstPage",
10865
+ "isLastPage",
10866
+ "class",
10867
+ "className",
10868
+ "style"
10869
+ ]);
10870
+ const mobileArrowClasses = (disabled)=>`md:hidden flex items-center justify-center min-w-[44px] min-h-[44px] rounded-full transition-colors cursor-pointer ${disabled ? "text-base-content/20 cursor-not-allowed" : "text-base-content/70 hover:bg-base-content/10 active:bg-base-content/20"}`;
10871
+ return (()=>{
10872
+ var _el$ = ImmersiveLandingNavigation_tmpl$(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling;
10873
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.spread)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)({
10874
+ get ["class"] () {
10875
+ return twMerge("fixed left-1/2 -translate-x-1/2 z-50 w-auto px-2", local.class, local.className);
10876
+ },
10877
+ get style () {
10878
+ return {
10879
+ bottom: "calc(0.75rem + env(safe-area-inset-bottom))",
10880
+ ...local.style
10881
+ };
10882
+ }
10883
+ }, others), false, true);
10884
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.addEventListener)(_el$4, "click", local.onPrev, true);
10885
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$3, (()=>{
10886
+ var _c$ = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.memo)(()=>!!(local.pages && local.pages.length > 0));
10887
+ return ()=>_c$() && (()=>{
10888
+ var _el$6 = ImmersiveLandingNavigation_tmpl$2();
10889
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$6, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(__WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.For, {
10890
+ get each () {
10891
+ return local.pages;
10892
+ },
10893
+ children: (pageId, index)=>(()=>{
10894
+ var _el$7 = ImmersiveLandingNavigation_tmpl$3();
10895
+ _el$7.$$click = ()=>local.onPageDotClick(pageId);
10896
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)((_p$)=>{
10897
+ var _v$5 = `w-2 h-2 rounded-full transition-all cursor-pointer ${index() === local.currentPageIndex ? "bg-primary scale-125" : "bg-base-content/30 hover:bg-base-content/50"}`, _v$6 = `Go to page ${index() + 1} of ${local.pages.length}`, _v$7 = index() === local.currentPageIndex ? "step" : void 0;
10898
+ _v$5 !== _p$.e && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.className)(_el$7, _p$.e = _v$5);
10899
+ _v$6 !== _p$.t && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$7, "aria-label", _p$.t = _v$6);
10900
+ _v$7 !== _p$.a && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$7, "aria-current", _p$.a = _v$7);
10901
+ return _p$;
10902
+ }, {
10903
+ e: void 0,
10904
+ t: void 0,
10905
+ a: void 0
10906
+ });
10907
+ return _el$7;
10908
+ })()
10909
+ }));
10910
+ return _el$6;
10911
+ })();
10912
+ })(), _el$5);
10913
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$3, (()=>{
10914
+ var _c$2 = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.memo)(()=>!!(local.pages && local.pages.length > 0));
10915
+ return ()=>_c$2() && (()=>{
10916
+ var _el$8 = ImmersiveLandingNavigation_tmpl$4(), _el$9 = _el$8.firstChild;
10917
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$8, ()=>(local.currentPageIndex ?? 0) + 1, _el$9);
10918
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$8, ()=>local.pages.length, null);
10919
+ return _el$8;
10920
+ })();
10921
+ })(), _el$5);
10922
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.addEventListener)(_el$5, "click", local.onNext, true);
10923
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)((_p$)=>{
10924
+ var _v$ = local.isFirstPage, _v$2 = mobileArrowClasses(local.isFirstPage), _v$3 = local.isLastPage, _v$4 = mobileArrowClasses(local.isLastPage);
10925
+ _v$ !== _p$.e && (_el$4.disabled = _p$.e = _v$);
10926
+ _v$2 !== _p$.t && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.className)(_el$4, _p$.t = _v$2);
10927
+ _v$3 !== _p$.a && (_el$5.disabled = _p$.a = _v$3);
10928
+ _v$4 !== _p$.o && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.className)(_el$5, _p$.o = _v$4);
10929
+ return _p$;
10930
+ }, {
10931
+ e: void 0,
10932
+ t: void 0,
10933
+ a: void 0,
10934
+ o: void 0
10935
+ });
10936
+ return _el$;
10937
+ })();
10938
+ };
10939
+ const immersive_landing_ImmersiveLandingNavigation = ImmersiveLandingNavigation;
10940
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.delegateEvents)([
10941
+ "click"
10942
+ ]);
10943
+ var ImmersiveLanding_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<div><div class="relative z-10 h-full w-full">');
10944
+ const ImmersiveLanding = (props)=>{
10945
+ const [local, others] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
10946
+ "pages",
10947
+ "initialPage",
10948
+ "transitionDuration",
10949
+ "onNavigate",
10950
+ "onNavigationComplete",
10951
+ "enableScrollNavigation",
10952
+ "showNavigation",
10953
+ "showArrows",
10954
+ "class",
10955
+ "className",
10956
+ "style"
10957
+ ]);
10958
+ const navigation = useImmersiveLanding({
10959
+ pages: local.pages,
10960
+ initialPage: local.initialPage,
10961
+ transitionDuration: local.transitionDuration,
10962
+ onNavigate: local.onNavigate,
10963
+ onNavigationComplete: local.onNavigationComplete,
10964
+ enableScrollNavigation: local.enableScrollNavigation
10965
+ });
10966
+ const contextValue = {
10967
+ activePage: navigation.activePage,
10968
+ navigateTo: navigation.navigateTo,
10969
+ goNext: navigation.goNext,
10970
+ goPrev: navigation.goPrev,
10971
+ currentIndex: navigation.currentIndex,
10972
+ totalPages: local.pages.length,
10973
+ isFirstPage: navigation.isFirstPage,
10974
+ isLastPage: navigation.isLastPage,
10975
+ direction: navigation.direction,
10976
+ transitionDuration: navigation.transitionDuration,
10977
+ pages: local.pages
10978
+ };
10979
+ const showNav = ()=>false !== local.showNavigation;
10980
+ const showArrowNav = ()=>false !== local.showArrows;
10981
+ const classes = ()=>twMerge("fixed inset-0 overflow-hidden bg-transparent", local.class, local.className);
10982
+ const renderChildren = ()=>"function" == typeof props.children ? props.children(contextValue) : props.children;
10983
+ return (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(ImmersiveLandingContext.Provider, {
10984
+ value: contextValue,
10985
+ get children () {
10986
+ return [
10987
+ (()=>{
10988
+ var _el$ = ImmersiveLanding_tmpl$(), _el$2 = _el$.firstChild;
10989
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.spread)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)({
10990
+ get ["class"] () {
10991
+ return classes();
10992
+ },
10993
+ get style () {
10994
+ return local.style;
10995
+ }
10996
+ }, others), false, true);
10997
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$2, renderChildren);
10998
+ return _el$;
10999
+ })(),
11000
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.memo)(()=>(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.memo)(()=>!!showArrowNav())() && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(immersive_landing_ImmersiveLandingArrows, {
11001
+ get onPrev () {
11002
+ return navigation.goPrev;
11003
+ },
11004
+ get onNext () {
11005
+ return navigation.goNext;
11006
+ },
11007
+ get isFirstPage () {
11008
+ return navigation.isFirstPage();
11009
+ },
11010
+ get isLastPage () {
11011
+ return navigation.isLastPage();
11012
+ }
11013
+ })),
11014
+ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.memo)(()=>(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.memo)(()=>!!showNav())() && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(immersive_landing_ImmersiveLandingNavigation, {
11015
+ get pages () {
11016
+ return local.pages;
11017
+ },
11018
+ get currentPageIndex () {
11019
+ return navigation.currentIndex();
11020
+ },
11021
+ get onPageDotClick () {
11022
+ return navigation.navigateTo;
11023
+ },
11024
+ get onPrev () {
11025
+ return navigation.goPrev;
11026
+ },
11027
+ get onNext () {
11028
+ return navigation.goNext;
11029
+ },
11030
+ get isFirstPage () {
11031
+ return navigation.isFirstPage();
11032
+ },
11033
+ get isLastPage () {
11034
+ return navigation.isLastPage();
11035
+ }
11036
+ }))
11037
+ ];
11038
+ }
11039
+ });
11040
+ };
11041
+ const immersive_landing_ImmersiveLanding = Object.assign(ImmersiveLanding, {
11042
+ Page: immersive_landing_ImmersiveLandingPage,
11043
+ Arrows: immersive_landing_ImmersiveLandingArrows,
11044
+ Navigation: immersive_landing_ImmersiveLandingNavigation
11045
+ });
10625
11046
  const Indicator = (props)=>{
10626
11047
  const [local, others] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
10627
11048
  "children",
@@ -15207,4 +15628,4 @@ const createRouteTransitionResolver = (options)=>{
15207
15628
  return fallback ?? noMotion;
15208
15629
  };
15209
15630
  };
15210
- export { accordion_Accordion as Accordion, alert_Alert as Alert, AlphaSlider, artboard_Artboard as Artboard, avatar as Avatar, background_Background as Background, Badge, bottom_sheet_BottomSheet as BottomSheet, Breadcrumbs, breadcrumbs_BreadcrumbsItem as BreadcrumbsItem, browsermockup_BrowserMockup as BrowserMockup, button_Button as Button, Calendar, card_Card as Card, carousel_Carousel as Carousel, chatbubble_ChatBubble as ChatBubble, checkbox_Checkbox as Checkbox, codemockup_CodeMockup as CodeMockup, CodeMockupLine, collapse_Collapse as Collapse, CollapseContent, CollapseDetails, CollapseTitle, colorpicker_ColorInput as ColorInput, colorpicker_ColorPicker as ColorPicker, ColorPickerContext, ColorPickerFlowerSelector, colorpicker_ColorPickerGradientSelector as ColorPickerGradientSelector, ColorPickerWheelSelector, colorpicker_ColorPreview as ColorPreview, colorpicker_ColorSwatches as ColorSwatches, ColorWheel, colorpicker_ColorWheelFlower as ColorWheelFlower, connectionstatus_ConnectionStatus as ConnectionStatus, CopyButton, countdown_Countdown as Countdown, diff_Diff as Diff, divider as Divider, dock as Dock, Drawer, dropdown as Dropdown, EnhancedTable, FileInput, flex_Flex as Flex, footer_Footer as Footer, form_Form as Form, Grid, hero_Hero as Hero, colorpicker_HueSlider as HueSlider, icon_Icon as Icon, indicator_Indicator as Indicator, input as Input, join_Join as Join, kbd_Kbd as Kbd, LightnessSlider, link_Link as Link, loading_Loading as Loading, mask as Mask, menu_Menu as Menu, modal_Modal as Modal, MotionDiv, navbar_Navbar as Navbar, pagination_Pagination as Pagination, phonemockup_PhoneMockup as PhoneMockup, Progress, props_table_PropsTable as PropsTable, radialprogress_RadialProgress as RadialProgress, radio_Radio as Radio, range_Range as Range, Rating, colorpicker_SaturationBrightness as SaturationBrightness, select_Select as Select, showcase_ShowcaseBlock as ShowcaseBlock, ShowcaseSection, sidenav_Sidenav as Sidenav, sidenav_SidenavButton as SidenavButton, sidenav_SidenavGroup as SidenavGroup, sidenav_SidenavItem as SidenavItem, sidenav_SidenavLink as SidenavLink, sidenav_SidenavMenu as SidenavMenu, skeleton_Skeleton as Skeleton, Stack, stat_card_StatCard as StatCard, stats_Stats as Stats, status_Status as Status, steps as Steps, streaming_table_StreamingTable as StreamingTable, Summary, SvgBackground, Swap, table_Table as Table, tabs_Tabs as Tabs, textarea_Textarea as Textarea, Timeline, timeline_TimelineEnd as TimelineEnd, timeline_TimelineItem as TimelineItem, timeline_TimelineMiddle as TimelineMiddle, timeline_TimelineStart as TimelineStart, toast_Toast as Toast, ToastContainer, ToastStack_ToastStack as ToastStack, toggle_Toggle as Toggle, tooltip_Tooltip as Tooltip, windowmockup_WindowMockup as WindowMockup, createMotionPresets, createMotionSystem, createPopmotionDriver, createRouteTransitionResolver, createStreamingTableStore, connectionstatus_ConnectionStatus as default, defaultMotionTokens, enablePopmotion, getMotionDriver, presets_getPreset as getPreset, immediateDriver, mergeMotionTokens, motionDistances, motionDurations, motionEasings, motionPresets, noMotion, prefersReducedMotion, presets_registerPreset as registerPreset, resolveEase, presets_resolvePreset as resolvePreset, routeTransition, runMotion, setMotionDriver, toastStore, useColorPickerContext, useDesktop, useFormValidation };
15631
+ export { accordion_Accordion as Accordion, alert_Alert as Alert, AlphaSlider, artboard_Artboard as Artboard, avatar as Avatar, background_Background as Background, Badge, bottom_sheet_BottomSheet as BottomSheet, Breadcrumbs, breadcrumbs_BreadcrumbsItem as BreadcrumbsItem, browsermockup_BrowserMockup as BrowserMockup, button_Button as Button, Calendar, card_Card as Card, carousel_Carousel as Carousel, chatbubble_ChatBubble as ChatBubble, checkbox_Checkbox as Checkbox, codemockup_CodeMockup as CodeMockup, CodeMockupLine, collapse_Collapse as Collapse, CollapseContent, CollapseDetails, CollapseTitle, colorpicker_ColorInput as ColorInput, colorpicker_ColorPicker as ColorPicker, ColorPickerContext, ColorPickerFlowerSelector, colorpicker_ColorPickerGradientSelector as ColorPickerGradientSelector, ColorPickerWheelSelector, colorpicker_ColorPreview as ColorPreview, colorpicker_ColorSwatches as ColorSwatches, ColorWheel, colorpicker_ColorWheelFlower as ColorWheelFlower, connectionstatus_ConnectionStatus as ConnectionStatus, CopyButton, countdown_Countdown as Countdown, diff_Diff as Diff, divider as Divider, dock as Dock, Drawer, dropdown as Dropdown, EnhancedTable, FileInput, flex_Flex as Flex, footer_Footer as Footer, form_Form as Form, Grid, hero_Hero as Hero, colorpicker_HueSlider as HueSlider, icon_Icon as Icon, immersive_landing_ImmersiveLanding as ImmersiveLanding, ImmersiveLandingContext, indicator_Indicator as Indicator, input as Input, join_Join as Join, kbd_Kbd as Kbd, LightnessSlider, link_Link as Link, loading_Loading as Loading, mask as Mask, menu_Menu as Menu, modal_Modal as Modal, MotionDiv, navbar_Navbar as Navbar, pagination_Pagination as Pagination, phonemockup_PhoneMockup as PhoneMockup, Progress, props_table_PropsTable as PropsTable, radialprogress_RadialProgress as RadialProgress, radio_Radio as Radio, range_Range as Range, Rating, colorpicker_SaturationBrightness as SaturationBrightness, select_Select as Select, showcase_ShowcaseBlock as ShowcaseBlock, ShowcaseSection, sidenav_Sidenav as Sidenav, sidenav_SidenavButton as SidenavButton, sidenav_SidenavGroup as SidenavGroup, sidenav_SidenavItem as SidenavItem, sidenav_SidenavLink as SidenavLink, sidenav_SidenavMenu as SidenavMenu, skeleton_Skeleton as Skeleton, Stack, stat_card_StatCard as StatCard, stats_Stats as Stats, status_Status as Status, steps as Steps, streaming_table_StreamingTable as StreamingTable, Summary, SvgBackground, Swap, table_Table as Table, tabs_Tabs as Tabs, textarea_Textarea as Textarea, Timeline, timeline_TimelineEnd as TimelineEnd, timeline_TimelineItem as TimelineItem, timeline_TimelineMiddle as TimelineMiddle, timeline_TimelineStart as TimelineStart, toast_Toast as Toast, ToastContainer, ToastStack_ToastStack as ToastStack, toggle_Toggle as Toggle, tooltip_Tooltip as Tooltip, windowmockup_WindowMockup as WindowMockup, createMotionPresets, createMotionSystem, createPopmotionDriver, createRouteTransitionResolver, createStreamingTableStore, connectionstatus_ConnectionStatus as default, defaultMotionTokens, enablePopmotion, getMotionDriver, presets_getPreset as getPreset, immediateDriver, mergeMotionTokens, motionDistances, motionDurations, motionEasings, motionPresets, noMotion, prefersReducedMotion, presets_registerPreset as registerPreset, resolveEase, presets_resolvePreset as resolvePreset, routeTransition, runMotion, setMotionDriver, toastStore, useColorPickerContext, useDesktop, useFormValidation, useImmersiveLanding, useImmersiveLandingContext };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pathscale/ui",
3
- "version": "0.0.115",
3
+ "version": "0.0.116",
4
4
  "author": "pathscale",
5
5
  "repository": {
6
6
  "type": "git",
@@ -31,6 +31,16 @@
31
31
  "@rsbuild/core": "^1.3.20",
32
32
  "@rsbuild/plugin-solid": "^1.0.5",
33
33
  "@rslib/core": "^0.9.0",
34
+ "@solid-primitives/event-listener": "^2.3.0",
35
+ "@solid-primitives/intersection-observer": "^2.1.3",
36
+ "@solid-primitives/keyboard": "^1.2.5",
37
+ "@solid-primitives/media": "^2.2.5",
38
+ "@solid-primitives/props": "^3.1.8",
39
+ "@solid-primitives/resize-observer": "^2.0.22",
40
+ "@solid-primitives/scheduled": "^1.4.1",
41
+ "@solid-primitives/scroll": "^2.0.20",
42
+ "@solid-primitives/storage": "^2.1.1",
43
+ "@solid-primitives/utils": "^6.2.1",
34
44
  "@tanstack/solid-table": "^8.21.3",
35
45
  "@types/bun": "^1.2.12",
36
46
  "babel-preset-solid": "^1.9.6",
@@ -38,6 +48,7 @@
38
48
  "cssnano": "^7.0.7",
39
49
  "postcss": "^8.5.4",
40
50
  "postcss-cli": "^11.0.1",
51
+ "solid-js": "^1.9.7",
41
52
  "svgo": "^3.3.2",
42
53
  "tailwind-merge": "^3.3.0",
43
54
  "typescript": "^5.8.3",
@@ -46,6 +57,11 @@
46
57
  },
47
58
  "dependencies": {
48
59
  "@iconify/tailwind4": "^1.0.6",
60
+ "rsbuild-plugin-iconify": "^1.0.3"
61
+ },
62
+ "peerDependencies": {
63
+ "@felte/solid": "^1.2.0",
64
+ "@felte/validator-zod": "^1.0.0",
49
65
  "@solid-primitives/event-listener": "^2.3.0",
50
66
  "@solid-primitives/intersection-observer": "^2.1.3",
51
67
  "@solid-primitives/keyboard": "^1.2.5",
@@ -56,12 +72,6 @@
56
72
  "@solid-primitives/scroll": "^2.0.20",
57
73
  "@solid-primitives/storage": "^2.1.1",
58
74
  "@solid-primitives/utils": "^6.2.1",
59
- "rsbuild-plugin-iconify": "^1.0.3",
60
- "solid-js": "^1.9.7"
61
- },
62
- "peerDependencies": {
63
- "@felte/solid": "^1.2.0",
64
- "@felte/validator-zod": "^1.0.0",
65
75
  "@tanstack/solid-table": "^8.0.0",
66
76
  "solid-js": "^1.9",
67
77
  "popmotion": "^11.0.5",