This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { createRouteAction, ServerFunctionEvent } from "solid-start"; | |
| import { RouteAction } from "solid-start/data/createRouteAction"; | |
| interface ActionEvent extends ServerFunctionEvent {} | |
| type Options = Parameters<typeof createRouteAction>[1]; | |
| export function createLazyRouteAction<T = void, R = void>( | |
| loader: () => Promise<{ | |
| default: (arg: T, event: ActionEvent) => Promise<R> | R |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { supportsPdfs, getPdfBlob, openPdfObjectUrl } from '../utils/pdf' | |
| import { isDesktopChrome, isNativeAndroid } from '../utils/browserChecker' | |
| import { isEmbedded, showNativePdf } from '../utils/embedded' | |
| import navigate from '../utils/navigate' | |
| import Routes from '../routes' | |
| const PdfOpener = ({ children, url, data, mimeType, title = '', fileName }) => { | |
| const dataUrl = `data:${mimeType};base64,${data}` | |
| const openPdf = () => { | |
| if (isEmbedded()) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Available variables: | |
| // - Machine | |
| // - interpret | |
| // - assign | |
| // - send | |
| // - sendParent | |
| // - spawn | |
| // - raise | |
| // - actions |