@aiti-ai/aiti-folder 0.0.0-stage → 0.1.9
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/AGENTS.md +28 -0
- package/LICENSE +21 -0
- package/README.md +38 -2
- package/check-client.mjs +273 -0
- package/client/src/comp-i18n.ts +144 -0
- package/client/src/directory-browser.tsx +58 -0
- package/client/src/entry.tsx +82 -0
- package/client/src/folder-actions.ts +13 -0
- package/client/src/folder-browser.tsx +1568 -0
- package/client/src/folder-dock.test.mjs +241 -0
- package/client/src/folder-dock.tsx +646 -0
- package/client/src/folder-switcher.tsx +212 -0
- package/client/src/git-plan.tsx +282 -0
- package/client/src/git-toolbar.tsx +382 -0
- package/client/src/host-shim.ts +126 -0
- package/client/src/icons.tsx +135 -0
- package/client/src/jsx-runtime.ts +2 -0
- package/client/src/lib.ts +148 -0
- package/deploy-commit.mjs +52 -0
- package/dev-pack.mjs +246 -0
- package/dist/aiti-folder-client.mjs +4 -0
- package/dist/entry-e6L3SQB9.js +2411 -0
- package/dist/folder-browser-dlVFbFla.js +3830 -0
- package/icon.svg +1 -0
- package/index.ts +827 -0
- package/package.json +28 -4
- package/reload-instances.mjs +60 -0
- package/server/git-plan.test.mjs +62 -0
- package/server/git-plan.ts +196 -0
- package/tools/build-client.mjs +27 -0
- package/tools/deploy.mjs +100 -0
- package/vite.config.ts +43 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* folder-actions —— 开放点共享小模块(拆包专用,docs/aiti-ext-lazy-loading-plan.md D3)。
|
|
3
|
+
*
|
|
4
|
+
* registerAction(薄入口静态持有:window.__aitiFolder 开放点同步可用)与
|
|
5
|
+
* FolderBrowser(重 chunk,按需 import())共同导入本模块——同一模块实例保证
|
|
6
|
+
* 薄入口阶段注册的动作在重 chunk 加载后可见(Rollup 共享模块归并入口 chunk)。
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
// ── 开放点:其他扩展注册目录级工具条按钮(match(dirPath, ctx) → 显示/隐藏;onClick(dirPath))──
|
|
10
|
+
// icon:可选图标(ReactNode,如 aiti-git-review 的统一 GrEyeIcon);给了则按钮渲染 icon 而非 label 文本
|
|
11
|
+
export type FolderAction = { id?: string; label: string; title?: string; icon?: any; match?: (dirPath: string, ctx: { gitFiles: any[] }) => boolean; onClick: (dirPath: string) => void };
|
|
12
|
+
export const folderActions: FolderAction[] = [];
|
|
13
|
+
export function registerAction(reg: FolderAction) { folderActions.push(reg); return () => { const i = folderActions.indexOf(reg); if (i >= 0) folderActions.splice(i, 1); }; }
|