@notionhq/custom-blocks-dev-shell 0.1.15 → 0.1.17

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/index.html CHANGED
@@ -4,8 +4,8 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>Workers local shell</title>
7
- <script type="module" crossorigin src="/assets/index-BjlUlu5e.js"></script>
8
- <link rel="stylesheet" crossorigin href="/assets/index-D-pOONlZ.css">
7
+ <script type="module" crossorigin src="/assets/index-DAvvMKe4.js"></script>
8
+ <link rel="stylesheet" crossorigin href="/assets/index-D6k7cuWn.css">
9
9
  </head>
10
10
  <body>
11
11
  <div id="root"></div>
@@ -29,7 +29,6 @@ const TYPE_ALIASES = {
29
29
  */
30
30
  const WORKER_PREFIX = "worker_";
31
31
  export function materializeWorkerSchemaDataSources(manifest, dataDir) {
32
- mkdirSync(dataDir, { recursive: true });
33
32
  // One descriptor per data source key: databases first (source of truth for
34
33
  // anything they back), then inline block schemas for keys no database
35
34
  // provides.
@@ -63,6 +62,12 @@ export function materializeWorkerSchemaDataSources(manifest, dataDir) {
63
62
  });
64
63
  }
65
64
  }
65
+ // A worker with no data sources gets no src/data/ at all — the folder would
66
+ // only suggest the shell expects files there.
67
+ if (descriptors.size === 0) {
68
+ return;
69
+ }
70
+ mkdirSync(dataDir, { recursive: true });
66
71
  for (const [key, descriptor] of descriptors) {
67
72
  // The key is the worker's contract and lands verbatim in the file's
68
73
  // `key`; the filename is ours, so path-hostile characters (`/`, `..`)
package/docs/bindings.md CHANGED
@@ -21,13 +21,12 @@ ambiguous or absent stays unmapped. Re-picking a source resets the slot's
21
21
  mappings and re-runs auto-map. Manual mapping offers only source properties
22
22
  of exactly the required type — no coercion.
23
23
 
24
- ## Initialization & live edits
24
+ ## Initialization & binding edits
25
25
 
26
26
  Once every slot is bound and every property mapped, the block initializes and
27
- renders. From then on, binding edits reach the running block through
28
- `dataSourcesChanged` without reloading it. Crossing between incomplete and
29
- complete bindings restarts the block insteadinitialization is terminal, so
30
- a block that failed to initialize can only recover through a reload.
27
+ renders. Any binding edit restarts the block: the shell recreates the block's
28
+ iframe, and the fresh initialization carries the new bindings. A block that
29
+ failed to initialize recovers the same wayfix its bindings and save.
31
30
 
32
31
  Bindings last for the page load, per block: refresh the shell and every block
33
32
  returns to unbound.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@notionhq/custom-blocks-dev-shell",
3
- "version": "0.1.15",
3
+ "version": "0.1.17",
4
4
  "description": "Local preview shell for Notion custom block workers.",
5
5
  "license": "MIT",
6
6
  "repository": {