@sypnia/ui 0.0.0-stage → 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/LICENSE +21 -0
- package/README.md +95 -2
- package/astro/ActionCard.astro +17 -0
- package/astro/ActionCardSkeleton.astro +10 -0
- package/astro/Actions.astro +6 -0
- package/astro/AgentInstall.astro +13 -0
- package/astro/Alert.astro +20 -0
- package/astro/Announcement.astro +7 -0
- package/astro/ApiReference.astro +29 -0
- package/astro/ArticleHead.astro +24 -0
- package/astro/Aside.astro +17 -0
- package/astro/AspectRatio.astro +7 -0
- package/astro/AuthLayout.astro +31 -0
- package/astro/AuthLayoutSkeleton.astro +19 -0
- package/astro/Avatar.astro +7 -0
- package/astro/AvatarGroup.astro +16 -0
- package/astro/AvatarGroupSkeleton.astro +7 -0
- package/astro/AvatarSkeleton.astro +6 -0
- package/astro/Badge.astro +8 -0
- package/astro/BadgeSkeleton.astro +6 -0
- package/astro/Banner.astro +6 -0
- package/astro/Button.astro +26 -0
- package/astro/ButtonGroup.astro +6 -0
- package/astro/CallToAction.astro +10 -0
- package/astro/Callout.astro +13 -0
- package/astro/CalloutSkeleton.astro +10 -0
- package/astro/Card.astro +11 -0
- package/astro/CardGrid.astro +9 -0
- package/astro/CardGridSkeleton.astro +7 -0
- package/astro/CardSkeleton.astro +11 -0
- package/astro/Cards.astro +16 -0
- package/astro/CardsSkeleton.astro +5 -0
- package/astro/CaseMap.astro +72 -0
- package/astro/Center.astro +7 -0
- package/astro/Changelog.astro +23 -0
- package/astro/Character.astro +7 -0
- package/astro/Checklist.astro +27 -0
- package/astro/ChecklistSkeleton.astro +10 -0
- package/astro/Chip.astro +10 -0
- package/astro/ChipSkeleton.astro +4 -0
- package/astro/Cli.astro +10 -0
- package/astro/CodeBlock.astro +20 -0
- package/astro/CodeBlockSkeleton.astro +9 -0
- package/astro/CodeTabs.astro +31 -0
- package/astro/Columns.astro +7 -0
- package/astro/Compare.astro +16 -0
- package/astro/CompareTable.astro +29 -0
- package/astro/CompareTableSkeleton.astro +12 -0
- package/astro/Container.astro +6 -0
- package/astro/CopyButton.astro +15 -0
- package/astro/Count.astro +9 -0
- package/astro/CountSkeleton.astro +4 -0
- package/astro/Delta.astro +20 -0
- package/astro/DeltaSkeleton.astro +4 -0
- package/astro/DescriptionList.astro +8 -0
- package/astro/DescriptionListSkeleton.astro +7 -0
- package/astro/Divider.astro +6 -0
- package/astro/DocsArticleSkeleton.astro +25 -0
- package/astro/DocsHead.astro +33 -0
- package/astro/DocsHeader.astro +44 -0
- package/astro/DocsHero.astro +13 -0
- package/astro/DocsShell.astro +79 -0
- package/astro/EditLink.astro +9 -0
- package/astro/EmptyState.astro +14 -0
- package/astro/Endpoint.astro +21 -0
- package/astro/ErrorItem.astro +5 -0
- package/astro/ErrorList.astro +8 -0
- package/astro/Expected.astro +8 -0
- package/astro/Faq.astro +11 -0
- package/astro/FeatureGrid.astro +11 -0
- package/astro/FeatureGridSkeleton.astro +8 -0
- package/astro/FeatureList.astro +18 -0
- package/astro/FeatureListSkeleton.astro +7 -0
- package/astro/Figure.astro +17 -0
- package/astro/FigureSkeleton.astro +9 -0
- package/astro/Fireflies.astro +8 -0
- package/astro/Glossary.astro +8 -0
- package/astro/Grid.astro +7 -0
- package/astro/Heading.astro +7 -0
- package/astro/Hero.astro +21 -0
- package/astro/Icon.astro +17 -0
- package/astro/IconButton.astro +21 -0
- package/astro/Identity.astro +7 -0
- package/astro/IdentitySkeleton.astro +10 -0
- package/astro/Install.astro +7 -0
- package/astro/Kbd.astro +4 -0
- package/astro/KeyValue.astro +6 -0
- package/astro/KeyValueSkeleton.astro +7 -0
- package/astro/Ledger.astro +6 -0
- package/astro/Logo.astro +9 -0
- package/astro/Mark.astro +1 -0
- package/astro/McpTool.astro +13 -0
- package/astro/NewCard.astro +7 -0
- package/astro/Option.astro +6 -0
- package/astro/Options.astro +6 -0
- package/astro/PackageTabs.astro +12 -0
- package/astro/Page.astro +5 -0
- package/astro/PageFeedback.astro +20 -0
- package/astro/PageHeader.astro +14 -0
- package/astro/PageHeaderSkeleton.astro +12 -0
- package/astro/PageSkeleton.astro +19 -0
- package/astro/PaginationSkeleton.astro +17 -0
- package/astro/Panel.astro +11 -0
- package/astro/PanelSkeleton.astro +10 -0
- package/astro/Param.astro +15 -0
- package/astro/Params.astro +12 -0
- package/astro/ParamsSkeleton.astro +5 -0
- package/astro/Phone.astro +6 -0
- package/astro/PlanCard.astro +27 -0
- package/astro/PlanCardSkeleton.astro +13 -0
- package/astro/PrevNext.astro +15 -0
- package/astro/PricingTable.astro +41 -0
- package/astro/PricingTableSkeleton.astro +9 -0
- package/astro/ProductGrid.astro +10 -0
- package/astro/ProductMark.astro +10 -0
- package/astro/Progress.astro +12 -0
- package/astro/ProgressSkeleton.astro +9 -0
- package/astro/Prose.astro +7 -0
- package/astro/Quote.astro +10 -0
- package/astro/QuoteSkeleton.astro +10 -0
- package/astro/Releases.astro +6 -0
- package/astro/RequestExample.astro +8 -0
- package/astro/ResponseExample.astro +9 -0
- package/astro/Row.astro +7 -0
- package/astro/Says.astro +6 -0
- package/astro/ScrollArea.astro +7 -0
- package/astro/Search.astro +36 -0
- package/astro/SearchResult.astro +8 -0
- package/astro/SearchResultSkeleton.astro +5 -0
- package/astro/Section.astro +17 -0
- package/astro/SectionSkeleton.astro +9 -0
- package/astro/Setting.astro +19 -0
- package/astro/Show.astro +6 -0
- package/astro/SideNav.astro +40 -0
- package/astro/SideNavSkeleton.astro +13 -0
- package/astro/SiteFooter.astro +14 -0
- package/astro/SiteHeader.astro +28 -0
- package/astro/Skeleton.astro +8 -0
- package/astro/SkeletonText.astro +6 -0
- package/astro/Spacer.astro +7 -0
- package/astro/Split.astro +17 -0
- package/astro/Stack.astro +7 -0
- package/astro/Stage.astro +12 -0
- package/astro/Stat.astro +10 -0
- package/astro/StatGroup.astro +1 -0
- package/astro/StatGroupSkeleton.astro +7 -0
- package/astro/StatSkeleton.astro +10 -0
- package/astro/Status.astro +6 -0
- package/astro/StatusSkeleton.astro +4 -0
- package/astro/Step.astro +5 -0
- package/astro/Steps.astro +4 -0
- package/astro/Sticky.astro +7 -0
- package/astro/TableOfContents.astro +16 -0
- package/astro/TableOfContentsSkeleton.astro +5 -0
- package/astro/TableSkeleton.astro +16 -0
- package/astro/Tabs.astro +31 -0
- package/astro/TabsSkeleton.astro +6 -0
- package/astro/Term.astro +8 -0
- package/astro/Terms.astro +4 -0
- package/astro/Text.astro +6 -0
- package/astro/TextSkeleton.astro +9 -0
- package/astro/Toolbar.astro +7 -0
- package/astro/ToolbarGroup.astro +5 -0
- package/astro/ToolbarSeparator.astro +1 -0
- package/astro/ToolbarSkeleton.astro +6 -0
- package/astro/VersionBadge.astro +8 -0
- package/astro/_gap.ts +5 -0
- package/astro/_id.ts +3 -0
- package/astro/_locale.ts +9 -0
- package/css/base.css +92 -0
- package/css/components/actions.css +36 -0
- package/css/components/brand.css +28 -0
- package/css/components/button.css +84 -0
- package/css/components/charts-more.css +89 -0
- package/css/components/charts.css +83 -0
- package/css/components/code.css +86 -0
- package/css/components/data-display.css +105 -0
- package/css/components/data-more.css +323 -0
- package/css/components/data-table.css +146 -0
- package/css/components/docs.css +451 -0
- package/css/components/feedback.css +103 -0
- package/css/components/field.css +92 -0
- package/css/components/fields-advanced.css +158 -0
- package/css/components/fields-more.css +93 -0
- package/css/components/floating.css +55 -0
- package/css/components/forms.css +109 -0
- package/css/components/layout.css +97 -0
- package/css/components/nav.css +105 -0
- package/css/components/navigation.css +133 -0
- package/css/components/overlay.css +112 -0
- package/css/components/primitives.css +15 -0
- package/css/components/screens.css +42 -0
- package/css/components/shell.css +118 -0
- package/css/components/site.css +114 -0
- package/css/components/status.css +81 -0
- package/css/components/surface.css +69 -0
- package/css/components/table.css +49 -0
- package/css/components/viz.css +117 -0
- package/css/fonts.css +8 -0
- package/css/index.css +34 -0
- package/css/tokens.css +409 -0
- package/dist/chunk-6X3IJPUY.js +699 -0
- package/dist/chunk-AXIJDECU.js +97 -0
- package/dist/chunk-O5ZNXHSV.js +86 -0
- package/dist/dom/elements.d.ts +2 -0
- package/dist/dom/elements.js +539 -0
- package/dist/dom/index.d.ts +51 -0
- package/dist/dom/index.js +2 -0
- package/dist/i18n/index.d.ts +659 -0
- package/dist/i18n/index.js +1 -0
- package/dist/react/index.d.ts +4455 -0
- package/dist/react/index.js +8208 -0
- package/dist/tokens/index.d.ts +64 -0
- package/dist/tokens/index.js +49 -0
- package/fonts/LICENSE-instrument-sans.txt +93 -0
- package/fonts/LICENSE-literata.txt +93 -0
- package/fonts/LICENSE-martian-mono.txt +93 -0
- package/fonts/instrument-sans.woff2 +0 -0
- package/fonts/literata-italic.woff2 +0 -0
- package/fonts/literata-roman.woff2 +0 -0
- package/fonts/martian-mono.woff2 +0 -0
- package/icons/sprite.svg +1 -0
- package/icons/svg/accessibility.svg +1 -0
- package/icons/svg/agent.svg +1 -0
- package/icons/svg/alert.svg +1 -0
- package/icons/svg/align-center.svg +1 -0
- package/icons/svg/align-left.svg +1 -0
- package/icons/svg/align-right.svg +1 -0
- package/icons/svg/api.svg +1 -0
- package/icons/svg/archive.svg +1 -0
- package/icons/svg/arrow-down-left.svg +1 -0
- package/icons/svg/arrow-down-right.svg +1 -0
- package/icons/svg/arrow-down.svg +1 -0
- package/icons/svg/arrow-left.svg +1 -0
- package/icons/svg/arrow-right.svg +1 -0
- package/icons/svg/arrow-up-left.svg +1 -0
- package/icons/svg/arrow-up-right.svg +1 -0
- package/icons/svg/arrow-up.svg +1 -0
- package/icons/svg/at.svg +1 -0
- package/icons/svg/audit.svg +1 -0
- package/icons/svg/award.svg +1 -0
- package/icons/svg/backend.svg +1 -0
- package/icons/svg/backup.svg +1 -0
- package/icons/svg/bag.svg +1 -0
- package/icons/svg/ban.svg +1 -0
- package/icons/svg/bank.svg +1 -0
- package/icons/svg/bell-off.svg +1 -0
- package/icons/svg/bell.svg +1 -0
- package/icons/svg/bold.svg +1 -0
- package/icons/svg/bolt.svg +1 -0
- package/icons/svg/book-open.svg +1 -0
- package/icons/svg/book.svg +1 -0
- package/icons/svg/bookmark.svg +1 -0
- package/icons/svg/box.svg +1 -0
- package/icons/svg/braces.svg +1 -0
- package/icons/svg/brackets.svg +1 -0
- package/icons/svg/browser.svg +1 -0
- package/icons/svg/brush.svg +1 -0
- package/icons/svg/bug.svg +1 -0
- package/icons/svg/calendar-check.svg +1 -0
- package/icons/svg/calendar-plus.svg +1 -0
- package/icons/svg/calendar.svg +1 -0
- package/icons/svg/camera.svg +1 -0
- package/icons/svg/cards.svg +1 -0
- package/icons/svg/cart.svg +1 -0
- package/icons/svg/certificate.svg +1 -0
- package/icons/svg/chart-area.svg +1 -0
- package/icons/svg/chart-bar.svg +1 -0
- package/icons/svg/chart-line.svg +1 -0
- package/icons/svg/chart-parts.svg +1 -0
- package/icons/svg/chart-scatter.svg +1 -0
- package/icons/svg/chat.svg +1 -0
- package/icons/svg/chats.svg +1 -0
- package/icons/svg/check-small.svg +1 -0
- package/icons/svg/check.svg +1 -0
- package/icons/svg/chevron-down.svg +1 -0
- package/icons/svg/chevron-left.svg +1 -0
- package/icons/svg/chevron-right.svg +1 -0
- package/icons/svg/chevron-up.svg +1 -0
- package/icons/svg/chevrons-down.svg +1 -0
- package/icons/svg/chevrons-left.svg +1 -0
- package/icons/svg/chevrons-right.svg +1 -0
- package/icons/svg/chevrons-up-down.svg +1 -0
- package/icons/svg/chevrons-up.svg +1 -0
- package/icons/svg/clipboard-check.svg +1 -0
- package/icons/svg/clipboard.svg +1 -0
- package/icons/svg/clock.svg +1 -0
- package/icons/svg/close-small.svg +1 -0
- package/icons/svg/close.svg +1 -0
- package/icons/svg/cloud-download.svg +1 -0
- package/icons/svg/cloud-off.svg +1 -0
- package/icons/svg/cloud-upload.svg +1 -0
- package/icons/svg/cloud.svg +1 -0
- package/icons/svg/code.svg +1 -0
- package/icons/svg/coins.svg +1 -0
- package/icons/svg/collapse.svg +1 -0
- package/icons/svg/columns.svg +1 -0
- package/icons/svg/comment.svg +1 -0
- package/icons/svg/commit.svg +1 -0
- package/icons/svg/compass.svg +1 -0
- package/icons/svg/contact.svg +1 -0
- package/icons/svg/container.svg +1 -0
- package/icons/svg/copy.svg +1 -0
- package/icons/svg/cpu.svg +1 -0
- package/icons/svg/credit-card.svg +1 -0
- package/icons/svg/cron.svg +1 -0
- package/icons/svg/crop.svg +1 -0
- package/icons/svg/crown.svg +1 -0
- package/icons/svg/csv.svg +1 -0
- package/icons/svg/cursor.svg +1 -0
- package/icons/svg/dark-mode.svg +1 -0
- package/icons/svg/dashboard.svg +1 -0
- package/icons/svg/data.svg +1 -0
- package/icons/svg/dead-click.svg +1 -0
- package/icons/svg/density.svg +1 -0
- package/icons/svg/deploy.svg +1 -0
- package/icons/svg/desktop.svg +1 -0
- package/icons/svg/disk.svg +1 -0
- package/icons/svg/dns.svg +1 -0
- package/icons/svg/dollar.svg +1 -0
- package/icons/svg/domain.svg +1 -0
- package/icons/svg/dot-off.svg +1 -0
- package/icons/svg/dot.svg +1 -0
- package/icons/svg/download.svg +1 -0
- package/icons/svg/duplicate.svg +1 -0
- package/icons/svg/edit.svg +1 -0
- package/icons/svg/engine.svg +1 -0
- package/icons/svg/enter.svg +1 -0
- package/icons/svg/environment.svg +1 -0
- package/icons/svg/equal.svg +1 -0
- package/icons/svg/eraser.svg +1 -0
- package/icons/svg/error.svg +1 -0
- package/icons/svg/expand.svg +1 -0
- package/icons/svg/export.svg +1 -0
- package/icons/svg/external.svg +1 -0
- package/icons/svg/eye-off.svg +1 -0
- package/icons/svg/failure.svg +1 -0
- package/icons/svg/fast-forward.svg +1 -0
- package/icons/svg/file-check.svg +1 -0
- package/icons/svg/file-code.svg +1 -0
- package/icons/svg/file-lock.svg +1 -0
- package/icons/svg/file-plus.svg +1 -0
- package/icons/svg/file-table.svg +1 -0
- package/icons/svg/file-text.svg +1 -0
- package/icons/svg/file.svg +1 -0
- package/icons/svg/files.svg +1 -0
- package/icons/svg/filter.svg +1 -0
- package/icons/svg/fingerprint.svg +1 -0
- package/icons/svg/fire.svg +1 -0
- package/icons/svg/firewall.svg +1 -0
- package/icons/svg/fix.svg +1 -0
- package/icons/svg/flag.svg +1 -0
- package/icons/svg/folder-open.svg +1 -0
- package/icons/svg/folder-plus.svg +1 -0
- package/icons/svg/folder.svg +1 -0
- package/icons/svg/fork.svg +1 -0
- package/icons/svg/fullscreen-exit.svg +1 -0
- package/icons/svg/fullscreen.svg +1 -0
- package/icons/svg/function.svg +1 -0
- package/icons/svg/funnel.svg +1 -0
- package/icons/svg/gauge.svg +1 -0
- package/icons/svg/gift.svg +1 -0
- package/icons/svg/git-branch.svg +1 -0
- package/icons/svg/globe.svg +1 -0
- package/icons/svg/grid.svg +1 -0
- package/icons/svg/grip.svg +1 -0
- package/icons/svg/hand.svg +1 -0
- package/icons/svg/handshake.svg +1 -0
- package/icons/svg/hash.svg +1 -0
- package/icons/svg/heading.svg +1 -0
- package/icons/svg/heart.svg +1 -0
- package/icons/svg/heatmap.svg +1 -0
- package/icons/svg/help.svg +1 -0
- package/icons/svg/highlight.svg +1 -0
- package/icons/svg/history.svg +1 -0
- package/icons/svg/home.svg +1 -0
- package/icons/svg/hourglass.svg +1 -0
- package/icons/svg/id-card.svg +1 -0
- package/icons/svg/idea.svg +1 -0
- package/icons/svg/image.svg +1 -0
- package/icons/svg/import.svg +1 -0
- package/icons/svg/inbox.svg +1 -0
- package/icons/svg/incognito.svg +1 -0
- package/icons/svg/indent.svg +1 -0
- package/icons/svg/index.svg +1 -0
- package/icons/svg/info.svg +1 -0
- package/icons/svg/invoice.svg +1 -0
- package/icons/svg/italic.svg +1 -0
- package/icons/svg/json.svg +1 -0
- package/icons/svg/kanban.svg +1 -0
- package/icons/svg/key.svg +1 -0
- package/icons/svg/keyboard.svg +1 -0
- package/icons/svg/laptop.svg +1 -0
- package/icons/svg/layers.svg +1 -0
- package/icons/svg/layout.svg +1 -0
- package/icons/svg/leaf.svg +1 -0
- package/icons/svg/light.svg +1 -0
- package/icons/svg/link.svg +1 -0
- package/icons/svg/list-checks.svg +1 -0
- package/icons/svg/list-ordered.svg +1 -0
- package/icons/svg/list.svg +1 -0
- package/icons/svg/load-balancer.svg +1 -0
- package/icons/svg/lock.svg +1 -0
- package/icons/svg/log-in.svg +1 -0
- package/icons/svg/logs.svg +1 -0
- package/icons/svg/mail-open.svg +1 -0
- package/icons/svg/mail.svg +1 -0
- package/icons/svg/map.svg +1 -0
- package/icons/svg/mcp.svg +1 -0
- package/icons/svg/megaphone.svg +1 -0
- package/icons/svg/memory.svg +1 -0
- package/icons/svg/menu.svg +1 -0
- package/icons/svg/merge.svg +1 -0
- package/icons/svg/mic-off.svg +1 -0
- package/icons/svg/mic.svg +1 -0
- package/icons/svg/migrate.svg +1 -0
- package/icons/svg/minus-circle.svg +1 -0
- package/icons/svg/minus.svg +1 -0
- package/icons/svg/mobile.svg +1 -0
- package/icons/svg/moon.svg +1 -0
- package/icons/svg/more-vertical.svg +1 -0
- package/icons/svg/more.svg +1 -0
- package/icons/svg/mouse.svg +1 -0
- package/icons/svg/move.svg +1 -0
- package/icons/svg/mute.svg +1 -0
- package/icons/svg/network.svg +1 -0
- package/icons/svg/notebook.svg +1 -0
- package/icons/svg/null.svg +1 -0
- package/icons/svg/open-source.svg +1 -0
- package/icons/svg/organization.svg +1 -0
- package/icons/svg/outdent.svg +1 -0
- package/icons/svg/p-agent.svg +1 -0
- package/icons/svg/p-ai.svg +1 -0
- package/icons/svg/p-app.svg +1 -0
- package/icons/svg/p-cases.svg +1 -0
- package/icons/svg/p-data.svg +1 -0
- package/icons/svg/p-design.svg +1 -0
- package/icons/svg/p-domains.svg +1 -0
- package/icons/svg/p-files.svg +1 -0
- package/icons/svg/p-git.svg +1 -0
- package/icons/svg/p-learn.svg +1 -0
- package/icons/svg/p-mail.svg +1 -0
- package/icons/svg/p-run.svg +1 -0
- package/icons/svg/p-skills.svg +1 -0
- package/icons/svg/p-telemetry.svg +1 -0
- package/icons/svg/p-ui.svg +1 -0
- package/icons/svg/palette.svg +1 -0
- package/icons/svg/panel-bottom.svg +1 -0
- package/icons/svg/paperclip.svg +1 -0
- package/icons/svg/paragraph.svg +1 -0
- package/icons/svg/password.svg +1 -0
- package/icons/svg/paste.svg +1 -0
- package/icons/svg/pause.svg +1 -0
- package/icons/svg/pending.svg +1 -0
- package/icons/svg/percent.svg +1 -0
- package/icons/svg/performance.svg +1 -0
- package/icons/svg/phone.svg +1 -0
- package/icons/svg/picture-in-picture.svg +1 -0
- package/icons/svg/pin.svg +1 -0
- package/icons/svg/pipeline.svg +1 -0
- package/icons/svg/plan.svg +1 -0
- package/icons/svg/play.svg +1 -0
- package/icons/svg/plug.svg +1 -0
- package/icons/svg/plus-circle.svg +1 -0
- package/icons/svg/plus.svg +1 -0
- package/icons/svg/pointer.svg +1 -0
- package/icons/svg/policy.svg +1 -0
- package/icons/svg/power.svg +1 -0
- package/icons/svg/primary-key.svg +1 -0
- package/icons/svg/print.svg +1 -0
- package/icons/svg/prompt.svg +1 -0
- package/icons/svg/pull-request.svg +1 -0
- package/icons/svg/puzzle.svg +1 -0
- package/icons/svg/qr-code.svg +1 -0
- package/icons/svg/query.svg +1 -0
- package/icons/svg/queue.svg +1 -0
- package/icons/svg/quote.svg +1 -0
- package/icons/svg/rage-click.svg +1 -0
- package/icons/svg/receipt.svg +1 -0
- package/icons/svg/record.svg +1 -0
- package/icons/svg/redo.svg +1 -0
- package/icons/svg/refresh.svg +1 -0
- package/icons/svg/region.svg +1 -0
- package/icons/svg/relation.svg +1 -0
- package/icons/svg/release.svg +1 -0
- package/icons/svg/replay.svg +1 -0
- package/icons/svg/rewind.svg +1 -0
- package/icons/svg/robot.svg +1 -0
- package/icons/svg/rocket.svg +1 -0
- package/icons/svg/role.svg +1 -0
- package/icons/svg/rollback.svg +1 -0
- package/icons/svg/route.svg +1 -0
- package/icons/svg/rows.svg +1 -0
- package/icons/svg/rss.svg +1 -0
- package/icons/svg/ruler.svg +1 -0
- package/icons/svg/save.svg +1 -0
- package/icons/svg/scan.svg +1 -0
- package/icons/svg/scissors.svg +1 -0
- package/icons/svg/sdk.svg +1 -0
- package/icons/svg/search.svg +1 -0
- package/icons/svg/secret.svg +1 -0
- package/icons/svg/seed.svg +1 -0
- package/icons/svg/select.svg +1 -0
- package/icons/svg/self-host.svg +1 -0
- package/icons/svg/send.svg +1 -0
- package/icons/svg/server.svg +1 -0
- package/icons/svg/settings.svg +1 -0
- package/icons/svg/share.svg +1 -0
- package/icons/svg/shield-alert.svg +1 -0
- package/icons/svg/shield-off.svg +1 -0
- package/icons/svg/shield-user.svg +1 -0
- package/icons/svg/shield.svg +1 -0
- package/icons/svg/sidebar-left.svg +1 -0
- package/icons/svg/sidebar-right.svg +1 -0
- package/icons/svg/sign-out.svg +1 -0
- package/icons/svg/signals-in.svg +1 -0
- package/icons/svg/skip-back.svg +1 -0
- package/icons/svg/skip-forward.svg +1 -0
- package/icons/svg/slash.svg +1 -0
- package/icons/svg/sleep.svg +1 -0
- package/icons/svg/sliders.svg +1 -0
- package/icons/svg/sort.svg +1 -0
- package/icons/svg/sparkle.svg +1 -0
- package/icons/svg/sparkline.svg +1 -0
- package/icons/svg/split.svg +1 -0
- package/icons/svg/star.svg +1 -0
- package/icons/svg/stop.svg +1 -0
- package/icons/svg/strikethrough.svg +1 -0
- package/icons/svg/success.svg +1 -0
- package/icons/svg/suggestion.svg +1 -0
- package/icons/svg/sum.svg +1 -0
- package/icons/svg/summary.svg +1 -0
- package/icons/svg/sun.svg +1 -0
- package/icons/svg/support.svg +1 -0
- package/icons/svg/swap-vertical.svg +1 -0
- package/icons/svg/swap.svg +1 -0
- package/icons/svg/table.svg +1 -0
- package/icons/svg/tablet.svg +1 -0
- package/icons/svg/tag.svg +1 -0
- package/icons/svg/target.svg +1 -0
- package/icons/svg/team.svg +1 -0
- package/icons/svg/terminal.svg +1 -0
- package/icons/svg/test.svg +1 -0
- package/icons/svg/text.svg +1 -0
- package/icons/svg/theme.svg +1 -0
- package/icons/svg/thumbs-down.svg +1 -0
- package/icons/svg/thumbs-up.svg +1 -0
- package/icons/svg/timer.svg +1 -0
- package/icons/svg/toggle.svg +1 -0
- package/icons/svg/traces.svg +1 -0
- package/icons/svg/translate.svg +1 -0
- package/icons/svg/trash.svg +1 -0
- package/icons/svg/trend-down.svg +1 -0
- package/icons/svg/trend-up.svg +1 -0
- package/icons/svg/two-factor.svg +1 -0
- package/icons/svg/underline.svg +1 -0
- package/icons/svg/undo.svg +1 -0
- package/icons/svg/unlink.svg +1 -0
- package/icons/svg/unlock.svg +1 -0
- package/icons/svg/upgrade.svg +1 -0
- package/icons/svg/upload.svg +1 -0
- package/icons/svg/uptime.svg +1 -0
- package/icons/svg/usage.svg +1 -0
- package/icons/svg/user-check.svg +1 -0
- package/icons/svg/user-circle.svg +1 -0
- package/icons/svg/user-minus.svg +1 -0
- package/icons/svg/user-plus.svg +1 -0
- package/icons/svg/user-x.svg +1 -0
- package/icons/svg/user.svg +1 -0
- package/icons/svg/users.svg +1 -0
- package/icons/svg/variable.svg +1 -0
- package/icons/svg/verified.svg +1 -0
- package/icons/svg/video.svg +1 -0
- package/icons/svg/volume.svg +1 -0
- package/icons/svg/wallet.svg +1 -0
- package/icons/svg/wand.svg +1 -0
- package/icons/svg/warning.svg +1 -0
- package/icons/svg/watch.svg +1 -0
- package/icons/svg/wave.svg +1 -0
- package/icons/svg/web.svg +1 -0
- package/icons/svg/webhook.svg +1 -0
- package/icons/svg/wifi-off.svg +1 -0
- package/icons/svg/wifi.svg +1 -0
- package/icons/svg/window.svg +1 -0
- package/icons/svg/zoom-in.svg +1 -0
- package/icons/svg/zoom-out.svg +1 -0
- package/package.json +108 -4
- package/src/characters/data.ts +13 -0
- package/src/characters/index.ts +23 -0
- package/src/dom/search.ts +59 -0
- package/src/i18n/index.ts +140 -0
- package/src/icons/data.ts +760 -0
- package/tokens/tokens.json +625 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Nia and Nio, the two characters of Sypnia, in their poses. Copied from the output of
|
|
2
|
+
// ~/Projects/sypnia/scripts/build-characters.mjs (their construction lives there); regenerate there and copy again.
|
|
3
|
+
export const characters = {
|
|
4
|
+
"nia-watching": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 160 160\" role=\"img\" aria-label=\"Nia, watching\" class=\"ch ch-nia\"><title>Nia, watching</title><defs><style>.ch-b{fill:var(--ch-body,#f2f4e6)}.ch-bs{fill:none;stroke:var(--ch-body,#f2f4e6);stroke-linecap:round;stroke-linejoin:round}.ch-f{fill:var(--ch-face,#08282a)}.ch-fs{fill:none;stroke:var(--ch-face,#08282a);stroke-linecap:round;stroke-linejoin:round}.ch-w{fill:var(--ch-wing,#b2cac8)}.ch-h{fill:var(--ch-hood,#8bb6df)}.ch-l{fill:var(--glow,#e9f15d);stroke:var(--ch-line,transparent);stroke-width:1.5}.ch-ls{fill:none;stroke:var(--glow,#e9f15d);stroke-linecap:round}.ch-ld{fill:none;stroke:var(--glow-600,#bdc931);stroke-linecap:round}.ch-e{fill:var(--ember,#fc6f39)}.ch-es{fill:none;stroke:var(--ember,#fc6f39);stroke-linecap:round}</style><radialGradient id=\"nia0h\" cx=\"80\" cy=\"114\" r=\"44\" gradientUnits=\"userSpaceOnUse\"><stop offset=\"0\" stop-color=\"#e9f15d\" stop-opacity=\"0.42\"/><stop offset=\".45\" stop-color=\"#e9f15d\" stop-opacity=\"0.1344\"/><stop offset=\"1\" stop-color=\"#e9f15d\" stop-opacity=\"0\"/></radialGradient><clipPath id=\"nia0c\"><path d=\"M80,38C101,38 114,62 114,92C114,114 100,128 80,128C60,128 46,114 46,92C46,62 59,38 80,38Z\"/></clipPath></defs><circle cx=\"80\" cy=\"114\" r=\"44\" fill=\"url(#nia0h)\"/><g transform=\"translate(0,0)\"><path class=\"ch-w\" opacity=\".5\" transform=\"translate(56,78) rotate(-30)\" d=\"M0,6C-13,-10 -12,-36 0,-50C12,-36 13,-10 0,6Z\"/><path class=\"ch-w\" opacity=\".5\" transform=\"translate(104,78) rotate(30)\" d=\"M0,6C-13,-10 -12,-36 0,-50C12,-36 13,-10 0,6Z\"/><path class=\"ch-bs\" stroke-width=\"3\" d=\"M72,45C70,35 65,29 58,27M88,45C90,35 95,29 102,27\"/><circle class=\"ch-b\" cx=\"56.5\" cy=\"26.5\" r=\"3.4\"/><circle class=\"ch-b\" cx=\"103.5\" cy=\"26.5\" r=\"3.4\"/><path class=\"ch-bs\" stroke-width=\"5\" d=\"M49,96C42,100 40,106 41,112\"/><path class=\"ch-bs\" stroke-width=\"5\" d=\"M111,96C118,100 120,106 119,112\"/><path class=\"ch-b\" d=\"M80,38C101,38 114,62 114,92C114,114 100,128 80,128C60,128 46,114 46,92C46,62 59,38 80,38Z\"/><g clip-path=\"url(#nia0c)\"><path class=\"ch-l\" d=\"M40,101Q80,91 120,101V140H40Z\"/><path class=\"ch-ld\" stroke-width=\"2.2\" opacity=\".7\" d=\"M50,114Q80,106 110,114\"/></g><circle class=\"ch-f\" cx=\"69.6\" cy=\"75\" r=\"6\"/><circle class=\"ch-b\" cx=\"71.75999999999999\" cy=\"72.84\" r=\"1.6800000000000002\"/><circle class=\"ch-f\" cx=\"93.6\" cy=\"75\" r=\"6\"/><circle class=\"ch-b\" cx=\"95.75999999999999\" cy=\"72.84\" r=\"1.6800000000000002\"/></g></svg>",
|
|
5
|
+
"nia-found": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 160 160\" role=\"img\" aria-label=\"Nia has found a bug\" class=\"ch ch-nia\"><title>Nia has found a bug</title><defs><style>.ch-b{fill:var(--ch-body,#f2f4e6)}.ch-bs{fill:none;stroke:var(--ch-body,#f2f4e6);stroke-linecap:round;stroke-linejoin:round}.ch-f{fill:var(--ch-face,#08282a)}.ch-fs{fill:none;stroke:var(--ch-face,#08282a);stroke-linecap:round;stroke-linejoin:round}.ch-w{fill:var(--ch-wing,#b2cac8)}.ch-h{fill:var(--ch-hood,#8bb6df)}.ch-l{fill:var(--glow,#e9f15d);stroke:var(--ch-line,transparent);stroke-width:1.5}.ch-ls{fill:none;stroke:var(--glow,#e9f15d);stroke-linecap:round}.ch-ld{fill:none;stroke:var(--glow-600,#bdc931);stroke-linecap:round}.ch-e{fill:var(--ember,#fc6f39)}.ch-es{fill:none;stroke:var(--ember,#fc6f39);stroke-linecap:round}</style><radialGradient id=\"nia1h\" cx=\"80\" cy=\"114\" r=\"54\" gradientUnits=\"userSpaceOnUse\"><stop offset=\"0\" stop-color=\"#e9f15d\" stop-opacity=\"0.7\"/><stop offset=\".45\" stop-color=\"#e9f15d\" stop-opacity=\"0.22399999999999998\"/><stop offset=\"1\" stop-color=\"#e9f15d\" stop-opacity=\"0\"/></radialGradient><clipPath id=\"nia1c\"><path d=\"M80,38C101,38 114,62 114,92C114,114 100,128 80,128C60,128 46,114 46,92C46,62 59,38 80,38Z\"/></clipPath></defs><circle cx=\"80\" cy=\"114\" r=\"54\" fill=\"url(#nia1h)\"/><g transform=\"translate(0,-2)\"><path class=\"ch-w\" opacity=\".5\" transform=\"translate(56,78) rotate(-52)\" d=\"M0,6C-13,-10 -12,-36 0,-50C12,-36 13,-10 0,6Z\"/><path class=\"ch-w\" opacity=\".5\" transform=\"translate(104,78) rotate(52)\" d=\"M0,6C-13,-10 -12,-36 0,-50C12,-36 13,-10 0,6Z\"/><path class=\"ch-bs\" stroke-width=\"3\" d=\"M72,45C71,35 68,27 64,21M88,45C89,35 92,27 96,21\"/><circle class=\"ch-b\" cx=\"63.5\" cy=\"20\" r=\"3.4\"/><circle class=\"ch-b\" cx=\"96.5\" cy=\"20\" r=\"3.4\"/><path class=\"ch-bs\" stroke-width=\"5\" d=\"M49,94C42,96 38,92 36,86\"/><path class=\"ch-bs\" stroke-width=\"5\" d=\"M111,90L131,80\"/><path class=\"ch-b\" d=\"M80,38C101,38 114,62 114,92C114,114 100,128 80,128C60,128 46,114 46,92C46,62 59,38 80,38Z\"/><g clip-path=\"url(#nia1c)\"><path class=\"ch-l\" d=\"M40,101Q80,91 120,101V140H40Z\"/><path class=\"ch-ld\" stroke-width=\"2.2\" opacity=\".7\" d=\"M50,114Q80,106 110,114\"/></g><circle class=\"ch-f\" cx=\"67\" cy=\"74\" r=\"7.6\"/><circle class=\"ch-b\" cx=\"69.736\" cy=\"71.264\" r=\"2.128\"/><circle class=\"ch-f\" cx=\"93\" cy=\"74\" r=\"7.6\"/><circle class=\"ch-b\" cx=\"95.736\" cy=\"71.264\" r=\"2.128\"/><ellipse class=\"ch-f\" cx=\"80\" cy=\"89\" rx=\"2.6\" ry=\"3.2\"/></g><circle class=\"ch-e\" cx=\"144\" cy=\"72\" r=\"4.6\"/><path class=\"ch-es\" stroke-width=\"2.4\" d=\"M144,61.5v-4M152.5,66.5l3,-2.6M154.5,75.5h4\"/></svg>",
|
|
6
|
+
"nia-fixing": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 160 160\" role=\"img\" aria-label=\"Nia, fixing\" class=\"ch ch-nia\"><title>Nia, fixing</title><defs><style>.ch-b{fill:var(--ch-body,#f2f4e6)}.ch-bs{fill:none;stroke:var(--ch-body,#f2f4e6);stroke-linecap:round;stroke-linejoin:round}.ch-f{fill:var(--ch-face,#08282a)}.ch-fs{fill:none;stroke:var(--ch-face,#08282a);stroke-linecap:round;stroke-linejoin:round}.ch-w{fill:var(--ch-wing,#b2cac8)}.ch-h{fill:var(--ch-hood,#8bb6df)}.ch-l{fill:var(--glow,#e9f15d);stroke:var(--ch-line,transparent);stroke-width:1.5}.ch-ls{fill:none;stroke:var(--glow,#e9f15d);stroke-linecap:round}.ch-ld{fill:none;stroke:var(--glow-600,#bdc931);stroke-linecap:round}.ch-e{fill:var(--ember,#fc6f39)}.ch-es{fill:none;stroke:var(--ember,#fc6f39);stroke-linecap:round}</style><radialGradient id=\"nia2h\" cx=\"80\" cy=\"114\" r=\"46\" gradientUnits=\"userSpaceOnUse\"><stop offset=\"0\" stop-color=\"#e9f15d\" stop-opacity=\"0.5\"/><stop offset=\".45\" stop-color=\"#e9f15d\" stop-opacity=\"0.16\"/><stop offset=\"1\" stop-color=\"#e9f15d\" stop-opacity=\"0\"/></radialGradient><clipPath id=\"nia2c\"><path d=\"M80,38C101,38 114,62 114,92C114,114 100,128 80,128C60,128 46,114 46,92C46,62 59,38 80,38Z\"/></clipPath></defs><circle cx=\"80\" cy=\"114\" r=\"46\" fill=\"url(#nia2h)\"/><g transform=\"translate(0,0)\"><path class=\"ch-w\" opacity=\".5\" transform=\"translate(56,78) rotate(-22)\" d=\"M0,6C-13,-10 -12,-36 0,-50C12,-36 13,-10 0,6Z\"/><path class=\"ch-w\" opacity=\".5\" transform=\"translate(104,78) rotate(22)\" d=\"M0,6C-13,-10 -12,-36 0,-50C12,-36 13,-10 0,6Z\"/><path class=\"ch-bs\" stroke-width=\"3\" d=\"M72,45C70,35 65,29 58,27M88,45C90,35 95,29 102,27\"/><circle class=\"ch-b\" cx=\"56.5\" cy=\"26.5\" r=\"3.4\"/><circle class=\"ch-b\" cx=\"103.5\" cy=\"26.5\" r=\"3.4\"/><path class=\"ch-bs\" stroke-width=\"5\" d=\"M49,96C40,98 36,104 38,110\"/><path class=\"ch-bs\" stroke-width=\"5\" d=\"M111,92L126,98\"/><path class=\"ch-b\" d=\"M80,38C101,38 114,62 114,92C114,114 100,128 80,128C60,128 46,114 46,92C46,62 59,38 80,38Z\"/><g clip-path=\"url(#nia2c)\"><path class=\"ch-l\" d=\"M40,101Q80,91 120,101V140H40Z\"/><path class=\"ch-ld\" stroke-width=\"2.2\" opacity=\".7\" d=\"M50,114Q80,106 110,114\"/></g><circle class=\"ch-f\" cx=\"69\" cy=\"77.2\" r=\"6\"/><circle class=\"ch-b\" cx=\"71.16\" cy=\"75.04\" r=\"1.6800000000000002\"/><circle class=\"ch-f\" cx=\"93\" cy=\"77.2\" r=\"6\"/><circle class=\"ch-b\" cx=\"95.16\" cy=\"75.04\" r=\"1.6800000000000002\"/><path class=\"ch-b\" d=\"M58,66H102V73.5Q80,70 58,73.5Z\"/><path class=\"ch-fs\" stroke-width=\"2.6\" d=\"M76,89Q80,91.5 84,89\"/></g><g transform=\"translate(131,100) rotate(28)\"><path class=\"ch-bs\" stroke-width=\"5.5\" d=\"M0,2V-15\"/><path class=\"ch-bs\" stroke-width=\"5\" d=\"M-7.5,-29V-23.5A7.5,7.5 0 0 0 7.5,-23.5V-29\"/></g><path class=\"ch-ls\" stroke-width=\"2.16\" d=\"M146,87.5v1.9800000000000002M146,94.52v1.9800000000000002M141.5,92h1.9800000000000002M148.52,92h1.9800000000000002\"/></svg>",
|
|
7
|
+
"nia-celebrating": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 160 160\" role=\"img\" aria-label=\"Nia, celebrating\" class=\"ch ch-nia\"><title>Nia, celebrating</title><defs><style>.ch-b{fill:var(--ch-body,#f2f4e6)}.ch-bs{fill:none;stroke:var(--ch-body,#f2f4e6);stroke-linecap:round;stroke-linejoin:round}.ch-f{fill:var(--ch-face,#08282a)}.ch-fs{fill:none;stroke:var(--ch-face,#08282a);stroke-linecap:round;stroke-linejoin:round}.ch-w{fill:var(--ch-wing,#b2cac8)}.ch-h{fill:var(--ch-hood,#8bb6df)}.ch-l{fill:var(--glow,#e9f15d);stroke:var(--ch-line,transparent);stroke-width:1.5}.ch-ls{fill:none;stroke:var(--glow,#e9f15d);stroke-linecap:round}.ch-ld{fill:none;stroke:var(--glow-600,#bdc931);stroke-linecap:round}.ch-e{fill:var(--ember,#fc6f39)}.ch-es{fill:none;stroke:var(--ember,#fc6f39);stroke-linecap:round}</style><radialGradient id=\"nia3h\" cx=\"80\" cy=\"114\" r=\"56\" gradientUnits=\"userSpaceOnUse\"><stop offset=\"0\" stop-color=\"#e9f15d\" stop-opacity=\"0.75\"/><stop offset=\".45\" stop-color=\"#e9f15d\" stop-opacity=\"0.24\"/><stop offset=\"1\" stop-color=\"#e9f15d\" stop-opacity=\"0\"/></radialGradient><clipPath id=\"nia3c\"><path d=\"M80,38C101,38 114,62 114,92C114,114 100,128 80,128C60,128 46,114 46,92C46,62 59,38 80,38Z\"/></clipPath></defs><circle cx=\"80\" cy=\"114\" r=\"56\" fill=\"url(#nia3h)\"/><g transform=\"translate(0,-7)\"><path class=\"ch-w\" opacity=\".5\" transform=\"translate(56,78) rotate(-62)\" d=\"M0,6C-13,-10 -12,-36 0,-50C12,-36 13,-10 0,6Z\"/><path class=\"ch-w\" opacity=\".5\" transform=\"translate(104,78) rotate(62)\" d=\"M0,6C-13,-10 -12,-36 0,-50C12,-36 13,-10 0,6Z\"/><path class=\"ch-bs\" stroke-width=\"3\" d=\"M72,45C70,35 65,29 58,27M88,45C90,35 95,29 102,27\"/><circle class=\"ch-b\" cx=\"56.5\" cy=\"26.5\" r=\"3.4\"/><circle class=\"ch-b\" cx=\"103.5\" cy=\"26.5\" r=\"3.4\"/><path class=\"ch-bs\" stroke-width=\"5\" d=\"M50,88L35,68\"/><path class=\"ch-bs\" stroke-width=\"5\" d=\"M110,88L125,68\"/><path class=\"ch-b\" d=\"M80,38C101,38 114,62 114,92C114,114 100,128 80,128C60,128 46,114 46,92C46,62 59,38 80,38Z\"/><g clip-path=\"url(#nia3c)\"><path class=\"ch-l\" d=\"M40,101Q80,91 120,101V140H40Z\"/><path class=\"ch-ld\" stroke-width=\"2.2\" opacity=\".7\" d=\"M50,114Q80,106 110,114\"/></g><path class=\"ch-fs\" stroke-width=\"3.6\" d=\"M61.5,78.5Q68,68.5 74.5,78.5\"/><path class=\"ch-fs\" stroke-width=\"3.6\" d=\"M85.5,78.5Q92,68.5 98.5,78.5\"/><path class=\"ch-fs\" stroke-width=\"2.8\" d=\"M74,87Q80,93 86,87\"/></g><path class=\"ch-ls\" stroke-width=\"2.4\" d=\"M30,41v2.2M30,48.8v2.2M25,46h2.2M32.8,46h2.2\"/><path class=\"ch-ls\" stroke-width=\"2.76\" d=\"M134,34.25v2.53M134,43.22v2.53M128.25,40h2.53M137.22,40h2.53\"/><circle fill=\"var(--glow,#e9f15d)\" cx=\"142\" cy=\"96\" r=\"2.6\"/><circle fill=\"var(--glow,#e9f15d)\" cx=\"20\" cy=\"88\" r=\"2\"/></svg>",
|
|
8
|
+
"nio-sleeping": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 160 160\" role=\"img\" aria-label=\"Nio, asleep\" class=\"ch ch-nio\"><title>Nio, asleep</title><defs><style>.ch-b{fill:var(--ch-body,#f2f4e6)}.ch-bs{fill:none;stroke:var(--ch-body,#f2f4e6);stroke-linecap:round;stroke-linejoin:round}.ch-f{fill:var(--ch-face,#08282a)}.ch-fs{fill:none;stroke:var(--ch-face,#08282a);stroke-linecap:round;stroke-linejoin:round}.ch-w{fill:var(--ch-wing,#b2cac8)}.ch-h{fill:var(--ch-hood,#8bb6df)}.ch-l{fill:var(--glow,#e9f15d);stroke:var(--ch-line,transparent);stroke-width:1.5}.ch-ls{fill:none;stroke:var(--glow,#e9f15d);stroke-linecap:round}.ch-ld{fill:none;stroke:var(--glow-600,#bdc931);stroke-linecap:round}.ch-e{fill:var(--ember,#fc6f39)}.ch-es{fill:none;stroke:var(--ember,#fc6f39);stroke-linecap:round}</style><radialGradient id=\"nio4h\" cx=\"80\" cy=\"122\" r=\"34\" gradientUnits=\"userSpaceOnUse\"><stop offset=\"0\" stop-color=\"#e9f15d\" stop-opacity=\"0.2\"/><stop offset=\".45\" stop-color=\"#e9f15d\" stop-opacity=\"0.064\"/><stop offset=\"1\" stop-color=\"#e9f15d\" stop-opacity=\"0\"/></radialGradient><clipPath id=\"nio4c\"><path d=\"M80,60C103,60 116,79 116,101C116,121 102,133 80,133C58,133 44,121 44,101C44,79 57,60 80,60Z\"/></clipPath></defs><circle cx=\"80\" cy=\"122\" r=\"34\" fill=\"url(#nio4h)\"/><path class=\"ch-b\" d=\"M80,60C103,60 116,79 116,101C116,121 102,133 80,133C58,133 44,121 44,101C44,79 57,60 80,60Z\"/><g clip-path=\"url(#nio4c)\"><path class=\"ch-l\" style=\"fill:var(--glow-600,#bdc931)\" d=\"M40,117Q80,108 120,117V140H40Z\"/></g><path class=\"ch-fs\" stroke-width=\"3.6\" d=\"M61.5,99.75Q68,108.75 74.5,99.75\"/><path class=\"ch-fs\" stroke-width=\"3.6\" d=\"M85.5,99.75Q92,108.75 98.5,99.75\"/><g transform=\"translate(0,0) rotate(0 80 70)\"><path class=\"ch-bs\" stroke-width=\"3\" d=\"M55,60C46,57 39,62 37,71M105,60C114,57 121,62 123,71\"/><circle class=\"ch-b\" cx=\"36.6\" cy=\"73\" r=\"3.4\"/><circle class=\"ch-b\" cx=\"123.4\" cy=\"73\" r=\"3.4\"/><path class=\"ch-h\" d=\"M40,93C40,65 57,46 80,46C103,46 120,65 120,93C107,85.5 93.5,82 80,82C66.5,82 53,85.5 40,93Z\"/></g><path class=\"ch-bs\" stroke-width=\"2.6\" opacity=\".8\" d=\"M120,50h5.6000000000000005l-5.6000000000000005,6.4h5.6000000000000005\"/><path class=\"ch-bs\" stroke-width=\"2.6\" opacity=\".8\" d=\"M131,33h7.3500000000000005l-7.3500000000000005,8.4h7.3500000000000005\"/><path class=\"ch-bs\" stroke-width=\"2.6\" opacity=\".8\" d=\"M144,13h9.1l-9.1,10.4h9.1\"/></svg>",
|
|
9
|
+
"nio-one-eye": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 160 160\" role=\"img\" aria-label=\"Nio, one eye open\" class=\"ch ch-nio\"><title>Nio, one eye open</title><defs><style>.ch-b{fill:var(--ch-body,#f2f4e6)}.ch-bs{fill:none;stroke:var(--ch-body,#f2f4e6);stroke-linecap:round;stroke-linejoin:round}.ch-f{fill:var(--ch-face,#08282a)}.ch-fs{fill:none;stroke:var(--ch-face,#08282a);stroke-linecap:round;stroke-linejoin:round}.ch-w{fill:var(--ch-wing,#b2cac8)}.ch-h{fill:var(--ch-hood,#8bb6df)}.ch-l{fill:var(--glow,#e9f15d);stroke:var(--ch-line,transparent);stroke-width:1.5}.ch-ls{fill:none;stroke:var(--glow,#e9f15d);stroke-linecap:round}.ch-ld{fill:none;stroke:var(--glow-600,#bdc931);stroke-linecap:round}.ch-e{fill:var(--ember,#fc6f39)}.ch-es{fill:none;stroke:var(--ember,#fc6f39);stroke-linecap:round}</style><radialGradient id=\"nio5h\" cx=\"80\" cy=\"122\" r=\"38\" gradientUnits=\"userSpaceOnUse\"><stop offset=\"0\" stop-color=\"#e9f15d\" stop-opacity=\"0.3\"/><stop offset=\".45\" stop-color=\"#e9f15d\" stop-opacity=\"0.096\"/><stop offset=\"1\" stop-color=\"#e9f15d\" stop-opacity=\"0\"/></radialGradient><clipPath id=\"nio5c\"><path d=\"M80,60C103,60 116,79 116,101C116,121 102,133 80,133C58,133 44,121 44,101C44,79 57,60 80,60Z\"/></clipPath></defs><circle cx=\"80\" cy=\"122\" r=\"38\" fill=\"url(#nio5h)\"/><path class=\"ch-b\" d=\"M80,60C103,60 116,79 116,101C116,121 102,133 80,133C58,133 44,121 44,101C44,79 57,60 80,60Z\"/><g clip-path=\"url(#nio5c)\"><path class=\"ch-l\" style=\"fill:var(--glow-600,#bdc931)\" d=\"M40,117Q80,108 120,117V140H40Z\"/></g><path class=\"ch-fs\" stroke-width=\"3.6\" d=\"M61.5,99.75Q68,108.75 74.5,99.75\"/><g class=\"ch-open\"><circle cx=\"92\" cy=\"101\" r=\"5\" fill=\"var(--glow,#e9f15d)\" stroke=\"var(--ch-face,#08282a)\" stroke-width=\"2.8\"/></g><g class=\"ch-shut\" opacity=\"0\"><path class=\"ch-fs\" stroke-width=\"3.6\" d=\"M85.5,99.75Q92,108.75 98.5,99.75\"/></g><g transform=\"translate(0,-2) rotate(-4 80 70)\"><path class=\"ch-bs\" stroke-width=\"3\" d=\"M55,60C46,57 39,62 37,71M105,60C114,57 121,62 123,71\"/><circle class=\"ch-b\" cx=\"36.6\" cy=\"73\" r=\"3.4\"/><circle class=\"ch-b\" cx=\"123.4\" cy=\"73\" r=\"3.4\"/><path class=\"ch-h\" d=\"M40,93C40,65 57,46 80,46C103,46 120,65 120,93C107,85.5 93.5,82 80,82C66.5,82 53,85.5 40,93Z\"/></g><g class=\"ch-zed\"><path class=\"ch-bs\" stroke-width=\"2.6\" opacity=\".8\" d=\"M124,46h5.6000000000000005l-5.6000000000000005,6.4h5.6000000000000005\"/></g></svg>",
|
|
10
|
+
"nio-startled": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 160 160\" role=\"img\" aria-label=\"Nio, startled awake\" class=\"ch ch-nio\"><title>Nio, startled awake</title><defs><style>.ch-b{fill:var(--ch-body,#f2f4e6)}.ch-bs{fill:none;stroke:var(--ch-body,#f2f4e6);stroke-linecap:round;stroke-linejoin:round}.ch-f{fill:var(--ch-face,#08282a)}.ch-fs{fill:none;stroke:var(--ch-face,#08282a);stroke-linecap:round;stroke-linejoin:round}.ch-w{fill:var(--ch-wing,#b2cac8)}.ch-h{fill:var(--ch-hood,#8bb6df)}.ch-l{fill:var(--glow,#e9f15d);stroke:var(--ch-line,transparent);stroke-width:1.5}.ch-ls{fill:none;stroke:var(--glow,#e9f15d);stroke-linecap:round}.ch-ld{fill:none;stroke:var(--glow-600,#bdc931);stroke-linecap:round}.ch-e{fill:var(--ember,#fc6f39)}.ch-es{fill:none;stroke:var(--ember,#fc6f39);stroke-linecap:round}</style><radialGradient id=\"nio6h\" cx=\"80\" cy=\"122\" r=\"48\" gradientUnits=\"userSpaceOnUse\"><stop offset=\"0\" stop-color=\"#e9f15d\" stop-opacity=\"0.55\"/><stop offset=\".45\" stop-color=\"#e9f15d\" stop-opacity=\"0.17600000000000002\"/><stop offset=\"1\" stop-color=\"#e9f15d\" stop-opacity=\"0\"/></radialGradient><clipPath id=\"nio6c\"><path d=\"M80,60C103,60 116,79 116,101C116,121 102,133 80,133C58,133 44,121 44,101C44,79 57,60 80,60Z\"/></clipPath></defs><circle cx=\"80\" cy=\"122\" r=\"48\" fill=\"url(#nio6h)\"/><path class=\"ch-bs\" stroke-width=\"5\" d=\"M46,104L32,96M114,104L128,96\"/><path class=\"ch-b\" d=\"M80,60C103,60 116,79 116,101C116,121 102,133 80,133C58,133 44,121 44,101C44,79 57,60 80,60Z\"/><g clip-path=\"url(#nio6c)\"><path class=\"ch-l\" d=\"M40,117Q80,108 120,117V140H40Z\"/></g><circle class=\"ch-f\" cx=\"67\" cy=\"101\" r=\"7\"/><circle class=\"ch-b\" cx=\"69.52\" cy=\"98.48\" r=\"1.9600000000000002\"/><circle class=\"ch-f\" cx=\"93\" cy=\"101\" r=\"7\"/><circle class=\"ch-b\" cx=\"95.52\" cy=\"98.48\" r=\"1.9600000000000002\"/><ellipse class=\"ch-f\" cx=\"80\" cy=\"113\" rx=\"2.4\" ry=\"2.8\"/><g transform=\"translate(0,-12) rotate(9 80 70)\"><path class=\"ch-bs\" stroke-width=\"3\" d=\"M55,60C46,57 39,62 37,71M105,60C114,57 121,62 123,71\"/><circle class=\"ch-b\" cx=\"36.6\" cy=\"73\" r=\"3.4\"/><circle class=\"ch-b\" cx=\"123.4\" cy=\"73\" r=\"3.4\"/><path class=\"ch-h\" d=\"M40,93C40,65 57,46 80,46C103,46 120,65 120,93C107,85.5 93.5,82 80,82C66.5,82 53,85.5 40,93Z\"/></g><path class=\"ch-es\" stroke-width=\"3\" d=\"M140,40v13\"/><circle class=\"ch-e\" cx=\"140\" cy=\"61\" r=\"2.4\"/></svg>",
|
|
11
|
+
"nio-stretching": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 160 160\" role=\"img\" aria-label=\"Nio, stretching after a good night\" class=\"ch ch-nio\"><title>Nio, stretching after a good night</title><defs><style>.ch-b{fill:var(--ch-body,#f2f4e6)}.ch-bs{fill:none;stroke:var(--ch-body,#f2f4e6);stroke-linecap:round;stroke-linejoin:round}.ch-f{fill:var(--ch-face,#08282a)}.ch-fs{fill:none;stroke:var(--ch-face,#08282a);stroke-linecap:round;stroke-linejoin:round}.ch-w{fill:var(--ch-wing,#b2cac8)}.ch-h{fill:var(--ch-hood,#8bb6df)}.ch-l{fill:var(--glow,#e9f15d);stroke:var(--ch-line,transparent);stroke-width:1.5}.ch-ls{fill:none;stroke:var(--glow,#e9f15d);stroke-linecap:round}.ch-ld{fill:none;stroke:var(--glow-600,#bdc931);stroke-linecap:round}.ch-e{fill:var(--ember,#fc6f39)}.ch-es{fill:none;stroke:var(--ember,#fc6f39);stroke-linecap:round}</style><radialGradient id=\"nio7h\" cx=\"80\" cy=\"122\" r=\"50\" gradientUnits=\"userSpaceOnUse\"><stop offset=\"0\" stop-color=\"#e9f15d\" stop-opacity=\"0.6\"/><stop offset=\".45\" stop-color=\"#e9f15d\" stop-opacity=\"0.192\"/><stop offset=\"1\" stop-color=\"#e9f15d\" stop-opacity=\"0\"/></radialGradient><clipPath id=\"nio7c\"><path d=\"M80,60C103,60 116,79 116,101C116,121 102,133 80,133C58,133 44,121 44,101C44,79 57,60 80,60Z\"/></clipPath></defs><circle cx=\"80\" cy=\"122\" r=\"50\" fill=\"url(#nio7h)\"/><path class=\"ch-bs\" stroke-width=\"5\" d=\"M47,100L30,82M113,100L130,82\"/><path class=\"ch-b\" d=\"M80,60C103,60 116,79 116,101C116,121 102,133 80,133C58,133 44,121 44,101C44,79 57,60 80,60Z\"/><g clip-path=\"url(#nio7c)\"><path class=\"ch-l\" d=\"M40,117Q80,108 120,117V140H40Z\"/></g><path class=\"ch-fs\" stroke-width=\"3.6\" d=\"M61.5,105.5Q68,95.5 74.5,105.5\"/><path class=\"ch-fs\" stroke-width=\"3.6\" d=\"M85.5,105.5Q92,95.5 98.5,105.5\"/><path class=\"ch-fs\" stroke-width=\"2.8\" d=\"M75,112Q80,116.5 85,112\"/><g transform=\"translate(0,-5) rotate(-10 80 70)\"><path class=\"ch-bs\" stroke-width=\"3\" d=\"M55,60C46,57 39,62 37,71M105,60C114,57 121,62 123,71\"/><circle class=\"ch-b\" cx=\"36.6\" cy=\"73\" r=\"3.4\"/><circle class=\"ch-b\" cx=\"123.4\" cy=\"73\" r=\"3.4\"/><path class=\"ch-h\" d=\"M40,93C40,65 57,46 80,46C103,46 120,65 120,93C107,85.5 93.5,82 80,82C66.5,82 53,85.5 40,93Z\"/></g><path class=\"ch-ls\" stroke-width=\"2.4\" d=\"M138,53v2.2M138,60.8v2.2M133,58h2.2M140.8,58h2.2\"/><circle fill=\"var(--glow,#e9f15d)\" cx=\"24\" cy=\"62\" r=\"2.4\"/></svg>"
|
|
12
|
+
} as const;
|
|
13
|
+
export type CharacterName = keyof typeof characters;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// Nia and Nio, ready to put in a page: the SVG with ids made unique (one page may show the same pose twice) and the
|
|
2
|
+
// name given or hidden. And the seeded scatter of the fireflies, so server and browser draw the same field.
|
|
3
|
+
import { characters, type CharacterName } from './data';
|
|
4
|
+
export { characters, type CharacterName };
|
|
5
|
+
let n = 0;
|
|
6
|
+
export function characterSvg(name: CharacterName, label?: string): string {
|
|
7
|
+
const tag = `c${(n++).toString(36)}`;
|
|
8
|
+
let svg = (characters[name] as string).replace(/<title>.*?<\/title>/, '')
|
|
9
|
+
.replace(/id="([^"]+)"/g, `id="$1-${tag}"`).replace(/url\(#([^)]+)\)/g, `url(#$1-${tag})`);
|
|
10
|
+
svg = label ? svg.replace(/aria-label="[^"]*"/, `aria-label="${label.replace(/"/g, '"')}"`) : svg.replace(/role="img" aria-label="[^"]*"/, 'aria-hidden="true"');
|
|
11
|
+
return svg;
|
|
12
|
+
}
|
|
13
|
+
export interface Firefly { x: string; y: string; s: string; o: string; d: string; t: string; dx: string; dy: string }
|
|
14
|
+
/** The same field for the same seed: positions in %, size in px, opacity, delay and period in s, drift in px. */
|
|
15
|
+
export function fireflies(seed = 11, count = 84): Firefly[] {
|
|
16
|
+
let s = seed >>> 0;
|
|
17
|
+
const r = () => ((s = (s * 1664525 + 1013904223) >>> 0) / 4294967296);
|
|
18
|
+
return Array.from({ length: count }, () => ({
|
|
19
|
+
x: (r() * 100).toFixed(2), y: (4 + r() * 88).toFixed(2), s: (2 + r() * 3.2).toFixed(1), o: (0.22 + r() * 0.55).toFixed(2),
|
|
20
|
+
d: (-r() * 9).toFixed(2), t: (4.5 + r() * 6).toFixed(1), dx: ((r() - 0.5) * 26).toFixed(0), dy: ((r() - 0.5) * 18).toFixed(0),
|
|
21
|
+
}));
|
|
22
|
+
}
|
|
23
|
+
export const fireflyStyle = (f: Firefly) => `left:${f.x}%;top:${f.y}%;--s:${f.s}px;--o:${f.o};--d:${f.d}s;--t:${f.t}s;--dx:${f.dx}px;--dy:${f.dy}px`;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// Search over a small index of pages, in the browser: no service, no library. Good up to a few thousand entries.
|
|
2
|
+
// An entry is a page or a section of one. Every word typed must appear (in any order); the title weighs most.
|
|
3
|
+
|
|
4
|
+
export interface SearchEntry {
|
|
5
|
+
/** What the result says in bold: the page or section title. */
|
|
6
|
+
title: string;
|
|
7
|
+
url: string;
|
|
8
|
+
/** Where it lives: the section of the docs, the group of the gallery. Results are grouped by it. */
|
|
9
|
+
group?: string;
|
|
10
|
+
/** A line of text from the page, shown under the title. */
|
|
11
|
+
text?: string;
|
|
12
|
+
/** Other words people may type for it. */
|
|
13
|
+
keywords?: string[];
|
|
14
|
+
}
|
|
15
|
+
export interface SearchHit extends SearchEntry { score: number }
|
|
16
|
+
|
|
17
|
+
/** Lower case, without accents, so «configuración» is found by «configuracion». */
|
|
18
|
+
export const fold = (s: string) => s.normalize('NFD').replace(/\p{Diacritic}/gu, '').toLowerCase();
|
|
19
|
+
export const terms = (q: string) => fold(q).split(/[^\p{L}\p{N}_.-]+/u).filter((t) => t.length > 0);
|
|
20
|
+
|
|
21
|
+
export function searchEntries(entries: SearchEntry[], query: string, limit = 30): SearchHit[] {
|
|
22
|
+
const words = terms(query);
|
|
23
|
+
if (!words.length) return [];
|
|
24
|
+
const hits: SearchHit[] = [];
|
|
25
|
+
for (const e of entries) {
|
|
26
|
+
const title = fold(e.title), group = fold(e.group ?? ''), text = fold(e.text ?? ''), keys = fold((e.keywords ?? []).join(' '));
|
|
27
|
+
let score = 0, all = true;
|
|
28
|
+
for (const w of words) {
|
|
29
|
+
const inTitle = title.includes(w), inKeys = keys.includes(w), inGroup = group.includes(w), inText = text.includes(w);
|
|
30
|
+
if (!inTitle && !inKeys && !inGroup && !inText) { all = false; break; }
|
|
31
|
+
score += (inTitle ? (title.startsWith(w) || title.includes(` ${w}`) ? 12 : 8) : 0) + (inKeys ? 5 : 0) + (inGroup ? 2 : 0) + (inText ? 1 : 0);
|
|
32
|
+
}
|
|
33
|
+
if (!all) continue;
|
|
34
|
+
if (title === fold(query.trim())) score += 20;
|
|
35
|
+
hits.push({ ...e, score });
|
|
36
|
+
}
|
|
37
|
+
return hits.sort((a, b) => b.score - a.score || a.title.length - b.title.length).slice(0, limit);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const escape = (s: string) => s.replace(/[&<>"]/g, (c) => ({ '&': '&', '<': '<', '>': '>', '"': '"' })[c]!);
|
|
41
|
+
/** The text as HTML with the typed words in <mark>, matched without regard to case or accents. */
|
|
42
|
+
export function highlight(text: string, query: string): string {
|
|
43
|
+
const words = terms(query);
|
|
44
|
+
if (!words.length) return escape(text);
|
|
45
|
+
const folded = fold(text);
|
|
46
|
+
// fold() keeps one character per character for the scripts we use, so positions line up.
|
|
47
|
+
const marks = new Array<boolean>(text.length).fill(false);
|
|
48
|
+
for (const w of words) {
|
|
49
|
+
let i = folded.indexOf(w);
|
|
50
|
+
while (i >= 0) { for (let k = i; k < i + w.length; k++) marks[k] = true; i = folded.indexOf(w, i + w.length); }
|
|
51
|
+
}
|
|
52
|
+
let out = '', open = false;
|
|
53
|
+
for (let i = 0; i < text.length; i++) {
|
|
54
|
+
if (marks[i] && !open) { out += '<mark>'; open = true; }
|
|
55
|
+
if (!marks[i] && open) { out += '</mark>'; open = false; }
|
|
56
|
+
out += escape(text[i]!);
|
|
57
|
+
}
|
|
58
|
+
return open ? `${out}</mark>` : out;
|
|
59
|
+
}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
// The library's own words, in English and Spanish, and formatters that follow the person's language.
|
|
2
|
+
export type Locale = 'en' | 'es';
|
|
3
|
+
export const strings = {
|
|
4
|
+
en: {
|
|
5
|
+
unsavedKeep: 'You have unsaved changes. Save them, or press Cancel to leave without saving.',
|
|
6
|
+
close: 'Close', cancel: 'Cancel', confirm: 'Confirm', copy: 'Copy', copied: 'Copied', show: 'Show', hide: 'Hide',
|
|
7
|
+
unit: 'Unit', unit_seconds: 'seconds', unit_minutes: 'minutes', unit_hours: 'hours', unit_days: 'days', keyLooksWrong: 'This does not look like a key of this service. Keys start with {example}; copy it again from the service.', country: 'Country', chooseMonth: 'Choose a month', previousYear: 'Previous year', nextYear: 'Next year', chooseAnother: 'Choose another', noFileChosen: 'No file chosen', replace: 'Replace', remove: 'Remove', imageHint: 'PNG, JPG, SVG or WebP, up to {max}.', changePhoto: 'Change photo', addPhoto: 'Add a photo', pickColor: 'Pick a colour', colorFormat: 'Write the colour as # and six characters, for example #3b82f6.', runHint: 'Ctrl or ⌘ + Enter runs it', running: 'Running…', run: 'Run', jsonErrorLine: 'The JSON has a mistake on line {line}. Check the commas, quotes and brackets there.', jsonError: 'The JSON has a mistake. Check the commas, quotes and brackets.', jsonOk: 'Valid JSON', formatJson: 'Tidy up', kvName: 'Name', kvValue: 'Value', kvSecret: 'Hide the value of {name}', kvDuplicate: '{name} is written twice; only one is used. Remove one of them.', kvAdd: 'Add a variable', kvPasteHint: 'Paste several NAME=value lines into a name to fill them all.', cronEveryMinute: 'Every minute', cronEveryNMinutes: 'Every {n} minutes', cronHourly: 'Every hour, at minute {m}', cronDaily: 'Every day at {time}', cronWeekdays: 'Monday to Friday at {time}', cronWeekly: 'Every {day} at {time}', cronMonthly: 'On day {day} of each month at {time}', day0: 'Sunday', day1: 'Monday', day2: 'Tuesday', day3: 'Wednesday', day4: 'Thursday', day5: 'Friday', day6: 'Saturday', cronPresets: 'Common schedules', cronPresetDaily: 'Every day at 03:00', cronPresetHourly: 'Every hour', cronPreset15: 'Every 15 minutes', cronPresetWeekdays: 'Weekdays at 09:00', cronPresetMonthly: 'First day of each month', cronCustom: 'A custom schedule', cronInvalid: 'A schedule has five parts separated by spaces: minute, hour, day, month and weekday.', ratingOf: '{value} of {max}',
|
|
8
|
+
countLabel: 'Count', fromPrevious: 'of the previous step', fromFirst: 'of the first step', starts: 'Starts', takes: 'Takes',
|
|
9
|
+
live: 'Live', paused: 'Paused', healthUp: 'Working', healthDegraded: 'Slow', healthDown: 'Down', healthUnknown: 'Not checked yet', usageOf: '{used} of {limit}', usageFull: 'The limit is reached: new data is not saved.', usageNear: '{percent} used: it will soon be full.', usageResets: 'Starts again on {date}', step_done: 'done', step_running: 'running', step_waiting: 'waiting', step_failed: 'failed', step_skipped: 'skipped', countdownEnded: 'Time is up', offlineTitle: 'No connection.', offlineBody: 'What you see stays here; changes are saved when the connection comes back.', notFoundTitle: '{what} does not exist', notFoundBody: 'It may have been deleted or moved. Check the address, or go back.',
|
|
10
|
+
signOut: 'Sign out', account: 'Account', markAllRead: 'Mark all as read', noNotifications: 'Nothing new', unreadCount: '{count} unread', unread: 'Unread', loadMore: 'Show {count} more', allShown: 'All {count} shown', backToTop: 'Back to top', night: 'Night', paper: 'Paper', density: 'Density', comfortable: 'Comfortable', compact: 'Compact', filterList: 'Filter the list', newer: 'Newer', older: 'Older', currentItem: '{label} (current)', createItem: 'Create {label}', switchItem: 'Switch {kind}', nothingFound: 'Nothing called «{query}»',
|
|
11
|
+
gotIt: 'Got it', stepOf: 'Step {n} of {total}', skipTour: 'Skip the tour', finish: 'Finish', imageOf: '{n} of {total}', notifications: 'Notifications', preview: 'Preview of {label}', openMenu: 'Open the menu of {label}',
|
|
12
|
+
moreOptions: 'More options', opensNewTab: '(opens in a new tab)', download: 'Download', copyValue: 'Copy {label}', copiedValue: 'Copied: {label}', pressKeys: 'Press {keys}',
|
|
13
|
+
unsaved: 'You have unsaved changes', discard: 'Discard', saveChanges: 'Save changes', savedAt: 'Saved at {time}', savedNow: 'Saved', notSavedYet: 'Not saved', editField: 'Edit {label}',
|
|
14
|
+
save: 'Save', saving: 'Saving…', delete: 'Delete', edit: 'Edit', back: 'Back', next: 'Next', previous: 'Previous', done: 'Done',
|
|
15
|
+
search: 'Search', clear: 'Clear', more: 'More', actions: 'Actions', optional: 'optional', required: 'required',
|
|
16
|
+
noResults: 'Nothing matches', retry: 'Try again', loading: 'Loading',
|
|
17
|
+
typeToConfirm: 'Type {word} to confirm', page: 'Page {page} of {pages}', pagination: 'Pages',
|
|
18
|
+
showing: '{from}–{to} of {total}', perPage: 'Per page', selected: '{count} selected', goToPage: 'Go to page {page}',
|
|
19
|
+
errorSummary: 'Check these fields', secretOnce: 'Copy it now. It is shown only this once.',
|
|
20
|
+
sortAsc: 'Sorted ascending', sortDesc: 'Sorted descending', sortBy: 'Sort by {column}', dismiss: 'Dismiss',
|
|
21
|
+
viewAsTable: 'View as table', noData: 'No data for this period',
|
|
22
|
+
skipToContent: 'Skip to content', mainNav: 'Main navigation', whereYouAre: 'Where you are', searchOrJump: 'Search or jump to…',
|
|
23
|
+
toSelect: 'to choose', toMove: 'to move', toClose: 'to close', switchTo: 'Switch to',
|
|
24
|
+
choose: 'Choose…', removeItem: 'Remove {item}', rangeFrom: 'From', rangeTo: 'To', tagsCount: '{count} added', otpBox: 'Character {n} of {total}',
|
|
25
|
+
dropFile: 'Drop a file here or choose one', dropFiles: 'Drop files here or choose them', chooseFile: 'Choose a file', chooseFiles: 'Choose files', chosenFiles: 'Chosen files',
|
|
26
|
+
fileTooLarge: '{name} is larger than {max}. Choose a smaller file.', fileWrongType: '{name} is not a file this takes. Choose {types}.',
|
|
27
|
+
filters: 'Filters', any: 'Any', clearFilters: 'Clear filters', clearSelection: 'Clear selection', columns: 'Columns', exportCsv: 'Export CSV',
|
|
28
|
+
rowsCount: '{count} rows', rowsOne: '1 row', rowsOf: '{shown} of {total} rows', emptyTable: 'No rows yet',
|
|
29
|
+
sortLabel: 'Sort by', sortNone: 'No order', ascending: 'ascending', descending: 'descending',
|
|
30
|
+
selectRow: 'Select {row}', selectAllRows: 'Select all rows', editValue: 'Edit {column}', notSaved: '{column} was not saved.', resizeColumn: 'Resize column {column}',
|
|
31
|
+
follow: 'Follow', moreCount: '{count} more', stepsDone: '{done} of {total} done', stepDone: 'Done', stepTodo: 'To do',
|
|
32
|
+
deltaUp: 'Up {value}', deltaDown: 'Down {value}', deltaFlat: 'No change', itemsCount: '{count} items', keysCount: '{count} keys', itemsOne: '1 item', keysOne: '1 key', now: 'Now',
|
|
33
|
+
primaryKey: 'Primary key', uniqueValue: 'Unique', nullable: 'Can be empty', pointsTo: 'Points to {target}', columnName: 'Column', columnType: 'Type', columnDefault: 'Default', columnRules: 'Rules',
|
|
34
|
+
noLogs: 'No log lines yet', noActivity: 'Nothing has happened here yet', showExact: 'Show the exact date', showWhole: 'Show it whole',
|
|
35
|
+
resize: 'Resize', onThisPage: 'On this page', docsNav: 'Documentation', openNav: 'Open the navigation', closeNav: 'Close the navigation', hideNav: 'Hide the navigation', showNav: 'Show the navigation', surface: 'Night or paper', language: 'Language', products: 'Products', searchDocs: 'Search the docs', searchHint: 'Search pages, sections and terms', noResultsFor: 'Nothing matches «{query}»', noResultsHint: 'Try fewer words, or another word for it.', toOpen: 'to open',
|
|
36
|
+
breadcrumb: 'Breadcrumb', pager: 'Previous and next page', editPage: 'Edit this page', wasUseful: 'Was this page useful?', yes: 'Yes', no: 'No', thanks: 'Thank you. It helps us write better pages.', note: 'Note', tip: 'Tip', warning: 'Warning', danger: 'Danger', plainWords: 'In plain words',
|
|
37
|
+
parameters: 'Parameters', noParams: 'It takes no parameters.', defaultValue: 'Default', errors: 'Errors', request: 'Request', response: 'Response', expected: 'You should see', authentication: 'Authentication', enlarge: 'Enlarge', inWords: 'This diagram in words', figure: 'Figure', glossary: 'Glossary', version: 'Version', changelog: 'Changes', added: 'Added', changed: 'Changed', fixed: 'Fixed', removed: 'Removed', install: 'Install', withAgent: 'With a coding agent', tool: 'Tool', setting: 'Setting', option: 'Option', envVar: 'Environment variable', type: 'Type', readOnly: 'Read only', changesData: 'Changes data',
|
|
38
|
+
included: 'Included', notIncluded: 'Not included', recommended: 'Recommended', currentPlan: 'Your plan', imageFailed: 'The image could not be loaded.', linesAdded: '{count} lines added', linesRemoved: '{count} lines removed', lineAdded: 'added', lineRemoved: 'removed', linesHidden: 'Show {count} unchanged lines', noChanges: 'Both versions are the same', sortOrder: 'Order', peopleMore: '{count} more: {names}', openImage: 'Open {label}', exactValue: 'Exactly {value}', filesIn: '{count} files', checklistOf: '{done} of {total} done', markDone: 'Mark «{item}» as done', markTodo: 'Mark «{item}» as not done', diffBefore: 'Before', diffAfter: 'After', total: 'Total', activeDays: 'Days with activity', scaleLess: 'Less', scaleMore: 'More', selfTime: 'Self', share: 'Share', outOfMap: 'out of the map', casesMap: 'The use cases, in words', flowsTo: '{from} leads to {to}', flowsToWith: '{from} leads to {to}: {label}', messageFrom: '{n}. {from} to {to}: {label}', messageReply: '{n}. {from} answers {to}: {label}', relation: '{from} points to {to}', tablesCount: '{count} tables', columnsCount: '{count} columns',
|
|
39
|
+
},
|
|
40
|
+
es: {
|
|
41
|
+
unsavedKeep: 'Tienes cambios sin guardar. Guárdalos, o pulsa Cancelar para salir sin guardar.',
|
|
42
|
+
close: 'Cerrar', cancel: 'Cancelar', confirm: 'Confirmar', copy: 'Copiar', copied: 'Copiado', show: 'Mostrar', hide: 'Ocultar',
|
|
43
|
+
unit: 'Unidad', unit_seconds: 'segundos', unit_minutes: 'minutos', unit_hours: 'horas', unit_days: 'días', keyLooksWrong: 'Esto no parece una clave de este servicio. Las claves empiezan con {example}; cópiala de nuevo desde el servicio.', country: 'País', chooseMonth: 'Elige un mes', previousYear: 'Año anterior', nextYear: 'Año siguiente', chooseAnother: 'Elegir otro', noFileChosen: 'Ningún archivo elegido', replace: 'Reemplazar', remove: 'Quitar', imageHint: 'PNG, JPG, SVG o WebP, hasta {max}.', changePhoto: 'Cambiar foto', addPhoto: 'Agregar una foto', pickColor: 'Elegir un color', colorFormat: 'Escribe el color como # y seis caracteres, por ejemplo #3b82f6.', runHint: 'Ctrl o ⌘ + Enter lo ejecuta', running: 'Ejecutando…', run: 'Ejecutar', jsonErrorLine: 'El JSON tiene un error en la línea {line}. Revisa ahí las comas, las comillas y los corchetes.', jsonError: 'El JSON tiene un error. Revisa las comas, las comillas y los corchetes.', jsonOk: 'JSON válido', formatJson: 'Ordenar', kvName: 'Nombre', kvValue: 'Valor', kvSecret: 'Ocultar el valor de {name}', kvDuplicate: '{name} está escrito dos veces; solo se usa uno. Quita uno de los dos.', kvAdd: 'Agregar una variable', kvPasteHint: 'Pega varias líneas NOMBRE=valor en un nombre para llenarlas todas.', cronEveryMinute: 'Cada minuto', cronEveryNMinutes: 'Cada {n} minutos', cronHourly: 'Cada hora, en el minuto {m}', cronDaily: 'Todos los días a las {time}', cronWeekdays: 'De lunes a viernes a las {time}', cronWeekly: 'Cada {day} a las {time}', cronMonthly: 'El día {day} de cada mes a las {time}', day0: 'domingo', day1: 'lunes', day2: 'martes', day3: 'miércoles', day4: 'jueves', day5: 'viernes', day6: 'sábado', cronPresets: 'Horarios comunes', cronPresetDaily: 'Todos los días a las 03:00', cronPresetHourly: 'Cada hora', cronPreset15: 'Cada 15 minutos', cronPresetWeekdays: 'Días hábiles a las 09:00', cronPresetMonthly: 'El primer día de cada mes', cronCustom: 'Un horario a la medida', cronInvalid: 'Un horario tiene cinco partes separadas por espacios: minuto, hora, día, mes y día de la semana.', ratingOf: '{value} de {max}',
|
|
44
|
+
countLabel: 'Cantidad', fromPrevious: 'del paso anterior', fromFirst: 'del primer paso', starts: 'Empieza', takes: 'Dura',
|
|
45
|
+
live: 'En vivo', paused: 'En pausa', healthUp: 'Funcionando', healthDegraded: 'Lento', healthDown: 'Caído', healthUnknown: 'Sin revisar aún', usageOf: '{used} de {limit}', usageFull: 'Se llegó al límite: los datos nuevos no se guardan.', usageNear: '{percent} usado: pronto estará lleno.', usageResets: 'Vuelve a empezar el {date}', step_done: 'hecho', step_running: 'en curso', step_waiting: 'en espera', step_failed: 'falló', step_skipped: 'omitido', countdownEnded: 'Se acabó el tiempo', offlineTitle: 'Sin conexión.', offlineBody: 'Lo que ves se queda aquí; los cambios se guardan cuando vuelva la conexión.', notFoundTitle: '{what} no existe', notFoundBody: 'Puede que se haya borrado o movido. Revisa la dirección o vuelve atrás.',
|
|
46
|
+
signOut: 'Cerrar sesión', account: 'Cuenta', markAllRead: 'Marcar todo como leído', noNotifications: 'Nada nuevo', unreadCount: '{count} sin leer', unread: 'Sin leer', loadMore: 'Mostrar {count} más', allShown: 'Se muestran los {count}', backToTop: 'Volver arriba', night: 'Noche', paper: 'Papel', density: 'Densidad', comfortable: 'Cómoda', compact: 'Compacta', filterList: 'Filtrar la lista', newer: 'Más recientes', older: 'Anteriores', currentItem: '{label} (actual)', createItem: 'Crear {label}', switchItem: 'Cambiar de {kind}', nothingFound: 'Nada se llama «{query}»',
|
|
47
|
+
gotIt: 'Entendido', stepOf: 'Paso {n} de {total}', skipTour: 'Saltar el recorrido', finish: 'Terminar', imageOf: '{n} de {total}', notifications: 'Notificaciones', preview: 'Vista previa de {label}', openMenu: 'Abrir el menú de {label}',
|
|
48
|
+
moreOptions: 'Más opciones', opensNewTab: '(se abre en otra pestaña)', download: 'Descargar', copyValue: 'Copiar {label}', copiedValue: 'Copiado: {label}', pressKeys: 'Pulsa {keys}',
|
|
49
|
+
unsaved: 'Tienes cambios sin guardar', discard: 'Descartar', saveChanges: 'Guardar cambios', savedAt: 'Guardado a las {time}', savedNow: 'Guardado', notSavedYet: 'No se guardó', editField: 'Editar {label}',
|
|
50
|
+
save: 'Guardar', saving: 'Guardando…', delete: 'Eliminar', edit: 'Editar', back: 'Atrás', next: 'Siguiente', previous: 'Anterior', done: 'Listo',
|
|
51
|
+
search: 'Buscar', clear: 'Limpiar', more: 'Más', actions: 'Acciones', optional: 'opcional', required: 'obligatorio',
|
|
52
|
+
noResults: 'Nada coincide', retry: 'Intentar de nuevo', loading: 'Cargando',
|
|
53
|
+
typeToConfirm: 'Escribe {word} para confirmar', page: 'Página {page} de {pages}', pagination: 'Páginas',
|
|
54
|
+
showing: '{from}–{to} de {total}', perPage: 'Por página', selected: '{count} seleccionados', goToPage: 'Ir a la página {page}',
|
|
55
|
+
errorSummary: 'Revisa estos campos', secretOnce: 'Cópialo ahora. Solo se muestra esta vez.',
|
|
56
|
+
sortAsc: 'Orden ascendente', sortDesc: 'Orden descendente', sortBy: 'Ordenar por {column}', dismiss: 'Descartar',
|
|
57
|
+
viewAsTable: 'Ver como tabla', noData: 'Sin datos en este período',
|
|
58
|
+
skipToContent: 'Ir al contenido', mainNav: 'Navegación principal', whereYouAre: 'Dónde estás', searchOrJump: 'Buscar o ir a…',
|
|
59
|
+
toSelect: 'para elegir', toMove: 'para moverte', toClose: 'para cerrar', switchTo: 'Cambiar a',
|
|
60
|
+
choose: 'Elige…', removeItem: 'Quitar {item}', rangeFrom: 'Desde', rangeTo: 'Hasta', tagsCount: '{count} agregados', otpBox: 'Carácter {n} de {total}',
|
|
61
|
+
dropFile: 'Suelta un archivo aquí o elige uno', dropFiles: 'Suelta archivos aquí o elígelos', chooseFile: 'Elegir un archivo', chooseFiles: 'Elegir archivos', chosenFiles: 'Archivos elegidos',
|
|
62
|
+
fileTooLarge: '{name} pesa más de {max}. Elige un archivo más liviano.', fileWrongType: '{name} no es un archivo que se reciba aquí. Elige {types}.',
|
|
63
|
+
filters: 'Filtros', any: 'Cualquiera', clearFilters: 'Quitar filtros', clearSelection: 'Quitar selección', columns: 'Columnas', exportCsv: 'Exportar CSV',
|
|
64
|
+
rowsCount: '{count} filas', rowsOne: '1 fila', rowsOf: '{shown} de {total} filas', emptyTable: 'Aún no hay filas',
|
|
65
|
+
sortLabel: 'Ordenar por', sortNone: 'Sin orden', ascending: 'ascendente', descending: 'descendente',
|
|
66
|
+
selectRow: 'Seleccionar {row}', selectAllRows: 'Seleccionar todas las filas', editValue: 'Editar {column}', notSaved: '{column} no se guardó.', resizeColumn: 'Cambiar el ancho de la columna {column}',
|
|
67
|
+
follow: 'Seguir', moreCount: '{count} más', stepsDone: '{done} de {total} listos', stepDone: 'Listo', stepTodo: 'Por hacer',
|
|
68
|
+
deltaUp: 'Subió {value}', deltaDown: 'Bajó {value}', deltaFlat: 'Sin cambio', itemsCount: '{count} elementos', keysCount: '{count} claves', itemsOne: '1 elemento', keysOne: '1 clave', now: 'Ahora',
|
|
69
|
+
primaryKey: 'Clave primaria', uniqueValue: 'Único', nullable: 'Puede quedar vacío', pointsTo: 'Apunta a {target}', columnName: 'Columna', columnType: 'Tipo', columnDefault: 'Valor por defecto', columnRules: 'Reglas',
|
|
70
|
+
noLogs: 'Aún no hay líneas de registro', noActivity: 'Aún no ha pasado nada aquí', showExact: 'Mostrar la fecha exacta', showWhole: 'Mostrarlo completo',
|
|
71
|
+
resize: 'Cambiar tamaño', onThisPage: 'En esta página', docsNav: 'Documentación', openNav: 'Abrir la navegación', closeNav: 'Cerrar la navegación', hideNav: 'Ocultar la navegación', showNav: 'Mostrar la navegación', surface: 'Noche o papel', language: 'Idioma', products: 'Productos', searchDocs: 'Buscar en la documentación', searchHint: 'Busca páginas, secciones y términos', noResultsFor: 'Nada coincide con «{query}»', noResultsHint: 'Prueba con menos palabras, o con otra palabra.', toOpen: 'para abrir',
|
|
72
|
+
breadcrumb: 'Ruta', pager: 'Página anterior y siguiente', editPage: 'Editar esta página', wasUseful: '¿Te sirvió esta página?', yes: 'Sí', no: 'No', thanks: 'Gracias. Nos ayuda a escribir mejores páginas.', note: 'Nota', tip: 'Consejo', warning: 'Atención', danger: 'Peligro', plainWords: 'En palabras simples',
|
|
73
|
+
parameters: 'Parámetros', noParams: 'No recibe parámetros.', defaultValue: 'Por defecto', errors: 'Errores', request: 'Solicitud', response: 'Respuesta', expected: 'Deberías ver', authentication: 'Autenticación', enlarge: 'Ampliar', inWords: 'Este diagrama en palabras', figure: 'Figura', glossary: 'Glosario', version: 'Versión', changelog: 'Cambios', added: 'Nuevo', changed: 'Cambió', fixed: 'Arreglado', removed: 'Quitado', install: 'Instalar', withAgent: 'Con un agente de código', tool: 'Herramienta', setting: 'Ajuste', option: 'Opción', envVar: 'Variable de entorno', type: 'Tipo', readOnly: 'Solo lee', changesData: 'Cambia datos',
|
|
74
|
+
included: 'Incluido', notIncluded: 'No incluido', recommended: 'Recomendado', currentPlan: 'Tu plan', imageFailed: 'No se pudo cargar la imagen.', linesAdded: '{count} líneas agregadas', linesRemoved: '{count} líneas quitadas', lineAdded: 'agregada', lineRemoved: 'quitada', linesHidden: 'Mostrar {count} líneas sin cambios', noChanges: 'Las dos versiones son iguales', sortOrder: 'Orden', peopleMore: '{count} más: {names}', openImage: 'Abrir {label}', exactValue: 'Exactamente {value}', filesIn: '{count} archivos', checklistOf: '{done} de {total} hechos', markDone: 'Marcar «{item}» como hecho', markTodo: 'Marcar «{item}» como pendiente', diffBefore: 'Antes', diffAfter: 'Después', total: 'Total', activeDays: 'Días con actividad', scaleLess: 'Menos', scaleMore: 'Más', selfTime: 'Propio', share: 'Parte', outOfMap: 'fuera del mapa', casesMap: 'Los casos de uso, en palabras', flowsTo: '{from} lleva a {to}', flowsToWith: '{from} lleva a {to}: {label}', messageFrom: '{n}. {from} a {to}: {label}', messageReply: '{n}. {from} responde a {to}: {label}', relation: '{from} apunta a {to}', tablesCount: '{count} tablas', columnsCount: '{count} columnas',
|
|
75
|
+
},
|
|
76
|
+
} as const;
|
|
77
|
+
export type StringKey = keyof typeof strings.en;
|
|
78
|
+
|
|
79
|
+
export function translate(locale: string, key: StringKey, vars?: Record<string, string | number>) {
|
|
80
|
+
const lang = (locale.slice(0, 2) in strings ? locale.slice(0, 2) : 'en') as Locale;
|
|
81
|
+
let s: string = strings[lang][key];
|
|
82
|
+
if (vars) for (const [k, v] of Object.entries(vars)) s = s.replace(`{${k}}`, String(v));
|
|
83
|
+
return s;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
const cache = new Map<string, Intl.NumberFormat | Intl.DateTimeFormat>();
|
|
87
|
+
const memo = <T extends Intl.NumberFormat | Intl.DateTimeFormat>(key: string, make: () => T) => (cache.get(key) as T) ?? (cache.set(key, make()), cache.get(key) as T);
|
|
88
|
+
// A day without a time («2026-11-16») is that day wherever the person is: JavaScript would read it as midnight UTC,
|
|
89
|
+
// which is the day before in the Americas.
|
|
90
|
+
const date = (v: Date | string | number) => (v instanceof Date ? v : new Date(typeof v === 'string' && /^\d{4}-\d{2}-\d{2}$/.test(v) ? `${v}T00:00:00` : v));
|
|
91
|
+
|
|
92
|
+
/** Formatters for one language. Empty values come back as an em dash, so a table never shows «null» or «Invalid Date». */
|
|
93
|
+
/** Node and browsers ship different language data: one writes «2:30 AM» with a narrow no-break space, another with a
|
|
94
|
+
plain one. Dates and times are written on the server and read again in the browser, so they always use plain spaces. */
|
|
95
|
+
const plain = (s: string) => s.replace(/[\u00a0\u2007\u202f]/g, ' ');
|
|
96
|
+
export function formatters(locale: string) {
|
|
97
|
+
const nf = (o: Intl.NumberFormatOptions) => memo(`n:${locale}:${JSON.stringify(o)}`, () => new Intl.NumberFormat(locale, o));
|
|
98
|
+
const df = (o: Intl.DateTimeFormatOptions) => memo(`d:${locale}:${JSON.stringify(o)}`, () => new Intl.DateTimeFormat(locale, o));
|
|
99
|
+
const none = '—';
|
|
100
|
+
const ok = (v: unknown) => v !== null && v !== undefined && v !== '' && !(typeof v === 'number' && Number.isNaN(v));
|
|
101
|
+
return {
|
|
102
|
+
number: (v?: number | null, o: Intl.NumberFormatOptions = {}) => (ok(v) ? nf(o).format(v!) : none),
|
|
103
|
+
compact: (v?: number | null) => (ok(v) ? nf({ notation: 'compact', maximumFractionDigits: 1 }).format(v!) : none),
|
|
104
|
+
percent: (v?: number | null, digits = 0) => (ok(v) ? nf({ style: 'percent', maximumFractionDigits: digits }).format(v!) : none),
|
|
105
|
+
currency: (v: number | null | undefined, currency: string) => (ok(v) ? nf({ style: 'currency', currency }).format(v!) : none),
|
|
106
|
+
bytes: (v?: number | null) => {
|
|
107
|
+
if (!ok(v)) return none;
|
|
108
|
+
const units = ['byte', 'kilobyte', 'megabyte', 'gigabyte', 'terabyte'];
|
|
109
|
+
let n = v!, i = 0;
|
|
110
|
+
while (n >= 1024 && i < units.length - 1) { n /= 1024; i++; }
|
|
111
|
+
// Intl writes «940 byte» for the smallest unit: sizes say B, as every system does.
|
|
112
|
+
if (i === 0) return `${nf({ maximumFractionDigits: 0 }).format(n)} B`;
|
|
113
|
+
return nf({ style: 'unit', unit: units[i], unitDisplay: 'short', maximumFractionDigits: n < 10 ? 1 : 0 }).format(n);
|
|
114
|
+
},
|
|
115
|
+
duration: (ms?: number | null) => {
|
|
116
|
+
if (!ok(ms)) return none;
|
|
117
|
+
const v = ms!;
|
|
118
|
+
if (v < 1000) return nf({ style: 'unit', unit: 'millisecond', unitDisplay: 'short', maximumFractionDigits: 0 }).format(v);
|
|
119
|
+
if (v < 60_000) return nf({ style: 'unit', unit: 'second', unitDisplay: 'short', maximumFractionDigits: 1 }).format(v / 1000);
|
|
120
|
+
if (v < 3_600_000) return nf({ style: 'unit', unit: 'minute', unitDisplay: 'short', maximumFractionDigits: 0 }).format(v / 60_000);
|
|
121
|
+
return nf({ style: 'unit', unit: 'hour', unitDisplay: 'short', maximumFractionDigits: 1 }).format(v / 3_600_000);
|
|
122
|
+
},
|
|
123
|
+
date: (v?: Date | string | number | null) => (ok(v) ? plain(df({ dateStyle: 'medium' }).format(date(v!))) : none),
|
|
124
|
+
dateTime: (v?: Date | string | number | null) => (ok(v) ? plain(df({ dateStyle: 'medium', timeStyle: 'short' }).format(date(v!))) : none),
|
|
125
|
+
time: (v?: Date | string | number | null) => (ok(v) ? plain(df({ timeStyle: 'short' }).format(date(v!))) : none),
|
|
126
|
+
relative: (v?: Date | string | number | null, now: number = Date.now()) => {
|
|
127
|
+
if (!ok(v)) return none;
|
|
128
|
+
const s = (date(v!).getTime() - now) / 1000, a = Math.abs(s);
|
|
129
|
+
const rtf = { format: (n: number, u: Intl.RelativeTimeFormatUnit) => plain(new Intl.RelativeTimeFormat(locale, { numeric: 'auto' }).format(n, u)) };
|
|
130
|
+
if (a < 60) return rtf.format(Math.round(s), 'second');
|
|
131
|
+
if (a < 3600) return rtf.format(Math.round(s / 60), 'minute');
|
|
132
|
+
if (a < 86_400) return rtf.format(Math.round(s / 3600), 'hour');
|
|
133
|
+
if (a < 2_592_000) return rtf.format(Math.round(s / 86_400), 'day');
|
|
134
|
+
if (a < 31_536_000) return rtf.format(Math.round(s / 2_592_000), 'month');
|
|
135
|
+
return rtf.format(Math.round(s / 31_536_000), 'year');
|
|
136
|
+
},
|
|
137
|
+
list: (items: string[], type: 'conjunction' | 'disjunction' = 'conjunction') => new Intl.ListFormat(locale, { type }).format(items),
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
export type Formatters = ReturnType<typeof formatters>;
|