@groupviz/react 2.0.0 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -33,5 +33,13 @@ export { SublatticeScene } from '../components/Canvas/SublatticeScene.js';
33
33
  export type { SublatticeSceneProps } from '../components/Canvas/SublatticeScene.js';
34
34
  export { SceneWindow } from '../components/Canvas/SceneWindow.js';
35
35
  export type { SceneWindowProps, SceneWindowConfig, SceneWindowCaps, SceneWindowTheme } from '../components/Canvas/SceneWindow.js';
36
+ export { useSceneState } from '../hooks/useSceneState.js';
37
+ export type { SceneState, SceneStateOptions, SceneStateProps } from '../hooks/useSceneState.js';
38
+ export { SceneThemeRoot } from '../components/Canvas/SceneThemeRoot.js';
39
+ export type { SceneTheme, SceneThemeRootProps } from '../components/Canvas/SceneThemeRoot.js';
40
+ export { SceneHoverBubble } from '../components/Canvas/SceneHoverBubble.js';
41
+ export type { SceneHoverBubbleProps } from '../components/Canvas/SceneHoverBubble.js';
42
+ export { useTranslation } from '../i18n/useTranslation.js';
36
43
  export { I18nProvider } from '../i18n/I18nContext.js';
44
+ export type { I18nProviderProps, I18nContextValue } from '../i18n/I18nContext.js';
37
45
  export type { Group, GroupElement } from '@groupviz/core';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@groupviz/react",
3
- "version": "2.0.0",
3
+ "version": "2.1.1",
4
4
  "description": "GroupViz 群论可视化 React 视图组件",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -28,7 +28,7 @@
28
28
  "./theme.css": "./theme.css"
29
29
  },
30
30
  "peerDependencies": {
31
- "@groupviz/core": "^2.0.0",
31
+ "@groupviz/core": "^2.1.1",
32
32
  "react": "^19.0.0",
33
33
  "react-dom": "^19.0.0",
34
34
  "three": ">=0.184.0 <0.186.0",
@@ -0,0 +1,9 @@
1
+ import type { Group, GroupElement } from '@groupviz/core';
2
+ /** 清空去重缓存(测试用;宿主一般不需要调用)。 */
3
+ export declare function clearElementRefWarnCache(): void;
4
+ export declare function resolveElementWarn(group: Group | null | undefined, ref: string | null | undefined, context: string): GroupElement | null;
5
+ /**
6
+ * 批量解析元素引用(`subsets[].elementIds` / 陪集 H 这类数组入参)。
7
+ * 保留顺序、去重、丢掉未命中项,并逐项走一次去重告警。
8
+ */
9
+ export declare function resolveElementIdsWarn(group: Group | null | undefined, refs: readonly string[] | null | undefined, context: string): string[];