From 943b4adbc183aee64da46ef70ba3b0f824d435c2 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 4 Sep 2026 22:10:50 +0000 Subject: [PATCH 1/2] docs(skills): correct mobile.md's usePullToRefresh ref idiom to the shipped return shape `usePullToRefresh` returns `{ ref, isRefreshing, pullDistance }` (packages/mobile/dist/usePullToRefresh.d.ts), not a bare ref. The gesture fence bound the whole result object and attached it as a React ref, which `tsc` rejects (TS2322) and which would not attach at runtime either. Destructuring the `ref` member at the call site is the one-line correction; the fence's remaining diagnostics are all TS2304 on deliberate prose placeholders, so it stays unmarked. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_019RfFHiRCSs3JXLK4cwcfox --- skills/objectui/guides/mobile.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/skills/objectui/guides/mobile.md b/skills/objectui/guides/mobile.md index 2eb1c1c2e8..a13a1aa695 100644 --- a/skills/objectui/guides/mobile.md +++ b/skills/objectui/guides/mobile.md @@ -41,7 +41,7 @@ function MobileCard() { threshold: 50, }); - const listRef = usePullToRefresh({ + const { ref: listRef } = usePullToRefresh({ onRefresh: async () => refetch(), // threshold?: px, default 80 }); From a7dfbcca888708e4ede8acb076d85ddf7f3fee69 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 4 Sep 2026 22:21:23 +0000 Subject: [PATCH 2/2] docs(skills): correct five wrong shipped-API facts in the published guides Each site stated a member, prop or call shape the built dist/*.d.ts contradicts, and each is corrected to what the types declare: - auth-permissions: AuthProvider takes `client`, not `authClient`, and `authUrl` is required (AuthProviderOptions). Both usages corrected. - auth-permissions: createAuthenticatedFetch takes its options object, not the auth client; the token comes from storage. - auth-permissions: PermissionGuard's `fallback` is the closed union 'hide' | 'disable' | 'custom'; custom content goes in `fallbackContent`. - i18n: the four format helpers are module-level exports of @object-ui/i18n, not members of useObjectTranslation()'s return, and they take options objects rather than positional format strings. - project-setup: app-shell's MetadataProvider takes `adapter`, not `value`. The fences stay unmarked; their remaining diagnostics are the prose placeholders they reference by design. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_019RfFHiRCSs3JXLK4cwcfox --- skills/objectui/guides/auth-permissions.md | 8 ++++---- skills/objectui/guides/i18n.md | 8 +++----- skills/objectui/guides/project-setup.md | 2 +- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/skills/objectui/guides/auth-permissions.md b/skills/objectui/guides/auth-permissions.md index 6d5df9d8e5..61fbd1bef3 100644 --- a/skills/objectui/guides/auth-permissions.md +++ b/skills/objectui/guides/auth-permissions.md @@ -26,7 +26,7 @@ const authClient = createAuthClient({ baseURL: '/api/v1/auth' }); function App() { return ( - + ); @@ -107,7 +107,7 @@ import { createAuthenticatedFetch, createAuthClient } from '@object-ui/auth'; import { ObjectStackAdapter } from '@object-ui/data-objectstack'; const authClient = createAuthClient({ baseURL: '/api/v1/auth' }); -const authenticatedFetch = createAuthenticatedFetch(authClient); +const authenticatedFetch = createAuthenticatedFetch(); const dataSource = new ObjectStackAdapter({ baseUrl: '/api/v1', @@ -239,7 +239,7 @@ import { PermissionGuard } from '@object-ui/permissions'; function AdminPanel() { return ( - }> + }> ); @@ -325,7 +325,7 @@ Here's the typical nesting order for a full-featured app: ```typescript - + }> diff --git a/skills/objectui/guides/i18n.md b/skills/objectui/guides/i18n.md index fc0d4ad315..96208f571a 100644 --- a/skills/objectui/guides/i18n.md +++ b/skills/objectui/guides/i18n.md @@ -92,15 +92,13 @@ For Tailwind layout adjustments, use RTL-aware utilities: ## Number, date, and currency formatting ```typescript -import { useObjectTranslation } from '@object-ui/i18n'; +import { formatCurrency, formatDate, formatNumber, formatRelativeTime } from '@object-ui/i18n'; function PriceDisplay({ amount, currency, date }) { - const { formatCurrency, formatDate, formatNumber, formatRelativeTime } = useObjectTranslation(); - return (
-

{formatCurrency(amount, currency)}

{/* $1,234.56 or ¥1,234.56 */} -

{formatDate(date, 'YYYY-MM-DD')}

{/* 2024-03-15 */} +

{formatCurrency(amount, { currency })}

{/* $1,234.56 or ¥1,234.56 */} +

{formatDate(date, { style: 'short' })}

{/* 2024-03-15 */}

{formatNumber(1234567)}

{/* 1,234,567 or 1.234.567 */}

{formatRelativeTime(date)}

{/* "3 days ago" */}
diff --git a/skills/objectui/guides/project-setup.md b/skills/objectui/guides/project-setup.md index e45952baf7..8a976fcdfa 100644 --- a/skills/objectui/guides/project-setup.md +++ b/skills/objectui/guides/project-setup.md @@ -277,7 +277,7 @@ import. Importing any of the three from `app-shell` does not resolve. import { AppShell, ObjectView, AdapterProvider, MetadataProvider } from '@object-ui/app-shell'; - + }>