@lobehub/ui 5.42.8 → 5.43.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,6 +6,7 @@ import { ElementType, ReactNode } from "react";
6
6
  interface Config {
7
7
  aAs?: ElementType;
8
8
  customCdnFn?: CdnFn;
9
+ globalFocusRing?: boolean;
9
10
  imgAs?: ElementType;
10
11
  imgUnoptimized?: boolean;
11
12
  proxy?: CDN | 'custom';
@@ -1,4 +1,5 @@
1
1
  "use client";
2
+ import { installGlobalFocusRing } from "../GlobalFocusRing/index.mjs";
2
3
  import { MotionComponent } from "../MotionProvider/index.mjs";
3
4
  import { genCdnUrl } from "../utils/genCdnUrl.mjs";
4
5
  import { createContext, memo, use, useEffect, useMemo, useRef, useState } from "react";
@@ -11,6 +12,10 @@ const I18nContextInternal = createContext({
11
12
  });
12
13
  const isThenable = (value) => typeof value?.then === "function";
13
14
  const ConfigProvider = memo(({ children, config, locale, resources, motion }) => {
15
+ useEffect(() => {
16
+ if (config?.globalFocusRing === false) return;
17
+ return installGlobalFocusRing();
18
+ }, [config?.globalFocusRing]);
14
19
  const fallbackLocale = locale ?? "en";
15
20
  const [resolvedResources, setResolvedResources] = useState(() => resources && !isThenable(resources) ? resources : void 0);
16
21
  const [resolvedLocale, setResolvedLocale] = useState(fallbackLocale);
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../../src/ConfigProvider/index.tsx"],"sourcesContent":["'use client';\n\nimport {\n createContext,\n type ElementType,\n memo,\n type ReactNode,\n use,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\n\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\nexport interface Config {\n aAs?: ElementType;\n customCdnFn?: CdnFn;\n imgAs?: ElementType;\n imgUnoptimized?: boolean;\n proxy?: CDN | 'custom';\n}\n\nexport const ConfigContext = createContext<Config | null>(null);\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 // 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 ({ children, config, locale, resources, motion }) => {\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 <MotionComponent value={motion}>{children}</MotionComponent>\n </ConfigContext>\n </I18nContextInternal>\n );\n },\n);\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":";;;;;;AA+BA,MAAa,gBAAgB,cAA6B,IAAI;AAG9D,MAAM,sBAAsB,cAAgC;CAC1D,QAAQ;CACR,IAAI,QAAwB;AAC9B,CAAC;AAWD,MAAM,cAAc,UAClB,OAAQ,OAA8B,SAAS;AAEjD,MAAM,iBAAiB,MACpB,EAAE,UAAU,QAAQ,QAAQ,WAAW,aAAa;CACnD,MAAM,iBAAiB,UAAU;CACjC,MAAM,CAAC,mBAAmB,wBAAwB,eACzC,aAAa,CAAC,WAAW,SAAS,IAAI,YAAY,KAAA,CAC3D;CACA,MAAM,CAAC,gBAAgB,qBAAqB,SAAS,cAAc;CACnE,MAAM,kBAAkB,OAAO,CAAC;CAEhC,gBAAgB;EACd,MAAM,YAAY,EAAE,gBAAgB;EAEpC,IAAI,CAAC,WAAW;GACd,qBAAqB,KAAA,CAAS;GAC9B,kBAAkB,cAAc;GAChC;EACF;EAEA,IAAI,WAAW,SAAS,GAAG;GACzB,MAAM,eAAe;GACrB,UACG,MAAM,kBAAkB;IACvB,IAAI,gBAAgB,YAAY,WAAW;IAC3C,qBAAqB,aAAa;IAClC,kBAAkB,YAAY;GAChC,CAAC,CAAC,CACD,YAAY;IACX,IAAI,gBAAgB,YAAY,WAAW;GAC7C,CAAC;GACH;EACF;EAEA,qBAAqB,SAAS;EAC9B,kBAAkB,cAAc;CAClC,GAAG,CAAC,gBAAgB,SAAS,CAAC;CAE9B,MAAM,mBAAmB,WAAW,SAAS,IAAI,oBAAoB;CACrE,MAAM,gBAAgB,WAAW,SAAS,IAAI,iBAAiB;CAE/D,MAAM,YAAY,cAAgC;EAChD,MAAM,eAAe,MAAM,QAAQ,gBAAgB,IAC/C,mBACA,mBACE,OAAO,OAAO,gBAAgB,IAC9B,CAAC;EACP,MAAM,kBAAkB,OAAO,OAAO,CAAC,GAAG,GAAG,YAAY;EACzD,MAAM,KAAK,QAAgC,gBAAgB,QAAQ;EACnE,OAAO;GAAE,QAAQ;GAAe;EAAE;CACpC,GAAG,CAAC,eAAe,gBAAgB,CAAC;CAEpC,OACE,oBAAC,qBAAD;EAAqB,OAAO;EAC1B,UAAA,oBAAC,eAAD;GAAe,OAAO,UAAU;GAC9B,UAAA,oBAAC,iBAAD;IAAiB,OAAO;IAAS;GAA0B,CAAA;EAC9C,CAAA;CACI,CAAA;AAEzB,CACF;AAKA,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"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../src/ConfigProvider/index.tsx"],"sourcesContent":["'use client';\n\nimport {\n createContext,\n type ElementType,\n memo,\n type ReactNode,\n use,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\n\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\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\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 // 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 ({ children, config, locale, resources, motion }) => {\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 <MotionComponent value={motion}>{children}</MotionComponent>\n </ConfigContext>\n </I18nContextInternal>\n );\n },\n);\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":";;;;;;;AAiCA,MAAa,gBAAgB,cAA6B,IAAI;AAG9D,MAAM,sBAAsB,cAAgC;CAC1D,QAAQ;CACR,IAAI,QAAwB;AAC9B,CAAC;AAWD,MAAM,cAAc,UAClB,OAAQ,OAA8B,SAAS;AAEjD,MAAM,iBAAiB,MACpB,EAAE,UAAU,QAAQ,QAAQ,WAAW,aAAa;CACnD,gBAAgB;EACd,IAAI,QAAQ,oBAAoB,OAAO;EACvC,OAAO,uBAAuB;CAChC,GAAG,CAAC,QAAQ,eAAe,CAAC;CAE5B,MAAM,iBAAiB,UAAU;CACjC,MAAM,CAAC,mBAAmB,wBAAwB,eACzC,aAAa,CAAC,WAAW,SAAS,IAAI,YAAY,KAAA,CAC3D;CACA,MAAM,CAAC,gBAAgB,qBAAqB,SAAS,cAAc;CACnE,MAAM,kBAAkB,OAAO,CAAC;CAEhC,gBAAgB;EACd,MAAM,YAAY,EAAE,gBAAgB;EAEpC,IAAI,CAAC,WAAW;GACd,qBAAqB,KAAA,CAAS;GAC9B,kBAAkB,cAAc;GAChC;EACF;EAEA,IAAI,WAAW,SAAS,GAAG;GACzB,MAAM,eAAe;GACrB,UACG,MAAM,kBAAkB;IACvB,IAAI,gBAAgB,YAAY,WAAW;IAC3C,qBAAqB,aAAa;IAClC,kBAAkB,YAAY;GAChC,CAAC,CAAC,CACD,YAAY;IACX,IAAI,gBAAgB,YAAY,WAAW;GAC7C,CAAC;GACH;EACF;EAEA,qBAAqB,SAAS;EAC9B,kBAAkB,cAAc;CAClC,GAAG,CAAC,gBAAgB,SAAS,CAAC;CAE9B,MAAM,mBAAmB,WAAW,SAAS,IAAI,oBAAoB;CACrE,MAAM,gBAAgB,WAAW,SAAS,IAAI,iBAAiB;CAE/D,MAAM,YAAY,cAAgC;EAChD,MAAM,eAAe,MAAM,QAAQ,gBAAgB,IAC/C,mBACA,mBACE,OAAO,OAAO,gBAAgB,IAC9B,CAAC;EACP,MAAM,kBAAkB,OAAO,OAAO,CAAC,GAAG,GAAG,YAAY;EACzD,MAAM,KAAK,QAAgC,gBAAgB,QAAQ;EACnE,OAAO;GAAE,QAAQ;GAAe;EAAE;CACpC,GAAG,CAAC,eAAe,gBAAgB,CAAC;CAEpC,OACE,oBAAC,qBAAD;EAAqB,OAAO;EAC1B,UAAA,oBAAC,eAAD;GAAe,OAAO,UAAU;GAC9B,UAAA,oBAAC,iBAAD;IAAiB,OAAO;IAAS;GAA0B,CAAA;EAC9C,CAAA;CACI,CAAA;AAEzB,CACF;AAKA,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"}
@@ -0,0 +1,6 @@
1
+ //#region src/GlobalFocusRing/index.d.ts
2
+ /** Install once per document. The returned cleanup is safe for nested providers and Strict Mode. */
3
+ declare const installGlobalFocusRing: (doc?: Document) => (() => void);
4
+ //#endregion
5
+ export { installGlobalFocusRing };
6
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ export * from './index.d.mts';
@@ -0,0 +1 @@
1
+ export * from './index.mjs';
@@ -0,0 +1,136 @@
1
+ import { globalFocusRingCSS } from "./style.mjs";
2
+ //#region src/GlobalFocusRing/index.ts
3
+ const installations = /* @__PURE__ */ new WeakMap();
4
+ /** Install once per document. The returned cleanup is safe for nested providers and Strict Mode. */
5
+ const installGlobalFocusRing = (doc = document) => {
6
+ const existing = installations.get(doc);
7
+ if (existing) {
8
+ existing.users += 1;
9
+ let released = false;
10
+ return () => {
11
+ if (released) return;
12
+ released = true;
13
+ if (--existing.users === 0) existing.dispose();
14
+ };
15
+ }
16
+ const win = doc.defaultView;
17
+ if (!win || !doc.body || !win.CSS?.supports("top", "anchor(top)") || !win.CSS.supports("position-visibility", "anchors-visible") || !("showPopover" in doc.createElement("div"))) return () => {};
18
+ const sheet = doc.createElement("style");
19
+ sheet.textContent = globalFocusRingCSS;
20
+ const ring = doc.createElement("div");
21
+ ring.setAttribute("data-lobe-global-focus-ring", "");
22
+ ring.setAttribute("aria-hidden", "true");
23
+ ring.setAttribute("popover", "manual");
24
+ doc.head.append(sheet);
25
+ doc.body.append(ring);
26
+ let target;
27
+ let restoreTarget;
28
+ let frame = 0;
29
+ let disposed = false;
30
+ const clear = () => {
31
+ if (ring.matches(":popover-open")) ring.hidePopover();
32
+ restoreTarget?.();
33
+ restoreTarget = void 0;
34
+ target = void 0;
35
+ };
36
+ const sync = () => {
37
+ if (disposed) return;
38
+ const next = doc.activeElement;
39
+ if (next === target && next?.matches(":focus-visible") && next.isConnected) return;
40
+ clear();
41
+ if (!next || next === doc.body || next.namespaceURI !== "http://www.w3.org/1999/xhtml" || next.shadowRoot || !next.matches(":focus-visible") || next.getClientRects().length !== 1) return;
42
+ const element = next;
43
+ const computed = win.getComputedStyle(element);
44
+ const rect = element.getBoundingClientRect();
45
+ if (!rect.width || !rect.height || computed.visibility !== "visible") return;
46
+ const saved = ["anchor-name", "outline"].map((property) => ({
47
+ priority: element.style.getPropertyPriority(property),
48
+ property,
49
+ value: element.style.getPropertyValue(property)
50
+ }));
51
+ const oldMarker = element.getAttribute("data-lobe-focus-ring");
52
+ const anchor = computed.getPropertyValue("anchor-name").trim();
53
+ const assignedAnchor = anchor && anchor !== "none" ? `${anchor}, --lobe-global-focus` : "--lobe-global-focus";
54
+ element.style.setProperty("anchor-name", assignedAnchor, "important");
55
+ ring.style.borderRadius = computed.borderRadius;
56
+ ring.style.setProperty("--lobe-focus-ring-color", computed.getPropertyValue("--lobe-focus-ring-color").trim() || computed.getPropertyValue("--ant-color-info").trim() || "#1677ff");
57
+ restoreTarget = () => {
58
+ for (const { property, value, priority } of saved) {
59
+ const assigned = property === "anchor-name" ? assignedAnchor : "none";
60
+ if (element.style.getPropertyValue(property) !== assigned) continue;
61
+ if (value) element.style.setProperty(property, value, priority);
62
+ else element.style.removeProperty(property);
63
+ }
64
+ if (element.getAttribute("data-lobe-focus-ring") === "managed") {
65
+ if (oldMarker === null) element.removeAttribute("data-lobe-focus-ring");
66
+ else element.setAttribute("data-lobe-focus-ring", oldMarker);
67
+ }
68
+ };
69
+ try {
70
+ ring.showPopover();
71
+ const bounds = ring.getBoundingClientRect();
72
+ if (Math.max(...[
73
+ "top",
74
+ "right",
75
+ "bottom",
76
+ "left"
77
+ ].map((edge) => Math.abs(bounds[edge] - rect[edge]))) > 1) {
78
+ clear();
79
+ return;
80
+ }
81
+ element.style.setProperty("outline", "none", "important");
82
+ element.setAttribute("data-lobe-focus-ring", "managed");
83
+ target = element;
84
+ } catch {
85
+ clear();
86
+ }
87
+ };
88
+ const schedule = () => {
89
+ if (!frame) frame = win.requestAnimationFrame(() => {
90
+ frame = 0;
91
+ sync();
92
+ });
93
+ };
94
+ const blur = () => {
95
+ win.cancelAnimationFrame(frame);
96
+ frame = 0;
97
+ clear();
98
+ };
99
+ const observer = new MutationObserver(() => {
100
+ if (target && !target.isConnected) clear();
101
+ });
102
+ observer.observe(doc.body, {
103
+ childList: true,
104
+ subtree: true
105
+ });
106
+ doc.addEventListener("focusin", sync, true);
107
+ doc.addEventListener("focusout", schedule, true);
108
+ doc.addEventListener("keydown", schedule, true);
109
+ doc.addEventListener("pointerdown", schedule, true);
110
+ win.addEventListener("blur", blur);
111
+ win.addEventListener("focus", schedule);
112
+ installations.set(doc, {
113
+ dispose: () => {
114
+ disposed = true;
115
+ win.cancelAnimationFrame(frame);
116
+ observer.disconnect();
117
+ doc.removeEventListener("focusin", sync, true);
118
+ doc.removeEventListener("focusout", schedule, true);
119
+ doc.removeEventListener("keydown", schedule, true);
120
+ doc.removeEventListener("pointerdown", schedule, true);
121
+ win.removeEventListener("blur", blur);
122
+ win.removeEventListener("focus", schedule);
123
+ clear();
124
+ ring.remove();
125
+ sheet.remove();
126
+ installations.delete(doc);
127
+ },
128
+ users: 0
129
+ });
130
+ sync();
131
+ return installGlobalFocusRing(doc);
132
+ };
133
+ //#endregion
134
+ export { installGlobalFocusRing };
135
+
136
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../src/GlobalFocusRing/index.ts"],"sourcesContent":["import { globalFocusRingCSS } from './style';\n\nconst installations = new WeakMap<Document, { dispose: () => void; users: number }>();\n\n/** Install once per document. The returned cleanup is safe for nested providers and Strict Mode. */\nexport const installGlobalFocusRing = (doc: Document = document): (() => void) => {\n const existing = installations.get(doc);\n if (existing) {\n existing.users += 1;\n let released = false;\n return () => {\n if (released) return;\n released = true;\n if (--existing.users === 0) existing.dispose();\n };\n }\n\n const win = doc.defaultView;\n if (\n !win ||\n !doc.body ||\n !win.CSS?.supports('top', 'anchor(top)') ||\n !win.CSS.supports('position-visibility', 'anchors-visible') ||\n !('showPopover' in doc.createElement('div'))\n )\n return () => {};\n\n const sheet = doc.createElement('style');\n sheet.textContent = globalFocusRingCSS;\n const ring = doc.createElement('div');\n ring.setAttribute('data-lobe-global-focus-ring', '');\n ring.setAttribute('aria-hidden', 'true');\n ring.setAttribute('popover', 'manual');\n doc.head.append(sheet);\n doc.body.append(ring);\n\n let target: HTMLElement | undefined;\n let restoreTarget: (() => void) | undefined;\n let frame = 0;\n let disposed = false;\n\n const clear = () => {\n if (ring.matches(':popover-open')) ring.hidePopover();\n restoreTarget?.();\n restoreTarget = undefined;\n target = undefined;\n };\n\n const sync = () => {\n if (disposed) return;\n const next = doc.activeElement;\n if (next === target && next?.matches(':focus-visible') && next.isConnected) return;\n clear();\n // Shadow roots and fragmented inline text retain their own focus treatment.\n if (\n !next ||\n next === doc.body ||\n next.namespaceURI !== 'http://www.w3.org/1999/xhtml' ||\n next.shadowRoot ||\n !next.matches(':focus-visible') ||\n next.getClientRects().length !== 1\n )\n return;\n\n const element = next as HTMLElement;\n const computed = win.getComputedStyle(element);\n const rect = element.getBoundingClientRect();\n if (!rect.width || !rect.height || computed.visibility !== 'visible') return;\n\n const saved = ['anchor-name', 'outline'].map((property) => ({\n priority: element.style.getPropertyPriority(property),\n property,\n value: element.style.getPropertyValue(property),\n }));\n const oldMarker = element.getAttribute('data-lobe-focus-ring');\n const anchor = computed.getPropertyValue('anchor-name').trim();\n const assignedAnchor =\n anchor && anchor !== 'none' ? `${anchor}, --lobe-global-focus` : '--lobe-global-focus';\n element.style.setProperty('anchor-name', assignedAnchor, 'important');\n ring.style.borderRadius = computed.borderRadius;\n ring.style.setProperty(\n '--lobe-focus-ring-color',\n computed.getPropertyValue('--lobe-focus-ring-color').trim() ||\n computed.getPropertyValue('--ant-color-info').trim() ||\n '#1677ff',\n );\n\n restoreTarget = () => {\n for (const { property, value, priority } of saved) {\n const assigned = property === 'anchor-name' ? assignedAnchor : 'none';\n if (element.style.getPropertyValue(property) !== assigned) continue;\n if (value) element.style.setProperty(property, value, priority);\n else element.style.removeProperty(property);\n }\n if (element.getAttribute('data-lobe-focus-ring') === 'managed') {\n if (oldMarker === null) element.removeAttribute('data-lobe-focus-ring');\n else element.setAttribute('data-lobe-focus-ring', oldMarker);\n }\n };\n try {\n ring.showPopover();\n // Do not suppress a working native outline when an anchor cannot resolve.\n const bounds = ring.getBoundingClientRect();\n if (\n Math.max(\n ...(['top', 'right', 'bottom', 'left'] as const).map((edge) =>\n Math.abs(bounds[edge] - rect[edge]),\n ),\n ) > 1\n ) {\n clear();\n return;\n }\n element.style.setProperty('outline', 'none', 'important');\n element.setAttribute('data-lobe-focus-ring', 'managed');\n target = element;\n } catch {\n clear();\n }\n };\n\n const schedule = () => {\n if (!frame)\n frame = win.requestAnimationFrame(() => {\n frame = 0;\n sync();\n });\n };\n const blur = () => {\n win.cancelAnimationFrame(frame);\n frame = 0;\n clear();\n };\n const observer = new MutationObserver(() => {\n if (target && !target.isConnected) clear();\n });\n observer.observe(doc.body, { childList: true, subtree: true });\n doc.addEventListener('focusin', sync, true);\n doc.addEventListener('focusout', schedule, true);\n doc.addEventListener('keydown', schedule, true);\n doc.addEventListener('pointerdown', schedule, true);\n win.addEventListener('blur', blur);\n win.addEventListener('focus', schedule);\n\n const installation = {\n dispose: () => {\n disposed = true;\n win.cancelAnimationFrame(frame);\n observer.disconnect();\n doc.removeEventListener('focusin', sync, true);\n doc.removeEventListener('focusout', schedule, true);\n doc.removeEventListener('keydown', schedule, true);\n doc.removeEventListener('pointerdown', schedule, true);\n win.removeEventListener('blur', blur);\n win.removeEventListener('focus', schedule);\n clear();\n ring.remove();\n sheet.remove();\n installations.delete(doc);\n },\n users: 0,\n };\n installations.set(doc, installation);\n sync();\n return installGlobalFocusRing(doc);\n};\n"],"mappings":"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"}
@@ -0,0 +1,35 @@
1
+ //#region src/GlobalFocusRing/style.ts
2
+ const focusRingColor = (color) => `color-mix(in srgb, ${color} 90%, transparent)`;
3
+ const globalFocusRingCSS = `
4
+ [data-lobe-global-focus-ring] {
5
+ all: initial;
6
+ position: fixed;
7
+ position-anchor: --lobe-global-focus;
8
+ top: anchor(top);
9
+ right: anchor(right);
10
+ bottom: anchor(bottom);
11
+ left: anchor(left);
12
+ position-visibility: anchors-visible;
13
+ pointer-events: none;
14
+ border-radius: inherit;
15
+ outline: 2px solid ${focusRingColor("var(--lobe-focus-ring-color)")};
16
+ outline-offset: 2px;
17
+ animation: lobe-global-focus-in 200ms cubic-bezier(0.22, 1, 0.36, 1);
18
+ }
19
+ [data-lobe-global-focus-ring]:not(:popover-open) { display: none; }
20
+ [data-lobe-global-focus-ring]::backdrop { background: transparent; pointer-events: none; }
21
+ @keyframes lobe-global-focus-in {
22
+ from { opacity: 0.25; outline-offset: 5px; }
23
+ to { opacity: 1; outline-offset: 2px; }
24
+ }
25
+ @media (prefers-reduced-motion: reduce) {
26
+ [data-lobe-global-focus-ring] { animation: none; }
27
+ }
28
+ @media (forced-colors: active) {
29
+ [data-lobe-global-focus-ring] { outline-color: CanvasText; animation: none; }
30
+ }
31
+ `;
32
+ //#endregion
33
+ export { focusRingColor, globalFocusRingCSS };
34
+
35
+ //# sourceMappingURL=style.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"style.mjs","names":[],"sources":["../../src/GlobalFocusRing/style.ts"],"sourcesContent":["export const focusRingColor = (color: string) => `color-mix(in srgb, ${color} 90%, transparent)`;\n\nexport const globalFocusRingCSS = `\n[data-lobe-global-focus-ring] {\n all: initial;\n position: fixed;\n position-anchor: --lobe-global-focus;\n top: anchor(top);\n right: anchor(right);\n bottom: anchor(bottom);\n left: anchor(left);\n position-visibility: anchors-visible;\n pointer-events: none;\n border-radius: inherit;\n outline: 2px solid ${focusRingColor('var(--lobe-focus-ring-color)')};\n outline-offset: 2px;\n animation: lobe-global-focus-in 200ms cubic-bezier(0.22, 1, 0.36, 1);\n}\n[data-lobe-global-focus-ring]:not(:popover-open) { display: none; }\n[data-lobe-global-focus-ring]::backdrop { background: transparent; pointer-events: none; }\n@keyframes lobe-global-focus-in {\n from { opacity: 0.25; outline-offset: 5px; }\n to { opacity: 1; outline-offset: 2px; }\n}\n@media (prefers-reduced-motion: reduce) {\n [data-lobe-global-focus-ring] { animation: none; }\n}\n@media (forced-colors: active) {\n [data-lobe-global-focus-ring] { outline-color: CanvasText; animation: none; }\n}\n`;\n"],"mappings":";AAAA,MAAa,kBAAkB,UAAkB,sBAAsB,MAAM;AAE7E,MAAa,qBAAqB;;;;;;;;;;;;uBAYX,eAAe,8BAA8B,EAAE"}
@@ -24,7 +24,7 @@ declare const styles: {
24
24
  declare const rootVariants: (props?: ({
25
25
  shadow?: boolean | null | undefined;
26
26
  size?: "large" | "middle" | "small" | null | undefined;
27
- variant?: "filled" | "borderless" | "outlined" | null | undefined;
27
+ variant?: "borderless" | "filled" | "outlined" | null | undefined;
28
28
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
29
29
  //#endregion
30
30
  export { rootVariants, styles };
@@ -42,7 +42,7 @@ declare const variants: (props?: ({
42
42
  mark?: boolean | null | undefined;
43
43
  shiny?: boolean | null | undefined;
44
44
  strong?: boolean | null | undefined;
45
- type?: "danger" | "success" | "info" | "warning" | "secondary" | null | undefined;
45
+ type?: "danger" | "warning" | "success" | "info" | "secondary" | null | undefined;
46
46
  underline?: boolean | null | undefined;
47
47
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
48
48
  //#endregion
@@ -1,24 +1,26 @@
1
+ import { focusRingColor as focusRingColor$1 } from "../GlobalFocusRing/style.mjs";
1
2
  import { css, cssVar, keyframes } from "antd-style";
2
3
  //#region src/base-ui/focusRing.ts
3
- const tint = (color, alpha) => `color-mix(in srgb, ${color} ${alpha}%, transparent)`;
4
- const glow = (color, scale = 1) => `0 0 0 ${3 * scale}px ${tint(color, 70)}, 0 0 ${5 * scale}px ${4 * scale}px ${tint(color, 35)}`;
5
- const ringIn = (color) => keyframes`
4
+ const ringIn = keyframes`
6
5
  from {
7
- box-shadow: ${glow(color, 2.5)};
6
+ outline-color: transparent;
7
+ outline-offset: 5px;
8
8
  }
9
9
  `;
10
10
  const ring = (color) => css`
11
- &:focus-visible {
12
- outline: none;
13
- box-shadow: ${glow(color)};
14
- animation: ${ringIn(color)} 560ms cubic-bezier(0.32, 0.72, 0, 1);
11
+ --lobe-focus-ring-color: ${color};
12
+
13
+ &:focus-visible:not([data-lobe-focus-ring='managed']) {
14
+ outline: 2px solid ${focusRingColor$1(color)};
15
+ outline-offset: 2px;
16
+ animation: ${ringIn} 200ms cubic-bezier(0.22, 1, 0.36, 1);
15
17
 
16
18
  @media (prefers-reduced-motion: reduce) {
17
19
  animation: none;
18
20
  }
19
21
 
20
22
  @media (forced-colors: active) {
21
- outline: 2px solid CanvasText;
23
+ outline-color: CanvasText;
22
24
  animation: none;
23
25
  }
24
26
  }
@@ -1 +1 @@
1
- {"version":3,"file":"focusRing.mjs","names":[],"sources":["../../src/base-ui/focusRing.ts"],"sourcesContent":["import { css, cssVar, keyframes } from 'antd-style';\n\nconst tint = (color: string, alpha: number) =>\n `color-mix(in srgb, ${color} ${alpha}%, transparent)`;\n\nconst glow = (color: string, scale = 1) =>\n `0 0 0 ${3 * scale}px ${tint(color, 70)}, 0 0 ${5 * scale}px ${4 * scale}px ${tint(color, 35)}`;\n\nconst ringIn = (color: string) => keyframes`\n from {\n box-shadow: ${glow(color, 2.5)};\n }\n`;\n\nconst ring = (color: string) => css`\n &:focus-visible {\n outline: none;\n box-shadow: ${glow(color)};\n animation: ${ringIn(color)} 560ms cubic-bezier(0.32, 0.72, 0, 1);\n\n @media (prefers-reduced-motion: reduce) {\n animation: none;\n }\n\n @media (forced-colors: active) {\n outline: 2px solid CanvasText;\n animation: none;\n }\n }\n`;\n\nexport const focusRing = ring(cssVar.colorInfo);\n\nexport const focusRingColor = ring;\n"],"mappings":";;AAEA,MAAM,QAAQ,OAAe,UAC3B,sBAAsB,MAAM,GAAG,MAAM;AAEvC,MAAM,QAAQ,OAAe,QAAQ,MACnC,SAAS,IAAI,MAAM,KAAK,KAAK,OAAO,EAAE,EAAE,QAAQ,IAAI,MAAM,KAAK,IAAI,MAAM,KAAK,KAAK,OAAO,EAAE;AAE9F,MAAM,UAAU,UAAkB,SAAS;;kBAEzB,KAAK,OAAO,GAAG,EAAE;;;AAInC,MAAM,QAAQ,UAAkB,GAAG;;;kBAGjB,KAAK,KAAK,EAAE;iBACb,OAAO,KAAK,EAAE;;;;;;;;;;;;AAa/B,MAAa,YAAY,KAAK,OAAO,SAAS;AAE9C,MAAa,iBAAiB"}
1
+ {"version":3,"file":"focusRing.mjs","names":["ringColor"],"sources":["../../src/base-ui/focusRing.ts"],"sourcesContent":["import { css, cssVar, keyframes } from 'antd-style';\n\nimport { focusRingColor as ringColor } from '@/GlobalFocusRing/style';\n\nconst ringIn = keyframes`\n from {\n outline-color: transparent;\n outline-offset: 5px;\n }\n`;\n\nconst ring = (color: string) => css`\n --lobe-focus-ring-color: ${color};\n\n &:focus-visible:not([data-lobe-focus-ring='managed']) {\n outline: 2px solid ${ringColor(color)};\n outline-offset: 2px;\n animation: ${ringIn} 200ms cubic-bezier(0.22, 1, 0.36, 1);\n\n @media (prefers-reduced-motion: reduce) {\n animation: none;\n }\n\n @media (forced-colors: active) {\n outline-color: CanvasText;\n animation: none;\n }\n }\n`;\n\nexport const focusRing = ring(cssVar.colorInfo);\n\nexport const focusRingColor = ring;\n"],"mappings":";;;AAIA,MAAM,SAAS,SAAS;;;;;;AAOxB,MAAM,QAAQ,UAAkB,GAAG;6BACN,MAAM;;;yBAGVA,iBAAU,KAAK,EAAE;;iBAEzB,OAAO;;;;;;;;;;;;AAaxB,MAAa,YAAY,KAAK,OAAO,SAAS;AAE9C,MAAa,iBAAiB"}
package/es/index.d.mts CHANGED
@@ -164,6 +164,7 @@ import "./FormModal/index.mjs";
164
164
  import { FreezeProps } from "./Freeze/type.mjs";
165
165
  import Freeze from "./Freeze/Freeze.mjs";
166
166
  import "./Freeze/index.mjs";
167
+ import { installGlobalFocusRing } from "./GlobalFocusRing/index.mjs";
167
168
  import { GridProps } from "./Grid/type.mjs";
168
169
  import Grid from "./Grid/Grid.mjs";
169
170
  import "./Grid/index.mjs";
@@ -310,4 +311,4 @@ import { LayoutToc } from "./Layout/components/LayoutToc.mjs";
310
311
  import Layout from "./Layout/index.mjs";
311
312
  import { rehypeStreamAnimated } from "@lobehub/streamdown";
312
313
  import { ErrorBoundary, ErrorBoundaryProps } from "react-error-boundary";
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 };
314
+ 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, installGlobalFocusRing, 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
@@ -1,3 +1,4 @@
1
+ import { installGlobalFocusRing } from "./GlobalFocusRing/index.mjs";
1
2
  import { MotionComponent, MotionProvider, useMotionComponent } from "./MotionProvider/index.mjs";
2
3
  import { genCdnUrl } from "./utils/genCdnUrl.mjs";
3
4
  import ConfigProvider, { useCdnFn } from "./ConfigProvider/index.mjs";
@@ -161,4 +162,4 @@ import ThemeSwitch from "./ThemeSwitch/ThemeSwitch.mjs";
161
162
  import Toc from "./Toc/Toc.mjs";
162
163
  import { rehypeStreamAnimated } from "@lobehub/streamdown";
163
164
  import { ErrorBoundary } from "react-error-boundary";
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 };
165
+ 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, installGlobalFocusRing, 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.42.8",
3
+ "version": "5.43.0",
4
4
  "description": "Lobe UI is an open-source UI component library for building AIGC web apps",
5
5
  "keywords": [
6
6
  "lobehub",