@catalystsoftware/ui 1.0.12 → 1.0.14
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/components/catalyst-ui/background/animated-beam.tsx +189 -0
- package/dist/components/catalyst-ui/background/background-gradient.tsx +77 -0
- package/dist/components/catalyst-ui/background/background-paths.tsx +132 -0
- package/dist/components/catalyst-ui/background/canvas-fractal-grid.tsx +1862 -0
- package/dist/components/catalyst-ui/background/distorted-glass.tsx +0 -0
- package/dist/components/catalyst-ui/background/dot-pattern.tsx +169 -0
- package/dist/components/catalyst-ui/background/dotted-glow-background.tsx +342 -0
- package/dist/components/catalyst-ui/background/dotted-map.tsx +193 -0
- package/dist/components/catalyst-ui/background/dynamic-rain.tsx +216 -0
- package/dist/components/catalyst-ui/background/flickering-grid.tsx +211 -0
- package/dist/components/catalyst-ui/background/fractal-grid.tsx +666 -0
- package/dist/components/catalyst-ui/background/hexagon-background.tsx +102 -0
- package/dist/components/catalyst-ui/background/index.ts +25 -0
- package/dist/components/catalyst-ui/background/interactive-grid-pattern.tsx +90 -0
- package/dist/components/catalyst-ui/background/lamp.tsx +105 -0
- package/dist/components/catalyst-ui/background/orbiting-circles.tsx +76 -0
- package/dist/components/catalyst-ui/background/particles.tsx +286 -0
- package/dist/components/catalyst-ui/background/progressive-blur.tsx +113 -0
- package/dist/components/catalyst-ui/background/retro-grid-background.tsx +104 -0
- package/dist/components/catalyst-ui/background/smoke.tsx +117 -0
- package/dist/components/catalyst-ui/background/sparkles.tsx +435 -0
- package/dist/components/catalyst-ui/background/stripe-bg-guides.tsx +260 -0
- package/dist/components/catalyst-ui/background/texture-overlay.tsx +207 -0
- package/dist/components/catalyst-ui/background/vortex.tsx +257 -0
- package/dist/components/catalyst-ui/buttons/animated-theme-toggler.tsx +90 -0
- package/dist/components/catalyst-ui/buttons/attract-button.tsx +167 -0
- package/dist/components/catalyst-ui/buttons/bg-animate-button.tsx +249 -0
- package/dist/components/catalyst-ui/buttons/button-group.tsx +203 -0
- package/dist/components/catalyst-ui/buttons/command-button.tsx +109 -0
- package/dist/components/catalyst-ui/buttons/copy-button.tsx +117 -0
- package/dist/components/catalyst-ui/buttons/copy-text.tsx +347 -0
- package/dist/components/catalyst-ui/buttons/export-file.tsx +262 -0
- package/dist/components/catalyst-ui/buttons/flip-button.tsx +106 -0
- package/dist/components/catalyst-ui/buttons/float-button.tsx +197 -0
- package/dist/components/catalyst-ui/buttons/form-button.tsx +90 -0
- package/dist/components/catalyst-ui/buttons/hold-button.tsx +208 -0
- package/dist/components/catalyst-ui/buttons/index.ts +35 -0
- package/dist/components/catalyst-ui/buttons/input-button.tsx +192 -0
- package/dist/components/catalyst-ui/buttons/liquid-button.tsx +53 -0
- package/dist/components/catalyst-ui/buttons/particle-button.tsx +193 -0
- package/dist/components/catalyst-ui/buttons/rating-button-1.tsx +243 -0
- package/dist/components/catalyst-ui/buttons/rating-button.tsx +226 -0
- package/dist/components/catalyst-ui/buttons/ripple-button.tsx +146 -0
- package/dist/components/catalyst-ui/buttons/scroll-to-top.tsx +47 -0
- package/dist/components/catalyst-ui/buttons/shimmer-button.tsx +84 -0
- package/dist/components/catalyst-ui/buttons/slide-button.tsx +90 -0
- package/dist/components/catalyst-ui/buttons/social-button.tsx +194 -0
- package/dist/components/catalyst-ui/buttons/split-button.tsx +121 -0
- package/dist/components/catalyst-ui/buttons/switch-button.tsx +316 -0
- package/dist/components/catalyst-ui/buttons/text-reveal-button.tsx +65 -0
- package/dist/components/catalyst-ui/buttons/theme-switcher.tsx +102 -0
- package/dist/components/catalyst-ui/buttons/theme-toggle-button.tsx +312 -0
- package/dist/components/catalyst-ui/buttons/toggle-button.tsx +125 -0
- package/dist/components/catalyst-ui/buttons/tooltip-button.tsx +24 -0
- package/dist/components/catalyst-ui/charts/area-chart.tsx +989 -0
- package/dist/components/catalyst-ui/charts/bar-chart.tsx +887 -0
- package/dist/components/catalyst-ui/charts/bar-list.tsx +171 -0
- package/dist/components/catalyst-ui/charts/category-bar.tsx +221 -0
- package/dist/components/catalyst-ui/charts/chart-utils.ts +168 -0
- package/dist/components/catalyst-ui/charts/combo-chart.tsx +1179 -0
- package/dist/components/catalyst-ui/charts/donut-chart.tsx +337 -0
- package/dist/components/catalyst-ui/charts/index.ts +14 -0
- package/dist/components/catalyst-ui/charts/line-chart.tsx +907 -0
- package/dist/components/catalyst-ui/charts/spark-chart.tsx +328 -0
- package/dist/components/catalyst-ui/chat/chat.tsx +491 -0
- package/dist/components/catalyst-ui/code/code-block-section.tsx +939 -0
- package/dist/components/catalyst-ui/code/code-comparison.tsx +221 -0
- package/dist/components/catalyst-ui/code/code-comparison1.tsx +203 -0
- package/dist/components/catalyst-ui/code/code-editor.tsx +318 -0
- package/dist/components/catalyst-ui/code/code-section.tsx +62 -0
- package/dist/components/catalyst-ui/code/css-section.tsx +142 -0
- package/dist/components/catalyst-ui/code/html-section.tsx +102 -0
- package/dist/components/catalyst-ui/code/index.ts +22 -0
- package/dist/components/catalyst-ui/code/installCode-section.tsx +181 -0
- package/dist/components/catalyst-ui/code/installCodeArray-section.tsx +186 -0
- package/dist/components/catalyst-ui/code/installGithub-section.tsx +119 -0
- package/dist/components/catalyst-ui/code/json-section.tsx +253 -0
- package/dist/components/catalyst-ui/code/props-section.tsx +605 -0
- package/dist/components/catalyst-ui/code/sandbox.tsx +398 -0
- package/dist/components/catalyst-ui/code/sandbox2.tsx +3194 -0
- package/dist/components/catalyst-ui/code/terminal-1.tsx +119 -0
- package/dist/components/catalyst-ui/code/terminal-code-section.tsx +395 -0
- package/dist/components/catalyst-ui/code/terminal.tsx +315 -0
- package/dist/components/catalyst-ui/code/tsx-section.tsx +176 -0
- package/dist/components/catalyst-ui/comboboxes/choicebox.tsx +203 -0
- package/dist/components/catalyst-ui/comboboxes/combobox-0.tsx +556 -0
- package/dist/components/catalyst-ui/comboboxes/combobox-1.tsx +146 -0
- package/dist/components/catalyst-ui/comboboxes/combobox2.tsx +255 -0
- package/dist/components/catalyst-ui/comboboxes/emoji-picker.tsx +486 -0
- package/dist/components/catalyst-ui/comboboxes/filter-combobox.tsx +46 -0
- package/dist/components/catalyst-ui/comboboxes/index.ts +9 -0
- package/dist/components/catalyst-ui/comboboxes/multi-combobox.tsx +169 -0
- package/dist/components/catalyst-ui/comboboxes/nested-combobox.tsx +211 -0
- package/dist/components/catalyst-ui/commands/command-2.tsx +126 -0
- package/dist/components/catalyst-ui/commands/command-w-combobox.tsx +108 -0
- package/dist/components/catalyst-ui/commands/index.ts +6 -0
- package/dist/components/catalyst-ui/commands/nested-command-dialog.tsx +429 -0
- package/dist/components/catalyst-ui/commands/nested-command.tsx +133 -0
- package/dist/components/catalyst-ui/core/components/3d-card.tsx +144 -0
- package/dist/components/catalyst-ui/core/components/3d-card1.tsx +196 -0
- package/dist/components/catalyst-ui/core/components/android.tsx +105 -0
- package/dist/components/catalyst-ui/core/components/apple-cards-carousel.tsx +376 -0
- package/dist/components/catalyst-ui/core/components/apple-dock.tsx +280 -0
- package/dist/components/catalyst-ui/core/components/badge-1.tsx +117 -0
- package/dist/components/catalyst-ui/core/components/card-flip.tsx +204 -0
- package/dist/components/catalyst-ui/core/components/card-stack.tsx +224 -0
- package/dist/components/catalyst-ui/core/components/chat-bubble.tsx +198 -0
- package/dist/components/catalyst-ui/core/components/collapsible-section.tsx +92 -0
- package/dist/components/catalyst-ui/core/components/comment.tsx +812 -0
- package/dist/components/catalyst-ui/core/components/counter.tsx +77 -0
- package/dist/components/catalyst-ui/core/components/credit-card.tsx +406 -0
- package/dist/components/catalyst-ui/core/components/device-mockup.tsx +436 -0
- package/dist/components/catalyst-ui/core/components/embed.tsx +0 -0
- package/dist/components/catalyst-ui/core/components/faq.tsx +166 -0
- package/dist/components/catalyst-ui/core/components/feed.tsx +741 -0
- package/dist/components/catalyst-ui/core/components/fixed-marker.tsx +232 -0
- package/dist/components/catalyst-ui/core/components/for.tsx +138 -0
- package/dist/components/catalyst-ui/core/components/glowing-effect-card.tsx +273 -0
- package/dist/components/catalyst-ui/core/components/iframe.tsx +175 -0
- package/dist/components/catalyst-ui/core/components/in-place.tsx +285 -0
- package/dist/components/catalyst-ui/core/components/iphone-15-pro.tsx +129 -0
- package/dist/components/catalyst-ui/core/components/macbook-scroll.tsx +702 -0
- package/dist/components/catalyst-ui/core/components/magic-card.tsx +102 -0
- package/dist/components/catalyst-ui/core/components/message-dock.tsx +61 -0
- package/dist/components/catalyst-ui/core/components/meter.tsx +123 -0
- package/dist/components/catalyst-ui/core/components/number-ticker.tsx +67 -0
- package/dist/components/catalyst-ui/core/components/panel.tsx +286 -0
- package/dist/components/catalyst-ui/core/components/pill-1.tsx +166 -0
- package/dist/components/catalyst-ui/core/components/qrcode.tsx +1153 -0
- package/dist/components/catalyst-ui/core/components/safari-device.tsx +197 -0
- package/dist/components/catalyst-ui/core/components/sliding-number.tsx +235 -0
- package/dist/components/catalyst-ui/core/components/spoiler.tsx +161 -0
- package/dist/components/catalyst-ui/core/components/stat.tsx +572 -0
- package/dist/components/catalyst-ui/core/components/sticky.tsx +214 -0
- package/dist/components/catalyst-ui/core/components/tag.tsx +551 -0
- package/dist/components/catalyst-ui/core/components/tweet-card-1.tsx +164 -0
- package/dist/components/catalyst-ui/core/components/tweet-card.tsx +229 -0
- package/dist/components/catalyst-ui/core/data-display/barcode.tsx +1007 -0
- package/dist/components/catalyst-ui/core/data-display/data-list.tsx +344 -0
- package/dist/components/catalyst-ui/core/data-display/descriptionLists.tsx +205 -0
- package/dist/components/catalyst-ui/core/data-display/diff.tsx +186 -0
- package/dist/components/catalyst-ui/core/data-display/heat-map-calendar.tsx +361 -0
- package/dist/components/catalyst-ui/core/data-display/order-list.tsx +0 -0
- package/dist/components/catalyst-ui/core/data-display/stats-1.tsx +129 -0
- package/dist/components/catalyst-ui/core/data-display/stats.tsx +139 -0
- package/dist/components/catalyst-ui/core/data-display/ticker.tsx +179 -0
- package/dist/components/catalyst-ui/core/data-display/timeline-1.tsx +452 -0
- package/dist/components/catalyst-ui/core/data-display/timeline2.tsx +240 -0
- package/dist/components/catalyst-ui/core/data-display/tracker.tsx +209 -0
- package/dist/components/catalyst-ui/core/data-display/transfer-list.tsx +278 -0
- package/dist/components/catalyst-ui/core/data-display/tremor-tracker.tsx +103 -0
- package/dist/components/catalyst-ui/core/demos/FAQ-demo.tsx +41 -0
- package/dist/components/catalyst-ui/core/demos/action-panels-demo.tsx +64 -0
- package/dist/components/catalyst-ui/core/demos/banner-demo.tsx +100 -0
- package/dist/components/catalyst-ui/core/demos/bentoGrid-demo.tsx +191 -0
- package/dist/components/catalyst-ui/core/demos/blog-demo.tsx +68 -0
- package/dist/components/catalyst-ui/core/demos/blogEditor-demo.tsx +10 -0
- package/dist/components/catalyst-ui/core/demos/blogPost-demo.tsx +41 -0
- package/dist/components/catalyst-ui/core/demos/button-groups-demo.tsx +111 -0
- package/dist/components/catalyst-ui/core/demos/cardHeadings-demo.tsx +65 -0
- package/dist/components/catalyst-ui/core/demos/catch-all.tsx +414 -0
- package/dist/components/catalyst-ui/core/demos/contact-demo.tsx +87 -0
- package/dist/components/catalyst-ui/core/demos/content-demo.tsx +52 -0
- package/dist/components/catalyst-ui/core/demos/cta-demo.tsx +64 -0
- package/dist/components/catalyst-ui/core/demos/descriptionLists-demo.tsx +109 -0
- package/dist/components/catalyst-ui/core/demos/edit-product-page-demo.tsx +11 -0
- package/dist/components/catalyst-ui/core/demos/empty-state-demo.tsx +37 -0
- package/dist/components/catalyst-ui/core/demos/feature-demo.tsx +104 -0
- package/dist/components/catalyst-ui/core/demos/feeds-demo.tsx +26 -0
- package/dist/components/catalyst-ui/core/demos/flyoutMenu-demo.tsx +156 -0
- package/dist/components/catalyst-ui/core/demos/footer-demo.tsx +62 -0
- package/dist/components/catalyst-ui/core/demos/form-layouts-demo.tsx +378 -0
- package/dist/components/catalyst-ui/core/demos/gridLists-demo.tsx +47 -0
- package/dist/components/catalyst-ui/core/demos/header-demo.tsx +0 -0
- package/dist/components/catalyst-ui/core/demos/header2-demo.tsx +77 -0
- package/dist/components/catalyst-ui/core/demos/headers-demo.tsx +659 -0
- package/dist/components/catalyst-ui/core/demos/hero-demo.tsx +75 -0
- package/dist/components/catalyst-ui/core/demos/input-groups-demo.tsx +75 -0
- package/dist/components/catalyst-ui/core/demos/landingPage-demo.tsx +222 -0
- package/dist/components/catalyst-ui/core/demos/list-demo.tsx +442 -0
- package/dist/components/catalyst-ui/core/demos/logoClouds-demo.tsx +36 -0
- package/dist/components/catalyst-ui/core/demos/mediaObject-demo.tsx +219 -0
- package/dist/components/catalyst-ui/core/demos/multiColumnLayouts-demo.tsx +42 -0
- package/dist/components/catalyst-ui/core/demos/newsLetter-demo.tsx +51 -0
- package/dist/components/catalyst-ui/core/demos/pageHeading-demo.tsx +55 -0
- package/dist/components/catalyst-ui/core/demos/pricing-demo.tsx +114 -0
- package/dist/components/catalyst-ui/core/demos/radio-group-demo.tsx +315 -0
- package/dist/components/catalyst-ui/core/demos/settingsScreen-demo.tsx +95 -0
- package/dist/components/catalyst-ui/core/demos/sidebar-demo.tsx +40 -0
- package/dist/components/catalyst-ui/core/demos/stackedLayout-demo.tsx +17 -0
- package/dist/components/catalyst-ui/core/demos/stackedLists-demo.tsx +60 -0
- package/dist/components/catalyst-ui/core/demos/stats-demo.tsx +99 -0
- package/dist/components/catalyst-ui/core/demos/team-demo.tsx +35 -0
- package/dist/components/catalyst-ui/core/demos/testimonial-demo.tsx +33 -0
- package/dist/components/catalyst-ui/core/demos/toggle-demo-demo.tsx +414 -0
- package/dist/components/catalyst-ui/core/feedback/alert-variant.tsx +101 -0
- package/dist/components/catalyst-ui/core/feedback/announcement.tsx +53 -0
- package/dist/components/catalyst-ui/core/feedback/banner-2.tsx +143 -0
- package/dist/components/catalyst-ui/core/feedback/banner.tsx +50 -0
- package/dist/components/catalyst-ui/core/feedback/banner1.tsx +64 -0
- package/dist/components/catalyst-ui/core/feedback/callout.tsx +18 -0
- package/dist/components/catalyst-ui/core/feedback/chat-bubble.tsx +770 -0
- package/dist/components/catalyst-ui/core/feedback/dimmer.tsx +518 -0
- package/dist/components/catalyst-ui/core/feedback/dot-loader.tsx +116 -0
- package/dist/components/catalyst-ui/core/feedback/empty-states.tsx +154 -0
- package/dist/components/catalyst-ui/core/feedback/hero-badge.tsx +90 -0
- package/dist/components/catalyst-ui/core/feedback/indicator.tsx +315 -0
- package/dist/components/catalyst-ui/core/feedback/loading.tsx +11 -0
- package/dist/components/catalyst-ui/core/feedback/spinner-2.tsx +10 -0
- package/dist/components/catalyst-ui/core/feedback/spinner-3.tsx +163 -0
- package/dist/components/catalyst-ui/core/feedback/spinner-4.tsx +276 -0
- package/dist/components/catalyst-ui/core/feedback/spinner.tsx +287 -0
- package/dist/components/catalyst-ui/core/feedback/status.tsx +54 -0
- package/dist/components/catalyst-ui/core/headings/cardHeadings.tsx +215 -0
- package/dist/components/catalyst-ui/core/headings/pageHeading.tsx +300 -0
- package/dist/components/catalyst-ui/core/headings/sectionHeadings.tsx +240 -0
- package/dist/components/catalyst-ui/core/heros/animated-hero.tsx +116 -0
- package/dist/components/catalyst-ui/core/heros/animated-hero1.tsx +108 -0
- package/dist/components/catalyst-ui/core/heros/hero-video-dialog.tsx +150 -0
- package/dist/components/catalyst-ui/core/index.ts +248 -0
- package/dist/components/catalyst-ui/core/layout/absolute-center.tsx +45 -0
- package/dist/components/catalyst-ui/core/layout/bento-grid.tsx +251 -0
- package/dist/components/catalyst-ui/core/layout/bento-grid1.tsx +58 -0
- package/dist/components/catalyst-ui/core/layout/bento-grid2.tsx +107 -0
- package/dist/components/catalyst-ui/core/layout/bento-system.tsx +101 -0
- package/dist/components/catalyst-ui/core/layout/box.tsx +231 -0
- package/dist/components/catalyst-ui/core/layout/card-layout.tsx +312 -0
- package/dist/components/catalyst-ui/core/layout/center.tsx +76 -0
- package/dist/components/catalyst-ui/core/layout/container-demo.tsx +340 -0
- package/dist/components/catalyst-ui/core/layout/container.tsx +280 -0
- package/dist/components/catalyst-ui/core/layout/flexbox-grid.tsx +469 -0
- package/dist/components/catalyst-ui/core/layout/grid.tsx +656 -0
- package/dist/components/catalyst-ui/core/layout/group.tsx +49 -0
- package/dist/components/catalyst-ui/core/layout/list.tsx +665 -0
- package/dist/components/catalyst-ui/core/layout/mediaObject.tsx +254 -0
- package/dist/components/catalyst-ui/core/layout/rail.tsx +175 -0
- package/dist/components/catalyst-ui/core/layout/section.tsx +86 -0
- package/dist/components/catalyst-ui/core/layout/stack.tsx +182 -0
- package/dist/components/catalyst-ui/core/lists/animated-list.tsx +98 -0
- package/dist/components/catalyst-ui/core/lists/feeds.tsx +190 -0
- package/dist/components/catalyst-ui/core/lists/file-tree.tsx +379 -0
- package/dist/components/catalyst-ui/core/lists/gridLists.tsx +212 -0
- package/dist/components/catalyst-ui/core/lists/index.ts +14 -0
- package/dist/components/catalyst-ui/core/lists/list-1.tsx +152 -0
- package/dist/components/catalyst-ui/core/lists/list.tsx +217 -0
- package/dist/components/catalyst-ui/core/lists/list1.tsx +138 -0
- package/dist/components/catalyst-ui/core/lists/pin-list.tsx +191 -0
- package/dist/components/catalyst-ui/core/lists/stackedLists.tsx +149 -0
- package/dist/components/catalyst-ui/core/lists/tables.tsx +615 -0
- package/dist/components/catalyst-ui/core/lists/tree.tsx +194 -0
- package/dist/components/catalyst-ui/core/modules/createEditSchedule.tsx +389 -0
- package/dist/components/catalyst-ui/core/modules/punchClock.tsx +304 -0
- package/dist/components/catalyst-ui/core/modules/schedule.tsx +188 -0
- package/dist/components/catalyst-ui/core/modules/viewPunchClockEntries.tsx +629 -0
- package/dist/components/catalyst-ui/core/navbars/navbar-01.tsx +264 -0
- package/dist/components/catalyst-ui/core/navbars/navbar-02.tsx +498 -0
- package/dist/components/catalyst-ui/core/navbars/navbar-03.tsx +263 -0
- package/dist/components/catalyst-ui/core/navbars/navbar-04.tsx +331 -0
- package/dist/components/catalyst-ui/core/navbars/navbar-05.tsx +400 -0
- package/dist/components/catalyst-ui/core/navbars/navbar-06.tsx +436 -0
- package/dist/components/catalyst-ui/core/navbars/navbar-07.tsx +331 -0
- package/dist/components/catalyst-ui/core/navbars/navbar-08.tsx +418 -0
- package/dist/components/catalyst-ui/core/navbars/navbar-09.tsx +440 -0
- package/dist/components/catalyst-ui/core/navbars/navbar-10.tsx +351 -0
- package/dist/components/catalyst-ui/core/navbars/navbar-11.tsx +444 -0
- package/dist/components/catalyst-ui/core/navbars/navbar-12/NotificationMenu.tsx +120 -0
- package/dist/components/catalyst-ui/core/navbars/navbar-12/TeamSwitcher.tsx +87 -0
- package/dist/components/catalyst-ui/core/navbars/navbar-12/UserMenu.tsx +80 -0
- package/dist/components/catalyst-ui/core/navbars/navbar-12/navbar-12.tsx +230 -0
- package/dist/components/catalyst-ui/core/navbars/navbar-13/UserMenu.tsx +80 -0
- package/dist/components/catalyst-ui/core/navbars/navbar-13/navbar-13.tsx +144 -0
- package/dist/components/catalyst-ui/core/navbars/navbar-14/InfoMenu.tsx +62 -0
- package/dist/components/catalyst-ui/core/navbars/navbar-14/NotificationMenu.tsx +122 -0
- package/dist/components/catalyst-ui/core/navbars/navbar-14/SettingsMenu.tsx +66 -0
- package/dist/components/catalyst-ui/core/navbars/navbar-14/navbar-14.tsx +156 -0
- package/dist/components/catalyst-ui/core/navbars/navbar-15/DatePicker.tsx +66 -0
- package/dist/components/catalyst-ui/core/navbars/navbar-15/Filters.tsx +160 -0
- package/dist/components/catalyst-ui/core/navbars/navbar-15/navbar-15.tsx +151 -0
- package/dist/components/catalyst-ui/core/navbars/navbar-16/AppToggle.tsx +125 -0
- package/dist/components/catalyst-ui/core/navbars/navbar-16/TeamSwitcher.tsx +87 -0
- package/dist/components/catalyst-ui/core/navbars/navbar-16/navbar-16.tsx +113 -0
- package/dist/components/catalyst-ui/core/navbars/navbar-17.tsx +209 -0
- package/dist/components/catalyst-ui/core/navbars/navbar-18.tsx +243 -0
- package/dist/components/catalyst-ui/core/navbars/navbar-19.tsx +333 -0
- package/dist/components/catalyst-ui/core/navigation/affix.tsx +123 -0
- package/dist/components/catalyst-ui/core/navigation/anchor.tsx +41 -0
- package/dist/components/catalyst-ui/core/navigation/dock-1.tsx +0 -0
- package/dist/components/catalyst-ui/core/navigation/dock-2.tsx +289 -0
- package/dist/components/catalyst-ui/core/navigation/dock.tsx +376 -0
- package/dist/components/catalyst-ui/core/navigation/efab.tsx +245 -0
- package/dist/components/catalyst-ui/core/navigation/fab-menu-component.tsx +299 -0
- package/dist/components/catalyst-ui/core/navigation/fab-menu.tsx +220 -0
- package/dist/components/catalyst-ui/core/navigation/fab.tsx +236 -0
- package/dist/components/catalyst-ui/core/navigation/index.ts +32 -0
- package/dist/components/catalyst-ui/core/navigation/limelight-nav.tsx +110 -0
- package/dist/components/catalyst-ui/core/navigation/mega-menu.tsx +354 -0
- package/dist/components/catalyst-ui/core/navigation/menu-dock.tsx +204 -0
- package/dist/components/catalyst-ui/core/navigation/message-dock.tsx +511 -0
- package/dist/components/catalyst-ui/core/navigation/page-nav.tsx +29 -0
- package/dist/components/catalyst-ui/core/navigation/page-sidebar-nav.tsx +39 -0
- package/dist/components/catalyst-ui/core/navigation/pagination-button.tsx +56 -0
- package/dist/components/catalyst-ui/core/navigation/pagination-wrapper.tsx +152 -0
- package/dist/components/catalyst-ui/core/navigation/panel-menu.tsx +201 -0
- package/dist/components/catalyst-ui/core/navigation/remix-link.tsx +40 -0
- package/dist/components/catalyst-ui/core/navigation/smooth-tab.tsx +412 -0
- package/dist/components/catalyst-ui/core/navigation/speed-dial.tsx +175 -0
- package/dist/components/catalyst-ui/core/navigation/stepper.tsx +290 -0
- package/dist/components/catalyst-ui/core/navigation/steps.tsx +578 -0
- package/dist/components/catalyst-ui/core/navigation/tab-menu.tsx +227 -0
- package/dist/components/catalyst-ui/core/navigation/tab-view.tsx +742 -0
- package/dist/components/catalyst-ui/core/navigation/toolbar-1.tsx +412 -0
- package/dist/components/catalyst-ui/core/navigation/toolbar.tsx +245 -0
- package/dist/components/catalyst-ui/core/sections/changelog-section.tsx +135 -0
- package/dist/components/catalyst-ui/core/sections/config-section.tsx +82 -0
- package/dist/components/catalyst-ui/core/sections/contact.tsx +600 -0
- package/dist/components/catalyst-ui/core/sections/content.tsx +386 -0
- package/dist/components/catalyst-ui/core/sections/layout.tsx +310 -0
- package/dist/components/catalyst-ui/core/sections/note-section.tsx +85 -0
- package/dist/components/catalyst-ui/core/sections/placeholder-code-section.tsx +14 -0
- package/dist/components/catalyst-ui/core/sections/step-number-section.tsx +16 -0
- package/dist/components/catalyst-ui/core/sections/team.tsx +372 -0
- package/dist/components/catalyst-ui/core/sections/useage-no-dash-section.tsx +79 -0
- package/dist/components/catalyst-ui/core/sections/useage-section.tsx +79 -0
- package/dist/components/catalyst-ui/core/shell/app-shell.tsx +321 -0
- package/dist/components/catalyst-ui/core/shell/content-shell.tsx +70 -0
- package/dist/components/catalyst-ui/core/shell/documentation/example.tsx +106 -0
- package/dist/components/catalyst-ui/core/shell/documentation/layout.config.tsx +200 -0
- package/dist/components/catalyst-ui/core/shell/documentation/layout.example.tsx +127 -0
- package/dist/components/catalyst-ui/core/shell/documentation/layout.tsx +280 -0
- package/dist/components/catalyst-ui/core/shell/multiColumnLayouts.tsx +364 -0
- package/dist/components/catalyst-ui/core/shell/sidebarLayout.tsx +459 -0
- package/dist/components/catalyst-ui/core/shell/stackedLayout.tsx +323 -0
- package/dist/components/catalyst-ui/core/shell/three-col/app.tsx +193 -0
- package/dist/components/catalyst-ui/core/shell/three-col/content.tsx +358 -0
- package/dist/components/catalyst-ui/core/shell/three-col/header.tsx +222 -0
- package/dist/components/catalyst-ui/core/shell/three-col/layout.tsx +120 -0
- package/dist/components/catalyst-ui/core/shell/three-col/side-navbar.tsx +305 -0
- package/dist/components/catalyst-ui/core/shell/three-col/sidebar.tsx +41 -0
- package/dist/components/catalyst-ui/crm/comp-297.tsx +24 -0
- package/dist/components/catalyst-ui/crm/comp-298.tsx +188 -0
- package/dist/components/catalyst-ui/crm/comp-299.tsx +24 -0
- package/dist/components/catalyst-ui/crm/comp-300.tsx +62 -0
- package/dist/components/catalyst-ui/crm/index.ts +5 -0
- package/dist/components/catalyst-ui/crm/tools/scripts-editor.tsx +3109 -0
- package/dist/components/catalyst-ui/crm/tools/scripts-viewer.tsx +215 -0
- package/dist/components/catalyst-ui/data/bg-data.tsx +901 -0
- package/dist/components/catalyst-ui/data/buttons-data.tsx +2327 -0
- package/dist/components/catalyst-ui/data/charts-data.tsx +102 -0
- package/dist/components/catalyst-ui/data/chat-data.tsx +83 -0
- package/dist/components/catalyst-ui/data/code-data.tsx +1040 -0
- package/dist/components/catalyst-ui/data/comboboxes-data.tsx +1843 -0
- package/dist/components/catalyst-ui/data/command-data.tsx +1381 -0
- package/dist/components/catalyst-ui/data/core-data.tsx +15953 -0
- package/dist/components/catalyst-ui/data/crm-data.tsx +47 -0
- package/dist/components/catalyst-ui/data/data.tsx +159 -0
- package/dist/components/catalyst-ui/data/date-and-time-data.tsx +554 -0
- package/dist/components/catalyst-ui/data/dependencies.tsx +7 -0
- package/dist/components/catalyst-ui/data/ecommerce-data.tsx +1387 -0
- package/dist/components/catalyst-ui/data/forms-data.tsx +7890 -0
- package/dist/components/catalyst-ui/data/hooks-data.tsx +5487 -0
- package/dist/components/catalyst-ui/data/index.ts +34 -0
- package/dist/components/catalyst-ui/data/inputs-data.tsx +557 -0
- package/dist/components/catalyst-ui/data/interactive-data.tsx +5394 -0
- package/dist/components/catalyst-ui/data/lofi-data.tsx +18295 -0
- package/dist/components/catalyst-ui/data/marketing-data.tsx +2546 -0
- package/dist/components/catalyst-ui/data/media-data.tsx +1510 -0
- package/dist/components/catalyst-ui/data/motion-data.tsx +5801 -0
- package/dist/components/catalyst-ui/data/overlay-data.tsx +4136 -0
- package/dist/components/catalyst-ui/data/pdf-data.tsx +124 -0
- package/dist/components/catalyst-ui/data/pos-data.tsx +213 -0
- package/dist/components/catalyst-ui/data/primitive-data.tsx +5170 -0
- package/dist/components/catalyst-ui/data/prompt-data.tsx +1226 -0
- package/dist/components/catalyst-ui/data/requiredLibs.ts +4 -0
- package/dist/components/catalyst-ui/data/sandbox-data.tsx +1 -0
- package/dist/components/catalyst-ui/data/sidebars-data.tsx +5421 -0
- package/dist/components/catalyst-ui/data/stacks-data.tsx +32 -0
- package/dist/components/catalyst-ui/data/table-data.tsx +706 -0
- package/dist/components/catalyst-ui/data/tools-data.tsx +6910 -0
- package/dist/components/catalyst-ui/data/typography-data.tsx +2050 -0
- package/dist/components/catalyst-ui/data/utils-data.tsx +6500 -0
- package/dist/components/catalyst-ui/data/x-data.tsx +1171 -0
- package/dist/components/catalyst-ui/data2.tsx +158 -0
- package/dist/components/catalyst-ui/date-and-time/appointment-scheduler.tsx +381 -0
- package/dist/components/catalyst-ui/date-and-time/calendar-2.tsx +498 -0
- package/dist/components/catalyst-ui/date-and-time/calendar-for-sidebar.tsx +68 -0
- package/dist/components/catalyst-ui/date-and-time/calendar-rac.tsx +112 -0
- package/dist/components/catalyst-ui/date-and-time/date-picker-input.tsx +76 -0
- package/dist/components/catalyst-ui/date-and-time/date-picker.tsx +64 -0
- package/dist/components/catalyst-ui/date-and-time/date-range-picker-input.tsx +84 -0
- package/dist/components/catalyst-ui/date-and-time/date-range-picker.tsx +125 -0
- package/dist/components/catalyst-ui/date-and-time/datefield-rac.tsx +88 -0
- package/dist/components/catalyst-ui/date-and-time/docked-date-picker.tsx +267 -0
- package/dist/components/catalyst-ui/date-and-time/drawerDatePicker.tsx +50 -0
- package/dist/components/catalyst-ui/date-and-time/event-calendar/agenda-view.tsx +90 -0
- package/dist/components/catalyst-ui/date-and-time/event-calendar/calendar-dnd-context.tsx +373 -0
- package/dist/components/catalyst-ui/date-and-time/event-calendar/constants.ts +18 -0
- package/dist/components/catalyst-ui/date-and-time/event-calendar/day-view.tsx +322 -0
- package/dist/components/catalyst-ui/date-and-time/event-calendar/demo.tsx +162 -0
- package/dist/components/catalyst-ui/date-and-time/event-calendar/draggable-event.tsx +141 -0
- package/dist/components/catalyst-ui/date-and-time/event-calendar/droppable-cell.tsx +57 -0
- package/dist/components/catalyst-ui/date-and-time/event-calendar/event-calendar.tsx +400 -0
- package/dist/components/catalyst-ui/date-and-time/event-calendar/event-dialog.tsx +467 -0
- package/dist/components/catalyst-ui/date-and-time/event-calendar/event-item.tsx +262 -0
- package/dist/components/catalyst-ui/date-and-time/event-calendar/events-popup.tsx +135 -0
- package/dist/components/catalyst-ui/date-and-time/event-calendar/hooks/use-current-time-indicator.ts +57 -0
- package/dist/components/catalyst-ui/date-and-time/event-calendar/hooks/use-event-visibility.ts +86 -0
- package/dist/components/catalyst-ui/date-and-time/event-calendar/index.ts +23 -0
- package/dist/components/catalyst-ui/date-and-time/event-calendar/month-view.tsx +276 -0
- package/dist/components/catalyst-ui/date-and-time/event-calendar/types.ts +20 -0
- package/dist/components/catalyst-ui/date-and-time/event-calendar/utils.ts +153 -0
- package/dist/components/catalyst-ui/date-and-time/event-calendar/week-view.tsx +406 -0
- package/dist/components/catalyst-ui/date-and-time/index.ts +74 -0
- package/dist/components/catalyst-ui/date-and-time/mini-calendar.tsx +230 -0
- package/dist/components/catalyst-ui/date-and-time/modal-date-input.tsx +229 -0
- package/dist/components/catalyst-ui/date-and-time/popover-date-input.tsx +233 -0
- package/dist/components/catalyst-ui/date-and-time/relative-time.tsx +181 -0
- package/dist/components/catalyst-ui/date-and-time/time-picker-dial.tsx +368 -0
- package/dist/components/catalyst-ui/date-and-time/time-picker-input.tsx +385 -0
- package/dist/components/catalyst-ui/date-and-time/time-picker.tsx +514 -0
- package/dist/components/catalyst-ui/demo/examples.tsx +10069 -0
- package/dist/components/catalyst-ui/demo/examples2.tsx +10954 -0
- package/dist/components/catalyst-ui/demo/index.ts +5 -0
- package/dist/components/catalyst-ui/ecommerce/components/categoryFilters.tsx +302 -0
- package/dist/components/catalyst-ui/ecommerce/components/categoryPreviews.tsx +464 -0
- package/dist/components/catalyst-ui/ecommerce/components/checkoutForms.tsx +991 -0
- package/dist/components/catalyst-ui/ecommerce/components/incentives.tsx +529 -0
- package/dist/components/catalyst-ui/ecommerce/components/orderHistory.tsx +380 -0
- package/dist/components/catalyst-ui/ecommerce/components/orderSummaries.tsx +482 -0
- package/dist/components/catalyst-ui/ecommerce/components/productCard.tsx +84 -0
- package/dist/components/catalyst-ui/ecommerce/components/productCard2.tsx +82 -0
- package/dist/components/catalyst-ui/ecommerce/components/productFeatures.tsx +764 -0
- package/dist/components/catalyst-ui/ecommerce/components/productLists.tsx +472 -0
- package/dist/components/catalyst-ui/ecommerce/components/productOverview.tsx +856 -0
- package/dist/components/catalyst-ui/ecommerce/components/productQuickViews.tsx +378 -0
- package/dist/components/catalyst-ui/ecommerce/components/promoSectionts.tsx +414 -0
- package/dist/components/catalyst-ui/ecommerce/components/reviews.tsx +274 -0
- package/dist/components/catalyst-ui/ecommerce/components/shoppingCarts.tsx +508 -0
- package/dist/components/catalyst-ui/ecommerce/components/storeNavigation.tsx +255 -0
- package/dist/components/catalyst-ui/ecommerce/demo/categoryFilters-demo.tsx +140 -0
- package/dist/components/catalyst-ui/ecommerce/demo/categoryPreviews-demo.tsx +252 -0
- package/dist/components/catalyst-ui/ecommerce/demo/checkoutForms-demo.tsx +76 -0
- package/dist/components/catalyst-ui/ecommerce/demo/editProductPage-data2.tsx +34 -0
- package/dist/components/catalyst-ui/ecommerce/demo/editProductPage-demo.tsx +10 -0
- package/dist/components/catalyst-ui/ecommerce/demo/incentives-demo.tsx +172 -0
- package/dist/components/catalyst-ui/ecommerce/demo/orderHistory-demo.tsx +81 -0
- package/dist/components/catalyst-ui/ecommerce/demo/orderSummaries-demo.tsx +98 -0
- package/dist/components/catalyst-ui/ecommerce/demo/pricingPage-demo.tsx +105 -0
- package/dist/components/catalyst-ui/ecommerce/demo/product.$id-demo.tsx +98 -0
- package/dist/components/catalyst-ui/ecommerce/demo/productCard-demo.tsx +308 -0
- package/dist/components/catalyst-ui/ecommerce/demo/productFeatures-demo.tsx +57 -0
- package/dist/components/catalyst-ui/ecommerce/demo/productLists-demo.tsx +130 -0
- package/dist/components/catalyst-ui/ecommerce/demo/productOverview-demo.tsx +328 -0
- package/dist/components/catalyst-ui/ecommerce/demo/productQuickViews-demo.tsx +242 -0
- package/dist/components/catalyst-ui/ecommerce/demo/promoSectionts-demo.tsx +169 -0
- package/dist/components/catalyst-ui/ecommerce/demo/reviews-demo.tsx +45 -0
- package/dist/components/catalyst-ui/ecommerce/demo/shoppingCarts-demo.tsx +73 -0
- package/dist/components/catalyst-ui/ecommerce/demo/store-demo.tsx +88 -0
- package/dist/components/catalyst-ui/ecommerce/demo/storeNavigation-demo.tsx +171 -0
- package/dist/components/catalyst-ui/ecommerce/index.ts +55 -0
- package/dist/components/catalyst-ui/ecommerce/modules/cash-drawer-wizard.tsx +1400 -0
- package/dist/components/catalyst-ui/ecommerce/modules/cash-till-manager.tsx +639 -0
- package/dist/components/catalyst-ui/ecommerce/modules/promotionEngine.ts +341 -0
- package/dist/components/catalyst-ui/ecommerce/modules/promotionsManager.tsx +840 -0
- package/dist/components/catalyst-ui/forms/action-bar-1.tsx +192 -0
- package/dist/components/catalyst-ui/forms/action-bar.tsx +154 -0
- package/dist/components/catalyst-ui/forms/action-panels.tsx +153 -0
- package/dist/components/catalyst-ui/forms/action-search-bar.tsx +268 -0
- package/dist/components/catalyst-ui/forms/auto-resizing-textarea.tsx +36 -0
- package/dist/components/catalyst-ui/forms/cascade-tree.tsx +224 -0
- package/dist/components/catalyst-ui/forms/cascader.tsx +219 -0
- package/dist/components/catalyst-ui/forms/check-tree-picker.tsx +330 -0
- package/dist/components/catalyst-ui/forms/check-tree.tsx +348 -0
- package/dist/components/catalyst-ui/forms/checkbox-1.tsx +48 -0
- package/dist/components/catalyst-ui/forms/checkbox-card-1.tsx +64 -0
- package/dist/components/catalyst-ui/forms/checkbox-card.tsx +145 -0
- package/dist/components/catalyst-ui/forms/checkbox-multistate.tsx +97 -0
- package/dist/components/catalyst-ui/forms/checkbox-tristate.tsx +158 -0
- package/dist/components/catalyst-ui/forms/color-picker-1.tsx +299 -0
- package/dist/components/catalyst-ui/forms/color-picker-3.tsx +487 -0
- package/dist/components/catalyst-ui/forms/color-picker.tsx +251 -0
- package/dist/components/catalyst-ui/forms/credit-card-input.tsx +284 -0
- package/dist/components/catalyst-ui/forms/debounced-input.tsx +21 -0
- package/dist/components/catalyst-ui/forms/fancy-area.tsx +571 -0
- package/dist/components/catalyst-ui/forms/fieldset.tsx +107 -0
- package/dist/components/catalyst-ui/forms/float-label.tsx +66 -0
- package/dist/components/catalyst-ui/forms/floating-label.tsx +138 -0
- package/dist/components/catalyst-ui/forms/form-wizard.tsx +787 -0
- package/dist/components/catalyst-ui/forms/fuse-search-input.tsx +293 -0
- package/dist/components/catalyst-ui/forms/fuzzy-filter.tsx +17 -0
- package/dist/components/catalyst-ui/forms/fuzzy-sort.tsx +17 -0
- package/dist/components/catalyst-ui/forms/icon-field.tsx +51 -0
- package/dist/components/catalyst-ui/forms/index.ts +58 -0
- package/dist/components/catalyst-ui/forms/inline-edit.tsx +108 -0
- package/dist/components/catalyst-ui/forms/inplace.tsx +174 -0
- package/dist/components/catalyst-ui/forms/input-icon.tsx +39 -0
- package/dist/components/catalyst-ui/forms/input-mask.tsx +216 -0
- package/dist/components/catalyst-ui/forms/input-text.tsx +52 -0
- package/dist/components/catalyst-ui/forms/json-input.tsx +261 -0
- package/dist/components/catalyst-ui/forms/key-filter.tsx +238 -0
- package/dist/components/catalyst-ui/forms/label-variant.tsx +53 -0
- package/dist/components/catalyst-ui/forms/listbox.tsx +118 -0
- package/dist/components/catalyst-ui/forms/multi-cascade-tree.tsx +586 -0
- package/dist/components/catalyst-ui/forms/multi-cascader.tsx +429 -0
- package/dist/components/catalyst-ui/forms/multi-select.tsx +161 -0
- package/dist/components/catalyst-ui/forms/password-input.tsx +54 -0
- package/dist/components/catalyst-ui/forms/pills-input.tsx +133 -0
- package/dist/components/catalyst-ui/forms/pin-input.tsx +354 -0
- package/dist/components/catalyst-ui/forms/profile-dropdown.tsx +219 -0
- package/dist/components/catalyst-ui/forms/radio-tile.tsx +245 -0
- package/dist/components/catalyst-ui/forms/rating-2.tsx +140 -0
- package/dist/components/catalyst-ui/forms/search-input.tsx +49 -0
- package/dist/components/catalyst-ui/forms/select-button.tsx +155 -0
- package/dist/components/catalyst-ui/forms/step-form-wizard.tsx +877 -0
- package/dist/components/catalyst-ui/forms/tags-input-1.tsx +457 -0
- package/dist/components/catalyst-ui/forms/textarea-2.tsx +36 -0
- package/dist/components/catalyst-ui/forms/tree-picker.tsx +295 -0
- package/dist/components/catalyst-ui/hooks/demo.tsx +2757 -0
- package/dist/components/catalyst-ui/hooks/index.ts +106 -0
- package/dist/components/catalyst-ui/hooks/react-hook-docs.tsx +608 -0
- package/dist/components/catalyst-ui/hooks/use-api-key.tsx +151 -0
- package/dist/components/catalyst-ui/hooks/use-async.tsx +36 -0
- package/dist/components/catalyst-ui/hooks/use-auto-scroll.tsx +139 -0
- package/dist/components/catalyst-ui/hooks/use-breakpoint.tsx +21 -0
- package/dist/components/catalyst-ui/hooks/use-character-limit.tsx +37 -0
- package/dist/components/catalyst-ui/hooks/use-click-outside.tsx +27 -0
- package/dist/components/catalyst-ui/hooks/use-client.tsx +30 -0
- package/dist/components/catalyst-ui/hooks/use-color-theme.tsx +4933 -0
- package/dist/components/catalyst-ui/hooks/use-color-wheel.tsx +905 -0
- package/dist/components/catalyst-ui/hooks/use-current-time-indicator.tsx +65 -0
- package/dist/components/catalyst-ui/hooks/use-debounce-fetcher.tsx +56 -0
- package/dist/components/catalyst-ui/hooks/use-debounce-submit.tsx +45 -0
- package/dist/components/catalyst-ui/hooks/use-debounce.tsx +18 -0
- package/dist/components/catalyst-ui/hooks/use-debounced-fuse-search.tsx +168 -0
- package/dist/components/catalyst-ui/hooks/use-delegated-anchors.tsx +87 -0
- package/dist/components/catalyst-ui/hooks/use-document-title.tsx +14 -0
- package/dist/components/catalyst-ui/hooks/use-event-callback.tsx +24 -0
- package/dist/components/catalyst-ui/hooks/use-event-source.tsx +69 -0
- package/dist/components/catalyst-ui/hooks/use-event-visibility.tsx +72 -0
- package/dist/components/catalyst-ui/hooks/use-expandable.tsx +18 -0
- package/dist/components/catalyst-ui/hooks/use-export-markdown-usage.tsx +92 -0
- package/dist/components/catalyst-ui/hooks/use-export-tsx.tsx +50 -0
- package/dist/components/catalyst-ui/hooks/use-external-scripts.tsx +44 -0
- package/dist/components/catalyst-ui/hooks/use-favicon.tsx +16 -0
- package/dist/components/catalyst-ui/hooks/use-fetch.tsx +64 -0
- package/dist/components/catalyst-ui/hooks/use-file-upload.tsx +405 -0
- package/dist/components/catalyst-ui/hooks/use-focus-within.tsx +16 -0
- package/dist/components/catalyst-ui/hooks/use-form.tsx +86 -0
- package/dist/components/catalyst-ui/hooks/use-fuse-search.tsx +155 -0
- package/dist/components/catalyst-ui/hooks/use-fuzzy-search.tsx +17 -0
- package/dist/components/catalyst-ui/hooks/use-global-loading-state.tsx +7 -0
- package/dist/components/catalyst-ui/hooks/use-global-navigation-state.tsx +23 -0
- package/dist/components/catalyst-ui/hooks/use-global-pending-state.tsx +10 -0
- package/dist/components/catalyst-ui/hooks/use-global-submitting-state.tsx +7 -0
- package/dist/components/catalyst-ui/hooks/use-google-font.tsx +39 -0
- package/dist/components/catalyst-ui/hooks/use-hover.tsx +24 -0
- package/dist/components/catalyst-ui/hooks/use-hydrated.tsx +31 -0
- package/dist/components/catalyst-ui/hooks/use-intersection-observer.tsx +28 -0
- package/dist/components/catalyst-ui/hooks/use-isomorphic-layout-effect.tsx +9 -0
- package/dist/components/catalyst-ui/hooks/use-key-press.tsx +30 -0
- package/dist/components/catalyst-ui/hooks/use-keyboard-shortcut.tsx +69 -0
- package/dist/components/catalyst-ui/hooks/use-keyboard.tsx +16 -0
- package/dist/components/catalyst-ui/hooks/use-local-storage-auto-save.tsx +24 -0
- package/dist/components/catalyst-ui/hooks/use-local-storage.tsx +32 -0
- package/dist/components/catalyst-ui/hooks/use-locales.tsx +40 -0
- package/dist/components/catalyst-ui/hooks/use-long-press.tsx +16 -0
- package/dist/components/catalyst-ui/hooks/use-markdown-batches.tsx +120 -0
- package/dist/components/catalyst-ui/hooks/use-markdown-to-html.tsx +42 -0
- package/dist/components/catalyst-ui/hooks/use-mount-effect.tsx +5 -0
- package/dist/components/catalyst-ui/hooks/use-mounted.tsx +11 -0
- package/dist/components/catalyst-ui/hooks/use-mouse-enter.tsx +13 -0
- package/dist/components/catalyst-ui/hooks/use-move.tsx +16 -0
- package/dist/components/catalyst-ui/hooks/use-mutation-observer-useage.tsx +96 -0
- package/dist/components/catalyst-ui/hooks/use-mutation-observer.tsx +117 -0
- package/dist/components/catalyst-ui/hooks/use-on-click-outside.tsx +38 -0
- package/dist/components/catalyst-ui/hooks/use-online-status.tsx +23 -0
- package/dist/components/catalyst-ui/hooks/use-outside-click.tsx +25 -0
- package/dist/components/catalyst-ui/hooks/use-overlay-listener.tsx +31 -0
- package/dist/components/catalyst-ui/hooks/use-overlay-scroll-listener.tsx +128 -0
- package/dist/components/catalyst-ui/hooks/use-pagination.tsx +68 -0
- package/dist/components/catalyst-ui/hooks/use-press.tsx +17 -0
- package/dist/components/catalyst-ui/hooks/use-previous.tsx +13 -0
- package/dist/components/catalyst-ui/hooks/use-read-local-storage.tsx +73 -0
- package/dist/components/catalyst-ui/hooks/use-reducer.tsx +0 -0
- package/dist/components/catalyst-ui/hooks/use-resize-listener.tsx +18 -0
- package/dist/components/catalyst-ui/hooks/use-screen.tsx +100 -0
- package/dist/components/catalyst-ui/hooks/use-script.tsx +102 -0
- package/dist/components/catalyst-ui/hooks/use-scroll-lock.tsx +91 -0
- package/dist/components/catalyst-ui/hooks/use-scroll-position.tsx +23 -0
- package/dist/components/catalyst-ui/hooks/use-sec-fetch-parser.tsx +52 -0
- package/dist/components/catalyst-ui/hooks/use-session-storage.tsx +31 -0
- package/dist/components/catalyst-ui/hooks/use-should-hydrate.tsx +27 -0
- package/dist/components/catalyst-ui/hooks/use-slide-in-1.tsx +96 -0
- package/dist/components/catalyst-ui/hooks/use-slide-in.tsx +368 -0
- package/dist/components/catalyst-ui/hooks/use-slider-with-input.tsx +106 -0
- package/dist/components/catalyst-ui/hooks/use-smooth-scroll.tsx +35 -0
- package/dist/components/catalyst-ui/hooks/use-stream.tsx +576 -0
- package/dist/components/catalyst-ui/hooks/use-tailwind-converter.tsx +465 -0
- package/dist/components/catalyst-ui/hooks/use-throttle.tsx +22 -0
- package/dist/components/catalyst-ui/hooks/use-transition.tsx +0 -0
- package/dist/components/catalyst-ui/hooks/use-unmount-effect.tsx +15 -0
- package/dist/components/catalyst-ui/hooks/use-update-effect.tsx +13 -0
- package/dist/components/catalyst-ui/hooks/use-validate-credit-card.tsx +112 -0
- package/dist/components/catalyst-ui/hooks/use-window-size.tsx +23 -0
- package/dist/components/catalyst-ui/hooks/useDevList.tsx +185 -0
- package/dist/components/catalyst-ui/hooks/useOnWindowResize.tsx +15 -0
- package/dist/components/catalyst-ui/index.ts +38 -0
- package/dist/components/catalyst-ui/inputs/autocomplete.tsx +569 -0
- package/dist/components/catalyst-ui/inputs/autocomplete1.tsx +323 -0
- package/dist/components/catalyst-ui/inputs/cc-input.tsx +44 -0
- package/dist/components/catalyst-ui/inputs/email-address-input.tsx +17 -0
- package/dist/components/catalyst-ui/inputs/index.ts +30 -0
- package/dist/components/catalyst-ui/inputs/input-with-characters-left.tsx +41 -0
- package/dist/components/catalyst-ui/inputs/input-with-end-add-on.tsx +25 -0
- package/dist/components/catalyst-ui/inputs/input-with-end-button.tsx +27 -0
- package/dist/components/catalyst-ui/inputs/input-with-end-icon-button.tsx +29 -0
- package/dist/components/catalyst-ui/inputs/input-with-end-inline-add-on.tsx +24 -0
- package/dist/components/catalyst-ui/inputs/input-with-end-inline-button.tsx +24 -0
- package/dist/components/catalyst-ui/inputs/input-with-end-select.tsx +27 -0
- package/dist/components/catalyst-ui/inputs/input-with-inline-add-ons.tsx +27 -0
- package/dist/components/catalyst-ui/inputs/input-with-inline-start-and-end-add-on.tsx +27 -0
- package/dist/components/catalyst-ui/inputs/input-with-inner-tags.tsx +60 -0
- package/dist/components/catalyst-ui/inputs/input-with-inset-label.tsx +23 -0
- package/dist/components/catalyst-ui/inputs/input-with-mask.tsx +44 -0
- package/dist/components/catalyst-ui/inputs/input-with-password-strength-indicator.tsx +137 -0
- package/dist/components/catalyst-ui/inputs/input-with-start-add-on.tsx +24 -0
- package/dist/components/catalyst-ui/inputs/input-with-start-inline-add-on.tsx +24 -0
- package/dist/components/catalyst-ui/inputs/input-with-start-select.tsx +30 -0
- package/dist/components/catalyst-ui/inputs/input-with-tags.tsx +72 -0
- package/dist/components/catalyst-ui/inputs/number-input-with-chevrons.tsx +61 -0
- package/dist/components/catalyst-ui/inputs/number-input-with-plus-minus-buttons.tsx +52 -0
- package/dist/components/catalyst-ui/inputs/search-input-with-icon-and-button.tsx +32 -0
- package/dist/components/catalyst-ui/inputs/search-input-with-kbd.tsx +26 -0
- package/dist/components/catalyst-ui/inputs/search-input-with-loader.tsx +59 -0
- package/dist/components/catalyst-ui/interactive/3d-pin.tsx +175 -0
- package/dist/components/catalyst-ui/interactive/action-sheet.tsx +240 -0
- package/dist/components/catalyst-ui/interactive/activity-card.tsx +196 -0
- package/dist/components/catalyst-ui/interactive/ai-prompt.tsx +441 -0
- package/dist/components/catalyst-ui/interactive/animated-cursor.tsx +254 -0
- package/dist/components/catalyst-ui/interactive/background-paths.tsx +172 -0
- package/dist/components/catalyst-ui/interactive/can-edit.tsx +100 -0
- package/dist/components/catalyst-ui/interactive/color-swatch.tsx +441 -0
- package/dist/components/catalyst-ui/interactive/currency-transfer.tsx +228 -0
- package/dist/components/catalyst-ui/interactive/cursor.tsx +109 -0
- package/dist/components/catalyst-ui/interactive/drag-and-drop.tsx +374 -0
- package/dist/components/catalyst-ui/interactive/drawing-2.tsx +1147 -0
- package/dist/components/catalyst-ui/interactive/drawing.tsx +576 -0
- package/dist/components/catalyst-ui/interactive/drop-zone-external.tsx +377 -0
- package/dist/components/catalyst-ui/interactive/drop-zone.tsx +399 -0
- package/dist/components/catalyst-ui/interactive/dropzone-1.tsx +259 -0
- package/dist/components/catalyst-ui/interactive/export-excel.tsx +201 -0
- package/dist/components/catalyst-ui/interactive/file-upload.tsx +403 -0
- package/dist/components/catalyst-ui/interactive/file_upload-1.tsx +422 -0
- package/dist/components/catalyst-ui/interactive/filesaver.tsx +51 -0
- package/dist/components/catalyst-ui/interactive/gantt-1.tsx +1464 -0
- package/dist/components/catalyst-ui/interactive/highlight.tsx +84 -0
- package/dist/components/catalyst-ui/interactive/index.ts +49 -0
- package/dist/components/catalyst-ui/interactive/kanban-1.tsx +338 -0
- package/dist/components/catalyst-ui/interactive/lens.tsx +121 -0
- package/dist/components/catalyst-ui/interactive/magnetic.tsx +105 -0
- package/dist/components/catalyst-ui/interactive/mouse-effect-card.tsx +158 -0
- package/dist/components/catalyst-ui/interactive/pdf-generator.tsx +414 -0
- package/dist/components/catalyst-ui/interactive/pdf-signature.tsx +623 -0
- package/dist/components/catalyst-ui/interactive/pdf-viewer.tsx +931 -0
- package/dist/components/catalyst-ui/interactive/pointer.tsx +108 -0
- package/dist/components/catalyst-ui/interactive/ripple.tsx +103 -0
- package/dist/components/catalyst-ui/interactive/scroll-based-velocity.tsx +205 -0
- package/dist/components/catalyst-ui/interactive/signature.tsx +606 -0
- package/dist/components/catalyst-ui/interactive/smooth-cursor.tsx +236 -0
- package/dist/components/catalyst-ui/interactive/sortable.tsx +420 -0
- package/dist/components/catalyst-ui/interactive/spreadsheet.tsx +601 -0
- package/dist/components/catalyst-ui/interactive/task-board.tsx +902 -0
- package/dist/components/catalyst-ui/interactive/terminal.tsx +587 -0
- package/dist/components/catalyst-ui/interactive/tour-1.tsx +426 -0
- package/dist/components/catalyst-ui/interactive/tour.tsx +830 -0
- package/dist/components/catalyst-ui/interactive/transition.tsx +913 -0
- package/dist/components/catalyst-ui/interactive/transitionable-portal.tsx +0 -0
- package/dist/components/catalyst-ui/interactive/tree-view.tsx +427 -0
- package/dist/components/catalyst-ui/interactive/virtualizer.tsx +233 -0
- package/dist/components/catalyst-ui/interactive/watermark.tsx +211 -0
- package/dist/components/catalyst-ui/lo-fi/components/AboutPageLoFi.tsx +19 -0
- package/dist/components/catalyst-ui/lo-fi/components/ActionPanelLoFi.tsx +22 -0
- package/dist/components/catalyst-ui/lo-fi/components/AnchorLoFi-lofi.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/components/ButtonGroupLoFi.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/components/ButtonIconLoFi.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/components/ButtonLinkLoFi.tsx +5 -0
- package/dist/components/catalyst-ui/lo-fi/components/ButtonLoadingLoFi.tsx +9 -0
- package/dist/components/catalyst-ui/lo-fi/components/CalendarForSidebarLoFi.tsx +21 -0
- package/dist/components/catalyst-ui/lo-fi/components/CalendarMultiDayLoFi.tsx +23 -0
- package/dist/components/catalyst-ui/lo-fi/components/CalloutLoFi.tsx +23 -0
- package/dist/components/catalyst-ui/lo-fi/components/Chart.tsx +239 -0
- package/dist/components/catalyst-ui/lo-fi/components/ContainerLoFi.tsx +13 -0
- package/dist/components/catalyst-ui/lo-fi/components/CopyTextLoFi.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/components/DebouncedInputLoFi.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/components/DescriptionListLoFi.tsx +14 -0
- package/dist/components/catalyst-ui/lo-fi/components/EditorLoFi.tsx +14 -0
- package/dist/components/catalyst-ui/lo-fi/components/EmptyStateLoFi.tsx +12 -0
- package/dist/components/catalyst-ui/lo-fi/components/ErrorPageLoFi.tsx +12 -0
- package/dist/components/catalyst-ui/lo-fi/components/ExportFileLoFi.tsx +16 -0
- package/dist/components/catalyst-ui/lo-fi/components/FlyoutMenuLoFi.tsx +14 -0
- package/dist/components/catalyst-ui/lo-fi/components/FormLayoutLoFi.tsx +15 -0
- package/dist/components/catalyst-ui/lo-fi/components/HeroCalendar.tsx +115 -0
- package/dist/components/catalyst-ui/lo-fi/components/HeroLoFi.tsx +17 -0
- package/dist/components/catalyst-ui/lo-fi/components/ListLoFi.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/components/LoadingLoFi.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/components/LogoCloudLoFi.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/components/MediaObjectLoFi.tsx +14 -0
- package/dist/components/catalyst-ui/lo-fi/components/MultiColumnLayoutLoFi.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/components/NavButtonLoFi.tsx +6 -0
- package/dist/components/catalyst-ui/lo-fi/components/NavButtonStyledLoFi.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/components/ScaffoldingLoFi.tsx +13 -0
- package/dist/components/catalyst-ui/lo-fi/components/SectionHeadingLoFi.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/components/VerticalNavigationLoFi.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/components/accordion-lofi.tsx +76 -0
- package/dist/components/catalyst-ui/lo-fi/components/accountForm-lofi.tsx +21 -0
- package/dist/components/catalyst-ui/lo-fi/components/alert-lofi.tsx +18 -0
- package/dist/components/catalyst-ui/lo-fi/components/alertDialog-lofi.tsx +14 -0
- package/dist/components/catalyst-ui/lo-fi/components/announcement-lofi.tsx +20 -0
- package/dist/components/catalyst-ui/lo-fi/components/aspectRatio-lofi.tsx +9 -0
- package/dist/components/catalyst-ui/lo-fi/components/authenticator-lofi.tsx +24 -0
- package/dist/components/catalyst-ui/lo-fi/components/avatar-lofi.tsx +6 -0
- package/dist/components/catalyst-ui/lo-fi/components/badge-lofi.tsx +5 -0
- package/dist/components/catalyst-ui/lo-fi/components/banner.tsx +31 -0
- package/dist/components/catalyst-ui/lo-fi/components/bento-grid.tsx +31 -0
- package/dist/components/catalyst-ui/lo-fi/components/blog.tsx +37 -0
- package/dist/components/catalyst-ui/lo-fi/components/breadcrumb.tsx +13 -0
- package/dist/components/catalyst-ui/lo-fi/components/button.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/components/card-header.tsx +16 -0
- package/dist/components/catalyst-ui/lo-fi/components/card-heading.tsx +30 -0
- package/dist/components/catalyst-ui/lo-fi/components/card.tsx +16 -0
- package/dist/components/catalyst-ui/lo-fi/components/carousel.tsx +14 -0
- package/dist/components/catalyst-ui/lo-fi/components/cart.tsx +21 -0
- package/dist/components/catalyst-ui/lo-fi/components/catchAll.tsx +660 -0
- package/dist/components/catalyst-ui/lo-fi/components/categoryFilter.tsx +19 -0
- package/dist/components/catalyst-ui/lo-fi/components/categoryPage.tsx +31 -0
- package/dist/components/catalyst-ui/lo-fi/components/categoryPreviews.tsx +20 -0
- package/dist/components/catalyst-ui/lo-fi/components/checkbox.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/components/checkout-form.tsx +27 -0
- package/dist/components/catalyst-ui/lo-fi/components/checkout.tsx +34 -0
- package/dist/components/catalyst-ui/lo-fi/components/checkoutPage.tsx +67 -0
- package/dist/components/catalyst-ui/lo-fi/components/clientOnly.tsx +34 -0
- package/dist/components/catalyst-ui/lo-fi/components/collapsible.tsx +13 -0
- package/dist/components/catalyst-ui/lo-fi/components/columns.tsx +23 -0
- package/dist/components/catalyst-ui/lo-fi/components/combobox.tsx +13 -0
- package/dist/components/catalyst-ui/lo-fi/components/contact-section.tsx +28 -0
- package/dist/components/catalyst-ui/lo-fi/components/content-section.tsx +20 -0
- package/dist/components/catalyst-ui/lo-fi/components/cookieSettings.tsx +34 -0
- package/dist/components/catalyst-ui/lo-fi/components/cta-section.tsx +17 -0
- package/dist/components/catalyst-ui/lo-fi/components/data.tsx +19 -0
- package/dist/components/catalyst-ui/lo-fi/components/dataTable.tsx +36 -0
- package/dist/components/catalyst-ui/lo-fi/components/datePicker.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/components/details.tsx +36 -0
- package/dist/components/catalyst-ui/lo-fi/components/dialog.tsx +16 -0
- package/dist/components/catalyst-ui/lo-fi/components/display-code.tsx +19 -0
- package/dist/components/catalyst-ui/lo-fi/components/dropdown.tsx +15 -0
- package/dist/components/catalyst-ui/lo-fi/components/dropdownMenu.tsx +13 -0
- package/dist/components/catalyst-ui/lo-fi/components/faq-section.tsx +28 -0
- package/dist/components/catalyst-ui/lo-fi/components/feature-section.tsx +20 -0
- package/dist/components/catalyst-ui/lo-fi/components/feature.tsx +26 -0
- package/dist/components/catalyst-ui/lo-fi/components/feedList.tsx +26 -0
- package/dist/components/catalyst-ui/lo-fi/components/footer.tsx +40 -0
- package/dist/components/catalyst-ui/lo-fi/components/form.tsx +17 -0
- package/dist/components/catalyst-ui/lo-fi/components/fourofour.tsx +42 -0
- package/dist/components/catalyst-ui/lo-fi/components/gridLists.tsx +36 -0
- package/dist/components/catalyst-ui/lo-fi/components/header.tsx +23 -0
- package/dist/components/catalyst-ui/lo-fi/components/hero.tsx +21 -0
- package/dist/components/catalyst-ui/lo-fi/components/homeScreen.tsx +31 -0
- package/dist/components/catalyst-ui/lo-fi/components/hooks.tsx +31 -0
- package/dist/components/catalyst-ui/lo-fi/components/hoverCard.tsx +13 -0
- package/dist/components/catalyst-ui/lo-fi/components/icons.tsx +18 -0
- package/dist/components/catalyst-ui/lo-fi/components/image.tsx +24 -0
- package/dist/components/catalyst-ui/lo-fi/components/incentives.tsx +26 -0
- package/dist/components/catalyst-ui/lo-fi/components/index.ts +152 -0
- package/dist/components/catalyst-ui/lo-fi/components/input.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/components/label.tsx +5 -0
- package/dist/components/catalyst-ui/lo-fi/components/landingPage.tsx +35 -0
- package/dist/components/catalyst-ui/lo-fi/components/loadingPage.tsx +23 -0
- package/dist/components/catalyst-ui/lo-fi/components/menubar.tsx +14 -0
- package/dist/components/catalyst-ui/lo-fi/components/motherboard-blog.tsx +178 -0
- package/dist/components/catalyst-ui/lo-fi/components/motherboard.tsx +91 -0
- package/dist/components/catalyst-ui/lo-fi/components/newsletter.tsx +25 -0
- package/dist/components/catalyst-ui/lo-fi/components/notifications.tsx +21 -0
- package/dist/components/catalyst-ui/lo-fi/components/orderDetails.tsx +51 -0
- package/dist/components/catalyst-ui/lo-fi/components/orderHistory.tsx +35 -0
- package/dist/components/catalyst-ui/lo-fi/components/orderSumaries.tsx +34 -0
- package/dist/components/catalyst-ui/lo-fi/components/pageHeading.tsx +26 -0
- package/dist/components/catalyst-ui/lo-fi/components/pageNav.tsx +17 -0
- package/dist/components/catalyst-ui/lo-fi/components/pagination.tsx +13 -0
- package/dist/components/catalyst-ui/lo-fi/components/paymentMethod.tsx +32 -0
- package/dist/components/catalyst-ui/lo-fi/components/pricing.tsx +34 -0
- package/dist/components/catalyst-ui/lo-fi/components/pricingPage.tsx +47 -0
- package/dist/components/catalyst-ui/lo-fi/components/prisma.tsx +23 -0
- package/dist/components/catalyst-ui/lo-fi/components/product-card.tsx +12 -0
- package/dist/components/catalyst-ui/lo-fi/components/product-gallery.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/components/productList.tsx +41 -0
- package/dist/components/catalyst-ui/lo-fi/components/productOverview.tsx +62 -0
- package/dist/components/catalyst-ui/lo-fi/components/productsFeatured.tsx +43 -0
- package/dist/components/catalyst-ui/lo-fi/components/progress.tsx +15 -0
- package/dist/components/catalyst-ui/lo-fi/components/promo.tsx +33 -0
- package/dist/components/catalyst-ui/lo-fi/components/radioGroup.tsx +14 -0
- package/dist/components/catalyst-ui/lo-fi/components/reportIssue.tsx +22 -0
- package/dist/components/catalyst-ui/lo-fi/components/review.tsx +14 -0
- package/dist/components/catalyst-ui/lo-fi/components/reviews.tsx +60 -0
- package/dist/components/catalyst-ui/lo-fi/components/sales-lofi.tsx +257 -0
- package/dist/components/catalyst-ui/lo-fi/components/scaffolding.tsx +46 -0
- package/dist/components/catalyst-ui/lo-fi/components/scrollBar.tsx +24 -0
- package/dist/components/catalyst-ui/lo-fi/components/select.tsx +13 -0
- package/dist/components/catalyst-ui/lo-fi/components/settings.tsx +32 -0
- package/dist/components/catalyst-ui/lo-fi/components/shoppingCart.tsx +52 -0
- package/dist/components/catalyst-ui/lo-fi/components/sidebar.tsx +38 -0
- package/dist/components/catalyst-ui/lo-fi/components/skeleton.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/components/slider.tsx +16 -0
- package/dist/components/catalyst-ui/lo-fi/components/stacked-lofi.tsx +43 -0
- package/dist/components/catalyst-ui/lo-fi/components/stacked.tsx +52 -0
- package/dist/components/catalyst-ui/lo-fi/components/stats.tsx +25 -0
- package/dist/components/catalyst-ui/lo-fi/components/storeFront.tsx +65 -0
- package/dist/components/catalyst-ui/lo-fi/components/storeNav.tsx +37 -0
- package/dist/components/catalyst-ui/lo-fi/components/switch.tsx +9 -0
- package/dist/components/catalyst-ui/lo-fi/components/tabs.tsx +29 -0
- package/dist/components/catalyst-ui/lo-fi/components/tailwind.tsx +22 -0
- package/dist/components/catalyst-ui/lo-fi/components/team.tsx +27 -0
- package/dist/components/catalyst-ui/lo-fi/components/team2.tsx +27 -0
- package/dist/components/catalyst-ui/lo-fi/components/templatePage.tsx +19 -0
- package/dist/components/catalyst-ui/lo-fi/components/testimonial.tsx +36 -0
- package/dist/components/catalyst-ui/lo-fi/components/testtimonial.tsx +35 -0
- package/dist/components/catalyst-ui/lo-fi/components/textarea.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/components/toast.tsx +13 -0
- package/dist/components/catalyst-ui/lo-fi/components/toggle.tsx +12 -0
- package/dist/components/catalyst-ui/lo-fi/components/tooltip.tsx +12 -0
- package/dist/components/catalyst-ui/lo-fi/components/useHydrated.tsx +38 -0
- package/dist/components/catalyst-ui/lo-fi/index.ts +528 -0
- package/dist/components/catalyst-ui/lo-fi/utils/atom.tsx +30 -0
- package/dist/components/catalyst-ui/lo-fi/utils/component.tsx +28 -0
- package/dist/components/catalyst-ui/lo-fi/v2/AIPromptLoFi.tsx +17 -0
- package/dist/components/catalyst-ui/lo-fi/v2/AboutLoFi.tsx +19 -0
- package/dist/components/catalyst-ui/lo-fi/v2/AccessLoFi.tsx +14 -0
- package/dist/components/catalyst-ui/lo-fi/v2/AccountLoFi.tsx +19 -0
- package/dist/components/catalyst-ui/lo-fi/v2/ActivityGoalLoFi.tsx +20 -0
- package/dist/components/catalyst-ui/lo-fi/v2/AiChatLoFi.tsx +29 -0
- package/dist/components/catalyst-ui/lo-fi/v2/AlertV1LoFi.tsx +13 -0
- package/dist/components/catalyst-ui/lo-fi/v2/AspectRatioLoFi.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/v2/AuthProviderLoFi.tsx +18 -0
- package/dist/components/catalyst-ui/lo-fi/v2/AuthSystemLoFi.tsx +23 -0
- package/dist/components/catalyst-ui/lo-fi/v2/AutoCompleteV2LoFi.tsx +17 -0
- package/dist/components/catalyst-ui/lo-fi/v2/BLoFi.tsx +9 -0
- package/dist/components/catalyst-ui/lo-fi/v2/BankLoFi.tsx +26 -0
- package/dist/components/catalyst-ui/lo-fi/v2/BarcodeLoFi.tsx +24 -0
- package/dist/components/catalyst-ui/lo-fi/v2/BasicAuthMiddlewareLoFi.tsx +16 -0
- package/dist/components/catalyst-ui/lo-fi/v2/BatcherMiddlewareLoFi.tsx +17 -0
- package/dist/components/catalyst-ui/lo-fi/v2/BlocksLoFi.tsx +15 -0
- package/dist/components/catalyst-ui/lo-fi/v2/BlogEditorLoFi.tsx +25 -0
- package/dist/components/catalyst-ui/lo-fi/v2/BlogListLoFi.tsx +17 -0
- package/dist/components/catalyst-ui/lo-fi/v2/BlogSidebarLoFi.tsx +20 -0
- package/dist/components/catalyst-ui/lo-fi/v2/BoxLoFi.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/v2/CORSMiddlewareLoFi.tsx +17 -0
- package/dist/components/catalyst-ui/lo-fi/v2/CSSLoFi.tsx +17 -0
- package/dist/components/catalyst-ui/lo-fi/v2/CalendarLoFi.tsx +25 -0
- package/dist/components/catalyst-ui/lo-fi/v2/CallOutLoFi.tsx +16 -0
- package/dist/components/catalyst-ui/lo-fi/v2/CarServiceLoFi.tsx +18 -0
- package/dist/components/catalyst-ui/lo-fi/v2/CardsLoFi.tsx +16 -0
- package/dist/components/catalyst-ui/lo-fi/v2/CarouselHeroLoFi.tsx +15 -0
- package/dist/components/catalyst-ui/lo-fi/v2/CategoriesNavigationLoFi.tsx +13 -0
- package/dist/components/catalyst-ui/lo-fi/v2/CategoryFiltersSectionCenteredLoFi.tsx +13 -0
- package/dist/components/catalyst-ui/lo-fi/v2/CategoryFiltersSectionLoFi.tsx +15 -0
- package/dist/components/catalyst-ui/lo-fi/v2/CategoryFiltersSidebarLoFi.tsx +22 -0
- package/dist/components/catalyst-ui/lo-fi/v2/ChatBubbleLoFi.tsx +14 -0
- package/dist/components/catalyst-ui/lo-fi/v2/ChatLoFi.tsx +22 -0
- package/dist/components/catalyst-ui/lo-fi/v2/CheckListLoFi.tsx +14 -0
- package/dist/components/catalyst-ui/lo-fi/v2/CheckboxMultistateLoFi.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/v2/CheckboxTristateLoFi.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/v2/CheckoutCancelLoFi.tsx +12 -0
- package/dist/components/catalyst-ui/lo-fi/v2/CheckoutSuccessLoFi.tsx +12 -0
- package/dist/components/catalyst-ui/lo-fi/v2/CheckoutVariousLoFi.tsx +16 -0
- package/dist/components/catalyst-ui/lo-fi/v2/ClientOnlyLoFi.tsx +13 -0
- package/dist/components/catalyst-ui/lo-fi/v2/CnLoFi.tsx +13 -0
- package/dist/components/catalyst-ui/lo-fi/v2/CodeSectionLoFi.tsx +21 -0
- package/dist/components/catalyst-ui/lo-fi/v2/CollapsesToIconsLoFi.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/v2/CollapsibleFileTreeLoFi.tsx +26 -0
- package/dist/components/catalyst-ui/lo-fi/v2/ConfigSectionLoFi.tsx +26 -0
- package/dist/components/catalyst-ui/lo-fi/v2/ConfirmPopupLoFi.tsx +15 -0
- package/dist/components/catalyst-ui/lo-fi/v2/ContactLoFi.tsx +13 -0
- package/dist/components/catalyst-ui/lo-fi/v2/ContainerLoFi.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/v2/ContextStorageMiddlewareLoFi.tsx +18 -0
- package/dist/components/catalyst-ui/lo-fi/v2/CookieSettingsLoFi.tsx +22 -0
- package/dist/components/catalyst-ui/lo-fi/v2/CoreLoFi.tsx +13 -0
- package/dist/components/catalyst-ui/lo-fi/v2/CreateAccountLoFi.tsx +16 -0
- package/dist/components/catalyst-ui/lo-fi/v2/DashboardLoFi.tsx +13 -0
- package/dist/components/catalyst-ui/lo-fi/v2/DashboardSidebarLoFi.tsx +17 -0
- package/dist/components/catalyst-ui/lo-fi/v2/DebouncedFetcherAndSubmitLoFi.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/v2/DebouncedInputLoFi.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/v2/DefaultStyledLoFi.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/v2/DeferredContentLoFi.tsx +14 -0
- package/dist/components/catalyst-ui/lo-fi/v2/DelegateAnchorsToRemixLoFi.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/v2/DetailLoFi.tsx +12 -0
- package/dist/components/catalyst-ui/lo-fi/v2/DeviceMockupLoFi.tsx +15 -0
- package/dist/components/catalyst-ui/lo-fi/v2/DiffLoFi.tsx +15 -0
- package/dist/components/catalyst-ui/lo-fi/v2/DisplayCodeLoFi.tsx +20 -0
- package/dist/components/catalyst-ui/lo-fi/v2/DockLoFi.tsx +13 -0
- package/dist/components/catalyst-ui/lo-fi/v2/DragAndDropLoFi.tsx +15 -0
- package/dist/components/catalyst-ui/lo-fi/v2/DrawerLoFi.tsx +16 -0
- package/dist/components/catalyst-ui/lo-fi/v2/DrawingLoFi.tsx +18 -0
- package/dist/components/catalyst-ui/lo-fi/v2/DrawingV2LoFi.tsx +21 -0
- package/dist/components/catalyst-ui/lo-fi/v2/DropZoneLoFi.tsx +12 -0
- package/dist/components/catalyst-ui/lo-fi/v2/ECommerceLoFi.tsx +14 -0
- package/dist/components/catalyst-ui/lo-fi/v2/EmbedLoFi.tsx +13 -0
- package/dist/components/catalyst-ui/lo-fi/v2/EmblaCarouselLoFi.tsx +18 -0
- package/dist/components/catalyst-ui/lo-fi/v2/EmblaCarouselSnapLoFi.tsx +12 -0
- package/dist/components/catalyst-ui/lo-fi/v2/EnhancedChartLoFi.tsx +29 -0
- package/dist/components/catalyst-ui/lo-fi/v2/ErrorLoFi.tsx +12 -0
- package/dist/components/catalyst-ui/lo-fi/v2/ExerciseMinutesLoFi.tsx +16 -0
- package/dist/components/catalyst-ui/lo-fi/v2/FABLoFi.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/v2/FaqLoFi.tsx +12 -0
- package/dist/components/catalyst-ui/lo-fi/v2/FeatureSectionLoFi.tsx +29 -0
- package/dist/components/catalyst-ui/lo-fi/v2/FeedLoFi.tsx +28 -0
- package/dist/components/catalyst-ui/lo-fi/v2/FileManagerLoFi.tsx +18 -0
- package/dist/components/catalyst-ui/lo-fi/v2/FilterComboboxLoFi.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/v2/FilterDrawerLoFi.tsx +17 -0
- package/dist/components/catalyst-ui/lo-fi/v2/FilterTanStackTableLoFi.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/v2/FixedMarkerLoFi.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/v2/FlexboxGridLoFi.tsx +13 -0
- package/dist/components/catalyst-ui/lo-fi/v2/FloatingSidebarWithSubmenusLoFi.tsx +18 -0
- package/dist/components/catalyst-ui/lo-fi/v2/ForLoFi.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/v2/ForgotPasswordLoFi.tsx +12 -0
- package/dist/components/catalyst-ui/lo-fi/v2/FormsLoFi.tsx +13 -0
- package/dist/components/catalyst-ui/lo-fi/v2/Four04LoFi.tsx +12 -0
- package/dist/components/catalyst-ui/lo-fi/v2/FunctionalLeftRightSidebarLoFi.tsx +21 -0
- package/dist/components/catalyst-ui/lo-fi/v2/FuseSearchInputLoFi.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/v2/FuzzyFilterLoFi.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/v2/FuzzySortLoFi.tsx +14 -0
- package/dist/components/catalyst-ui/lo-fi/v2/GalleriaLoFi.tsx +14 -0
- package/dist/components/catalyst-ui/lo-fi/v2/GnattChartLoFi.tsx +20 -0
- package/dist/components/catalyst-ui/lo-fi/v2/GridLoFi.tsx +14 -0
- package/dist/components/catalyst-ui/lo-fi/v2/H3LoFi.tsx +9 -0
- package/dist/components/catalyst-ui/lo-fi/v2/H4LoFi.tsx +9 -0
- package/dist/components/catalyst-ui/lo-fi/v2/H5LoFi.tsx +9 -0
- package/dist/components/catalyst-ui/lo-fi/v2/HeaderNavLoFi.tsx +15 -0
- package/dist/components/catalyst-ui/lo-fi/v2/HelpLoFi.tsx +12 -0
- package/dist/components/catalyst-ui/lo-fi/v2/HighlightLoFi.tsx +13 -0
- package/dist/components/catalyst-ui/lo-fi/v2/HighlightV1LoFi.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/v2/HomeLoFi.tsx +14 -0
- package/dist/components/catalyst-ui/lo-fi/v2/HoneypotMiddlewareLoFi.tsx +16 -0
- package/dist/components/catalyst-ui/lo-fi/v2/IBLoFi.tsx +9 -0
- package/dist/components/catalyst-ui/lo-fi/v2/ILoFi.tsx +9 -0
- package/dist/components/catalyst-ui/lo-fi/v2/ImageLoFi.tsx +9 -0
- package/dist/components/catalyst-ui/lo-fi/v2/ImageSectionLoFi.tsx +18 -0
- package/dist/components/catalyst-ui/lo-fi/v2/InADialogLoFi.tsx +17 -0
- package/dist/components/catalyst-ui/lo-fi/v2/IncIdLoFi.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/v2/IncentivesCardLoFi.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/v2/IndicatorLoFi.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/v2/InsetSidebarSecondaryNavLoFi.tsx +20 -0
- package/dist/components/catalyst-ui/lo-fi/v2/InsufficientPermissionsLoFi.tsx +12 -0
- package/dist/components/catalyst-ui/lo-fi/v2/InvoiceLoFi.tsx +17 -0
- package/dist/components/catalyst-ui/lo-fi/v2/JWKAuthMiddlewareLoFi.tsx +17 -0
- package/dist/components/catalyst-ui/lo-fi/v2/LandingLoFi.tsx +12 -0
- package/dist/components/catalyst-ui/lo-fi/v2/LayoutLoFi.tsx +24 -0
- package/dist/components/catalyst-ui/lo-fi/v2/LoadErrorPageLoFi.tsx +15 -0
- package/dist/components/catalyst-ui/lo-fi/v2/LoadingLoFi.tsx +15 -0
- package/dist/components/catalyst-ui/lo-fi/v2/LoadingOverlayLoFi.tsx +13 -0
- package/dist/components/catalyst-ui/lo-fi/v2/LoadingPageLoFi.tsx +18 -0
- package/dist/components/catalyst-ui/lo-fi/v2/LoginLoFi.tsx +13 -0
- package/dist/components/catalyst-ui/lo-fi/v2/MailLoFi.tsx +18 -0
- package/dist/components/catalyst-ui/lo-fi/v2/MarketingLoFi.tsx +15 -0
- package/dist/components/catalyst-ui/lo-fi/v2/MegaMenuLoFi.tsx +26 -0
- package/dist/components/catalyst-ui/lo-fi/v2/MenuLoFi.tsx +14 -0
- package/dist/components/catalyst-ui/lo-fi/v2/MessageLoFi.tsx +14 -0
- package/dist/components/catalyst-ui/lo-fi/v2/MeterLoFi.tsx +16 -0
- package/dist/components/catalyst-ui/lo-fi/v2/MobileNavLoFi.tsx +12 -0
- package/dist/components/catalyst-ui/lo-fi/v2/ModalIntegrationsLoFi.tsx +24 -0
- package/dist/components/catalyst-ui/lo-fi/v2/ModalV1LoFi.tsx +20 -0
- package/dist/components/catalyst-ui/lo-fi/v2/MusicLoFi.tsx +17 -0
- package/dist/components/catalyst-ui/lo-fi/v2/NavMainLoFi.tsx +13 -0
- package/dist/components/catalyst-ui/lo-fi/v2/NavProjectsLoFi.tsx +20 -0
- package/dist/components/catalyst-ui/lo-fi/v2/NavTreeViewLoFi.tsx +17 -0
- package/dist/components/catalyst-ui/lo-fi/v2/NavUserLoFi.tsx +14 -0
- package/dist/components/catalyst-ui/lo-fi/v2/NestedComboboxLoFi.tsx +14 -0
- package/dist/components/catalyst-ui/lo-fi/v2/NestedCommandDialogLoFi.tsx +15 -0
- package/dist/components/catalyst-ui/lo-fi/v2/NestedCommandLoFi.tsx +16 -0
- package/dist/components/catalyst-ui/lo-fi/v2/NotFoundLoFi.tsx +12 -0
- package/dist/components/catalyst-ui/lo-fi/v2/NoteSectionLoFi.tsx +17 -0
- package/dist/components/catalyst-ui/lo-fi/v2/NotificationLoFi.tsx +14 -0
- package/dist/components/catalyst-ui/lo-fi/v2/OnTheRightLoFi.tsx +14 -0
- package/dist/components/catalyst-ui/lo-fi/v2/OrderListLoFi.tsx +17 -0
- package/dist/components/catalyst-ui/lo-fi/v2/OrderSummaryLoFi.tsx +17 -0
- package/dist/components/catalyst-ui/lo-fi/v2/OrderedListLoFi.tsx +14 -0
- package/dist/components/catalyst-ui/lo-fi/v2/OtpLoFi.tsx +16 -0
- package/dist/components/catalyst-ui/lo-fi/v2/OverlayPanelLoFi.tsx +12 -0
- package/dist/components/catalyst-ui/lo-fi/v2/PDFGeneratorLoFi.tsx +19 -0
- package/dist/components/catalyst-ui/lo-fi/v2/PMLoFi.tsx +14 -0
- package/dist/components/catalyst-ui/lo-fi/v2/PageHeaderLoFi.tsx +14 -0
- package/dist/components/catalyst-ui/lo-fi/v2/PageHeadingsSectionLoFi.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/v2/PaginationButtonLoFi.tsx +8 -0
- package/dist/components/catalyst-ui/lo-fi/v2/PaginationWrapperLoFi.tsx +14 -0
- package/dist/components/catalyst-ui/lo-fi/v2/PanelLoFi.tsx +17 -0
- package/dist/components/catalyst-ui/lo-fi/v2/PanelMenuLoFi.tsx +17 -0
- package/dist/components/catalyst-ui/lo-fi/v2/PasswordInputLoFi.tsx +15 -0
- package/dist/components/catalyst-ui/lo-fi/v2/PaymentFormLoFi.tsx +15 -0
- package/dist/components/catalyst-ui/lo-fi/v2/PaymentMethodLoFi.tsx +18 -0
- package/dist/components/catalyst-ui/lo-fi/v2/PaymentsLoFi.tsx +22 -0
- package/dist/components/catalyst-ui/lo-fi/v2/PdfSignatureLoFi.tsx +14 -0
- package/dist/components/catalyst-ui/lo-fi/v2/PdfViewerLoFi.tsx +23 -0
- package/dist/components/catalyst-ui/lo-fi/v2/PlaceholderCodeLoFi.tsx +15 -0
- package/dist/components/catalyst-ui/lo-fi/v2/PlaygroundLoFi.tsx +15 -0
- package/dist/components/catalyst-ui/lo-fi/v2/PopconfirmLoFi.tsx +17 -0
- package/dist/components/catalyst-ui/lo-fi/v2/PrefetchAnchorsLoFi.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/v2/PrismaClientExtensionLoFi.tsx +16 -0
- package/dist/components/catalyst-ui/lo-fi/v2/ProductCategoryLoFi.tsx +13 -0
- package/dist/components/catalyst-ui/lo-fi/v2/ProductComparisonLoFi.tsx +14 -0
- package/dist/components/catalyst-ui/lo-fi/v2/ProductDetailsLoFi.tsx +14 -0
- package/dist/components/catalyst-ui/lo-fi/v2/ProductEditLoFi.tsx +12 -0
- package/dist/components/catalyst-ui/lo-fi/v2/ProductPricingLoFi.tsx +12 -0
- package/dist/components/catalyst-ui/lo-fi/v2/ProductsLoFi.tsx +14 -0
- package/dist/components/catalyst-ui/lo-fi/v2/ProfileCreateLoFi.tsx +12 -0
- package/dist/components/catalyst-ui/lo-fi/v2/ProfileListLoFi.tsx +16 -0
- package/dist/components/catalyst-ui/lo-fi/v2/ProfileLoFi.tsx +12 -0
- package/dist/components/catalyst-ui/lo-fi/v2/ProgressLoFi.tsx +15 -0
- package/dist/components/catalyst-ui/lo-fi/v2/ProseLoFi.tsx +16 -0
- package/dist/components/catalyst-ui/lo-fi/v2/QRCodeLoFi.tsx +43 -0
- package/dist/components/catalyst-ui/lo-fi/v2/QaDiscussionLoFi.tsx +14 -0
- package/dist/components/catalyst-ui/lo-fi/v2/QaForumLoFi.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/v2/RailLoFi.tsx +16 -0
- package/dist/components/catalyst-ui/lo-fi/v2/RatingLoFi.tsx +14 -0
- package/dist/components/catalyst-ui/lo-fi/v2/ReactHooksDocsLoFi.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/v2/ReceiptLoFi.tsx +17 -0
- package/dist/components/catalyst-ui/lo-fi/v2/RedirectBadRequestsLoFi.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/v2/RegisterLoFi.tsx +13 -0
- package/dist/components/catalyst-ui/lo-fi/v2/RemixAuthLoFi.tsx +12 -0
- package/dist/components/catalyst-ui/lo-fi/v2/RemixLinkLoFi.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/v2/ReportIssueLoFi.tsx +24 -0
- package/dist/components/catalyst-ui/lo-fi/v2/RequestIDMiddlewareLoFi.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/v2/ResetPasswordLoFi.tsx +12 -0
- package/dist/components/catalyst-ui/lo-fi/v2/ResponsiveLinkLoFi.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/v2/RightSidebarLoFi.tsx +17 -0
- package/dist/components/catalyst-ui/lo-fi/v2/SaasLoFi.tsx +15 -0
- package/dist/components/catalyst-ui/lo-fi/v2/SchedulerLoFi.tsx +14 -0
- package/dist/components/catalyst-ui/lo-fi/v2/ScrolltopLoFi.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/v2/SecFetchParserLoFi.tsx +20 -0
- package/dist/components/catalyst-ui/lo-fi/v2/SecureHeadersMiddlewareLoFi.tsx +17 -0
- package/dist/components/catalyst-ui/lo-fi/v2/ServerTimingMiddlewareLoFi.tsx +16 -0
- package/dist/components/catalyst-ui/lo-fi/v2/ServiceRepairFormLoFi.tsx +13 -0
- package/dist/components/catalyst-ui/lo-fi/v2/SessionLoFi.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/v2/SettingsLoFi.tsx +13 -0
- package/dist/components/catalyst-ui/lo-fi/v2/ShareLoFi.tsx +21 -0
- package/dist/components/catalyst-ui/lo-fi/v2/Sidebar24LoFi.tsx +17 -0
- package/dist/components/catalyst-ui/lo-fi/v2/SidebarAgnosticLoFi.tsx +22 -0
- package/dist/components/catalyst-ui/lo-fi/v2/SidebarDetailsLoFi.tsx +17 -0
- package/dist/components/catalyst-ui/lo-fi/v2/SidebarInAPopoverLoFi.tsx +16 -0
- package/dist/components/catalyst-ui/lo-fi/v2/SidebarNavLoFi.tsx +14 -0
- package/dist/components/catalyst-ui/lo-fi/v2/SidebarReactRouterLoFi.tsx +24 -0
- package/dist/components/catalyst-ui/lo-fi/v2/SidebarStylisticDefaultLoFi.tsx +18 -0
- package/dist/components/catalyst-ui/lo-fi/v2/SidebarStylisticDefaultWRightLoFi.tsx +23 -0
- package/dist/components/catalyst-ui/lo-fi/v2/SidebarWithSubmenusLoFi.tsx +25 -0
- package/dist/components/catalyst-ui/lo-fi/v2/SignUpLoFi.tsx +14 -0
- package/dist/components/catalyst-ui/lo-fi/v2/SignatureLoFi.tsx +12 -0
- package/dist/components/catalyst-ui/lo-fi/v2/SingletonMiddlewareLoFi.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/v2/SiteHeaderLoFi.tsx +18 -0
- package/dist/components/catalyst-ui/lo-fi/v2/SmallTableLoFi.tsx +18 -0
- package/dist/components/catalyst-ui/lo-fi/v2/SpeedDialLoFi.tsx +14 -0
- package/dist/components/catalyst-ui/lo-fi/v2/SpinLoFi.tsx +7 -0
- package/dist/components/catalyst-ui/lo-fi/v2/SpinnerLoFi.tsx +9 -0
- package/dist/components/catalyst-ui/lo-fi/v2/StackLoFi.tsx +14 -0
- package/dist/components/catalyst-ui/lo-fi/v2/StackedListsLoFi.tsx +50 -0
- package/dist/components/catalyst-ui/lo-fi/v2/StackedLoFi.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/v2/StateChangeLoFi.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/v2/StatsLoFi.tsx +15 -0
- package/dist/components/catalyst-ui/lo-fi/v2/StatusLoFi.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/v2/StepsLoFi.tsx +18 -0
- package/dist/components/catalyst-ui/lo-fi/v2/StoreFrontLoFi.tsx +15 -0
- package/dist/components/catalyst-ui/lo-fi/v2/StoreNavSectionLoFi.tsx +14 -0
- package/dist/components/catalyst-ui/lo-fi/v2/StripeLoFi.tsx +15 -0
- package/dist/components/catalyst-ui/lo-fi/v2/StyleProviderLoFi.tsx +16 -0
- package/dist/components/catalyst-ui/lo-fi/v2/TSTableLoFi.tsx +24 -0
- package/dist/components/catalyst-ui/lo-fi/v2/TSTableV1LoFi.tsx +20 -0
- package/dist/components/catalyst-ui/lo-fi/v2/TSTableV2LoFi.tsx +20 -0
- package/dist/components/catalyst-ui/lo-fi/v2/TabViewLoFi.tsx +17 -0
- package/dist/components/catalyst-ui/lo-fi/v2/TableLoFi.tsx +18 -0
- package/dist/components/catalyst-ui/lo-fi/v2/TagLoFi.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/v2/TailwindcssTxtLoFi.tsx +20 -0
- package/dist/components/catalyst-ui/lo-fi/v2/TaskListLoFi.tsx +16 -0
- package/dist/components/catalyst-ui/lo-fi/v2/TaskboardLoFi.tsx +20 -0
- package/dist/components/catalyst-ui/lo-fi/v2/TasksLoFi.tsx +19 -0
- package/dist/components/catalyst-ui/lo-fi/v2/TeamMembersLoFi.tsx +20 -0
- package/dist/components/catalyst-ui/lo-fi/v2/TerminalLoFi.tsx +20 -0
- package/dist/components/catalyst-ui/lo-fi/v2/TextEditorLoFi.tsx +14 -0
- package/dist/components/catalyst-ui/lo-fi/v2/ThemeSelectorLoFi.tsx +14 -0
- package/dist/components/catalyst-ui/lo-fi/v2/TicketsLoFi.tsx +16 -0
- package/dist/components/catalyst-ui/lo-fi/v2/TimelineLoFi.tsx +33 -0
- package/dist/components/catalyst-ui/lo-fi/v2/TimelineV1LoFi.tsx +36 -0
- package/dist/components/catalyst-ui/lo-fi/v2/TitleSectionLoFi.tsx +15 -0
- package/dist/components/catalyst-ui/lo-fi/v2/ToDoLoFi.tsx +17 -0
- package/dist/components/catalyst-ui/lo-fi/v2/ToggleClassLoFi.tsx +12 -0
- package/dist/components/catalyst-ui/lo-fi/v2/ToolbarLoFi.tsx +14 -0
- package/dist/components/catalyst-ui/lo-fi/v2/TourLoFi.tsx +21 -0
- package/dist/components/catalyst-ui/lo-fi/v2/TransitionLoFi.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/v2/TransitionablePortalLoFi.tsx +12 -0
- package/dist/components/catalyst-ui/lo-fi/v2/TravelLoFi.tsx +12 -0
- package/dist/components/catalyst-ui/lo-fi/v2/TreeViewLoFi.tsx +24 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UnderConstructionLoFi.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UsageSectionLoFi.tsx +19 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UsageSectionNoDashLoFi.tsx +15 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UseAsyncLoFi.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UseClickOutsideLoFi.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UseCopyToClipboardLoFi.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UseCounterLoFi.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UseDebounceLoFi.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UseDebouncedFuseSearchLoFi.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UseEventListenerLoFi.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UseExportMarkdownLoFi.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UseExportTsxLoFi.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UseExternalScriptsLoFi.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UseFaviconLoFi.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UseFetchLoFi.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UseFocusLoFi.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UseFocusWithinLoFi.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UseFormLoFi.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UseFuseSearchLoFi.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UseFuzzySearchLoFi.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UseGlobalLoadingStateLoFi.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UseGlobalNavigationStateLoFi.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UseGlobalPendingStateLoFi.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UseGlobalSubmittingStateLoFi.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UseHoverLoFi.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UseIntersectionObserverLoFi.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UseIntervalLoFi.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UseKeyPressLoFi.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UseKeyboardLoFi.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UseLocalStorageLoFi.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UseLocalesLoFi.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UseLongPressLoFi.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UseMediaQueryLoFi.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UseMobileLoFi.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UseMountEffectLoFi.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UseMountedLoFi.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UseMoveLoFi.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UseMutationObserverLoFi.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UseOnlineStatusLoFi.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UseOverlayListenerLoFi.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UseOverlayScrollListenerLoFi.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UsePressLoFi.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UsePreviousLoFi.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UseResizeListenerLoFi.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UseScrollPositionLoFi.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UseSessionStorageLoFi.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UseShouldHydrateLoFi.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UseSlideInLoFi.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UseStreamLoFi.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UseThrottleLoFi.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UseTimeoutLoFi.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UseToggleLoFi.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UseUnmountEffectLoFi.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UseUpdateEffectLoFi.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UseWindowSizeLoFi.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UserBasedAccessRulesLoFi.tsx +20 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UserLoFi.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/v2/UserOnboardingLoFi.tsx +12 -0
- package/dist/components/catalyst-ui/lo-fi/v2/VerificationLoFi.tsx +17 -0
- package/dist/components/catalyst-ui/lo-fi/v2/VirtualizerLoFi.tsx +16 -0
- package/dist/components/catalyst-ui/lo-fi/v2/WatermarkLoFi.tsx +13 -0
- package/dist/components/catalyst-ui/lo-fi/v2/WithACalendarLoFi.tsx +23 -0
- package/dist/components/catalyst-ui/lo-fi/v2/WithAShoppingCartLoFi.tsx +20 -0
- package/dist/components/catalyst-ui/lo-fi/v2/WithATreeViewLoFi.tsx +20 -0
- package/dist/components/catalyst-ui/lo-fi/v2/WithCollapsibleNestedSidebarsLoFi.tsx +22 -0
- package/dist/components/catalyst-ui/lo-fi/v2/WithCollapsibleSectionsLoFi.tsx +20 -0
- package/dist/components/catalyst-ui/lo-fi/v2/WithCollapsibleSubmenusLoFi.tsx +26 -0
- package/dist/components/catalyst-ui/lo-fi/v2/WithCookieMiddlewareLoFi.tsx +17 -0
- package/dist/components/catalyst-ui/lo-fi/v2/WithInitialLoadingStateLoFi.tsx +13 -0
- package/dist/components/catalyst-ui/lo-fi/v2/WithLoadingNavStateChangesLoFi.tsx +17 -0
- package/dist/components/catalyst-ui/lo-fi/v2/WithNavigationGroupedBySectionLoFi.tsx +24 -0
- package/dist/components/catalyst-ui/lo-fi/v2/WithSubmenusAsDropdownsLoFi.tsx +25 -0
- package/dist/components/catalyst-ui/lo-fi/v2/action-bar-lofi.tsx +20 -0
- package/dist/components/catalyst-ui/lo-fi/v2/block-quote-lofi.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/v2/calendar-lofi.tsx +19 -0
- package/dist/components/catalyst-ui/lo-fi/v2/cascade-tree-lofi.tsx +34 -0
- package/dist/components/catalyst-ui/lo-fi/v2/cascader-lofi.tsx +27 -0
- package/dist/components/catalyst-ui/lo-fi/v2/changelog-lofi.tsx +14 -0
- package/dist/components/catalyst-ui/lo-fi/v2/check-tree-lofi.tsx +27 -0
- package/dist/components/catalyst-ui/lo-fi/v2/check-tree-picker-lofi.tsx +28 -0
- package/dist/components/catalyst-ui/lo-fi/v2/checkbox-card-v1-lofi.tsx +29 -0
- package/dist/components/catalyst-ui/lo-fi/v2/checkbox-v1-lofi.tsx +24 -0
- package/dist/components/catalyst-ui/lo-fi/v2/client-only-mermaid-lofi.tsx +21 -0
- package/dist/components/catalyst-ui/lo-fi/v2/color-picker-lofi.tsx +24 -0
- package/dist/components/catalyst-ui/lo-fi/v2/combobox-v1-lofi.tsx +25 -0
- package/dist/components/catalyst-ui/lo-fi/v2/credit-card-input-lofi.tsx +32 -0
- package/dist/components/catalyst-ui/lo-fi/v2/floating-label-lofi.tsx +26 -0
- package/dist/components/catalyst-ui/lo-fi/v2/form-wizard-lofi.tsx +26 -0
- package/dist/components/catalyst-ui/lo-fi/v2/hero-lofi.tsx +15 -0
- package/dist/components/catalyst-ui/lo-fi/v2/heroV2-lofi.tsx +17 -0
- package/dist/components/catalyst-ui/lo-fi/v2/inline-edit-lofi.tsx +19 -0
- package/dist/components/catalyst-ui/lo-fi/v2/inplaceLoFi.tsx +10 -0
- package/dist/components/catalyst-ui/lo-fi/v2/input-mask-lofi.tsx +33 -0
- package/dist/components/catalyst-ui/lo-fi/v2/install-code-array-section-lofi.tsx +20 -0
- package/dist/components/catalyst-ui/lo-fi/v2/install-code-section-lofi.tsx +16 -0
- package/dist/components/catalyst-ui/lo-fi/v2/install-github-section-lofi.tsx +11 -0
- package/dist/components/catalyst-ui/lo-fi/v2/json-input-lofi.tsx +29 -0
- package/dist/components/catalyst-ui/lo-fi/v2/multi-cascade-tree-lofi.tsx +40 -0
- package/dist/components/catalyst-ui/lo-fi/v2/multi-cascader-lofi.tsx +28 -0
- package/dist/components/catalyst-ui/lo-fi/v2/multi-combobox-lofi.tsx +31 -0
- package/dist/components/catalyst-ui/lo-fi/v2/nav-shopping-cart-lofi.tsx +13 -0
- package/dist/components/catalyst-ui/lo-fi/v2/pin-input-lofi.tsx +23 -0
- package/dist/components/catalyst-ui/lo-fi/v2/select-button-lofi.tsx +20 -0
- package/dist/components/catalyst-ui/lo-fi/v2/sidebar28-lofi.tsx +15 -0
- package/dist/components/catalyst-ui/lo-fi/v2/step-form-wizard-lofi.tsx +34 -0
- package/dist/components/catalyst-ui/lo-fi/v2/tags-input-lofi.tsx +21 -0
- package/dist/components/catalyst-ui/lo-fi/v2/textarea-lofi.tsx +18 -0
- package/dist/components/catalyst-ui/lo-fi/v2/textarea-v2-lofi.tsx +19 -0
- package/dist/components/catalyst-ui/lo-fi/v2/transfer-list-lofi.tsx +40 -0
- package/dist/components/catalyst-ui/lo-fi/v2/tri-state-checkbox-lofi.tsx +25 -0
- package/dist/components/catalyst-ui/lo-fi/v2/tsxSection-lofi.tsx +20 -0
- package/dist/components/catalyst-ui/marketing/demo/demos.tsx +0 -0
- package/dist/components/catalyst-ui/marketing/demo/sectionHeadings-demo.tsx +103 -0
- package/dist/components/catalyst-ui/marketing/elements/banner-with-effect.tsx +0 -0
- package/dist/components/catalyst-ui/marketing/elements/flyoutMenu.tsx +318 -0
- package/dist/components/catalyst-ui/marketing/index.ts +41 -0
- package/dist/components/catalyst-ui/marketing/sections/animated-testimonials.tsx +169 -0
- package/dist/components/catalyst-ui/marketing/sections/bentoGrid.tsx +300 -0
- package/dist/components/catalyst-ui/marketing/sections/blog.tsx +469 -0
- package/dist/components/catalyst-ui/marketing/sections/blogEditor.tsx +358 -0
- package/dist/components/catalyst-ui/marketing/sections/blogPost.tsx +208 -0
- package/dist/components/catalyst-ui/marketing/sections/carousel.tsx +928 -0
- package/dist/components/catalyst-ui/marketing/sections/cta.tsx +379 -0
- package/dist/components/catalyst-ui/marketing/sections/faq.tsx +147 -0
- package/dist/components/catalyst-ui/marketing/sections/feature-carousel.tsx +505 -0
- package/dist/components/catalyst-ui/marketing/sections/feature-section.tsx +83 -0
- package/dist/components/catalyst-ui/marketing/sections/feature-showcase.tsx +250 -0
- package/dist/components/catalyst-ui/marketing/sections/feature.tsx +279 -0
- package/dist/components/catalyst-ui/marketing/sections/footer.tsx +390 -0
- package/dist/components/catalyst-ui/marketing/sections/header-1.tsx +450 -0
- package/dist/components/catalyst-ui/marketing/sections/header.tsx +414 -0
- package/dist/components/catalyst-ui/marketing/sections/hero-2.tsx +55 -0
- package/dist/components/catalyst-ui/marketing/sections/hero-3.tsx +12 -0
- package/dist/components/catalyst-ui/marketing/sections/hero-section.tsx +17 -0
- package/dist/components/catalyst-ui/marketing/sections/hero.tsx +169 -0
- package/dist/components/catalyst-ui/marketing/sections/image-section.tsx +36 -0
- package/dist/components/catalyst-ui/marketing/sections/index.ts +33 -0
- package/dist/components/catalyst-ui/marketing/sections/logoClouds.tsx +295 -0
- package/dist/components/catalyst-ui/marketing/sections/newsLetter.tsx +137 -0
- package/dist/components/catalyst-ui/marketing/sections/page-header-section.tsx +127 -0
- package/dist/components/catalyst-ui/marketing/sections/pricing-carousel-2.tsx +282 -0
- package/dist/components/catalyst-ui/marketing/sections/pricing-carousel.tsx +555 -0
- package/dist/components/catalyst-ui/marketing/sections/pricing-single-card.tsx +154 -0
- package/dist/components/catalyst-ui/marketing/sections/pricing.tsx +790 -0
- package/dist/components/catalyst-ui/marketing/sections/testimonial-carousel.tsx +499 -0
- package/dist/components/catalyst-ui/marketing/sections/testimonial.tsx +204 -0
- package/dist/components/catalyst-ui/marketing/sections/title-section.tsx +57 -0
- package/dist/components/catalyst-ui/media/3d-marquee.tsx +144 -0
- package/dist/components/catalyst-ui/media/avatar-circles.tsx +78 -0
- package/dist/components/catalyst-ui/media/blur-fade.tsx +106 -0
- package/dist/components/catalyst-ui/media/carousel-1.tsx +926 -0
- package/dist/components/catalyst-ui/media/carousel-2.tsx +198 -0
- package/dist/components/catalyst-ui/media/carousel-hero.tsx +286 -0
- package/dist/components/catalyst-ui/media/carousel-simple.tsx +244 -0
- package/dist/components/catalyst-ui/media/color-palette-card.tsx +85 -0
- package/dist/components/catalyst-ui/media/cropper.tsx +68 -0
- package/dist/components/catalyst-ui/media/embla-carousel-arrow-buttons.tsx +117 -0
- package/dist/components/catalyst-ui/media/embla-carousel-snap.tsx +103 -0
- package/dist/components/catalyst-ui/media/galleria.tsx +316 -0
- package/dist/components/catalyst-ui/media/globe.tsx +138 -0
- package/dist/components/catalyst-ui/media/google-maps-component.tsx +540 -0
- package/dist/components/catalyst-ui/media/icon-cloud.tsx +312 -0
- package/dist/components/catalyst-ui/media/image-comparison.tsx +251 -0
- package/dist/components/catalyst-ui/media/image-crop.tsx +366 -0
- package/dist/components/catalyst-ui/media/image-zoom.tsx +51 -0
- package/dist/components/catalyst-ui/media/index.ts +32 -0
- package/dist/components/catalyst-ui/media/infinite-scroll.tsx +303 -0
- package/dist/components/catalyst-ui/media/infinite-slider.tsx +108 -0
- package/dist/components/catalyst-ui/media/interactive-icon-cloud.tsx +100 -0
- package/dist/components/catalyst-ui/media/logo.tsx +100 -0
- package/dist/components/catalyst-ui/media/marquee.tsx +199 -0
- package/dist/components/catalyst-ui/media/marquee1.tsx +114 -0
- package/dist/components/catalyst-ui/media/parallax-scroll.tsx +119 -0
- package/dist/components/catalyst-ui/media/pixel-image.tsx +153 -0
- package/dist/components/catalyst-ui/media/video-player.tsx +94 -0
- package/dist/components/catalyst-ui/motions/animated-number.tsx +252 -0
- package/dist/components/catalyst-ui/motions/bg-media.tsx +122 -0
- package/dist/components/catalyst-ui/motions/border-beam.tsx +40 -0
- package/dist/components/catalyst-ui/motions/circle-menu.tsx +320 -0
- package/dist/components/catalyst-ui/motions/color-picker.tsx +490 -0
- package/dist/components/catalyst-ui/motions/color-wheel.tsx +81 -0
- package/dist/components/catalyst-ui/motions/direction-aware-tabs.tsx +568 -0
- package/dist/components/catalyst-ui/motions/dynamic-island.tsx +733 -0
- package/dist/components/catalyst-ui/motions/expandable-card.tsx +941 -0
- package/dist/components/catalyst-ui/motions/expandable-screen.tsx +455 -0
- package/dist/components/catalyst-ui/motions/floating-panel.tsx +1115 -0
- package/dist/components/catalyst-ui/motions/gradient-heading.tsx +116 -0
- package/dist/components/catalyst-ui/motions/index.ts +93 -0
- package/dist/components/catalyst-ui/motions/intro-disclosure.tsx +1345 -0
- package/dist/components/catalyst-ui/motions/light-board.tsx +888 -0
- package/dist/components/catalyst-ui/motions/loading-carousel.tsx +517 -0
- package/dist/components/catalyst-ui/motions/logo-carousel.tsx +586 -0
- package/dist/components/catalyst-ui/motions/morph-surface.tsx +779 -0
- package/dist/components/catalyst-ui/motions/motion-accordian.tsx +206 -0
- package/dist/components/catalyst-ui/motions/motion-alert-dialog.tsx +356 -0
- package/dist/components/catalyst-ui/motions/motion-avatar.tsx +384 -0
- package/dist/components/catalyst-ui/motions/motion-beam.tsx +674 -0
- package/dist/components/catalyst-ui/motions/motion-bento.tsx +262 -0
- package/dist/components/catalyst-ui/motions/motion-bento1.tsx +307 -0
- package/dist/components/catalyst-ui/motions/motion-button.tsx +107 -0
- package/dist/components/catalyst-ui/motions/motion-calendar.tsx +213 -0
- package/dist/components/catalyst-ui/motions/motion-card.tsx +1609 -0
- package/dist/components/catalyst-ui/motions/motion-card1.tsx +825 -0
- package/dist/components/catalyst-ui/motions/motion-card2.tsx +289 -0
- package/dist/components/catalyst-ui/motions/motion-card3.tsx +190 -0
- package/dist/components/catalyst-ui/motions/motion-carousel.tsx +517 -0
- package/dist/components/catalyst-ui/motions/motion-checkbox.tsx +77 -0
- package/dist/components/catalyst-ui/motions/motion-choicebox.tsx +360 -0
- package/dist/components/catalyst-ui/motions/motion-combobox.tsx +242 -0
- package/dist/components/catalyst-ui/motions/motion-command.tsx +328 -0
- package/dist/components/catalyst-ui/motions/motion-context-menu.tsx +391 -0
- package/dist/components/catalyst-ui/motions/motion-date-picker.tsx +162 -0
- package/dist/components/catalyst-ui/motions/motion-dialog.tsx +350 -0
- package/dist/components/catalyst-ui/motions/motion-drawer.tsx +1778 -0
- package/dist/components/catalyst-ui/motions/motion-drawer1.tsx +209 -0
- package/dist/components/catalyst-ui/motions/motion-dropdown-menu.tsx +429 -0
- package/dist/components/catalyst-ui/motions/motion-dropdown1.tsx +572 -0
- package/dist/components/catalyst-ui/motions/motion-feature-carousel.tsx +771 -0
- package/dist/components/catalyst-ui/motions/motion-file-upload.tsx +596 -0
- package/dist/components/catalyst-ui/motions/motion-group.tsx +194 -0
- package/dist/components/catalyst-ui/motions/motion-highlight.tsx +550 -0
- package/dist/components/catalyst-ui/motions/motion-highlight2.tsx +590 -0
- package/dist/components/catalyst-ui/motions/motion-hover-card.tsx +207 -0
- package/dist/components/catalyst-ui/motions/motion-images.tsx +53 -0
- package/dist/components/catalyst-ui/motions/motion-input.tsx +51 -0
- package/dist/components/catalyst-ui/motions/motion-list.tsx +170 -0
- package/dist/components/catalyst-ui/motions/motion-logo-carosel.tsx +668 -0
- package/dist/components/catalyst-ui/motions/motion-map.tsx +372 -0
- package/dist/components/catalyst-ui/motions/motion-navbar.tsx +69 -0
- package/dist/components/catalyst-ui/motions/motion-navigation-menu.tsx +302 -0
- package/dist/components/catalyst-ui/motions/motion-panel.tsx +338 -0
- package/dist/components/catalyst-ui/motions/motion-popover.tsx +281 -0
- package/dist/components/catalyst-ui/motions/motion-radio-card.tsx +77 -0
- package/dist/components/catalyst-ui/motions/motion-radio-group.tsx +54 -0
- package/dist/components/catalyst-ui/motions/motion-rating.tsx +182 -0
- package/dist/components/catalyst-ui/motions/motion-screen.tsx +441 -0
- package/dist/components/catalyst-ui/motions/motion-search-bar.tsx +1013 -0
- package/dist/components/catalyst-ui/motions/motion-section.tsx +270 -0
- package/dist/components/catalyst-ui/motions/motion-select.tsx +306 -0
- package/dist/components/catalyst-ui/motions/motion-spotlight.tsx +217 -0
- package/dist/components/catalyst-ui/motions/motion-switch.tsx +83 -0
- package/dist/components/catalyst-ui/motions/motion-tabs.tsx +554 -0
- package/dist/components/catalyst-ui/motions/motion-tabs2.tsx +257 -0
- package/dist/components/catalyst-ui/motions/motion-testimonials.tsx +282 -0
- package/dist/components/catalyst-ui/motions/motion-toast.tsx +398 -0
- package/dist/components/catalyst-ui/motions/motion-toolbar-tabs.tsx +519 -0
- package/dist/components/catalyst-ui/motions/motion-toolbar.tsx +1113 -0
- package/dist/components/catalyst-ui/motions/motion-tooltip.tsx +162 -0
- package/dist/components/catalyst-ui/motions/motion-tooltip2.tsx +82 -0
- package/dist/components/catalyst-ui/motions/motion-video-player.tsx +1056 -0
- package/dist/components/catalyst-ui/motions/motions-input.tsx +51 -0
- package/dist/components/catalyst-ui/motions/popover-form.tsx +469 -0
- package/dist/components/catalyst-ui/motions/profile-dropdown.tsx +237 -0
- package/dist/components/catalyst-ui/motions/radial-menu.tsx +303 -0
- package/dist/components/catalyst-ui/motions/roladex.tsx +194 -0
- package/dist/components/catalyst-ui/motions/roladex1.tsx +166 -0
- package/dist/components/catalyst-ui/motions/shift-card.tsx +302 -0
- package/dist/components/catalyst-ui/motions/side-panel.tsx +352 -0
- package/dist/components/catalyst-ui/motions/smooth-drawer.tsx +213 -0
- package/dist/components/catalyst-ui/motions/smooth-popover.tsx +491 -0
- package/dist/components/catalyst-ui/motions/sortable-list.tsx +712 -0
- package/dist/components/catalyst-ui/motions/stripe.tsx +261 -0
- package/dist/components/catalyst-ui/motions/texture-button.tsx +217 -0
- package/dist/components/catalyst-ui/motions/timer.tsx +286 -0
- package/dist/components/catalyst-ui/motions/toolbar-expandable.tsx +1138 -0
- package/dist/components/catalyst-ui/motions/youtube-player.tsx +614 -0
- package/dist/components/catalyst-ui/overlays/animated-modal.tsx +212 -0
- package/dist/components/catalyst-ui/overlays/animated-tooltip.tsx +99 -0
- package/dist/components/catalyst-ui/overlays/confirm-popup.tsx +219 -0
- package/dist/components/catalyst-ui/overlays/dialog-stack.tsx +558 -0
- package/dist/components/catalyst-ui/overlays/index.ts +19 -0
- package/dist/components/catalyst-ui/overlays/loading-overlay.tsx +324 -0
- package/dist/components/catalyst-ui/overlays/modal-integrations-1.tsx +300 -0
- package/dist/components/catalyst-ui/overlays/modal-integrations.tsx +301 -0
- package/dist/components/catalyst-ui/overlays/overlay-panel.tsx +233 -0
- package/dist/components/catalyst-ui/overlays/popconfirm.tsx +721 -0
- package/dist/components/catalyst-ui/overlays/sidebar-props.tsx +492 -0
- package/dist/components/catalyst-ui/overlays/sidebar.tsx +2208 -0
- package/dist/components/catalyst-ui/overlays/sidebarMenuItemLoading.tsx +124 -0
- package/dist/components/catalyst-ui/overlays/texture-card.tsx +309 -0
- package/dist/components/catalyst-ui/overlays/transitionable-portal.tsx +230 -0
- package/dist/components/catalyst-ui/pdf/generate_custom_pdf.tsx +40 -0
- package/dist/components/catalyst-ui/pdf/generate_pdf.tsx +196 -0
- package/dist/components/catalyst-ui/pdf/index.ts +12 -0
- package/dist/components/catalyst-ui/pdf/pdf.tsx +32 -0
- package/dist/components/catalyst-ui/pdf/pdf_generator.ts +141 -0
- package/dist/components/catalyst-ui/pdf/pdf_sender.$dealerId.$documentId.$dept.tsx +1260 -0
- package/dist/components/catalyst-ui/pdf/pdf_signer.$id.tsx +1438 -0
- package/dist/components/catalyst-ui/pdf/print_pdf.tsx +15905 -0
- package/dist/components/catalyst-ui/pdf/templateBuilder.tsx +1590 -0
- package/dist/components/catalyst-ui/pdf/test.tsx +53 -0
- package/dist/components/catalyst-ui/pos/index.ts +5 -0
- package/dist/components/catalyst-ui/pos/tools/barcodeScanner.tsx +160 -0
- package/dist/components/catalyst-ui/pos/tools/cashDrawerWizard.tsx +1403 -0
- package/dist/components/catalyst-ui/pos/tools/scan.mp4 +0 -0
- package/dist/components/catalyst-ui/primitives/alert.tsx +103 -0
- package/dist/components/catalyst-ui/primitives/annotated.tsx +133 -0
- package/dist/components/catalyst-ui/primitives/button-group.tsx +89 -0
- package/dist/components/catalyst-ui/primitives/checkbox-tree.tsx +175 -0
- package/dist/components/catalyst-ui/primitives/combobox.tsx +93 -0
- package/dist/components/catalyst-ui/primitives/description-list.tsx +88 -0
- package/dist/components/catalyst-ui/primitives/index.ts +59 -0
- package/dist/components/catalyst-ui/primitives/input-group.tsx +186 -0
- package/dist/components/catalyst-ui/primitives/menubar.tsx +273 -0
- package/dist/components/catalyst-ui/primitives/progress-bar.tsx +114 -0
- package/dist/components/catalyst-ui/primitives/radio-card.tsx +167 -0
- package/dist/components/catalyst-ui/primitives/scroll-area.tsx +56 -0
- package/dist/components/catalyst-ui/primitives/table.tsx +329 -0
- package/dist/components/catalyst-ui/prompt/ai-input-search.tsx +288 -0
- package/dist/components/catalyst-ui/prompt/ai-loading-state.tsx +313 -0
- package/dist/components/catalyst-ui/prompt/ai-prompt-input.tsx +305 -0
- package/dist/components/catalyst-ui/prompt/ai-voice.tsx +241 -0
- package/dist/components/catalyst-ui/prompt/chain-of-thought.tsx +146 -0
- package/dist/components/catalyst-ui/prompt/chatbot.tsx +201 -0
- package/dist/components/catalyst-ui/prompt/code-block-examples.tsx +227 -0
- package/dist/components/catalyst-ui/prompt/code-block.tsx +92 -0
- package/dist/components/catalyst-ui/prompt/conversation-actions.tsx +150 -0
- package/dist/components/catalyst-ui/prompt/conversation-avatars.tsx +92 -0
- package/dist/components/catalyst-ui/prompt/conversation-prompt-input.tsx +256 -0
- package/dist/components/catalyst-ui/prompt/conversation-scroll-bottom.tsx +121 -0
- package/dist/components/catalyst-ui/prompt/file-upload.tsx +310 -0
- package/dist/components/catalyst-ui/prompt/full-chat-app.tsx +759 -0
- package/dist/components/catalyst-ui/prompt/full-conversation.tsx +76 -0
- package/dist/components/catalyst-ui/prompt/image.tsx +94 -0
- package/dist/components/catalyst-ui/prompt/index.ts +46 -0
- package/dist/components/catalyst-ui/prompt/input-byok.tsx +70 -0
- package/dist/components/catalyst-ui/prompt/jsx-preview.tsx +81 -0
- package/dist/components/catalyst-ui/prompt/loader.tsx +497 -0
- package/dist/components/catalyst-ui/prompt/markdown.tsx +117 -0
- package/dist/components/catalyst-ui/prompt/pre-prompts.tsx +59 -0
- package/dist/components/catalyst-ui/prompt/prompt-autocomplete-highlight.tsx +81 -0
- package/dist/components/catalyst-ui/prompt/prompt-chat-container-basic.tsx +98 -0
- package/dist/components/catalyst-ui/prompt/prompt-chat-container-streaming.tsx +132 -0
- package/dist/components/catalyst-ui/prompt/prompt-chat-container.tsx +65 -0
- package/dist/components/catalyst-ui/prompt/prompt-feedback-bar.tsx +79 -0
- package/dist/components/catalyst-ui/prompt/prompt-input-actions.tsx +100 -0
- package/dist/components/catalyst-ui/prompt/prompt-input-suggestions.tsx +150 -0
- package/dist/components/catalyst-ui/prompt/prompt-input.tsx +187 -0
- package/dist/components/catalyst-ui/prompt/prompt-message.tsx +109 -0
- package/dist/components/catalyst-ui/prompt/prompt-suggestion.tsx +116 -0
- package/dist/components/catalyst-ui/prompt/providers.tsx +540 -0
- package/dist/components/catalyst-ui/prompt/reasoning.tsx +168 -0
- package/dist/components/catalyst-ui/prompt/response-stream.tsx +392 -0
- package/dist/components/catalyst-ui/prompt/scroll-button.tsx +39 -0
- package/dist/components/catalyst-ui/prompt/sidebar-chat-history.tsx +242 -0
- package/dist/components/catalyst-ui/prompt/snippets.tsx +1378 -0
- package/dist/components/catalyst-ui/prompt/source.tsx +127 -0
- package/dist/components/catalyst-ui/prompt/steps.tsx +111 -0
- package/dist/components/catalyst-ui/prompt/system-message.tsx +131 -0
- package/dist/components/catalyst-ui/prompt/tool-calling.tsx +236 -0
- package/dist/components/catalyst-ui/prompt/tool.tsx +204 -0
- package/dist/components/catalyst-ui/sidebars/nav-components/NotificationMenu.tsx +120 -0
- package/dist/components/catalyst-ui/sidebars/nav-components/Tree.tsx +53 -0
- package/dist/components/catalyst-ui/sidebars/nav-components/active-toc.tsx +213 -0
- package/dist/components/catalyst-ui/sidebars/nav-components/analog-clock.tsx +211 -0
- package/dist/components/catalyst-ui/sidebars/nav-components/app-sidebar.tsx +339 -0
- package/dist/components/catalyst-ui/sidebars/nav-components/blog-sidebar.tsx +39 -0
- package/dist/components/catalyst-ui/sidebars/nav-components/calendars.tsx +58 -0
- package/dist/components/catalyst-ui/sidebars/nav-components/date-picker.tsx +12 -0
- package/dist/components/catalyst-ui/sidebars/nav-components/dev-list-sidebar.tsx +195 -0
- package/dist/components/catalyst-ui/sidebars/nav-components/digital-clock.tsx +343 -0
- package/dist/components/catalyst-ui/sidebars/nav-components/index.ts +41 -0
- package/dist/components/catalyst-ui/sidebars/nav-components/loading-sidebar.tsx +42 -0
- package/dist/components/catalyst-ui/sidebars/nav-components/nav-actions.tsx +122 -0
- package/dist/components/catalyst-ui/sidebars/nav-components/nav-appointments.tsx +429 -0
- package/dist/components/catalyst-ui/sidebars/nav-components/nav-auto-search.tsx +314 -0
- package/dist/components/catalyst-ui/sidebars/nav-components/nav-favorites.tsx +71 -0
- package/dist/components/catalyst-ui/sidebars/nav-components/nav-header.tsx +409 -0
- package/dist/components/catalyst-ui/sidebars/nav-components/nav-main.tsx +1583 -0
- package/dist/components/catalyst-ui/sidebars/nav-components/nav-messenger.tsx +440 -0
- package/dist/components/catalyst-ui/sidebars/nav-components/nav-projects.tsx +66 -0
- package/dist/components/catalyst-ui/sidebars/nav-components/nav-quick-actions.tsx +366 -0
- package/dist/components/catalyst-ui/sidebars/nav-components/nav-secondary.tsx +33 -0
- package/dist/components/catalyst-ui/sidebars/nav-components/nav-shopping-cart.tsx +231 -0
- package/dist/components/catalyst-ui/sidebars/nav-components/nav-shopping-cartCatlstui.tsx +196 -0
- package/dist/components/catalyst-ui/sidebars/nav-components/nav-tree-view.tsx +18 -0
- package/dist/components/catalyst-ui/sidebars/nav-components/nav-user.tsx +87 -0
- package/dist/components/catalyst-ui/sidebars/nav-components/nav-workspaces.tsx +69 -0
- package/dist/components/catalyst-ui/sidebars/nav-components/navigation-theme-selector.tsx +143 -0
- package/dist/components/catalyst-ui/sidebars/nav-components/opt-in-form.tsx +29 -0
- package/dist/components/catalyst-ui/sidebars/nav-components/search-command.tsx +32 -0
- package/dist/components/catalyst-ui/sidebars/nav-components/search-form.tsx +21 -0
- package/dist/components/catalyst-ui/sidebars/nav-components/settings-menu.tsx +35 -0
- package/dist/components/catalyst-ui/sidebars/nav-components/sidebar-dialog.tsx +82 -0
- package/dist/components/catalyst-ui/sidebars/nav-components/site-header.tsx +40 -0
- package/dist/components/catalyst-ui/sidebars/nav-components/team-switcher.tsx +68 -0
- package/dist/components/catalyst-ui/sidebars/nav-components/toc.tsx +301 -0
- package/dist/components/catalyst-ui/sidebars/nav-components/user-menu.tsx +77 -0
- package/dist/components/catalyst-ui/sidebars/nav-components/version-switcher.tsx +49 -0
- package/dist/components/catalyst-ui/sidebars/nav-components/wishlist.tsx +292 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-01/AppSidebar.tsx +36 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-01/SearchForm.tsx +24 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-01/VersionSwitcher.tsx +49 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-01/index.tsx +270 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-01/sidebar-01.tsx +178 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-02/AppSidebar.tsx +56 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-02/SearchForm.tsx +24 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-02/VersionSwitcher.tsx +44 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-02/index.tsx +301 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-02/sidebar-02.tsx +193 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-03/AppSidebar.tsx +54 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-03/index.tsx +238 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-03/sidebar-03.tsx +189 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-04/AppSidebar.tsx +58 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-04/index.tsx +249 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-04/sidebar-04.tsx +201 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-05/AppSidebar.tsx +70 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-05/SearchForm.tsx +25 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-05/index.tsx +275 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-05/sidebar-05.tsx +191 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-06/AppSidebar.tsx +43 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-06/NavMain.tsx +56 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-06/SidebarOptInForm.tsx +34 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-06/index.tsx +290 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-06/sidebar-06.tsx +183 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-07/AppSidebar.tsx +28 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-07/NavMain.tsx +57 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-07/NavProjects.tsx +67 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-07/NavUser.tsx +86 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-07/TeamSwitcher.tsx +74 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-07/index.tsx +474 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-07/sidebar-07.tsx +189 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-08/AppSidebar.tsx +41 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-08/NavMain.tsx +62 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-08/NavProjects.tsx +68 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-08/NavSecondary.tsx +35 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-08/NavUser.tsx +87 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-08/index.tsx +446 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-08/sidebar-08.tsx +181 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-09/AppSidebar.tsx +213 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-09/NavUser.tsx +88 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-09/index.tsx +468 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-09/sidebar-09.tsx +177 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-10/AppSidebar.tsx +28 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-10/NavActions.tsx +59 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-10/NavFavorites.tsx +74 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-10/NavMain.tsx +31 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-10/NavSecondary.tsx +37 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-10/NavWorkspaces.tsx +70 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-10/TeamSwitcher.tsx +70 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-10/index.tsx +675 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-10/sidebar-10.tsx +348 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-11/AppSidebar.tsx +46 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-11/Tree.tsx +49 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-11/index.tsx +175 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-11/sidebar-11.tsx +102 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-12/AppSidebar.tsx +32 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-12/Calendars.tsx +57 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-12/DatePicker.tsx +13 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-12/NavUser.tsx +85 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-12/index.tsx +237 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-12/sidebar-12.tsx +68 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-13/SettingsDialog.tsx +82 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-13/index.tsx +105 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-13/sidebar-13.tsx +24 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-14/AppSidebar.tsx +45 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-14/index.tsx +225 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-14/sidebar-14.tsx +186 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-15/Calendars.tsx +83 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-15/DatePicker.tsx +39 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-15/NavFavorites.tsx +98 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-15/NavMain.tsx +29 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-15/NavSecondary.tsx +36 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-15/NavUser.tsx +89 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-15/NavWorkspaces.tsx +95 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-15/SidebarLeft.tsx +28 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-15/SidebarRight.tsx +38 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-15/TeamSwitcher.tsx +89 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-15/index.tsx +776 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-15/sidebar-15.tsx +324 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-16/AppSidebar.tsx +50 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-16/NavUser.tsx +100 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-16/SearchForm.tsx +35 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-16/SiteHeader.tsx +51 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-16/index.tsx +424 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-16/sidebar-16.tsx +188 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-17/AppSidebar.tsx +154 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-17/ShoppingCartSidebar.tsx +163 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-17/index.tsx +557 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-17/sidebar-17.tsx +183 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-18/AppSidebar.tsx +32 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-18/NavTreeView.tsx +18 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-18/index.tsx +120 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-18/sidebar-18.tsx +92 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-19/AppSidebar.tsx +230 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-19/index.tsx +264 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-19/sidebar-19.tsx +59 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-20/AppSidebar.tsx +215 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-20/index.tsx +250 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-20/sidebar-20.tsx +44 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-21/AppSidebar.tsx +303 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-21/LoadingSidebar.tsx +41 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-21/index.tsx +412 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-21/sidebar-21.tsx +75 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-22/AppSidebar.tsx +184 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-22/LoadingSidebar.tsx +45 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-22/index.tsx +251 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-22/sidebar-22.tsx +44 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-24/NavUser.tsx +87 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-24/calendars-24.tsx +58 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-24/date-picker-24.tsx +12 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-24/sidebar-24.tsx +39 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-25/AppSidebar.tsx +24 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-25/NavMain.tsx +57 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-25/NavSecondary.tsx +35 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-25/NavUser.tsx +87 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-25/SearchForm.tsx +35 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-25/SiteHeader.tsx +19 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-25/index.tsx +172 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-25/sidebar-25.tsx +153 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-26/app-sidebar-26.tsx +344 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-26/index.tsx +78 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-26/sidebar-26.tsx +78 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-26/use-mobile-26.ts +19 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-27/sidebar-27.tsx +5 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-28/app-sidebar-28.tsx +285 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-28/index.tsx +31 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-28/nav-user-28.tsx +88 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-28/search-form-28.tsx +23 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-28/sidebar-28.tsx +32 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-28/site-header-28.tsx +29 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-28/use-mobile-28.ts +19 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-29/ds-left-icon.tsx +101 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-29/ds-left.tsx +88 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-29/ds-right-icon.tsx +106 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-29/ds-right.tsx +87 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-29/nav-user.tsx +74 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-29/settings-dialog.tsx +91 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-29/sidebar-29.tsx +204 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-29/version-switcher.tsx +52 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-30/ds-left.tsx +678 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-30/ds-right.tsx +87 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-30/settings-dialog.tsx +91 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-30/sidebar-30.tsx +604 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-31/ds-left.tsx +431 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-31/message.tsx +28 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-31/nav-auto-search.tsx +310 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-31/nav-search-command.tsx +0 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-31/nav-user.tsx +74 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-31/sidebar-31.tsx +369 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-31/typing-message.tsx +12 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-32/ds-left.tsx +119 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-32/ds-right.tsx +87 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-32/settings-dialog.tsx +91 -0
- package/dist/components/catalyst-ui/sidebars/sidebar-32/sidebar-32.tsx +119 -0
- package/dist/components/catalyst-ui/sidebars/variants/dual-sidebar-agnostic.tsx +3473 -0
- package/dist/components/catalyst-ui/sidebars/variants/sidebar-original.tsx +714 -0
- package/dist/components/catalyst-ui/sidebars/variants/sidebar-right.tsx +823 -0
- package/dist/components/catalyst-ui/sidebars/variants/sidebar-stylistic-default.tsx +591 -0
- package/dist/components/catalyst-ui/table/catalyst-table/column-header-simple.tsx +60 -0
- package/dist/components/catalyst-ui/table/catalyst-table/column-header.tsx +223 -0
- package/dist/components/catalyst-ui/table/catalyst-table/draggable-header.tsx +58 -0
- package/dist/components/catalyst-ui/table/catalyst-table/faceted-filter.tsx +131 -0
- package/dist/components/catalyst-ui/table/catalyst-table/global-search.tsx +0 -0
- package/dist/components/catalyst-ui/table/catalyst-table/row-actions.tsx +49 -0
- package/dist/components/catalyst-ui/table/catalyst-table/table.tsx +421 -0
- package/dist/components/catalyst-ui/table/index.ts +14 -0
- package/dist/components/catalyst-ui/table/props-table.tsx +170 -0
- package/dist/components/catalyst-ui/table/small-table.tsx +719 -0
- package/dist/components/catalyst-ui/table/table-1.tsx +246 -0
- package/dist/components/catalyst-ui/themeStudio/config.tsx +83 -0
- package/dist/components/catalyst-ui/themeStudio/dual-sidebar.tsx +3256 -0
- package/dist/components/catalyst-ui/themeStudio/theme-provider.tsx +269 -0
- package/dist/components/catalyst-ui/themeStudio/use-color-theme.tsx +1614 -0
- package/dist/components/catalyst-ui/themeStudio/use-color-wheel.tsx +904 -0
- package/dist/components/catalyst-ui/tools/Demo/md-render-genie.tsx +273 -0
- package/dist/components/catalyst-ui/tools/GandalfBot.tsx +144 -0
- package/dist/components/catalyst-ui/tools/MdFileTreeExplorer.tsx +287 -0
- package/dist/components/catalyst-ui/tools/accessibility-checker.tsx +370 -0
- package/dist/components/catalyst-ui/tools/animation-builder.tsx +350 -0
- package/dist/components/catalyst-ui/tools/api-response.tsx +318 -0
- package/dist/components/catalyst-ui/tools/chart-playground.tsx +480 -0
- package/dist/components/catalyst-ui/tools/code-carousel.tsx +246 -0
- package/dist/components/catalyst-ui/tools/code-diff.tsx +274 -0
- package/dist/components/catalyst-ui/tools/code-editor.tsx +35 -0
- package/dist/components/catalyst-ui/tools/code-highlight-plugin.tsx +25 -0
- package/dist/components/catalyst-ui/tools/color-converter.tsx +413 -0
- package/dist/components/catalyst-ui/tools/color-wheel.tsx +1012 -0
- package/dist/components/catalyst-ui/tools/components-reel.tsx +135 -0
- package/dist/components/catalyst-ui/tools/convert/converter.tsx +969 -0
- package/dist/components/catalyst-ui/tools/convert/sidebar-converter.tsx +132 -0
- package/dist/components/catalyst-ui/tools/cron-expression-builder.tsx +346 -0
- package/dist/components/catalyst-ui/tools/dual-editor.tsx +240 -0
- package/dist/components/catalyst-ui/tools/editor.tsx +1744 -0
- package/dist/components/catalyst-ui/tools/examples.tsx +1206 -0
- package/dist/components/catalyst-ui/tools/flexbox-sandbox.tsx +327 -0
- package/dist/components/catalyst-ui/tools/function-theater.tsx +93 -0
- package/dist/components/catalyst-ui/tools/grid-sandbox.tsx +464 -0
- package/dist/components/catalyst-ui/tools/icons.tsx +249 -0
- package/dist/components/catalyst-ui/tools/index.ts +59 -0
- package/dist/components/catalyst-ui/tools/json-Formatter.tsx +258 -0
- package/dist/components/catalyst-ui/tools/layout-generator.tsx +237 -0
- package/dist/components/catalyst-ui/tools/lexical-editor.tsx +218 -0
- package/dist/components/catalyst-ui/tools/live-playground.tsx +1458 -0
- package/dist/components/catalyst-ui/tools/lorem-ipsum-generator.tsx +314 -0
- package/dist/components/catalyst-ui/tools/md-badge-builder.tsx +179 -0
- package/dist/components/catalyst-ui/tools/md-cheat-sheet.tsx +5557 -0
- package/dist/components/catalyst-ui/tools/md-editor.tsx +632 -0
- package/dist/components/catalyst-ui/tools/md-render-genie.tsx +1233 -0
- package/dist/components/catalyst-ui/tools/md-renderer.tsx +61 -0
- package/dist/components/catalyst-ui/tools/monaco-sidebar.tsx +7791 -0
- package/dist/components/catalyst-ui/tools/monaco.tsx +492 -0
- package/dist/components/catalyst-ui/tools/motion-sandbox.tsx +0 -0
- package/dist/components/catalyst-ui/tools/qr-code-generator.tsx +432 -0
- package/dist/components/catalyst-ui/tools/regex-tester.tsx +508 -0
- package/dist/components/catalyst-ui/tools/responsive-preview.tsx +286 -0
- package/dist/components/catalyst-ui/tools/rich-text-editor copy.tsx +1058 -0
- package/dist/components/catalyst-ui/tools/rich-text-editor.tsx +1994 -0
- package/dist/components/catalyst-ui/tools/rte.md +119 -0
- package/dist/components/catalyst-ui/tools/sandbox.tsx +52 -0
- package/dist/components/catalyst-ui/tools/scripts-viewer.tsx +215 -0
- package/dist/components/catalyst-ui/tools/scripts.edit.tsx +3102 -0
- package/dist/components/catalyst-ui/tools/table-plugin.tsx +149 -0
- package/dist/components/catalyst-ui/tools/tailwind-converter.tsx +502 -0
- package/dist/components/catalyst-ui/tools/terminal.tsx +60 -0
- package/dist/components/catalyst-ui/tools/theme-builder.tsx +5071 -0
- package/dist/components/catalyst-ui/tools/toolbar-plugin.tsx +383 -0
- package/dist/components/catalyst-ui/tools/toolbar-plugin1.tsx +861 -0
- package/dist/components/catalyst-ui/tools/typography-tester.tsx +310 -0
- package/dist/components/catalyst-ui/tools/uuid-hash-generator.tsx +534 -0
- package/dist/components/catalyst-ui/tools/vscode-cmds.tsx +3813 -0
- package/dist/components/catalyst-ui/tools/x-viewer.tsx +135 -0
- package/dist/components/catalyst-ui/typography/animated-glitch-text.tsx +188 -0
- package/dist/components/catalyst-ui/typography/b.tsx +23 -0
- package/dist/components/catalyst-ui/typography/blockquote.tsx +35 -0
- package/dist/components/catalyst-ui/typography/check-list.tsx +130 -0
- package/dist/components/catalyst-ui/typography/code.tsx +26 -0
- package/dist/components/catalyst-ui/typography/comic-text.tsx +68 -0
- package/dist/components/catalyst-ui/typography/display-code.tsx +148 -0
- package/dist/components/catalyst-ui/typography/div.tsx +20 -0
- package/dist/components/catalyst-ui/typography/dynamic-text.tsx +149 -0
- package/dist/components/catalyst-ui/typography/encrypted-text.tsx +168 -0
- package/dist/components/catalyst-ui/typography/glitch-text.tsx +174 -0
- package/dist/components/catalyst-ui/typography/h1.tsx +19 -0
- package/dist/components/catalyst-ui/typography/h2.tsx +19 -0
- package/dist/components/catalyst-ui/typography/h3.tsx +19 -0
- package/dist/components/catalyst-ui/typography/h4.tsx +19 -0
- package/dist/components/catalyst-ui/typography/h5.tsx +19 -0
- package/dist/components/catalyst-ui/typography/highlight-1.tsx +133 -0
- package/dist/components/catalyst-ui/typography/highlight.tsx +133 -0
- package/dist/components/catalyst-ui/typography/hyper-text.tsx +135 -0
- package/dist/components/catalyst-ui/typography/i.tsx +23 -0
- package/dist/components/catalyst-ui/typography/ib.tsx +24 -0
- package/dist/components/catalyst-ui/typography/index.ts +49 -0
- package/dist/components/catalyst-ui/typography/line-shadow-text.tsx +44 -0
- package/dist/components/catalyst-ui/typography/matrix-text.tsx +186 -0
- package/dist/components/catalyst-ui/typography/ordered-list.tsx +39 -0
- package/dist/components/catalyst-ui/typography/p.tsx +19 -0
- package/dist/components/catalyst-ui/typography/paragraph-scramble.tsx +122 -0
- package/dist/components/catalyst-ui/typography/pm.tsx +20 -0
- package/dist/components/catalyst-ui/typography/prose.tsx +90 -0
- package/dist/components/catalyst-ui/typography/scroll-text.tsx +181 -0
- package/dist/components/catalyst-ui/typography/shimmer-text.tsx +105 -0
- package/dist/components/catalyst-ui/typography/sliced-text.tsx +131 -0
- package/dist/components/catalyst-ui/typography/swoosh-text.tsx +111 -0
- package/dist/components/catalyst-ui/typography/text-animate.tsx +380 -0
- package/dist/components/catalyst-ui/typography/text-highlighter.tsx +101 -0
- package/dist/components/catalyst-ui/typography/text-morph.tsx +272 -0
- package/dist/components/catalyst-ui/typography/text-reveal.tsx +71 -0
- package/dist/components/catalyst-ui/typography/text-rewind.tsx +90 -0
- package/dist/components/catalyst-ui/typography/text-scramble.tsx +111 -0
- package/dist/components/catalyst-ui/typography/text.tsx +134 -0
- package/dist/components/catalyst-ui/typography/typewriter.tsx +153 -0
- package/dist/components/catalyst-ui/typography/typing-animation.tsx +172 -0
- package/dist/components/catalyst-ui/typography/typography.tsx +67 -0
- package/dist/components/catalyst-ui/typography/unordered-list.tsx +78 -0
- package/dist/components/catalyst-ui/typography/video-text.tsx +86 -0
- package/dist/components/catalyst-ui/typography/word-rotate.tsx +48 -0
- package/dist/components/catalyst-ui/utils/auth-provider.tsx +419 -0
- package/dist/components/catalyst-ui/utils/auth.github.callback.tsx +135 -0
- package/dist/components/catalyst-ui/utils/auth.github.tsx +17 -0
- package/dist/components/catalyst-ui/utils/auth.ts +34 -0
- package/dist/components/catalyst-ui/utils/auth_github.ts +48 -0
- package/dist/components/catalyst-ui/utils/auth_session.ts +70 -0
- package/dist/components/catalyst-ui/utils/batcher.tsx +50 -0
- package/dist/components/catalyst-ui/utils/build-package-json.js +89 -0
- package/dist/components/catalyst-ui/utils/cache-assets.ts +72 -0
- package/dist/components/catalyst-ui/utils/client-only-mermaid.tsx +82 -0
- package/dist/components/catalyst-ui/utils/client-only.tsx +27 -0
- package/dist/components/catalyst-ui/utils/cors.ts +178 -0
- package/dist/components/catalyst-ui/utils/crypto.ts +96 -0
- package/dist/components/catalyst-ui/utils/dbLocal.js +74 -0
- package/dist/components/catalyst-ui/utils/dbRemote.js +74 -0
- package/dist/components/catalyst-ui/utils/demo.tsx +499 -0
- package/dist/components/catalyst-ui/utils/dynamic-links.tsx +324 -0
- package/dist/components/catalyst-ui/utils/event-stream.ts +82 -0
- package/dist/components/catalyst-ui/utils/existing-search-params.tsx +78 -0
- package/dist/components/catalyst-ui/utils/external-scripts.tsx +144 -0
- package/dist/components/catalyst-ui/utils/fetcher-context.tsx +45 -0
- package/dist/components/catalyst-ui/utils/fetcher-type.tsx +82 -0
- package/dist/components/catalyst-ui/utils/filename-icon-map.tsx +176 -0
- package/dist/components/catalyst-ui/utils/flickering-grid.tsx +188 -0
- package/dist/components/catalyst-ui/utils/get-client-ip-address.ts +52 -0
- package/dist/components/catalyst-ui/utils/get-client-locales.ts +25 -0
- package/dist/components/catalyst-ui/utils/get-headers.ts +7 -0
- package/dist/components/catalyst-ui/utils/honeypot-react.tsx +480 -0
- package/dist/components/catalyst-ui/utils/honeypot.ts +138 -0
- package/dist/components/catalyst-ui/utils/index.ts +82 -0
- package/dist/components/catalyst-ui/utils/is-prefetch.ts +19 -0
- package/dist/components/catalyst-ui/utils/json-hash.ts +33 -0
- package/dist/components/catalyst-ui/utils/keyboard-shortcut.tsx +124 -0
- package/dist/components/catalyst-ui/utils/named-action.ts +50 -0
- package/dist/components/catalyst-ui/utils/navigation-context.tsx +71 -0
- package/dist/components/catalyst-ui/utils/options.ts +20 -0
- package/dist/components/catalyst-ui/utils/otp-auth-session.ts +14 -0
- package/dist/components/catalyst-ui/utils/otp-client-auth.tsx +30 -0
- package/dist/components/catalyst-ui/utils/otp-email.tsx +104 -0
- package/dist/components/catalyst-ui/utils/parse-accept-header.ts +21 -0
- package/dist/components/catalyst-ui/utils/preload-route-assets.ts +60 -0
- package/dist/components/catalyst-ui/utils/prisma.ts +93 -0
- package/dist/components/catalyst-ui/utils/promise.ts +55 -0
- package/dist/components/catalyst-ui/utils/qr-code-1-server.tsx +42 -0
- package/dist/components/catalyst-ui/utils/qr-code-1.tsx +87 -0
- package/dist/components/catalyst-ui/utils/redirect-back.ts +35 -0
- package/dist/components/catalyst-ui/utils/redirect-bad-requests.tsx +5 -0
- package/dist/components/catalyst-ui/utils/remix-auth.ts +35 -0
- package/dist/components/catalyst-ui/utils/remix_auth_session.ts +71 -0
- package/dist/components/catalyst-ui/utils/respond-to.ts +40 -0
- package/dist/components/catalyst-ui/utils/responses.ts +130 -0
- package/dist/components/catalyst-ui/utils/rolling-cookie.tsx +39 -0
- package/dist/components/catalyst-ui/utils/safe-redirect.ts +21 -0
- package/dist/components/catalyst-ui/utils/scaffolding.tsx +14 -0
- package/dist/components/catalyst-ui/utils/scroll-top.tsx +382 -0
- package/dist/components/catalyst-ui/utils/scroll-x.tsx +22 -0
- package/dist/components/catalyst-ui/utils/scroll-xy.tsx +22 -0
- package/dist/components/catalyst-ui/utils/scroll-y.tsx +14 -0
- package/dist/components/catalyst-ui/utils/scroll.tsx +32 -0
- package/dist/components/catalyst-ui/utils/sec-fetch-parser.tsx +119 -0
- package/dist/components/catalyst-ui/utils/sec-fetch-parsers.tsx +42 -0
- package/dist/components/catalyst-ui/utils/server-only.tsx +12 -0
- package/dist/components/catalyst-ui/utils/singleton.tsx +22 -0
- package/dist/components/catalyst-ui/utils/style-provider.tsx +292 -0
- package/dist/components/catalyst-ui/utils/tailwindcss.css.txt +134 -0
- package/dist/components/catalyst-ui/utils/typed-cookie.ts +90 -0
- package/dist/components/catalyst-ui/utils/typed-session.ts +115 -0
- package/dist/components/catalyst-ui/utils/user-based-access-rules.tsx +118 -0
- package/dist/components/catalyst-ui/x/index.ts +38 -0
- package/dist/components/catalyst-ui/x/input-x.tsx +2263 -0
- package/dist/components/catalyst-ui/x/nav-x.tsx +3213 -0
- package/dist/components/catalyst-ui/x/tracker-x.tsx +2 -12
- package/dist/index.js +198 -220
- package/package.json +1 -1
- /package/dist/{data.tsx → components/catalyst-ui/data.tsx} +0 -0
- /package/dist/components/catalyst-ui/x/{button-X.tsx → button-x.tsx} +0 -0
|
@@ -0,0 +1,1994 @@
|
|
|
1
|
+
import React, { createContext, useCallback, useContext, useEffect, useRef, useState } from 'react';
|
|
2
|
+
import { Type, Bold, Italic, Underline, List, ListOrdered, Quote, H1, H2, H3, H4, H5, Code, Link, AlignLeft, AlignCenter, AlignRight, Sparkles, Undo, Redo, Checkbox, Strikethrough, Subscript, Superscript, Table, TableColumn, TableRow, Image, Highlight, At, FileExport, BracketsAngle, LineDashed, AlignJustified, MoodBoy, ColorPicker as ColorPickerIcon, Check, } from "@catalystsoftware/icons";
|
|
3
|
+
import { Button, Drawer, TooltipProvider, Tooltip, TooltipContent, TooltipTrigger, Input, Skeleton, Separator, Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle, cn, Dock, Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, } from "~/components/catalyst-ui";
|
|
4
|
+
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from "~/components/catalyst-ui";
|
|
5
|
+
import { Popover, PopoverTrigger, PopoverContent, PopoverClose, PopoverHeader, PopoverFooter, PopoverTitle, PopoverDescription, PopoverAnchor, } from "~/components/catalyst-ui";
|
|
6
|
+
import { FlickeringGrid, } from '~/components/catalyst-ui/utils/flickering-grid';
|
|
7
|
+
import { ColorPicker3, ColorPickerAlpha3, ColorPickerEyeDropper3, ColorPickerFormat3, ColorPickerHue3, ColorPickerOutput3, ColorPickerSelection3, } from '~/components/catalyst-ui';
|
|
8
|
+
import { ColorPicker1, } from '~/components/catalyst-ui';
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
const RTE_LOCAL_STORAGE_KEY = "catalyst/rte";
|
|
13
|
+
const FONT_SIZES = [8, 10, 12, 14, 16, 18, 20, 24, 26, 28, 30, 32, 34, 36, 38, 44];
|
|
14
|
+
const FONT_STYLE = ["font-mono", "font-sans", "font-serif", "font-mono", "font-geist", "mono-text", "font-noto", "font-open-sans"];
|
|
15
|
+
const LINE_HEIGHT = ['1', '1.15', '1.5', '2', '2.5', '3'];
|
|
16
|
+
const EMOJIES = []
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class History {
|
|
20
|
+
constructor() {
|
|
21
|
+
this.stack = [];
|
|
22
|
+
this.currentIndex = -1;
|
|
23
|
+
this.maxSize = 50;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
push(content) {
|
|
27
|
+
if (this.currentIndex < this.stack.length - 1) {
|
|
28
|
+
this.stack = this.stack.slice(0, this.currentIndex + 1);
|
|
29
|
+
}
|
|
30
|
+
this.stack.push(content);
|
|
31
|
+
if (this.stack.length > this.maxSize) {
|
|
32
|
+
this.stack.shift();
|
|
33
|
+
} else {
|
|
34
|
+
this.currentIndex++;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
undo() {
|
|
39
|
+
if (this.canUndo()) {
|
|
40
|
+
this.currentIndex--;
|
|
41
|
+
return this.stack[this.currentIndex];
|
|
42
|
+
}
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
redo() {
|
|
47
|
+
if (this.canRedo()) {
|
|
48
|
+
this.currentIndex++;
|
|
49
|
+
return this.stack[this.currentIndex];
|
|
50
|
+
}
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
canUndo() {
|
|
55
|
+
return this.currentIndex > 0;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
canRedo() {
|
|
59
|
+
return this.currentIndex < this.stack.length - 1;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
class EditorCommands {
|
|
65
|
+
constructor(editorRef) {
|
|
66
|
+
this.editor = editorRef;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
execCommand(command, value = null) {
|
|
70
|
+
document.execCommand(command, false, value);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
toggleInlineStyle(tag) {
|
|
74
|
+
this.execCommand('formatBlock', tag);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
insertBlock(tag) {
|
|
78
|
+
this.execCommand('formatBlock', `<${tag}>`);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
wrapSelection(tag, attrs = {}) {
|
|
82
|
+
const selection = window.getSelection();
|
|
83
|
+
if (!selection.rangeCount) return;
|
|
84
|
+
|
|
85
|
+
const range = selection.getRangeAt(0);
|
|
86
|
+
const element = document.createElement(tag);
|
|
87
|
+
|
|
88
|
+
Object.entries(attrs).forEach(([key, value]) => {
|
|
89
|
+
element.setAttribute(key, value);
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
try {
|
|
93
|
+
range.surroundContents(element);
|
|
94
|
+
} catch (e) {
|
|
95
|
+
element.appendChild(range.extractContents());
|
|
96
|
+
range.insertNode(element);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
insertOrderedList() {
|
|
101
|
+
this.execCommand('insertOrderedList');
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
insertUnorderedList() {
|
|
105
|
+
this.execCommand('insertUnorderedList');
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
insertTaskList() {
|
|
109
|
+
const selection = window.getSelection();
|
|
110
|
+
if (!selection.rangeCount) return;
|
|
111
|
+
|
|
112
|
+
const ul = document.createElement('ul');
|
|
113
|
+
ul.style.listStyleType = 'none';
|
|
114
|
+
|
|
115
|
+
const li = document.createElement('li');
|
|
116
|
+
const checkbox = document.createElement('input');
|
|
117
|
+
checkbox.type = 'checkbox';
|
|
118
|
+
checkbox.style.marginRight = '8px';
|
|
119
|
+
|
|
120
|
+
li.appendChild(checkbox);
|
|
121
|
+
li.appendChild(document.createTextNode('Task item'));
|
|
122
|
+
ul.appendChild(li);
|
|
123
|
+
|
|
124
|
+
const range = selection.getRangeAt(0);
|
|
125
|
+
range.insertNode(ul);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
insertStrike() {
|
|
129
|
+
this.execCommand('strikeThrough');
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
insertSubscript() {
|
|
133
|
+
this.execCommand('subscript');
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
insertSuperscript() {
|
|
137
|
+
this.execCommand('superscript');
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
setInsertTable(dimensions = '2x2') {
|
|
141
|
+
const [rows, cols] = dimensions.split('x').map(Number);
|
|
142
|
+
const table = document.createElement('table');
|
|
143
|
+
table.style.border = '1px solid #ccc';
|
|
144
|
+
table.style.borderCollapse = 'collapse';
|
|
145
|
+
table.style.width = '100%';
|
|
146
|
+
|
|
147
|
+
for (let i = 0; i < rows; i++) {
|
|
148
|
+
const tr = document.createElement('tr');
|
|
149
|
+
for (let j = 0; j < cols; j++) {
|
|
150
|
+
const td = document.createElement('td');
|
|
151
|
+
td.style.border = '1px solid #ccc';
|
|
152
|
+
td.style.padding = '8px';
|
|
153
|
+
td.textContent = '\u00A0'; // Non-breaking space
|
|
154
|
+
tr.appendChild(td);
|
|
155
|
+
}
|
|
156
|
+
table.appendChild(tr);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
this.execCommand('insertHTML', table.outerHTML);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
setInsertColumn() {
|
|
163
|
+
const selection = window.getSelection();
|
|
164
|
+
if (!selection.rangeCount) return;
|
|
165
|
+
|
|
166
|
+
let node = selection.anchorNode;
|
|
167
|
+
while (node && node.tagName !== 'TABLE') {
|
|
168
|
+
node = node.parentElement;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
if (node && node.tagName === 'TABLE') {
|
|
172
|
+
const rows = node.querySelectorAll('tr');
|
|
173
|
+
rows.forEach(row => {
|
|
174
|
+
const td = document.createElement('td');
|
|
175
|
+
td.style.border = '1px solid #ccc';
|
|
176
|
+
td.style.padding = '8px';
|
|
177
|
+
td.textContent = '\u00A0';
|
|
178
|
+
row.appendChild(td);
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
setInsertRow() {
|
|
184
|
+
const selection = window.getSelection();
|
|
185
|
+
if (!selection.rangeCount) return;
|
|
186
|
+
|
|
187
|
+
let node = selection.anchorNode;
|
|
188
|
+
while (node && node.tagName !== 'TABLE') {
|
|
189
|
+
node = node.parentElement;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
if (node && node.tagName === 'TABLE') {
|
|
193
|
+
const firstRow = node.querySelector('tr');
|
|
194
|
+
if (firstRow) {
|
|
195
|
+
const newRow = document.createElement('tr');
|
|
196
|
+
const colCount = firstRow.children.length;
|
|
197
|
+
|
|
198
|
+
for (let i = 0; i < colCount; i++) {
|
|
199
|
+
const td = document.createElement('td');
|
|
200
|
+
td.style.border = '1px solid #ccc';
|
|
201
|
+
td.style.padding = '8px';
|
|
202
|
+
td.textContent = '\u00A0';
|
|
203
|
+
newRow.appendChild(td);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
node.appendChild(newRow);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
setFormatBlock(useUI, tag) {
|
|
212
|
+
this.execCommand('formatBlock', `<${tag}>`);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
setInsertQuote() {
|
|
216
|
+
this.execCommand('formatBlock', '<blockquote>');
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
insertEmoji(emoji) {
|
|
220
|
+
this.execCommand('insertText', emoji);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
setAlignment(align) {
|
|
224
|
+
this.execCommand(`justify${align.charAt(0).toUpperCase() + align.slice(1)}`);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
type RTEContextProps = {
|
|
229
|
+
content: string;
|
|
230
|
+
setContent: (content: string) => void;
|
|
231
|
+
contentType: string;
|
|
232
|
+
setContentType: (type: string) => void;
|
|
233
|
+
h1Active: boolean;
|
|
234
|
+
setH1Active: (active: boolean) => void;
|
|
235
|
+
h2Active: boolean;
|
|
236
|
+
setH2Active: (active: boolean) => void;
|
|
237
|
+
h3Active: boolean;
|
|
238
|
+
setH3Active: (active: boolean) => void;
|
|
239
|
+
h4Active: boolean;
|
|
240
|
+
setH4Active: (active: boolean) => void;
|
|
241
|
+
h5Active: boolean;
|
|
242
|
+
setH5Active: (active: boolean) => void;
|
|
243
|
+
rte: React.RefObject<HTMLDivElement>;
|
|
244
|
+
isDirty: boolean;
|
|
245
|
+
setIsDirty: (dirty: boolean) => void;
|
|
246
|
+
isSaving: boolean;
|
|
247
|
+
lastSaved: Date | null;
|
|
248
|
+
handleManualSave: () => void;
|
|
249
|
+
plugins: Plugin[];
|
|
250
|
+
registerPlugin: (plugin: Plugin) => void;
|
|
251
|
+
unregisterPlugin: (pluginName: string) => void;
|
|
252
|
+
getPlugin: (pluginName: string) => Plugin | undefined;
|
|
253
|
+
saveToHistory: () => void;
|
|
254
|
+
handleKeyDown: (e: React.KeyboardEvent) => void;
|
|
255
|
+
commandsRef: React.RefObject<EditorCommands | null>;
|
|
256
|
+
historyRef: React.RefObject<History>;
|
|
257
|
+
handleTextSelection: () => void;
|
|
258
|
+
hideFloatingMenu: () => void;
|
|
259
|
+
floatingMenuPosition: { x: number; y: number } | null;
|
|
260
|
+
selectedText: string;
|
|
261
|
+
hideAnimatedBG: any;
|
|
262
|
+
defaultDock: any;
|
|
263
|
+
insertInlineCodeActive: any;
|
|
264
|
+
font: any;
|
|
265
|
+
setFont: any;
|
|
266
|
+
fontSize: any;
|
|
267
|
+
lineHeightValue: any;
|
|
268
|
+
setCpValue: any;
|
|
269
|
+
cpValue: any;
|
|
270
|
+
// Commands
|
|
271
|
+
saveSelection: () => Range | null;
|
|
272
|
+
restoreSelection: (range: Range | null) => void;
|
|
273
|
+
getSelectedText: () => string;
|
|
274
|
+
undo: () => void;
|
|
275
|
+
redo: () => void;
|
|
276
|
+
canUndo: () => boolean;
|
|
277
|
+
canRedo: () => boolean;
|
|
278
|
+
h1: () => void;
|
|
279
|
+
h2: () => void;
|
|
280
|
+
h3: () => void;
|
|
281
|
+
h4: () => void;
|
|
282
|
+
h5: () => void;
|
|
283
|
+
orderedList: () => void;
|
|
284
|
+
unorderedList: () => void;
|
|
285
|
+
taskList: () => void;
|
|
286
|
+
bold: () => void;
|
|
287
|
+
italic: () => void;
|
|
288
|
+
underline: () => void;
|
|
289
|
+
insertTable: () => void;
|
|
290
|
+
insertColumn: () => void;
|
|
291
|
+
insertRow: () => void;
|
|
292
|
+
insertCodeBlock: () => void;
|
|
293
|
+
insertQuote: () => void;
|
|
294
|
+
insertInlineCode: () => void;
|
|
295
|
+
insertEmoji: () => void;
|
|
296
|
+
convertToEmoji: () => void;
|
|
297
|
+
insertHorizontalRule: () => void;
|
|
298
|
+
insertImage: () => void;
|
|
299
|
+
mention: () => void;
|
|
300
|
+
paragraph: () => void;
|
|
301
|
+
alignLeft: () => void;
|
|
302
|
+
alignRight: () => void;
|
|
303
|
+
alignCenter: () => void;
|
|
304
|
+
justifyLeft: () => void;
|
|
305
|
+
justifyCenter: () => void;
|
|
306
|
+
justifyRight: () => void;
|
|
307
|
+
highlight: () => void;
|
|
308
|
+
highlightColor: (color: string) => void;
|
|
309
|
+
link: () => void;
|
|
310
|
+
setLink: (url: string) => void;
|
|
311
|
+
strike: () => void;
|
|
312
|
+
subscript: () => void;
|
|
313
|
+
superscript: () => void;
|
|
314
|
+
characterCount: () => number;
|
|
315
|
+
insertComment: () => void;
|
|
316
|
+
setFontFamily: (font: string) => void;
|
|
317
|
+
setFontSize: (size: string) => void;
|
|
318
|
+
setLineHeight: (height: string) => void;
|
|
319
|
+
typography: () => void;
|
|
320
|
+
exportHTML: () => string;
|
|
321
|
+
exportMD: () => string;
|
|
322
|
+
exportText: () => string;
|
|
323
|
+
exportJSON: () => string;
|
|
324
|
+
insertContent: (content: string) => void;
|
|
325
|
+
insertContentAt: (pos: number, content: string) => void;
|
|
326
|
+
clearContent: () => void;
|
|
327
|
+
cut: () => void;
|
|
328
|
+
copy: () => void;
|
|
329
|
+
keyboardShortcut: (key: string, callback: () => void) => void;
|
|
330
|
+
selectAll: () => void;
|
|
331
|
+
convertMD: () => void;
|
|
332
|
+
highlightCSS: () => void;
|
|
333
|
+
highlightJS: () => void;
|
|
334
|
+
highlightTS: () => void;
|
|
335
|
+
highlightHTML: () => void;
|
|
336
|
+
insertColorSwatch: () => void;
|
|
337
|
+
floatingMenu: () => void;
|
|
338
|
+
convertInsertContentToCurrentType: () => void;
|
|
339
|
+
};
|
|
340
|
+
|
|
341
|
+
type PluginContext = {
|
|
342
|
+
rte: React.RefObject<HTMLDivElement>;
|
|
343
|
+
content: string;
|
|
344
|
+
setContent: (content: string) => void;
|
|
345
|
+
commands: EditorCommands | null;
|
|
346
|
+
history: History;
|
|
347
|
+
};
|
|
348
|
+
|
|
349
|
+
type Plugin = {
|
|
350
|
+
name: string;
|
|
351
|
+
init: (context: PluginContext) => void;
|
|
352
|
+
destroy?: () => void;
|
|
353
|
+
toolbar?: () => React.ReactNode;
|
|
354
|
+
keybindings?: Record<string, () => void>;
|
|
355
|
+
};
|
|
356
|
+
|
|
357
|
+
const RTEContext = createContext<RTEContextProps | null>(null);
|
|
358
|
+
|
|
359
|
+
function useRTE() {
|
|
360
|
+
const context = useContext(RTEContext);
|
|
361
|
+
if (!context) throw new Error("useRTE must be used within RTEProvider");
|
|
362
|
+
return context;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
export default function CatalystRTE({ options, ...props }) {
|
|
366
|
+
return (
|
|
367
|
+
<RTEProvider options={options} {...props} />
|
|
368
|
+
)
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
const RTEProvider = React.forwardRef<
|
|
372
|
+
HTMLDivElement,
|
|
373
|
+
React.ComponentProps<"div"> & {}
|
|
374
|
+
>(({ options, ...props }, ref) => {
|
|
375
|
+
const rte = useRef(null)
|
|
376
|
+
const [activeFormats, setActiveFormats] = useState(new Set());
|
|
377
|
+
const [contentType, setContentType] = useState('JSON') // html, JSON, md, text
|
|
378
|
+
const [isSaving, setIsSaving] = useState(false)
|
|
379
|
+
const [lastSaved, setLastSaved] = useState(null)
|
|
380
|
+
const [content, setContent] = useState<string>('');
|
|
381
|
+
const [isDirty, setIsDirty] = useState(false);
|
|
382
|
+
const [h1Active, setH1Active] = useState(false)
|
|
383
|
+
const [h2Active, setH2Active] = useState(false)
|
|
384
|
+
const [h3Active, setH3Active] = useState(false)
|
|
385
|
+
const [h4Active, setH4Active] = useState(false)
|
|
386
|
+
const [h5Active, setH5Active] = useState(false)
|
|
387
|
+
const [cpValue, setCpValue] = useState(false)
|
|
388
|
+
const [lineHeightValue, setLineHeightValue] = useState(false)
|
|
389
|
+
const [strikeActive, setStrikeActive] = useState(false)
|
|
390
|
+
const [subscriptActive, setSubscriptActive] = useState(false)
|
|
391
|
+
const [superscriptActive, setSuperscriptActive] = useState(false)
|
|
392
|
+
const [insertInlineCodeActive, setInsertInlineCodeActive] = useState(false)
|
|
393
|
+
const [alignLeftActive, setAlignLeftActive] = useState(false)
|
|
394
|
+
const [alignCenterActive, setAlignCenterActive] = useState(false)
|
|
395
|
+
const [alignRightActive, setAlignRightActive] = useState(false)
|
|
396
|
+
const [boldActive, setBoldActive] = useState(false)
|
|
397
|
+
const [italicActive, setItalicActive] = useState(false)
|
|
398
|
+
const [underlineActive, setUnderlineActive] = useState(false)
|
|
399
|
+
const [font, setFont] = useState(false)
|
|
400
|
+
const [fontSize, setFontSizeValue] = useState(false)
|
|
401
|
+
const [defaultToolbar, setDefaultToolbar] = useState(false)
|
|
402
|
+
const [defaultFooter, setDefaultFooter] = useState(false)
|
|
403
|
+
const [defaultFloatingMenu, setDefaultFloatingMenu] = useState(false)
|
|
404
|
+
const [defaultDock, setDefaultDock] = useState(false)
|
|
405
|
+
const [hideEditorTitle, setHideEditorTitle] = useState(false)
|
|
406
|
+
const [theme, setTheme] = useState('dark')
|
|
407
|
+
const [hideAnimatedBG, setHideAnimatedBG] = useState(true)
|
|
408
|
+
const [plugins, setPlugins] = useState<Plugin[]>([]);
|
|
409
|
+
const pluginContextRef = useRef<PluginContext | null>(null);
|
|
410
|
+
const commandsRef = useRef<EditorCommands | null>(null);
|
|
411
|
+
const historyRef = useRef(new History());
|
|
412
|
+
const [canUndoState, setCanUndoState] = useState(false);
|
|
413
|
+
const [canRedoState, setCanRedoState] = useState(false);
|
|
414
|
+
const [floatingMenuPosition, setFloatingMenuPosition] = useState<{ x: number; y: number } | null>(null);
|
|
415
|
+
const [selectedText, setSelectedText] = useState('');
|
|
416
|
+
const lastContentRef = useRef("");
|
|
417
|
+
const saveTimeoutRef = useRef(null);
|
|
418
|
+
|
|
419
|
+
useEffect(() => {
|
|
420
|
+
if (rte.current && !commandsRef.current) {
|
|
421
|
+
commandsRef.current = new EditorCommands(rte);
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
const loadContent = async () => {
|
|
425
|
+
try {
|
|
426
|
+
const result = await window.storage.get(RTE_LOCAL_STORAGE_KEY);
|
|
427
|
+
if (result?.value) {
|
|
428
|
+
setContent(result.value);
|
|
429
|
+
if (rte.current) {
|
|
430
|
+
rte.current.innerHTML = result.value;
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
} catch (error) {
|
|
434
|
+
console.log('No saved content found');
|
|
435
|
+
}
|
|
436
|
+
};
|
|
437
|
+
|
|
438
|
+
loadContent();
|
|
439
|
+
}, []);
|
|
440
|
+
|
|
441
|
+
useEffect(() => {
|
|
442
|
+
pluginContextRef.current = {
|
|
443
|
+
rte,
|
|
444
|
+
content,
|
|
445
|
+
setContent,
|
|
446
|
+
commands: null, // Will be set in RTE component
|
|
447
|
+
history: new History()
|
|
448
|
+
};
|
|
449
|
+
}, [content]);
|
|
450
|
+
|
|
451
|
+
useEffect(() => {
|
|
452
|
+
if (isDirty && content) {
|
|
453
|
+
clearTimeout(saveTimeoutRef.current);
|
|
454
|
+
saveTimeoutRef.current = setTimeout(async () => {
|
|
455
|
+
setIsSaving(true);
|
|
456
|
+
try {
|
|
457
|
+
await window.storage.set(RTE_LOCAL_STORAGE_KEY, content);
|
|
458
|
+
setLastSaved(new Date());
|
|
459
|
+
setIsDirty(false);
|
|
460
|
+
} catch (error) {
|
|
461
|
+
console.error("Save failed:", error);
|
|
462
|
+
} finally {
|
|
463
|
+
setIsSaving(false);
|
|
464
|
+
}
|
|
465
|
+
}, 2000);
|
|
466
|
+
}
|
|
467
|
+
return () => clearTimeout(saveTimeoutRef.current);
|
|
468
|
+
}, [content, isDirty]);
|
|
469
|
+
|
|
470
|
+
const autoSave = useCallback(
|
|
471
|
+
async (contentToSave: string) => {
|
|
472
|
+
setIsSaving(true);
|
|
473
|
+
try {
|
|
474
|
+
await window.storage.set(RTE_LOCAL_STORAGE_KEY, contentToSave);
|
|
475
|
+
setLastSaved(new Date());
|
|
476
|
+
} catch (error) {
|
|
477
|
+
console.error("Save failed:", error);
|
|
478
|
+
} finally {
|
|
479
|
+
setIsSaving(false);
|
|
480
|
+
}
|
|
481
|
+
},
|
|
482
|
+
[]
|
|
483
|
+
);
|
|
484
|
+
|
|
485
|
+
const handleManualSave = useCallback(() => {
|
|
486
|
+
if (isDirty && content) {
|
|
487
|
+
clearTimeout(saveTimeoutRef.current);
|
|
488
|
+
autoSave(content);
|
|
489
|
+
setIsDirty(false);
|
|
490
|
+
}
|
|
491
|
+
}, [isDirty, content, autoSave]);
|
|
492
|
+
|
|
493
|
+
const saveToHistory = useCallback(() => {
|
|
494
|
+
if (rte.current) {
|
|
495
|
+
const currentContent = rte.current.innerHTML;
|
|
496
|
+
if (currentContent !== lastContentRef.current) {
|
|
497
|
+
historyRef.current.push(currentContent);
|
|
498
|
+
lastContentRef.current = currentContent;
|
|
499
|
+
setCanUndoState(historyRef.current.canUndo());
|
|
500
|
+
setCanRedoState(historyRef.current.canRedo());
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
}, []);
|
|
504
|
+
|
|
505
|
+
const updateActiveFormats = useCallback(() => {
|
|
506
|
+
const formats = new Set();
|
|
507
|
+
const sel = window.getSelection();
|
|
508
|
+
|
|
509
|
+
if (!sel || sel.rangeCount === 0) return;
|
|
510
|
+
|
|
511
|
+
let node = sel.anchorNode;
|
|
512
|
+
while (node && node !== rte.current) {
|
|
513
|
+
if (node.nodeType === 1) {
|
|
514
|
+
const tag = (node as Element).tagName?.toLowerCase();
|
|
515
|
+
if (tag === 'strong' || tag === 'b') {
|
|
516
|
+
formats.add('bold');
|
|
517
|
+
setBoldActive(true);
|
|
518
|
+
}
|
|
519
|
+
if (tag === 'em' || tag === 'i') {
|
|
520
|
+
formats.add('italic');
|
|
521
|
+
setItalicActive(true);
|
|
522
|
+
}
|
|
523
|
+
if (tag === 'u') {
|
|
524
|
+
formats.add('underline');
|
|
525
|
+
setUnderlineActive(true);
|
|
526
|
+
}
|
|
527
|
+
if (tag === 'h1') {
|
|
528
|
+
formats.add('h1');
|
|
529
|
+
setH1Active(true);
|
|
530
|
+
}
|
|
531
|
+
if (tag === 'h2') {
|
|
532
|
+
formats.add('h2');
|
|
533
|
+
setH2Active(true);
|
|
534
|
+
}
|
|
535
|
+
if (tag === 'h3') {
|
|
536
|
+
formats.add('h3');
|
|
537
|
+
setH3Active(true);
|
|
538
|
+
}
|
|
539
|
+
if (tag === 'h4') {
|
|
540
|
+
formats.add('h4');
|
|
541
|
+
setH4Active(true);
|
|
542
|
+
}
|
|
543
|
+
if (tag === 'h5') {
|
|
544
|
+
formats.add('h5');
|
|
545
|
+
setH5Active(true);
|
|
546
|
+
}
|
|
547
|
+
if (tag === 'code') {
|
|
548
|
+
formats.add('code');
|
|
549
|
+
setInsertInlineCodeActive(true);
|
|
550
|
+
}
|
|
551
|
+
if (tag === 'strike' || tag === 's') {
|
|
552
|
+
formats.add('strike');
|
|
553
|
+
setStrikeActive(true);
|
|
554
|
+
}
|
|
555
|
+
if (tag === 'sub') {
|
|
556
|
+
formats.add('subscript');
|
|
557
|
+
setSubscriptActive(true);
|
|
558
|
+
}
|
|
559
|
+
if (tag === 'sup') {
|
|
560
|
+
formats.add('superscript');
|
|
561
|
+
setSuperscriptActive(true);
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
node = node.parentNode;
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
// Reset states that aren't active
|
|
568
|
+
if (!formats.has('bold')) setBoldActive(false);
|
|
569
|
+
if (!formats.has('italic')) setItalicActive(false);
|
|
570
|
+
if (!formats.has('underline')) setUnderlineActive(false);
|
|
571
|
+
if (!formats.has('h1')) setH1Active(false);
|
|
572
|
+
if (!formats.has('h2')) setH2Active(false);
|
|
573
|
+
if (!formats.has('h3')) setH3Active(false);
|
|
574
|
+
if (!formats.has('h4')) setH4Active(false);
|
|
575
|
+
if (!formats.has('h5')) setH5Active(false);
|
|
576
|
+
if (!formats.has('code')) setInsertInlineCodeActive(false);
|
|
577
|
+
if (!formats.has('strike')) setStrikeActive(false);
|
|
578
|
+
if (!formats.has('subscript')) setSubscriptActive(false);
|
|
579
|
+
if (!formats.has('superscript')) setSuperscriptActive(false);
|
|
580
|
+
|
|
581
|
+
setActiveFormats(formats);
|
|
582
|
+
}, [rte]);
|
|
583
|
+
|
|
584
|
+
const handleTextSelection = useCallback(() => {
|
|
585
|
+
const selection = window.getSelection();
|
|
586
|
+
if (!selection || selection.isCollapsed || !selection.rangeCount) {
|
|
587
|
+
setFloatingMenuPosition(null);
|
|
588
|
+
setSelectedText('');
|
|
589
|
+
return;
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
const text = selection.toString().trim();
|
|
593
|
+
if (!text) {
|
|
594
|
+
setFloatingMenuPosition(null);
|
|
595
|
+
setSelectedText('');
|
|
596
|
+
return;
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
setSelectedText(text);
|
|
600
|
+
|
|
601
|
+
// Get the bounding rectangle of the selection
|
|
602
|
+
const range = selection.getRangeAt(0);
|
|
603
|
+
const rect = range.getBoundingClientRect();
|
|
604
|
+
|
|
605
|
+
// Position the menu above the selection
|
|
606
|
+
setFloatingMenuPosition({
|
|
607
|
+
x: rect.left + rect.width / 2,
|
|
608
|
+
y: rect.top + window.scrollY
|
|
609
|
+
});
|
|
610
|
+
}, []);
|
|
611
|
+
|
|
612
|
+
const hideFloatingMenu = useCallback(() => {
|
|
613
|
+
setFloatingMenuPosition(null);
|
|
614
|
+
setSelectedText('');
|
|
615
|
+
}, []);
|
|
616
|
+
|
|
617
|
+
/**
|
|
618
|
+
* so what do i mean by creating it simple and engineer it with the same methodology as shadcn?
|
|
619
|
+
*
|
|
620
|
+
* BAD EXAMPLE
|
|
621
|
+
* <button
|
|
622
|
+
onClick={() => editor.chain().focus().toggleHeading({ level: 1 }).run()}
|
|
623
|
+
className={editor.isActive('heading', { level: 1 }) ? 'is-active' : ''}
|
|
624
|
+
>
|
|
625
|
+
H1
|
|
626
|
+
</button>
|
|
627
|
+
|
|
628
|
+
GOOD EXAMPLE
|
|
629
|
+
<button onClick={() => h1} className={h1Active ? '' : ''}>
|
|
630
|
+
H1
|
|
631
|
+
</button>
|
|
632
|
+
*/
|
|
633
|
+
// Selection Management
|
|
634
|
+
function saveSelection() {
|
|
635
|
+
const sel = window.getSelection();
|
|
636
|
+
if (sel && sel.rangeCount > 0) {
|
|
637
|
+
return sel.getRangeAt(0);
|
|
638
|
+
}
|
|
639
|
+
return null;
|
|
640
|
+
}
|
|
641
|
+
function restoreSelection(range: Range | null) {
|
|
642
|
+
if (range) {
|
|
643
|
+
const sel = window.getSelection();
|
|
644
|
+
sel?.removeAllRanges();
|
|
645
|
+
sel?.addRange(range);
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
function getSelectedText() {
|
|
649
|
+
return window.getSelection()?.toString() || "";
|
|
650
|
+
}
|
|
651
|
+
const undo = () => {
|
|
652
|
+
const prevState = historyRef.current.undo();
|
|
653
|
+
if (prevState && rte.current) {
|
|
654
|
+
rte.current.innerHTML = prevState;
|
|
655
|
+
setContent(prevState);
|
|
656
|
+
lastContentRef.current = prevState;
|
|
657
|
+
setCanUndoState(historyRef.current.canUndo());
|
|
658
|
+
setCanRedoState(historyRef.current.canRedo());
|
|
659
|
+
}
|
|
660
|
+
};
|
|
661
|
+
const redo = () => {
|
|
662
|
+
const nextState = historyRef.current.redo();
|
|
663
|
+
if (nextState && rte.current) {
|
|
664
|
+
rte.current.innerHTML = nextState;
|
|
665
|
+
setContent(nextState);
|
|
666
|
+
lastContentRef.current = nextState;
|
|
667
|
+
setCanUndoState(historyRef.current.canUndo());
|
|
668
|
+
setCanRedoState(historyRef.current.canRedo());
|
|
669
|
+
}
|
|
670
|
+
};
|
|
671
|
+
const strikethrough = () => {
|
|
672
|
+
document.execCommand('strikethrough');
|
|
673
|
+
updateActiveFormats();
|
|
674
|
+
saveToHistory();
|
|
675
|
+
};
|
|
676
|
+
function canUndo() {
|
|
677
|
+
return canUndoState;
|
|
678
|
+
}
|
|
679
|
+
function canRedo() {
|
|
680
|
+
return canRedoState;
|
|
681
|
+
}
|
|
682
|
+
function h1() {
|
|
683
|
+
commandsRef.current?.insertBlock('h1');
|
|
684
|
+
setH1Active((prev) => !prev);
|
|
685
|
+
saveToHistory();
|
|
686
|
+
}
|
|
687
|
+
function h2() {
|
|
688
|
+
commandsRef.current?.insertBlock('h2');
|
|
689
|
+
setH2Active((prev) => !prev);
|
|
690
|
+
saveToHistory();
|
|
691
|
+
}
|
|
692
|
+
function h3() {
|
|
693
|
+
commandsRef.current?.insertBlock('h3');
|
|
694
|
+
saveToHistory();
|
|
695
|
+
setH3Active((prev) => !prev);
|
|
696
|
+
}
|
|
697
|
+
function h4() {
|
|
698
|
+
commandsRef.current?.insertBlock('h4');
|
|
699
|
+
setH4Active((prev) => !prev);
|
|
700
|
+
saveToHistory();
|
|
701
|
+
}
|
|
702
|
+
function h5() {
|
|
703
|
+
commandsRef.current?.insertBlock('h5');
|
|
704
|
+
setH5Active((prev) => !prev);
|
|
705
|
+
saveToHistory();
|
|
706
|
+
}
|
|
707
|
+
function orderedList() {
|
|
708
|
+
commandsRef.current?.insertOrderedList();
|
|
709
|
+
saveToHistory();
|
|
710
|
+
}
|
|
711
|
+
function unorderedList() {
|
|
712
|
+
commandsRef.current?.insertUnorderedList();
|
|
713
|
+
saveToHistory();
|
|
714
|
+
}
|
|
715
|
+
function taskList() {
|
|
716
|
+
commandsRef.current?.insertTaskList();
|
|
717
|
+
saveToHistory();
|
|
718
|
+
}
|
|
719
|
+
const bold = () => {
|
|
720
|
+
document.execCommand('bold');
|
|
721
|
+
setBoldActive((prev) => !prev)
|
|
722
|
+
updateActiveFormats();
|
|
723
|
+
saveToHistory();
|
|
724
|
+
};
|
|
725
|
+
const italic = () => {
|
|
726
|
+
document.execCommand('italic');
|
|
727
|
+
setItalicActive((prev) => !prev)
|
|
728
|
+
updateActiveFormats();
|
|
729
|
+
saveToHistory();
|
|
730
|
+
};
|
|
731
|
+
const underline = () => {
|
|
732
|
+
document.execCommand('underline');
|
|
733
|
+
setUnderlineActive((prev) => !prev)
|
|
734
|
+
updateActiveFormats();
|
|
735
|
+
saveToHistory();
|
|
736
|
+
};
|
|
737
|
+
function strike() {
|
|
738
|
+
commandsRef.current?.insertStrike();
|
|
739
|
+
updateActiveFormats();
|
|
740
|
+
saveToHistory();
|
|
741
|
+
}
|
|
742
|
+
function subscript() {
|
|
743
|
+
commandsRef.current?.insertSubscript();
|
|
744
|
+
updateActiveFormats();
|
|
745
|
+
saveToHistory();
|
|
746
|
+
}
|
|
747
|
+
function superscript() {
|
|
748
|
+
commandsRef.current?.insertSuperscript();
|
|
749
|
+
updateActiveFormats();
|
|
750
|
+
saveToHistory();
|
|
751
|
+
}
|
|
752
|
+
function alignLeft() {
|
|
753
|
+
commandsRef.current?.setAlignment('left');
|
|
754
|
+
setAlignLeftActive((prev) => !prev)
|
|
755
|
+
saveToHistory();
|
|
756
|
+
}
|
|
757
|
+
function alignRight() {
|
|
758
|
+
commandsRef.current?.setAlignment('right');
|
|
759
|
+
setAlignRightActive((prev) => !prev)
|
|
760
|
+
saveToHistory();
|
|
761
|
+
}
|
|
762
|
+
function alignCenter() {
|
|
763
|
+
commandsRef.current?.setAlignment('center');
|
|
764
|
+
setAlignCenterActive((prev) => !prev)
|
|
765
|
+
saveToHistory();
|
|
766
|
+
}
|
|
767
|
+
function justifyLeft() {
|
|
768
|
+
alignLeft();
|
|
769
|
+
}
|
|
770
|
+
function justifyCenter() {
|
|
771
|
+
alignCenter();
|
|
772
|
+
}
|
|
773
|
+
function justifyRight() {
|
|
774
|
+
alignRight();
|
|
775
|
+
}
|
|
776
|
+
function insertTable() {
|
|
777
|
+
commandsRef.current?.setInsertTable('2x2');
|
|
778
|
+
saveToHistory();
|
|
779
|
+
}
|
|
780
|
+
function insertColumn() {
|
|
781
|
+
commandsRef.current?.setInsertColumn();
|
|
782
|
+
saveToHistory();
|
|
783
|
+
}
|
|
784
|
+
function insertRow() {
|
|
785
|
+
commandsRef.current?.setInsertRow();
|
|
786
|
+
saveToHistory();
|
|
787
|
+
}
|
|
788
|
+
function insertCodeBlock() {
|
|
789
|
+
commandsRef.current?.setFormatBlock(false, 'pre');
|
|
790
|
+
saveToHistory();
|
|
791
|
+
}
|
|
792
|
+
function insertQuote() {
|
|
793
|
+
commandsRef.current?.setInsertQuote();
|
|
794
|
+
saveToHistory();
|
|
795
|
+
}
|
|
796
|
+
function insertInlineCode() {
|
|
797
|
+
commandsRef.current?.wrapSelection('code');
|
|
798
|
+
saveToHistory();
|
|
799
|
+
}
|
|
800
|
+
function insertHorizontalRule() {
|
|
801
|
+
document.execCommand('insertHorizontalRule', false);
|
|
802
|
+
}
|
|
803
|
+
function paragraph() {
|
|
804
|
+
document.execCommand('formatBlock', false, 'p');
|
|
805
|
+
}
|
|
806
|
+
function link() {
|
|
807
|
+
const url = prompt('Enter URL:');
|
|
808
|
+
if (url) {
|
|
809
|
+
commandsRef.current?.wrapSelection('a', { href: url, target: '_blank' });
|
|
810
|
+
saveToHistory();
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
function setLink(url: string) {
|
|
814
|
+
document.execCommand('createLink', false, url);
|
|
815
|
+
}
|
|
816
|
+
const insertImage = () => {
|
|
817
|
+
const url = prompt('Enter image URL:');
|
|
818
|
+
if (url) {
|
|
819
|
+
document.execCommand('insertImage', false, url);
|
|
820
|
+
saveToHistory();
|
|
821
|
+
}
|
|
822
|
+
};
|
|
823
|
+
function insertEmoji() {
|
|
824
|
+
const emoji = prompt('Enter emoji:');
|
|
825
|
+
if (emoji) {
|
|
826
|
+
commandsRef.current?.insertEmoji(emoji);
|
|
827
|
+
saveToHistory();
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
function convertToEmoji() {
|
|
831
|
+
// Auto-convert :) to emoji on space
|
|
832
|
+
console.log('Emoji conversion not yet implemented');
|
|
833
|
+
}
|
|
834
|
+
const highlight = () => {
|
|
835
|
+
document.execCommand('hiliteColor', false, 'yellow');
|
|
836
|
+
saveToHistory();
|
|
837
|
+
};
|
|
838
|
+
function setHighlight() {
|
|
839
|
+
document.execCommand('hiliteColor', false, 'yellow');
|
|
840
|
+
}
|
|
841
|
+
function highlightColor(color: string) {
|
|
842
|
+
document.execCommand('hiliteColor', false, color);
|
|
843
|
+
}
|
|
844
|
+
function setFontFamily(font: string) {
|
|
845
|
+
document.execCommand('fontName', false, font);
|
|
846
|
+
}
|
|
847
|
+
function setFontSize(size: string) {
|
|
848
|
+
document.execCommand('fontSize', false, size);
|
|
849
|
+
setFontSizeValue(size)
|
|
850
|
+
}
|
|
851
|
+
function setLineHeight(height: string) {
|
|
852
|
+
if (rte.current) {
|
|
853
|
+
const sel = window.getSelection();
|
|
854
|
+
if (sel && sel.rangeCount > 0) {
|
|
855
|
+
const node = sel.getRangeAt(0).commonAncestorContainer.parentElement;
|
|
856
|
+
if (node) node.style.lineHeight = height;
|
|
857
|
+
}
|
|
858
|
+
}
|
|
859
|
+
setLineHeightValue(height)
|
|
860
|
+
}
|
|
861
|
+
function insertContent(htmlContent: string) {
|
|
862
|
+
document.execCommand('insertHTML', false, htmlContent);
|
|
863
|
+
}
|
|
864
|
+
const insertCode = () => {
|
|
865
|
+
commandsRef.current?.wrapSelection('code');
|
|
866
|
+
saveToHistory();
|
|
867
|
+
};
|
|
868
|
+
const quote = () => {
|
|
869
|
+
document.execCommand('formatBlock', false, 'blockquote');
|
|
870
|
+
saveToHistory();
|
|
871
|
+
};
|
|
872
|
+
function insertContentAt(pos: number, htmlContent: string) {
|
|
873
|
+
if (rte.current) {
|
|
874
|
+
const textContent = rte.current.textContent || '';
|
|
875
|
+
const before = textContent.slice(0, pos);
|
|
876
|
+
const after = textContent.slice(pos);
|
|
877
|
+
rte.current.innerHTML = before + htmlContent + after;
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
const clearContent = () => {
|
|
881
|
+
if (rte.current) {
|
|
882
|
+
rte.current.innerHTML = '';
|
|
883
|
+
setContent('');
|
|
884
|
+
saveToHistory();
|
|
885
|
+
}
|
|
886
|
+
};
|
|
887
|
+
function cut() {
|
|
888
|
+
document.execCommand('cut');
|
|
889
|
+
}
|
|
890
|
+
function copy() {
|
|
891
|
+
document.execCommand('copy');
|
|
892
|
+
}
|
|
893
|
+
function selectAll() {
|
|
894
|
+
document.execCommand('selectAll');
|
|
895
|
+
}
|
|
896
|
+
const exportHTML = () => rte.current?.innerHTML || '';
|
|
897
|
+
function exportMD() {
|
|
898
|
+
// Convert HTML to Markdown
|
|
899
|
+
console.log('Markdown export not yet implemented');
|
|
900
|
+
return '';
|
|
901
|
+
}
|
|
902
|
+
const exportText = () => rte.current?.textContent || '';
|
|
903
|
+
const characterCount = () => rte.current?.textContent?.length || 0;
|
|
904
|
+
const wordCount = () => rte.current?.textContent?.trim().split(/\s+/).filter(Boolean).length || 0;
|
|
905
|
+
function exportJSON() {
|
|
906
|
+
return JSON.stringify({ content: rte.current?.innerHTML || '' });
|
|
907
|
+
}
|
|
908
|
+
function insertComment() {
|
|
909
|
+
console.log('Comments not yet implemented');
|
|
910
|
+
}
|
|
911
|
+
function mention() {
|
|
912
|
+
console.log('Mentions not yet implemented');
|
|
913
|
+
}
|
|
914
|
+
function typography() {
|
|
915
|
+
console.log('Typography settings not yet implemented');
|
|
916
|
+
}
|
|
917
|
+
function keyboardShortcut(key: string, callback: () => void) {
|
|
918
|
+
console.log('Custom keyboard shortcuts not yet implemented');
|
|
919
|
+
}
|
|
920
|
+
// if user sets renderMD to true, then after each each md type is typed out it converts it to the equivelant to be displayed as such for example when ever the user press space after entering ### it will turn it into an h3
|
|
921
|
+
function convertMD() {
|
|
922
|
+
if (!rte.current) return;
|
|
923
|
+
|
|
924
|
+
const content = rte.current.innerHTML;
|
|
925
|
+
|
|
926
|
+
// Headers
|
|
927
|
+
let markdown = content
|
|
928
|
+
.replace(/<h1[^>]*>(.*?)<\/h1>/gi, '# $1\n\n')
|
|
929
|
+
.replace(/<h2[^>]*>(.*?)<\/h2>/gi, '## $1\n\n')
|
|
930
|
+
.replace(/<h3[^>]*>(.*?)<\/h3>/gi, '### $1\n\n')
|
|
931
|
+
.replace(/<h4[^>]*>(.*?)<\/h4>/gi, '#### $1\n\n')
|
|
932
|
+
.replace(/<h5[^>]*>(.*?)<\/h5>/gi, '##### $1\n\n')
|
|
933
|
+
.replace(/<h6[^>]*>(.*?)<\/h6>/gi, '###### $1\n\n');
|
|
934
|
+
|
|
935
|
+
// Bold and Italic
|
|
936
|
+
markdown = markdown
|
|
937
|
+
.replace(/<strong[^>]*>(.*?)<\/strong>/gi, '**$1**')
|
|
938
|
+
.replace(/<b[^>]*>(.*?)<\/b>/gi, '**$1**')
|
|
939
|
+
.replace(/<em[^>]*>(.*?)<\/em>/gi, '*$1*')
|
|
940
|
+
.replace(/<i[^>]*>(.*?)<\/i>/gi, '*$1*');
|
|
941
|
+
|
|
942
|
+
// Links
|
|
943
|
+
markdown = markdown
|
|
944
|
+
.replace(/<a[^>]*href="([^"]*)"[^>]*>(.*?)<\/a>/gi, '[$2]($1)');
|
|
945
|
+
|
|
946
|
+
// Images
|
|
947
|
+
markdown = markdown
|
|
948
|
+
.replace(/<img[^>]*src="([^"]*)"[^>]*alt="([^"]*)"[^>]*>/gi, '')
|
|
949
|
+
.replace(/<img[^>]*src="([^"]*)"[^>]*>/gi, '');
|
|
950
|
+
|
|
951
|
+
// Code
|
|
952
|
+
markdown = markdown
|
|
953
|
+
.replace(/<code[^>]*>(.*?)<\/code>/gi, '`$1`')
|
|
954
|
+
.replace(/<pre[^>]*><code[^>]*>(.*?)<\/code><\/pre>/gi, '```\n$1\n```')
|
|
955
|
+
.replace(/<pre[^>]*>(.*?)<\/pre>/gi, '```\n$1\n```');
|
|
956
|
+
|
|
957
|
+
// Lists
|
|
958
|
+
markdown = markdown
|
|
959
|
+
.replace(/<ul[^>]*>(.*?)<\/ul>/gis, (match, content) => {
|
|
960
|
+
return content.replace(/<li[^>]*>(.*?)<\/li>/gi, '- $1\n');
|
|
961
|
+
})
|
|
962
|
+
.replace(/<ol[^>]*>(.*?)<\/ol>/gis, (match, content) => {
|
|
963
|
+
let index = 1;
|
|
964
|
+
return content.replace(/<li[^>]*>(.*?)<\/li>/gi, () => `${index++}. $1\n`);
|
|
965
|
+
});
|
|
966
|
+
|
|
967
|
+
// Blockquotes
|
|
968
|
+
markdown = markdown
|
|
969
|
+
.replace(/<blockquote[^>]*>(.*?)<\/blockquote>/gi, '> $1\n');
|
|
970
|
+
|
|
971
|
+
// Horizontal rules
|
|
972
|
+
markdown = markdown
|
|
973
|
+
.replace(/<hr[^>]*>/gi, '\n---\n');
|
|
974
|
+
|
|
975
|
+
// Paragraphs
|
|
976
|
+
markdown = markdown
|
|
977
|
+
.replace(/<p[^>]*>(.*?)<\/p>/gi, '$1\n\n');
|
|
978
|
+
|
|
979
|
+
// Line breaks
|
|
980
|
+
markdown = markdown
|
|
981
|
+
.replace(/<br[^>]*>/gi, '\n');
|
|
982
|
+
|
|
983
|
+
// Remove remaining HTML tags
|
|
984
|
+
markdown = markdown.replace(/<[^>]*>/g, '');
|
|
985
|
+
|
|
986
|
+
// Clean up
|
|
987
|
+
markdown = markdown
|
|
988
|
+
.replace(/\n{3,}/g, '\n\n')
|
|
989
|
+
.trim();
|
|
990
|
+
|
|
991
|
+
return markdown;
|
|
992
|
+
}
|
|
993
|
+
// Auto-convert Markdown as user types
|
|
994
|
+
function handleMarkdownAutoConvert(e: KeyboardEvent) {
|
|
995
|
+
if (e.key !== ' ' || !rte.current) return;
|
|
996
|
+
|
|
997
|
+
const selection = window.getSelection();
|
|
998
|
+
if (!selection || !selection.rangeCount) return;
|
|
999
|
+
|
|
1000
|
+
const range = selection.getRangeAt(0);
|
|
1001
|
+
const textNode = range.startContainer;
|
|
1002
|
+
|
|
1003
|
+
if (textNode.nodeType !== Node.TEXT_NODE) return;
|
|
1004
|
+
|
|
1005
|
+
const text = textNode.textContent || '';
|
|
1006
|
+
const cursorPos = range.startOffset;
|
|
1007
|
+
const textBeforeCursor = text.substring(0, cursorPos);
|
|
1008
|
+
|
|
1009
|
+
// Check for Markdown patterns
|
|
1010
|
+
const patterns = [
|
|
1011
|
+
{ regex: /^#{6}\s$/, tag: 'h6', remove: 7 },
|
|
1012
|
+
{ regex: /^#{5}\s$/, tag: 'h5', remove: 6 },
|
|
1013
|
+
{ regex: /^#{4}\s$/, tag: 'h4', remove: 5 },
|
|
1014
|
+
{ regex: /^#{3}\s$/, tag: 'h3', remove: 4 },
|
|
1015
|
+
{ regex: /^#{2}\s$/, tag: 'h2', remove: 3 },
|
|
1016
|
+
{ regex: /^#{1}\s$/, tag: 'h1', remove: 2 },
|
|
1017
|
+
{ regex: /^[-*]\s$/, command: 'insertUnorderedList', remove: 2 },
|
|
1018
|
+
{ regex: /^\d+\.\s$/, command: 'insertOrderedList', remove: textBeforeCursor.length },
|
|
1019
|
+
{ regex: /^>\s$/, tag: 'blockquote', remove: 2 },
|
|
1020
|
+
{ regex: /^```\s$/, tag: 'pre', remove: 4 },
|
|
1021
|
+
];
|
|
1022
|
+
|
|
1023
|
+
for (const pattern of patterns) {
|
|
1024
|
+
if (pattern.regex.test(textBeforeCursor)) {
|
|
1025
|
+
e.preventDefault();
|
|
1026
|
+
|
|
1027
|
+
// Remove the Markdown syntax
|
|
1028
|
+
const newText = text.substring(0, cursorPos - pattern.remove) + text.substring(cursorPos);
|
|
1029
|
+
textNode.textContent = newText;
|
|
1030
|
+
|
|
1031
|
+
// Apply formatting
|
|
1032
|
+
if (pattern.tag) {
|
|
1033
|
+
document.execCommand('formatBlock', false, `<${pattern.tag}>`);
|
|
1034
|
+
} else if (pattern.command) {
|
|
1035
|
+
document.execCommand(pattern.command);
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1038
|
+
saveToHistory();
|
|
1039
|
+
break;
|
|
1040
|
+
}
|
|
1041
|
+
}
|
|
1042
|
+
}
|
|
1043
|
+
function converJSON() {
|
|
1044
|
+
return null
|
|
1045
|
+
}
|
|
1046
|
+
function converText() {
|
|
1047
|
+
return null
|
|
1048
|
+
}
|
|
1049
|
+
function converHtml() {
|
|
1050
|
+
return null
|
|
1051
|
+
}
|
|
1052
|
+
function insertColorSwatch(color) {
|
|
1053
|
+
console.log(`color value: ${color}`);
|
|
1054
|
+
setCpValue(color)
|
|
1055
|
+
}
|
|
1056
|
+
// user can turn on or off, and configure a floating menu that appears when a user selects a range of text using tooltip or whatever
|
|
1057
|
+
/**
|
|
1058
|
+
* <FloatingMenu>
|
|
1059
|
+
* <button onClick={() => h1} className={h1Active ? '' : ''}>
|
|
1060
|
+
H1
|
|
1061
|
+
</button>
|
|
1062
|
+
* </FloatingMenu>
|
|
1063
|
+
*
|
|
1064
|
+
*/
|
|
1065
|
+
function floatingMenu() {
|
|
1066
|
+
return null
|
|
1067
|
+
}
|
|
1068
|
+
function convertInsertContentToCurrentType() {
|
|
1069
|
+
return null
|
|
1070
|
+
}
|
|
1071
|
+
// Add this function to highlight code blocks
|
|
1072
|
+
function highlightCodeBlock(language: string) {
|
|
1073
|
+
if (!rte.current) return;
|
|
1074
|
+
|
|
1075
|
+
const selection = window.getSelection();
|
|
1076
|
+
if (!selection || !selection.rangeCount) return;
|
|
1077
|
+
|
|
1078
|
+
let node = selection.anchorNode;
|
|
1079
|
+
while (node && node !== rte.current) {
|
|
1080
|
+
if (node.nodeType === 1 && (node as Element).tagName === 'PRE') {
|
|
1081
|
+
const pre = node as HTMLPreElement;
|
|
1082
|
+
const code = pre.querySelector('code') || pre;
|
|
1083
|
+
const text = code.textContent || '';
|
|
1084
|
+
|
|
1085
|
+
code.className = `language-${language}`;
|
|
1086
|
+
|
|
1087
|
+
// Basic syntax highlighting patterns
|
|
1088
|
+
let highlighted = text;
|
|
1089
|
+
|
|
1090
|
+
if (language === 'javascript' || language === 'typescript') {
|
|
1091
|
+
highlighted = text
|
|
1092
|
+
.replace(/\b(const|let|var|function|return|if|else|for|while|class|import|export|from|async|await)\b/g, '<span style="color: #c678dd;">$1</span>')
|
|
1093
|
+
.replace(/\b(true|false|null|undefined)\b/g, '<span style="color: #d19a66;">$1</span>')
|
|
1094
|
+
.replace(/(["'`])(.*?)\1/g, '<span style="color: #98c379;">$1$2$1</span>')
|
|
1095
|
+
.replace(/\/\/(.*?)$/gm, '<span style="color: #5c6370;">\/\/$1</span>')
|
|
1096
|
+
.replace(/\/\*([\s\S]*?)\*\//g, '<span style="color: #5c6370;">/*$1*/</ span>');
|
|
1097
|
+
} else if (language === 'css') {
|
|
1098
|
+
highlighted = text
|
|
1099
|
+
.replace(/([.#]?[\w-]+)\s*{/g, '<span style="color: #e06c75;">$1</span> {')
|
|
1100
|
+
.replace(/([\w-]+):/g, '<span style="color: #61afef;">$1</span>:')
|
|
1101
|
+
.replace(/:\s*([^;]+);/g, ': <span style="color: #98c379;">$1</span>;')
|
|
1102
|
+
.replace(/\/\*([\s\S]*?)\*\//g, '<span style="color: #5c6370;">/*$1*/</span>');
|
|
1103
|
+
} else if (language === 'html') {
|
|
1104
|
+
highlighted = text
|
|
1105
|
+
.replace(/(<\/?)(\w+)([^&]*?)(>)/g, '<span style="color: #e06c75;">$1$2</span><span style="color: #d19a66;">$3</span><span style="color: #e06c75;">$4</span>')
|
|
1106
|
+
.replace(/(\w+)=/g, '<span style="color: #61afef;">$1</span>=')
|
|
1107
|
+
.replace(/=(["'])(.*?)\1/g, '=<span style="color: #98c379;">$1$2$1</span>');
|
|
1108
|
+
}
|
|
1109
|
+
|
|
1110
|
+
code.innerHTML = highlighted;
|
|
1111
|
+
return;
|
|
1112
|
+
}
|
|
1113
|
+
node = node.parentElement;
|
|
1114
|
+
}
|
|
1115
|
+
}
|
|
1116
|
+
|
|
1117
|
+
function highlightCSS() {
|
|
1118
|
+
highlightCodeBlock('css');
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
function highlightJS() {
|
|
1122
|
+
highlightCodeBlock('javascript');
|
|
1123
|
+
}
|
|
1124
|
+
|
|
1125
|
+
function highlightTS() {
|
|
1126
|
+
highlightCodeBlock('typescript');
|
|
1127
|
+
}
|
|
1128
|
+
|
|
1129
|
+
function highlightHTML() {
|
|
1130
|
+
highlightCodeBlock('html');
|
|
1131
|
+
}
|
|
1132
|
+
|
|
1133
|
+
const handleKeyDown = useCallback((e: React.KeyboardEvent) => {
|
|
1134
|
+
if (e.metaKey || e.ctrlKey) {
|
|
1135
|
+
switch (e.key) {
|
|
1136
|
+
case 'b':
|
|
1137
|
+
e.preventDefault();
|
|
1138
|
+
bold();
|
|
1139
|
+
break;
|
|
1140
|
+
case 'i':
|
|
1141
|
+
e.preventDefault();
|
|
1142
|
+
italic();
|
|
1143
|
+
break;
|
|
1144
|
+
case 'u':
|
|
1145
|
+
e.preventDefault();
|
|
1146
|
+
underline();
|
|
1147
|
+
break;
|
|
1148
|
+
case 'z':
|
|
1149
|
+
if (e.shiftKey) {
|
|
1150
|
+
e.preventDefault();
|
|
1151
|
+
redo();
|
|
1152
|
+
} else {
|
|
1153
|
+
e.preventDefault();
|
|
1154
|
+
undo();
|
|
1155
|
+
}
|
|
1156
|
+
break;
|
|
1157
|
+
}
|
|
1158
|
+
}
|
|
1159
|
+
if (e.altKey) {
|
|
1160
|
+
switch (e.key) {
|
|
1161
|
+
case 's':
|
|
1162
|
+
e.preventDefault();
|
|
1163
|
+
handleManualSave();
|
|
1164
|
+
break;
|
|
1165
|
+
case 'z':
|
|
1166
|
+
e.preventDefault();
|
|
1167
|
+
undo();
|
|
1168
|
+
break;
|
|
1169
|
+
case 'y':
|
|
1170
|
+
e.preventDefault();
|
|
1171
|
+
redo();
|
|
1172
|
+
break;
|
|
1173
|
+
case '1':
|
|
1174
|
+
e.preventDefault();
|
|
1175
|
+
h1();
|
|
1176
|
+
break;
|
|
1177
|
+
case '2':
|
|
1178
|
+
e.preventDefault();
|
|
1179
|
+
h2();
|
|
1180
|
+
break;
|
|
1181
|
+
case '3':
|
|
1182
|
+
e.preventDefault();
|
|
1183
|
+
h3();
|
|
1184
|
+
break;
|
|
1185
|
+
case '4':
|
|
1186
|
+
e.preventDefault();
|
|
1187
|
+
h4();
|
|
1188
|
+
break;
|
|
1189
|
+
case '5':
|
|
1190
|
+
e.preventDefault();
|
|
1191
|
+
h5();
|
|
1192
|
+
break;
|
|
1193
|
+
case 'b':
|
|
1194
|
+
e.preventDefault();
|
|
1195
|
+
alignLeft();
|
|
1196
|
+
break;
|
|
1197
|
+
case 'n':
|
|
1198
|
+
e.preventDefault();
|
|
1199
|
+
alignCenter();
|
|
1200
|
+
break;
|
|
1201
|
+
case 'm':
|
|
1202
|
+
e.preventDefault();
|
|
1203
|
+
alignRight();
|
|
1204
|
+
break;
|
|
1205
|
+
case 'g':
|
|
1206
|
+
e.preventDefault();
|
|
1207
|
+
strikethrough();
|
|
1208
|
+
break;
|
|
1209
|
+
case 'h':
|
|
1210
|
+
e.preventDefault();
|
|
1211
|
+
subscript();
|
|
1212
|
+
break;
|
|
1213
|
+
case 'j':
|
|
1214
|
+
e.preventDefault();
|
|
1215
|
+
superscript();
|
|
1216
|
+
break;
|
|
1217
|
+
case 'k':
|
|
1218
|
+
e.preventDefault();
|
|
1219
|
+
insertInlineCode();
|
|
1220
|
+
break;
|
|
1221
|
+
case 'l':
|
|
1222
|
+
e.preventDefault();
|
|
1223
|
+
link();
|
|
1224
|
+
break;
|
|
1225
|
+
case 'u':
|
|
1226
|
+
e.preventDefault();
|
|
1227
|
+
unorderedList();
|
|
1228
|
+
break;
|
|
1229
|
+
case 'i':
|
|
1230
|
+
e.preventDefault();
|
|
1231
|
+
taskList();
|
|
1232
|
+
break;
|
|
1233
|
+
case 'o':
|
|
1234
|
+
e.preventDefault();
|
|
1235
|
+
orderedList();
|
|
1236
|
+
break;
|
|
1237
|
+
default:
|
|
1238
|
+
break;
|
|
1239
|
+
}
|
|
1240
|
+
}
|
|
1241
|
+
// Call plugin keybindings
|
|
1242
|
+
plugins.forEach(plugin => {
|
|
1243
|
+
if (plugin.keybindings) {
|
|
1244
|
+
const key = `${e.ctrlKey ? 'Ctrl+' : ''}${e.metaKey ? 'Cmd+' : ''}${e.shiftKey ? 'Shift+' : ''}${e.altKey ? 'Alt+' : ''}${e.key}`;
|
|
1245
|
+
const handler = plugin.keybindings[key];
|
|
1246
|
+
if (handler) {
|
|
1247
|
+
e.preventDefault();
|
|
1248
|
+
handler();
|
|
1249
|
+
}
|
|
1250
|
+
}
|
|
1251
|
+
});
|
|
1252
|
+
}, [plugins, bold, italic, underline, undo, redo, handleManualSave, h1, h2, h3, h4, h5, alignLeft, alignCenter, alignRight, strikethrough, subscript, superscript, insertInlineCode, link, unorderedList, taskList, orderedList]);
|
|
1253
|
+
|
|
1254
|
+
const registerPlugin = useCallback((plugin: Plugin) => {
|
|
1255
|
+
setPlugins(prev => {
|
|
1256
|
+
if (prev.find(p => p.name === plugin.name)) {
|
|
1257
|
+
console.warn(`Plugin ${plugin.name} already registered`);
|
|
1258
|
+
return prev;
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1261
|
+
if (pluginContextRef.current) {
|
|
1262
|
+
plugin.init(pluginContextRef.current);
|
|
1263
|
+
}
|
|
1264
|
+
|
|
1265
|
+
return [...prev, plugin];
|
|
1266
|
+
});
|
|
1267
|
+
}, []);
|
|
1268
|
+
|
|
1269
|
+
const unregisterPlugin = useCallback((pluginName: string) => {
|
|
1270
|
+
setPlugins(prev => {
|
|
1271
|
+
const plugin = prev.find(p => p.name === pluginName);
|
|
1272
|
+
if (plugin?.destroy) {
|
|
1273
|
+
plugin.destroy();
|
|
1274
|
+
}
|
|
1275
|
+
return prev.filter(p => p.name !== pluginName);
|
|
1276
|
+
});
|
|
1277
|
+
}, []);
|
|
1278
|
+
|
|
1279
|
+
const getPlugin = useCallback((pluginName: string) => {
|
|
1280
|
+
return plugins.find(p => p.name === pluginName);
|
|
1281
|
+
}, [plugins]);
|
|
1282
|
+
|
|
1283
|
+
const contextValue = React.useMemo<RTEContextProps>(
|
|
1284
|
+
() => ({
|
|
1285
|
+
content, setContent, contentType, setContentType, isDirty, setIsDirty,
|
|
1286
|
+
isSaving, lastSaved, handleManualSave, h1Active, setH1Active, h2Active, insertCode,
|
|
1287
|
+
quote, handleMarkdownAutoConvert,
|
|
1288
|
+
wordCount,
|
|
1289
|
+
setH2Active, rte, saveSelection, restoreSelection, getSelectedText,
|
|
1290
|
+
undo, redo, canUndo, canRedo, saveToHistory, handleKeyDown, commandsRef,
|
|
1291
|
+
historyRef, h1, h2, h3, h4, h5, orderedList, unorderedList, taskList,
|
|
1292
|
+
bold, italic, underline, strike, subscript, superscript, insertTable,
|
|
1293
|
+
insertColumn, insertRow, insertCodeBlock, insertQuote, insertInlineCode,
|
|
1294
|
+
insertEmoji, convertToEmoji, insertHorizontalRule, insertImage, mention,
|
|
1295
|
+
paragraph, alignLeft, alignRight, alignCenter, justifyLeft, justifyCenter,
|
|
1296
|
+
justifyRight, highlight, highlightColor, link, setLink, characterCount,
|
|
1297
|
+
insertComment, setFontFamily, setFontSize, setLineHeight, typography,
|
|
1298
|
+
exportHTML, exportMD, exportText, exportJSON, insertContent, insertContentAt,
|
|
1299
|
+
clearContent, cut, copy, keyboardShortcut, selectAll, convertMD, highlightCSS,
|
|
1300
|
+
highlightJS, highlightTS, highlightHTML, insertColorSwatch, floatingMenu,
|
|
1301
|
+
convertInsertContentToCurrentType, h3Active, setH3Active, h4Active, setH4Active,
|
|
1302
|
+
h5Active, setH5Active, plugins, registerPlugin, unregisterPlugin, getPlugin,
|
|
1303
|
+
highlightJS, highlightTS, highlightHTML, defaultToolbar, setDefaultToolbar,
|
|
1304
|
+
defaultFooter, setDefaultFooter, defaultFloatingMenu, setDefaultFloatingMenu,
|
|
1305
|
+
defaultDock, setDefaultDock, hideEditorTitle, setHideEditorTitle, theme,
|
|
1306
|
+
setTheme, hideAnimatedBG, setHideAnimatedBG, lineHeightValue, setLineHeightValue,
|
|
1307
|
+
strikeActive, setStrikeActive, subscriptActive, setSubscriptActive,
|
|
1308
|
+
superscriptActive, setSuperscriptActive, insertInlineCodeActive,
|
|
1309
|
+
setInsertInlineCodeActive, alignLeftActive, setAlignLeftActive,
|
|
1310
|
+
alignCenterActive, setAlignCenterActive, alignRightActive, setAlignRightActive,
|
|
1311
|
+
boldActive, setBoldActive, italicActive, setItalicActive, underlineActive,
|
|
1312
|
+
setUnderlineActive, font, setFont, fontSize, setFontSize, setHighlight,
|
|
1313
|
+
converJSON, converText, converHtml, handleTextSelection, hideFloatingMenu,
|
|
1314
|
+
floatingMenuPosition, selectedText, updateActiveFormats
|
|
1315
|
+
}),
|
|
1316
|
+
[content, contentType, h1Active, h2Active, h3Active, h4Active, h5Active, isDirty,
|
|
1317
|
+
isSaving, lastSaved, plugins, floatingMenuPosition, selectedText]
|
|
1318
|
+
);
|
|
1319
|
+
|
|
1320
|
+
const Context = RTEContext;
|
|
1321
|
+
|
|
1322
|
+
return (
|
|
1323
|
+
<Context.Provider value={contextValue}>
|
|
1324
|
+
<TooltipProvider delayDuration={0}>
|
|
1325
|
+
<div ref={ref} {...props}>
|
|
1326
|
+
<RTE />
|
|
1327
|
+
</div>
|
|
1328
|
+
</TooltipProvider>
|
|
1329
|
+
</Context.Provider>
|
|
1330
|
+
);
|
|
1331
|
+
});
|
|
1332
|
+
|
|
1333
|
+
export function createPlugin(config: {
|
|
1334
|
+
name: string;
|
|
1335
|
+
onInit?: (context: PluginContext) => void;
|
|
1336
|
+
onDestroy?: () => void;
|
|
1337
|
+
toolbar?: () => React.ReactNode;
|
|
1338
|
+
keybindings?: Record<string, (context: PluginContext) => void>;
|
|
1339
|
+
}): Plugin {
|
|
1340
|
+
let pluginContext: PluginContext | null = null;
|
|
1341
|
+
|
|
1342
|
+
return {
|
|
1343
|
+
name: config.name,
|
|
1344
|
+
init: (context) => {
|
|
1345
|
+
pluginContext = context;
|
|
1346
|
+
config.onInit?.(context);
|
|
1347
|
+
},
|
|
1348
|
+
destroy: config.onDestroy,
|
|
1349
|
+
toolbar: config.toolbar,
|
|
1350
|
+
keybindings: config.keybindings ?
|
|
1351
|
+
Object.fromEntries(
|
|
1352
|
+
Object.entries(config.keybindings).map(([key, fn]) => [
|
|
1353
|
+
key,
|
|
1354
|
+
() => pluginContext && fn(pluginContext)
|
|
1355
|
+
])
|
|
1356
|
+
) : undefined
|
|
1357
|
+
};
|
|
1358
|
+
}
|
|
1359
|
+
|
|
1360
|
+
export function RTE({
|
|
1361
|
+
toolbar,
|
|
1362
|
+
defaultToolbar = false,
|
|
1363
|
+
footer,
|
|
1364
|
+
defaultFooter = false,
|
|
1365
|
+
dockItems = null,
|
|
1366
|
+
floatingMenu,
|
|
1367
|
+
className = '',
|
|
1368
|
+
CN = {},
|
|
1369
|
+
options = {
|
|
1370
|
+
editorPlaceholder: "Start writing something amazing...",
|
|
1371
|
+
toolbarTitle: "Catalyst-RTE",
|
|
1372
|
+
toolbarIcon: <Sparkles className="h-4 w-4 text-purple-300" />
|
|
1373
|
+
},
|
|
1374
|
+
}: {
|
|
1375
|
+
toolbar?: React.ReactNode;
|
|
1376
|
+
defaultToolbar?: boolean;
|
|
1377
|
+
footer?: React.ReactNode;
|
|
1378
|
+
defaultFooter?: boolean;
|
|
1379
|
+
dockItems?: any;
|
|
1380
|
+
floatingMenu?: React.ReactNode;
|
|
1381
|
+
className?: string;
|
|
1382
|
+
CN?: any;
|
|
1383
|
+
options?: any;
|
|
1384
|
+
}) {
|
|
1385
|
+
const { content, setContent, setIsDirty, rte, handleKeyDown, saveToHistory, canUndo, canRedo, undo, redo, bold, italic, underline, h1, h2, h3, h4, h5, alignLeft, alignCenter, alignRight, commandsRef, hideAnimatedBG, defaultDock, insertInlineCodeActive, font, setFont, fontSize, lineHeightValue, setLineHeight, strike, setCpValue, cpValue, insertColorSwatch, handleMarkdownAutoConvert, updateActiveFormats, floatingMenuPosition, handleTextSelection, hideFloatingMenu, strikeActive, subscriptActive, superscriptActive, subscript, superscript, insertTable, insertColumn, insertRow, insertCodeBlock, insertQuote, insertInlineCode, insertHorizontalRule, paragraph, link, insertImage, highlight, mention, exportJSON, defaultFloatingMenu, exportText, exportHTML, exportMD } = useRTE();
|
|
1386
|
+
|
|
1387
|
+
const [value, setValue] = useState(false)
|
|
1388
|
+
const [open, setOpen] = useState(false)
|
|
1389
|
+
const [openColorPicker, setOpenColorPicker] = useState(false)
|
|
1390
|
+
const [openColorPicker2, setOpenColorPicker2] = useState(false)
|
|
1391
|
+
const wordCount = () => rte.current?.textContent?.trim().split(/\s+/).filter(Boolean).length || 0;
|
|
1392
|
+
|
|
1393
|
+
const handleInput = useCallback((e) => {
|
|
1394
|
+
if (rte.current) {
|
|
1395
|
+
setContent(rte.current.innerHTML);
|
|
1396
|
+
setIsDirty(true);
|
|
1397
|
+
updateActiveFormats();
|
|
1398
|
+
|
|
1399
|
+
// Debounced history save
|
|
1400
|
+
clearTimeout((window as any).editorHistoryTimeout);
|
|
1401
|
+
(window as any).editorHistoryTimeout = setTimeout(saveToHistory, 500);
|
|
1402
|
+
}
|
|
1403
|
+
}, [updateActiveFormats, saveToHistory, setContent, setIsDirty, rte]);
|
|
1404
|
+
|
|
1405
|
+
useEffect(() => {
|
|
1406
|
+
const editor = rte.current;
|
|
1407
|
+
if (!editor) return;
|
|
1408
|
+
|
|
1409
|
+
const handleKeyPress = (e: KeyboardEvent) => {
|
|
1410
|
+
handleMarkdownAutoConvert(e);
|
|
1411
|
+
};
|
|
1412
|
+
|
|
1413
|
+
editor.addEventListener('keydown', handleKeyPress);
|
|
1414
|
+
return () => editor.removeEventListener('keydown', handleKeyPress);
|
|
1415
|
+
}, [rte]);
|
|
1416
|
+
|
|
1417
|
+
useEffect(() => {
|
|
1418
|
+
const editor = rte.current;
|
|
1419
|
+
if (!editor) return;
|
|
1420
|
+
|
|
1421
|
+
const handleKeyPress = (e: KeyboardEvent) => {
|
|
1422
|
+
handleMarkdownAutoConvert(e);
|
|
1423
|
+
};
|
|
1424
|
+
|
|
1425
|
+
const handleMouseUp = () => {
|
|
1426
|
+
// Delay to ensure selection is complete
|
|
1427
|
+
setTimeout(handleTextSelection, 10);
|
|
1428
|
+
};
|
|
1429
|
+
|
|
1430
|
+
const handleKeyUp = () => {
|
|
1431
|
+
setTimeout(handleTextSelection, 10);
|
|
1432
|
+
};
|
|
1433
|
+
|
|
1434
|
+
const handleMouseDown = (e: MouseEvent) => {
|
|
1435
|
+
// Hide menu when clicking outside
|
|
1436
|
+
if (floatingMenuPosition && !(e.target as Element).closest('.floating-menu')) {
|
|
1437
|
+
hideFloatingMenu();
|
|
1438
|
+
}
|
|
1439
|
+
};
|
|
1440
|
+
|
|
1441
|
+
editor.addEventListener('keydown', handleKeyPress);
|
|
1442
|
+
editor.addEventListener('mouseup', handleMouseUp);
|
|
1443
|
+
editor.addEventListener('keyup', handleKeyUp);
|
|
1444
|
+
document.addEventListener('mousedown', handleMouseDown);
|
|
1445
|
+
|
|
1446
|
+
return () => {
|
|
1447
|
+
editor.removeEventListener('keydown', handleKeyPress);
|
|
1448
|
+
editor.removeEventListener('mouseup', handleMouseUp);
|
|
1449
|
+
editor.removeEventListener('keyup', handleKeyUp);
|
|
1450
|
+
document.removeEventListener('mousedown', handleMouseDown);
|
|
1451
|
+
};
|
|
1452
|
+
}, [rte, handleTextSelection, hideFloatingMenu, floatingMenuPosition]);
|
|
1453
|
+
|
|
1454
|
+
|
|
1455
|
+
function ToolbarButton({ onClick, isActive, children, title, disabled = false }) {
|
|
1456
|
+
return (
|
|
1457
|
+
<Tooltip>
|
|
1458
|
+
<TooltipTrigger asChild>
|
|
1459
|
+
<Button
|
|
1460
|
+
onClick={onClick}
|
|
1461
|
+
disabled={disabled}
|
|
1462
|
+
size='sm'
|
|
1463
|
+
variant='ghost'
|
|
1464
|
+
className={cn(
|
|
1465
|
+
"h-9 w-9 transition-all duration-300 hover:scale-105 bg-white/10 backdrop-blur-md border border-white/20 rounded-xl hover:bg-white/20 hover:border-white/30 hover:shadow-lg hover:shadow-purple-500/20 group relative overflow-hidden disabled:opacity-40 disabled:cursor-not-allowed",
|
|
1466
|
+
isActive ? 'bg-purple-500/30 text-white border-purple-400/50 shadow-lg shadow-purple-500/30' : '',
|
|
1467
|
+
CN.toolbarButton || ''
|
|
1468
|
+
)}
|
|
1469
|
+
>
|
|
1470
|
+
<div className="absolute inset-0 bg-gradient-to-r from-purple-400/0 via-purple-400/20 to-purple-400/0 translate-x-[-100%] group-hover:translate-x-[100%] transition-transform duration-700" />
|
|
1471
|
+
<div className="relative z-10 text-white/90 group-hover:text-white flex items-center justify-center">
|
|
1472
|
+
{children}
|
|
1473
|
+
</div>
|
|
1474
|
+
</Button>
|
|
1475
|
+
</TooltipTrigger>
|
|
1476
|
+
<TooltipContent>
|
|
1477
|
+
<p>{title}</p>
|
|
1478
|
+
</TooltipContent>
|
|
1479
|
+
</Tooltip>
|
|
1480
|
+
)
|
|
1481
|
+
}
|
|
1482
|
+
|
|
1483
|
+
const renderToolbar = () => {
|
|
1484
|
+
if (toolbar) return toolbar;
|
|
1485
|
+
if (!defaultToolbar) return null;
|
|
1486
|
+
const { hideEditorTitle, h1Active, h2Active, h3Active, h4Active, h5Active, fontSize, setFontSize,
|
|
1487
|
+
boldActive, italicActive, underlineActive, alignLeftActive, alignCenterActive, alignRightActive, unorderedList, orderedList, taskList, } = useRTE();
|
|
1488
|
+
|
|
1489
|
+
return (
|
|
1490
|
+
<div className={cn("flex items-center gap-2 p-6 bg-white/5 backdrop-blur-xl border-b border-white/10 relative flex-wrap", CN.toolbar)}>
|
|
1491
|
+
{hideEditorTitle === false && (
|
|
1492
|
+
<div className="flex items-center gap-2 mr-4">
|
|
1493
|
+
<div className="p-2 bg-purple-500/20 backdrop-blur-sm rounded-xl border border-purple-400/30">
|
|
1494
|
+
{options.toolbarIcon}
|
|
1495
|
+
</div>
|
|
1496
|
+
<span className="text-sm font-semibold text-white/90 font-sans">{options.toolbarTitle}</span>
|
|
1497
|
+
</div>
|
|
1498
|
+
)}
|
|
1499
|
+
|
|
1500
|
+
<div className="flex items-center gap-1">
|
|
1501
|
+
<ToolbarButton onClick={undo} disabled={!canUndo()} title="Undo (Ctrl+Z)">
|
|
1502
|
+
<Undo className="h-4 w-4" />
|
|
1503
|
+
</ToolbarButton>
|
|
1504
|
+
<ToolbarButton onClick={redo} disabled={!canRedo()} title="Redo (Ctrl+Shift+Z)">
|
|
1505
|
+
<Redo className="h-4 w-4" />
|
|
1506
|
+
</ToolbarButton>
|
|
1507
|
+
</div>
|
|
1508
|
+
|
|
1509
|
+
<div className="w-px h-6 bg-border mx-2" />
|
|
1510
|
+
|
|
1511
|
+
<div className="flex items-center gap-1">
|
|
1512
|
+
<ToolbarButton onClick={h1} isActive={h1Active} title="Heading 1">
|
|
1513
|
+
<H1 className="h-4 w-4" />
|
|
1514
|
+
</ToolbarButton>
|
|
1515
|
+
<ToolbarButton onClick={h2} isActive={h2Active} title="Heading 2">
|
|
1516
|
+
<H2 className="h-4 w-4" />
|
|
1517
|
+
</ToolbarButton>
|
|
1518
|
+
<ToolbarButton onClick={h3} isActive={h3Active} title="Heading 3">
|
|
1519
|
+
<H3 className="h-4 w-4" />
|
|
1520
|
+
</ToolbarButton>
|
|
1521
|
+
<ToolbarButton onClick={h4} isActive={h4Active} title="Heading 3">
|
|
1522
|
+
<H4 className="h-4 w-4" />
|
|
1523
|
+
</ToolbarButton>
|
|
1524
|
+
<ToolbarButton onClick={h5} isActive={h5Active} title="Heading 3">
|
|
1525
|
+
<H5 className="h-4 w-4" />
|
|
1526
|
+
</ToolbarButton>
|
|
1527
|
+
</div>
|
|
1528
|
+
|
|
1529
|
+
<div className="w-px h-6 bg-border mx-2" />
|
|
1530
|
+
|
|
1531
|
+
<div className="flex items-center gap-1">
|
|
1532
|
+
<ToolbarButton onClick={bold} isActive={boldActive} title="Bold (Ctrl+B)">
|
|
1533
|
+
<Bold className="h-4 w-4" />
|
|
1534
|
+
</ToolbarButton>
|
|
1535
|
+
<ToolbarButton onClick={italic} isActive={italicActive} title="Italic (Ctrl+I)">
|
|
1536
|
+
<Italic className="h-4 w-4" />
|
|
1537
|
+
</ToolbarButton>
|
|
1538
|
+
<ToolbarButton onClick={underline} isActive={underlineActive} title="Underline (Ctrl+U)">
|
|
1539
|
+
<Underline className="h-4 w-4" />
|
|
1540
|
+
</ToolbarButton>
|
|
1541
|
+
|
|
1542
|
+
<ToolbarButton onClick={strike} isActive={strikeActive} title="Strikethrough">
|
|
1543
|
+
<Strikethrough className="h-4 w-4" />
|
|
1544
|
+
</ToolbarButton>
|
|
1545
|
+
<ToolbarButton onClick={subscript} isActive={subscriptActive} title="Subscript">
|
|
1546
|
+
<Subscript className="h-4 w-4" />
|
|
1547
|
+
</ToolbarButton>
|
|
1548
|
+
<ToolbarButton onClick={superscript} isActive={superscriptActive} title="Superscript">
|
|
1549
|
+
<Superscript className="h-4 w-4" />
|
|
1550
|
+
</ToolbarButton>
|
|
1551
|
+
</div>
|
|
1552
|
+
|
|
1553
|
+
<div className="w-px h-6 bg-border mx-2" />
|
|
1554
|
+
|
|
1555
|
+
<div className="flex items-center gap-1">
|
|
1556
|
+
<ToolbarButton onClick={alignLeft} isActive={alignLeftActive} title="Align Left">
|
|
1557
|
+
<AlignLeft className="h-4 w-4" />
|
|
1558
|
+
</ToolbarButton>
|
|
1559
|
+
<ToolbarButton onClick={alignCenter} isActive={alignCenterActive} title="Align Center">
|
|
1560
|
+
<AlignCenter className="h-4 w-4" />
|
|
1561
|
+
</ToolbarButton>
|
|
1562
|
+
<ToolbarButton onClick={alignRight} isActive={alignRightActive} title="Align Right">
|
|
1563
|
+
<AlignRight className="h-4 w-4" />
|
|
1564
|
+
</ToolbarButton>
|
|
1565
|
+
</div>
|
|
1566
|
+
|
|
1567
|
+
<div className="w-px h-6 bg-border mx-2" />
|
|
1568
|
+
|
|
1569
|
+
<div className="flex items-center gap-1">
|
|
1570
|
+
<ToolbarButton onClick={link} title="Insert Link">
|
|
1571
|
+
<Link className="h-4 w-4" />
|
|
1572
|
+
</ToolbarButton>
|
|
1573
|
+
<ToolbarButton onClick={insertInlineCode} isActive={insertInlineCodeActive} title="Inline Code">
|
|
1574
|
+
<Code className="h-4 w-4" />
|
|
1575
|
+
</ToolbarButton>
|
|
1576
|
+
</div>
|
|
1577
|
+
|
|
1578
|
+
<div className="w-px h-6 bg-border mx-2" />
|
|
1579
|
+
|
|
1580
|
+
<div className="flex items-center gap-1">
|
|
1581
|
+
<ToolbarButton onClick={unorderedList} title="List">
|
|
1582
|
+
<List className="h-4 w-4" />
|
|
1583
|
+
</ToolbarButton>
|
|
1584
|
+
<ToolbarButton onClick={orderedList} title="Ordered List">
|
|
1585
|
+
<ListOrdered className="h-4 w-4" />
|
|
1586
|
+
</ToolbarButton>
|
|
1587
|
+
<ToolbarButton onClick={taskList} title="Task List">
|
|
1588
|
+
<Checkbox className="h-4 w-4" />
|
|
1589
|
+
</ToolbarButton>
|
|
1590
|
+
</div>
|
|
1591
|
+
|
|
1592
|
+
<div className="w-px h-6 bg-border mx-2" />
|
|
1593
|
+
|
|
1594
|
+
<div className="flex items-center gap-1">
|
|
1595
|
+
<Select defaultValue={fontSize}>
|
|
1596
|
+
<SelectTrigger className="max-w-[180px] border-transparent">
|
|
1597
|
+
<SelectValue placeholder="Text Size" />
|
|
1598
|
+
</SelectTrigger>
|
|
1599
|
+
<SelectContent>
|
|
1600
|
+
{FONT_SIZES.map((size, index) => (
|
|
1601
|
+
<SelectItem
|
|
1602
|
+
key={index}
|
|
1603
|
+
onClick={() => { setFontSize(size); }}
|
|
1604
|
+
className={cn("text-muted-foreground hover:text-foreground", size === fontSize ? "bg-muted font-semibold" : "")}
|
|
1605
|
+
>
|
|
1606
|
+
{size} px
|
|
1607
|
+
</SelectItem>
|
|
1608
|
+
))}
|
|
1609
|
+
</SelectContent>
|
|
1610
|
+
</Select>
|
|
1611
|
+
<Select defaultValue={font}>
|
|
1612
|
+
<SelectTrigger className="max-w-[180px] border-transparent">
|
|
1613
|
+
<SelectValue placeholder="Font" />
|
|
1614
|
+
</SelectTrigger>
|
|
1615
|
+
<SelectContent>
|
|
1616
|
+
{FONT_STYLE.map((style, index) => (
|
|
1617
|
+
<SelectItem
|
|
1618
|
+
key={index}
|
|
1619
|
+
onClick={() => { setFont(style); }}
|
|
1620
|
+
className={cn("text-muted-foreground hover:text-foreground", style === fontSize ? "bg-muted font-semibold" : "")}
|
|
1621
|
+
>
|
|
1622
|
+
{style}
|
|
1623
|
+
</SelectItem>
|
|
1624
|
+
))}
|
|
1625
|
+
</SelectContent>
|
|
1626
|
+
</Select>
|
|
1627
|
+
<Select defaultValue={lineHeightValue}>
|
|
1628
|
+
<SelectTrigger className="max-w-[180px] border-transparent">
|
|
1629
|
+
<SelectValue placeholder="Line Height" />
|
|
1630
|
+
</SelectTrigger>
|
|
1631
|
+
<SelectContent>
|
|
1632
|
+
{LINE_HEIGHT.map((height, index) => (
|
|
1633
|
+
<SelectItem
|
|
1634
|
+
key={index}
|
|
1635
|
+
onClick={() => { setLineHeight(height); }}
|
|
1636
|
+
className={cn("text-muted-foreground hover:text-foreground", height === lineHeightValue ? "bg-muted font-semibold" : "")}
|
|
1637
|
+
>
|
|
1638
|
+
{height}
|
|
1639
|
+
</SelectItem>
|
|
1640
|
+
))}
|
|
1641
|
+
</SelectContent>
|
|
1642
|
+
</Select>
|
|
1643
|
+
</div>
|
|
1644
|
+
|
|
1645
|
+
<div className="w-px h-6 bg-border mx-2" />
|
|
1646
|
+
|
|
1647
|
+
<div className="flex items-center gap-1">
|
|
1648
|
+
<Popover>
|
|
1649
|
+
<PopoverTrigger>
|
|
1650
|
+
<ToolbarButton >
|
|
1651
|
+
<Table className="h-4 w-4" />
|
|
1652
|
+
</ToolbarButton>
|
|
1653
|
+
</PopoverTrigger>
|
|
1654
|
+
<PopoverContent className='flex items-center gap-1 bg-background text-foreground p-3'>
|
|
1655
|
+
<ToolbarButton onClick={insertTable} title="Add Table">
|
|
1656
|
+
<Table className="h-4 w-4" />
|
|
1657
|
+
</ToolbarButton>
|
|
1658
|
+
<ToolbarButton onClick={insertColumn} title="Add Table Column">
|
|
1659
|
+
<TableColumn className="h-4 w-4" />
|
|
1660
|
+
</ToolbarButton>
|
|
1661
|
+
<ToolbarButton onClick={insertRow} title="Add Table Row">
|
|
1662
|
+
<TableRow className="h-4 w-4" />
|
|
1663
|
+
</ToolbarButton>
|
|
1664
|
+
</PopoverContent>
|
|
1665
|
+
</Popover>
|
|
1666
|
+
<ToolbarButton onClick={insertCodeBlock} title="Code Block">
|
|
1667
|
+
<Code className="h-4 w-4" />
|
|
1668
|
+
</ToolbarButton>
|
|
1669
|
+
<ToolbarButton onClick={insertQuote} title="Quote">
|
|
1670
|
+
<Quote className="h-4 w-4" />
|
|
1671
|
+
</ToolbarButton>
|
|
1672
|
+
<ToolbarButton onClick={insertInlineCode} title="Inline Code">
|
|
1673
|
+
<BracketsAngle className="h-4 w-4" />
|
|
1674
|
+
</ToolbarButton>
|
|
1675
|
+
<ToolbarButton onClick={insertHorizontalRule} title="Horizontal Rule">
|
|
1676
|
+
<LineDashed className="h-4 w-4" />
|
|
1677
|
+
</ToolbarButton>
|
|
1678
|
+
<ToolbarButton onClick={paragraph} title="Paragraph">
|
|
1679
|
+
<AlignJustified className="h-4 w-4" />
|
|
1680
|
+
</ToolbarButton>
|
|
1681
|
+
<ToolbarButton onClick={link} title="Link">
|
|
1682
|
+
<Link className="h-4 w-4" />
|
|
1683
|
+
</ToolbarButton>
|
|
1684
|
+
|
|
1685
|
+
<ToolbarButton onClick={insertImage} title="Image">
|
|
1686
|
+
<Image className="h-4 w-4" />
|
|
1687
|
+
</ToolbarButton>
|
|
1688
|
+
<ToolbarButton onClick={link} title="Link">
|
|
1689
|
+
<Link className="h-4 w-4" />
|
|
1690
|
+
</ToolbarButton>
|
|
1691
|
+
<ToolbarButton onClick={highlight} title="Highlight">
|
|
1692
|
+
<Highlight className="h-4 w-4" />
|
|
1693
|
+
</ToolbarButton>
|
|
1694
|
+
|
|
1695
|
+
<Popover open={open} onOpenChange={setOpen}>
|
|
1696
|
+
<PopoverTrigger asChild>
|
|
1697
|
+
<Button size='sm' variant="ghost" role="combobox" aria-expanded={open} >
|
|
1698
|
+
<MoodBoy className="h-4 w-4" />
|
|
1699
|
+
</Button>
|
|
1700
|
+
</PopoverTrigger>
|
|
1701
|
+
<PopoverContent className="w-[200px] p-0">
|
|
1702
|
+
<Command>
|
|
1703
|
+
<CommandInput placeholder="Search emojis..." className="h-9" />
|
|
1704
|
+
<CommandList>
|
|
1705
|
+
<CommandEmpty>No Emojis found.</CommandEmpty>
|
|
1706
|
+
<CommandGroup>
|
|
1707
|
+
{EMOJIES.map((e, index) => (
|
|
1708
|
+
<CommandItem
|
|
1709
|
+
key={index}
|
|
1710
|
+
value={e.value}
|
|
1711
|
+
onSelect={(currentValue) => {
|
|
1712
|
+
setValue(currentValue === value ? "" : currentValue)
|
|
1713
|
+
setOpen(false)
|
|
1714
|
+
}}
|
|
1715
|
+
>
|
|
1716
|
+
{e.label}
|
|
1717
|
+
<Check
|
|
1718
|
+
className={cn(
|
|
1719
|
+
"ml-auto",
|
|
1720
|
+
value === e.value ? "opacity-100" : "opacity-0"
|
|
1721
|
+
)}
|
|
1722
|
+
/>
|
|
1723
|
+
</CommandItem>
|
|
1724
|
+
))}
|
|
1725
|
+
</CommandGroup>
|
|
1726
|
+
</CommandList>
|
|
1727
|
+
</Command>
|
|
1728
|
+
</PopoverContent>
|
|
1729
|
+
</Popover>
|
|
1730
|
+
<Select defaultValue={lineHeightValue}>
|
|
1731
|
+
<SelectTrigger className="max-w-[50px] border-transparent">
|
|
1732
|
+
<FileExport className="h-4 w-4" />
|
|
1733
|
+
</SelectTrigger>
|
|
1734
|
+
<SelectContent>
|
|
1735
|
+
<SelectItem className="text-muted-foreground hover:text-foreground" onClick={() => { exportHTML(); }} >
|
|
1736
|
+
Export HTML
|
|
1737
|
+
</SelectItem>
|
|
1738
|
+
<SelectItem className="text-muted-foreground hover:text-foreground" onClick={() => { exportMD(); }} >
|
|
1739
|
+
Export MD
|
|
1740
|
+
</SelectItem>
|
|
1741
|
+
<SelectItem className="text-muted-foreground hover:text-foreground" onClick={() => { exportText(); }} >
|
|
1742
|
+
Export Text
|
|
1743
|
+
</SelectItem>
|
|
1744
|
+
<SelectItem className="text-muted-foreground hover:text-foreground" onClick={() => { exportJSON(); }} >
|
|
1745
|
+
Export JSON
|
|
1746
|
+
</SelectItem>
|
|
1747
|
+
</SelectContent>
|
|
1748
|
+
</Select>
|
|
1749
|
+
<ToolbarButton onClick={mention} title="Mention">
|
|
1750
|
+
<At className="h-4 w-4" />
|
|
1751
|
+
</ToolbarButton>
|
|
1752
|
+
<Popover open={openColorPicker} onOpenChange={setOpenColorPicker}>
|
|
1753
|
+
<PopoverTrigger asChild>
|
|
1754
|
+
<Button size='sm' variant="ghost" role="combobox" aria-expanded={open} >
|
|
1755
|
+
<ColorPickerIcon className="h-4 w-4" />
|
|
1756
|
+
</Button>
|
|
1757
|
+
</PopoverTrigger>
|
|
1758
|
+
<PopoverContent className="max-w-sm p-0">
|
|
1759
|
+
<ColorPicker defaultValue="#ff0000" onSelect={(color) => insertColorSwatch(color)} />
|
|
1760
|
+
<ColorPicker className="max-w-sm rounded-md border bg-background p-4 shadow-sm"
|
|
1761
|
+
value={cpValue}
|
|
1762
|
+
onChange={(color) => insertColorSwatch(color)}>
|
|
1763
|
+
<ColorPickerSelection3 />
|
|
1764
|
+
<div className="flex items-center gap-4">
|
|
1765
|
+
<ColorPickerEyeDropper3 />
|
|
1766
|
+
<div className="grid w-full gap-1">
|
|
1767
|
+
<ColorPickerHue3 />
|
|
1768
|
+
<ColorPickerAlpha3 />
|
|
1769
|
+
</div>
|
|
1770
|
+
</div>
|
|
1771
|
+
<div className="flex items-center gap-2">
|
|
1772
|
+
<ColorPickerOutput3 />
|
|
1773
|
+
<ColorPickerFormat3 />
|
|
1774
|
+
</div>
|
|
1775
|
+
</ColorPicker>
|
|
1776
|
+
</PopoverContent>
|
|
1777
|
+
</Popover>
|
|
1778
|
+
<Popover open={openColorPicker2} onOpenChange={setOpenColorPicker2}>
|
|
1779
|
+
<PopoverTrigger asChild>
|
|
1780
|
+
<Button size='sm' variant="ghost" role="combobox" aria-expanded={open} >
|
|
1781
|
+
<ColorPickerIcon className="h-4 w-4" />
|
|
1782
|
+
</Button>
|
|
1783
|
+
</PopoverTrigger>
|
|
1784
|
+
<PopoverContent className="w-[300px] p-0">
|
|
1785
|
+
<ColorPicker1 defaultValue="#ff0000" onSelect={(color) => insertColorSwatch(color)} />
|
|
1786
|
+
</PopoverContent>
|
|
1787
|
+
</Popover>
|
|
1788
|
+
</div>
|
|
1789
|
+
|
|
1790
|
+
</div>
|
|
1791
|
+
);
|
|
1792
|
+
};
|
|
1793
|
+
|
|
1794
|
+
const renderFloatingMenu = () => {
|
|
1795
|
+
if (floatingMenu) return floatingMenu;
|
|
1796
|
+
if (!defaultFloatingMenu) return null;
|
|
1797
|
+
if (!floatingMenuPosition) return null;
|
|
1798
|
+
|
|
1799
|
+
|
|
1800
|
+
return (
|
|
1801
|
+
<div
|
|
1802
|
+
className={cn(
|
|
1803
|
+
"floating-menu fixed z-50 flex items-center gap-1 p-2 bg-white/10 backdrop-blur-xl border border-white/20 rounded-xl shadow-2xl shadow-black/40",
|
|
1804
|
+
CN.floatingMenu
|
|
1805
|
+
)}
|
|
1806
|
+
style={{
|
|
1807
|
+
left: `${floatingMenuPosition.x}px`,
|
|
1808
|
+
top: `${floatingMenuPosition.y - 60}px`,
|
|
1809
|
+
transform: 'translateX(-50%)',
|
|
1810
|
+
}}
|
|
1811
|
+
>
|
|
1812
|
+
<div className="flex items-center gap-1">
|
|
1813
|
+
<ToolbarButton onClick={() => { bold(); handleTextSelection(); }} title="Bold">
|
|
1814
|
+
<Bold className="h-4 w-4" />
|
|
1815
|
+
</ToolbarButton>
|
|
1816
|
+
<ToolbarButton onClick={() => { italic(); handleTextSelection(); }} title="Italic">
|
|
1817
|
+
<Italic className="h-4 w-4" />
|
|
1818
|
+
</ToolbarButton>
|
|
1819
|
+
<ToolbarButton onClick={() => { underline(); handleTextSelection(); }} title="Underline">
|
|
1820
|
+
<Underline className="h-4 w-4" />
|
|
1821
|
+
</ToolbarButton>
|
|
1822
|
+
|
|
1823
|
+
<ToolbarButton onClick={() => { strike(); handleTextSelection(); }} title="Strikethrough">
|
|
1824
|
+
<Strikethrough className="h-4 w-4" />
|
|
1825
|
+
</ToolbarButton>
|
|
1826
|
+
</div>
|
|
1827
|
+
|
|
1828
|
+
<div className="w-px h-6 bg-white/20 mx-1" />
|
|
1829
|
+
|
|
1830
|
+
<div className="flex items-center gap-1">
|
|
1831
|
+
<ToolbarButton onClick={() => { link(); handleTextSelection(); }} title="Insert Link">
|
|
1832
|
+
<Link className="h-4 w-4" />
|
|
1833
|
+
</ToolbarButton>
|
|
1834
|
+
<ToolbarButton onClick={() => { insertInlineCode(); handleTextSelection(); }} title="Inline Code">
|
|
1835
|
+
<Code className="h-4 w-4" />
|
|
1836
|
+
</ToolbarButton>
|
|
1837
|
+
<ToolbarButton onClick={() => { highlight(); handleTextSelection(); }} title="Highlight">
|
|
1838
|
+
<Highlight className="h-4 w-4" />
|
|
1839
|
+
</ToolbarButton>
|
|
1840
|
+
</div>
|
|
1841
|
+
</div>
|
|
1842
|
+
);
|
|
1843
|
+
};
|
|
1844
|
+
|
|
1845
|
+
const renderFooter = () => {
|
|
1846
|
+
if (footer) return footer;
|
|
1847
|
+
if (!defaultFooter) return null;
|
|
1848
|
+
|
|
1849
|
+
return (
|
|
1850
|
+
<div className={cn("flex items-center justify-between px-8 py-6 bg-white/5 backdrop-blur-xl border-t border-white/10 text-sm text-white/60 relative", CN.footer)}>
|
|
1851
|
+
<div className="flex items-center gap-6">
|
|
1852
|
+
<span className="flex items-center gap-2">
|
|
1853
|
+
<Type className="h-4 w-4 text-purple-300" />
|
|
1854
|
+
Words: <span className="text-white/90 font-medium">
|
|
1855
|
+
{wordCount()}
|
|
1856
|
+
</span>
|
|
1857
|
+
</span>
|
|
1858
|
+
<span className="flex items-center gap-2">
|
|
1859
|
+
Characters: <span className="text-white/90 font-medium">{content.replace(/<[^>]*>/g, '').length}</span>
|
|
1860
|
+
</span>
|
|
1861
|
+
</div>
|
|
1862
|
+
<div className="text-xs text-white/50 flex items-center gap-3">
|
|
1863
|
+
<kbd className="px-2 py-1 bg-white/10 backdrop-blur-sm rounded-lg text-xs border border-white/20">⌘B</kbd>
|
|
1864
|
+
<span>Bold</span>
|
|
1865
|
+
<kbd className="px-2 py-1 bg-white/10 backdrop-blur-sm rounded-lg text-xs border border-white/20">⌘I</kbd>
|
|
1866
|
+
<span>Italic</span>
|
|
1867
|
+
<kbd className="px-2 py-1 bg-white/10 backdrop-blur-sm rounded-lg text-xs border border-white/20">⌘U</kbd>
|
|
1868
|
+
<span>Underline</span>
|
|
1869
|
+
</div>
|
|
1870
|
+
</div>
|
|
1871
|
+
);
|
|
1872
|
+
};
|
|
1873
|
+
|
|
1874
|
+
return (
|
|
1875
|
+
<div className={cn("min-h-screen flex items-center justify-center p-4 bg-background relative", CN.page, font,)}>
|
|
1876
|
+
{hideAnimatedBG === false && (<AnimatedBackground />)}
|
|
1877
|
+
|
|
1878
|
+
<div className={cn("w-full max-w-4xl backdrop-blur-2xl border border-border rounded-3xl shadow-2xl shadow-black/40 overflow-hidden relative z-10", CN.bg, CN.width)}>
|
|
1879
|
+
<div className={cn("absolute inset-0 rounded-3xl pointer-events-none", CN.bg)} />
|
|
1880
|
+
|
|
1881
|
+
{renderToolbar()}
|
|
1882
|
+
|
|
1883
|
+
<div className="relative">
|
|
1884
|
+
<div
|
|
1885
|
+
ref={rte}
|
|
1886
|
+
contentEditable
|
|
1887
|
+
onInput={handleInput}
|
|
1888
|
+
onKeyDown={handleKeyDown}
|
|
1889
|
+
onMouseUp={updateActiveFormats}
|
|
1890
|
+
onKeyUp={updateActiveFormats}
|
|
1891
|
+
className={cn("min-h-[500px] p-8 focus:outline-none relative z-10 text-white/95 leading-relaxed [&>h1]:text-4xl [&>h1]:font-bold [&>h1]:text-white [&>h1]:mb-6 [&>h1]:mt-8 [&>h2]:text-3xl [&>h2]:font-semibold [&>h2]:text-white/95 [&>h2]:mb-4 [&>h2]:mt-6 [&>h3]:text-2xl [&>h3]:font-medium [&>h3]:text-white/90 [&>h3]:mb-3 [&>h3]:mt-5 [&>p]:mb-4 [&>p]:leading-relaxed [&>p]:text-white/90 [&_strong]:font-bold [&_em]:italic [&_u]:underline [&_a]:text-purple-300 [&_a]:underline [&_a]:decoration-purple-300/50 [&_code]:bg-purple-500/20 [&_code]:px-2 [&_code]:py-1 [&_code]:rounded [&_code]:text-sm [&_code]:font-mono [&_code]:text-purple-200 selection:bg-purple-500/30 selection:text-white empty:before:content-[attr(data-placeholder)] empty:before:text-white/40 empty:before:pointer-events-none", CN.editor, fontSize, font)}
|
|
1892
|
+
data-placeholder={options.editorPlaceholder}
|
|
1893
|
+
suppressContentEditableWarning={true}
|
|
1894
|
+
/>
|
|
1895
|
+
</div>
|
|
1896
|
+
|
|
1897
|
+
{renderFooter()}
|
|
1898
|
+
</div>
|
|
1899
|
+
{renderFloatingMenu()}
|
|
1900
|
+
{defaultDock || dockItems && (<Dock items={dockItems} />)}
|
|
1901
|
+
</div>
|
|
1902
|
+
);
|
|
1903
|
+
}
|
|
1904
|
+
|
|
1905
|
+
export function UsersRTE() {
|
|
1906
|
+
const { registerPlugin, setDefaultToolbar, setDefaultFooter, setTheme, setHideEditorTitle, setDefaultDock, insertContent, highlightCSS, hightlightJS, hightlightTS, hightlightHTML, } = useRTE();
|
|
1907
|
+
|
|
1908
|
+
useEffect(() => {
|
|
1909
|
+
setDefaultToolbar(false)
|
|
1910
|
+
setDefaultFooter(false)
|
|
1911
|
+
setTheme('dark')
|
|
1912
|
+
setHideEditorTitle(false)
|
|
1913
|
+
setDefaultDock(false)
|
|
1914
|
+
insertContent('')
|
|
1915
|
+
highlightCSS()
|
|
1916
|
+
hightlightJS()
|
|
1917
|
+
hightlightTS()
|
|
1918
|
+
hightlightHTML()
|
|
1919
|
+
}, []);
|
|
1920
|
+
const emojiPlugin = createPlugin({
|
|
1921
|
+
name: 'emoji',
|
|
1922
|
+
onInit: (ctx) => {
|
|
1923
|
+
console.log('Emoji plugin loaded');
|
|
1924
|
+
},
|
|
1925
|
+
toolbar: () => <button>😀</button>,
|
|
1926
|
+
keybindings: {
|
|
1927
|
+
'Ctrl+E': (ctx) => {
|
|
1928
|
+
ctx.commands?.insertEmoji();
|
|
1929
|
+
}
|
|
1930
|
+
}
|
|
1931
|
+
});
|
|
1932
|
+
registerPlugin(emojiPlugin);
|
|
1933
|
+
function MyCustomToolbar() {
|
|
1934
|
+
return null
|
|
1935
|
+
}
|
|
1936
|
+
function MyCustomFooter() {
|
|
1937
|
+
return null
|
|
1938
|
+
}
|
|
1939
|
+
function MyCustomFloatingMenu() {
|
|
1940
|
+
return null
|
|
1941
|
+
}
|
|
1942
|
+
const dockItems = [
|
|
1943
|
+
{
|
|
1944
|
+
label: "",
|
|
1945
|
+
onClick: "",
|
|
1946
|
+
icon: "",
|
|
1947
|
+
}
|
|
1948
|
+
]
|
|
1949
|
+
return (
|
|
1950
|
+
<CatalystRTE>
|
|
1951
|
+
<RTE
|
|
1952
|
+
// toolbar={<MyCustomToolbar />}
|
|
1953
|
+
// footer={<MyCustomFooter />}
|
|
1954
|
+
// floatingMenu={<MyCustomFloatingMenu />}
|
|
1955
|
+
dockItems={dockItems}
|
|
1956
|
+
options={{
|
|
1957
|
+
toolbarTitle: "",
|
|
1958
|
+
editorPlaceholder: ""
|
|
1959
|
+
// toolbarIcon={}
|
|
1960
|
+
}}
|
|
1961
|
+
|
|
1962
|
+
CN={{
|
|
1963
|
+
page: "", // min-h-screen flex items-center justify-center p-4 bg-[#0A0A0A] relative
|
|
1964
|
+
toolbar: "", // flex items-center gap-2 p-6 bg-white/5 backdrop-blur-xl border-b border-white/10 relative flex-wrap
|
|
1965
|
+
floatingMenu: "",
|
|
1966
|
+
toolbarButton: "", // h-9 w-9 transition-all duration-300 hover:scale-105 bg-white/10 backdrop-blur-md border border-white/20 rounded-xl hover:bg-white/20 hover:border-white/30 hover:shadow-lg hover:shadow-purple-500/20 group relative overflow-hidden disabled:opacity-40 disabled:cursor-not-allowed
|
|
1967
|
+
footer: "", // flex items-center justify-between px-8 py-6 bg-white/5 backdrop-blur-xl border-t border-white/10 text-sm text-white/60 relative
|
|
1968
|
+
width: "", // w-full max-w-4xl bg-white/5 backdrop-blur-2xl border border-white/10 rounded-3xl shadow-2xl shadow-black/40 overflow-hidden relative z-10
|
|
1969
|
+
bg: "", // absolute inset-0 bg-gradient-to-br from-white/5 via-transparent to-purple-500/5 rounded-3xl pointer-events-none
|
|
1970
|
+
editor: "", // min-h-[500px] p-8 focus:outline-none relative z-10 text-white/95 leading-relaxed [&>h1]:text-4xl [&>h1]:font-bold [&>h1]:text-white [&>h1]:mb-6 [&>h1]:mt-8 [&>h2]:text-3xl [&>h2]:font-semibold [&>h2]:text-white/95 [&>h2]:mb-4 [&>h2]:mt-6 [&>h3]:text-2xl [&>h3]:font-medium [&>h3]:text-white/90 [&>h3]:mb-3 [&>h3]:mt-5 [&>p]:mb-4 [&>p]:leading-relaxed [&>p]:text-white/90 [&_strong]:font-bold [&_em]:italic [&_u]:underline [&_a]:text-purple-300 [&_a]:underline [&_a]:decoration-purple-300/50 [&_code]:bg-purple-500/20 [&_code]:px-2 [&_code]:py-1 [&_code]:rounded [&_code]:text-sm [&_code]:font-mono [&_code]:text-purple-200 selection:bg-purple-500/30 selection:text-white empty:before:content-[attr(data-placeholder)] empty:before:text-white/40 empty:before:pointer-events-none
|
|
1971
|
+
|
|
1972
|
+
}}
|
|
1973
|
+
/>
|
|
1974
|
+
</CatalystRTE>
|
|
1975
|
+
|
|
1976
|
+
)
|
|
1977
|
+
}
|
|
1978
|
+
|
|
1979
|
+
function AnimatedBackground() {
|
|
1980
|
+
return (
|
|
1981
|
+
<>
|
|
1982
|
+
<FlickeringGrid
|
|
1983
|
+
className="z-0 absolute inset-0 size-full"
|
|
1984
|
+
squareSize={4}
|
|
1985
|
+
gridGap={6}
|
|
1986
|
+
color="#fafafa"
|
|
1987
|
+
maxOpacity={0.4}
|
|
1988
|
+
flickerChance={0.3}
|
|
1989
|
+
/>
|
|
1990
|
+
</>
|
|
1991
|
+
)
|
|
1992
|
+
}
|
|
1993
|
+
|
|
1994
|
+
export type { Plugin, PluginContext };
|