@alwith/module-drive 0.1.1 → 0.1.2
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/badge-react.d.ts +2 -2
- package/dist/badge-react.js +1 -1
- package/dist/badge.d.ts +1 -1
- package/dist/badge.js +1 -1
- package/dist/browse.d.ts +1 -1
- package/dist/browse.js +1 -1
- package/dist/chunk-0mx45c8q.js +2 -0
- package/dist/chunk-13ret1k0.js +188 -0
- package/dist/chunk-2343nj4p.js +2 -0
- package/dist/chunk-2n0p7j2f.js +2 -0
- package/dist/chunk-2ss7362z.js +2 -0
- package/dist/chunk-34qgf6be.js +2 -0
- package/dist/chunk-3fpcak8h.js +2 -0
- package/dist/chunk-4rfsdwgj.js +2 -0
- package/dist/chunk-52ccz07b.js +2 -0
- package/dist/chunk-563we221.js +2 -0
- package/dist/chunk-8765ztht.js +2 -0
- package/dist/chunk-8gmexfjt.js +3 -0
- package/dist/chunk-8sdw30dr.js +2 -0
- package/dist/chunk-ayvem7j8.js +2 -0
- package/dist/chunk-bh4wjd78.js +2 -0
- package/dist/chunk-dep1erts.js +2 -0
- package/dist/chunk-fkz75xv1.js +2 -0
- package/dist/chunk-g3pmrhm2.js +2 -0
- package/dist/chunk-j234gbr1.js +4 -0
- package/dist/chunk-j2mc48dt.js +2 -0
- package/dist/chunk-jxs49r5w.js +2 -0
- package/dist/chunk-kzjc8c8g.js +3 -0
- package/dist/chunk-m3kvhnag.js +3 -0
- package/dist/chunk-m6a9k1p0.js +2 -0
- package/dist/chunk-mafn36hy.js +2 -0
- package/dist/chunk-mz5601y4.js +2 -0
- package/dist/chunk-n7wnyds6.js +2 -0
- package/dist/chunk-n9sgwcq1.js +2 -0
- package/dist/chunk-nf37g7p6.js +2 -0
- package/dist/chunk-njfqtysa.js +2 -0
- package/dist/chunk-nk64fv7b.js +2 -0
- package/dist/chunk-p7y39rr7.js +2 -0
- package/dist/chunk-pbxjprxa.js +2 -0
- package/dist/chunk-pc21jzd8.js +3 -0
- package/dist/chunk-qabnvepm.js +2 -0
- package/dist/chunk-qf5g053e.js +2 -0
- package/dist/chunk-rg43mads.js +2 -0
- package/dist/chunk-t4vq7jva.js +2 -0
- package/dist/chunk-vpew2mps.js +2 -0
- package/dist/chunk-vtjd21bw.js +8 -0
- package/dist/chunk-ws1dtw35.js +2 -0
- package/dist/chunk-zf44znpx.js +2 -0
- package/dist/content/chat-condense.d.ts +4 -4
- package/dist/content/chat-condense.js +1 -1
- package/dist/content/collab.d.ts +1 -1
- package/dist/content/collab.js +1 -1
- package/dist/content/comment-anchors.js +1 -2
- package/dist/content/comment-decorations.d.ts +1 -1
- package/dist/content/comment-decorations.js +1 -3
- package/dist/content/comment-drawer.d.ts +2 -2
- package/dist/content/comment-drawer.js +1 -1
- package/dist/content/comment-mentions.d.ts +1 -1
- package/dist/content/comment-mentions.js +1 -1
- package/dist/content/comment-surface.d.ts +3 -3
- package/dist/content/comment-surface.js +1 -1
- package/dist/content/condense-task.d.ts +2 -2
- package/dist/content/condense-task.js +1 -1
- package/dist/content/condense.d.ts +3 -3
- package/dist/content/condense.js +1 -1
- package/dist/content/editor.d.ts +1 -1
- package/dist/content/editor.js +1 -1
- package/dist/content/file-actions.d.ts +4 -4
- package/dist/content/file-actions.js +1 -1
- package/dist/content/file-link.d.ts +1 -1
- package/dist/content/file-link.js +1 -1
- package/dist/content/frontmatter-panel.js +1 -1
- package/dist/content/frontmatter.js +1 -7
- package/dist/content/host.d.ts +2 -2
- package/dist/content/host.js +1 -1
- package/dist/content/html-bridge.js +1 -187
- package/dist/content/html-comments.js +1 -1
- package/dist/content/markdown-comments.d.ts +1 -1
- package/dist/content/markdown-comments.js +1 -2
- package/dist/content/mention-picker.d.ts +2 -2
- package/dist/content/mention-picker.js +1 -1
- package/dist/content/save-version.d.ts +1 -1
- package/dist/content/save-version.js +1 -1
- package/dist/content/translations.d.ts +1 -1
- package/dist/content/translations.js +1 -1
- package/dist/content/use-file-comments.d.ts +1 -1
- package/dist/content/use-file-comments.js +1 -1
- package/dist/content/yuplink.d.ts +1 -1
- package/dist/content/yuplink.js +1 -2
- package/dist/content.d.ts +10 -10
- package/dist/content.js +1 -1
- package/dist/core.d.ts +4 -4
- package/dist/core.js +1 -1
- package/dist/files.d.ts +1 -1
- package/dist/files.js +1 -1
- package/dist/global-search.js +1 -1
- package/dist/icons.js +1 -1
- package/dist/launcher.d.ts +3 -3
- package/dist/launcher.js +1 -2
- package/dist/locales.d.ts +2 -2
- package/dist/locales.js +1 -1
- package/dist/mass-delete.d.ts +3 -3
- package/dist/mass-delete.js +1 -1
- package/dist/notifications.js +1 -1
- package/dist/pinned-docs.js +1 -1
- package/dist/pinned.d.ts +3 -3
- package/dist/pinned.js +1 -1
- package/dist/react.d.ts +14 -14
- package/dist/react.js +1 -1
- package/dist/roots.d.ts +1 -1
- package/dist/roots.js +1 -1
- package/dist/settings.d.ts +3 -3
- package/dist/settings.js +1 -1
- package/dist/sharing.d.ts +3 -3
- package/dist/sharing.js +1 -1
- package/dist/status.d.ts +4 -4
- package/dist/status.js +1 -1
- package/dist/summary.d.ts +1 -1
- package/dist/summary.js +1 -1
- package/dist/tauri.d.ts +1 -1
- package/dist/transfer-feed.d.ts +1 -1
- package/dist/transfer-feed.js +1 -1
- package/dist/ui.d.ts +3 -3
- package/dist/ui.js +1 -1
- package/package.json +10 -10
package/dist/mass-delete.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
|
-
import type { DriveController } from "./core
|
|
3
|
-
import { type DriveLocale } from "./locales
|
|
4
|
-
import { type DriveControls } from "./ui
|
|
2
|
+
import type { DriveController } from "./core";
|
|
3
|
+
import { type DriveLocale } from "./locales";
|
|
4
|
+
import { type DriveControls } from "./ui";
|
|
5
5
|
export declare function DriveMassDeleteDialog({ controller, controls, locale }: {
|
|
6
6
|
controller: DriveController;
|
|
7
7
|
controls: DriveControls;
|
package/dist/mass-delete.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{He}from"./chunk-52ccz07b.js";import"./chunk-ws1dtw35.js";import"./chunk-3fpcak8h.js";export{He as DriveMassDeleteDialog};
|
package/dist/notifications.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Ve,_,u}from"./chunk-ayvem7j8.js";export{u as DriveNotice,Ve as DriveNotificationProvider,_ as useDriveNotifications};
|
package/dist/pinned-docs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{p,U,Re,C,N,yt,Qe,st}from"./chunk-p7y39rr7.js";export{Re as addPinned,st as basenameOf,U as isPinned,p as normalizePinnedPath,Qe as parsePinnedDocs,yt as prunePinned,C as removePinned,N as togglePinned};
|
package/dist/pinned.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
-
import type { DriveController, RootInfo } from "./core
|
|
3
|
-
import { type DriveLocale } from "./locales
|
|
4
|
-
import { type DriveControls, type DriveHost } from "./ui
|
|
2
|
+
import type { DriveController, RootInfo } from "./core";
|
|
3
|
+
import { type DriveLocale } from "./locales";
|
|
4
|
+
import { type DriveControls, type DriveHost } from "./ui";
|
|
5
5
|
export declare function DrivePinnedDocs({ host, controls, locale, generation, controller, onOpenProject }: {
|
|
6
6
|
host: DriveHost;
|
|
7
7
|
controls: DriveControls;
|
package/dist/pinned.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{ke}from"./chunk-2n0p7j2f.js";import"./chunk-n7wnyds6.js";import"./chunk-p7y39rr7.js";import"./chunk-ws1dtw35.js";import"./chunk-3fpcak8h.js";export{ke as DrivePinnedDocs};
|
package/dist/react.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export { DriveNotificationProvider } from "./notifications
|
|
1
|
+
export { DriveNotificationProvider } from "./notifications";
|
|
2
2
|
import type { ReactNode } from "react";
|
|
3
|
-
import type { DriveController, RootInfo } from "./core
|
|
4
|
-
import { type DriveLocale } from "./locales
|
|
5
|
-
import { type DriveControls, type DriveHost } from "./ui
|
|
6
|
-
export { DriveSharing } from "./sharing
|
|
7
|
-
export { useDrive } from "./ui
|
|
8
|
-
export type { DriveControls, DriveHost, DriveMenuProps } from "./ui
|
|
9
|
-
export { driveTranslator, driveLocales, type DriveLocale } from "./locales
|
|
10
|
-
export { addPinned, removePinned, togglePinned, parsePinnedDocs, isPinned, type PinnedDoc } from "./pinned-docs
|
|
11
|
-
export type { ReadDirLike } from "./global-search
|
|
3
|
+
import type { DriveController, RootInfo } from "./core";
|
|
4
|
+
import { type DriveLocale } from "./locales";
|
|
5
|
+
import { type DriveControls, type DriveHost } from "./ui";
|
|
6
|
+
export { DriveSharing } from "./sharing";
|
|
7
|
+
export { useDrive } from "./ui";
|
|
8
|
+
export type { DriveControls, DriveHost, DriveMenuProps } from "./ui";
|
|
9
|
+
export { driveTranslator, driveLocales, type DriveLocale } from "./locales";
|
|
10
|
+
export { addPinned, removePinned, togglePinned, parsePinnedDocs, isPinned, type PinnedDoc } from "./pinned-docs";
|
|
11
|
+
export type { ReadDirLike } from "./global-search";
|
|
12
12
|
export interface DrivePanelProps {
|
|
13
13
|
controller: DriveController;
|
|
14
14
|
controls: DriveControls;
|
|
@@ -23,7 +23,7 @@ export interface DrivePanelProps {
|
|
|
23
23
|
chooseDirectory?: () => Promise<string | null>;
|
|
24
24
|
}
|
|
25
25
|
export declare function DrivePanel(props: DrivePanelProps): ReactNode;
|
|
26
|
-
export { summarize, failureKey, engineStateKey } from "./summary
|
|
27
|
-
export { DriveBadge } from "./badge-react
|
|
28
|
-
export { badgeFor, aggregateDirBadge, type DriveBadgeDescriptor } from "./badge
|
|
29
|
-
export { DriveMassDeleteDialog } from "./mass-delete
|
|
26
|
+
export { summarize, failureKey, engineStateKey } from "./summary";
|
|
27
|
+
export { DriveBadge } from "./badge-react";
|
|
28
|
+
export { badgeFor, aggregateDirBadge, type DriveBadgeDescriptor } from "./badge";
|
|
29
|
+
export { DriveMassDeleteDialog } from "./mass-delete";
|
package/dist/react.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Ve,u}from"./chunk-ayvem7j8.js";import"./chunk-2343nj4p.js";import"./chunk-dep1erts.js";import"./chunk-n7wnyds6.js";import{Ne,e}from"./chunk-3fpcak8h.js";import{U,Re,C,N,Qe}from"./chunk-p7y39rr7.js";import{t,n}from"./chunk-ws1dtw35.js";import"./chunk-2n0p7j2f.js";import{ve}from"./chunk-m3kvhnag.js";import"./chunk-vpew2mps.js";import"./chunk-nk64fv7b.js";import{De,Ie}from"./chunk-qf5g053e.js";import{Se}from"./chunk-8765ztht.js";import{We}from"./chunk-g3pmrhm2.js";import{Ke,ye,Ye}from"./chunk-mz5601y4.js";import{g,T}from"./chunk-t4vq7jva.js";import{Ze}from"./chunk-0mx45c8q.js";import{He}from"./chunk-52ccz07b.js";import{jsxDEV as r,Fragment as v}from"react/jsx-dev-runtime";function L(a){let{controller:p,controls:{Button:m},mode:o="all",locale:d}=a,{connected:D,snapshot:l,error:c}=t(p),i=n(),f=De(p),s=e(d);return r("section",{className:`alwith-drive alwith-drive-${o}`,"aria-label":s("title"),children:[o==="launcher"?r(u,{message:c||i.error||l?.error},void 0,!1,void 0,this):(c||i.error||l?.error)&&r("p",{role:"alert",className:"alwith-drive-error",children:c||i.error||l?.error},void 0,!1,void 0,this),!D?o==="settings"&&(i.busy||!(c||i.error))?r("p",{role:"status",className:"alwith-drive-muted",children:s("panel.connecting")},void 0,!1,void 0,this):r(m,{disabled:i.busy,onClick:()=>i.run(()=>p.attach()),children:s("panel.refresh")},void 0,!1,void 0,this):o==="settings"||!l?.configured&&o==="all"?r(Se,{...a},void 0,!1,void 0,this):!l?.configured?r(v,{children:[r("p",{children:s("panel.signInHint")},void 0,!1,void 0,this),r(m,{variant:"outline",onClick:a.onOpenSettings,children:s("panel.signIn")},void 0,!1,void 0,this)]},void 0,!0,void 0,this):r(v,{children:[(o==="launcher"||o==="all")&&r(ve,{...a},void 0,!1,void 0,this),(o==="status"||o==="all")&&r(Ie,{...a,feed:f},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}export{Ze as DriveBadge,He as DriveMassDeleteDialog,Ve as DriveNotificationProvider,L as DrivePanel,We as DriveSharing,Re as addPinned,T as aggregateDirBadge,g as badgeFor,Ne as driveLocales,e as driveTranslator,Ke as engineStateKey,ye as failureKey,U as isPinned,Qe as parsePinnedDocs,C as removePinned,Ye as summarize,N as togglePinned,t as useDrive};
|
package/dist/roots.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CleanupReport, OwnershipGuard, RootInfo } from "./core
|
|
1
|
+
import type { CleanupReport, OwnershipGuard, RootInfo } from "./core";
|
|
2
2
|
export declare function isOwnPersonal(root: RootInfo): boolean;
|
|
3
3
|
export declare function isOtherPersonal(root: RootInfo): boolean;
|
|
4
4
|
export declare function shouldWarnOwnershipGuard(guard: OwnershipGuard | null): boolean;
|
package/dist/roots.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{pt,mt,gt,Ce,ht}from"./chunk-vpew2mps.js";export{Ce as canToggleSync,mt as isOtherPersonal,pt as isOwnPersonal,gt as shouldWarnOwnershipGuard,ht as skippedCounts};
|
package/dist/settings.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
-
import type { DriveController } from "./core
|
|
3
|
-
import { type DriveLocale } from "./locales
|
|
4
|
-
import { type DriveControls, type DriveHost } from "./ui
|
|
2
|
+
import type { DriveController } from "./core";
|
|
3
|
+
import { type DriveLocale } from "./locales";
|
|
4
|
+
import { type DriveControls, type DriveHost } from "./ui";
|
|
5
5
|
export interface DriveSettingsProps {
|
|
6
6
|
controller: DriveController;
|
|
7
7
|
controls: DriveControls;
|
package/dist/settings.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as n,jsxs as t,Fragment as te}from"react/jsx-runtime";import{useEffect as q,useState as h}from"react";import{driveTranslator as ae}from"./locales.js";import{canToggleSync as se}from"./roots.js";import{formatDriveBytes as G}from"./status.js";import{DriveSwitch as P,requireHost as le,useDrive as oe,useDriveAction as de}from"./ui.js";function ve({controller:l,controls:w,host:I,locale:_,defaultBaseUrl:R="",chooseDirectory:K,confirm:D}){let{Button:u,Input:b,Dialog:S}=w,{snapshot:a}=oe(l),{busy:o,error:z,run:s}=de(),[p,H]=h(a?.baseUrl||R),[v,E]=h(a?.localRoot??""),[x,j]=h(""),[re,A]=h(!1),[k,W]=h(null),[C,J]=h(""),[f,Q]=h(null),[V,N]=h([]),[g,O]=h(null),[y,X]=h(null),[c,U]=h(null),[B,M]=h(null),[Y,T]=h(null),[Z,ee]=h(null),i=ae(_,"settings"),F=ae(_);q(()=>{H(a?.baseUrl||R),E(a?.localRoot??""),j(""),X(null),U(null),Q(null),N([])},[a?.generation,R,a?.baseUrl,a?.localRoot]),q(()=>{if(M(null),!a?.configured)return;let e=!0;return Promise.all([l.request({type:"maxAutoDownloadMb"}),l.request({type:"configuration"})]).then(([r,d])=>{if(r.type!=="maxAutoDownloadMb"||d.type!=="configuration")throw Error("Invalid Drive preferences");if(e)J(String(r.data)),Q(d.data),M(null)}).catch((r)=>{if(e)M(String(r))}),()=>{e=!1}},[l,a?.generation,a?.configured]),q(()=>{if(T(null),O(null),N([]),!a?.configured||!a.running)return;let e=!0;return Promise.all([l.request({type:"ownershipGuard"}),l.request({type:"skillMirrors"})]).then(([r,d])=>{if(r.type!=="ownershipGuard"||d.type!=="skillMirrors")throw Error("Invalid Drive runtime preferences");if(e)O(r.data),N(d.data),T(null)}).catch((r)=>{if(e)T(String(r))}),()=>{e=!1}},[l,a?.generation,a?.configured,a?.running]),q(()=>{if(ee(null),a?.configured||!/^https?:\/\/\S+$/.test(p)){A(!1);return}let e=!0,r=setTimeout(()=>{l.request({type:"ssoConfig",baseUrl:p.trim()}).then((d)=>{if(d.type!=="ssoConfig")throw Error("Invalid SSO configuration");if(e)A(d.data.enabled)}).catch((d)=>{if(e)A(!1),ee(String(d))})},300);return()=>{e=!1,clearTimeout(r)}},[l,a?.configured,p]);let ie=async(e)=>{let r=x.trim();j("");let d=await l.request(e?{type:"ssoLogin",baseUrl:p.trim(),localRoot:v.trim()}:{type:"login",baseUrl:p.trim(),localRoot:v.trim(),token:r});if(d.type==="rootOwnershipConfirmation"){if(!S)throw await l.request({type:"resolveRootOwnership",generation:d.data.generation,accept:!1}),Error("Drive directory confirmation requires a dialog host");W({generation:d.data.generation,localRoot:d.data.localRoot});return}await l.request({type:"start"})},L=async(e)=>{if(!k)throw Error("No pending Drive directory confirmation");try{if(await l.request({type:"resolveRootOwnership",generation:k.generation,accept:e}),e)await l.request({type:"start"})}finally{W(null)}},m=a?.running??!1;return t(te,{children:[S&&k&&n(S,{open:!0,title:i("ownership.title"),description:i("ownership.description",{path:k.localRoot}),onOpenChange:(e)=>{if(!e&&!o)s(()=>L(!1))},children:t("div",{className:"alwith-drive-actions",children:[n(u,{variant:"outline",disabled:o,onClick:()=>s(()=>L(!1)),children:i("ownership.cancel")}),n(u,{disabled:o,onClick:()=>s(()=>L(!0)),children:i("ownership.continue")})]})}),n("header",{children:n("h2",{children:F("title")})}),(z||B||Y||Z)&&n("p",{role:"alert",className:"alwith-drive-error",children:z||B||Y||Z}),t("section",{className:"alwith-drive-setting",children:[t("div",{children:[n("h3",{children:i("login.title")}),n("p",{children:a?.configured?f===null?i(B?"login.loadFailed":"login.loading"):f.deviceId?i("login.registered",{deviceId:f.deviceId}):i("login.unregistered"):i("login.desc")})]}),a?.configured?t("div",{className:"alwith-drive-actions",children:[n(u,{variant:"outline",disabled:o,onClick:()=>s(async()=>{if(await D(i("login.logout")))await l.request({type:"logout"})}),children:i("login.logout")}),!m&&n(u,{disabled:o,onClick:()=>s(()=>l.request({type:"start"})),children:F("resume")})]}):t("form",{className:"alwith-drive-form",onSubmit:(e)=>{e.preventDefault(),s(()=>ie(!1))},children:[n(b,{type:"password",autoComplete:"off","aria-label":i("login.tokenPlaceholder"),placeholder:i("login.tokenPlaceholder"),value:x,onChange:(e)=>j(e.target.value)}),t("div",{className:"alwith-drive-actions",children:[n(u,{type:"submit",disabled:o||!x.trim()||!p.trim()||!v.trim(),children:i("login.register")}),re&&n(u,{type:"button",variant:"outline",disabled:o||!v.trim(),onClick:()=>s(()=>ie(!0)),children:i("sso.open")})]})]})]}),t("section",{className:"alwith-drive-setting",children:[t("div",{children:[n("h3",{children:i("localRoot.title")}),n("p",{children:v})]}),t("div",{className:"alwith-drive-actions",children:[!a?.configured&&n(b,{value:v,"aria-label":i("localRoot.title"),onChange:(e)=>E(e.target.value)}),K&&n(u,{variant:"outline",disabled:o,onClick:()=>s(async()=>{let e=await K();if(!e)return;if(a?.configured){if(!f)throw Error("Drive configuration is still loading");await l.request({type:"reconfigure",localRoot:e,userName:f.userName??""})}E(e)}),children:i("localRoot.choose")})]})]}),a?.configured&&t(te,{children:[t("section",{className:"alwith-drive-setting",children:[t("div",{children:[n("h3",{children:i("maxAutoDownload.title")}),n("p",{children:i("maxAutoDownload.desc")})]}),t("div",{className:"alwith-drive-actions",children:[n(b,{type:"number",min:0,max:1048576,step:1,"aria-label":i("maxAutoDownload.title"),value:C,onChange:(e)=>J(e.target.value),onBlur:()=>{if(/^\d+$/.test(C)&&Number(C)<=1048576)s(()=>l.request({type:"setMaxAutoDownloadMb",megabytes:Number(C)}))},disabled:o}),n("small",{children:i("maxAutoDownload.unit")})]})]}),t("section",{className:"alwith-drive-setting",children:[t("div",{children:[n("h3",{children:i("pause.title")}),n("p",{children:i("pause.desc")})]}),n(P,{controls:w,"aria-label":i("pause.title"),checked:a.status?.state.kind==="paused",disabled:o||!m,onCheckedChange:(e)=>s(()=>l.request({type:"pause",paused:e}))})]}),g&&g.unknownPersonalRoots>g.threshold&&t("section",{className:"alwith-drive-setting",children:[t("div",{children:[n("h3",{children:i("guard.title")}),n("p",{children:i("guard.desc",{count:g.unknownPersonalRoots})})]}),n(P,{controls:w,"aria-label":i("guard.title"),checked:g.syncAllPersonal,disabled:o,onCheckedChange:(e)=>{let r=e;s(async()=>{if(r&&!await D(F("panel.guard.confirmDesc",{count:g.unknownPersonalRoots})))return;await l.request({type:"syncAllPersonal",enabled:r}),O({...g,syncAllPersonal:r,active:!r})})}})]}),t("details",{children:[n("summary",{children:i("roots.title")}),a.roots.filter((e)=>e.kind!=="SKILL"&&e.projectKey!=="ai-session-archive").map((e)=>t("label",{className:"alwith-drive-setting",children:[t("span",{children:[e.drivePath||e.name,!e.canWrite&&t("small",{children:[" · ",i("roots.readOnly")]})]}),n(P,{controls:w,"aria-label":e.name,checked:e.selected,disabled:o||!m||!se(e),onCheckedChange:(r)=>s(()=>l.request({type:"pin",projectId:e.projectId,pinned:r}))})]},String(e.projectId)))]}),t("section",{className:"alwith-drive-setting",children:[t("div",{children:[n("h3",{children:i("usage.title")}),n("p",{children:i("usage.desc")})]}),n(u,{variant:"outline",disabled:o||!m,onClick:()=>s(async()=>{let e=await l.request({type:"diskUsage",limit:20});if(e.type!=="diskUsage")throw Error("Invalid disk usage response");X(e.data)}),children:i("usage.action")})]}),y&&t("section",{children:[n("p",{children:i("usage.total",{size:G(y.totalBytes),count:y.totalFiles})}),n("h4",{children:i("usage.byProject")}),y.projects.map((e)=>t(u,{variant:"ghost",className:"alwith-drive-row",onClick:()=>s(()=>le(I).onRevealPath(e.localPath)),children:[n("span",{children:e.name}),t("small",{children:[G(e.bytes)," · ",i("usage.files",{count:e.files})]})]},String(e.projectId))),n("h4",{children:i("usage.byFile")}),y.files.map((e)=>t(u,{variant:"ghost",className:"alwith-drive-row",onClick:()=>s(()=>le(I).onRevealPath(e.localPath)),children:[t("span",{children:[e.projectName," / ",e.path]}),n("small",{children:G(e.bytes)})]},e.localPath))]}),t("section",{className:"alwith-drive-setting",children:[t("div",{children:[n("h3",{children:i("cleanup.title")}),n("p",{children:i("cleanup.desc")})]}),n(u,{variant:"outline",disabled:o||!m,onClick:()=>s(async()=>{let e=await l.request({type:"cleanupScan"});if(e.type!=="cleanup")throw Error("Invalid cleanup response");U(e.data)}),children:i("cleanup.scan")})]}),c&&t("section",{children:[!c.candidates.length&&!c.moved.length&&n("p",{children:i("cleanup.nothing")}),c.candidates.map((e)=>t("p",{children:[e.drivePath," · ",e.files]},e.localPath)),c.skipped.length>0&&t("p",{children:[i("cleanup.skipped",{count:c.skipped.length}),":"," ",c.skipped.map((e)=>`${e.name} (${i(e.reason==="pinned"?"cleanup.skippedPinned":"cleanup.skippedPending",{count:1})})`).join(", ")]}),c.failed.map((e)=>n("p",{className:"alwith-drive-error",children:e},e)),c.moved.length>0?n("p",{children:i("cleanup.done",{count:c.moved.length,dir:c.stagingDir})}):c.candidates.length>0&&n(u,{variant:"outline",disabled:o,onClick:()=>s(async()=>{if(!await D(i("cleanup.confirm",{count:c.candidates.length,dir:c.stagingDir})))return;let e=await l.request({type:"cleanup",paths:c.candidates.map((r)=>r.localPath)});if(e.type!=="cleanup")throw Error("Invalid cleanup response");U(e.data)}),children:i("cleanup.move")})]}),t("section",{className:"alwith-drive-setting",children:[t("div",{children:[n("h3",{children:i("cloudOnly.title")}),n("p",{children:i("cloudOnly.desc")})]}),n(u,{variant:"outline",disabled:o||!m,onClick:()=>s(()=>l.request({type:"recheckCloudOnly"})),children:i("cloudOnly.action")})]}),I?.integrations,t("section",{children:[n("h3",{children:i("skills.title")}),n("p",{children:i("skills.desc")}),V.map((e)=>t("div",{className:"alwith-drive-setting",children:[t("div",{children:[n("strong",{children:e.name}),n("p",{children:e.skillsPath??e.localPath}),t("small",{children:[i(e.installed?"skills.installed":"skills.notInstalled")," ·"," ",i(e.pinned?"skills.manual":e.autoInstalled?"skills.auto":"skills.notAuto")]})]}),n(P,{controls:w,checked:e.autoInstalled||e.pinned,"aria-label":e.name,disabled:o||!m||e.autoInstalled,onCheckedChange:(r)=>{let d=r;s(async()=>{await l.request({type:"pin",projectId:e.projectId,pinned:d});let ne=await l.request({type:"skillMirrors"});if(ne.type!=="skillMirrors")throw Error("Invalid skill installation response");N(ne.data)})}})]},String(e.projectId))),!V.length&&n("p",{children:i("skills.empty")})]})]}),t("details",{children:[n("summary",{children:i("advanced.title")}),t("label",{children:[i("server.title"),n(b,{type:"url",value:p,disabled:o||a?.configured,onChange:(e)=>H(e.target.value)})]}),n("p",{children:i("server.desc")}),a?.webBaseUrl&&t("p",{children:[i("webBase.title"),": ",a.webBaseUrl]})]})]})}export{ve as DriveSettings};
|
|
1
|
+
import{Se}from"./chunk-8765ztht.js";import"./chunk-vpew2mps.js";import"./chunk-qf5g053e.js";import"./chunk-nk64fv7b.js";import"./chunk-ws1dtw35.js";import"./chunk-3fpcak8h.js";export{Se as DriveSettings};
|
package/dist/sharing.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
-
import type { DriveController } from "./core
|
|
3
|
-
import { type DriveLocale } from "./locales
|
|
4
|
-
import { type DriveControls, type DriveHost } from "./ui
|
|
2
|
+
import type { DriveController } from "./core";
|
|
3
|
+
import { type DriveLocale } from "./locales";
|
|
4
|
+
import { type DriveControls, type DriveHost } from "./ui";
|
|
5
5
|
export declare function DriveSharing({ controller, path, controls, confirm, locale, host }: {
|
|
6
6
|
controller: DriveController;
|
|
7
7
|
path: string;
|
package/dist/sharing.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{We}from"./chunk-g3pmrhm2.js";import"./chunk-ws1dtw35.js";import"./chunk-3fpcak8h.js";export{We as DriveSharing};
|
package/dist/status.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
-
import type { DriveController } from "./core
|
|
3
|
-
import { type DriveLocale } from "./locales
|
|
4
|
-
import { type TransferFeed } from "./transfer-feed
|
|
5
|
-
import { type DriveControls, type DriveHost } from "./ui
|
|
2
|
+
import type { DriveController } from "./core";
|
|
3
|
+
import { type DriveLocale } from "./locales";
|
|
4
|
+
import { type TransferFeed } from "./transfer-feed";
|
|
5
|
+
import { type DriveControls, type DriveHost } from "./ui";
|
|
6
6
|
export declare function useTransferFeed(controller: DriveController): TransferFeed;
|
|
7
7
|
export declare function formatDriveBytes(bytes: number): string;
|
|
8
8
|
export declare function DriveStatus({ controller, controls: { Button }, locale, host, confirm, feed, onOpenSettings }: {
|
package/dist/status.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{De,S,Ie}from"./chunk-qf5g053e.js";import"./chunk-nk64fv7b.js";import"./chunk-ws1dtw35.js";import"./chunk-3fpcak8h.js";export{Ie as DriveStatus,S as formatDriveBytes,De as useTransferFeed};
|
package/dist/summary.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { EngineState, FailedUpload, StatusSnapshot } from "./core
|
|
1
|
+
import type { EngineState, FailedUpload, StatusSnapshot } from "./core";
|
|
2
2
|
export declare function engineStateKey(state: EngineState): `drive.engine.${EngineState["kind"]}`;
|
|
3
3
|
type SummaryKey = "drive.summary.error" | "drive.summary.conflicts" | "drive.summary.notUploaded" | "drive.summary.notDownloaded" | "drive.summary.transferFailed" | "drive.summary.failed" | "drive.summary.syncing" | "drive.summary.paused" | "drive.summary.scanning" | "drive.summary.upToDate";
|
|
4
4
|
export declare function failureKey(failures: readonly FailedUpload[]): "notUploaded" | "notDownloaded" | "transferFailed";
|
package/dist/summary.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{Ke,ye,Ye}from"./chunk-mz5601y4.js";export{Ke as engineStateKey,ye as failureKey,Ye as summarize};
|
package/dist/tauri.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DriveEvent, DriveRequest, DriveResponse, DriveTransport } from "./core
|
|
1
|
+
import type { DriveEvent, DriveRequest, DriveResponse, DriveTransport } from "./core";
|
|
2
2
|
export interface NativeDriveHost {
|
|
3
3
|
invoke: (request: DriveRequest) => Promise<DriveResponse>;
|
|
4
4
|
listen: (listener: (event: DriveEvent) => void) => Promise<() => void>;
|
package/dist/transfer-feed.d.ts
CHANGED
package/dist/transfer-feed.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{ft,z,at,xe}from"./chunk-nk64fv7b.js";export{z as EMPTY_FEED,ft as RECENT_LIMIT,xe as applyFileState,at as transferKey};
|
package/dist/ui.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ButtonHTMLAttributes, type ComponentType, type InputHTMLAttributes, type ReactNode } from "react";
|
|
2
|
-
import type { DriveController, DriveState, RootInfo } from "./core
|
|
3
|
-
import type { ReadDirLike } from "./global-search
|
|
4
|
-
import type { PinnedDoc } from "./pinned-docs
|
|
2
|
+
import type { DriveController, DriveState, RootInfo } from "./core";
|
|
3
|
+
import type { ReadDirLike } from "./global-search";
|
|
4
|
+
import type { PinnedDoc } from "./pinned-docs";
|
|
5
5
|
export interface DriveMenuProps {
|
|
6
6
|
label: string;
|
|
7
7
|
children?: ReactNode;
|
package/dist/ui.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{t,n,r,c,D,d,I}from"./chunk-ws1dtw35.js";export{c as DriveChoice,d as DriveMenu,D as DriveModal,I as DriveSwitch,r as requireHost,t as useDrive,n as useDriveAction};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alwith/module-drive",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"files": [
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"prepack": "bun run build && bun ../../scripts/verify-module-package.ts drive"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
|
-
"react": "^19.
|
|
49
|
-
"react-dom": "^19.
|
|
48
|
+
"react": "^19.3.1",
|
|
49
|
+
"react-dom": "^19.3.1",
|
|
50
50
|
"@milkdown/core": "^7.22.2",
|
|
51
51
|
"@milkdown/ctx": "^7.22.2",
|
|
52
52
|
"@milkdown/prose": "^7.22.2",
|
|
@@ -56,22 +56,22 @@
|
|
|
56
56
|
"y-prosemirror": "^1.3.7",
|
|
57
57
|
"y-protocols": "^1.0.7",
|
|
58
58
|
"y-websocket": "^3.1.0",
|
|
59
|
-
"lucide-react": "^1.
|
|
59
|
+
"lucide-react": "^1.61.0",
|
|
60
60
|
"@alwith/module-editor": "^0.1.0-rc.8"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@types/react": "^19.3.0",
|
|
64
64
|
"@types/react-dom": "^19.3.0",
|
|
65
|
-
"@milkdown/core": "^7.22.
|
|
66
|
-
"@milkdown/ctx": "^7.22.
|
|
67
|
-
"@milkdown/prose": "^7.22.
|
|
68
|
-
"@milkdown/utils": "^7.22.
|
|
69
|
-
"@milkdown/plugin-collab": "^7.22.
|
|
65
|
+
"@milkdown/core": "^7.22.3",
|
|
66
|
+
"@milkdown/ctx": "^7.22.3",
|
|
67
|
+
"@milkdown/prose": "^7.22.3",
|
|
68
|
+
"@milkdown/utils": "^7.22.3",
|
|
69
|
+
"@milkdown/plugin-collab": "^7.22.3",
|
|
70
70
|
"yjs": "^13.6.33",
|
|
71
71
|
"y-prosemirror": "^1.3.7",
|
|
72
72
|
"y-protocols": "^1.0.7",
|
|
73
73
|
"y-websocket": "^3.1.0",
|
|
74
|
-
"lucide-react": "^1.
|
|
74
|
+
"lucide-react": "^1.61.0",
|
|
75
75
|
"@alwith/module-editor": "workspace:*"
|
|
76
76
|
},
|
|
77
77
|
"peerDependenciesMeta": {
|