@tnkrai/tnkr-editor 0.2.1 → 0.2.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/index.cjs CHANGED
@@ -76604,7 +76604,7 @@ const AssemblyViewMode = ({ phases, htmlContent, className = '', productTitle, p
76604
76604
  if (phases.length === 0) {
76605
76605
  return (jsxRuntimeExports.jsx("div", { className: `flex items-center justify-center h-full ${className}`, children: jsxRuntimeExports.jsxs("div", { className: 'text-center text-white/60 space-y-2', children: [jsxRuntimeExports.jsx("p", { className: 'text-lg', children: "No assembly phases available" }), jsxRuntimeExports.jsx("p", { className: 'text-sm', children: "Import assembly instructions to get started" })] }) }));
76606
76606
  }
76607
- return (jsxRuntimeExports.jsx("div", { className: `h-full max-h-screen w-full relative bg-[#161617] rounded-3xl ${className}`, children: jsxRuntimeExports.jsxs("div", { className: 'grid grid-cols-1 lg:grid-cols-5 gap-4 px-4 py-4 h-full', children: [jsxRuntimeExports.jsxs("div", { className: 'lg:col-span-3 flex flex-col w-full h-full relative bg-transparent border rounded-3xl border-[#313133] min-h-0', children: [jsxRuntimeExports.jsxs("div", { className: 'rounded-lg py-6 px-18 flex-shrink-0 h-[120px] flex flex-col justify-end', children: [jsxRuntimeExports.jsxs("div", { className: 'flex items-center justify-between mb-4', children: [jsxRuntimeExports.jsxs("div", { className: 'text-sm text-white/70', children: [productTitle, " Assembly"] }), jsxRuntimeExports.jsxs("div", { className: 'text-sm text-white/70', children: [completedStepsInCurrentPhase, "/", totalStepsInCurrentPhase, " Complete"] })] }), jsxRuntimeExports.jsx("div", { className: 'flex space-x-1', children: currentPhase === null || currentPhase === void 0 ? void 0 : currentPhase.steps.map((_, index) => (jsxRuntimeExports.jsx("div", { className: `h-1 rounded-sm flex-1 transition-all duration-300 ${index < completedStepsInCurrentPhase ? 'bg-white' : 'bg-[#313133]'}` }, index))) })] }), jsxRuntimeExports.jsxs("div", { ref: containerRef, className: 'w-full relative flex-1 min-h-[400px]', style: { backgroundColor: 'transparent' }, children: [currentView === 'step' && assemblyAnnotations.length > 0 && (jsxRuntimeExports.jsx("div", { className: 'absolute right-[4.5rem] z-20', children: jsxRuntimeExports.jsxs(DropdownMenu, { children: [jsxRuntimeExports.jsx(DropdownMenuTrigger, { asChild: true, children: jsxRuntimeExports.jsxs(Button, { variant: 'outline', size: 'sm', className: 'flex items-center gap-2 px-3 py-1.5', children: [jsxRuntimeExports.jsxs("div", { className: 'relative', children: [jsxRuntimeExports.jsx(CiBellOn, { className: 'size-5 stroke-[0.7] text-[#AA423A]' }), jsxRuntimeExports.jsx("p", { className: 'absolute top-0 right-0 rounded-full text-[7px] bg-[#AA423A] text-white size-2.5 text-center', children: assemblyAnnotations.length })] }), "Annotations", jsxRuntimeExports.jsx(react$2.Icon, { icon: 'ph:caret-down', className: 'w-3 h-3 ml-1' })] }) }), jsxRuntimeExports.jsxs(DropdownMenuContent, { align: 'end', className: 'bg-[#232326] border-gray-700 min-w-[200px]', children: [jsxRuntimeExports.jsx(DropdownMenuLabel, { className: 'text-gray-400 text-xs', children: "Annotation Controls" }), jsxRuntimeExports.jsx(DropdownMenuSeparator, { className: 'bg-gray-700' }), jsxRuntimeExports.jsxs(DropdownMenuItem, { onClick: () => setVisibleAnnotationIds(assemblyAnnotations.map((a) => a.id)), className: 'text-white hover:bg-gray-800 cursor-pointer', children: [jsxRuntimeExports.jsx(react$2.Icon, { icon: 'ph:eye', className: 'w-4 h-4 mr-2' }), "Show All Annotations"] }), jsxRuntimeExports.jsxs(DropdownMenuItem, { onClick: () => setVisibleAnnotationIds([]), className: 'text-white hover:bg-gray-800 cursor-pointer', children: [jsxRuntimeExports.jsx(react$2.Icon, { icon: 'ph:eye-slash', className: 'w-4 h-4 mr-2' }), "Hide All Annotations"] }), jsxRuntimeExports.jsx(DropdownMenuSeparator, { className: 'bg-gray-700' }), jsxRuntimeExports.jsx(DropdownMenuLabel, { className: 'text-gray-400 text-xs', children: "Individual Annotations" }), assemblyAnnotations.map((annotation, index) => {
76607
+ return (jsxRuntimeExports.jsx("div", { className: `h-full max-h-screen p-6 w-full relative bg-[#161617] rounded-3xl ${className}`, children: jsxRuntimeExports.jsxs("div", { className: 'grid grid-cols-1 lg:grid-cols-5 gap-4 px-4 py-4 h-full', children: [jsxRuntimeExports.jsxs("div", { className: 'lg:col-span-3 flex flex-col w-full h-full relative bg-transparent border rounded-3xl border-[#313133] min-h-0', children: [jsxRuntimeExports.jsxs("div", { className: 'rounded-lg py-6 px-6 flex-shrink-0 h-[120px] flex flex-col justify-end', children: [jsxRuntimeExports.jsxs("div", { className: 'flex items-center justify-between mb-4', children: [jsxRuntimeExports.jsxs("div", { className: 'text-sm text-white/70', children: [productTitle, " Assembly"] }), jsxRuntimeExports.jsxs("div", { className: 'text-sm text-white/70', children: [completedStepsInCurrentPhase, "/", totalStepsInCurrentPhase, " Complete"] })] }), jsxRuntimeExports.jsx("div", { className: 'flex space-x-1', children: currentPhase === null || currentPhase === void 0 ? void 0 : currentPhase.steps.map((_, index) => (jsxRuntimeExports.jsx("div", { className: `h-1 rounded-sm flex-1 transition-all duration-300 ${index < completedStepsInCurrentPhase ? 'bg-white' : 'bg-[#313133]'}` }, index))) })] }), jsxRuntimeExports.jsxs("div", { ref: containerRef, className: 'w-full relative flex-1 min-h-[400px]', style: { backgroundColor: 'transparent' }, children: [currentView === 'step' && assemblyAnnotations.length > 0 && (jsxRuntimeExports.jsx("div", { className: 'absolute right-[4.5rem] z-20', children: jsxRuntimeExports.jsxs(DropdownMenu, { children: [jsxRuntimeExports.jsx(DropdownMenuTrigger, { asChild: true, children: jsxRuntimeExports.jsxs(Button, { variant: 'outline', size: 'sm', className: 'flex items-center gap-2 px-3 py-1.5', children: [jsxRuntimeExports.jsxs("div", { className: 'relative', children: [jsxRuntimeExports.jsx(CiBellOn, { className: 'size-5 stroke-[0.7] text-[#AA423A]' }), jsxRuntimeExports.jsx("p", { className: 'absolute top-0 right-0 rounded-full text-[7px] bg-[#AA423A] text-white size-2.5 text-center', children: assemblyAnnotations.length })] }), "Annotations", jsxRuntimeExports.jsx(react$2.Icon, { icon: 'ph:caret-down', className: 'w-3 h-3 ml-1' })] }) }), jsxRuntimeExports.jsxs(DropdownMenuContent, { align: 'end', className: 'bg-[#232326] border-gray-700 min-w-[200px]', children: [jsxRuntimeExports.jsx(DropdownMenuLabel, { className: 'text-gray-400 text-xs', children: "Annotation Controls" }), jsxRuntimeExports.jsx(DropdownMenuSeparator, { className: 'bg-gray-700' }), jsxRuntimeExports.jsxs(DropdownMenuItem, { onClick: () => setVisibleAnnotationIds(assemblyAnnotations.map((a) => a.id)), className: 'text-white hover:bg-gray-800 cursor-pointer', children: [jsxRuntimeExports.jsx(react$2.Icon, { icon: 'ph:eye', className: 'w-4 h-4 mr-2' }), "Show All Annotations"] }), jsxRuntimeExports.jsxs(DropdownMenuItem, { onClick: () => setVisibleAnnotationIds([]), className: 'text-white hover:bg-gray-800 cursor-pointer', children: [jsxRuntimeExports.jsx(react$2.Icon, { icon: 'ph:eye-slash', className: 'w-4 h-4 mr-2' }), "Hide All Annotations"] }), jsxRuntimeExports.jsx(DropdownMenuSeparator, { className: 'bg-gray-700' }), jsxRuntimeExports.jsx(DropdownMenuLabel, { className: 'text-gray-400 text-xs', children: "Individual Annotations" }), assemblyAnnotations.map((annotation, index) => {
76608
76608
  const displayText = annotation.text.value || `${annotation.type === 'arrow' ? 'Arrow' : 'Label'} ${index + 1}`;
76609
76609
  const truncatedText = displayText.length > 30 ? displayText.substring(0, 30) + '...' : displayText;
76610
76610
  const isVisible = visibleAnnotationIds.includes(annotation.id);
@@ -77319,7 +77319,7 @@ const PreviewNavbar = ({ organizationName = "Organization", organizationLogo, on
77319
77319
  // Page content renderer with proper structure
77320
77320
  const PageContent = ({ category, categories, onGoToPage }) => {
77321
77321
  if (!category) {
77322
- return (jsxRuntimeExports.jsx("div", { className: "flex-1 flex items-center justify-center rounded-3xl", children: jsxRuntimeExports.jsxs("div", { className: "text-center", children: [jsxRuntimeExports.jsx("h2", { className: "text-2xl font-semibold text-white mb-4", children: "Welcome to Documentation" }), jsxRuntimeExports.jsx("p", { className: "text-white/60 mb-8 max-w-md mx-auto", children: "Select a page from the sidebar to view its content. Navigate through categories to explore different sections of the documentation." }), jsxRuntimeExports.jsxs("div", { className: "flex justify-center space-x-4", children: [jsxRuntimeExports.jsxs("div", { className: "px-4 py-2 bg-[#1a1a1a] rounded-lg border border-[#313133]", children: [jsxRuntimeExports.jsx("span", { className: "text-white/50 text-sm", children: "Total Pages" }), jsxRuntimeExports.jsx("p", { className: "text-white text-lg font-semibold", children: countPages(categories) })] }), jsxRuntimeExports.jsxs("div", { className: "px-4 py-2 bg-[#1a1a1a] rounded-lg border border-[#313133]", children: [jsxRuntimeExports.jsx("span", { className: "text-white/50 text-sm", children: "Categories" }), jsxRuntimeExports.jsx("p", { className: "text-white text-lg font-semibold", children: countCategories(categories) })] })] })] }) }));
77322
+ return (jsxRuntimeExports.jsx("div", { className: "flex-1 flex items-center justify-center", children: jsxRuntimeExports.jsxs("div", { className: "text-center", children: [jsxRuntimeExports.jsx("h2", { className: "text-2xl font-semibold text-white mb-4", children: "Welcome to Documentation" }), jsxRuntimeExports.jsx("p", { className: "text-white/60 mb-8 max-w-md mx-auto", children: "Select a page from the sidebar to view its content. Navigate through categories to explore different sections of the documentation." }), jsxRuntimeExports.jsxs("div", { className: "flex justify-center space-x-4", children: [jsxRuntimeExports.jsxs("div", { className: "px-4 py-2 bg-[#1a1a1a] rounded-lg border border-[#313133]", children: [jsxRuntimeExports.jsx("span", { className: "text-white/50 text-sm", children: "Total Pages" }), jsxRuntimeExports.jsx("p", { className: "text-white text-lg font-semibold", children: countPages(categories) })] }), jsxRuntimeExports.jsxs("div", { className: "px-4 py-2 bg-[#1a1a1a] rounded-lg border border-[#313133]", children: [jsxRuntimeExports.jsx("span", { className: "text-white/50 text-sm", children: "Categories" }), jsxRuntimeExports.jsx("p", { className: "text-white text-lg font-semibold", children: countCategories(categories) })] })] })] }) }));
77323
77323
  }
77324
77324
  const getRootCategoryName = (cat) => {
77325
77325
  if (!cat.parentId)