matrix-design-system 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (317) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +95 -0
  3. package/dist/atoms/animation/motion-div/index.d.mts +2 -0
  4. package/dist/atoms/animation/motion-div/motion-div.d.mts +7 -0
  5. package/dist/atoms/animation/motion-div/motion-div.mjs +37 -0
  6. package/dist/atoms/animation/motion-div/use-motion-div-store.mjs +17 -0
  7. package/dist/atoms/buttons/button/button.d.mts +8 -0
  8. package/dist/atoms/buttons/button/button.mjs +12 -0
  9. package/dist/atoms/buttons/button/index.d.mts +2 -0
  10. package/dist/atoms/buttons/switch/index.d.mts +2 -0
  11. package/dist/atoms/buttons/switch/switch.d.mts +10 -0
  12. package/dist/atoms/buttons/switch/switch.mjs +40 -0
  13. package/dist/atoms/buttons/switch/use-switch-store.mjs +7 -0
  14. package/dist/atoms/call-to-actions/call-to-action-external-with-tracking/call-to-action-external-with-tracking.d.mts +13 -0
  15. package/dist/atoms/call-to-actions/call-to-action-external-with-tracking/call-to-action-external-with-tracking.mjs +30 -0
  16. package/dist/atoms/call-to-actions/call-to-action-external-with-tracking/index.d.mts +2 -0
  17. package/dist/atoms/call-to-actions/call-to-action-internal-with-tracking/call-to-action-internal-with-tracking.d.mts +14 -0
  18. package/dist/atoms/call-to-actions/call-to-action-internal-with-tracking/call-to-action-internal-with-tracking.mjs +29 -0
  19. package/dist/atoms/call-to-actions/call-to-action-internal-with-tracking/index.d.mts +2 -0
  20. package/dist/atoms/chip/chip.d.mts +10 -0
  21. package/dist/atoms/chip/chip.mjs +10 -0
  22. package/dist/atoms/chip/index.d.mts +2 -0
  23. package/dist/atoms/effects/glassmorphism-background/glassmorphism-background.d.mts +8 -0
  24. package/dist/atoms/effects/glassmorphism-background/glassmorphism-background.mjs +33 -0
  25. package/dist/atoms/effects/glassmorphism-background/index.d.mts +2 -0
  26. package/dist/atoms/effects/glassmorphism-background/use-glassmorphism-background-store.mjs +17 -0
  27. package/dist/atoms/effects/image-glow/image-glow.d.mts +12 -0
  28. package/dist/atoms/effects/image-glow/image-glow.mjs +20 -0
  29. package/dist/atoms/effects/image-glow/index.d.mts +2 -0
  30. package/dist/atoms/effects/image-shimmer-placeholder/image-shimmer-placeholder.d.mts +6 -0
  31. package/dist/atoms/effects/image-shimmer-placeholder/image-shimmer-placeholder.mjs +22 -0
  32. package/dist/atoms/effects/image-shimmer-placeholder/index.d.mts +2 -0
  33. package/dist/atoms/effects/matrix-rain/matrix-rain/index.d.mts +2 -0
  34. package/dist/atoms/effects/matrix-rain/matrix-rain/matrix-2d-canvas/debounce.mjs +12 -0
  35. package/dist/atoms/effects/matrix-rain/matrix-rain/matrix-2d-canvas/matrix-2d-canvas.mjs +25 -0
  36. package/dist/atoms/effects/matrix-rain/matrix-rain/matrix-2d-canvas/use-matrix-2d-canvas-store.mjs +186 -0
  37. package/dist/atoms/effects/matrix-rain/matrix-rain/matrix-rain.d.mts +5 -0
  38. package/dist/atoms/effects/matrix-rain/matrix-rain/matrix-rain.mjs +68 -0
  39. package/dist/atoms/effects/matrix-rain/matrix-rain/use-matrix-rain-activity.mjs +40 -0
  40. package/dist/atoms/effects/matrix-rain/matrix-rain/use-matrix-rain-store.mjs +69 -0
  41. package/dist/atoms/effects/overlay/index.d.mts +2 -0
  42. package/dist/atoms/effects/overlay/overlay.d.mts +11 -0
  43. package/dist/atoms/effects/overlay/overlay.mjs +61 -0
  44. package/dist/atoms/effects/overlay/use-overlay-store.mjs +8 -0
  45. package/dist/atoms/effects/pills/index.d.mts +2 -0
  46. package/dist/atoms/effects/pills/pills.d.mts +10 -0
  47. package/dist/atoms/effects/pills/pills.mjs +121 -0
  48. package/dist/atoms/effects/pills/use-pills-store.mjs +17 -0
  49. package/dist/atoms/effects/plain-image/index.d.mts +2 -0
  50. package/dist/atoms/effects/plain-image/plain-image.d.mts +45 -0
  51. package/dist/atoms/effects/plain-image/plain-image.mjs +140 -0
  52. package/dist/atoms/effects/plain-image/use-plain-image-store.mjs +62 -0
  53. package/dist/atoms/icons/chat-icon/chat-icon.d.mts +4 -0
  54. package/dist/atoms/icons/chat-icon/chat-icon.mjs +13 -0
  55. package/dist/atoms/icons/copy-icon/copy-icon.d.mts +6 -0
  56. package/dist/atoms/icons/copy-icon/copy-icon.mjs +17 -0
  57. package/dist/atoms/icons/rounded-icon/index.d.mts +2 -0
  58. package/dist/atoms/icons/rounded-icon/rounded-icon.d.mts +8 -0
  59. package/dist/atoms/icons/rounded-icon/rounded-icon.mjs +8 -0
  60. package/dist/atoms/links/anchor-link/anchor-link.d.mts +31 -0
  61. package/dist/atoms/links/anchor-link/anchor-link.mjs +14 -0
  62. package/dist/atoms/links/anchor-link/index.d.mts +2 -0
  63. package/dist/atoms/links/external-link/external-link.d.mts +13 -0
  64. package/dist/atoms/links/external-link/external-link.mjs +29 -0
  65. package/dist/atoms/links/external-link/index.d.mts +2 -0
  66. package/dist/atoms/links/internal-link/index.d.mts +2 -0
  67. package/dist/atoms/links/internal-link/internal-link.d.mts +15 -0
  68. package/dist/atoms/links/internal-link/internal-link.mjs +12 -0
  69. package/dist/atoms/loader/loader/index.d.mts +2 -0
  70. package/dist/atoms/loader/loader/loader.d.mts +10 -0
  71. package/dist/atoms/loader/loader/loader.mjs +62 -0
  72. package/dist/atoms/typography/input-field/index.d.mts +2 -0
  73. package/dist/atoms/typography/input-field/input-field.d.mts +9 -0
  74. package/dist/atoms/typography/input-field/input-field.mjs +8 -0
  75. package/dist/atoms/typography/label/index.d.mts +2 -0
  76. package/dist/atoms/typography/label/label.d.mts +9 -0
  77. package/dist/atoms/typography/label/label.mjs +11 -0
  78. package/dist/atoms/typography/markdown/markdown-plugins.mjs +16 -0
  79. package/dist/atoms/typography/markdown/markdown.d.mts +7 -0
  80. package/dist/atoms/typography/markdown/markdown.mjs +23 -0
  81. package/dist/atoms/typography/markdown/use-markdown-store.mjs +24 -0
  82. package/dist/atoms/typography/terminal-blocks/index.d.mts +2 -0
  83. package/dist/atoms/typography/terminal-blocks/terminal-blocks.d.mts +13 -0
  84. package/dist/atoms/typography/terminal-blocks/terminal-blocks.mjs +42 -0
  85. package/dist/atoms/typography/textarea/index.d.mts +2 -0
  86. package/dist/atoms/typography/textarea/textarea.d.mts +9 -0
  87. package/dist/atoms/typography/textarea/textarea.mjs +8 -0
  88. package/dist/chart.d.mts +7 -0
  89. package/dist/chart.mjs +4 -0
  90. package/dist/command-palette.d.mts +6 -0
  91. package/dist/command-palette.mjs +5 -0
  92. package/dist/hooks/use-clipboard-available.d.mts +4 -0
  93. package/dist/hooks/use-clipboard-available.mjs +10 -0
  94. package/dist/hooks/use-device-capabilities.d.mts +10 -0
  95. package/dist/hooks/use-device-capabilities.mjs +30 -0
  96. package/dist/hooks/use-glassmorphism.d.mts +10 -0
  97. package/dist/hooks/use-glassmorphism.mjs +9 -0
  98. package/dist/hooks/use-in-view-list.d.mts +7 -0
  99. package/dist/hooks/use-in-view-list.mjs +63 -0
  100. package/dist/hooks/use-in-view.d.mts +9 -0
  101. package/dist/hooks/use-in-view.mjs +68 -0
  102. package/dist/hooks/use-is-ios.d.mts +4 -0
  103. package/dist/hooks/use-is-ios.mjs +7 -0
  104. package/dist/hooks/use-lock-body-scroll.d.mts +4 -0
  105. package/dist/hooks/use-lock-body-scroll.mjs +40 -0
  106. package/dist/hooks/use-matrix-settings-store.d.mts +5 -0
  107. package/dist/hooks/use-matrix-settings-store.mjs +15 -0
  108. package/dist/hooks/use-motion-store.d.mts +13 -0
  109. package/dist/hooks/use-motion-store.mjs +29 -0
  110. package/dist/hooks/use-os-modifier-key.d.mts +5 -0
  111. package/dist/hooks/use-os-modifier-key.mjs +15 -0
  112. package/dist/hooks/use-reading-progress.d.mts +8 -0
  113. package/dist/hooks/use-reading-progress.mjs +49 -0
  114. package/dist/hooks/use-reduced-motions.d.mts +4 -0
  115. package/dist/hooks/use-reduced-motions.mjs +10 -0
  116. package/dist/hooks/use-scroll-direction.d.mts +8 -0
  117. package/dist/hooks/use-scroll-direction.mjs +43 -0
  118. package/dist/hooks/use-typewriter.d.mts +15 -0
  119. package/dist/hooks/use-typewriter.mjs +89 -0
  120. package/dist/hooks/use-webgpu-supported.d.mts +4 -0
  121. package/dist/hooks/use-webgpu-supported.mjs +16 -0
  122. package/dist/index.d.mts +153 -0
  123. package/dist/index.mjs +88 -0
  124. package/dist/markdown.d.mts +2 -0
  125. package/dist/markdown.mjs +2 -0
  126. package/dist/molecules/accordion/accordion/accordion.d.mts +12 -0
  127. package/dist/molecules/accordion/accordion/accordion.mjs +130 -0
  128. package/dist/molecules/accordion/accordion/index.d.mts +2 -0
  129. package/dist/molecules/accordion/accordion/use-accordion-store.mjs +55 -0
  130. package/dist/molecules/breadcrumbs/breadcrumb/breadcrumb.d.mts +21 -0
  131. package/dist/molecules/breadcrumbs/breadcrumb/breadcrumb.mjs +186 -0
  132. package/dist/molecules/breadcrumbs/breadcrumb/index.d.mts +2 -0
  133. package/dist/molecules/breadcrumbs/breadcrumb/use-breadcrumb-store.mjs +29 -0
  134. package/dist/molecules/buttons/pagination-navigation/index.d.mts +2 -0
  135. package/dist/molecules/buttons/pagination-navigation/pagination-navigation.d.mts +11 -0
  136. package/dist/molecules/buttons/pagination-navigation/pagination-navigation.mjs +17 -0
  137. package/dist/molecules/buttons/pills-buttons/index.d.mts +2 -0
  138. package/dist/molecules/buttons/pills-buttons/pills-buttons.d.mts +10 -0
  139. package/dist/molecules/buttons/pills-buttons/pills-buttons.mjs +55 -0
  140. package/dist/molecules/buttons/segmented-control/segmented-control.d.mts +13 -0
  141. package/dist/molecules/buttons/segmented-control/segmented-control.mjs +46 -0
  142. package/dist/molecules/buttons/segmented-control/use-segmented-control-store.mjs +8 -0
  143. package/dist/molecules/buttons/social-contact/index.d.mts +2 -0
  144. package/dist/molecules/buttons/social-contact/social-contact.d.mts +10 -0
  145. package/dist/molecules/buttons/social-contact/social-contact.mjs +13 -0
  146. package/dist/molecules/buttons/tag/index.d.mts +2 -0
  147. package/dist/molecules/buttons/tag/tag.d.mts +17 -0
  148. package/dist/molecules/buttons/tag/tag.mjs +20 -0
  149. package/dist/molecules/buttons/terminal-button/index.d.mts +2 -0
  150. package/dist/molecules/buttons/terminal-button/terminal-button.d.mts +15 -0
  151. package/dist/molecules/buttons/terminal-button/terminal-button.mjs +38 -0
  152. package/dist/molecules/chart/chart-panel/chart-panel.d.mts +9 -0
  153. package/dist/molecules/chart/chart-panel/chart-panel.mjs +12 -0
  154. package/dist/molecules/chart/chart-panel/index.d.mts +2 -0
  155. package/dist/molecules/chart/chart-tooltip/chart-tooltip.d.mts +8 -0
  156. package/dist/molecules/chart/chart-tooltip/chart-tooltip.mjs +18 -0
  157. package/dist/molecules/chart/chart-tooltip/index.d.mts +2 -0
  158. package/dist/molecules/chart/donut-chart/donut-chart.d.mts +15 -0
  159. package/dist/molecules/chart/donut-chart/donut-chart.mjs +142 -0
  160. package/dist/molecules/chart/donut-chart/index.d.mts +2 -0
  161. package/dist/molecules/containers/content-container/content-container.d.mts +5 -0
  162. package/dist/molecules/containers/content-container/content-container.mjs +8 -0
  163. package/dist/molecules/containers/content-container/index.d.mts +2 -0
  164. package/dist/molecules/controls/control-slider/control-slider.d.mts +14 -0
  165. package/dist/molecules/controls/control-slider/control-slider.mjs +76 -0
  166. package/dist/molecules/controls/control-slider/index.d.mts +2 -0
  167. package/dist/molecules/controls/control-slider/use-control-slider-store.mjs +10 -0
  168. package/dist/molecules/effects/matrix-background/index.d.mts +2 -0
  169. package/dist/molecules/effects/matrix-background/matrix-background.d.mts +8 -0
  170. package/dist/molecules/effects/matrix-background/matrix-background.mjs +15 -0
  171. package/dist/molecules/effects/matrix-header-background/index.d.mts +2 -0
  172. package/dist/molecules/effects/matrix-header-background/matrix-header-background.d.mts +8 -0
  173. package/dist/molecules/effects/matrix-header-background/matrix-header-background.mjs +14 -0
  174. package/dist/molecules/effects/matrix-terminal/index.d.mts +2 -0
  175. package/dist/molecules/effects/matrix-terminal/matrix-terminal.d.mts +15 -0
  176. package/dist/molecules/effects/matrix-terminal/matrix-terminal.mjs +101 -0
  177. package/dist/molecules/effects/matrix-terminal/use-matrix-terminal-store.mjs +59 -0
  178. package/dist/molecules/form/filter-input/filter-input.d.mts +10 -0
  179. package/dist/molecules/form/filter-input/filter-input.mjs +35 -0
  180. package/dist/molecules/form/filter-input/index.d.mts +2 -0
  181. package/dist/molecules/form/form-error-summary/form-error-summary.d.mts +10 -0
  182. package/dist/molecules/form/form-error-summary/form-error-summary.mjs +71 -0
  183. package/dist/molecules/form/form-error-summary/index.d.mts +2 -0
  184. package/dist/molecules/form/form-field/form-field.d.mts +10 -0
  185. package/dist/molecules/form/form-field/form-field.mjs +60 -0
  186. package/dist/molecules/form/form-field/index.d.mts +2 -0
  187. package/dist/molecules/form/form-success-message/form-success-message.d.mts +8 -0
  188. package/dist/molecules/form/form-success-message/form-success-message.mjs +21 -0
  189. package/dist/molecules/form/form-success-message/index.d.mts +2 -0
  190. package/dist/molecules/form/form-textarea/form-textarea.d.mts +10 -0
  191. package/dist/molecules/form/form-textarea/form-textarea.mjs +60 -0
  192. package/dist/molecules/form/form-textarea/index.d.mts +2 -0
  193. package/dist/molecules/lightbox-image/index.d.mts +2 -0
  194. package/dist/molecules/lightbox-image/lightbox-image.d.mts +6 -0
  195. package/dist/molecules/lightbox-image/lightbox-image.mjs +49 -0
  196. package/dist/molecules/lightbox-image/use-lightbox-image-store.mjs +29 -0
  197. package/dist/molecules/links/pills-links/index.d.mts +2 -0
  198. package/dist/molecules/links/pills-links/pills-links.d.mts +13 -0
  199. package/dist/molecules/links/pills-links/pills-links.mjs +60 -0
  200. package/dist/molecules/menu/close/close.d.mts +8 -0
  201. package/dist/molecules/menu/close/close.mjs +9 -0
  202. package/dist/molecules/menu/close/index.d.mts +2 -0
  203. package/dist/molecules/menu/dropdown-menu/dropdown-menu.d.mts +25 -0
  204. package/dist/molecules/menu/dropdown-menu/dropdown-menu.mjs +143 -0
  205. package/dist/molecules/menu/dropdown-menu/index.d.mts +2 -0
  206. package/dist/molecules/menu/dropdown-menu/use-dropdown-menu-store.mjs +108 -0
  207. package/dist/molecules/menu/hamburger-menu/hamburger-menu.d.mts +8 -0
  208. package/dist/molecules/menu/hamburger-menu/hamburger-menu.mjs +9 -0
  209. package/dist/molecules/menu/hamburger-menu/index.d.mts +2 -0
  210. package/dist/molecules/menu/menu-item/index.d.mts +2 -0
  211. package/dist/molecules/menu/menu-item/menu-item.d.mts +16 -0
  212. package/dist/molecules/menu/menu-item/menu-item.mjs +65 -0
  213. package/dist/molecules/menu/menu-item/use-menu-item-store.mjs +10 -0
  214. package/dist/molecules/stat-card/index.d.mts +2 -0
  215. package/dist/molecules/stat-card/stat-card.d.mts +10 -0
  216. package/dist/molecules/stat-card/stat-card.mjs +21 -0
  217. package/dist/molecules/terminal-list-item/index.d.mts +2 -0
  218. package/dist/molecules/terminal-list-item/terminal-list-item.d.mts +9 -0
  219. package/dist/molecules/terminal-list-item/terminal-list-item.mjs +13 -0
  220. package/dist/molecules/terminal-progress-bar/index.d.mts +2 -0
  221. package/dist/molecules/terminal-progress-bar/terminal-progress-bar.d.mts +11 -0
  222. package/dist/molecules/terminal-progress-bar/terminal-progress-bar.mjs +20 -0
  223. package/dist/molecules/typography/page-title/index.d.mts +2 -0
  224. package/dist/molecules/typography/page-title/page-title.d.mts +5 -0
  225. package/dist/molecules/typography/page-title/page-title.mjs +8 -0
  226. package/dist/molecules/typography/paragraph-title-with-icon/index.d.mts +2 -0
  227. package/dist/molecules/typography/paragraph-title-with-icon/paragraph-title-with-icon.d.mts +8 -0
  228. package/dist/molecules/typography/paragraph-title-with-icon/paragraph-title-with-icon.mjs +13 -0
  229. package/dist/molecules/typography/section-heading/index.d.mts +2 -0
  230. package/dist/molecules/typography/section-heading/section-heading.d.mts +9 -0
  231. package/dist/molecules/typography/section-heading/section-heading.mjs +17 -0
  232. package/dist/molecules/video/self-hosted-video/index.d.mts +2 -0
  233. package/dist/molecules/video/self-hosted-video/self-hosted-video.d.mts +17 -0
  234. package/dist/molecules/video/self-hosted-video/self-hosted-video.mjs +39 -0
  235. package/dist/molecules/video/youtube/index.d.mts +2 -0
  236. package/dist/molecules/video/youtube/youtube.d.mts +9 -0
  237. package/dist/molecules/video/youtube/youtube.mjs +12 -0
  238. package/dist/organism/command-palette/command-palette/command-palette.d.mts +12 -0
  239. package/dist/organism/command-palette/command-palette/command-palette.mjs +148 -0
  240. package/dist/organism/command-palette/command-palette/index.d.mts +2 -0
  241. package/dist/organism/command-palette/command-palette/use-command-palette-store.mjs +121 -0
  242. package/dist/organism/command-palette/command-palette-group/command-palette-group.d.mts +9 -0
  243. package/dist/organism/command-palette/command-palette-group/command-palette-group.mjs +24 -0
  244. package/dist/organism/command-palette/command-palette-group/index.d.mts +2 -0
  245. package/dist/organism/command-palette/command-palette-item/command-palette-item.d.mts +11 -0
  246. package/dist/organism/command-palette/command-palette-item/command-palette-item.mjs +29 -0
  247. package/dist/organism/command-palette/command-palette-item/index.d.mts +2 -0
  248. package/dist/organism/command-palette/command-palette-item/use-command-palette-item-store.mjs +30 -0
  249. package/dist/organism/command-palette/index.d.mts +9 -0
  250. package/dist/organism/command-palette/toggle-motion-item/index.d.mts +2 -0
  251. package/dist/organism/command-palette/toggle-motion-item/toggle-motion-item.d.mts +8 -0
  252. package/dist/organism/command-palette/toggle-motion-item/toggle-motion-item.mjs +63 -0
  253. package/dist/organism/command-palette/toggle-motion-item/use-toggle-motion-item-store.mjs +45 -0
  254. package/dist/organism/cookie-consent-banner/cookie-consent-banner.d.mts +9 -0
  255. package/dist/organism/cookie-consent-banner/cookie-consent-banner.mjs +71 -0
  256. package/dist/organism/cookie-consent-banner/use-cookie-consent-banner-store.mjs +10 -0
  257. package/dist/organism/footer/footer.d.mts +26 -0
  258. package/dist/organism/footer/footer.mjs +193 -0
  259. package/dist/organism/footer/index.d.mts +3 -0
  260. package/dist/organism/footer/use-footer-store.d.mts +22 -0
  261. package/dist/organism/footer/use-footer-store.mjs +57 -0
  262. package/dist/organism/header/brand-header/brand-header.d.mts +14 -0
  263. package/dist/organism/header/brand-header/brand-header.mjs +132 -0
  264. package/dist/organism/header/brand-header/index.d.mts +2 -0
  265. package/dist/organism/image-carousel/fullscreen-modal/fullscreen-modal.mjs +148 -0
  266. package/dist/organism/image-carousel/fullscreen-modal/use-fullscreen-modal-store.mjs +129 -0
  267. package/dist/organism/image-carousel/image-carousel.d.mts +14 -0
  268. package/dist/organism/image-carousel/image-carousel.mjs +225 -0
  269. package/dist/organism/image-carousel/index.d.mts +2 -0
  270. package/dist/organism/image-carousel/navigation-buttons/navigation-buttons.mjs +22 -0
  271. package/dist/organism/image-carousel/navigation-buttons/use-navigation-buttons-store.mjs +18 -0
  272. package/dist/organism/image-carousel/page-indicators/page-indicator-button/page-indicator-button.mjs +14 -0
  273. package/dist/organism/image-carousel/page-indicators/page-indicator-button/use-page-indicator-button-store.mjs +11 -0
  274. package/dist/organism/image-carousel/page-indicators/page-indicators.mjs +20 -0
  275. package/dist/organism/image-carousel/use-image-carousel-store.mjs +88 -0
  276. package/dist/organism/lightbox/index.d.mts +2 -0
  277. package/dist/organism/lightbox/lightbox.d.mts +5 -0
  278. package/dist/organism/lightbox/lightbox.mjs +100 -0
  279. package/dist/organism/lightbox/use-lightbox-store.mjs +120 -0
  280. package/dist/organism/loading-bar/loading-bar.d.mts +7 -0
  281. package/dist/organism/loading-bar/loading-bar.mjs +48 -0
  282. package/dist/organism/loading-bar/use-loading-bar-store.mjs +52 -0
  283. package/dist/organism/menu/index.d.mts +3 -0
  284. package/dist/organism/menu/menu.d.mts +33 -0
  285. package/dist/organism/menu/menu.mjs +396 -0
  286. package/dist/organism/menu/use-menu-store.d.mts +22 -0
  287. package/dist/organism/menu/use-menu-store.mjs +265 -0
  288. package/dist/organism/profile-hero/index.d.mts +2 -0
  289. package/dist/organism/profile-hero/profile-hero.d.mts +15 -0
  290. package/dist/organism/profile-hero/profile-hero.mjs +72 -0
  291. package/dist/organism/profile-photo/index.d.mts +2 -0
  292. package/dist/organism/profile-photo/profile-photo.d.mts +12 -0
  293. package/dist/organism/profile-photo/profile-photo.mjs +17 -0
  294. package/dist/organism/reading-content-progress-bar/index.d.mts +2 -0
  295. package/dist/organism/reading-content-progress-bar/reading-content-progress-bar.d.mts +8 -0
  296. package/dist/organism/reading-content-progress-bar/reading-content-progress-bar.mjs +76 -0
  297. package/dist/organism/reading-content-progress-bar/use-reading-content-progress-bar-store.mjs +29 -0
  298. package/dist/organism/social-contacts/index.d.mts +2 -0
  299. package/dist/organism/social-contacts/social-contacts.d.mts +29 -0
  300. package/dist/organism/social-contacts/social-contacts.mjs +78 -0
  301. package/dist/state/command-palette/command-palette-context.d.mts +9 -0
  302. package/dist/state/command-palette/command-palette-context.mjs +10 -0
  303. package/dist/state/command-palette/command-palette-events.d.mts +11 -0
  304. package/dist/state/command-palette/command-palette-events.mjs +15 -0
  305. package/dist/state/command-palette/command-palette-trigger.d.mts +8 -0
  306. package/dist/state/lightbox/lightbox-events.d.mts +9 -0
  307. package/dist/state/lightbox/lightbox-events.mjs +7 -0
  308. package/dist/state/matrix-rain/matrix-settings.d.mts +37 -0
  309. package/dist/state/matrix-rain/matrix-settings.mjs +122 -0
  310. package/dist/state/motion/motion.d.mts +6 -0
  311. package/dist/state/motion/motion.mjs +17 -0
  312. package/package.json +160 -0
  313. package/src/styles/base.css +130 -0
  314. package/src/styles/components.css +57 -0
  315. package/src/styles/index.css +23 -0
  316. package/src/styles/pills.css +85 -0
  317. package/src/styles/theme.css +254 -0
