boardui 0.5.6 → 0.5.7
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/README.md +6 -0
- package/dist/index.js +38 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -67,6 +67,12 @@ by writing files directly, one-time project init, theme tokens, and Pro
|
|
|
67
67
|
license activation/status/deactivation. Setup guide with per-client config:
|
|
68
68
|
https://www.boardui.com/mcp
|
|
69
69
|
|
|
70
|
+
The server's startup instructions, `get_started`, `get_theme`, and
|
|
71
|
+
`init_boardui` include RTL setup for Arabic and Hebrew: install the free
|
|
72
|
+
`direction` foundation, wrap the app with `DirectionProvider`, and set matching
|
|
73
|
+
HTML language/direction. The guidance covers free and Pro source, logical
|
|
74
|
+
styles, mixed content, fonts, and existing installations.
|
|
75
|
+
|
|
70
76
|
Successful MCP-driven installs send the same anonymous telemetry as the CLI,
|
|
71
77
|
tagged with `source: "mcp"`.
|
|
72
78
|
|
package/dist/index.js
CHANGED
|
@@ -1091,6 +1091,38 @@ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"
|
|
|
1091
1091
|
import { instrument } from "@posthog/mcp";
|
|
1092
1092
|
import { PostHog } from "posthog-node";
|
|
1093
1093
|
import { z } from "zod";
|
|
1094
|
+
|
|
1095
|
+
// ../lib/agent/rtl.ts
|
|
1096
|
+
var RTL_SETUP_GUIDE = [
|
|
1097
|
+
"## RTL Support",
|
|
1098
|
+
"",
|
|
1099
|
+
"BoardUI supports Arabic, Hebrew, and other right-to-left languages across free components, Pro blocks, and templates. The same source handles RTL and LTR; there is no RTL CLI flag or separate component version.",
|
|
1100
|
+
"",
|
|
1101
|
+
"1. Read get_component and get_usage_examples for the free `direction` item. Install it with install_components (stdio), or write its source and dependencies yourself (read-only HTTP). CLI equivalent: `npx boardui@latest add direction`.",
|
|
1102
|
+
"2. Wrap the app with DirectionProvider using an explicit BCP 47 locale: `ar` for Arabic, `he` for Hebrew, `en-US` for English. Set matching `lang` and `dir` on `<html>` for a full-app RTL layout. CSS dir alone does not configure React Aria keyboard navigation, calendars, or portalled menus.",
|
|
1103
|
+
"",
|
|
1104
|
+
"```tsx",
|
|
1105
|
+
'import { DirectionProvider } from "@/components/foundations/direction/direction";',
|
|
1106
|
+
"",
|
|
1107
|
+
"export default function RootLayout({ children }: { children: React.ReactNode }) {",
|
|
1108
|
+
" return (",
|
|
1109
|
+
' <html lang="ar" dir="rtl">',
|
|
1110
|
+
" <body>",
|
|
1111
|
+
' <DirectionProvider locale="ar">{children}</DirectionProvider>',
|
|
1112
|
+
" </body>",
|
|
1113
|
+
" </html>",
|
|
1114
|
+
" );",
|
|
1115
|
+
"}",
|
|
1116
|
+
"```",
|
|
1117
|
+
"",
|
|
1118
|
+
"3. Use logical styles such as ps/pe, ms/me, start/end, and text-start/text-end. Mirror navigation arrows and drawer motion; preserve physical coordinates for charts, canvas, and decorative art. Custom portals should carry `dir={useDirection()}` on their root. Nest DirectionProvider for mixed-language regions.",
|
|
1119
|
+
"4. Keep email addresses, URLs, OTP digits, and code LTR; isolate mixed text with bdi or dir=auto. Choose fonts with Arabic or Hebrew coverage and avoid extra letter spacing for Arabic. Translate application labels and accessible names in the application's translation layer; use Intl for dates, numbers, and currencies. Optional `template-copy` supplies TemplateCopyProvider for translating template display copy. Chinese (`zh-CN`) remains LTR.",
|
|
1120
|
+
"5. For older installations, refresh the provider, component source, shared dependencies, and global styles. Preserve customizations before using overwrite. Pro updates use the licensed CLI or updated source downloads.",
|
|
1121
|
+
"",
|
|
1122
|
+
"Setup and live Arabic/Hebrew examples: https://www.boardui.com/rtl"
|
|
1123
|
+
].join("\n");
|
|
1124
|
+
|
|
1125
|
+
// src/commands/mcp.ts
|
|
1094
1126
|
var PRICING_URL = "https://www.boardui.com/pricing";
|
|
1095
1127
|
var INSTRUCTIONS = `BoardUI is a React + Tailwind CSS v4 design system (Next.js first) with free components and paid Pro components/templates. This server installs component source directly into the user's project \u2014 no terminal needed.
|
|
1096
1128
|
|
|
@@ -1101,6 +1133,8 @@ Typical flow:
|
|
|
1101
1133
|
|
|
1102
1134
|
Component names are exact \u2014 when unsure, call list_components instead of guessing.
|
|
1103
1135
|
|
|
1136
|
+
${RTL_SETUP_GUIDE}
|
|
1137
|
+
|
|
1104
1138
|
Design rules (always apply when writing UI in a BoardUI project): style with BoardUI's semantic Tailwind tokens, never raw palette classes or hex \u2014 text via text-text-primary/-secondary/-tertiary, surfaces via bg-background-*-default/-hover, borders via border-border-* and border-separator-border, icons via text-foreground-icon-*. Type uses composite utilities (text-title-2-medium, text-headline-medium, text-body-medium, ...) that set size/weight/line-height together \u2014 never rebuild them from text-sm font-medium. Dark mode flips tokens automatically via the .dark class; never hardcode dark: colors. Merge classes with cx() from @/utils/cx (or the utils alias configured in boardui.json); icons from @remixicon/react as component references. init_boardui installs these rules as always-on files (AGENTS.md + .cursor/rules/boardui.mdc) so they survive beyond this session; install_rules adds them to an already initialized project.
|
|
1105
1139
|
|
|
1106
1140
|
Monorepos/custom aliases: put boardui.json next to the destination package's package.json, and pass that package as projectDir. Installs read its paths/aliases and keep npm dependencies in that package. Pass projectDir to get_component and get_usage_examples too for matching source and examples. Package exports and each consuming app's stylesheet/Tailwind setup must already be wired by the project.
|
|
@@ -1647,6 +1681,8 @@ NOT installed \u2014 pro fetch failed for ${proFailure.names.join(", ")}: ${proF
|
|
|
1647
1681
|
`1. Import the BoardUI stylesheet in the consuming app's root layout: import "${mappedImport("@/styles/globals.css", project.config)}"; \u2014 replacing the default create-next-app "./globals.css" import.`,
|
|
1648
1682
|
'2. Make sure PostCSS uses Tailwind v4 (postcss.config.mjs): export default { plugins: { "@tailwindcss/postcss": {} } };',
|
|
1649
1683
|
'3. Install components with install_components, e.g. ["button", "select", "date-picker"].',
|
|
1684
|
+
"",
|
|
1685
|
+
mappedDocumentation(RTL_SETUP_GUIDE, project.config),
|
|
1650
1686
|
...staleStylesheet ? [
|
|
1651
1687
|
"",
|
|
1652
1688
|
`Note: ${staleStylesheet} is create-next-app's stylesheet, superseded by styles/globals.css \u2014 once step 1's import is swapped, that file is safe to delete.`
|
|
@@ -1755,12 +1791,12 @@ ${skillMd}`
|
|
|
1755
1791
|
"get_theme",
|
|
1756
1792
|
{
|
|
1757
1793
|
title: "Get theme tokens",
|
|
1758
|
-
description: "The BoardUI theme foundations: color primitives + semantic tokens (theme.css), the type scale (typography.css),
|
|
1794
|
+
description: "The BoardUI theme foundations: color primitives + semantic tokens (theme.css), the type scale (typography.css), the Tailwind entry stylesheet (globals.css), and RTL setup for Arabic and Hebrew. Use when restyling components, mapping BoardUI tokens onto a brand, or enabling RTL.",
|
|
1759
1795
|
annotations: { readOnlyHint: true }
|
|
1760
1796
|
},
|
|
1761
1797
|
safe(async () => {
|
|
1762
1798
|
const items = await resolveItems(["globals"]);
|
|
1763
|
-
const lines = [];
|
|
1799
|
+
const lines = [RTL_SETUP_GUIDE, ""];
|
|
1764
1800
|
for (const item of items) {
|
|
1765
1801
|
for (const file of item.files) {
|
|
1766
1802
|
lines.push(`## ${file.target}`, "", "```css", file.content, "```", "");
|