matrix-design-system 1.1.0 → 2.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 (136) hide show
  1. package/README.md +40 -1
  2. package/dist/atoms/animation/motion-div/motion-div.d.mts +2 -3
  3. package/dist/atoms/buttons/button/button.d.mts +2 -3
  4. package/dist/atoms/buttons/button/button.mjs +1 -1
  5. package/dist/atoms/buttons/switch/switch.d.mts +2 -3
  6. package/dist/atoms/buttons/switch/switch.mjs +2 -2
  7. package/dist/atoms/call-to-actions/call-to-action-external-with-tracking/call-to-action-external-with-tracking.d.mts +2 -3
  8. package/dist/atoms/call-to-actions/call-to-action-internal-with-tracking/call-to-action-internal-with-tracking.d.mts +3 -4
  9. package/dist/atoms/chip/chip.d.mts +3 -4
  10. package/dist/atoms/chip/chip.mjs +1 -1
  11. package/dist/atoms/effects/glassmorphism-background/glassmorphism-background.d.mts +2 -3
  12. package/dist/atoms/effects/image-glow/image-glow.d.mts +3 -4
  13. package/dist/atoms/effects/image-shimmer-placeholder/image-shimmer-placeholder.d.mts +2 -3
  14. package/dist/atoms/effects/matrix-rain/matrix-rain/matrix-rain.d.mts +2 -3
  15. package/dist/atoms/effects/overlay/overlay.d.mts +3 -4
  16. package/dist/atoms/effects/overlay/overlay.mjs +1 -1
  17. package/dist/atoms/effects/pills/pills.d.mts +4 -5
  18. package/dist/atoms/effects/plain-image/plain-image.d.mts +6 -7
  19. package/dist/atoms/icons/chat-icon/chat-icon.d.mts +2 -3
  20. package/dist/atoms/icons/chat-icon/chat-icon.mjs +1 -1
  21. package/dist/atoms/icons/copy-icon/copy-icon.d.mts +4 -5
  22. package/dist/atoms/icons/rounded-icon/rounded-icon.d.mts +2 -3
  23. package/dist/atoms/links/anchor-link/anchor-link.d.mts +5 -6
  24. package/dist/atoms/links/external-link/external-link.d.mts +2 -3
  25. package/dist/atoms/links/internal-link/internal-link.d.mts +3 -4
  26. package/dist/atoms/loader/loader/loader.d.mts +2 -3
  27. package/dist/atoms/loader/loader/loader.mjs +1 -1
  28. package/dist/atoms/typography/input-field/input-field.d.mts +2 -3
  29. package/dist/atoms/typography/label/label.d.mts +3 -4
  30. package/dist/atoms/typography/markdown/markdown.d.mts +3 -4
  31. package/dist/atoms/typography/terminal-blocks/terminal-blocks.d.mts +8 -9
  32. package/dist/atoms/typography/terminal-blocks/terminal-blocks.mjs +3 -3
  33. package/dist/atoms/typography/textarea/textarea.d.mts +2 -3
  34. package/dist/hooks/use-clipboard-available.d.mts +2 -3
  35. package/dist/hooks/use-device-capabilities.d.mts +2 -3
  36. package/dist/hooks/use-glassmorphism.d.mts +2 -3
  37. package/dist/hooks/use-in-view-list.d.mts +2 -3
  38. package/dist/hooks/use-in-view.d.mts +2 -3
  39. package/dist/hooks/use-is-ios.d.mts +2 -3
  40. package/dist/hooks/use-lock-body-scroll.d.mts +2 -3
  41. package/dist/hooks/use-matrix-settings-store.d.mts +2 -3
  42. package/dist/hooks/use-motion-store.d.mts +2 -3
  43. package/dist/hooks/use-os-modifier-key.d.mts +3 -4
  44. package/dist/hooks/use-reading-progress.d.mts +2 -3
  45. package/dist/hooks/use-reduced-motions.d.mts +2 -3
  46. package/dist/hooks/use-scroll-direction.d.mts +3 -4
  47. package/dist/hooks/use-typewriter.d.mts +3 -4
  48. package/dist/hooks/use-webgpu-supported.d.mts +2 -3
  49. package/dist/index.d.mts +5 -6
  50. package/dist/molecules/accordion/accordion/accordion.d.mts +2 -3
  51. package/dist/molecules/breadcrumbs/breadcrumb/breadcrumb.d.mts +4 -5
  52. package/dist/molecules/breadcrumbs/breadcrumb/breadcrumb.mjs +5 -5
  53. package/dist/molecules/buttons/pagination-navigation/pagination-navigation.d.mts +3 -4
  54. package/dist/molecules/buttons/pills-buttons/pills-buttons.d.mts +3 -4
  55. package/dist/molecules/buttons/pills-buttons/pills-buttons.mjs +2 -2
  56. package/dist/molecules/buttons/segmented-control/segmented-control.d.mts +3 -4
  57. package/dist/molecules/buttons/segmented-control/segmented-control.mjs +2 -2
  58. package/dist/molecules/buttons/social-contact/social-contact.d.mts +3 -4
  59. package/dist/molecules/buttons/tag/tag.d.mts +3 -4
  60. package/dist/molecules/buttons/terminal-button/terminal-button.d.mts +3 -4
  61. package/dist/molecules/buttons/terminal-button/terminal-button.mjs +2 -2
  62. package/dist/molecules/chart/chart-panel/chart-panel.d.mts +3 -4
  63. package/dist/molecules/chart/chart-tooltip/chart-tooltip.d.mts +3 -4
  64. package/dist/molecules/chart/donut-chart/donut-chart.d.mts +3 -4
  65. package/dist/molecules/chart/donut-chart/donut-chart.mjs +1 -1
  66. package/dist/molecules/containers/content-container/content-container.d.mts +2 -3
  67. package/dist/molecules/containers/content-container/content-container.mjs +1 -1
  68. package/dist/molecules/controls/control-slider/control-slider.d.mts +2 -3
  69. package/dist/molecules/controls/control-slider/control-slider.mjs +2 -2
  70. package/dist/molecules/effects/matrix-background/matrix-background.d.mts +2 -3
  71. package/dist/molecules/effects/matrix-background/matrix-background.mjs +3 -3
  72. package/dist/molecules/effects/matrix-header-background/matrix-header-background.d.mts +2 -3
  73. package/dist/molecules/effects/matrix-header-background/matrix-header-background.mjs +2 -2
  74. package/dist/molecules/effects/matrix-terminal/matrix-terminal.d.mts +2 -3
  75. package/dist/molecules/effects/matrix-terminal/matrix-terminal.mjs +1 -1
  76. package/dist/molecules/form/filter-input/filter-input.d.mts +3 -4
  77. package/dist/molecules/form/form-error-summary/form-error-summary.d.mts +3 -4
  78. package/dist/molecules/form/form-field/form-field.d.mts +3 -4
  79. package/dist/molecules/form/form-success-message/form-success-message.d.mts +3 -4
  80. package/dist/molecules/form/form-success-message/form-success-message.mjs +2 -2
  81. package/dist/molecules/form/form-textarea/form-textarea.d.mts +3 -4
  82. package/dist/molecules/lightbox-image/lightbox-image.d.mts +2 -3
  83. package/dist/molecules/links/pills-links/pills-links.d.mts +4 -5
  84. package/dist/molecules/menu/close/close.d.mts +2 -3
  85. package/dist/molecules/menu/close/close.mjs +1 -1
  86. package/dist/molecules/menu/dropdown-menu/dropdown-menu.d.mts +3 -4
  87. package/dist/molecules/menu/dropdown-menu/dropdown-menu.mjs +3 -3
  88. package/dist/molecules/menu/hamburger-menu/hamburger-menu.d.mts +2 -3
  89. package/dist/molecules/menu/menu-item/menu-item.d.mts +3 -4
  90. package/dist/molecules/stat-card/stat-card.d.mts +3 -4
  91. package/dist/molecules/stat-card/stat-card.mjs +3 -3
  92. package/dist/molecules/terminal-list-item/terminal-list-item.d.mts +3 -4
  93. package/dist/molecules/terminal-progress-bar/terminal-progress-bar.d.mts +2 -3
  94. package/dist/molecules/typography/page-title/page-title.d.mts +2 -3
  95. package/dist/molecules/typography/paragraph-title-with-icon/paragraph-title-with-icon.d.mts +2 -3
  96. package/dist/molecules/typography/section-heading/section-heading.d.mts +3 -4
  97. package/dist/molecules/typography/section-heading/section-heading.mjs +1 -1
  98. package/dist/molecules/video/self-hosted-video/self-hosted-video.d.mts +2 -3
  99. package/dist/molecules/video/self-hosted-video/self-hosted-video.mjs +1 -2
  100. package/dist/molecules/video/youtube/youtube.d.mts +2 -3
  101. package/dist/organism/command-palette/command-palette/command-palette.d.mts +3 -4
  102. package/dist/organism/command-palette/command-palette-group/command-palette-group.d.mts +3 -4
  103. package/dist/organism/command-palette/command-palette-item/command-palette-item.d.mts +3 -4
  104. package/dist/organism/command-palette/toggle-motion-item/toggle-motion-item.d.mts +3 -4
  105. package/dist/organism/cookie-consent-banner/cookie-consent-banner.d.mts +2 -3
  106. package/dist/organism/cookie-consent-banner/cookie-consent-banner.mjs +4 -4
  107. package/dist/organism/footer/footer.d.mts +12 -13
  108. package/dist/organism/footer/footer.mjs +77 -153
  109. package/dist/organism/footer/index.d.mts +3 -3
  110. package/dist/organism/footer/use-footer-store.d.mts +2 -11
  111. package/dist/organism/footer/use-footer-store.mjs +13 -31
  112. package/dist/organism/header/brand-header/brand-header.d.mts +3 -4
  113. package/dist/organism/header/brand-header/brand-header.mjs +1 -1
  114. package/dist/organism/image-carousel/fullscreen-modal/fullscreen-modal.mjs +1 -1
  115. package/dist/organism/image-carousel/image-carousel.d.mts +3 -4
  116. package/dist/organism/image-carousel/image-carousel.mjs +2 -2
  117. package/dist/organism/image-carousel/navigation-buttons/navigation-buttons.mjs +2 -2
  118. package/dist/organism/lightbox/lightbox.d.mts +2 -3
  119. package/dist/organism/loading-bar/loading-bar.d.mts +2 -3
  120. package/dist/organism/menu/index.d.mts +2 -3
  121. package/dist/organism/menu/menu.d.mts +23 -23
  122. package/dist/organism/menu/menu.mjs +135 -273
  123. package/dist/organism/menu/use-menu-store.mjs +67 -232
  124. package/dist/organism/profile-hero/profile-hero.d.mts +3 -4
  125. package/dist/organism/profile-photo/profile-photo.d.mts +3 -4
  126. package/dist/organism/profile-photo/profile-photo.mjs +1 -1
  127. package/dist/organism/reading-content-progress-bar/reading-content-progress-bar.d.mts +2 -3
  128. package/dist/organism/social-contacts/social-contacts.d.mts +4 -5
  129. package/dist/state/command-palette/command-palette-context.d.mts +3 -4
  130. package/dist/state/command-palette/command-palette-events.d.mts +5 -6
  131. package/dist/state/command-palette/command-palette-trigger.d.mts +2 -3
  132. package/dist/state/lightbox/lightbox-events.d.mts +4 -5
  133. package/dist/state/matrix-rain/matrix-settings.d.mts +9 -10
  134. package/dist/state/motion/motion.d.mts +4 -5
  135. package/package.json +26 -26
  136. package/dist/organism/menu/use-menu-store.d.mts +0 -22
