UNPKG

@codesandbox/sandpack-client

Version:

<img style="width:100%" src="https://user-images.githubusercontent.com/4838076/143581035-ebee5ba2-9cb1-4fe8-a05b-2f44bd69bb4b.gif" alt="Component toolkit for live running code editing experiences" />

42 lines (38 loc) 1.3 kB
'use strict'; var dequal = require('dequal'); var SandpackClient = /** @class */ (function () { function SandpackClient(iframeSelector, sandboxSetup, options) { if (options === void 0) { options = {}; } this.status = "idle"; this.options = options; this.sandboxSetup = sandboxSetup; this.iframeSelector = iframeSelector; } /** * Clients handles */ SandpackClient.prototype.updateOptions = function (options) { if (!dequal.dequal(this.options, options)) { this.options = options; this.updateSandbox(); } }; SandpackClient.prototype.updateSandbox = function (_sandboxSetup, _isInitializationCompile) { if (_sandboxSetup === void 0) { _sandboxSetup = this.sandboxSetup; } throw Error("Method not implemented"); }; SandpackClient.prototype.destroy = function () { throw Error("Method not implemented"); }; /** * Bundler communication */ SandpackClient.prototype.dispatch = function (_message) { throw Error("Method not implemented"); }; SandpackClient.prototype.listen = function (_listener) { throw Error("Method not implemented"); }; return SandpackClient; }()); exports.SandpackClient = SandpackClient;