@virtualansoftware/vs-office-viewer 1.0.1 → 1.0.2

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.
Files changed (33) hide show
  1. package/dist/client/assets/DocxViewer-BcXhLJfm.css +1 -0
  2. package/dist/client/assets/DocxViewer-CPMpeQTq.js +58 -0
  3. package/dist/client/assets/LogoIcon-CTf12WP0.js +1 -0
  4. package/dist/client/assets/PptxViewer-Bvr-20MJ.js +59 -0
  5. package/dist/client/assets/PptxViewer-Cn8CqLfg.css +1 -0
  6. package/dist/client/assets/XlsxViewer-CGc0vtBk.js +63 -0
  7. package/dist/client/assets/XlsxViewer-DTxE-neD.css +1 -0
  8. package/dist/client/assets/chevron-right-D0jHq8Hg.js +1 -0
  9. package/dist/client/assets/form-KvBV47dq.js +1 -0
  10. package/dist/client/assets/index-DATp3RB-.js +12 -0
  11. package/dist/client/assets/jszip.min-DhiFe-R7.js +2 -0
  12. package/dist/client/assets/login-aBY8Ktaw.js +1 -0
  13. package/dist/client/assets/register-BB43pNvY.js +1 -0
  14. package/dist/client/assets/rolldown-runtime-aKtaBQYM.js +1 -0
  15. package/dist/client/assets/routes-1JmKig5J.js +2 -0
  16. package/dist/client/assets/styles-F8oSmVJa.css +2 -0
  17. package/dist/client/robots.txt +2 -0
  18. package/dist/server/assets/DocxViewer-Bvu47Jxr.js +544 -0
  19. package/dist/server/assets/LogoIcon-D2qIWtkU.js +93 -0
  20. package/dist/server/assets/PptxViewer-CjRu82CL.js +209 -0
  21. package/dist/server/assets/XlsxViewer-CtBSfYb7.js +870 -0
  22. package/dist/server/assets/_tanstack-start-manifest_v-CQ5gmg8o.js +43 -0
  23. package/dist/server/assets/createMiddleware-BnSPczhK.js +24 -0
  24. package/dist/server/assets/empty-plugin-adapters-D9UWiqvJ.js +5 -0
  25. package/dist/server/assets/form-DY0gQsTv.js +249 -0
  26. package/dist/server/assets/login-hnUq0LLL.js +122 -0
  27. package/dist/server/assets/register-DIFjHkZS.js +164 -0
  28. package/dist/server/assets/router-CJA4LnAB.js +281 -0
  29. package/dist/server/assets/routes-DT9ZAw-E.js +481 -0
  30. package/dist/server/assets/server-vIOK9n3w.js +1595 -0
  31. package/dist/server/assets/start-RYa-0bjt.js +43 -0
  32. package/dist/server/server.js +86 -0
  33. package/package.json +7 -6