@@ -1,14 +1,8 @@
1
1
  "use client";
2
2
  import { c } from "react/compiler-runtime";
3
3
  //#region src/organism/footer/use-footer-store.ts
4
- const useFooterStore = (navTracking, socialTracking) => {
5
- const $ = c(15);
6
- const onTrackHome = navTracking?.onTrackHome;
7
- const onTrackBlog = navTracking?.onTrackBlog;
8
- const onTrackArt = navTracking?.onTrackArt;
9
- const onTrackAboutMe = navTracking?.onTrackAboutMe;
10
- const onTrackArchive = navTracking?.onTrackArchive;
11
- const onTrackTags = navTracking?.onTrackTags;
4
+ const useFooterStore = (socialTracking) => {
5
+ const $ = c(9);
12
6
  const onTrackGithub = socialTracking?.onTrackGithub;
13
7
  const onTrackLinkedin = socialTracking?.onTrackLinkedin;
14
8
  const onTrackContact = socialTracking?.onTrackContact;
@@ -18,14 +12,8 @@ const useFooterStore = (navTracking, socialTracking) => {
18
12
  const onTrackFacebook = socialTracking?.onTrackFacebook;
19
13
  const onTrackInstagram = socialTracking?.onTrackInstagram;
20
14
  let t0;
21
- if ($[0] !== onTrackAboutMe || $[1] !== onTrackArchive || $[2] !== onTrackArt || $[3] !== onTrackBlog || $[4] !== onTrackContact || $[5] !== onTrackDevto || $[6] !== onTrackFacebook || $[7] !== onTrackGithub || $[8] !== onTrackHome || $[9] !== onTrackInstagram || $[10] !== onTrackLinkedin || $[11] !== onTrackMedium || $[12] !== onTrackTags || $[13] !== onTrackTwitter) {
15
+ if ($[0] !== onTrackContact || $[1] !== onTrackDevto || $[2] !== onTrackFacebook || $[3] !== onTrackGithub || $[4] !== onTrackInstagram || $[5] !== onTrackLinkedin || $[6] !== onTrackMedium || $[7] !== onTrackTwitter) {
22
16
  t0 = { effects: {
23
- onTrackHome,
24
- onTrackBlog,
25
- onTrackArt,
26
- onTrackAboutMe,
27
- onTrackArchive,
28
- onTrackTags,
29
17
  onTrackGithub,
30
18
  onTrackLinkedin,
31
19
  onTrackContact,
@@ -35,22 +23,16 @@ const useFooterStore = (navTracking, socialTracking) => {
35
23
  onTrackFacebook,
36
24
  onTrackInstagram
37
25
  } };
38
- $[0] = onTrackAboutMe;
39
- $[1] = onTrackArchive;
40
- $[2] = onTrackArt;
41
- $[3] = onTrackBlog;
42
- $[4] = onTrackContact;
43
- $[5] = onTrackDevto;
44
- $[6] = onTrackFacebook;
45
- $[7] = onTrackGithub;
46
- $[8] = onTrackHome;
47
- $[9] = onTrackInstagram;
48
- $[10] = onTrackLinkedin;
49
- $[11] = onTrackMedium;
50
- $[12] = onTrackTags;
51
- $[13] = onTrackTwitter;
52
- $[14] = t0;
53
- } else t0 = $[14];
26
+ $[0] = onTrackContact;
27
+ $[1] = onTrackDevto;
28
+ $[2] = onTrackFacebook;
29
+ $[3] = onTrackGithub;
30
+ $[4] = onTrackInstagram;
31
+ $[5] = onTrackLinkedin;
32
+ $[6] = onTrackMedium;
33
+ $[7] = onTrackTwitter;
34
+ $[8] = t0;
35
+ } else t0 = $[8];
54
36
  return t0;
55
37
  };
56
38
  //#endregion
@@ -2,13 +2,12 @@ import { ImageComponent, ImageSource } from "../../../atoms/effects/plain-image/
2
2
  import "../../../atoms/effects/plain-image/index.mjs";
3
3
  import { FC, PropsWithChildren } from "react";
4
4
  //#region src/organism/header/brand-header/brand-header.d.ts
5
- interface BrandHeaderProps {
5
+ export interface BrandHeaderProps {
6
6
  big: boolean;
7
7
  wrapper?: FC<PropsWithChildren>;
8
8
  /** Injected by the consumer: the design system ships no site assets of its own. */
9
9
  logo: ImageSource;
10
10
  imageComponent?: ImageComponent;
11
11
  }
12
- declare const BrandHeader: FC<BrandHeaderProps>;
13
- //#endregion
14
- export { BrandHeader, BrandHeaderProps };
12
+ export declare const BrandHeader: FC<BrandHeaderProps>;
13
+ //#endregion
@@ -37,7 +37,7 @@ const BrandHeader = (t0) => {
37
37
  $[2] = t4;
38
38
  } else t4 = $[2];
39
39
  const t5 = `flex items-center ${margins}`;
40
- const t6 = `${glassmorphismClass} w-full p-5 md:p-9 z-30`;
40
+ const t6 = `${glassmorphismClass} z-30 w-full p-5 md:p-9`;
41
41
  let t7;
42
42
  if ($[3] !== imageComponent || $[4] !== logo) {
43
43
  t7 = /* @__PURE__ */ jsx(ImageGlow, {
@@ -114,7 +114,7 @@ const FullscreenModal = (t0) => {
114
114
  let t8;
115
115
  if ($[24] !== stopPropagation || $[25] !== t6 || $[26] !== t7) {
116
116
  t8 = /* @__PURE__ */ jsxs("div", {
117
- className: "glow-container relative flex h-10/12 sm:h-full w-full max-w-11/12 sm:max-w-10/12 items-center bg-general-background justify-center overflow-hidden",
117
+ className: "glow-container bg-general-background relative flex h-10/12 w-full max-w-11/12 items-center justify-center overflow-hidden sm:h-full sm:max-w-10/12",
118
118
  onClick: stopPropagation,
119
119
  children: [t6, t7]
120
120
  });
@@ -2,13 +2,12 @@ import { ImageComponent } from "../../atoms/effects/plain-image/plain-image.mjs"
2
2
  import "../../atoms/effects/plain-image/index.mjs";
3
3
  import { FC } from "react";
4
4
  //#region src/organism/image-carousel/image-carousel.d.ts
5
- interface ImageCarouselProps {
5
+ export interface ImageCarouselProps {
6
6
  images: string[];
7
7
  alt: string;
8
8
  caption?: string;
9
9
  className?: string;
10
10
  imageComponent?: ImageComponent;
11
11
  }
12
- declare const ImageCarousel: FC<ImageCarouselProps>;
13
- //#endregion
14
- export { ImageCarousel, ImageCarouselProps };
12
+ export declare const ImageCarousel: FC<ImageCarouselProps>;
13
+ //#endregion
@@ -27,7 +27,7 @@ const ImageCarousel = (t0) => {
27
27
  alt,
28
28
  width: 800,
29
29
  height: 450,
30
- className: "h-96 w-full cursor-pointer object-contain bg-general-background-light overflow-hidden",
30
+ className: "bg-general-background-light h-96 w-full cursor-pointer overflow-hidden object-contain",
31
31
  onClick: openFullscreen
32
32
  });
33
33
  $[0] = Image;
@@ -107,7 +107,7 @@ const ImageCarousel = (t0) => {
107
107
  width: 800,
108
108
  height: 450,
109
109
  loading: index === 0 ? "eager" : "lazy",
110
- className: "h-96 w-full cursor-pointer object-contain bg-general-background-light overflow-hidden",
110
+ className: "bg-general-background-light h-96 w-full cursor-pointer overflow-hidden object-contain",
111
111
  onClick: openFullscreen,
112
112
  placeholder: imageShimmerPlaceholder
113
113
  })
@@ -8,12 +8,12 @@ const NavigationButtons = ({ onPrevious, onNext, stopPropagation = false }) => {
8
8
  const { handlePrevious, handleNext } = effects;
9
9
  return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Button, {
10
10
  onClick: handlePrevious,
11
- className: "absolute top-1/2 left-4 -translate-y-1/2 hidden md:flex",
11
+ className: "absolute top-1/2 left-4 hidden -translate-y-1/2 md:flex",
12
12
  "aria-label": "Previous image",
13
13
  children: /* @__PURE__ */ jsx(BiChevronLeft, { className: "size-10 md:size-12" })
14
14
  }), /* @__PURE__ */ jsx(Button, {
15
15
  onClick: handleNext,
16
- className: "absolute top-1/2 right-4 -translate-y-1/2 hidden md:flex",
16
+ className: "absolute top-1/2 right-4 hidden -translate-y-1/2 md:flex",
17
17
  "aria-label": "Next image",
18
18
  children: /* @__PURE__ */ jsx(BiChevronRight, { className: "size-10 md:size-12" })
19
19
  })] });
@@ -1,5 +1,4 @@
1
1
  import { FC } from "react";
2
2
  //#region src/organism/lightbox/lightbox.d.ts
3
- declare const Lightbox: FC;
4
- //#endregion
5
- export { Lightbox };
3
+ export declare const Lightbox: FC;
4
+ //#endregion
@@ -2,6 +2,5 @@
2
2
  interface LoadingBarProps {
3
3
  message?: string;
4
4
  }
5
- declare const LoadingBar: React.FC<LoadingBarProps>;
6
- //#endregion
7
- export { LoadingBar };
5
+ export declare const LoadingBar: React.FC<LoadingBarProps>;
6
+ //#endregion
@@ -1,3 +1,2 @@
1
- import { MenuTrackingCallbacks } from "./use-menu-store.mjs";
2
- import { Menu, MenuNavHrefs, MenuProps } from "./menu.mjs";
3
- export { Menu, type MenuNavHrefs, type MenuProps, type MenuTrackingCallbacks };
1
+ import { Menu, MenuDropdown, MenuEntry, MenuGroup, MenuLink, MenuProps } from "./menu.mjs";
2
+ export { Menu, type MenuDropdown, type MenuEntry, type MenuGroup, type MenuLink, type MenuProps };
@@ -1,33 +1,33 @@
1
1
  import { LinkComponent } from "../../atoms/links/anchor-link/anchor-link.mjs";
2
2
  import "../../atoms/links/anchor-link/index.mjs";
3
- import { MenuTrackingCallbacks } from "./use-menu-store.mjs";
4
3
  import { FC } from "react";
5
4
  //#region src/organism/menu/menu.d.ts
6
- interface MenuNavHrefs {
7
- blog: string;
8
- blogAuthors: string;
9
- blogAuthor: string;
10
- blogTags: string;
11
- blogArchive: string;
12
- blogStats: string;
13
- dsaRoadmap: string;
14
- dsaExercises: string;
15
- chat: string;
16
- mcp: string;
17
- easterEggHunt: string;
18
- aboutMe: string;
19
- art: string;
20
- videogames: string;
21
- contact: string;
5
+ export interface MenuLink {
6
+ label: string;
7
+ to: string;
8
+ external?: boolean;
9
+ onClick?: () => void;
10
+ /** Path prefixes that also mark this link selected (e.g. `/blog/author/`). */
11
+ activePathPrefixes?: string[];
22
12
  }
23
- interface MenuProps {
13
+ export interface MenuGroup {
14
+ label: string;
15
+ items: MenuLink[];
16
+ }
17
+ export interface MenuDropdown {
18
+ label: string;
19
+ groups: MenuGroup[];
20
+ }
21
+ export type MenuEntry = MenuLink | MenuDropdown;
22
+ export interface MenuProps {
24
23
  linkComponent?: LinkComponent;
25
24
  /** The path currently being viewed, used to mark the active entry. Injected by the consumer's router. */
26
25
  currentPath: string;
27
- navHrefs: MenuNavHrefs;
26
+ /** The navigation tree, in display order: top-level links and dropdowns of grouped links. */
27
+ entries: MenuEntry[];
28
+ /** Paths on which the menu never hides on scroll. */
29
+ pinnedOnPaths?: string[];
28
30
  onPaletteTrigger?: () => void;
29
- tracking?: MenuTrackingCallbacks;
30
31
  }
31
- declare const Menu: FC<MenuProps>;
32
- //#endregion
33
- export { Menu, MenuNavHrefs, MenuProps };
32
+ export declare const Menu: FC<MenuProps>;
33
+ //#endregion