{"_id":"@edwiser/moodle-playground-client","name":"@edwiser/moodle-playground-client","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@edwiser/moodle-playground-client","version":"0.1.0","description":"Embed and control Moodle Playground instances programmatically","type":"module","main":"src/index.js","module":"src/index.js","exports":{".":"./src/index.js"},"keywords":["moodle","playground","wasm","lms","embed"],"license":"MIT","_id":"@edwiser/moodle-playground-client@0.1.0","gitHead":"32983fb0654ee879c9e6c7033272adeec065ade1","_nodeVersion":"23.11.1","_npmVersion":"10.9.2","dist":{"integrity":"sha512-7gTsSL6hwVc+7XOgZ21Yl3EuQi7mqHXtzNtBLitpp3LVWrZwTsw6+s/YgVPRaV6gO06Yxs1H+q+B1zSYdjb7WA==","shasum":"aa85d1e00c7e20384fc28175c64c9a66792edcd6","tarball":"https://registry.npmjs.org/@edwiser/moodle-playground-client/-/moodle-playground-client-0.1.0.tgz","fileCount":3,"unpackedSize":6643,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIGgRdou5tQQKh9kvMiJ5naEGezZp9Ys7BqbP/YJZjLMzAiEAj3+qIVKNwpBiN+ZQw6wi2o2qcAQJ5m6P7lxTRBrvsiw="}]},"_npmUser":{"name":"wisdmlabs","email":"software@wisdmlabs.com"},"directories":{},"maintainers":[{"name":"wisdmlabs","email":"software@wisdmlabs.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/moodle-playground-client_0.1.0_1778167182753_0.9775569255342047"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-07T15:19:42.474Z","0.1.0":"2026-05-07T15:19:42.882Z","modified":"2026-05-07T15:19:43.100Z"},"maintainers":[{"name":"wisdmlabs","email":"software@wisdmlabs.com"}],"description":"Embed and control Moodle Playground instances programmatically","keywords":["moodle","playground","wasm","lms","embed"],"license":"MIT","readme":"# @edwiser/moodle-playground-client\n\nEmbed and programmatically control Moodle Playground instances.\n\n## Usage\n\n```html\n<iframe id=\"playground\" style=\"width:100%;height:600px;border:none\"></iframe>\n<script type=\"module\">\n  import { startMoodlePlayground } from '@edwiser/moodle-playground-client';\n\n  const iframe = document.getElementById('playground');\n  const playground = await startMoodlePlayground(iframe, {\n    moodleVersion: '5.0',\n    phpVersion: '8.3',\n    mode: 'seamless',\n  });\n\n  await playground.isReady();\n  await playground.navigate('/course/view.php?id=2');\n</script>\n```\n\n## API\n\n### `startMoodlePlayground(iframe, options)`\n\n- `remoteUrl` -- URL of the playground remote.html (default: production)\n- `blueprint` -- Blueprint object to apply\n- `moodleVersion` -- Moodle version (default: \"5.0\")\n- `phpVersion` -- PHP version (default: \"8.3\")\n- `mode` -- Display mode (default: \"seamless\")\n- `lazy` -- Defer boot until user interaction (default: false)\n\nReturns a client handle with these methods:\n\n- `isReady()` -- Promise that resolves when the playground is ready\n- `navigate(path)` -- Navigate to a Moodle URL path\n- `runPhp(code)` -- Execute PHP code and return the output\n- `listFiles(dir)` -- List files in a MEMFS directory\n- `readFile(path)` -- Read a file from MEMFS\n- `writeFile(path, data)` -- Write a file to MEMFS\n- `exportSite()` -- Export the playground state as a ZIP\n- `importSite(zipBuffer)` -- Import a ZIP to restore state\n- `destroy()` -- Clean up and disconnect\n","readmeFilename":"README.md","_rev":"1-3b08d596d3e704227601d2bdab005ab8"}