### Facilio Mobile DSM Provider Setup Source: https://facilio.bitbucket.io/mobile-dsm/llms-full.txt Example of setting up the necessary providers for Facilio Mobile DSM in a React Native application's root. These providers are essential for theme, direction, toast, portal, and app context. ```tsx import React from 'react'; import { DsmAppContextProvider, DirectionProvider, PortalProvider, ThemeProvider, ToastProvider, } from '@facilio/facilio-mobile-dsm'; export function App() { return ( {/* screens */} ); } ``` -------------------------------- ### Install Facilio Mobile DSM Package Source: https://facilio.bitbucket.io/mobile-dsm/llms-full.txt Command to install the Facilio Mobile DSM package using npm. This package provides UI components and utilities for Facilio mobile applications. ```bash npm install @facilio/facilio-mobile-dsm ``` -------------------------------- ### Use Open File Hook in React Native Source: https://facilio.bitbucket.io/mobile-dsm/llms-full.txt Example demonstrating the `useOpenFile` hook from Facilio Mobile DSM for opening files using native file-viewer integration. It takes file details like name and URI as input. ```tsx import { useOpenFile } from '@facilio/facilio-mobile-dsm'; export function FileAction() { const openFile = useOpenFile(); async function handlePress() { await openFile({ fileName: 'report.pdf', uri: 'https://example.com/report.pdf', }); } return null; } ``` -------------------------------- ### Use Theme Hook in React Native Source: https://facilio.bitbucket.io/mobile-dsm/llms-full.txt Example of using the `useTheme` hook from Facilio Mobile DSM to access theme tokens, current theme state, and theme helpers within a React Native component. ```tsx import { useTheme } from '@facilio/facilio-mobile-dsm'; export function Screen() { const { global: { spacing, typography }, currentTheme, } = useTheme(); return null; } ``` -------------------------------- ### Download File with DSM Source: https://facilio.bitbucket.io/mobile-dsm/llms-full.txt Downloads files using the DSM native file-handling flow. This function requires the file name and URI as input and handles the download process natively. ```tsx import { downloadFile } from '@facilio/facilio-mobile-dsm'; export async function fetchAttachment() { await downloadFile({ fileName: 'report.pdf', uri: 'https://example.com/report.pdf', }); } ``` -------------------------------- ### Inject Direction Handling with HOC Source: https://facilio.bitbucket.io/mobile-dsm/llms-full.txt A higher-order component that injects DSM direction handling (LTR/RTL) into a wrapped component. This is useful for components that need to adapt their layout or behavior based on text direction. ```tsx import { withDirection } from '@facilio/facilio-mobile-dsm'; function BaseComponent() { return null; } export const DirectionAwareComponent = withDirection(BaseComponent); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.