@dhzh/foundry 4.0.1 → 6.0.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/README.md +30 -23
- package/dist/index.mjs +4 -1
- package/dist/skills/foundry/SKILL.md +10 -9
- package/dist/skills/foundry/references/captures.md +99 -103
- package/dist/skills/foundry/references/cli-conventions.md +3 -3
- package/dist/skills/foundry/references/data-transfer.md +15 -11
- package/dist/skills/foundry/references/settings.md +9 -12
- package/dist/web/assets/{BottomSheet-CCHJmC-l.js → BottomSheet-DQwWhhYI.js} +1 -1
- package/dist/web/assets/{ItemSwipeLayer-X1u8YGUY.js → ItemSwipeLayer-CeyoMSkM.js} +1 -1
- package/dist/web/assets/{MenuBottomSheet-BrAaAVcz.js → MenuBottomSheet-BuaZeZUh.js} +1 -1
- package/dist/web/assets/index-B90pNaUa.js +105 -0
- package/dist/web/assets/{index-D6Lneuo8.css → index-Bjtcyz6x.css} +24 -0
- package/dist/web/index.html +2 -2
- package/package.json +3 -7
- package/dist/drizzle/0000_fuzzy_spectrum.sql +0 -12
- package/dist/drizzle/0001_numerous_scorpion.sql +0 -30
- package/dist/drizzle/meta/0000_snapshot.json +0 -101
- package/dist/drizzle/meta/0001_snapshot.json +0 -302
- package/dist/drizzle/meta/_journal.json +0 -20
- package/dist/web/assets/index-C2YHuD05.js +0 -179
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as n,i as de,u as pe,j as x,p as J,m as $,t as q,f as me}from"./index-
|
|
1
|
+
import{r as n,i as de,u as pe,j as x,p as J,m as $,t as q,f as me}from"./index-B90pNaUa.js";const Q="--_item-swipe-travel",Z="--_item-swipe-dir",F="--_item-swipe-duration",fe=10,xe=48,ke=.5,ge=.5,he=.35,Pe=.6,we=44,ee=24,Ee=200,ye=400,te={isArmed:!1,phase:"idle",side:"leading"};function M(p){return p==="trailing"?-1:1}function L(){return typeof performance>"u"?Date.now():performance.now()}function ne(p){const P=p.querySelectorAll('button, a[href], input, [tabindex]:not([tabindex="-1"])');for(const m of P)if(m.closest("[data-swipe-panel]")==null){m.focus();return}document.activeElement instanceof HTMLElement&&document.activeElement.blur()}function Se({isEnabled:p,behavior:P,sides:m,measurePanel:T,fireOutermost:v,isReducedMotion:b=!1,rootRef:s}){const k=n.useRef(null),C=n.useRef(0),w=n.useRef(1),I=n.useRef(0),f=n.useRef(null),i=n.useRef(null),l=n.useRef(null),[E,g]=n.useState(te),h=n.useRef(E);h.current=E;const u=n.useRef(T),y=n.useRef(v),O=n.useRef(m),R=n.useRef(P),Y=n.useRef(b);n.useEffect(()=>{u.current=T,y.current=v,O.current=m,R.current=P,Y.current=b}),n.useEffect(()=>()=>{f.current!=null&&clearTimeout(f.current),i.current!=null&&cancelAnimationFrame(i.current)},[]);const A=n.useCallback(t=>{const e=s.current;e&&(C.current=t,e.style.setProperty(Q,`${t}px`))},[s]),_=n.useCallback(t=>{const e=s.current;e&&(t>0?e.style.setProperty(F,`${t}ms`):e.style.setProperty(F,"0s"))},[s]),G=n.useCallback(()=>{const t=s.current;t&&(t.style.removeProperty(Q),t.style.removeProperty(Z),t.style.removeProperty(F),C.current=0)},[s]),U=n.useCallback(()=>{i.current!=null&&cancelAnimationFrame(i.current),i.current=null,l.current=null},[]),H=n.useCallback(t=>{l.current=t,i.current==null&&(i.current=requestAnimationFrame(()=>{i.current=null;const e=l.current;l.current=null,e!=null&&A(e)}))},[A]),o=n.useCallback((t,e,r,c)=>{U();const a=Y.current?0:Ee;g({isArmed:!1,phase:"settling",side:t}),_(a),A(e),f.current!=null&&clearTimeout(f.current),f.current=setTimeout(()=>{f.current=null,_(0),c?.()!==!0&&(r==="idle"&&G(),g(r==="idle"?te:{isArmed:!1,phase:r,side:t}))},a)},[U,G,_,A]),K=n.useCallback((t,e)=>{const c=s.current?.clientWidth??0,a=M(t)*e*(c+ee);o(t,a,"held",()=>y.current(t)?!1:(o(t,0,"idle"),!0))},[s,o]),j=n.useCallback(()=>{const t=h.current;if(t.phase!=="resting")return;const e=s.current;e!=null&&e.contains(document.activeElement)&&ne(e),o(t.side,0,"idle")},[s,o]);n.useEffect(()=>{if(E.phase!=="resting")return;const t=e=>{const r=s.current;r!=null&&e.target instanceof Node&&!r.contains(e.target)&&j()};return document.addEventListener("pointerdown",t,!0),()=>{document.removeEventListener("pointerdown",t,!0)}},[j,s,E.phase]),n.useEffect(()=>{const t=s.current;if(t==null||!p)return;const e=r=>{k.current?.claimed===!0&&r.cancelable&&r.preventDefault()};return t.addEventListener("touchmove",e,{passive:!1}),()=>{t.removeEventListener("touchmove",e)}},[p,s]);const re=n.useCallback(t=>{const e=h.current;if(e.phase!=="resting")return;const r=s.current;if(r!=null&&r.contains(document.activeElement)&&ne(r),t()){const a=r?.clientWidth??0,d=M(e.side)*w.current*(a+ee);o(e.side,d,"held")}else o(e.side,0,"idle")},[s,o]),se=n.useCallback(t=>{const e=h.current;if(t.pointerType!=="touch"||k.current!=null||e.phase==="settling"||e.phase==="held")return;const r=s.current,c=de(r)?-1:1;w.current=c;const a=L();k.current={baseTravel:C.current*c,claimed:null,commitPx:0,inlineSign:c,lastTime:a,lastX:t.clientX,panelWidth:0,pointerId:t.pointerId,prevTime:a,prevX:t.clientX,side:e.phase==="resting"?e.side:"leading",startX:t.clientX,startY:t.clientY,travel:0}},[p,s]),ie=n.useCallback(t=>{const e=k.current;if(e==null||e.pointerId!==t.pointerId||e.claimed===!1)return;const r=(t.clientX-e.startX)*e.inlineSign,c=t.clientY-e.startY;if(e.claimed===null){if(Math.max(Math.abs(r),Math.abs(c))<fe)return;if(Math.abs(r)<=Math.abs(c)){e.claimed=!1;return}const N=h.current.phase==="resting"?e.side:r>0?"leading":"trailing";if(!O.current[N]){e.claimed=!1;return}e.claimed=!0,e.side=N,e.panelWidth=u.current(N);const oe=s.current?.clientWidth??0;e.commitPx=Math.max(e.panelWidth+xe,oe*ke),s.current!=null&&s.current.style.setProperty(Z,String(e.inlineSign)),_(0),g({isArmed:!1,phase:"dragging",side:N});try{s.current?.setPointerCapture(t.pointerId)}catch{}}const a=M(e.side),d=Math.max(0,r*a+e.baseTravel*a),W=d<=e.commitPx?d:e.commitPx+(d-e.commitPx)*he,z=d>=e.commitPx;z!==e.travel>=e.commitPx&&g({isArmed:z,phase:"dragging",side:e.side}),e.travel=d,e.prevX=e.lastX,e.prevTime=e.lastTime,e.lastX=t.clientX,e.lastTime=L(),H(a*e.inlineSign*W)},[H,s,_]),X=n.useCallback((t,e)=>{const r=k.current;if(r==null||r.pointerId!==t.pointerId||(k.current=null,r.claimed!==!0))return;I.current=L()+ye;try{s.current?.releasePointerCapture(t.pointerId)}catch{}const{side:c,inlineSign:a}=r,d=M(c)*a*r.panelWidth;if(e){o(c,0,"idle");return}const W=Math.max(1,r.lastTime-r.prevTime),B=M(c)*a*(r.lastX-r.prevX)/W>=Pe&&r.travel>=we;if(r.travel>=r.commitPx||B){K(c,a);return}if(R.current==="reveal"&&r.travel>=r.panelWidth*ge){o(c,d,"resting");return}o(c,0,"idle")},[s,o,K]),ce=n.useCallback(t=>X(t,!1),[X]),le=n.useCallback(t=>X(t,!0),[X]),D=n.useCallback(()=>L()<I.current,[]),ae=n.useCallback(t=>{!D()||t.target instanceof Element&&t.target.closest("[data-swipe-panel]")!=null||(I.current=0,t.preventDefault(),t.stopPropagation())},[D]),ue=n.useCallback(t=>{t.key==="Escape"&&h.current.phase==="resting"&&(t.stopPropagation(),j())},[j]);return{activateEntry:re,close:j,handlers:{onClickCapture:ae,onKeyDown:ue,onPointerCancel:le,onPointerDown:se,onPointerMove:ie,onPointerUp:ce},shouldSuppressClick:D,state:E}}const S={swipePanel:{kVAEAm:"x10l6tqk",k87sOh:"x13vifvy",krVfgx:"x1ey2m1c",kzqmXN:"xnalus7",k1xSpc:"x78zum5",kGNEyG:"x1qjc9v5",kB7OPa:"x9f619",kVQacm:"xb3r6kr",kaIpWk:"x1pjcqnp",k3aq6I:"x145au52",k1ekBW:"x13zkoj4",kIyJzY:"xxfakuu",kAMwcw:"xn34ekc",$$css:!0},swipePanelLeading:{kLqNvP:"x1o0tod",kjj79g:"x1nhvcw1",kzqmXN:"x96shys",$$css:!0},swipePanelTrailing:{kt4wiu:"xtijo5x",kjj79g:"x13a6bvl",kzqmXN:"x1qwjaml",$$css:!0},swipeEntry:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kOIVth:"xzye2dw",k7Eaqz:"x187xtus",kZKoxP:"x5yr21d",kg3NbH:"xrrkdod",kB7OPa:"x9f619",kogj98:"x1ghz6dp",kMzoRj:"xc342km",ksu8eU:"xng3xce",kysU6D:"xjyslct",kkrTdU:"x1ypdohk x16khyan",kMv6JI:"x9ynric",kGuDYH:"x141an7d",k63SB2:"x1e4wzip",kLWn49:"x1ltkj2j",khDVqt:"xuxw1ft",$$css:!0},swipeEntryDisabled:{kSiTet:"xbyyjgo",$$css:!0}},V={neutral:{kWkggS:"x17x4s8c",kMwMTN:"x1tgivj0",$$css:!0},accent:{kWkggS:"x1ewilqj",kMwMTN:"x17wrial",$$css:!0},destructive:{kWkggS:"x1pjz0fi",kMwMTN:"x1m024r3",$$css:!0}};function Te({rootRef:p,onBridge:P,leading:m,trailing:T,behavior:v}){const b=n.useRef(null),s=n.useRef(null),k=pe("(prefers-reduced-motion: reduce)"),C=i=>{const l=i==="leading"?m:T;return l[l.length-1]},w=Se({isEnabled:!0,behavior:v,sides:{leading:m.length>0,trailing:T.length>0},measurePanel:i=>(i==="leading"?b:s).current?.offsetWidth??0,fireOutermost:i=>{const l=C(i);return l==null||l.isDisabled===!0?!1:(l.onActivate(),l.hasRemoval===!0)},isReducedMotion:k,rootRef:p});n.useEffect(()=>(P({handlers:w.handlers,shouldSuppressClick:w.shouldSuppressClick}),()=>{P(null)}));const I=w.state.phase==="resting",f=(i,l)=>{if(l.length===0)return null;const E=l[l.length-1],g=v==="commit",h=I&&!g;return x.jsx("div",{"data-swipe-panel":i,inert:h?void 0:!0,"aria-hidden":g?!0:void 0,...$(q("item-swipe-panel",{side:i}),J(S.swipePanel,i==="leading"?S.swipePanelLeading:S.swipePanelTrailing,V[E.variant??"accent"])),children:x.jsx("div",{ref:i==="leading"?b:s,...{0:{className:"x78zum5 x2lah0s x5yr21d x10xzikg"},1:{className:"x78zum5 x2lah0s x5yr21d x10xzikg x15zctf7"}}[(i==="leading")<<0],children:l.map(u=>{const y=u.variant??"accent",O=x.jsxs(x.Fragment,{children:[u.icon,x.jsx("span",{children:u.label})]}),R=J(S.swipeEntry,V[y],u.isDisabled===!0&&S.swipeEntryDisabled);return g?x.jsx("span",{...$(q("item-swipe-action",{variant:y}),R),children:O},u.id??u.label):x.jsx("button",{type:"button",disabled:u.isDisabled===!0,onClick:()=>w.activateEntry(()=>(u.onActivate(),u.hasRemoval===!0)),...$(q("item-swipe-action",{variant:y}),me.focusVisible(S.swipeEntry,V[y],u.isDisabled===!0&&S.swipeEntryDisabled)),children:O},u.id??u.label)})})},i)};return x.jsxs(x.Fragment,{children:[f("leading",m),f("trailing",T)]})}Te.displayName="ItemSwipeLayer";export{Te as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{BottomSheet as r}from"./BottomSheet-
|
|
1
|
+
import{BottomSheet as r}from"./BottomSheet-DQwWhhYI.js";import{j as e,S as a}from"./index-B90pNaUa.js";function d({finalFocusRef:n,isOpen:o,onOpenChange:t,label:i,children:p}){return e.jsx(r,{finalFocusRef:n,isOpen:o,onOpenChange:t,label:i,height:"hug",purpose:"info",children:e.jsx(a,{paddingBlockStart:4,paddingBlockEnd:0,paddingInline:1,children:p})})}d.displayName="MenuBottomSheet";export{d as MenuBottomSheet};
|