nukejs 0.0.11 → 0.0.12

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 (77) hide show
  1. package/README.md +147 -0
  2. package/dist/Link.js +0 -1
  3. package/dist/app.js +0 -1
  4. package/dist/build-common.js +64 -14
  5. package/dist/build-node.js +63 -5
  6. package/dist/build-vercel.js +76 -9
  7. package/dist/builder.js +30 -4
  8. package/dist/bundle.js +47 -4
  9. package/dist/bundler.js +0 -1
  10. package/dist/component-analyzer.js +0 -1
  11. package/dist/config.js +0 -1
  12. package/dist/hmr-bundle.js +0 -1
  13. package/dist/hmr.js +4 -1
  14. package/dist/html-store.js +0 -1
  15. package/dist/http-server.js +0 -1
  16. package/dist/index.js +0 -1
  17. package/dist/logger.js +0 -1
  18. package/dist/metadata.js +0 -1
  19. package/dist/middleware-loader.js +0 -1
  20. package/dist/middleware.example.js +0 -1
  21. package/dist/middleware.js +0 -1
  22. package/dist/renderer.js +3 -9
  23. package/dist/request-store.js +0 -1
  24. package/dist/router.js +0 -1
  25. package/dist/ssr.js +73 -16
  26. package/dist/use-html.js +0 -1
  27. package/dist/use-request.js +0 -1
  28. package/dist/use-router.js +0 -1
  29. package/dist/utils.js +0 -1
  30. package/package.json +1 -1
  31. package/dist/Link.js.map +0 -7
  32. package/dist/app.d.ts +0 -19
  33. package/dist/app.js.map +0 -7
  34. package/dist/build-common.d.ts +0 -178
  35. package/dist/build-common.js.map +0 -7
  36. package/dist/build-node.d.ts +0 -15
  37. package/dist/build-node.js.map +0 -7
  38. package/dist/build-vercel.d.ts +0 -19
  39. package/dist/build-vercel.js.map +0 -7
  40. package/dist/builder.d.ts +0 -11
  41. package/dist/builder.js.map +0 -7
  42. package/dist/bundle.js.map +0 -7
  43. package/dist/bundler.d.ts +0 -58
  44. package/dist/bundler.js.map +0 -7
  45. package/dist/component-analyzer.d.ts +0 -75
  46. package/dist/component-analyzer.js.map +0 -7
  47. package/dist/config.d.ts +0 -35
  48. package/dist/config.js.map +0 -7
  49. package/dist/hmr-bundle.d.ts +0 -25
  50. package/dist/hmr-bundle.js.map +0 -7
  51. package/dist/hmr.d.ts +0 -55
  52. package/dist/hmr.js.map +0 -7
  53. package/dist/html-store.d.ts +0 -128
  54. package/dist/html-store.js.map +0 -7
  55. package/dist/http-server.d.ts +0 -92
  56. package/dist/http-server.js.map +0 -7
  57. package/dist/index.js.map +0 -7
  58. package/dist/logger.js.map +0 -7
  59. package/dist/metadata.d.ts +0 -51
  60. package/dist/metadata.js.map +0 -7
  61. package/dist/middleware-loader.d.ts +0 -50
  62. package/dist/middleware-loader.js.map +0 -7
  63. package/dist/middleware.d.ts +0 -22
  64. package/dist/middleware.example.d.ts +0 -8
  65. package/dist/middleware.example.js.map +0 -7
  66. package/dist/middleware.js.map +0 -7
  67. package/dist/renderer.d.ts +0 -44
  68. package/dist/renderer.js.map +0 -7
  69. package/dist/request-store.js.map +0 -7
  70. package/dist/router.d.ts +0 -92
  71. package/dist/router.js.map +0 -7
  72. package/dist/ssr.d.ts +0 -46
  73. package/dist/ssr.js.map +0 -7
  74. package/dist/use-html.js.map +0 -7
  75. package/dist/use-request.js.map +0 -7
  76. package/dist/use-router.js.map +0 -7
  77. package/dist/utils.js.map +0 -7
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/use-request.ts"],
4
- "sourcesContent": ["/**\r\n * use-request.ts \u2014 useRequest() Hook\r\n *\r\n * Universal hook that exposes the current request's URL parameters, query\r\n * string, and headers to any React component \u2014 server or client, dev or prod.\r\n *\r\n * \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\r\n * \u2502 Environment \u2502 Data source \u2502\r\n * \u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\r\n * \u2502 SSR (server) \u2502 request-store, populated by ssr.ts before rendering \u2502\r\n * \u2502 Client \u2502 __n_data JSON blob + window.location (reactive) \u2502\r\n * \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\r\n *\r\n * The hook stays reactive on the client: it listens to 'locationchange' events\r\n * fired by NukeJS's SPA router so values update on soft navigation without a\r\n * full page reload.\r\n *\r\n * --- Usage ---\r\n *\r\n * Basic:\r\n * ```tsx\r\n * // Works in server components (SSR) and client components (\"use client\")\r\n * const { params, query, headers, pathname } = useRequest();\r\n * const slug = params.slug as string;\r\n * const lang = query.lang as string;\r\n * const locale = headers['accept-language'];\r\n * ```\r\n *\r\n * Building useI18n on top:\r\n * ```tsx\r\n * // hooks/useI18n.ts\r\n * import { useRequest } from 'nukejs';\r\n *\r\n * const translations = {\r\n * en: { welcome: 'Welcome' },\r\n * fr: { welcome: 'Bienvenue' },\r\n * } as const;\r\n * type Locale = keyof typeof translations;\r\n *\r\n * function parseLocale(header = ''): Locale {\r\n * const tag = header.split(',')[0]?.split('-')[0]?.trim().toLowerCase();\r\n * return (tag in translations ? tag : 'en') as Locale;\r\n * }\r\n *\r\n * export function useI18n() {\r\n * const { query, headers } = useRequest();\r\n * // ?lang=fr wins over Accept-Language header\r\n * const locale = ((query.lang as string) ?? parseLocale(headers['accept-language'])) as Locale;\r\n * return { t: translations[locale] ?? translations.en, locale };\r\n * }\r\n *\r\n * // Page.tsx\r\n * const { t } = useI18n();\r\n * return <h1>{t.welcome}</h1>;\r\n * ```\r\n *\r\n * --- Notes ---\r\n * - `headers` on the client never contains `cookie`, `authorization`, or\r\n * `proxy-authorization` \u2014 these are stripped by the SSR pipeline before\r\n * embedding in __n_data. See request-store.ts for the full exclusion list.\r\n * - In a \"use client\" component, `params` always reflects the __n_data blob\r\n * written at the time of the most recent SSR/navigation. For the freshest\r\n * pathname use `useRouter().path` instead.\r\n */\r\n\r\nimport { useState, useEffect } from 'react';\r\nimport { getRequestStore } from './request-store';\r\nimport type { RequestContext } from './request-store';\r\n\r\nexport type { RequestContext };\r\n\r\n// \u2500\u2500\u2500 Helpers \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\r\n\r\n/** Fallback context used when data is unavailable. */\r\nconst EMPTY_CTX: RequestContext = {\r\n url: '',\r\n pathname: '',\r\n params: {},\r\n query: {},\r\n headers: {},\r\n};\r\n\r\n/**\r\n * Reads the current request context from the `__n_data` script tag embedded\r\n * by the SSR renderer, merged with `window.location` for live accuracy.\r\n *\r\n * Called on initial render and on every 'locationchange' event so the hook\r\n * stays fresh across SPA navigation.\r\n */\r\nfunction readClientContext(): RequestContext {\r\n try {\r\n // __n_data is a JSON blob with { url, params, query, headers, \u2026 }.\r\n const raw = document.getElementById('__n_data')?.textContent ?? '{}';\r\n const data = JSON.parse(raw) as Partial<RequestContext & { params: Record<string, any> }>;\r\n\r\n // Always re-parse the query string from the live URL so navigation\r\n // to ?lang=fr is reflected immediately without waiting for a new SSR.\r\n const search = window.location.search;\r\n const query: Record<string, string | string[]> = {};\r\n if (search) {\r\n const sp = new URLSearchParams(search);\r\n sp.forEach((_, k) => {\r\n const all = sp.getAll(k);\r\n query[k] = all.length > 1 ? all : all[0];\r\n });\r\n }\r\n\r\n return {\r\n url: window.location.pathname + window.location.search,\r\n pathname: window.location.pathname,\r\n params: data.params ?? {},\r\n query,\r\n headers: data.headers ?? {},\r\n };\r\n } catch {\r\n return EMPTY_CTX;\r\n }\r\n}\r\n\r\n// \u2500\u2500\u2500 Universal hook \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\r\n\r\n/**\r\n * Returns the current request context: URL params, query string, and headers.\r\n *\r\n * Automatically detects SSR vs browser and returns the correct data for\r\n * each environment. On the client it is reactive \u2014 values update on SPA\r\n * navigation without a page reload.\r\n */\r\nexport function useRequest(): RequestContext {\r\n // \u2500\u2500 Server path (SSR) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\r\n // typeof document === 'undefined' is the standard SSR guard in NukeJS\r\n // (mirrors the pattern used in use-html.ts and use-router.ts).\r\n if (typeof document === 'undefined') {\r\n return getRequestStore() ?? EMPTY_CTX;\r\n }\r\n\r\n // \u2500\u2500 Client path (browser) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\r\n // eslint-disable-next-line react-hooks/rules-of-hooks\r\n const [ctx, setCtx] = useState<RequestContext>(readClientContext);\r\n\r\n // eslint-disable-next-line react-hooks/rules-of-hooks\r\n useEffect(() => {\r\n // 'locationchange' is fired by NukeJS's history patch (setupLocationChangeMonitor)\r\n // on every pushState / replaceState / popstate so this handler covers both\r\n // Link-driven navigation and programmatic useRouter().push() calls.\r\n const handleLocationChange = () => setCtx(readClientContext());\r\n\r\n window.addEventListener('locationchange', handleLocationChange);\r\n return () => window.removeEventListener('locationchange', handleLocationChange);\r\n }, []);\r\n\r\n return ctx;\r\n}"],
5
- "mappings": "AAiEA,SAAS,UAAU,iBAAiB;AACpC,SAAS,uBAAuB;AAQhC,MAAM,YAA4B;AAAA,EAChC,KAAU;AAAA,EACV,UAAU;AAAA,EACV,QAAU,CAAC;AAAA,EACX,OAAU,CAAC;AAAA,EACX,SAAU,CAAC;AACb;AASA,SAAS,oBAAoC;AAC3C,MAAI;AAEF,UAAM,MAAQ,SAAS,eAAe,UAAU,GAAG,eAAe;AAClE,UAAM,OAAQ,KAAK,MAAM,GAAG;AAI5B,UAAM,SAAS,OAAO,SAAS;AAC/B,UAAM,QAA2C,CAAC;AAClD,QAAI,QAAQ;AACV,YAAM,KAAK,IAAI,gBAAgB,MAAM;AACrC,SAAG,QAAQ,CAAC,GAAG,MAAM;AACnB,cAAM,MAAM,GAAG,OAAO,CAAC;AACvB,cAAM,CAAC,IAAI,IAAI,SAAS,IAAI,MAAM,IAAI,CAAC;AAAA,MACzC,CAAC;AAAA,IACH;AAEA,WAAO;AAAA,MACL,KAAU,OAAO,SAAS,WAAW,OAAO,SAAS;AAAA,MACrD,UAAU,OAAO,SAAS;AAAA,MAC1B,QAAU,KAAK,UAAW,CAAC;AAAA,MAC3B;AAAA,MACA,SAAU,KAAK,WAAW,CAAC;AAAA,IAC7B;AAAA,EACF,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAWO,SAAS,aAA6B;AAI3C,MAAI,OAAO,aAAa,aAAa;AACnC,WAAO,gBAAgB,KAAK;AAAA,EAC9B;AAIA,QAAM,CAAC,KAAK,MAAM,IAAI,SAAyB,iBAAiB;AAGhE,YAAU,MAAM;AAId,UAAM,uBAAuB,MAAM,OAAO,kBAAkB,CAAC;AAE7D,WAAO,iBAAiB,kBAAkB,oBAAoB;AAC9D,WAAO,MAAM,OAAO,oBAAoB,kBAAkB,oBAAoB;AAAA,EAChF,GAAG,CAAC,CAAC;AAEL,SAAO;AACT;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/use-router.ts"],
4
- "sourcesContent": ["import { useCallback, useEffect, useState } from \"react\";\r\n\r\ntype Router = {\r\n path: string;\r\n push: (url: string) => void;\r\n replace: (url: string) => void;\r\n};\r\n\r\nexport default function useRouter(): Router {\r\n try {\r\n const [path, setPath] = useState(() => window.location.pathname);\r\n\r\n useEffect(() => {\r\n const handleLocationChange = () => setPath(window.location.pathname);\r\n window.addEventListener(\"locationchange\", handleLocationChange);\r\n return () => window.removeEventListener(\"locationchange\", handleLocationChange);\r\n }, []);\r\n\r\n const push = useCallback((url: string) => {\r\n window.history.pushState({}, \"\", url);\r\n setPath(url);\r\n }, []);\r\n\r\n const replace = useCallback((url: string) => {\r\n window.history.replaceState({}, \"\", url);\r\n setPath(url);\r\n }, []);\r\n\r\n return { path, push, replace };\r\n } catch {\r\n return { push: () => {}, replace: () => {}, path: \"\" };\r\n }\r\n}"],
5
- "mappings": "AAAA,SAAS,aAAa,WAAW,gBAAgB;AAQlC,SAAR,YAAqC;AACxC,MAAI;AACA,UAAM,CAAC,MAAM,OAAO,IAAI,SAAS,MAAM,OAAO,SAAS,QAAQ;AAE/D,cAAU,MAAM;AACZ,YAAM,uBAAuB,MAAM,QAAQ,OAAO,SAAS,QAAQ;AACnE,aAAO,iBAAiB,kBAAkB,oBAAoB;AAC9D,aAAO,MAAM,OAAO,oBAAoB,kBAAkB,oBAAoB;AAAA,IAClF,GAAG,CAAC,CAAC;AAEL,UAAM,OAAO,YAAY,CAAC,QAAgB;AACtC,aAAO,QAAQ,UAAU,CAAC,GAAG,IAAI,GAAG;AACpC,cAAQ,GAAG;AAAA,IACf,GAAG,CAAC,CAAC;AAEL,UAAM,UAAU,YAAY,CAAC,QAAgB;AACzC,aAAO,QAAQ,aAAa,CAAC,GAAG,IAAI,GAAG;AACvC,cAAQ,GAAG;AAAA,IACf,GAAG,CAAC,CAAC;AAEL,WAAO,EAAE,MAAM,MAAM,QAAQ;AAAA,EACjC,QAAQ;AACJ,WAAO,EAAE,MAAM,MAAM;AAAA,IAAC,GAAG,SAAS,MAAM;AAAA,IAAC,GAAG,MAAM,GAAG;AAAA,EACzD;AACJ;",
6
- "names": []
7
- }
package/dist/utils.js.map DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/utils.ts"],
4
- "sourcesContent": ["/**\r\n * utils.ts \u2014 Shared Utility Functions\r\n *\r\n * Small, dependency-free helpers used across both server and client code.\r\n */\r\n\r\n/**\r\n * Escapes a string for safe inclusion in HTML content or attribute values.\r\n *\r\n * Replaces the five characters that have special meaning in HTML:\r\n * & \u2192 &amp; (must come first to avoid double-escaping)\r\n * < \u2192 &lt;\r\n * > \u2192 &gt;\r\n * \" \u2192 &quot;\r\n * ' \u2192 &#039;\r\n */\r\nexport function escapeHtml(str: string): string {\r\n return str\r\n .replace(/&/g, '&amp;')\r\n .replace(/</g, '&lt;')\r\n .replace(/>/g, '&gt;')\r\n .replace(/\"/g, '&quot;')\r\n .replace(/'/g, '&#039;');\r\n}\r\n\r\n/**\r\n * Returns the correct Content-Type header value for a given file extension.\r\n *\r\n * Covers the full range of file types that are realistic in a public/ directory:\r\n * scripts, styles, images, fonts, media, documents, and data formats.\r\n *\r\n * Falls back to 'application/octet-stream' for unknown extensions so the\r\n * browser downloads rather than tries to render unknown binary content.\r\n */\r\nexport function getMimeType(ext: string): string {\r\n const map: Record<string, string> = {\r\n // \u2500\u2500 Web \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\r\n '.html': 'text/html; charset=utf-8',\r\n '.htm': 'text/html; charset=utf-8',\r\n '.css': 'text/css; charset=utf-8',\r\n '.js': 'application/javascript; charset=utf-8',\r\n '.mjs': 'application/javascript; charset=utf-8',\r\n '.cjs': 'application/javascript; charset=utf-8',\r\n '.map': 'application/json; charset=utf-8',\r\n\r\n // \u2500\u2500 Data \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\r\n '.json': 'application/json; charset=utf-8',\r\n '.xml': 'application/xml; charset=utf-8',\r\n '.txt': 'text/plain; charset=utf-8',\r\n '.csv': 'text/csv; charset=utf-8',\r\n\r\n // \u2500\u2500 Images \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\r\n '.png': 'image/png',\r\n '.jpg': 'image/jpeg',\r\n '.jpeg': 'image/jpeg',\r\n '.gif': 'image/gif',\r\n '.webp': 'image/webp',\r\n '.avif': 'image/avif',\r\n '.svg': 'image/svg+xml',\r\n '.ico': 'image/x-icon',\r\n '.bmp': 'image/bmp',\r\n '.tiff': 'image/tiff',\r\n '.tif': 'image/tiff',\r\n\r\n // \u2500\u2500 Fonts \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\r\n '.woff': 'font/woff',\r\n '.woff2': 'font/woff2',\r\n '.ttf': 'font/ttf',\r\n '.otf': 'font/otf',\r\n '.eot': 'application/vnd.ms-fontobject',\r\n\r\n // \u2500\u2500 Video \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\r\n '.mp4': 'video/mp4',\r\n '.webm': 'video/webm',\r\n '.ogv': 'video/ogg',\r\n '.mov': 'video/quicktime',\r\n '.avi': 'video/x-msvideo',\r\n\r\n // \u2500\u2500 Audio \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\r\n '.mp3': 'audio/mpeg',\r\n '.wav': 'audio/wav',\r\n '.ogg': 'audio/ogg',\r\n '.flac': 'audio/flac',\r\n '.aac': 'audio/aac',\r\n\r\n // \u2500\u2500 Documents / archives \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\r\n '.pdf': 'application/pdf',\r\n '.zip': 'application/zip',\r\n '.gz': 'application/gzip',\r\n '.tar': 'application/x-tar',\r\n '.wasm': 'application/wasm',\r\n };\r\n return map[ext.toLowerCase()] ?? 'application/octet-stream';\r\n}"],
5
- "mappings": "AAgBO,SAAS,WAAW,KAAqB;AAC9C,SAAO,IACJ,QAAQ,MAAM,OAAO,EACrB,QAAQ,MAAM,MAAM,EACpB,QAAQ,MAAM,MAAM,EACpB,QAAQ,MAAM,QAAQ,EACtB,QAAQ,MAAM,QAAQ;AAC3B;AAWO,SAAS,YAAY,KAAqB;AAC/C,QAAM,MAA8B;AAAA;AAAA,IAElC,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,QAAQ;AAAA;AAAA,IAGR,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,QAAQ;AAAA;AAAA,IAGR,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,QAAQ;AAAA;AAAA,IAGR,SAAS;AAAA,IACT,UAAU;AAAA,IACV,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,QAAQ;AAAA;AAAA,IAGR,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,QAAQ;AAAA;AAAA,IAGR,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,QAAQ;AAAA;AAAA,IAGR,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,SAAS;AAAA,EACX;AACA,SAAO,IAAI,IAAI,YAAY,CAAC,KAAK;AACnC;",
6
- "names": []
7
- }