@notionhq/custom-blocks-dev-shell 0.4.0 → 0.4.1
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 +11 -10
- package/dist/assets/{index-B4LAgGzW.css → index-CohEBjwO.css} +1 -1
- package/dist/assets/index-G-f2Po2-.js +12 -0
- package/dist/index.html +2 -2
- package/dist-cli/cli/published-cli.js +408 -360
- package/docs/bindings.md +8 -7
- package/docs/bridge/changelog.md +18 -10
- package/docs/bridge/protocol.md +26 -6
- package/docs/host/README.md +10 -12
- package/docs/host/docs/compatibility.md +13 -1
- package/docs/host/docs/handlers.md +9 -0
- package/docs/host/docs/host-contract.md +20 -13
- package/docs/host/docs/lifecycle.md +14 -2
- package/package.json +1 -1
- package/dist/assets/index-CjUu48lJ.js +0 -12
package/README.md
CHANGED
|
@@ -132,7 +132,8 @@ Block responses enforce a production-like content security policy (CSP) and send
|
|
|
132
132
|
- **Blocked features:** Native form submission, browser workers, `<object>`, `<embed>`, web app
|
|
133
133
|
manifests, and `<base>`.
|
|
134
134
|
- **Scripts and styles:** Bundled scripts, inline scripts, and inline styles work. Scripts loaded
|
|
135
|
-
from a CDN at runtime are blocked.
|
|
135
|
+
from a CDN at runtime are blocked. WebAssembly compilation is allowed; JavaScript string
|
|
136
|
+
evaluation remains blocked.
|
|
136
137
|
- **Media and fonts:** Notion-hosted media and Google Fonts use the same exceptions as production.
|
|
137
138
|
- **External access:** Network requests and nested frames may use any origin for now. Browser CORS
|
|
138
139
|
checks still apply.
|
|
@@ -159,13 +160,13 @@ Block responses enforce a production-like content security policy (CSP) and send
|
|
|
159
160
|
|
|
160
161
|
### Reload behavior
|
|
161
162
|
|
|
162
|
-
| Change
|
|
163
|
-
|
|
|
164
|
-
| Block code or styles
|
|
165
|
-
| Retry or changes to
|
|
166
|
-
| Loaded sample filenames, schemas, or rows
|
|
167
|
-
| Browser refresh
|
|
168
|
-
| Worker declarations, including data source definitions
|
|
163
|
+
| Change | What happens |
|
|
164
|
+
| -------------------------------------------------------------------- | --------------------------------------------------------------------- |
|
|
165
|
+
| Block code or styles | Vite applies hot updates. |
|
|
166
|
+
| Retry or changes to the block, data source bindings, or display mode | The preview restarts. Page records stay in memory. |
|
|
167
|
+
| Loaded sample filenames, schemas, or rows | All page records reset to the sample files, and the preview restarts. |
|
|
168
|
+
| Browser refresh | All page records reset to the sample files. |
|
|
169
|
+
| Worker declarations, including data source definitions | Restart the dev shell to rebuild the manifest. |
|
|
169
170
|
|
|
170
171
|
See [live updates and local writes](docs/data-sources.md#live-updates-and-local-writes) for sample
|
|
171
172
|
changes and error recovery.
|
|
@@ -173,8 +174,8 @@ changes and error recovery.
|
|
|
173
174
|
### Sample users
|
|
174
175
|
|
|
175
176
|
The dev shell provides a fixed set of sample users, with Ada Lovelace as the current user.
|
|
176
|
-
`
|
|
177
|
-
reloads and changes to sample data files preserve these user identities.
|
|
177
|
+
`getViewer()` identifies the viewer. `NotionUser` field reads and `listUsers()` use the same
|
|
178
|
+
profiles. Block reloads and changes to sample data files preserve these user identities.
|
|
178
179
|
|
|
179
180
|
The built-in People data source contains directory pages that reference sample users. Adding,
|
|
180
181
|
editing, or deleting a worker's People file does not change the sample users.
|