@xiongtao.xt/tau-plugins 0.60.0 → 0.62.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.
- package/CHANGELOG.md +20 -0
- package/client/chunk-UGYIAPAN.js +869 -0
- package/docs/README.md +1 -0
- package/docs/backend.md +4 -10
- package/docs/blog-templates.md +7 -6
- package/docs/document-body.md +2 -0
- package/docs/getting-started.md +2 -14
- package/docs/plugin-basics.md +1 -1
- package/docs/portability.md +25 -2
- package/docs/skills.md +10 -12
- package/docs/task-data.md +389 -0
- package/docs/user-data.md +31 -24
- package/package.js +1 -1
- package/package.json +5 -1
- package/portable.js +3 -2
- package/publish-artifacts.js +36 -19
- package/types/packages/plugins/src/data-changes.d.ts +51 -0
- package/types/packages/plugins/src/data.d.ts +122 -7
- package/types/packages/plugins/src/errors.d.ts +7 -0
- package/types/packages/plugins/src/events.d.ts +17 -12
- package/types/packages/plugins/src/index.d.ts +2 -2
- package/types/packages/plugins/src/package.d.ts +7 -2
- package/types/packages/plugins/src/portable.d.ts +5 -2
- package/types/packages/plugins/src/skills.d.ts +16 -0
- package/types/packages/plugins/src/template.d.ts +101 -0
- package/types/packages/plugins/src/unified.d.ts +60 -0
- package/types/packages/plugins/src/version.d.ts +5 -0
- package/types/packages/shared/src/task-assistant/contracts.d.ts +15 -0
- package/types/packages/shared/src/task-assistant/directories.d.ts +15 -0
- package/types/packages/shared/src/task-assistant/directory-colors.d.ts +2 -0
- package/types/packages/shared/src/task-assistant/occurrence-state.d.ts +7 -0
- package/types/packages/shared/src/task-assistant/schema.d.ts +3 -0
- package/types/packages/shared/task-assistant.d.ts +2 -0
- package/types/packages/ui/src/hooks/useEdgeFade.d.ts +1 -1
- package/types/packages/ui/src/primitives/AnchoredPanel.d.ts +3 -1
- package/types/packages/ui/src/primitives/anchoredPosition.d.ts +8 -0
- package/unified.js +21 -0
- package/client/chunk-6XAEU7BJ.js +0 -330
- package/client/chunk-PRE35AOA.js +0 -185
|
@@ -43,13 +43,13 @@ export type * from "./records";
|
|
|
43
43
|
export type * from "./links";
|
|
44
44
|
export type * from "./transaction";
|
|
45
45
|
export type { PluginFieldCondition, PluginIndexes, PluginIndexType, PluginIndexValue, PluginOrderBy, PluginWhere, } from "./query";
|
|
46
|
-
export { PluginConflictError } from "./errors";
|
|
46
|
+
export { PluginConflictError, PluginSyncResetRequiredError, type PluginSyncResetReason, } from "./errors";
|
|
47
47
|
export { PLUGIN_ENTITY_KINDS, PLUGIN_ENTITY_READ_PERMISSIONS, PLUGIN_APP_ACTIONS, PLUGIN_EXPORT_FORMATS, PLUGIN_NOTEBOOK_FROM_KINDS, PLUGIN_CHAT_CONTEXT_KINDS, } from "./app";
|
|
48
48
|
export type { PluginNotifications, PluginNotificationOptions, PluginNotificationMode, PluginNotificationAction, } from "./notifications";
|
|
49
49
|
export type { PluginSpeech, PluginSpeechSession, PluginSpeechStartOptions } from "./speech";
|
|
50
50
|
export type { PluginApp, PluginAppAction, PluginAppActions, PluginAppActionResults, PluginContentLocation, PluginOpenOptions, PluginExportFormat, PluginEntityKind, PluginEntityRef, PluginEntityDescription, PluginPickOptions, PluginPickedEntity, } from "./app";
|
|
51
51
|
export { PLUGIN_EVENT_TYPES } from "./events";
|
|
52
|
-
export type { PluginDomainEvent, PluginEventOrigin, PluginEventType, PluginEvents } from "./events";
|
|
52
|
+
export type { PluginDomainEvent, PluginEvent, PluginEventOrigin, PluginEventType, PluginEvents, } from "./events";
|
|
53
53
|
export { PLUGIN_PERMISSIONS, PluginPermissionError, isPluginPermission } from "./permissions";
|
|
54
54
|
export type { PluginPermission, PluginPermissions, PluginPermissionState, PluginPermissionDenial, } from "./permissions";
|
|
55
55
|
export type * from "./flashcards";
|
|
@@ -8,7 +8,7 @@ export { PLUGIN_CATEGORIES, isPluginCategory, type PluginCategory } from "./cate
|
|
|
8
8
|
export { PLUGIN_PERMISSIONS, isPluginPermission, type PluginPermission } from "./permissions";
|
|
9
9
|
export { PLUGIN_AI_CAPABILITIES, isPluginAICapability } from "./ai";
|
|
10
10
|
export declare const PLUGIN_SHARED_MODULES: readonly ["@tau/plugins", "@tau/plugins/whiteboard", "@tau/plugins/sync", "@tau/ui", "react", "react-dom", "react-dom/client", "react/jsx-runtime", "react/jsx-dev-runtime"];
|
|
11
|
-
export interface
|
|
11
|
+
export interface LegacyPluginManifest {
|
|
12
12
|
formatVersion: 2;
|
|
13
13
|
id: string;
|
|
14
14
|
name: string;
|
|
@@ -33,6 +33,7 @@ export interface PluginManifest {
|
|
|
33
33
|
skills?: readonly string[];
|
|
34
34
|
integrity: Record<string, string>;
|
|
35
35
|
}
|
|
36
|
+
export type PluginManifest = LegacyPluginManifest | import("./unified").UnifiedDesktopPluginManifest;
|
|
36
37
|
/** 宿主内部传输的已读取产物,不属于作者运行时 API。 */
|
|
37
38
|
export interface DevelopmentPluginPackage {
|
|
38
39
|
manifest: PluginManifest | import("./portable").PortablePluginManifest;
|
|
@@ -42,4 +43,8 @@ export interface DevelopmentPluginPackage {
|
|
|
42
43
|
/** 按实际使用的包字段解析身份、权限、入口和摘要。 */
|
|
43
44
|
export declare function validatePluginManifest(value: unknown): PluginManifest;
|
|
44
45
|
/** 静态内容贡献在启动时固定,启停与更新需要重启。 */
|
|
45
|
-
export declare const isContentPlugin: (manifest:
|
|
46
|
+
export declare const isContentPlugin: (manifest: {
|
|
47
|
+
id: string;
|
|
48
|
+
editor?: true;
|
|
49
|
+
whiteboard?: true;
|
|
50
|
+
}) => boolean;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { type PluginManifest } from "./package";
|
|
1
|
+
import { type PluginManifest, type LegacyPluginManifest } from "./package";
|
|
2
|
+
import { type UnifiedWebPluginManifest } from "./unified";
|
|
2
3
|
import type { PluginEnvironment } from "./environment";
|
|
3
4
|
import { type PackagePlatform, type PackageTarget } from "./package-targets";
|
|
4
5
|
export declare const MOBILE_DATA_MIN_VERSION = "0.2.13";
|
|
@@ -8,17 +9,19 @@ export declare const MOBILE_DATA_PERMISSIONS: readonly ["cards:read", "cards:wri
|
|
|
8
9
|
/** 语音输入与首页面板随同一客户端版本开放 */
|
|
9
10
|
export declare const MOBILE_SPEECH_MIN_VERSION = "0.2.16";
|
|
10
11
|
export declare const MOBILE_SPEECH_PERMISSIONS: readonly ["speech:input"];
|
|
12
|
+
export declare function assertMobilePermissions(manifest: Pick<PortablePluginManifest, "permissions" | "targets">): void;
|
|
11
13
|
export declare const PORTABLE_PLATFORMS: readonly ["desktop", "android", "ios"];
|
|
12
14
|
export type PortablePlatform = PackagePlatform;
|
|
13
15
|
export declare const PORTABLE_SHARED_MODULES: readonly ["@tau/plugins", "@tau/plugins/whiteboard", "@tau/ui", "react", "react-dom", "react-dom/client", "react/jsx-runtime", "react/jsx-dev-runtime"];
|
|
14
16
|
export type PortablePluginTarget = PackageTarget;
|
|
15
|
-
export interface
|
|
17
|
+
export interface LegacyPortablePluginManifest extends Omit<LegacyPluginManifest, "formatVersion" | "platform" | "backend" | "minAppVersion" | "editor" | "whiteboard"> {
|
|
16
18
|
readonly formatVersion: 3;
|
|
17
19
|
readonly platform: "portable";
|
|
18
20
|
readonly profile: "web-v1";
|
|
19
21
|
readonly description?: string;
|
|
20
22
|
readonly targets: Readonly<Partial<Record<PortablePlatform, PortablePluginTarget>>>;
|
|
21
23
|
}
|
|
24
|
+
export type PortablePluginManifest = LegacyPortablePluginManifest | UnifiedWebPluginManifest;
|
|
22
25
|
export interface PluginAuthorManifest extends Pick<PluginManifest, "id" | "name" | "version" | "categories" | "keywords" | "permissions"> {
|
|
23
26
|
readonly description?: string;
|
|
24
27
|
readonly targets: Readonly<Partial<Record<PortablePlatform, PortablePluginTarget>>>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 包内 Skill:`skills/<id>/` 是一份标准 Agent Skills 目录(SKILL.md + 附件 + scripts/),
|
|
3
|
+
* manifest 的 `skills` 列出目录 ID,目录内全部文件进入 integrity。名称、描述与调用方式
|
|
4
|
+
* 取自 SKILL.md 的 front matter,manifest 不重复声明。
|
|
5
|
+
*/
|
|
6
|
+
export declare const SKILL_ROOT = "skills";
|
|
7
|
+
export declare const SKILL_README = "SKILL.md";
|
|
8
|
+
/** 读取 manifest.skills;缺省返回 undefined,空数组视为未声明。 */
|
|
9
|
+
export declare function readSkillsField(value: unknown): readonly string[] | undefined;
|
|
10
|
+
/** 校验 integrity 中的 Skill 文件:都落在已声明目录内,且每个目录都有 SKILL.md。 */
|
|
11
|
+
export declare function readSkillFiles(skills: readonly string[] | undefined, integrity: Record<string, unknown>): Record<string, string>;
|
|
12
|
+
/** 包内 Skill 是否带可执行脚本;带脚本的版本与本机后台一样需要人工审核。 */
|
|
13
|
+
export declare function hasSkillScripts(manifest: {
|
|
14
|
+
skills?: readonly string[];
|
|
15
|
+
integrity: Record<string, string>;
|
|
16
|
+
}): boolean;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { type PluginManifest } from "./package";
|
|
2
|
+
import { type PluginCatalogFields } from "./categories";
|
|
3
|
+
import type { JsonValue } from "./json";
|
|
4
|
+
import { type PackagePlatform, type PackageTargets, type PackageTarget } from "./package-targets";
|
|
5
|
+
import { type PortablePluginManifest } from "./portable";
|
|
6
|
+
import { type UnifiedTemplateManifest, type UnifiedSkillPackageManifest } from "./unified";
|
|
7
|
+
export { hasSkillScripts, SKILL_README, SKILL_ROOT } from "./skills";
|
|
8
|
+
interface SiteFieldBase {
|
|
9
|
+
/** 模板从 `site.fields[key]` 读取 */
|
|
10
|
+
key: string;
|
|
11
|
+
label: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
}
|
|
14
|
+
/** 模板声明的站点字段,宿主据此渲染「博客模板」设置并在发布时按声明解析取值。 */
|
|
15
|
+
export type TemplateSiteField = (SiteFieldBase & {
|
|
16
|
+
type: "text" | "textarea" | "url";
|
|
17
|
+
placeholder?: string;
|
|
18
|
+
default?: string;
|
|
19
|
+
}) | (SiteFieldBase & {
|
|
20
|
+
type: "select";
|
|
21
|
+
options: {
|
|
22
|
+
value: string;
|
|
23
|
+
label: string;
|
|
24
|
+
}[];
|
|
25
|
+
default?: string;
|
|
26
|
+
}) | (SiteFieldBase & {
|
|
27
|
+
type: "switch";
|
|
28
|
+
default?: boolean;
|
|
29
|
+
});
|
|
30
|
+
export type SiteFieldValue = string | boolean;
|
|
31
|
+
export interface LegacyTemplateManifest extends PluginCatalogFields {
|
|
32
|
+
formatVersion: 1;
|
|
33
|
+
apiVersion: 1;
|
|
34
|
+
platform: "desktop";
|
|
35
|
+
id: string;
|
|
36
|
+
name: string;
|
|
37
|
+
version: string;
|
|
38
|
+
minAppVersion?: string;
|
|
39
|
+
template: {
|
|
40
|
+
protocolVersion: 1;
|
|
41
|
+
root: string;
|
|
42
|
+
entries: string[];
|
|
43
|
+
siteFields?: TemplateSiteField[];
|
|
44
|
+
};
|
|
45
|
+
integrity: Record<string, string>;
|
|
46
|
+
}
|
|
47
|
+
export type TemplateManifest = LegacyTemplateManifest | UnifiedTemplateManifest;
|
|
48
|
+
/** 独立 Skill 包:没有代码入口,只分发 `skills/<id>/` 目录,安装后即可在 Skill 页使用。 */
|
|
49
|
+
interface SkillPackageBase extends PluginCatalogFields {
|
|
50
|
+
formatVersion: 1;
|
|
51
|
+
apiVersion: 1;
|
|
52
|
+
id: string;
|
|
53
|
+
name: string;
|
|
54
|
+
version: string;
|
|
55
|
+
skills: readonly string[];
|
|
56
|
+
integrity: Record<string, string>;
|
|
57
|
+
}
|
|
58
|
+
export interface DesktopSkillPackageManifest extends SkillPackageBase {
|
|
59
|
+
platform: "desktop";
|
|
60
|
+
minAppVersion?: string;
|
|
61
|
+
}
|
|
62
|
+
export interface LegacyPortableSkillPackageManifest extends SkillPackageBase {
|
|
63
|
+
platform: "portable";
|
|
64
|
+
targets: PackageTargets;
|
|
65
|
+
minAppVersion?: never;
|
|
66
|
+
}
|
|
67
|
+
export type PortableSkillPackageManifest = LegacyPortableSkillPackageManifest | UnifiedSkillPackageManifest;
|
|
68
|
+
export type SkillPackageManifest = DesktopSkillPackageManifest | PortableSkillPackageManifest;
|
|
69
|
+
export type DistributionManifest = PluginManifest | PortablePluginManifest | TemplateManifest | SkillPackageManifest;
|
|
70
|
+
export declare const DISTRIBUTION_LIMITS: {
|
|
71
|
+
readonly zipBytes: number;
|
|
72
|
+
readonly expandedBytes: number;
|
|
73
|
+
readonly entries: 512;
|
|
74
|
+
};
|
|
75
|
+
/** 包文件路径只约束文件系统边界,不约束模板的公开 URL。 */
|
|
76
|
+
export declare function assertPackagePath(value: unknown): asserts value is string;
|
|
77
|
+
export declare function assertPublishPath(value: unknown): asserts value is string;
|
|
78
|
+
/** 按模板声明解析站点字段:只输出声明过的 key,类型不符或越界的存量值回落到默认值。 */
|
|
79
|
+
export declare function resolveSiteFields(fields: readonly TemplateSiteField[] | undefined, values: Record<string, JsonValue> | undefined): Record<string, SiteFieldValue>;
|
|
80
|
+
export declare function isTemplateManifest(value: unknown): value is TemplateManifest;
|
|
81
|
+
export declare function isSkillPackageManifest(value: unknown): value is SkillPackageManifest;
|
|
82
|
+
export declare function validateSkillPackageManifest(value: unknown): SkillPackageManifest;
|
|
83
|
+
export declare function validatePortableSkillPackageManifest(value: unknown): PortableSkillPackageManifest;
|
|
84
|
+
export type DistributionPackageKind = "plugin" | "skills" | "template";
|
|
85
|
+
export declare function distributionPackageKind(manifest: DistributionManifest | PortablePluginManifest): DistributionPackageKind;
|
|
86
|
+
export declare function assertSkillPackageCompatibility(manifest: SkillPackageManifest, host: {
|
|
87
|
+
platform: PackagePlatform;
|
|
88
|
+
appVersion: string;
|
|
89
|
+
}): PackageTarget;
|
|
90
|
+
export declare function validateMobilePackageManifest(value: unknown, host?: {
|
|
91
|
+
platform: "android" | "ios";
|
|
92
|
+
appVersion: string;
|
|
93
|
+
}): PortablePluginManifest | PortableSkillPackageManifest;
|
|
94
|
+
export declare function validateDistributionManifest(value: unknown): DistributionManifest;
|
|
95
|
+
/** 能在用户本机执行代码的版本(本机后台、带脚本的 Skill)必须经人工系统审核才能发布与安装。 */
|
|
96
|
+
export declare function requiresSystemReview(manifest: {
|
|
97
|
+
backend?: unknown;
|
|
98
|
+
skills?: readonly string[];
|
|
99
|
+
integrity?: Record<string, string>;
|
|
100
|
+
}): boolean;
|
|
101
|
+
export declare function distributionFiles(manifest: DistributionManifest): string[];
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { type LegacyPluginManifest, type PluginManifest } from "./package";
|
|
2
|
+
import { type PortablePluginManifest } from "./portable";
|
|
3
|
+
import { type PackageTargets } from "./package-targets";
|
|
4
|
+
import { type LegacyTemplateManifest, type LegacyPortableSkillPackageManifest } from "./template";
|
|
5
|
+
export declare const PACKAGE_FORMAT_MIN_VERSIONS: {
|
|
6
|
+
readonly desktop: "0.66.3";
|
|
7
|
+
readonly android: "0.5.1";
|
|
8
|
+
readonly ios: "0.5.1";
|
|
9
|
+
};
|
|
10
|
+
interface UnifiedPackageHeader {
|
|
11
|
+
readonly formatVersion: 4;
|
|
12
|
+
readonly platform: "portable";
|
|
13
|
+
readonly targets: PackageTargets;
|
|
14
|
+
readonly minAppVersion?: never;
|
|
15
|
+
readonly description?: string;
|
|
16
|
+
}
|
|
17
|
+
interface UnifiedPluginBase extends Omit<LegacyPluginManifest, "formatVersion" | "platform" | "minAppVersion" | "backend" | "editor" | "whiteboard">, UnifiedPackageHeader {
|
|
18
|
+
readonly kind: "plugin";
|
|
19
|
+
readonly editor?: never;
|
|
20
|
+
readonly whiteboard?: never;
|
|
21
|
+
}
|
|
22
|
+
export interface UnifiedWebPluginManifest extends UnifiedPluginBase {
|
|
23
|
+
readonly profile: "web-v1";
|
|
24
|
+
readonly backend?: never;
|
|
25
|
+
}
|
|
26
|
+
export interface UnifiedDesktopPluginManifest extends UnifiedPluginBase {
|
|
27
|
+
readonly profile: "desktop-v1";
|
|
28
|
+
readonly backend: NonNullable<LegacyPluginManifest["backend"]>;
|
|
29
|
+
}
|
|
30
|
+
export type UnifiedPluginManifest = UnifiedWebPluginManifest | UnifiedDesktopPluginManifest;
|
|
31
|
+
export interface UnifiedSkillPackageManifest extends Omit<LegacyPortableSkillPackageManifest, "formatVersion" | "platform" | "targets" | "minAppVersion">, UnifiedPackageHeader {
|
|
32
|
+
readonly kind: "skills";
|
|
33
|
+
}
|
|
34
|
+
export interface UnifiedTemplateManifest extends Omit<LegacyTemplateManifest, "formatVersion" | "platform" | "minAppVersion">, UnifiedPackageHeader {
|
|
35
|
+
readonly kind: "template";
|
|
36
|
+
}
|
|
37
|
+
export type UnifiedPackageManifest = UnifiedPluginManifest | UnifiedSkillPackageManifest | UnifiedTemplateManifest;
|
|
38
|
+
export declare function validateUnifiedPluginManifest(value: unknown): UnifiedPluginManifest;
|
|
39
|
+
/** 已发布格式的字节与摘要保持原样,只在读取边界共用字段校验。 */
|
|
40
|
+
export declare function validateUnifiedPackageManifest(value: unknown): UnifiedPackageManifest;
|
|
41
|
+
export declare function buildUnifiedPluginManifest(value: unknown, output: {
|
|
42
|
+
main: string;
|
|
43
|
+
styles?: string;
|
|
44
|
+
integrity: Readonly<Record<string, string>>;
|
|
45
|
+
skills?: readonly string[];
|
|
46
|
+
}): UnifiedPluginManifest;
|
|
47
|
+
export declare function buildUnifiedPackageManifest(value: unknown, output: {
|
|
48
|
+
main?: string;
|
|
49
|
+
styles?: string;
|
|
50
|
+
integrity: Readonly<Record<string, string>>;
|
|
51
|
+
skills?: readonly string[];
|
|
52
|
+
}): UnifiedPackageManifest;
|
|
53
|
+
export declare function packageTargets(manifest: {
|
|
54
|
+
platform: "desktop" | "portable";
|
|
55
|
+
targets?: PackageTargets;
|
|
56
|
+
minAppVersion?: string;
|
|
57
|
+
}): PackageTargets;
|
|
58
|
+
export declare function isWebPluginManifest(manifest: PluginManifest | PortablePluginManifest): manifest is PortablePluginManifest;
|
|
59
|
+
export declare function readApplicationPluginManifest(value: unknown): PluginManifest | PortablePluginManifest;
|
|
60
|
+
export {};
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
export declare function comparePluginVersions(left: string, right: string): number;
|
|
2
2
|
export declare function assertPluginCompatibility(manifest: {
|
|
3
3
|
minAppVersion?: string;
|
|
4
|
+
targets?: {
|
|
5
|
+
desktop?: {
|
|
6
|
+
minAppVersion: string;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
4
9
|
}, clientVersion: string): void;
|
|
@@ -29,6 +29,7 @@ export interface TaskRecurrenceSegment {
|
|
|
29
29
|
effectiveDate: string;
|
|
30
30
|
rule: TaskRecurrenceRule | null;
|
|
31
31
|
}
|
|
32
|
+
export declare function normalizeTaskRecurrenceRule(rule: TaskRecurrenceRule): TaskRecurrenceRule;
|
|
32
33
|
export interface TaskOccurrenceState {
|
|
33
34
|
completedAt?: number | null;
|
|
34
35
|
skipped?: boolean;
|
|
@@ -48,6 +49,7 @@ export interface DocumentTaskAttributes {
|
|
|
48
49
|
taskCompletedAt?: number | null;
|
|
49
50
|
}
|
|
50
51
|
export interface AssistantTask {
|
|
52
|
+
isSeries?: boolean;
|
|
51
53
|
taskRef: TaskRef;
|
|
52
54
|
revision: string;
|
|
53
55
|
title: string;
|
|
@@ -63,6 +65,8 @@ export interface AssistantTask {
|
|
|
63
65
|
documentRevision?: string;
|
|
64
66
|
occurrence?: TaskOccurrenceRef;
|
|
65
67
|
reminderAt?: string | null;
|
|
68
|
+
reminderOffsets?: number[];
|
|
69
|
+
occurrenceState?: TaskOccurrenceState;
|
|
66
70
|
recurrence?: TaskRecurrenceSegment[];
|
|
67
71
|
writable: boolean;
|
|
68
72
|
readonlyReason?: string;
|
|
@@ -73,6 +77,11 @@ export interface AssistantCalendarEvent {
|
|
|
73
77
|
revision: string;
|
|
74
78
|
title: string;
|
|
75
79
|
calendarId: number;
|
|
80
|
+
reminderOffsets?: number[];
|
|
81
|
+
notes?: {
|
|
82
|
+
contentId: number;
|
|
83
|
+
createdAt: number;
|
|
84
|
+
};
|
|
76
85
|
start: string;
|
|
77
86
|
end: string;
|
|
78
87
|
allDay: boolean;
|
|
@@ -116,4 +125,10 @@ export declare class TaskAssistantError extends Error {
|
|
|
116
125
|
constructor(code: string, message: string);
|
|
117
126
|
}
|
|
118
127
|
export declare function taskKey(ref: TaskRef): string;
|
|
128
|
+
export declare function encodeTaskIdComponent(value: string): string;
|
|
129
|
+
export declare function decodeTaskIdComponent(value: string): string;
|
|
130
|
+
export declare function parseTaskKey(value: string): {
|
|
131
|
+
taskRef: TaskRef;
|
|
132
|
+
occurrenceDate?: string;
|
|
133
|
+
} | null;
|
|
119
134
|
export declare function occurrenceKey(ref: TaskOccurrenceRef): string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import colors from "./directory-colors";
|
|
2
|
+
export type DirectoryColor = keyof typeof colors;
|
|
3
|
+
export type DirectoryEntity = "todo-list" | "calendar";
|
|
4
|
+
export interface TodoListInput {
|
|
5
|
+
title: string;
|
|
6
|
+
color?: DirectoryColor | null;
|
|
7
|
+
}
|
|
8
|
+
export type TodoListPatch = Partial<TodoListInput>;
|
|
9
|
+
export interface CalendarDirectoryInput {
|
|
10
|
+
title: string;
|
|
11
|
+
color?: DirectoryColor;
|
|
12
|
+
visible?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export type CalendarDirectoryPatch = Partial<CalendarDirectoryInput>;
|
|
15
|
+
export declare function readDirectoryFields(entity: DirectoryEntity, input: unknown, create: boolean): TodoListInput | TodoListPatch | CalendarDirectoryInput | CalendarDirectoryPatch;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const value: {"berry-red":true,"red":true,"orange":true,"yellow":true,"olive-green":true,"green":true,"mint-green":true,"teal":true,"sky-blue":true,"light-blue":true,"blue":true,"grape-purple":true,"violet":true,"light-orange":true,"charcoal":true,"gray":true,"gray-brown":true};
|
|
2
|
+
export default value;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type TaskOccurrenceState } from "./contracts";
|
|
2
|
+
export interface TaskOccurrencePatch {
|
|
3
|
+
completed?: boolean;
|
|
4
|
+
skipped?: boolean;
|
|
5
|
+
scheduledAt?: string | null;
|
|
6
|
+
}
|
|
7
|
+
export declare function patchOccurrenceState(state: TaskOccurrenceState, patch: TaskOccurrencePatch, now: number): TaskOccurrenceState;
|
|
@@ -29,8 +29,11 @@ export declare const TASK_WRITE_SCHEMAS: {
|
|
|
29
29
|
};
|
|
30
30
|
export type TaskWriteName = keyof typeof TASK_WRITE_SCHEMAS;
|
|
31
31
|
export declare const TASK_READ_SCHEMAS: {
|
|
32
|
+
query_todo_occurrence_states: TaskSchema;
|
|
32
33
|
query_todos: TaskSchema;
|
|
33
34
|
query_calendar_events: TaskSchema;
|
|
35
|
+
query_task_directories: TaskSchema;
|
|
36
|
+
get_task_object: TaskSchema;
|
|
34
37
|
query_task_operations: TaskSchema;
|
|
35
38
|
};
|
|
36
39
|
export type TaskReadName = keyof typeof TASK_READ_SCHEMAS;
|
|
@@ -11,7 +11,7 @@ export type EdgeFadeOptions = {
|
|
|
11
11
|
bottom?: boolean;
|
|
12
12
|
};
|
|
13
13
|
/** 滚动边缘状态:scroll 事件 + ResizeObserver(容器尺寸随窗口缩放/侧栏拖宽变化)+
|
|
14
|
-
MutationObserver
|
|
14
|
+
MutationObserver(节点增删与文字变化)三路监听,布尔翻转才 setState。
|
|
15
15
|
useLayoutEffect 内完成首次测量,避免能滚页面首帧渐隐缺失的闪烁。
|
|
16
16
|
参数是元素而非 RefObject:视图常有 loading 早退分支(容器晚于首帧挂载),
|
|
17
17
|
配合 callback ref 的 setState 才能在挂载时重新接线 */
|
|
@@ -20,6 +20,8 @@ export interface AnchoredPanelProps extends Omit<HTMLAttributes<HTMLDivElement>,
|
|
|
20
20
|
anchor: HTMLElement | null;
|
|
21
21
|
/** 12 向全表(引擎 flip/shift 兜底),默认 bottom-start */
|
|
22
22
|
placement?: AnchoredPlacement;
|
|
23
|
+
/** 让可滚动预览适应锚点一侧的可用高度。 */
|
|
24
|
+
fitVerticalSpace?: boolean;
|
|
23
25
|
/** 显隐由宿主驱动;缺省锚点存在即显示(宿主托管用法) */
|
|
24
26
|
open?: boolean;
|
|
25
27
|
/** 8px 菱形箭头(随 flip 换边),默认关 */
|
|
@@ -30,7 +32,7 @@ export interface AnchoredPanelProps extends Omit<HTMLAttributes<HTMLDivElement>,
|
|
|
30
32
|
/** 卡片 DOM 引用(AnchoredPanel 内部已占用一位做定位,此处合并外部引用) */
|
|
31
33
|
ref?: Ref<HTMLDivElement>;
|
|
32
34
|
}
|
|
33
|
-
export declare function AnchoredPanel({ anchor, placement, open, arrow, className, children, ref: externalRef, ...cardProps }: AnchoredPanelProps): import("react").ReactPortal | null;
|
|
35
|
+
export declare function AnchoredPanel({ anchor, placement, fitVerticalSpace, open, arrow, className, children, ref: externalRef, ...cardProps }: AnchoredPanelProps): import("react").ReactPortal | null;
|
|
34
36
|
export declare namespace AnchoredPanel {
|
|
35
37
|
var Body: typeof AnchoredPanelBody;
|
|
36
38
|
var Footer: typeof AnchoredPanelFooter;
|
|
@@ -15,6 +15,14 @@ export type AnchoredPlacement = AnchoredSide | `${AnchoredSide}-${AnchoredAlign}
|
|
|
15
15
|
export interface AnchoredPositionOptions {
|
|
16
16
|
gap?: number;
|
|
17
17
|
}
|
|
18
|
+
/** 可滚动的正文预览固定在可用空间较大的一侧,内容异步长高也不盖住触发文字。 */
|
|
19
|
+
export declare function fitVerticalPreview(anchor: {
|
|
20
|
+
top: number;
|
|
21
|
+
bottom: number;
|
|
22
|
+
}, placement: AnchoredPlacement, viewportHeight: number, gap?: number): {
|
|
23
|
+
placement: AnchoredPlacement;
|
|
24
|
+
maxHeight: number;
|
|
25
|
+
} | undefined;
|
|
18
26
|
export interface AnchoredPosition {
|
|
19
27
|
x: number;
|
|
20
28
|
y: number;
|
package/unified.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import {
|
|
2
|
+
PACKAGE_FORMAT_MIN_VERSIONS,
|
|
3
|
+
buildUnifiedPackageManifest,
|
|
4
|
+
buildUnifiedPluginManifest,
|
|
5
|
+
isWebPluginManifest,
|
|
6
|
+
packageTargets,
|
|
7
|
+
readApplicationPluginManifest,
|
|
8
|
+
validateUnifiedPackageManifest,
|
|
9
|
+
validateUnifiedPluginManifest
|
|
10
|
+
} from "./client/chunk-UGYIAPAN.js";
|
|
11
|
+
import "./client/chunk-UTVEXGFI.js";
|
|
12
|
+
export {
|
|
13
|
+
PACKAGE_FORMAT_MIN_VERSIONS,
|
|
14
|
+
buildUnifiedPackageManifest,
|
|
15
|
+
buildUnifiedPluginManifest,
|
|
16
|
+
isWebPluginManifest,
|
|
17
|
+
packageTargets,
|
|
18
|
+
readApplicationPluginManifest,
|
|
19
|
+
validateUnifiedPackageManifest,
|
|
20
|
+
validateUnifiedPluginManifest
|
|
21
|
+
};
|