@lobehub/ui 6.0.4 → 6.0.5

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.
@@ -2,10 +2,10 @@ import "@stylexjs/stylex";
2
2
  //#region src/Accordion/style.d.ts
3
3
  export declare const accordionStyles: {
4
4
  panel: string;
5
+ header: string;
5
6
  action: string;
6
7
  content: string;
7
8
  trigger: string;
8
- header: string;
9
9
  item: string;
10
10
  root: string;
11
11
  indicator: string;
@@ -42,7 +42,7 @@ declare const styleArrays: {
42
42
  }> | Readonly<{
43
43
  readonly backgroundColor: stylex.StyleXClassNameFor<"backgroundColor", "transparent">;
44
44
  readonly cursor: stylex.StyleXClassNameFor<"cursor", "default">;
45
- readonly display: stylex.StyleXClassNameFor<"display", "flex" | "none">;
45
+ readonly display: stylex.StyleXClassNameFor<"display", "none" | "flex">;
46
46
  }>)[];
47
47
  item: Readonly<{
48
48
  readonly borderRadius: stylex.StyleXClassNameFor<"borderRadius", string>;
@@ -58,13 +58,10 @@ import "./LandingSection/index.mjs";
58
58
  import { LogoMarqueeItem, LogoMarqueeProps } from "./LogoMarquee/type.mjs";
59
59
  import LogoMarquee from "./LogoMarquee/LogoMarquee.mjs";
60
60
  import "./LogoMarquee/index.mjs";
61
- import { SplineProps } from "./Spline/type.mjs";
62
- import Spline from "./Spline/Spine.mjs";
63
- import "./Spline/index.mjs";
64
61
  import { SpotlightProps } from "./Spotlight/type.mjs";
65
62
  import Spotlight from "./Spotlight/Spotlight.mjs";
66
63
  import "./Spotlight/index.mjs";
67
64
  import { CursorStyle, SegmentMode, TypewriterEffectProps } from "./TypewriterEffect/type.mjs";
68
65
  import TypewriterEffect from "./TypewriterEffect/TypewriterEffect.mjs";
69
66
  import "./TypewriterEffect/index.mjs";
70
- export { AgentSkillCard, type AgentSkillCardAgent, type AgentSkillCardMode, type AgentSkillCardPanel, type AgentSkillCardProps, AuroraBackground, type AuroraBackgroundProps, BentoCard, type BentoCardProps, BentoGrid, type BentoGridProps, BottomGradientButton, type BottomGradientButtonProps, CodeShowcase, type CodeShowcaseItem, type CodeShowcaseProps, type CursorStyle, DEFAULT_SKILL_AGENTS, FeatureGrid, type FeatureGridItem, type FeatureGridProps, type FeatureItemType, Features, type FeaturesProps, FluidGradient, type FluidGradientProps, Giscus, type GiscusProps, GradientButton, type GradientButtonProps, Grainient, type GrainientProps, GridBackground, type GridBackgroundProps, GridShowcase, type GridShowcaseProps, Hero, type HeroAction, type HeroProps, InstallBanner, type InstallBannerProps, LANDING_GRADIENT_VAR, LANDING_PALETTE_DARK, LANDING_PALETTE_LIGHT, type LandingAction, LandingHero, type LandingHeroAction, type LandingHeroProps, type LandingLinkProps, type LandingLinkRender, type LandingNavigate, type LandingPalette, LandingSection, type LandingSectionProps, LogoMarquee, type LogoMarqueeItem, type LogoMarqueeProps, type SegmentMode, Spline, type SplineProps, Spotlight, SpotlightCard, type SpotlightCardProps, type SpotlightProps, TypewriterEffect, type TypewriterEffectProps, accentGradient as landingAccentGradient };
67
+ export { AgentSkillCard, type AgentSkillCardAgent, type AgentSkillCardMode, type AgentSkillCardPanel, type AgentSkillCardProps, AuroraBackground, type AuroraBackgroundProps, BentoCard, type BentoCardProps, BentoGrid, type BentoGridProps, BottomGradientButton, type BottomGradientButtonProps, CodeShowcase, type CodeShowcaseItem, type CodeShowcaseProps, type CursorStyle, DEFAULT_SKILL_AGENTS, FeatureGrid, type FeatureGridItem, type FeatureGridProps, type FeatureItemType, Features, type FeaturesProps, FluidGradient, type FluidGradientProps, Giscus, type GiscusProps, GradientButton, type GradientButtonProps, Grainient, type GrainientProps, GridBackground, type GridBackgroundProps, GridShowcase, type GridShowcaseProps, Hero, type HeroAction, type HeroProps, InstallBanner, type InstallBannerProps, LANDING_GRADIENT_VAR, LANDING_PALETTE_DARK, LANDING_PALETTE_LIGHT, type LandingAction, LandingHero, type LandingHeroAction, type LandingHeroProps, type LandingLinkProps, type LandingLinkRender, type LandingNavigate, type LandingPalette, LandingSection, type LandingSectionProps, LogoMarquee, type LogoMarqueeItem, type LogoMarqueeProps, type SegmentMode, Spotlight, SpotlightCard, type SpotlightCardProps, type SpotlightProps, TypewriterEffect, type TypewriterEffectProps, accentGradient as landingAccentGradient };
@@ -21,6 +21,5 @@ import InstallBanner from "./InstallBanner/InstallBanner.mjs";
21
21
  import LandingHero from "./LandingHero/LandingHero.mjs";
22
22
  import LandingSection from "./LandingSection/LandingSection.mjs";
23
23
  import LogoMarquee from "./LogoMarquee/LogoMarquee.mjs";
24
- import Spline from "./Spline/Spine.mjs";
25
24
  import TypewriterEffect from "./TypewriterEffect/TypewriterEffect.mjs";
26
- export { AgentSkillCard, AuroraBackground, BentoCard, BentoGrid, BottomGradientButton, CodeShowcase, DEFAULT_SKILL_AGENTS, FeatureGrid, Features, FluidGradient, Giscus, GradientButton, Grainient, GridBackground, GridShowcase, Hero, InstallBanner, LANDING_GRADIENT_VAR, LANDING_PALETTE_DARK, LANDING_PALETTE_LIGHT, LandingHero, LandingSection, LogoMarquee, Spline, Spotlight, SpotlightCard, TypewriterEffect, accentGradient as landingAccentGradient };
25
+ export { AgentSkillCard, AuroraBackground, BentoCard, BentoGrid, BottomGradientButton, CodeShowcase, DEFAULT_SKILL_AGENTS, FeatureGrid, Features, FluidGradient, Giscus, GradientButton, Grainient, GridBackground, GridShowcase, Hero, InstallBanner, LANDING_GRADIENT_VAR, LANDING_PALETTE_DARK, LANDING_PALETTE_LIGHT, LandingHero, LandingSection, LogoMarquee, Spotlight, SpotlightCard, TypewriterEffect, accentGradient as landingAccentGradient };
@@ -6,6 +6,4 @@ import LobeHubText from "./LobeHubText/index.mjs";
6
6
  import Logo3d from "./Logo3d/index.mjs";
7
7
  import _default from "./LogoFlat/index.mjs";
8
8
  import icons_default from "./LogoMono/index.mjs";
9
- import LogoThree, { LogoThreeProps } from "./LogoThree/index.mjs";
10
- import LogoSpline, { LogoSplineProps } from "./LogoThree/LogoSpline.mjs";
11
- export { BrandLoading, type BrandLoadingProps, LobeChat, type LobeChatProps, LobeChatText, LobeHub, type LobeHubProps, LobeHubText, Logo3d, _default as LogoFlat, icons_default as LogoMono, LogoSpline, type LogoSplineProps, LogoThree, type LogoThreeProps };
9
+ export { BrandLoading, type BrandLoadingProps, LobeChat, type LobeChatProps, LobeChatText, LobeHub, type LobeHubProps, LobeHubText, Logo3d, _default as LogoFlat, icons_default as LogoMono };
@@ -6,6 +6,4 @@ import icons_default from "./LogoMono/index.mjs";
6
6
  import LobeChat from "./LobeChat/index.mjs";
7
7
  import LobeHubText from "./LobeHubText/index.mjs";
8
8
  import LobeHub from "./LobeHub/index.mjs";
9
- import LogoThree from "./LogoThree/index.mjs";
10
- import LogoSpline from "./LogoThree/LogoSpline.mjs";
11
- export { BrandLoading, LobeChat, LobeChatText, LobeHub, LobeHubText, Logo3d, LogoFlat_default as LogoFlat, icons_default as LogoMono, LogoSpline, LogoThree };
9
+ export { BrandLoading, LobeChat, LobeChatText, LobeHub, LobeHubText, Logo3d, LogoFlat_default as LogoFlat, icons_default as LogoMono };
@@ -2,7 +2,7 @@ import Icon from "../../Icon/Icon.mjs";
2
2
  import Center from "../../Flex/Center.mjs";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  import { Loader2 } from "lucide-react";
5
- //#region src/brand/LogoThree/Loading.tsx
5
+ //#region src/spline/LogoThree/Loading.tsx
6
6
  const Loading = ({ size = 32 }) => {
7
7
  return /* @__PURE__ */ jsx(Center, {
8
8
  height: "100%",
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Loading.mjs","names":[],"sources":["../../../src/spline/LogoThree/Loading.tsx"],"sourcesContent":["import { Loader2 } from 'lucide-react';\nimport { type FC } from 'react';\n\nimport { Center } from '@/Flex';\nimport Icon from '@/Icon';\n\nconst Loading: FC<{ size?: number }> = ({ size = 32 }) => {\n return (\n <Center height={'100%'} justify={'center'} style={{ position: 'absolute' }} width={'100%'}>\n <Icon spin icon={Loader2} size={size} />\n </Center>\n );\n};\n\nexport default Loading;\n"],"mappings":";;;;;AAMA,MAAM,WAAkC,EAAE,OAAO,SAAS;CACxD,OACE,oBAAC,QAAD;EAAQ,QAAQ;EAAQ,SAAS;EAAU,OAAO,EAAE,UAAU,WAAW;EAAG,OAAO;EACjF,UAAA,oBAAC,MAAD;GAAM,MAAA;GAAK,MAAM;GAAe;EAAO,CAAA;CACjC,CAAA;AAEZ"}
@@ -1,7 +1,7 @@
1
- import { SplineProps } from "../../awesome/Spline/type.mjs";
2
- import "../../awesome/Spline/index.mjs";
1
+ import { SplineProps } from "../Spline/type.mjs";
2
+ import "../Spline/index.mjs";
3
3
  import { CSSProperties } from "react";
4
- //#region src/brand/LogoThree/LogoSpline.d.ts
4
+ //#region src/spline/LogoThree/LogoSpline.d.ts
5
5
  export interface LogoSplineProps extends Partial<SplineProps> {
6
6
  className?: string;
7
7
  height?: number | string;
@@ -1,9 +1,9 @@
1
1
  import { useThemeMode } from "../../styles/theme/scope.mjs";
2
- import Spline from "../../awesome/Spline/Spine.mjs";
2
+ import Spline from "../Spline/Spine.mjs";
3
3
  import Loading from "./Loading.mjs";
4
4
  import { memo, useState } from "react";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
- //#region src/brand/LogoThree/LogoSpline.tsx
6
+ //#region src/spline/LogoThree/LogoSpline.tsx
7
7
  const LIGHT = "https://hub-apac-1.lobeobjects.space/light.splinecode";
8
8
  const DARK = "https://hub-apac-1.lobeobjects.space/dark.splinecode";
9
9
  const LogoSpline = memo(({ className, style, width, height, onLoad, ...rest }) => {
@@ -1 +1 @@
1
- {"version":3,"file":"LogoSpline.mjs","names":[],"sources":["../../../src/brand/LogoThree/LogoSpline.tsx"],"sourcesContent":["import { type CSSProperties, memo, useState } from 'react';\n\nimport Spline, { type SplineProps } from '@/awesome/Spline';\nimport { useThemeMode } from '@/styles/theme/scope';\n\nimport Loading from './Loading';\n\nconst LIGHT = 'https://hub-apac-1.lobeobjects.space/light.splinecode';\nconst DARK = 'https://hub-apac-1.lobeobjects.space/dark.splinecode';\n\nexport interface LogoSplineProps extends Partial<SplineProps> {\n className?: string;\n height?: number | string;\n style?: CSSProperties;\n width?: number | string;\n}\n\nconst LogoSpline = memo<LogoSplineProps>(({ className, style, width, height, onLoad, ...rest }) => {\n const { isDarkMode } = useThemeMode();\n const [loading, setLoading] = useState(true);\n return (\n <div className={className} style={{ height, position: 'relative', width, ...style }}>\n {loading && <Loading />}\n <Spline\n scene={isDarkMode ? DARK : LIGHT}\n onLoad={(splineApp) => {\n setLoading(false);\n onLoad?.(splineApp);\n }}\n {...rest}\n />\n </div>\n );\n});\n\nexport default LogoSpline;\n"],"mappings":";;;;;;AAOA,MAAM,QAAQ;AACd,MAAM,OAAO;AASb,MAAM,aAAa,MAAuB,EAAE,WAAW,OAAO,OAAO,QAAQ,QAAQ,GAAG,WAAW;CACjG,MAAM,EAAE,eAAe,aAAa;CACpC,MAAM,CAAC,SAAS,cAAc,SAAS,IAAI;CAC3C,OACE,qBAAC,OAAD;EAAgB;EAAW,OAAO;GAAE;GAAQ,UAAU;GAAY;GAAO,GAAG;EAAM;EAAlF,UAAA,CACG,WAAW,oBAAC,SAAD,CAAU,CAAA,GACtB,oBAAC,QAAD;GACE,OAAO,aAAa,OAAO;GAC3B,SAAS,cAAc;IACrB,WAAW,KAAK;IAChB,SAAS,SAAS;GACpB;GACA,GAAI;EACL,CAAA,CACE;;AAET,CAAC"}
1
+ {"version":3,"file":"LogoSpline.mjs","names":[],"sources":["../../../src/spline/LogoThree/LogoSpline.tsx"],"sourcesContent":["import { type CSSProperties, memo, useState } from 'react';\n\nimport Spline, { type SplineProps } from '@/spline/Spline';\nimport { useThemeMode } from '@/styles/theme/scope';\n\nimport Loading from './Loading';\n\nconst LIGHT = 'https://hub-apac-1.lobeobjects.space/light.splinecode';\nconst DARK = 'https://hub-apac-1.lobeobjects.space/dark.splinecode';\n\nexport interface LogoSplineProps extends Partial<SplineProps> {\n className?: string;\n height?: number | string;\n style?: CSSProperties;\n width?: number | string;\n}\n\nconst LogoSpline = memo<LogoSplineProps>(({ className, style, width, height, onLoad, ...rest }) => {\n const { isDarkMode } = useThemeMode();\n const [loading, setLoading] = useState(true);\n return (\n <div className={className} style={{ height, position: 'relative', width, ...style }}>\n {loading && <Loading />}\n <Spline\n scene={isDarkMode ? DARK : LIGHT}\n onLoad={(splineApp) => {\n setLoading(false);\n onLoad?.(splineApp);\n }}\n {...rest}\n />\n </div>\n );\n});\n\nexport default LogoSpline;\n"],"mappings":";;;;;;AAOA,MAAM,QAAQ;AACd,MAAM,OAAO;AASb,MAAM,aAAa,MAAuB,EAAE,WAAW,OAAO,OAAO,QAAQ,QAAQ,GAAG,WAAW;CACjG,MAAM,EAAE,eAAe,aAAa;CACpC,MAAM,CAAC,SAAS,cAAc,SAAS,IAAI;CAC3C,OACE,qBAAC,OAAD;EAAgB;EAAW,OAAO;GAAE;GAAQ,UAAU;GAAY;GAAO,GAAG;EAAM;EAAlF,UAAA,CACG,WAAW,oBAAC,SAAD,CAAU,CAAA,GACtB,oBAAC,QAAD;GACE,OAAO,aAAa,OAAO;GAC3B,SAAS,cAAc;IACrB,WAAW,KAAK;IAChB,SAAS,SAAS;GACpB;GACA,GAAI;EACL,CAAA,CACE;;AAET,CAAC"}
@@ -1,7 +1,7 @@
1
- import { SplineProps } from "../../awesome/Spline/type.mjs";
2
- import "../../awesome/Spline/index.mjs";
1
+ import { SplineProps } from "../Spline/type.mjs";
2
+ import "../Spline/index.mjs";
3
3
  import { CSSProperties } from "react";
4
- //#region src/brand/LogoThree/index.d.ts
4
+ //#region src/spline/LogoThree/index.d.ts
5
5
  export interface LogoThreeProps extends Partial<SplineProps> {
6
6
  className?: string;
7
7
  size?: number;
@@ -2,10 +2,10 @@
2
2
  import { useCdnFn } from "../../ConfigProvider/index.mjs";
3
3
  import FlexBasic_default from "../../Flex/FlexBasic.mjs";
4
4
  import Img from "../../Img/index.mjs";
5
- import Spline from "../../awesome/Spline/Spine.mjs";
5
+ import Spline from "../Spline/Spine.mjs";
6
6
  import { memo, useState } from "react";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
8
- //#region src/brand/LogoThree/index.tsx
8
+ //#region src/spline/LogoThree/index.tsx
9
9
  const LOGO_3D = {
10
10
  path: "assets/logo-3d.webp",
11
11
  pkg: "@lobehub/assets-logo",
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["Flexbox"],"sources":["../../../src/brand/LogoThree/index.tsx"],"sourcesContent":["'use client';\n\nimport { type CSSProperties, memo, useState } from 'react';\n\nimport Spline, { type SplineProps } from '@/awesome/Spline';\nimport { useCdnFn } from '@/ConfigProvider';\nimport { Flexbox } from '@/Flex';\nimport Img from '@/Img';\n\nconst LOGO_3D = {\n path: 'assets/logo-3d.webp',\n pkg: '@lobehub/assets-logo',\n version: '1.2.0',\n};\n\nexport interface LogoThreeProps extends Partial<SplineProps> {\n className?: string;\n size?: number;\n style?: CSSProperties;\n}\n\nconst LogoThree = memo<LogoThreeProps>(({ className, style, size = 128, onLoad, ...rest }) => {\n const genCdnUrl = useCdnFn();\n const [loading, setLoading] = useState(true);\n return (\n <Flexbox\n align={'center'}\n className={className}\n flex={'none'}\n justify={'center'}\n style={{ height: size, overflow: 'hidden', position: 'relative', width: size, ...style }}\n >\n {loading && (\n <Img\n alt={'logo'}\n height={size * 0.75}\n src={genCdnUrl(LOGO_3D)}\n style={{ position: 'absolute' }}\n width={size * 0.75}\n />\n )}\n <Spline\n scene={'https://hub-apac-1.lobeobjects.space/logo.splinecode'}\n style={{\n flex: 'none',\n height: size,\n width: size,\n }}\n onLoad={(splineApp) => {\n setLoading(false);\n onLoad?.(splineApp);\n }}\n {...rest}\n />\n </Flexbox>\n );\n});\n\nLogoThree.displayName = 'LobeHubLogoThree';\n\nexport default LogoThree;\n"],"mappings":";;;;;;;;AASA,MAAM,UAAU;CACd,MAAM;CACN,KAAK;CACL,SAAS;AACX;AAQA,MAAM,YAAY,MAAsB,EAAE,WAAW,OAAO,OAAO,KAAK,QAAQ,GAAG,WAAW;CAC5F,MAAM,YAAY,SAAS;CAC3B,MAAM,CAAC,SAAS,cAAc,SAAS,IAAI;CAC3C,OACE,qBAACA,mBAAD;EACE,OAAO;EACI;EACX,MAAM;EACN,SAAS;EACT,OAAO;GAAE,QAAQ;GAAM,UAAU;GAAU,UAAU;GAAY,OAAO;GAAM,GAAG;EAAM;EALzF,UAAA,CAOG,WACC,oBAAC,KAAD;GACE,KAAK;GACL,QAAQ,OAAO;GACf,KAAK,UAAU,OAAO;GACtB,OAAO,EAAE,UAAU,WAAW;GAC9B,OAAO,OAAO;EACf,CAAA,GAEH,oBAAC,QAAD;GACE,OAAO;GACP,OAAO;IACL,MAAM;IACN,QAAQ;IACR,OAAO;GACT;GACA,SAAS,cAAc;IACrB,WAAW,KAAK;IAChB,SAAS,SAAS;GACpB;GACA,GAAI;EACL,CAAA,CACM;;AAEb,CAAC;AAED,UAAU,cAAc"}
1
+ {"version":3,"file":"index.mjs","names":["Flexbox"],"sources":["../../../src/spline/LogoThree/index.tsx"],"sourcesContent":["'use client';\n\nimport { type CSSProperties, memo, useState } from 'react';\n\nimport { useCdnFn } from '@/ConfigProvider';\nimport { Flexbox } from '@/Flex';\nimport Img from '@/Img';\nimport Spline, { type SplineProps } from '@/spline/Spline';\n\nconst LOGO_3D = {\n path: 'assets/logo-3d.webp',\n pkg: '@lobehub/assets-logo',\n version: '1.2.0',\n};\n\nexport interface LogoThreeProps extends Partial<SplineProps> {\n className?: string;\n size?: number;\n style?: CSSProperties;\n}\n\nconst LogoThree = memo<LogoThreeProps>(({ className, style, size = 128, onLoad, ...rest }) => {\n const genCdnUrl = useCdnFn();\n const [loading, setLoading] = useState(true);\n return (\n <Flexbox\n align={'center'}\n className={className}\n flex={'none'}\n justify={'center'}\n style={{ height: size, overflow: 'hidden', position: 'relative', width: size, ...style }}\n >\n {loading && (\n <Img\n alt={'logo'}\n height={size * 0.75}\n src={genCdnUrl(LOGO_3D)}\n style={{ position: 'absolute' }}\n width={size * 0.75}\n />\n )}\n <Spline\n scene={'https://hub-apac-1.lobeobjects.space/logo.splinecode'}\n style={{\n flex: 'none',\n height: size,\n width: size,\n }}\n onLoad={(splineApp) => {\n setLoading(false);\n onLoad?.(splineApp);\n }}\n {...rest}\n />\n </Flexbox>\n );\n});\n\nLogoThree.displayName = 'LobeHubLogoThree';\n\nexport default LogoThree;\n"],"mappings":";;;;;;;;AASA,MAAM,UAAU;CACd,MAAM;CACN,KAAK;CACL,SAAS;AACX;AAQA,MAAM,YAAY,MAAsB,EAAE,WAAW,OAAO,OAAO,KAAK,QAAQ,GAAG,WAAW;CAC5F,MAAM,YAAY,SAAS;CAC3B,MAAM,CAAC,SAAS,cAAc,SAAS,IAAI;CAC3C,OACE,qBAACA,mBAAD;EACE,OAAO;EACI;EACX,MAAM;EACN,SAAS;EACT,OAAO;GAAE,QAAQ;GAAM,UAAU;GAAU,UAAU;GAAY,OAAO;GAAM,GAAG;EAAM;EALzF,UAAA,CAOG,WACC,oBAAC,KAAD;GACE,KAAK;GACL,QAAQ,OAAO;GACf,KAAK,UAAU,OAAO;GACtB,OAAO,EAAE,UAAU,WAAW;GAC9B,OAAO,OAAO;EACf,CAAA,GAEH,oBAAC,QAAD;GACE,OAAO;GACP,OAAO;IACL,MAAM;IACN,QAAQ;IACR,OAAO;GACT;GACA,SAAS,cAAc;IACrB,WAAW,KAAK;IAChB,SAAS,SAAS;GACpB;GACA,GAAI;EACL,CAAA,CACM;;AAEb,CAAC;AAED,UAAU,cAAc"}
@@ -2,7 +2,7 @@ import { mergeRefs } from "../../utils/mergeRefs.mjs";
2
2
  import { memo, useEffect, useMemo, useRef, useState } from "react";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  import { debounce } from "es-toolkit/compat";
5
- //#region src/awesome/Spline/ParentSize.tsx
5
+ //#region src/spline/Spline/ParentSize.tsx
6
6
  const defaultIgnoreDimensions = [];
7
7
  const defaultParentSizeStyles = {
8
8
  height: "100%",
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ParentSize.mjs","names":[],"sources":["../../../src/spline/Spline/ParentSize.tsx"],"sourcesContent":["import { debounce } from 'es-toolkit/compat';\nimport {\n type CSSProperties,\n memo,\n type ReactNode,\n type Ref,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\n\nimport { mergeRefs } from '@/utils/mergeRefs';\n\ninterface ResizeObserverCallback {\n (entries: ResizeObserverEntry[], observer: ResizeObserver): void;\n}\n\ninterface ResizeObserverPolyfill {\n new (callback: ResizeObserverCallback): ResizeObserver;\n}\n\n// @TODO remove when upgraded to TS 4 which has its own declaration\ninterface PrivateWindow {\n ResizeObserver: ResizeObserverPolyfill;\n}\n\nexport interface ParentSizeProps {\n /** Child render function `({ width, height, top, left, ref, resize }) => ReactNode`. */\n children: (\n args: {\n ref: HTMLDivElement | null;\n resize: (state: ParentSizeState) => void;\n } & ParentSizeState,\n ) => ReactNode;\n /** Optional `className` to add to the parent `div` wrapper used for size measurement. */\n className?: string;\n /** Child render updates upon resize are delayed until `debounceTime` milliseconds _after_ the last resize event is observed. */\n debounceTime?: number;\n /** Optional flag to toggle leading debounce calls. When set to true this will ensure that the component always renders immediately. (defaults to true) */\n enableDebounceLeadingCall?: boolean;\n /** Optional dimensions provided won't trigger a state change when changed. */\n ignoreDimensions?: keyof ParentSizeState | (keyof ParentSizeState)[];\n /** Optional `style` object to apply to the parent `div` wrapper used for size measurement. */\n parentSizeStyles?: CSSProperties;\n ref?: Ref<HTMLDivElement>;\n /** Optionally inject a ResizeObserver polyfill, else this *must* be globally available. */\n resizeObserverPolyfill?: ResizeObserverPolyfill;\n}\n\ntype ParentSizeState = {\n height: number;\n left: number;\n top: number;\n width: number;\n};\n\nexport type ParentSizeProvidedProps = ParentSizeState;\n\nconst defaultIgnoreDimensions: ParentSizeProps['ignoreDimensions'] = [];\nconst defaultParentSizeStyles = { height: '100%', width: '100%' };\n\nconst ParentSize = memo<ParentSizeProps>(\n ({\n ref,\n className,\n children,\n debounceTime = 300,\n ignoreDimensions = defaultIgnoreDimensions,\n parentSizeStyles,\n enableDebounceLeadingCall = true,\n resizeObserverPolyfill,\n ...restProps\n }) => {\n const target = useRef<HTMLDivElement | null>(null);\n const animationFrameID = useRef(0);\n\n const [state, setState] = useState<ParentSizeState>({\n height: 0,\n left: 0,\n top: 0,\n width: 0,\n });\n\n const resize = useMemo(() => {\n const normalized = Array.isArray(ignoreDimensions) ? ignoreDimensions : [ignoreDimensions];\n\n return debounce(\n (incoming: ParentSizeState) => {\n setState((existing) => {\n const stateKeys = Object.keys(existing) as (keyof ParentSizeState)[];\n const keysWithChanges = stateKeys.filter((key) => existing[key] !== incoming[key]);\n const shouldBail = keysWithChanges.every((key) => normalized.includes(key));\n\n return shouldBail ? existing : incoming;\n });\n },\n debounceTime,\n { leading: enableDebounceLeadingCall },\n );\n }, [debounceTime, enableDebounceLeadingCall, ignoreDimensions]);\n\n useEffect(() => {\n const LocalResizeObserver =\n resizeObserverPolyfill || (window as unknown as PrivateWindow).ResizeObserver;\n\n const observer = new LocalResizeObserver((entries) => {\n for (const entry of entries) {\n const { left, top, width, height } = entry?.contentRect ?? {};\n animationFrameID.current = window.requestAnimationFrame(() => {\n resize({ height, left, top, width });\n });\n }\n });\n if (target.current) observer.observe(target.current);\n\n return () => {\n window.cancelAnimationFrame(animationFrameID.current);\n observer.disconnect();\n resize.cancel();\n };\n }, [resize, resizeObserverPolyfill]);\n\n return (\n <div\n className={className}\n ref={mergeRefs<HTMLDivElement>([ref, target])}\n style={{ ...defaultParentSizeStyles, ...parentSizeStyles }}\n {...restProps}\n >\n {children({\n ...state,\n ref: target.current,\n resize,\n })}\n </div>\n );\n },\n);\n\nexport default ParentSize;\n"],"mappings":";;;;;AA2DA,MAAM,0BAA+D,CAAC;AACtE,MAAM,0BAA0B;CAAE,QAAQ;CAAQ,OAAO;AAAO;AAEhE,MAAM,aAAa,MAChB,EACC,KACA,WACA,UACA,eAAe,KACf,mBAAmB,yBACnB,kBACA,4BAA4B,MAC5B,wBACA,GAAG,gBACC;CACJ,MAAM,SAAS,OAA8B,IAAI;CACjD,MAAM,mBAAmB,OAAO,CAAC;CAEjC,MAAM,CAAC,OAAO,YAAY,SAA0B;EAClD,QAAQ;EACR,MAAM;EACN,KAAK;EACL,OAAO;CACT,CAAC;CAED,MAAM,SAAS,cAAc;EAC3B,MAAM,aAAa,MAAM,QAAQ,gBAAgB,IAAI,mBAAmB,CAAC,gBAAgB;EAEzF,OAAO,UACJ,aAA8B;GAC7B,UAAU,aAAa;IAKrB,OAJkB,OAAO,KAAK,QACE,CAAC,CAAC,QAAQ,QAAQ,SAAS,SAAS,SAAS,IAC5C,CAAC,CAAC,OAAO,QAAQ,WAAW,SAAS,GAAG,CAEzD,IAAI,WAAW;GACjC,CAAC;EACH,GACA,cACA,EAAE,SAAS,0BAA0B,CACvC;CACF,GAAG;EAAC;EAAc;EAA2B;CAAgB,CAAC;CAE9D,gBAAgB;EAId,MAAM,WAAW,KAFf,0BAA2B,OAAoC,iBAEvB,YAAY;GACpD,KAAK,MAAM,SAAS,SAAS;IAC3B,MAAM,EAAE,MAAM,KAAK,OAAO,WAAW,OAAO,eAAe,CAAC;IAC5D,iBAAiB,UAAU,OAAO,4BAA4B;KAC5D,OAAO;MAAE;MAAQ;MAAM;MAAK;KAAM,CAAC;IACrC,CAAC;GACH;EACF,CAAC;EACD,IAAI,OAAO,SAAS,SAAS,QAAQ,OAAO,OAAO;EAEnD,aAAa;GACX,OAAO,qBAAqB,iBAAiB,OAAO;GACpD,SAAS,WAAW;GACpB,OAAO,OAAO;EAChB;CACF,GAAG,CAAC,QAAQ,sBAAsB,CAAC;CAEnC,OACE,oBAAC,OAAD;EACa;EACX,KAAK,UAA0B,CAAC,KAAK,MAAM,CAAC;EAC5C,OAAO;GAAE,GAAG;GAAyB,GAAG;EAAiB;EACzD,GAAI;EAEH,UAAA,SAAS;GACR,GAAG;GACH,KAAK,OAAO;GACZ;EACF,CAAC;CACE,CAAA;AAET,CACF"}
@@ -0,0 +1,7 @@
1
+ import { SplineProps } from "./type.mjs";
2
+ import { SPEObject, SplineEvent as SplineEvent$1, SplineEventName } from "@splinetool/runtime";
3
+ //#region src/spline/Spline/Spine.d.ts
4
+ declare const Spline: import("react").NamedExoticComponent<SplineProps>;
5
+ //#endregion
6
+ export { type SPEObject, type SplineEvent$1 as SplineEvent, type SplineEventName, Spline as default };
7
+ //# sourceMappingURL=Spine.d.mts.map
@@ -2,8 +2,7 @@
2
2
  import ParentSize from "./ParentSize.mjs";
3
3
  import { memo, useEffect, useRef, useState } from "react";
4
4
  import { jsx } from "react/jsx-runtime";
5
- import { Application } from "@splinetool/runtime";
6
- //#region src/awesome/Spline/Spine.tsx
5
+ //#region src/spline/Spline/Spine.tsx
7
6
  const Spline = memo(({ ref, scene, style, onMouseDown, onMouseUp, onMouseHover, onKeyDown, onKeyUp, onStart, onLookAt, onFollow, onWheel, onLoad, renderOnDemand = true, ...props }) => {
8
7
  const canvasRef = useRef(null);
9
8
  const [isLoading, setIsLoading] = useState(true);
@@ -15,6 +14,9 @@ const Spline = memo(({ ref, scene, style, onMouseDown, onMouseUp, onMouseHover,
15
14
  };
16
15
  useEffect(() => {
17
16
  setIsLoading(true);
17
+ const canvas = canvasRef.current;
18
+ if (!canvas) return;
19
+ let disposed = false;
18
20
  let speApp;
19
21
  const events = [
20
22
  {
@@ -54,11 +56,14 @@ const Spline = memo(({ ref, scene, style, onMouseDown, onMouseUp, onMouseHover,
54
56
  name: "scroll"
55
57
  }
56
58
  ];
57
- if (canvasRef.current) {
58
- speApp = new Application(canvasRef.current, { renderOnDemand });
59
+ import("@splinetool/runtime").then((runtime) => {
60
+ if (disposed) return;
61
+ speApp = new runtime.Application(canvas, { renderOnDemand });
59
62
  init(speApp, events);
60
- }
63
+ });
61
64
  return () => {
65
+ disposed = true;
66
+ if (!speApp) return;
62
67
  for (const event of events) if (event.cb) speApp.removeEventListener(event.name, event.cb);
63
68
  speApp.dispose();
64
69
  };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Spine.mjs","names":[],"sources":["../../../src/spline/Spline/Spine.tsx"],"sourcesContent":["'use client';\n\nimport type { Application, SplineEvent, SplineEventName } from '@splinetool/runtime';\nimport { memo, useEffect, useRef, useState } from 'react';\n\nimport ParentSize from './ParentSize';\nimport { type SplineProps } from './type';\n\nconst Spline = memo<SplineProps>(\n ({\n ref,\n scene,\n style,\n onMouseDown,\n onMouseUp,\n onMouseHover,\n onKeyDown,\n onKeyUp,\n onStart,\n onLookAt,\n onFollow,\n onWheel,\n onLoad,\n renderOnDemand = true,\n ...props\n }) => {\n const canvasRef = useRef<HTMLCanvasElement>(null);\n const [isLoading, setIsLoading] = useState(true);\n\n const init = async (\n speApp: Application,\n events: {\n cb?: (e: SplineEvent) => void;\n name: SplineEventName;\n }[],\n ) => {\n await speApp.load(scene);\n\n for (const event of events) {\n if (event.cb) {\n speApp.addEventListener(event.name, event.cb);\n }\n }\n\n setIsLoading(false);\n onLoad?.(speApp);\n };\n\n // Initialize runtime when component is mounted\n useEffect(() => {\n setIsLoading(true);\n\n const canvas = canvasRef.current;\n if (!canvas) return;\n\n let disposed = false;\n let speApp: Application | undefined;\n const events: {\n cb?: (e: SplineEvent) => void;\n name: SplineEventName;\n }[] = [\n {\n cb: onMouseDown,\n name: 'mouseDown',\n },\n {\n cb: onMouseUp,\n name: 'mouseUp',\n },\n {\n cb: onMouseHover,\n name: 'mouseHover',\n },\n {\n cb: onKeyDown,\n name: 'keyDown',\n },\n {\n cb: onKeyUp,\n name: 'keyUp',\n },\n {\n cb: onStart,\n name: 'start',\n },\n {\n cb: onLookAt,\n name: 'lookAt',\n },\n {\n cb: onFollow,\n name: 'follow',\n },\n {\n cb: onWheel,\n name: 'scroll',\n },\n ];\n\n void import('@splinetool/runtime').then((runtime) => {\n if (disposed) return;\n speApp = new runtime.Application(canvas, { renderOnDemand });\n void init(speApp, events);\n });\n\n return () => {\n disposed = true;\n if (!speApp) return;\n for (const event of events) {\n if (event.cb) {\n speApp.removeEventListener(event.name, event.cb);\n }\n }\n speApp.dispose();\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [scene]);\n\n return (\n <ParentSize debounceTime={50} parentSizeStyles={style} ref={ref} {...props}>\n {() => {\n return (\n <canvas\n ref={canvasRef}\n style={{\n display: isLoading ? 'none' : 'block',\n }}\n />\n );\n }}\n </ParentSize>\n );\n },\n);\n\nSpline.displayName = 'Spline';\n\nexport default Spline;\n\nexport type { SPEObject, SplineEvent, SplineEventName } from '@splinetool/runtime';\n"],"mappings":";;;;;AAQA,MAAM,SAAS,MACZ,EACC,KACA,OACA,OACA,aACA,WACA,cACA,WACA,SACA,SACA,UACA,UACA,SACA,QACA,iBAAiB,MACjB,GAAG,YACC;CACJ,MAAM,YAAY,OAA0B,IAAI;CAChD,MAAM,CAAC,WAAW,gBAAgB,SAAS,IAAI;CAE/C,MAAM,OAAO,OACX,QACA,WAIG;EACH,MAAM,OAAO,KAAK,KAAK;EAEvB,KAAK,MAAM,SAAS,QAClB,IAAI,MAAM,IACR,OAAO,iBAAiB,MAAM,MAAM,MAAM,EAAE;EAIhD,aAAa,KAAK;EAClB,SAAS,MAAM;CACjB;CAGA,gBAAgB;EACd,aAAa,IAAI;EAEjB,MAAM,SAAS,UAAU;EACzB,IAAI,CAAC,QAAQ;EAEb,IAAI,WAAW;EACf,IAAI;EACJ,MAAM,SAGA;GACJ;IACE,IAAI;IACJ,MAAM;GACR;GACA;IACE,IAAI;IACJ,MAAM;GACR;GACA;IACE,IAAI;IACJ,MAAM;GACR;GACA;IACE,IAAI;IACJ,MAAM;GACR;GACA;IACE,IAAI;IACJ,MAAM;GACR;GACA;IACE,IAAI;IACJ,MAAM;GACR;GACA;IACE,IAAI;IACJ,MAAM;GACR;GACA;IACE,IAAI;IACJ,MAAM;GACR;GACA;IACE,IAAI;IACJ,MAAM;GACR;EACF;EAEA,OAAY,sBAAsB,CAAC,MAAM,YAAY;GACnD,IAAI,UAAU;GACd,SAAS,IAAI,QAAQ,YAAY,QAAQ,EAAE,eAAe,CAAC;GAC3D,KAAU,QAAQ,MAAM;EAC1B,CAAC;EAED,aAAa;GACX,WAAW;GACX,IAAI,CAAC,QAAQ;GACb,KAAK,MAAM,SAAS,QAClB,IAAI,MAAM,IACR,OAAO,oBAAoB,MAAM,MAAM,MAAM,EAAE;GAGnD,OAAO,QAAQ;EACjB;CAEF,GAAG,CAAC,KAAK,CAAC;CAEV,OACE,oBAAC,YAAD;EAAY,cAAc;EAAI,kBAAkB;EAAY;EAAK,GAAI;EAC5D,gBAAA;GACL,OACE,oBAAC,UAAD;IACE,KAAK;IACL,OAAO,EACL,SAAS,YAAY,SAAS,QAChC;GACD,CAAA;EAEL;CACU,CAAA;AAEhB,CACF;AAEA,OAAO,cAAc"}
@@ -1,6 +1,6 @@
1
1
  import { HTMLAttributes, Ref } from "react";
2
2
  import { Application, SplineEvent } from "@splinetool/runtime";
3
- //#region src/awesome/Spline/type.d.ts
3
+ //#region src/spline/Spline/type.d.ts
4
4
  export interface SplineProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onLoad' | 'onMouseDown' | 'onMouseUp' | 'onMouseHover' | 'onKeyDown' | 'onKeyUp' | 'onWheel'> {
5
5
  onFollow?: (e: SplineEvent) => void;
6
6
  onKeyDown?: (e: SplineEvent) => void;
@@ -0,0 +1,6 @@
1
+ import { SplineProps } from "./Spline/type.mjs";
2
+ import Spline, { SPEObject, SplineEvent, SplineEventName } from "./Spline/Spine.mjs";
3
+ import "./Spline/index.mjs";
4
+ import LogoThree, { LogoThreeProps } from "./LogoThree/index.mjs";
5
+ import LogoSpline, { LogoSplineProps } from "./LogoThree/LogoSpline.mjs";
6
+ export { LogoSpline, type LogoSplineProps, LogoThree, type LogoThreeProps, type SPEObject, Spline, type SplineEvent, type SplineEventName, type SplineProps };
@@ -0,0 +1 @@
1
+ export * from './index.d.mts';
@@ -0,0 +1 @@
1
+ export * from './index.mjs';
@@ -0,0 +1,4 @@
1
+ import Spline from "./Spline/Spine.mjs";
2
+ import LogoThree from "./LogoThree/index.mjs";
3
+ import LogoSpline from "./LogoThree/LogoSpline.mjs";
4
+ export { LogoSpline, LogoThree, Spline };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/ui",
3
- "version": "6.0.4",
3
+ "version": "6.0.5",
4
4
  "description": "Lobe UI is an open-source UI component library for building AIGC web apps",
5
5
  "keywords": [
6
6
  "lobehub",
@@ -49,6 +49,10 @@
49
49
  "types": "./es/brand/index.d.mts",
50
50
  "import": "./es/brand/index.mjs"
51
51
  },
52
+ "./spline": {
53
+ "types": "./es/spline/index.d.mts",
54
+ "import": "./es/spline/index.mjs"
55
+ },
52
56
  "./chat": {
53
57
  "types": "./es/chat/index.d.mts",
54
58
  "import": "./es/chat/index.mjs"
@@ -149,7 +153,6 @@
149
153
  "@shikijs/core": "^4.5.0",
150
154
  "@shikijs/stream": "^4.5.0",
151
155
  "@shikijs/transformers": "^4.5.0",
152
- "@splinetool/runtime": "1.12.98",
153
156
  "@stylexjs/stylex": "0.19.1",
154
157
  "@tanstack/form-core": "^1.33.5",
155
158
  "@tanstack/react-table": "^9.2.8",
@@ -188,10 +191,16 @@
188
191
  "peerDependencies": {
189
192
  "@lobehub/fluent-emoji": "^5.0.0-beta.1",
190
193
  "@lobehub/icons": "^6.0.0-beta.1",
194
+ "@splinetool/runtime": "^1.12.0",
191
195
  "motion": "^13.0.0 || ^14.0.0",
192
196
  "react": "^19.0.0",
193
197
  "react-dom": "^19.0.0"
194
198
  },
199
+ "peerDependenciesMeta": {
200
+ "@splinetool/runtime": {
201
+ "optional": true
202
+ }
203
+ },
195
204
  "packageManager": "pnpm@12.3.4+sha512.961aa41fb077da3a04a441d9f8e15ebc0c96da8ef710b2eb67bf9ee7cb0610eabd48f1fd85f51cffe73846785fa0f87c56a3a872a1d893f8446741b5cce45457",
196
205
  "engines": {
197
206
  "node": ">=22.22.0"
@@ -1 +0,0 @@
1
- {"version":3,"file":"ParentSize.mjs","names":[],"sources":["../../../src/awesome/Spline/ParentSize.tsx"],"sourcesContent":["import { debounce } from 'es-toolkit/compat';\nimport {\n type CSSProperties,\n memo,\n type ReactNode,\n type Ref,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\n\nimport { mergeRefs } from '@/utils/mergeRefs';\n\ninterface ResizeObserverCallback {\n (entries: ResizeObserverEntry[], observer: ResizeObserver): void;\n}\n\ninterface ResizeObserverPolyfill {\n new (callback: ResizeObserverCallback): ResizeObserver;\n}\n\n// @TODO remove when upgraded to TS 4 which has its own declaration\ninterface PrivateWindow {\n ResizeObserver: ResizeObserverPolyfill;\n}\n\nexport interface ParentSizeProps {\n /** Child render function `({ width, height, top, left, ref, resize }) => ReactNode`. */\n children: (\n args: {\n ref: HTMLDivElement | null;\n resize: (state: ParentSizeState) => void;\n } & ParentSizeState,\n ) => ReactNode;\n /** Optional `className` to add to the parent `div` wrapper used for size measurement. */\n className?: string;\n /** Child render updates upon resize are delayed until `debounceTime` milliseconds _after_ the last resize event is observed. */\n debounceTime?: number;\n /** Optional flag to toggle leading debounce calls. When set to true this will ensure that the component always renders immediately. (defaults to true) */\n enableDebounceLeadingCall?: boolean;\n /** Optional dimensions provided won't trigger a state change when changed. */\n ignoreDimensions?: keyof ParentSizeState | (keyof ParentSizeState)[];\n /** Optional `style` object to apply to the parent `div` wrapper used for size measurement. */\n parentSizeStyles?: CSSProperties;\n ref?: Ref<HTMLDivElement>;\n /** Optionally inject a ResizeObserver polyfill, else this *must* be globally available. */\n resizeObserverPolyfill?: ResizeObserverPolyfill;\n}\n\ntype ParentSizeState = {\n height: number;\n left: number;\n top: number;\n width: number;\n};\n\nexport type ParentSizeProvidedProps = ParentSizeState;\n\nconst defaultIgnoreDimensions: ParentSizeProps['ignoreDimensions'] = [];\nconst defaultParentSizeStyles = { height: '100%', width: '100%' };\n\nconst ParentSize = memo<ParentSizeProps>(\n ({\n ref,\n className,\n children,\n debounceTime = 300,\n ignoreDimensions = defaultIgnoreDimensions,\n parentSizeStyles,\n enableDebounceLeadingCall = true,\n resizeObserverPolyfill,\n ...restProps\n }) => {\n const target = useRef<HTMLDivElement | null>(null);\n const animationFrameID = useRef(0);\n\n const [state, setState] = useState<ParentSizeState>({\n height: 0,\n left: 0,\n top: 0,\n width: 0,\n });\n\n const resize = useMemo(() => {\n const normalized = Array.isArray(ignoreDimensions) ? ignoreDimensions : [ignoreDimensions];\n\n return debounce(\n (incoming: ParentSizeState) => {\n setState((existing) => {\n const stateKeys = Object.keys(existing) as (keyof ParentSizeState)[];\n const keysWithChanges = stateKeys.filter((key) => existing[key] !== incoming[key]);\n const shouldBail = keysWithChanges.every((key) => normalized.includes(key));\n\n return shouldBail ? existing : incoming;\n });\n },\n debounceTime,\n { leading: enableDebounceLeadingCall },\n );\n }, [debounceTime, enableDebounceLeadingCall, ignoreDimensions]);\n\n useEffect(() => {\n const LocalResizeObserver =\n resizeObserverPolyfill || (window as unknown as PrivateWindow).ResizeObserver;\n\n const observer = new LocalResizeObserver((entries) => {\n for (const entry of entries) {\n const { left, top, width, height } = entry?.contentRect ?? {};\n animationFrameID.current = window.requestAnimationFrame(() => {\n resize({ height, left, top, width });\n });\n }\n });\n if (target.current) observer.observe(target.current);\n\n return () => {\n window.cancelAnimationFrame(animationFrameID.current);\n observer.disconnect();\n resize.cancel();\n };\n }, [resize, resizeObserverPolyfill]);\n\n return (\n <div\n className={className}\n ref={mergeRefs<HTMLDivElement>([ref, target])}\n style={{ ...defaultParentSizeStyles, ...parentSizeStyles }}\n {...restProps}\n >\n {children({\n ...state,\n ref: target.current,\n resize,\n })}\n </div>\n );\n },\n);\n\nexport default ParentSize;\n"],"mappings":";;;;;AA2DA,MAAM,0BAA+D,CAAC;AACtE,MAAM,0BAA0B;CAAE,QAAQ;CAAQ,OAAO;AAAO;AAEhE,MAAM,aAAa,MAChB,EACC,KACA,WACA,UACA,eAAe,KACf,mBAAmB,yBACnB,kBACA,4BAA4B,MAC5B,wBACA,GAAG,gBACC;CACJ,MAAM,SAAS,OAA8B,IAAI;CACjD,MAAM,mBAAmB,OAAO,CAAC;CAEjC,MAAM,CAAC,OAAO,YAAY,SAA0B;EAClD,QAAQ;EACR,MAAM;EACN,KAAK;EACL,OAAO;CACT,CAAC;CAED,MAAM,SAAS,cAAc;EAC3B,MAAM,aAAa,MAAM,QAAQ,gBAAgB,IAAI,mBAAmB,CAAC,gBAAgB;EAEzF,OAAO,UACJ,aAA8B;GAC7B,UAAU,aAAa;IAKrB,OAJkB,OAAO,KAAK,QACE,CAAC,CAAC,QAAQ,QAAQ,SAAS,SAAS,SAAS,IAC5C,CAAC,CAAC,OAAO,QAAQ,WAAW,SAAS,GAAG,CAEzD,IAAI,WAAW;GACjC,CAAC;EACH,GACA,cACA,EAAE,SAAS,0BAA0B,CACvC;CACF,GAAG;EAAC;EAAc;EAA2B;CAAgB,CAAC;CAE9D,gBAAgB;EAId,MAAM,WAAW,KAFf,0BAA2B,OAAoC,iBAEvB,YAAY;GACpD,KAAK,MAAM,SAAS,SAAS;IAC3B,MAAM,EAAE,MAAM,KAAK,OAAO,WAAW,OAAO,eAAe,CAAC;IAC5D,iBAAiB,UAAU,OAAO,4BAA4B;KAC5D,OAAO;MAAE;MAAQ;MAAM;MAAK;KAAM,CAAC;IACrC,CAAC;GACH;EACF,CAAC;EACD,IAAI,OAAO,SAAS,SAAS,QAAQ,OAAO,OAAO;EAEnD,aAAa;GACX,OAAO,qBAAqB,iBAAiB,OAAO;GACpD,SAAS,WAAW;GACpB,OAAO,OAAO;EAChB;CACF,GAAG,CAAC,QAAQ,sBAAsB,CAAC;CAEnC,OACE,oBAAC,OAAD;EACa;EACX,KAAK,UAA0B,CAAC,KAAK,MAAM,CAAC;EAC5C,OAAO;GAAE,GAAG;GAAyB,GAAG;EAAiB;EACzD,GAAI;EAEH,UAAA,SAAS;GACR,GAAG;GACH,KAAK,OAAO;GACZ;EACF,CAAC;CACE,CAAA;AAET,CACF"}
@@ -1,7 +0,0 @@
1
- import { SplineProps } from "./type.mjs";
2
- import "@splinetool/runtime";
3
- //#region src/awesome/Spline/Spine.d.ts
4
- declare const Spline: import("react").NamedExoticComponent<SplineProps>;
5
- //#endregion
6
- export { Spline as default };
7
- //# sourceMappingURL=Spine.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Spine.mjs","names":[],"sources":["../../../src/awesome/Spline/Spine.tsx"],"sourcesContent":["'use client';\n\nimport { type SplineEvent, type SplineEventName } from '@splinetool/runtime';\nimport { Application } from '@splinetool/runtime';\nimport { memo, useEffect, useRef, useState } from 'react';\n\nimport ParentSize from './ParentSize';\nimport { type SplineProps } from './type';\n\nconst Spline = memo<SplineProps>(\n ({\n ref,\n scene,\n style,\n onMouseDown,\n onMouseUp,\n onMouseHover,\n onKeyDown,\n onKeyUp,\n onStart,\n onLookAt,\n onFollow,\n onWheel,\n onLoad,\n renderOnDemand = true,\n ...props\n }) => {\n const canvasRef = useRef<HTMLCanvasElement>(null);\n const [isLoading, setIsLoading] = useState(true);\n\n const init = async (\n speApp: Application,\n events: {\n cb?: (e: SplineEvent) => void;\n name: SplineEventName;\n }[],\n ) => {\n await speApp.load(scene);\n\n for (const event of events) {\n if (event.cb) {\n speApp.addEventListener(event.name, event.cb);\n }\n }\n\n setIsLoading(false);\n onLoad?.(speApp);\n };\n\n // Initialize runtime when component is mounted\n useEffect(() => {\n setIsLoading(true);\n\n let speApp: Application;\n const events: {\n cb?: (e: SplineEvent) => void;\n name: SplineEventName;\n }[] = [\n {\n cb: onMouseDown,\n name: 'mouseDown',\n },\n {\n cb: onMouseUp,\n name: 'mouseUp',\n },\n {\n cb: onMouseHover,\n name: 'mouseHover',\n },\n {\n cb: onKeyDown,\n name: 'keyDown',\n },\n {\n cb: onKeyUp,\n name: 'keyUp',\n },\n {\n cb: onStart,\n name: 'start',\n },\n {\n cb: onLookAt,\n name: 'lookAt',\n },\n {\n cb: onFollow,\n name: 'follow',\n },\n {\n cb: onWheel,\n name: 'scroll',\n },\n ];\n\n if (canvasRef.current) {\n speApp = new Application(canvasRef.current, { renderOnDemand });\n init(speApp, events);\n }\n\n return () => {\n for (const event of events) {\n if (event.cb) {\n speApp.removeEventListener(event.name, event.cb);\n }\n }\n speApp.dispose();\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [scene]);\n\n return (\n <ParentSize debounceTime={50} parentSizeStyles={style} ref={ref} {...props}>\n {() => {\n return (\n <canvas\n ref={canvasRef}\n style={{\n display: isLoading ? 'none' : 'block',\n }}\n />\n );\n }}\n </ParentSize>\n );\n },\n);\n\nSpline.displayName = 'Spline';\n\nexport default Spline;\n\nexport { type SPEObject, type SplineEvent, type SplineEventName } from '@splinetool/runtime';\n"],"mappings":";;;;;;AASA,MAAM,SAAS,MACZ,EACC,KACA,OACA,OACA,aACA,WACA,cACA,WACA,SACA,SACA,UACA,UACA,SACA,QACA,iBAAiB,MACjB,GAAG,YACC;CACJ,MAAM,YAAY,OAA0B,IAAI;CAChD,MAAM,CAAC,WAAW,gBAAgB,SAAS,IAAI;CAE/C,MAAM,OAAO,OACX,QACA,WAIG;EACH,MAAM,OAAO,KAAK,KAAK;EAEvB,KAAK,MAAM,SAAS,QAClB,IAAI,MAAM,IACR,OAAO,iBAAiB,MAAM,MAAM,MAAM,EAAE;EAIhD,aAAa,KAAK;EAClB,SAAS,MAAM;CACjB;CAGA,gBAAgB;EACd,aAAa,IAAI;EAEjB,IAAI;EACJ,MAAM,SAGA;GACJ;IACE,IAAI;IACJ,MAAM;GACR;GACA;IACE,IAAI;IACJ,MAAM;GACR;GACA;IACE,IAAI;IACJ,MAAM;GACR;GACA;IACE,IAAI;IACJ,MAAM;GACR;GACA;IACE,IAAI;IACJ,MAAM;GACR;GACA;IACE,IAAI;IACJ,MAAM;GACR;GACA;IACE,IAAI;IACJ,MAAM;GACR;GACA;IACE,IAAI;IACJ,MAAM;GACR;GACA;IACE,IAAI;IACJ,MAAM;GACR;EACF;EAEA,IAAI,UAAU,SAAS;GACrB,SAAS,IAAI,YAAY,UAAU,SAAS,EAAE,eAAe,CAAC;GAC9D,KAAK,QAAQ,MAAM;EACrB;EAEA,aAAa;GACX,KAAK,MAAM,SAAS,QAClB,IAAI,MAAM,IACR,OAAO,oBAAoB,MAAM,MAAM,MAAM,EAAE;GAGnD,OAAO,QAAQ;EACjB;CAEF,GAAG,CAAC,KAAK,CAAC;CAEV,OACE,oBAAC,YAAD;EAAY,cAAc;EAAI,kBAAkB;EAAY;EAAK,GAAI;EAC5D,gBAAA;GACL,OACE,oBAAC,UAAD;IACE,KAAK;IACL,OAAO,EACL,SAAS,YAAY,SAAS,QAChC;GACD,CAAA;EAEL;CACU,CAAA;AAEhB,CACF;AAEA,OAAO,cAAc"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Loading.mjs","names":[],"sources":["../../../src/brand/LogoThree/Loading.tsx"],"sourcesContent":["import { Loader2 } from 'lucide-react';\nimport { type FC } from 'react';\n\nimport { Center } from '@/Flex';\nimport Icon from '@/Icon';\n\nconst Loading: FC<{ size?: number }> = ({ size = 32 }) => {\n return (\n <Center height={'100%'} justify={'center'} style={{ position: 'absolute' }} width={'100%'}>\n <Icon spin icon={Loader2} size={size} />\n </Center>\n );\n};\n\nexport default Loading;\n"],"mappings":";;;;;AAMA,MAAM,WAAkC,EAAE,OAAO,SAAS;CACxD,OACE,oBAAC,QAAD;EAAQ,QAAQ;EAAQ,SAAS;EAAU,OAAO,EAAE,UAAU,WAAW;EAAG,OAAO;EACjF,UAAA,oBAAC,MAAD;GAAM,MAAA;GAAK,MAAM;GAAe;EAAO,CAAA;CACjC,CAAA;AAEZ"}
File without changes