@wavy/react-pdf 0.0.2 → 0.0.3

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 CHANGED
@@ -1,2 +1,2 @@
1
- react-pdf
2
- # A wrapper around [@react-pdf/renderer](https://www.npmjs.com/package/@react-pdf/renderer).
1
+ # react-pdf
2
+ ### A wrapper around [@react-pdf/renderer](https://www.npmjs.com/package/@react-pdf/renderer).
package/dist/main.d.ts CHANGED
@@ -3,7 +3,7 @@ import { ComputedStyleProps } from '@wavy/react-ui';
3
3
  import { SafeOmit } from '@wavy/types';
4
4
  import { JSX } from 'react';
5
5
  import { DocumentProps } from '@react-pdf/renderer';
6
- export { Image, ImageProps, PDFViewer, PDFViewerProps, Page, PageProps, Text, TextProps, View, ViewProps, pdf } from '@react-pdf/renderer';
6
+ export { BlobProvider, Document, DocumentProps, Image, ImageProps, PDFViewer, PDFViewerProps, Page, PageProps, Text, TextProps, View, ViewProps, pdf, usePDF } from '@react-pdf/renderer';
7
7
 
8
8
  declare function usePDFDocument(): {
9
9
  renderedAsPdf: boolean;
package/dist/main.js CHANGED
@@ -1 +1 @@
1
- import {createContext,useContext}from'react';import {View,Text,Image,Document}from'@react-pdf/renderer';export{Image,PDFViewer,Page,Text,View,pdf}from'@react-pdf/renderer';import {useComputedStyle,restrictLineCount,nativeEllipsis,ellipsis}from'@wavy/react-ui';import {jsx,Fragment}from'react/jsx-runtime';var o=createContext({asPdf:false});function J(){return {renderedAsPdf:useContext(o).asPdf}}function z(e){let{style:t}=useComputedStyle("div",e,{inject:()=>({display:e.style?.display||e.display||"flex",flexDirection:e.style?.flexDirection||(e.row?"row":"column")})}),{asPdf:r}=useContext(o);return r?jsx(View,{style:t,children:e.children}):jsx("div",{style:t,children:e.children})}function W(e){let t=e.text||e.children,{style:r}=useComputedStyle("span",{...e,children:t},{inject:()=>({textDecoration:e.style?.textDecoration||[e.underline?"underline":"",e.strikeThrough?"line-through":""].join(" "),fontStyle:e.style?.fontStyle||e.italic?"italic":void 0,...e.ellipsis==="native"?nativeEllipsis():e.ellipsis?ellipsis():{},...e.lineLimit?restrictLineCount(e.lineLimit):{}})}),{asPdf:p}=useContext(o);return p?jsx(Text,{style:r,children:t}):jsx("span",{style:r,children:t})}function oe(e){let{asPdf:t}=useContext(o),{style:r}=useComputedStyle("img",e);return t?jsx(Image,{style:r,src:e.src}):jsx("img",{style:r,src:e.src})}function le(e){let t=e.asPdf??false;return jsx(o.Provider,{value:{asPdf:t},children:t?jsx(Document,{...e}):jsx(Fragment,{children:e.children})})}export{z as Div,oe as Img,le as PDFDocument,W as Span,J as usePDFDocument};
1
+ import {createContext,useContext}from'react';import {View,Text,Image,Document}from'@react-pdf/renderer';export{BlobProvider,Document,Image,PDFViewer,Page,Text,View,pdf,usePDF}from'@react-pdf/renderer';import {useComputedStyle,restrictLineCount,nativeEllipsis,ellipsis}from'@wavy/react-ui';import {jsx,Fragment}from'react/jsx-runtime';var o=createContext({asPdf:false});function J(){return {renderedAsPdf:useContext(o).asPdf}}function q(e){let{style:t}=useComputedStyle("div",e,{inject:()=>({display:e.style?.display||e.display||"flex",flexDirection:e.style?.flexDirection||(e.row?"row":"column")})}),{asPdf:r}=useContext(o);return r?jsx(View,{style:t,children:e.children}):jsx("div",{style:t,children:e.children})}function W(e){let t=e.text||e.children,{style:r}=useComputedStyle("span",{...e,children:t},{inject:()=>({textDecoration:e.style?.textDecoration||[e.underline?"underline":"",e.strikeThrough?"line-through":""].join(" "),fontStyle:e.style?.fontStyle||e.italic?"italic":void 0,...e.ellipsis==="native"?nativeEllipsis():e.ellipsis?ellipsis():{},...e.lineLimit?restrictLineCount(e.lineLimit):{}})}),{asPdf:p}=useContext(o);return p?jsx(Text,{style:r,children:t}):jsx("span",{style:r,children:t})}function oe(e){let{asPdf:t}=useContext(o),{style:r}=useComputedStyle("img",e);return t?jsx(Image,{style:r,src:e.src}):jsx("img",{style:r,src:e.src})}function le(e){let t=e.asPdf??false;return jsx(o.Provider,{value:{asPdf:t},children:t?jsx(Document,{...e}):jsx(Fragment,{children:e.children})})}export{q as Div,oe as Img,le as PDFDocument,W as Span,J as usePDFDocument};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wavy/react-pdf",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "",
5
5
  "main": "dist/main.js",
6
6
  "scripts": {