@ray-js/robot-map-sdk 0.0.10 → 0.0.11

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 (57) hide show
  1. package/bin/docs-server.js +195 -0
  2. package/dist-docs/404.html +2 -2
  3. package/dist-docs/assets/{app.Dqj628zE.js → app.3-ianRvb.js} +1 -1
  4. package/dist-docs/assets/chunks/@localSearchIndexroot.l5uunL9n.js +1 -0
  5. package/dist-docs/assets/chunks/{BitmapFont.BXsyt1Ko.js → BitmapFont.C8awBCd1.js} +1 -1
  6. package/dist-docs/assets/chunks/{BufferResource.8pzc1eMm.js → BufferResource.C5TLxka4.js} +1 -1
  7. package/dist-docs/assets/chunks/{CanvasRenderer.DpOhlsYI.js → CanvasRenderer.DyglCOE2.js} +1 -1
  8. package/dist-docs/assets/chunks/{RenderTargetSystem.CWKFKvEe.js → RenderTargetSystem._cMCUdmu.js} +1 -1
  9. package/dist-docs/assets/chunks/{VPLocalSearchBox.D1fbUxUi.js → VPLocalSearchBox.DYzATQt_.js} +1 -1
  10. package/dist-docs/assets/chunks/{WebGLRenderer.BlPSqrND.js → WebGLRenderer.C_pauwH4.js} +1 -1
  11. package/dist-docs/assets/chunks/{WebGPURenderer.szL5hbKh.js → WebGPURenderer.DuRPdsh5.js} +1 -1
  12. package/dist-docs/assets/chunks/{browserAll.BxwMP9Gg.js → browserAll.BebatlLr.js} +1 -1
  13. package/dist-docs/assets/chunks/{index.nS-neZH_.js → index.DR0yN-kU.js} +4 -4
  14. package/dist-docs/assets/chunks/{theme.B9FcKggM.js → theme.Dn4kNa0x.js} +3 -3
  15. package/dist-docs/assets/chunks/{webworkerAll.BXgPGAoF.js → webworkerAll.BAL0vGum.js} +1 -1
  16. package/dist-docs/assets/{guide_getting-started.md.B8rkVqGP.js → guide_getting-started.md.DzTPTYGC.js} +2 -2
  17. package/dist-docs/assets/guide_getting-started.md.DzTPTYGC.lean.js +1 -0
  18. package/dist-docs/assets/records_bugs_2026-03-11-docs-server-bin-clean-bugfix.md.GGWCjkok.js +1 -0
  19. package/dist-docs/assets/records_bugs_2026-03-11-docs-server-bin-clean-bugfix.md.GGWCjkok.lean.js +1 -0
  20. package/dist-docs/guide/advanced-usage.html +3 -3
  21. package/dist-docs/guide/concepts.html +3 -3
  22. package/dist-docs/guide/getting-started.html +5 -5
  23. package/dist-docs/guide/mcp.html +3 -3
  24. package/dist-docs/hashmap.json +1 -1
  25. package/dist-docs/index.html +3 -3
  26. package/dist-docs/plans/2026-03-04-detected-objects-visibility-design.html +3 -3
  27. package/dist-docs/plans/2026-03-04-show-detected-objects-implementation-plan.html +3 -3
  28. package/dist-docs/plans/2026-03-10-simulator-debug-design.html +3 -3
  29. package/dist-docs/plans/2026-03-10-simulator-events-console-design.html +3 -3
  30. package/dist-docs/plans/2026-03-10-simulator-events-console-implementation-plan.html +3 -3
  31. package/dist-docs/plans/2026-03-10-simulator-runtime-controls-design.html +3 -3
  32. package/dist-docs/plans/2026-03-10-simulator-runtime-controls-implementation-plan.html +3 -3
  33. package/dist-docs/records/bugs/2026-02-28-fix-pixi-bindgroup-webgpu-snapshot-whitescreen-bugfix.html +3 -3
  34. package/dist-docs/records/bugs/2026-03-10-events-drawer-toolbar-scroll-bugfix.html +3 -3
  35. package/dist-docs/records/bugs/2026-03-10-simulator-initial-render-layout-bugfix.html +3 -3
  36. package/dist-docs/records/bugs/2026-03-10-simulator-wheel-scroll-leak-bugfix.html +3 -3
  37. package/dist-docs/records/bugs/2026-03-11-docs-server-bin-clean-bugfix.html +25 -0
  38. package/dist-docs/records/plans/2026-03-02-furniture-feature-plan.html +3 -3
  39. package/dist-docs/records/plans/2026-03-10-simulator-events-console-plan.html +3 -3
  40. package/dist-docs/records/plans/2026-03-10-simulator-last-successful-combo-cache-plan.html +3 -3
  41. package/dist-docs/records/plans/2026-03-10-simulator-map-parsed-view-plan.html +3 -3
  42. package/dist-docs/records/plans/2026-03-10-simulator-map-playground-refactor-plan.html +3 -3
  43. package/dist-docs/records/plans/2026-03-10-simulator-playground-plan.html +3 -3
  44. package/dist-docs/records/plans/2026-03-10-simulator-runtime-controls-plan.html +3 -3
  45. package/dist-docs/records/plans/2026-03-11-simulator-src-migration-implementation.html +3 -3
  46. package/dist-docs/records/plans/2026-03-11-simulator-src-migration-plan.html +3 -3
  47. package/dist-docs/reference/callbacks.html +3 -3
  48. package/dist-docs/reference/config.html +3 -3
  49. package/dist-docs/reference/data.html +3 -3
  50. package/dist-docs/reference/methods.html +3 -3
  51. package/dist-docs/reference/runtime.html +3 -3
  52. package/dist-docs/reference/types.html +3 -3
  53. package/dist-docs/reference/utils.html +3 -3
  54. package/dist-docs/simulator/index.html +3 -3
  55. package/package.json +1 -1
  56. package/dist-docs/assets/chunks/@localSearchIndexroot.5wY6DA9h.js +0 -1
  57. package/dist-docs/assets/guide_getting-started.md.B8rkVqGP.lean.js +0 -1
