@tlockney/cdp-kernel 0.8.0 → 0.10.0
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/README.md +4 -2
- package/dist/browser/kernel.js +592 -426
- package/dist/browser/kernel.js.map +3 -3
- package/dist/browser/target.d.ts +7 -0
- package/dist/browser/target.js +2 -1
- package/dist/browser/worker.js +224 -6
- package/dist/browser/worker.js.map +4 -4
- package/dist/celld-target.d.ts +2 -1
- package/dist/celld-target.js +5 -3
- package/dist/globals.d.ts +35 -4
- package/dist/kernel-core.js +11 -0
- package/dist/package.d.ts +3 -3
- package/dist/package.js +3 -2
- package/dist/transform.d.ts +10 -1
- package/dist/transform.js +20 -2
- package/dist/workerd-target.js +6 -2
- package/dist/workers-project.js +1 -1
- package/package.json +3 -3
- package/runtime/bootstrap.mjs +2 -0
- package/runtime/browser-worker.mjs +5 -1
- package/runtime/comm.d.mts +87 -1
- package/runtime/display.d.mts +315 -6
- package/runtime/display.mjs +63 -0
- package/runtime/host.d.mts +246 -0
- package/runtime/host.mjs +215 -0
- package/runtime/widget.d.mts +205 -6
- package/runtime/workerd-worker.mjs +5 -1
|
@@ -101,7 +101,10 @@ const jupyter = createJupyter({
|
|
|
101
101
|
// A request can't block for an answer, so prompt() and confirm() behave
|
|
102
102
|
// as when the frontend has no stdin.
|
|
103
103
|
input: () => null,
|
|
104
|
+
// jupyter.params (#456): the CDPK_PARAMS binding, set when install() runs.
|
|
105
|
+
params: () => paramsText,
|
|
104
106
|
});
|
|
107
|
+
let paramsText;
|
|
105
108
|
|
|
106
109
|
// --- Modules ----------------------------------------------------------------
|
|
107
110
|
const modules = new Map();
|
|
@@ -131,6 +134,7 @@ let handle = null;
|
|
|
131
134
|
|
|
132
135
|
function install(env) {
|
|
133
136
|
const meta = JSON.parse(env.META);
|
|
137
|
+
paramsText = typeof env.CDPK_PARAMS === "string" ? env.CDPK_PARAMS : undefined;
|
|
134
138
|
globalThis.__cdpk = {
|
|
135
139
|
import: cellImport,
|
|
136
140
|
meta: { ...meta, resolve: (specifier) => new URL(specifier, meta.url).href },
|
|
@@ -164,7 +168,7 @@ function install(env) {
|
|
|
164
168
|
globalThis.confirm = jupyter.confirm;
|
|
165
169
|
// A cell has no fetch(request, env), so the Worker's bindings (#26) are a
|
|
166
170
|
// global, without the kernel's own.
|
|
167
|
-
const { UNSAFE, TOKEN, META, ...bindings } = env;
|
|
171
|
+
const { UNSAFE, TOKEN, META, CDPK_PARAMS, ...bindings } = env;
|
|
168
172
|
globalThis.env = bindings;
|
|
169
173
|
// workerd forbids eval without its UnsafeEval binding; celld (#25) allows
|
|
170
174
|
// a plain global eval and has no such binding.
|