@texturehq/edges 1.25.0 → 1.25.1
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/dist/{colors-Y8iUUTUP.d.ts → colors-Bw6dREwE.d.ts} +1 -1
- package/dist/{colors-B3YgFfeQ.d.cts → colors-nZbxzpnU.d.cts} +1 -1
- package/dist/components.manifest.json +2 -2
- package/dist/index.cjs +7 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +7 -7
- package/dist/index.js.map +1 -1
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.js.map +1 -1
- package/dist/styles.css +5 -0
- package/dist/utilities.manifest.json +1 -1
- package/package.json +1 -1
|
@@ -428,7 +428,7 @@ type AppShellProps = {
|
|
|
428
428
|
/** Structured nav for the left rail */
|
|
429
429
|
sideNav: Omit<SideNavProps, "mobileMenuId" | "sidebarCollapseId">;
|
|
430
430
|
/** Optional top bar slots & options */
|
|
431
|
-
topNav?: Pick<TopNavProps, "rightContent" | "showMobileMenu" | "avatar" | "showColorModeSwitcher" | "toggleTheme" | "isDarkThemeEnabled" | "colorMode" | "actions" | "className">;
|
|
431
|
+
topNav?: Pick<TopNavProps, "rightContent" | "centerContent" | "showMobileMenu" | "avatar" | "showColorModeSwitcher" | "toggleTheme" | "isDarkThemeEnabled" | "colorMode" | "actions" | "className">;
|
|
432
432
|
/** Main page content */
|
|
433
433
|
children: React__default.ReactNode;
|
|
434
434
|
/** Layout knobs */
|
|
@@ -428,7 +428,7 @@ type AppShellProps = {
|
|
|
428
428
|
/** Structured nav for the left rail */
|
|
429
429
|
sideNav: Omit<SideNavProps, "mobileMenuId" | "sidebarCollapseId">;
|
|
430
430
|
/** Optional top bar slots & options */
|
|
431
|
-
topNav?: Pick<TopNavProps, "rightContent" | "showMobileMenu" | "avatar" | "showColorModeSwitcher" | "toggleTheme" | "isDarkThemeEnabled" | "colorMode" | "actions" | "className">;
|
|
431
|
+
topNav?: Pick<TopNavProps, "rightContent" | "centerContent" | "showMobileMenu" | "avatar" | "showColorModeSwitcher" | "toggleTheme" | "isDarkThemeEnabled" | "colorMode" | "actions" | "className">;
|
|
432
432
|
/** Main page content */
|
|
433
433
|
children: React__default.ReactNode;
|
|
434
434
|
/** Layout knobs */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.25.
|
|
2
|
+
"version": "1.25.1",
|
|
3
3
|
"components": [
|
|
4
4
|
{
|
|
5
5
|
"name": "ActionCell",
|
|
@@ -2370,7 +2370,7 @@
|
|
|
2370
2370
|
{
|
|
2371
2371
|
"name": "StatList",
|
|
2372
2372
|
"category": "Data",
|
|
2373
|
-
"description": "Additional CSS classes",
|
|
2373
|
+
"description": "Additional CSS classes */ className?: string; } // Helpers // Use the centralized formatting utility function formatValue(value: StatValue, formatter?: StatFormatter): React.ReactNode { // If value is already a React element, return it as-is (skip formatting) if (React.isValidElement(value)) { return value; } return formatComponentValue({ value, formatter, emptyClassName: \"text-text-muted\", emptyText: \"—\", }); } function getTone(item: StatItem): StatTone | undefined { // Check thresholds first if (item.thresholds && item.value !== null && item.value !== undefined) { for (const threshold of item.thresholds) { if (threshold.when(item.value)) { return threshold.tone; } } } // Fall back to explicit tone return item.tone; } const toneColors: Record<StatTone, string> = { neutral: \"text-text-body\", success: \"text-feedback-success\", warning: \"text-feedback-warning\", error: \"text-feedback-error\", info: \"text-feedback-info\", }; // StatRow Component // Constants for auto-truncation const LONG_STRING_THRESHOLD = 24; const LONG_STRING_TRUNCATE_LENGTH = 20; function StatRow({ item, dense, valueAlign, }: { item: StatItem; dense?: boolean; valueAlign?: StatAlign; }) { const tone = getTone(item); const toneClass = tone ? toneColors[tone] : \"\"; // Check if this is a long string that should be auto-truncated on mobile const isLongString = typeof item.value === \"string\" && item.value.length > LONG_STRING_THRESHOLD && !item.formatter && !React.isValidElement(item.value); // Get the formatted value (used for both truncated and full display) const formattedValue = formatValue(item.value, item.formatter); // Get the truncated value for mobile display // Note: We cast to string here because isLongString already verifies typeof item.value === \"string\" const truncatedValue = isLongString ? truncateMiddle(item.value as string, LONG_STRING_TRUNCATE_LENGTH) : null; const textToCopy = typeof item.copyable === \"function\" ? item.copyable(item.value) : String(item.value); // For long strings, render both truncated (mobile) and full (desktop) versions // CSS classes control which is visible based on screen size const valueDisplay = isLongString ? ( <> {/* Mobile: show truncated with tooltip */} <Tooltip content={String(item.value)}> <span className={twMerge(\"md:hidden\", item.href ? \"hover:underline cursor-pointer\" : \"\")}> {truncatedValue} </span> </Tooltip> {/* Desktop: show full value",
|
|
2374
2374
|
"importRoot": "@texturehq/edges",
|
|
2375
2375
|
"importPath": "@texturehq/edges/components/StatList",
|
|
2376
2376
|
"props": [],
|