@@ -0,0 +1,281 @@
1
+ import { useEffect } from "react";
2
+ import { HeadContent, Link, Outlet, Scripts, createFileRoute, createRootRouteWithContext, createRouter, lazyRouteComponent, useRouter } from "@tanstack/react-router";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
5
+ import { z } from "zod";
6
+ //#region src/styles.css?url
7
+ var styles_default = "/assets/styles-F8oSmVJa.css";
8
+ //#endregion
9
+ //#region src/lib/lovable-error-reporting.ts
10
+ function reportLovableError(error, context = {}) {
11
+ if (typeof window === "undefined") return;
12
+ window.__lovableEvents?.captureException?.(error, {
13
+ source: "react_error_boundary",
14
+ route: window.location.pathname,
15
+ ...context
16
+ }, {
17
+ mechanism: "react_error_boundary",
18
+ handled: false,
19
+ severity: "error"
20
+ });
21
+ }
22
+ //#endregion
23
+ //#region src/routes/__root.tsx
24
+ function NotFoundComponent() {
25
+ return /* @__PURE__ */ jsx("div", {
26
+ className: "flex min-h-screen items-center justify-center bg-background px-4",
27
+ children: /* @__PURE__ */ jsxs("div", {
28
+ className: "max-w-md text-center",
29
+ children: [
30
+ /* @__PURE__ */ jsx("h1", {
31
+ className: "text-7xl font-bold text-foreground",
32
+ children: "404"
33
+ }),
34
+ /* @__PURE__ */ jsx("h2", {
35
+ className: "mt-4 text-xl font-semibold text-foreground",
36
+ children: "Page not found"
37
+ }),
38
+ /* @__PURE__ */ jsx("p", {
39
+ className: "mt-2 text-sm text-muted-foreground",
40
+ children: "The page you're looking for doesn't exist or has been moved."
41
+ }),
42
+ /* @__PURE__ */ jsx("div", {
43
+ className: "mt-6",
44
+ children: /* @__PURE__ */ jsx(Link, {
45
+ to: "/",
46
+ className: "inline-flex items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90",
47
+ children: "Go home"
48
+ })
49
+ })
50
+ ]
51
+ })
52
+ });
53
+ }
54
+ function ErrorComponent({ error, reset }) {
55
+ console.error(error);
56
+ const router = useRouter();
57
+ useEffect(() => {
58
+ reportLovableError(error, { boundary: "tanstack_root_error_component" });
59
+ }, [error]);
60
+ return /* @__PURE__ */ jsx("div", {
61
+ className: "flex min-h-screen items-center justify-center bg-background px-4",
62
+ children: /* @__PURE__ */ jsxs("div", {
63
+ className: "max-w-md text-center",
64
+ children: [
65
+ /* @__PURE__ */ jsx("h1", {
66
+ className: "text-xl font-semibold tracking-tight text-foreground",
67
+ children: "This page didn't load"
68
+ }),
69
+ /* @__PURE__ */ jsx("p", {
70
+ className: "mt-2 text-sm text-muted-foreground",
71
+ children: "Something went wrong on our end. You can try refreshing or head back home."
72
+ }),
73
+ /* @__PURE__ */ jsxs("div", {
74
+ className: "mt-6 flex flex-wrap justify-center gap-2",
75
+ children: [/* @__PURE__ */ jsx("button", {
76
+ onClick: () => {
77
+ router.invalidate();
78
+ reset();
79
+ },
80
+ className: "inline-flex items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90",
81
+ children: "Try again"
82
+ }), /* @__PURE__ */ jsx("a", {
83
+ href: "/",
84
+ className: "inline-flex items-center justify-center rounded-md border border-input bg-background px-4 py-2 text-sm font-medium text-foreground transition-colors hover:bg-accent",
85
+ children: "Go home"
86
+ })]
87
+ })
88
+ ]
89
+ })
90
+ });
91
+ }
92
+ var Route$4 = createRootRouteWithContext()({
93
+ head: () => ({
94
+ meta: [
95
+ { charSet: "utf-8" },
96
+ {
97
+ name: "viewport",
98
+ content: "width=device-width, initial-scale=1"
99
+ },
100
+ { title: "Lovable App" },
101
+ {
102
+ name: "description",
103
+ content: "DocuView Pro is a React application for viewing DOCX, PPT, and Excel files."
104
+ },
105
+ {
106
+ name: "author",
107
+ content: "Lovable"
108
+ },
109
+ {
110
+ property: "og:title",
111
+ content: "Lovable App"
112
+ },
113
+ {
114
+ property: "og:description",
115
+ content: "DocuView Pro is a React application for viewing DOCX, PPT, and Excel files."
116
+ },
117
+ {
118
+ property: "og:type",
119
+ content: "website"
120
+ },
121
+ {
122
+ name: "twitter:card",
123
+ content: "summary"
124
+ },
125
+ {
126
+ name: "twitter:site",
127
+ content: "@Lovable"
128
+ },
129
+ {
130
+ name: "twitter:title",
131
+ content: "Lovable App"
132
+ },
133
+ {
134
+ name: "twitter:description",
135
+ content: "DocuView Pro is a React application for viewing DOCX, PPT, and Excel files."
136
+ },
137
+ {
138
+ property: "og:image",
139
+ content: "https://pub-bb2e103a32db4e198524a2e9ed8f35b4.r2.dev/3a4a2296-566c-4b14-b351-3fbc08c7a9b9/id-preview-34571cfb--04b9844d-0c11-4bad-b6b9-9106cb808514.lovable.app-1780657852368.png"
140
+ },
141
+ {
142
+ name: "twitter:image",
143
+ content: "https://pub-bb2e103a32db4e198524a2e9ed8f35b4.r2.dev/3a4a2296-566c-4b14-b351-3fbc08c7a9b9/id-preview-34571cfb--04b9844d-0c11-4bad-b6b9-9106cb808514.lovable.app-1780657852368.png"
144
+ }
145
+ ],
146
+ links: [{
147
+ rel: "stylesheet",
148
+ href: styles_default
149
+ }]
150
+ }),
151
+ shellComponent: RootShell,
152
+ component: RootComponent,
153
+ notFoundComponent: NotFoundComponent,
154
+ errorComponent: ErrorComponent
155
+ });
156
+ function RootShell({ children }) {
157
+ return /* @__PURE__ */ jsxs("html", {
158
+ lang: "en",
159
+ children: [/* @__PURE__ */ jsx("head", { children: /* @__PURE__ */ jsx(HeadContent, {}) }), /* @__PURE__ */ jsxs("body", { children: [children, /* @__PURE__ */ jsx(Scripts, {})] })]
160
+ });
161
+ }
162
+ function RootComponent() {
163
+ const { queryClient } = Route$4.useRouteContext();
164
+ return /* @__PURE__ */ jsx(QueryClientProvider, {
165
+ client: queryClient,
166
+ children: /* @__PURE__ */ jsx(Outlet, {})
167
+ });
168
+ }
169
+ //#endregion
170
+ //#region src/routes/sitemap[.]xml.ts
171
+ var BASE_URL = "";
172
+ var Route$3 = createFileRoute("/sitemap.xml")({ server: { handlers: { GET: async () => {
173
+ const xml = [
174
+ `<?xml version="1.0" encoding="UTF-8"?>`,
175
+ `<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">`,
176
+ ` <url>`,
177
+ ` <loc>${BASE_URL}/</loc>`,
178
+ ` <changefreq>weekly</changefreq>`,
179
+ ` <priority>1.0</priority>`,
180
+ ` </url>`,
181
+ `</urlset>`
182
+ ].join("\n");
183
+ return new Response(xml, { headers: {
184
+ "Content-Type": "application/xml",
185
+ "Cache-Control": "public, max-age=3600"
186
+ } });
187
+ } } } });
188
+ //#endregion
189
+ //#region src/routes/register.tsx
190
+ var $$splitComponentImporter$2 = () => import("./register-DIFjHkZS.js");
191
+ var Route$2 = createFileRoute("/register")({
192
+ head: () => ({ meta: [{ title: "Create Account — Office Viewer" }, {
193
+ name: "description",
194
+ content: "Create your Office Viewer account."
195
+ }] }),
196
+ component: lazyRouteComponent($$splitComponentImporter$2, "component")
197
+ });
198
+ z.object({
199
+ fullName: z.string().min(2, "Name must be at least 2 characters").max(100, "Name is too long"),
200
+ email: z.string().email("Please enter a valid email address"),
201
+ password: z.string().min(8, "Password must be at least 8 characters").regex(/[A-Z]/, "Must contain at least one uppercase letter").regex(/[0-9]/, "Must contain at least one number"),
202
+ confirmPassword: z.string()
203
+ }).refine((d) => d.password === d.confirmPassword, {
204
+ path: ["confirmPassword"],
205
+ message: "Passwords do not match"
206
+ });
207
+ //#endregion
208
+ //#region src/routes/login.tsx
209
+ var $$splitComponentImporter$1 = () => import("./login-hnUq0LLL.js");
210
+ var Route$1 = createFileRoute("/login")({
211
+ head: () => ({ meta: [{ title: "Sign In — Office Viewer" }, {
212
+ name: "description",
213
+ content: "Sign in to your Office Viewer account."
214
+ }] }),
215
+ component: lazyRouteComponent($$splitComponentImporter$1, "component")
216
+ });
217
+ z.object({
218
+ email: z.string().email("Please enter a valid email address"),
219
+ password: z.string().min(6, "Password must be at least 6 characters")
220
+ });
221
+ //#endregion
222
+ //#region src/routes/index.tsx
223
+ var $$splitComponentImporter = () => import("./routes-DT9ZAw-E.js");
224
+ var Route = createFileRoute("/")({
225
+ head: () => ({ meta: [
226
+ { title: "Office Viewer — Word, Excel & PowerPoint" },
227
+ {
228
+ name: "description",
229
+ content: "Upload and view Word, Excel and PowerPoint files directly in your browser. Nothing is uploaded — everything renders locally."
230
+ },
231
+ {
232
+ property: "og:title",
233
+ content: "Office Viewer"
234
+ },
235
+ {
236
+ property: "og:description",
237
+ content: "View Word, Excel and PowerPoint files directly in your browser."
238
+ }
239
+ ] }),
240
+ component: lazyRouteComponent($$splitComponentImporter, "component")
241
+ });
242
+ //#endregion
243
+ //#region src/routeTree.gen.ts
244
+ var SitemapDotxmlRoute = Route$3.update({
245
+ id: "/sitemap.xml",
246
+ path: "/sitemap.xml",
247
+ getParentRoute: () => Route$4
248
+ });
249
+ var RegisterRoute = Route$2.update({
250
+ id: "/register",
251
+ path: "/register",
252
+ getParentRoute: () => Route$4
253
+ });
254
+ var LoginRoute = Route$1.update({
255
+ id: "/login",
256
+ path: "/login",
257
+ getParentRoute: () => Route$4
258
+ });
259
+ var rootRouteChildren = {
260
+ IndexRoute: Route.update({
261
+ id: "/",
262
+ path: "/",
263
+ getParentRoute: () => Route$4
264
+ }),
265
+ LoginRoute,
266
+ RegisterRoute,
267
+ SitemapDotxmlRoute
268
+ };
269
+ var routeTree = Route$4._addFileChildren(rootRouteChildren)._addFileTypes();
270
+ //#endregion
271
+ //#region src/router.tsx
272
+ var getRouter = () => {
273
+ return createRouter({
274
+ routeTree,
275
+ context: { queryClient: new QueryClient() },
276
+ scrollRestoration: true,
277
+ defaultPreloadStaleTime: 0
278
+ });
279
+ };
280
+ //#endregion
281
+ export { getRouter };