trama-ui 0.1.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.
- package/CATALOG.md +1237 -0
- package/LICENSE +21 -0
- package/README.md +78 -0
- package/THIRD-PARTY.md +4 -0
- package/assets/pixel/kenney-pixel-ui/9-slice/Ancient/brown.png +0 -0
- package/assets/pixel/kenney-pixel-ui/9-slice/Ancient/brown_inlay.png +0 -0
- package/assets/pixel/kenney-pixel-ui/9-slice/Ancient/brown_pressed.png +0 -0
- package/assets/pixel/kenney-pixel-ui/9-slice/Ancient/grey.png +0 -0
- package/assets/pixel/kenney-pixel-ui/9-slice/Ancient/grey_inlay.png +0 -0
- package/assets/pixel/kenney-pixel-ui/9-slice/Ancient/grey_pressed.png +0 -0
- package/assets/pixel/kenney-pixel-ui/9-slice/Ancient/tan.png +0 -0
- package/assets/pixel/kenney-pixel-ui/9-slice/Ancient/tan_inlay.png +0 -0
- package/assets/pixel/kenney-pixel-ui/9-slice/Ancient/tan_pressed.png +0 -0
- package/assets/pixel/kenney-pixel-ui/9-slice/Ancient/white.png +0 -0
- package/assets/pixel/kenney-pixel-ui/9-slice/Ancient/white_inlay.png +0 -0
- package/assets/pixel/kenney-pixel-ui/9-slice/Ancient/white_pressed.png +0 -0
- package/assets/pixel/kenney-pixel-ui/9-slice/Colored/blue.png +0 -0
- package/assets/pixel/kenney-pixel-ui/9-slice/Colored/blue_pressed.png +0 -0
- package/assets/pixel/kenney-pixel-ui/9-slice/Colored/green.png +0 -0
- package/assets/pixel/kenney-pixel-ui/9-slice/Colored/green_pressed.png +0 -0
- package/assets/pixel/kenney-pixel-ui/9-slice/Colored/grey.png +0 -0
- package/assets/pixel/kenney-pixel-ui/9-slice/Colored/grey_pressed.png +0 -0
- package/assets/pixel/kenney-pixel-ui/9-slice/Colored/red.png +0 -0
- package/assets/pixel/kenney-pixel-ui/9-slice/Colored/red_pressed.png +0 -0
- package/assets/pixel/kenney-pixel-ui/9-slice/Colored/yellow.png +0 -0
- package/assets/pixel/kenney-pixel-ui/9-slice/Colored/yellow_pressed.png +0 -0
- package/assets/pixel/kenney-pixel-ui/9-slice/Outline/blue.png +0 -0
- package/assets/pixel/kenney-pixel-ui/9-slice/Outline/blue_pressed.png +0 -0
- package/assets/pixel/kenney-pixel-ui/9-slice/Outline/green.png +0 -0
- package/assets/pixel/kenney-pixel-ui/9-slice/Outline/green_pressed.png +0 -0
- package/assets/pixel/kenney-pixel-ui/9-slice/Outline/red.png +0 -0
- package/assets/pixel/kenney-pixel-ui/9-slice/Outline/red_pressed.png +0 -0
- package/assets/pixel/kenney-pixel-ui/9-slice/Outline/yellow.png +0 -0
- package/assets/pixel/kenney-pixel-ui/9-slice/Outline/yellow_pressed.png +0 -0
- package/assets/pixel/kenney-pixel-ui/9-slice/list.png +0 -0
- package/assets/pixel/kenney-pixel-ui/9-slice/space.png +0 -0
- package/assets/pixel/kenney-pixel-ui/9-slice/space_inlay.png +0 -0
- package/assets/pixel/kenney-pixel-ui/License.txt +23 -0
- package/assets/pixel/kenney-pixel-ui/spritesheet/sheet.png +0 -0
- package/bin/trama-ui.mjs +27 -0
- package/dist/components/ui/Accordion.d.ts +12 -0
- package/dist/components/ui/Accordion.js +12 -0
- package/dist/components/ui/Alert.d.ts +15 -0
- package/dist/components/ui/Alert.js +15 -0
- package/dist/components/ui/ArticlesSection.d.ts +30 -0
- package/dist/components/ui/ArticlesSection.js +18 -0
- package/dist/components/ui/AsciiBackground.d.ts +58 -0
- package/dist/components/ui/AsciiBackground.js +173 -0
- package/dist/components/ui/AsciiCard.d.ts +78 -0
- package/dist/components/ui/AsciiCard.js +253 -0
- package/dist/components/ui/AsciiChart.d.ts +18 -0
- package/dist/components/ui/AsciiChart.js +47 -0
- package/dist/components/ui/Badge.d.ts +15 -0
- package/dist/components/ui/Badge.js +8 -0
- package/dist/components/ui/BitmapText.d.ts +25 -0
- package/dist/components/ui/BitmapText.js +21 -0
- package/dist/components/ui/BlogCard.d.ts +33 -0
- package/dist/components/ui/BlogCard.js +13 -0
- package/dist/components/ui/Breadcrumbs.d.ts +9 -0
- package/dist/components/ui/Breadcrumbs.js +7 -0
- package/dist/components/ui/Button.d.ts +74 -0
- package/dist/components/ui/Button.js +48 -0
- package/dist/components/ui/CTASection.d.ts +13 -0
- package/dist/components/ui/CTASection.js +7 -0
- package/dist/components/ui/Carousel.d.ts +30 -0
- package/dist/components/ui/Carousel.js +80 -0
- package/dist/components/ui/CheckboxGroup.d.ts +11 -0
- package/dist/components/ui/CheckboxGroup.js +20 -0
- package/dist/components/ui/CodeBlock.d.ts +11 -0
- package/dist/components/ui/CodeBlock.js +20 -0
- package/dist/components/ui/ContactForm.d.ts +25 -0
- package/dist/components/ui/ContactForm.js +26 -0
- package/dist/components/ui/CrtOverlay.d.ts +10 -0
- package/dist/components/ui/CrtOverlay.js +5 -0
- package/dist/components/ui/Divider.d.ts +12 -0
- package/dist/components/ui/Divider.js +7 -0
- package/dist/components/ui/Drawer.d.ts +16 -0
- package/dist/components/ui/Drawer.js +25 -0
- package/dist/components/ui/Dropdown.d.ts +10 -0
- package/dist/components/ui/Dropdown.js +21 -0
- package/dist/components/ui/FAQSection.d.ts +14 -0
- package/dist/components/ui/FAQSection.js +7 -0
- package/dist/components/ui/FeatureGrid.d.ts +18 -0
- package/dist/components/ui/FeatureGrid.js +14 -0
- package/dist/components/ui/Footer.d.ts +14 -0
- package/dist/components/ui/Footer.js +16 -0
- package/dist/components/ui/GlyphCursor.d.ts +22 -0
- package/dist/components/ui/GlyphCursor.js +50 -0
- package/dist/components/ui/GridBackground.d.ts +15 -0
- package/dist/components/ui/GridBackground.js +6 -0
- package/dist/components/ui/Hero.d.ts +21 -0
- package/dist/components/ui/Hero.js +12 -0
- package/dist/components/ui/HoverFX.d.ts +29 -0
- package/dist/components/ui/HoverFX.js +75 -0
- package/dist/components/ui/Icon.d.ts +33 -0
- package/dist/components/ui/Icon.js +29 -0
- package/dist/components/ui/ImageGallery.d.ts +31 -0
- package/dist/components/ui/ImageGallery.js +79 -0
- package/dist/components/ui/LogoCloud.d.ts +12 -0
- package/dist/components/ui/LogoCloud.js +9 -0
- package/dist/components/ui/MagneticButton.d.ts +12 -0
- package/dist/components/ui/MagneticButton.js +49 -0
- package/dist/components/ui/Marquee.d.ts +29 -0
- package/dist/components/ui/Marquee.js +15 -0
- package/dist/components/ui/Modal.d.ts +40 -0
- package/dist/components/ui/Modal.js +51 -0
- package/dist/components/ui/NavBar.d.ts +14 -0
- package/dist/components/ui/NavBar.js +12 -0
- package/dist/components/ui/NeonSign.d.ts +14 -0
- package/dist/components/ui/NeonSign.js +7 -0
- package/dist/components/ui/OtpInput.d.ts +9 -0
- package/dist/components/ui/OtpInput.js +27 -0
- package/dist/components/ui/Pagination.d.ts +10 -0
- package/dist/components/ui/Pagination.js +24 -0
- package/dist/components/ui/Panel.d.ts +21 -0
- package/dist/components/ui/Panel.js +8 -0
- package/dist/components/ui/PixelFrame.d.ts +61 -0
- package/dist/components/ui/PixelFrame.js +29 -0
- package/dist/components/ui/Presence.d.ts +51 -0
- package/dist/components/ui/Presence.js +343 -0
- package/dist/components/ui/PricingCard.d.ts +30 -0
- package/dist/components/ui/PricingCard.js +21 -0
- package/dist/components/ui/PricingSection.d.ts +35 -0
- package/dist/components/ui/PricingSection.js +21 -0
- package/dist/components/ui/Progress.d.ts +17 -0
- package/dist/components/ui/Progress.js +9 -0
- package/dist/components/ui/RadioGroup.d.ts +10 -0
- package/dist/components/ui/RadioGroup.js +11 -0
- package/dist/components/ui/RangeSlider.d.ts +14 -0
- package/dist/components/ui/RangeSlider.js +11 -0
- package/dist/components/ui/Reveal.d.ts +48 -0
- package/dist/components/ui/Reveal.js +181 -0
- package/dist/components/ui/SceneFlash.d.ts +14 -0
- package/dist/components/ui/SceneFlash.js +51 -0
- package/dist/components/ui/ScrambleText.d.ts +31 -0
- package/dist/components/ui/ScrambleText.js +51 -0
- package/dist/components/ui/ScrollArea.d.ts +15 -0
- package/dist/components/ui/ScrollArea.js +18 -0
- package/dist/components/ui/SectionHeader.d.ts +12 -0
- package/dist/components/ui/SectionHeader.js +6 -0
- package/dist/components/ui/Select.d.ts +17 -0
- package/dist/components/ui/Select.js +31 -0
- package/dist/components/ui/Skeleton.d.ts +12 -0
- package/dist/components/ui/Skeleton.js +18 -0
- package/dist/components/ui/Spinner.d.ts +15 -0
- package/dist/components/ui/Spinner.js +24 -0
- package/dist/components/ui/Spotlight.d.ts +16 -0
- package/dist/components/ui/Spotlight.js +16 -0
- package/dist/components/ui/Sprite.d.ts +27 -0
- package/dist/components/ui/Sprite.js +19 -0
- package/dist/components/ui/StatCounter.d.ts +24 -0
- package/dist/components/ui/StatCounter.js +70 -0
- package/dist/components/ui/StatsSection.d.ts +14 -0
- package/dist/components/ui/StatsSection.js +13 -0
- package/dist/components/ui/Stepper.d.ts +10 -0
- package/dist/components/ui/Stepper.js +7 -0
- package/dist/components/ui/Table.d.ts +10 -0
- package/dist/components/ui/Table.js +8 -0
- package/dist/components/ui/Tabs.d.ts +12 -0
- package/dist/components/ui/Tabs.js +18 -0
- package/dist/components/ui/TeamSection.d.ts +18 -0
- package/dist/components/ui/TeamSection.js +19 -0
- package/dist/components/ui/TerminalTyper.d.ts +20 -0
- package/dist/components/ui/TerminalTyper.js +45 -0
- package/dist/components/ui/Testimonial.d.ts +19 -0
- package/dist/components/ui/Testimonial.js +9 -0
- package/dist/components/ui/TestimonialSection.d.ts +20 -0
- package/dist/components/ui/TestimonialSection.js +15 -0
- package/dist/components/ui/TextField.d.ts +26 -0
- package/dist/components/ui/TextField.js +13 -0
- package/dist/components/ui/TextmodeBackground.d.ts +52 -0
- package/dist/components/ui/TextmodeBackground.js +83 -0
- package/dist/components/ui/Timeline.d.ts +13 -0
- package/dist/components/ui/Timeline.js +8 -0
- package/dist/components/ui/Toast.d.ts +30 -0
- package/dist/components/ui/Toast.js +47 -0
- package/dist/components/ui/Toggle.d.ts +13 -0
- package/dist/components/ui/Toggle.js +10 -0
- package/dist/components/ui/Tooltip.d.ts +20 -0
- package/dist/components/ui/Tooltip.js +20 -0
- package/dist/components/ui/Typewriter.d.ts +20 -0
- package/dist/components/ui/Typewriter.js +46 -0
- package/dist/components/ui/VideoPlayer.d.ts +81 -0
- package/dist/components/ui/VideoPlayer.js +379 -0
- package/dist/components/ui/fill.d.ts +32 -0
- package/dist/components/ui/fill.js +27 -0
- package/dist/components/ui/intent.d.ts +20 -0
- package/dist/components/ui/intent.js +23 -0
- package/dist/components/ui/styles/kit.css +31 -0
- package/dist/components/ui/styles/ui-carousel.css +113 -0
- package/dist/components/ui/styles/ui-kit.css +1135 -0
- package/dist/components/ui/styles/ui-video.css +75 -0
- package/dist/components/ui/swiperCss.d.ts +15 -0
- package/dist/components/ui/swiperCss.js +15 -0
- package/dist/components/ui/variants.d.ts +12 -0
- package/dist/components/ui/variants.js +10 -0
- package/dist/index.d.ts +77 -0
- package/dist/index.js +77 -0
- package/dist/lib/asciify/painters.d.ts +25 -0
- package/dist/lib/asciify/painters.js +604 -0
- package/dist/lib/asciify/pointer.d.ts +12 -0
- package/dist/lib/asciify/pointer.js +54 -0
- package/dist/lib/asciify/shape-painters.d.ts +44 -0
- package/dist/lib/asciify/shape-painters.js +335 -0
- package/dist/lib/asciify/theme-painters.d.ts +8 -0
- package/dist/lib/asciify/theme-painters.js +437 -0
- package/dist/lib/cells.d.ts +46 -0
- package/dist/lib/cells.js +114 -0
- package/dist/lib/scroll/store.d.ts +21 -0
- package/dist/lib/scroll/store.js +25 -0
- package/dist/lib/sketches/aurora.d.ts +3 -0
- package/dist/lib/sketches/aurora.js +42 -0
- package/dist/lib/sketches/fire.d.ts +3 -0
- package/dist/lib/sketches/fire.js +80 -0
- package/dist/lib/sketches/flow.d.ts +3 -0
- package/dist/lib/sketches/flow.js +70 -0
- package/dist/lib/sketches/life.d.ts +3 -0
- package/dist/lib/sketches/life.js +107 -0
- package/dist/lib/sketches/matrix.d.ts +3 -0
- package/dist/lib/sketches/matrix.js +64 -0
- package/dist/lib/sketches/ocean.d.ts +3 -0
- package/dist/lib/sketches/ocean.js +56 -0
- package/dist/lib/sketches/plasma.d.ts +3 -0
- package/dist/lib/sketches/plasma.js +29 -0
- package/dist/lib/sketches/registry.d.ts +6 -0
- package/dist/lib/sketches/registry.js +60 -0
- package/dist/lib/sketches/ripples.d.ts +3 -0
- package/dist/lib/sketches/ripples.js +84 -0
- package/dist/lib/sketches/scroll-assemble.d.ts +8 -0
- package/dist/lib/sketches/scroll-assemble.js +90 -0
- package/dist/lib/sketches/scroll-parallax.d.ts +6 -0
- package/dist/lib/sketches/scroll-parallax.js +76 -0
- package/dist/lib/sketches/scroll-rain.d.ts +6 -0
- package/dist/lib/sketches/scroll-rain.js +82 -0
- package/dist/lib/sketches/scroll-stats.d.ts +7 -0
- package/dist/lib/sketches/scroll-stats.js +81 -0
- package/dist/lib/sketches/scroll-terminal.d.ts +6 -0
- package/dist/lib/sketches/scroll-terminal.js +87 -0
- package/dist/lib/sketches/scroll-zoom.d.ts +7 -0
- package/dist/lib/sketches/scroll-zoom.js +49 -0
- package/dist/lib/sketches/starfield.d.ts +3 -0
- package/dist/lib/sketches/starfield.js +54 -0
- package/dist/lib/sketches/text-3d.d.ts +6 -0
- package/dist/lib/sketches/text-3d.js +62 -0
- package/dist/lib/sketches/text-combo-figlet.d.ts +6 -0
- package/dist/lib/sketches/text-combo-figlet.js +91 -0
- package/dist/lib/sketches/text-glitch.d.ts +3 -0
- package/dist/lib/sketches/text-glitch.js +57 -0
- package/dist/lib/sketches/text-marquee.d.ts +3 -0
- package/dist/lib/sketches/text-marquee.js +35 -0
- package/dist/lib/sketches/text-particles.d.ts +9 -0
- package/dist/lib/sketches/text-particles.js +91 -0
- package/dist/lib/sketches/text-rain.d.ts +3 -0
- package/dist/lib/sketches/text-rain.js +73 -0
- package/dist/lib/sketches/text-scramble.d.ts +6 -0
- package/dist/lib/sketches/text-scramble.js +49 -0
- package/dist/lib/sketches/text-wave.d.ts +3 -0
- package/dist/lib/sketches/text-wave.js +43 -0
- package/dist/lib/sketches/theme-orbit.d.ts +6 -0
- package/dist/lib/sketches/theme-orbit.js +119 -0
- package/dist/lib/sketches/theme-pulse.d.ts +7 -0
- package/dist/lib/sketches/theme-pulse.js +84 -0
- package/dist/lib/sketches/tunnel.d.ts +3 -0
- package/dist/lib/sketches/tunnel.js +28 -0
- package/dist/lib/text/banner.d.ts +5 -0
- package/dist/lib/text/banner.js +35 -0
- package/dist/lib/text/mask.d.ts +40 -0
- package/dist/lib/text/mask.js +143 -0
- package/dist/lib/text/store.d.ts +23 -0
- package/dist/lib/text/store.js +86 -0
- package/dist/lib/ui/card-fields.d.ts +52 -0
- package/dist/lib/ui/card-fields.js +193 -0
- package/dist/lib/ui/fonts.d.ts +56 -0
- package/dist/lib/ui/fonts.js +94 -0
- package/dist/lib/ui/fx.d.ts +42 -0
- package/dist/lib/ui/fx.js +162 -0
- package/dist/lib/ui/icons.d.ts +437 -0
- package/dist/lib/ui/icons.js +314 -0
- package/dist/lib/ui/placeholder.d.ts +11 -0
- package/dist/lib/ui/placeholder.js +65 -0
- package/dist/lib/ui/tokens.d.ts +49 -0
- package/dist/lib/ui/tokens.js +129 -0
- package/dist/lib/ui/useTokens.d.ts +10 -0
- package/dist/lib/ui/useTokens.js +32 -0
- package/package.json +80 -0
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
import { Alien } from "pixelarticons/react/Alien";
|
|
2
|
+
import { ArrowDown } from "pixelarticons/react/ArrowDown";
|
|
3
|
+
import { ArrowLeft } from "pixelarticons/react/ArrowLeft";
|
|
4
|
+
import { ArrowRight } from "pixelarticons/react/ArrowRight";
|
|
5
|
+
import { ArrowUp } from "pixelarticons/react/ArrowUp";
|
|
6
|
+
import { AtSign } from "pixelarticons/react/AtSign";
|
|
7
|
+
import { AtSignSharp } from "pixelarticons/react/AtSignSharp";
|
|
8
|
+
import { BatteryFull } from "pixelarticons/react/BatteryFull";
|
|
9
|
+
import { BatteryFullSharp } from "pixelarticons/react/BatteryFullSharp";
|
|
10
|
+
import { Bell } from "pixelarticons/react/Bell";
|
|
11
|
+
import { BellSharp } from "pixelarticons/react/BellSharp";
|
|
12
|
+
import { Bluesky } from "pixelarticons/react/Bluesky";
|
|
13
|
+
import { Bomb } from "pixelarticons/react/Bomb";
|
|
14
|
+
import { Bookmark } from "pixelarticons/react/Bookmark";
|
|
15
|
+
import { BookmarkSharp } from "pixelarticons/react/BookmarkSharp";
|
|
16
|
+
import { Bug } from "pixelarticons/react/Bug";
|
|
17
|
+
import { BugSharp } from "pixelarticons/react/BugSharp";
|
|
18
|
+
import { Calendar } from "pixelarticons/react/Calendar";
|
|
19
|
+
import { CalendarSharp } from "pixelarticons/react/CalendarSharp";
|
|
20
|
+
import { Camera } from "pixelarticons/react/Camera";
|
|
21
|
+
import { CameraSharp } from "pixelarticons/react/CameraSharp";
|
|
22
|
+
import { Castle } from "pixelarticons/react/Castle";
|
|
23
|
+
import { CastleSharp } from "pixelarticons/react/CastleSharp";
|
|
24
|
+
import { Check } from "pixelarticons/react/Check";
|
|
25
|
+
import { Chess } from "pixelarticons/react/Chess";
|
|
26
|
+
import { ChessSharp } from "pixelarticons/react/ChessSharp";
|
|
27
|
+
import { ChevronDown } from "pixelarticons/react/ChevronDown";
|
|
28
|
+
import { ChevronLeft } from "pixelarticons/react/ChevronLeft";
|
|
29
|
+
import { ChevronRight } from "pixelarticons/react/ChevronRight";
|
|
30
|
+
import { ChevronUp } from "pixelarticons/react/ChevronUp";
|
|
31
|
+
import { CircleInfo } from "pixelarticons/react/CircleInfo";
|
|
32
|
+
import { CircleQuestion } from "pixelarticons/react/CircleQuestion";
|
|
33
|
+
import { Clock } from "pixelarticons/react/Clock";
|
|
34
|
+
import { Close } from "pixelarticons/react/Close";
|
|
35
|
+
import { Cloud } from "pixelarticons/react/Cloud";
|
|
36
|
+
import { Code } from "pixelarticons/react/Code";
|
|
37
|
+
import { Coffee } from "pixelarticons/react/Coffee";
|
|
38
|
+
import { CoffeeSharp } from "pixelarticons/react/CoffeeSharp";
|
|
39
|
+
import { Coins } from "pixelarticons/react/Coins";
|
|
40
|
+
import { Compass } from "pixelarticons/react/Compass";
|
|
41
|
+
import { Copy } from "pixelarticons/react/Copy";
|
|
42
|
+
import { CopySharp } from "pixelarticons/react/CopySharp";
|
|
43
|
+
import { Cpu } from "pixelarticons/react/Cpu";
|
|
44
|
+
import { CpuSharp } from "pixelarticons/react/CpuSharp";
|
|
45
|
+
import { Crown } from "pixelarticons/react/Crown";
|
|
46
|
+
import { CrownSharp } from "pixelarticons/react/CrownSharp";
|
|
47
|
+
import { Database } from "pixelarticons/react/Database";
|
|
48
|
+
import { Discord } from "pixelarticons/react/Discord";
|
|
49
|
+
import { Download } from "pixelarticons/react/Download";
|
|
50
|
+
import { DownloadSharp } from "pixelarticons/react/DownloadSharp";
|
|
51
|
+
import { ExternalLink } from "pixelarticons/react/ExternalLink";
|
|
52
|
+
import { ExternalLinkSharp } from "pixelarticons/react/ExternalLinkSharp";
|
|
53
|
+
import { Eye } from "pixelarticons/react/Eye";
|
|
54
|
+
import { EyeOff } from "pixelarticons/react/EyeOff";
|
|
55
|
+
import { Feather } from "pixelarticons/react/Feather";
|
|
56
|
+
import { File } from "pixelarticons/react/File";
|
|
57
|
+
import { FileSharp } from "pixelarticons/react/FileSharp";
|
|
58
|
+
import { FileText } from "pixelarticons/react/FileText";
|
|
59
|
+
import { FileTextSharp } from "pixelarticons/react/FileTextSharp";
|
|
60
|
+
import { Filter } from "pixelarticons/react/Filter";
|
|
61
|
+
import { Fire } from "pixelarticons/react/Fire";
|
|
62
|
+
import { Flag } from "pixelarticons/react/Flag";
|
|
63
|
+
import { Folder } from "pixelarticons/react/Folder";
|
|
64
|
+
import { FolderSharp } from "pixelarticons/react/FolderSharp";
|
|
65
|
+
import { Gamepad } from "pixelarticons/react/Gamepad";
|
|
66
|
+
import { GamepadSharp } from "pixelarticons/react/GamepadSharp";
|
|
67
|
+
import { Gift } from "pixelarticons/react/Gift";
|
|
68
|
+
import { GiftSharp } from "pixelarticons/react/GiftSharp";
|
|
69
|
+
import { GitBranch } from "pixelarticons/react/GitBranch";
|
|
70
|
+
import { GitBranchSharp } from "pixelarticons/react/GitBranchSharp";
|
|
71
|
+
import { Github } from "pixelarticons/react/Github";
|
|
72
|
+
import { Globe } from "pixelarticons/react/Globe";
|
|
73
|
+
import { Headphone } from "pixelarticons/react/Headphone";
|
|
74
|
+
import { Heart } from "pixelarticons/react/Heart";
|
|
75
|
+
import { Home } from "pixelarticons/react/Home";
|
|
76
|
+
import { HomeSharp } from "pixelarticons/react/HomeSharp";
|
|
77
|
+
import { Hourglass } from "pixelarticons/react/Hourglass";
|
|
78
|
+
import { HourglassSharp } from "pixelarticons/react/HourglassSharp";
|
|
79
|
+
import { Image } from "pixelarticons/react/Image";
|
|
80
|
+
import { ImageSharp } from "pixelarticons/react/ImageSharp";
|
|
81
|
+
import { Instagram } from "pixelarticons/react/Instagram";
|
|
82
|
+
import { Joystick } from "pixelarticons/react/Joystick";
|
|
83
|
+
import { JoystickSharp } from "pixelarticons/react/JoystickSharp";
|
|
84
|
+
import { Key } from "pixelarticons/react/Key";
|
|
85
|
+
import { Leaf } from "pixelarticons/react/Leaf";
|
|
86
|
+
import { Lightbulb } from "pixelarticons/react/Lightbulb";
|
|
87
|
+
import { Link } from "pixelarticons/react/Link";
|
|
88
|
+
import { LinkSharp } from "pixelarticons/react/LinkSharp";
|
|
89
|
+
import { Linkedin } from "pixelarticons/react/Linkedin";
|
|
90
|
+
import { Lock } from "pixelarticons/react/Lock";
|
|
91
|
+
import { LockSharp } from "pixelarticons/react/LockSharp";
|
|
92
|
+
import { Login } from "pixelarticons/react/Login";
|
|
93
|
+
import { LoginSharp } from "pixelarticons/react/LoginSharp";
|
|
94
|
+
import { Logout } from "pixelarticons/react/Logout";
|
|
95
|
+
import { LogoutSharp } from "pixelarticons/react/LogoutSharp";
|
|
96
|
+
import { Mail } from "pixelarticons/react/Mail";
|
|
97
|
+
import { MailSharp } from "pixelarticons/react/MailSharp";
|
|
98
|
+
import { MapPin } from "pixelarticons/react/MapPin";
|
|
99
|
+
import { Mastodon } from "pixelarticons/react/Mastodon";
|
|
100
|
+
import { Menu } from "pixelarticons/react/Menu";
|
|
101
|
+
import { Message } from "pixelarticons/react/Message";
|
|
102
|
+
import { MessageSharp } from "pixelarticons/react/MessageSharp";
|
|
103
|
+
import { Mic } from "pixelarticons/react/Mic";
|
|
104
|
+
import { MicSharp } from "pixelarticons/react/MicSharp";
|
|
105
|
+
import { Minus } from "pixelarticons/react/Minus";
|
|
106
|
+
import { Moon } from "pixelarticons/react/Moon";
|
|
107
|
+
import { MoreHorizontal } from "pixelarticons/react/MoreHorizontal";
|
|
108
|
+
import { MoreHorizontalSharp } from "pixelarticons/react/MoreHorizontalSharp";
|
|
109
|
+
import { MoreVertical } from "pixelarticons/react/MoreVertical";
|
|
110
|
+
import { MoreVerticalSharp } from "pixelarticons/react/MoreVerticalSharp";
|
|
111
|
+
import { Music } from "pixelarticons/react/Music";
|
|
112
|
+
import { MusicSharp } from "pixelarticons/react/MusicSharp";
|
|
113
|
+
import { Npm } from "pixelarticons/react/Npm";
|
|
114
|
+
import { Pause } from "pixelarticons/react/Pause";
|
|
115
|
+
import { Pencil } from "pixelarticons/react/Pencil";
|
|
116
|
+
import { Phone } from "pixelarticons/react/Phone";
|
|
117
|
+
import { PhoneSharp } from "pixelarticons/react/PhoneSharp";
|
|
118
|
+
import { Play } from "pixelarticons/react/Play";
|
|
119
|
+
import { Plus } from "pixelarticons/react/Plus";
|
|
120
|
+
import { Potion } from "pixelarticons/react/Potion";
|
|
121
|
+
import { PotionSharp } from "pixelarticons/react/PotionSharp";
|
|
122
|
+
import { Power } from "pixelarticons/react/Power";
|
|
123
|
+
import { React } from "pixelarticons/react/React";
|
|
124
|
+
import { Reload } from "pixelarticons/react/Reload";
|
|
125
|
+
import { ReloadSharp } from "pixelarticons/react/ReloadSharp";
|
|
126
|
+
import { Robot } from "pixelarticons/react/Robot";
|
|
127
|
+
import { RobotSharp } from "pixelarticons/react/RobotSharp";
|
|
128
|
+
import { Save } from "pixelarticons/react/Save";
|
|
129
|
+
import { SaveSharp } from "pixelarticons/react/SaveSharp";
|
|
130
|
+
import { Search } from "pixelarticons/react/Search";
|
|
131
|
+
import { Send } from "pixelarticons/react/Send";
|
|
132
|
+
import { Server } from "pixelarticons/react/Server";
|
|
133
|
+
import { ServerSharp } from "pixelarticons/react/ServerSharp";
|
|
134
|
+
import { SettingsCog } from "pixelarticons/react/SettingsCog";
|
|
135
|
+
import { Share } from "pixelarticons/react/Share";
|
|
136
|
+
import { ShareSharp } from "pixelarticons/react/ShareSharp";
|
|
137
|
+
import { Shield } from "pixelarticons/react/Shield";
|
|
138
|
+
import { ShieldSharp } from "pixelarticons/react/ShieldSharp";
|
|
139
|
+
import { ShoppingCart } from "pixelarticons/react/ShoppingCart";
|
|
140
|
+
import { Skull } from "pixelarticons/react/Skull";
|
|
141
|
+
import { SkullSharp } from "pixelarticons/react/SkullSharp";
|
|
142
|
+
import { Snowflake } from "pixelarticons/react/Snowflake";
|
|
143
|
+
import { Sparkles } from "pixelarticons/react/Sparkles";
|
|
144
|
+
import { Star } from "pixelarticons/react/Star";
|
|
145
|
+
import { Sun } from "pixelarticons/react/Sun";
|
|
146
|
+
import { Sword } from "pixelarticons/react/Sword";
|
|
147
|
+
import { Target } from "pixelarticons/react/Target";
|
|
148
|
+
import { Terminal } from "pixelarticons/react/Terminal";
|
|
149
|
+
import { TerminalSharp } from "pixelarticons/react/TerminalSharp";
|
|
150
|
+
import { Trash } from "pixelarticons/react/Trash";
|
|
151
|
+
import { TrashSharp } from "pixelarticons/react/TrashSharp";
|
|
152
|
+
import { Tree } from "pixelarticons/react/Tree";
|
|
153
|
+
import { Trophy } from "pixelarticons/react/Trophy";
|
|
154
|
+
import { TrophySharp } from "pixelarticons/react/TrophySharp";
|
|
155
|
+
import { Unlock } from "pixelarticons/react/Unlock";
|
|
156
|
+
import { UnlockSharp } from "pixelarticons/react/UnlockSharp";
|
|
157
|
+
import { Upload } from "pixelarticons/react/Upload";
|
|
158
|
+
import { UploadSharp } from "pixelarticons/react/UploadSharp";
|
|
159
|
+
import { User } from "pixelarticons/react/User";
|
|
160
|
+
import { UserSharp } from "pixelarticons/react/UserSharp";
|
|
161
|
+
import { Users } from "pixelarticons/react/Users";
|
|
162
|
+
import { UsersSharp } from "pixelarticons/react/UsersSharp";
|
|
163
|
+
import { Vercel } from "pixelarticons/react/Vercel";
|
|
164
|
+
import { Video } from "pixelarticons/react/Video";
|
|
165
|
+
import { VideoSharp } from "pixelarticons/react/VideoSharp";
|
|
166
|
+
import { Volume } from "pixelarticons/react/Volume";
|
|
167
|
+
import { Wand } from "pixelarticons/react/Wand";
|
|
168
|
+
import { WarningDiamond } from "pixelarticons/react/WarningDiamond";
|
|
169
|
+
import { Wifi } from "pixelarticons/react/Wifi";
|
|
170
|
+
import { Youtube } from "pixelarticons/react/Youtube";
|
|
171
|
+
import { Zap } from "pixelarticons/react/Zap";
|
|
172
|
+
export const ICONS = {
|
|
173
|
+
// Acciones
|
|
174
|
+
plus: { base: Plus },
|
|
175
|
+
minus: { base: Minus },
|
|
176
|
+
close: { base: Close },
|
|
177
|
+
check: { base: Check },
|
|
178
|
+
pencil: { base: Pencil },
|
|
179
|
+
trash: { base: Trash, sharp: TrashSharp },
|
|
180
|
+
copy: { base: Copy, sharp: CopySharp },
|
|
181
|
+
save: { base: Save, sharp: SaveSharp },
|
|
182
|
+
download: { base: Download, sharp: DownloadSharp },
|
|
183
|
+
upload: { base: Upload, sharp: UploadSharp },
|
|
184
|
+
reload: { base: Reload, sharp: ReloadSharp },
|
|
185
|
+
search: { base: Search },
|
|
186
|
+
filter: { base: Filter },
|
|
187
|
+
link: { base: Link, sharp: LinkSharp },
|
|
188
|
+
share: { base: Share, sharp: ShareSharp },
|
|
189
|
+
send: { base: Send },
|
|
190
|
+
// Navegación
|
|
191
|
+
"arrow-left": { base: ArrowLeft },
|
|
192
|
+
"arrow-right": { base: ArrowRight },
|
|
193
|
+
"arrow-up": { base: ArrowUp },
|
|
194
|
+
"arrow-down": { base: ArrowDown },
|
|
195
|
+
"chevron-left": { base: ChevronLeft },
|
|
196
|
+
"chevron-right": { base: ChevronRight },
|
|
197
|
+
"chevron-up": { base: ChevronUp },
|
|
198
|
+
"chevron-down": { base: ChevronDown },
|
|
199
|
+
menu: { base: Menu },
|
|
200
|
+
home: { base: Home, sharp: HomeSharp },
|
|
201
|
+
"external-link": { base: ExternalLink, sharp: ExternalLinkSharp },
|
|
202
|
+
"more-horizontal": { base: MoreHorizontal, sharp: MoreHorizontalSharp },
|
|
203
|
+
"more-vertical": { base: MoreVertical, sharp: MoreVerticalSharp },
|
|
204
|
+
login: { base: Login, sharp: LoginSharp },
|
|
205
|
+
logout: { base: Logout, sharp: LogoutSharp },
|
|
206
|
+
// Estado
|
|
207
|
+
"circle-info": { base: CircleInfo },
|
|
208
|
+
"warning-diamond": { base: WarningDiamond },
|
|
209
|
+
"circle-question": { base: CircleQuestion },
|
|
210
|
+
bell: { base: Bell, sharp: BellSharp },
|
|
211
|
+
heart: { base: Heart },
|
|
212
|
+
star: { base: Star },
|
|
213
|
+
bookmark: { base: Bookmark, sharp: BookmarkSharp },
|
|
214
|
+
flag: { base: Flag },
|
|
215
|
+
lock: { base: Lock, sharp: LockSharp },
|
|
216
|
+
unlock: { base: Unlock, sharp: UnlockSharp },
|
|
217
|
+
eye: { base: Eye },
|
|
218
|
+
"eye-off": { base: EyeOff },
|
|
219
|
+
shield: { base: Shield, sharp: ShieldSharp },
|
|
220
|
+
// Personas
|
|
221
|
+
user: { base: User, sharp: UserSharp },
|
|
222
|
+
users: { base: Users, sharp: UsersSharp },
|
|
223
|
+
mail: { base: Mail, sharp: MailSharp },
|
|
224
|
+
message: { base: Message, sharp: MessageSharp },
|
|
225
|
+
phone: { base: Phone, sharp: PhoneSharp },
|
|
226
|
+
"at-sign": { base: AtSign, sharp: AtSignSharp },
|
|
227
|
+
// Tecnología
|
|
228
|
+
terminal: { base: Terminal, sharp: TerminalSharp },
|
|
229
|
+
code: { base: Code },
|
|
230
|
+
cpu: { base: Cpu, sharp: CpuSharp },
|
|
231
|
+
database: { base: Database },
|
|
232
|
+
server: { base: Server, sharp: ServerSharp },
|
|
233
|
+
cloud: { base: Cloud },
|
|
234
|
+
wifi: { base: Wifi },
|
|
235
|
+
"battery-full": { base: BatteryFull, sharp: BatteryFullSharp },
|
|
236
|
+
zap: { base: Zap },
|
|
237
|
+
power: { base: Power },
|
|
238
|
+
"settings-cog": { base: SettingsCog },
|
|
239
|
+
bug: { base: Bug, sharp: BugSharp },
|
|
240
|
+
"git-branch": { base: GitBranch, sharp: GitBranchSharp },
|
|
241
|
+
globe: { base: Globe },
|
|
242
|
+
// Marcas
|
|
243
|
+
github: { base: Github },
|
|
244
|
+
discord: { base: Discord },
|
|
245
|
+
linkedin: { base: Linkedin },
|
|
246
|
+
instagram: { base: Instagram },
|
|
247
|
+
youtube: { base: Youtube },
|
|
248
|
+
mastodon: { base: Mastodon },
|
|
249
|
+
bluesky: { base: Bluesky },
|
|
250
|
+
react: { base: React },
|
|
251
|
+
npm: { base: Npm },
|
|
252
|
+
vercel: { base: Vercel },
|
|
253
|
+
// Medios
|
|
254
|
+
file: { base: File, sharp: FileSharp },
|
|
255
|
+
"file-text": { base: FileText, sharp: FileTextSharp },
|
|
256
|
+
folder: { base: Folder, sharp: FolderSharp },
|
|
257
|
+
image: { base: Image, sharp: ImageSharp },
|
|
258
|
+
camera: { base: Camera, sharp: CameraSharp },
|
|
259
|
+
video: { base: Video, sharp: VideoSharp },
|
|
260
|
+
music: { base: Music, sharp: MusicSharp },
|
|
261
|
+
play: { base: Play },
|
|
262
|
+
pause: { base: Pause },
|
|
263
|
+
volume: { base: Volume },
|
|
264
|
+
mic: { base: Mic, sharp: MicSharp },
|
|
265
|
+
headphone: { base: Headphone },
|
|
266
|
+
// Juego
|
|
267
|
+
gamepad: { base: Gamepad, sharp: GamepadSharp },
|
|
268
|
+
joystick: { base: Joystick, sharp: JoystickSharp },
|
|
269
|
+
sword: { base: Sword },
|
|
270
|
+
skull: { base: Skull, sharp: SkullSharp },
|
|
271
|
+
bomb: { base: Bomb },
|
|
272
|
+
trophy: { base: Trophy, sharp: TrophySharp },
|
|
273
|
+
crown: { base: Crown, sharp: CrownSharp },
|
|
274
|
+
coins: { base: Coins },
|
|
275
|
+
potion: { base: Potion, sharp: PotionSharp },
|
|
276
|
+
robot: { base: Robot, sharp: RobotSharp },
|
|
277
|
+
alien: { base: Alien },
|
|
278
|
+
castle: { base: Castle, sharp: CastleSharp },
|
|
279
|
+
chess: { base: Chess, sharp: ChessSharp },
|
|
280
|
+
fire: { base: Fire },
|
|
281
|
+
sparkles: { base: Sparkles },
|
|
282
|
+
leaf: { base: Leaf },
|
|
283
|
+
tree: { base: Tree },
|
|
284
|
+
sun: { base: Sun },
|
|
285
|
+
moon: { base: Moon },
|
|
286
|
+
snowflake: { base: Snowflake },
|
|
287
|
+
// Objetos
|
|
288
|
+
calendar: { base: Calendar, sharp: CalendarSharp },
|
|
289
|
+
clock: { base: Clock },
|
|
290
|
+
"map-pin": { base: MapPin },
|
|
291
|
+
"shopping-cart": { base: ShoppingCart },
|
|
292
|
+
gift: { base: Gift, sharp: GiftSharp },
|
|
293
|
+
key: { base: Key },
|
|
294
|
+
lightbulb: { base: Lightbulb },
|
|
295
|
+
coffee: { base: Coffee, sharp: CoffeeSharp },
|
|
296
|
+
compass: { base: Compass },
|
|
297
|
+
target: { base: Target },
|
|
298
|
+
hourglass: { base: Hourglass, sharp: HourglassSharp },
|
|
299
|
+
feather: { base: Feather },
|
|
300
|
+
wand: { base: Wand },
|
|
301
|
+
};
|
|
302
|
+
/** Agrupación para el selector del catálogo y para documentar el set. */
|
|
303
|
+
export const ICON_GROUPS = [
|
|
304
|
+
{ label: "Acciones", names: ["plus", "minus", "close", "check", "pencil", "trash", "copy", "save", "download", "upload", "reload", "search", "filter", "link", "share", "send"] },
|
|
305
|
+
{ label: "Navegación", names: ["arrow-left", "arrow-right", "arrow-up", "arrow-down", "chevron-left", "chevron-right", "chevron-up", "chevron-down", "menu", "home", "external-link", "more-horizontal", "more-vertical", "login", "logout"] },
|
|
306
|
+
{ label: "Estado", names: ["circle-info", "warning-diamond", "circle-question", "bell", "heart", "star", "bookmark", "flag", "lock", "unlock", "eye", "eye-off", "shield"] },
|
|
307
|
+
{ label: "Personas", names: ["user", "users", "mail", "message", "phone", "at-sign"] },
|
|
308
|
+
{ label: "Tecnología", names: ["terminal", "code", "cpu", "database", "server", "cloud", "wifi", "battery-full", "zap", "power", "settings-cog", "bug", "git-branch", "globe"] },
|
|
309
|
+
{ label: "Marcas", names: ["github", "discord", "linkedin", "instagram", "youtube", "mastodon", "bluesky", "react", "npm", "vercel"] },
|
|
310
|
+
{ label: "Medios", names: ["file", "file-text", "folder", "image", "camera", "video", "music", "play", "pause", "volume", "mic", "headphone"] },
|
|
311
|
+
{ label: "Juego", names: ["gamepad", "joystick", "sword", "skull", "bomb", "trophy", "crown", "coins", "potion", "robot", "alien", "castle", "chess", "fire", "sparkles", "leaf", "tree", "sun", "moon", "snowflake"] },
|
|
312
|
+
{ label: "Objetos", names: ["calendar", "clock", "map-pin", "shopping-cart", "gift", "key", "lightbulb", "coffee", "compass", "target", "hourglass", "feather", "wand"] },
|
|
313
|
+
];
|
|
314
|
+
export const ICON_NAMES = Object.keys(ICONS);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Imágenes de ejemplo para las galerías: escenas de mar en pixel art generadas como SVG, así el kit no depende de
|
|
3
|
+
* ninguna imagen ni de la red. En cualquier prop de imágenes, `gen:N` (N = 0, 1, 2…) pide la escena N; cualquier otra
|
|
4
|
+
* cosa se trata como una URL normal.
|
|
5
|
+
*/
|
|
6
|
+
/** Escena pixel art N (rejilla 40×30, 800×600). Determinista: la misma N da siempre la misma imagen. */
|
|
7
|
+
export declare function pixelScene(n: number): string;
|
|
8
|
+
/** Data URI de la escena N: se puede usar directamente en `<img src>`. */
|
|
9
|
+
export declare const pixelSceneUri: (n: number) => string;
|
|
10
|
+
/** `gen:N` → escena generada; cualquier otra cosa se devuelve tal cual (URL, ruta o data URI). */
|
|
11
|
+
export declare function resolveImage(src: string): string;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Imágenes de ejemplo para las galerías: escenas de mar en pixel art generadas como SVG, así el kit no depende de
|
|
3
|
+
* ninguna imagen ni de la red. En cualquier prop de imágenes, `gen:N` (N = 0, 1, 2…) pide la escena N; cualquier otra
|
|
4
|
+
* cosa se trata como una URL normal.
|
|
5
|
+
*/
|
|
6
|
+
const PALS = [
|
|
7
|
+
{ sky: ["#2b1b4d", "#6a3a7a", "#c2587a", "#ff9a6b", "#ffc98a"], sun: "#ffe28c", far: "#3a2a66", mid: "#1f4d7a", near: "#0f2f55", foam: "#ffd9b8" },
|
|
8
|
+
{ sky: ["#2f8fd8", "#5fb0e8", "#8fd0f4", "#bfe8ff"], sun: "#fff6c2", far: "#2a86a8", mid: "#1670a0", near: "#0e5583", foam: "#ffffff" },
|
|
9
|
+
{ sky: ["#3a1c71", "#7a2a8a", "#d1467a", "#ff6a4d", "#ffa860"], sun: "#ffd27c", far: "#5a2a7a", mid: "#33306b", near: "#1a1a4a", foam: "#ffb59a" },
|
|
10
|
+
{ sky: ["#050a25", "#0b1440", "#14295a", "#1d3f70"], sun: "#eaf0ff", far: "#0f2a55", mid: "#0a1f45", near: "#050f2a", foam: "#9fb8e8", stars: true },
|
|
11
|
+
{ sky: ["#0f4c5c", "#1f7a80", "#3fb0a8", "#9fe0c8"], sun: "#fdf2b0", far: "#1b6a6a", mid: "#0f5560", near: "#083b46", foam: "#eafff5" },
|
|
12
|
+
{ sky: ["#3b1f2b", "#8a3a3a", "#d1653f", "#ffa64d", "#ffd27c"], sun: "#fff0b0", far: "#5a2f3a", mid: "#2f2a4a", near: "#171733", foam: "#ffd9a0" },
|
|
13
|
+
{ sky: ["#1a2b52", "#3a5a9a", "#7aa0d8", "#c8def5"], sun: "#ffffff", far: "#2f5a9a", mid: "#1f427a", near: "#12295a", foam: "#f2f8ff" },
|
|
14
|
+
{ sky: ["#10102a", "#2a1a5a", "#5a2a8a", "#9a3aa0"], sun: "#ffe6ff", far: "#3a1f6a", mid: "#231452", near: "#0f0a2e", foam: "#d9a8ff", stars: true },
|
|
15
|
+
];
|
|
16
|
+
const W = 40;
|
|
17
|
+
const H = 30;
|
|
18
|
+
const C = 20;
|
|
19
|
+
/** Escena pixel art N (rejilla 40×30, 800×600). Determinista: la misma N da siempre la misma imagen. */
|
|
20
|
+
export function pixelScene(n) {
|
|
21
|
+
const seed = Math.abs(Math.floor(n));
|
|
22
|
+
const p = PALS[seed % PALS.length];
|
|
23
|
+
const kind = seed % 3; // 0 mar y sol · 1 montañas · 2 solo mar
|
|
24
|
+
const hz = 15 + (seed % 3);
|
|
25
|
+
const rnd = (i) => {
|
|
26
|
+
const x = Math.sin((seed + 1) * 127.1 + i * 311.7) * 43758.5453;
|
|
27
|
+
return x - Math.floor(x);
|
|
28
|
+
};
|
|
29
|
+
const rect = (x, y, w, h, fill) => `<rect x="${x * C}" y="${y * C}" width="${w * C}" height="${h * C}" fill="${fill}"/>`;
|
|
30
|
+
let s = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${W * C} ${H * C}" shape-rendering="crispEdges" preserveAspectRatio="xMidYMid slice">`;
|
|
31
|
+
p.sky.forEach((c, b) => {
|
|
32
|
+
const y0 = Math.round((b * hz) / p.sky.length);
|
|
33
|
+
const y1 = Math.round(((b + 1) * hz) / p.sky.length);
|
|
34
|
+
s += rect(0, y0, W, y1 - y0, c);
|
|
35
|
+
});
|
|
36
|
+
if (p.stars)
|
|
37
|
+
for (let i = 0; i < 46; i++)
|
|
38
|
+
s += rect(Math.floor(rnd(i) * W), Math.floor(rnd(i + 99) * (hz - 2)), 1, 1, "#ffffff");
|
|
39
|
+
// sol o luna: un cuadrado con las esquinas comidas
|
|
40
|
+
const sx = 5 + Math.floor(rnd(1) * 28);
|
|
41
|
+
const sy = 2 + Math.floor(rnd(2) * 5);
|
|
42
|
+
s += rect(sx + 1, sy, 3, 5, p.sun) + rect(sx, sy + 1, 5, 3, p.sun);
|
|
43
|
+
if (kind === 1) {
|
|
44
|
+
for (let x = 0; x < W; x++) {
|
|
45
|
+
const h = 2 + Math.round(Math.abs(Math.sin(x * 0.33 + seed)) * 4 + Math.abs(Math.sin(x * 0.11 + seed * 2)) * 4);
|
|
46
|
+
s += rect(x, hz - h, 1, h + 1, p.far);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
[p.far, p.mid, p.near].forEach((col, l) => {
|
|
50
|
+
for (let x = 0; x < W; x++) {
|
|
51
|
+
const y = hz + l * 4 + 1 + Math.round(Math.sin(x * 0.5 + seed + l * 2) * 1.2);
|
|
52
|
+
s += rect(x, y, 1, H - y, col);
|
|
53
|
+
if (l === 2 && Math.sin(x * 0.5 + seed + l * 2) > 0.7)
|
|
54
|
+
s += rect(x, y, 1, 1, p.foam);
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
return `${s}</svg>`;
|
|
58
|
+
}
|
|
59
|
+
/** Data URI de la escena N: se puede usar directamente en `<img src>`. */
|
|
60
|
+
export const pixelSceneUri = (n) => `data:image/svg+xml;utf8,${encodeURIComponent(pixelScene(n))}`;
|
|
61
|
+
/** `gen:N` → escena generada; cualquier otra cosa se devuelve tal cual (URL, ruta o data URI). */
|
|
62
|
+
export function resolveImage(src) {
|
|
63
|
+
const m = /^gen:(\d+)$/.exec(src.trim());
|
|
64
|
+
return m ? pixelSceneUri(parseInt(m[1], 10)) : src.trim();
|
|
65
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { CSSProperties } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Tokens de diseño que consumen todos los componentes de `components/ui/`.
|
|
4
|
+
* Un tema es solo un objeto de tokens: cambiarlo no toca ningún componente.
|
|
5
|
+
*/
|
|
6
|
+
export type TokenSet = {
|
|
7
|
+
bg: string;
|
|
8
|
+
fg: string;
|
|
9
|
+
mut: string;
|
|
10
|
+
acc: string;
|
|
11
|
+
acc2: string;
|
|
12
|
+
card: string;
|
|
13
|
+
ln: string;
|
|
14
|
+
/** radio en px */
|
|
15
|
+
r: number;
|
|
16
|
+
font: string;
|
|
17
|
+
};
|
|
18
|
+
/** Tema por defecto del kit: el mismo que fija `:root` en `components/ui/styles/kit.css`. */
|
|
19
|
+
export declare const neutralTokens: TokenSet;
|
|
20
|
+
/** Convierte tokens en variables CSS para el contenedor (`style={tokensToStyle(...)}`). */
|
|
21
|
+
export declare function tokensToStyle(t: TokenSet): CSSProperties;
|
|
22
|
+
/** Lee un token desde el DOM (para canvas): `token(el, "--acc")`. */
|
|
23
|
+
export declare function token(el: Element, name: string, fallback?: string): string;
|
|
24
|
+
/**
|
|
25
|
+
* Tipografías que ofrece el selector de tokens del catálogo (`/componentes`).
|
|
26
|
+
* Las que llevan `var(--font-*)` vienen de Google, autoalojadas por `next/font`
|
|
27
|
+
* en `lib/ui/fonts.ts` (sin petición externa en runtime); las "del sistema" son
|
|
28
|
+
* el *fallback* sin fuente web, para cuando no hace falta descargar nada. Una
|
|
29
|
+
* fuente local propia (de marca) se añade igual: `next/font/local` en
|
|
30
|
+
* `lib/ui/fonts.ts` + una entrada aquí con su `var(--font-...)`.
|
|
31
|
+
*/
|
|
32
|
+
export declare const FONT_PRESETS: {
|
|
33
|
+
id: string;
|
|
34
|
+
label: string;
|
|
35
|
+
stack: string;
|
|
36
|
+
}[];
|
|
37
|
+
export type TokenOverrides = Partial<{
|
|
38
|
+
bg: string;
|
|
39
|
+
fg: string;
|
|
40
|
+
mut: string;
|
|
41
|
+
acc: string;
|
|
42
|
+
acc2: string;
|
|
43
|
+
r: number;
|
|
44
|
+
font: string;
|
|
45
|
+
}>;
|
|
46
|
+
/** Aplica cambios manuales sobre un tema; card y ln se derivan de fg si este se modifica. */
|
|
47
|
+
export declare function applyOverrides(base: TokenSet, o: TokenOverrides): TokenSet;
|
|
48
|
+
/** Valor válido para `<input type="color">` (solo acepta #rrggbb). */
|
|
49
|
+
export declare const toHex: (c: string, fallback?: string) => string;
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/** Tema por defecto del kit: el mismo que fija `:root` en `components/ui/styles/kit.css`. */
|
|
2
|
+
export const neutralTokens = {
|
|
3
|
+
bg: "#07080f",
|
|
4
|
+
fg: "#e8ecf4",
|
|
5
|
+
mut: "#9aa3b5",
|
|
6
|
+
acc: "#7cc4ff",
|
|
7
|
+
acc2: "#c084fc",
|
|
8
|
+
card: "rgba(255,255,255,0.06)",
|
|
9
|
+
ln: "rgba(255,255,255,0.16)",
|
|
10
|
+
r: 14,
|
|
11
|
+
font: 'var(--font-inter), ui-sans-serif, system-ui, "Segoe UI", sans-serif',
|
|
12
|
+
};
|
|
13
|
+
/** Convierte tokens en variables CSS para el contenedor (`style={tokensToStyle(...)}`). */
|
|
14
|
+
export function tokensToStyle(t) {
|
|
15
|
+
return {
|
|
16
|
+
"--bg": t.bg,
|
|
17
|
+
"--fg": t.fg,
|
|
18
|
+
"--mut": t.mut,
|
|
19
|
+
"--acc": t.acc,
|
|
20
|
+
"--acc2": t.acc2,
|
|
21
|
+
"--card": t.card,
|
|
22
|
+
"--ln": t.ln,
|
|
23
|
+
"--r": `${t.r}px`,
|
|
24
|
+
fontFamily: t.font,
|
|
25
|
+
color: t.fg,
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
/** Lee un token desde el DOM (para canvas): `token(el, "--acc")`. */
|
|
29
|
+
export function token(el, name, fallback = "#ffffff") {
|
|
30
|
+
return getComputedStyle(el).getPropertyValue(name).trim() || fallback;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Tipografías que ofrece el selector de tokens del catálogo (`/componentes`).
|
|
34
|
+
* Las que llevan `var(--font-*)` vienen de Google, autoalojadas por `next/font`
|
|
35
|
+
* en `lib/ui/fonts.ts` (sin petición externa en runtime); las "del sistema" son
|
|
36
|
+
* el *fallback* sin fuente web, para cuando no hace falta descargar nada. Una
|
|
37
|
+
* fuente local propia (de marca) se añade igual: `next/font/local` en
|
|
38
|
+
* `lib/ui/fonts.ts` + una entrada aquí con su `var(--font-...)`.
|
|
39
|
+
*/
|
|
40
|
+
export const FONT_PRESETS = [
|
|
41
|
+
{ id: "sistema", label: "Sans del sistema", stack: 'ui-sans-serif, system-ui, "Segoe UI", sans-serif' },
|
|
42
|
+
{ id: "inter", label: "Sans — Inter", stack: 'var(--font-inter), ui-sans-serif, system-ui, sans-serif' },
|
|
43
|
+
{ id: "manrope", label: "Sans — Manrope", stack: 'var(--font-manrope), ui-sans-serif, system-ui, sans-serif' },
|
|
44
|
+
{ id: "space-grotesk", label: "Display — Space Grotesk", stack: 'var(--font-space-grotesk), ui-sans-serif, system-ui, sans-serif' },
|
|
45
|
+
{ id: "syne", label: "Display — Syne", stack: 'var(--font-syne), ui-sans-serif, system-ui, sans-serif' },
|
|
46
|
+
{ id: "fraunces", label: "Serif — Fraunces", stack: 'var(--font-fraunces), Georgia, serif' },
|
|
47
|
+
{ id: "instrument-serif", label: "Serif — Instrument Serif", stack: 'var(--font-instrument-serif), Georgia, serif' },
|
|
48
|
+
{ id: "jetbrains-mono", label: "Mono — JetBrains Mono", stack: 'var(--font-jetbrains-mono), ui-monospace, Consolas, monospace' },
|
|
49
|
+
{ id: "space-mono", label: "Mono — Space Mono", stack: 'var(--font-space-mono), ui-monospace, Consolas, monospace' },
|
|
50
|
+
{ id: "mono-sistema", label: "Monoespaciada del sistema", stack: 'ui-monospace, "Cascadia Code", Consolas, monospace' },
|
|
51
|
+
// Pixel — las 46 familias de fonts.google.com/?categoryFilters=Appearance:/Theme/Pixel (lib/ui/fonts.ts).
|
|
52
|
+
{ id: "press-start-2p", label: "Pixel — Press Start 2P", stack: 'var(--font-press-start-2p), monospace' },
|
|
53
|
+
{ id: "vt323", label: "Pixel — VT323", stack: 'var(--font-vt323), monospace' },
|
|
54
|
+
{ id: "geist-pixel", label: "Pixel — Geist Pixel", stack: 'var(--font-geist-pixel), monospace' },
|
|
55
|
+
{ id: "jersey-25", label: "Pixel — Jersey 25", stack: 'var(--font-jersey-25), monospace' },
|
|
56
|
+
{ id: "pixelify-sans", label: "Pixel — Pixelify Sans", stack: 'var(--font-pixelify-sans), monospace' },
|
|
57
|
+
{ id: "dotgothic16", label: "Pixel — DotGothic16", stack: 'var(--font-dotgothic16), monospace' },
|
|
58
|
+
{ id: "silkscreen", label: "Pixel — Silkscreen", stack: 'var(--font-silkscreen), monospace' },
|
|
59
|
+
{ id: "bitcount-single", label: "Pixel — Bitcount Single", stack: 'var(--font-bitcount-single), monospace' },
|
|
60
|
+
{ id: "jersey-10", label: "Pixel — Jersey 10", stack: 'var(--font-jersey-10), monospace' },
|
|
61
|
+
{ id: "doto", label: "Pixel — Doto", stack: 'var(--font-doto), monospace' },
|
|
62
|
+
{ id: "tiny5", label: "Pixel — Tiny5", stack: 'var(--font-tiny5), monospace' },
|
|
63
|
+
{ id: "bitcount-prop-single", label: "Pixel — Bitcount Prop Single", stack: 'var(--font-bitcount-prop-single), monospace' },
|
|
64
|
+
{ id: "handjet", label: "Pixel — Handjet", stack: 'var(--font-handjet), monospace' },
|
|
65
|
+
{ id: "bitcount-grid-double", label: "Pixel — Bitcount Grid Double", stack: 'var(--font-bitcount-grid-double), monospace' },
|
|
66
|
+
{ id: "jacquard-12", label: "Pixel — Jacquard 12", stack: 'var(--font-jacquard-12), monospace' },
|
|
67
|
+
{ id: "jersey-20", label: "Pixel — Jersey 20", stack: 'var(--font-jersey-20), monospace' },
|
|
68
|
+
{ id: "jersey-15", label: "Pixel — Jersey 15", stack: 'var(--font-jersey-15), monospace' },
|
|
69
|
+
{ id: "jacquarda-bastarda-9", label: "Pixel — Jacquarda Bastarda 9", stack: 'var(--font-jacquarda-bastarda-9), monospace' },
|
|
70
|
+
{ id: "micro-5", label: "Pixel — Micro 5", stack: 'var(--font-micro-5), monospace' },
|
|
71
|
+
{ id: "bitcount-ink", label: "Pixel — Bitcount Ink", stack: 'var(--font-bitcount-ink), monospace' },
|
|
72
|
+
{ id: "bitcount-prop-single-ink", label: "Pixel — Bitcount Prop Single Ink", stack: 'var(--font-bitcount-prop-single-ink), monospace' },
|
|
73
|
+
{ id: "bitcount-grid-double-ink", label: "Pixel — Bitcount Grid Double Ink", stack: 'var(--font-bitcount-grid-double-ink), monospace' },
|
|
74
|
+
{ id: "bitcount-prop-double-ink", label: "Pixel — Bitcount Prop Double Ink", stack: 'var(--font-bitcount-prop-double-ink), monospace' },
|
|
75
|
+
{ id: "bitcount-grid-single-ink", label: "Pixel — Bitcount Grid Single Ink", stack: 'var(--font-bitcount-grid-single-ink), monospace' },
|
|
76
|
+
{ id: "bitcount-single-ink", label: "Pixel — Bitcount Single Ink", stack: 'var(--font-bitcount-single-ink), monospace' },
|
|
77
|
+
{ id: "jacquard-24", label: "Pixel — Jacquard 24", stack: 'var(--font-jacquard-24), monospace' },
|
|
78
|
+
{ id: "bitcount-grid-single", label: "Pixel — Bitcount Grid Single", stack: 'var(--font-bitcount-grid-single), monospace' },
|
|
79
|
+
{ id: "coral-pixels", label: "Pixel — Coral Pixels", stack: 'var(--font-coral-pixels), monospace' },
|
|
80
|
+
{ id: "bytesized", label: "Pixel — Bytesized", stack: 'var(--font-bytesized), monospace' },
|
|
81
|
+
{ id: "bitcount", label: "Pixel — Bitcount", stack: 'var(--font-bitcount), monospace' },
|
|
82
|
+
{ id: "jacquard-12-charted", label: "Pixel — Jacquard 12 Charted", stack: 'var(--font-jacquard-12-charted), monospace' },
|
|
83
|
+
{ id: "bitcount-prop-double", label: "Pixel — Bitcount Prop Double", stack: 'var(--font-bitcount-prop-double), monospace' },
|
|
84
|
+
{ id: "jacquard-24-charted", label: "Pixel — Jacquard 24 Charted", stack: 'var(--font-jacquard-24-charted), monospace' },
|
|
85
|
+
{ id: "jersey-15-charted", label: "Pixel — Jersey 15 Charted", stack: 'var(--font-jersey-15-charted), monospace' },
|
|
86
|
+
{ id: "micro-5-charted", label: "Pixel — Micro 5 Charted", stack: 'var(--font-micro-5-charted), monospace' },
|
|
87
|
+
{ id: "jersey-10-charted", label: "Pixel — Jersey 10 Charted", stack: 'var(--font-jersey-10-charted), monospace' },
|
|
88
|
+
{ id: "jersey-25-charted", label: "Pixel — Jersey 25 Charted", stack: 'var(--font-jersey-25-charted), monospace' },
|
|
89
|
+
{ id: "jacquarda-bastarda-9-charted", label: "Pixel — Jacquarda Bastarda 9 Charted", stack: 'var(--font-jacquarda-bastarda-9-charted), monospace' },
|
|
90
|
+
{ id: "jersey-20-charted", label: "Pixel — Jersey 20 Charted", stack: 'var(--font-jersey-20-charted), monospace' },
|
|
91
|
+
{ id: "sixtyfour", label: "Pixel — Sixtyfour", stack: 'var(--font-sixtyfour), monospace' },
|
|
92
|
+
{ id: "sixtyfour-convergence", label: "Pixel — Sixtyfour Convergence", stack: 'var(--font-sixtyfour-convergence), monospace' },
|
|
93
|
+
{ id: "workbench", label: "Pixel — Workbench", stack: 'var(--font-workbench), monospace' },
|
|
94
|
+
{ id: "rubik-pixels", label: "Pixel — Rubik Pixels", stack: 'var(--font-rubik-pixels), monospace' },
|
|
95
|
+
{ id: "rubik-iso", label: "Pixel — Rubik Iso", stack: 'var(--font-rubik-iso), monospace' },
|
|
96
|
+
{ id: "mozilla-headline", label: "Pixel — Mozilla Headline", stack: 'var(--font-mozilla-headline), monospace' },
|
|
97
|
+
{ id: "rubik-broken-fax", label: "Pixel — Rubik Broken Fax", stack: 'var(--font-rubik-broken-fax), monospace' },
|
|
98
|
+
];
|
|
99
|
+
const isHex = (c) => /^#[0-9a-f]{6}$/i.test(c);
|
|
100
|
+
const rgba = (hex, a) => {
|
|
101
|
+
const n = parseInt(hex.slice(1), 16);
|
|
102
|
+
return `rgba(${(n >> 16) & 255},${(n >> 8) & 255},${n & 255},${a})`;
|
|
103
|
+
};
|
|
104
|
+
/** Aplica cambios manuales sobre un tema; card y ln se derivan de fg si este se modifica. */
|
|
105
|
+
export function applyOverrides(base, o) {
|
|
106
|
+
const t = { ...base };
|
|
107
|
+
if (o.bg)
|
|
108
|
+
t.bg = o.bg;
|
|
109
|
+
if (o.fg) {
|
|
110
|
+
t.fg = o.fg;
|
|
111
|
+
if (isHex(o.fg)) {
|
|
112
|
+
t.card = rgba(o.fg, 0.07);
|
|
113
|
+
t.ln = rgba(o.fg, 0.18);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
if (o.mut)
|
|
117
|
+
t.mut = o.mut;
|
|
118
|
+
if (o.acc)
|
|
119
|
+
t.acc = o.acc;
|
|
120
|
+
if (o.acc2)
|
|
121
|
+
t.acc2 = o.acc2;
|
|
122
|
+
if (o.r !== undefined)
|
|
123
|
+
t.r = o.r;
|
|
124
|
+
if (o.font)
|
|
125
|
+
t.font = o.font;
|
|
126
|
+
return t;
|
|
127
|
+
}
|
|
128
|
+
/** Valor válido para `<input type="color">` (solo acepta #rrggbb). */
|
|
129
|
+
export const toHex = (c, fallback = "#888888") => (isHex(c) ? c : fallback);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type RefObject } from "react";
|
|
2
|
+
declare const NAMES: readonly ["--bg", "--fg", "--mut", "--acc", "--acc2", "--card", "--ln", "--r"];
|
|
3
|
+
export type TokenSnapshot = Record<(typeof NAMES)[number], string>;
|
|
4
|
+
/**
|
|
5
|
+
* Devuelve los tokens de diseño vigentes en el elemento y se actualiza cuando cambian
|
|
6
|
+
* (p. ej. al elegir otro tema). Sirve a los componentes que pintan en canvas y no pueden
|
|
7
|
+
* apoyarse en `var(--x)` de CSS: úsalo como dependencia de sus efectos de dibujo.
|
|
8
|
+
*/
|
|
9
|
+
export declare function useTokens(ref: RefObject<Element | null>): TokenSnapshot | null;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useEffect, useState } from "react";
|
|
3
|
+
const NAMES = ["--bg", "--fg", "--mut", "--acc", "--acc2", "--card", "--ln", "--r"];
|
|
4
|
+
const read = (el) => {
|
|
5
|
+
const cs = getComputedStyle(el);
|
|
6
|
+
return Object.fromEntries(NAMES.map((n) => [n, cs.getPropertyValue(n).trim()]));
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Devuelve los tokens de diseño vigentes en el elemento y se actualiza cuando cambian
|
|
10
|
+
* (p. ej. al elegir otro tema). Sirve a los componentes que pintan en canvas y no pueden
|
|
11
|
+
* apoyarse en `var(--x)` de CSS: úsalo como dependencia de sus efectos de dibujo.
|
|
12
|
+
*/
|
|
13
|
+
export function useTokens(ref) {
|
|
14
|
+
const [tokens, setTokens] = useState(null);
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
const el = ref.current;
|
|
17
|
+
if (!el)
|
|
18
|
+
return;
|
|
19
|
+
const update = () => {
|
|
20
|
+
const next = read(el);
|
|
21
|
+
setTokens((prev) => (prev && NAMES.every((n) => prev[n] === next[n]) ? prev : next));
|
|
22
|
+
};
|
|
23
|
+
update();
|
|
24
|
+
// El tema se aplica con `style` en un ancestro: se observan los ancestros cercanos
|
|
25
|
+
const mo = new MutationObserver(update);
|
|
26
|
+
let a = el;
|
|
27
|
+
for (let i = 0; i < 8 && a; i++, a = a.parentElement)
|
|
28
|
+
mo.observe(a, { attributes: true, attributeFilter: ["style", "class"] });
|
|
29
|
+
return () => mo.disconnect();
|
|
30
|
+
}, [ref]);
|
|
31
|
+
return tokens;
|
|
32
|
+
}
|