@@ -0,0 +1,195 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { createServer } from 'node:http'
4
+ import { readFile, stat } from 'node:fs/promises'
5
+ import { dirname, extname, join, normalize } from 'node:path'
6
+ import process from 'node:process'
7
+ import { fileURLToPath } from 'node:url'
8
+
9
+ const MIME_TYPES = {
10
+ '.html': 'text/html; charset=utf-8',
11
+ '.css': 'text/css; charset=utf-8',
12
+ '.js': 'application/javascript; charset=utf-8',
13
+ '.mjs': 'application/javascript; charset=utf-8',
14
+ '.json': 'application/json; charset=utf-8',
15
+ '.svg': 'image/svg+xml',
16
+ '.png': 'image/png',
17
+ '.jpg': 'image/jpeg',
18
+ '.jpeg': 'image/jpeg',
19
+ '.gif': 'image/gif',
20
+ '.webp': 'image/webp',
21
+ '.ico': 'image/x-icon',
22
+ '.txt': 'text/plain; charset=utf-8',
23
+ '.woff': 'font/woff',
24
+ '.woff2': 'font/woff2',
25
+ }
26
+
27
+ const HELP_TEXT = `
28
+ Usage:
29
+ robot-map-docs [--host <host>] [--port <port>]
30
+
31
+ Options:
32
+ --host, -H Host to bind (default: 127.0.0.1)
33
+ --port, -p Port to listen on (default: 4173)
34
+ --help, -h Show this help message
35
+ `
36
+
37
+ const parseArgs = (argv) => {
38
+ let host = '127.0.0.1'
39
+ let port = 4173
40
+
41
+ for (let i = 0; i < argv.length; i += 1) {
42
+ const arg = argv[i]
43
+ const next = argv[i + 1]
44
+
45
+ if (arg === '--help' || arg === '-h') {
46
+ console.log(HELP_TEXT.trim())
47
+ process.exit(0)
48
+ }
49
+
50
+ if ((arg === '--host' || arg === '-H') && next) {
51
+ host = next
52
+ i += 1
53
+ continue
54
+ }
55
+
56
+ if ((arg === '--port' || arg === '-p') && next) {
57
+ const parsed = Number.parseInt(next, 10)
58
+ if (Number.isNaN(parsed) || parsed <= 0) {
59
+ throw new Error(`Invalid port: ${next}`)
60
+ }
61
+ port = parsed
62
+ i += 1
63
+ continue
64
+ }
65
+ }
66
+
67
+ return { host, port }
68
+ }
69
+
70
+ const getSafePath = (rawPathname) => {
71
+ const decoded = decodeURIComponent(rawPathname)
72
+ const trimmed = decoded.replace(/^\/+/, '')
73
+ const normalized = normalize(trimmed)
74
+
75
+ if (
76
+ normalized === '..' ||
77
+ normalized.startsWith('../') ||
78
+ normalized.startsWith('..\\')
79
+ ) {
80
+ return null
81
+ }
82
+
83
+ return normalized
84
+ }
85
+
86
+ const currentFile = fileURLToPath(import.meta.url)
87
+ const currentDir = dirname(currentFile)
88
+ const docsRoot = join(currentDir, '..', 'dist-docs')
89
+
90
+ const serveFile = async (filePath, response) => {
91
+ const content = await readFile(filePath)
92
+ const ext = extname(filePath).toLowerCase()
93
+ const contentType = MIME_TYPES[ext] ?? 'application/octet-stream'
94
+ response.writeHead(200, {
95
+ 'Content-Type': contentType,
96
+ 'Cache-Control':
97
+ ext === '.html' ? 'no-store' : 'public, max-age=31536000, immutable',
98
+ })
99
+ response.end(content)
100
+ }
101
+
102
+ const createRequestHandler = () => async (request, response) => {
103
+ try {
104
+ const url = new URL(request.url ?? '/', 'http://localhost')
105
+ const pathname = url.pathname === '/' ? '/index.html' : url.pathname
106
+ const safePath = getSafePath(pathname)
107
+
108
+ if (!safePath) {
109
+ response.writeHead(400, { 'Content-Type': 'text/plain; charset=utf-8' })
110
+ response.end('Bad request path')
111
+ return
112
+ }
113
+
114
+ const candidateFile = join(docsRoot, safePath)
115
+
116
+ try {
117
+ const fileStat = await stat(candidateFile)
118
+ if (fileStat.isFile()) {
119
+ await serveFile(candidateFile, response)
120
+ return
121
+ }
122
+ } catch (error) {
123
+ if (!(error instanceof Error) || !('code' in error)) {
124
+ throw error
125
+ }
126
+ }
127
+
128
+ if (!extname(safePath)) {
129
+ const nestedIndex = join(docsRoot, safePath, 'index.html')
130
+ try {
131
+ const nestedStat = await stat(nestedIndex)
132
+ if (nestedStat.isFile()) {
133
+ await serveFile(nestedIndex, response)
134
+ return
135
+ }
136
+ } catch (error) {
137
+ if (!(error instanceof Error) || !('code' in error)) {
138
+ throw error
139
+ }
140
+ }
141
+ }
142
+
143
+ if (!extname(safePath)) {
144
+ await serveFile(join(docsRoot, 'index.html'), response)
145
+ return
146
+ }
147
+
148
+ response.writeHead(404, { 'Content-Type': 'text/plain; charset=utf-8' })
149
+ response.end('Not found')
150
+ } catch (error) {
151
+ const message = error instanceof Error ? error.message : String(error)
152
+ response.writeHead(500, { 'Content-Type': 'text/plain; charset=utf-8' })
153
+ response.end(`Internal server error: ${message}`)
154
+ }
155
+ }
156
+
157
+ const main = async () => {
158
+ const { host, port } = parseArgs(process.argv.slice(2))
159
+
160
+ try {
161
+ const rootStat = await stat(docsRoot)
162
+ if (!rootStat.isDirectory()) {
163
+ throw new Error('dist-docs is not a directory')
164
+ }
165
+ } catch (error) {
166
+ if (error instanceof Error) {
167
+ const maybeCode =
168
+ typeof error === 'object' && error && 'code' in error
169
+ ? error.code
170
+ : undefined
171
+ if (String(maybeCode ?? '') !== 'ENOENT') {
172
+ console.warn(
173
+ `[robot-map-docs] docs root check warning: ${error.message}`,
174
+ )
175
+ }
176
+ }
177
+ console.error(
178
+ '[robot-map-docs] dist-docs not found. Please build docs before publish.',
179
+ )
180
+ process.exit(1)
181
+ }
182
+
183
+ const server = createServer(createRequestHandler())
184
+ server.listen(port, host, () => {
185
+ console.log(
186
+ `[robot-map-docs] Serving dist-docs at http://${host}:${String(port)}`,
187
+ )
188
+ })
189
+ }
190
+
191
+ main().catch((error) => {
192
+ const message = error instanceof Error ? error.message : String(error)
193
+ console.error(`[robot-map-docs] Failed to start: ${message}`)
194
+ process.exit(1)
195
+ })
@@ -9,14 +9,14 @@
9
9
  <link rel="preload stylesheet" href="/assets/style.DrlDtCux.css" as="style">
