efficient-shell 4.155.3 → 4.156.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/dist/ui/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{APP_UPDATE_POLL_MS,Accordion,AppUpdateBanner,AttachButton,AttachmentDropZone,AttachmentList,AuthScreen,Avatar,AvatarGroup,Banner,BarChart,BoxPlotChart,BrandAssetEditor,BudgetBar,CHART_INK,Calendar,CandlestickChart,Card,CartesianPlot,ChartBrush,ChartDefs,ChartDot,ChartFrame,ChartHighlightProvider,ChartSkeleton,ChartTooltip,ChatTemplate,Checkbox_default as Checkbox,CheckoutTemplate,ChordChart,ColoredBadge,ColumnChart,ComposerAttachments,ContainerFillChart,CountBadge,DAY_MS,DashboardTemplate,DataTable,DataTablePage,DatePicker_default as DatePicker,DateRangePicker,DateTimePicker_default as DateTimePicker,DescriptionList,Divider,DonutChart,Drawer,DropdownMenu,EmailTemplate,EmptyState,ErrorBoundary,ErrorPage,FilePicker_default as FilePicker,FormErrorSummary,FormField,FormLayoutPage,FunnelChart,GROUP_COLORS,GROUP_COLORS_SOLID,GalleryTemplate,Grid,HeatmapChart,HelpCenter,HistogramChart,INPUT_BASE,INPUT_SIZES,IconButton_default as IconButton,Inline,Input_default as Input,InputNumber_default as InputNumber,Kanban,Label,LineChart,ListFooter,ListLoadError,MAX_FRACTION_DIGITS,MENU_MAX_HEIGHT,MOTION,Markdown,Markdown as MarkdownLite,MediaUploadField,MediaUploadGrid,Meter,MetricBar,MilestoneTimeline,NativeSelect,NumericKeypad,POPUP_MAX_WIDTH,POST_PRODUCTION_STATUSES,PageHeader,Pagination,PaperclipGlyph,Paragraph,PieChart,Popover,PortalBrandingProvider,ProductionTimeline,RADAR_SERIES_CAP,RadarChart,RadialBarChart,Radio_default as Radio,RadioGroup,RangeChart,RankedBars,SCATTER_SERIES_CAP,SERIES_SLOT_COUNT,SERIES_VARS,STAGES,STATUS_VARS,SankeyChart,ScatterChart,SearchableSelect,Segmented,Select_default as Select,SettingRow,SidebarActionButton,SidebarGroupLabel,SidebarNavItem,Skeleton,Snippet,Sparkline,Stack,StatCard,StatTile,Statistic,StatusBadge,StatusBadgeProvider,Stepper,SunburstChart,Switch_default as Switch,Tabs,TagInput,Text,Textarea_default as Textarea,TileButton_default as TileButton,TimePicker_default as TimePicker,TimeSeriesChart,TimelineTrack,Title,Tooltip,TopNav,TreemapChart,WaterfallChart,angleScale,appendKey,applyThemePrefs,arcPath,areaBetween,areaFrom,autoHighlightIndex,backspace,bandScale,binValues,budgetState,bumpPath,calcOverall,calcReportOverall,curvePath,dashFor,fillFor,fillId,firstDayOfWeek,fmtSliderDate,formatDate,fromKey as fromDateKey,glowId,groundId,groupColors,highlightOpacity,inputClasses,isSeverityTone,labelClasses,ladderScale,linearPath,linearScale,logScale,maskId,mediaFileName,monotonePath,niceMax,polygonPoints,popupBounds,radiusScale,resolvePortalBrandAsset,resolveSeriesColor,resolveTheme,seriesColor,severityOf,splinePath,squarify,stagger,stepPath,tabButtonId,tabPanelId,toKey as toDateKey,toDayMs,toISODate,useAppUpdate,useClickOutside,useDropdownPosition,useHighlight,usePlotWidth,usePortalBranding,useProductionTimeline,useTheme}from"../chunk-F23LRPOG.js";export{Breadcrumbs}from"../chunk-26RS37FG.js";export{SidebarLayout}from"../chunk-KASHUEJV.js";export{BrandMark,GlobalSearch,openGlobalSearch,resolveBrandMarkTreatment}from"../chunk-ELCH5NDO.js";export{EditableGrid}from"../chunk-XN76YBX3.js";import"../chunk-BR22X7E5.js";export{toast_default as toast}from"../chunk-B2TBCVHH.js";export{VERSION}from"../chunk-LVTPUYJO.js";export{ALT,ALT_SHIFT_D,ALT_SHIFT_E,ALT_SHIFT_N,CMD_A,CMD_DOT,CMD_ENTER,CMD_K,CMD_S,ENTER,Kbd,LoadingSpinner,MOD,NEXT_CHUNK_PATH_PREFIX,Result,SHIFT,STALE_CHUNK_RELOAD_COOLDOWN_MS,STALE_CHUNK_RELOAD_KEY,ShellPrefsProvider,VITE_PRELOAD_ERROR_EVENT,installStaleChunkReload,isMac,isStaleChunkError,useIsMobile,useLocalStoragePrefs,useShellPrefs}from"../chunk-T6MKFQRH.js";export{FileIntakeAlert,acceptsFile,useFileIntake}from"../chunk-FHIF6IUV.js";export{Button_default as Button,buttonClasses,iconButtonClasses}from"../chunk-PH3PRIFP.js";export{ConfirmProvider,Dialog,confirm,confirmDestructive,prompt,useConfirm,useFocusTrap,useScrollLock}from"../chunk-PDTZTADH.js";export{GLASS_DIVIDER,PopupMenu,PopupMenuDivider,PopupMenuItem,PopupMenuLabel,PopupSubmenu,glassStyle}from"../chunk-J7LKJIZC.js";export{OVERLAY_OPEN_EVENT,Z_LAYERS,dismissPopups}from"../chunk-OSJ3ADF2.js";import"../chunk-MAIHBBWT.js";export{DEFAULT_SHELL_STRINGS,ShellStringsProvider,useShellLocale,useShellStrings}from"../chunk-VVI77XNV.js";import"../chunk-D65T4H6J.js";
2
+ export{APP_UPDATE_POLL_MS,Accordion,AppUpdateBanner,AttachButton,AttachmentDropZone,AttachmentList,AuthScreen,Avatar,AvatarGroup,Banner,BarChart,BoxPlotChart,BrandAssetEditor,BudgetBar,CHART_INK,Calendar,CandlestickChart,Card,CartesianPlot,ChartBrush,ChartDefs,ChartDot,ChartFrame,ChartHighlightProvider,ChartSkeleton,ChartTooltip,ChatTemplate,Checkbox_default as Checkbox,CheckoutTemplate,ChordChart,ColoredBadge,ColumnChart,ComposerAttachments,ContainerFillChart,CountBadge,DAY_MS,DashboardTemplate,DataTable,DataTablePage,DatePicker_default as DatePicker,DateRangePicker,DateTimePicker_default as DateTimePicker,DescriptionList,Divider,DonutChart,Drawer,DropdownMenu,EmailTemplate,EmptyState,ErrorBoundary,ErrorPage,FilePicker_default as FilePicker,FormErrorSummary,FormField,FormLayoutPage,FunnelChart,GROUP_COLORS,GROUP_COLORS_SOLID,GalleryTemplate,Grid,HeatmapChart,HelpCenter,HistogramChart,INPUT_BASE,INPUT_SIZES,IconButton_default as IconButton,Inline,Input_default as Input,InputNumber_default as InputNumber,Kanban,Label,LineChart,ListFooter,ListLoadError,MAX_FRACTION_DIGITS,MENU_MAX_HEIGHT,MOTION,Markdown,Markdown as MarkdownLite,MediaUploadField,MediaUploadGrid,Meter,MetricBar,MilestoneTimeline,NativeSelect,NumericKeypad,POPUP_MAX_WIDTH,POST_PRODUCTION_STATUSES,PageHeader,Pagination,PaperclipGlyph,Paragraph,PieChart,Popover,PortalBrandingProvider,ProductionTimeline,RADAR_SERIES_CAP,RadarChart,RadialBarChart,Radio_default as Radio,RadioGroup,RangeChart,RankedBars,SCATTER_SERIES_CAP,SERIES_SLOT_COUNT,SERIES_VARS,STAGES,STATUS_VARS,SankeyChart,ScatterChart,SearchableSelect,Segmented,Select_default as Select,SettingRow,SidebarActionButton,SidebarGroupLabel,SidebarNavItem,Skeleton,Snippet,Sparkline,Stack,StatCard,StatTile,Statistic,StatusBadge,StatusBadgeProvider,Stepper,SunburstChart,Switch_default as Switch,Tabs,TagInput,Text,Textarea_default as Textarea,TileButton_default as TileButton,TimePicker_default as TimePicker,TimeSeriesChart,TimelineTrack,Title,Tooltip,TopNav,TreemapChart,WaterfallChart,angleScale,appendKey,applyThemePrefs,arcPath,areaBetween,areaFrom,autoHighlightIndex,backspace,bandScale,binValues,budgetState,bumpPath,calcOverall,calcReportOverall,curvePath,dashFor,fillFor,fillId,firstDayOfWeek,fmtSliderDate,formatDate,fromKey as fromDateKey,glowId,groundId,groupColors,highlightOpacity,inputClasses,isSeverityTone,labelClasses,ladderScale,linearPath,linearScale,logScale,maskId,mediaFileName,monotonePath,niceMax,polygonPoints,popupBounds,radiusScale,resolvePortalBrandAsset,resolveSeriesColor,resolveTheme,seriesColor,severityOf,splinePath,squarify,stagger,stepPath,tabButtonId,tabPanelId,toKey as toDateKey,toDayMs,toISODate,useAppUpdate,useClickOutside,useDropdownPosition,useHighlight,usePlotWidth,usePortalBranding,useProductionTimeline,useTheme}from"../chunk-SYMCTL7Q.js";export{Breadcrumbs}from"../chunk-26RS37FG.js";export{SidebarLayout}from"../chunk-KASHUEJV.js";export{BrandMark,GlobalSearch,openGlobalSearch,resolveBrandMarkTreatment}from"../chunk-ELCH5NDO.js";export{EditableGrid}from"../chunk-XN76YBX3.js";import"../chunk-BR22X7E5.js";export{toast_default as toast}from"../chunk-B2TBCVHH.js";export{VERSION}from"../chunk-ZQMUHLYL.js";export{ALT,ALT_SHIFT_D,ALT_SHIFT_E,ALT_SHIFT_N,CMD_A,CMD_DOT,CMD_ENTER,CMD_K,CMD_S,ENTER,Kbd,LoadingSpinner,MOD,NEXT_CHUNK_PATH_PREFIX,Result,SHIFT,STALE_CHUNK_RELOAD_COOLDOWN_MS,STALE_CHUNK_RELOAD_KEY,ShellPrefsProvider,VITE_PRELOAD_ERROR_EVENT,installStaleChunkReload,isMac,isStaleChunkError,useIsMobile,useLocalStoragePrefs,useShellPrefs}from"../chunk-T6MKFQRH.js";export{Button_default as Button,buttonClasses,iconButtonClasses}from"../chunk-PH3PRIFP.js";export{FileIntakeAlert,acceptsFile,useFileIntake}from"../chunk-FHIF6IUV.js";export{ConfirmProvider,Dialog,confirm,confirmDestructive,prompt,useConfirm,useFocusTrap,useScrollLock}from"../chunk-PDTZTADH.js";export{GLASS_DIVIDER,PopupMenu,PopupMenuDivider,PopupMenuItem,PopupMenuLabel,PopupSubmenu,glassStyle}from"../chunk-J7LKJIZC.js";export{OVERLAY_OPEN_EVENT,Z_LAYERS,dismissPopups}from"../chunk-OSJ3ADF2.js";import"../chunk-MAIHBBWT.js";export{DEFAULT_SHELL_STRINGS,ShellStringsProvider,useShellLocale,useShellStrings}from"../chunk-VVI77XNV.js";import"../chunk-D65T4H6J.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efficient-shell",
3
- "version": "4.155.3",
3
+ "version": "4.156.0",
4
4
  "description": "Desktop-style React UI shell — windows, taskbar, start menu, sticky notes, frosted glass theming, and bundled apps.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "Efficient Pty Ltd",
