z-biz-tool-shared 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/AgentManager.d.ts +1 -1
- package/dist/agent/AgentPanel.js +2 -2
- package/dist/agent/SQLEditor.js +1 -1
- package/dist/agent/index.d.ts +5 -5
- package/dist/agent/index.js +5 -5
- package/dist/ai/AIManager.d.ts +3 -3
- package/dist/ai/AIManager.js +1 -1
- package/dist/ai/clients.d.ts +1 -1
- package/dist/ai/context.d.ts +1 -1
- package/dist/ai/index.d.ts +3 -3
- package/dist/ai/index.js +3 -3
- package/dist/capability/index.d.ts +1 -1
- package/dist/capability/index.js +1 -1
- package/dist/components/Navbar.js +1 -1
- package/dist/components/Spotlight.js +1 -1
- package/dist/components/SpotlightProvider.js +1 -1
- package/dist/components/UIDesignSystem.js +1 -1
- package/dist/components/index.d.ts +8 -8
- package/dist/components/index.js +8 -8
- package/dist/index.d.ts +12 -12
- package/dist/index.js +12 -12
- package/dist/interactions/index.d.ts +1 -1
- package/dist/interactions/index.js +1 -1
- package/dist/notifications/ToastContainer.js +1 -1
- package/dist/notifications/index.d.ts +2 -2
- package/dist/notifications/index.js +2 -2
- package/dist/notifications/notificationManager.d.ts +1 -1
- package/dist/protocol/deeplinkReceiver.d.ts +6 -2
- package/dist/protocol/deeplinkReceiver.d.ts.map +1 -1
- package/dist/protocol/deeplinkReceiver.js +2 -2
- package/dist/protocol/deeplinkReceiver.js.map +1 -1
- package/dist/protocol/index.d.ts +3 -3
- package/dist/protocol/index.js +3 -3
- package/dist/shared/AppShell.js +1 -1
- package/dist/shared/ThemeContext.d.ts +1 -1
- package/dist/shared/ThemeContext.js +1 -1
- package/dist/shared/index.d.ts +9 -9
- package/dist/shared/index.js +9 -9
- package/dist/shortcuts/index.d.ts +2 -2
- package/dist/shortcuts/index.js +2 -2
- package/dist/shortcuts/shortcutManager.d.ts +1 -1
- package/dist/styles/index.d.ts +2 -2
- package/dist/styles/index.js +2 -2
- package/dist/theme/ThemeContext.d.ts +1 -1
- package/dist/theme/ThemeContext.js +1 -1
- package/dist/theme/index.d.ts +3 -3
- package/dist/theme/index.js +3 -3
- package/dist/theme/themeManager.d.ts +1 -1
- package/dist/theme/themeManager.js +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.js +1 -1
- package/dist/types/product.d.ts +1 -1
- package/package.json +4 -3
package/dist/agent/AgentPanel.js
CHANGED
|
@@ -4,8 +4,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
4
4
|
import { useState, useEffect, useRef } from 'react';
|
|
5
5
|
import { Card, Input, Button, Space, Typography, Spin, Avatar, List, Tag } from 'antd';
|
|
6
6
|
import { RobotOutlined, SendOutlined } from '@ant-design/icons';
|
|
7
|
-
import { useAgentStore } from '../agent/AgentManager';
|
|
8
|
-
import { errorMessage } from '../shared/errorMessage';
|
|
7
|
+
import { useAgentStore } from '../agent/AgentManager.js';
|
|
8
|
+
import { errorMessage } from '../shared/errorMessage.js';
|
|
9
9
|
const { TextArea } = Input;
|
|
10
10
|
const { Text } = Typography;
|
|
11
11
|
export const AgentPanel = () => {
|
package/dist/agent/SQLEditor.js
CHANGED
|
@@ -3,7 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { useState } from 'react';
|
|
4
4
|
import { Card, Button, Space, Input, message } from 'antd';
|
|
5
5
|
import { PlayCircleOutlined, CopyOutlined, SaveOutlined } from '@ant-design/icons';
|
|
6
|
-
import { errorMessage } from '../shared/errorMessage';
|
|
6
|
+
import { errorMessage } from '../shared/errorMessage.js';
|
|
7
7
|
export const SQLEditor = ({ value = '', onChange, onExecute, }) => {
|
|
8
8
|
const [code, setCode] = useState(value);
|
|
9
9
|
const [isExecuting, setIsExecuting] = useState(false);
|
package/dist/agent/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from './types';
|
|
2
|
-
export * from './AgentManager';
|
|
3
|
-
export * from './AgentPanel';
|
|
4
|
-
export * from './QueryHistoryViewer';
|
|
5
|
-
export * from './SQLEditor';
|
|
1
|
+
export * from './types.js';
|
|
2
|
+
export * from './AgentManager.js';
|
|
3
|
+
export * from './AgentPanel.js';
|
|
4
|
+
export * from './QueryHistoryViewer.js';
|
|
5
|
+
export * from './SQLEditor.js';
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/agent/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Agent 模块导出
|
|
2
|
-
export * from './types';
|
|
3
|
-
export * from './AgentManager';
|
|
4
|
-
export * from './AgentPanel';
|
|
5
|
-
export * from './QueryHistoryViewer';
|
|
6
|
-
export * from './SQLEditor';
|
|
2
|
+
export * from './types.js';
|
|
3
|
+
export * from './AgentManager.js';
|
|
4
|
+
export * from './AgentPanel.js';
|
|
5
|
+
export * from './QueryHistoryViewer.js';
|
|
6
|
+
export * from './SQLEditor.js';
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
package/dist/ai/AIManager.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { AIConfig, AIFunctionType, AIFunctionParams, AIResult, AIContext, Agent } from './types';
|
|
2
|
-
import { type FetchLike } from './clients';
|
|
3
|
-
export type { AIClient, FetchLike } from './clients';
|
|
1
|
+
import type { AIConfig, AIFunctionType, AIFunctionParams, AIResult, AIContext, Agent } from './types.js';
|
|
2
|
+
import { type FetchLike } from './clients.js';
|
|
3
|
+
export type { AIClient, FetchLike } from './clients.js';
|
|
4
4
|
/** 设置/清除 fetch 实现;传 undefined 恢复真实 fetch。返回一个还原函数。 */
|
|
5
5
|
export declare function setFetchImplementation(impl: FetchLike | undefined): () => void;
|
|
6
6
|
export interface AIStore {
|
package/dist/ai/AIManager.js
CHANGED
package/dist/ai/clients.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AIConfig, AIFunctionType, AIFunctionParams, AIResult, AIContext } from './types';
|
|
1
|
+
import type { AIConfig, AIFunctionType, AIFunctionParams, AIResult, AIContext } from './types.js';
|
|
2
2
|
/** fetch 的最小结构(只声明本文件用得到的字段,便于测试注入桩) */
|
|
3
3
|
export interface AIClientRequestInit {
|
|
4
4
|
method?: string;
|
package/dist/ai/context.d.ts
CHANGED
package/dist/ai/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './AIManager';
|
|
2
|
-
export * from './types';
|
|
3
|
-
export * from './context';
|
|
1
|
+
export * from './AIManager.js';
|
|
2
|
+
export * from './types.js';
|
|
3
|
+
export * from './context.js';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/ai/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './types';
|
|
1
|
+
export * from './types.js';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/capability/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './types';
|
|
1
|
+
export * from './types.js';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { useTheme } from '../theme';
|
|
2
|
+
import { useTheme } from '../theme/index.js';
|
|
3
3
|
// 导航栏组件
|
|
4
4
|
export const Navbar = ({ title, actions = [] }) => {
|
|
5
5
|
const { themeColors } = useTheme();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useState, useEffect, useMemo, useRef } from 'react';
|
|
3
|
-
import { useTheme } from '../theme';
|
|
3
|
+
import { useTheme } from '../theme/index.js';
|
|
4
4
|
// Spotlight 组件
|
|
5
5
|
export const Spotlight = ({ isOpen, onClose, commands = [], emptyHint = '没有匹配的命令' }) => {
|
|
6
6
|
const { themeColors } = useTheme();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect } from 'react';
|
|
3
|
-
import { useSpotlight } from './Spotlight';
|
|
3
|
+
import { useSpotlight } from './Spotlight.js';
|
|
4
4
|
// Spotlight Provider - 管理全局 Spotlight
|
|
5
5
|
export const SpotlightProvider = ({ children }) => {
|
|
6
6
|
const { toggleSpotlight } = useSpotlight();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export * from './ShortcutDisplay';
|
|
2
|
-
export * from './StateIndicator';
|
|
3
|
-
export * from './ProgressIndicator';
|
|
4
|
-
export * from './Spotlight';
|
|
5
|
-
export * from './SpotlightProvider';
|
|
6
|
-
export * from './GlobalShortcutHandler';
|
|
7
|
-
export * from './Navbar';
|
|
8
|
-
export * from './UIDesignSystem';
|
|
1
|
+
export * from './ShortcutDisplay.js';
|
|
2
|
+
export * from './StateIndicator.js';
|
|
3
|
+
export * from './ProgressIndicator.js';
|
|
4
|
+
export * from './Spotlight.js';
|
|
5
|
+
export * from './SpotlightProvider.js';
|
|
6
|
+
export * from './GlobalShortcutHandler.js';
|
|
7
|
+
export * from './Navbar.js';
|
|
8
|
+
export * from './UIDesignSystem.js';
|
|
9
9
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/components/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// 共享组件导出
|
|
2
|
-
export * from './ShortcutDisplay';
|
|
3
|
-
export * from './StateIndicator';
|
|
4
|
-
export * from './ProgressIndicator';
|
|
5
|
-
export * from './Spotlight';
|
|
6
|
-
export * from './SpotlightProvider';
|
|
7
|
-
export * from './GlobalShortcutHandler';
|
|
8
|
-
export * from './Navbar';
|
|
9
|
-
export * from './UIDesignSystem';
|
|
2
|
+
export * from './ShortcutDisplay.js';
|
|
3
|
+
export * from './StateIndicator.js';
|
|
4
|
+
export * from './ProgressIndicator.js';
|
|
5
|
+
export * from './Spotlight.js';
|
|
6
|
+
export * from './SpotlightProvider.js';
|
|
7
|
+
export * from './GlobalShortcutHandler.js';
|
|
8
|
+
export * from './Navbar.js';
|
|
9
|
+
export * from './UIDesignSystem.js';
|
|
10
10
|
//# sourceMappingURL=index.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export * from './ai';
|
|
2
|
-
export * from './agent';
|
|
3
|
-
export * from './theme';
|
|
4
|
-
export * from './shortcuts';
|
|
5
|
-
export * from './notifications';
|
|
6
|
-
export * from './components';
|
|
7
|
-
export * from './interactions';
|
|
8
|
-
export * from './styles';
|
|
9
|
-
export * from './capability';
|
|
10
|
-
export * from './protocol';
|
|
11
|
-
export * from './types';
|
|
12
|
-
export { AppShell, Omnibar, TabsBar, DragHandle, type DragHandleProps, ThemeToggle, ThemeSelector, LoadingState, ErrorState, CollapsiblePanel, useKeyboardShortcuts, formatShortcut, type ShortcutSpec, ShortcutBadge, ShortcutPanel, radius, shadow, size, motion, gradient, hoverBackground, backgroundGradient, } from './shared';
|
|
1
|
+
export * from './ai/index.js';
|
|
2
|
+
export * from './agent/index.js';
|
|
3
|
+
export * from './theme/index.js';
|
|
4
|
+
export * from './shortcuts/index.js';
|
|
5
|
+
export * from './notifications/index.js';
|
|
6
|
+
export * from './components/index.js';
|
|
7
|
+
export * from './interactions/index.js';
|
|
8
|
+
export * from './styles/index.js';
|
|
9
|
+
export * from './capability/index.js';
|
|
10
|
+
export * from './protocol/index.js';
|
|
11
|
+
export * from './types/index.js';
|
|
12
|
+
export { AppShell, Omnibar, TabsBar, DragHandle, type DragHandleProps, ThemeToggle, ThemeSelector, LoadingState, ErrorState, CollapsiblePanel, useKeyboardShortcuts, formatShortcut, type ShortcutSpec, ShortcutBadge, ShortcutPanel, radius, shadow, size, motion, gradient, hoverBackground, backgroundGradient, } from './shared/index.js';
|
|
13
13
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
// 核心模块导出
|
|
2
|
-
export * from './ai';
|
|
3
|
-
export * from './agent';
|
|
4
|
-
export * from './theme';
|
|
5
|
-
export * from './shortcuts';
|
|
6
|
-
export * from './notifications';
|
|
7
|
-
export * from './components';
|
|
8
|
-
export * from './interactions';
|
|
9
|
-
export * from './styles';
|
|
10
|
-
export * from './capability';
|
|
11
|
-
export * from './protocol';
|
|
12
|
-
export * from './types';
|
|
2
|
+
export * from './ai/index.js';
|
|
3
|
+
export * from './agent/index.js';
|
|
4
|
+
export * from './theme/index.js';
|
|
5
|
+
export * from './shortcuts/index.js';
|
|
6
|
+
export * from './notifications/index.js';
|
|
7
|
+
export * from './components/index.js';
|
|
8
|
+
export * from './interactions/index.js';
|
|
9
|
+
export * from './styles/index.js';
|
|
10
|
+
export * from './capability/index.js';
|
|
11
|
+
export * from './protocol/index.js';
|
|
12
|
+
export * from './types/index.js';
|
|
13
13
|
// shared 模块与 theme/components 存在重名成员
|
|
14
14
|
// (ThemeProvider/useTheme、EmptyState),顶层只显式导出无冲突部分
|
|
15
|
-
export { AppShell, Omnibar, TabsBar, DragHandle, ThemeToggle, ThemeSelector, LoadingState, ErrorState, CollapsiblePanel, useKeyboardShortcuts, formatShortcut, ShortcutBadge, ShortcutPanel, radius, shadow, size, motion, gradient, hoverBackground, backgroundGradient, } from './shared';
|
|
15
|
+
export { AppShell, Omnibar, TabsBar, DragHandle, ThemeToggle, ThemeSelector, LoadingState, ErrorState, CollapsiblePanel, useKeyboardShortcuts, formatShortcut, ShortcutBadge, ShortcutPanel, radius, shadow, size, motion, gradient, hoverBackground, backgroundGradient, } from './shared/index.js';
|
|
16
16
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './interactionPatterns';
|
|
1
|
+
export * from './interactionPatterns.js';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useNotificationStore } from '../notifications/notificationManager';
|
|
2
|
+
import { useNotificationStore } from '../notifications/notificationManager.js';
|
|
3
3
|
// Toast 样式
|
|
4
4
|
const toastStyles = {
|
|
5
5
|
success: 'bg-green-500 text-white',
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './notificationManager';
|
|
2
|
-
export * from './ToastContainer';
|
|
1
|
+
export * from './notificationManager.js';
|
|
2
|
+
export * from './ToastContainer.js';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
* 所有依赖都靠注入 —— 因为本模块要能在 vitest(无 Tauri)与浏览器预览里跑,
|
|
33
33
|
* 直接 import `@tauri-apps/api` 会让非 Tauri 环境一进来就炸。
|
|
34
34
|
*/
|
|
35
|
-
import { type Handoff } from "./deeplink";
|
|
35
|
+
import { type Handoff } from "./deeplink.js";
|
|
36
36
|
/** 取队列的命令名。家族统一,各仓同名(Rust 侧 wrapper 在各仓自己的 commands.rs)。 */
|
|
37
37
|
export declare const ZBIZ_TAKE_PENDING = "zbiz_take_pending";
|
|
38
38
|
/**
|
|
@@ -64,9 +64,13 @@ export interface DeepLinkReceiverOptions {
|
|
|
64
64
|
/**
|
|
65
65
|
* 取队列。签名与 Tauri 的 `invoke` 兼容。
|
|
66
66
|
*
|
|
67
|
+
* **刻意不接受命令名参数** —— 命令名是共享层的事(`ZBIZ_TAKE_PENDING`),
|
|
68
|
+
* 消费方不该重复它:重复就有两份要同步的地方,一份改了另一份没改,
|
|
69
|
+
* 结果是「点了没反应」且没有任何报错。
|
|
70
|
+
*
|
|
67
71
|
* 注入而不是直接 import:非 Tauri 环境(vitest / 浏览器预览)没有这个命令。
|
|
68
72
|
*/
|
|
69
|
-
invoke: (
|
|
73
|
+
invoke: () => Promise<Handoff[]>;
|
|
70
74
|
/**
|
|
71
75
|
* 订阅事件。签名与 Tauri 的 `listen` 兼容。
|
|
72
76
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deeplinkReceiver.d.ts","sourceRoot":"","sources":["../../src/protocol/deeplinkReceiver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAMH,OAAO,EAAkB,KAAK,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1D,4DAA4D;AAC5D,eAAO,MAAM,iBAAiB,sBAAsB,CAAC;AAMrD;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,0CAA0C;IAC1C,EAAE,EAAE,OAAO,CAAC;IACZ,yBAAyB;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,kDAAkD;IAClD,SAAS,EAAE,MAAM,CAAC;IAElB
|
|
1
|
+
{"version":3,"file":"deeplinkReceiver.d.ts","sourceRoot":"","sources":["../../src/protocol/deeplinkReceiver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAMH,OAAO,EAAkB,KAAK,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1D,4DAA4D;AAC5D,eAAO,MAAM,iBAAiB,sBAAsB,CAAC;AAMrD;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,0CAA0C;IAC1C,EAAE,EAAE,OAAO,CAAC;IACZ,yBAAyB;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,kDAAkD;IAClD,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;;;;OAQG;IACH,MAAM,EAAE,MAAM,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;IAEjC;;OAEG;IACH,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,IAAI,KAAK,OAAO,CAAC,MAAM,IAAI,CAAC,CAAC;IAEpE;;;;;OAKG;IACH,SAAS,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,cAAc,CAAC;IAE7C;;;;OAIG;IACH,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAEpD;;;;;OAKG;IACH,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAEnE,iBAAiB;IACjB,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CAChD;AAED;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,MAAM,IAAI,CAAC;AAM9C;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,uBAAuB,GAAG,oBAAoB,CAmF5F"}
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
/* ------------------------------------------------------------------ *
|
|
36
36
|
* 常量
|
|
37
37
|
* ------------------------------------------------------------------ */
|
|
38
|
-
import { DEEPLINK_EVENT } from "./deeplink";
|
|
38
|
+
import { DEEPLINK_EVENT } from "./deeplink.js";
|
|
39
39
|
/** 取队列的命令名。家族统一,各仓同名(Rust 侧 wrapper 在各仓自己的 commands.rs)。 */
|
|
40
40
|
export const ZBIZ_TAKE_PENDING = "zbiz_take_pending";
|
|
41
41
|
/* ------------------------------------------------------------------ *
|
|
@@ -54,7 +54,7 @@ export function startDeepLinkReceiver(options) {
|
|
|
54
54
|
const drain = async () => {
|
|
55
55
|
let items;
|
|
56
56
|
try {
|
|
57
|
-
items = await invoke(
|
|
57
|
+
items = await invoke();
|
|
58
58
|
}
|
|
59
59
|
catch (e) {
|
|
60
60
|
// 非 Tauri 环境(vitest / 浏览器预览)属预期,不算错误。
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deeplinkReceiver.js","sourceRoot":"","sources":["../../src/protocol/deeplinkReceiver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH;;wEAEwE;AAExE,OAAO,EAAE,cAAc,EAAgB,MAAM,YAAY,CAAC;AAE1D,4DAA4D;AAC5D,MAAM,CAAC,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"deeplinkReceiver.js","sourceRoot":"","sources":["../../src/protocol/deeplinkReceiver.ts"],"names":[],"mappings":"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"}
|
package/dist/protocol/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './deeplink';
|
|
2
|
-
export * from './deeplinkReceiver';
|
|
3
|
-
export * from './familyEvents';
|
|
1
|
+
export * from './deeplink.js';
|
|
2
|
+
export * from './deeplinkReceiver.js';
|
|
3
|
+
export * from './familyEvents.js';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/protocol/index.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
//
|
|
10
10
|
// 产品元数据在 ../types/product.ts —— 因为它是「会过期的数据」,
|
|
11
11
|
// 该有主人,而不是和协议格式混在一起。
|
|
12
|
-
export * from './deeplink';
|
|
13
|
-
export * from './deeplinkReceiver';
|
|
14
|
-
export * from './familyEvents';
|
|
12
|
+
export * from './deeplink.js';
|
|
13
|
+
export * from './deeplinkReceiver.js';
|
|
14
|
+
export * from './familyEvents.js';
|
|
15
15
|
//# sourceMappingURL=index.js.map
|
package/dist/shared/AppShell.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useEffect } from "react";
|
|
3
3
|
import { Layout, Button, Space, Typography, Tooltip } from "antd";
|
|
4
4
|
import { BulbOutlined, BulbFilled, MenuUnfoldOutlined, MenuFoldOutlined, FolderOutlined, } from "@ant-design/icons";
|
|
5
|
-
import { useTheme } from "./ThemeContext";
|
|
5
|
+
import { useTheme } from "./ThemeContext.js";
|
|
6
6
|
const { Header, Sider, Content } = Layout;
|
|
7
7
|
export function AppShell({ title, icon, sidebar, headerExtra, children, siderWidth = 220, collapsedSider = false, onToggleSider, }) {
|
|
8
8
|
const { mode, toggle } = useTheme();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
-
import { type ResolvedThemeMode, type ThemePreference } from "../theme/themeMode";
|
|
2
|
+
import { type ResolvedThemeMode, type ThemePreference } from "../theme/themeMode.js";
|
|
3
3
|
interface ThemeContextType {
|
|
4
4
|
mode: ResolvedThemeMode;
|
|
5
5
|
/** 用户偏好:跟随系统 / 强制亮色 / 强制暗色 */
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { createContext, useContext, useState, useEffect } from "react";
|
|
3
3
|
import { theme as antdTheme, Button } from "antd";
|
|
4
4
|
import { MoonOutlined, SunOutlined } from "@ant-design/icons";
|
|
5
|
-
import { isThemePreference, nextPreference, readStoredPreference, resolveThemeMode, writeStoredPreference, } from "../theme/themeMode";
|
|
5
|
+
import { isThemePreference, nextPreference, readStoredPreference, resolveThemeMode, writeStoredPreference, } from "../theme/themeMode.js";
|
|
6
6
|
const ThemeContext = createContext(undefined);
|
|
7
7
|
/** 系统是否偏好暗色;无 window(SSR / Node 测试)时按亮色处理 */
|
|
8
8
|
function systemPrefersDark() {
|
package/dist/shared/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { AppShell } from "./AppShell";
|
|
2
|
-
export { default as Omnibar } from "./Omnibar";
|
|
3
|
-
export { default as TabsBar } from "./TabsBar";
|
|
4
|
-
export { DragHandle, type DragHandleProps } from "./DragHandle";
|
|
5
|
-
export { ThemeProvider, useTheme, ThemeToggle, ThemeSelector } from "./ThemeContext";
|
|
6
|
-
export * from "./designTokens";
|
|
7
|
-
export { EmptyState, LoadingState, ErrorState } from "./States";
|
|
8
|
-
export { CollapsiblePanel } from "./CollapsiblePanel";
|
|
9
|
-
export { useKeyboardShortcuts, formatShortcut, type ShortcutSpec, ShortcutBadge, ShortcutPanel } from "./useKeyboardShortcuts";
|
|
1
|
+
export { AppShell } from "./AppShell.js";
|
|
2
|
+
export { default as Omnibar } from "./Omnibar.js";
|
|
3
|
+
export { default as TabsBar } from "./TabsBar.js";
|
|
4
|
+
export { DragHandle, type DragHandleProps } from "./DragHandle.js";
|
|
5
|
+
export { ThemeProvider, useTheme, ThemeToggle, ThemeSelector } from "./ThemeContext.js";
|
|
6
|
+
export * from "./designTokens.js";
|
|
7
|
+
export { EmptyState, LoadingState, ErrorState } from "./States.js";
|
|
8
|
+
export { CollapsiblePanel } from "./CollapsiblePanel.js";
|
|
9
|
+
export { useKeyboardShortcuts, formatShortcut, type ShortcutSpec, ShortcutBadge, ShortcutPanel } from "./useKeyboardShortcuts.js";
|
|
10
10
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/shared/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { AppShell } from "./AppShell";
|
|
2
|
-
export { default as Omnibar } from "./Omnibar";
|
|
3
|
-
export { default as TabsBar } from "./TabsBar";
|
|
4
|
-
export { DragHandle } from "./DragHandle";
|
|
5
|
-
export { ThemeProvider, useTheme, ThemeToggle, ThemeSelector } from "./ThemeContext";
|
|
6
|
-
export * from "./designTokens";
|
|
7
|
-
export { EmptyState, LoadingState, ErrorState } from "./States";
|
|
8
|
-
export { CollapsiblePanel } from "./CollapsiblePanel";
|
|
9
|
-
export { useKeyboardShortcuts, formatShortcut, ShortcutBadge, ShortcutPanel } from "./useKeyboardShortcuts";
|
|
1
|
+
export { AppShell } from "./AppShell.js";
|
|
2
|
+
export { default as Omnibar } from "./Omnibar.js";
|
|
3
|
+
export { default as TabsBar } from "./TabsBar.js";
|
|
4
|
+
export { DragHandle } from "./DragHandle.js";
|
|
5
|
+
export { ThemeProvider, useTheme, ThemeToggle, ThemeSelector } from "./ThemeContext.js";
|
|
6
|
+
export * from "./designTokens.js";
|
|
7
|
+
export { EmptyState, LoadingState, ErrorState } from "./States.js";
|
|
8
|
+
export { CollapsiblePanel } from "./CollapsiblePanel.js";
|
|
9
|
+
export { useKeyboardShortcuts, formatShortcut, ShortcutBadge, ShortcutPanel } from "./useKeyboardShortcuts.js";
|
|
10
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './shortcutManager';
|
|
2
|
-
export * from './types';
|
|
1
|
+
export * from './shortcutManager.js';
|
|
2
|
+
export * from './types.js';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/shortcuts/index.js
CHANGED
package/dist/styles/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './designTokens';
|
|
2
|
-
export * from './globalStyles';
|
|
1
|
+
export * from './designTokens.js';
|
|
2
|
+
export * from './globalStyles.js';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/styles/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
3
3
|
* 主题 Context - 提供给组件使用
|
|
4
4
|
*/
|
|
5
5
|
import { createContext, useContext, useEffect } from 'react';
|
|
6
|
-
import { useThemeStore, initTheme } from './themeManager';
|
|
6
|
+
import { useThemeStore, initTheme } from './themeManager.js';
|
|
7
7
|
const ThemeContext = createContext(undefined);
|
|
8
8
|
export const ThemeProvider = ({ children }) => {
|
|
9
9
|
useEffect(() => {
|
package/dist/theme/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './themeManager';
|
|
2
|
-
export * from './ThemeContext';
|
|
3
|
-
export * from './types';
|
|
1
|
+
export * from './themeManager.js';
|
|
2
|
+
export * from './ThemeContext.js';
|
|
3
|
+
export * from './types.js';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/theme/index.js
CHANGED
package/dist/types/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './product';
|
|
1
|
+
export * from './product.js';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/types/index.js
CHANGED
package/dist/types/product.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "z-biz-tool-shared",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "z-biz-tool 核心共享模块(AI/Agent/主题/快捷键/组件)",
|
|
6
6
|
"type": "module",
|
|
@@ -69,8 +69,9 @@
|
|
|
69
69
|
],
|
|
70
70
|
"scripts": {
|
|
71
71
|
"clean": "rm -rf dist",
|
|
72
|
-
"build": "npm run clean && tsc -p tsconfig.build.json && node scripts/check-dist.mjs",
|
|
73
|
-
"
|
|
72
|
+
"build": "npm run clean && tsc -p tsconfig.build.json && npm run fix-dist-ext && node scripts/check-dist.mjs && node scripts/check-dist-importable.mjs",
|
|
73
|
+
"fix-dist-ext": "node scripts/fix-dist-ext.mjs",
|
|
74
|
+
"verify": "node scripts/check-dist.mjs && node scripts/check-dist-importable.mjs",
|
|
74
75
|
"prepublishOnly": "npm run build",
|
|
75
76
|
"typecheck": "tsc --noEmit",
|
|
76
77
|
"test": "node --experimental-strip-types --import ./tests/register-ts-ext.mjs --test tests/*.test.ts",
|