@ray-js/robot-map-sdk 0.0.10 → 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.
- package/bin/docs-server.js +379 -0
- package/dist-docs/404.html +2 -2
- package/dist-docs/assets/{app.Dqj628zE.js → app.Bg6Ypeoa.js} +1 -1
- package/dist-docs/assets/chunks/@localSearchIndexroot.Eymr9Nu7.js +1 -0
- package/dist-docs/assets/chunks/{BitmapFont.BXsyt1Ko.js → BitmapFont.CXuoJus7.js} +1 -1
- package/dist-docs/assets/chunks/{BufferResource.8pzc1eMm.js → BufferResource.BGUfVWrF.js} +1 -1
- package/dist-docs/assets/chunks/{CanvasRenderer.DpOhlsYI.js → CanvasRenderer.DT-IZ40Y.js} +1 -1
- package/dist-docs/assets/chunks/{RenderTargetSystem.CWKFKvEe.js → RenderTargetSystem.xcN9N8yZ.js} +1 -1
- package/dist-docs/assets/chunks/{VPLocalSearchBox.D1fbUxUi.js → VPLocalSearchBox.q-ZF5NyL.js} +1 -1
- package/dist-docs/assets/chunks/{WebGLRenderer.BlPSqrND.js → WebGLRenderer.yqwosgOK.js} +1 -1
- package/dist-docs/assets/chunks/{WebGPURenderer.szL5hbKh.js → WebGPURenderer.CQtWddUJ.js} +1 -1
- package/dist-docs/assets/chunks/{browserAll.BxwMP9Gg.js → browserAll.De-cmVZB.js} +1 -1
- package/dist-docs/assets/chunks/{index.nS-neZH_.js → index.BXtdqYEZ.js} +4 -4
- package/dist-docs/assets/chunks/{theme.B9FcKggM.js → theme.CKxbjNbw.js} +3 -3
- package/dist-docs/assets/chunks/{webworkerAll.BXgPGAoF.js → webworkerAll.CrpT5gSi.js} +1 -1
- package/dist-docs/assets/{guide_getting-started.md.B8rkVqGP.js → guide_getting-started.md.D2j6CRj3.js} +2 -2
- package/dist-docs/assets/guide_getting-started.md.D2j6CRj3.lean.js +1 -0
- package/dist-docs/assets/records_bugs_2026-03-11-docs-server-bin-clean-bugfix.md.GGWCjkok.js +1 -0
- package/dist-docs/assets/records_bugs_2026-03-11-docs-server-bin-clean-bugfix.md.GGWCjkok.lean.js +1 -0
- package/dist-docs/assets/records_plans_2026-03-11-docs-cli-ui-polish-plan.md.B8oZt_5R.js +1 -0
- package/dist-docs/assets/records_plans_2026-03-11-docs-cli-ui-polish-plan.md.B8oZt_5R.lean.js +1 -0
- package/dist-docs/guide/advanced-usage.html +3 -3
- package/dist-docs/guide/concepts.html +3 -3
- package/dist-docs/guide/getting-started.html +5 -5
- package/dist-docs/guide/mcp.html +3 -3
- package/dist-docs/hashmap.json +1 -1
- package/dist-docs/index.html +3 -3
- package/dist-docs/plans/2026-03-04-detected-objects-visibility-design.html +3 -3
- package/dist-docs/plans/2026-03-04-show-detected-objects-implementation-plan.html +3 -3
- package/dist-docs/plans/2026-03-10-simulator-debug-design.html +3 -3
- package/dist-docs/plans/2026-03-10-simulator-events-console-design.html +3 -3
- package/dist-docs/plans/2026-03-10-simulator-events-console-implementation-plan.html +3 -3
- package/dist-docs/plans/2026-03-10-simulator-runtime-controls-design.html +3 -3
- package/dist-docs/plans/2026-03-10-simulator-runtime-controls-implementation-plan.html +3 -3
- package/dist-docs/records/bugs/2026-02-28-fix-pixi-bindgroup-webgpu-snapshot-whitescreen-bugfix.html +3 -3
- package/dist-docs/records/bugs/2026-03-10-events-drawer-toolbar-scroll-bugfix.html +3 -3
- package/dist-docs/records/bugs/2026-03-10-simulator-initial-render-layout-bugfix.html +3 -3
- package/dist-docs/records/bugs/2026-03-10-simulator-wheel-scroll-leak-bugfix.html +3 -3
- package/dist-docs/records/bugs/2026-03-11-docs-server-bin-clean-bugfix.html +25 -0
- package/dist-docs/records/plans/2026-03-02-furniture-feature-plan.html +3 -3
- package/dist-docs/records/plans/2026-03-10-simulator-events-console-plan.html +3 -3
- package/dist-docs/records/plans/2026-03-10-simulator-last-successful-combo-cache-plan.html +3 -3
- package/dist-docs/records/plans/2026-03-10-simulator-map-parsed-view-plan.html +3 -3
- package/dist-docs/records/plans/2026-03-10-simulator-map-playground-refactor-plan.html +3 -3
- package/dist-docs/records/plans/2026-03-10-simulator-playground-plan.html +3 -3
- package/dist-docs/records/plans/2026-03-10-simulator-runtime-controls-plan.html +3 -3
- package/dist-docs/records/plans/2026-03-11-docs-cli-ui-polish-plan.html +25 -0
- package/dist-docs/records/plans/2026-03-11-simulator-src-migration-implementation.html +3 -3
- package/dist-docs/records/plans/2026-03-11-simulator-src-migration-plan.html +3 -3
- package/dist-docs/reference/callbacks.html +3 -3
- package/dist-docs/reference/config.html +3 -3
- package/dist-docs/reference/data.html +3 -3
- package/dist-docs/reference/methods.html +3 -3
- package/dist-docs/reference/runtime.html +3 -3
- package/dist-docs/reference/types.html +3 -3
- package/dist-docs/reference/utils.html +3 -3
- package/dist-docs/simulator/index.html +3 -3
- package/package.json +1 -1
- package/dist-docs/assets/chunks/@localSearchIndexroot.5wY6DA9h.js +0 -1
- package/dist-docs/assets/guide_getting-started.md.B8rkVqGP.lean.js +0 -1
|
@@ -0,0 +1,379 @@
|
|
|
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 { spawn } from 'node:child_process'
|
|
7
|
+
import process from 'node:process'
|
|
8
|
+
import { fileURLToPath } from 'node:url'
|
|
9
|
+
|
|
10
|
+
const MIME_TYPES = {
|
|
11
|
+
'.html': 'text/html; charset=utf-8',
|
|
12
|
+
'.css': 'text/css; charset=utf-8',
|
|
13
|
+
'.js': 'application/javascript; charset=utf-8',
|
|
14
|
+
'.mjs': 'application/javascript; charset=utf-8',
|
|
15
|
+
'.json': 'application/json; charset=utf-8',
|
|
16
|
+
'.svg': 'image/svg+xml',
|
|
17
|
+
'.png': 'image/png',
|
|
18
|
+
'.jpg': 'image/jpeg',
|
|
19
|
+
'.jpeg': 'image/jpeg',
|
|
20
|
+
'.gif': 'image/gif',
|
|
21
|
+
'.webp': 'image/webp',
|
|
22
|
+
'.ico': 'image/x-icon',
|
|
23
|
+
'.txt': 'text/plain; charset=utf-8',
|
|
24
|
+
'.woff': 'font/woff',
|
|
25
|
+
'.woff2': 'font/woff2',
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const HELP_TEXT = `
|
|
29
|
+
Usage:
|
|
30
|
+
robot-map-docs [--host <host>] [--port <port>] [--open]
|
|
31
|
+
|
|
32
|
+
Options:
|
|
33
|
+
--host, -H Host to bind (default: 127.0.0.1)
|
|
34
|
+
--port, -p Port to listen on (default: 5180)
|
|
35
|
+
--open, -o Open docs in browser after server starts
|
|
36
|
+
--no-open Disable browser auto-open
|
|
37
|
+
--quiet, -q Minimal logs (errors only)
|
|
38
|
+
--help, -h Show this help message
|
|
39
|
+
`
|
|
40
|
+
|
|
41
|
+
const parseArgs = (argv) => {
|
|
42
|
+
let host = '127.0.0.1'
|
|
43
|
+
let port = 5180
|
|
44
|
+
let shouldOpen =
|
|
45
|
+
process.env.ROBOT_MAP_DOCS_OPEN === '1' ||
|
|
46
|
+
process.env.ROBOT_MAP_DOCS_OPEN === 'true'
|
|
47
|
+
let quiet = false
|
|
48
|
+
|
|
49
|
+
for (let i = 0; i < argv.length; i += 1) {
|
|
50
|
+
const arg = argv[i]
|
|
51
|
+
const next = argv[i + 1]
|
|
52
|
+
|
|
53
|
+
if (arg === '--help' || arg === '-h') {
|
|
54
|
+
console.log(HELP_TEXT.trim())
|
|
55
|
+
process.exit(0)
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
if ((arg === '--host' || arg === '-H') && next) {
|
|
59
|
+
host = next
|
|
60
|
+
i += 1
|
|
61
|
+
continue
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
if ((arg === '--port' || arg === '-p') && next) {
|
|
65
|
+
const parsed = Number.parseInt(next, 10)
|
|
66
|
+
if (Number.isNaN(parsed) || parsed <= 0) {
|
|
67
|
+
throw new Error(`Invalid port: ${next}`)
|
|
68
|
+
}
|
|
69
|
+
port = parsed
|
|
70
|
+
i += 1
|
|
71
|
+
continue
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if (arg === '--open' || arg === '-o') {
|
|
75
|
+
shouldOpen = true
|
|
76
|
+
continue
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if (arg === '--no-open') {
|
|
80
|
+
shouldOpen = false
|
|
81
|
+
continue
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
if (arg === '--quiet' || arg === '-q') {
|
|
85
|
+
quiet = true
|
|
86
|
+
continue
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
return { host, port, shouldOpen, quiet }
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
const getSafePath = (rawPathname) => {
|
|
94
|
+
const decoded = decodeURIComponent(rawPathname)
|
|
95
|
+
const trimmed = decoded.replace(/^\/+/, '')
|
|
96
|
+
const normalized = normalize(trimmed)
|
|
97
|
+
|
|
98
|
+
if (
|
|
99
|
+
normalized === '..' ||
|
|
100
|
+
normalized.startsWith('../') ||
|
|
101
|
+
normalized.startsWith('..\\')
|
|
102
|
+
) {
|
|
103
|
+
return null
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
return normalized
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
const currentFile = fileURLToPath(import.meta.url)
|
|
110
|
+
const currentDir = dirname(currentFile)
|
|
111
|
+
const docsRoot = join(currentDir, '..', 'dist-docs')
|
|
112
|
+
const packageRoot = join(currentDir, '..')
|
|
113
|
+
|
|
114
|
+
const isColorEnabled = () =>
|
|
115
|
+
process.stdout.isTTY &&
|
|
116
|
+
process.env.NO_COLOR !== '1' &&
|
|
117
|
+
process.env.FORCE_COLOR !== '0'
|
|
118
|
+
|
|
119
|
+
const color = {
|
|
120
|
+
reset: '\x1b[0m',
|
|
121
|
+
dim: '\x1b[2m',
|
|
122
|
+
accent: '\x1b[38;2;72;151;108m',
|
|
123
|
+
accentSoft: '\x1b[38;2;121;206;160m',
|
|
124
|
+
warn: '\x1b[38;2;214;162;64m',
|
|
125
|
+
danger: '\x1b[38;2;220;95;95m',
|
|
126
|
+
bold: '\x1b[1m',
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
const withColor = (value, style) => {
|
|
130
|
+
if (!isColorEnabled()) return value
|
|
131
|
+
return `${style}${value}${color.reset}`
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
const createLogger = ({ quiet }) => ({
|
|
135
|
+
info: (text) => {
|
|
136
|
+
if (!quiet) {
|
|
137
|
+
console.log(`${withColor('[docs]', color.accent)} ${text}`)
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
warn: (text) => {
|
|
141
|
+
if (!quiet) {
|
|
142
|
+
console.warn(`${withColor('[warn]', color.warn)} ${text}`)
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
error: (text) => {
|
|
146
|
+
console.error(`${withColor('[error]', color.danger)} ${text}`)
|
|
147
|
+
},
|
|
148
|
+
})
|
|
149
|
+
|
|
150
|
+
const formatDurationMs = (durationMs) => `${Math.max(0, durationMs)}ms`
|
|
151
|
+
|
|
152
|
+
const formatBorder = (title) =>
|
|
153
|
+
withColor(`+-------------------- ${title} --------------------+`, color.accent)
|
|
154
|
+
|
|
155
|
+
const renderBanner = ({ version, host, port, startupMs, openMode }) => {
|
|
156
|
+
const endpoint = `http://${host}:${String(port)}`
|
|
157
|
+
const lines = [
|
|
158
|
+
formatBorder('Robot Map Docs'),
|
|
159
|
+
`${withColor(' Package ', color.dim)} ${withColor(
|
|
160
|
+
`@ray-js/robot-map-sdk@${version}`,
|
|
161
|
+
color.bold,
|
|
162
|
+
)}`,
|
|
163
|
+
`${withColor(' URL ', color.dim)} ${withColor(endpoint, color.accentSoft)}`,
|
|
164
|
+
`${withColor(' Open ', color.dim)} ${openMode}`,
|
|
165
|
+
`${withColor(' Startup ', color.dim)} ${formatDurationMs(startupMs)}`,
|
|
166
|
+
withColor('+---------------------------------------------------+', color.accent),
|
|
167
|
+
withColor('Press Ctrl+C to stop', color.dim),
|
|
168
|
+
]
|
|
169
|
+
return lines.join('\n')
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
const getPackageVersion = async () => {
|
|
173
|
+
try {
|
|
174
|
+
const content = await readFile(join(packageRoot, 'package.json'), 'utf-8')
|
|
175
|
+
const parsed = JSON.parse(content)
|
|
176
|
+
if (typeof parsed.version === 'string' && parsed.version.trim()) {
|
|
177
|
+
return parsed.version
|
|
178
|
+
}
|
|
179
|
+
} catch (_error) {
|
|
180
|
+
// Ignore and fall back to unknown.
|
|
181
|
+
}
|
|
182
|
+
return 'unknown'
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
const openBrowser = (url) => {
|
|
186
|
+
let cmd = ''
|
|
187
|
+
let args = []
|
|
188
|
+
|
|
189
|
+
if (process.platform === 'darwin') {
|
|
190
|
+
cmd = 'open'
|
|
191
|
+
args = [url]
|
|
192
|
+
} else if (process.platform === 'win32') {
|
|
193
|
+
cmd = 'cmd'
|
|
194
|
+
args = ['/c', 'start', '', url]
|
|
195
|
+
} else {
|
|
196
|
+
cmd = 'xdg-open'
|
|
197
|
+
args = [url]
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
return new Promise((resolve, reject) => {
|
|
201
|
+
const child = spawn(cmd, args, {
|
|
202
|
+
detached: true,
|
|
203
|
+
stdio: 'ignore',
|
|
204
|
+
})
|
|
205
|
+
child.on('error', reject)
|
|
206
|
+
child.unref()
|
|
207
|
+
resolve()
|
|
208
|
+
})
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
const serveFile = async (filePath, response) => {
|
|
212
|
+
const content = await readFile(filePath)
|
|
213
|
+
const ext = extname(filePath).toLowerCase()
|
|
214
|
+
const contentType = MIME_TYPES[ext] ?? 'application/octet-stream'
|
|
215
|
+
response.writeHead(200, {
|
|
216
|
+
'Content-Type': contentType,
|
|
217
|
+
'Cache-Control':
|
|
218
|
+
ext === '.html' ? 'no-store' : 'public, max-age=31536000, immutable',
|
|
219
|
+
})
|
|
220
|
+
response.end(content)
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
const createRequestHandler = () => async (request, response) => {
|
|
224
|
+
try {
|
|
225
|
+
const url = new URL(request.url ?? '/', 'http://localhost')
|
|
226
|
+
const pathname = url.pathname === '/' ? '/index.html' : url.pathname
|
|
227
|
+
const safePath = getSafePath(pathname)
|
|
228
|
+
|
|
229
|
+
if (!safePath) {
|
|
230
|
+
response.writeHead(400, { 'Content-Type': 'text/plain; charset=utf-8' })
|
|
231
|
+
response.end('Bad request path')
|
|
232
|
+
return
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
const candidateFile = join(docsRoot, safePath)
|
|
236
|
+
|
|
237
|
+
try {
|
|
238
|
+
const fileStat = await stat(candidateFile)
|
|
239
|
+
if (fileStat.isFile()) {
|
|
240
|
+
await serveFile(candidateFile, response)
|
|
241
|
+
return
|
|
242
|
+
}
|
|
243
|
+
} catch (error) {
|
|
244
|
+
if (!(error instanceof Error) || !('code' in error)) {
|
|
245
|
+
throw error
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
if (!extname(safePath)) {
|
|
250
|
+
const nestedIndex = join(docsRoot, safePath, 'index.html')
|
|
251
|
+
try {
|
|
252
|
+
const nestedStat = await stat(nestedIndex)
|
|
253
|
+
if (nestedStat.isFile()) {
|
|
254
|
+
await serveFile(nestedIndex, response)
|
|
255
|
+
return
|
|
256
|
+
}
|
|
257
|
+
} catch (error) {
|
|
258
|
+
if (!(error instanceof Error) || !('code' in error)) {
|
|
259
|
+
throw error
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
if (!extname(safePath)) {
|
|
265
|
+
await serveFile(join(docsRoot, 'index.html'), response)
|
|
266
|
+
return
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
response.writeHead(404, { 'Content-Type': 'text/plain; charset=utf-8' })
|
|
270
|
+
response.end('Not found')
|
|
271
|
+
} catch (error) {
|
|
272
|
+
const message = error instanceof Error ? error.message : String(error)
|
|
273
|
+
response.writeHead(500, { 'Content-Type': 'text/plain; charset=utf-8' })
|
|
274
|
+
response.end(`Internal server error: ${message}`)
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
const main = async () => {
|
|
279
|
+
const startTime = Date.now()
|
|
280
|
+
const { host, port, shouldOpen, quiet } = parseArgs(process.argv.slice(2))
|
|
281
|
+
const logger = createLogger({ quiet })
|
|
282
|
+
const packageVersion = await getPackageVersion()
|
|
283
|
+
|
|
284
|
+
try {
|
|
285
|
+
const rootStat = await stat(docsRoot)
|
|
286
|
+
if (!rootStat.isDirectory()) {
|
|
287
|
+
throw new Error('dist-docs is not a directory')
|
|
288
|
+
}
|
|
289
|
+
} catch (error) {
|
|
290
|
+
if (error instanceof Error) {
|
|
291
|
+
const maybeCode =
|
|
292
|
+
typeof error === 'object' && error && 'code' in error
|
|
293
|
+
? error.code
|
|
294
|
+
: undefined
|
|
295
|
+
if (String(maybeCode ?? '') !== 'ENOENT') {
|
|
296
|
+
logger.warn(`docs root check warning: ${error.message}`)
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
logger.error('dist-docs not found. Please build docs before publish.')
|
|
300
|
+
process.exit(1)
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
const server = createServer(createRequestHandler())
|
|
304
|
+
const sockets = new Set()
|
|
305
|
+
let shuttingDown = false
|
|
306
|
+
|
|
307
|
+
server.on('connection', (socket) => {
|
|
308
|
+
sockets.add(socket)
|
|
309
|
+
socket.on('close', () => {
|
|
310
|
+
sockets.delete(socket)
|
|
311
|
+
})
|
|
312
|
+
})
|
|
313
|
+
|
|
314
|
+
server.on('error', (error) => {
|
|
315
|
+
const message = error instanceof Error ? error.message : String(error)
|
|
316
|
+
logger.error(`failed to start server: ${message}`)
|
|
317
|
+
if (String((error && error.code) ?? '') === 'EADDRINUSE') {
|
|
318
|
+
logger.warn(`port ${port} is already in use. Try "--port ${port + 1}".`)
|
|
319
|
+
}
|
|
320
|
+
process.exit(1)
|
|
321
|
+
})
|
|
322
|
+
|
|
323
|
+
server.listen(port, host, () => {
|
|
324
|
+
const endpoint = `http://${host}:${String(port)}`
|
|
325
|
+
const startupMs = Date.now() - startTime
|
|
326
|
+
if (!quiet) {
|
|
327
|
+
console.log(
|
|
328
|
+
renderBanner({
|
|
329
|
+
version: packageVersion,
|
|
330
|
+
host,
|
|
331
|
+
port,
|
|
332
|
+
startupMs,
|
|
333
|
+
openMode: shouldOpen ? 'enabled' : 'disabled',
|
|
334
|
+
}),
|
|
335
|
+
)
|
|
336
|
+
} else {
|
|
337
|
+
logger.info(`serving dist-docs at ${endpoint}`)
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
if (shouldOpen) {
|
|
341
|
+
openBrowser(endpoint).catch((error) => {
|
|
342
|
+
const message = error instanceof Error ? error.message : String(error)
|
|
343
|
+
logger.warn(`failed to open browser automatically: ${message}`)
|
|
344
|
+
})
|
|
345
|
+
}
|
|
346
|
+
})
|
|
347
|
+
|
|
348
|
+
process.once('SIGINT', () => {
|
|
349
|
+
if (shuttingDown) {
|
|
350
|
+
logger.warn('force exit on repeated interrupt')
|
|
351
|
+
process.exit(130)
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
shuttingDown = true
|
|
355
|
+
logger.info('shutting down...')
|
|
356
|
+
|
|
357
|
+
server.close()
|
|
358
|
+
|
|
359
|
+
for (const socket of sockets) {
|
|
360
|
+
socket.destroy()
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
// Always terminate quickly in CLI usage; do not risk hanging on keep-alive.
|
|
364
|
+
setTimeout(() => {
|
|
365
|
+
process.exit(130)
|
|
366
|
+
}, 80)
|
|
367
|
+
|
|
368
|
+
setTimeout(() => {
|
|
369
|
+
logger.warn('shutdown timeout, forcing exit')
|
|
370
|
+
process.exit(130)
|
|
371
|
+
}, 1500).unref()
|
|
372
|
+
})
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
main().catch((error) => {
|
|
376
|
+
const message = error instanceof Error ? error.message : String(error)
|
|
377
|
+
console.error(`[robot-map-docs] Failed to start: ${message}`)
|
|
378
|
+
process.exit(1)
|
|
379
|
+
})
|
package/dist-docs/404.html
CHANGED
|
@@ -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.
|
|
12
|
+
<script type="module" src="/assets/app.Bg6Ypeoa.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\":\"
|
|
19
|
+
<script>window.__VP_HASH_MAP__=JSON.parse("{\"guide_advanced-usage.md\":\"COVLyRkA\",\"guide_concepts.md\":\"CJ87tk-r\",\"guide_getting-started.md\":\"D2j6CRj3\",\"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-docs-cli-ui-polish-plan.md\":\"B8oZt_5R\",\"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.
|
|
1
|
+
import{R as p}from"./chunks/theme.CKxbjNbw.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};
|