@lobehub/ui 6.9.1 → 6.10.1

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.
@@ -1,13 +1,13 @@
1
1
  import "@stylexjs/stylex";
2
2
  export declare const accordionStyles: {
3
3
  panel: string;
4
+ header: string;
4
5
  action: string;
5
6
  content: string;
6
7
  trigger: string;
7
- header: string;
8
- root: string;
9
8
  indicator: string;
10
9
  item: string;
10
+ root: string;
11
11
  itemOutlined: string;
12
12
  rootOutlined: string;
13
13
  actionAlwaysVisible: string;
@@ -41,7 +41,7 @@ declare const styleArrays: {
41
41
  }> | Readonly<{
42
42
  readonly backgroundColor: stylex.StyleXClassNameFor<"backgroundColor", "transparent">;
43
43
  readonly cursor: stylex.StyleXClassNameFor<"cursor", "default">;
44
- readonly display: stylex.StyleXClassNameFor<"display", "flex" | "none">;
44
+ readonly display: stylex.StyleXClassNameFor<"display", "none" | "flex">;
45
45
  }>)[];
46
46
  item: Readonly<{
47
47
  readonly borderRadius: stylex.StyleXClassNameFor<"borderRadius", string>;
@@ -7,7 +7,7 @@ import Icon from "../Icon/Icon.mjs";
7
7
  import { buttonClasses } from "./stable.mjs";
8
8
  import { styles } from "./style.mjs";
9
9
  import clsx$1 from "clsx";
10
- import { isValidElement } from "react";
10
+ import { isValidElement, useLayoutEffect, useRef, useState } from "react";
11
11
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
12
12
  import * as stylex from "@stylexjs/stylex";
13
13
  // src/Button/Button.tsx
@@ -53,6 +53,21 @@ const motionTransition = {
53
53
  };
54
54
  const ButtonImpl = ({ block, children, className, classNames, danger = false, disabled, outdent, ghost = false, href, htmlType = "button", icon, iconPosition = "start", loading, onClick, ref, shape = "default", size = "middle", stableData, styles: userStyles, target, type = "default", xstyle, ...rest }) => {
55
55
  const Motion = useMotionComponent();
56
+ const spinnerRef = useRef(null);
57
+ const spinnerVisualRef = useRef(null);
58
+ const [spinnerPresent, setSpinnerPresent] = useState(!!loading);
59
+ if (loading && !spinnerPresent) setSpinnerPresent(true);
60
+ useLayoutEffect(() => {
61
+ if (loading || !spinnerPresent) return;
62
+ const exits = [...spinnerRef.current?.getAnimations?.() ?? [], ...spinnerVisualRef.current?.getAnimations?.() ?? []].filter((animation) => "transitionProperty" in animation);
63
+ let canceled = false;
64
+ Promise.allSettled(exits.map((animation) => animation.finished)).then(() => {
65
+ if (!canceled) setSpinnerPresent(false);
66
+ });
67
+ return () => {
68
+ canceled = true;
69
+ };
70
+ }, [loading, spinnerPresent]);
56
71
  const isInteractionDisabled = disabled || loading;
57
72
  const sizeCls = resolveSizeCls(size);
58
73
  const variantCls = resolveVariantCls({
@@ -86,13 +101,18 @@ const ButtonImpl = ({ block, children, className, classNames, danger = false, di
86
101
  });
87
102
  const spinnerNode = /* @__PURE__ */ jsx("span", {
88
103
  "aria-hidden": !loading,
104
+ ref: spinnerRef,
89
105
  ...styleProps([
90
106
  styles.iconBox,
91
107
  styles.spinnerSlot,
92
108
  iconPosition === "end" && styles.spinnerSlotEnd,
93
109
  loading && styles.spinnerSlotShow
94
110
  ], clsx$1(buttonClasses("spinner"), classNames?.icon), userStyles?.icon),
95
- children: /* @__PURE__ */ jsx("span", { ...stylex.props(styles.spinner) })
111
+ children: /* @__PURE__ */ jsx("span", {
112
+ ref: spinnerVisualRef,
113
+ ...stylex.props(styles.spinnerVisual, loading && styles.spinnerVisualShow),
114
+ children: (loading || spinnerPresent) && /* @__PURE__ */ jsx("span", { ...stylex.props(styles.spinner) })
115
+ })
96
116
  });
97
117
  const iconNode = icon && !loading ? /* @__PURE__ */ jsx("span", {
98
118
  ...styleProps(styles.iconBox, clsx$1(buttonClasses("icon"), classNames?.icon), userStyles?.icon),
@@ -1 +1 @@
1
- {"version":3,"file":"Button.mjs","names":["clsx"],"sources":["../../src/Button/Button.tsx"],"sourcesContent":["'use client';\n\nimport * as stylex from '@stylexjs/stylex';\nimport clsx from 'clsx';\nimport {\n isValidElement,\n type MouseEvent,\n type ReactElement,\n type ReactNode,\n type Ref,\n} from 'react';\n\nimport Icon, { type IconProps } from '@/Icon';\nimport { useMotionComponent } from '@/MotionProvider';\nimport { focusRing } from '@/styles/stylex/focusRing';\nimport { styleProps } from '@/styles/stylex/props';\nimport { toDataAttributes } from '@/utils/bem';\n\nimport { buttonClasses } from './stable';\nimport { styles } from './style';\nimport type { ButtonOutdent, ButtonProps, ButtonType } from './type';\n\nconst resolveIconNode = (node: ReactNode | IconProps['icon'] | undefined | null) => {\n if (node === undefined || node === null) return null;\n if (isValidElement(node) || typeof node === 'string' || typeof node === 'number') {\n return node;\n }\n return <Icon icon={node as any} size={'small'} />;\n};\n\nconst resolveSizeCls = (size: ButtonProps['size']) => {\n if (size === 'small') return styles.sizeSmall;\n if (size === 'large') return styles.sizeLarge;\n return styles.sizeMiddle;\n};\n\nconst resolveIconOnlySizeCls = (size: ButtonProps['size']) => {\n if (size === 'small') return styles.iconOnlySmall;\n if (size === 'large') return styles.iconOnlyLarge;\n return styles.iconOnlyMiddle;\n};\n\nconst resolveVariantCls = ({\n danger,\n ghost,\n type,\n}: {\n danger: boolean;\n ghost: boolean;\n type: NonNullable<ButtonProps['type']>;\n}) => {\n // `text` and `link` already drop the surface, so `ghost` there would only cost them\n // their own traits (link's zero inline padding).\n if (ghost && type !== 'text' && type !== 'link') {\n if (danger) return styles.ghostDanger;\n if (type === 'primary') return styles.ghostPrimary;\n return styles.ghostDefault;\n }\n\n switch (type) {\n case 'primary': {\n return danger ? styles.dangerSolid : styles.variantPrimary;\n }\n case 'dashed': {\n return danger ? [styles.variantDashed, styles.dangerOutlined] : styles.variantDashed;\n }\n case 'fill': {\n return danger ? styles.dangerFill : styles.variantFill;\n }\n case 'text': {\n return danger ? [styles.variantText, styles.dangerText] : styles.variantText;\n }\n case 'link': {\n return danger ? [styles.variantLink, styles.dangerInline] : styles.variantLink;\n }\n default: {\n return danger ? [styles.variantDefault, styles.dangerOutlined] : styles.variantDefault;\n }\n }\n};\n\nconst tapAnim = { scale: 0.98 };\nconst motionTransition = {\n damping: 26,\n mass: 0.6,\n stiffness: 600,\n type: 'spring' as const,\n};\n\ntype ButtonImplProps = Omit<ButtonProps, 'outdent' | 'type'> & {\n outdent?: ButtonOutdent;\n stableData?: Record<`data-${string}`, string>;\n type?: ButtonType;\n xstyle?: Parameters<typeof styleProps>[0];\n};\n\nconst ButtonImpl = ({\n block,\n children,\n className,\n classNames,\n danger = false,\n disabled,\n outdent,\n ghost = false,\n href,\n htmlType = 'button',\n icon,\n iconPosition = 'start',\n loading,\n onClick,\n ref,\n shape = 'default',\n size = 'middle',\n stableData,\n styles: userStyles,\n target,\n type = 'default',\n xstyle,\n ...rest\n}: ButtonImplProps) => {\n const Motion = useMotionComponent();\n const isInteractionDisabled = disabled || loading;\n const sizeCls = resolveSizeCls(size);\n const variantCls = resolveVariantCls({ danger, ghost, type });\n const shapeCls =\n shape === 'circle' ? styles.shapeCircle : shape === 'round' ? styles.shapeRound : undefined;\n\n const hasChildren =\n children !== undefined && children !== null && children !== false && children !== '';\n const renderIcon = loading || icon;\n const iconOnly = !hasChildren && !!renderIcon;\n const iconOnlySizeCls = iconOnly ? resolveIconOnlySizeCls(size) : undefined;\n\n const outdentCls =\n type === 'text' && outdent\n ? outdent === 'end'\n ? styles.outdentEnd\n : styles.outdentStart\n : undefined;\n\n const composedClassName = styleProps(\n [\n styles.base,\n focusRing.info,\n sizeCls,\n variantCls,\n shapeCls,\n block && styles.block,\n iconPosition === 'end' && styles.iconEnd,\n iconOnlySizeCls,\n outdentCls,\n xstyle,\n ],\n clsx(buttonClasses(), className),\n ).className;\n\n const dataAttributes =\n stableData ?? toDataAttributes({ block, danger, ghost, loading, shape, size, type });\n\n const spinnerNode = (\n <span\n aria-hidden={!loading}\n {...styleProps(\n [\n styles.iconBox,\n styles.spinnerSlot,\n iconPosition === 'end' && styles.spinnerSlotEnd,\n loading && styles.spinnerSlotShow,\n ],\n clsx(buttonClasses('spinner'), classNames?.icon),\n userStyles?.icon,\n )}\n >\n <span {...stylex.props(styles.spinner)} />\n </span>\n );\n\n const iconNode =\n icon && !loading ? (\n <span\n {...styleProps(\n styles.iconBox,\n clsx(buttonClasses('icon'), classNames?.icon),\n userStyles?.icon,\n )}\n >\n {resolveIconNode(icon)}\n </span>\n ) : null;\n\n const inner = (\n <>\n {spinnerNode}\n {iconNode}\n {children}\n </>\n );\n\n const motionGestures = isInteractionDisabled\n ? {}\n : { transition: motionTransition, whileTap: tapAnim };\n\n if (href !== undefined) {\n const handleAnchorClick = (e: MouseEvent<HTMLAnchorElement>) => {\n if (isInteractionDisabled) {\n e.preventDefault();\n return;\n }\n onClick?.(e as unknown as MouseEvent<HTMLButtonElement>);\n };\n\n return (\n <Motion.a\n aria-busy={loading || undefined}\n aria-disabled={isInteractionDisabled || undefined}\n href={disabled ? undefined : href}\n target={target}\n {...dataAttributes}\n {...(rest as any)}\n className={composedClassName}\n ref={ref as Ref<HTMLAnchorElement>}\n onClick={handleAnchorClick}\n {...motionGestures}\n >\n {inner}\n </Motion.a>\n );\n }\n\n const handleButtonClick = (e: MouseEvent<HTMLButtonElement>) => {\n if (isInteractionDisabled) {\n e.preventDefault();\n return;\n }\n onClick?.(e);\n };\n\n return (\n <Motion.button\n type={htmlType}\n {...dataAttributes}\n {...(rest as any)}\n aria-busy={loading || undefined}\n aria-disabled={isInteractionDisabled || undefined}\n className={composedClassName}\n disabled={disabled}\n ref={ref as Ref<HTMLButtonElement>}\n onClick={handleButtonClick}\n {...motionGestures}\n >\n {inner}\n </Motion.button>\n );\n};\n\nButtonImpl.displayName = 'BaseButton';\n\nexport { ButtonImpl };\n\nconst Button = ButtonImpl as <T extends ButtonType = 'default'>(\n props: ButtonProps<T>,\n) => ReactElement;\n\nexport default Button;\n"],"mappings":";;;;;;;;;;;;;AAaA,MAAM,mBAAmB,SAA2D;CAClF,IAAI,SAAS,KAAA,KAAa,SAAS,MAAM,OAAO;CAChD,IAAI,eAAe,IAAI,KAAK,OAAO,SAAS,Y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,iBAAiB,wBAAwB,CAAC,IAAI;EAClD,YAAY;EACZ,UAAU;CACZ;CACA,IAAI,SAAS,KAAA,GAAW;EACtB,MAAM,qBAAqB,MAAqC;GAC9D,IAAI,uBAAuB;IACzB,EAAE,eAAe;IACjB;GACF;GACA,UAAU,CAA6C;EACzD;EACA,OAAO,oBAAC,OAAO,GAAR;GAAU,aAAW,WAAW,KAAA;GAAW,iBAAe,yBAAyB,KAAA;GAAW,MAAM,WAAW,KAAA,IAAY;GAAc;GAAQ,GAAI;GAAgB,GAAI;GAAa,WAAW;GAAwB;GAA+B,SAAS;GAAmB,GAAI;GAC1R,UAAA;EACO,CAAA;CACd;CACA,MAAM,qBAAqB,MAAqC;EAC9D,IAAI,uBAAuB;GACzB,EAAE,eAAe;GACjB;EACF;EACA,UAAU,CAAC;CACb;CACA,OAAO,oBAAC,OAAO,QAAR;EAAe,MAAM;EAAU,GAAI;EAAgB,GAAI;EAAa,aAAW,WAAW,KAAA;EAAW,iBAAe,yBAAyB,KAAA;EAAW,WAAW;EAA6B;EAAe;EAA+B,SAAS;EAAmB,GAAI;EAChR,UAAA;CACY,CAAA;AACnB;AACA,WAAW,cAAc;AAEzB,MAAM,SAAS"}
1
+ {"version":3,"file":"Button.mjs","names":["clsx"],"sources":["../../src/Button/Button.tsx"],"sourcesContent":["'use client';\n\nimport * as stylex from '@stylexjs/stylex';\nimport clsx from 'clsx';\nimport {\n isValidElement,\n type MouseEvent,\n type ReactElement,\n type ReactNode,\n type Ref,\n useLayoutEffect,\n useRef,\n useState,\n} from 'react';\n\nimport Icon, { type IconProps } from '@/Icon';\nimport { useMotionComponent } from '@/MotionProvider';\nimport { focusRing } from '@/styles/stylex/focusRing';\nimport { styleProps } from '@/styles/stylex/props';\nimport { toDataAttributes } from '@/utils/bem';\n\nimport { buttonClasses } from './stable';\nimport { styles } from './style';\nimport type { ButtonOutdent, ButtonProps, ButtonType } from './type';\n\nconst resolveIconNode = (node: ReactNode | IconProps['icon'] | undefined | null) => {\n if (node === undefined || node === null) return null;\n if (isValidElement(node) || typeof node === 'string' || typeof node === 'number') {\n return node;\n }\n return <Icon icon={node as any} size={'small'} />;\n};\n\nconst resolveSizeCls = (size: ButtonProps['size']) => {\n if (size === 'small') return styles.sizeSmall;\n if (size === 'large') return styles.sizeLarge;\n return styles.sizeMiddle;\n};\n\nconst resolveIconOnlySizeCls = (size: ButtonProps['size']) => {\n if (size === 'small') return styles.iconOnlySmall;\n if (size === 'large') return styles.iconOnlyLarge;\n return styles.iconOnlyMiddle;\n};\n\nconst resolveVariantCls = ({\n danger,\n ghost,\n type,\n}: {\n danger: boolean;\n ghost: boolean;\n type: NonNullable<ButtonProps['type']>;\n}) => {\n // `text` and `link` already drop the surface, so `ghost` there would only cost them\n // their own traits (link's zero inline padding).\n if (ghost && type !== 'text' && type !== 'link') {\n if (danger) return styles.ghostDanger;\n if (type === 'primary') return styles.ghostPrimary;\n return styles.ghostDefault;\n }\n\n switch (type) {\n case 'primary': {\n return danger ? styles.dangerSolid : styles.variantPrimary;\n }\n case 'dashed': {\n return danger ? [styles.variantDashed, styles.dangerOutlined] : styles.variantDashed;\n }\n case 'fill': {\n return danger ? styles.dangerFill : styles.variantFill;\n }\n case 'text': {\n return danger ? [styles.variantText, styles.dangerText] : styles.variantText;\n }\n case 'link': {\n return danger ? [styles.variantLink, styles.dangerInline] : styles.variantLink;\n }\n default: {\n return danger ? [styles.variantDefault, styles.dangerOutlined] : styles.variantDefault;\n }\n }\n};\n\nconst tapAnim = { scale: 0.98 };\nconst motionTransition = {\n damping: 26,\n mass: 0.6,\n stiffness: 600,\n type: 'spring' as const,\n};\n\ntype ButtonImplProps = Omit<ButtonProps, 'outdent' | 'type'> & {\n outdent?: ButtonOutdent;\n stableData?: Record<`data-${string}`, string>;\n type?: ButtonType;\n xstyle?: Parameters<typeof styleProps>[0];\n};\n\nconst ButtonImpl = ({\n block,\n children,\n className,\n classNames,\n danger = false,\n disabled,\n outdent,\n ghost = false,\n href,\n htmlType = 'button',\n icon,\n iconPosition = 'start',\n loading,\n onClick,\n ref,\n shape = 'default',\n size = 'middle',\n stableData,\n styles: userStyles,\n target,\n type = 'default',\n xstyle,\n ...rest\n}: ButtonImplProps) => {\n const Motion = useMotionComponent();\n const spinnerRef = useRef<HTMLSpanElement>(null);\n const spinnerVisualRef = useRef<HTMLSpanElement>(null);\n const [spinnerPresent, setSpinnerPresent] = useState(!!loading);\n\n if (loading && !spinnerPresent) setSpinnerPresent(true);\n\n useLayoutEffect(() => {\n if (loading || !spinnerPresent) return;\n\n // Wait for both exit layers, never the child's infinite rotation.\n const exits = [\n ...(spinnerRef.current?.getAnimations?.() ?? []),\n ...(spinnerVisualRef.current?.getAnimations?.() ?? []),\n ].filter((animation) => 'transitionProperty' in animation);\n let canceled = false;\n Promise.allSettled(exits.map((animation) => animation.finished)).then(() => {\n if (!canceled) setSpinnerPresent(false);\n });\n return () => {\n canceled = true;\n };\n }, [loading, spinnerPresent]);\n\n const isInteractionDisabled = disabled || loading;\n const sizeCls = resolveSizeCls(size);\n const variantCls = resolveVariantCls({ danger, ghost, type });\n const shapeCls =\n shape === 'circle' ? styles.shapeCircle : shape === 'round' ? styles.shapeRound : undefined;\n\n const hasChildren =\n children !== undefined && children !== null && children !== false && children !== '';\n const renderIcon = loading || icon;\n const iconOnly = !hasChildren && !!renderIcon;\n const iconOnlySizeCls = iconOnly ? resolveIconOnlySizeCls(size) : undefined;\n\n const outdentCls =\n type === 'text' && outdent\n ? outdent === 'end'\n ? styles.outdentEnd\n : styles.outdentStart\n : undefined;\n\n const composedClassName = styleProps(\n [\n styles.base,\n focusRing.info,\n sizeCls,\n variantCls,\n shapeCls,\n block && styles.block,\n iconPosition === 'end' && styles.iconEnd,\n iconOnlySizeCls,\n outdentCls,\n xstyle,\n ],\n clsx(buttonClasses(), className),\n ).className;\n\n const dataAttributes =\n stableData ?? toDataAttributes({ block, danger, ghost, loading, shape, size, type });\n\n const spinnerNode = (\n <span\n aria-hidden={!loading}\n ref={spinnerRef}\n {...styleProps(\n [\n styles.iconBox,\n styles.spinnerSlot,\n iconPosition === 'end' && styles.spinnerSlotEnd,\n loading && styles.spinnerSlotShow,\n ],\n clsx(buttonClasses('spinner'), classNames?.icon),\n userStyles?.icon,\n )}\n >\n <span\n ref={spinnerVisualRef}\n {...stylex.props(styles.spinnerVisual, loading && styles.spinnerVisualShow)}\n >\n {(loading || spinnerPresent) && <span {...stylex.props(styles.spinner)} />}\n </span>\n </span>\n );\n\n const iconNode =\n icon && !loading ? (\n <span\n {...styleProps(\n styles.iconBox,\n clsx(buttonClasses('icon'), classNames?.icon),\n userStyles?.icon,\n )}\n >\n {resolveIconNode(icon)}\n </span>\n ) : null;\n\n const inner = (\n <>\n {spinnerNode}\n {iconNode}\n {children}\n </>\n );\n\n const motionGestures = isInteractionDisabled\n ? {}\n : { transition: motionTransition, whileTap: tapAnim };\n\n if (href !== undefined) {\n const handleAnchorClick = (e: MouseEvent<HTMLAnchorElement>) => {\n if (isInteractionDisabled) {\n e.preventDefault();\n return;\n }\n onClick?.(e as unknown as MouseEvent<HTMLButtonElement>);\n };\n\n return (\n <Motion.a\n aria-busy={loading || undefined}\n aria-disabled={isInteractionDisabled || undefined}\n href={disabled ? undefined : href}\n target={target}\n {...dataAttributes}\n {...(rest as any)}\n className={composedClassName}\n ref={ref as Ref<HTMLAnchorElement>}\n onClick={handleAnchorClick}\n {...motionGestures}\n >\n {inner}\n </Motion.a>\n );\n }\n\n const handleButtonClick = (e: MouseEvent<HTMLButtonElement>) => {\n if (isInteractionDisabled) {\n e.preventDefault();\n return;\n }\n onClick?.(e);\n };\n\n return (\n <Motion.button\n type={htmlType}\n {...dataAttributes}\n {...(rest as any)}\n aria-busy={loading || undefined}\n aria-disabled={isInteractionDisabled || undefined}\n className={composedClassName}\n disabled={disabled}\n ref={ref as Ref<HTMLButtonElement>}\n onClick={handleButtonClick}\n {...motionGestures}\n >\n {inner}\n </Motion.button>\n );\n};\n\nButtonImpl.displayName = 'BaseButton';\n\nexport { ButtonImpl };\n\nconst Button = ButtonImpl as <T extends ButtonType = 'default'>(\n props: ButtonProps<T>,\n) => ReactElement;\n\nexport default Button;\n"],"mappings":";;;;;;;;;;;;;AAaA,MAAM,mBAAmB,SAA2D;CAClF,IAAI,SAAS,KAAA,KAAa,SAAS,MAAM,OAAO;CAChD,IAAI,eAAe,IAAI,KAAK,OAAO,SAAS,YAAY,OAAO,SAAS,UACtE,OAAO;CAET,OAAO,oBAAC,MAAD;EAAM,MAAM;EAAa,MAAM;CAAU,CAAA;AAClD;AACA,MAAM,kBAAkB,SAA8B;CACpD,IAAI,SAAS,SAAS,OAAO,OAAO;CACpC,IAAI,SAAS,SAAS,OAAO,OAAO;CACpC,OAAO,OAAO;AAChB;AACA,MAAM,0BAA0B,SAA8B;CAC5D,IAAI,SAAS,SAAS,OAAO,OAAO;CACpC,IAAI,SAAS,SAAS,OAAO,OAAO;CACpC,OAAO,OAAO;AAChB;AACA,MAAM,qBAAqB,EACzB,QACA,OACA,WAKI;CAGJ,IAAI,SAAS,SAAS,UAAU,SAAS,QAAQ;EAC/C,IAAI,QAAQ,OAAO,OAAO;EAC1B,IAAI,SAAS,WAAW,OAAO,OAAO;EACtC,OAAO,OAAO;CAChB;CACA,QAAQ,MAAR;EACE,KAAK,WAED,OAAO,SAAS,OAAO,cAAc,OAAO;EAEhD,KAAK,UAED,OAAO,SAAS,CAAC,OAAO,eAAe,OAAO,cAAc,IAAI,OAAO;EAE3E,KAAK,QAED,OAAO,SAAS,OAAO,aAAa,OAAO;EAE/C,KAAK,QAED,OAAO,SAAS,CAAC,OAAO,aAAa,OAAO,UAAU,IAAI,OAAO;EAErE,KAAK,QAED,OAAO,SAAS,CAAC,OAAO,aAAa,OAAO,YAAY,IAAI,OAAO;EAEvE,SAEI,OAAO,SAAS,CAAC,OAAO,gBAAgB,OAAO,cAAc,IAAI,OAAO;CAE9E;AACF;AACA,MAAM,UAAU,EACd,OAAO,IACT;AACA,MAAM,mBAAmB;CACvB,SAA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AW,MAAM,WAAW,KAAA,IAAY;GAAc;GAAQ,GAAI;GAAgB,GAAI;GAAa,WAAW;GAAwB;GAA+B,SAAS;GAAmB,GAAI;GAC1R,UAAA;EACO,CAAA;CACd;CACA,MAAM,qBAAqB,MAAqC;EAC9D,IAAI,uBAAuB;GACzB,EAAE,eAAe;GACjB;EACF;EACA,UAAU,CAAC;CACb;CACA,OAAO,oBAAC,OAAO,QAAR;EAAe,MAAM;EAAU,GAAI;EAAgB,GAAI;EAAa,aAAW,WAAW,KAAA;EAAW,iBAAe,yBAAyB,KAAA;EAAW,WAAW;EAA6B;EAAe;EAA+B,SAAS;EAAmB,GAAI;EAChR,UAAA;CACY,CAAA;AACnB;AACA,WAAW,cAAc;AAEzB,MAAM,SAAS"}
@@ -85,10 +85,12 @@ export declare const styles: Readonly<{
85
85
  readonly justifyContent: stylex.StyleXClassNameFor<"justifyContent", "center">;
86
86
  }>;
87
87
  readonly spinnerSlot: Readonly<{
88
- readonly overflow: stylex.StyleXClassNameFor<"overflow", "hidden">;
89
- readonly transition: stylex.StyleXClassNameFor<"transition", "width 380ms cubic-bezier(0.22, 1, 0.36, 1), margin 380ms cubic-bezier(0.22, 1, 0.36, 1), opacity 260ms cubic-bezier(0.22, 1, 0.36, 1)">;
88
+ readonly overflow: stylex.StyleXClassNameFor<"overflow", "visible">;
89
+ readonly transition: stylex.StyleXClassNameFor<"transition", "width 300ms cubic-bezier(0.22, 1, 0.36, 1), margin 300ms cubic-bezier(0.22, 1, 0.36, 1)">;
90
+ readonly flexShrink: stylex.StyleXClassNameFor<"flexShrink", 0>;
90
91
  readonly marginInlineEnd: stylex.StyleXClassNameFor<"marginInlineEnd", -6>;
91
- readonly opacity: stylex.StyleXClassNameFor<"opacity", 0>;
92
+ readonly position: stylex.StyleXClassNameFor<"position", "relative">;
93
+ readonly height: stylex.StyleXClassNameFor<"height", 12>;
92
94
  readonly width: stylex.StyleXClassNameFor<"width", 0>;
93
95
  }>;
94
96
  readonly spinnerSlotEnd: Readonly<{
@@ -98,9 +100,23 @@ export declare const styles: Readonly<{
98
100
  readonly spinnerSlotShow: Readonly<{
99
101
  readonly marginInlineEnd: stylex.StyleXClassNameFor<"marginInlineEnd", 0>;
100
102
  readonly marginInlineStart: stylex.StyleXClassNameFor<"marginInlineStart", 0>;
101
- readonly opacity: stylex.StyleXClassNameFor<"opacity", 1>;
102
103
  readonly width: stylex.StyleXClassNameFor<"width", 12>;
103
104
  }>;
105
+ readonly spinnerVisual: Readonly<{
106
+ readonly transition: stylex.StyleXClassNameFor<"transition", "transform 180ms cubic-bezier(0.22, 1, 0.36, 1), opacity 180ms ease-out">;
107
+ readonly insetBlockStart: stylex.StyleXClassNameFor<"insetBlockStart", 0>;
108
+ readonly insetInlineStart: stylex.StyleXClassNameFor<"insetInlineStart", 0>;
109
+ readonly opacity: stylex.StyleXClassNameFor<"opacity", 0>;
110
+ readonly position: stylex.StyleXClassNameFor<"position", "absolute">;
111
+ readonly transform: stylex.StyleXClassNameFor<"transform", "scale(0.5)">;
112
+ readonly transformOrigin: stylex.StyleXClassNameFor<"transformOrigin", "center">;
113
+ readonly height: stylex.StyleXClassNameFor<"height", 12>;
114
+ readonly width: stylex.StyleXClassNameFor<"width", 12>;
115
+ }>;
116
+ readonly spinnerVisualShow: Readonly<{
117
+ readonly opacity: stylex.StyleXClassNameFor<"opacity", 1>;
118
+ readonly transform: stylex.StyleXClassNameFor<"transform", "scale(1)">;
119
+ }>;
104
120
  readonly variantDefault: Readonly<{
105
121
  readonly borderColor: stylex.StyleXClassNameFor<"borderColor", string>;
106
122
  readonly backgroundColor: stylex.StyleXClassNameFor<"backgroundColor", string>;
@@ -183,7 +199,9 @@ export declare const styles: Readonly<{
183
199
  readonly animationName: stylex.StyleXClassNameFor<"animationName", string>;
184
200
  readonly animationTimingFunction: stylex.StyleXClassNameFor<"animationTimingFunction", "linear">;
185
201
  readonly borderBlockStartColor: stylex.StyleXClassNameFor<"borderBlockStartColor", "transparent">;
202
+ readonly boxSizing: stylex.StyleXClassNameFor<"boxSizing", "border-box">;
186
203
  readonly display: stylex.StyleXClassNameFor<"display", "inline-block">;
204
+ readonly flexShrink: stylex.StyleXClassNameFor<"flexShrink", 0>;
187
205
  readonly height: stylex.StyleXClassNameFor<"height", 12>;
188
206
  readonly width: stylex.StyleXClassNameFor<"width", 12>;
189
207
  }>;
@@ -115,10 +115,12 @@ const styles = {
115
115
  $$css: true
116
116
  },
117
117
  spinnerSlot: {
118
- kVQacm: "lbb3r6kr",
119
- kmkexE: "lb10tmjme",
118
+ kVQacm: "lb1rea2x4",
119
+ kmkexE: "lbp7890b",
120
+ kmuXW: "lb2lah0s",
120
121
  k71WvV: "lb1ws5yxj",
121
- kSiTet: "lbg01cxk",
122
+ kVAEAm: "lb1n2onr6",
123
+ kZKoxP: "lb1kpxq89",
122
124
  kzqmXN: "lbnalus7",
123
125
  $$css: true
124
126
  },
@@ -130,10 +132,26 @@ const styles = {
130
132
  spinnerSlotShow: {
131
133
  k71WvV: "lb14z9mp",
132
134
  keTefX: "lb1lziwak",
133
- kSiTet: "lb1hc1fzr",
134
135
  kzqmXN: "lbsmyaan",
135
136
  $$css: true
136
137
  },
138
+ spinnerVisual: {
139
+ kmkexE: "lb1ja9v0h",
140
+ k87sOh: "lb13vifvy",
141
+ kLqNvP: "lb1o0tod",
142
+ kSiTet: "lbg01cxk",
143
+ kVAEAm: "lb10l6tqk",
144
+ k3aq6I: "lb1a33avv",
145
+ k3nNDw: "lb1g0ag68",
146
+ kZKoxP: "lb1kpxq89",
147
+ kzqmXN: "lbsmyaan",
148
+ $$css: true
149
+ },
150
+ spinnerVisualShow: {
151
+ kSiTet: "lb1hc1fzr",
152
+ k3aq6I: "lb3oybdh",
153
+ $$css: true
154
+ },
137
155
  variantDefault: {
138
156
  kVAM5u: "lbqnr5ac lbv4eugq",
139
157
  kWkggS: "lb6yijhg",
@@ -230,7 +248,9 @@ const styles = {
230
248
  kKVMdj: "lb1v0ides",
231
249
  kyAemX: "lb1esw782",
232
250
  kLZC3w: "lb1v8p93f",
251
+ kB7OPa: "lb9f619",
233
252
  k1xSpc: "lb1rg5ohu",
253
+ kmuXW: "lb2lah0s",
234
254
  kZKoxP: "lb1kpxq89",
235
255
  kzqmXN: "lbsmyaan",
236
256
  $$css: true
@@ -1 +1 @@
1
- {"version":3,"file":"style.mjs","names":[],"sources":["../../src/Button/style.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\n\nimport { cssVar } from '@/styles/stylex/cssVar.stylex';\n\nexport const buttonPaddingInline = {\n large: 16,\n middle: 14,\n small: 8,\n} as const;\n\nconst disabled = ':is(:disabled, [aria-disabled=\"true\"])';\nconst hover = ':hover:not(:disabled, [aria-disabled=\"true\"])';\nconst active = ':active:not(:disabled, [aria-disabled=\"true\"])';\nconst hoverIdle = ':hover:not(:active, :disabled, [aria-disabled=\"true\"])';\nconst hoverIdleClosed = ':hover:not(:active, :disabled, [aria-disabled=\"true\"], [data-popup-open])';\nconst popupOpen = ':is([data-popup-open])';\n\nconst spin = stylex.keyframes({\n to: { transform: 'rotate(360deg)' },\n});\n\nconst ease = 'cubic-bezier(0.32, 0.72, 0, 1)';\n\nconst errorHover = `color-mix(in srgb, ${cssVar.colorError} 88%, white)`;\nconst errorActive = `color-mix(in srgb, ${cssVar.colorError} 88%, black)`;\nconst borderHover = `color-mix(in srgb, ${cssVar.colorText} 8%, ${cssVar.colorBorder})`;\nconst neutralWash = `linear-gradient(${cssVar.colorFillTertiary}, ${cssVar.colorFillTertiary})`;\nconst neutralWashActive = `linear-gradient(${cssVar.colorFillSecondary}, ${cssVar.colorFillSecondary})`;\nconst error10 = `color-mix(in srgb, ${cssVar.colorError} 10%, transparent)`;\nconst error12 = `color-mix(in srgb, ${cssVar.colorError} 12%, transparent)`;\nconst error16 = `color-mix(in srgb, ${cssVar.colorError} 16%, transparent)`;\nconst error18 = `color-mix(in srgb, ${cssVar.colorError} 18%, transparent)`;\nconst error22 = `color-mix(in srgb, ${cssVar.colorError} 22%, transparent)`;\nconst error40 = `color-mix(in srgb, ${cssVar.colorError} 40%, transparent)`;\nconst error65 = `color-mix(in srgb, ${cssVar.colorError} 65%, transparent)`;\nconst errorOnContainer8 = `color-mix(in srgb, ${cssVar.colorError} 8%, ${cssVar.colorBgContainer})`;\nconst errorOnContainer14 = `color-mix(in srgb, ${cssVar.colorError} 14%, ${cssVar.colorBgContainer})`;\nconst slotEase = 'cubic-bezier(0.22, 1, 0.36, 1)';\n\nexport const styles = stylex.create({\n base: {\n borderColor: cssVar.colorBorder,\n borderStyle: 'solid',\n borderWidth: 1,\n gap: 6,\n textDecoration: 'none',\n transition: `color 160ms ${ease}, background-color 160ms ${ease}, background-image 160ms ${ease}, border-color 160ms ${ease}, box-shadow 160ms ${ease}`,\n alignItems: 'center',\n boxSizing: 'border-box',\n cursor: { default: 'pointer', [disabled]: 'not-allowed' },\n display: 'inline-flex',\n fontWeight: 500,\n justifyContent: 'center',\n lineHeight: 1,\n opacity: { default: null, [disabled]: 0.5 },\n pointerEvents: { default: null, [disabled]: 'none' },\n position: 'relative',\n whiteSpace: 'nowrap',\n },\n\n sizeSmall: {\n '--button-padding-inline': `${buttonPaddingInline.small}px`,\n 'borderRadius': cssVar.borderRadiusSM,\n 'paddingInline': 'var(--button-padding-inline)',\n 'fontSize': 12,\n 'height': 24,\n },\n\n sizeMiddle: {\n '--button-padding-inline': `${buttonPaddingInline.middle}px`,\n 'borderRadius': cssVar.borderRadiusSM,\n 'paddingInline': 'var(--button-padding-inline)',\n 'fontSize': 13,\n 'height': 32,\n },\n\n sizeLarge: {\n '--button-padding-inline': `${buttonPaddingInline.large}px`,\n 'borderRadius': cssVar.borderRadius,\n 'paddingInline': 'var(--button-padding-inline)',\n 'fontSize': 14,\n 'height': 40,\n },\n\n outdentStart: {\n marginInlineStart: 'calc(var(--button-padding-inline) * -1)',\n },\n\n outdentEnd: {\n marginInlineEnd: 'calc(var(--button-padding-inline) * -1)',\n },\n\n shapeCircle: {\n borderRadius: '50%',\n paddingInline: 0,\n },\n\n shapeRound: {\n borderRadius: 999,\n },\n\n block: {\n width: '100%',\n },\n\n iconEnd: {\n flexDirection: 'row-reverse',\n },\n\n iconOnlySmall: {\n '--button-padding-inline': '0px',\n 'paddingInline': 0,\n 'width': 24,\n },\n\n iconOnlyMiddle: {\n '--button-padding-inline': '0px',\n 'paddingInline': 0,\n 'width': 32,\n },\n\n iconOnlyLarge: {\n '--button-padding-inline': '0px',\n 'paddingInline': 0,\n 'width': 40,\n },\n\n iconBox: {\n alignItems: 'center',\n display: 'inline-flex',\n justifyContent: 'center',\n },\n\n spinnerSlot: {\n overflow: 'hidden',\n transition: `width 380ms ${slotEase}, margin 380ms ${slotEase}, opacity 260ms ${slotEase}`,\n marginInlineEnd: -6,\n opacity: 0,\n width: 0,\n },\n\n spinnerSlotEnd: {\n marginInlineEnd: 0,\n marginInlineStart: -6,\n },\n\n spinnerSlotShow: {\n marginInlineEnd: 0,\n marginInlineStart: 0,\n opacity: 1,\n width: 12,\n },\n\n variantDefault: {\n borderColor: { default: cssVar.colorBorder, [hover]: borderHover },\n backgroundColor: cssVar.colorBgContainer,\n backgroundImage: {\n [active]: neutralWashActive,\n default: null,\n [hoverIdle]: neutralWash,\n },\n color: cssVar.colorText,\n },\n\n variantPrimary: {\n borderColor: {\n [active]: cssVar.colorPrimaryActive,\n default: cssVar.colorPrimary,\n [hoverIdleClosed]: cssVar.colorPrimaryHover,\n [popupOpen]: cssVar.colorPrimaryActive,\n },\n backgroundColor: {\n [active]: cssVar.colorPrimaryActive,\n default: cssVar.colorPrimary,\n [hoverIdleClosed]: cssVar.colorPrimaryHover,\n [popupOpen]: cssVar.colorPrimaryActive,\n },\n color: cssVar.colorBgLayout,\n },\n\n variantDashed: {\n borderColor: { default: cssVar.colorBorder, [hover]: borderHover },\n borderStyle: 'dashed',\n backgroundColor: cssVar.colorBgContainer,\n backgroundImage: {\n [active]: neutralWashActive,\n default: null,\n [hoverIdle]: neutralWash,\n },\n color: cssVar.colorText,\n },\n\n variantFill: {\n borderColor: 'transparent',\n backgroundColor: {\n [active]: cssVar.colorFill,\n default: cssVar.colorFillTertiary,\n [hoverIdle]: cssVar.colorFillSecondary,\n },\n color: cssVar.colorText,\n },\n\n variantText: {\n borderColor: 'transparent',\n backgroundColor: { default: 'transparent', [hover]: cssVar.colorFillSecondary },\n color: cssVar.colorText,\n },\n\n variantLink: {\n borderColor: 'transparent',\n paddingInline: 0,\n backgroundColor: 'transparent',\n color: { default: cssVar.colorPrimary, [hover]: cssVar.colorPrimaryHover },\n },\n\n dangerOutlined: {\n borderColor: { default: error40, [hover]: error65 },\n backgroundColor: {\n [active]: errorOnContainer14,\n default: cssVar.colorBgContainer,\n [hoverIdle]: errorOnContainer8,\n },\n backgroundImage: null,\n color: cssVar.colorError,\n },\n\n dangerSolid: {\n borderColor: {\n [active]: errorActive,\n default: cssVar.colorError,\n [hoverIdleClosed]: errorHover,\n [popupOpen]: errorActive,\n },\n backgroundColor: {\n [active]: errorActive,\n default: cssVar.colorError,\n [hoverIdleClosed]: errorHover,\n [popupOpen]: errorActive,\n },\n color: cssVar.colorBgLayout,\n },\n\n dangerFill: {\n borderColor: 'transparent',\n backgroundColor: {\n [active]: error22,\n default: error12,\n [hoverIdle]: error18,\n },\n color: cssVar.colorError,\n },\n\n dangerText: {\n backgroundColor: {\n [active]: error16,\n default: 'transparent',\n [hoverIdle]: error10,\n },\n color: cssVar.colorError,\n },\n\n dangerInline: {\n color: { default: cssVar.colorError, [hover]: errorHover },\n },\n\n ghostDefault: {\n borderColor: 'transparent',\n backgroundColor: {\n [active]: cssVar.colorFill,\n default: 'transparent',\n [hoverIdle]: cssVar.colorFillSecondary,\n },\n color: cssVar.colorText,\n },\n\n ghostPrimary: {\n borderColor: 'transparent',\n backgroundColor: {\n [active]: cssVar.colorFill,\n default: 'transparent',\n [hoverIdle]: cssVar.colorFillSecondary,\n },\n color: {\n [active]: cssVar.colorPrimaryActive,\n default: cssVar.colorPrimary,\n [hoverIdle]: cssVar.colorPrimaryHover,\n },\n },\n\n ghostDanger: {\n borderColor: 'transparent',\n backgroundColor: {\n [active]: error16,\n default: 'transparent',\n [hoverIdle]: error10,\n },\n color: cssVar.colorError,\n },\n\n spinner: {\n borderColor: 'currentcolor',\n borderRadius: '50%',\n borderStyle: 'solid',\n borderWidth: 1.5,\n animationDuration: '0.6s',\n animationIterationCount: 'infinite',\n animationName: spin,\n animationTimingFunction: 'linear',\n borderBlockStartColor: 'transparent',\n display: 'inline-block',\n height: 12,\n width: 12,\n },\n});\n\nconst hasHover = ':has(> :where(button, a):hover:not(:disabled, [aria-disabled=\"true\"]))';\nconst hasActive = ':has(> :where(button, a):active:not(:disabled, [aria-disabled=\"true\"]))';\nconst hasHoverOnly = `${hasHover}:not(${hasActive})`;\nconst first = ':first-of-type';\nconst last = ':last-of-type';\n\nexport const splitStyles = stylex.create({\n root: {\n display: 'inline-flex',\n flexDirection: 'row',\n },\n interactionDisabled: {\n opacity: 0.5,\n },\n solidPrimary: {\n '--lobe-split-button-fill': {\n default: null,\n [hasActive]: cssVar.colorPrimaryActive,\n [hasHoverOnly]: cssVar.colorPrimaryHover,\n },\n },\n solidDanger: {\n '--lobe-split-button-fill': {\n default: null,\n [hasActive]: errorActive,\n [hasHoverOnly]: errorHover,\n },\n },\n item: {\n borderEndEndRadius: { default: null, [first]: 0 },\n borderEndStartRadius: { default: null, [last]: 0 },\n borderStartEndRadius: { default: null, [first]: 0 },\n borderStartStartRadius: { default: null, [last]: 0 },\n marginInlineStart: { default: null, [last]: -1 },\n },\n itemInteractionDisabled: {\n opacity: { default: null, [disabled]: 1 },\n },\n itemSolid: {\n // solid halves share one color, so the outline-merging overlap only adds a dark seam once each half is translucent (disabled)\n 'marginInlineStart': { default: null, [last]: 0 },\n '::before': {\n insetBlock: { default: null, [last]: 0 },\n backgroundColor: { default: null, [last]: 'currentcolor' },\n content: { default: null, [last]: \"''\" },\n insetInlineStart: { default: null, [last]: 0 },\n opacity: { default: null, [last]: 0.2 },\n pointerEvents: { default: null, [last]: 'none' },\n position: { default: null, [last]: 'absolute' },\n width: { default: null, [last]: 1 },\n },\n },\n itemFillDanger: {\n borderColor: {\n default: `var(--lobe-split-button-fill, ${cssVar.colorError})`,\n [popupOpen]: errorActive,\n },\n backgroundColor: {\n default: `var(--lobe-split-button-fill, ${cssVar.colorError})`,\n [popupOpen]: errorActive,\n },\n },\n itemFillGhost: {\n borderColor: 'var(--lobe-split-button-fill, transparent)',\n backgroundColor: 'var(--lobe-split-button-fill, transparent)',\n },\n itemFillPrimary: {\n borderColor: {\n default: `var(--lobe-split-button-fill, ${cssVar.colorPrimary})`,\n [popupOpen]: cssVar.colorPrimaryActive,\n },\n backgroundColor: {\n default: `var(--lobe-split-button-fill, ${cssVar.colorPrimary})`,\n [popupOpen]: cssVar.colorPrimaryActive,\n },\n },\n});\n\nexport const buttonStyles = Object.fromEntries(\n Object.entries(styles).map(([key, value]) => [key, stylex.props(value).className ?? '']),\n) as Record<keyof typeof styles, string>;\n"],"mappings":";;;AAGA,MAAa,sBAAsB;CACjC,OAAO;CACP,QAAQ;CACR,OAAO;AACT;AASmB,GAAsB,OAAO;AAC5B,GAAsB,OAAO;AAC7B,GAAsB,OAAO,YAAiB,OAAO;AACrD,GAAmB,OAAO,oBAAsB,OAAO;AACjD,GAAmB,OAAO,qBAAuB,OAAO;AAClE,GAAsB,OAAO;AAC7B,GAAsB,OAAO;AAC7B,GAAsB,OAAO;AAC7B,GAAsB,OAAO;AAC7B,GAAsB,OAAO;AAC7B,GAAsB,OAAO;AAC7B,GAAsB,OAAO;AACnB,GAAsB,OAAO,aAAkB,OAAO;AACrD,GAAsB,OAAO,aAAmB,OAAO;AAElF,MAAa,SAAS;CACpB,MAAM;EACJ,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ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CACA,WAAW;EACT,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,gBAAgB;EACd,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,eAAe;EACb,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,iBAAiB;EACf,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;AACF;AACA,MAAa,eAAe,OAAO,YAAY,OAAO,QAAQ,MAAM,CAAC,CAAC,KAAK,CAAC,KAAK,WAAW,CAAC,KAAK,OAAO,MAAM,KAAK,CAAC,CAAC,aAAa,EAAE,CAAC,CAAC"}
1
+ {"version":3,"file":"style.mjs","names":[],"sources":["../../src/Button/style.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\n\nimport { cssVar } from '@/styles/stylex/cssVar.stylex';\n\nexport const buttonPaddingInline = {\n large: 16,\n middle: 14,\n small: 8,\n} as const;\n\nconst disabled = ':is(:disabled, [aria-disabled=\"true\"])';\nconst hover = ':hover:not(:disabled, [aria-disabled=\"true\"])';\nconst active = ':active:not(:disabled, [aria-disabled=\"true\"])';\nconst hoverIdle = ':hover:not(:active, :disabled, [aria-disabled=\"true\"])';\nconst hoverIdleClosed = ':hover:not(:active, :disabled, [aria-disabled=\"true\"], [data-popup-open])';\nconst popupOpen = ':is([data-popup-open])';\n\nconst spin = stylex.keyframes({\n to: { transform: 'rotate(360deg)' },\n});\n\nconst ease = 'cubic-bezier(0.32, 0.72, 0, 1)';\n\nconst errorHover = `color-mix(in srgb, ${cssVar.colorError} 88%, white)`;\nconst errorActive = `color-mix(in srgb, ${cssVar.colorError} 88%, black)`;\nconst borderHover = `color-mix(in srgb, ${cssVar.colorText} 8%, ${cssVar.colorBorder})`;\nconst neutralWash = `linear-gradient(${cssVar.colorFillTertiary}, ${cssVar.colorFillTertiary})`;\nconst neutralWashActive = `linear-gradient(${cssVar.colorFillSecondary}, ${cssVar.colorFillSecondary})`;\nconst error10 = `color-mix(in srgb, ${cssVar.colorError} 10%, transparent)`;\nconst error12 = `color-mix(in srgb, ${cssVar.colorError} 12%, transparent)`;\nconst error16 = `color-mix(in srgb, ${cssVar.colorError} 16%, transparent)`;\nconst error18 = `color-mix(in srgb, ${cssVar.colorError} 18%, transparent)`;\nconst error22 = `color-mix(in srgb, ${cssVar.colorError} 22%, transparent)`;\nconst error40 = `color-mix(in srgb, ${cssVar.colorError} 40%, transparent)`;\nconst error65 = `color-mix(in srgb, ${cssVar.colorError} 65%, transparent)`;\nconst errorOnContainer8 = `color-mix(in srgb, ${cssVar.colorError} 8%, ${cssVar.colorBgContainer})`;\nconst errorOnContainer14 = `color-mix(in srgb, ${cssVar.colorError} 14%, ${cssVar.colorBgContainer})`;\nconst slotEase = 'cubic-bezier(0.22, 1, 0.36, 1)';\n\nexport const styles = stylex.create({\n base: {\n borderColor: cssVar.colorBorder,\n borderStyle: 'solid',\n borderWidth: 1,\n gap: 6,\n textDecoration: 'none',\n transition: `color 160ms ${ease}, background-color 160ms ${ease}, background-image 160ms ${ease}, border-color 160ms ${ease}, box-shadow 160ms ${ease}`,\n alignItems: 'center',\n boxSizing: 'border-box',\n cursor: { default: 'pointer', [disabled]: 'not-allowed' },\n display: 'inline-flex',\n fontWeight: 500,\n justifyContent: 'center',\n lineHeight: 1,\n opacity: { default: null, [disabled]: 0.5 },\n pointerEvents: { default: null, [disabled]: 'none' },\n position: 'relative',\n whiteSpace: 'nowrap',\n },\n\n sizeSmall: {\n '--button-padding-inline': `${buttonPaddingInline.small}px`,\n 'borderRadius': cssVar.borderRadiusSM,\n 'paddingInline': 'var(--button-padding-inline)',\n 'fontSize': 12,\n 'height': 24,\n },\n\n sizeMiddle: {\n '--button-padding-inline': `${buttonPaddingInline.middle}px`,\n 'borderRadius': cssVar.borderRadiusSM,\n 'paddingInline': 'var(--button-padding-inline)',\n 'fontSize': 13,\n 'height': 32,\n },\n\n sizeLarge: {\n '--button-padding-inline': `${buttonPaddingInline.large}px`,\n 'borderRadius': cssVar.borderRadius,\n 'paddingInline': 'var(--button-padding-inline)',\n 'fontSize': 14,\n 'height': 40,\n },\n\n outdentStart: {\n marginInlineStart: 'calc(var(--button-padding-inline) * -1)',\n },\n\n outdentEnd: {\n marginInlineEnd: 'calc(var(--button-padding-inline) * -1)',\n },\n\n shapeCircle: {\n borderRadius: '50%',\n paddingInline: 0,\n },\n\n shapeRound: {\n borderRadius: 999,\n },\n\n block: {\n width: '100%',\n },\n\n iconEnd: {\n flexDirection: 'row-reverse',\n },\n\n iconOnlySmall: {\n '--button-padding-inline': '0px',\n 'paddingInline': 0,\n 'width': 24,\n },\n\n iconOnlyMiddle: {\n '--button-padding-inline': '0px',\n 'paddingInline': 0,\n 'width': 32,\n },\n\n iconOnlyLarge: {\n '--button-padding-inline': '0px',\n 'paddingInline': 0,\n 'width': 40,\n },\n\n iconBox: {\n alignItems: 'center',\n display: 'inline-flex',\n justifyContent: 'center',\n },\n\n spinnerSlot: {\n overflow: 'visible',\n transition: `width 300ms ${slotEase}, margin 300ms ${slotEase}`,\n flexShrink: 0,\n marginInlineEnd: -6,\n position: 'relative',\n height: 12,\n width: 0,\n },\n\n spinnerSlotEnd: {\n marginInlineEnd: 0,\n marginInlineStart: -6,\n },\n\n spinnerSlotShow: {\n marginInlineEnd: 0,\n marginInlineStart: 0,\n width: 12,\n },\n\n spinnerVisual: {\n transition: `transform 180ms ${slotEase}, opacity 180ms ease-out`,\n insetBlockStart: 0,\n insetInlineStart: 0,\n opacity: 0,\n position: 'absolute',\n transform: 'scale(0.5)',\n transformOrigin: 'center',\n height: 12,\n width: 12,\n },\n\n spinnerVisualShow: {\n opacity: 1,\n transform: 'scale(1)',\n },\n\n variantDefault: {\n borderColor: { default: cssVar.colorBorder, [hover]: borderHover },\n backgroundColor: cssVar.colorBgContainer,\n backgroundImage: {\n [active]: neutralWashActive,\n default: null,\n [hoverIdle]: neutralWash,\n },\n color: cssVar.colorText,\n },\n\n variantPrimary: {\n borderColor: {\n [active]: cssVar.colorPrimaryActive,\n default: cssVar.colorPrimary,\n [hoverIdleClosed]: cssVar.colorPrimaryHover,\n [popupOpen]: cssVar.colorPrimaryActive,\n },\n backgroundColor: {\n [active]: cssVar.colorPrimaryActive,\n default: cssVar.colorPrimary,\n [hoverIdleClosed]: cssVar.colorPrimaryHover,\n [popupOpen]: cssVar.colorPrimaryActive,\n },\n color: cssVar.colorBgLayout,\n },\n\n variantDashed: {\n borderColor: { default: cssVar.colorBorder, [hover]: borderHover },\n borderStyle: 'dashed',\n backgroundColor: cssVar.colorBgContainer,\n backgroundImage: {\n [active]: neutralWashActive,\n default: null,\n [hoverIdle]: neutralWash,\n },\n color: cssVar.colorText,\n },\n\n variantFill: {\n borderColor: 'transparent',\n backgroundColor: {\n [active]: cssVar.colorFill,\n default: cssVar.colorFillTertiary,\n [hoverIdle]: cssVar.colorFillSecondary,\n },\n color: cssVar.colorText,\n },\n\n variantText: {\n borderColor: 'transparent',\n backgroundColor: { default: 'transparent', [hover]: cssVar.colorFillSecondary },\n color: cssVar.colorText,\n },\n\n variantLink: {\n borderColor: 'transparent',\n paddingInline: 0,\n backgroundColor: 'transparent',\n color: { default: cssVar.colorPrimary, [hover]: cssVar.colorPrimaryHover },\n },\n\n dangerOutlined: {\n borderColor: { default: error40, [hover]: error65 },\n backgroundColor: {\n [active]: errorOnContainer14,\n default: cssVar.colorBgContainer,\n [hoverIdle]: errorOnContainer8,\n },\n backgroundImage: null,\n color: cssVar.colorError,\n },\n\n dangerSolid: {\n borderColor: {\n [active]: errorActive,\n default: cssVar.colorError,\n [hoverIdleClosed]: errorHover,\n [popupOpen]: errorActive,\n },\n backgroundColor: {\n [active]: errorActive,\n default: cssVar.colorError,\n [hoverIdleClosed]: errorHover,\n [popupOpen]: errorActive,\n },\n color: cssVar.colorBgLayout,\n },\n\n dangerFill: {\n borderColor: 'transparent',\n backgroundColor: {\n [active]: error22,\n default: error12,\n [hoverIdle]: error18,\n },\n color: cssVar.colorError,\n },\n\n dangerText: {\n backgroundColor: {\n [active]: error16,\n default: 'transparent',\n [hoverIdle]: error10,\n },\n color: cssVar.colorError,\n },\n\n dangerInline: {\n color: { default: cssVar.colorError, [hover]: errorHover },\n },\n\n ghostDefault: {\n borderColor: 'transparent',\n backgroundColor: {\n [active]: cssVar.colorFill,\n default: 'transparent',\n [hoverIdle]: cssVar.colorFillSecondary,\n },\n color: cssVar.colorText,\n },\n\n ghostPrimary: {\n borderColor: 'transparent',\n backgroundColor: {\n [active]: cssVar.colorFill,\n default: 'transparent',\n [hoverIdle]: cssVar.colorFillSecondary,\n },\n color: {\n [active]: cssVar.colorPrimaryActive,\n default: cssVar.colorPrimary,\n [hoverIdle]: cssVar.colorPrimaryHover,\n },\n },\n\n ghostDanger: {\n borderColor: 'transparent',\n backgroundColor: {\n [active]: error16,\n default: 'transparent',\n [hoverIdle]: error10,\n },\n color: cssVar.colorError,\n },\n\n spinner: {\n borderColor: 'currentcolor',\n borderRadius: '50%',\n borderStyle: 'solid',\n borderWidth: 1.5,\n animationDuration: '0.6s',\n animationIterationCount: 'infinite',\n animationName: spin,\n animationTimingFunction: 'linear',\n borderBlockStartColor: 'transparent',\n boxSizing: 'border-box',\n display: 'inline-block',\n flexShrink: 0,\n height: 12,\n width: 12,\n },\n});\n\nconst hasHover = ':has(> :where(button, a):hover:not(:disabled, [aria-disabled=\"true\"]))';\nconst hasActive = ':has(> :where(button, a):active:not(:disabled, [aria-disabled=\"true\"]))';\nconst hasHoverOnly = `${hasHover}:not(${hasActive})`;\nconst first = ':first-of-type';\nconst last = ':last-of-type';\n\nexport const splitStyles = stylex.create({\n root: {\n display: 'inline-flex',\n flexDirection: 'row',\n },\n interactionDisabled: {\n opacity: 0.5,\n },\n solidPrimary: {\n '--lobe-split-button-fill': {\n default: null,\n [hasActive]: cssVar.colorPrimaryActive,\n [hasHoverOnly]: cssVar.colorPrimaryHover,\n },\n },\n solidDanger: {\n '--lobe-split-button-fill': {\n default: null,\n [hasActive]: errorActive,\n [hasHoverOnly]: errorHover,\n },\n },\n item: {\n borderEndEndRadius: { default: null, [first]: 0 },\n borderEndStartRadius: { default: null, [last]: 0 },\n borderStartEndRadius: { default: null, [first]: 0 },\n borderStartStartRadius: { default: null, [last]: 0 },\n marginInlineStart: { default: null, [last]: -1 },\n },\n itemInteractionDisabled: {\n opacity: { default: null, [disabled]: 1 },\n },\n itemSolid: {\n // solid halves share one color, so the outline-merging overlap only adds a dark seam once each half is translucent (disabled)\n 'marginInlineStart': { default: null, [last]: 0 },\n '::before': {\n insetBlock: { default: null, [last]: 0 },\n backgroundColor: { default: null, [last]: 'currentcolor' },\n content: { default: null, [last]: \"''\" },\n insetInlineStart: { default: null, [last]: 0 },\n opacity: { default: null, [last]: 0.2 },\n pointerEvents: { default: null, [last]: 'none' },\n position: { default: null, [last]: 'absolute' },\n width: { default: null, [last]: 1 },\n },\n },\n itemFillDanger: {\n borderColor: {\n default: `var(--lobe-split-button-fill, ${cssVar.colorError})`,\n [popupOpen]: errorActive,\n },\n backgroundColor: {\n default: `var(--lobe-split-button-fill, ${cssVar.colorError})`,\n [popupOpen]: errorActive,\n },\n },\n itemFillGhost: {\n borderColor: 'var(--lobe-split-button-fill, transparent)',\n backgroundColor: 'var(--lobe-split-button-fill, transparent)',\n },\n itemFillPrimary: {\n borderColor: {\n default: `var(--lobe-split-button-fill, ${cssVar.colorPrimary})`,\n [popupOpen]: cssVar.colorPrimaryActive,\n },\n backgroundColor: {\n default: `var(--lobe-split-button-fill, ${cssVar.colorPrimary})`,\n [popupOpen]: cssVar.colorPrimaryActive,\n },\n },\n});\n\nexport const buttonStyles = Object.fromEntries(\n Object.entries(styles).map(([key, value]) => [key, stylex.props(value).className ?? '']),\n) as Record<keyof typeof styles, string>;\n"],"mappings":";;;AAGA,MAAa,sBAAsB;CACjC,OAAO;CACP,QAAQ;CACR,OAAO;AACT;AASmB,GAAsB,OAAO;AAC5B,GAAsB,OAAO;AAC7B,G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CSS_VERSION = "0.19.0";
3
- export { KATEX_CSS_VERSION };
3
+ const DEFAULT_WEB_FONTS = [
4
+ {
5
+ path: "css/index-full.css",
6
+ pkg: "@lobehub/webfont-geist",
7
+ version: "1.0.0"
8
+ },
9
+ {
10
+ path: "css/index-full.css",
11
+ pkg: "@lobehub/webfont-geist-mono",
12
+ version: "1.0.0"
13
+ },
14
+ {
15
+ path: "css/index-full.css",
16
+ pkg: "@lobehub/webfont-harmony-sans",
17
+ version: "1.0.0"
18
+ },
19
+ {
20
+ path: "css/index.css",
21
+ pkg: "@lobehub/webfont-harmony-sans-sc",
22
+ version: "1.0.0"
23
+ },
24
+ {
25
+ path: "dist/katex.min.css",
26
+ pkg: "katex",
27
+ version: KATEX_CSS_VERSION
28
+ }
29
+ ];
30
+ export { DEFAULT_WEB_FONTS, KATEX_CSS_VERSION };
4
31
 
5
32
  //# sourceMappingURL=cdnAssets.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"cdnAssets.mjs","names":[],"sources":["../../src/ConfigProvider/cdnAssets.ts"],"sourcesContent":["export const KATEX_CSS_VERSION = '0.19.0';\n"],"mappings":";AAAA,MAAa,oBAAoB"}
1
+ {"version":3,"file":"cdnAssets.mjs","names":[],"sources":["../../src/ConfigProvider/cdnAssets.ts"],"sourcesContent":["import type { CdnApi } from '@/utils/genCdnUrl';\n\nexport const KATEX_CSS_VERSION = '0.19.0';\n\nexport const DEFAULT_WEB_FONTS: CdnApi[] = [\n { path: 'css/index-full.css', pkg: '@lobehub/webfont-geist', version: '1.0.0' },\n { path: 'css/index-full.css', pkg: '@lobehub/webfont-geist-mono', version: '1.0.0' },\n { path: 'css/index-full.css', pkg: '@lobehub/webfont-harmony-sans', version: '1.0.0' },\n { path: 'css/index.css', pkg: '@lobehub/webfont-harmony-sans-sc', version: '1.0.0' },\n { path: 'dist/katex.min.css', pkg: 'katex', version: KATEX_CSS_VERSION },\n];\n"],"mappings":";AAEA,MAAa,oBAAoB;AAEjC,MAAa,oBAA8B;CACzC;EAAE,MAAM;EAAsB,KAAK;EAA0B,SAAS;CAAQ;CAC9E;EAAE,MAAM;EAAsB,KAAK;EAA+B,SAAS;CAAQ;CACnF;EAAE,MAAM;EAAsB,KAAK;EAAiC,SAAS;CAAQ;CACrF;EAAE,MAAM;EAAiB,KAAK;EAAoC,SAAS;CAAQ;CACnF;EAAE,MAAM;EAAsB,KAAK;EAAS,SAAS;CAAkB;AACzE"}
@@ -4,7 +4,7 @@ import { installGlobalFocusRing } from "../GlobalFocusRing/index.mjs";
4
4
  import { MotionComponent } from "../MotionProvider/index.mjs";
5
5
  import { genCdnUrl } from "../utils/genCdnUrl.mjs";
6
6
  import AppElementContext, { useAppElement } from "./AppElementContext.mjs";
7
- import "./cdnAssets.mjs";
7
+ import { DEFAULT_WEB_FONTS } from "./cdnAssets.mjs";
8
8
  import { createContext, memo, use, useEffect, useMemo, useRef, useState } from "react";
9
9
  import { jsx, jsxs } from "react/jsx-runtime";
10
10
  // src/ConfigProvider/index.tsx
@@ -94,28 +94,7 @@ const portalHostStyle = {
94
94
  };
95
95
  const WebFonts = ({ customFonts }) => {
96
96
  const genCdnUrl = useCdnFn();
97
- return useMemo(() => customFonts || [
98
- genCdnUrl({
99
- path: "css/index.css",
100
- pkg: "@lobehub/webfont-mono",
101
- version: "1.0.0"
102
- }),
103
- genCdnUrl({
104
- path: "css/index-full.css",
105
- pkg: "@lobehub/webfont-harmony-sans",
106
- version: "1.0.0"
107
- }),
108
- genCdnUrl({
109
- path: "css/index.css",
110
- pkg: "@lobehub/webfont-harmony-sans-sc",
111
- version: "1.0.0"
112
- }),
113
- genCdnUrl({
114
- path: "dist/katex.min.css",
115
- pkg: "katex",
116
- version: "0.19.0"
117
- })
118
- ], [customFonts, genCdnUrl]).map((url) => /* @__PURE__ */ jsx(FontLoader, { url }, url));
97
+ return useMemo(() => customFonts || DEFAULT_WEB_FONTS.map((asset) => genCdnUrl(asset)), [customFonts, genCdnUrl]).map((url) => /* @__PURE__ */ jsx(FontLoader, { url }, url));
119
98
  };
120
99
  const useDirection = () => use(DirectionContext);
121
100
  const cdnFallback = ({ pkg, version, path }) => genCdnUrl({
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../../src/ConfigProvider/index.tsx"],"sourcesContent":["'use client';\n\nimport {\n createContext,\n type CSSProperties,\n type ElementType,\n memo,\n type ReactNode,\n use,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\n\nimport FontLoader from '@/FontLoader';\nimport { installGlobalFocusRing } from '@/GlobalFocusRing';\nimport {\n type I18nContextValue,\n type TranslationKey,\n type TranslationResourcesInput,\n type TranslationResourcesMap,\n} from '@/i18n/types';\nimport { MotionComponent, type MotionComponentType } from '@/MotionProvider';\nimport { type CDN, type CdnApi, genCdnUrl } from '@/utils/genCdnUrl';\n\nimport AppElementContext from './AppElementContext';\nimport { KATEX_CSS_VERSION } from './cdnAssets';\n\nexport const LOBE_THEME_APP_ID = 'lobe-ui-theme-app';\n\nexport type Direction = 'ltr' | 'rtl';\n\nexport interface Config {\n aAs?: ElementType;\n customCdnFn?: CdnFn;\n globalFocusRing?: boolean;\n imgAs?: ElementType;\n imgUnoptimized?: boolean;\n proxy?: CDN | 'custom';\n}\n\nexport const ConfigContext = createContext<Config | null>(null);\n\nconst DirectionContext = createContext<Direction>('ltr');\n\n// Internal i18n context\nconst I18nContextInternal = createContext<I18nContextValue>({\n locale: 'en',\n t: (key: TranslationKey) => key,\n});\n\nexport interface ConfigProviderProps {\n children: ReactNode;\n config?: Config;\n customFonts?: string[];\n direction?: Direction;\n enableCustomFonts?: boolean;\n // i18n props - flattened at top level\n locale?: string;\n motion: MotionComponentType;\n resources?: TranslationResourcesInput;\n}\n\nconst isThenable = (value: unknown): value is Promise<TranslationResourcesMap> =>\n typeof (value as { then?: unknown })?.then === 'function';\n\nconst ConfigProvider = memo<ConfigProviderProps>(\n ({\n children,\n config,\n customFonts,\n direction = 'ltr',\n enableCustomFonts = true,\n locale,\n resources,\n motion,\n }) => {\n const [portalHost, setPortalHost] = useState<HTMLDivElement | null>(null);\n\n useEffect(() => {\n if (config?.globalFocusRing === false) return;\n return installGlobalFocusRing();\n }, [config?.globalFocusRing]);\n\n const fallbackLocale = locale ?? 'en';\n const [resolvedResources, setResolvedResources] = useState<TranslationResourcesMap | undefined>(\n () => (resources && !isThenable(resources) ? resources : undefined),\n );\n const [resolvedLocale, setResolvedLocale] = useState(fallbackLocale);\n const latestRequestId = useRef(0);\n\n useEffect(() => {\n const requestId = ++latestRequestId.current;\n\n if (!resources) {\n setResolvedResources(undefined);\n setResolvedLocale(fallbackLocale);\n return;\n }\n\n if (isThenable(resources)) {\n const targetLocale = fallbackLocale;\n resources\n .then((nextResources) => {\n if (latestRequestId.current !== requestId) return;\n setResolvedResources(nextResources);\n setResolvedLocale(targetLocale);\n })\n .catch(() => {\n if (latestRequestId.current !== requestId) return;\n });\n return;\n }\n\n setResolvedResources(resources);\n setResolvedLocale(fallbackLocale);\n }, [fallbackLocale, resources]);\n\n const currentResources = isThenable(resources) ? resolvedResources : resources;\n const currentLocale = isThenable(resources) ? resolvedLocale : fallbackLocale;\n\n const i18nValue = useMemo((): I18nContextValue => {\n const resourceList = Array.isArray(currentResources)\n ? currentResources\n : currentResources\n ? Object.values(currentResources)\n : [];\n const mergedResources = Object.assign({}, ...resourceList);\n const t = (key: TranslationKey): string => mergedResources[key] || key;\n return { locale: currentLocale, t };\n }, [currentLocale, currentResources]);\n\n return (\n <I18nContextInternal value={i18nValue}>\n <ConfigContext value={config ?? null}>\n <DirectionContext value={direction}>\n <MotionComponent value={motion}>\n <AppElementContext value={portalHost}>\n {enableCustomFonts && <WebFonts customFonts={customFonts} />}\n {children}\n <div\n data-lobe-portal-host=\"\"\n id={LOBE_THEME_APP_ID}\n ref={setPortalHost}\n style={portalHostStyle}\n />\n </AppElementContext>\n </MotionComponent>\n </DirectionContext>\n </ConfigContext>\n </I18nContextInternal>\n );\n },\n);\n\n// `position: fixed` + `right: 0` gives base-ui Positioners a viewport-wide containing block and a\n// stacking context; no `pointer-events: none`, which popup descendants would inherit\nconst portalHostStyle: CSSProperties = {\n height: 0,\n left: 0,\n position: 'fixed',\n right: 0,\n top: 0,\n zIndex: 1100,\n};\n\nconst WebFonts = ({ customFonts }: { customFonts?: string[] }) => {\n const genCdnUrl = useCdnFn();\n const urls = useMemo(\n () =>\n customFonts || [\n genCdnUrl({ path: 'css/index.css', pkg: '@lobehub/webfont-mono', version: '1.0.0' }),\n genCdnUrl({\n path: 'css/index-full.css',\n pkg: '@lobehub/webfont-harmony-sans',\n version: '1.0.0',\n }),\n genCdnUrl({\n path: 'css/index.css',\n pkg: '@lobehub/webfont-harmony-sans-sc',\n version: '1.0.0',\n }),\n genCdnUrl({ path: 'dist/katex.min.css', pkg: 'katex', version: KATEX_CSS_VERSION }),\n ],\n [customFonts, genCdnUrl],\n );\n\n return urls.map((url) => <FontLoader key={url} url={url} />);\n};\n\nexport const useDirection = () => use(DirectionContext);\n\nexport { useAppElement } from './AppElementContext';\n\n// useCdnFn\nexport type CdnFn = ({ pkg, version, path }: CdnApi) => string;\n\nconst cdnFallback: CdnFn = ({ pkg, version, path }) =>\n genCdnUrl({ path, pkg, proxy: 'aliyun', version });\n\nexport const useCdnFn = (): CdnFn => {\n const config = use(ConfigContext);\n if (!config) return cdnFallback;\n if (config?.proxy !== 'custom')\n return ({ pkg, version, path }) =>\n genCdnUrl({ path, pkg, proxy: config.proxy as any, version });\n return config?.customCdnFn || cdnFallback;\n};\n\n// useI18n hook\nexport const useI18n = () => use(I18nContextInternal);\n\n// Export I18nContext for external reference\nexport { I18nContextInternal as I18nContext };\n\nexport default ConfigProvider;\n"],"mappings":";;;;;;;;;;AA6BA,MAAa,oBAAoB;AAajC,MAAa,gBAAgB,cAA6B,IAAI;AAE9D,MAAM,mBAAmB,cAAyB,KAAK;AAGvD,MAAM,sBAAsB,cAAgC;CAC1D,QAAQ;CACR,IAAI,QAAwB;AAC9B,CAAC;AAcD,MAAM,c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AU,UACpB,QAAQ,EAAE,KAAK,SAAS,WACtB,UAAU;EAAE;EAAM;EAAK,OAAO,OAAO;EAAc;CAAQ,CAAC;CAChE,OAAO,QAAQ,eAAe;AAChC;AAGA,MAAa,gBAAgB,IAAI,mBAAmB"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../src/ConfigProvider/index.tsx"],"sourcesContent":["'use client';\n\nimport {\n createContext,\n type CSSProperties,\n type ElementType,\n memo,\n type ReactNode,\n use,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\n\nimport FontLoader from '@/FontLoader';\nimport { installGlobalFocusRing } from '@/GlobalFocusRing';\nimport {\n type I18nContextValue,\n type TranslationKey,\n type TranslationResourcesInput,\n type TranslationResourcesMap,\n} from '@/i18n/types';\nimport { MotionComponent, type MotionComponentType } from '@/MotionProvider';\nimport { type CDN, type CdnApi, genCdnUrl } from '@/utils/genCdnUrl';\n\nimport AppElementContext from './AppElementContext';\nimport { DEFAULT_WEB_FONTS } from './cdnAssets';\n\nexport const LOBE_THEME_APP_ID = 'lobe-ui-theme-app';\n\nexport type Direction = 'ltr' | 'rtl';\n\nexport interface Config {\n aAs?: ElementType;\n customCdnFn?: CdnFn;\n globalFocusRing?: boolean;\n imgAs?: ElementType;\n imgUnoptimized?: boolean;\n proxy?: CDN | 'custom';\n}\n\nexport const ConfigContext = createContext<Config | null>(null);\n\nconst DirectionContext = createContext<Direction>('ltr');\n\n// Internal i18n context\nconst I18nContextInternal = createContext<I18nContextValue>({\n locale: 'en',\n t: (key: TranslationKey) => key,\n});\n\nexport interface ConfigProviderProps {\n children: ReactNode;\n config?: Config;\n customFonts?: string[];\n direction?: Direction;\n enableCustomFonts?: boolean;\n // i18n props - flattened at top level\n locale?: string;\n motion: MotionComponentType;\n resources?: TranslationResourcesInput;\n}\n\nconst isThenable = (value: unknown): value is Promise<TranslationResourcesMap> =>\n typeof (value as { then?: unknown })?.then === 'function';\n\nconst ConfigProvider = memo<ConfigProviderProps>(\n ({\n children,\n config,\n customFonts,\n direction = 'ltr',\n enableCustomFonts = true,\n locale,\n resources,\n motion,\n }) => {\n const [portalHost, setPortalHost] = useState<HTMLDivElement | null>(null);\n\n useEffect(() => {\n if (config?.globalFocusRing === false) return;\n return installGlobalFocusRing();\n }, [config?.globalFocusRing]);\n\n const fallbackLocale = locale ?? 'en';\n const [resolvedResources, setResolvedResources] = useState<TranslationResourcesMap | undefined>(\n () => (resources && !isThenable(resources) ? resources : undefined),\n );\n const [resolvedLocale, setResolvedLocale] = useState(fallbackLocale);\n const latestRequestId = useRef(0);\n\n useEffect(() => {\n const requestId = ++latestRequestId.current;\n\n if (!resources) {\n setResolvedResources(undefined);\n setResolvedLocale(fallbackLocale);\n return;\n }\n\n if (isThenable(resources)) {\n const targetLocale = fallbackLocale;\n resources\n .then((nextResources) => {\n if (latestRequestId.current !== requestId) return;\n setResolvedResources(nextResources);\n setResolvedLocale(targetLocale);\n })\n .catch(() => {\n if (latestRequestId.current !== requestId) return;\n });\n return;\n }\n\n setResolvedResources(resources);\n setResolvedLocale(fallbackLocale);\n }, [fallbackLocale, resources]);\n\n const currentResources = isThenable(resources) ? resolvedResources : resources;\n const currentLocale = isThenable(resources) ? resolvedLocale : fallbackLocale;\n\n const i18nValue = useMemo((): I18nContextValue => {\n const resourceList = Array.isArray(currentResources)\n ? currentResources\n : currentResources\n ? Object.values(currentResources)\n : [];\n const mergedResources = Object.assign({}, ...resourceList);\n const t = (key: TranslationKey): string => mergedResources[key] || key;\n return { locale: currentLocale, t };\n }, [currentLocale, currentResources]);\n\n return (\n <I18nContextInternal value={i18nValue}>\n <ConfigContext value={config ?? null}>\n <DirectionContext value={direction}>\n <MotionComponent value={motion}>\n <AppElementContext value={portalHost}>\n {enableCustomFonts && <WebFonts customFonts={customFonts} />}\n {children}\n <div\n data-lobe-portal-host=\"\"\n id={LOBE_THEME_APP_ID}\n ref={setPortalHost}\n style={portalHostStyle}\n />\n </AppElementContext>\n </MotionComponent>\n </DirectionContext>\n </ConfigContext>\n </I18nContextInternal>\n );\n },\n);\n\n// `position: fixed` + `right: 0` gives base-ui Positioners a viewport-wide containing block and a\n// stacking context; no `pointer-events: none`, which popup descendants would inherit\nconst portalHostStyle: CSSProperties = {\n height: 0,\n left: 0,\n position: 'fixed',\n right: 0,\n top: 0,\n zIndex: 1100,\n};\n\nconst WebFonts = ({ customFonts }: { customFonts?: string[] }) => {\n const genCdnUrl = useCdnFn();\n const urls = useMemo(\n () => customFonts || DEFAULT_WEB_FONTS.map((asset) => genCdnUrl(asset)),\n [customFonts, genCdnUrl],\n );\n\n return urls.map((url) => <FontLoader key={url} url={url} />);\n};\n\nexport const useDirection = () => use(DirectionContext);\n\nexport { useAppElement } from './AppElementContext';\n\n// useCdnFn\nexport type CdnFn = ({ pkg, version, path }: CdnApi) => string;\n\nconst cdnFallback: CdnFn = ({ pkg, version, path }) =>\n genCdnUrl({ path, pkg, proxy: 'aliyun', version });\n\nexport const useCdnFn = (): CdnFn => {\n const config = use(ConfigContext);\n if (!config) return cdnFallback;\n if (config?.proxy !== 'custom')\n return ({ pkg, version, path }) =>\n genCdnUrl({ path, pkg, proxy: config.proxy as any, version });\n return config?.customCdnFn || cdnFallback;\n};\n\n// useI18n hook\nexport const useI18n = () => use(I18nContextInternal);\n\n// Export I18nContext for external reference\nexport { I18nContextInternal as I18nContext };\n\nexport default ConfigProvider;\n"],"mappings":";;;;;;;;;;AA6BA,MAAa,oBAAoB;AAajC,MAAa,gBAAgB,cAA6B,IAAI;AAE9D,MAAM,mBAAmB,cAAyB,KAAK;AAGvD,MAAM,sBAAsB,cAAgC;CAC1D,QAAQ;CACR,IAAI,QAAwB;AAC9B,CAAC;AAcD,MAAM,cAAc,UAClB,OAAQ,OAA8B,SAAS;AAEjD,MAAM,iBAAiB,MACpB,EACC,UACA,QACA,aACA,YAAY,OACZ,oBAAoB,MACpB,QACA,WACA,aACI;CACJ,MAAM,CAAC,YAAY,iBAAiB,SAAgC,IAAI;CAExE,gBAAgB;EACd,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O;IACvB,UAAA,oBAAC,iBAAD;KAAiB,OAAO;KACtB,UAAA,qBAAC,mBAAD;MAAmB,OAAO;MAA1B,UAAA;OACG,qBAAqB,oBAAC,UAAD,EAAuB,YAAc,CAAA;OAC1D;OACD,oBAAC,OAAD;QACE,yBAAsB;QACtB,IAAI;QACJ,KAAK;QACL,OAAO;OACR,CAAA;MACgB;;IACJ,CAAA;GACD,CAAA;EACL,CAAA;CACI,CAAA;AAEzB,CACF;AAIA,MAAM,kBAAiC;CACrC,QAAQ;CACR,MAAM;CACN,UAAU;CACV,OAAO;CACP,KAAK;CACL,QAAQ;AACV;AAEA,MAAM,YAAY,EAAE,kBAA8C;CAChE,MAAM,YAAY,SAAS;CAM3B,OALa,cACL,eAAe,kBAAkB,KAAK,UAAU,UAAU,KAAK,CAAC,GACtE,CAAC,aAAa,SAAS,CAGf,CAAC,CAAC,KAAK,QAAQ,oBAAC,YAAD,EAA2B,IAAM,GAAhB,GAAgB,CAAC;AAC7D;AAEA,MAAa,qBAAqB,IAAI,gBAAgB;AAOtD,MAAM,eAAsB,EAAE,KAAK,SAAS,WAC1C,UAAU;CAAE;CAAM;CAAK,OAAO;CAAU;AAAQ,CAAC;AAEnD,MAAa,iBAAwB;CACnC,MAAM,SAAS,IAAI,aAAa;CAChC,IAAI,CAAC,QAAQ,OAAO;CACpB,IAAI,QAAQ,UAAU,UACpB,QAAQ,EAAE,KAAK,SAAS,WACtB,UAAU;EAAE;EAAM;EAAK,OAAO,OAAO;EAAc;CAAQ,CAAC;CAChE,OAAO,QAAQ,eAAe;AAChC;AAGA,MAAa,gBAAgB,IAAI,mBAAmB"}
@@ -4,8 +4,8 @@ export declare const tabsStyles: {
4
4
  panel: string;
5
5
  tab: string;
6
6
  list: string;
7
- root: string;
8
7
  indicator: string;
8
+ root: string;
9
9
  indicatorPoint: string;
10
10
  indicatorRounded: string;
11
11
  indicatorSquare: string;
@@ -14,12 +14,12 @@ export declare const textStyles: {
14
14
  disabled: string;
15
15
  danger: string;
16
16
  success: string;
17
- info: string;
18
17
  warning: string;
19
18
  delete: string;
20
19
  ellipsis: string;
21
20
  italic: string;
22
21
  underline: string;
22
+ info: string;
23
23
  ellipsisMulti: string;
24
24
  secondary: string;
25
25
  };
package/es/index.d.mts CHANGED
@@ -382,6 +382,7 @@ import { LobeStatusPalette, registerLobePalette } from "./styles/theme/customPal
382
382
  import { staticStylish } from "./styles/theme/customStylishStatic.mjs";
383
383
  import { generateColorNeutralPalette, generateColorPalette } from "./styles/theme/generateColorPalette.mjs";
384
384
  import { getCustomNeutralCss, getCustomPaletteCss, getCustomPrimaryCss, getGlobalCss, getThemeCss } from "./styles/theme/themeCss.mjs";
385
+ import { GenFontFamilyOptions, genFontFamily, genFontFamilyCode } from "./styles/theme/token/font.mjs";
385
386
  import "./styles/index.mjs";
386
387
  import { CLASSNAMES } from "./styles/classNames.mjs";
387
388
  import { SwitchChangeEventHandler, SwitchClassNames, SwitchClickEventHandler, SwitchContextType, SwitchIconPosition, SwitchIconProps, SwitchProps, SwitchRootProps, SwitchSize, SwitchStyles, SwitchThumbProps } from "./Switch/type.mjs";
@@ -426,4 +427,4 @@ import { useFormContext } from "./Form/context.mjs";
426
427
  import { Form } from "./Form/index.mjs";
427
428
  import { rehypeStreamAnimated } from "@lobehub/streamdown";
428
429
  import { ErrorBoundary, ErrorBoundaryProps } from "react-error-boundary";
429
- export { A, AGENT_AVATAR_COLORS, AGENT_AVATAR_SHAPES, AGENT_AVATAR_STATES, type AProps, Accordion, type AccordionClassNames, AccordionHeader, type AccordionHeaderProps, type AccordionIndicatorPlacement, AccordionItem, type AccordionItemProps, type AccordionItemType, AccordionPanel, type AccordionPanelProps, type AccordionProps, AccordionRoot, type AccordionRootProps, type AccordionStyles, AccordionTrigger, type AccordionTriggerProps, type AccordionVariant, ActionIcon, type ActionIconClassNames, ActionIconGroup, type ActionIconGroupEvent, type MenuItemType as ActionIconGroupItemType, type ActionIconGroupProps, type ActionIconOutdent, type ActionIconProps, type ActionIconSize, type ActionIconStyles, type ActionIconVariant, AgentAvatar, type AgentAvatarClassNames, type AgentAvatarColor, type AgentAvatarProps, type AgentAvatarShape, type AgentAvatarState, type AgentAvatarStyles, Alert, type AlertClassNames, type AlertCloseConfig, type AlertProps, type AlertRef, type AlertStyles, type AlertType, type AlertVariant, Anchor, type AnchorItem, type AnchorProps, AutoComplete, type AutoCompleteOption, type AutoCompleteProps, Avatar, type AvatarClassNames, type AvatarFallbackVariant, type AvatarGeneratedFallbackVariant, AvatarGroup, type AvatarGroupItemType, type AvatarGroupProps, type AvatarProps, type AvatarStyles, Badge, type BadgeProps, type BadgeSize, type BadgeStatus, type BaseMenuItemGroupType, type BaseMenuItemType, type BaseModalProps, type BaseSubMenuType, Block, type BlockProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Burger, type BurgerProps, Button, type ButtonIconPosition, type ButtonOutdent, type ButtonProps, type ButtonShape, type ButtonSize, type ButtonType, type CDN, CLASSNAMES, type CalendarMode, Carousel, type CarouselProps, type CarouselRef, type CellRender, type CellRenderInfo, Center, type CenterProps, _default as Checkbox, CheckboxGroup, type CheckboxGroupOption, type CheckboxGroupProps, type CheckboxProps, type CheckboxShape, CodeDiff, type CodeDiffProps, CodeEditor, type CodeEditorProps, Collapsible, type CollapsibleProps, type ColorPalettes, type ColorPalettesAlpha, ColorPicker, type ColorPickerProps, ColorSwatches, type ColorSwatchesProps, type ColorToken, type Config, ConfigProvider, type ConfigProviderProps, type ContextMenuCheckboxItem, ContextMenuHost, type ContextMenuInterceptor, type ContextMenuItem, ContextMenuTrigger, type ControlSize, CopyButton, type CopyButtonProps, type CreateLobeTokenParams, type CustomNeutralColor, type CustomPrimaryColor, DatePicker, type DatePickerBaseProps, type DatePickerProps, type DatePickerSemanticType, type DatePickerType, DateRangePicker, type DateRangePickerProps, type DateRangeValue, DayjsDatePicker, type DayjsDatePickerProps, type DayjsDatePickerType, DayjsDateRangePicker, type DayjsDateRangePickerProps, type DayjsDateRangeValue, Descriptions, type DescriptionsItem, type DescriptionsProps, type DiffViewMode, type Direction, type DistributiveOmit, type DivProps, Divider, type DividerOrientation, type DividerProps, DownloadButton, type DownloadButtonProps, DraggablePanel, DraggablePanelBody, type DraggablePanelBodyProps, DraggablePanelContainer, type DraggablePanelContainerProps, DraggablePanelContent, type DraggablePanelContentProps, DraggablePanelFooter, type DraggablePanelFooterProps, DraggablePanelHandle, type DraggablePanelHandleProps, DraggablePanelHeader, type DraggablePanelHeaderProps, type DraggablePanelPlacement, type DraggablePanelProps, DraggablePanelRoot, type DraggablePanelRootProps, type DraggablePanelSize, DraggablePanelToggle, type DraggablePanelToggleProps, DraggableSideNav, type DraggableSideNavProps, Drawer, DrawerBackdrop, type DrawerBackdropProps, DrawerClose, type DrawerCloseProps, DrawerContent, type DrawerContentProps, DrawerDescription, type DrawerDescriptionProps, DrawerFooter, type DrawerFooterProps, DrawerHeader, type DrawerHeaderProps, type DrawerPlacement, DrawerPopup, type DrawerPopupProps, DrawerPortal, type DrawerPortalProps, type DrawerProps, type DrawerPush, DrawerRoot, type DrawerRootProps, type DrawerSemanticNames, type DrawerSemanticStyles, DrawerTitle, type DrawerTitleProps, DrawerTrigger, type DrawerTriggerProps, type DropdownItem, DropdownMenu, type DropdownMenuCheckboxItem, DropdownMenuCheckboxItemIndicator, DropdownMenuCheckboxItemPrimitive, type DropdownMenuCheckboxItemProps, DropdownMenuFooter, type DropdownMenuFooterProps, DropdownMenuGroup, DropdownMenuGroupLabel, type DropdownMenuGroupLabelProps, DropdownMenuHeader, type DropdownMenuHeaderProps, DropdownMenuItem, DropdownMenuItemContent, type DropdownMenuItemContentProps, DropdownMenuItemDesc, type DropdownMenuItemDescProps, DropdownMenuItemExtra, type DropdownMenuItemExtraProps, DropdownMenuItemIcon, type DropdownMenuItemIconProps, DropdownMenuItemLabel, DropdownMenuItemLabelGroup, type DropdownMenuItemLabelGroupProps, type DropdownMenuItemLabelProps, type DropdownMenuItemProps, type DropdownMenuPlacement, DropdownMenuPopup, type DropdownMenuPopupProps, DropdownMenuPortal, type DropdownMenuPortalProps, DropdownMenuPositioner, type DropdownMenuPositionerProps, type DropdownMenuProps, DropdownMenuRoot, DropdownMenuScrollViewport, type DropdownMenuScrollViewportProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuSubmenuArrow, type DropdownMenuSubmenuArrowProps, DropdownMenuSubmenuRoot, DropdownMenuSubmenuTrigger, type DropdownMenuSubmenuTriggerProps, DropdownMenuSwitchItem, type DropdownMenuSwitchItemProps, type DropdownMenuSwitchItem$1 as DropdownMenuSwitchItemType, DropdownMenuTrigger, type DropdownMenuTriggerProps, EditableText, type EditableTextProps, EditorSlashMenu, type EditorSlashMenuGroup, type EditorSlashMenuItems, type EditorSlashMenuOption, EmojiPicker, type EmojiPickerProps, Empty, type EmptyProps, ErrorBoundary, type ErrorBoundaryProps, FileTypeIcon, type FileTypeIconProps, type FilterValue, _default$1 as FlexBasic, type FlexBasicProps, _default$1 as Flexbox, type FlexboxProps, type FloatingCollisionPadding, FloatingPanel, type FloatingPanelOffset, type FloatingPanelPlacement, type FloatingPanelProps, FloatingSheet, type FloatingSheetProps, FluentEmoji, type FluentEmojiProps, FocusScope, type FocusScopeProps, FontLoader, type FontLoaderProps, Form, type FormContextValue, FormDivider, type FormDividerProps, FormField, type FormFieldProps, FormFlatGroup, type FormFlatGroupProps, FormFooter, type FormFooterProps, FormGroup, type FormGroupItemType, type FormGroupProps, type FormLayout, type FormProps, FormSubmitFooter, type FormSubmitFooterProps, FormTitle, type FormTitleProps, type FormValues, type FormVariant, Freeze, type FreezeProps, type GenerateConfig, type GeneratedDatePicker, type GenericItemType, type GenericTimePickerProps, Grid, type GridProps, GroupAvatar, type GroupAvatarProps, GuideCard, type GuideCardProps, DEFAULT_HEIGHT as HTML_PREVIEW_DEFAULT_HEIGHT, DEFAULT_SANDBOX as HTML_PREVIEW_DEFAULT_SANDBOX, AUTO_HEIGHT_MESSAGE_TYPE as HTML_PREVIEW_RESIZE_MESSAGE, Header, type HeaderProps, Highlighter, type HighlighterProps, Hotkey, HotkeyInput, type HotkeyInputProps, type HotkeyProps, HtmlPreview, HtmlPreviewIframe, type HtmlPreviewIframeProps, type HtmlPreviewMode, type HtmlPreviewProps, type HtmlPreviewStreamingMode, I18nProvider, type I18nProviderProps, Icon, type IconAlign, type IconProps, IconProvider, type IconSize, type IconSpaceMode, Image, type ImagePreviewOptions, type ImageProps, ImageSelect, type ImageSelectItem, type ImageSelectProps, type ImgProps, type ImperativeModalProps, _default$2 as Input, type InputClassNames, _default$3 as InputNumber, type InputNumberProps, InputOTP, type InputOTPProps, _default$4 as InputPassword, type InputPasswordProps, type InputPasswordVisibilityToggleLabels, type InputProps, type InputSize, type InputStyles, type InputVariant, type ItemType, type ItemsType, KeyMapEnum, LOBE_THEME_APP_ID, Layout, LayoutFooter, type LayoutFooterProps, LayoutHeader, type LayoutHeaderProps, LayoutMain, type LayoutMainProps, type LayoutProps, LayoutSidebar, LayoutSidebarInner, type LayoutSidebarInnerProps, type LayoutSidebarProps, LayoutToc, type LayoutTocProps, type LegacyDateInput, List, type ListClickInfo, type ListDividerType, type ListItem, type ListItemType, type ListProps, type ListSemanticName, type LobeAppearance, type LobeCssVar, type LobeCustomStylish, type LobeCustomToken, lobeHighlightsTheme as LobeHighlightsTheme, type LobeNeutralColor, type LobeNeutralScale, type LobePrimaryColor, type LobeStatusPalette, type LobeTheme, LobeThemeScript, type LobeThemeScriptProps, type LobeThemeState, type LobeToken, I18nProvider as LobeUIProvider, Markdown, type MarkdownProps, MaskShadow, type MaskShadowProps, MaterialFileTypeIcon, type MaterialFileTypeIconProps, type MenuCheckboxItemType, type MenuDividerType, type MenuInfo, type MenuItemGroupType, type MenuItemType, type MenuSwitchItemType, Mermaid, type MermaidProps, Modal, ModalBackdrop, type ModalBackdropProps, ModalClose, type ModalCloseProps, type ModalComponentProps, type ModalConfirmConfig, ModalContent, type ModalContentProps, ModalContext, type ModalContextValue, ModalDescription, type ModalDescriptionProps, ModalFooter, type ModalFooterProps, ModalHeader, type ModalHeaderProps, ModalHost, type ModalHostProps, type ModalInstance, ModalPopup, type ModalPopupProps, ModalPortal, type ModalPortalProps, ModalRoot, type ModalRootProps, type ModalSystem, ModalTitle, type ModalTitleProps, ModalTrigger, type ModalTriggerProps, ModalViewport, type ModalViewportProps, type MonthPickerProps, MotionComponent, type MotionComponentType, MotionProvider, NeutralColors, NeutralColorsObj, Pagination, type PaginationAlign, type PaginationItemType, type PaginationProps, type PaginationSemanticName, type PaginationSize, type PaginationSizeChangerProps, type PanelMode, PatchDiff, type PatchDiffProps, type PickerClassNames, type PickerComponents, type PickerDateInput, type PickerDateStrings, type PickerLocale, type PickerLocaleInput, type PickerLocaleLang, type PickerMode, type PickerPanelProps, type PickerPlacement, type PickerPopupSemanticName, type PickerProps, type PickerPropsWithMultiple, type PickerRef, type PickerSemanticClassNames, type PickerSemanticName, type PickerSemanticStyles, type PickerSize, type PickerStatus, type PickerStyles, type PickerTagProps, type PickerValueInput, type PickerVariant, type Placement, type PlacementConfig, Popover, PopoverArrow, type PopoverArrowAtomProps, PopoverArrowIcon, PopoverBackdrop, type PopoverBackdropProps, type PopoverContextValue, PopoverGroup, type PopoverGroupHandle, type PopoverGroupItem, type PopoverPlacement, PopoverPopup, type PopoverPopupAtomProps, type PopoverPopupProps, PopoverPortal, type PopoverPortalAtomProps, type PopoverPortalProps, PopoverPositioner, type PopoverPositionerAtomProps, type PopoverPositionerProps, type PopoverProps, PopoverProvider, PopoverRoot, type PopoverTrigger, type PopoverTriggerComponentProps, PopoverTriggerElement, type PopoverTriggerElementProps, PopoverViewport, type PopoverViewportAtomProps, type PresetColorKey, type PresetColorType, type PresetDate, type PresetPickerProps, type PresetSystemColorKey, type PresetSystemColorType, PreviewGroup, type PreviewGroupProps, PrimaryColors, PrimaryColorsObj, Progress, type ProgressProps, type ProgressSize, type ProgressStatus, type ProgressType, type ProgressVariant, ProgressiveBlur, type ProgressiveBlurClassNames, type ProgressiveBlurMode, type ProgressiveBlurPosition, type ProgressiveBlurProps, type ProgressiveBlurStyles, QRCode, type QRCodeErrorLevel, type QRCodeProps, type QRCodeStatus, type QuarterPickerProps, Radio, RadioGroup, type RadioGroupOption, type RadioGroupProps, type RadioProps, type RangeChangeDates, type RangeChangeStrings, type RangeDisabledDate, type RangeInfo, type RangePickerComponent, type RangePickerProps, type RangePickerRef, Rate, type RateProps, type RenderItemContentOptions, type RenderOptions, type ResponsiveState, Result, type ResultProps, type ResultStatus, ScrollArea, ScrollAreaContent, type ScrollAreaContentProps, ScrollAreaCorner, type ScrollAreaCornerProps, type ScrollAreaProps, ScrollAreaRoot, type ScrollAreaRootProps, ScrollAreaScrollbar, type ScrollAreaScrollbarProps, ScrollAreaThumb, type ScrollAreaThumbProps, ScrollAreaViewport, type ScrollAreaViewportProps, ScrollShadow, type ScrollShadowProps, SearchBar, type SearchBarProps, SearchResultCards, type SearchResultCardsProps, Segmented, type SegmentedClassNames, SegmentedIndicator, type SegmentedIndicatorProps, SegmentedItem, SegmentedItemIcon, SegmentedItemLabel, type SegmentedItemProps, type SegmentedOption, type SegmentedOptions, type SegmentedOrientation, type SegmentedProps, SegmentedRoot, type SegmentedRootProps, type SegmentedSize, type SegmentedStyles, type SegmentedVariant, Select, SelectArrow, type SelectArrowProps, SelectBackdrop, type SelectBehaviorVariant, type SelectClassNames, SelectGroup, SelectGroupLabel, type SelectGroupLabelProps, type SelectGroupProps, SelectIcon, type SelectIconProps, type SelectIndicatorVariant, SelectItem, SelectItemIndicator, type SelectItemIndicatorProps, type SelectItemProps, SelectItemText, type SelectItemTextProps, SelectList, type SelectListProps, type SelectOption, type SelectOptionGroup, type SelectOptions, SelectPopup, type SelectPopupProps, SelectPortal, type SelectPortalProps, SelectPositioner, type SelectPositionerProps, type SelectProps, SelectRoot, type SelectRootChangeEventDetails, SelectScrollDownArrow, type SelectScrollDownArrowProps, SelectScrollUpArrow, type SelectScrollUpArrowProps, SelectSeparator, type SelectSize, SelectTrigger, type SelectTriggerProps, SelectValue, type SelectValueProps, type SelectVariant, _default$5 as ShikiLobeTheme, SideNav, type SideNavProps, type SinglePickerComponent, Skeleton, type SkeletonAnimation, SkeletonAvatar, type SkeletonAvatarProps, type SkeletonProps, SkeletonText, type SkeletonTextProps, Slider, type SliderProps, SliderWithInput, type SliderWithInputProps, Snippet, type SnippetProps, type SortOrder, SortableList, type SortableListProps, type SpanProps, Spin, type SpinProps, type SpinSize, type SpinVariant, _default$6 as SplitButton, type SplitButtonMenuProps, type SplitButtonProps, type StaticStyleExtract, type StaticStyleUtils, Statistic, type StatisticProps, type StepItem, type StepStatus, Steps, type StepsProps, type SubMenuType, type SvgProps, Switch, type SwitchChangeEventHandler, type SwitchClassNames, type SwitchClickEventHandler, type SwitchContextType, SwitchIcon, type SwitchIconPosition, type SwitchIconProps, type SwitchProps, SwitchRoot, type SwitchRootProps, type SwitchSize, type SwitchStyles, SwitchThumb, type SwitchThumbProps, SyntaxHighlighter, type SyntaxHighlighterProps, SyntaxMermaid, type SyntaxMermaidProps, type SystemColorToken, Table, TableBody, type TableBreakpoint, TableCell, type TableCellAttributes, type TableCellProps, type TableClassNames, TableColGroup, type TableColGroupColumn, type TableColGroupProps, type TableColumn, type TableColumnAlign, type TableColumnEllipsis, type TableColumnFilterItem, type TableColumnFixed, type TableColumnGroupProps, type TableColumnGroupType, type TableColumnProps, type TableColumnSorter, type TableColumnTitle, type TableColumnTitleProps, type TableColumnType, type TableColumnsType, type TableCompareFn, type TableComponents, type TableComponentsSemanticName, TableContainer, type TableCurrentDataSource, type TableCustomizeComponent, type TableDataIndex, TableElement, type TableElementProps, type TableExpandIconProps, type TableExpandableConfig, TableExpandedRow, type TableExpandedRowProps, type TableExpandedRowRender, type TableFilterDropdownPopupProps, type TableFilterDropdownProps, type TableFilters, TableFooter, TableHeader, TableHeaderCell, type TableHeaderCellAttributes, type TableLoadingConfig, type TableLocale, type TableMultipleSorterResult, type TablePaginationConfig, type TablePaginationPlacement, type TablePartProps, type TableProps, type TableRef, type TableRenderedCell, TableRoot, type TableRootProps, TableRow, type TableRowClassName, type TableRowProps, type TableRowSelectMethod, type TableRowSelection, type TableRowSelectionCheckboxProps, type TableRowSelectionType, TableScroll, type TableScrollProps, type TableScrollToConfig, type TableSectionProps, type TableSelectionItem, type TableSelectionPreset, type TableSemanticInfo, type TableSemanticName, type TableSize, type TableSorterResult, type TableSorterTooltipProps, type TableSticky, type TableStyles, type TableSummaryCellProps, TableSummaryFoot, type TableSummaryProps, type TableSummaryRowProps, TableTitle, type TableVariant, Tabs, type TabsClassNames, TabsIndicator, type TabsIndicatorProps, type TabsItem, TabsList, type TabsListProps, type TabsOrientation, TabsPanel, type TabsPanelProps, type TabsProps, TabsRoot, type TabsRootProps, type TabsSize, type TabsStyles, TabsTab, type TabsTabProps, type TabsVariant, Tag, type TagClassNames, type TagProps, type TagShape, type TagSize, type TagStyles, type TagVariant, Text, _default$7 as TextArea, type TextAreaAutoSize, type TextAreaProps, type TextClassNames, type TextProps, type TextStyles, ThemeScope, type ThemeScopeProps, type TimePickerLocale, type TimePickerProps, type ToastAPI, ToastHost, type ToastHostProps, type ToastInstance, type ToastOptions, type ToastPosition, type ToastPromiseOptions, type ToastProps, type ToastType, ToggleGroup, type ToggleGroupClassNames, ToggleGroupItem, ToggleGroupItemIcon, ToggleGroupItemLabel, type ToggleGroupItemProps, type ToggleGroupOption, type ToggleGroupProps, ToggleGroupRoot, type ToggleGroupRootProps, type ToggleGroupSize, type ToggleGroupStyles, type ToggleGroupVariant, Tooltip, TooltipGroup, type TooltipGroupProps, type TooltipPlacement, type TooltipPopupComponentProps, type TooltipPortalProps, type TooltipPositionerProps, type TooltipProps, type TooltipTriggerComponentProps, Tree, type TreeClassNames, type TreeDataNode, type TreeFlatRow, type TreeProps, type TreeStyles, type Trigger, Typography, type TypographyProps, Upload, type UploadChangeInfo, UploadDragger, type UploadProps, type UseImagePreviewResult, type UseScopeArrowNavOptions, type UseScopeSwitcherOptions, Video, type VideoMarker, type VideoPlayer, type VideoProps, type VideoSection, type VideoState, type VirtualListProps, type WeekPickerProps, type YearPickerProps, accordionStyles, actionIconStyles, alertStyles, styles as autoCompleteStyles, backdropTransition, buttonPaddingInline, buttonStyles, checkboxStyles, closeContextMenu, colorsPreset, colorsPresetSystem, combineKeys, conductCheck, confirmModal, controlHeight, copyToClipboard, createGlobalStyle, createLobeToken, createModal, createModalSystem, createPickerLocale, createStaticStyles, css, cssVar, cx, datePickerLocaleEnUS, datePickerLocaleZhCN, drawerBackdropTransition, extractStaticStyle, findCustomThemeName, flattenVisible, focusScopeItem, styles$1 as focusScopeStyles, formatStatisticValue, genCdnUrl, generateColorNeutralPalette, generateColorPalette, generateNeutralScale, generatePicker, getActiveScopeId, getAgentAvatarTraits, getAllKeys, getCustomNeutralCss, getCustomPaletteCss, getCustomPrimaryCss, getDrawerMotionConfig, getFloatingCollisionPadding, getGlobalCss, getItemKey, getItemLabel, getLastFocusedItem, getThemeCss, hasAnyIcon, hasCheckboxAndIcon, highlighterThemes, containsScript as htmlPreviewContainsScript, injectGlobal, inputClassNames as inputStyles, rootVariants as inputVariants, installGlobalFocusRing, isCustomNeutralColor, isCustomPrimaryColor, isFullHtmlDocument, isHtmlContentClosed, keyframes, staticStylish as lobeStaticStylish, styles$2 as menuSharedStyles, mermaidThemes, modalMotionConfig, neutralColors, neutralColorsSwatches, notifyScopeItemFocus, parseTrigger, placementMap, preprocessMarkdownContent, presetColors, presetSystemColors, preventDefault, preventDefaultAndStopPropagation, primaryColors, primaryColorsSwatches, radioStyles, registerLobeNeutral, registerLobePalette, registerScope, rehypeCustomFootnotes, rehypeKatexDir, rehypeStreamAnimated, remarkBr, remarkColor, remarkCustomFootnotes, remarkGfmPlus, remarkVideo, renderDropdownMenuItems, renderIcon, responsive, setActiveScope, setContextMenuInterceptor, setFloatingCollisionPadding, setLastFocusedItem, setLobeTheme, showContextMenu, sliderStyles, stopPropagation, switchStyles, tabsStyles, groupStyles as textGroupStyles, textStyles, variants as textVariants, toFloatingUIPlacement, toast, toggleGroupStyles, styles$3 as treeStyles, updateContextMenuItems, useAccordionContext, useActiveScopeId, useAppElement, useCdnFn, useDirection, useDraggablePanelContext, useDrawerActions, useDrawerOpen, useFocusScopeActive, useFocusScopeId, useFormContext, useImagePreview, useModalActions, useModalContext, useModalOpen, useMotionComponent, usePopoverContext, usePopoverGroupHandle, usePopoverPortalContainer, useResponsive, useScopeArrowNav, useScopeSwitcher, useSwitchContext, useTabsContext, useTheme, useThemeMode, useToast, useTranslation, useVideo, useVideoPlayer, useVideoState };
430
+ export { A, AGENT_AVATAR_COLORS, AGENT_AVATAR_SHAPES, AGENT_AVATAR_STATES, type AProps, Accordion, type AccordionClassNames, AccordionHeader, type AccordionHeaderProps, type AccordionIndicatorPlacement, AccordionItem, type AccordionItemProps, type AccordionItemType, AccordionPanel, type AccordionPanelProps, type AccordionProps, AccordionRoot, type AccordionRootProps, type AccordionStyles, AccordionTrigger, type AccordionTriggerProps, type AccordionVariant, ActionIcon, type ActionIconClassNames, ActionIconGroup, type ActionIconGroupEvent, type MenuItemType as ActionIconGroupItemType, type ActionIconGroupProps, type ActionIconOutdent, type ActionIconProps, type ActionIconSize, type ActionIconStyles, type ActionIconVariant, AgentAvatar, type AgentAvatarClassNames, type AgentAvatarColor, type AgentAvatarProps, type AgentAvatarShape, type AgentAvatarState, type AgentAvatarStyles, Alert, type AlertClassNames, type AlertCloseConfig, type AlertProps, type AlertRef, type AlertStyles, type AlertType, type AlertVariant, Anchor, type AnchorItem, type AnchorProps, AutoComplete, type AutoCompleteOption, type AutoCompleteProps, Avatar, type AvatarClassNames, type AvatarFallbackVariant, type AvatarGeneratedFallbackVariant, AvatarGroup, type AvatarGroupItemType, type AvatarGroupProps, type AvatarProps, type AvatarStyles, Badge, type BadgeProps, type BadgeSize, type BadgeStatus, type BaseMenuItemGroupType, type BaseMenuItemType, type BaseModalProps, type BaseSubMenuType, Block, type BlockProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Burger, type BurgerProps, Button, type ButtonIconPosition, type ButtonOutdent, type ButtonProps, type ButtonShape, type ButtonSize, type ButtonType, type CDN, CLASSNAMES, type CalendarMode, Carousel, type CarouselProps, type CarouselRef, type CellRender, type CellRenderInfo, Center, type CenterProps, _default as Checkbox, CheckboxGroup, type CheckboxGroupOption, type CheckboxGroupProps, type CheckboxProps, type CheckboxShape, CodeDiff, type CodeDiffProps, CodeEditor, type CodeEditorProps, Collapsible, type CollapsibleProps, type ColorPalettes, type ColorPalettesAlpha, ColorPicker, type ColorPickerProps, ColorSwatches, type ColorSwatchesProps, type ColorToken, type Config, ConfigProvider, type ConfigProviderProps, type ContextMenuCheckboxItem, ContextMenuHost, type ContextMenuInterceptor, type ContextMenuItem, ContextMenuTrigger, type ControlSize, CopyButton, type CopyButtonProps, type CreateLobeTokenParams, type CustomNeutralColor, type CustomPrimaryColor, DatePicker, type DatePickerBaseProps, type DatePickerProps, type DatePickerSemanticType, type DatePickerType, DateRangePicker, type DateRangePickerProps, type DateRangeValue, DayjsDatePicker, type DayjsDatePickerProps, type DayjsDatePickerType, DayjsDateRangePicker, type DayjsDateRangePickerProps, type DayjsDateRangeValue, Descriptions, type DescriptionsItem, type DescriptionsProps, type DiffViewMode, type Direction, type DistributiveOmit, type DivProps, Divider, type DividerOrientation, type DividerProps, DownloadButton, type DownloadButtonProps, DraggablePanel, DraggablePanelBody, type DraggablePanelBodyProps, DraggablePanelContainer, type DraggablePanelContainerProps, DraggablePanelContent, type DraggablePanelContentProps, DraggablePanelFooter, type DraggablePanelFooterProps, DraggablePanelHandle, type DraggablePanelHandleProps, DraggablePanelHeader, type DraggablePanelHeaderProps, type DraggablePanelPlacement, type DraggablePanelProps, DraggablePanelRoot, type DraggablePanelRootProps, type DraggablePanelSize, DraggablePanelToggle, type DraggablePanelToggleProps, DraggableSideNav, type DraggableSideNavProps, Drawer, DrawerBackdrop, type DrawerBackdropProps, DrawerClose, type DrawerCloseProps, DrawerContent, type DrawerContentProps, DrawerDescription, type DrawerDescriptionProps, DrawerFooter, type DrawerFooterProps, DrawerHeader, type DrawerHeaderProps, type DrawerPlacement, DrawerPopup, type DrawerPopupProps, DrawerPortal, type DrawerPortalProps, type DrawerProps, type DrawerPush, DrawerRoot, type DrawerRootProps, type DrawerSemanticNames, type DrawerSemanticStyles, DrawerTitle, type DrawerTitleProps, DrawerTrigger, type DrawerTriggerProps, type DropdownItem, DropdownMenu, type DropdownMenuCheckboxItem, DropdownMenuCheckboxItemIndicator, DropdownMenuCheckboxItemPrimitive, type DropdownMenuCheckboxItemProps, DropdownMenuFooter, type DropdownMenuFooterProps, DropdownMenuGroup, DropdownMenuGroupLabel, type DropdownMenuGroupLabelProps, DropdownMenuHeader, type DropdownMenuHeaderProps, DropdownMenuItem, DropdownMenuItemContent, type DropdownMenuItemContentProps, DropdownMenuItemDesc, type DropdownMenuItemDescProps, DropdownMenuItemExtra, type DropdownMenuItemExtraProps, DropdownMenuItemIcon, type DropdownMenuItemIconProps, DropdownMenuItemLabel, DropdownMenuItemLabelGroup, type DropdownMenuItemLabelGroupProps, type DropdownMenuItemLabelProps, type DropdownMenuItemProps, type DropdownMenuPlacement, DropdownMenuPopup, type DropdownMenuPopupProps, DropdownMenuPortal, type DropdownMenuPortalProps, DropdownMenuPositioner, type DropdownMenuPositionerProps, type DropdownMenuProps, DropdownMenuRoot, DropdownMenuScrollViewport, type DropdownMenuScrollViewportProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuSubmenuArrow, type DropdownMenuSubmenuArrowProps, DropdownMenuSubmenuRoot, DropdownMenuSubmenuTrigger, type DropdownMenuSubmenuTriggerProps, DropdownMenuSwitchItem, type DropdownMenuSwitchItemProps, type DropdownMenuSwitchItem$1 as DropdownMenuSwitchItemType, DropdownMenuTrigger, type DropdownMenuTriggerProps, EditableText, type EditableTextProps, EditorSlashMenu, type EditorSlashMenuGroup, type EditorSlashMenuItems, type EditorSlashMenuOption, EmojiPicker, type EmojiPickerProps, Empty, type EmptyProps, ErrorBoundary, type ErrorBoundaryProps, FileTypeIcon, type FileTypeIconProps, type FilterValue, _default$1 as FlexBasic, type FlexBasicProps, _default$1 as Flexbox, type FlexboxProps, type FloatingCollisionPadding, FloatingPanel, type FloatingPanelOffset, type FloatingPanelPlacement, type FloatingPanelProps, FloatingSheet, type FloatingSheetProps, FluentEmoji, type FluentEmojiProps, FocusScope, type FocusScopeProps, FontLoader, type FontLoaderProps, Form, type FormContextValue, FormDivider, type FormDividerProps, FormField, type FormFieldProps, FormFlatGroup, type FormFlatGroupProps, FormFooter, type FormFooterProps, FormGroup, type FormGroupItemType, type FormGroupProps, type FormLayout, type FormProps, FormSubmitFooter, type FormSubmitFooterProps, FormTitle, type FormTitleProps, type FormValues, type FormVariant, Freeze, type FreezeProps, type GenFontFamilyOptions, type GenerateConfig, type GeneratedDatePicker, type GenericItemType, type GenericTimePickerProps, Grid, type GridProps, GroupAvatar, type GroupAvatarProps, GuideCard, type GuideCardProps, DEFAULT_HEIGHT as HTML_PREVIEW_DEFAULT_HEIGHT, DEFAULT_SANDBOX as HTML_PREVIEW_DEFAULT_SANDBOX, AUTO_HEIGHT_MESSAGE_TYPE as HTML_PREVIEW_RESIZE_MESSAGE, Header, type HeaderProps, Highlighter, type HighlighterProps, Hotkey, HotkeyInput, type HotkeyInputProps, type HotkeyProps, HtmlPreview, HtmlPreviewIframe, type HtmlPreviewIframeProps, type HtmlPreviewMode, type HtmlPreviewProps, type HtmlPreviewStreamingMode, I18nProvider, type I18nProviderProps, Icon, type IconAlign, type IconProps, IconProvider, type IconSize, type IconSpaceMode, Image, type ImagePreviewOptions, type ImageProps, ImageSelect, type ImageSelectItem, type ImageSelectProps, type ImgProps, type ImperativeModalProps, _default$2 as Input, type InputClassNames, _default$3 as InputNumber, type InputNumberProps, InputOTP, type InputOTPProps, _default$4 as InputPassword, type InputPasswordProps, type InputPasswordVisibilityToggleLabels, type InputProps, type InputSize, type InputStyles, type InputVariant, type ItemType, type ItemsType, KeyMapEnum, LOBE_THEME_APP_ID, Layout, LayoutFooter, type LayoutFooterProps, LayoutHeader, type LayoutHeaderProps, LayoutMain, type LayoutMainProps, type LayoutProps, LayoutSidebar, LayoutSidebarInner, type LayoutSidebarInnerProps, type LayoutSidebarProps, LayoutToc, type LayoutTocProps, type LegacyDateInput, List, type ListClickInfo, type ListDividerType, type ListItem, type ListItemType, type ListProps, type ListSemanticName, type LobeAppearance, type LobeCssVar, type LobeCustomStylish, type LobeCustomToken, lobeHighlightsTheme as LobeHighlightsTheme, type LobeNeutralColor, type LobeNeutralScale, type LobePrimaryColor, type LobeStatusPalette, type LobeTheme, LobeThemeScript, type LobeThemeScriptProps, type LobeThemeState, type LobeToken, I18nProvider as LobeUIProvider, Markdown, type MarkdownProps, MaskShadow, type MaskShadowProps, MaterialFileTypeIcon, type MaterialFileTypeIconProps, type MenuCheckboxItemType, type MenuDividerType, type MenuInfo, type MenuItemGroupType, type MenuItemType, type MenuSwitchItemType, Mermaid, type MermaidProps, Modal, ModalBackdrop, type ModalBackdropProps, ModalClose, type ModalCloseProps, type ModalComponentProps, type ModalConfirmConfig, ModalContent, type ModalContentProps, ModalContext, type ModalContextValue, ModalDescription, type ModalDescriptionProps, ModalFooter, type ModalFooterProps, ModalHeader, type ModalHeaderProps, ModalHost, type ModalHostProps, type ModalInstance, ModalPopup, type ModalPopupProps, ModalPortal, type ModalPortalProps, ModalRoot, type ModalRootProps, type ModalSystem, ModalTitle, type ModalTitleProps, ModalTrigger, type ModalTriggerProps, ModalViewport, type ModalViewportProps, type MonthPickerProps, MotionComponent, type MotionComponentType, MotionProvider, NeutralColors, NeutralColorsObj, Pagination, type PaginationAlign, type PaginationItemType, type PaginationProps, type PaginationSemanticName, type PaginationSize, type PaginationSizeChangerProps, type PanelMode, PatchDiff, type PatchDiffProps, type PickerClassNames, type PickerComponents, type PickerDateInput, type PickerDateStrings, type PickerLocale, type PickerLocaleInput, type PickerLocaleLang, type PickerMode, type PickerPanelProps, type PickerPlacement, type PickerPopupSemanticName, type PickerProps, type PickerPropsWithMultiple, type PickerRef, type PickerSemanticClassNames, type PickerSemanticName, type PickerSemanticStyles, type PickerSize, type PickerStatus, type PickerStyles, type PickerTagProps, type PickerValueInput, type PickerVariant, type Placement, type PlacementConfig, Popover, PopoverArrow, type PopoverArrowAtomProps, PopoverArrowIcon, PopoverBackdrop, type PopoverBackdropProps, type PopoverContextValue, PopoverGroup, type PopoverGroupHandle, type PopoverGroupItem, type PopoverPlacement, PopoverPopup, type PopoverPopupAtomProps, type PopoverPopupProps, PopoverPortal, type PopoverPortalAtomProps, type PopoverPortalProps, PopoverPositioner, type PopoverPositionerAtomProps, type PopoverPositionerProps, type PopoverProps, PopoverProvider, PopoverRoot, type PopoverTrigger, type PopoverTriggerComponentProps, PopoverTriggerElement, type PopoverTriggerElementProps, PopoverViewport, type PopoverViewportAtomProps, type PresetColorKey, type PresetColorType, type PresetDate, type PresetPickerProps, type PresetSystemColorKey, type PresetSystemColorType, PreviewGroup, type PreviewGroupProps, PrimaryColors, PrimaryColorsObj, Progress, type ProgressProps, type ProgressSize, type ProgressStatus, type ProgressType, type ProgressVariant, ProgressiveBlur, type ProgressiveBlurClassNames, type ProgressiveBlurMode, type ProgressiveBlurPosition, type ProgressiveBlurProps, type ProgressiveBlurStyles, QRCode, type QRCodeErrorLevel, type QRCodeProps, type QRCodeStatus, type QuarterPickerProps, Radio, RadioGroup, type RadioGroupOption, type RadioGroupProps, type RadioProps, type RangeChangeDates, type RangeChangeStrings, type RangeDisabledDate, type RangeInfo, type RangePickerComponent, type RangePickerProps, type RangePickerRef, Rate, type RateProps, type RenderItemContentOptions, type RenderOptions, type ResponsiveState, Result, type ResultProps, type ResultStatus, ScrollArea, ScrollAreaContent, type ScrollAreaContentProps, ScrollAreaCorner, type ScrollAreaCornerProps, type ScrollAreaProps, ScrollAreaRoot, type ScrollAreaRootProps, ScrollAreaScrollbar, type ScrollAreaScrollbarProps, ScrollAreaThumb, type ScrollAreaThumbProps, ScrollAreaViewport, type ScrollAreaViewportProps, ScrollShadow, type ScrollShadowProps, SearchBar, type SearchBarProps, SearchResultCards, type SearchResultCardsProps, Segmented, type SegmentedClassNames, SegmentedIndicator, type SegmentedIndicatorProps, SegmentedItem, SegmentedItemIcon, SegmentedItemLabel, type SegmentedItemProps, type SegmentedOption, type SegmentedOptions, type SegmentedOrientation, type SegmentedProps, SegmentedRoot, type SegmentedRootProps, type SegmentedSize, type SegmentedStyles, type SegmentedVariant, Select, SelectArrow, type SelectArrowProps, SelectBackdrop, type SelectBehaviorVariant, type SelectClassNames, SelectGroup, SelectGroupLabel, type SelectGroupLabelProps, type SelectGroupProps, SelectIcon, type SelectIconProps, type SelectIndicatorVariant, SelectItem, SelectItemIndicator, type SelectItemIndicatorProps, type SelectItemProps, SelectItemText, type SelectItemTextProps, SelectList, type SelectListProps, type SelectOption, type SelectOptionGroup, type SelectOptions, SelectPopup, type SelectPopupProps, SelectPortal, type SelectPortalProps, SelectPositioner, type SelectPositionerProps, type SelectProps, SelectRoot, type SelectRootChangeEventDetails, SelectScrollDownArrow, type SelectScrollDownArrowProps, SelectScrollUpArrow, type SelectScrollUpArrowProps, SelectSeparator, type SelectSize, SelectTrigger, type SelectTriggerProps, SelectValue, type SelectValueProps, type SelectVariant, _default$5 as ShikiLobeTheme, SideNav, type SideNavProps, type SinglePickerComponent, Skeleton, type SkeletonAnimation, SkeletonAvatar, type SkeletonAvatarProps, type SkeletonProps, SkeletonText, type SkeletonTextProps, Slider, type SliderProps, SliderWithInput, type SliderWithInputProps, Snippet, type SnippetProps, type SortOrder, SortableList, type SortableListProps, type SpanProps, Spin, type SpinProps, type SpinSize, type SpinVariant, _default$6 as SplitButton, type SplitButtonMenuProps, type SplitButtonProps, type StaticStyleExtract, type StaticStyleUtils, Statistic, type StatisticProps, type StepItem, type StepStatus, Steps, type StepsProps, type SubMenuType, type SvgProps, Switch, type SwitchChangeEventHandler, type SwitchClassNames, type SwitchClickEventHandler, type SwitchContextType, SwitchIcon, type SwitchIconPosition, type SwitchIconProps, type SwitchProps, SwitchRoot, type SwitchRootProps, type SwitchSize, type SwitchStyles, SwitchThumb, type SwitchThumbProps, SyntaxHighlighter, type SyntaxHighlighterProps, SyntaxMermaid, type SyntaxMermaidProps, type SystemColorToken, Table, TableBody, type TableBreakpoint, TableCell, type TableCellAttributes, type TableCellProps, type TableClassNames, TableColGroup, type TableColGroupColumn, type TableColGroupProps, type TableColumn, type TableColumnAlign, type TableColumnEllipsis, type TableColumnFilterItem, type TableColumnFixed, type TableColumnGroupProps, type TableColumnGroupType, type TableColumnProps, type TableColumnSorter, type TableColumnTitle, type TableColumnTitleProps, type TableColumnType, type TableColumnsType, type TableCompareFn, type TableComponents, type TableComponentsSemanticName, TableContainer, type TableCurrentDataSource, type TableCustomizeComponent, type TableDataIndex, TableElement, type TableElementProps, type TableExpandIconProps, type TableExpandableConfig, TableExpandedRow, type TableExpandedRowProps, type TableExpandedRowRender, type TableFilterDropdownPopupProps, type TableFilterDropdownProps, type TableFilters, TableFooter, TableHeader, TableHeaderCell, type TableHeaderCellAttributes, type TableLoadingConfig, type TableLocale, type TableMultipleSorterResult, type TablePaginationConfig, type TablePaginationPlacement, type TablePartProps, type TableProps, type TableRef, type TableRenderedCell, TableRoot, type TableRootProps, TableRow, type TableRowClassName, type TableRowProps, type TableRowSelectMethod, type TableRowSelection, type TableRowSelectionCheckboxProps, type TableRowSelectionType, TableScroll, type TableScrollProps, type TableScrollToConfig, type TableSectionProps, type TableSelectionItem, type TableSelectionPreset, type TableSemanticInfo, type TableSemanticName, type TableSize, type TableSorterResult, type TableSorterTooltipProps, type TableSticky, type TableStyles, type TableSummaryCellProps, TableSummaryFoot, type TableSummaryProps, type TableSummaryRowProps, TableTitle, type TableVariant, Tabs, type TabsClassNames, TabsIndicator, type TabsIndicatorProps, type TabsItem, TabsList, type TabsListProps, type TabsOrientation, TabsPanel, type TabsPanelProps, type TabsProps, TabsRoot, type TabsRootProps, type TabsSize, type TabsStyles, TabsTab, type TabsTabProps, type TabsVariant, Tag, type TagClassNames, type TagProps, type TagShape, type TagSize, type TagStyles, type TagVariant, Text, _default$7 as TextArea, type TextAreaAutoSize, type TextAreaProps, type TextClassNames, type TextProps, type TextStyles, ThemeScope, type ThemeScopeProps, type TimePickerLocale, type TimePickerProps, type ToastAPI, ToastHost, type ToastHostProps, type ToastInstance, type ToastOptions, type ToastPosition, type ToastPromiseOptions, type ToastProps, type ToastType, ToggleGroup, type ToggleGroupClassNames, ToggleGroupItem, ToggleGroupItemIcon, ToggleGroupItemLabel, type ToggleGroupItemProps, type ToggleGroupOption, type ToggleGroupProps, ToggleGroupRoot, type ToggleGroupRootProps, type ToggleGroupSize, type ToggleGroupStyles, type ToggleGroupVariant, Tooltip, TooltipGroup, type TooltipGroupProps, type TooltipPlacement, type TooltipPopupComponentProps, type TooltipPortalProps, type TooltipPositionerProps, type TooltipProps, type TooltipTriggerComponentProps, Tree, type TreeClassNames, type TreeDataNode, type TreeFlatRow, type TreeProps, type TreeStyles, type Trigger, Typography, type TypographyProps, Upload, type UploadChangeInfo, UploadDragger, type UploadProps, type UseImagePreviewResult, type UseScopeArrowNavOptions, type UseScopeSwitcherOptions, Video, type VideoMarker, type VideoPlayer, type VideoProps, type VideoSection, type VideoState, type VirtualListProps, type WeekPickerProps, type YearPickerProps, accordionStyles, actionIconStyles, alertStyles, styles as autoCompleteStyles, backdropTransition, buttonPaddingInline, buttonStyles, checkboxStyles, closeContextMenu, colorsPreset, colorsPresetSystem, combineKeys, conductCheck, confirmModal, controlHeight, copyToClipboard, createGlobalStyle, createLobeToken, createModal, createModalSystem, createPickerLocale, createStaticStyles, css, cssVar, cx, datePickerLocaleEnUS, datePickerLocaleZhCN, drawerBackdropTransition, extractStaticStyle, findCustomThemeName, flattenVisible, focusScopeItem, styles$1 as focusScopeStyles, formatStatisticValue, genCdnUrl, genFontFamily, genFontFamilyCode, generateColorNeutralPalette, generateColorPalette, generateNeutralScale, generatePicker, getActiveScopeId, getAgentAvatarTraits, getAllKeys, getCustomNeutralCss, getCustomPaletteCss, getCustomPrimaryCss, getDrawerMotionConfig, getFloatingCollisionPadding, getGlobalCss, getItemKey, getItemLabel, getLastFocusedItem, getThemeCss, hasAnyIcon, hasCheckboxAndIcon, highlighterThemes, containsScript as htmlPreviewContainsScript, injectGlobal, inputClassNames as inputStyles, rootVariants as inputVariants, installGlobalFocusRing, isCustomNeutralColor, isCustomPrimaryColor, isFullHtmlDocument, isHtmlContentClosed, keyframes, staticStylish as lobeStaticStylish, styles$2 as menuSharedStyles, mermaidThemes, modalMotionConfig, neutralColors, neutralColorsSwatches, notifyScopeItemFocus, parseTrigger, placementMap, preprocessMarkdownContent, presetColors, presetSystemColors, preventDefault, preventDefaultAndStopPropagation, primaryColors, primaryColorsSwatches, radioStyles, registerLobeNeutral, registerLobePalette, registerScope, rehypeCustomFootnotes, rehypeKatexDir, rehypeStreamAnimated, remarkBr, remarkColor, remarkCustomFootnotes, remarkGfmPlus, remarkVideo, renderDropdownMenuItems, renderIcon, responsive, setActiveScope, setContextMenuInterceptor, setFloatingCollisionPadding, setLastFocusedItem, setLobeTheme, showContextMenu, sliderStyles, stopPropagation, switchStyles, tabsStyles, groupStyles as textGroupStyles, textStyles, variants as textVariants, toFloatingUIPlacement, toast, toggleGroupStyles, styles$3 as treeStyles, updateContextMenuItems, useAccordionContext, useActiveScopeId, useAppElement, useCdnFn, useDirection, useDraggablePanelContext, useDrawerActions, useDrawerOpen, useFocusScopeActive, useFocusScopeId, useFormContext, useImagePreview, useModalActions, useModalContext, useModalOpen, useMotionComponent, usePopoverContext, usePopoverGroupHandle, usePopoverPortalContainer, useResponsive, useScopeArrowNav, useScopeSwitcher, useSwitchContext, useTabsContext, useTheme, useThemeMode, useToast, useTranslation, useVideo, useVideoPlayer, useVideoState };
package/es/index.mjs CHANGED
@@ -22,6 +22,7 @@ import { generateNeutralScale, isCustomNeutralColor, registerLobeNeutral } from
22
22
  import { generateColorNeutralPalette, generateColorPalette } from "./styles/theme/generateColorPalette.mjs";
23
23
  import { findCustomThemeName, neutralColors, neutralColorsSwatches, primaryColors, primaryColorsSwatches } from "./styles/customTheme.mjs";
24
24
  import { isCustomPrimaryColor } from "./styles/theme/customPrimary.mjs";
25
+ import { genFontFamily, genFontFamilyCode } from "./styles/theme/token/font.mjs";
25
26
  import { createLobeToken } from "./styles/theme/createLobeToken.mjs";
26
27
  import { createStaticStyles, css, cssVar, cx, extractStaticStyle, injectGlobal, keyframes, responsive } from "./styles/css.mjs";
27
28
  import { getCustomNeutralCss, getCustomPaletteCss, getCustomPrimaryCss, getGlobalCss, getThemeCss } from "./styles/theme/themeCss.mjs";
@@ -228,4 +229,4 @@ import { ToggleGroupItem, ToggleGroupItemIcon, ToggleGroupItemLabel, ToggleGroup
228
229
  import ToggleGroup from "./ToggleGroup/ToggleGroup.mjs";
229
230
  import { rehypeStreamAnimated } from "@lobehub/streamdown";
230
231
  import { ErrorBoundary } from "react-error-boundary";
231
- export { A, AGENT_AVATAR_COLORS, AGENT_AVATAR_SHAPES, AGENT_AVATAR_STATES, Accordion, AccordionHeader, AccordionItem, AccordionPanel, AccordionRoot, AccordionTrigger, ActionIcon, ActionIconGroup, AgentAvatar, Alert, Anchor, AutoComplete, Avatar, AvatarGroup, Badge, Block, Breadcrumb, Burger, Button, CLASSNAMES, Carousel, Center, Checkbox_default as Checkbox, CheckboxGroup, CodeDiff, CodeEditor, Collapsible, ColorPicker, ColorSwatches, ConfigProvider, ContextMenuHost, ContextMenuTrigger, CopyButton, DatePicker, DateRangePicker, DayjsDatePicker, DayjsDateRangePicker, Descriptions, Divider, DownloadButton, DraggablePanel, DraggablePanelBody, DraggablePanelContainer, DraggablePanelContent, DraggablePanelFooter, DraggablePanelHandle, DraggablePanelHeader, DraggablePanelRoot, DraggablePanelToggle, DraggableSideNav, Drawer, DrawerBackdrop, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerPopup, DrawerPortal, DrawerRoot, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItemIndicator, DropdownMenuCheckboxItemPrimitive, DropdownMenuFooter, DropdownMenuGroup, DropdownMenuGroupLabel, DropdownMenuHeader, DropdownMenuItem, DropdownMenuItemContent, DropdownMenuItemDesc, DropdownMenuItemExtra, DropdownMenuItemIcon, DropdownMenuItemLabel, DropdownMenuItemLabelGroup, DropdownMenuPopup, DropdownMenuPortal, DropdownMenuPositioner, DropdownMenuRoot, DropdownMenuScrollViewport, DropdownMenuSeparator, DropdownMenuSubmenuArrow, DropdownMenuSubmenuRoot, DropdownMenuSubmenuTrigger, DropdownMenuSwitchItem, DropdownMenuTrigger, EditableText, EditorSlashMenu, EmojiPicker, Empty, ErrorBoundary, FileTypeIcon, FlexBasic_default as FlexBasic, FlexBasic_default as Flexbox, FloatingPanel, FloatingSheet, FluentEmoji, FocusScope, FontLoader, Form, FormDivider, FormField, FormFlatGroup, FormFooter, FormGroup, FormSubmitFooter, FormTitle, Freeze, Grid, GroupAvatar, GuideCard, DEFAULT_HEIGHT as HTML_PREVIEW_DEFAULT_HEIGHT, DEFAULT_SANDBOX as HTML_PREVIEW_DEFAULT_SANDBOX, AUTO_HEIGHT_MESSAGE_TYPE as HTML_PREVIEW_RESIZE_MESSAGE, Header, Highlighter, Hotkey, HotkeyInput, HtmlPreview, HtmlPreviewIframe, I18nProvider, Icon, IconProvider, Image, ImageSelect, Input_default as Input, InputNumber_default as InputNumber, InputOTP, InputPassword_default as InputPassword, KeyMapEnum, LOBE_THEME_APP_ID, Layout, LayoutFooter, LayoutHeader, LayoutMain, LayoutSidebar, LayoutSidebarInner, LayoutToc, List, lobeHighlightsTheme as LobeHighlightsTheme, LobeThemeScript, I18nProvider as LobeUIProvider, Markdown, MaskShadow, MaterialFileTypeIcon, Mermaid, Modal, ModalBackdrop, ModalClose, ModalContent, ModalContext, ModalDescription, ModalFooter, ModalHeader, ModalHost, ModalPopup, ModalPortal, ModalRoot, ModalTitle, ModalTrigger, ModalViewport, MotionComponent, MotionProvider, Pagination, PatchDiff, Popover, PopoverArrow, PopoverArrowIcon, PopoverBackdrop, PopoverGroup, PopoverPopup, PopoverPortal, PopoverPositioner, PopoverProvider, PopoverRoot, PopoverTriggerElement, PopoverViewport, PreviewGroup, Progress, ProgressiveBlur, QRCode, Radio, RadioGroup, Rate, Result, ScrollArea, ScrollAreaContent, ScrollAreaCorner, ScrollAreaRoot, ScrollAreaScrollbar, ScrollAreaThumb, ScrollAreaViewport, ScrollShadow, SearchBar, SearchResultCards, Segmented, SegmentedIndicator, SegmentedItem, SegmentedItemIcon, SegmentedItemLabel, SegmentedRoot, Select, SelectArrow, SelectBackdrop, SelectGroup, SelectGroupLabel, SelectIcon, SelectItem, SelectItemIndicator, SelectItemText, SelectList, SelectPopup, SelectPortal, SelectPositioner, SelectRoot, SelectScrollDownArrow, SelectScrollUpArrow, SelectSeparator, SelectTrigger, SelectValue, lobe_theme_default as ShikiLobeTheme, SideNav, Skeleton, SkeletonAvatar, SkeletonText, Slider, SliderWithInput, Snippet, SortableList, Spin, SplitButton, Statistic, Steps, Switch, SwitchIcon, SwitchRoot, SwitchThumb, SyntaxHighlighter, SyntaxMermaid, Table, TableBody, TableCell, TableColGroup, TableContainer, TableElement, TableExpandedRow, TableFooter, TableHeader, TableHeaderCell, TableRoot, TableRow, TableScroll, TableSummaryFoot, TableTitle, Tabs, TabsIndicator, TabsList, TabsPanel, TabsRoot, TabsTab, Tag, Text, TextArea_default as TextArea, ThemeScope, ToastHost, ToggleGroup, ToggleGroupItem, ToggleGroupItemIcon, ToggleGroupItemLabel, ToggleGroupRoot, Tooltip, TooltipGroup, Tree, Typography, Upload, UploadDragger, Video, accordionStyles, actionIconStyles, alertStyles, styles as autoCompleteStyles, backdropTransition, buttonPaddingInline, buttonStyles, checkboxStyles, closeContextMenu, colorsPreset, colorsPresetSystem, combineKeys, conductCheck, confirmModal, controlHeight, copyToClipboard, createGlobalStyle, createLobeToken, createModal, createModalSystem, createPickerLocale, createStaticStyles, css, cssVar, cx, datePickerLocaleEnUS, datePickerLocaleZhCN, drawerBackdropTransition, extractStaticStyle, findCustomThemeName, flattenVisible, focusScopeItem, styles$1 as focusScopeStyles, formatStatisticValue, genCdnUrl, generateColorNeutralPalette, generateColorPalette, generateNeutralScale, generatePicker, getActiveScopeId, getAgentAvatarTraits, getAllKeys, getCustomNeutralCss, getCustomPaletteCss, getCustomPrimaryCss, getDrawerMotionConfig, getFloatingCollisionPadding, getGlobalCss, getItemKey, getItemLabel, getLastFocusedItem, getThemeCss, hasAnyIcon, hasCheckboxAndIcon, highlighterThemes, containsScript as htmlPreviewContainsScript, injectGlobal, inputClassNames as inputStyles, rootVariants as inputVariants, installGlobalFocusRing, isCustomNeutralColor, isCustomPrimaryColor, isFullHtmlDocument, isHtmlContentClosed, keyframes, staticStylish as lobeStaticStylish, styles$2 as menuSharedStyles, mermaidThemes, modalMotionConfig, neutralColors, neutralColorsSwatches, notifyScopeItemFocus, parseTrigger, placementMap, preprocessMarkdownContent, presetColors, presetSystemColors, preventDefault, preventDefaultAndStopPropagation, primaryColors, primaryColorsSwatches, radioStyles, registerLobeNeutral, registerLobePalette, registerScope, rehypeCustomFootnotes, rehypeKatexDir, rehypeStreamAnimated, remarkBr, remarkColor, remarkCustomFootnotes, remarkGfmPlus, remarkVideo, renderDropdownMenuItems, renderIcon, responsive, setActiveScope, setContextMenuInterceptor, setFloatingCollisionPadding, setLastFocusedItem, setLobeTheme, showContextMenu, sliderStyles, stopPropagation, switchStyles, tabsStyles, groupStyles as textGroupStyles, textStyles, variants as textVariants, toFloatingUIPlacement, toast, toggleGroupStyles, styles$3 as treeStyles, updateContextMenuItems, useAccordionContext, useActiveScopeId, useAppElement, useCdnFn, useDirection, useDraggablePanelContext, useDrawerActions, useDrawerOpen, useFocusScopeActive, useFocusScopeId, useFormContext, useImagePreview, useModalActions, useModalContext, useModalOpen, useMotionComponent, usePopoverContext, usePopoverGroupHandle, usePopoverPortalContainer, useResponsive, useScopeArrowNav, useScopeSwitcher, useSwitchContext, useTabsContext, useTheme, useThemeMode, useToast, useTranslation, useVideo, useVideoPlayer, useVideoState };
232
+ export { A, AGENT_AVATAR_COLORS, AGENT_AVATAR_SHAPES, AGENT_AVATAR_STATES, Accordion, AccordionHeader, AccordionItem, AccordionPanel, AccordionRoot, AccordionTrigger, ActionIcon, ActionIconGroup, AgentAvatar, Alert, Anchor, AutoComplete, Avatar, AvatarGroup, Badge, Block, Breadcrumb, Burger, Button, CLASSNAMES, Carousel, Center, Checkbox_default as Checkbox, CheckboxGroup, CodeDiff, CodeEditor, Collapsible, ColorPicker, ColorSwatches, ConfigProvider, ContextMenuHost, ContextMenuTrigger, CopyButton, DatePicker, DateRangePicker, DayjsDatePicker, DayjsDateRangePicker, Descriptions, Divider, DownloadButton, DraggablePanel, DraggablePanelBody, DraggablePanelContainer, DraggablePanelContent, DraggablePanelFooter, DraggablePanelHandle, DraggablePanelHeader, DraggablePanelRoot, DraggablePanelToggle, DraggableSideNav, Drawer, DrawerBackdrop, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerPopup, DrawerPortal, DrawerRoot, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItemIndicator, DropdownMenuCheckboxItemPrimitive, DropdownMenuFooter, DropdownMenuGroup, DropdownMenuGroupLabel, DropdownMenuHeader, DropdownMenuItem, DropdownMenuItemContent, DropdownMenuItemDesc, DropdownMenuItemExtra, DropdownMenuItemIcon, DropdownMenuItemLabel, DropdownMenuItemLabelGroup, DropdownMenuPopup, DropdownMenuPortal, DropdownMenuPositioner, DropdownMenuRoot, DropdownMenuScrollViewport, DropdownMenuSeparator, DropdownMenuSubmenuArrow, DropdownMenuSubmenuRoot, DropdownMenuSubmenuTrigger, DropdownMenuSwitchItem, DropdownMenuTrigger, EditableText, EditorSlashMenu, EmojiPicker, Empty, ErrorBoundary, FileTypeIcon, FlexBasic_default as FlexBasic, FlexBasic_default as Flexbox, FloatingPanel, FloatingSheet, FluentEmoji, FocusScope, FontLoader, Form, FormDivider, FormField, FormFlatGroup, FormFooter, FormGroup, FormSubmitFooter, FormTitle, Freeze, Grid, GroupAvatar, GuideCard, DEFAULT_HEIGHT as HTML_PREVIEW_DEFAULT_HEIGHT, DEFAULT_SANDBOX as HTML_PREVIEW_DEFAULT_SANDBOX, AUTO_HEIGHT_MESSAGE_TYPE as HTML_PREVIEW_RESIZE_MESSAGE, Header, Highlighter, Hotkey, HotkeyInput, HtmlPreview, HtmlPreviewIframe, I18nProvider, Icon, IconProvider, Image, ImageSelect, Input_default as Input, InputNumber_default as InputNumber, InputOTP, InputPassword_default as InputPassword, KeyMapEnum, LOBE_THEME_APP_ID, Layout, LayoutFooter, LayoutHeader, LayoutMain, LayoutSidebar, LayoutSidebarInner, LayoutToc, List, lobeHighlightsTheme as LobeHighlightsTheme, LobeThemeScript, I18nProvider as LobeUIProvider, Markdown, MaskShadow, MaterialFileTypeIcon, Mermaid, Modal, ModalBackdrop, ModalClose, ModalContent, ModalContext, ModalDescription, ModalFooter, ModalHeader, ModalHost, ModalPopup, ModalPortal, ModalRoot, ModalTitle, ModalTrigger, ModalViewport, MotionComponent, MotionProvider, Pagination, PatchDiff, Popover, PopoverArrow, PopoverArrowIcon, PopoverBackdrop, PopoverGroup, PopoverPopup, PopoverPortal, PopoverPositioner, PopoverProvider, PopoverRoot, PopoverTriggerElement, PopoverViewport, PreviewGroup, Progress, ProgressiveBlur, QRCode, Radio, RadioGroup, Rate, Result, ScrollArea, ScrollAreaContent, ScrollAreaCorner, ScrollAreaRoot, ScrollAreaScrollbar, ScrollAreaThumb, ScrollAreaViewport, ScrollShadow, SearchBar, SearchResultCards, Segmented, SegmentedIndicator, SegmentedItem, SegmentedItemIcon, SegmentedItemLabel, SegmentedRoot, Select, SelectArrow, SelectBackdrop, SelectGroup, SelectGroupLabel, SelectIcon, SelectItem, SelectItemIndicator, SelectItemText, SelectList, SelectPopup, SelectPortal, SelectPositioner, SelectRoot, SelectScrollDownArrow, SelectScrollUpArrow, SelectSeparator, SelectTrigger, SelectValue, lobe_theme_default as ShikiLobeTheme, SideNav, Skeleton, SkeletonAvatar, SkeletonText, Slider, SliderWithInput, Snippet, SortableList, Spin, SplitButton, Statistic, Steps, Switch, SwitchIcon, SwitchRoot, SwitchThumb, SyntaxHighlighter, SyntaxMermaid, Table, TableBody, TableCell, TableColGroup, TableContainer, TableElement, TableExpandedRow, TableFooter, TableHeader, TableHeaderCell, TableRoot, TableRow, TableScroll, TableSummaryFoot, TableTitle, Tabs, TabsIndicator, TabsList, TabsPanel, TabsRoot, TabsTab, Tag, Text, TextArea_default as TextArea, ThemeScope, ToastHost, ToggleGroup, ToggleGroupItem, ToggleGroupItemIcon, ToggleGroupItemLabel, ToggleGroupRoot, Tooltip, TooltipGroup, Tree, Typography, Upload, UploadDragger, Video, accordionStyles, actionIconStyles, alertStyles, styles as autoCompleteStyles, backdropTransition, buttonPaddingInline, buttonStyles, checkboxStyles, closeContextMenu, colorsPreset, colorsPresetSystem, combineKeys, conductCheck, confirmModal, controlHeight, copyToClipboard, createGlobalStyle, createLobeToken, createModal, createModalSystem, createPickerLocale, createStaticStyles, css, cssVar, cx, datePickerLocaleEnUS, datePickerLocaleZhCN, drawerBackdropTransition, extractStaticStyle, findCustomThemeName, flattenVisible, focusScopeItem, styles$1 as focusScopeStyles, formatStatisticValue, genCdnUrl, genFontFamily, genFontFamilyCode, generateColorNeutralPalette, generateColorPalette, generateNeutralScale, generatePicker, getActiveScopeId, getAgentAvatarTraits, getAllKeys, getCustomNeutralCss, getCustomPaletteCss, getCustomPrimaryCss, getDrawerMotionConfig, getFloatingCollisionPadding, getGlobalCss, getItemKey, getItemLabel, getLastFocusedItem, getThemeCss, hasAnyIcon, hasCheckboxAndIcon, highlighterThemes, containsScript as htmlPreviewContainsScript, injectGlobal, inputClassNames as inputStyles, rootVariants as inputVariants, installGlobalFocusRing, isCustomNeutralColor, isCustomPrimaryColor, isFullHtmlDocument, isHtmlContentClosed, keyframes, staticStylish as lobeStaticStylish, styles$2 as menuSharedStyles, mermaidThemes, modalMotionConfig, neutralColors, neutralColorsSwatches, notifyScopeItemFocus, parseTrigger, placementMap, preprocessMarkdownContent, presetColors, presetSystemColors, preventDefault, preventDefaultAndStopPropagation, primaryColors, primaryColorsSwatches, radioStyles, registerLobeNeutral, registerLobePalette, registerScope, rehypeCustomFootnotes, rehypeKatexDir, rehypeStreamAnimated, remarkBr, remarkColor, remarkCustomFootnotes, remarkGfmPlus, remarkVideo, renderDropdownMenuItems, renderIcon, responsive, setActiveScope, setContextMenuInterceptor, setFloatingCollisionPadding, setLastFocusedItem, setLobeTheme, showContextMenu, sliderStyles, stopPropagation, switchStyles, tabsStyles, groupStyles as textGroupStyles, textStyles, variants as textVariants, toFloatingUIPlacement, toast, toggleGroupStyles, styles$3 as treeStyles, updateContextMenuItems, useAccordionContext, useActiveScopeId, useAppElement, useCdnFn, useDirection, useDraggablePanelContext, useDrawerActions, useDrawerOpen, useFocusScopeActive, useFocusScopeId, useFormContext, useImagePreview, useModalActions, useModalContext, useModalOpen, useMotionComponent, usePopoverContext, usePopoverGroupHandle, usePopoverPortalContainer, useResponsive, useScopeArrowNav, useScopeSwitcher, useSwitchContext, useTabsContext, useTheme, useThemeMode, useToast, useTranslation, useVideo, useVideoPlayer, useVideoState };
package/es/style.css CHANGED
@@ -5999,6 +5999,10 @@
5999
5999
  transition: transform .16s var(--lobe-motion-ease-out);
6000
6000
  }
6001
6001
 
6002
+ .lb1ja9v0h {
6003
+ transition: transform .18s cubic-bezier(.22, 1, .36, 1), opacity .18s ease-out;
6004
+ }
6005
+
6002
6006
  .lblhg8ld {
6003
6007
  transition: transform .24s var(--lobe-motion-ease-out);
6004
6008
  }
@@ -6027,8 +6031,8 @@
6027
6031
  transition: width .2s, background .2s;
6028
6032
  }
6029
6033
 
6030
- .lb10tmjme {
6031
- transition: width .38s cubic-bezier(.22, 1, .36, 1), margin .38s cubic-bezier(.22, 1, .36, 1), opacity .26s cubic-bezier(.22, 1, .36, 1);
6034
+ .lbp7890b {
6035
+ transition: width .3s cubic-bezier(.22, 1, .36, 1), margin .3s cubic-bezier(.22, 1, .36, 1);
6032
6036
  }
6033
6037
 
6034
6038
  .lb15cnf4b {
@@ -8875,6 +8879,10 @@
8875
8879
  transform: rotateX(60deg);
8876
8880
  }
8877
8881
 
8882
+ .lb1a33avv {
8883
+ transform: scale(.5);
8884
+ }
8885
+
8878
8886
  .lb10078c2 {
8879
8887
  transform: scale(.66);
8880
8888
  }
@@ -8883,6 +8891,10 @@
8883
8891
  transform: scale(.75);
8884
8892
  }
8885
8893
 
8894
+ .lb3oybdh {
8895
+ transform: scale(1);
8896
+ }
8897
+
8886
8898
  .lb1ufz0iv {
8887
8899
  transform: scaleX(0);
8888
8900
  }
@@ -9,4 +9,5 @@ import { LobeStatusPalette, registerLobePalette } from "./theme/customPalette.mj
9
9
  import { staticStylish } from "./theme/customStylishStatic.mjs";
10
10
  import { generateColorNeutralPalette, generateColorPalette } from "./theme/generateColorPalette.mjs";
11
11
  import { getCustomNeutralCss, getCustomPaletteCss, getCustomPrimaryCss, getGlobalCss, getThemeCss } from "./theme/themeCss.mjs";
12
- export { type CreateLobeTokenParams, type CustomNeutralColor, type CustomPrimaryColor, type LobeAppearance, type LobeCssVar, type LobeNeutralColor, type LobeNeutralScale, type LobePrimaryColor, type LobeStatusPalette, type LobeTheme, LobeThemeScript, type LobeThemeScriptProps, type LobeThemeState, type LobeToken, NeutralColors, NeutralColorsObj, PrimaryColors, PrimaryColorsObj, type ResponsiveState, type StaticStyleExtract, type StaticStyleUtils, ThemeScope, type ThemeScopeProps, createGlobalStyle, createLobeToken, createStaticStyles, css, cssVar, cx, extractStaticStyle, findCustomThemeName, generateColorNeutralPalette, generateColorPalette, generateNeutralScale, getCustomNeutralCss, getCustomPaletteCss, getCustomPrimaryCss, getGlobalCss, getThemeCss, injectGlobal, isCustomNeutralColor, isCustomPrimaryColor, keyframes, staticStylish as lobeStaticStylish, neutralColors, neutralColorsSwatches, primaryColors, primaryColorsSwatches, registerLobeNeutral, registerLobePalette, responsive, setLobeTheme, useResponsive, useTheme, useThemeMode };
12
+ import { GenFontFamilyOptions, genFontFamily, genFontFamilyCode } from "./theme/token/font.mjs";
13
+ export { type CreateLobeTokenParams, type CustomNeutralColor, type CustomPrimaryColor, type GenFontFamilyOptions, type LobeAppearance, type LobeCssVar, type LobeNeutralColor, type LobeNeutralScale, type LobePrimaryColor, type LobeStatusPalette, type LobeTheme, LobeThemeScript, type LobeThemeScriptProps, type LobeThemeState, type LobeToken, NeutralColors, NeutralColorsObj, PrimaryColors, PrimaryColorsObj, type ResponsiveState, type StaticStyleExtract, type StaticStyleUtils, ThemeScope, type ThemeScopeProps, createGlobalStyle, createLobeToken, createStaticStyles, css, cssVar, cx, extractStaticStyle, findCustomThemeName, genFontFamily, genFontFamilyCode, generateColorNeutralPalette, generateColorPalette, generateNeutralScale, getCustomNeutralCss, getCustomPaletteCss, getCustomPrimaryCss, getGlobalCss, getThemeCss, injectGlobal, isCustomNeutralColor, isCustomPrimaryColor, keyframes, staticStylish as lobeStaticStylish, neutralColors, neutralColorsSwatches, primaryColors, primaryColorsSwatches, registerLobeNeutral, registerLobePalette, responsive, setLobeTheme, useResponsive, useTheme, useThemeMode };
@@ -3,10 +3,11 @@ import { generateNeutralScale, isCustomNeutralColor, registerLobeNeutral } from
3
3
  import { generateColorNeutralPalette, generateColorPalette } from "./theme/generateColorPalette.mjs";
4
4
  import { findCustomThemeName, neutralColors, neutralColorsSwatches, primaryColors, primaryColorsSwatches } from "./customTheme.mjs";
5
5
  import { isCustomPrimaryColor } from "./theme/customPrimary.mjs";
6
+ import { genFontFamily, genFontFamilyCode } from "./theme/token/font.mjs";
6
7
  import { createLobeToken } from "./theme/createLobeToken.mjs";
7
8
  import { createStaticStyles, css, cssVar, cx, extractStaticStyle, injectGlobal, keyframes, responsive } from "./css.mjs";
8
9
  import { getCustomNeutralCss, getCustomPaletteCss, getCustomPrimaryCss, getGlobalCss, getThemeCss } from "./theme/themeCss.mjs";
9
10
  import { LobeThemeScript, ThemeScope, setLobeTheme, useResponsive, useTheme, useThemeMode } from "./theme/scope.mjs";
10
11
  import { createGlobalStyle } from "./createGlobalStyle.mjs";
11
12
  import { staticStylish } from "./theme/customStylishStatic.mjs";
12
- export { LobeThemeScript, ThemeScope, createGlobalStyle, createLobeToken, createStaticStyles, css, cssVar, cx, extractStaticStyle, findCustomThemeName, generateColorNeutralPalette, generateColorPalette, generateNeutralScale, getCustomNeutralCss, getCustomPaletteCss, getCustomPrimaryCss, getGlobalCss, getThemeCss, injectGlobal, isCustomNeutralColor, isCustomPrimaryColor, keyframes, staticStylish as lobeStaticStylish, neutralColors, neutralColorsSwatches, primaryColors, primaryColorsSwatches, registerLobeNeutral, registerLobePalette, responsive, setLobeTheme, useResponsive, useTheme, useThemeMode };
13
+ export { LobeThemeScript, ThemeScope, createGlobalStyle, createLobeToken, createStaticStyles, css, cssVar, cx, extractStaticStyle, findCustomThemeName, genFontFamily, genFontFamilyCode, generateColorNeutralPalette, generateColorPalette, generateNeutralScale, getCustomNeutralCss, getCustomPaletteCss, getCustomPrimaryCss, getGlobalCss, getThemeCss, injectGlobal, isCustomNeutralColor, isCustomPrimaryColor, keyframes, staticStylish as lobeStaticStylish, neutralColors, neutralColorsSwatches, primaryColors, primaryColorsSwatches, registerLobeNeutral, registerLobePalette, responsive, setLobeTheme, useResponsive, useTheme, useThemeMode };
@@ -1,6 +1,7 @@
1
1
  import { isRegisteredPalette } from "./customPalette.mjs";
2
2
  import { isCustomNeutral } from "./customNeutral.mjs";
3
3
  import { neutralColors, primaryColors } from "../customTheme.mjs";
4
+ import { LOCALE_FONTS, genFontFamily, genFontFamilyCode } from "./token/font.mjs";
4
5
  import { createLobeTokenGroups } from "./createLobeToken.mjs";
5
6
  import { toCssVarName, toCssVariables } from "../css.mjs";
6
7
  // src/styles/theme/themeCss.ts
@@ -51,6 +52,10 @@ const colorRules = (appearance) => [...Object.keys(primaryColors).map((primaryCo
51
52
  appearance,
52
53
  neutralColor
53
54
  }).neutral)))];
55
+ const localeFontRules = () => LOCALE_FONTS.map(({ langs }) => rule(langs.map((lang) => `:is(:root, [data-theme]):lang(${lang})`).join(", "), {
56
+ [toCssVarName("fontFamily")]: genFontFamily({ locale: langs[0] }),
57
+ [toCssVarName("fontFamilyCode")]: genFontFamilyCode({ locale: langs[0] })
58
+ }));
54
59
  const getCustomPrimaryCss = (color) => {
55
60
  const hex = color.toLowerCase();
56
61
  return ["light", "dark"].map((appearance) => rule(`[data-primary-color='${hex}']${appearanceSelector(appearance)}`, toCssVariables(createLobeTokenGroups({
@@ -376,6 +381,7 @@ const getThemeCss = () => cached ??= [
376
381
  appearanceRule("[data-theme='dark']", "dark"),
377
382
  ...colorRules("light"),
378
383
  ...colorRules("dark"),
384
+ ...localeFontRules(),
379
385
  essentialCss
380
386
  ].join("\n\n");
381
387
  const getGlobalCss = () => `${layerOrder}\n\n${globalCss}`;
@@ -1 +1 @@
1
- {"version":3,"file":"themeCss.mjs","names":[],"sources":["../../../src/styles/theme/themeCss.ts"],"sourcesContent":["import { toCssVariables, toCssVarName } from '../css';\nimport { neutralColors, primaryColors } from '../customTheme';\nimport { createLobeTokenGroups } from './createLobeToken';\nimport { isCustomNeutral } from './customNeutral';\nimport { isRegisteredPalette } from './customPalette';\nimport type { CustomPrimaryColor } from './customPrimary';\nimport type { LobeAppearance } from './scope';\n\nconst v = (key: string) => `var(${toCssVarName(key)})`;\n\nconst ring: Record<LobeAppearance, string> = {\n dark: '0 0 0 1px rgb(255 255 255 / 18%)',\n light: '0 0 0 1px rgb(0 0 0 / 5%)',\n};\n\n/* `initial` makes a light scope nested in a dark one fall back to each variant's own fill\n instead of inheriting the dark table surface. */\nconst surface: Record<LobeAppearance, Record<string, string>> = {\n dark: {\n '--lobe-fill-border': v('colorFillSecondary'),\n '--lobe-fill-border-strong': v('colorFill'),\n '--lobe-table-cell-bg': 'transparent',\n '--lobe-table-surface': v('colorFillQuaternary'),\n },\n light: {\n '--lobe-fill-border': v('colorFill'),\n '--lobe-fill-border-strong': `color-mix(in srgb, ${v('colorFill')}, ${v('colorText')} 15%)`,\n '--lobe-table-cell-bg': 'initial',\n '--lobe-table-surface': 'initial',\n },\n};\n\nconst rule = (selector: string, declarations: Record<string, number | string>) =>\n `${selector} {\\n${Object.entries(declarations)\n .map(([name, value]) => ` ${name}: ${value};`)\n .join('\\n')}\\n}`;\n\nconst appearanceRule = (selector: string, appearance: LobeAppearance) => {\n const { neutral, palette, primary, static: base } = createLobeTokenGroups({ appearance });\n const token =\n appearance === 'light'\n ? { ...base, ...palette, ...primary, ...neutral }\n : { ...palette, ...primary, ...neutral };\n\n return rule(selector, {\n ...toCssVariables(token),\n '--lobe-ring': ring[appearance],\n ...surface[appearance],\n 'color-scheme': appearance,\n });\n};\n\nconst appearanceSelector = (appearance: LobeAppearance) =>\n appearance === 'dark' ? \"[data-theme='dark']\" : \":not([data-theme='dark'])\";\n\nconst colorRules = (appearance: LobeAppearance) => [\n ...(Object.keys(primaryColors) as (keyof typeof primaryColors)[]).map((primaryColor) =>\n rule(\n `[data-primary-color='${primaryColor}']${appearanceSelector(appearance)}`,\n toCssVariables(createLobeTokenGroups({ appearance, primaryColor }).primary),\n ),\n ),\n ...(Object.keys(neutralColors) as (keyof typeof neutralColors)[]).map((neutralColor) =>\n rule(\n `[data-neutral-color='${neutralColor}']${appearanceSelector(appearance)}`,\n toCssVariables(createLobeTokenGroups({ appearance, neutralColor }).neutral),\n ),\n ),\n];\n\nexport const getCustomPrimaryCss = (color: CustomPrimaryColor) => {\n const hex = color.toLowerCase();\n return (['light', 'dark'] as const)\n .map((appearance) =>\n rule(\n `[data-primary-color='${hex}']${appearanceSelector(appearance)}`,\n toCssVariables(\n createLobeTokenGroups({ appearance, primaryColor: hex as CustomPrimaryColor }).primary,\n ),\n ),\n )\n .join('\\n\\n');\n};\n\n/** CSS for a custom neutral (6-digit hex or a `registerLobeNeutral` name); '' for presets. */\nexport const getCustomNeutralCss = (value: string) => {\n const key = value.startsWith('#') ? value.toLowerCase() : value;\n if (!isCustomNeutral(key)) return '';\n return (['light', 'dark'] as const)\n .map((appearance) =>\n rule(\n `[data-neutral-color='${key}']${appearanceSelector(appearance)}`,\n toCssVariables(createLobeTokenGroups({ appearance, neutralColor: key }).neutral),\n ),\n )\n .join('\\n\\n');\n};\n\nexport const getCustomPaletteCss = (name: string) => {\n if (!isRegisteredPalette(name)) return '';\n return (['light', 'dark'] as const)\n .map((appearance) => {\n const { neutral, palette } = createLobeTokenGroups({ appearance, palette: name });\n return rule(\n `[data-palette='${name}']${appearanceSelector(appearance)}`,\n toCssVariables({\n ...palette,\n colorErrorOutline: neutral.colorErrorOutline,\n colorWarningOutline: neutral.colorWarningOutline,\n }),\n );\n })\n .join('\\n\\n');\n};\n\n/**\n * The outline tokens depend on both the neutral and the status palette, so the standalone\n * neutral / palette stylesheets each compute them against the other's default. This rule\n * (higher specificity) recomputes them for the actual combination.\n */\nexport const getPaletteNeutralCss = (name: string, neutralColor: string) => {\n if (!isRegisteredPalette(name) || !neutralColor) return '';\n const key = neutralColor.startsWith('#') ? neutralColor.toLowerCase() : neutralColor;\n return (['light', 'dark'] as const)\n .map((appearance) => {\n const { neutral } = createLobeTokenGroups({ appearance, neutralColor: key, palette: name });\n return rule(\n `[data-palette='${name}'][data-neutral-color='${key}']${appearanceSelector(appearance)}`,\n toCssVariables({\n colorErrorOutline: neutral.colorErrorOutline,\n colorWarningOutline: neutral.colorWarningOutline,\n }),\n );\n })\n .join('\\n\\n');\n};\n\nconst essentialCss = `@layer lobe-ui {\n .lobe-brand-loading path {\n fill: currentcolor;\n fill-opacity: 0;\n stroke: currentcolor;\n stroke-dasharray: 1000;\n stroke-dashoffset: 1000;\n stroke-width: 0.25em;\n\n animation:\n draw 2s cubic-bezier(0.4, 0, 0.2, 1) infinite,\n fill 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n }\n}\n\n@layer lobe-popup {\n .lobe-context-trigger[data-popup-open],\n .lobe-dropdown-menu-trigger[data-popup-open] {\n background: ${v('colorFillTertiary')};\n }\n}\n\n@layer lobe-base {\n :where(body, body [data-theme]) {\n color: ${v('colorText')};\n font-family: ${v('fontFamily')};\n font-size: ${v('fontSize')};\n line-height: ${v('lineHeight')};\n }\n\n :where(body) :where(a) {\n cursor: pointer;\n\n color: ${v('colorLink')};\n text-decoration: none;\n\n background-color: transparent;\n outline: none;\n\n transition: color ${v('motionDurationSlow')};\n }\n\n :where(body) :where(a):hover {\n color: ${v('colorLinkHover')};\n }\n\n :where(body) :where(a):active {\n color: ${v('colorLinkActive')};\n }\n\n :where(body) :where(a):focus-visible {\n outline: ${v('lineWidthFocus')} solid ${v('colorPrimaryBorder')};\n outline-offset: 1px;\n }\n\n :where(body) :where(a)[disabled] {\n cursor: not-allowed;\n color: ${v('colorTextDisabled')};\n }\n\n :where(.lobe-flex) {\n --lobe-flex: 0 1 auto;\n --lobe-flex-direction: column;\n --lobe-flex-wrap: nowrap;\n --lobe-flex-justify: flex-start;\n --lobe-flex-align: stretch;\n --lobe-flex-width: auto;\n --lobe-flex-height: auto;\n --lobe-flex-padding: 0;\n --lobe-flex-padding-inline: var(--lobe-flex-padding);\n --lobe-flex-padding-block: var(--lobe-flex-padding);\n --lobe-flex-gap: 0;\n\n display: flex;\n flex: var(--lobe-flex);\n flex-flow: var(--lobe-flex-direction) var(--lobe-flex-wrap);\n gap: var(--lobe-flex-gap);\n align-items: var(--lobe-flex-align);\n justify-content: var(--lobe-flex-justify);\n\n width: var(--lobe-flex-width);\n height: var(--lobe-flex-height);\n padding: var(--lobe-flex-padding);\n padding-block: var(--lobe-flex-padding-block);\n padding-inline: var(--lobe-flex-padding-inline);\n }\n\n .lobe-flex-hidden {\n display: none;\n }\n}\n\n@keyframes draw {\n 0% {\n stroke-dashoffset: 1000;\n }\n\n 100% {\n stroke-dashoffset: 0;\n }\n}\n\n@keyframes fill {\n 30% {\n fill-opacity: 0.05;\n }\n\n 100% {\n fill-opacity: 1;\n }\n}`;\n\nconst globalCss = `@layer lobe-base {\n :root {\n --font-settings: 'cv01', 'tnum', 'kern';\n --font-variations: 'opsz' auto, tabular-nums;\n\n font-synthesis: style;\n text-autospace: normal;\n }\n\n html {\n overscroll-behavior: none;\n }\n\n body {\n overflow: hidden auto;\n\n min-height: 100vh;\n margin: 0;\n padding: 0;\n\n font-feature-settings: var(--font-settings);\n font-variation-settings: var(--font-variations);\n font-optical-sizing: auto;\n font-kerning: normal;\n font-variant-ligatures: common-ligatures contextual;\n font-variant-numeric: tabular-nums;\n font-size-adjust: from-font;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n text-wrap: pretty;\n text-size-adjust: 100%;\n text-rendering: optimizelegibility;\n overflow-wrap: anywhere;\n vertical-align: baseline;\n\n background-color: ${v('colorBgLayout')};\n\n font-synthesis: style;\n\n -webkit-overflow-scrolling: touch;\n -webkit-tap-highlight-color: transparent;\n }\n\n html,\n body {\n width: 100%;\n height: 100%;\n }\n\n [tabindex='-1']:focus {\n outline: none;\n }\n\n [hidden] {\n display: none !important;\n }\n\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n margin-block: 0 0.5em;\n font-weight: 500;\n }\n\n p,\n ol,\n ul,\n dl,\n pre {\n margin-block: 0 1em;\n }\n\n ol ol,\n ul ul,\n ol ul,\n ul ol {\n margin-block-end: 0;\n }\n\n dd {\n margin-block-end: 0.5em;\n margin-inline-start: 0;\n }\n\n blockquote,\n figure {\n margin-block: 0 1em;\n margin-inline: 0;\n }\n\n img {\n border-style: none;\n vertical-align: middle;\n }\n\n table {\n border-collapse: collapse;\n }\n\n input,\n button,\n select,\n optgroup,\n textarea {\n margin: 0;\n\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n color: inherit;\n }\n\n textarea {\n resize: vertical;\n overflow: auto;\n }\n\n fieldset {\n min-width: 0;\n margin: 0;\n padding: 0;\n border: 0;\n }\n\n code,\n kbd,\n samp,\n pre {\n font-family: ${v('fontFamilyCode')} !important;\n font-feature-settings:\n 'liga' 0,\n 'calt' 0;\n font-variant-ligatures: none;\n\n span {\n font-family: ${v('fontFamilyCode')} !important;\n }\n }\n\n ::selection {\n color: #000;\n background: ${v('yellow9')};\n\n -webkit-text-fill-color: unset !important;\n }\n\n * {\n scrollbar-color: ${v('colorFill')} transparent;\n scrollbar-width: thin;\n box-sizing: border-box;\n vertical-align: baseline;\n }\n}`;\n\nconst layerOrder = '@layer lobe-base, lobe-popup, lobe-ui;';\n\nlet cached: string | undefined;\n\nexport const getThemeCss = () =>\n (cached ??= [\n layerOrder,\n appearanceRule(\":root, [data-theme='light']\", 'light'),\n appearanceRule(\"[data-theme='dark']\", 'dark'),\n ...colorRules('light'),\n ...colorRules('dark'),\n essentialCss,\n ].join('\\n\\n'));\n\nexport const getGlobalCss = () => `${layerOrder}\\n\\n${globalCss}`;\n"],"mappings":";;;;;;AAQA,MAAM,KAAK,QAAgB,OAAO,aAAa,GAAG,EAAE;AAEpD,MAAM,OAAuC;CAC3C,MAAM;CACN,OAAO;AACT;AAIA,MAAM,UAA0D;CAC9D,MAAM;EACJ,sBAAsB,EAAE,oBAAoB;EAC5C,6BAA6B,EAAE,WAAW;EAC1C,wBAAwB;EACxB,wBAAwB,EAAE,qBAAqB;CACjD;CACA,OAAO;EACL,sBAAsB,EAAE,WAAW;EACnC,6BAA6B,sBAAsB,EAAE,WAAW,EAAE,IAAI,EAAE,WAAW,EAAE;EACrF,wBAAwB;EACxB,wBAAwB;CAC1B;AACF;AAEA,MAAM,QAAQ,UAAkB,iBAC9B,GAAG,SAAS,MAAM,OAAO,QAAQ,YAAY,CAAC,CAC3C,KAAK,CAAC,MAAM,WAAW,KAAK,KAAK,IAAI,MAAM,EAAE,CAAC,CAC9C,KAAK,IAAI,EAAE;AAEhB,MAAM,kBAAkB,UAAkB,eAA+B;CACvE,MAAM,EAAE,SAAS,SAAS,SAAS,QAAQ,SAAS,sBAAsB,EAAE,WAAW,CAAC;CACxF,MAAM,QACJ,eAAe,UACX;EA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B,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuDpC,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAmCM,EAAE,eAAe,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAgGxB,EAAE,gBAAgB,EAAE;;;;;;;qBAOlB,EAAE,gBAAgB,EAAE;;;;;;kBAMvB,EAAE,SAAS,EAAE;;;;;;uBAMR,EAAE,WAAW,EAAE;;;;;;AAOtC,MAAM,aAAa;AAEnB,IAAI;AAEJ,MAAa,oBACV,WAAW;CACV;CACA,eAAe,+BAA+B,OAAO;CACrD,eAAe,uBAAuB,MAAM;CAC5C,GAAG,WAAW,OAAO;CACrB,GAAG,WAAW,MAAM;CACpB;AACF,CAAC,CAAC,KAAK,MAAM;AAEf,MAAa,qBAAqB,GAAG,WAAW,MAAM"}
1
+ {"version":3,"file":"themeCss.mjs","names":[],"sources":["../../../src/styles/theme/themeCss.ts"],"sourcesContent":["import { toCssVariables, toCssVarName } from '../css';\nimport { neutralColors, primaryColors } from '../customTheme';\nimport { createLobeTokenGroups } from './createLobeToken';\nimport { isCustomNeutral } from './customNeutral';\nimport { isRegisteredPalette } from './customPalette';\nimport type { CustomPrimaryColor } from './customPrimary';\nimport type { LobeAppearance } from './scope';\nimport { genFontFamily, genFontFamilyCode, LOCALE_FONTS } from './token/font';\n\nconst v = (key: string) => `var(${toCssVarName(key)})`;\n\nconst ring: Record<LobeAppearance, string> = {\n dark: '0 0 0 1px rgb(255 255 255 / 18%)',\n light: '0 0 0 1px rgb(0 0 0 / 5%)',\n};\n\n/* `initial` makes a light scope nested in a dark one fall back to each variant's own fill\n instead of inheriting the dark table surface. */\nconst surface: Record<LobeAppearance, Record<string, string>> = {\n dark: {\n '--lobe-fill-border': v('colorFillSecondary'),\n '--lobe-fill-border-strong': v('colorFill'),\n '--lobe-table-cell-bg': 'transparent',\n '--lobe-table-surface': v('colorFillQuaternary'),\n },\n light: {\n '--lobe-fill-border': v('colorFill'),\n '--lobe-fill-border-strong': `color-mix(in srgb, ${v('colorFill')}, ${v('colorText')} 15%)`,\n '--lobe-table-cell-bg': 'initial',\n '--lobe-table-surface': 'initial',\n },\n};\n\nconst rule = (selector: string, declarations: Record<string, number | string>) =>\n `${selector} {\\n${Object.entries(declarations)\n .map(([name, value]) => ` ${name}: ${value};`)\n .join('\\n')}\\n}`;\n\nconst appearanceRule = (selector: string, appearance: LobeAppearance) => {\n const { neutral, palette, primary, static: base } = createLobeTokenGroups({ appearance });\n const token =\n appearance === 'light'\n ? { ...base, ...palette, ...primary, ...neutral }\n : { ...palette, ...primary, ...neutral };\n\n return rule(selector, {\n ...toCssVariables(token),\n '--lobe-ring': ring[appearance],\n ...surface[appearance],\n 'color-scheme': appearance,\n });\n};\n\nconst appearanceSelector = (appearance: LobeAppearance) =>\n appearance === 'dark' ? \"[data-theme='dark']\" : \":not([data-theme='dark'])\";\n\nconst colorRules = (appearance: LobeAppearance) => [\n ...(Object.keys(primaryColors) as (keyof typeof primaryColors)[]).map((primaryColor) =>\n rule(\n `[data-primary-color='${primaryColor}']${appearanceSelector(appearance)}`,\n toCssVariables(createLobeTokenGroups({ appearance, primaryColor }).primary),\n ),\n ),\n ...(Object.keys(neutralColors) as (keyof typeof neutralColors)[]).map((neutralColor) =>\n rule(\n `[data-neutral-color='${neutralColor}']${appearanceSelector(appearance)}`,\n toCssVariables(createLobeTokenGroups({ appearance, neutralColor }).neutral),\n ),\n ),\n];\n\nconst localeFontRules = () =>\n LOCALE_FONTS.map(({ langs }) =>\n rule(langs.map((lang) => `:is(:root, [data-theme]):lang(${lang})`).join(', '), {\n [toCssVarName('fontFamily')]: genFontFamily({ locale: langs[0] }),\n [toCssVarName('fontFamilyCode')]: genFontFamilyCode({ locale: langs[0] }),\n }),\n );\n\nexport const getCustomPrimaryCss = (color: CustomPrimaryColor) => {\n const hex = color.toLowerCase();\n return (['light', 'dark'] as const)\n .map((appearance) =>\n rule(\n `[data-primary-color='${hex}']${appearanceSelector(appearance)}`,\n toCssVariables(\n createLobeTokenGroups({ appearance, primaryColor: hex as CustomPrimaryColor }).primary,\n ),\n ),\n )\n .join('\\n\\n');\n};\n\n/** CSS for a custom neutral (6-digit hex or a `registerLobeNeutral` name); '' for presets. */\nexport const getCustomNeutralCss = (value: string) => {\n const key = value.startsWith('#') ? value.toLowerCase() : value;\n if (!isCustomNeutral(key)) return '';\n return (['light', 'dark'] as const)\n .map((appearance) =>\n rule(\n `[data-neutral-color='${key}']${appearanceSelector(appearance)}`,\n toCssVariables(createLobeTokenGroups({ appearance, neutralColor: key }).neutral),\n ),\n )\n .join('\\n\\n');\n};\n\nexport const getCustomPaletteCss = (name: string) => {\n if (!isRegisteredPalette(name)) return '';\n return (['light', 'dark'] as const)\n .map((appearance) => {\n const { neutral, palette } = createLobeTokenGroups({ appearance, palette: name });\n return rule(\n `[data-palette='${name}']${appearanceSelector(appearance)}`,\n toCssVariables({\n ...palette,\n colorErrorOutline: neutral.colorErrorOutline,\n colorWarningOutline: neutral.colorWarningOutline,\n }),\n );\n })\n .join('\\n\\n');\n};\n\n/**\n * The outline tokens depend on both the neutral and the status palette, so the standalone\n * neutral / palette stylesheets each compute them against the other's default. This rule\n * (higher specificity) recomputes them for the actual combination.\n */\nexport const getPaletteNeutralCss = (name: string, neutralColor: string) => {\n if (!isRegisteredPalette(name) || !neutralColor) return '';\n const key = neutralColor.startsWith('#') ? neutralColor.toLowerCase() : neutralColor;\n return (['light', 'dark'] as const)\n .map((appearance) => {\n const { neutral } = createLobeTokenGroups({ appearance, neutralColor: key, palette: name });\n return rule(\n `[data-palette='${name}'][data-neutral-color='${key}']${appearanceSelector(appearance)}`,\n toCssVariables({\n colorErrorOutline: neutral.colorErrorOutline,\n colorWarningOutline: neutral.colorWarningOutline,\n }),\n );\n })\n .join('\\n\\n');\n};\n\nconst essentialCss = `@layer lobe-ui {\n .lobe-brand-loading path {\n fill: currentcolor;\n fill-opacity: 0;\n stroke: currentcolor;\n stroke-dasharray: 1000;\n stroke-dashoffset: 1000;\n stroke-width: 0.25em;\n\n animation:\n draw 2s cubic-bezier(0.4, 0, 0.2, 1) infinite,\n fill 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n }\n}\n\n@layer lobe-popup {\n .lobe-context-trigger[data-popup-open],\n .lobe-dropdown-menu-trigger[data-popup-open] {\n background: ${v('colorFillTertiary')};\n }\n}\n\n@layer lobe-base {\n :where(body, body [data-theme]) {\n color: ${v('colorText')};\n font-family: ${v('fontFamily')};\n font-size: ${v('fontSize')};\n line-height: ${v('lineHeight')};\n }\n\n :where(body) :where(a) {\n cursor: pointer;\n\n color: ${v('colorLink')};\n text-decoration: none;\n\n background-color: transparent;\n outline: none;\n\n transition: color ${v('motionDurationSlow')};\n }\n\n :where(body) :where(a):hover {\n color: ${v('colorLinkHover')};\n }\n\n :where(body) :where(a):active {\n color: ${v('colorLinkActive')};\n }\n\n :where(body) :where(a):focus-visible {\n outline: ${v('lineWidthFocus')} solid ${v('colorPrimaryBorder')};\n outline-offset: 1px;\n }\n\n :where(body) :where(a)[disabled] {\n cursor: not-allowed;\n color: ${v('colorTextDisabled')};\n }\n\n :where(.lobe-flex) {\n --lobe-flex: 0 1 auto;\n --lobe-flex-direction: column;\n --lobe-flex-wrap: nowrap;\n --lobe-flex-justify: flex-start;\n --lobe-flex-align: stretch;\n --lobe-flex-width: auto;\n --lobe-flex-height: auto;\n --lobe-flex-padding: 0;\n --lobe-flex-padding-inline: var(--lobe-flex-padding);\n --lobe-flex-padding-block: var(--lobe-flex-padding);\n --lobe-flex-gap: 0;\n\n display: flex;\n flex: var(--lobe-flex);\n flex-flow: var(--lobe-flex-direction) var(--lobe-flex-wrap);\n gap: var(--lobe-flex-gap);\n align-items: var(--lobe-flex-align);\n justify-content: var(--lobe-flex-justify);\n\n width: var(--lobe-flex-width);\n height: var(--lobe-flex-height);\n padding: var(--lobe-flex-padding);\n padding-block: var(--lobe-flex-padding-block);\n padding-inline: var(--lobe-flex-padding-inline);\n }\n\n .lobe-flex-hidden {\n display: none;\n }\n}\n\n@keyframes draw {\n 0% {\n stroke-dashoffset: 1000;\n }\n\n 100% {\n stroke-dashoffset: 0;\n }\n}\n\n@keyframes fill {\n 30% {\n fill-opacity: 0.05;\n }\n\n 100% {\n fill-opacity: 1;\n }\n}`;\n\nconst globalCss = `@layer lobe-base {\n :root {\n --font-settings: 'cv01', 'tnum', 'kern';\n --font-variations: 'opsz' auto, tabular-nums;\n\n font-synthesis: style;\n text-autospace: normal;\n }\n\n html {\n overscroll-behavior: none;\n }\n\n body {\n overflow: hidden auto;\n\n min-height: 100vh;\n margin: 0;\n padding: 0;\n\n font-feature-settings: var(--font-settings);\n font-variation-settings: var(--font-variations);\n font-optical-sizing: auto;\n font-kerning: normal;\n font-variant-ligatures: common-ligatures contextual;\n font-variant-numeric: tabular-nums;\n font-size-adjust: from-font;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n text-wrap: pretty;\n text-size-adjust: 100%;\n text-rendering: optimizelegibility;\n overflow-wrap: anywhere;\n vertical-align: baseline;\n\n background-color: ${v('colorBgLayout')};\n\n font-synthesis: style;\n\n -webkit-overflow-scrolling: touch;\n -webkit-tap-highlight-color: transparent;\n }\n\n html,\n body {\n width: 100%;\n height: 100%;\n }\n\n [tabindex='-1']:focus {\n outline: none;\n }\n\n [hidden] {\n display: none !important;\n }\n\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n margin-block: 0 0.5em;\n font-weight: 500;\n }\n\n p,\n ol,\n ul,\n dl,\n pre {\n margin-block: 0 1em;\n }\n\n ol ol,\n ul ul,\n ol ul,\n ul ol {\n margin-block-end: 0;\n }\n\n dd {\n margin-block-end: 0.5em;\n margin-inline-start: 0;\n }\n\n blockquote,\n figure {\n margin-block: 0 1em;\n margin-inline: 0;\n }\n\n img {\n border-style: none;\n vertical-align: middle;\n }\n\n table {\n border-collapse: collapse;\n }\n\n input,\n button,\n select,\n optgroup,\n textarea {\n margin: 0;\n\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n color: inherit;\n }\n\n textarea {\n resize: vertical;\n overflow: auto;\n }\n\n fieldset {\n min-width: 0;\n margin: 0;\n padding: 0;\n border: 0;\n }\n\n code,\n kbd,\n samp,\n pre {\n font-family: ${v('fontFamilyCode')} !important;\n font-feature-settings:\n 'liga' 0,\n 'calt' 0;\n font-variant-ligatures: none;\n\n span {\n font-family: ${v('fontFamilyCode')} !important;\n }\n }\n\n ::selection {\n color: #000;\n background: ${v('yellow9')};\n\n -webkit-text-fill-color: unset !important;\n }\n\n * {\n scrollbar-color: ${v('colorFill')} transparent;\n scrollbar-width: thin;\n box-sizing: border-box;\n vertical-align: baseline;\n }\n}`;\n\nconst layerOrder = '@layer lobe-base, lobe-popup, lobe-ui;';\n\nlet cached: string | undefined;\n\nexport const getThemeCss = () =>\n (cached ??= [\n layerOrder,\n appearanceRule(\":root, [data-theme='light']\", 'light'),\n appearanceRule(\"[data-theme='dark']\", 'dark'),\n ...colorRules('light'),\n ...colorRules('dark'),\n ...localeFontRules(),\n essentialCss,\n ].join('\\n\\n'));\n\nexport const getGlobalCss = () => `${layerOrder}\\n\\n${globalCss}`;\n"],"mappings":";;;;;;;AASA,MAAM,KAAK,QAAgB,OAAO,aAAa,GAAG,EAAE;AAEpD,MAAM,OAAuC;CAC3C,MAAM;CACN,OAAO;AACT;AAIA,MAAM,UAA0D;CAC9D,MAAM;EACJ,sBAAsB,EAAE,oBAAoB;EAC5C,6BAA6B,EAAE,WAAW;EAC1C,wBAAwB;EACxB,wBAAwB,EAAE,qBAAqB;CACjD;CACA,OAAO;EACL,sBAAsB,EAAE,WAAW;EACnC,6BAA6B,sBAAsB,EAAE,WAAW,EAAE,IAAI,EAAE,WAAW,EAAE;EACrF,wBAAwB;EACxB,wBAAwB;C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qBAAqB,GAAG,WAAW,MAAM"}
@@ -1,64 +1,13 @@
1
+ import { genFontFamily, genFontFamilyCode } from "./font.mjs";
1
2
  // src/styles/theme/token/base.ts
2
- const joinFontFamily = (fonts) => fonts.map((font) => font.includes(" ") ? `"${font}"` : font).join(",");
3
- const FONT_EMOJI = [
4
- "/* EMOJI */",
5
- "Apple Color Emoji",
6
- "Segoe UI Emoji",
7
- "Segoe UI Symbol",
8
- "Noto Color Emoji"
9
- ];
10
- const FONT_EN = [
11
- "HarmonyOS Sans",
12
- "-apple-system",
13
- "BlinkMacSystemFont",
14
- "Segoe UI Variable Display",
15
- "Segoe UI",
16
- "Roboto",
17
- "Helvetica Neue",
18
- "Arial"
19
- ];
20
- const FONT_CN = [
21
- "/* SC */",
22
- "HarmonyOS Sans SC",
23
- "PingFang SC",
24
- "Hiragino Sans GB",
25
- "Microsoft YaHei UI",
26
- "Microsoft YaHei",
27
- "Source Han Sans SC",
28
- "Noto Sans CJK SC"
29
- ];
30
3
  const baseToken = {
31
4
  borderRadius: 8,
32
5
  borderRadiusLG: 12,
33
6
  borderRadiusSM: 6,
34
7
  borderRadiusXS: 4,
35
8
  controlHeight: 36,
36
- fontFamily: joinFontFamily([
37
- FONT_EN,
38
- FONT_CN,
39
- [
40
- "/* FALLBACK */",
41
- "ui-sans-serif",
42
- "system-ui",
43
- "sans-serif"
44
- ],
45
- FONT_EMOJI
46
- ].flat()),
47
- fontFamilyCode: joinFontFamily([
48
- [
49
- "Hack",
50
- "ui-monospace",
51
- "SFMono-Regular",
52
- "SF Mono",
53
- "Menlo",
54
- "Cascadia Code",
55
- "Consolas",
56
- "Liberation Mono"
57
- ],
58
- FONT_CN,
59
- ["/* FALLBACK */", "monospace"],
60
- FONT_EMOJI
61
- ].flat())
9
+ fontFamily: genFontFamily(),
10
+ fontFamilyCode: genFontFamilyCode()
62
11
  };
63
12
  export { baseToken };
64
13
 
@@ -1 +1 @@
1
- {"version":3,"file":"base.mjs","names":[],"sources":["../../../../src/styles/theme/token/base.ts"],"sourcesContent":["const joinFontFamily = (fonts: string[]) =>\n fonts.map((font) => (font.includes(' ') ? `\"${font}\"` : font)).join(',');\n\nconst FONT_EMOJI = [\n '/* EMOJI */',\n 'Apple Color Emoji',\n 'Segoe UI Emoji',\n 'Segoe UI Symbol',\n 'Noto Color Emoji',\n];\n\nconst FONT_EN = [\n 'HarmonyOS Sans',\n '-apple-system',\n 'BlinkMacSystemFont',\n 'Segoe UI Variable Display',\n 'Segoe UI',\n 'Roboto',\n 'Helvetica Neue',\n 'Arial',\n];\n\nconst FONT_CN = [\n '/* SC */',\n 'HarmonyOS Sans SC',\n 'PingFang SC',\n 'Hiragino Sans GB',\n 'Microsoft YaHei UI',\n 'Microsoft YaHei',\n 'Source Han Sans SC',\n 'Noto Sans CJK SC',\n];\n\nconst FONT_CODE = [\n 'Hack',\n 'ui-monospace',\n 'SFMono-Regular',\n 'SF Mono',\n 'Menlo',\n 'Cascadia Code',\n 'Consolas',\n 'Liberation Mono',\n];\n\nconst FALLBACK = ['/* FALLBACK */', 'ui-sans-serif', 'system-ui', 'sans-serif'];\n\nconst FALLBACK_CODE = ['/* FALLBACK */', 'monospace'];\n\nexport const baseToken = {\n borderRadius: 8,\n borderRadiusLG: 12,\n borderRadiusSM: 6,\n borderRadiusXS: 4,\n controlHeight: 36,\n fontFamily: joinFontFamily([FONT_EN, FONT_CN, FALLBACK, FONT_EMOJI].flat()),\n fontFamilyCode: joinFontFamily([FONT_CODE, FONT_CN, FALLBACK_CODE, FONT_EMOJI].flat()),\n};\n"],"mappings":";AAAA,MAAM,kBAAkB,UACtB,MAAM,KAAK,SAAU,KAAK,SAAS,GAAG,IAAI,IAAI,KAAK,KAAK,IAAK,CAAC,CAAC,KAAK,GAAG;AAEzE,MAAM,aAAa;CACjB;CACA;CACA;CACA;CACA;AACF;AAEA,MAAM,UAAU;CACd;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAM,UAAU;CACd;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAiBA,MAAa,YAAY;CACvB,cAAc;CACd,gBAAgB;CAChB,gBAAgB;CAChB,gBAAgB;CAChB,eAAe;CACf,YAAY,eAAe;EAAC;EAAS;EAAS;GAV9B;GAAkB;GAAiB;GAAa;EAUlB;EAAU;CAAU,CAAC,CAAC,KAAK,CAAC;CAC1E,gBAAgB,eAAe;EAAC;GArBhC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EAcgC;EAAW;EAAS,CAT/B,kBAAkB,WASa;EAAe;CAAU,CAAC,CAAC,KAAK,CAAC;AACvF"}
1
+ {"version":3,"file":"base.mjs","names":[],"sources":["../../../../src/styles/theme/token/base.ts"],"sourcesContent":["import { genFontFamily, genFontFamilyCode } from './font';\n\nexport const baseToken = {\n borderRadius: 8,\n borderRadiusLG: 12,\n borderRadiusSM: 6,\n borderRadiusXS: 4,\n controlHeight: 36,\n fontFamily: genFontFamily(),\n fontFamilyCode: genFontFamilyCode(),\n};\n"],"mappings":";;AAEA,MAAa,YAAY;CACvB,cAAc;CACd,gBAAgB;CAChB,gBAAgB;CAChB,gBAAgB;CAChB,eAAe;CACf,YAAY,cAAc;CAC1B,gBAAgB,kBAAkB;AACpC"}
@@ -0,0 +1,7 @@
1
+ export interface GenFontFamilyOptions {
2
+ locale?: string;
3
+ prepend?: (string | undefined)[];
4
+ }
5
+ export declare const genFontFamily: ({ locale, prepend }?: GenFontFamilyOptions) => string;
6
+ export declare const genFontFamilyCode: ({ locale, prepend }?: GenFontFamilyOptions) => string;
7
+ //# sourceMappingURL=font.d.mts.map
@@ -0,0 +1,187 @@
1
+ // src/styles/theme/token/font.ts
2
+ const SYSTEM_SANS = [
3
+ "-apple-system",
4
+ "BlinkMacSystemFont",
5
+ "Segoe UI Variable Display",
6
+ "Segoe UI",
7
+ "Roboto",
8
+ "Helvetica Neue",
9
+ "Arial"
10
+ ];
11
+ const LATIN = ["Geist", ...SYSTEM_SANS];
12
+ const LATIN_ZH_HANS = ["HarmonyOS Sans", ...SYSTEM_SANS];
13
+ const CODE = [
14
+ "Geist Mono",
15
+ "ui-monospace",
16
+ "SFMono-Regular",
17
+ "SF Mono",
18
+ "Menlo",
19
+ "Cascadia Code",
20
+ "Consolas",
21
+ "Liberation Mono"
22
+ ];
23
+ const SC_SYSTEM = [
24
+ "PingFang SC",
25
+ "Hiragino Sans GB",
26
+ "Microsoft YaHei UI",
27
+ "Microsoft YaHei",
28
+ "Source Han Sans SC",
29
+ "Noto Sans CJK SC"
30
+ ];
31
+ const SC = ["HarmonyOS Sans SC", ...SC_SYSTEM];
32
+ const TC = [
33
+ "PingFang TC",
34
+ "Hiragino Sans CNS",
35
+ "Microsoft JhengHei UI",
36
+ "Microsoft JhengHei",
37
+ "Source Han Sans TC",
38
+ "Noto Sans CJK TC"
39
+ ];
40
+ const HK = [
41
+ "PingFang HK",
42
+ "Source Han Sans HC",
43
+ "Noto Sans CJK HK",
44
+ ...TC
45
+ ];
46
+ const MO = ["PingFang MO", ...HK];
47
+ const JP = [
48
+ "Hiragino Sans",
49
+ "Hiragino Kaku Gothic ProN",
50
+ "Yu Gothic UI",
51
+ "Yu Gothic",
52
+ "Meiryo",
53
+ "Source Han Sans JP",
54
+ "Noto Sans CJK JP"
55
+ ];
56
+ const KR = [
57
+ "Apple SD Gothic Neo",
58
+ "Malgun Gothic",
59
+ "Source Han Sans KR",
60
+ "Noto Sans CJK KR"
61
+ ];
62
+ const ARABIC = [
63
+ "SF Arabic",
64
+ "Geeza Pro",
65
+ "Noto Sans Arabic",
66
+ "Tahoma"
67
+ ];
68
+ const HEBREW = [
69
+ "SF Hebrew",
70
+ "Arial Hebrew",
71
+ "Noto Sans Hebrew"
72
+ ];
73
+ const THAI = [
74
+ "Thonburi",
75
+ "Leelawadee UI",
76
+ "Noto Sans Thai"
77
+ ];
78
+ const DEVANAGARI = [
79
+ "Kohinoor Devanagari",
80
+ "Nirmala UI",
81
+ "Noto Sans Devanagari"
82
+ ];
83
+ const FALLBACK = [
84
+ "ui-sans-serif",
85
+ "system-ui",
86
+ "sans-serif"
87
+ ];
88
+ const FALLBACK_CODE = ["monospace"];
89
+ const EMOJI = [
90
+ "Apple Color Emoji",
91
+ "Segoe UI Emoji",
92
+ "Segoe UI Symbol",
93
+ "Noto Color Emoji"
94
+ ];
95
+ const LOCALE_FONTS = [
96
+ {
97
+ langs: ["zh"],
98
+ latin: LATIN_ZH_HANS
99
+ },
100
+ {
101
+ langs: ["zh-TW", "zh-Hant"],
102
+ latin: SYSTEM_SANS,
103
+ local: TC,
104
+ sc: SC_SYSTEM
105
+ },
106
+ {
107
+ langs: ["zh-HK"],
108
+ latin: SYSTEM_SANS,
109
+ local: HK,
110
+ sc: SC_SYSTEM
111
+ },
112
+ {
113
+ langs: ["zh-MO"],
114
+ latin: SYSTEM_SANS,
115
+ local: MO,
116
+ sc: SC_SYSTEM
117
+ },
118
+ {
119
+ langs: ["ja"],
120
+ local: JP
121
+ },
122
+ {
123
+ langs: ["ko"],
124
+ local: KR
125
+ },
126
+ {
127
+ langs: ["ar", "fa"],
128
+ local: ARABIC
129
+ },
130
+ {
131
+ langs: ["he"],
132
+ local: HEBREW
133
+ },
134
+ {
135
+ langs: ["th"],
136
+ local: THAI
137
+ },
138
+ {
139
+ langs: [
140
+ "hi",
141
+ "mr",
142
+ "ne"
143
+ ],
144
+ local: DEVANAGARI
145
+ }
146
+ ];
147
+ const matchLocaleFonts = (locale) => {
148
+ if (!locale) return;
149
+ const tag = locale.toLowerCase();
150
+ let best;
151
+ for (const fonts of LOCALE_FONTS) for (const lang of fonts.langs) {
152
+ const prefix = lang.toLowerCase();
153
+ if (tag !== prefix && !tag.startsWith(`${prefix}-`)) continue;
154
+ if (!best || prefix.length > best.length) best = {
155
+ fonts,
156
+ length: prefix.length
157
+ };
158
+ }
159
+ return best?.fonts;
160
+ };
161
+ const quote = (font) => font.includes(",") || font.includes("\"") || !font.includes(" ") ? font : `"${font}"`;
162
+ const join = (fonts) => fonts.map((font) => font?.trim()).filter((font) => !!font).map(quote).join(",");
163
+ const genFontFamily = ({ locale, prepend = [] } = {}) => {
164
+ const fonts = matchLocaleFonts(locale);
165
+ return join([
166
+ ...prepend,
167
+ ...fonts?.latin ?? LATIN,
168
+ ...fonts?.local ?? [],
169
+ ...fonts?.sc ?? SC,
170
+ ...FALLBACK,
171
+ ...EMOJI
172
+ ]);
173
+ };
174
+ const genFontFamilyCode = ({ locale, prepend = [] } = {}) => {
175
+ const fonts = matchLocaleFonts(locale);
176
+ return join([
177
+ ...prepend,
178
+ ...CODE,
179
+ ...fonts?.local ?? [],
180
+ ...fonts?.sc ?? SC,
181
+ ...FALLBACK_CODE,
182
+ ...EMOJI
183
+ ]);
184
+ };
185
+ export { LOCALE_FONTS, genFontFamily, genFontFamilyCode };
186
+
187
+ //# sourceMappingURL=font.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"font.mjs","names":[],"sources":["../../../../src/styles/theme/token/font.ts"],"sourcesContent":["const SYSTEM_SANS = [\n '-apple-system',\n 'BlinkMacSystemFont',\n 'Segoe UI Variable Display',\n 'Segoe UI',\n 'Roboto',\n 'Helvetica Neue',\n 'Arial',\n];\n\nconst LATIN = ['Geist', ...SYSTEM_SANS];\n\nconst LATIN_ZH_HANS = ['HarmonyOS Sans', ...SYSTEM_SANS];\n\nconst CODE = [\n 'Geist Mono',\n 'ui-monospace',\n 'SFMono-Regular',\n 'SF Mono',\n 'Menlo',\n 'Cascadia Code',\n 'Consolas',\n 'Liberation Mono',\n];\n\nconst SC_SYSTEM = [\n 'PingFang SC',\n 'Hiragino Sans GB',\n 'Microsoft YaHei UI',\n 'Microsoft YaHei',\n 'Source Han Sans SC',\n 'Noto Sans CJK SC',\n];\n\nconst SC = ['HarmonyOS Sans SC', ...SC_SYSTEM];\n\nconst TC = [\n 'PingFang TC',\n 'Hiragino Sans CNS',\n 'Microsoft JhengHei UI',\n 'Microsoft JhengHei',\n 'Source Han Sans TC',\n 'Noto Sans CJK TC',\n];\n\nconst HK = ['PingFang HK', 'Source Han Sans HC', 'Noto Sans CJK HK', ...TC];\n\nconst MO = ['PingFang MO', ...HK];\n\nconst JP = [\n 'Hiragino Sans',\n 'Hiragino Kaku Gothic ProN',\n 'Yu Gothic UI',\n 'Yu Gothic',\n 'Meiryo',\n 'Source Han Sans JP',\n 'Noto Sans CJK JP',\n];\n\nconst KR = ['Apple SD Gothic Neo', 'Malgun Gothic', 'Source Han Sans KR', 'Noto Sans CJK KR'];\n\nconst ARABIC = ['SF Arabic', 'Geeza Pro', 'Noto Sans Arabic', 'Tahoma'];\n\nconst HEBREW = ['SF Hebrew', 'Arial Hebrew', 'Noto Sans Hebrew'];\n\nconst THAI = ['Thonburi', 'Leelawadee UI', 'Noto Sans Thai'];\n\nconst DEVANAGARI = ['Kohinoor Devanagari', 'Nirmala UI', 'Noto Sans Devanagari'];\n\nconst FALLBACK = ['ui-sans-serif', 'system-ui', 'sans-serif'];\n\nconst FALLBACK_CODE = ['monospace'];\n\nconst EMOJI = ['Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'];\n\ninterface LocaleFonts {\n langs: string[];\n latin?: string[];\n local?: string[];\n sc?: string[];\n}\n\n// Han glyphs differ per region and the first CJK family in the stack wins, so a locale's own\n// families go ahead of the SC fallback. Traditional chinese stays on system fonts because\n// HarmonyOS Sans SC draws traditional characters with mainland glyph shapes.\n// Later entries are more specific: the generated :lang() rules rely on this source order.\nexport const LOCALE_FONTS: LocaleFonts[] = [\n { langs: ['zh'], latin: LATIN_ZH_HANS },\n { langs: ['zh-TW', 'zh-Hant'], latin: SYSTEM_SANS, local: TC, sc: SC_SYSTEM },\n { langs: ['zh-HK'], latin: SYSTEM_SANS, local: HK, sc: SC_SYSTEM },\n { langs: ['zh-MO'], latin: SYSTEM_SANS, local: MO, sc: SC_SYSTEM },\n { langs: ['ja'], local: JP },\n { langs: ['ko'], local: KR },\n { langs: ['ar', 'fa'], local: ARABIC },\n { langs: ['he'], local: HEBREW },\n { langs: ['th'], local: THAI },\n { langs: ['hi', 'mr', 'ne'], local: DEVANAGARI },\n];\n\nconst matchLocaleFonts = (locale?: string): LocaleFonts | undefined => {\n if (!locale) return;\n const tag = locale.toLowerCase();\n let best: { fonts: LocaleFonts; length: number } | undefined;\n\n for (const fonts of LOCALE_FONTS) {\n for (const lang of fonts.langs) {\n const prefix = lang.toLowerCase();\n if (tag !== prefix && !tag.startsWith(`${prefix}-`)) continue;\n if (!best || prefix.length > best.length) best = { fonts, length: prefix.length };\n }\n }\n\n return best?.fonts;\n};\n\nconst quote = (font: string) =>\n font.includes(',') || font.includes('\"') || !font.includes(' ') ? font : `\"${font}\"`;\n\nconst join = (fonts: (string | undefined)[]) =>\n fonts\n .map((font) => font?.trim())\n .filter((font): font is string => !!font)\n .map(quote)\n .join(',');\n\nexport interface GenFontFamilyOptions {\n locale?: string;\n prepend?: (string | undefined)[];\n}\n\nexport const genFontFamily = ({ locale, prepend = [] }: GenFontFamilyOptions = {}) => {\n const fonts = matchLocaleFonts(locale);\n\n return join([\n ...prepend,\n ...(fonts?.latin ?? LATIN),\n ...(fonts?.local ?? []),\n ...(fonts?.sc ?? SC),\n ...FALLBACK,\n ...EMOJI,\n ]);\n};\n\nexport const genFontFamilyCode = ({ locale, prepend = [] }: GenFontFamilyOptions = {}) => {\n const fonts = matchLocaleFonts(locale);\n\n return join([\n ...prepend,\n ...CODE,\n ...(fonts?.local ?? []),\n ...(fonts?.sc ?? SC),\n ...FALLBACK_CODE,\n ...EMOJI,\n ]);\n};\n"],"mappings":";AAAA,MAAM,cAAc;CAClB;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAM,QAAQ,CAAC,SAAS,GAAG,WAAW;AAEtC,MAAM,gBAAgB,CAAC,kBAAkB,GAAG,WAAW;AAEvD,MAAM,OAAO;CACX;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAM,YAAY;CAChB;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAM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120
- --lobe-font-family: "HarmonyOS Sans",-apple-system,BlinkMacSystemFont,"Segoe UI Variable Display","Segoe UI",Roboto,"Helvetica Neue",Arial,"/* SC */","HarmonyOS Sans SC","PingFang SC","Hiragino Sans GB","Microsoft YaHei UI","Microsoft YaHei","Source Han Sans SC","Noto Sans CJK SC","/* FALLBACK */",ui-sans-serif,system-ui,sans-serif,"/* EMOJI */","Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
121
- --lobe-font-family-code: Hack,ui-monospace,SFMono-Regular,"SF Mono",Menlo,"Cascadia Code",Consolas,"Liberation Mono","/* SC */","HarmonyOS Sans SC","PingFang SC","Hiragino Sans GB","Microsoft YaHei UI","Microsoft YaHei","Source Han Sans SC","Noto Sans CJK SC","/* FALLBACK */",monospace,"/* EMOJI */","Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
120
+ --lobe-font-family: Geist,-apple-system,BlinkMacSystemFont,"Segoe UI Variable Display","Segoe UI",Roboto,"Helvetica Neue",Arial,"HarmonyOS Sans SC","PingFang SC","Hiragino Sans GB","Microsoft YaHei UI","Microsoft YaHei","Source Han Sans SC","Noto Sans CJK SC",ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
121
+ --lobe-font-family-code: "Geist Mono",ui-monospace,SFMono-Regular,"SF Mono",Menlo,"Cascadia Code",Consolas,"Liberation Mono","HarmonyOS Sans SC","PingFang SC","Hiragino Sans GB","Microsoft YaHei UI","Microsoft YaHei","Source Han Sans SC","Noto Sans CJK SC",monospace,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
122
122
  --lobe-box-shadow-card: 0 1px 2px -2px rgba(0,0,0,0.16), 0 3px 6px 0 rgba(0,0,0,0.12), 0 5px 12px 4px rgba(0,0,0,0.09);
123
123
  --lobe-box-shadow-drawer-down: 0 -6px 16px 0 rgba(0,0,0,0.08), 0 -3px 6px -4px rgba(0,0,0,0.12), 0 -9px 28px 8px rgba(0,0,0,0.05);
124
124
  --lobe-box-shadow-drawer-left: 6px 0 16px 0 rgba(0,0,0,0.08), 3px 0 6px -4px rgba(0,0,0,0.12), 9px 0 28px 8px rgba(0,0,0,0.05);
@@ -2318,6 +2318,56 @@
2318
2318
  --lobe-control-tmp-outline: rgba(255, 255, 255, 0.02);
2319
2319
  }
2320
2320
 
2321
+ :is(:root, [data-theme]):lang(zh) {
2322
+ --lobe-font-family: "HarmonyOS Sans",-apple-system,BlinkMacSystemFont,"Segoe UI Variable Display","Segoe UI",Roboto,"Helvetica Neue",Arial,"HarmonyOS Sans SC","PingFang SC","Hiragino Sans GB","Microsoft YaHei UI","Microsoft YaHei","Source Han Sans SC","Noto Sans CJK SC",ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
2323
+ --lobe-font-family-code: "Geist Mono",ui-monospace,SFMono-Regular,"SF Mono",Menlo,"Cascadia Code",Consolas,"Liberation Mono","HarmonyOS Sans SC","PingFang SC","Hiragino Sans GB","Microsoft YaHei UI","Microsoft YaHei","Source Han Sans SC","Noto Sans CJK SC",monospace,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
2324
+ }
2325
+
2326
+ :is(:root, [data-theme]):lang(zh-TW), :is(:root, [data-theme]):lang(zh-Hant) {
2327
+ --lobe-font-family: -apple-system,BlinkMacSystemFont,"Segoe UI Variable Display","Segoe UI",Roboto,"Helvetica Neue",Arial,"PingFang TC","Hiragino Sans CNS","Microsoft JhengHei UI","Microsoft JhengHei","Source Han Sans TC","Noto Sans CJK TC","PingFang SC","Hiragino Sans GB","Microsoft YaHei UI","Microsoft YaHei","Source Han Sans SC","Noto Sans CJK SC",ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
2328
+ --lobe-font-family-code: "Geist Mono",ui-monospace,SFMono-Regular,"SF Mono",Menlo,"Cascadia Code",Consolas,"Liberation Mono","PingFang TC","Hiragino Sans CNS","Microsoft JhengHei UI","Microsoft JhengHei","Source Han Sans TC","Noto Sans CJK TC","PingFang SC","Hiragino Sans GB","Microsoft YaHei UI","Microsoft YaHei","Source Han Sans SC","Noto Sans CJK SC",monospace,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
2329
+ }
2330
+
2331
+ :is(:root, [data-theme]):lang(zh-HK) {
2332
+ --lobe-font-family: -apple-system,BlinkMacSystemFont,"Segoe UI Variable Display","Segoe UI",Roboto,"Helvetica Neue",Arial,"PingFang HK","Source Han Sans HC","Noto Sans CJK HK","PingFang TC","Hiragino Sans CNS","Microsoft JhengHei UI","Microsoft JhengHei","Source Han Sans TC","Noto Sans CJK TC","PingFang SC","Hiragino Sans GB","Microsoft YaHei UI","Microsoft YaHei","Source Han Sans SC","Noto Sans CJK SC",ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
2333
+ --lobe-font-family-code: "Geist Mono",ui-monospace,SFMono-Regular,"SF Mono",Menlo,"Cascadia Code",Consolas,"Liberation Mono","PingFang HK","Source Han Sans HC","Noto Sans CJK HK","PingFang TC","Hiragino Sans CNS","Microsoft JhengHei UI","Microsoft JhengHei","Source Han Sans TC","Noto Sans CJK TC","PingFang SC","Hiragino Sans GB","Microsoft YaHei UI","Microsoft YaHei","Source Han Sans SC","Noto Sans CJK SC",monospace,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
2334
+ }
2335
+
2336
+ :is(:root, [data-theme]):lang(zh-MO) {
2337
+ --lobe-font-family: -apple-system,BlinkMacSystemFont,"Segoe UI Variable Display","Segoe UI",Roboto,"Helvetica Neue",Arial,"PingFang MO","PingFang HK","Source Han Sans HC","Noto Sans CJK HK","PingFang TC","Hiragino Sans CNS","Microsoft JhengHei UI","Microsoft JhengHei","Source Han Sans TC","Noto Sans CJK TC","PingFang SC","Hiragino Sans GB","Microsoft YaHei UI","Microsoft YaHei","Source Han Sans SC","Noto Sans CJK SC",ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
2338
+ --lobe-font-family-code: "Geist Mono",ui-monospace,SFMono-Regular,"SF Mono",Menlo,"Cascadia Code",Consolas,"Liberation Mono","PingFang MO","PingFang HK","Source Han Sans HC","Noto Sans CJK HK","PingFang TC","Hiragino Sans CNS","Microsoft JhengHei UI","Microsoft JhengHei","Source Han Sans TC","Noto Sans CJK TC","PingFang SC","Hiragino Sans GB","Microsoft YaHei UI","Microsoft YaHei","Source Han Sans SC","Noto Sans CJK SC",monospace,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
2339
+ }
2340
+
2341
+ :is(:root, [data-theme]):lang(ja) {
2342
+ --lobe-font-family: Geist,-apple-system,BlinkMacSystemFont,"Segoe UI Variable Display","Segoe UI",Roboto,"Helvetica Neue",Arial,"Hiragino Sans","Hiragino Kaku Gothic ProN","Yu Gothic UI","Yu Gothic",Meiryo,"Source Han Sans JP","Noto Sans CJK JP","HarmonyOS Sans SC","PingFang SC","Hiragino Sans GB","Microsoft YaHei UI","Microsoft YaHei","Source Han Sans SC","Noto Sans CJK SC",ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
2343
+ --lobe-font-family-code: "Geist Mono",ui-monospace,SFMono-Regular,"SF Mono",Menlo,"Cascadia Code",Consolas,"Liberation Mono","Hiragino Sans","Hiragino Kaku Gothic ProN","Yu Gothic UI","Yu Gothic",Meiryo,"Source Han Sans JP","Noto Sans CJK JP","HarmonyOS Sans SC","PingFang SC","Hiragino Sans GB","Microsoft YaHei UI","Microsoft YaHei","Source Han Sans SC","Noto Sans CJK SC",monospace,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
2344
+ }
2345
+
2346
+ :is(:root, [data-theme]):lang(ko) {
2347
+ --lobe-font-family: Geist,-apple-system,BlinkMacSystemFont,"Segoe UI Variable Display","Segoe UI",Roboto,"Helvetica Neue",Arial,"Apple SD Gothic Neo","Malgun Gothic","Source Han Sans KR","Noto Sans CJK KR","HarmonyOS Sans SC","PingFang SC","Hiragino Sans GB","Microsoft YaHei UI","Microsoft YaHei","Source Han Sans SC","Noto Sans CJK SC",ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
2348
+ --lobe-font-family-code: "Geist Mono",ui-monospace,SFMono-Regular,"SF Mono",Menlo,"Cascadia Code",Consolas,"Liberation Mono","Apple SD Gothic Neo","Malgun Gothic","Source Han Sans KR","Noto Sans CJK KR","HarmonyOS Sans SC","PingFang SC","Hiragino Sans GB","Microsoft YaHei UI","Microsoft YaHei","Source Han Sans SC","Noto Sans CJK SC",monospace,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
2349
+ }
2350
+
2351
+ :is(:root, [data-theme]):lang(ar), :is(:root, [data-theme]):lang(fa) {
2352
+ --lobe-font-family: Geist,-apple-system,BlinkMacSystemFont,"Segoe UI Variable Display","Segoe UI",Roboto,"Helvetica Neue",Arial,"SF Arabic","Geeza Pro","Noto Sans Arabic",Tahoma,"HarmonyOS Sans SC","PingFang SC","Hiragino Sans GB","Microsoft YaHei UI","Microsoft YaHei","Source Han Sans SC","Noto Sans CJK SC",ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
2353
+ --lobe-font-family-code: "Geist Mono",ui-monospace,SFMono-Regular,"SF Mono",Menlo,"Cascadia Code",Consolas,"Liberation Mono","SF Arabic","Geeza Pro","Noto Sans Arabic",Tahoma,"HarmonyOS Sans SC","PingFang SC","Hiragino Sans GB","Microsoft YaHei UI","Microsoft YaHei","Source Han Sans SC","Noto Sans CJK SC",monospace,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
2354
+ }
2355
+
2356
+ :is(:root, [data-theme]):lang(he) {
2357
+ --lobe-font-family: Geist,-apple-system,BlinkMacSystemFont,"Segoe UI Variable Display","Segoe UI",Roboto,"Helvetica Neue",Arial,"SF Hebrew","Arial Hebrew","Noto Sans Hebrew","HarmonyOS Sans SC","PingFang SC","Hiragino Sans GB","Microsoft YaHei UI","Microsoft YaHei","Source Han Sans SC","Noto Sans CJK SC",ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
2358
+ --lobe-font-family-code: "Geist Mono",ui-monospace,SFMono-Regular,"SF Mono",Menlo,"Cascadia Code",Consolas,"Liberation Mono","SF Hebrew","Arial Hebrew","Noto Sans Hebrew","HarmonyOS Sans SC","PingFang SC","Hiragino Sans GB","Microsoft YaHei UI","Microsoft YaHei","Source Han Sans SC","Noto Sans CJK SC",monospace,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
2359
+ }
2360
+
2361
+ :is(:root, [data-theme]):lang(th) {
2362
+ --lobe-font-family: Geist,-apple-system,BlinkMacSystemFont,"Segoe UI Variable Display","Segoe UI",Roboto,"Helvetica Neue",Arial,Thonburi,"Leelawadee UI","Noto Sans Thai","HarmonyOS Sans SC","PingFang SC","Hiragino Sans GB","Microsoft YaHei UI","Microsoft YaHei","Source Han Sans SC","Noto Sans CJK SC",ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
2363
+ --lobe-font-family-code: "Geist Mono",ui-monospace,SFMono-Regular,"SF Mono",Menlo,"Cascadia Code",Consolas,"Liberation Mono",Thonburi,"Leelawadee UI","Noto Sans Thai","HarmonyOS Sans SC","PingFang SC","Hiragino Sans GB","Microsoft YaHei UI","Microsoft YaHei","Source Han Sans SC","Noto Sans CJK SC",monospace,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
2364
+ }
2365
+
2366
+ :is(:root, [data-theme]):lang(hi), :is(:root, [data-theme]):lang(mr), :is(:root, [data-theme]):lang(ne) {
2367
+ --lobe-font-family: Geist,-apple-system,BlinkMacSystemFont,"Segoe UI Variable Display","Segoe UI",Roboto,"Helvetica Neue",Arial,"Kohinoor Devanagari","Nirmala UI","Noto Sans Devanagari","HarmonyOS Sans SC","PingFang SC","Hiragino Sans GB","Microsoft YaHei UI","Microsoft YaHei","Source Han Sans SC","Noto Sans CJK SC",ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
2368
+ --lobe-font-family-code: "Geist Mono",ui-monospace,SFMono-Regular,"SF Mono",Menlo,"Cascadia Code",Consolas,"Liberation Mono","Kohinoor Devanagari","Nirmala UI","Noto Sans Devanagari","HarmonyOS Sans SC","PingFang SC","Hiragino Sans GB","Microsoft YaHei UI","Microsoft YaHei","Source Han Sans SC","Noto Sans CJK SC",monospace,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
2369
+ }
2370
+
2321
2371
  @layer lobe-ui {
2322
2372
  .lobe-brand-loading path {
2323
2373
  fill: currentcolor;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/ui",
3
- "version": "6.9.1",
3
+ "version": "6.10.1",
4
4
  "description": "Lobe UI is an open-source UI component library for building AIGC web apps",
5
5
  "keywords": [
6
6
  "lobehub",