this.gui 1.3.41 → 1.3.42
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/package.json +3 -2
- package/src/GUI.tsx +46 -0
- package/src/QRouter/QRegistry.tsx +53 -0
- package/src/QRouter/QRouter.stories.tsx +31 -0
- package/src/QRouter/QRouter.tsx +57 -0
- package/src/gui/Theme/GuiProvider.tsx +111 -0
- package/src/gui/Theme/Icon/Icon.resolver.tsx +29 -0
- package/src/gui/Theme/Icon/Icon.tsx +43 -0
- package/src/gui/Theme/Layout/Content/Content.resolver.tsx +0 -0
- package/src/gui/Theme/Layout/Content/Content.stories.tsx +88 -0
- package/src/gui/Theme/Layout/Content/Content.tsx +53 -0
- package/src/gui/Theme/Layout/Content/Content.types.tsx +40 -0
- package/src/gui/Theme/Layout/Footer/Footer.resolver.tsx +45 -0
- package/src/gui/Theme/Layout/Footer/Footer.stories.tsx +205 -0
- package/src/gui/Theme/Layout/Footer/Footer.tsx +337 -0
- package/src/gui/Theme/Layout/Footer/Footer.types.ts +40 -0
- package/src/gui/Theme/Layout/Layout/Layout.resolver.tsx +37 -0
- package/src/gui/Theme/Layout/Layout/Layout.stories.tsx +289 -0
- package/src/gui/Theme/Layout/Layout/Layout.tsx +117 -0
- package/src/gui/Theme/Layout/Layout/Layout.types.ts +57 -0
- package/src/gui/Theme/Layout/Layout/useLayoutBreakpoints.ts +9 -0
- package/src/gui/Theme/Layout/Namespace/Namespace.stories.tsx +105 -0
- package/src/gui/Theme/Layout/Namespace/Namespace.tsx +26 -0
- package/src/gui/Theme/Layout/Sidebars/LeftSidebar/LeftSidebar.resolver.tsx +87 -0
- package/src/gui/Theme/Layout/Sidebars/LeftSidebar/LeftSidebar.stories.tsx +199 -0
- package/src/gui/Theme/Layout/Sidebars/LeftSidebar/LeftSidebar.tsx +311 -0
- package/src/gui/Theme/Layout/Sidebars/LeftSidebar/LeftSidebar.types.ts +41 -0
- package/src/gui/Theme/Layout/Sidebars/LeftSidebar/SidebarToggleButton.tsx +53 -0
- package/src/gui/Theme/Layout/Sidebars/LeftSidebar/components/LeftSidebarAction/LeftSidebarAction.resolver.tsx +19 -0
- package/src/gui/Theme/Layout/Sidebars/LeftSidebar/components/LeftSidebarAction/LeftSidebarAction.tsx +107 -0
- package/src/gui/Theme/Layout/Sidebars/LeftSidebar/components/LeftSidebarLink/LeftSidebarLink.resolver.tsx +0 -0
- package/src/gui/Theme/Layout/Sidebars/LeftSidebar/components/LeftSidebarLink/LeftSidebarLink.tsx +134 -0
- package/src/gui/Theme/Layout/Sidebars/LeftSidebar/components/LeftSidebarLink/LeftSidebarLink.types.ts +15 -0
- package/src/gui/Theme/Layout/Sidebars/LeftSidebar/components/LeftSidebarMenu/LeftSidebarMenu.tsx +142 -0
- package/src/gui/Theme/Layout/Sidebars/LeftSidebar/components/LeftSidebarToggleButton/LeftSidebarToggleButton.tsx +23 -0
- package/src/gui/Theme/Layout/Sidebars/RightSidebar/RightSidebar.resolver.tsx +35 -0
- package/src/gui/Theme/Layout/Sidebars/RightSidebar/RightSidebar.stories.tsx +239 -0
- package/src/gui/Theme/Layout/Sidebars/RightSidebar/RightSidebar.tsx +319 -0
- package/src/gui/Theme/Layout/Sidebars/RightSidebar/RightSidebar.types.ts +17 -0
- package/src/gui/Theme/Layout/Sidebars/RightSidebar/components/RightSidebarAction/RightSidebarAction.tsx +102 -0
- package/src/gui/Theme/Layout/Sidebars/RightSidebar/components/RightSidebarLink/RightSidebarLink.tsx +132 -0
- package/src/gui/Theme/Layout/Sidebars/RightSidebar/components/RightSidebarMenu/RightSidebarMenu.tsx +140 -0
- package/src/gui/Theme/Layout/Sidebars/RightSidebar/components/RightSidebarToggleButton/RightSidebarToggleButton.tsx +22 -0
- package/src/gui/Theme/Layout/StickyOptions/StickyOptionsTop.stories.tsx +469 -0
- package/src/gui/Theme/Layout/StickyOptions/StickyOptionsTop.tsx +489 -0
- package/src/gui/Theme/Layout/TopBar/TopBar.resolver.tsx +86 -0
- package/src/gui/Theme/Layout/TopBar/TopBar.stories.tsx +350 -0
- package/src/gui/Theme/Layout/TopBar/TopBar.tsx +292 -0
- package/src/gui/Theme/Layout/TopBar/TopBar.types.ts +39 -0
- package/src/gui/Theme/Layout/TopBar/components/TopBarAction/TopBarAction.stories.tsx +83 -0
- package/src/gui/Theme/Layout/TopBar/components/TopBarAction/TopBarAction.tsx +18 -0
- package/src/gui/Theme/Layout/TopBar/components/TopBarAction/TopBarAction.types.ts +4 -0
- package/src/gui/Theme/Layout/TopBar/components/TopBarLink/TopBarLink.stories.tsx +189 -0
- package/src/gui/Theme/Layout/TopBar/components/TopBarLink/TopBarLink.tsx +30 -0
- package/src/gui/Theme/Layout/TopBar/components/TopBarLink/TopBarLink.types.ts +9 -0
- package/src/gui/Theme/Layout/TopBar/components/TopBarMenu/TopBarMenu.resolver.tsx +14 -0
- package/src/gui/Theme/Layout/TopBar/components/TopBarMenu/TopBarMenu.stories.tsx +56 -0
- package/src/gui/Theme/Layout/TopBar/components/TopBarMenu/TopBarMenu.tsx +123 -0
- package/src/gui/Theme/Layout/TopBar/components/TopBarMenu/TopBarMenu.types.ts +44 -0
- package/src/gui/Theme/catalog/CherryByte/CherryByte.png +0 -0
- package/src/gui/Theme/catalog/CherryByte/dark.tokens.ts +47 -0
- package/src/gui/Theme/catalog/CherryByte/light.tokens.ts +47 -0
- package/src/gui/Theme/catalog/CherryByte/manifest.ts +24 -0
- package/src/gui/Theme/catalog/GhostShell/dark.tokens.ts +43 -0
- package/src/gui/Theme/catalog/GhostShell/ghost.png +0 -0
- package/src/gui/Theme/catalog/GhostShell/light.tokens.ts +39 -0
- package/src/gui/Theme/catalog/GhostShell/manifest.ts +24 -0
- package/src/gui/Theme/catalog/LunaHex/LunaHex.png +0 -0
- package/src/gui/Theme/catalog/LunaHex/dark.tokens.ts +34 -0
- package/src/gui/Theme/catalog/LunaHex/light.tokens.ts +74 -0
- package/src/gui/Theme/catalog/LunaHex/manifest.ts +24 -0
- package/src/gui/Theme/catalog/MUI/MUI.png +0 -0
- package/src/gui/Theme/catalog/MUI/dark.tokens.ts +58 -0
- package/src/gui/Theme/catalog/MUI/light.tokens.ts +74 -0
- package/src/gui/Theme/catalog/MUI/manifest.ts +24 -0
- package/src/gui/Theme/catalog/PrinceOfDarkness/dark.tokens.ts +48 -0
- package/src/gui/Theme/catalog/PrinceOfDarkness/light.tokens.ts +47 -0
- package/src/gui/Theme/catalog/PrinceOfDarkness/manifest.ts +24 -0
- package/src/gui/Theme/catalog/PrinceOfDarkness/prince.png +0 -0
- package/src/gui/Theme/catalog/PrinceOfDarkness/princeOfDarkness.png +0 -0
- package/src/gui/Theme/catalog/Seafoam/dark.tokens.ts +49 -0
- package/src/gui/Theme/catalog/Seafoam/light.tokens.ts +47 -0
- package/src/gui/Theme/catalog/Seafoam/manifest.ts +24 -0
- package/src/gui/Theme/catalog/Seafoam/seaFoam.png +0 -0
- package/src/gui/Theme/catalog/neurons/dark.tokens.ts +58 -0
- package/src/gui/Theme/catalog/neurons/light.tokens.ts +74 -0
- package/src/gui/Theme/catalog/neurons/manifest.ts +24 -0
- package/src/gui/Theme/catalog/neurons/neurons.me.png +0 -0
- package/src/gui/Theme/fromTokens.ts +272 -0
- package/src/gui/Theme/gui.css +31 -0
- package/src/gui/Theme/index.ts +17 -0
- package/src/gui/Theme/styles/buildShadows.ts +83 -0
- package/src/gui/Theme/styles/theme.tokens.ts +108 -0
- package/src/gui/Theme/utils/catalog.ts +61 -0
- package/src/gui/Theme/utils/persistence.ts +66 -0
- package/src/gui/Theme/utils/themeUtils.ts +34 -0
- package/src/gui/components/atoms/AppBar/AppBar.resolver.tsx +46 -0
- package/src/gui/components/atoms/AppBar/AppBar.stories.tsx +251 -0
- package/src/gui/components/atoms/AppBar/AppBar.tsx +107 -0
- package/src/gui/components/atoms/AppBar/AppBar.types.ts +28 -0
- package/src/gui/components/atoms/Avatar/Avatar.resolver.tsx +61 -0
- package/src/gui/components/atoms/Avatar/Avatar.stories.tsx +36 -0
- package/src/gui/components/atoms/Avatar/Avatar.tsx +14 -0
- package/src/gui/components/atoms/Box/Box.resolver.tsx +171 -0
- package/src/gui/components/atoms/Box/Box.stories.tsx +263 -0
- package/src/gui/components/atoms/Box/Box.tsx +15 -0
- package/src/gui/components/atoms/Button/Button.resolver.tsx +103 -0
- package/src/gui/components/atoms/Button/Button.stories.tsx +219 -0
- package/src/gui/components/atoms/Button/Button.tsx +40 -0
- package/src/gui/components/atoms/Card/Card.resolver.tsx +63 -0
- package/src/gui/components/atoms/Card/Card.stories.tsx +54 -0
- package/src/gui/components/atoms/Card/Card.tsx +13 -0
- package/src/gui/components/atoms/CardActions/CardActions.resolver.tsx +59 -0
- package/src/gui/components/atoms/CardActions/CardActions.stories.tsx +32 -0
- package/src/gui/components/atoms/CardActions/CardActions.tsx +14 -0
- package/src/gui/components/atoms/CardContent/CardContent.resolver.tsx +60 -0
- package/src/gui/components/atoms/CardContent/CardContent.stories.tsx +34 -0
- package/src/gui/components/atoms/CardContent/CardContent.tsx +13 -0
- package/src/gui/components/atoms/CardHeader/CardHeader.resolver.tsx +68 -0
- package/src/gui/components/atoms/CardHeader/CardHeader.stories.tsx +40 -0
- package/src/gui/components/atoms/CardHeader/CardHeader.tsx +12 -0
- package/src/gui/components/atoms/Collapse/Collapse.resolver.tsx +85 -0
- package/src/gui/components/atoms/Collapse/Collapse.stories.tsx +130 -0
- package/src/gui/components/atoms/Collapse/Collapse.tsx +17 -0
- package/src/gui/components/atoms/Divider/Divider.resolver.tsx +95 -0
- package/src/gui/components/atoms/Divider/Divider.stories.tsx +108 -0
- package/src/gui/components/atoms/Divider/Divider.tsx +14 -0
- package/src/gui/components/atoms/Drawer/Drawer.resolver.tsx +116 -0
- package/src/gui/components/atoms/Drawer/Drawer.stories.tsx +223 -0
- package/src/gui/components/atoms/Drawer/Drawer.tsx +25 -0
- package/src/gui/components/atoms/Grid/Grid.resolver.tsx +33 -0
- package/src/gui/components/atoms/Grid/Grid.stories.tsx +136 -0
- package/src/gui/components/atoms/Grid/Grid.tsx +15 -0
- package/src/gui/components/atoms/Grid/Grid.types.ts +9 -0
- package/src/gui/components/atoms/IconButton/IconButton.resolver.tsx +137 -0
- package/src/gui/components/atoms/IconButton/IconButton.stories.tsx +134 -0
- package/src/gui/components/atoms/IconButton/IconButton.tsx +22 -0
- package/src/gui/components/atoms/Link/Link.resolver.tsx +74 -0
- package/src/gui/components/atoms/Link/Link.stories.tsx +157 -0
- package/src/gui/components/atoms/Link/Link.tsx +36 -0
- package/src/gui/components/atoms/List/List.resolver.tsx +94 -0
- package/src/gui/components/atoms/List/List.stories.tsx +137 -0
- package/src/gui/components/atoms/List/List.tsx +20 -0
- package/src/gui/components/atoms/ListItem/ListItem.resolver.tsx +88 -0
- package/src/gui/components/atoms/ListItem/ListItem.stories.tsx +151 -0
- package/src/gui/components/atoms/ListItem/ListItem.tsx +19 -0
- package/src/gui/components/atoms/ListItemButton/ListItemButton.resolver.tsx +214 -0
- package/src/gui/components/atoms/ListItemButton/ListItemButton.stories.tsx +155 -0
- package/src/gui/components/atoms/ListItemButton/ListItemButton.tsx +15 -0
- package/src/gui/components/atoms/ListItemIcon/ListItemIcon.resolver.tsx +102 -0
- package/src/gui/components/atoms/ListItemIcon/ListItemIcon.stories.tsx +132 -0
- package/src/gui/components/atoms/ListItemIcon/ListItemIcon.tsx +11 -0
- package/src/gui/components/atoms/ListItemText/ListItemText.resolver.tsx +112 -0
- package/src/gui/components/atoms/ListItemText/ListItemText.stories.tsx +156 -0
- package/src/gui/components/atoms/ListItemText/ListItemText.tsx +15 -0
- package/src/gui/components/atoms/Menu/Menu.resolver.tsx +112 -0
- package/src/gui/components/atoms/Menu/Menu.stories.tsx +162 -0
- package/src/gui/components/atoms/Menu/Menu.tsx +17 -0
- package/src/gui/components/atoms/MenuItem/MenuItem.resolver.tsx +183 -0
- package/src/gui/components/atoms/MenuItem/MenuItem.stories.tsx +134 -0
- package/src/gui/components/atoms/MenuItem/MenuItem.tsx +14 -0
- package/src/gui/components/atoms/Paper/Paper.resolver.tsx +98 -0
- package/src/gui/components/atoms/Paper/Paper.stories.tsx +184 -0
- package/src/gui/components/atoms/Paper/Paper.tsx +15 -0
- package/src/gui/components/atoms/Section/Section.resolver.tsx +10 -0
- package/src/gui/components/atoms/Section/Section.stories.tsx +189 -0
- package/src/gui/components/atoms/Section/Section.tsx +76 -0
- package/src/gui/components/atoms/Section/Section.types.tsx +24 -0
- package/src/gui/components/atoms/Stack/Stack.resolver.tsx +94 -0
- package/src/gui/components/atoms/Stack/Stack.stories.tsx +160 -0
- package/src/gui/components/atoms/Stack/Stack.tsx +15 -0
- package/src/gui/components/atoms/Surface/Surface.resolver.tsx +37 -0
- package/src/gui/components/atoms/Surface/Surface.tsx +49 -0
- package/src/gui/components/atoms/Surface/Surface.types.ts +20 -0
- package/src/gui/components/atoms/Switch/Switch.resolver.tsx +53 -0
- package/src/gui/components/atoms/Switch/Switch.stories.tsx +236 -0
- package/src/gui/components/atoms/Switch/Switch.tsx +22 -0
- package/src/gui/components/atoms/Table/Body/TableBody.tsx +7 -0
- package/src/gui/components/atoms/Table/Cell/TableCell.tsx +18 -0
- package/src/gui/components/atoms/Table/Head/TableHead.tsx +9 -0
- package/src/gui/components/atoms/Table/Row/TableRow.tsx +20 -0
- package/src/gui/components/atoms/Table/Table.resolver.tsx +77 -0
- package/src/gui/components/atoms/Table/Table.stories.tsx +173 -0
- package/src/gui/components/atoms/Table/Table.tsx +20 -0
- package/src/gui/components/atoms/TextField/TextField.stories.tsx +25 -0
- package/src/gui/components/atoms/TextField/TextField.tsx +15 -0
- package/src/gui/components/atoms/Toolbar/Toolbar.resolver.tsx +60 -0
- package/src/gui/components/atoms/Toolbar/Toolbar.stories.tsx +155 -0
- package/src/gui/components/atoms/Toolbar/Toolbar.tsx +16 -0
- package/src/gui/components/atoms/Tooltip/Tooltip.resolver.tsx +142 -0
- package/src/gui/components/atoms/Tooltip/Tooltip.stories.tsx +117 -0
- package/src/gui/components/atoms/Tooltip/Tooltip.tsx +70 -0
- package/src/gui/components/atoms/Typography/Typography.resolver.tsx +158 -0
- package/src/gui/components/atoms/Typography/Typography.stories.tsx +222 -0
- package/src/gui/components/atoms/Typography/Typography.tsx +27 -0
- package/src/gui/components/atoms/Window/Nodes/node.ts +0 -0
- package/src/gui/components/atoms/Window/code/block/node.tsx +0 -0
- package/src/gui/components/atoms/Window/code/hugging.face.api.ts +11 -0
- package/src/gui/components/atoms/Window/connectors/index.ts +19 -0
- package/src/gui/components/atoms/Window/window.stories.tsx +20 -0
- package/src/gui/components/atoms/Window/window.tsx +636 -0
- package/src/gui/components/atoms/atoms.tsx +151 -0
- package/src/gui/components/atoms/index.ts +2 -0
- package/src/gui/components/generics/Cards/Gridme.jsx +52 -0
- package/src/gui/components/generics/Cards/LilBox.jsx +65 -0
- package/src/gui/components/generics/Cards/ModuleCard.jsx +106 -0
- package/src/gui/components/generics/Chats/FullChatBot.jsx +223 -0
- package/src/gui/components/generics/Code/CodeBlock.jsx +33 -0
- package/src/gui/components/generics/EmojiCursor/EmojiCursor.stories.tsx +153 -0
- package/src/gui/components/generics/EmojiCursor/EmojiCursor.tsx +23 -0
- package/src/gui/components/generics/Feedback/Callout.jsx +92 -0
- package/src/gui/components/generics/Layout/GridX.jsx +29 -0
- package/src/gui/components/generics/Layout/Hero2.jsx +132 -0
- package/src/gui/components/generics/Layout/PageContainer.jsx +29 -0
- package/src/gui/components/generics/Layout/PageDivider.jsx +20 -0
- package/src/gui/components/generics/Layout/Section.jsx +43 -0
- package/src/gui/components/generics/Layout/SectionHeader.jsx +21 -0
- package/src/gui/components/generics/Media/Img.jsx +58 -0
- package/src/gui/components/generics/Media/VideoEmbed.jsx +51 -0
- package/src/gui/components/generics/Organization/TableOfContents.jsx +51 -0
- package/src/gui/components/generics/Organization/Tabs.jsx +45 -0
- package/src/gui/components/generics/Text/TextList.jsx +41 -0
- package/src/gui/components/generics/Text/TextParagraph.jsx +28 -0
- package/src/gui/components/generics/Text/TextQuote.jsx +23 -0
- package/src/gui/components/generics/Text/TextTitle.jsx +44 -0
- package/src/gui/components/molecules/Dialog/Dialog.stories.tsx +18 -0
- package/src/gui/components/molecules/Dialog/Dialog.tsx +5 -0
- package/src/gui/components/molecules/Hero/Hero.stories.tsx +140 -0
- package/src/gui/components/molecules/Hero/Hero.tsx +152 -0
- package/src/gui/components/molecules/Hero/Hero.types.tsx +18 -0
- package/src/gui/components/molecules/Modal/Modal.resolver.tsx +38 -0
- package/src/gui/components/molecules/Modal/Modal.stories.tsx +82 -0
- package/src/gui/components/molecules/Modal/Modal.tsx +110 -0
- package/src/gui/components/molecules/Modal/Modal.types.ts +29 -0
- package/src/gui/components/molecules/Page/Page.stories.tsx +135 -0
- package/src/gui/components/molecules/Page/Page.tsx +94 -0
- package/src/gui/components/molecules/Theme/ThemeModeToggle/ThemeModeToggle.resolver.tsx +58 -0
- package/src/gui/components/molecules/Theme/ThemeModeToggle/ThemeModeToggle.stories.tsx +133 -0
- package/src/gui/components/molecules/Theme/ThemeModeToggle/ThemeModeToggle.tsx +101 -0
- package/src/gui/components/molecules/Theme/ThemeModeToggle/ThemeModeToggle.types.ts +29 -0
- package/src/gui/components/molecules/Theme/ThemesCatalog/ThemesCatalog.resolver.tsx +15 -0
- package/src/gui/components/molecules/Theme/ThemesCatalog/ThemesCatalog.stories.tsx +88 -0
- package/src/gui/components/molecules/Theme/ThemesCatalog/ThemesCatalog.tsx +167 -0
- package/src/gui/components/molecules/Theme/ThemesCatalog/ThemesCatalog.types.ts +34 -0
- package/src/gui/components/molecules/molecules.ts +49 -0
- package/src/gui/components/organisms/Blockchain/Blocks/BlocksTable.tsx +119 -0
- package/src/gui/components/organisms/Blockchain/Usernames/Identities.stories.tsx +20 -0
- package/src/gui/components/organisms/Blockchain/Usernames/QR.tsx +566 -0
- package/src/gui/components/organisms/Blockchain/Usernames/Usernames.tsx +448 -0
- package/src/gui/components/organisms/Blockchain/Usernames/identities.tsx +710 -0
- package/src/gui/components/organisms/Blockchain/blockchain.stories.tsx +17 -0
- package/src/gui/components/organisms/Blockchain/blockchain.tsx +368 -0
- package/src/gui/components/organisms/Blockchain/scripts/connection.ts +82 -0
- package/src/gui/components/organisms/Blockchain/scripts/match_face.ts +143 -0
- package/src/gui/components/organisms/HighLighter/HighLighter.stories.tsx +168 -0
- package/src/gui/components/organisms/HighLighter/HighLighter.tsx +420 -0
- package/src/gui/components/organisms/HighLighter/HighLightsDrawer.tsx +197 -0
- package/src/gui/components/organisms/IdentityNoise/FaceRecognition/FaceRecognition.stories.tsx +312 -0
- package/src/gui/components/organisms/IdentityNoise/FaceRecognition/FaceRecognition.tsx +765 -0
- package/src/gui/components/organisms/IdentityNoise/FaceRecognition/modules/useFaceCameraPermission.ts +70 -0
- package/src/gui/components/organisms/IdentityNoise/FaceRecognition/modules/useFaceLandmarker.ts +106 -0
- package/src/gui/components/organisms/IdentityNoise/FaceRecognition/modules/useFaceOverlay.ts +489 -0
- package/src/gui/components/organisms/IdentityNoise/FaceRecognition/modules/useFaceTemplate.ts +32 -0
- package/src/gui/components/organisms/IdentityNoise/FaceRecognition/modules/useFaceTemplateBurst.ts +178 -0
- package/src/gui/components/organisms/IdentityNoise/FaceRecognition/modules/verifyTemplate.ts +136 -0
- package/src/gui/components/organisms/IdentityNoise/IdentityNoise.tsx +403 -0
- package/src/gui/components/organisms/IdentityNoise/IndentityNoise.stories.tsx +15 -0
- package/src/gui/components/organisms/IdentityNoise/Noise/Noise.stories.tsx +206 -0
- package/src/gui/components/organisms/IdentityNoise/Noise/Noise.tsx +394 -0
- package/src/gui/components/organisms/IdentityNoise/Triad/QR.tsx +566 -0
- package/src/gui/components/organisms/IdentityNoise/Triad/Tiad.stories.tsx +6 -0
- package/src/gui/components/organisms/IdentityNoise/Triad/Triad.tsx +917 -0
- package/src/gui/components/organisms/IdentityNoise/Triad/handleCleak.ts +0 -0
- package/src/gui/components/organisms/IdentityNoise/Triad/identity.ts +31 -0
- package/src/gui/components/organisms/IdentityNoise/Triad/me/fundamentals/vectors/vectors.tsx +252 -0
- package/src/gui/components/organisms/IdentityNoise/Triad/me/me.stories.tsx +314 -0
- package/src/gui/components/organisms/IdentityNoise/Triad/me/me.tsx +0 -0
- package/src/gui/components/organisms/organisms.ts +15 -0
- package/src/gui/contexts/InsetsContext.tsx +40 -0
- package/src/gui/contexts/LeftSidebarContext.tsx +20 -0
- package/src/gui/contexts/RightSidebarContext.tsx +25 -0
- package/src/gui/contexts/ThemeContext.ts +34 -0
- package/src/gui/contexts/index.ts +4 -0
- package/src/gui/hooks/index.ts +11 -0
- package/src/gui/hooks/resolveColorToken.ts +39 -0
- package/src/gui/hooks/useCodeGen.ts +12 -0
- package/src/gui/hooks/useGuiMediaQuery.ts +18 -0
- package/src/gui/hooks/useGuiTheme.ts +18 -0
- package/src/gui/hooks/useInsets.ts +26 -0
- package/src/gui/hooks/useIsMobile.ts +13 -0
- package/src/gui/hooks/useIsTouchDevice.ts +25 -0
- package/src/gui/hooks/useLeftSidebar.ts +10 -0
- package/src/gui/hooks/useRightSidebar.ts +12 -0
- package/src/gui/hooks/useViewportKey.ts +19 -0
- package/src/gui/hooks/useViewportProp.ts +17 -0
- package/src/gui/registry/GuiRegistry.ts +19 -0
- package/src/gui/registry/factory.ts +12 -0
- package/src/gui/registry/index.ts +3 -0
- package/src/gui/registry/types.ts +6 -0
- package/src/gui/utils/nodeID.ts +11 -0
- package/src/registry/GuiRegistry.ts +19 -0
- package/src/stories/01.Home.mdx +22 -0
- package/src/stories/02.Understanding.This.GUI.mdx +149 -0
- package/src/stories/Theme/Palette.stories.tsx +86 -0
- package/src/stories/Theme/ThemeViewer.stories.tsx +91 -0
- package/src/stories/Theme/Typography.stories.jsx +211 -0
- package/src/stories/assets/this.GUI.png +0 -0
- package/src/types/gui.d.ts +67 -0
- package/src/types/theme.d.ts +191 -0
- package/src/types/viewport.ts +132 -0
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import React, { useMemo, useState } from 'react';
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
|
+
import EmojiCursor from './EmojiCursor';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* EmojiCursor
|
|
7
|
+
*
|
|
8
|
+
* This story showcases the EmojiCursor component in an isolated playground.
|
|
9
|
+
* - Select any emoji to use as the cursor.
|
|
10
|
+
* - Try the preset buttons.
|
|
11
|
+
* - Toggle the cursor on/off.
|
|
12
|
+
*/
|
|
13
|
+
const meta: Meta<typeof EmojiCursor> = {
|
|
14
|
+
title: 'generics/EmojiCursor',
|
|
15
|
+
component: EmojiCursor,
|
|
16
|
+
parameters: {
|
|
17
|
+
layout: 'fullscreen',
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export default meta;
|
|
22
|
+
|
|
23
|
+
type Story = StoryObj<typeof EmojiCursor>;
|
|
24
|
+
|
|
25
|
+
function CursorSandbox() {
|
|
26
|
+
const [selectedEmoji, setSelectedEmoji] = useState('😀');
|
|
27
|
+
const [enabled, setEnabled] = useState(true);
|
|
28
|
+
|
|
29
|
+
const cursor = useMemo(() => {
|
|
30
|
+
if (!enabled) return 'auto';
|
|
31
|
+
const emoji = (selectedEmoji ?? '').trim();
|
|
32
|
+
if (!emoji) return 'auto';
|
|
33
|
+
|
|
34
|
+
// Build a tiny inline SVG cursor. We render <text> for maximum emoji compatibility.
|
|
35
|
+
// `encodeURIComponent` ensures safe data URI embedding.
|
|
36
|
+
const svg = `<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32'>` +
|
|
37
|
+
`<text x='0' y='24' font-size='24'>${emoji}</text>` +
|
|
38
|
+
`</svg>`;
|
|
39
|
+
|
|
40
|
+
return `url("data:image/svg+xml,${encodeURIComponent(svg)}"), auto`;
|
|
41
|
+
}, [enabled, selectedEmoji]);
|
|
42
|
+
|
|
43
|
+
return (
|
|
44
|
+
<div
|
|
45
|
+
style={{
|
|
46
|
+
height: '100vh',
|
|
47
|
+
padding: 16,
|
|
48
|
+
boxSizing: 'border-box',
|
|
49
|
+
cursor,
|
|
50
|
+
fontFamily:
|
|
51
|
+
'ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, Apple Color Emoji, Segoe UI Emoji',
|
|
52
|
+
}}
|
|
53
|
+
>
|
|
54
|
+
<div
|
|
55
|
+
style={{
|
|
56
|
+
display: 'flex',
|
|
57
|
+
alignItems: 'center',
|
|
58
|
+
gap: 8,
|
|
59
|
+
flexWrap: 'wrap',
|
|
60
|
+
marginBottom: 12,
|
|
61
|
+
}}
|
|
62
|
+
>
|
|
63
|
+
<strong style={{ marginRight: 4 }}>Emoji Cursor</strong>
|
|
64
|
+
|
|
65
|
+
<label style={{ display: 'inline-flex', alignItems: 'center', gap: 8 }}>
|
|
66
|
+
<span style={{ opacity: 0.75 }}>Emoji</span>
|
|
67
|
+
<input
|
|
68
|
+
value={selectedEmoji}
|
|
69
|
+
onChange={(e) => setSelectedEmoji(e.target.value)}
|
|
70
|
+
placeholder="😀"
|
|
71
|
+
aria-label="Emoji"
|
|
72
|
+
style={{
|
|
73
|
+
width: 88,
|
|
74
|
+
padding: '6px 8px',
|
|
75
|
+
borderRadius: 8,
|
|
76
|
+
border: '1px solid rgba(0,0,0,0.25)',
|
|
77
|
+
outline: 'none',
|
|
78
|
+
}}
|
|
79
|
+
/>
|
|
80
|
+
</label>
|
|
81
|
+
|
|
82
|
+
<button
|
|
83
|
+
type="button"
|
|
84
|
+
onClick={() => setEnabled((v) => !v)}
|
|
85
|
+
style={{
|
|
86
|
+
padding: '6px 10px',
|
|
87
|
+
borderRadius: 8,
|
|
88
|
+
border: '1px solid rgba(0,0,0,0.25)',
|
|
89
|
+
background: enabled ? 'rgba(0,0,0,0.06)' : 'transparent',
|
|
90
|
+
cursor: 'pointer',
|
|
91
|
+
}}
|
|
92
|
+
>
|
|
93
|
+
{enabled ? 'Disable' : 'Enable'}
|
|
94
|
+
</button>
|
|
95
|
+
|
|
96
|
+
<span style={{ opacity: 0.75, marginLeft: 8 }}>
|
|
97
|
+
Current: <span style={{ fontFamily: 'monospace' }}>{enabled ? selectedEmoji : 'auto'}</span>
|
|
98
|
+
</span>
|
|
99
|
+
</div>
|
|
100
|
+
|
|
101
|
+
<div style={{ display: 'flex', gap: 8, flexWrap: 'wrap', marginBottom: 16 }}>
|
|
102
|
+
{['😀', '🔥', '✨', '🧠', '🔗', '🧬', '🚀', '⚡️', '✅', '❌'].map((e) => (
|
|
103
|
+
<button
|
|
104
|
+
key={e}
|
|
105
|
+
type="button"
|
|
106
|
+
onClick={() => {
|
|
107
|
+
setSelectedEmoji(e);
|
|
108
|
+
setEnabled(true);
|
|
109
|
+
}}
|
|
110
|
+
style={{
|
|
111
|
+
padding: '8px 10px',
|
|
112
|
+
borderRadius: 10,
|
|
113
|
+
border: '1px solid rgba(0,0,0,0.25)',
|
|
114
|
+
background: 'transparent',
|
|
115
|
+
cursor: 'pointer',
|
|
116
|
+
fontSize: 18,
|
|
117
|
+
lineHeight: 1,
|
|
118
|
+
}}
|
|
119
|
+
aria-label={`Set cursor to ${e}`}
|
|
120
|
+
title={`Set cursor to ${e}`}
|
|
121
|
+
>
|
|
122
|
+
{e}
|
|
123
|
+
</button>
|
|
124
|
+
))}
|
|
125
|
+
</div>
|
|
126
|
+
|
|
127
|
+
<div
|
|
128
|
+
style={{
|
|
129
|
+
border: '1px dashed rgba(0,0,0,0.25)',
|
|
130
|
+
borderRadius: 12,
|
|
131
|
+
padding: 16,
|
|
132
|
+
minHeight: 240,
|
|
133
|
+
}}
|
|
134
|
+
>
|
|
135
|
+
<p style={{ marginTop: 0, marginBottom: 8, opacity: 0.85 }}>
|
|
136
|
+
Move your mouse around this area to test the cursor.
|
|
137
|
+
</p>
|
|
138
|
+
<p style={{ margin: 0, opacity: 0.65 }}>
|
|
139
|
+
Tip: some emoji render differently across OS/fonts.
|
|
140
|
+
</p>
|
|
141
|
+
</div>
|
|
142
|
+
|
|
143
|
+
{/* Render the actual component too (so we ensure it builds/loads). */}
|
|
144
|
+
<div style={{ position: 'absolute', left: -99999, top: -99999 }}>
|
|
145
|
+
<EmojiCursor />
|
|
146
|
+
</div>
|
|
147
|
+
</div>
|
|
148
|
+
);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export const Playground: Story = {
|
|
152
|
+
render: () => <CursorSandbox />,
|
|
153
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { Box, Button } from '@mui/material';
|
|
3
|
+
|
|
4
|
+
const EmojiCursor = () => {
|
|
5
|
+
const [selectedEmoji, setSelectedEmoji] = useState('😀');
|
|
6
|
+
|
|
7
|
+
return (
|
|
8
|
+
<Box
|
|
9
|
+
sx={{
|
|
10
|
+
height: '100vh', // Full viewport height for testing
|
|
11
|
+
cursor: selectedEmoji
|
|
12
|
+
? `url("data:image/svg+xml,${encodeURIComponent(
|
|
13
|
+
`<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32'><text x='0' y='24' font-size='24'>${selectedEmoji}</text></svg>`
|
|
14
|
+
)}"), auto`
|
|
15
|
+
: 'auto',
|
|
16
|
+
}}
|
|
17
|
+
>
|
|
18
|
+
<Button onClick={() => setSelectedEmoji('🔥')}>Set Cursor to 🔥</Button>
|
|
19
|
+
</Box>
|
|
20
|
+
);
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export default EmojiCursor;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { useTheme } from '@mui/material/styles';
|
|
2
|
+
import { Box } from '@mui/material';
|
|
3
|
+
|
|
4
|
+
const variantStyles = {
|
|
5
|
+
warning: {
|
|
6
|
+
light: {
|
|
7
|
+
background: '#fff8e1',
|
|
8
|
+
border: '#f4b400',
|
|
9
|
+
color: '#f4b400',
|
|
10
|
+
},
|
|
11
|
+
dark: {
|
|
12
|
+
background: '#2c1a00',
|
|
13
|
+
border: '#f4b400',
|
|
14
|
+
color: '#f4b400',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
info: {
|
|
18
|
+
light: {
|
|
19
|
+
background: '#e3f2fd',
|
|
20
|
+
border: '#2196f3',
|
|
21
|
+
color: '#0d47a1',
|
|
22
|
+
},
|
|
23
|
+
dark: {
|
|
24
|
+
background: '#0d2b45',
|
|
25
|
+
border: '#64b5f6',
|
|
26
|
+
color: '#90caf9',
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
success: {
|
|
30
|
+
light: {
|
|
31
|
+
background: '#e8f5e9',
|
|
32
|
+
border: '#4caf50',
|
|
33
|
+
color: '#2e7d32',
|
|
34
|
+
},
|
|
35
|
+
dark: {
|
|
36
|
+
background: '#1b3c28',
|
|
37
|
+
border: '#66bb6a',
|
|
38
|
+
color: '#a5d6a7',
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
alert: {
|
|
42
|
+
light: {
|
|
43
|
+
background: '#ffebee',
|
|
44
|
+
border: '#f44336',
|
|
45
|
+
color: '#b71c1c',
|
|
46
|
+
},
|
|
47
|
+
dark: {
|
|
48
|
+
background: '#3d0000',
|
|
49
|
+
border: '#ef5350',
|
|
50
|
+
color: '#ef9a9a',
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
neutral: {
|
|
54
|
+
light: {
|
|
55
|
+
background: '#f5f5f5',
|
|
56
|
+
border: '#9e9e9e',
|
|
57
|
+
color: '#424242',
|
|
58
|
+
},
|
|
59
|
+
dark: {
|
|
60
|
+
background: '#2c2c2c',
|
|
61
|
+
border: '#bdbdbd',
|
|
62
|
+
color: '#e0e0e0',
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export default function Callout({
|
|
68
|
+
children = "This repository is in continuous development and may be unstable.",
|
|
69
|
+
variant = "warning", // default variant
|
|
70
|
+
}) {
|
|
71
|
+
const theme = useTheme();
|
|
72
|
+
const mode = theme.palette.mode;
|
|
73
|
+
const styles = variantStyles[variant]?.[mode] || variantStyles.warning.light;
|
|
74
|
+
|
|
75
|
+
return (
|
|
76
|
+
<Box
|
|
77
|
+
sx={{
|
|
78
|
+
backgroundColor: styles.background,
|
|
79
|
+
border: `1px solid ${styles.border}`,
|
|
80
|
+
color: styles.color,
|
|
81
|
+
padding: '10px 16px',
|
|
82
|
+
borderRadius: '4px',
|
|
83
|
+
fontWeight: 'bold',
|
|
84
|
+
marginBottom: '1.5rem',
|
|
85
|
+
textAlign: 'center',
|
|
86
|
+
fontSize: '0.9rem',
|
|
87
|
+
}}
|
|
88
|
+
>
|
|
89
|
+
{children}
|
|
90
|
+
</Box>
|
|
91
|
+
);
|
|
92
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Grid, Box, Typography } from '@mui/material';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* PageGrid
|
|
5
|
+
* Standardized grid container for organizing content in pages.
|
|
6
|
+
*
|
|
7
|
+
* Props:
|
|
8
|
+
* - items: Array of { title, content, xs, md }
|
|
9
|
+
* - spacing: Grid spacing (default 3)
|
|
10
|
+
* - sx: Additional styling for the Box wrapper
|
|
11
|
+
*/
|
|
12
|
+
export default function GridX({ items = [], spacing = 3, sx = {} }) {
|
|
13
|
+
return (
|
|
14
|
+
<Box sx={{ width: '100%', mt: 2, ...sx }}>
|
|
15
|
+
<Grid container spacing={spacing}>
|
|
16
|
+
{items.map((item, index) => (
|
|
17
|
+
<Grid item xs={item.xs || 12} md={item.md || 6} key={index}>
|
|
18
|
+
{item.title && (
|
|
19
|
+
<Typography variant="h6" sx={{ fontWeight: 500, mb: 1 }}>
|
|
20
|
+
{item.title}
|
|
21
|
+
</Typography>
|
|
22
|
+
)}
|
|
23
|
+
{item.content}
|
|
24
|
+
</Grid>
|
|
25
|
+
))}
|
|
26
|
+
</Grid>
|
|
27
|
+
</Box>
|
|
28
|
+
);
|
|
29
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
// neurons.me — this.GUI
|
|
2
|
+
// Generic Hero2 component with video background, overlay and titles
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import PropTypes from 'prop-types';
|
|
5
|
+
import { Box, Typography } from '@mui/material';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Hero2
|
|
9
|
+
* A compact hero/cover with background video or image, an opacity layer, and title/subtitle.
|
|
10
|
+
*
|
|
11
|
+
* Props:
|
|
12
|
+
* - videoSrc: string URL for the background video.
|
|
13
|
+
* - poster: string URL for the poster/fallback image.
|
|
14
|
+
* - height: CSS size for hero height (e.g., '220px', '30vh'). Default: '220px'.
|
|
15
|
+
* - title: string | ReactNode, main title text.
|
|
16
|
+
* - subTitle: string | ReactNode, secondary text.
|
|
17
|
+
* - overlayOpacity: number [0..1], darkness of overlay. Default: 0.5.
|
|
18
|
+
* - overlayColor: CSS color of overlay. Default: '#000'.
|
|
19
|
+
* - overlayBlur: CSS blur amount for overlay backdrop. Default: '8px'.
|
|
20
|
+
* - overlayGradient: CSS gradient string for overlay background.
|
|
21
|
+
* - borderRadius: number | string for rounding container. Default: 12.
|
|
22
|
+
* - textColor: CSS color for text. Default: '#fff'.
|
|
23
|
+
* - align: 'center' | 'left' | 'right'. Default: 'center'.
|
|
24
|
+
* - autoPlay, loop, muted, playsInline: booleans for <video>. Defaults true/true/true/true.
|
|
25
|
+
* - objectFit: how the media covers the box. Default: 'cover'.
|
|
26
|
+
* - TitleComponent: optional component to render the title (defaults to GUI.TextTitle or 'h1').
|
|
27
|
+
* - children: extra nodes rendered under the subtitle (e.g., buttons).
|
|
28
|
+
*/
|
|
29
|
+
export default function Hero2({
|
|
30
|
+
videoSrc = '/apps/neurons1.mp4',
|
|
31
|
+
poster,
|
|
32
|
+
height = '220px',
|
|
33
|
+
title = 'Apps',
|
|
34
|
+
subTitle,
|
|
35
|
+
overlayOpacity = 0.5,
|
|
36
|
+
overlayColor = '#000',
|
|
37
|
+
overlayBlur = '8px',
|
|
38
|
+
overlayGradient,
|
|
39
|
+
borderRadius = 8,
|
|
40
|
+
textColor = '#fff',
|
|
41
|
+
align = 'center',
|
|
42
|
+
autoPlay = true,
|
|
43
|
+
loop = true,
|
|
44
|
+
muted = true,
|
|
45
|
+
playsInline = true,
|
|
46
|
+
objectFit = 'cover',
|
|
47
|
+
TitleComponent,
|
|
48
|
+
children,
|
|
49
|
+
}) {
|
|
50
|
+
const Title = TitleComponent || 'h1';
|
|
51
|
+
const alignMap = {
|
|
52
|
+
center: { justifyContent: 'center', alignItems: 'center', textAlign: 'center' },
|
|
53
|
+
left: { justifyContent: 'center', alignItems: 'flex-start', textAlign: 'left', paddingLeft: '1rem' },
|
|
54
|
+
right: { justifyContent: 'center', alignItems: 'flex-end', textAlign: 'right', paddingRight: '1rem' },
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
return (
|
|
58
|
+
<Box sx={{ position: 'relative', width: '100%', height, overflow: 'hidden', borderRadius, mb: '2rem' }}>
|
|
59
|
+
{/* Background Video */}
|
|
60
|
+
{videoSrc ? (
|
|
61
|
+
<Box component="video"
|
|
62
|
+
autoPlay={autoPlay}
|
|
63
|
+
loop={loop}
|
|
64
|
+
muted={muted}
|
|
65
|
+
playsInline={playsInline}
|
|
66
|
+
poster={poster}
|
|
67
|
+
sx={{ width: '100%', height: '100%', objectFit }}>
|
|
68
|
+
<source src={videoSrc} type="video/mp4" />
|
|
69
|
+
{/* Fallback text */}
|
|
70
|
+
Tu navegador no soporta video.
|
|
71
|
+
</Box>
|
|
72
|
+
) : (
|
|
73
|
+
// If no videoSrc, show poster as background
|
|
74
|
+
<Box sx={{ width: '100%', height: '100%', backgroundImage: poster ? `url(${poster})` : 'none', backgroundSize: 'cover', backgroundPosition: 'center' }} />
|
|
75
|
+
)}
|
|
76
|
+
|
|
77
|
+
{/* Opacity Layer */}
|
|
78
|
+
<Box
|
|
79
|
+
sx={{
|
|
80
|
+
position: 'absolute', inset: 0, pointerEvents: 'none',
|
|
81
|
+
background: overlayGradient || overlayColor,
|
|
82
|
+
opacity: overlayOpacity,
|
|
83
|
+
backdropFilter: `blur(${overlayBlur})`,
|
|
84
|
+
WebkitBackdropFilter: `blur(${overlayBlur})`,
|
|
85
|
+
}}
|
|
86
|
+
/>
|
|
87
|
+
|
|
88
|
+
{/* Foreground Content */}
|
|
89
|
+
<Box sx={{ position: 'absolute', inset: 0, display: 'flex', ...alignMap[align] }}>
|
|
90
|
+
<Box sx={{ color: textColor, textShadow: '0 2px 10px rgba(0,0,0,.6)' }}>
|
|
91
|
+
{title && (
|
|
92
|
+
<Title style={{ margin: 0, fontWeight: 800, fontSize: '2rem' }}>
|
|
93
|
+
{title}
|
|
94
|
+
</Title>
|
|
95
|
+
)}
|
|
96
|
+
{subTitle && (
|
|
97
|
+
<Typography variant="subtitle1" sx={{ mt: 0.5, opacity: 0.9 }}>
|
|
98
|
+
{subTitle}
|
|
99
|
+
</Typography>
|
|
100
|
+
)}
|
|
101
|
+
{children && (
|
|
102
|
+
<Box sx={{ mt: 1.25 }}>
|
|
103
|
+
{children}
|
|
104
|
+
</Box>
|
|
105
|
+
)}
|
|
106
|
+
</Box>
|
|
107
|
+
</Box>
|
|
108
|
+
</Box>
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
Hero2.propTypes = {
|
|
113
|
+
videoSrc: PropTypes.string,
|
|
114
|
+
poster: PropTypes.string,
|
|
115
|
+
height: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
116
|
+
title: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
117
|
+
subTitle: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
118
|
+
overlayOpacity: PropTypes.number,
|
|
119
|
+
overlayColor: PropTypes.string,
|
|
120
|
+
overlayBlur: PropTypes.string,
|
|
121
|
+
overlayGradient: PropTypes.string,
|
|
122
|
+
borderRadius: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
123
|
+
textColor: PropTypes.string,
|
|
124
|
+
align: PropTypes.oneOf(['center', 'left', 'right']),
|
|
125
|
+
autoPlay: PropTypes.bool,
|
|
126
|
+
loop: PropTypes.bool,
|
|
127
|
+
muted: PropTypes.bool,
|
|
128
|
+
playsInline: PropTypes.bool,
|
|
129
|
+
objectFit: PropTypes.string,
|
|
130
|
+
TitleComponent: PropTypes.elementType,
|
|
131
|
+
children: PropTypes.node,
|
|
132
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
//components/Pages/PageContainer.jsx
|
|
2
|
+
import { Box, useTheme, useMediaQuery } from "@mui/material";
|
|
3
|
+
/**
|
|
4
|
+
* PageContainer
|
|
5
|
+
* Generic content wrapper for page layouts.
|
|
6
|
+
* Provides consistent padding and background only.
|
|
7
|
+
*/
|
|
8
|
+
export default function PageContainer({ children }) {
|
|
9
|
+
const theme = useTheme();
|
|
10
|
+
const isMobile = useMediaQuery(theme.breakpoints.down("md"));
|
|
11
|
+
return (
|
|
12
|
+
<Box
|
|
13
|
+
sx={{
|
|
14
|
+
px: isMobile ? 2 : 3,
|
|
15
|
+
pt: 3,
|
|
16
|
+
maxWidth: "987px",
|
|
17
|
+
minHeight: "100vh",
|
|
18
|
+
display: "flex",
|
|
19
|
+
flexDirection: "column",
|
|
20
|
+
alignItems: "center",
|
|
21
|
+
position: "relative",
|
|
22
|
+
backgroundColor: theme.palette.background.default,
|
|
23
|
+
margin: "0 auto"
|
|
24
|
+
}}
|
|
25
|
+
>
|
|
26
|
+
{children}
|
|
27
|
+
</Box>
|
|
28
|
+
);
|
|
29
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Divider } from "@mui/material";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* PageDivider Component
|
|
5
|
+
* A standardized divider to visually separate sections or content blocks.
|
|
6
|
+
*
|
|
7
|
+
* Props:
|
|
8
|
+
* - spacing: Adds vertical spacing above and below the divider (default: 2).
|
|
9
|
+
* - variant: MUI Divider variant, e.g., "fullWidth", "middle" (default: "fullWidth").
|
|
10
|
+
*/
|
|
11
|
+
export default function PageDivider({ spacing = 2, variant = "fullWidth" }) {
|
|
12
|
+
return (
|
|
13
|
+
<Divider
|
|
14
|
+
variant={variant}
|
|
15
|
+
sx={{
|
|
16
|
+
my: spacing,
|
|
17
|
+
}}
|
|
18
|
+
/>
|
|
19
|
+
);
|
|
20
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Box } from "@mui/material";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Section
|
|
5
|
+
* Minimal container that respects parent width.
|
|
6
|
+
* Controls: width, padding, margins, background color.
|
|
7
|
+
*/
|
|
8
|
+
export default function Section({
|
|
9
|
+
children,
|
|
10
|
+
width = "100%", // toma el ancho del padre por defecto
|
|
11
|
+
padding = 1.6, // padding base (MUI spacing units)
|
|
12
|
+
paddingX, // opcional: override horizontal
|
|
13
|
+
paddingY, // opcional: override vertical
|
|
14
|
+
marginY = 3, // separación vertical por defecto
|
|
15
|
+
marginTop, // override superior
|
|
16
|
+
marginBottom, // override inferior
|
|
17
|
+
bgcolor = "background.paper",
|
|
18
|
+
sx = {},
|
|
19
|
+
...props
|
|
20
|
+
}) {
|
|
21
|
+
const px = paddingX ?? padding;
|
|
22
|
+
const py = paddingY ?? padding;
|
|
23
|
+
const mt = marginTop ?? marginY;
|
|
24
|
+
const mb = marginBottom ?? marginY;
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<Box
|
|
28
|
+
component="section"
|
|
29
|
+
sx={{
|
|
30
|
+
width,
|
|
31
|
+
px,
|
|
32
|
+
py,
|
|
33
|
+
mt,
|
|
34
|
+
mb,
|
|
35
|
+
bgcolor,
|
|
36
|
+
...sx,
|
|
37
|
+
}}
|
|
38
|
+
{...props}
|
|
39
|
+
>
|
|
40
|
+
{children}
|
|
41
|
+
</Box>
|
|
42
|
+
);
|
|
43
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Typography } from "@mui/material";
|
|
2
|
+
/**
|
|
3
|
+
* SectionHeader
|
|
4
|
+
* Heading block to use inside Section (optional).
|
|
5
|
+
*/
|
|
6
|
+
export default function SectionHeader({ title, subtitle, sx = {} }) {
|
|
7
|
+
return (
|
|
8
|
+
<>
|
|
9
|
+
{title && (
|
|
10
|
+
<Typography variant="h4" sx={{ fontWeight: 600, mb: subtitle ? 0.5 : 1, ...sx }}>
|
|
11
|
+
{title}
|
|
12
|
+
</Typography>
|
|
13
|
+
)}
|
|
14
|
+
{subtitle && (
|
|
15
|
+
<Typography variant="body2" sx={{ color: "text.secondary", mb: 1 }}>
|
|
16
|
+
{subtitle}
|
|
17
|
+
</Typography>
|
|
18
|
+
)}
|
|
19
|
+
</>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { Box, Typography } from "@mui/material";
|
|
2
|
+
/**
|
|
3
|
+
* PageImage Component
|
|
4
|
+
* Displays an image with optional alignment and caption.
|
|
5
|
+
*
|
|
6
|
+
* Props:
|
|
7
|
+
* - src: URL of the image (required).
|
|
8
|
+
* - alt: Alternative text for accessibility (default: "").
|
|
9
|
+
* - align: "left" | "center" | "right" (default: "center").
|
|
10
|
+
* - caption: Optional text displayed below the image.
|
|
11
|
+
* - maxWidth: Maximum width of the image (default: "100%").
|
|
12
|
+
*/
|
|
13
|
+
export default function Img({
|
|
14
|
+
src,
|
|
15
|
+
alt = "",
|
|
16
|
+
align = "center",
|
|
17
|
+
caption,
|
|
18
|
+
maxWidth = "100%",
|
|
19
|
+
}) {
|
|
20
|
+
const justifyContent =
|
|
21
|
+
align === "left"
|
|
22
|
+
? "flex-start"
|
|
23
|
+
: align === "right"
|
|
24
|
+
? "flex-end"
|
|
25
|
+
: "center";
|
|
26
|
+
|
|
27
|
+
return (
|
|
28
|
+
<Box sx={{ display: "flex", flexDirection: "column", alignItems: align }}>
|
|
29
|
+
<Box
|
|
30
|
+
sx={{
|
|
31
|
+
display: "flex",
|
|
32
|
+
justifyContent,
|
|
33
|
+
width: "100%",
|
|
34
|
+
mb: caption ? 1 : 0,
|
|
35
|
+
}}
|
|
36
|
+
>
|
|
37
|
+
<img
|
|
38
|
+
src={src}
|
|
39
|
+
alt={alt}
|
|
40
|
+
style={{
|
|
41
|
+
maxWidth,
|
|
42
|
+
height: "auto",
|
|
43
|
+
borderRadius: "4px",
|
|
44
|
+
}}
|
|
45
|
+
/>
|
|
46
|
+
</Box>
|
|
47
|
+
{caption && (
|
|
48
|
+
<Typography
|
|
49
|
+
variant="caption"
|
|
50
|
+
color="text.secondary"
|
|
51
|
+
sx={{ textAlign: align }}
|
|
52
|
+
>
|
|
53
|
+
{caption}
|
|
54
|
+
</Typography>
|
|
55
|
+
)}
|
|
56
|
+
</Box>
|
|
57
|
+
);
|
|
58
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Box } from "@mui/material";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* PageEmbed Component
|
|
5
|
+
* Embeds external content such as videos, maps, or other iframes with a responsive aspect ratio.
|
|
6
|
+
*
|
|
7
|
+
* Props:
|
|
8
|
+
* - src: The URL of the content to embed (required).
|
|
9
|
+
* - title: Accessible title for the iframe (required for accessibility).
|
|
10
|
+
* - ratio: Aspect ratio of the embed. Accepts "16:9", "4:3", or custom (default: "16:9").
|
|
11
|
+
* - allowFullScreen: Allows fullscreen mode (default: true).
|
|
12
|
+
*/
|
|
13
|
+
export default function VideoEmbed({
|
|
14
|
+
src,
|
|
15
|
+
title,
|
|
16
|
+
ratio = "16:9",
|
|
17
|
+
allowFullScreen = true,
|
|
18
|
+
}) {
|
|
19
|
+
if (!src) return null;
|
|
20
|
+
|
|
21
|
+
const [w, h] = ratio.split(":").map(Number);
|
|
22
|
+
const paddingTop = (h / w) * 100;
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<Box
|
|
26
|
+
sx={{
|
|
27
|
+
position: "relative",
|
|
28
|
+
width: "100%",
|
|
29
|
+
paddingTop: `${paddingTop}%`,
|
|
30
|
+
borderRadius: "6px",
|
|
31
|
+
overflow: "hidden",
|
|
32
|
+
boxShadow: 1,
|
|
33
|
+
my: 2,
|
|
34
|
+
}}
|
|
35
|
+
>
|
|
36
|
+
<iframe
|
|
37
|
+
src={src}
|
|
38
|
+
title={title}
|
|
39
|
+
allowFullScreen={allowFullScreen}
|
|
40
|
+
style={{
|
|
41
|
+
position: "absolute",
|
|
42
|
+
top: 0,
|
|
43
|
+
left: 0,
|
|
44
|
+
width: "100%",
|
|
45
|
+
height: "100%",
|
|
46
|
+
border: 0,
|
|
47
|
+
}}
|
|
48
|
+
/>
|
|
49
|
+
</Box>
|
|
50
|
+
);
|
|
51
|
+
}
|