10
10
  <link rel="preload stylesheet" href="/vp-icons.css" as="style">
11
11
 
12
- <script type="module" src="/assets/app.Dqj628zE.js"></script>
12
+ <script type="module" src="/assets/app.3-ianRvb.js"></script>
13
13
  <link rel="preload" href="/assets/inter-roman-latin.Di8DUHzh.woff2" as="font" type="font/woff2" crossorigin="">
14
14
  <script id="check-dark-mode">(()=>{const e=localStorage.getItem("vitepress-theme-appearance")||"auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches;(!e||e==="auto"?a:e==="dark")&&document.documentElement.classList.add("dark")})();</script>
15
15
  <script id="check-mac-os">document.documentElement.classList.toggle("mac",/Mac|iPhone|iPod|iPad/i.test(navigator.platform));</script>
16
16
  </head>
17
17
  <body>
18
18
  <div id="app"></div>
19
- <script>window.__VP_HASH_MAP__=JSON.parse("{\"guide_advanced-usage.md\":\"COVLyRkA\",\"guide_concepts.md\":\"CJ87tk-r\",\"guide_getting-started.md\":\"B8rkVqGP\",\"guide_mcp.md\":\"CabCiX8Z\",\"index.md\":\"wTsFvv0N\",\"plans_2026-03-04-detected-objects-visibility-design.md\":\"Dqboot5W\",\"plans_2026-03-04-show-detected-objects-implementation-plan.md\":\"CDWwQtWj\",\"plans_2026-03-10-simulator-debug-design.md\":\"BZibn7uw\",\"plans_2026-03-10-simulator-events-console-design.md\":\"BVmEzCbR\",\"plans_2026-03-10-simulator-events-console-implementation-plan.md\":\"S2f1zs9-\",\"plans_2026-03-10-simulator-runtime-controls-design.md\":\"mqeNaYgg\",\"plans_2026-03-10-simulator-runtime-controls-implementation-plan.md\":\"BXG1UWFt\",\"records_bugs_2026-02-28-fix-pixi-bindgroup-webgpu-snapshot-whitescreen-bugfix.md\":\"BbQpA41Y\",\"records_bugs_2026-03-10-events-drawer-toolbar-scroll-bugfix.md\":\"DbHxPv4D\",\"records_bugs_2026-03-10-simulator-initial-render-layout-bugfix.md\":\"w7--2hvH\",\"records_bugs_2026-03-10-simulator-wheel-scroll-leak-bugfix.md\":\"B6gIem2P\",\"records_plans_2026-03-02-furniture-feature-plan.md\":\"CqSsyNDo\",\"records_plans_2026-03-10-simulator-events-console-plan.md\":\"CfHLEHcc\",\"records_plans_2026-03-10-simulator-last-successful-combo-cache-plan.md\":\"Z2RoK239\",\"records_plans_2026-03-10-simulator-map-parsed-view-plan.md\":\"S9jPz75o\",\"records_plans_2026-03-10-simulator-map-playground-refactor-plan.md\":\"BuILlmcV\",\"records_plans_2026-03-10-simulator-playground-plan.md\":\"CQAR-T7p\",\"records_plans_2026-03-10-simulator-runtime-controls-plan.md\":\"DSVD-qCa\",\"records_plans_2026-03-11-simulator-src-migration-implementation.md\":\"FnB5Cx6R\",\"records_plans_2026-03-11-simulator-src-migration-plan.md\":\"BBfaeRrq\",\"reference_callbacks.md\":\"BIwuGR3s\",\"reference_config.md\":\"DHynhVxG\",\"reference_data.md\":\"B_XpUFrn\",\"reference_methods.md\":\"eH-UCMbE\",\"reference_runtime.md\":\"BEy8BhSZ\",\"reference_types.md\":\"hikiO8Cq\",\"reference_utils.md\":\"Dy6XKVWh\",\"simulator_index.md\":\"CF95Y_c9\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Tuya Robot Map\",\"description\":\"涂鸦扫地机地图组件\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"siteTitle\":\"Tuya Robot Map\",\"outline\":{\"level\":[2,6],\"label\":\"页面导航\"},\"nav\":[{\"text\":\"首页\",\"link\":\"/\"},{\"text\":\"指南\",\"link\":\"/guide/concepts\",\"activeMatch\":\"^/guide/\"},{\"text\":\"参考\",\"link\":\"/reference/data\",\"activeMatch\":\"^/reference/\"},{\"text\":\"模拟调试\",\"link\":\"/simulator/\",\"activeMatch\":\"^/simulator/\"}],\"sidebar\":{\"/guide/\":[{\"text\":\"指南\",\"items\":[{\"text\":\"基本概念\",\"link\":\"/guide/concepts\"},{\"text\":\"快速开始\",\"link\":\"/guide/getting-started\"},{\"text\":\"进阶使用\",\"link\":\"/guide/advanced-usage\"}]}],\"/reference/\":[{\"text\":\"组件Props\",\"items\":[{\"text\":\"数据\",\"link\":\"/reference/data\"},{\"text\":\"配置\",\"link\":\"/reference/config\"},{\"text\":\"运行时\",\"link\":\"/reference/runtime\"},{\"text\":\"地图事件回调\",\"link\":\"/reference/callbacks\"}]},{\"text\":\"方法\",\"items\":[{\"text\":\"地图方法\",\"link\":\"/reference/methods\"},{\"text\":\"工具方法\",\"link\":\"/reference/utils\"}]},{\"text\":\"类型定义\",\"items\":[{\"text\":\"类型定义\",\"link\":\"/reference/types\"}]}],\"/simulator/\":[{\"text\":\"模拟调试\",\"items\":[{\"text\":\"实时模拟调试\",\"link\":\"/simulator/\"}]}]},\"search\":{\"provider\":\"local\"},\"lastUpdated\":{\"text\":\"最后更新于\",\"formatOptions\":{\"dateStyle\":\"short\",\"timeStyle\":\"short\"}}},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
19
+ <script>window.__VP_HASH_MAP__=JSON.parse("{\"guide_advanced-usage.md\":\"COVLyRkA\",\"guide_concepts.md\":\"CJ87tk-r\",\"guide_getting-started.md\":\"DzTPTYGC\",\"guide_mcp.md\":\"CabCiX8Z\",\"index.md\":\"wTsFvv0N\",\"plans_2026-03-04-detected-objects-visibility-design.md\":\"Dqboot5W\",\"plans_2026-03-04-show-detected-objects-implementation-plan.md\":\"CDWwQtWj\",\"plans_2026-03-10-simulator-debug-design.md\":\"BZibn7uw\",\"plans_2026-03-10-simulator-events-console-design.md\":\"BVmEzCbR\",\"plans_2026-03-10-simulator-events-console-implementation-plan.md\":\"S2f1zs9-\",\"plans_2026-03-10-simulator-runtime-controls-design.md\":\"mqeNaYgg\",\"plans_2026-03-10-simulator-runtime-controls-implementation-plan.md\":\"BXG1UWFt\",\"records_bugs_2026-02-28-fix-pixi-bindgroup-webgpu-snapshot-whitescreen-bugfix.md\":\"BbQpA41Y\",\"records_bugs_2026-03-10-events-drawer-toolbar-scroll-bugfix.md\":\"DbHxPv4D\",\"records_bugs_2026-03-10-simulator-initial-render-layout-bugfix.md\":\"w7--2hvH\",\"records_bugs_2026-03-10-simulator-wheel-scroll-leak-bugfix.md\":\"B6gIem2P\",\"records_bugs_2026-03-11-docs-server-bin-clean-bugfix.md\":\"GGWCjkok\",\"records_plans_2026-03-02-furniture-feature-plan.md\":\"CqSsyNDo\",\"records_plans_2026-03-10-simulator-events-console-plan.md\":\"CfHLEHcc\",\"records_plans_2026-03-10-simulator-last-successful-combo-cache-plan.md\":\"Z2RoK239\",\"records_plans_2026-03-10-simulator-map-parsed-view-plan.md\":\"S9jPz75o\",\"records_plans_2026-03-10-simulator-map-playground-refactor-plan.md\":\"BuILlmcV\",\"records_plans_2026-03-10-simulator-playground-plan.md\":\"CQAR-T7p\",\"records_plans_2026-03-10-simulator-runtime-controls-plan.md\":\"DSVD-qCa\",\"records_plans_2026-03-11-simulator-src-migration-implementation.md\":\"FnB5Cx6R\",\"records_plans_2026-03-11-simulator-src-migration-plan.md\":\"BBfaeRrq\",\"reference_callbacks.md\":\"BIwuGR3s\",\"reference_config.md\":\"DHynhVxG\",\"reference_data.md\":\"B_XpUFrn\",\"reference_methods.md\":\"eH-UCMbE\",\"reference_runtime.md\":\"BEy8BhSZ\",\"reference_types.md\":\"hikiO8Cq\",\"reference_utils.md\":\"Dy6XKVWh\",\"simulator_index.md\":\"CF95Y_c9\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Tuya Robot Map\",\"description\":\"涂鸦扫地机地图组件\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"siteTitle\":\"Tuya Robot Map\",\"outline\":{\"level\":[2,6],\"label\":\"页面导航\"},\"nav\":[{\"text\":\"首页\",\"link\":\"/\"},{\"text\":\"指南\",\"link\":\"/guide/concepts\",\"activeMatch\":\"^/guide/\"},{\"text\":\"参考\",\"link\":\"/reference/data\",\"activeMatch\":\"^/reference/\"},{\"text\":\"模拟调试\",\"link\":\"/simulator/\",\"activeMatch\":\"^/simulator/\"}],\"sidebar\":{\"/guide/\":[{\"text\":\"指南\",\"items\":[{\"text\":\"基本概念\",\"link\":\"/guide/concepts\"},{\"text\":\"快速开始\",\"link\":\"/guide/getting-started\"},{\"text\":\"进阶使用\",\"link\":\"/guide/advanced-usage\"}]}],\"/reference/\":[{\"text\":\"组件Props\",\"items\":[{\"text\":\"数据\",\"link\":\"/reference/data\"},{\"text\":\"配置\",\"link\":\"/reference/config\"},{\"text\":\"运行时\",\"link\":\"/reference/runtime\"},{\"text\":\"地图事件回调\",\"link\":\"/reference/callbacks\"}]},{\"text\":\"方法\",\"items\":[{\"text\":\"地图方法\",\"link\":\"/reference/methods\"},{\"text\":\"工具方法\",\"link\":\"/reference/utils\"}]},{\"text\":\"类型定义\",\"items\":[{\"text\":\"类型定义\",\"link\":\"/reference/types\"}]}],\"/simulator/\":[{\"text\":\"模拟调试\",\"items\":[{\"text\":\"实时模拟调试\",\"link\":\"/simulator/\"}]}]},\"search\":{\"provider\":\"local\"},\"lastUpdated\":{\"text\":\"最后更新于\",\"formatOptions\":{\"dateStyle\":\"short\",\"timeStyle\":\"short\"}}},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
20
20
 
21
21
  </body>
22
22
  </html>
@@ -1 +1 @@
1
- import{R as p}from"./chunks/theme.B9FcKggM.js";import{R as s,ad as i,ae as u,af as c,ag as l,ah as f,ai as d,aj as m,ak as h,al as g,am as A,d as v,u as R,v as w,s as y,an as C,ao as P,ap as b,a7 as E}from"./chunks/framework.CBLqO2Q1.js";function r(e){if(e.extends){const a=r(e.extends);return{...a,...e,async enhanceApp(t){a.enhanceApp&&await a.enhanceApp(t),e.enhanceApp&&await e.enhanceApp(t)}}}return e}const n=r(p),S=v({name:"VitePressApp",setup(){const{site:e,lang:a,dir:t}=R();return w(()=>{y(()=>{document.documentElement.lang=a.value,document.documentElement.dir=t.value})}),e.value.router.prefetchLinks&&C(),P(),b(),n.setup&&n.setup(),()=>E(n.Layout)}});async function T(){globalThis.__VITEPRESS__=!0;const e=D(),a=j();a.provide(u,e);const t=c(e.route);return a.provide(l,t),a.component("Content",f),a.component("ClientOnly",d),Object.defineProperties(a.config.globalProperties,{$frontmatter:{get(){return t.frontmatter.value}},$params:{get(){return t.page.value.params}}}),n.enhanceApp&&await n.enhanceApp({app:a,router:e,siteData:m}),{app:a,router:e,data:t}}function j(){return A(S)}function D(){let e=s;return h(a=>{let t=g(a),o=null;return t&&(e&&(t=t.replace(/\.js$/,".lean.js")),o=import(t)),s&&(e=!1),o},n.NotFound)}s&&T().then(({app:e,router:a,data:t})=>{a.go().then(()=>{i(a.route,t.site),e.mount("#app")})});export{T as createApp};
1
+ import{R as p}from"./chunks/theme.Dn4kNa0x.js";import{R as s,ad as i,ae as u,af as c,ag as l,ah as f,ai as d,aj as m,ak as h,al as g,am as A,d as v,u as R,v as w,s as y,an as C,ao as P,ap as b,a7 as E}from"./chunks/framework.CBLqO2Q1.js";function r(e){if(e.extends){const a=r(e.extends);return{...a,...e,async enhanceApp(t){a.enhanceApp&&await a.enhanceApp(t),e.enhanceApp&&await e.enhanceApp(t)}}}return e}const n=r(p),S=v({name:"VitePressApp",setup(){const{site:e,lang:a,dir:t}=R();return w(()=>{y(()=>{document.documentElement.lang=a.value,document.documentElement.dir=t.value})}),e.value.router.prefetchLinks&&C(),P(),b(),n.setup&&n.setup(),()=>E(n.Layout)}});async function T(){globalThis.__VITEPRESS__=!0;const e=D(),a=j();a.provide(u,e);const t=c(e.route);return a.provide(l,t),a.component("Content",f),a.component("ClientOnly",d),Object.defineProperties(a.config.globalProperties,{$frontmatter:{get(){return t.frontmatter.value}},$params:{get(){return t.page.value.params}}}),n.enhanceApp&&await n.enhanceApp({app:a,router:e,siteData:m}),{app:a,router:e,data:t}}function j(){return A(S)}function D(){let e=s;return h(a=>{let t=g(a),o=null;return t&&(e&&(t=t.replace(/\.js$/,".lean.js")),o=import(t)),s&&(e=!1),o},n.NotFound)}s&&T().then(({app:e,router:a,data:t})=>{a.go().then(()=>{i(a.route,t.site),e.mount("#app")})});export{T as createApp};