@@ -0,0 +1,16 @@
1
+ import { LinkComponent } from "../../../atoms/links/anchor-link/anchor-link.mjs";
2
+ import "../../../atoms/links/anchor-link/index.mjs";
3
+ import { FC, ReactNode } from "react";
4
+ //#region src/molecules/menu/menu-item/menu-item.d.ts
5
+ type MenuItemProps = {
6
+ to: string;
7
+ linkComponent?: LinkComponent;
8
+ selected: boolean;
9
+ children?: ReactNode;
10
+ className?: string;
11
+ onClick?: () => void;
12
+ external?: boolean;
13
+ };
14
+ declare const MenuItem: FC<MenuItemProps>;
15
+ //#endregion
16
+ export { MenuItem, MenuItemProps };
@@ -0,0 +1,65 @@
1
+ "use client";
2
+ import { AnchorLink } from "../../../atoms/links/anchor-link/anchor-link.mjs";
3
+ import { useMenuItemStore } from "./use-menu-item-store.mjs";
4
+ import { c } from "react/compiler-runtime";
5
+ import { jsx } from "react/jsx-runtime";
6
+ //#region src/molecules/menu/menu-item/menu-item.tsx
7
+ const MenuItem = (t0) => {
8
+ const $ = c(17);
9
+ const { children, className, to, selected, onClick, external, linkComponent: t1 } = t0;
10
+ const Link = t1 === void 0 ? AnchorLink : t1;
11
+ const { effects } = useMenuItemStore();
12
+ const { handleClick } = effects;
13
+ const composedClassName = `relative transition-all duration-300 ${selected ? "text-accent" : "text-primary-text"} px-2 py-2 xs:px-6 xs:py-1 text-sm md:text-base text-shadow-md text-center no-underline ${`border border-solid rounded-xl ${selected ? "border-accent" : "border-transparent"}`} flex items-center justify-center ${selected ? "bg-accent-alpha-15" : "transparent"} hover:bg-accent-alpha-10 hover:text-accent hover:border-accent hover:transition-all hover:duration-300 hover:translate-y-[-1px] hover:shadow-lg${className ? ` ${className}` : ""}`;
14
+ if (external) {
15
+ let t2;
16
+ if ($[0] !== handleClick || $[1] !== onClick) {
17
+ t2 = handleClick(onClick);
18
+ $[0] = handleClick;
19
+ $[1] = onClick;
20
+ $[2] = t2;
21
+ } else t2 = $[2];
22
+ let t3;
23
+ if ($[3] !== children || $[4] !== composedClassName || $[5] !== t2 || $[6] !== to) {
24
+ t3 = /* @__PURE__ */ jsx("a", {
25
+ href: to,
26
+ target: "_blank",
27
+ rel: "noopener noreferrer",
28
+ className: composedClassName,
29
+ onClick: t2,
30
+ children
31
+ });
32
+ $[3] = children;
33
+ $[4] = composedClassName;
34
+ $[5] = t2;
35
+ $[6] = to;
36
+ $[7] = t3;
37
+ } else t3 = $[7];
38
+ return t3;
39
+ }
40
+ let t2;
41
+ if ($[8] !== handleClick || $[9] !== onClick) {
42
+ t2 = handleClick(onClick);
43
+ $[8] = handleClick;
44
+ $[9] = onClick;
45
+ $[10] = t2;
46
+ } else t2 = $[10];
47
+ let t3;
48
+ if ($[11] !== Link || $[12] !== children || $[13] !== composedClassName || $[14] !== t2 || $[15] !== to) {
49
+ t3 = /* @__PURE__ */ jsx(Link, {
50
+ href: to,
51
+ className: composedClassName,
52
+ onClick: t2,
53
+ children
54
+ });
55
+ $[11] = Link;
56
+ $[12] = children;
57
+ $[13] = composedClassName;
58
+ $[14] = t2;
59
+ $[15] = to;
60
+ $[16] = t3;
61
+ } else t3 = $[16];
62
+ return t3;
63
+ };
64
+ //#endregion
65
+ export { MenuItem };
@@ -0,0 +1,10 @@
1
+ "use client";
2
+ //#region src/molecules/menu/menu-item/use-menu-item-store.ts
3
+ const useMenuItemStore = () => {
4
+ const handleClick = (onClick) => () => {
5
+ onClick?.();
6
+ };
7
+ return { effects: { handleClick } };
8
+ };
9
+ //#endregion
10
+ export { useMenuItemStore };
@@ -0,0 +1,2 @@
1
+ import { StatCard, StatCardProps } from "./stat-card.mjs";
2
+ export { StatCard, type StatCardProps };
@@ -0,0 +1,10 @@
1
+ import { FC, ReactNode } from "react";
2
+ //#region src/molecules/stat-card/stat-card.d.ts
3
+ interface StatCardProps {
4
+ value: number | string;
5
+ label: string;
6
+ icon?: ReactNode;
7
+ }
8
+ declare const StatCard: FC<StatCardProps>;
9
+ //#endregion
10
+ export { StatCard, StatCardProps };
@@ -0,0 +1,21 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ //#region src/molecules/stat-card/stat-card.tsx
3
+ const StatCard = ({ value, label, icon }) => /* @__PURE__ */ jsxs("div", {
4
+ className: "glow-container flex min-h-30 min-w-0 flex-col items-center justify-between p-5",
5
+ children: [
6
+ icon && /* @__PURE__ */ jsx("span", {
7
+ className: "text-accent text-2xl mb-1",
8
+ children: icon
9
+ }),
10
+ /* @__PURE__ */ jsx("span", {
11
+ className: "text-accent text-shadow-lg w-full text-center text-2xl leading-none font-medium break-words tabular-nums sm:text-3xl md:text-4xl lg:text-6xl",
12
+ children: value
13
+ }),
14
+ /* @__PURE__ */ jsx("span", {
15
+ className: "text-accent text-base mt-2",
16
+ children: label
17
+ })
18
+ ]
19
+ });
20
+ //#endregion
21
+ export { StatCard };
@@ -0,0 +1,2 @@
1
+ import { TerminalListItem, TerminalListItemProps } from "./terminal-list-item.mjs";
2
+ export { TerminalListItem, type TerminalListItemProps };
@@ -0,0 +1,9 @@
1
+ import { FC } from "react";
2
+ //#region src/molecules/terminal-list-item/terminal-list-item.d.ts
3
+ interface TerminalListItemProps {
4
+ title: string;
5
+ description: string;
6
+ }
7
+ declare const TerminalListItem: FC<TerminalListItemProps>;
8
+ //#endregion
9
+ export { TerminalListItem, TerminalListItemProps };
@@ -0,0 +1,13 @@
1
+ import { TerminalLine } from "../../atoms/typography/terminal-blocks/terminal-blocks.mjs";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
+ //#region src/molecules/terminal-list-item/terminal-list-item.tsx
4
+ const TerminalListItem = ({ title, description }) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs(TerminalLine, { children: [
5
+ ">",
6
+ " ",
7
+ title
8
+ ] }), /* @__PURE__ */ jsx("p", {
9
+ className: "text-primary-text/60 ml-4 line-clamp-1 font-mono text-xs leading-tight",
10
+ children: description
11
+ })] });
12
+ //#endregion
13
+ export { TerminalListItem };
@@ -0,0 +1,2 @@
1
+ import { TerminalProgressBar } from "./terminal-progress-bar.mjs";
2
+ export { TerminalProgressBar };
@@ -0,0 +1,11 @@
1
+ import { FC } from "react";
2
+ //#region src/molecules/terminal-progress-bar/terminal-progress-bar.d.ts
3
+ interface TerminalProgressBarProps {
4
+ percentage: number;
5
+ loadingMessage: string;
6
+ completeMessage: string;
7
+ shouldReduceMotion?: boolean;
8
+ }
9
+ declare const TerminalProgressBar: FC<TerminalProgressBarProps>;
10
+ //#endregion
11
+ export { TerminalProgressBar };
@@ -0,0 +1,20 @@
1
+ import { Cursor, SuccessText, TerminalLine } from "../../atoms/typography/terminal-blocks/terminal-blocks.mjs";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
+ //#region src/molecules/terminal-progress-bar/terminal-progress-bar.tsx
4
+ const getBar = (percentage, length = 24) => {
5
+ const filled = Math.round(percentage / 100 * length);
6
+ const empty = length - filled;
7
+ return `[${"█".repeat(filled)}${"░".repeat(empty)}] ${percentage}%`;
8
+ };
9
+ const TerminalProgressBar = ({ percentage, loadingMessage, completeMessage, shouldReduceMotion = false }) => {
10
+ return /* @__PURE__ */ jsxs("div", {
11
+ className: "flex flex-col items-center justify-center",
12
+ children: [/* @__PURE__ */ jsx(TerminalLine, { children: percentage >= 100 ? /* @__PURE__ */ jsx(SuccessText, { children: `> ${completeMessage}` }) : /* @__PURE__ */ jsxs(Fragment, { children: [
13
+ `> ${loadingMessage}`,
14
+ " ",
15
+ !shouldReduceMotion ? /* @__PURE__ */ jsx(Cursor, {}) : null
16
+ ] }) }), /* @__PURE__ */ jsx(TerminalLine, { children: /* @__PURE__ */ jsx(SuccessText, { children: getBar(percentage) }) })]
17
+ });
18
+ };
19
+ //#endregion
20
+ export { TerminalProgressBar };
@@ -0,0 +1,2 @@
1
+ import { PageTitle } from "./page-title.mjs";
2
+ export { PageTitle };
@@ -0,0 +1,5 @@
1
+ import { FC, PropsWithChildren } from "react";
2
+ //#region src/molecules/typography/page-title/page-title.d.ts
3
+ declare const PageTitle: FC<PropsWithChildren>;
4
+ //#endregion
5
+ export { PageTitle };
@@ -0,0 +1,8 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ //#region src/molecules/typography/page-title/page-title.tsx
3
+ const PageTitle = ({ children }) => /* @__PURE__ */ jsx("h1", {
4
+ className: "mb-4",
5
+ children
6
+ });
7
+ //#endregion
8
+ export { PageTitle };
@@ -0,0 +1,2 @@
1
+ import { ParagraphTitleWithIcon } from "./paragraph-title-with-icon.mjs";
2
+ export { ParagraphTitleWithIcon };
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ //#region src/molecules/typography/paragraph-title-with-icon/paragraph-title-with-icon.d.ts
3
+ declare const ParagraphTitleWithIcon: React.FC<{
4
+ icon: React.ReactNode;
5
+ children: string;
6
+ }>;
7
+ //#endregion
8
+ export { ParagraphTitleWithIcon };
@@ -0,0 +1,13 @@
1
+ import "react";
2
+ import { jsxs } from "react/jsx-runtime";
3
+ //#region src/molecules/typography/paragraph-title-with-icon/paragraph-title-with-icon.tsx
4
+ const ParagraphTitleWithIcon = ({ icon, children }) => /* @__PURE__ */ jsxs("span", {
5
+ className: "flex items-center gap-2",
6
+ children: [
7
+ icon,
8
+ " ",
9
+ children
10
+ ]
11
+ });
12
+ //#endregion
13
+ export { ParagraphTitleWithIcon };
@@ -0,0 +1,2 @@
1
+ import { SectionHeading, SectionHeadingProps } from "./section-heading.mjs";
2
+ export { SectionHeading, type SectionHeadingProps };
@@ -0,0 +1,9 @@
1
+ import { FC } from "react";
2
+ //#region src/molecules/typography/section-heading/section-heading.d.ts
3
+ interface SectionHeadingProps {
4
+ title: string;
5
+ description?: string;
6
+ }
7
+ declare const SectionHeading: FC<SectionHeadingProps>;
8
+ //#endregion
9
+ export { SectionHeading, SectionHeadingProps };
@@ -0,0 +1,17 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ //#region src/molecules/typography/section-heading/section-heading.tsx
3
+ const SectionHeading = ({ title, description }) => /* @__PURE__ */ jsxs("div", {
4
+ className: "mb-5",
5
+ children: [/* @__PURE__ */ jsxs("h2", {
6
+ className: "text-accent text-shadow-md mb-1 text-lg font-bold",
7
+ children: [/* @__PURE__ */ jsx("span", {
8
+ "aria-hidden": "true",
9
+ children: ">\xA0"
10
+ }), title]
11
+ }), description && /* @__PURE__ */ jsx("p", {
12
+ className: "text-secondary mb-0 text-sm",
13
+ children: description
14
+ })]
15
+ });
16
+ //#endregion
17
+ export { SectionHeading };
@@ -0,0 +1,2 @@
1
+ import { SelfHostedVideo } from "./self-hosted-video.mjs";
2
+ export { SelfHostedVideo };
@@ -0,0 +1,17 @@
1
+ import { FC } from "react";
2
+ //#region src/molecules/video/self-hosted-video/self-hosted-video.d.ts
3
+ interface Props {
4
+ src: string;
5
+ poster?: string;
6
+ caption?: string;
7
+ captions?: string;
8
+ autoPlay?: boolean;
9
+ muted?: boolean;
10
+ onEnded?: () => void;
11
+ videoRef?: (el: HTMLVideoElement | null) => void;
12
+ ariaLabel?: string;
13
+ className?: string;
14
+ }
15
+ declare const SelfHostedVideo: FC<Props>;
16
+ //#endregion
17
+ export { SelfHostedVideo };
@@ -0,0 +1,39 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ //#region src/molecules/video/self-hosted-video/self-hosted-video.tsx
3
+ const DEFAULT_VIDEO_CLASS_NAME = "aspect-video w-full rounded-xl border border-solid border-accent-alpha-40 shadow-lg";
4
+ const SelfHostedVideo = ({ src, poster, caption, captions, autoPlay, muted, onEnded, videoRef, ariaLabel, className }) => {
5
+ const sourceSrc = poster || src.includes("#") ? src : `${src}#t=0.1`;
6
+ return /* @__PURE__ */ jsxs("figure", {
7
+ className: "my-4",
8
+ children: [/* @__PURE__ */ jsxs("video", {
9
+ ref: videoRef,
10
+ controls: true,
11
+ preload: "metadata",
12
+ playsInline: true,
13
+ autoPlay,
14
+ muted,
15
+ onEnded,
16
+ poster,
17
+ "aria-label": ariaLabel,
18
+ className: className ?? DEFAULT_VIDEO_CLASS_NAME,
19
+ children: [
20
+ /* @__PURE__ */ jsx("source", { src: sourceSrc }),
21
+ captions && /* @__PURE__ */ jsx("track", {
22
+ kind: "captions",
23
+ srcLang: "en",
24
+ label: "English",
25
+ src: captions
26
+ }),
27
+ "Your browser does not support the video tag.",
28
+ " ",
29
+ /* @__PURE__ */ jsx("a", {
30
+ href: src,
31
+ children: "Download the video"
32
+ }),
33
+ "."
34
+ ]
35
+ }), caption && /* @__PURE__ */ jsx("figcaption", { children: caption })]
36
+ });
37
+ };
38
+ //#endregion
39
+ export { SelfHostedVideo };
@@ -0,0 +1,2 @@
1
+ import { Youtube } from "./youtube.mjs";
2
+ export { Youtube };
@@ -0,0 +1,9 @@
1
+ import { FC } from "react";
2
+ //#region src/molecules/video/youtube/youtube.d.ts
3
+ interface Props {
4
+ videoId: string;
5
+ title?: string;
6
+ }
7
+ declare const Youtube: FC<Props>;
8
+ //#endregion
9
+ export { Youtube };
@@ -0,0 +1,12 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ //#region src/molecules/video/youtube/youtube.tsx
3
+ const Youtube = ({ videoId, title = "YouTube video" }) => /* @__PURE__ */ jsx("iframe", {
4
+ src: `https://www.youtube.com/embed/${videoId}`,
5
+ title,
6
+ loading: "lazy",
7
+ allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",
8
+ referrerPolicy: "strict-origin-when-cross-origin",
9
+ allowFullScreen: true
10
+ });
11
+ //#endregion
12
+ export { Youtube };
@@ -0,0 +1,12 @@
1
+ import { CommandPaletteTrigger } from "../../../state/command-palette/command-palette-trigger.mjs";
2
+ import { FC, ReactNode } from "react";
3
+ //#region src/organism/command-palette/command-palette/command-palette.d.ts
4
+ interface CommandPaletteProps {
5
+ placeholder?: string;
6
+ onOpenChange?: (open: boolean, trigger: CommandPaletteTrigger) => void;
7
+ onQueryChange?: (query: string) => void;
8
+ children: ReactNode;
9
+ }
10
+ declare const CommandPalette: FC<CommandPaletteProps>;
11
+ //#endregion
12
+ export { CommandPalette, CommandPaletteProps };
@@ -0,0 +1,148 @@
1
+ "use client";
2
+ import { useGlassmorphism } from "../../../hooks/use-glassmorphism.mjs";
3
+ import { Overlay } from "../../../atoms/effects/overlay/overlay.mjs";
4
+ import { CommandPaletteContext } from "../../../state/command-palette/command-palette-context.mjs";
5
+ import { useCommandPaletteStore } from "./use-command-palette-store.mjs";
6
+ import { c } from "react/compiler-runtime";
7
+ import { motion } from "framer-motion";
8
+ import { jsx, jsxs } from "react/jsx-runtime";
9
+ import { Command } from "cmdk";
10
+ //#region src/organism/command-palette/command-palette/command-palette.tsx
11
+ const CommandPalette = (t0) => {
12
+ const $ = c(22);
13
+ const { placeholder: t1, onOpenChange, onQueryChange, children } = t0;
14
+ const placeholder = t1 === void 0 ? "type to search_" : t1;
15
+ let t2;
16
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
17
+ t2 = { noScale: true };
18
+ $[0] = t2;
19
+ } else t2 = $[0];
20
+ const { glassmorphismClass } = useGlassmorphism(t2);
21
+ const { state, effects } = useCommandPaletteStore(onOpenChange, onQueryChange);
22
+ const { open } = state;
23
+ const { close, stopPropagation, handleQueryChange } = effects;
24
+ if (!open) return null;
25
+ const t3 = `${glassmorphismClass} w-full max-w-150 overflow-hidden`;
26
+ let t4;
27
+ let t5;
28
+ let t6;
29
+ if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
30
+ t4 = {
31
+ opacity: 0,
32
+ scale: .95,
33
+ y: -8
34
+ };
35
+ t5 = {
36
+ opacity: 1,
37
+ scale: 1,
38
+ y: 0
39
+ };
40
+ t6 = {
41
+ duration: .15,
42
+ ease: "easeOut"
43
+ };
44
+ $[1] = t4;
45
+ $[2] = t5;
46
+ $[3] = t6;
47
+ } else {
48
+ t4 = $[1];
49
+ t5 = $[2];
50
+ t6 = $[3];
51
+ }
52
+ let t7;
53
+ if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
54
+ t7 = /* @__PURE__ */ jsx("span", {
55
+ className: "text-accent shrink-0 font-mono text-sm font-bold text-shadow-md",
56
+ children: ">"
57
+ });
58
+ $[4] = t7;
59
+ } else t7 = $[4];
60
+ let t8;
61
+ if ($[5] !== handleQueryChange || $[6] !== placeholder) {
62
+ t8 = /* @__PURE__ */ jsxs("div", {
63
+ className: "border-accent/20 flex items-center gap-2 border-b px-4 py-3",
64
+ children: [t7, /* @__PURE__ */ jsx(Command.Input, {
65
+ className: "text-accent placeholder:text-accent/40 caret-accent flex-1 bg-transparent font-mono outline-none",
66
+ placeholder,
67
+ onValueChange: handleQueryChange,
68
+ autoFocus: true
69
+ })]
70
+ });
71
+ $[5] = handleQueryChange;
72
+ $[6] = placeholder;
73
+ $[7] = t8;
74
+ } else t8 = $[7];
75
+ let t9;
76
+ if ($[8] !== children || $[9] !== close) {
77
+ t9 = /* @__PURE__ */ jsx(Command.List, {
78
+ className: "max-h-[55vh] overflow-y-auto py-2",
79
+ children: /* @__PURE__ */ jsx(CommandPaletteContext.Provider, {
80
+ value: close,
81
+ children
82
+ })
83
+ });
84
+ $[8] = children;
85
+ $[9] = close;
86
+ $[10] = t9;
87
+ } else t9 = $[10];
88
+ let t10;
89
+ if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
90
+ t10 = /* @__PURE__ */ jsxs("div", {
91
+ className: "border-accent/20 text-accent/40 xs:flex hidden gap-6 border-t px-4 py-2 font-mono text-xs",
92
+ children: [
93
+ /* @__PURE__ */ jsx("span", { children: "↑↓ navigate" }),
94
+ /* @__PURE__ */ jsx("span", { children: "↵ select" }),
95
+ /* @__PURE__ */ jsx("span", { children: "esc close" })
96
+ ]
97
+ });
98
+ $[11] = t10;
99
+ } else t10 = $[11];
100
+ let t11;
101
+ if ($[12] !== t8 || $[13] !== t9) {
102
+ t11 = /* @__PURE__ */ jsxs(Command, {
103
+ shouldFilter: false,
104
+ className: "flex flex-col",
105
+ children: [
106
+ t8,
107
+ t9,
108
+ t10
109
+ ]
110
+ });
111
+ $[12] = t8;
112
+ $[13] = t9;
113
+ $[14] = t11;
114
+ } else t11 = $[14];
115
+ let t12;
116
+ if ($[15] !== stopPropagation || $[16] !== t11 || $[17] !== t3) {
117
+ t12 = /* @__PURE__ */ jsx("div", {
118
+ className: "flex min-h-screen items-start justify-center px-4 pt-[15vh]",
119
+ children: /* @__PURE__ */ jsx(motion.div, {
120
+ className: t3,
121
+ initial: t4,
122
+ animate: t5,
123
+ transition: t6,
124
+ onClick: stopPropagation,
125
+ children: t11
126
+ })
127
+ });
128
+ $[15] = stopPropagation;
129
+ $[16] = t11;
130
+ $[17] = t3;
131
+ $[18] = t12;
132
+ } else t12 = $[18];
133
+ let t13;
134
+ if ($[19] !== close || $[20] !== t12) {
135
+ t13 = /* @__PURE__ */ jsx(Overlay, {
136
+ delay: 0,
137
+ onClick: close,
138
+ className: "z-50",
139
+ children: t12
140
+ });
141
+ $[19] = close;
142
+ $[20] = t12;
143
+ $[21] = t13;
144
+ } else t13 = $[21];
145
+ return t13;
146
+ };
147
+ //#endregion
148
+ export { CommandPalette };
@@ -0,0 +1,2 @@
1
+ import { CommandPalette, CommandPaletteProps } from "./command-palette.mjs";
2
+ export { CommandPalette, type CommandPaletteProps };
@@ -0,0 +1,121 @@
1
+ "use client";
2
+ import { commandPaletteCloseEvent, commandPaletteOpenEvent } from "../../../state/command-palette/command-palette-events.mjs";
3
+ import { c } from "react/compiler-runtime";
4
+ import { useEffect, useState } from "react";
5
+ //#region src/organism/command-palette/command-palette/use-command-palette-store.ts
6
+ const useCommandPaletteStore = (onOpenChange, onQueryChange) => {
7
+ const $ = c(22);
8
+ const [open, setOpen] = useState(false);
9
+ let t0;
10
+ if ($[0] !== onOpenChange) {
11
+ t0 = (next, trigger) => {
12
+ setOpen(next);
13
+ onOpenChange?.(next, trigger);
14
+ };
15
+ $[0] = onOpenChange;
16
+ $[1] = t0;
17
+ } else t0 = $[1];
18
+ const changeOpen = t0;
19
+ let t1;
20
+ if ($[2] !== changeOpen) {
21
+ t1 = () => changeOpen(false, "dismiss");
22
+ $[2] = changeOpen;
23
+ $[3] = t1;
24
+ } else t1 = $[3];
25
+ const close = t1;
26
+ let t2;
27
+ let t3;
28
+ if ($[4] !== changeOpen || $[5] !== open) {
29
+ t2 = () => {
30
+ const handleKeyDown = (e) => {
31
+ if ((e.metaKey || e.ctrlKey) && e.key === "k") {
32
+ e.preventDefault();
33
+ changeOpen(!open, "shortcut");
34
+ }
35
+ };
36
+ const handleOpenEvent = () => changeOpen(true, "event");
37
+ const handleCloseEvent = () => changeOpen(false, "event");
38
+ window.addEventListener("keydown", handleKeyDown, true);
39
+ window.addEventListener(commandPaletteOpenEvent, handleOpenEvent);
40
+ window.addEventListener(commandPaletteCloseEvent, handleCloseEvent);
41
+ return () => {
42
+ window.removeEventListener("keydown", handleKeyDown, true);
43
+ window.removeEventListener(commandPaletteOpenEvent, handleOpenEvent);
44
+ window.removeEventListener(commandPaletteCloseEvent, handleCloseEvent);
45
+ };
46
+ };
47
+ t3 = [changeOpen, open];
48
+ $[4] = changeOpen;
49
+ $[5] = open;
50
+ $[6] = t2;
51
+ $[7] = t3;
52
+ } else {
53
+ t2 = $[6];
54
+ t3 = $[7];
55
+ }
56
+ useEffect(t2, t3);
57
+ let t4;
58
+ let t5;
59
+ if ($[8] !== changeOpen || $[9] !== open) {
60
+ t4 = () => {
61
+ if (!open) return;
62
+ const handleEsc = (e_0) => {
63
+ if (e_0.key === "Escape") changeOpen(false, "escape");
64
+ };
65
+ window.addEventListener("keydown", handleEsc, true);
66
+ return () => window.removeEventListener("keydown", handleEsc, true);
67
+ };
68
+ t5 = [open, changeOpen];
69
+ $[8] = changeOpen;
70
+ $[9] = open;
71
+ $[10] = t4;
72
+ $[11] = t5;
73
+ } else {
74
+ t4 = $[10];
75
+ t5 = $[11];
76
+ }
77
+ useEffect(t4, t5);
78
+ const stopPropagation = _temp;
79
+ let t6;
80
+ if ($[12] !== onQueryChange) {
81
+ t6 = (value) => {
82
+ onQueryChange?.(value.trim());
83
+ };
84
+ $[12] = onQueryChange;
85
+ $[13] = t6;
86
+ } else t6 = $[13];
87
+ const handleQueryChange = t6;
88
+ let t7;
89
+ if ($[14] !== open) {
90
+ t7 = { open };
91
+ $[14] = open;
92
+ $[15] = t7;
93
+ } else t7 = $[15];
94
+ let t8;
95
+ if ($[16] !== close || $[17] !== handleQueryChange) {
96
+ t8 = {
97
+ close,
98
+ stopPropagation,
99
+ handleQueryChange
100
+ };
101
+ $[16] = close;
102
+ $[17] = handleQueryChange;
103
+ $[18] = t8;
104
+ } else t8 = $[18];
105
+ let t9;
106
+ if ($[19] !== t7 || $[20] !== t8) {
107
+ t9 = {
108
+ state: t7,
109
+ effects: t8
110
+ };
111
+ $[19] = t7;
112
+ $[20] = t8;
113
+ $[21] = t9;
114
+ } else t9 = $[21];
115
+ return t9;
116
+ };
117
+ function _temp(e_1) {
118
+ return e_1.stopPropagation();
119
+ }
120
+ //#endregion
121
+ export { useCommandPaletteStore };