@observablehq/notebook-kit 1.6.0 → 1.6.2

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/dist/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/observablehq/notebook-kit.git"
7
7
  },
8
- "version": "1.6.0",
8
+ "version": "1.6.2",
9
9
  "type": "module",
10
10
  "scripts": {
11
11
  "test": "vitest",
@@ -10,7 +10,7 @@ export * from "./stdlib/index.js";
10
10
  export type * from "./stdlib/databaseClient.js";
11
11
  export { DatabaseClient } from "./stdlib/databaseClient.js";
12
12
  export type * from "./stdlib/fileAttachment.js";
13
- export { FileAttachment, registerFile } from "./stdlib/fileAttachment.js";
13
+ export { FileAttachment, requireFileRegistration, registerFile } from "./stdlib/fileAttachment.js";
14
14
  export type * from "./stdlib/interpreter.js";
15
15
  export { Interpreter } from "./stdlib/interpreter.js";
16
16
  export declare class NotebookRuntime {
@@ -6,7 +6,7 @@ export * from "./display.js";
6
6
  export * from "./inspect.js";
7
7
  export * from "./stdlib/index.js";
8
8
  export { DatabaseClient } from "./stdlib/databaseClient.js";
9
- export { FileAttachment, registerFile } from "./stdlib/fileAttachment.js";
9
+ export { FileAttachment, requireFileRegistration, registerFile } from "./stdlib/fileAttachment.js";
10
10
  export { Interpreter } from "./stdlib/interpreter.js";
11
11
  export class NotebookRuntime {
12
12
  constructor(builtins = library) {
@@ -18,7 +18,7 @@ export const FileAttachment = (name, base = document.baseURI) => {
18
18
  export function requireFileRegistration(value) {
19
19
  strict = value;
20
20
  }
21
- export function registerFile(name, info, base = location.href) {
21
+ export function registerFile(name, info, base = document.baseURI) {
22
22
  const href = new URL(name, base).href;
23
23
  if (info == null) {
24
24
  files.delete(href);
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/observablehq/notebook-kit.git"
7
7
  },
8
- "version": "1.6.0",
8
+ "version": "1.6.2",
9
9
  "type": "module",
10
10
  "scripts": {
11
11
  "test": "vitest",