@lobehub/ui 5.32.4 → 5.32.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/Markdown/SyntaxMarkdown/StreamdownRender.mjs +15 -294
- package/es/Markdown/SyntaxMarkdown/StreamdownRender.mjs.map +1 -1
- package/es/Markdown/type.d.mts +2 -3
- package/es/base-ui/ContextMenu/renderItems.mjs +24 -1
- package/es/base-ui/ContextMenu/renderItems.mjs.map +1 -1
- package/es/base-ui/Input/style.d.mts +2 -2
- package/es/base-ui/Segmented/Segmented.mjs +4 -0
- package/es/base-ui/Segmented/Segmented.mjs.map +1 -1
- package/es/base-ui/Segmented/style.mjs +4 -0
- package/es/base-ui/Segmented/style.mjs.map +1 -1
- package/es/base-ui/Tabs/style.mjs +12 -0
- package/es/base-ui/Tabs/style.mjs.map +1 -1
- package/es/base-ui/Tooltip/style.mjs +104 -20
- package/es/base-ui/Tooltip/style.mjs.map +1 -1
- package/es/hooks/useMarkdown/useMarkdownContent.mjs +4 -16
- package/es/hooks/useMarkdown/useMarkdownContent.mjs.map +1 -1
- package/es/hooks/useMarkdown/utils.mjs +1 -1
- package/es/hooks/useMarkdown/utils.mjs.map +1 -1
- package/es/index.d.mts +1 -1
- package/es/index.mjs +1 -1
- package/package.json +2 -88
- package/es/Markdown/SyntaxMarkdown/CachedMarkdown.mjs +0 -83
- package/es/Markdown/SyntaxMarkdown/CachedMarkdown.mjs.map +0 -1
- package/es/Markdown/SyntaxMarkdown/fenceState.mjs +0 -42
- package/es/Markdown/SyntaxMarkdown/fenceState.mjs.map +0 -1
- package/es/Markdown/SyntaxMarkdown/streamAnimationMeta.mjs +0 -14
- package/es/Markdown/SyntaxMarkdown/streamAnimationMeta.mjs.map +0 -1
- package/es/Markdown/SyntaxMarkdown/style.mjs +0 -28
- package/es/Markdown/SyntaxMarkdown/style.mjs.map +0 -1
- package/es/Markdown/SyntaxMarkdown/useSmoothStreamContent.mjs +0 -314
- package/es/Markdown/SyntaxMarkdown/useSmoothStreamContent.mjs.map +0 -1
- package/es/Markdown/SyntaxMarkdown/useStreamQueue.mjs +0 -88
- package/es/Markdown/SyntaxMarkdown/useStreamQueue.mjs.map +0 -1
- package/es/Markdown/plugins/rehypeStreamAnimated.d.mts +0 -33
- package/es/Markdown/plugins/rehypeStreamAnimated.mjs +0 -115
- package/es/Markdown/plugins/rehypeStreamAnimated.mjs.map +0 -1
- package/es/Markdown/streamProfiler/StreamdownProfilerProvider.mjs +0 -19
- package/es/Markdown/streamProfiler/StreamdownProfilerProvider.mjs.map +0 -1
- package/es/hooks/useMarkdown/latex.mjs +0 -294
- package/es/hooks/useMarkdown/latex.mjs.map +0 -1
- package/es/node_modules/.pnpm/@types_hast@3.0.5/node_modules/@types/hast/index.d.mts +0 -869
- package/es/utils/getNow.mjs +0 -8
- package/es/utils/getNow.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.mjs","names":["lobeStaticStylish"],"sources":["../../../src/base-ui/Segmented/style.ts"],"sourcesContent":["import { createStaticStyles } from 'antd-style';\nimport { cva } from 'class-variance-authority';\n\nimport { lobeStaticStylish } from '@/styles';\n\nexport const styles = createStaticStyles(({ css, cssVar }) => ({\n indicator: css`\n pointer-events: none;\n\n position: absolute;\n z-index: 0;\n inset-block-start: var(--active-item-top);\n inset-inline-start: var(--active-item-left);\n\n width: var(--active-item-width);\n height: var(--active-item-height);\n border-radius: ${cssVar.borderRadius};\n\n background: ${cssVar.colorBgElevated};\n box-shadow: ${cssVar.boxShadowTertiary};\n\n transition-timing-function: ${cssVar.motionEaseOut};\n transition-duration: 240ms;\n transition-property: inset-inline-start, inset-block-start, width, height;\n\n @media (prefers-reduced-motion: reduce) {\n transition-duration: 0s;\n }\n `,\n item: css`\n cursor: pointer;\n user-select: none;\n\n position: relative;\n z-index: 1;\n\n display: inline-flex;\n flex-shrink: 0;\n gap: 6px;\n align-items: center;\n justify-content: center;\n\n box-sizing: border-box;\n border: 0;\n\n font-weight: 500;\n color: ${cssVar.colorTextSecondary};\n white-space: nowrap;\n\n background: transparent;\n outline: none;\n\n transition:\n color 120ms ${cssVar.motionEaseOut},\n transform 120ms ${cssVar.motionEaseOut};\n\n &:hover:not([data-disabled], [data-pressed]) {\n color: ${cssVar.colorText};\n }\n\n &:active:not([data-disabled]) {\n transform: scale(0.98);\n }\n\n &:focus-visible {\n border-radius: ${cssVar.borderRadius};\n outline: 2px solid ${cssVar.colorPrimaryBorder};\n outline-offset: -2px;\n }\n\n &[data-pressed] {\n color: ${cssVar.colorText};\n }\n\n &[data-disabled] {\n cursor: not-allowed;\n color: ${cssVar.colorTextDisabled};\n }\n\n @media (prefers-reduced-motion: reduce) {\n transition-duration: 0s;\n }\n `,\n itemBlock: css`\n flex: 1 1 0;\n `,\n itemIcon: css`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n `,\n itemLabel: css`\n display: inline-flex;\n align-items: center;\n `,\n itemLarge: css`\n height: 36px;\n padding-inline: 16px;\n border-radius: ${cssVar.borderRadius};\n font-size: 14px;\n `,\n itemMiddle: css`\n height: 32px;\n padding-inline: 12px;\n border-radius: ${cssVar.borderRadius};\n font-size: 13px;\n `,\n itemSmall: css`\n height: 26px;\n padding-inline: 10px;\n border-radius: ${cssVar.borderRadius};\n font-size: 12px;\n `,\n list: css`\n position: relative;\n\n display: inline-flex;\n flex-wrap: nowrap;\n gap: 4px;\n align-items: center;\n align-self: flex-start;\n\n box-sizing: border-box;\n padding: 3px;\n border-radius: ${cssVar.borderRadiusLG};\n\n &[data-orientation='vertical'] {\n flex-direction: column;\n align-items: stretch;\n align-self: stretch;\n }\n `,\n listBlock: css`\n display: flex;\n align-self: stretch;\n width: 100%;\n `,\n listFilled: css`\n border: 1px solid ${cssVar.colorFillQuaternary};\n background: ${cssVar.colorBgLayout};\n `,\n listGlass: lobeStaticStylish.blur,\n listOutlined: css`\n border: 1px solid ${cssVar.colorBorderSecondary};\n background: transparent;\n `,\n listShadow: lobeStaticStylish.shadow,\n root: css`\n display: inline-flex;\n\n &[data-block='true'] {\n display: flex;\n width: 100%;\n }\n `,\n}));\n\nexport const listVariants = cva(styles.list, {\n defaultVariants: {\n block: false,\n glass: false,\n shadow: false,\n variant: 'filled',\n },\n variants: {\n block: {\n false: null,\n true: styles.listBlock,\n },\n glass: {\n false: null,\n true: styles.listGlass,\n },\n shadow: {\n false: null,\n true: styles.listShadow,\n },\n variant: {\n filled: styles.listFilled,\n outlined: styles.listOutlined,\n },\n },\n});\n\nexport const itemVariants = cva(styles.item, {\n defaultVariants: {\n block: false,\n size: 'middle',\n },\n variants: {\n block: {\n false: null,\n true: styles.itemBlock,\n },\n size: {\n large: styles.itemLarge,\n middle: styles.itemMiddle,\n small: styles.itemSmall,\n },\n },\n});\n"],"mappings":";;;;AAKA,MAAa,SAAS,oBAAoB,EAAE,KAAK,cAAc;CAC7D,WAAW,GAAG;;;;;;;;;;qBAUK,OAAO,aAAa;;kBAEvB,OAAO,gBAAgB;kBACvB,OAAO,kBAAkB;;kCAET,OAAO,cAAc
|
|
1
|
+
{"version":3,"file":"style.mjs","names":["lobeStaticStylish"],"sources":["../../../src/base-ui/Segmented/style.ts"],"sourcesContent":["import { createStaticStyles } from 'antd-style';\nimport { cva } from 'class-variance-authority';\n\nimport { lobeStaticStylish } from '@/styles';\n\nexport const styles = createStaticStyles(({ css, cssVar }) => ({\n indicator: css`\n pointer-events: none;\n\n position: absolute;\n z-index: 0;\n inset-block-start: var(--active-item-top);\n inset-inline-start: var(--active-item-left);\n\n width: var(--active-item-width);\n height: var(--active-item-height);\n border-radius: ${cssVar.borderRadius};\n\n background: ${cssVar.colorBgElevated};\n box-shadow: ${cssVar.boxShadowTertiary};\n\n transition-timing-function: ${cssVar.motionEaseOut};\n transition-duration: 240ms;\n transition-property: inset-inline-start, inset-block-start, width, height;\n\n [data-orientation='horizontal'] &:dir(rtl) {\n inset-inline-start: var(--active-item-right);\n }\n\n @media (prefers-reduced-motion: reduce) {\n transition-duration: 0s;\n }\n `,\n item: css`\n cursor: pointer;\n user-select: none;\n\n position: relative;\n z-index: 1;\n\n display: inline-flex;\n flex-shrink: 0;\n gap: 6px;\n align-items: center;\n justify-content: center;\n\n box-sizing: border-box;\n border: 0;\n\n font-weight: 500;\n color: ${cssVar.colorTextSecondary};\n white-space: nowrap;\n\n background: transparent;\n outline: none;\n\n transition:\n color 120ms ${cssVar.motionEaseOut},\n transform 120ms ${cssVar.motionEaseOut};\n\n &:hover:not([data-disabled], [data-pressed]) {\n color: ${cssVar.colorText};\n }\n\n &:active:not([data-disabled]) {\n transform: scale(0.98);\n }\n\n &:focus-visible {\n border-radius: ${cssVar.borderRadius};\n outline: 2px solid ${cssVar.colorPrimaryBorder};\n outline-offset: -2px;\n }\n\n &[data-pressed] {\n color: ${cssVar.colorText};\n }\n\n &[data-disabled] {\n cursor: not-allowed;\n color: ${cssVar.colorTextDisabled};\n }\n\n @media (prefers-reduced-motion: reduce) {\n transition-duration: 0s;\n }\n `,\n itemBlock: css`\n flex: 1 1 0;\n `,\n itemIcon: css`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n `,\n itemLabel: css`\n display: inline-flex;\n align-items: center;\n `,\n itemLarge: css`\n height: 36px;\n padding-inline: 16px;\n border-radius: ${cssVar.borderRadius};\n font-size: 14px;\n `,\n itemMiddle: css`\n height: 32px;\n padding-inline: 12px;\n border-radius: ${cssVar.borderRadius};\n font-size: 13px;\n `,\n itemSmall: css`\n height: 26px;\n padding-inline: 10px;\n border-radius: ${cssVar.borderRadius};\n font-size: 12px;\n `,\n list: css`\n position: relative;\n\n display: inline-flex;\n flex-wrap: nowrap;\n gap: 4px;\n align-items: center;\n align-self: flex-start;\n\n box-sizing: border-box;\n padding: 3px;\n border-radius: ${cssVar.borderRadiusLG};\n\n &[data-orientation='vertical'] {\n flex-direction: column;\n align-items: stretch;\n align-self: stretch;\n }\n `,\n listBlock: css`\n display: flex;\n align-self: stretch;\n width: 100%;\n `,\n listFilled: css`\n border: 1px solid ${cssVar.colorFillQuaternary};\n background: ${cssVar.colorBgLayout};\n `,\n listGlass: lobeStaticStylish.blur,\n listOutlined: css`\n border: 1px solid ${cssVar.colorBorderSecondary};\n background: transparent;\n `,\n listShadow: lobeStaticStylish.shadow,\n root: css`\n display: inline-flex;\n\n &[data-block='true'] {\n display: flex;\n width: 100%;\n }\n `,\n}));\n\nexport const listVariants = cva(styles.list, {\n defaultVariants: {\n block: false,\n glass: false,\n shadow: false,\n variant: 'filled',\n },\n variants: {\n block: {\n false: null,\n true: styles.listBlock,\n },\n glass: {\n false: null,\n true: styles.listGlass,\n },\n shadow: {\n false: null,\n true: styles.listShadow,\n },\n variant: {\n filled: styles.listFilled,\n outlined: styles.listOutlined,\n },\n },\n});\n\nexport const itemVariants = cva(styles.item, {\n defaultVariants: {\n block: false,\n size: 'middle',\n },\n variants: {\n block: {\n false: null,\n true: styles.itemBlock,\n },\n size: {\n large: styles.itemLarge,\n middle: styles.itemMiddle,\n small: styles.itemSmall,\n },\n },\n});\n"],"mappings":";;;;AAKA,MAAa,SAAS,oBAAoB,EAAE,KAAK,cAAc;CAC7D,WAAW,GAAG;;;;;;;;;;qBAUK,OAAO,aAAa;;kBAEvB,OAAO,gBAAgB;kBACvB,OAAO,kBAAkB;;kCAET,OAAO,cAAc;;;;;;;;;;;;CAYrD,MAAM,GAAG;;;;;;;;;;;;;;;;;aAiBE,OAAO,mBAAmB;;;;;;;oBAOnB,OAAO,cAAc;wBACjB,OAAO,cAAc;;;eAG9B,OAAO,UAAU;;;;;;;;uBAQT,OAAO,aAAa;2BAChB,OAAO,mBAAmB;;;;;eAKtC,OAAO,UAAU;;;;;eAKjB,OAAO,kBAAkB;;;;;;;CAOtC,WAAW,GAAG;;;CAGd,UAAU,GAAG;;;;;CAKb,WAAW,GAAG;;;;CAId,WAAW,GAAG;;;qBAGK,OAAO,aAAa;;;CAGvC,YAAY,GAAG;;;qBAGI,OAAO,aAAa;;;CAGvC,WAAW,GAAG;;;qBAGK,OAAO,aAAa;;;CAGvC,MAAM,GAAG;;;;;;;;;;;qBAWU,OAAO,eAAe;;;;;;;;CAQzC,WAAW,GAAG;;;;;CAKd,YAAY,GAAG;wBACO,OAAO,oBAAoB;kBACjC,OAAO,cAAc;;CAErC,WAAWA,cAAkB;CAC7B,cAAc,GAAG;wBACK,OAAO,qBAAqB;;;CAGlD,YAAYA,cAAkB;CAC9B,MAAM,GAAG;;;;;;;;AAQX,EAAE;AAEF,MAAa,eAAe,IAAI,OAAO,MAAM;CAC3C,iBAAiB;EACf,OAAO;EACP,OAAO;EACP,QAAQ;EACR,SAAS;CACX;CACA,UAAU;EACR,OAAO;GACL,OAAO;GACP,MAAM,OAAO;EACf;EACA,OAAO;GACL,OAAO;GACP,MAAM,OAAO;EACf;EACA,QAAQ;GACN,OAAO;GACP,MAAM,OAAO;EACf;EACA,SAAS;GACP,QAAQ,OAAO;GACf,UAAU,OAAO;EACnB;CACF;AACF,CAAC;AAED,MAAa,eAAe,IAAI,OAAO,MAAM;CAC3C,iBAAiB;EACf,OAAO;EACP,MAAM;CACR;CACA,UAAU;EACR,OAAO;GACL,OAAO;GACP,MAAM,OAAO;EACf;EACA,MAAM;GACJ,OAAO,OAAO;GACd,QAAQ,OAAO;GACf,OAAO,OAAO;EAChB;CACF;AACF,CAAC"}
|
|
@@ -25,6 +25,10 @@ const styles = createStaticStyles(({ css, cssVar }) => ({
|
|
|
25
25
|
border-radius: 50%;
|
|
26
26
|
|
|
27
27
|
background: ${cssVar.colorPrimary};
|
|
28
|
+
|
|
29
|
+
[data-orientation='horizontal'] &:dir(rtl) {
|
|
30
|
+
inset-inline-start: calc(var(--active-tab-right) + var(--active-tab-width) / 2 - 2.5px);
|
|
31
|
+
}
|
|
28
32
|
`,
|
|
29
33
|
indicatorRounded: css`
|
|
30
34
|
inset-block-start: var(--active-tab-top);
|
|
@@ -36,6 +40,10 @@ const styles = createStaticStyles(({ css, cssVar }) => ({
|
|
|
36
40
|
|
|
37
41
|
background: ${cssVar.colorBgElevated};
|
|
38
42
|
box-shadow: ${cssVar.boxShadowTertiary};
|
|
43
|
+
|
|
44
|
+
[data-orientation='horizontal'] &:dir(rtl) {
|
|
45
|
+
inset-inline-start: var(--active-tab-right);
|
|
46
|
+
}
|
|
39
47
|
`,
|
|
40
48
|
indicatorSquare: css`
|
|
41
49
|
inset-block-end: 0;
|
|
@@ -45,6 +53,10 @@ const styles = createStaticStyles(({ css, cssVar }) => ({
|
|
|
45
53
|
height: 2px;
|
|
46
54
|
|
|
47
55
|
background: ${cssVar.colorPrimary};
|
|
56
|
+
|
|
57
|
+
[data-orientation='horizontal'] &:dir(rtl) {
|
|
58
|
+
inset-inline-start: var(--active-tab-right);
|
|
59
|
+
}
|
|
48
60
|
`,
|
|
49
61
|
list: css`
|
|
50
62
|
position: relative;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.mjs","names":[],"sources":["../../../src/base-ui/Tabs/style.ts"],"sourcesContent":["import { createStaticStyles } from 'antd-style';\nimport { cva } from 'class-variance-authority';\n\nexport const styles = createStaticStyles(({ css, cssVar }) => ({\n indicator: css`\n pointer-events: none;\n\n position: absolute;\n z-index: 0;\n\n transition-timing-function: ${cssVar.motionEaseOut};\n transition-duration: 240ms;\n transition-property: inset-inline-start, inset-block-start, width, height, transform;\n\n @media (prefers-reduced-motion: reduce) {\n transition-duration: 0s;\n }\n `,\n indicatorPoint: css`\n inset-block-end: 6px;\n inset-inline-start: calc(var(--active-tab-left) + var(--active-tab-width) / 2 - 2.5px);\n\n width: 5px;\n height: 5px;\n border-radius: 50%;\n\n background: ${cssVar.colorPrimary};\n `,\n indicatorRounded: css`\n inset-block-start: var(--active-tab-top);\n inset-inline-start: var(--active-tab-left);\n\n width: var(--active-tab-width);\n height: var(--active-tab-height);\n border-radius: ${cssVar.borderRadius};\n\n background: ${cssVar.colorBgElevated};\n box-shadow: ${cssVar.boxShadowTertiary};\n `,\n indicatorSquare: css`\n inset-block-end: 0;\n inset-inline-start: var(--active-tab-left);\n\n width: var(--active-tab-width);\n height: 2px;\n\n background: ${cssVar.colorPrimary};\n `,\n list: css`\n position: relative;\n\n display: inline-flex;\n flex-wrap: nowrap;\n gap: 2px;\n align-items: center;\n\n &[data-orientation='vertical'] {\n flex-direction: column;\n align-items: stretch;\n }\n `,\n listRounded: css`\n gap: 4px;\n align-self: flex-start;\n\n padding: 3px;\n border-radius: ${cssVar.borderRadiusLG};\n\n background: ${cssVar.colorBgLayout};\n\n &[data-orientation='vertical'] {\n align-self: stretch;\n }\n `,\n listSquare: css`\n gap: 16px;\n box-shadow: inset 0 -1px 0 ${cssVar.colorBorderSecondary};\n\n &[data-orientation='vertical'] {\n box-shadow: inset -1px 0 0 ${cssVar.colorBorderSecondary};\n }\n `,\n panel: css`\n padding-block-start: 12px;\n outline: none;\n\n &:focus-visible {\n border-radius: ${cssVar.borderRadius};\n outline: 2px solid ${cssVar.colorPrimaryBorder};\n outline-offset: 2px;\n }\n `,\n root: css`\n display: flex;\n flex-direction: column;\n width: 100%;\n\n &[data-orientation='vertical'] {\n flex-direction: row;\n }\n `,\n tab: css`\n cursor: pointer;\n user-select: none;\n\n position: relative;\n z-index: 1;\n\n display: inline-flex;\n flex-shrink: 0;\n gap: 6px;\n align-items: center;\n justify-content: center;\n\n box-sizing: border-box;\n border: 0;\n\n font-weight: 500;\n color: ${cssVar.colorTextSecondary};\n white-space: nowrap;\n\n background: transparent;\n outline: none;\n\n transition:\n color 120ms ${cssVar.motionEaseOut},\n transform 120ms ${cssVar.motionEaseOut};\n\n &:hover:not([data-disabled]) {\n color: ${cssVar.colorText};\n }\n\n &:active:not([data-disabled]) {\n transform: scale(0.98);\n }\n\n &:focus-visible {\n outline: 2px solid ${cssVar.colorPrimaryBorder};\n outline-offset: -2px;\n }\n\n &[data-active] {\n color: ${cssVar.colorPrimary};\n }\n\n &[data-disabled] {\n cursor: not-allowed;\n color: ${cssVar.colorTextDisabled};\n }\n\n @media (prefers-reduced-motion: reduce) {\n transition-duration: 0s;\n }\n `,\n tabLarge: css`\n height: 36px;\n padding-inline: 16px;\n border-radius: ${cssVar.borderRadius};\n font-size: 14px;\n `,\n tabMiddle: css`\n height: 32px;\n padding-inline: 12px;\n border-radius: ${cssVar.borderRadius};\n font-size: 13px;\n `,\n tabPoint: css`\n height: auto;\n padding-block: 8px 14px;\n `,\n tabSmall: css`\n height: 26px;\n padding-inline: 10px;\n border-radius: ${cssVar.borderRadius};\n font-size: 12px;\n `,\n tabSquare: css`\n height: auto;\n padding-block: 8px;\n border-radius: 0;\n `,\n}));\n\nexport const tabVariants = cva(styles.tab, {\n defaultVariants: {\n size: 'middle',\n variant: 'rounded',\n },\n variants: {\n size: {\n large: styles.tabLarge,\n middle: styles.tabMiddle,\n small: styles.tabSmall,\n },\n variant: {\n point: styles.tabPoint,\n rounded: null,\n square: styles.tabSquare,\n },\n },\n});\n\nexport const indicatorVariants = cva(styles.indicator, {\n defaultVariants: {\n variant: 'rounded',\n },\n variants: {\n variant: {\n point: styles.indicatorPoint,\n rounded: styles.indicatorRounded,\n square: styles.indicatorSquare,\n },\n },\n});\n\nexport const listVariants = cva(styles.list, {\n defaultVariants: {\n variant: 'rounded',\n },\n variants: {\n variant: {\n point: null,\n rounded: styles.listRounded,\n square: styles.listSquare,\n },\n },\n});\n"],"mappings":";;;AAGA,MAAa,SAAS,oBAAoB,EAAE,KAAK,cAAc;CAC7D,WAAW,GAAG;;;;;;kCAMkB,OAAO,cAAc;;;;;;;;CAQrD,gBAAgB,GAAG;;;;;;;;kBAQH,OAAO,aAAa
|
|
1
|
+
{"version":3,"file":"style.mjs","names":[],"sources":["../../../src/base-ui/Tabs/style.ts"],"sourcesContent":["import { createStaticStyles } from 'antd-style';\nimport { cva } from 'class-variance-authority';\n\nexport const styles = createStaticStyles(({ css, cssVar }) => ({\n indicator: css`\n pointer-events: none;\n\n position: absolute;\n z-index: 0;\n\n transition-timing-function: ${cssVar.motionEaseOut};\n transition-duration: 240ms;\n transition-property: inset-inline-start, inset-block-start, width, height, transform;\n\n @media (prefers-reduced-motion: reduce) {\n transition-duration: 0s;\n }\n `,\n indicatorPoint: css`\n inset-block-end: 6px;\n inset-inline-start: calc(var(--active-tab-left) + var(--active-tab-width) / 2 - 2.5px);\n\n width: 5px;\n height: 5px;\n border-radius: 50%;\n\n background: ${cssVar.colorPrimary};\n\n [data-orientation='horizontal'] &:dir(rtl) {\n inset-inline-start: calc(var(--active-tab-right) + var(--active-tab-width) / 2 - 2.5px);\n }\n `,\n indicatorRounded: css`\n inset-block-start: var(--active-tab-top);\n inset-inline-start: var(--active-tab-left);\n\n width: var(--active-tab-width);\n height: var(--active-tab-height);\n border-radius: ${cssVar.borderRadius};\n\n background: ${cssVar.colorBgElevated};\n box-shadow: ${cssVar.boxShadowTertiary};\n\n [data-orientation='horizontal'] &:dir(rtl) {\n inset-inline-start: var(--active-tab-right);\n }\n `,\n indicatorSquare: css`\n inset-block-end: 0;\n inset-inline-start: var(--active-tab-left);\n\n width: var(--active-tab-width);\n height: 2px;\n\n background: ${cssVar.colorPrimary};\n\n [data-orientation='horizontal'] &:dir(rtl) {\n inset-inline-start: var(--active-tab-right);\n }\n `,\n list: css`\n position: relative;\n\n display: inline-flex;\n flex-wrap: nowrap;\n gap: 2px;\n align-items: center;\n\n &[data-orientation='vertical'] {\n flex-direction: column;\n align-items: stretch;\n }\n `,\n listRounded: css`\n gap: 4px;\n align-self: flex-start;\n\n padding: 3px;\n border-radius: ${cssVar.borderRadiusLG};\n\n background: ${cssVar.colorBgLayout};\n\n &[data-orientation='vertical'] {\n align-self: stretch;\n }\n `,\n listSquare: css`\n gap: 16px;\n box-shadow: inset 0 -1px 0 ${cssVar.colorBorderSecondary};\n\n &[data-orientation='vertical'] {\n box-shadow: inset -1px 0 0 ${cssVar.colorBorderSecondary};\n }\n `,\n panel: css`\n padding-block-start: 12px;\n outline: none;\n\n &:focus-visible {\n border-radius: ${cssVar.borderRadius};\n outline: 2px solid ${cssVar.colorPrimaryBorder};\n outline-offset: 2px;\n }\n `,\n root: css`\n display: flex;\n flex-direction: column;\n width: 100%;\n\n &[data-orientation='vertical'] {\n flex-direction: row;\n }\n `,\n tab: css`\n cursor: pointer;\n user-select: none;\n\n position: relative;\n z-index: 1;\n\n display: inline-flex;\n flex-shrink: 0;\n gap: 6px;\n align-items: center;\n justify-content: center;\n\n box-sizing: border-box;\n border: 0;\n\n font-weight: 500;\n color: ${cssVar.colorTextSecondary};\n white-space: nowrap;\n\n background: transparent;\n outline: none;\n\n transition:\n color 120ms ${cssVar.motionEaseOut},\n transform 120ms ${cssVar.motionEaseOut};\n\n &:hover:not([data-disabled]) {\n color: ${cssVar.colorText};\n }\n\n &:active:not([data-disabled]) {\n transform: scale(0.98);\n }\n\n &:focus-visible {\n outline: 2px solid ${cssVar.colorPrimaryBorder};\n outline-offset: -2px;\n }\n\n &[data-active] {\n color: ${cssVar.colorPrimary};\n }\n\n &[data-disabled] {\n cursor: not-allowed;\n color: ${cssVar.colorTextDisabled};\n }\n\n @media (prefers-reduced-motion: reduce) {\n transition-duration: 0s;\n }\n `,\n tabLarge: css`\n height: 36px;\n padding-inline: 16px;\n border-radius: ${cssVar.borderRadius};\n font-size: 14px;\n `,\n tabMiddle: css`\n height: 32px;\n padding-inline: 12px;\n border-radius: ${cssVar.borderRadius};\n font-size: 13px;\n `,\n tabPoint: css`\n height: auto;\n padding-block: 8px 14px;\n `,\n tabSmall: css`\n height: 26px;\n padding-inline: 10px;\n border-radius: ${cssVar.borderRadius};\n font-size: 12px;\n `,\n tabSquare: css`\n height: auto;\n padding-block: 8px;\n border-radius: 0;\n `,\n}));\n\nexport const tabVariants = cva(styles.tab, {\n defaultVariants: {\n size: 'middle',\n variant: 'rounded',\n },\n variants: {\n size: {\n large: styles.tabLarge,\n middle: styles.tabMiddle,\n small: styles.tabSmall,\n },\n variant: {\n point: styles.tabPoint,\n rounded: null,\n square: styles.tabSquare,\n },\n },\n});\n\nexport const indicatorVariants = cva(styles.indicator, {\n defaultVariants: {\n variant: 'rounded',\n },\n variants: {\n variant: {\n point: styles.indicatorPoint,\n rounded: styles.indicatorRounded,\n square: styles.indicatorSquare,\n },\n },\n});\n\nexport const listVariants = cva(styles.list, {\n defaultVariants: {\n variant: 'rounded',\n },\n variants: {\n variant: {\n point: null,\n rounded: styles.listRounded,\n square: styles.listSquare,\n },\n },\n});\n"],"mappings":";;;AAGA,MAAa,SAAS,oBAAoB,EAAE,KAAK,cAAc;CAC7D,WAAW,GAAG;;;;;;kCAMkB,OAAO,cAAc;;;;;;;;CAQrD,gBAAgB,GAAG;;;;;;;;kBAQH,OAAO,aAAa;;;;;;CAMpC,kBAAkB,GAAG;;;;;;qBAMF,OAAO,aAAa;;kBAEvB,OAAO,gBAAgB;kBACvB,OAAO,kBAAkB;;;;;;CAMzC,iBAAiB,GAAG;;;;;;;kBAOJ,OAAO,aAAa;;;;;;CAMpC,MAAM,GAAG;;;;;;;;;;;;;CAaT,aAAa,GAAG;;;;;qBAKG,OAAO,eAAe;;kBAEzB,OAAO,cAAc;;;;;;CAMrC,YAAY,GAAG;;iCAEgB,OAAO,qBAAqB;;;mCAG1B,OAAO,qBAAqB;;;CAG7D,OAAO,GAAG;;;;;uBAKW,OAAO,aAAa;2BAChB,OAAO,mBAAmB;;;;CAInD,MAAM,GAAG;;;;;;;;;CAST,KAAK,GAAG;;;;;;;;;;;;;;;;;aAiBG,OAAO,mBAAmB;;;;;;;oBAOnB,OAAO,cAAc;wBACjB,OAAO,cAAc;;;eAG9B,OAAO,UAAU;;;;;;;;2BAQL,OAAO,mBAAmB;;;;;eAKtC,OAAO,aAAa;;;;;eAKpB,OAAO,kBAAkB;;;;;;;CAOtC,UAAU,GAAG;;;qBAGM,OAAO,aAAa;;;CAGvC,WAAW,GAAG;;;qBAGK,OAAO,aAAa;;;CAGvC,UAAU,GAAG;;;;CAIb,UAAU,GAAG;;;qBAGM,OAAO,aAAa;;;CAGvC,WAAW,GAAG;;;;;AAKhB,EAAE;AAEF,MAAa,cAAc,IAAI,OAAO,KAAK;CACzC,iBAAiB;EACf,MAAM;EACN,SAAS;CACX;CACA,UAAU;EACR,MAAM;GACJ,OAAO,OAAO;GACd,QAAQ,OAAO;GACf,OAAO,OAAO;EAChB;EACA,SAAS;GACP,OAAO,OAAO;GACd,SAAS;GACT,QAAQ,OAAO;EACjB;CACF;AACF,CAAC;AAED,MAAa,oBAAoB,IAAI,OAAO,WAAW;CACrD,iBAAiB,EACf,SAAS,UACX;CACA,UAAU,EACR,SAAS;EACP,OAAO,OAAO;EACd,SAAS,OAAO;EAChB,QAAQ,OAAO;CACjB,EACF;AACF,CAAC;AAED,MAAa,eAAe,IAAI,OAAO,MAAM;CAC3C,iBAAiB,EACf,SAAS,UACX;CACA,UAAU,EACR,SAAS;EACP,OAAO;EACP,SAAS,OAAO;EAChB,QAAQ,OAAO;CACjB,EACF;AACF,CAAC"}
|
|
@@ -46,6 +46,12 @@ const styles = createStaticStyles(({ css, cssVar }) => ({
|
|
|
46
46
|
}
|
|
47
47
|
`,
|
|
48
48
|
popup: css`
|
|
49
|
+
|
|
50
|
+
/* Keep the popup on its own compositor layer for its whole lifetime: when the opacity
|
|
51
|
+
transition ends the browser otherwise drops the layer and re-rasterizes with pixel
|
|
52
|
+
snapping — a visible one-frame shift when the measured width is fractional
|
|
53
|
+
(single-line tooltips). */
|
|
54
|
+
will-change: transform, opacity;
|
|
49
55
|
user-select: none;
|
|
50
56
|
|
|
51
57
|
position: relative;
|
|
@@ -65,11 +71,21 @@ const styles = createStaticStyles(({ css, cssVar }) => ({
|
|
|
65
71
|
0 1px 6px -1px rgb(0 0 0 / 2%),
|
|
66
72
|
0 2px 4px 0 rgb(0 0 0 / 2%);
|
|
67
73
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
74
|
+
/* Opacity gets its own monotonic curve: running it on the overshooting spring makes the
|
|
75
|
+
fade look finished at ~0.96, pause, then visibly step to 1 at the clamp point — reads
|
|
76
|
+
as a dropped frame. The spring stays on transform only. */
|
|
77
|
+
transition-timing-function:
|
|
78
|
+
var(--lobe-tooltip-fade-ease), var(--lobe-tooltip-animation-ease-out);
|
|
79
|
+
transition-duration: var(--lobe-tooltip-fade-duration), var(--lobe-tooltip-animation-duration);
|
|
80
|
+
transition-property: opacity, transform;
|
|
71
81
|
|
|
72
82
|
&[data-layout-animation] {
|
|
83
|
+
transition-timing-function:
|
|
84
|
+
var(--lobe-tooltip-fade-ease), var(--lobe-tooltip-animation-ease-out),
|
|
85
|
+
var(--lobe-tooltip-layout-ease), var(--lobe-tooltip-layout-ease);
|
|
86
|
+
transition-duration:
|
|
87
|
+
var(--lobe-tooltip-fade-duration), var(--lobe-tooltip-animation-duration),
|
|
88
|
+
var(--lobe-tooltip-layout-duration), var(--lobe-tooltip-layout-duration);
|
|
73
89
|
transition-property: opacity, transform, width, height;
|
|
74
90
|
}
|
|
75
91
|
|
|
@@ -90,12 +106,71 @@ const styles = createStaticStyles(({ css, cssVar }) => ({
|
|
|
90
106
|
}
|
|
91
107
|
`,
|
|
92
108
|
positioner: css`
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
--lobe-tooltip-animation-
|
|
97
|
-
--lobe-tooltip-
|
|
98
|
-
--lobe-tooltip-
|
|
109
|
+
/* Springs baked as linear(): stiffness 700 / damping 38 (enter) and 380 / 28 (glide),
|
|
110
|
+
both zeta ~0.72 with ~4% overshoot. Durations are the springs' settle times —
|
|
111
|
+
change them together with the curves, not independently. */
|
|
112
|
+
--lobe-tooltip-animation-duration: 280ms;
|
|
113
|
+
--lobe-tooltip-fade-duration: 160ms;
|
|
114
|
+
--lobe-tooltip-fade-ease: cubic-bezier(0.33, 1, 0.68, 1);
|
|
115
|
+
--lobe-tooltip-animation-duration-exit: 100ms;
|
|
116
|
+
--lobe-tooltip-animation-translate: 3px;
|
|
117
|
+
--lobe-tooltip-animation-scale: 0.97;
|
|
118
|
+
--lobe-tooltip-animation-ease-in: cubic-bezier(0.4, 0, 1, 1);
|
|
119
|
+
--lobe-tooltip-animation-ease-out: linear(
|
|
120
|
+
0,
|
|
121
|
+
0.041,
|
|
122
|
+
0.14,
|
|
123
|
+
0.268,
|
|
124
|
+
0.407,
|
|
125
|
+
0.541,
|
|
126
|
+
0.662,
|
|
127
|
+
0.765,
|
|
128
|
+
0.849,
|
|
129
|
+
0.915,
|
|
130
|
+
0.964,
|
|
131
|
+
0.998,
|
|
132
|
+
1.02,
|
|
133
|
+
1.032,
|
|
134
|
+
1.038,
|
|
135
|
+
1.039,
|
|
136
|
+
1.036,
|
|
137
|
+
1.032,
|
|
138
|
+
1.027,
|
|
139
|
+
1.022,
|
|
140
|
+
1.016,
|
|
141
|
+
1.012,
|
|
142
|
+
1.008,
|
|
143
|
+
1.005,
|
|
144
|
+
1.003
|
|
145
|
+
);
|
|
146
|
+
--lobe-tooltip-layout-duration: 380ms;
|
|
147
|
+
--lobe-tooltip-layout-ease: linear(
|
|
148
|
+
0,
|
|
149
|
+
0.041,
|
|
150
|
+
0.14,
|
|
151
|
+
0.268,
|
|
152
|
+
0.407,
|
|
153
|
+
0.541,
|
|
154
|
+
0.661,
|
|
155
|
+
0.765,
|
|
156
|
+
0.849,
|
|
157
|
+
0.915,
|
|
158
|
+
0.964,
|
|
159
|
+
0.998,
|
|
160
|
+
1.02,
|
|
161
|
+
1.032,
|
|
162
|
+
1.038,
|
|
163
|
+
1.039,
|
|
164
|
+
1.036,
|
|
165
|
+
1.032,
|
|
166
|
+
1.027,
|
|
167
|
+
1.022,
|
|
168
|
+
1.016,
|
|
169
|
+
1.012,
|
|
170
|
+
1.008,
|
|
171
|
+
1.005,
|
|
172
|
+
1.003
|
|
173
|
+
);
|
|
99
174
|
--lobe-tooltip-translate-x: 0;
|
|
100
175
|
--lobe-tooltip-translate-y: calc(var(--lobe-tooltip-animation-translate) * -1);
|
|
101
176
|
|
|
@@ -111,6 +186,8 @@ const styles = createStaticStyles(({ css, cssVar }) => ({
|
|
|
111
186
|
transition-property: none;
|
|
112
187
|
|
|
113
188
|
&[data-layout-animation] {
|
|
189
|
+
transition-timing-function: var(--lobe-tooltip-layout-ease);
|
|
190
|
+
transition-duration: var(--lobe-tooltip-layout-duration);
|
|
114
191
|
transition-property:
|
|
115
192
|
inset-block-start, inset-inline-start, inset-inline-end, inset-block-end, transform;
|
|
116
193
|
}
|
|
@@ -153,9 +230,17 @@ const styles = createStaticStyles(({ css, cssVar }) => ({
|
|
|
153
230
|
--lobe-tooltip-translate-x: calc(var(--lobe-tooltip-animation-translate) * -1);
|
|
154
231
|
--lobe-tooltip-translate-y: 0;
|
|
155
232
|
}
|
|
233
|
+
|
|
234
|
+
@media (prefers-reduced-motion: reduce) {
|
|
235
|
+
--lobe-tooltip-animation-duration: 0s;
|
|
236
|
+
--lobe-tooltip-fade-duration: 0s;
|
|
237
|
+
--lobe-tooltip-animation-duration-exit: 0s;
|
|
238
|
+
--lobe-tooltip-layout-duration: 0s;
|
|
239
|
+
}
|
|
156
240
|
`,
|
|
157
241
|
viewport: css`
|
|
158
242
|
--lobe-tooltip-viewport-inline-padding: 8px;
|
|
243
|
+
--lobe-tooltip-content-shift: 40%;
|
|
159
244
|
|
|
160
245
|
position: relative;
|
|
161
246
|
|
|
@@ -181,9 +266,8 @@ const styles = createStaticStyles(({ css, cssVar }) => ({
|
|
|
181
266
|
opacity: 1;
|
|
182
267
|
|
|
183
268
|
transition:
|
|
184
|
-
transform var(--lobe-tooltip-
|
|
185
|
-
opacity calc(var(--lobe-tooltip-
|
|
186
|
-
var(--lobe-tooltip-animation-ease-out);
|
|
269
|
+
transform var(--lobe-tooltip-layout-duration) var(--lobe-tooltip-layout-ease),
|
|
270
|
+
opacity calc(var(--lobe-tooltip-layout-duration) / 2) var(--lobe-tooltip-fade-ease);
|
|
187
271
|
}
|
|
188
272
|
|
|
189
273
|
[data-previous] {
|
|
@@ -193,42 +277,42 @@ const styles = createStaticStyles(({ css, cssVar }) => ({
|
|
|
193
277
|
}
|
|
194
278
|
|
|
195
279
|
&[data-activation-direction~='right'] [data-previous][data-ending-style] {
|
|
196
|
-
transform: translateX(-
|
|
280
|
+
transform: translateX(calc(var(--lobe-tooltip-content-shift) * -1));
|
|
197
281
|
opacity: 0;
|
|
198
282
|
}
|
|
199
283
|
|
|
200
284
|
&[data-activation-direction~='right'] [data-current][data-starting-style] {
|
|
201
|
-
transform: translateX(
|
|
285
|
+
transform: translateX(var(--lobe-tooltip-content-shift));
|
|
202
286
|
opacity: 0;
|
|
203
287
|
}
|
|
204
288
|
|
|
205
289
|
&[data-activation-direction~='left'] [data-previous][data-ending-style] {
|
|
206
|
-
transform: translateX(
|
|
290
|
+
transform: translateX(var(--lobe-tooltip-content-shift));
|
|
207
291
|
opacity: 0;
|
|
208
292
|
}
|
|
209
293
|
|
|
210
294
|
&[data-activation-direction~='left'] [data-current][data-starting-style] {
|
|
211
|
-
transform: translateX(-
|
|
295
|
+
transform: translateX(calc(var(--lobe-tooltip-content-shift) * -1));
|
|
212
296
|
opacity: 0;
|
|
213
297
|
}
|
|
214
298
|
|
|
215
299
|
&[data-activation-direction~='down'] [data-previous][data-ending-style] {
|
|
216
|
-
transform: translateY(-
|
|
300
|
+
transform: translateY(calc(var(--lobe-tooltip-content-shift) * -1));
|
|
217
301
|
opacity: 0;
|
|
218
302
|
}
|
|
219
303
|
|
|
220
304
|
&[data-activation-direction~='down'] [data-current][data-starting-style] {
|
|
221
|
-
transform: translateY(
|
|
305
|
+
transform: translateY(var(--lobe-tooltip-content-shift));
|
|
222
306
|
opacity: 0;
|
|
223
307
|
}
|
|
224
308
|
|
|
225
309
|
&[data-activation-direction~='up'] [data-previous][data-ending-style] {
|
|
226
|
-
transform: translateY(
|
|
310
|
+
transform: translateY(var(--lobe-tooltip-content-shift));
|
|
227
311
|
opacity: 0;
|
|
228
312
|
}
|
|
229
313
|
|
|
230
314
|
&[data-activation-direction~='up'] [data-current][data-starting-style] {
|
|
231
|
-
transform: translateY(-
|
|
315
|
+
transform: translateY(calc(var(--lobe-tooltip-content-shift) * -1));
|
|
232
316
|
opacity: 0;
|
|
233
317
|
}
|
|
234
318
|
`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.mjs","names":[],"sources":["../../../src/base-ui/Tooltip/style.ts"],"sourcesContent":["import { createStaticStyles } from 'antd-style';\n\nexport const styles = createStaticStyles(({ css, cssVar }) => ({\n arrow: css`\n --lobe-tooltip-arrow-offset-block: 4px;\n --lobe-tooltip-arrow-offset-inline: 6px;\n\n pointer-events: none;\n\n position: absolute;\n transform-origin: center;\n\n display: flex;\n\n width: 8px;\n height: 4px;\n\n & > svg {\n display: block;\n width: 100%;\n height: 100%;\n fill: ${cssVar.colorBgElevated};\n }\n\n & [data-role='stroke'] {\n stroke: ${cssVar.colorBorderSecondary};\n }\n\n &[data-side='top'] {\n inset-block-end: calc(var(--lobe-tooltip-arrow-offset-block) * -1);\n transform: rotate(180deg);\n }\n\n &[data-side='left'] {\n inset-inline-end: calc(var(--lobe-tooltip-arrow-offset-inline) * -1);\n transform: rotate(90deg);\n }\n\n &[data-side='right'] {\n inset-inline-start: calc(var(--lobe-tooltip-arrow-offset-inline) * -1);\n transform: rotate(-90deg);\n }\n\n &[data-side='bottom'] {\n inset-block-start: calc(var(--lobe-tooltip-arrow-offset-block) * -1);\n }\n `,\n\n popup: css`\n user-select: none;\n\n position: relative;\n transform-origin: var(--transform-origin);\n\n max-width: min(320px, var(--available-width));\n border: 1px solid ${cssVar.colorFill};\n border-radius: ${cssVar.borderRadiusSM};\n\n font-size: ${cssVar.fontSizeSM};\n line-height: 1.2;\n color: ${cssVar.colorTextLabel};\n\n background: ${cssVar.colorBgElevated};\n box-shadow:\n 0 1px 2px 0 rgb(0 0 0 / 3%),\n 0 1px 6px -1px rgb(0 0 0 / 2%),\n 0 2px 4px 0 rgb(0 0 0 / 2%);\n\n transition-timing-function: var(--lobe-tooltip-animation-ease-out);\n transition-duration: var(--lobe-tooltip-animation-duration);\n transition-property: opacity;\n\n &[data-layout-animation] {\n transition-property: opacity, transform, width, height;\n }\n\n &[data-starting-style],\n &[data-ending-style] {\n transform: translate3d(var(--lobe-tooltip-translate-x), var(--lobe-tooltip-translate-y), 0)\n scale(var(--lobe-tooltip-animation-scale));\n opacity: 0;\n }\n\n &[data-ending-style] {\n transition-timing-function: var(--lobe-tooltip-animation-ease-in);\n transition-duration: var(--lobe-tooltip-animation-duration-exit);\n }\n\n &[data-instant] {\n transition: none;\n }\n `,\n\n positioner: css`\n --lobe-tooltip-animation-duration: 100ms;\n --lobe-tooltip-animation-duration-exit: 60ms;\n --lobe-tooltip-animation-translate: 2px;\n --lobe-tooltip-animation-scale: 0.98;\n --lobe-tooltip-animation-ease-in: ease-in;\n --lobe-tooltip-animation-ease-out: ${cssVar.motionEaseOut};\n --lobe-tooltip-translate-x: 0;\n --lobe-tooltip-translate-y: calc(var(--lobe-tooltip-animation-translate) * -1);\n\n will-change: transform, opacity;\n\n z-index: 114514;\n\n width: min(var(--positioner-width), 320px, var(--available-width));\n height: var(--positioner-height);\n\n transition-timing-function: var(--lobe-tooltip-animation-ease-out);\n transition-duration: var(--lobe-tooltip-animation-duration);\n transition-property: none;\n\n &[data-layout-animation] {\n transition-property:\n inset-block-start, inset-inline-start, inset-inline-end, inset-block-end, transform;\n }\n\n &[data-instant] {\n transition: none;\n }\n\n /* Fallback: never show a tooltip when the anchor is hidden or the positioner falls back to (0,0). */\n &[data-anchor-hidden],\n &[data-zero-origin='true'] {\n pointer-events: none;\n visibility: hidden;\n }\n\n &[data-placement='top'],\n &[data-placement='topLeft'],\n &[data-placement='topRight'] {\n --lobe-tooltip-translate-x: 0;\n --lobe-tooltip-translate-y: var(--lobe-tooltip-animation-translate);\n }\n\n &[data-placement='bottom'],\n &[data-placement='bottomLeft'],\n &[data-placement='bottomRight'] {\n --lobe-tooltip-translate-x: 0;\n --lobe-tooltip-translate-y: calc(var(--lobe-tooltip-animation-translate) * -1);\n }\n\n &[data-placement='left'],\n &[data-placement='leftTop'],\n &[data-placement='leftBottom'] {\n --lobe-tooltip-translate-x: var(--lobe-tooltip-animation-translate);\n --lobe-tooltip-translate-y: 0;\n }\n\n &[data-placement='right'],\n &[data-placement='rightTop'],\n &[data-placement='rightBottom'] {\n --lobe-tooltip-translate-x: calc(var(--lobe-tooltip-animation-translate) * -1);\n --lobe-tooltip-translate-y: 0;\n }\n `,\n\n viewport: css`\n --lobe-tooltip-viewport-inline-padding: 8px;\n\n position: relative;\n\n overflow: clip;\n display: flex;\n gap: 6px;\n align-items: center;\n\n padding-block: 4px;\n padding-inline: var(--lobe-tooltip-viewport-inline-padding);\n\n overflow-wrap: break-word;\n white-space: normal;\n\n [data-previous],\n [data-current] {\n transform: translateX(0);\n\n display: flex;\n gap: 6px;\n align-items: center;\n\n opacity: 1;\n\n transition:\n transform var(--lobe-tooltip-animation-duration) var(--lobe-tooltip-animation-ease-out),\n opacity calc(var(--lobe-tooltip-animation-duration) / 2)\n var(--lobe-tooltip-animation-ease-out);\n }\n\n [data-previous] {\n position: absolute;\n inset-block-start: 4px;\n inset-inline-start: var(--lobe-tooltip-viewport-inline-padding);\n }\n\n &[data-activation-direction~='right'] [data-previous][data-ending-style] {\n transform: translateX(-50%);\n opacity: 0;\n }\n\n &[data-activation-direction~='right'] [data-current][data-starting-style] {\n transform: translateX(50%);\n opacity: 0;\n }\n\n &[data-activation-direction~='left'] [data-previous][data-ending-style] {\n transform: translateX(50%);\n opacity: 0;\n }\n\n &[data-activation-direction~='left'] [data-current][data-starting-style] {\n transform: translateX(-50%);\n opacity: 0;\n }\n\n &[data-activation-direction~='down'] [data-previous][data-ending-style] {\n transform: translateY(-50%);\n opacity: 0;\n }\n\n &[data-activation-direction~='down'] [data-current][data-starting-style] {\n transform: translateY(50%);\n opacity: 0;\n }\n\n &[data-activation-direction~='up'] [data-previous][data-ending-style] {\n transform: translateY(50%);\n opacity: 0;\n }\n\n &[data-activation-direction~='up'] [data-current][data-starting-style] {\n transform: translateY(-50%);\n opacity: 0;\n }\n `,\n}));\n"],"mappings":";;AAEA,MAAa,SAAS,oBAAoB,EAAE,KAAK,cAAc;CAC7D,OAAO,GAAG;;;;;;;;;;;;;;;;;;cAkBE,OAAO,gBAAgB;;;;gBAIrB,OAAO,qBAAqB;;;;;;;;;;;;;;;;;;;;;;CAuB1C,OAAO,GAAG;;;;;;;wBAOY,OAAO,UAAU;qBACpB,OAAO,eAAe;;iBAE1B,OAAO,WAAW;;aAEtB,OAAO,eAAe;;kBAEjB,OAAO,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BvC,YAAY,GAAG;;;;;;yCAMwB,OAAO,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4D5D,UAAU,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8Ef,EAAE"}
|
|
1
|
+
{"version":3,"file":"style.mjs","names":[],"sources":["../../../src/base-ui/Tooltip/style.ts"],"sourcesContent":["import { createStaticStyles } from 'antd-style';\n\nexport const styles = createStaticStyles(({ css, cssVar }) => ({\n arrow: css`\n --lobe-tooltip-arrow-offset-block: 4px;\n --lobe-tooltip-arrow-offset-inline: 6px;\n\n pointer-events: none;\n\n position: absolute;\n transform-origin: center;\n\n display: flex;\n\n width: 8px;\n height: 4px;\n\n & > svg {\n display: block;\n width: 100%;\n height: 100%;\n fill: ${cssVar.colorBgElevated};\n }\n\n & [data-role='stroke'] {\n stroke: ${cssVar.colorBorderSecondary};\n }\n\n &[data-side='top'] {\n inset-block-end: calc(var(--lobe-tooltip-arrow-offset-block) * -1);\n transform: rotate(180deg);\n }\n\n &[data-side='left'] {\n inset-inline-end: calc(var(--lobe-tooltip-arrow-offset-inline) * -1);\n transform: rotate(90deg);\n }\n\n &[data-side='right'] {\n inset-inline-start: calc(var(--lobe-tooltip-arrow-offset-inline) * -1);\n transform: rotate(-90deg);\n }\n\n &[data-side='bottom'] {\n inset-block-start: calc(var(--lobe-tooltip-arrow-offset-block) * -1);\n }\n `,\n\n popup: css`\n\n /* Keep the popup on its own compositor layer for its whole lifetime: when the opacity\n transition ends the browser otherwise drops the layer and re-rasterizes with pixel\n snapping — a visible one-frame shift when the measured width is fractional\n (single-line tooltips). */\n will-change: transform, opacity;\n user-select: none;\n\n position: relative;\n transform-origin: var(--transform-origin);\n\n max-width: min(320px, var(--available-width));\n border: 1px solid ${cssVar.colorFill};\n border-radius: ${cssVar.borderRadiusSM};\n\n font-size: ${cssVar.fontSizeSM};\n line-height: 1.2;\n color: ${cssVar.colorTextLabel};\n\n background: ${cssVar.colorBgElevated};\n box-shadow:\n 0 1px 2px 0 rgb(0 0 0 / 3%),\n 0 1px 6px -1px rgb(0 0 0 / 2%),\n 0 2px 4px 0 rgb(0 0 0 / 2%);\n\n /* Opacity gets its own monotonic curve: running it on the overshooting spring makes the\n fade look finished at ~0.96, pause, then visibly step to 1 at the clamp point — reads\n as a dropped frame. The spring stays on transform only. */\n transition-timing-function:\n var(--lobe-tooltip-fade-ease), var(--lobe-tooltip-animation-ease-out);\n transition-duration: var(--lobe-tooltip-fade-duration), var(--lobe-tooltip-animation-duration);\n transition-property: opacity, transform;\n\n &[data-layout-animation] {\n transition-timing-function:\n var(--lobe-tooltip-fade-ease), var(--lobe-tooltip-animation-ease-out),\n var(--lobe-tooltip-layout-ease), var(--lobe-tooltip-layout-ease);\n transition-duration:\n var(--lobe-tooltip-fade-duration), var(--lobe-tooltip-animation-duration),\n var(--lobe-tooltip-layout-duration), var(--lobe-tooltip-layout-duration);\n transition-property: opacity, transform, width, height;\n }\n\n &[data-starting-style],\n &[data-ending-style] {\n transform: translate3d(var(--lobe-tooltip-translate-x), var(--lobe-tooltip-translate-y), 0)\n scale(var(--lobe-tooltip-animation-scale));\n opacity: 0;\n }\n\n &[data-ending-style] {\n transition-timing-function: var(--lobe-tooltip-animation-ease-in);\n transition-duration: var(--lobe-tooltip-animation-duration-exit);\n }\n\n &[data-instant] {\n transition: none;\n }\n `,\n\n positioner: css`\n /* Springs baked as linear(): stiffness 700 / damping 38 (enter) and 380 / 28 (glide),\n both zeta ~0.72 with ~4% overshoot. Durations are the springs' settle times —\n change them together with the curves, not independently. */\n --lobe-tooltip-animation-duration: 280ms;\n --lobe-tooltip-fade-duration: 160ms;\n --lobe-tooltip-fade-ease: cubic-bezier(0.33, 1, 0.68, 1);\n --lobe-tooltip-animation-duration-exit: 100ms;\n --lobe-tooltip-animation-translate: 3px;\n --lobe-tooltip-animation-scale: 0.97;\n --lobe-tooltip-animation-ease-in: cubic-bezier(0.4, 0, 1, 1);\n --lobe-tooltip-animation-ease-out: linear(\n 0,\n 0.041,\n 0.14,\n 0.268,\n 0.407,\n 0.541,\n 0.662,\n 0.765,\n 0.849,\n 0.915,\n 0.964,\n 0.998,\n 1.02,\n 1.032,\n 1.038,\n 1.039,\n 1.036,\n 1.032,\n 1.027,\n 1.022,\n 1.016,\n 1.012,\n 1.008,\n 1.005,\n 1.003\n );\n --lobe-tooltip-layout-duration: 380ms;\n --lobe-tooltip-layout-ease: linear(\n 0,\n 0.041,\n 0.14,\n 0.268,\n 0.407,\n 0.541,\n 0.661,\n 0.765,\n 0.849,\n 0.915,\n 0.964,\n 0.998,\n 1.02,\n 1.032,\n 1.038,\n 1.039,\n 1.036,\n 1.032,\n 1.027,\n 1.022,\n 1.016,\n 1.012,\n 1.008,\n 1.005,\n 1.003\n );\n --lobe-tooltip-translate-x: 0;\n --lobe-tooltip-translate-y: calc(var(--lobe-tooltip-animation-translate) * -1);\n\n will-change: transform, opacity;\n\n z-index: 114514;\n\n width: min(var(--positioner-width), 320px, var(--available-width));\n height: var(--positioner-height);\n\n transition-timing-function: var(--lobe-tooltip-animation-ease-out);\n transition-duration: var(--lobe-tooltip-animation-duration);\n transition-property: none;\n\n &[data-layout-animation] {\n transition-timing-function: var(--lobe-tooltip-layout-ease);\n transition-duration: var(--lobe-tooltip-layout-duration);\n transition-property:\n inset-block-start, inset-inline-start, inset-inline-end, inset-block-end, transform;\n }\n\n &[data-instant] {\n transition: none;\n }\n\n /* Fallback: never show a tooltip when the anchor is hidden or the positioner falls back to (0,0). */\n &[data-anchor-hidden],\n &[data-zero-origin='true'] {\n pointer-events: none;\n visibility: hidden;\n }\n\n &[data-placement='top'],\n &[data-placement='topLeft'],\n &[data-placement='topRight'] {\n --lobe-tooltip-translate-x: 0;\n --lobe-tooltip-translate-y: var(--lobe-tooltip-animation-translate);\n }\n\n &[data-placement='bottom'],\n &[data-placement='bottomLeft'],\n &[data-placement='bottomRight'] {\n --lobe-tooltip-translate-x: 0;\n --lobe-tooltip-translate-y: calc(var(--lobe-tooltip-animation-translate) * -1);\n }\n\n &[data-placement='left'],\n &[data-placement='leftTop'],\n &[data-placement='leftBottom'] {\n --lobe-tooltip-translate-x: var(--lobe-tooltip-animation-translate);\n --lobe-tooltip-translate-y: 0;\n }\n\n &[data-placement='right'],\n &[data-placement='rightTop'],\n &[data-placement='rightBottom'] {\n --lobe-tooltip-translate-x: calc(var(--lobe-tooltip-animation-translate) * -1);\n --lobe-tooltip-translate-y: 0;\n }\n\n @media (prefers-reduced-motion: reduce) {\n --lobe-tooltip-animation-duration: 0s;\n --lobe-tooltip-fade-duration: 0s;\n --lobe-tooltip-animation-duration-exit: 0s;\n --lobe-tooltip-layout-duration: 0s;\n }\n `,\n\n viewport: css`\n --lobe-tooltip-viewport-inline-padding: 8px;\n --lobe-tooltip-content-shift: 40%;\n\n position: relative;\n\n overflow: clip;\n display: flex;\n gap: 6px;\n align-items: center;\n\n padding-block: 4px;\n padding-inline: var(--lobe-tooltip-viewport-inline-padding);\n\n overflow-wrap: break-word;\n white-space: normal;\n\n [data-previous],\n [data-current] {\n transform: translateX(0);\n\n display: flex;\n gap: 6px;\n align-items: center;\n\n opacity: 1;\n\n transition:\n transform var(--lobe-tooltip-layout-duration) var(--lobe-tooltip-layout-ease),\n opacity calc(var(--lobe-tooltip-layout-duration) / 2) var(--lobe-tooltip-fade-ease);\n }\n\n [data-previous] {\n position: absolute;\n inset-block-start: 4px;\n inset-inline-start: var(--lobe-tooltip-viewport-inline-padding);\n }\n\n &[data-activation-direction~='right'] [data-previous][data-ending-style] {\n transform: translateX(calc(var(--lobe-tooltip-content-shift) * -1));\n opacity: 0;\n }\n\n &[data-activation-direction~='right'] [data-current][data-starting-style] {\n transform: translateX(var(--lobe-tooltip-content-shift));\n opacity: 0;\n }\n\n &[data-activation-direction~='left'] [data-previous][data-ending-style] {\n transform: translateX(var(--lobe-tooltip-content-shift));\n opacity: 0;\n }\n\n &[data-activation-direction~='left'] [data-current][data-starting-style] {\n transform: translateX(calc(var(--lobe-tooltip-content-shift) * -1));\n opacity: 0;\n }\n\n &[data-activation-direction~='down'] [data-previous][data-ending-style] {\n transform: translateY(calc(var(--lobe-tooltip-content-shift) * -1));\n opacity: 0;\n }\n\n &[data-activation-direction~='down'] [data-current][data-starting-style] {\n transform: translateY(var(--lobe-tooltip-content-shift));\n opacity: 0;\n }\n\n &[data-activation-direction~='up'] [data-previous][data-ending-style] {\n transform: translateY(var(--lobe-tooltip-content-shift));\n opacity: 0;\n }\n\n &[data-activation-direction~='up'] [data-current][data-starting-style] {\n transform: translateY(calc(var(--lobe-tooltip-content-shift) * -1));\n opacity: 0;\n }\n `,\n}));\n"],"mappings":";;AAEA,MAAa,SAAS,oBAAoB,EAAE,KAAK,cAAc;CAC7D,OAAO,GAAG;;;;;;;;;;;;;;;;;;cAkBE,OAAO,gBAAgB;;;;gBAIrB,OAAO,qBAAqB;;;;;;;;;;;;;;;;;;;;;;CAuB1C,OAAO,GAAG;;;;;;;;;;;;;wBAaY,OAAO,UAAU;qBACpB,OAAO,eAAe;;iBAE1B,OAAO,WAAW;;aAEtB,OAAO,eAAe;;kBAEjB,OAAO,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyCvC,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsIf,UAAU,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8Ef,EAAE"}
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { isLastFormulaRenderable } from "./latex.mjs";
|
|
3
2
|
import { addToCache, contentCache, preprocessMarkdownContent } from "./utils.mjs";
|
|
4
3
|
import { useMarkdownContext } from "../../Markdown/components/MarkdownProvider.mjs";
|
|
5
|
-
import { useMemo
|
|
4
|
+
import { useMemo } from "react";
|
|
6
5
|
//#region src/hooks/useMarkdown/useMarkdownContent.ts
|
|
7
6
|
const useMarkdownContent = (children) => {
|
|
8
|
-
const {
|
|
9
|
-
const [validContent, setValidContent] = useState("");
|
|
10
|
-
const prevProcessedContent = useRef("");
|
|
7
|
+
const { enableLatex = true, enableCustomFootnotes, citations } = useMarkdownContext();
|
|
11
8
|
const citationsLength = citations?.length || 0;
|
|
12
9
|
const cacheKey = useMemo(() => `${children}|${enableLatex ? 1 : 0}|${enableCustomFootnotes ? 1 : 0}|${citationsLength}`, [
|
|
13
10
|
children,
|
|
@@ -17,18 +14,11 @@ const useMarkdownContent = (children) => {
|
|
|
17
14
|
]);
|
|
18
15
|
return useMemo(() => {
|
|
19
16
|
if (contentCache.has(cacheKey)) return contentCache.get(cacheKey);
|
|
20
|
-
|
|
17
|
+
const processedContent = preprocessMarkdownContent(children, {
|
|
21
18
|
citationsLength,
|
|
22
19
|
enableCustomFootnotes,
|
|
23
20
|
enableLatex
|
|
24
21
|
});
|
|
25
|
-
if (animated && enableLatex) {
|
|
26
|
-
if (!isLastFormulaRenderable(processedContent) && validContent) processedContent = validContent;
|
|
27
|
-
}
|
|
28
|
-
if (processedContent !== prevProcessedContent.current) {
|
|
29
|
-
setValidContent(processedContent);
|
|
30
|
-
prevProcessedContent.current = processedContent;
|
|
31
|
-
}
|
|
32
22
|
addToCache(cacheKey, processedContent);
|
|
33
23
|
return processedContent;
|
|
34
24
|
}, [
|
|
@@ -36,9 +26,7 @@ const useMarkdownContent = (children) => {
|
|
|
36
26
|
children,
|
|
37
27
|
enableLatex,
|
|
38
28
|
enableCustomFootnotes,
|
|
39
|
-
citationsLength
|
|
40
|
-
animated,
|
|
41
|
-
validContent
|
|
29
|
+
citationsLength
|
|
42
30
|
]);
|
|
43
31
|
};
|
|
44
32
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMarkdownContent.mjs","names":[],"sources":["../../../src/hooks/useMarkdown/useMarkdownContent.ts"],"sourcesContent":["'use client';\n\nimport { useMemo
|
|
1
|
+
{"version":3,"file":"useMarkdownContent.mjs","names":[],"sources":["../../../src/hooks/useMarkdown/useMarkdownContent.ts"],"sourcesContent":["'use client';\n\nimport { useMemo } from 'react';\n\nimport { useMarkdownContext } from '@/Markdown/components/MarkdownProvider';\n\nimport { addToCache, contentCache, preprocessMarkdownContent } from './utils';\n\nexport const useMarkdownContent = (children: string): string | undefined => {\n const { enableLatex = true, enableCustomFootnotes, citations } = useMarkdownContext();\n\n const citationsLength = citations?.length || 0;\n\n const cacheKey = useMemo(\n () => `${children}|${enableLatex ? 1 : 0}|${enableCustomFootnotes ? 1 : 0}|${citationsLength}`,\n [children, enableLatex, enableCustomFootnotes, citationsLength],\n );\n\n return useMemo(() => {\n if (contentCache.has(cacheKey)) {\n return contentCache.get(cacheKey);\n }\n\n const processedContent = preprocessMarkdownContent(children, {\n citationsLength,\n enableCustomFootnotes,\n enableLatex,\n });\n\n addToCache(cacheKey, processedContent);\n return processedContent;\n }, [cacheKey, children, enableLatex, enableCustomFootnotes, citationsLength]);\n};\n"],"mappings":";;;;;AAQA,MAAa,sBAAsB,aAAyC;CAC1E,MAAM,EAAE,cAAc,MAAM,uBAAuB,cAAc,mBAAmB;CAEpF,MAAM,kBAAkB,WAAW,UAAU;CAE7C,MAAM,WAAW,cACT,GAAG,SAAS,GAAG,cAAc,IAAI,EAAE,GAAG,wBAAwB,IAAI,EAAE,GAAG,mBAC7E;EAAC;EAAU;EAAa;EAAuB;CAAe,CAChE;CAEA,OAAO,cAAc;EACnB,IAAI,aAAa,IAAI,QAAQ,GAC3B,OAAO,aAAa,IAAI,QAAQ;EAGlC,MAAM,mBAAmB,0BAA0B,UAAU;GAC3D;GACA;GACA;EACF,CAAC;EAED,WAAW,UAAU,gBAAgB;EACrC,OAAO;CACT,GAAG;EAAC;EAAU;EAAU;EAAa;EAAuB;CAAe,CAAC;AAC9E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.mjs","names":[],"sources":["../../../src/hooks/useMarkdown/utils.ts"],"sourcesContent":["import { preprocessLaTeX } from '
|
|
1
|
+
{"version":3,"file":"utils.mjs","names":[],"sources":["../../../src/hooks/useMarkdown/utils.ts"],"sourcesContent":["import { preprocessLaTeX } from '@lobehub/streamdown';\n\n// Cache configuration\nconst CACHE_SIZE = 50;\n\n/**\n * Cache for storing processed content to avoid redundant processing\n */\nexport const contentCache = new Map<string, string>();\n\n/**\n * Adds content to the cache with size limitation\n * Removes oldest entry if cache size limit is reached\n *\n * @param key The cache key\n * @param value The processed content to store\n */\nexport const addToCache = (key: string, value: string) => {\n if (contentCache.size >= CACHE_SIZE) {\n // Remove the oldest cache entry\n const firstKey = contentCache.keys().next().value;\n if (firstKey) contentCache.delete(firstKey);\n }\n contentCache.set(key, value);\n};\n\n/**\n * Transforms citation references in the format [n] to markdown links\n *\n * @param rawContent The markdown content with citation references\n * @param length The number of citations\n * @returns The content with citations transformed to markdown links\n */\nexport const transformCitations = (rawContent: string, length: number = 0) => {\n if (length === 0) return rawContent;\n\n // 生成引用索引\n const citationIndices = Array.from({ length })\n .fill('')\n .map((_, index) => index + 1);\n\n // 匹配所有潜在的引用\n const pattern = new RegExp(`\\\\[(${citationIndices.join('|')})\\\\]`, 'g');\n const matches: { id: string; index: number; length: number }[] = [];\n\n let match;\n while ((match = pattern.exec(rawContent)) !== null) {\n matches.push({\n id: match[1],\n index: match.index,\n length: match[0].length,\n });\n }\n\n // 识别所有需要排除的区域\n const excludedRanges: { end: number; start: number }[] = [];\n\n // 查找LaTeX块 $$...$$\n const latexBlockRegex = /\\$\\$([\\s\\S]*?)\\$\\$/g;\n while ((match = latexBlockRegex.exec(rawContent)) !== null) {\n excludedRanges.push({\n end: match.index + match[0].length - 1,\n start: match.index,\n });\n }\n\n // 查找行内LaTeX $...$\n const inlineLatexRegex = /\\$([^$]*)\\$/g;\n while ((match = inlineLatexRegex.exec(rawContent)) !== null) {\n excludedRanges.push({\n end: match.index + match[0].length - 1,\n start: match.index,\n });\n }\n\n // 查找代码块 ```...```\n const codeBlockRegex = /```([\\s\\S]*?)```/g;\n while ((match = codeBlockRegex.exec(rawContent)) !== null) {\n excludedRanges.push({\n end: match.index + match[0].length - 1,\n start: match.index,\n });\n }\n\n // 查找行内代码 `...`\n const inlineCodeRegex = /`([^`]*)`/g;\n while ((match = inlineCodeRegex.exec(rawContent)) !== null) {\n excludedRanges.push({\n end: match.index + match[0].length - 1,\n start: match.index,\n });\n }\n\n // 过滤掉在排除区域内的引用\n const validMatches = matches.filter((citation) => {\n return !excludedRanges.some(\n (range) => citation.index >= range.start && citation.index <= range.end,\n );\n });\n\n // 从后向前替换,避免索引变化问题\n let result = rawContent;\n for (let i = validMatches.length - 1; i >= 0; i--) {\n const citation = validMatches[i];\n const before = result.slice(0, Math.max(0, citation.index));\n const after = result.slice(Math.max(0, citation.index + citation.length));\n result = before + `[#citation-${citation.id}](citation-${citation.id})` + after;\n }\n\n // 处理连续引用\n return result.replaceAll('][', '] [');\n};\n\n/**\n * Preprocessing options for markdown content\n */\ninterface PreprocessOptions {\n citationsLength?: number;\n enableCustomFootnotes?: boolean;\n enableLatex?: boolean;\n}\n\nexport const preprocessMarkdownContent = (\n str: string,\n { enableCustomFootnotes, enableLatex, citationsLength }: PreprocessOptions = {},\n) => {\n let content = str;\n\n // Process LaTeX expressions\n if (enableLatex) {\n content = preprocessLaTeX(content);\n }\n\n // Process custom footnotes/citations\n if (enableCustomFootnotes) {\n content = transformCitations(content, citationsLength);\n }\n\n return content;\n};\n"],"mappings":";;AAGA,MAAM,aAAa;;;;AAKnB,MAAa,+BAAe,IAAI,IAAoB;;;;;;;;AASpD,MAAa,cAAc,KAAa,UAAkB;CACxD,IAAI,aAAa,QAAQ,YAAY;EAEnC,MAAM,WAAW,aAAa,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC;EAC5C,IAAI,UAAU,aAAa,OAAO,QAAQ;CAC5C;CACA,aAAa,IAAI,KAAK,KAAK;AAC7B;;;;;;;;AASA,MAAa,sBAAsB,YAAoB,SAAiB,MAAM;CAC5E,IAAI,WAAW,GAAG,OAAO;CAGzB,MAAM,kBAAkB,MAAM,KAAK,EAAE,OAAO,CAAC,CAAC,CAC3C,KAAK,EAAE,CAAC,CACR,KAAK,GAAG,UAAU,QAAQ,CAAC;CAG9B,MAAM,UAAU,IAAI,OAAO,OAAO,gBAAgB,KAAK,GAAG,EAAE,OAAO,GAAG;CACtE,MAAM,UAA2D,CAAC;CAElE,IAAI;CACJ,QAAQ,QAAQ,QAAQ,KAAK,UAAU,OAAO,MAC5C,QAAQ,KAAK;EACX,IAAI,MAAM;EACV,OAAO,MAAM;EACb,QAAQ,MAAM,EAAE,CAAC;CACnB,CAAC;CAIH,MAAM,iBAAmD,CAAC;CAG1D,MAAM,kBAAkB;CACxB,QAAQ,QAAQ,gBAAgB,KAAK,UAAU,OAAO,MACpD,eAAe,KAAK;EAClB,KAAK,MAAM,QAAQ,MAAM,EAAE,CAAC,SAAS;EACrC,OAAO,MAAM;CACf,CAAC;CAIH,MAAM,mBAAmB;CACzB,QAAQ,QAAQ,iBAAiB,KAAK,UAAU,OAAO,MACrD,eAAe,KAAK;EAClB,KAAK,MAAM,QAAQ,MAAM,EAAE,CAAC,SAAS;EACrC,OAAO,MAAM;CACf,CAAC;CAIH,MAAM,iBAAiB;CACvB,QAAQ,QAAQ,eAAe,KAAK,UAAU,OAAO,MACnD,eAAe,KAAK;EAClB,KAAK,MAAM,QAAQ,MAAM,EAAE,CAAC,SAAS;EACrC,OAAO,MAAM;CACf,CAAC;CAIH,MAAM,kBAAkB;CACxB,QAAQ,QAAQ,gBAAgB,KAAK,UAAU,OAAO,MACpD,eAAe,KAAK;EAClB,KAAK,MAAM,QAAQ,MAAM,EAAE,CAAC,SAAS;EACrC,OAAO,MAAM;CACf,CAAC;CAIH,MAAM,eAAe,QAAQ,QAAQ,aAAa;EAChD,OAAO,CAAC,eAAe,MACpB,UAAU,SAAS,SAAS,MAAM,SAAS,SAAS,SAAS,MAAM,GACtE;CACF,CAAC;CAGD,IAAI,SAAS;CACb,KAAK,IAAI,IAAI,aAAa,SAAS,GAAG,KAAK,GAAG,KAAK;EACjD,MAAM,WAAW,aAAa;EAC9B,MAAM,SAAS,OAAO,MAAM,GAAG,KAAK,IAAI,GAAG,SAAS,KAAK,CAAC;EAC1D,MAAM,QAAQ,OAAO,MAAM,KAAK,IAAI,GAAG,SAAS,QAAQ,SAAS,MAAM,CAAC;EACxE,SAAS,SAAS,cAAc,SAAS,GAAG,aAAa,SAAS,GAAG,KAAK;CAC5E;CAGA,OAAO,OAAO,WAAW,MAAM,KAAK;AACtC;AAWA,MAAa,6BACX,KACA,EAAE,uBAAuB,aAAa,oBAAuC,CAAC,MAC3E;CACH,IAAI,UAAU;CAGd,IAAI,aACF,UAAU,gBAAgB,OAAO;CAInC,IAAI,uBACF,UAAU,mBAAmB,SAAS,eAAe;CAGvD,OAAO;AACT"}
|
package/es/index.d.mts
CHANGED
|
@@ -225,7 +225,6 @@ import "./Markdown/index.mjs";
|
|
|
225
225
|
import SearchResultCards, { SearchResultCardsProps } from "./Markdown/components/SearchResultCards/index.mjs";
|
|
226
226
|
import { rehypeCustomFootnotes } from "./Markdown/plugins/rehypeCustomFootnotes.mjs";
|
|
227
227
|
import { rehypeKatexDir } from "./Markdown/plugins/rehypeKatexDir.mjs";
|
|
228
|
-
import { rehypeStreamAnimated } from "./Markdown/plugins/rehypeStreamAnimated.mjs";
|
|
229
228
|
import { remarkBr } from "./Markdown/plugins/remarkBr.mjs";
|
|
230
229
|
import { remarkColor } from "./Markdown/plugins/remarkColor.mjs";
|
|
231
230
|
import { remarkCustomFootnotes } from "./Markdown/plugins/remarkCustomFootnotes.mjs";
|
|
@@ -309,5 +308,6 @@ import { LayoutSidebar } from "./Layout/components/LayoutSidebar.mjs";
|
|
|
309
308
|
import { LayoutSidebarInner } from "./Layout/components/LayoutSidebarInner.mjs";
|
|
310
309
|
import { LayoutToc } from "./Layout/components/LayoutToc.mjs";
|
|
311
310
|
import Layout from "./Layout/index.mjs";
|
|
311
|
+
import { rehypeStreamAnimated } from "@lobehub/streamdown";
|
|
312
312
|
import { ErrorBoundary, ErrorBoundaryProps } from "react-error-boundary";
|
|
313
313
|
export { A, type AProps, Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, ActionIcon, ActionIconGroup, type ActionIconGroupEvent, type MenuItemType as ActionIconGroupItemType, type ActionIconGroupProps, type ActionIconProps, type ActionIconSize, Alert, type AlertProps, AutoComplete, type AutoCompleteProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, type BaseMenuItemType, Block, type BlockProps, Burger, type BurgerProps, Button, type ButtonProps, type CDN, CLASSNAMES, Center, type CenterProps, Checkbox, CheckboxGroup, type CheckboxGroupOption, type CheckboxGroupProps, type CheckboxProps, CodeDiff, type CodeDiffProps, CodeEditor, type CodeEditorProps, Collapse, type CollapseItemType, type CollapseProps, type ColorPalettes, type ColorPalettesAlpha, ColorSwatches, type ColorSwatchesProps, type ColorToken, type Config, ConfigProvider, type ContextMenuCheckboxItem, ContextMenuHost, type ContextMenuInterceptor, type ContextMenuItem, ContextMenuTrigger, CopyButton, type CopyButtonProps, DatePicker, type DatePickerProps, type DiffViewMode, type DivProps, DownloadButton, type DownloadButtonProps, DraggablePanel, DraggablePanelBody, type DraggablePanelBodyProps, DraggablePanelContainer, type DraggablePanelContainerProps, DraggablePanelFooter, type DraggablePanelFooterProps, DraggablePanelHeader, type DraggablePanelHeaderProps, type DraggablePanelProps, DraggableSideNav, type DraggableSideNavProps, Drawer, type DrawerProps, Dropdown, type DropdownItem, DropdownMenu, type DropdownMenuCheckboxItem, DropdownMenuCheckboxItemIndicator, DropdownMenuCheckboxItemPrimitive, DropdownMenuFooter, type DropdownMenuFooterProps, DropdownMenuGroup, DropdownMenuGroupLabel, type DropdownMenuGroupLabelProps, DropdownMenuHeader, type DropdownMenuHeaderProps, DropdownMenuItem, DropdownMenuItemContent, type DropdownMenuItemContentProps, DropdownMenuItemExtra, type DropdownMenuItemExtraProps, DropdownMenuItemIcon, type DropdownMenuItemIconProps, DropdownMenuItemLabel, type DropdownMenuItemLabelProps, type DropdownMenuItemProps, type MenuItemType as DropdownMenuItemType, 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, DropdownMenuTrigger, type DropdownMenuTriggerProps, type DropdownProps, EditableText, type EditableTextProps, EditorSlashMenu, type EditorSlashMenuGroup, type EditorSlashMenuItems, type EditorSlashMenuOption, EmojiPicker, type EmojiPickerProps, Empty, type EmptyProps, ErrorBoundary, type ErrorBoundaryProps, FileTypeIcon, type FileTypeIconProps, _default as FlexBasic, type FlexBasicProps, _default as Flexbox, type FlexboxProps, FluentEmoji, type FluentEmojiProps, FontLoader, type FontLoaderProps, Footer, type FooterProps, Form, FormGroup, type FormGroupItemType, type FormGroupProps, type FormInstance, FormItem, type FormItemProps, FormModal, type FormModalProps, type FormProps, FormSubmitFooter, type FormSubmitFooterProps, FormTitle, type FormTitleProps, Freeze, type FreezeProps, type GenericItemType, 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 IconProps, IconProvider, type IconSize, Image, type ImagePreviewOptions, type ImageProps, ImageSelect, type ImageSelectItem, type ImageSelectProps, type ImgProps, type ImperativeModalProps, Input, InputNumber, type InputNumberProps, InputOPT, type InputOPTProps, InputPassword, type InputPasswordProps, type InputProps, type ItemType, 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, List, ListItem, type ListItemProps, type ListProps, type LobeCustomStylish, type LobeCustomToken, I18nProvider as LobeUIProvider, Markdown, type MarkdownProps, MaskShadow, type MaskShadowProps, MaterialFileTypeIcon, type MaterialFileTypeIconProps, Menu, type MenuCheckboxItemType, type MenuInfo, type MenuItemType, type MenuProps, Mermaid, type MermaidProps, Meta, type MetaProps, Modal, ModalHost, type ModalHostProps, type ModalInstance, type ModalProps, ModalProvider, MotionComponent, type MotionComponentType, MotionProvider, NeuralNetworkLoading, type NeuralNetworkLoadingProps, NeutralColors, NeutralColorsObj, PatchDiff, type PatchDiffProps, type Placement, type PlacementConfig, Popover, PopoverArrow, type PopoverArrowAtomProps, PopoverArrowIcon, PopoverBackdrop, type PopoverContextValue, PopoverGroup, type PopoverGroupHandle, type PopoverGroupItem, type PopoverPlacement, PopoverPopup, type PopoverPopupAtomProps, PopoverPortal, type PopoverPortalAtomProps, PopoverPositioner, type PopoverPositionerAtomProps, type PopoverProps, PopoverProvider, PopoverRoot, type PopoverTrigger, PopoverTriggerElement, type PopoverTriggerElementProps, PopoverViewport, type PopoverViewportAtomProps, type PresetColorKey, type PresetColorType, type PresetSystemColorKey, type PresetSystemColorType, PreviewGroup, type PreviewGroupProps, PrimaryColors, PrimaryColorsObj, type RawModalComponent, type RawModalComponentProps, type RawModalInstance, type RawModalKeyOptions, type RawModalOptions, 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 SegmentedProps, Select, type SelectProps, _default$1 as ShikiLobeTheme, SideNav, type SideNavProps, Skeleton, SkeletonAvatar, type SkeletonAvatarProps, SkeletonBlock, type SkeletonBlockProps, SkeletonButton, type SkeletonButtonProps, SkeletonParagraph, type SkeletonParagraphProps, type SkeletonProps, SkeletonTags, type SkeletonTagsProps, SkeletonTitle, type SkeletonTitleProps, SliderWithInput, type SliderWithInputProps, Snippet, type SnippetProps, SortableList, type SortableListProps, type SpanProps, type SvgProps, SyntaxHighlighter, type SyntaxHighlighterProps, SyntaxMermaid, type SyntaxMermaidProps, type SystemColorToken, Tabs, type TabsProps, Tag, type TagProps, Text, TextArea, type TextAreaProps, type TextProps, ThemeProvider, type ThemeProviderProps, ThemeSwitch, type ThemeSwitchProps, type ToastAPI, ToastHost, type ToastHostProps, type ToastInstance, type ToastOptions, type ToastPosition, type ToastPromiseOptions, type ToastProps, type ToastType, Toc, type TocProps, Tooltip, TooltipGroup, type TooltipProps, type Trigger, Typography, type TypographyProps, Video, type VideoProps, closeContextMenu, combineKeys, copyToClipboard, createModal, createRawModal, findCustomThemeName, genCdnUrl, generateColorNeutralPalette, generateColorPalette, highlighterThemes, containsScript as htmlPreviewContainsScript, isFullHtmlDocument, isHtmlContentClosed, generateCustomStylish as lobeCustomStylish, generateCustomToken as lobeCustomToken, staticStylish as lobeStaticStylish, styles as menuSharedStyles, mermaidThemes, neutralColors, neutralColorsSwatches, placementMap, preprocessMarkdownContent, preventDefault, preventDefaultAndStopPropagation, primaryColors, primaryColorsSwatches, rehypeCustomFootnotes, rehypeKatexDir, rehypeStreamAnimated, remarkBr, remarkColor, remarkCustomFootnotes, remarkGfmPlus, remarkVideo, renderDropdownMenuItems, setContextMenuInterceptor, showContextMenu, stopPropagation, toFloatingUIPlacement, toast, updateContextMenuItems, useAppElement, useCdnFn, useModalContext, useMotionComponent, usePopoverContext, usePopoverGroupHandle, usePopoverPortalContainer, useToast, useTranslation };
|
package/es/index.mjs
CHANGED
|
@@ -146,7 +146,6 @@ import { remarkBr } from "./Markdown/plugins/remarkBr.mjs";
|
|
|
146
146
|
import { remarkCustomFootnotes } from "./Markdown/plugins/remarkCustomFootnotes.mjs";
|
|
147
147
|
import { remarkGfmPlus } from "./Markdown/plugins/remarkGfmPlus.mjs";
|
|
148
148
|
import { remarkVideo } from "./Markdown/plugins/remarkVideo.mjs";
|
|
149
|
-
import { rehypeStreamAnimated } from "./Markdown/plugins/rehypeStreamAnimated.mjs";
|
|
150
149
|
import Typography from "./Markdown/Typography.mjs";
|
|
151
150
|
import Markdown from "./Markdown/Markdown.mjs";
|
|
152
151
|
import { remarkColor } from "./Markdown/plugins/remarkColor.mjs";
|
|
@@ -160,5 +159,6 @@ import SliderWithInput from "./SliderWithInput/SliderWithInput.mjs";
|
|
|
160
159
|
import SortableList from "./SortableList/SortableList.mjs";
|
|
161
160
|
import ThemeSwitch from "./ThemeSwitch/ThemeSwitch.mjs";
|
|
162
161
|
import Toc from "./Toc/Toc.mjs";
|
|
162
|
+
import { rehypeStreamAnimated } from "@lobehub/streamdown";
|
|
163
163
|
import { ErrorBoundary } from "react-error-boundary";
|
|
164
164
|
export { A, Accordion, AccordionItem, ActionIcon, ActionIconGroup, Alert, AutoComplete, Avatar, AvatarGroup, Block, Burger, Button, CLASSNAMES, Center, Checkbox, CheckboxGroup, CodeDiff, CodeEditor, Collapse, ColorSwatches, ConfigProvider, ContextMenuHost, ContextMenuTrigger, CopyButton, DatePicker, DownloadButton, DraggablePanel, DraggablePanelBody, DraggablePanelContainer, DraggablePanelFooter, DraggablePanelHeader, DraggableSideNav, Drawer, Dropdown, DropdownMenu, DropdownMenuCheckboxItemIndicator, DropdownMenuCheckboxItemPrimitive, DropdownMenuFooter, DropdownMenuGroup, DropdownMenuGroupLabel, DropdownMenuHeader, DropdownMenuItem, DropdownMenuItemContent, DropdownMenuItemExtra, DropdownMenuItemIcon, DropdownMenuItemLabel, DropdownMenuPopup, DropdownMenuPortal, DropdownMenuPositioner, DropdownMenuRoot, DropdownMenuScrollViewport, DropdownMenuSeparator, DropdownMenuSubmenuArrow, DropdownMenuSubmenuRoot, DropdownMenuSubmenuTrigger, DropdownMenuTrigger, EditableText, EditorSlashMenu, EmojiPicker, Empty, ErrorBoundary, FileTypeIcon, FlexBasic_default as FlexBasic, FlexBasic_default as Flexbox, FluentEmoji, FontLoader, Footer, Form, FormGroup, FormItem, FormModal, 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, InputNumber, InputOPT, InputPassword, KeyMapEnum, LOBE_THEME_APP_ID, Layout, LayoutFooter, LayoutHeader, LayoutMain, LayoutSidebar, LayoutSidebarInner, LayoutToc, List, ListItem, I18nProvider as LobeUIProvider, Markdown, MaskShadow, MaterialFileTypeIcon, Menu, Mermaid, Meta, Modal, ModalHost, ModalProvider, MotionComponent, MotionProvider, NeuralNetworkLoading, PatchDiff, Popover, PopoverArrow, PopoverArrowIcon, PopoverBackdrop, PopoverGroup, PopoverPopup, PopoverPortal, PopoverPositioner, PopoverProvider, PopoverRoot, PopoverTriggerElement, PopoverViewport, PreviewGroup, ScrollArea, ScrollAreaContent, ScrollAreaCorner, ScrollAreaRoot, ScrollAreaScrollbar, ScrollAreaThumb, ScrollAreaViewport, ScrollShadow, SearchBar, SearchResultCards, Segmented, Select, lobe_theme_default as ShikiLobeTheme, SideNav, Skeleton, SkeletonAvatar, SkeletonBlock, SkeletonButton, SkeletonParagraph, SkeletonTags, SkeletonTitle, SliderWithInput, Snippet, SortableList, SyntaxHighlighter, SyntaxMermaid, Tabs, Tag, Text, TextArea, ThemeProvider, ThemeSwitch, ToastHost, Toc, Tooltip, TooltipGroup, Typography, Video, closeContextMenu, combineKeys, copyToClipboard, createModal, createRawModal, findCustomThemeName, genCdnUrl, generateColorNeutralPalette, generateColorPalette, highlighterThemes, containsScript as htmlPreviewContainsScript, isFullHtmlDocument, isHtmlContentClosed, generateCustomStylish as lobeCustomStylish, generateCustomToken as lobeCustomToken, staticStylish as lobeStaticStylish, styles as menuSharedStyles, mermaidThemes, neutralColors, neutralColorsSwatches, placementMap, preprocessMarkdownContent, preventDefault, preventDefaultAndStopPropagation, primaryColors, primaryColorsSwatches, rehypeCustomFootnotes, rehypeKatexDir, rehypeStreamAnimated, remarkBr, remarkColor, remarkCustomFootnotes, remarkGfmPlus, remarkVideo, renderDropdownMenuItems, setContextMenuInterceptor, showContextMenu, stopPropagation, toFloatingUIPlacement, toast, updateContextMenuItems, useAppElement, useCdnFn, useModalContext, useMotionComponent, usePopoverContext, usePopoverGroupHandle, usePopoverPortalContainer, useToast, useTranslation };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/ui",
|
|
3
|
-
"version": "5.32.
|
|
3
|
+
"version": "5.32.6",
|
|
4
4
|
"description": "Lobe UI is an open-source UI component library for building AIGC web apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"lobehub",
|
|
@@ -136,24 +136,6 @@
|
|
|
136
136
|
"test:update": "vitest -u",
|
|
137
137
|
"type-check": "lobedocs typegen && tsc --noEmit && tsc --noEmit -p tsconfig.site.json"
|
|
138
138
|
},
|
|
139
|
-
"lint-staged": {
|
|
140
|
-
"*.{md,mdx}": [
|
|
141
|
-
"prettier --write --no-error-on-unmatched-pattern"
|
|
142
|
-
],
|
|
143
|
-
"*.json": [
|
|
144
|
-
"prettier --write --no-error-on-unmatched-pattern"
|
|
145
|
-
],
|
|
146
|
-
"*.{js,jsx}": [
|
|
147
|
-
"prettier --write",
|
|
148
|
-
"stylelint --fix",
|
|
149
|
-
"eslint --fix"
|
|
150
|
-
],
|
|
151
|
-
"*.{ts,tsx}": [
|
|
152
|
-
"prettier --parser=typescript --write",
|
|
153
|
-
"stylelint --fix",
|
|
154
|
-
"eslint --fix"
|
|
155
|
-
]
|
|
156
|
-
},
|
|
157
139
|
"dependencies": {
|
|
158
140
|
"@ant-design/cssinjs": "^2.1.2",
|
|
159
141
|
"@base-ui/react": "1.6.0",
|
|
@@ -166,6 +148,7 @@
|
|
|
166
148
|
"@emotion/is-prop-valid": "^1.4.0",
|
|
167
149
|
"@floating-ui/react": "^0.27.19",
|
|
168
150
|
"@giscus/react": "^3.1.0",
|
|
151
|
+
"@lobehub/streamdown": "^1.0.0",
|
|
169
152
|
"@mdx-js/mdx": "^3.1.1",
|
|
170
153
|
"@mdx-js/react": "^3.1.1",
|
|
171
154
|
"@pierre/diffs": "1.2.12",
|
|
@@ -229,75 +212,6 @@
|
|
|
229
212
|
"vfile": "^6.0.3",
|
|
230
213
|
"virtua": "^0.49.3"
|
|
231
214
|
},
|
|
232
|
-
"devDependencies": {
|
|
233
|
-
"@ant-design/icons": "^6.3.2",
|
|
234
|
-
"@commitlint/cli": "^21.2.1",
|
|
235
|
-
"@lobehub/docs-kit": "workspace:*",
|
|
236
|
-
"@lobehub/eslint-config": "2.1.5",
|
|
237
|
-
"@lobehub/fluent-emoji": "^4.1.0",
|
|
238
|
-
"@lobehub/icons": "^5.10.1",
|
|
239
|
-
"@lobehub/lint": "^2.1.5",
|
|
240
|
-
"@mdx-js/rollup": "3.1.1",
|
|
241
|
-
"@playwright/test": "1.61.1",
|
|
242
|
-
"@react-router/dev": "8.2.0",
|
|
243
|
-
"@testing-library/react": "^16.3.2",
|
|
244
|
-
"@types/chroma-js": "^3.1.2",
|
|
245
|
-
"@types/hast": "^3.0.5",
|
|
246
|
-
"@types/mdx": "^2.0.14",
|
|
247
|
-
"@types/node": "26.1.1",
|
|
248
|
-
"@types/numeral": "^2.0.5",
|
|
249
|
-
"@types/pangu": "^4.0.2",
|
|
250
|
-
"@types/react": "^19.2.17",
|
|
251
|
-
"@types/react-dom": "^19.2.3",
|
|
252
|
-
"@types/unist": "^3.0.3",
|
|
253
|
-
"@typescript-eslint/eslint-plugin": "^8.63.0",
|
|
254
|
-
"@typescript-eslint/parser": "^8.63.0",
|
|
255
|
-
"@vitest/coverage-v8": "^4.1.10",
|
|
256
|
-
"antd": "^6.5.0",
|
|
257
|
-
"cheerio": "^1.2.0",
|
|
258
|
-
"clean-package": "^2.2.0",
|
|
259
|
-
"code-inspector-plugin": "^1.6.6",
|
|
260
|
-
"commitlint": "^21.2.1",
|
|
261
|
-
"concurrently": "^10.0.3",
|
|
262
|
-
"conventional-changelog-gitmoji-config": "1.5.2",
|
|
263
|
-
"cross-env": "^10.1.0",
|
|
264
|
-
"dotenv": "^17.4.2",
|
|
265
|
-
"dpdm": "^4.2.0",
|
|
266
|
-
"eslint": "^9.39.5",
|
|
267
|
-
"eslint-plugin-sort-keys-fix": "^1.1.2",
|
|
268
|
-
"figma-js": "1.16.1-0",
|
|
269
|
-
"husky": "^9.1.7",
|
|
270
|
-
"jsdom": "^29.1.1",
|
|
271
|
-
"lint-staged": "^17.0.8",
|
|
272
|
-
"mdast-util-to-markdown": "^2.1.2",
|
|
273
|
-
"next-themes": "^0.4.6",
|
|
274
|
-
"pagefind": "1.5.2",
|
|
275
|
-
"prettier": "^3.9.5",
|
|
276
|
-
"prettier-plugin-packagejson": "^3.0.2",
|
|
277
|
-
"prettier-plugin-sh": "^0.19.0",
|
|
278
|
-
"prettier-plugin-sort-json": "^4.2.0",
|
|
279
|
-
"react": "^19.2.7",
|
|
280
|
-
"react-dom": "^19.2.7",
|
|
281
|
-
"react-live": "4.1.8",
|
|
282
|
-
"react-router": "8.2.0",
|
|
283
|
-
"remark": "^15.0.1",
|
|
284
|
-
"remark-cli": "^12.0.1",
|
|
285
|
-
"remark-frontmatter": "^5.0.0",
|
|
286
|
-
"remark-mdx-frontmatter": "^5.2.0",
|
|
287
|
-
"rollup-plugin-visualizer": "7.0.1",
|
|
288
|
-
"semantic-release": "^25.0.6",
|
|
289
|
-
"stylelint": "^16.26.1",
|
|
290
|
-
"svgo": "^4.0.1",
|
|
291
|
-
"tsdown": "^0.22.4",
|
|
292
|
-
"tsx": "^4.23.0",
|
|
293
|
-
"typescript": "^6.0.3",
|
|
294
|
-
"unist-util-is": "^6.0.1",
|
|
295
|
-
"unist-util-visit": "^5.1.0",
|
|
296
|
-
"vite": "8.1.4",
|
|
297
|
-
"vitest": "^4.1.10",
|
|
298
|
-
"yaml": "^2.9.0",
|
|
299
|
-
"zod": "^4.4.3"
|
|
300
|
-
},
|
|
301
215
|
"peerDependencies": {
|
|
302
216
|
"@lobehub/fluent-emoji": "^4.0.0",
|
|
303
217
|
"@lobehub/icons": "^5.0.0",
|