@inkeep/open-knowledge 0.4.0-beta.24 → 0.4.0-beta.25
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/THIRD_PARTY_NOTICES.md +0 -5
- package/dist/assets/skills/open-knowledge/SKILL.md +1 -1
- package/dist/cli.mjs +38 -37
- package/dist/constants-Dlyng5m6.mjs +2 -0
- package/dist/{dist-IguRFGXq.mjs → dist-Cl_t5NRm.mjs} +14 -14
- package/dist/dist-DVNDjpnz.mjs +1 -0
- package/dist/{dist-DSb6dRAy.mjs → dist-JNaknvi7.mjs} +7 -7
- package/dist/index.mjs +1 -1
- package/dist/init-BKrp4NZQ.mjs +1 -0
- package/dist/{init-CMfH982u.mjs → init-uWmRmgCA.mjs} +4 -4
- package/dist/loader-DqxqwNEe.mjs +1 -0
- package/dist/loader-hjhxvSRP.mjs +4 -0
- package/dist/preview-CpmoA4SU.mjs +1 -0
- package/dist/{preview-DgYoFNt8.mjs → preview-vq_EvsiP.mjs} +2 -2
- package/dist/public/assets/{ActivityModeContent-C9by936Y.js → ActivityModeContent-C-OqZ3Ro.js} +1 -1
- package/dist/public/assets/DocumentContext-Ccj8qLzP.js +37 -0
- package/dist/public/assets/{GraphPanel-BIq7awkX.js → GraphPanel-BKsp7Crh.js} +2 -2
- package/dist/public/assets/{OutlinePanel-B5lJ2ZKC.js → OutlinePanel-DP5j1Wq1.js} +1 -1
- package/dist/public/assets/{SettingsDialog-C7u67QFY.js → SettingsDialog-C9FPnh00.js} +2 -2
- package/dist/public/assets/{SourceEditor-BoEQaOVh.js → SourceEditor-mNodigv_.js} +1 -1
- package/dist/public/assets/{config-validation-events-CQhUgigt.js → config-validation-events-BJEehccy.js} +2 -2
- package/dist/public/assets/doc-hash-C9Z2AnUu.js +421 -0
- package/dist/public/assets/{index-C0DBsuvp.js → index-BDj01myg.js} +76 -76
- package/dist/public/assets/{target-navigation-intent-CKIqVD_0.js → target-navigation-intent-FPPCIJIk.js} +1 -1
- package/dist/public/assets/{toggle-group-CHwk3w0Y.js → toggle-group-CP96D5oH.js} +1 -1
- package/dist/public/assets/{tooltip-DNV87xh_.js → tooltip-qQkwljHf.js} +1 -1
- package/dist/public/index.html +8 -8
- package/dist/{src-Bdc8vmx9.mjs → src-jO7GzWRA.mjs} +2 -2
- package/dist/{start-CPFpaTRH.mjs → start-BnicFP1K.mjs} +2 -2
- package/dist/start-CNyWXmFb.mjs +1 -0
- package/package.json +1 -1
- package/dist/constants-CZmHtQUh.mjs +0 -2
- package/dist/dist-BT7_1SJl.mjs +0 -1
- package/dist/init-DesafuF7.mjs +0 -1
- package/dist/loader-C9UcssXM.mjs +0 -1
- package/dist/loader-DvG1wpAx.mjs +0 -4
- package/dist/preview-C8UFVYvI.mjs +0 -1
- package/dist/public/assets/DocumentContext-BWaxMbNn.js +0 -37
- package/dist/public/assets/doc-hash-DAxgYkBj.js +0 -421
- package/dist/start-1_WAnc88.mjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as e}from"./doc-hash-
|
|
1
|
+
import{l as e}from"./doc-hash-C9Z2AnUu.js";import{C as t}from"./button-C1nwPVFQ.js";var n=t(`arrow-up-right`,[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]),r=t(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]);function i(e){switch(e.kind){case`doc`:return`doc`;case`folder`:case`folder-index`:return`folder`;case`missing`:case`asset`:return`missing`}}function a(t,n){let r=e(t,n);return{resolvedTarget:r,hashDocName:r.target,displayState:i(r)}}export{r as n,n as r,a as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CFjPhJqf.js";import{n as t,r as n,t as r}from"./compiler-runtime-CVnuRdak.js";import{I as i,L as a}from"./doc-hash-DAxgYkBj.js";import{S as o,c as s,f as c,h as l,m as u,r as d,s as f,u as p,x as m}from"./button-C1nwPVFQ.js";var h=e(t(),1),g=n(),_=`rovingFocusGroup.onEntryFocus`,v={bubbles:!1,cancelable:!0},y=`RovingFocusGroup`,[b,x,S]=a(y),[C,w]=u(y,[S]),[T,E]=C(y),D=h.forwardRef((e,t)=>(0,g.jsx)(b.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,g.jsx)(b.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,g.jsx)(O,{...e,ref:t})})}));D.displayName=y;var O=h.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:a=!1,dir:o,currentTabStopId:s,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:d,onEntryFocus:b,preventScrollOnEntryFocus:S=!1,...C}=e,w=h.useRef(null),E=m(t,w),D=i(o),[O,k]=p({prop:s,defaultProp:u??null,onChange:d,caller:y}),[A,j]=h.useState(!1),M=f(b),N=x(n),F=h.useRef(!1),[I,L]=h.useState(0);return h.useEffect(()=>{let e=w.current;if(e)return e.addEventListener(_,M),()=>e.removeEventListener(_,M)},[M]),(0,g.jsx)(T,{scope:n,orientation:r,dir:D,loop:a,currentTabStopId:O,onItemFocus:h.useCallback(e=>k(e),[k]),onItemShiftTab:h.useCallback(()=>j(!0),[]),onFocusableItemAdd:h.useCallback(()=>L(e=>e+1),[]),onFocusableItemRemove:h.useCallback(()=>L(e=>e-1),[]),children:(0,g.jsx)(l.div,{tabIndex:A||I===0?-1:0,"data-orientation":r,...C,ref:E,style:{outline:`none`,...e.style},onMouseDown:c(e.onMouseDown,()=>{F.current=!0}),onFocus:c(e.onFocus,e=>{let t=!F.current;if(e.target===e.currentTarget&&t&&!A){let t=new CustomEvent(_,v);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=N().filter(e=>e.focusable);P([e.find(e=>e.active),e.find(e=>e.id===O),...e].filter(Boolean).map(e=>e.ref.current),S)}}F.current=!1}),onBlur:c(e.onBlur,()=>j(!1))})})}),k=`RovingFocusGroupItem`,A=h.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...u}=e,d=s(),f=a||d,p=E(k,n),m=p.currentTabStopId===f,_=x(n),{onFocusableItemAdd:v,onFocusableItemRemove:y,currentTabStopId:S}=p;return h.useEffect(()=>{if(r)return v(),()=>y()},[r,v,y]),(0,g.jsx)(b.ItemSlot,{scope:n,id:f,focusable:r,active:i,children:(0,g.jsx)(l.span,{tabIndex:m?0:-1,"data-orientation":p.orientation,...u,ref:t,onMouseDown:c(e.onMouseDown,e=>{r?p.onItemFocus(f):e.preventDefault()}),onFocus:c(e.onFocus,()=>p.onItemFocus(f)),onKeyDown:c(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){p.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=N(e,p.orientation,p.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=_().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=p.loop?F(n,r+1):n.slice(r+1)}setTimeout(()=>P(n))}}),children:typeof o==`function`?o({isCurrentTabStop:m,hasTabStop:S!=null}):o})})});A.displayName=k;var j={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function M(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function N(e,t,n){let r=M(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return j[r]}function P(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function F(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var I=D,L=A,R=`Toggle`,z=h.forwardRef((e,t)=>{let{pressed:n,defaultPressed:r,onPressedChange:i,...a}=e,[o,s]=p({prop:n,onChange:i,defaultProp:r??!1,caller:R});return(0,g.jsx)(l.button,{type:`button`,"aria-pressed":o,"data-state":o?`on`:`off`,"data-disabled":e.disabled?``:void 0,...a,ref:t,onClick:c(e.onClick,()=>{e.disabled||s(!o)})})});z.displayName=R;var B=`ToggleGroup`,[V,ee]=u(B,[w]),H=w(),U=h.forwardRef((e,t)=>{let{type:n,...r}=e;if(n===`single`)return(0,g.jsx)(K,{...r,ref:t});if(n===`multiple`)return(0,g.jsx)(q,{...r,ref:t});throw Error(`Missing prop \`type\` expected on \`${B}\``)});U.displayName=B;var[W,G]=V(B),K=h.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},...a}=e,[o,s]=p({prop:n,defaultProp:r??``,onChange:i,caller:B});return(0,g.jsx)(W,{scope:e.__scopeToggleGroup,type:`single`,value:h.useMemo(()=>o?[o]:[],[o]),onItemActivate:s,onItemDeactivate:h.useCallback(()=>s(``),[s]),children:(0,g.jsx)(J,{...a,ref:t})})}),q=h.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},...a}=e,[o,s]=p({prop:n,defaultProp:r??[],onChange:i,caller:B}),c=h.useCallback(e=>s((t=[])=>[...t,e]),[s]),l=h.useCallback(e=>s((t=[])=>t.filter(t=>t!==e)),[s]);return(0,g.jsx)(W,{scope:e.__scopeToggleGroup,type:`multiple`,value:o,onItemActivate:c,onItemDeactivate:l,children:(0,g.jsx)(J,{...a,ref:t})})});U.displayName=B;var[te,ne]=V(B),J=h.forwardRef((e,t)=>{let{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:a=!0,orientation:o,dir:s,loop:c=!0,...u}=e,d=H(n),f=i(s),p={role:`group`,dir:f,...u};return(0,g.jsx)(te,{scope:n,rovingFocus:a,disabled:r,children:a?(0,g.jsx)(I,{asChild:!0,...d,orientation:o,dir:f,loop:c,children:(0,g.jsx)(l.div,{...p,ref:t})}):(0,g.jsx)(l.div,{...p,ref:t})})}),Y=`ToggleGroupItem`,X=h.forwardRef((e,t)=>{let n=G(Y,e.__scopeToggleGroup),r=ne(Y,e.__scopeToggleGroup),i=H(e.__scopeToggleGroup),a=n.value.includes(e.value),o=r.disabled||e.disabled,s={...e,pressed:a,disabled:o},c=h.useRef(null);return r.rovingFocus?(0,g.jsx)(L,{asChild:!0,...i,focusable:!o,active:a,ref:c,children:(0,g.jsx)(Z,{...s,ref:t})}):(0,g.jsx)(Z,{...s,ref:t})});X.displayName=Y;var Z=h.forwardRef((e,t)=>{let{__scopeToggleGroup:n,value:r,...i}=e,a=G(Y,n),o={role:`radio`,"aria-checked":e.pressed,"aria-pressed":void 0};return(0,g.jsx)(z,{...a.type===`single`?o:void 0,...i,ref:t,onPressedChange:e=>{e?a.onItemActivate(r):a.onItemDeactivate(r)}})}),re=U,ie=X,Q=r(),ae=o(`group/toggle inline-flex items-center justify-center gap-1 rounded-lg text-sm font-medium whitespace-nowrap transition-all outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-transparent`,outline:`border border-input bg-transparent hover:bg-muted`,segmented:`text-muted-foreground hover:bg-muted-foreground/10 data-[state=on]:bg-background data-[state=on]:shadow-sm data-[state=on]:text-foreground dark:data-[state=on]:bg-muted`},size:{default:`h-8 min-w-8 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,sm:`h-7 min-w-7 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5`,lg:`h-9 min-w-9 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`}},defaultVariants:{variant:`default`,size:`default`}}),$=h.createContext({size:`default`,variant:`default`,spacing:0,orientation:`horizontal`});function oe(e){let t=(0,Q.c)(29),n,r,i,a,o,s,c;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7]):({className:r,variant:c,size:a,spacing:o,orientation:s,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c);let l=o===void 0?0:o,u=s===void 0?`horizontal`:s,f;t[8]===l?f=t[9]:(f={"--gap":l},t[8]=l,t[9]=f);let p=f,m;t[10]===r?m=t[11]:(m=d(`group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-lg data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-vertical:flex-col data-vertical:items-stretch`,r),t[10]=r,t[11]=m);let h;t[12]!==u||t[13]!==a||t[14]!==l||t[15]!==c?(h={variant:c,size:a,spacing:l,orientation:u},t[12]=u,t[13]=a,t[14]=l,t[15]=c,t[16]=h):h=t[16];let _;t[17]!==n||t[18]!==h?(_=(0,g.jsx)($.Provider,{value:h,children:n}),t[17]=n,t[18]=h,t[19]=_):_=t[19];let v;return t[20]!==u||t[21]!==i||t[22]!==a||t[23]!==l||t[24]!==p||t[25]!==m||t[26]!==_||t[27]!==c?(v=(0,g.jsx)(re,{"data-slot":`toggle-group`,"data-variant":c,"data-size":a,"data-spacing":l,"data-orientation":u,style:p,className:m,...i,children:_}),t[20]=u,t[21]=i,t[22]=a,t[23]=l,t[24]=p,t[25]=m,t[26]=_,t[27]=c,t[28]=v):v=t[28],v}function se(e){let t=(0,Q.c)(19),n,r,i,a,o;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5]):({className:r,children:n,variant:a,size:o,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o);let s=a===void 0?`default`:a,c=o===void 0?`default`:o,l=h.use($),u=l.variant||s,f=l.size||c,p=l.spacing,m;t[6]!==r||t[7]!==l.size||t[8]!==l.variant||t[9]!==c||t[10]!==s?(m=d(`shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pr-1.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:pl-1.5 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-lg group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-lg group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-lg group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-lg group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t text-muted-foreground data-[state=on]:text-foreground`,ae({variant:l.variant||s,size:l.size||c}),r),t[6]=r,t[7]=l.size,t[8]=l.variant,t[9]=c,t[10]=s,t[11]=m):m=t[11];let _;return t[12]!==n||t[13]!==l.spacing||t[14]!==i||t[15]!==u||t[16]!==f||t[17]!==m?(_=(0,g.jsx)(ie,{"data-slot":`toggle-group-item`,"data-variant":u,"data-size":f,"data-spacing":p,className:m,...i,children:n}),t[12]=n,t[13]=l.spacing,t[14]=i,t[15]=u,t[16]=f,t[17]=m,t[18]=_):_=t[18],_}export{w as a,I as i,se as n,L as r,oe as t};
|
|
1
|
+
import{o as e}from"./chunk-CFjPhJqf.js";import{n as t,r as n,t as r}from"./compiler-runtime-CVnuRdak.js";import{I as i,L as a}from"./doc-hash-C9Z2AnUu.js";import{S as o,c as s,f as c,h as l,m as u,r as d,s as f,u as p,x as m}from"./button-C1nwPVFQ.js";var h=e(t(),1),g=n(),_=`rovingFocusGroup.onEntryFocus`,v={bubbles:!1,cancelable:!0},y=`RovingFocusGroup`,[b,x,S]=a(y),[C,w]=u(y,[S]),[T,E]=C(y),D=h.forwardRef((e,t)=>(0,g.jsx)(b.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,g.jsx)(b.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,g.jsx)(O,{...e,ref:t})})}));D.displayName=y;var O=h.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:a=!1,dir:o,currentTabStopId:s,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:d,onEntryFocus:b,preventScrollOnEntryFocus:S=!1,...C}=e,w=h.useRef(null),E=m(t,w),D=i(o),[O,k]=p({prop:s,defaultProp:u??null,onChange:d,caller:y}),[A,j]=h.useState(!1),M=f(b),N=x(n),F=h.useRef(!1),[I,L]=h.useState(0);return h.useEffect(()=>{let e=w.current;if(e)return e.addEventListener(_,M),()=>e.removeEventListener(_,M)},[M]),(0,g.jsx)(T,{scope:n,orientation:r,dir:D,loop:a,currentTabStopId:O,onItemFocus:h.useCallback(e=>k(e),[k]),onItemShiftTab:h.useCallback(()=>j(!0),[]),onFocusableItemAdd:h.useCallback(()=>L(e=>e+1),[]),onFocusableItemRemove:h.useCallback(()=>L(e=>e-1),[]),children:(0,g.jsx)(l.div,{tabIndex:A||I===0?-1:0,"data-orientation":r,...C,ref:E,style:{outline:`none`,...e.style},onMouseDown:c(e.onMouseDown,()=>{F.current=!0}),onFocus:c(e.onFocus,e=>{let t=!F.current;if(e.target===e.currentTarget&&t&&!A){let t=new CustomEvent(_,v);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=N().filter(e=>e.focusable);P([e.find(e=>e.active),e.find(e=>e.id===O),...e].filter(Boolean).map(e=>e.ref.current),S)}}F.current=!1}),onBlur:c(e.onBlur,()=>j(!1))})})}),k=`RovingFocusGroupItem`,A=h.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...u}=e,d=s(),f=a||d,p=E(k,n),m=p.currentTabStopId===f,_=x(n),{onFocusableItemAdd:v,onFocusableItemRemove:y,currentTabStopId:S}=p;return h.useEffect(()=>{if(r)return v(),()=>y()},[r,v,y]),(0,g.jsx)(b.ItemSlot,{scope:n,id:f,focusable:r,active:i,children:(0,g.jsx)(l.span,{tabIndex:m?0:-1,"data-orientation":p.orientation,...u,ref:t,onMouseDown:c(e.onMouseDown,e=>{r?p.onItemFocus(f):e.preventDefault()}),onFocus:c(e.onFocus,()=>p.onItemFocus(f)),onKeyDown:c(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){p.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=N(e,p.orientation,p.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=_().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=p.loop?F(n,r+1):n.slice(r+1)}setTimeout(()=>P(n))}}),children:typeof o==`function`?o({isCurrentTabStop:m,hasTabStop:S!=null}):o})})});A.displayName=k;var j={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function M(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function N(e,t,n){let r=M(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return j[r]}function P(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function F(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var I=D,L=A,R=`Toggle`,z=h.forwardRef((e,t)=>{let{pressed:n,defaultPressed:r,onPressedChange:i,...a}=e,[o,s]=p({prop:n,onChange:i,defaultProp:r??!1,caller:R});return(0,g.jsx)(l.button,{type:`button`,"aria-pressed":o,"data-state":o?`on`:`off`,"data-disabled":e.disabled?``:void 0,...a,ref:t,onClick:c(e.onClick,()=>{e.disabled||s(!o)})})});z.displayName=R;var B=`ToggleGroup`,[V,ee]=u(B,[w]),H=w(),U=h.forwardRef((e,t)=>{let{type:n,...r}=e;if(n===`single`)return(0,g.jsx)(K,{...r,ref:t});if(n===`multiple`)return(0,g.jsx)(q,{...r,ref:t});throw Error(`Missing prop \`type\` expected on \`${B}\``)});U.displayName=B;var[W,G]=V(B),K=h.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},...a}=e,[o,s]=p({prop:n,defaultProp:r??``,onChange:i,caller:B});return(0,g.jsx)(W,{scope:e.__scopeToggleGroup,type:`single`,value:h.useMemo(()=>o?[o]:[],[o]),onItemActivate:s,onItemDeactivate:h.useCallback(()=>s(``),[s]),children:(0,g.jsx)(J,{...a,ref:t})})}),q=h.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},...a}=e,[o,s]=p({prop:n,defaultProp:r??[],onChange:i,caller:B}),c=h.useCallback(e=>s((t=[])=>[...t,e]),[s]),l=h.useCallback(e=>s((t=[])=>t.filter(t=>t!==e)),[s]);return(0,g.jsx)(W,{scope:e.__scopeToggleGroup,type:`multiple`,value:o,onItemActivate:c,onItemDeactivate:l,children:(0,g.jsx)(J,{...a,ref:t})})});U.displayName=B;var[te,ne]=V(B),J=h.forwardRef((e,t)=>{let{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:a=!0,orientation:o,dir:s,loop:c=!0,...u}=e,d=H(n),f=i(s),p={role:`group`,dir:f,...u};return(0,g.jsx)(te,{scope:n,rovingFocus:a,disabled:r,children:a?(0,g.jsx)(I,{asChild:!0,...d,orientation:o,dir:f,loop:c,children:(0,g.jsx)(l.div,{...p,ref:t})}):(0,g.jsx)(l.div,{...p,ref:t})})}),Y=`ToggleGroupItem`,X=h.forwardRef((e,t)=>{let n=G(Y,e.__scopeToggleGroup),r=ne(Y,e.__scopeToggleGroup),i=H(e.__scopeToggleGroup),a=n.value.includes(e.value),o=r.disabled||e.disabled,s={...e,pressed:a,disabled:o},c=h.useRef(null);return r.rovingFocus?(0,g.jsx)(L,{asChild:!0,...i,focusable:!o,active:a,ref:c,children:(0,g.jsx)(Z,{...s,ref:t})}):(0,g.jsx)(Z,{...s,ref:t})});X.displayName=Y;var Z=h.forwardRef((e,t)=>{let{__scopeToggleGroup:n,value:r,...i}=e,a=G(Y,n),o={role:`radio`,"aria-checked":e.pressed,"aria-pressed":void 0};return(0,g.jsx)(z,{...a.type===`single`?o:void 0,...i,ref:t,onPressedChange:e=>{e?a.onItemActivate(r):a.onItemDeactivate(r)}})}),re=U,ie=X,Q=r(),ae=o(`group/toggle inline-flex items-center justify-center gap-1 rounded-lg text-sm font-medium whitespace-nowrap transition-all outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-transparent`,outline:`border border-input bg-transparent hover:bg-muted`,segmented:`text-muted-foreground hover:bg-muted-foreground/10 data-[state=on]:bg-background data-[state=on]:shadow-sm data-[state=on]:text-foreground dark:data-[state=on]:bg-muted`},size:{default:`h-8 min-w-8 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,sm:`h-7 min-w-7 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5`,lg:`h-9 min-w-9 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`}},defaultVariants:{variant:`default`,size:`default`}}),$=h.createContext({size:`default`,variant:`default`,spacing:0,orientation:`horizontal`});function oe(e){let t=(0,Q.c)(29),n,r,i,a,o,s,c;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7]):({className:r,variant:c,size:a,spacing:o,orientation:s,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c);let l=o===void 0?0:o,u=s===void 0?`horizontal`:s,f;t[8]===l?f=t[9]:(f={"--gap":l},t[8]=l,t[9]=f);let p=f,m;t[10]===r?m=t[11]:(m=d(`group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-lg data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-vertical:flex-col data-vertical:items-stretch`,r),t[10]=r,t[11]=m);let h;t[12]!==u||t[13]!==a||t[14]!==l||t[15]!==c?(h={variant:c,size:a,spacing:l,orientation:u},t[12]=u,t[13]=a,t[14]=l,t[15]=c,t[16]=h):h=t[16];let _;t[17]!==n||t[18]!==h?(_=(0,g.jsx)($.Provider,{value:h,children:n}),t[17]=n,t[18]=h,t[19]=_):_=t[19];let v;return t[20]!==u||t[21]!==i||t[22]!==a||t[23]!==l||t[24]!==p||t[25]!==m||t[26]!==_||t[27]!==c?(v=(0,g.jsx)(re,{"data-slot":`toggle-group`,"data-variant":c,"data-size":a,"data-spacing":l,"data-orientation":u,style:p,className:m,...i,children:_}),t[20]=u,t[21]=i,t[22]=a,t[23]=l,t[24]=p,t[25]=m,t[26]=_,t[27]=c,t[28]=v):v=t[28],v}function se(e){let t=(0,Q.c)(19),n,r,i,a,o;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5]):({className:r,children:n,variant:a,size:o,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o);let s=a===void 0?`default`:a,c=o===void 0?`default`:o,l=h.use($),u=l.variant||s,f=l.size||c,p=l.spacing,m;t[6]!==r||t[7]!==l.size||t[8]!==l.variant||t[9]!==c||t[10]!==s?(m=d(`shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pr-1.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:pl-1.5 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-lg group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-lg group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-lg group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-lg group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t text-muted-foreground data-[state=on]:text-foreground`,ae({variant:l.variant||s,size:l.size||c}),r),t[6]=r,t[7]=l.size,t[8]=l.variant,t[9]=c,t[10]=s,t[11]=m):m=t[11];let _;return t[12]!==n||t[13]!==l.spacing||t[14]!==i||t[15]!==u||t[16]!==f||t[17]!==m?(_=(0,g.jsx)(ie,{"data-slot":`toggle-group-item`,"data-variant":u,"data-size":f,"data-spacing":p,className:m,...i,children:n}),t[12]=n,t[13]=l.spacing,t[14]=i,t[15]=u,t[16]=f,t[17]=m,t[18]=_):_=t[18],_}export{w as a,I as i,se as n,L as r,oe as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CFjPhJqf.js";import{n as t,r as n,t as r}from"./compiler-runtime-CVnuRdak.js";import{C as i,R as a,S as o,T as s,w as c,x as l}from"./doc-hash-
|
|
1
|
+
import{o as e}from"./chunk-CFjPhJqf.js";import{n as t,r as n,t as r}from"./compiler-runtime-CVnuRdak.js";import{C as i,R as a,S as o,T as s,w as c,x as l}from"./doc-hash-C9Z2AnUu.js";import{a as u,c as d,f,h as p,l as m,m as h,o as g,r as _,u as ee,x as v,y}from"./button-C1nwPVFQ.js";var b=e(t(),1),x=n(),[S,te]=h(`Tooltip`,[s]),C=s(),w=`TooltipProvider`,T=700,E=`tooltip.open`,[D,O]=S(w),k=e=>{let{__scopeTooltip:t,delayDuration:n=T,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=b.useRef(!0),s=b.useRef(!1),c=b.useRef(0);return b.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,x.jsx)(D,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:b.useCallback(()=>{window.clearTimeout(c.current),o.current=!1},[]),onClose:b.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:b.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})};k.displayName=w;var A=`Tooltip`,[j,M]=S(A),N=e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,l=O(A,e.__scopeTooltip),u=C(t),[f,p]=b.useState(null),m=d(),h=b.useRef(0),g=o??l.disableHoverableContent,_=s??l.delayDuration,v=b.useRef(!1),[y,S]=ee({prop:r,defaultProp:i??!1,onChange:e=>{e?(l.onOpen(),document.dispatchEvent(new CustomEvent(E))):l.onClose(),a?.(e)},caller:A}),te=b.useMemo(()=>y?v.current?`delayed-open`:`instant-open`:`closed`,[y]),w=b.useCallback(()=>{window.clearTimeout(h.current),h.current=0,v.current=!1,S(!0)},[S]),T=b.useCallback(()=>{window.clearTimeout(h.current),h.current=0,S(!1)},[S]),D=b.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{v.current=!0,S(!0),h.current=0},_)},[_,S]);return b.useEffect(()=>()=>{h.current&&=(window.clearTimeout(h.current),0)},[]),(0,x.jsx)(c,{...u,children:(0,x.jsx)(j,{scope:t,contentId:m,open:y,stateAttribute:te,trigger:f,onTriggerChange:p,onTriggerEnter:b.useCallback(()=>{l.isOpenDelayedRef.current?D():w()},[l.isOpenDelayedRef,D,w]),onTriggerLeave:b.useCallback(()=>{g?T():(window.clearTimeout(h.current),h.current=0)},[T,g]),onOpen:w,onClose:T,disableHoverableContent:g,children:n})})};N.displayName=A;var P=`TooltipTrigger`,F=b.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=M(P,n),a=O(P,n),o=C(n),s=v(t,b.useRef(null),i.onTriggerChange),c=b.useRef(!1),u=b.useRef(!1),d=b.useCallback(()=>c.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener(`pointerup`,d),[d]),(0,x.jsx)(l,{asChild:!0,...o,children:(0,x.jsx)(p.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:s,onPointerMove:f(e.onPointerMove,e=>{e.pointerType!==`touch`&&!u.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),u.current=!0)}),onPointerLeave:f(e.onPointerLeave,()=>{i.onTriggerLeave(),u.current=!1}),onPointerDown:f(e.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener(`pointerup`,d,{once:!0})}),onFocus:f(e.onFocus,()=>{c.current||i.onOpen()}),onBlur:f(e.onBlur,i.onClose),onClick:f(e.onClick,i.onClose)})})});F.displayName=P;var I=`TooltipPortal`,[L,R]=S(I,{forceMount:void 0}),z=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=M(I,t);return(0,x.jsx)(L,{scope:t,forceMount:n,children:(0,x.jsx)(m,{present:n||a.open,children:(0,x.jsx)(u,{asChild:!0,container:i,children:r})})})};z.displayName=I;var B=`TooltipContent`,V=b.forwardRef((e,t)=>{let n=R(B,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=M(B,e.__scopeTooltip);return(0,x.jsx)(m,{present:r||o.open,children:o.disableHoverableContent?(0,x.jsx)(K,{side:i,...a,ref:t}):(0,x.jsx)(H,{side:i,...a,ref:t})})}),H=b.forwardRef((e,t)=>{let n=M(B,e.__scopeTooltip),r=O(B,e.__scopeTooltip),i=b.useRef(null),a=v(t,i),[o,s]=b.useState(null),{trigger:c,onClose:l}=n,u=i.current,{onPointerInTransitChange:d}=r,f=b.useCallback(()=>{s(null),d(!1)},[d]),p=b.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=X(r,Y(r,n.getBoundingClientRect())),a=Z(t.getBoundingClientRect());s(re([...i,...a])),d(!0)},[d]);return b.useEffect(()=>()=>f(),[f]),b.useEffect(()=>{if(c&&u){let e=e=>p(e,u),t=e=>p(e,c);return c.addEventListener(`pointerleave`,e),u.addEventListener(`pointerleave`,t),()=>{c.removeEventListener(`pointerleave`,e),u.removeEventListener(`pointerleave`,t)}}},[c,u,p,f]),b.useEffect(()=>{if(o){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),i=!ne(n,o);r?f():i&&(f(),l())};return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,f]),(0,x.jsx)(K,{...e,ref:a})}),[U,W]=S(A,{isInside:!1}),G=y(`TooltipContent`),K=b.forwardRef((e,t)=>{let{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:c,...l}=e,u=M(B,n),d=C(n),{onClose:f}=u;return b.useEffect(()=>(document.addEventListener(E,f),()=>document.removeEventListener(E,f)),[f]),b.useEffect(()=>{if(u.trigger){let e=e=>{e.target?.contains(u.trigger)&&f()};return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[u.trigger,f]),(0,x.jsx)(g,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:e=>e.preventDefault(),onDismiss:f,children:(0,x.jsxs)(i,{"data-state":u.stateAttribute,...d,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-tooltip-content-available-width":`var(--radix-popper-available-width)`,"--radix-tooltip-content-available-height":`var(--radix-popper-available-height)`,"--radix-tooltip-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-tooltip-trigger-height":`var(--radix-popper-anchor-height)`},children:[(0,x.jsx)(G,{children:r}),(0,x.jsx)(U,{scope:n,isInside:!0,children:(0,x.jsx)(a,{id:u.contentId,role:`tooltip`,children:o||r})})]})})});V.displayName=B;var q=`TooltipArrow`,J=b.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=C(n);return W(q,n).isInside?null:(0,x.jsx)(o,{...i,...r,ref:t})});J.displayName=q;function Y(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}function X(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function Z(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function ne(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function re(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),ie(t)}function ie(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Q=k,ae=N,oe=F,se=z,ce=V,le=J,$=r();function ue(e){let t=(0,$.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({delayDuration:r,...n}=e,t[0]=e,t[1]=n,t[2]=r);let i=r===void 0?0:r,a;return t[3]!==i||t[4]!==n?(a=(0,x.jsx)(Q,{"data-slot":`tooltip-provider`,delayDuration:i,...n}),t[3]=i,t[4]=n,t[5]=a):a=t[5],a}function de(e){let t=(0,$.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,x.jsx)(ae,{"data-slot":`tooltip`,...n}),t[2]=n,t[3]=r),r}function fe(e){let t=(0,$.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,x.jsx)(oe,{"data-slot":`tooltip-trigger`,...n}),t[2]=n,t[3]=r),r}function pe(e){let t=(0,$.c)(13),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:r,sideOffset:a,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=a===void 0?0:a,s;t[5]===r?s=t[6]:(s=_(`z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,r),t[5]=r,t[6]=s);let c;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,x.jsx)(le,{className:`z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground`}),t[7]=c):c=t[7];let l;return t[8]!==n||t[9]!==i||t[10]!==o||t[11]!==s?(l=(0,x.jsx)(se,{children:(0,x.jsxs)(ce,{"data-slot":`tooltip-content`,sideOffset:o,className:s,...i,children:[n,c]})}),t[8]=n,t[9]=i,t[10]=o,t[11]=s,t[12]=l):l=t[12],l}export{fe as i,pe as n,ue as r,de as t};
|
package/dist/public/index.html
CHANGED
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
-->
|
|
42
42
|
<script>(() => { let t = 'system'; try { const r = localStorage.getItem('ok-theme-v1'); if (r === 'light' || r === 'dark' || r === 'system') t = r; } catch {} let dark = t === 'dark'; if (t === 'system') { try { dark = window.matchMedia('(prefers-color-scheme: dark)').matches; } catch {} } if (dark) document.documentElement.classList.add('dark'); })();</script>
|
|
43
43
|
<style>html { background-color: #fafafa } html.dark { background-color: #171717 }</style>
|
|
44
|
-
<script type="module" crossorigin src="./assets/index-
|
|
44
|
+
<script type="module" crossorigin src="./assets/index-BDj01myg.js"></script>
|
|
45
45
|
<link rel="modulepreload" crossorigin href="./assets/chunk-CFjPhJqf.js">
|
|
46
46
|
<link rel="modulepreload" crossorigin href="./assets/preload-helper-2ej06EnG.js">
|
|
47
47
|
<link rel="modulepreload" crossorigin href="./assets/w3c-keyname-B5t0fahT.js">
|
|
@@ -51,24 +51,24 @@
|
|
|
51
51
|
<link rel="modulepreload" crossorigin href="./assets/compiler-runtime-CVnuRdak.js">
|
|
52
52
|
<link rel="modulepreload" crossorigin href="./assets/button-C1nwPVFQ.js">
|
|
53
53
|
<link rel="modulepreload" crossorigin href="./assets/dist-Cg-Qaqw_.js">
|
|
54
|
-
<link rel="modulepreload" crossorigin href="./assets/doc-hash-
|
|
54
|
+
<link rel="modulepreload" crossorigin href="./assets/doc-hash-C9Z2AnUu.js">
|
|
55
55
|
<link rel="modulepreload" crossorigin href="./assets/dist-WhY-UbDY.js">
|
|
56
56
|
<link rel="modulepreload" crossorigin href="./assets/propagation-api-3kmMXRwS.js">
|
|
57
57
|
<link rel="modulepreload" crossorigin href="./assets/dist-OTL8-1C2.js">
|
|
58
58
|
<link rel="modulepreload" crossorigin href="./assets/dist-Bej94Urx.js">
|
|
59
59
|
<link rel="modulepreload" crossorigin href="./assets/input-BOmkuBId.js">
|
|
60
|
-
<link rel="modulepreload" crossorigin href="./assets/DocumentContext-
|
|
60
|
+
<link rel="modulepreload" crossorigin href="./assets/DocumentContext-Ccj8qLzP.js">
|
|
61
61
|
<link rel="modulepreload" crossorigin href="./assets/panel-8fydlQgn.js">
|
|
62
|
-
<link rel="modulepreload" crossorigin href="./assets/OutlinePanel-
|
|
62
|
+
<link rel="modulepreload" crossorigin href="./assets/OutlinePanel-DP5j1Wq1.js">
|
|
63
63
|
<link rel="modulepreload" crossorigin href="./assets/label-Dv_9VZWz.js">
|
|
64
|
-
<link rel="modulepreload" crossorigin href="./assets/toggle-group-
|
|
64
|
+
<link rel="modulepreload" crossorigin href="./assets/toggle-group-CP96D5oH.js">
|
|
65
65
|
<link rel="modulepreload" crossorigin href="./assets/dialog-BFN-ujuF.js">
|
|
66
66
|
<link rel="modulepreload" crossorigin href="./assets/textarea-57j4gLcZ.js">
|
|
67
|
-
<link rel="modulepreload" crossorigin href="./assets/config-validation-events-
|
|
67
|
+
<link rel="modulepreload" crossorigin href="./assets/config-validation-events-BJEehccy.js">
|
|
68
68
|
<link rel="modulepreload" crossorigin href="./assets/checkbox-DBLbPikY.js">
|
|
69
|
-
<link rel="modulepreload" crossorigin href="./assets/tooltip-
|
|
69
|
+
<link rel="modulepreload" crossorigin href="./assets/tooltip-qQkwljHf.js">
|
|
70
70
|
<link rel="modulepreload" crossorigin href="./assets/agent-presence-BrTlNKmt.js">
|
|
71
|
-
<link rel="modulepreload" crossorigin href="./assets/target-navigation-intent-
|
|
71
|
+
<link rel="modulepreload" crossorigin href="./assets/target-navigation-intent-FPPCIJIk.js">
|
|
72
72
|
<link rel="modulepreload" crossorigin href="./assets/consent-store-lB0p7dI5.js">
|
|
73
73
|
<link rel="stylesheet" crossorigin href="./assets/index-BzPHdvNz.css">
|
|
74
74
|
</head>
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as e,d as t,s as n}from"./init-
|
|
2
|
-
//# sourceMappingURL=src-
|
|
1
|
+
import{c as e,d as t,s as n}from"./init-uWmRmgCA.mjs";import"./loader-hjhxvSRP.mjs";import"./preview-vq_EvsiP.mjs";function r(r,i,a={}){let o=[];for(let n of i){let i=t[n],s=i.projectConfigPath?.(r);if(!s){o.push({editorId:n,outcome:`skipped-no-project-surface`});continue}let c;try{c=e(i,r,a,void 0,s)}catch(e){o.push({editorId:n,outcome:`failed`,error:e instanceof Error?e.message:String(e)});continue}if(c.action===`written`||c.action===`overwritten`){o.push({editorId:n,outcome:c.action});continue}if(c.action===`failed`){o.push({editorId:n,outcome:`failed`,error:c.error});continue}o.push({editorId:n,outcome:`failed`,error:`unexpected project-scope action: ${c.action}`})}return{editorOutcomes:o,claudeLaunchJson:i.includes(`claude`)?n(r,a):void 0}}export{r as t};
|
|
2
|
+
//# sourceMappingURL=src-jO7GzWRA.mjs.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{n as e,t}from"./esm-CEs3LWY3.mjs";import"./dist-
|
|
1
|
+
import{n as e,t}from"./esm-CEs3LWY3.mjs";import"./dist-Cl_t5NRm.mjs";import{n}from"./constants-Dlyng5m6.mjs";import{spawn as r}from"node:child_process";import{join as i}from"node:path";import{closeSync as a,existsSync as o,mkdirSync as s,openSync as c,statSync as l}from"node:fs";import{homedir as u}from"node:os";import{setTimeout as d}from"node:timers/promises";const f=`Open Knowledge.app`,p=`/Applications/${f}`;function m(){return{platform:process.platform,env:process.env,execPath:process.execPath,isTTY:process.stdout.isTTY,statSync:e=>{try{return l(e,{throwIfNoEntry:!1})??null}catch{return null}}}}function h(e){if(e.env.ELECTRON_RUN_AS_NODE===`1`){let t=/(.+?\.app)\/Contents\/MacOS\//.exec(e.execPath);if(t?.[1])return t[1]}if(g(e,p))return p;let t=i(e.homeDir??u(),`Applications`,f);return g(e,t)?t:null}function g(e,t){try{let n=i(t,`Contents`,`MacOS`,`Open Knowledge`),r=e.statSync(n);return r&&typeof r.isFile==`function`?r.isFile():!1}catch{return!1}}function _(e){if(e.env.OK_FORCE_BROWSER===`1`)return{available:!1,reason:`force-browser`};if(e.platform!==`darwin`)return{available:!1,reason:`darwin-only`};let t;try{t=h(e)}catch{return{available:!1,reason:`stat-error`}}return t?e.env.OK_FORCE_DESKTOP===`1`?{available:!0,reason:`available`,bundlePath:t}:e.isTTY!==!0||e.env.SSH_CONNECTION||e.env.SSH_TTY?{available:!1,reason:`headless`,bundlePath:t}:{available:!0,reason:`available`,bundlePath:t}:{available:!1,reason:`no-bundle`}}function v(e){(e.log??(e=>console.error(e)))("Launching Open Knowledge desktop… (use `ok start` for the browser server, or `OK_FORCE_BROWSER=1` to always skip)"),e.spawn(`open`,[`-b`,`com.inkeep.open-knowledge`],{detached:!0,stdio:`ignore`}).unref()}function y(e=`no-bundle`){switch(e){case`no-bundle`:return`Desktop app not found at ${p}. Install via DMG, or omit --mode for browser mode.`;case`darwin-only`:return`Desktop app is macOS-only on this release. Use --mode=browser, or omit --mode for the server fallback.`;case`headless`:return`Desktop launch is gated in headless contexts (CI, SSH, non-TTY stdout). Set OK_FORCE_DESKTOP=1 to override, or use --mode=browser.`;case`force-browser`:return`OK_FORCE_BROWSER=1 is set — desktop dispatch is disabled. Unset it to use --mode=app.`;case`stat-error`:return`Failed to inspect desktop bundle at ${p} (filesystem error). Check permissions or use --mode=browser.`;case`available`:return`Desktop app appears available at ${p} but launch dispatch did not fire (caller bug).`}}function b(){let e=process.execPath,t=process.argv[1];return t?{command:e,prefixArgs:[t]}:(console.warn(`[self-spawn] process.argv[1] is empty — falling back to \`npx @inkeep/open-knowledge\`. This re-introduces the version-drift surface that re-exec was fixing. Observed argv: ${JSON.stringify(process.argv)}`),{command:`npx`,prefixArgs:[`@inkeep/open-knowledge`]})}function x(e,t){return e.host??t.HOST??`localhost`}var S=class extends Error{cwd;constructor(e){super("This directory isn't set up yet. Run `ok init` first, then `ok start` again."),this.name=`OkDirMissingError`,this.cwd=e}};function C(e){return e.uiLock?e.isAlive(e.uiLock.pid)?{action:`skip`,reason:`alive`,pid:e.uiLock.pid,port:e.uiLock.port}:{action:`spawn`,reason:`stale`,stalePid:e.uiLock.pid}:{action:`spawn`,reason:`absent`}}function w(e){o(e.lockDir)||s(e.lockDir,{recursive:!0});let t=c(i(e.lockDir,`last-spawn-error.log`),`w`),n=e.spawn??r,{PORT:l,...u}=process.env,d=b();try{let r=n(d.command,[...d.prefixArgs,...e.args??[`ui`]],{detached:!0,stdio:[`ignore`,`ignore`,t],cwd:e.cwd,env:u});return r.unref(),r}finally{try{a(t)}catch{}}}async function T(e){let t=e.now()+e.timeoutMs;for(;e.now()<t;){let t=e.readUiLock();if(t&&t.port>0)return t.port;await e.sleep(e.pollIntervalMs)}let n=e.readUiLock();return n&&n.port>0?n.port:null}function E(e){let t=e.sigtermGraceMs??1e4,n=e.sigtermPollIntervalMs??200,r=e.sleep??(e=>d(e));return async()=>{try{let i=e.readUiLock();if(i&&e.isAlive(i.pid))try{e.killPid(i.pid,`SIGTERM`),e.log?.info({pid:i.pid,port:i.port},`idle-shutdown: SIGTERM UI sibling`);let a=Date.now()+t;for(;Date.now()<a&&e.isAlive(i.pid);)await r(n);if(e.isAlive(i.pid))try{e.killPid(i.pid,`SIGKILL`),e.log?.warn({pid:i.pid,graceMs:t},`idle-shutdown: SIGTERM grace expired — escalated to SIGKILL`)}catch(t){e.log?.error({pid:i.pid,err:t instanceof Error?t.message:String(t)},`idle-shutdown: SIGKILL failed`)}}catch(t){e.log?.warn({pid:i.pid,err:t instanceof Error?t.message:String(t)},`idle-shutdown: failed to SIGTERM UI sibling`)}}catch(t){e.log?.warn({err:t instanceof Error?t.message:String(t)},`idle-shutdown: UI lookup failed; proceeding with destroy`)}await e.destroy()}}async function D(e){let{config:t,cwd:n,host:r}=e,i=e.skipAutoInit??!1,a=e.skipUiAutoSpawn??!1,o=e.idleThresholdMs??18e5,{existsSync:s,mkdirSync:c}=await import(`node:fs`),{resolve:l}=await import(`node:path`),{bootServer:u,getLogger:f,isProcessAlive:p,readUiLock:m,resolveContentDir:h}=await import(`./dist-DVNDjpnz.mjs`),g=e.log??f(`start`),_=l(n,`.ok`);if(!i&&!s(_))throw new S(n);let v=h(t,n);s(v)||(c(v,{recursive:!0}),g.info({contentDir:v},`Created content directory`));let y=null,b=await u({config:t,contentDir:v,projectDir:n,contentRoot:t.content.dir,port:e.port,host:r,quiet:!1,localOpCliArgs:[process.execPath,process.argv[1]],attachUiSibling:!0,idleShutdownMs:o,skipAutoInit:!0,spawnUiSiblingFn:async({lockDir:t})=>{if(y=C({uiLock:m(t),isAlive:p}),y.action===`spawn`&&!a)try{w({lockDir:t,cwd:n,spawn:e.spawn}),g.info({reason:y.reason},`[start] auto-spawned ok ui sibling`)}catch(e){console.warn(`[start] failed to auto-spawn ok ui: ${e instanceof Error?e.message:String(e)}`)}else y.action===`skip`&&g.info({port:y.port,pid:y.pid},`UI already running at port ${y.port}`)},idleShutdownHandler:e=>E({readUiLock:()=>m(b.lockDir),isAlive:p,killPid:(e,t)=>{process.kill(e,t)},destroy:e,log:g}),log:g});y||={action:`skip`,reason:`alive`,pid:0,port:0};let x=y,D=null;if(x.action===`skip`)D=x.port>0?x.port:null;else if(!a){let t=e.uiBindTimeoutMs??3e3;D=await T({readUiLock:()=>m(b.lockDir),now:Date.now,sleep:e=>d(e),timeoutMs:t,pollIntervalMs:50}),D===null&&g.warn({timeoutMs:t},`[start] ok ui did not bind within timeout — banner falls back to API URL`)}return{httpServer:b.httpServer,destroy:b.destroy,lockDir:b.lockDir,contentDir:v,port:b.port,ready:b.ready,degraded:b.degraded,uiSpawnDecision:y,resolvedUiPort:D}}function O(t){if(t===`browser`||t===`app`)return t;throw new e(`--mode must be 'browser' or 'app'`)}async function k(e,t){let{renderBanner:r}=await import(`./banner-DdbR6AZr.mjs`),{dim:i,error:a,warning:o}=await import(`./colors-T3xmlXQT.mjs`),s=process.cwd(),c=e,l=x(t,process.env),u=t.port===void 0?void 0:Number(t.port),d=process.env.PORT?Number(process.env.PORT):void 0,f=u??d,p;try{p=await D({config:c,cwd:s,host:l,port:f})}catch(e){e instanceof S&&(console.error(a(e.message)),process.exit(1));let t=A(e,s,await import(`./dist-DVNDjpnz.mjs`));t!==null&&(console.error(a(t)),process.exit(1)),console.error(`${a(`Failed to start:`)} ${e instanceof Error?e.stack??e.message:String(e)}`),process.exit(1)}let m=!1,h=async e=>{if(!m){m=!0,console.log(i(`\nShutting down (${e})...`));try{await p.destroy()}catch(e){console.error(`${a(`destroy() failed:`)} ${e instanceof Error?e.stack??e.message:String(e)}`),process.exitCode=1}process.exit(process.exitCode??0)}};process.once(`SIGINT`,()=>{h(`SIGINT`)}),process.once(`SIGTERM`,()=>{h(`SIGTERM`)});let g=`http://${l}:${p.port}`,_=l===`0.0.0.0`||l===`::`?`http://0.0.0.0:${p.port}`:void 0,v=p.resolvedUiPort,y=v!==null&&v>0?`http://${l}:${v}`:g;console.log(r({name:`open-knowledge`,version:n,localUrl:y,apiUrl:y===g?void 0:g,networkUrl:_}));let b={"shadow-repo":`Version history and branch-switch safety unavailable`,"file-watcher":`External file changes will not sync to the editor`,"head-watcher":`Git branch switches may cause document inconsistency`};p.ready.then(async()=>{if(p.degraded.length>0){console.log();for(let e of p.degraded){let t=b[e]??`${e} (check server logs for details)`;console.warn(` ${o(`⚠`)} ${o(e)}: ${i(t)}`)}console.log()}if(t.open){let{openBrowser:e}=await import(`./open-browser-BOeCxs2W.mjs`);e(y)}}).catch(e=>{console.error(` ${a(`Server initialization failed:`)} ${e instanceof Error?e.message:String(e)}`)})}function A(e,t,n){let r=n.ServerLockCollisionError;if(r===void 0||!(e instanceof r))return null;try{let e=i(t,`.ok`),r=n.readServerLock(e);return r?r.kind===`interactive`?`Open Knowledge desktop is currently running on this project. Quit it or use --cwd to point elsewhere.`:r.kind===`mcp-spawned`?"An MCP-spawned server holds this lock; it should release on idle-shutdown (~30 min). Or run `ok stop`.":"Open Knowledge server is already running on this project — check `ok status` or `ok stop`.":"Open Knowledge server is already running on this project — check `ok status` or `ok stop`."}catch{return null}}function j(e){return new t(`start`).description(`Start the knowledge base collab server`).option(`-p, --port <port>`,`Server port`,void 0).option(`-H, --host <host>`,`Server host`,void 0).option(`--open`,`Open browser after start`).option(`--mode <mode>`,`Force dispatch mode: 'browser' or 'app'`,O).action(async t=>{let n=e();if(t.mode===`app`){t.open&&(process.stderr.write(`error: option '--mode=app' cannot be combined with '--open' (--open opens a browser tab against the local server, which app mode does not boot)
|
|
2
2
|
`),process.exit(2));let e=[];if(t.port!==void 0&&e.push(`--port`),t.host!==void 0&&e.push(`--host`),e.length>0){let t=process.env.OK_LOG_LEVEL??`info`;(t===`debug`||t===`trace`)&&console.error(`--mode=app: ignoring ${e.join(`, `)}`)}let n=_(m());if(n.available){v({spawn:r});return}console.error(y(n.reason)),process.exit(1)}await k(n,t)})}export{C as a,w as c,b as d,m as f,E as i,j as l,v as m,T as n,x as o,_ as p,D as r,k as s,S as t,A as u};
|
|
3
|
-
//# sourceMappingURL=start-
|
|
3
|
+
//# sourceMappingURL=start-BnicFP1K.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{l as e}from"./start-BnicFP1K.mjs";export{e as startCommand};
|
package/package.json
CHANGED
package/dist/dist-BT7_1SJl.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Ft as e,In as t,Nt as n,O as r,Pn as i,xt as a,yn as o}from"./dist-IguRFGXq.mjs";import{_ as s,a as c,c as l,d as u,f as d,g as f,i as p,l as m,m as h,n as g,o as _,p as v,r as y,s as b,t as x,u as S}from"./server-lock-D7DXNVql-BRVVzA6T.mjs";import{$ as C,$n as w,$t as T,A as E,An as D,At as O,B as k,Bn as A,Bt as j,C as M,Cn as N,Ct as P,D as F,Dn as I,Dt as L,E as R,En as z,Et as B,F as V,Fn as H,Ft as U,G as W,Gn as G,Gt as K,H as q,Hn as J,Ht as Y,I as X,In as Z,It as Q,J as $,Jn as ee,Jt as te,K as ne,Kn as re,Kt as ie,L as ae,Ln as oe,Lt as se,M as ce,Mn as le,Mt as ue,N as de,Nn as fe,Nt as pe,O as me,On as he,Ot as ge,P as _e,Pn as ve,Pt as ye,Q as be,Qn as xe,Qt as Se,R as Ce,Rn as we,Rt as Te,S as Ee,Sn as De,St as Oe,T as ke,Tn as Ae,Tt as je,U as Me,Un as Ne,Ut as Pe,V as Fe,Vn as Ie,Vt as Le,W as Re,Wn as ze,Wt as Be,X as Ve,Xn as He,Xt as Ue,Y as We,Yn as Ge,Yt as Ke,Z as qe,Zn as Je,Zt as Ye,_ as Xe,_n as Ze,_r as Qe,_t as $e,a as et,an as tt,ar as nt,at as rt,b as it,bn as at,bt as ot,c as st,cn as ct,cr as lt,ct as ut,d as dt,dn as ft,dt as pt,en as mt,er as ht,et as gt,f as _t,fn as vt,ft as yt,g as bt,gn as xt,gt as St,h as Ct,hn as wt,ht as Tt,i as Et,in as Dt,ir as Ot,it as kt,j as At,jn as jt,jt as Mt,k as Nt,kn as Pt,kt as Ft,l as It,ln as Lt,lt as Rt,m as zt,mn as Bt,mt as Vt,n as Ht,nn as Ut,nr as Wt,nt as Gt,o as Kt,on as qt,or as Jt,ot as Yt,p as Xt,pn as Zt,pt as Qt,q as $t,qn as en,qt as tn,r as nn,rn,rr as an,rt as on,s as sn,sn as cn,sr as ln,st as un,t as dn,tn as fn,tr as pn,tt as mn,u as hn,un as gn,ut as _n,v as vn,vn as yn,vr as bn,vt as xn,w as Sn,wn as Cn,wt as wn,x as Tn,xn as En,xt as Dn,y as On,yn as kn,yt as An,z as jn,zn as Mn,zt as Nn}from"./dist-DSb6dRAy.mjs";export{dn as AGENT_ID_MAX_LEN,Ht as AGENT_ID_RE,nn as AGENT_WRITE_ORIGIN,Et as AgentFocusBroadcaster,et as AgentPresenceBroadcaster,Kt as AgentSessionCapacityError,sn as AgentSessionManager,st as BacklinkIndex,It as CC1Broadcaster,r as CC1_CONTRACT_VERSION,hn as CONFLICT_MARKER_RE,dt as CURSOR_BUNDLE_PATHS_BY_PLATFORM,_t as ConfigSchema,Xt as DEFAULT_CHECKPOINT_RETENTION,zt as FILE_SYSTEM_WRITER,Ct as FILE_WATCHER_ORIGIN,bt as GIT_UPSTREAM_WRITER,Qe as GitDirAccessError,Xe as HOCUSPOCUS_AUTH_REJECTION_REASONS,vn as HocuspocusAuthRejection,On as HocuspocusAuthTokenSchema,it as INSTALLED_AGENTS_SCHEMES,Tn as LIVE_DERIVED_INDEX_DEBOUNCE_MS,Ee as LOG_MD_TEMPLATE,M as MANAGED_RENAME_ORIGIN,Sn as MAX_AGENT_SESSIONS,ke as MCP_CONNECTION_ID_HEADER,R as MCP_SERVER_NAME,F as MISSING_OK_CONFIG_MESSAGE,bn as MalformedGitPointerError,me as McpLogger,Nt as MissingOkConfigError,E as OBSERVER_SYNC_ORIGIN,a as ORPHAN_MODES,At as PinoLogger,x as ProcessLockCollisionError,ce as ProjectGitInitError,de as ROLLBACK_ORIGIN,g as RUNTIME_VERSION,_e as SERVICE_WRITER,V as SKILL_INSTALL_EVENTS_FILE_REL,n as SKILL_STATE_TARGETS,X as STARTER_FOLDERS,ae as STARTER_FOLDER_FRONTMATTER_FILENAME,Ce as STARTER_TEMPLATES,jn as STATE_MANIFEST_FILENAME,y as STATE_SCHEMA_VERSION,e as SYSTEM_DOC_NAME,k as SeedPrerequisiteError,Fe as SeedRootDirError,p as ServerLockCollisionError,q as StateManifestError,Me as TagIndex,Re as UiLockCollisionError,c as acquireProcessLock,_ as acquireServerLock,W as acquireUiLock,ne as applyAgentMarkdownWrite,$t as applyExternalChange,$ as applySeed,We as assertCompatibleStateManifest,Ve as assertNeverDiskEvent,qe as attachIdleShutdown,be as bootServer,C as buildAndOpenSkill,gt as buildExecResult,mn as buildReadResult,Gt as buildSkillZip,on as buildStarterFolderFrontmatterYaml,kt as buildWipTree,rt as classifyEvents,Yt as clearContributors,o as colorFromSeed,un as commitUpstreamImport,ut as commitWip,Rt as commitWipFromTree,_n as containsConflictMarkers,pt as contentHash,yt as contributorCount,Qt as createApiExtension,Vt as createAssetServeMiddleware,Tt as createContentFilter,St as createContentFilterAsync,$e as createExternalChangeHandler,xn as createLiveDerivedIndexExtension,An as createMcpHttpHandler,ot as createOsProbe,Dn as createPersistenceExtension,Oe as createServer,P as createServerObserverExtension,wn as createStreamingErrorWriter,je as createTestLogger,B as detectClaudeDesktopPresence,L as detectProjectShape,ge as ensureProjectGit,Ft as errorResponse,O as evictStaleTrackerEntries,Mt as extractWikiLinksFromMarkdown,ue as formatContributors,pe as gcCheckpointRefs,ye as getCurrentMcpLogger,U as getLocalDir,Q as getLogger,se as getMeter,Te as getMetrics,Nn as getTracer,j as handleCollabSocketError,Le as handleSpawnCursor,i as iconFromClientName,Y as incrementCollabSocketFilteredError,Pe as incrementServerObserverFire,Be as initShadowRepo,K as initTelemetry,ie as installTestLoggers,tn as installUserSkill,te as isAllowedApiOrigin,Ke as isAllowedWorkspaceHostHeader,Ue as isConfigDoc,Ye as isHocuspocusAuthRejectionReason,Se as isLoopbackAddress,t as isOrphanMode,T as isPairedWriteOrigin,mt as isPathWithinDir,b as isProcessAlive,fn as isSelfWrite,Ut as isSystemDoc,l as isValidLockPid,rn as lastKnownHash,Dt as listRescueCheckpoints,tt as loadPrincipal,m as lockFilePath,qt as loggerFactory,cn as mountMcpAndApi,ct as parseHocuspocusAuthToken,Lt as parseKeepaliveConnectionId,gn as pathToDocName,ft as planSeed,vt as readAllTargets,Zt as readBranchFromHead,S as readProcessLock,u as readProcessLockDetailed,d as readServerLock,Bt as readServerPackageVersion,wt as readSkillInstallStateSnapshot,xt as readStateManifest,Ze as readTargetRecordedAt,yn as readTargetVersion,kn as readUiLock,at as reconcile,En as recordContributor,De as recordSkillInstallEvent,N as registerWrite,v as releaseProcessLock,h as releaseServerLock,Cn as releaseUiLock,Ae as removeLastKnownHash,z as resetMetrics,I as resolveBundledSkillDir,he as resolveContentDir,Pt as resolveCursorBinaryDefault,D as resolveCursorSpawnInvocation,jt as resolveLockDir,le as resolvePackageVersion,fe as rewriteMarkdownLinksForDocumentRename,ve as rewriteWikiLinksForDocumentRename,H as runAuthReposSubprocess,Z as runAuthStatusSubprocess,oe as runCloneSubprocess,we as runDeviceFlowSubprocess,Mn as runWithMcpLogger,A as safeContentPath,Ie as safeSubdir,J as safetyCheckpoint,Ne as saveInMemoryCheckpoint,ze as saveVersion,G as seedBasenameIndex,re as setActiveSpanAttributes,en as shadowGit,ee as shutdownTelemetry,Ge as splitMarkdownBlocks,He as startWatcher,Je as streamingProblemEvent,xe as toBroadcasterKey,w as updateLastKnownHash,f as updateProcessLockPort,s as updateServerLockPort,ht as updateUiLockPort,pn as validateAgentId,Wt as validateCloneInputs,an as validateSkillZip,Ot as withSpan,nt as withSpanSync,Jt as writeStateManifest,ln as writeTargetVersion,lt as writeTracker};
|
package/dist/init-DesafuF7.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./init-CMfH982u.mjs";export{e as runInit};
|
package/dist/loader-C9UcssXM.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./loader-DvG1wpAx.mjs";export{e as loadConfig};
|
package/dist/loader-DvG1wpAx.mjs
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{Nn as e,ar as t,qr as n}from"./dist-IguRFGXq.mjs";import{f as r,mr as i}from"./dist-DSb6dRAy.mjs";import{t as a}from"./constants-CZmHtQUh.mjs";import{t as o}from"./is-object-DF0ZeuvD.mjs";import{resolve as s}from"node:path";import{existsSync as c,readFileSync as l}from"node:fs";import{homedir as u}from"node:os";var d=n();function f(e,t){let n={...e};for(let r of Object.keys(t)){let i=e[r],a=t[r];o(a)&&o(i)?n[r]=f(i,a):a!==void 0&&(n[r]=a)}return n}function p(e){if(!c(e))return{value:null,path:e,source:null,doc:null};let t;try{t=l(e,`utf-8`)}catch(t){return console.warn(`[config] Failed to read ${e}: ${t instanceof Error?t.message:t}`),{value:null,path:e,source:null,doc:null}}let n=(0,d.parseDocument)(t);if(n.errors.length>0)return console.warn(`[config] Failed to parse ${e}: ${n.errors.map(e=>e.message).join(`; `)}`),{value:null,path:e,source:t,doc:null};let r=n.toJSON();return o(r)?{value:r,path:e,source:t,doc:n}:{value:null,path:e,source:t,doc:n}}const m=[`include`,`exclude`];function h(e){let t="Run `ok config migrate` to strip the obsolete key from config.yml automatically, or remove it by hand.";return e===`exclude`?[`Move these patterns to .okignore at the project root (gitignore syntax, 1:1 migration).`,t].join(` `):[`content.include has been removed.`,`For subdirectory scoping, set content.dir in .ok/config.yml instead.`,`For pattern-based filtering, use .okignore (gitignore syntax — exclude-only; do not copy include patterns directly).`,t].join(` `)}function g(e){let n=e.value;if(!o(n))return[];let r=n.content;if(!o(r))return[];let i=[];for(let n of m)if(n in r){let r=[`content`,n],a;e.doc!==null&&e.source!==null&&(a=t({file:e.path,source:e.source,doc:e.doc,path:r})),i.push({code:`REMOVED_KEY`,path:r,redirect:h(n),...a===void 0?{}:{source:a}})}return i}function _(e,n){return e.map(e=>{let r=e.path.map(e=>typeof e==`symbol`?String(e):e),i={path:r,message:e.message,issueCode:e.code};if(n.doc!==null&&n.source!==null){let e=t({file:n.path,source:n.source,doc:n.doc,path:r});if(e!==void 0)return{...i,source:e}}return i})}function v(t){let n=t??process.cwd(),o=[],c=s(u(),`.ok`,a),l=i({absPath:c}),d={};l.valid&&l.source!==void 0?(d=f(d,l.value),o.push(c)):l.valid;let m=s(n,`.ok`,a),h=p(m);if(h.value!==null){let t=g(h);if(t.length>0)throw Error(t.map(e).join(`
|
|
2
|
-
|
|
3
|
-
`));d=f(d,h.value),o.push(m)}y(d,[`upload`,`maxBytes`],`streaming uploads have no user-facing cap`),y(d,[`github`,`oauthAppClientId`],`use the OPEN_KNOWLEDGE_GITHUB_CLIENT_ID env var instead`),y(d,[`server`,`host`],`use the --host flag or HOST env var instead`),y(d,[`server`,`openOnAgentEdit`]),y(d,[`mcp`,`autoStart`],`to disable auto-start, set OK_MCP_AUTOSTART=0`),y(d,[`mcp`,`tools`,`read_document`,`historyDepth`]),y(d,[`mcp`,`tools`,`grep`,`maxResults`]),y(d,[`mcp`,`tools`,`search`,`maxResults`]);let v=r.safeParse(d);if(!v.success){let t={code:`SCHEMA_INVALID`,issues:_(v.error.issues,h)};throw Error(e(t))}return{config:v.data,sources:o}}function y(e,t,n){let r=e;for(let e=0;e<t.length-1;e++){if(!o(r))return;r=r[t[e]]}if(!o(r))return;let i=t[t.length-1];if(r[i]===void 0)return;let a=t.join(`.`);console.warn(`[config] ${a} is no longer user-configurable; ${n??`the value is hardcoded in @inkeep/open-knowledge-core`}. Remove the key to silence this warning.`)}export{v as t};
|
|
4
|
-
//# sourceMappingURL=loader-DvG1wpAx.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,t}from"./preview-DgYoFNt8.mjs";export{t as formatPreviewBlock,e as previewContent};
|