@tnkrai/tnkr-editor 0.1.7 → 0.1.9
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 +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -76427,7 +76427,7 @@ const AssemblyViewMode = ({ phases, htmlContent, className = '', productTitle, p
|
|
|
76427
76427
|
if (phases.length === 0) {
|
|
76428
76428
|
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" })] }) }));
|
|
76429
76429
|
}
|
|
76430
|
-
return (jsxRuntimeExports.jsx("div", { className: `assembly-view-container w-full relative rounded-3xl bg-[#161617] ${className}`, children: jsxRuntimeExports.jsxs("div", { className: 'grid grid-cols-1 lg:grid-cols-5 gap-4 px-4 py-4 items-stretch', children: [jsxRuntimeExports.jsxs("div", { className: 'lg:col-span-3 flex flex-col w-full relative bg-transparent border rounded-3xl border-[#313133]', children: [jsxRuntimeExports.jsxs("div", { className: 'rounded-lg p-6 flex-shrink-0', 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: 'space-y-2', children: 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) => {
|
|
76430
|
+
return (jsxRuntimeExports.jsx("div", { className: `assembly-view-container w-full h-full relative rounded-3xl bg-[#161617] ${className}`, children: jsxRuntimeExports.jsxs("div", { className: 'grid grid-cols-1 lg:grid-cols-5 gap-4 px-4 py-4 items-stretch', children: [jsxRuntimeExports.jsxs("div", { className: 'lg:col-span-3 flex flex-col w-full relative bg-transparent border rounded-3xl border-[#313133]', children: [jsxRuntimeExports.jsxs("div", { className: 'rounded-lg p-6 flex-shrink-0', 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: 'space-y-2', children: 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) => {
|
|
76431
76431
|
const displayText = annotation.text.value || `${annotation.type === 'arrow' ? 'Arrow' : 'Label'} ${index + 1}`;
|
|
76432
76432
|
const truncatedText = displayText.length > 30 ? displayText.substring(0, 30) + '...' : displayText;
|
|
76433
76433
|
const isVisible = visibleAnnotationIds.includes(annotation.id);
|
|
@@ -77364,7 +77364,7 @@ const TnkrPreview = ({ categories, className = "", title, onCategorySelect, orga
|
|
|
77364
77364
|
onCategorySelect === null || onCategorySelect === void 0 ? void 0 : onCategorySelect(page);
|
|
77365
77365
|
}
|
|
77366
77366
|
}, [pagesWithContent, onCategorySelect]);
|
|
77367
|
-
return (jsxRuntimeExports.jsxs("div", { className: `flex flex-col rounded-3xl h-screen
|
|
77367
|
+
return (jsxRuntimeExports.jsxs("div", { className: `flex flex-col rounded-3xl h-screen p-2 bg-[#0D0D0D] border-[#000000] ${className}`, children: [jsxRuntimeExports.jsx(PreviewNavbar, { organizationName: organizationName, organizationLogo: organizationLogo, onContactClick: onContactClick, onDiscussionsClick: onDiscussionsClick }), jsxRuntimeExports.jsxs("div", { className: "flex flex-1 overflow-hidden rounded-b-3xl", children: [jsxRuntimeExports.jsx(PreviewSidebar, { categories: categoriesWithExpansion, selectedCategoryId: selectedCategoryId, onCategorySelect: handleCategorySelect, onToggleExpand: handleToggleExpand }), jsxRuntimeExports.jsx("div", { className: "flex-1 flex flex-col overflow-hidden", children: selectedCategory && ((selectedCategory.hasPage && selectedCategory.pageContent) ||
|
|
77368
77368
|
(selectedCategory.type === "assembly" && selectedCategory.organizationId && selectedCategory.productId)) ? (jsxRuntimeExports.jsxs("div", { className: "flex-1 flex overflow-hidden", children: [jsxRuntimeExports.jsx(PageContent, { category: selectedCategory, categories: categories, onGoToPage: handleGoToPage }), selectedCategory.hasPage && selectedCategory.pageContent && (jsxRuntimeExports.jsx(PageContentNavigator, { content: selectedCategory.pageContent }))] })) : (
|
|
77369
77369
|
/* Show placeholder when no content */
|
|
77370
77370
|
jsxRuntimeExports.jsx("div", { className: "flex-1 flex items-center justify-center", children: jsxRuntimeExports.jsxs("div", { className: "text-center text-white/60", children: [jsxRuntimeExports.jsx("p", { className: "text-lg mb-2", children: "No content available" }), jsxRuntimeExports.jsx("p", { className: "text-sm", children: "Select a page with content to view it here" })] }) })) })] })] }));
|