@@ -1,25 +0,0 @@
1
- import{SidebarLayout as e}from"./chunk-KASHUEJV.js";import{AboutApp as t}from"./chunk-YW2RNWY4.js";import{toast_default as r}from"./chunk-B2TBCVHH.js";import"./chunk-LVTPUYJO.js";import{useWindowManager as n,client_default as o}from"./chunk-XC64WV33.js";import{useShellPrefs as i}from"./chunk-T6MKFQRH.js";import"./chunk-6UXY7MPY.js";import"./chunk-PH3PRIFP.js";import"./chunk-PDTZTADH.js";import"./chunk-J7LKJIZC.js";import"./chunk-OSJ3ADF2.js";import"./chunk-MAIHBBWT.js";import"./chunk-VVI77XNV.js";import"./chunk-D65T4H6J.js";import{useRef as l,useEffect as a,useState as s,useCallback as c}from"react";import{useQuery as d}from"@tanstack/react-query";import{jsxs as p,Fragment as u,jsx as h}from"react/jsx-runtime";var m=[{key:"yellow",bg:"bg-yellow-100",border:"border-yellow-300",text:"text-yellow-900",dot:"bg-yellow-400"},{key:"blue",bg:"bg-blue-100",border:"border-blue-300",text:"text-blue-900",dot:"bg-blue-400"},{key:"green",bg:"bg-green-100",border:"border-green-300",text:"text-green-900",dot:"bg-green-400"},{key:"pink",bg:"bg-pink-100",border:"border-pink-300",text:"text-pink-900",dot:"bg-pink-400"},{key:"purple",bg:"bg-purple-100",border:"border-purple-300",text:"text-purple-900",dot:"bg-purple-400"},{key:"orange",bg:"bg-orange-100",border:"border-orange-300",text:"text-orange-900",dot:"bg-orange-400"},{key:"white",bg:"bg-white",border:"border-gray-300",text:"text-gray-900",dot:"bg-gray-300"}];var g={sales_order:{entityType:"order",endpoint:"/orders/sales-orders/"},purchase_order:{entityType:"purchase_order",endpoint:"/purchase-orders/"},invoice:{entityType:"invoice",endpoint:"/invoicing/invoices/"},vendor_invoice:{entityType:"vendor_invoice",endpoint:"/invoicing/vendor-invoices/"},shipment:{entityType:"shipment",endpoint:"/shipments/delivery-notes/"},receipt:{entityType:"payment",endpoint:"/invoicing/payments/"},vendor_payment:{entityType:"vendor_payment",endpoint:"/invoicing/vendor-payments/"},vendor_price_sheet:{entityType:"vendor_price_sheet",endpoint:"/pricing/manufacturer-price-sheets/"},client_price_sheet:{entityType:"price_sheet",endpoint:"/pricing/price-sheets/"},qc_report:{entityType:"qc_report",endpoint:"/qc-reports/"},warranty_claim:{entityType:"warranty_claim",endpoint:"/warranty-claims/claims/"},vendor_shipment:{entityType:"vendor_shipment",endpoint:"/shipments/goods-receipts/"}},x=/\[([ xX]?)\]/g;function y(){const{openEntity:y}=n(),{prefs:b,save:f}=i(),{data:k}=d({queryKey:["numbering-configs"],queryFn:()=>o.get("/auth/numbering-configs/").then(e=>e.data?.results??e.data??[]),retry:!1}),v=l({});a(()=>{if(!k)return;const e={};for(const t of k){const r=g[t.entity_type];if(!r)continue;const n=(t.prefix||"").replace("#","").toUpperCase();if(n&&(e[n]={...r,prefix:t.prefix}),t.alt_prefix){const n=t.alt_prefix.replace("#","").toUpperCase();n&&(e[n]={...r,prefix:t.alt_prefix})}}v.current=e},[k]);const w=b.notepad_notes||[],[N,_]=s(null),[T,C]=s(""),[j,$]=s(""),[L,M]=s("yellow"),[S,W]=s(!1),[B,H]=s(!1),V=l(null),D=l(),P=w.find(e=>e.id===N);a(()=>{if(!N&&w.length>0){const e=w[0];_(e.id),C(e.title),$(e.content),M(e.color)}},[w.length]);const X=c(e=>{f({notepad_notes:e})},[f]),I=c(()=>{if(!N||!S)return;const e=w.map(e=>e.id===N?{...e,title:T,content:j,color:L,updated_at:/* @__PURE__ */(new Date).toISOString()}:e);X(e),W(!1)},[N,S,T,j,L,w,X]);a(()=>{if(S)return D.current&&clearTimeout(D.current),D.current=setTimeout(I,800),()=>{D.current&&clearTimeout(D.current)}},[S,I]),a(()=>()=>{S&&I()},[]);const O=e=>{S&&I(),_(e.id),C(e.title),$(e.content),M(e.color),W(!1),H(!1)},q=e=>{const t=Date.now()-new Date(e).getTime(),r=Math.floor(t/6e4);if(r<1)return"just now";if(r<60)return`${r}m ago`;const n=Math.floor(r/60);if(n<24)return`${n}h ago`;return`${Math.floor(n/24)}d ago`},A=e=>{const t=j.slice(0,e),r=j.slice(e).match(/^\[([ xX]?)\]/);if(!r)return;const n="x"===r[1]||"X"===r[1]?"[ ]":"[x]",o=j.slice(e+r[0].length);$(t+n+o),W(!0)},J=async(e,t)=>{const n=v.current[e];if(!n)return;const i=`${e}#${t}`;try{const{data:e}=await o.get(n.endpoint,{params:{search:i,page_size:1}}),t=(e?.results??e??[])[0];t?y(n.entityType,t.id,t,i):r.error(`${i} not found`)}catch{r.error(`Failed to look up ${i}`)}},U="Start writing...\n\nTips:\n [] Type [] for a checkbox, click to toggle\n SO#35001 Type XX#NNNNN to link entities (SO, PO, CI, VI, PL, etc.)",z=/* @__PURE__ */p(u,{children:[
2
- /* @__PURE__ */h("div",{className:"p-2 border-b border-gray-200",children:/* @__PURE__ */p("button",{onClick:()=>{S&&I();const e={id:`note-${Date.now()}-${Math.random().toString(36).slice(2,6)}`,title:"",content:"",color:"yellow",sticky:!1,updated_at:/* @__PURE__ */(new Date).toISOString()},t=[e,...w];X(t),_(e.id),C(""),$(""),M("yellow"),W(!1),H(!0),setTimeout(()=>V.current?.focus(),50)},className:"w-full flex items-center justify-center gap-1.5 rounded-lg bg-blue-600 text-white px-3 py-1.5 text-sm font-medium hover:bg-blue-700 transition-colors",children:[
3
- /* @__PURE__ */h("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:/* @__PURE__ */h("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"})}),"New Note"]})}),
4
- /* @__PURE__ */h("div",{className:"flex-1 overflow-y-auto",children:0===w.length?/* @__PURE__ */h("p",{className:"text-sm text-gray-400 text-center py-8 px-4",children:"No notes yet. Create one to get started."}):w.map(e=>{const t=(r=e.color,m.find(e=>e.key===r)||m[0]);var r;/* @__PURE__ */
5
- return p("button",{onClick:()=>O(e),className:"w-full text-left px-3 py-2.5 border-b border-gray-100 transition-colors "+(N===e.id?"bg-blue-50":"hover:bg-gray-50"),children:[
6
- /* @__PURE__ */p("div",{className:"flex items-center gap-2",children:[
7
- /* @__PURE__ */h("div",{className:`w-2.5 h-2.5 rounded-full shrink-0 ${t.dot}`}),
8
- /* @__PURE__ */h("span",{className:"text-sm font-medium text-gray-900 truncate flex-1",children:e.title||"Untitled"}),e.sticky&&/* @__PURE__ */h("svg",{className:"h-3 w-3 text-amber-500 shrink-0",fill:"currentColor",viewBox:"0 0 24 24",children:/* @__PURE__ */h("path",{d:"M5 5a2 2 0 012-2h10a2 2 0 012 2v16l-7-3.5L5 21V5z"})})]}),
9
- /* @__PURE__ */h("p",{className:"text-xs text-gray-400 mt-0.5 truncate ml-4.5",children:e.content.replace(/\[[ xX]?\]/g,"").slice(0,60)||"Empty note"}),
10
- /* @__PURE__ */h("p",{className:"text-[10px] text-gray-300 mt-0.5 ml-4.5",children:q(e.updated_at)})]},e.id)})})]});/* @__PURE__ */
11
- return p("div",{className:"h-full",children:[
12
- /* @__PURE__ */h(t,{app:"notepad"}),
13
- /* @__PURE__ */h(e,{sidebar:z,storageKey:"notepad.sidebarWidth",defaultWidth:224,minWidth:180,maxWidth:360,children:N?/* @__PURE__ */p("div",{className:"flex-1 flex flex-col min-w-0",children:[
14
- /* @__PURE__ */p("div",{className:"flex items-center gap-2 px-4 py-2 border-b border-gray-200",children:[
15
- /* @__PURE__ */h("input",{value:T,onChange:e=>{C(e.target.value),W(!0)},placeholder:"Note title...",className:"flex-1 text-lg font-semibold text-gray-900 outline-none bg-transparent placeholder:text-gray-300"}),
16
- /* @__PURE__ */h("div",{className:"flex gap-1",children:m.map(e=>/* @__PURE__ */h("button",{onClick:()=>{M(e.key),W(!0)},className:`w-5 h-5 rounded-full border-2 transition-all ${e.dot} ${L===e.key?"border-gray-600 scale-110":"border-transparent hover:border-gray-400"}`,title:e.key},e.key))}),
17
- /* @__PURE__ */h("button",{onClick:()=>(e=>{const t=w.map(t=>t.id===e?{...t,sticky:!t.sticky}:t);X(t);const n=t.find(t=>t.id===e);r.success(n?.sticky?"Pinned to desktop":"Removed from desktop")})(N),title:P?.sticky?"Remove from desktop":"Pin to desktop",className:"p-1 rounded transition-colors "+(P?.sticky?"text-amber-500 hover:text-amber-600":"text-gray-300 hover:text-amber-400"),children:/* @__PURE__ */h("svg",{className:"h-4 w-4",fill:P?.sticky?"currentColor":"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */h("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 5a2 2 0 012-2h10a2 2 0 012 2v16l-7-3.5L5 21V5z"})})}),
18
- /* @__PURE__ */h("button",{onClick:()=>(e=>{const t=w.filter(t=>t.id!==e);if(X(t),N===e){const e=t[0];e?O(e):(_(null),C(""),$(""))}})(N),title:"Delete note",className:"p-1 rounded text-gray-300 hover:text-red-500 transition-colors",children:/* @__PURE__ */h("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */h("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0"})})})]}),B?/* @__PURE__ */h("textarea",{ref:V,value:j,onChange:e=>{$(e.target.value),W(!0)},onBlur:()=>{H(!1),S&&I()},placeholder:U,className:"flex-1 p-4 text-sm text-gray-700 outline-none resize-none bg-transparent leading-relaxed placeholder:text-gray-300 font-mono"}):/* @__PURE__ */h("div",{onClick:()=>{H(!0),setTimeout(()=>V.current?.focus(),50)},className:"flex-1 p-4 text-sm text-gray-700 overflow-y-auto leading-relaxed cursor-text",children:j?(e=>{if(!e)return[];const t=e.split("\n");return t.map((e,r)=>{const n=[];let o=0;const i=[],l=/([A-Z]{2,4})#(\d{4,6})/g;let a;for(;null!==(a=l.exec(e));){const e=a[1],t=a[2];if(v.current[e]){const n=a.index,o=a[0];i.push({idx:n,len:o.length,render:()=>/* @__PURE__ */h("button",{onClick:()=>J(e,t),className:"text-blue-600 hover:text-blue-800 hover:underline font-medium cursor-pointer",children:o},`ref-${r}-${n}`)})}}x.lastIndex=0;let s=0;for(let e=0;e<r;e++)s+=t[e].length+1;for(;null!==(a=x.exec(e));){const e="x"===a[1]||"X"===a[1],t=a.index,n=s+t;i.push({idx:t,len:a[0].length,render:()=>/* @__PURE__ */h("button",{onClick:()=>A(n),className:`inline-flex items-center justify-center w-4 h-4 rounded border ${e?"bg-blue-500 border-blue-500 text-white":"border-gray-400 bg-white hover:border-blue-400"} cursor-pointer align-text-bottom mr-0.5`,children:e&&/* @__PURE__ */h("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:/* @__PURE__ */h("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})})},`cb-${r}-${t}`)})}i.sort((e,t)=>e.idx-t.idx);for(const t of i)t.idx>o&&n.push(/* @__PURE__ */h("span",{children:e.slice(o,t.idx)},`t-${r}-${o}`)),n.push(t.render()),o=t.idx+t.len;o<e.length&&n.push(/* @__PURE__ */h("span",{children:e.slice(o)},`t-${r}-${o}`)),0===n.length&&n.push(/* @__PURE__ */h("span",{children:"​"},`empty-${r}`));const c=/^\[x\]/i.test(e.trimStart());/* @__PURE__ */
19
- return h("div",{className:c?"line-through text-gray-400":"",children:n},r)})})(j):/* @__PURE__ */h("p",{className:"text-gray-300 whitespace-pre-line",children:U})}),
20
- /* @__PURE__ */p("div",{className:"px-4 py-1.5 border-t border-gray-100 flex items-center gap-4 text-[10px] text-gray-400",children:[
21
- /* @__PURE__ */h("span",{children:"[] checkbox"}),
22
- /* @__PURE__ */h("span",{children:"SO#35001 entity link"}),
23
- /* @__PURE__ */h("span",{className:"ml-auto",children:B?"Editing":"Click to edit"})]})]}):/* @__PURE__ */h("div",{className:"flex-1 flex items-center justify-center",children:/* @__PURE__ */p("div",{className:"text-center text-gray-400",children:[
24
- /* @__PURE__ */h("svg",{className:"h-12 w-12 mx-auto mb-3 text-gray-300",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1,children:/* @__PURE__ */h("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})}),
25
- /* @__PURE__ */h("p",{className:"text-sm",children:"Select a note or create a new one"})]})})})]})}export{y as default};
@@ -1 +0,0 @@
1
- var r="4.155.3",a=r;export{a as APP_VERSION,r as VERSION};