@repdf/preview 0.0.13 → 0.0.15
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/index.cjs +13 -7
- package/dist/index.js +13 -7
- package/dist/preview/.next/BUILD_ID +1 -1
- package/dist/preview/.next/build-manifest.json +18 -18
- package/dist/preview/.next/cache/.tsbuildinfo +1 -1
- package/dist/preview/.next/cache/webpack/client-production/0.pack +0 -0
- package/dist/preview/.next/cache/webpack/client-production/index.pack +0 -0
- package/dist/preview/.next/cache/webpack/edge-server-production/index.pack +0 -0
- package/dist/preview/.next/cache/webpack/server-production/0.pack +0 -0
- package/dist/preview/.next/cache/webpack/server-production/index.pack +0 -0
- package/dist/preview/.next/next-minimal-server.js.nft.json +1 -1
- package/dist/preview/.next/next-server.js.nft.json +1 -1
- package/dist/preview/.next/prerender-manifest.json +1 -1
- package/dist/preview/.next/react-loadable-manifest.json +2 -2
- package/dist/preview/.next/required-server-files.json +1 -1
- package/dist/preview/.next/routes-manifest.json +1 -1
- package/dist/preview/.next/server/chunks/288.js +4 -0
- package/dist/preview/.next/server/chunks/515.js +1 -0
- package/dist/preview/.next/server/chunks/{574.js → 76.js} +3 -3
- package/dist/preview/.next/server/chunks/{240.js → 992.js} +1 -1
- package/dist/preview/.next/server/functions-config-manifest.json +1 -1
- package/dist/preview/.next/server/middleware-build-manifest.js +1 -1
- package/dist/preview/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/dist/preview/.next/server/pages/_app.js +1 -1
- package/dist/preview/.next/server/pages/_app.js.nft.json +1 -1
- package/dist/preview/.next/server/pages/_document.js +1 -1
- package/dist/preview/.next/server/pages/_document.js.nft.json +1 -1
- package/dist/preview/.next/server/pages/_error.js +1 -1
- package/dist/preview/.next/server/pages/_error.js.nft.json +1 -1
- package/dist/preview/.next/server/pages/api/component.js +2 -2
- package/dist/preview/.next/server/pages/api/component.js.nft.json +1 -1
- package/dist/preview/.next/server/pages/api/pdf.js +1 -1
- package/dist/preview/.next/server/pages/api/pdf.js.nft.json +1 -1
- package/dist/preview/.next/server/pages/api/trpc/[trpc].js +1 -1
- package/dist/preview/.next/server/pages/api/trpc/[trpc].js.nft.json +1 -1
- package/dist/preview/.next/server/pages/en/404.html +1 -1
- package/dist/preview/.next/server/pages/en/500.html +1 -1
- package/dist/preview/.next/server/pages/en/hello.html +1 -1
- package/dist/preview/.next/server/pages/hello.js.nft.json +1 -1
- package/dist/preview/.next/server/pages/index.js +1 -1
- package/dist/preview/.next/server/pages/index.js.nft.json +1 -1
- package/dist/preview/.next/server/pages/preview/[...relTemplatePath].js +1 -1
- package/dist/preview/.next/server/pages/preview/[...relTemplatePath].js.nft.json +1 -1
- package/dist/preview/.next/server/pages-manifest.json +1 -1
- package/dist/preview/.next/static/1CrsRuCE0pQeCQKjv8YSV/_buildManifest.js +1 -0
- package/dist/preview/.next/static/chunks/11-c3207764c75fac42.js +1 -0
- package/dist/preview/.next/static/chunks/{framework-0cbe3b56a5f66701.js → framework-e0f347a11a70369e.js} +1 -1
- package/dist/preview/.next/static/chunks/main-58cc12cfc6868a7a.js +1 -0
- package/dist/preview/.next/static/chunks/pages/{_app-7347594c8802fbe6.js → _app-caf4749cda1fd607.js} +3 -3
- package/dist/preview/.next/static/chunks/pages/_error-4ad10ca9d415501b.js +1 -0
- package/dist/preview/.next/static/chunks/pages/{hello-f5c94797cf5d2e3e.js → hello-78aa44a690f8e32d.js} +1 -1
- package/dist/preview/.next/static/chunks/pages/{index-599233e1212fd4c8.js → index-87aa243f34ebeb5e.js} +1 -1
- package/dist/preview/.next/static/chunks/pages/preview/{[...relTemplatePath]-b754b626fb853e1b.js → [...relTemplatePath]-c13e695dc8db2407.js} +1 -1
- package/dist/preview/.next/trace +14 -14
- package/package.json +6 -4
- package/README.md +0 -3
- package/dist/preview/.next/server/chunks/316.js +0 -1
- package/dist/preview/.next/server/chunks/842.js +0 -4
- package/dist/preview/.next/static/chunks/587-e1c001181b4cec11.js +0 -1
- package/dist/preview/.next/static/chunks/main-b2d89a266d271543.js +0 -1
- package/dist/preview/.next/static/chunks/pages/_error-f68c2d645fc907f4.js +0 -1
- package/dist/preview/.next/static/ek5PUJ-kuCFNuyqnUz9I2/_buildManifest.js +0 -1
- /package/dist/preview/.next/static/{ek5PUJ-kuCFNuyqnUz9I2 → 1CrsRuCE0pQeCQKjv8YSV}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[820],{8834:function(n,_,u){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_error",function(){return u(7051)}])}},function(n){n.O(0,[888,774,179],function(){return n(n.s=8834)}),_N_E=n.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[628],{
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[628],{3269:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/hello",function(){return n(3764)}])},3764:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return r}});var o=n(1549);function r(){return(0,o.jsxs)("div",{className:"flex h-screen flex-col items-center justify-center text-center",children:[(0,o.jsx)("h1",{className:"mb-4 text-4xl font-bold",children:"rePDF"}),(0,o.jsx)("h2",{className:"mb-4 text-2xl font-bold",children:"Design, Develop, Deploy and Delight with PDFs"}),(0,o.jsx)("p",{className:"mb-8 max-w-2xl text-lg",children:"The modern way to build PDFs, automatic previews and best practice components to make it easy to go from development to deployment."}),(0,o.jsx)("a",{href:"https://github.com/your-repo",target:"_blank",rel:"noopener noreferrer",children:(0,o.jsx)("button",{type:"button",className:"rounded bg-blue-500 px-4 py-2 text-white transition duration-300 hover:bg-blue-700",children:"Documentation"})})]})}n(4194)}},function(e){e.O(0,[888,774,179],function(){return e(e.s=3269)}),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[405],{
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[405],{5238:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return n(3479)}])},3479:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return i},default:function(){return l}});var r=n(1549);n(4194);var o=n(1578),s=n.n(o),i=!0;function l(){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s(),{children:(0,r.jsx)("title",{children:"rePDF - live previews of PDF templates"})}),(0,r.jsxs)("div",{className:"flex h-screen flex-col items-center justify-center text-center",children:[(0,r.jsx)("h1",{className:"mb-4 text-4xl font-bold",children:"rePDF"}),(0,r.jsx)("h2",{className:"mb-4 text-2xl font-bold",children:"Design, Develop, Deploy and Delight with PDFs"}),(0,r.jsx)("p",{className:"mb-8 max-w-2xl text-lg",children:"The modern way to build PDFs, automatic previews and best practice components to make it easy to go from development to deployment."}),(0,r.jsx)("a",{href:"https://github.com/your-repo",target:"_blank",rel:"noopener noreferrer",children:(0,r.jsx)("button",{type:"button",className:"rounded bg-blue-500 px-4 py-2 text-white transition duration-300 hover:bg-blue-700",children:"Documentation"})})]})]})}},1578:function(e,t,n){e.exports=n(5648)}},function(e){e.O(0,[888,774,179],function(){return e(e.s=5238)}),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[254],{
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[254],{3440:function(e,r,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/preview/[...relTemplatePath]",function(){return t(8713)}])},8713:function(e,r,t){"use strict";t.r(r),t.d(r,{__N_SSP:function(){return m},default:function(){return f}});var l=t(1549),n=t(1578),s=t.n(n),a=t(433),i=t(4194),c=t(5562);function d(e){let{children:r}=e,{data:t,isLoading:n}=c.h.core.templateCheck.useQuery({relTemplatePath:"test.txt"});return(0,l.jsx)(l.Fragment,{children:r})}var o=t(7406);function h(e){let{relTemplatePath:r}=e,{data:t,isLoading:n}=c.h.core.fileContents.useQuery({relTemplatePath:r});return n?(0,l.jsx)("div",{children:"Loading..."}):t?(0,l.jsx)("div",{children:(0,l.jsx)(o.y$,{theme:o.np.shadesOfPurple,code:t,language:"tsx",children:e=>{let{className:r,style:t,tokens:n,getLineProps:s,getTokenProps:a}=e;return(0,l.jsx)("pre",{style:{...t,fontSize:"0.8rem",wordWrap:"break-word",whiteSpace:"pre-wrap",overflowWrap:"break-word",maxWidth:"100%"},children:n.map((e,r)=>(0,l.jsxs)("div",{...s({line:e}),style:{display:"flex"},children:[(0,l.jsx)("span",{style:{minWidth:"2em",userSelect:"none",opacity:.5},children:r+1}),(0,l.jsx)("span",{style:{flex:1,overflow:"hidden"},children:e.map((e,r)=>(0,l.jsx)("span",{...a({token:e}),style:{...a({token:e}).style,wordBreak:"break-all",whiteSpace:"pre-wrap"}},r))})]},r))})}})}):(0,l.jsx)("div",{children:"Error"})}function u(e){let{relTemplatePath:r}=e,{data:t}=c.h.core.generic.useQuery(void 0,{staleTime:1/0,initialData:new Date().toISOString()}),[n,s]=(0,i.useState)(!0),[a,d]=(0,i.useState)("/api/component?relativeTemplatePath=".concat(r));return(0,i.useEffect)(()=>{t&&(s(!0),d("/api/component?relativeTemplatePath=".concat(r,"&refresh=").concat(t)))},[t,r]),(0,l.jsxs)("div",{className:"relative h-full w-full",children:[n&&(0,l.jsx)("div",{className:"absolute inset-0 flex h-full w-full items-center justify-center bg-gray-100 bg-opacity-50",children:(0,l.jsx)("p",{children:"Rendering Component..."})}),a&&(0,l.jsx)("iframe",{src:a,className:"h-full w-full border-none",onLoad:()=>s(!1)})]})}function p(e){let{relTemplatePath:r}=e,{data:t,isLoading:n}=c.h.core.renderedHtml.useQuery({relTemplatePath:r});return n?(0,l.jsx)("div",{children:"Loading..."}):t?(0,l.jsx)("div",{children:(0,l.jsx)(o.y$,{theme:o.np.shadesOfPurple,code:t,language:"tsx",children:e=>{let{className:r,style:t,tokens:n,getLineProps:s,getTokenProps:a}=e;return(0,l.jsx)("pre",{style:{...t,fontSize:"0.8rem",wordWrap:"break-word",whiteSpace:"pre-wrap",overflowWrap:"break-word"},children:n.map((e,r)=>(0,l.jsxs)("div",{...s({line:e}),style:{display:"flex"},children:[(0,l.jsx)("span",{style:{minWidth:"2em",userSelect:"none",opacity:.5},children:r+1}),(0,l.jsx)("span",{children:e.map((e,r)=>(0,l.jsx)("span",{...a({token:e})},r))})]},r))})}})}):(0,l.jsx)("div",{children:"Error"})}function x(e){let{relTemplatePath:r}=e,{data:t}=c.h.core.generic.useQuery(void 0,{staleTime:1/0,initialData:new Date().toISOString()}),[n,s]=(0,i.useState)(!0),[a,d]=(0,i.useState)("/api/pdf?relativeTemplatePath=".concat(r));return(0,i.useEffect)(()=>{t&&(s(!0),d("/api/pdf?relativeTemplatePath=".concat(r,"&refresh=").concat(t)))},[t,r]),(0,l.jsxs)("div",{className:"relative h-full w-full",children:[n&&(0,l.jsx)("div",{className:"absolute inset-0 flex h-full w-full items-center justify-center bg-gray-100 bg-opacity-50",children:(0,l.jsx)("p",{children:"Rendering PDF..."})}),(0,l.jsx)("iframe",{src:a,width:"100%",height:"100%",title:"PDF Preview",onLoad:()=>s(!1)},t)]})}var m=!0;function f(e){let{templateName:r,relTemplatePath:t}=e,n=(0,a.useRouter)(),c=n.query.view,o=e=>{n.push({query:{...n.query,view:e}})};return(0,i.useEffect)(()=>{c||n.push({query:{...n.query,view:"component"}})},[c]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(s(),{children:(0,l.jsx)("title",{children:"Preview PDF - rePDF"})}),(0,l.jsxs)("div",{className:"flex h-screen flex-col",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between bg-gray-200 p-4",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{children:r}),(0,l.jsx)("p",{className:"text-sm text-gray-500",children:r!==t?t:""})]}),(0,l.jsx)("div",{children:(0,l.jsxs)("ul",{className:"flex",children:[(0,l.jsx)("li",{className:"rounded-l bg-gray-300 p-2 text-sm hover:bg-gray-400 hover:text-white",onClick:()=>o("code"),children:"Code"}),(0,l.jsx)("li",{className:"bg-gray-300 p-2 text-sm hover:bg-gray-400 hover:text-white",onClick:()=>o("component"),children:"Component"}),(0,l.jsx)("li",{className:"bg-gray-300 p-2 text-sm hover:bg-gray-400 hover:text-white",onClick:()=>o("pdf"),children:"PDF"}),(0,l.jsx)("li",{className:"rounded-r bg-gray-300 p-2 text-sm hover:bg-gray-400 hover:text-white",onClick:()=>o("html"),children:"HTML"})]})})]}),(0,l.jsx)("div",{className:"flex-grow",children:(0,l.jsxs)(d,{children:["code"===c&&(0,l.jsx)(h,{relTemplatePath:t}),(null===c||"component"===c)&&(0,l.jsx)(u,{relTemplatePath:t}),"html"===c&&(0,l.jsx)(p,{relTemplatePath:t}),"pdf"===c&&(0,l.jsx)(x,{relTemplatePath:t})]})})]})]})}}},function(e){e.O(0,[11,888,774,179],function(){return e(e.s=3440)}),_N_E=e.O()}]);
|