@notionhq/custom-blocks-dev-shell 0.3.1 → 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.
@@ -1,7 +1,8 @@
1
1
  # Host contract
2
2
 
3
3
  `createCustomBlockHost(options: CustomBlockHostOptions)` returns a running `CustomBlockHost`.
4
- `CustomBlockHostHandlers` connects that instance to application data and actions.
4
+ `CustomBlockHostHandlers` connects that instance to application data and actions. See
5
+ [Connection compatibility](compatibility.md) for protocol negotiation and version requirements.
5
6
 
6
7
  Your application supplies authorized data and actions. The shared host owns initialization, message
7
8
  validation, protocol compatibility, subscriptions, cancellation, and shutdown. Each host instance
@@ -9,29 +10,33 @@ belongs to one viewer. Stop the host and create a fresh host and iframe to chang
9
10
 
10
11
  ## Options and partial implementations
11
12
 
12
- Required options are `blockId`, `viewerId`, `getCurrentUser`, `theme`, `contrastMode`,
13
- `containingPage`, `parent`, `iframe`, `sandboxUrl`, `manifestSource`, `getPersistedManifest`,
14
- `onStatusChange`, `bindings`, and `handlers`. `blockId` and `viewerId` stay fixed for the instance.
15
- Optional settings are `onLog`, `minBridgeProtocolVersion`, `noConnectTimeoutMs`,
16
- `initialStateTimeoutMs`, and `noInitResultTimeoutMs`.
17
-
18
- The four initial rendering values (`theme`, `contrastMode`, `containingPage`, and `parent`) are
19
- required options that accept `null` while unresolved. Supply each resolved value through `setTheme`,
20
- `setContrastMode`, `setContainingPage`, or `setParent`. Setters accept resolved values only. The
21
- shared host retains the latest values and waits for all four before sending the `init` payload. This
22
- wait counts toward `initialStateTimeoutMs` after connection. Stopping or failing the host cancels
23
- the wait. Unresolved rendering values are never sent to the sandbox.
24
-
25
- For containing-page context, `null` means not loaded yet. `{ type: "unavailable" }` means the viewer
26
- cannot access it. The latter is a resolved value, subject to the existing protocol compatibility
27
- rules. The application observes subsequent context changes and calls the same setters. Creating the
28
- host does not subscribe to application state.
13
+ Required options are `instance`, `getViewer`, `theme`, `contrastMode`, `containingPage`, `parent`,
14
+ `iframe`, `sandboxUrl`, `manifestSource`, `getPersistedManifest`, `onStatusChange`, `bindings`, and
15
+ `handlers`. `instance` and viewer identity stay fixed for the connection. Optional settings for this
16
+ contract are `onLog`, `minBridgeProtocolVersion`, `noConnectTimeoutMs`, `initialStateTimeoutMs`,
17
+ `noInitResultTimeoutMs`, and `noReadyTimeoutMs`.
18
+
19
+ `theme`, `contrastMode`, `containingPage`, and `parent` accept `null` while unresolved. Supply
20
+ resolved values through `setTheme()`, `setContrastMode()`, `setContainingPage()`, and `setParent()`.
21
+ The host retains the latest values. Setup waits for theme and contrast mode, but not parent or
22
+ containing page values. Your application observes changes and calls the setters. Creating the host
23
+ does not subscribe to application state. See
24
+ [Manifest and initial state](lifecycle.md#manifest-and-initial-state) for loading and delivery.
25
+
26
+ For an accessible containing page, supply `displayMode`: `"full_page"`, `"side_peek"`, or
27
+ `"center_peek"`. Call `setContainingPage()` when the mode changes, even if the page ID is unchanged.
28
+ Use `full_page` outside peek presentation. It is also the default when the field is omitted.
29
+ Unavailable pages carry no display metadata.
30
+
31
+ Supply known initial failures through `parentError` and `containingPageError`, or report later
32
+ failures with `setParentError(error)` and `setContainingPageError(error)`. Errors carry `code`,
33
+ `message`, and `isRetryable`. Setup still succeeds. A later value setter clears the error. Use
34
+ unavailable values for resources the host cannot expose. Use errors when loading failed.
29
35
 
30
36
  Every handler is required. `hostHandlerNotImplemented` accepts `getPage`, `createPage`,
31
37
  `updatePage`, `getUser`, `listUsers`, `openPage`, `openExternalUrl`, and `subscribeToQuery`.
32
- Failures from these operations leave initialization and unrelated operations available. The
33
- current-user profile and metadata for declared data sources are needed during initialization.
34
- `resize` has no error result and can do nothing for a fixed-size embed.
38
+ Failures from these operations leave initialization and unrelated operations available. The SDK
39
+ requests the current user profile and source metadata independently after setup acknowledgment.
35
40
 
36
41
  A partial integration supplies an explicit wrapper using `hostHandlerNotImplemented`, which creates
37
42
  a non-retryable `host_handler_not_implemented` error:
@@ -58,8 +63,14 @@ const host = createCustomBlockHost(options)
58
63
  host.stop()
59
64
  ```
60
65
 
61
- `resize` returns no result and sends no result message. The application enforces authorization and
62
- obtains any required approval. Neither manifest declarations nor bindings establish access.
66
+ `resize` returns no result and sends no result message. Its handler can do nothing if the embed has
67
+ a fixed size. The application enforces authorization and obtains any required approval. Neither
68
+ manifest declarations nor bindings establish access.
69
+
70
+ Full user profiles require `name: string | null` and `avatar_url: string | null`. Use `null` when a
71
+ name is unavailable. Empty strings remain empty strings. The `makeBridgeUser` builder accepts an
72
+ omitted name and supplies `null` before validating the full profile. ID-only user references do not
73
+ promise profile fields.
63
74
 
64
75
  ## Handler inputs and results
65
76
 
@@ -74,9 +85,9 @@ Asynchronous providers receive `CustomBlockHostRequestContext` with an `AbortSig
74
85
  sandbox message types and correlation IDs. Named domain arguments such as
75
86
  `CustomBlockHostCreatePageArgs`, `CustomBlockHostUpdatePageArgs`, and `CustomBlockHostOpenPageArgs`
76
87
  contain only operation data. Handlers receive those arguments combined with
77
- `CustomBlockHostRequestContext`; the runtime supplies `signal`. Page operations retain their
78
- existing domain payloads, including parent-dependent insertion rules, properties, and appearance.
79
- Source and page operations use raw IDs. The SDK resolves data source keys before sending requests.
88
+ `CustomBlockHostRequestContext`, which supplies `signal`. Page operations include insertion rules,
89
+ properties, and appearance. Source and page operations use raw IDs. The SDK resolves data source
90
+ keys before sending requests.
80
91
 
81
92
  | Handler | Additional input | Success payload |
82
93
  | ----------------- | ---------------------------------- | --------------------------------------- |
@@ -90,29 +101,30 @@ Source and page operations use raw IDs. The SDK resolves data source keys before
90
101
  | `openExternalUrl` | `url` | None |
91
102
 
92
103
  `openPage` completes the requested action without echoing its input. The shared host includes the
93
- requested page ID in the existing wire response.
104
+ requested page ID in the wire response.
94
105
 
95
- Result-returning handlers return promises of explicit results.
96
- `CustomBlockHostHandler<Args, Payload>` combines domain arguments with
97
- `CustomBlockHostRequestContext` and the shared result type. `subscribeToQuery` and `resize` remain
98
- synchronous.
106
+ Handlers that return results use promises. `CustomBlockHostHandler<Args, Payload>` combines domain
107
+ arguments with `CustomBlockHostRequestContext` and the shared result type. `subscribeToQuery` and
108
+ `resize` remain synchronous.
99
109
 
100
110
  ## Current viewer
101
111
 
102
- `viewerId` is a required, nonempty identity supplied before host construction. The application
103
- handles missing authentication before mounting a host. Anonymous viewers are not modeled by this
104
- contract.
112
+ `getViewer()` runs synchronously once during host creation and returns `CustomBlockHostViewer`:
113
+
114
+ ```ts
115
+ type CustomBlockHostViewer = { type: "user"; userId: string } | { type: "anonymous" }
116
+ ```
105
117
 
106
- `getCurrentUser({ signal })` is a required constructor callback returning a promise of a complete
107
- `BridgeUser` profile directly, without a success envelope or separate field readers. The shared host
108
- validates the profile and rejects initialization if its ID differs from `viewerId`. Rejected reads
109
- and malformed profiles become a generic initialization error; their details are not sent to the
110
- sandbox.
118
+ The callback returns a known identity. The host validates and retains it. Login, logout, and account
119
+ switching require a new host and iframe. The `getViewer` bridge request returns the captured
120
+ identity without loading a profile. Anonymous setup succeeds. The embedding application authorizes
121
+ rendering and each data operation.
111
122
 
112
- Existing protocols require the full profile in `init`, so initialization invokes the callback and
113
- waits for it. The callback may run before `connect` when the selected manifest is already available.
114
- Changing this startup dependency requires a later minimal-init protocol. The host adds no retained
115
- profile cache or new field-grant behavior.
123
+ `handlers.getUser({ userId, signal })` supplies profiles for user reads and eager initialization.
124
+ Current-user reads use the captured viewer ID and verify that the returned profile matches it.
125
+ Anonymous current-user reads return non-retryable `current_user_unavailable` without calling the
126
+ handler. Handler errors are forwarded. A rejected promise, mismatched ID, or malformed profile
127
+ produces `unknown_error`, with details in the host log. The host does not cache profiles.
116
128
 
117
129
  ## Metadata and configuration
118
130
 
@@ -133,22 +145,20 @@ type CustomBlockHostBindings = {
133
145
  }
134
146
  ```
135
147
 
136
- The host validates configuration shape. `pages` accepts page keys and IDs, but the runtime does not
137
- use them to resolve page requests or include them in `init`. The host converts `dataSources` to
138
- bridge bindings for initialization and updates. The shared host reads every declared source and
139
- deduplicates aliases of the same source ID within each read, without executing a row query for its
140
- schema. Initialization and each configuration refresh read metadata independently. The host does not
141
- reuse metadata promises across reads.
148
+ The host validates configuration shape. `pages` maps page keys to IDs, but the runtime does not use
149
+ those mappings to resolve page requests or include them in `init`. A `getDataSource` request reads
150
+ metadata for one source key declared in the manifest and configured in `dataSources`. The host
151
+ validates its property mappings before returning the binding. Metadata reads do not query rows.
142
152
 
143
153
  `CustomBlockHostDataSourceState` is `{ status: "unavailable" }` or
144
154
  `{ status: "available", dataSource: { dataSourceSchema, capabilities } }`. Capabilities contain
145
- `read`, `create`, `update`, and `archive`. These flags describe platform access. The runtime
146
- validates the flags but does not use them to authorize requests or send them to the sandbox.
147
- Handlers enforce viewer permissions on each operation.
155
+ `read`, `create`, `update`, and `archive`. The runtime does not send these flags to the sandbox. An
156
+ available source's metadata remains available even when `capabilities.read` is false. The
157
+ application handler remains responsible for enforcing viewer permissions on every operation.
148
158
 
149
- Missing and unreadable sources both use `{ status: "unavailable" }`. A metadata load keeps its
150
- promise pending until it succeeds or fails. Binding errors return error results. The host converts
151
- an unavailable source to `{ inaccessible: true }` without a schema, pointer, or property mappings.
159
+ Missing sources and denied access both use `{ status: "unavailable" }`. A `getDataSource` request
160
+ for an unavailable source returns `data_source_inaccessible` without source metadata. Invalid
161
+ property mappings return a binding error.
152
162
 
153
163
  ## Queries and cancellation
154
164
 
@@ -156,15 +166,17 @@ an unavailable source to `{ inaccessible: true }` without a schema, pointer, or
156
166
  optional `filter`, `sorts`, and `archive_status`, plus `limit`, `signal`, `onSnapshot`, and
157
167
  `onError`. `archive_status` accepts `"active"`, `"archived"`, or `"all"`. See the
158
168
  [query semantics](../../bridge/protocol.md#data-sources) for archive selection defaults. A
159
- `CustomBlockHostQuerySnapshot` contains `items: BridgePage[]` and `hasMore`. The shared host
160
- validates filters and sorts against the bound schema before starting the observer.
169
+ `CustomBlockHostQuerySnapshot` contains `items: BridgePage[]`, `hasMore`, and optional `limitClamp`.
170
+ The application validates the limit and enforces its cap. The shared host validates filters and
171
+ sorts against the bound schema before starting the observer. See
172
+ [query limits](../../bridge/protocol.md#host-applied-query-limits) for the metadata contract.
161
173
 
162
174
  The signal controls the subscription lifetime, including asynchronous setup. The application checks
163
175
  for an already-aborted signal and cancels pending setup and observers on abort. Replacement,
164
176
  unsubscribe, invalidation, non-retryable errors, and shutdown abort the signal. Retryable errors can
165
- leave the observer active. Callbacks may run synchronously; late callbacks after cancellation are
166
- ignored. There is no returned cleanup function or top-level query-unsubscribed callback. The SDK
167
- returns its own unsubscribe function, which sends the cancellation request to the host.
177
+ leave the observer active. Callbacks may run synchronously. The host ignores late callbacks after
178
+ cancellation. There is no returned cleanup function or top-level query-unsubscribed callback. The
179
+ SDK returns its own unsubscribe function, which sends the cancellation request to the host.
168
180
 
169
181
  `resize({ height })` requests an iframe height in CSS pixels. The application applies the height.
170
182
  The [lifecycle reference](lifecycle.md#callbacks) describes when to size and reveal the iframe.
@@ -172,22 +184,17 @@ The [lifecycle reference](lifecycle.md#callbacks) describes when to size and rev
172
184
  ## Updates
173
185
 
174
186
  `stop()`, `setTheme()`, `setContrastMode()`, `setParent()`, and `setContainingPage()` return `void`.
175
- `setBindings()` and `refreshDataSource()` return promises of `CustomBlockHostHandlerResult`:
176
-
177
- - `setBindings(nextBindings)` reads metadata and validates the candidate before committing it. A
178
- rejected update leaves the accepted configuration, pending operations, and subscriptions active. A
179
- successful update commits the bindings and cancels queries whose bridge bindings changed. Queries
180
- with unchanged bindings keep their observers.
181
- - `refreshDataSource({ dataSourceId })` rereads metadata for all declared sources and validates the
182
- configuration before notifying the sandbox. Queries whose bridge bindings changed are canceled.
183
- Queries with unchanged bindings remain active, including queries for the refreshed source.
184
-
185
- Only the latest configuration refresh can commit. Superseded refreshes are aborted. Before the
186
- manifest is available, `setBindings()` stores the bindings and returns success. Initialization
187
- validates those bindings later. Once the manifest is available, a successful update supplies the
188
- metadata used for initialization, even if the initial metadata read failed while user loading was
189
- pending. Malformed input to `setBindings()` rejects its promise with a schema validation error
190
- rather than returning an error result.
187
+ `setBindings()` and `refreshDataSource()` return promises of `CustomBlockHostHandlerResult`.
188
+
189
+ `setBindings(nextBindings)` validates and stores the configuration without reading metadata.
190
+ `refreshDataSource({ dataSourceId })` requests a metadata refresh. Once the manifest is available,
191
+ both methods clear all cached source metadata, abort pending operations and queries, and notify the
192
+ sandbox with `dataSourcesInvalidated`. Neither method fetches replacement metadata. The next source
193
+ read validates its property mappings.
194
+
195
+ Invalidation affects every source, including unchanged bindings and sources other than the supplied
196
+ `dataSourceId`. Before the manifest is available, both methods return success without invalidation.
197
+ Malformed `setBindings()` input rejects with a schema validation error.
191
198
 
192
199
  A successful configuration change cancels outstanding one-shot host operations, including unrelated
193
200
  reads. A late completion returns non-retryable `host_state_changed`. A dispatched write may already
@@ -1,8 +1,8 @@
1
1
  # Host initialization and lifecycle
2
2
 
3
- The host prepares a block's manifest and context, completes initialization, and manages the
4
- connection until the iframe is removed. This reference covers state preparation, timeouts,
5
- callbacks, live state, and cleanup. Start with the [embed example](../README.md#create-a-host).
3
+ The host prepares setup values and manages the connection until the iframe is removed. The
4
+ [embed example](../README.md#create-a-host) shows how to use the lifecycle callbacks. See
5
+ [Connection compatibility](compatibility.md) for protocol negotiation and version requirements.
6
6
 
7
7
  ## Manifest and initial state
8
8
 
@@ -18,52 +18,61 @@ messages and target outgoing messages. `CustomBlockManifestSource` selects the m
18
18
  `CustomBlockHostHandlerResult` with either `{ status: "success", manifest }` or
19
19
  `{ status: "error", error }`. The manifest follows `manifestSchema` from the protocol subpath. The
20
20
  callback must not resolve to `null` or `undefined`. A definition that is still loading keeps the
21
- promise pending; a failed load returns an error result. The host validates the result and normalizes
22
- the manifest before reading the current user and source metadata. Omitted `dataSources` and each
23
- source's omitted `properties` default to `{}`.
21
+ promise pending. A failed load returns an error result. The host validates the result and normalizes
22
+ the manifest before data reads. Omitted `dataSources` and each source's omitted `properties` default
23
+ to `{}`.
24
24
 
25
25
  The sandbox loads independently and sends `connect`. In sandbox mode, the SDK reads the manifest
26
26
  from JSON metadata injected into the local block HTML by dev tooling. The host validates the
27
- declaration in `connect`. The two sources do not wait for each other; only the selected result
28
- determines initialization. Sandbox mode has no persisted fallback. The
27
+ declaration in `connect`. The host does not wait for the unselected manifest source. Sandbox mode
28
+ does not fall back to the persisted manifest. The
29
29
  [wire reference](../../bridge/protocol.md#initialization) describes the declaration and its
30
30
  validation errors.
31
31
 
32
32
  Supply initial `theme`, `contrastMode`, `containingPage`, and `parent` as required constructor
33
33
  options, using `null` for values that have not loaded yet. Set resolved values with the
34
- corresponding setters. The shared host retains the latest values and waits for all four before
35
- sending `init`. The wait counts toward `initialStateTimeoutMs` after `connect`. A containing-page
36
- value of `{ type: "unavailable" }` means denied access, not loading. Once the selected manifest is
37
- ready, the host reads the current user and source metadata through the handlers. The shared host
38
- assembles and validates the existing init payload. See the [host contract](host-contract.md) for
39
- handler results and cancellation. Host-mode preparation runs concurrently with connection setup.
40
- Sandbox-mode preparation starts after `connect` supplies the declaration. The host sends `init`
41
- after preparation and a valid connection succeed. A preparation failure is retained until the
42
- sandbox connects.
34
+ corresponding setters.
35
+
36
+ Setup waits for the selected manifest, theme, and contrast mode. The host sends the fixed `instance`
37
+ identity, the manifest in `init.manifest`, and appearance values in `init.preferences`.
38
+
39
+ Parent and containing page values do not delay setup. After the sandbox acknowledges setup, the host
40
+ sends any resolved parent and containing page values. The host sends unresolved values when their
41
+ setters supply them, then sends later changes. Setters accept resolved values only. For
42
+ `containingPage`, `{ type: "unavailable" }` means that the containing page is inaccessible. It is
43
+ distinct from `null`, which means that the value has not loaded.
44
+
45
+ Profile and source metadata reads run independently after setup. Their failures do not fail setup or
46
+ unrelated operations. See [Current viewer](host-contract.md#current-viewer) and
47
+ [Metadata and configuration](host-contract.md#metadata-and-configuration) for the provider
48
+ contracts.
43
49
 
44
50
  Errors from the selected manifest source retain their `code`, `message`, and `isRetryable`. A
45
- missing sandbox declaration produces `manifest_unavailable`. A sandbox `manifest_invalid` error is
46
- ignored in host mode because that mode uses the persisted manifest; other connect errors remain
47
- fatal. Unexpected exceptions or invalid results during preparation produce `unknown_error`.
48
- Diagnostics go to `onLog("warn", payload)`. Stopping aborts preparation and suppresses late results
49
- without a cancellation warning.
51
+ missing sandbox declaration produces `manifest_unavailable`. Unexpected exceptions or invalid
52
+ results during preparation produce `unknown_error`. Diagnostics go to `onLog("warn", payload)`.
53
+ Stopping aborts preparation and suppresses late results without a cancellation warning.
50
54
 
51
55
  ## Timeouts
52
56
 
53
- | Option | Waits for | Default | Failure code |
54
- | ----------------------- | ------------------------------------- | --------- | ----------------------- |
55
- | `noConnectTimeoutMs` | `connect` after the first iframe load | 5 seconds | `no_connect` |
56
- | `initialStateTimeoutMs` | State preparation after `connect` | 5 seconds | `initial_state_timeout` |
57
- | `noInitResultTimeoutMs` | `initResult` after `init` | 5 seconds | `no_init_result` |
57
+ | Option | Waits for | Default | Failure code |
58
+ | ----------------------- | ------------------------------------- | ---------- | ----------------------- |
59
+ | `noConnectTimeoutMs` | `connect` after the first iframe load | 5 seconds | `no_connect` |
60
+ | `initialStateTimeoutMs` | State preparation after `connect` | 5 seconds | `initial_state_timeout` |
61
+ | `noInitResultTimeoutMs` | `initResult` after `init` | 5 seconds | `no_init_result` |
62
+ | `noReadyTimeoutMs` | `ready` after successful `initResult` | 60 seconds | `ready_timeout` |
63
+
64
+ `initialStateTimeoutMs` starts when the host accepts `connect`. It includes the remaining wait for
65
+ the selected manifest, theme, and contrast mode. Parent and containing page loading do not count
66
+ toward this timeout.
58
67
 
59
- The SDK waits for `init` without its own timeout. Handshake failures abort preparation and suppress
60
- late results. `getPersistedManifest`, `getCurrentUser`, and `getDataSource` must respect their
61
- `signal`.
68
+ A successful `initResult` permits data operations while the host waits for `ready`. The callbacks
69
+ `getPersistedManifest`, `handlers.getUser`, and `handlers.getDataSource` must respect their
70
+ `signal`. Stopping the host aborts pending work and suppresses late results.
62
71
 
63
72
  ## Live state
64
73
 
65
- `setTheme()`, `setContrastMode()`, `setParent()`, and `setContainingPage()` hold updates during
66
- initialization and send them after `initResult.success`. Use `setBindings()` and
74
+ `setTheme()`, `setContrastMode()`, `setParent()`, and `setContainingPage()` retain the latest value
75
+ during setup and send updates after a successful `initResult`. Use `setBindings()` and
67
76
  `refreshDataSource()` to refresh source configuration. Each host instance belongs to one viewer.
68
77
  Stop it and create a fresh host and iframe when the viewer changes. See
69
78
  [updates](host-contract.md#updates) for their results and cancellation behavior.
@@ -72,40 +81,54 @@ Stop it and create a fresh host and iframe when the viewer changes. See
72
81
 
73
82
  The required `onStatusChange(state)` callback receives the `CustomBlockHostStatus` union:
74
83
 
75
- | Status | Behavior | Payload |
76
- | ---------------------- | -------------------------------------------------------------- | ------------------------------------------------------ |
77
- | `waitingForConnect` | The host is listening; reported synchronously during creation | None |
78
- | `preparingInit` | The host accepted a connection and is preparing initialization | `localManifest`, `sdkVersion`, `bridgeProtocolVersion` |
79
- | `waitingForInitResult` | Successful `init` was sent; acknowledgment is pending | None |
80
- | `initialized` | The sandbox accepted initialization | `resolvedManifest`, optional `initialHeight` |
81
- | `failed` | Initialization or runtime failed | `error` |
82
- | `stopped` | The application explicitly disposed of the host | None |
84
+ | Status | Behavior | Payload |
85
+ | ---------------------- | ------------------------------------------------------------- | ------------------------------------------------ |
86
+ | `waitingForConnect` | The host is listening, reported synchronously during creation | None |
87
+ | `preparingInit` | The host accepted the protocol offer and is preparing setup | `localManifest`, `sdkVersion`, `protocolVersion` |
88
+ | `waitingForInitResult` | The host sent `init` and is waiting for setup acknowledgment | None |
89
+ | `waitingForReady` | Setup succeeded and the host is waiting for the first render | None |
90
+ | `ready` | The sandbox reported that its first render is ready | `resolvedManifest`, optional `initialHeight` |
91
+ | `failed` | Initialization or runtime failed | `error` |
92
+ | `stopped` | The application explicitly disposed of the host | None |
83
93
 
84
94
  `localManifest` is optional and comes only from a permitted local sandbox. It is available before
85
95
  initialization completes, so the application can use its requirements to prepare bindings.
86
96
  `resolvedManifest` is the selected declaration sent in `init`. Rejected connections can skip
87
- intermediate statuses. Both `failed` and `stopped` are terminal; stopping a failed host releases
97
+ intermediate statuses. Both `failed` and `stopped` are terminal. Stopping a failed host releases
88
98
  resources without replacing its failure status.
89
99
 
90
100
  Connection failures contain `{ phase, source, code, message, isRetryable }`. The phase is `connect`,
91
- `init`, `initResult`, or `runtime`. The source identifies who reported the failure. Failures can
92
- occur after initialization succeeds.
101
+ `init`, `initResult`, `ready`, or `runtime`. The source identifies who reported the failure.
102
+ Failures can occur after setup succeeds.
103
+
104
+ During setup, use the failure code and the bridge log to locate the failed exchange.
105
+
106
+ | Code | Meaning |
107
+ | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
108
+ | `invalid_connect_payload` | The host could read the `connect` request ID but could not validate the request. The host sends a failed `connectResult`. |
109
+ | `invalid_init_payload` | The sandbox could read the `init` request ID but could not validate the setup data. The sandbox sends a failed `initResult`. |
110
+
111
+ If the host receives no valid setup acknowledgment before `noInitResultTimeoutMs`, it reports
112
+ `no_init_result`. A malformed acknowledgment leaves that timer running. See the
113
+ [wire reference](../../bridge/protocol.md#validation-and-errors) for message validation and
114
+ request matching.
93
115
 
94
- At `initialized`, apply a supplied `initialHeight` in CSS pixels before revealing the iframe. If the
95
- height is absent, use your application's default size. The `resize` handler applies later height
96
- changes. Reveal, sizing, and failure UI belong to the embedding application.
116
+ At `ready`, apply a supplied `initialHeight` in CSS pixels before revealing the iframe. If the
117
+ height is absent, use your application's default size. Resize messages can arrive after setup
118
+ succeeds. Apply height changes without revealing the iframe until `ready`. Reveal, sizing, and
119
+ failure UI belong to the embedding application.
97
120
 
98
121
  The optional `onLog(direction, payload)` callback receives bridge messages and warnings.
99
122
 
100
123
  ## Iframe lifetime
101
124
 
102
125
  Each host handles one handshake. Create a new host and iframe to retry or replace the block URL. The
103
- [wire reference](../../bridge/protocol.md#initialization) defines handshake and
104
- malformed-message behavior.
126
+ [wire reference](../../bridge/protocol.md#initialization) defines handshake and validation
127
+ errors.
105
128
 
106
129
  The first observed iframe `load` is allowed. A second load stops the host and reports retryable
107
- `iframe_reloaded`. Load-event cleanup does not isolate documents before that event. A replacement
108
- document at the same origin can receive messages and invoke handlers until the host stops.
130
+ `iframe_reloaded`. The host detects navigation at the `load` event. Until that event, a replacement
131
+ document at the same origin can receive messages and invoke handlers.
109
132
 
110
133
  `stop()` removes listeners, cancels preparation, clears timers, ends subscriptions, and suppresses
111
134
  pending responses. Call it when removing the iframe.
@@ -117,6 +140,6 @@ pending responses. Call it when removing the iframe.
117
140
  `hostOrigin` must be nonempty. Pass the embedding page's serialized origin.
118
141
 
119
142
  The protocol helper `isLocalBlockServerUrl(url)` checks the server URL without requiring origin
120
- isolation. The host adds the embedding-origin restriction. `manifestSource: "sandbox"` enforces this
121
- policy before the host starts. An invalid sandbox-mode URL throws `CustomBlockInitializationError`
122
- with code `invalid_local_preview_url`.
143
+ isolation. The host adds the restriction on the embedding origin. `manifestSource: "sandbox"`
144
+ enforces this policy before the host starts. An invalid URL for sandbox mode throws
145
+ `CustomBlockInitializationError` with code `invalid_local_preview_url`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@notionhq/custom-blocks-dev-shell",
3
- "version": "0.3.1",
3
+ "version": "0.4.1",
4
4
  "description": "Local development shell for Notion custom block workers.",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/data/radar.json DELETED
@@ -1,87 +0,0 @@
1
- {
2
- "type": "built-in",
3
- "name": "Radar",
4
- "icon": "📡",
5
- "schema": {
6
- "name": {
7
- "name": "Name",
8
- "type": "title"
9
- },
10
- "speed": {
11
- "name": "Speed",
12
- "type": "number"
13
- },
14
- "quality": {
15
- "name": "Quality",
16
- "type": "number"
17
- },
18
- "focus": {
19
- "name": "Focus",
20
- "type": "number"
21
- },
22
- "collaboration": {
23
- "name": "Collaboration",
24
- "type": "number"
25
- },
26
- "execution": {
27
- "name": "Execution",
28
- "type": "number"
29
- }
30
- },
31
- "rows": [
32
- {
33
- "id": "radar-1",
34
- "name": "Engineering",
35
- "speed": 82,
36
- "quality": 91,
37
- "focus": 74,
38
- "collaboration": 68,
39
- "execution": 88
40
- },
41
- {
42
- "id": "radar-2",
43
- "name": "Design",
44
- "speed": 70,
45
- "quality": 95,
46
- "focus": 85,
47
- "collaboration": 80,
48
- "execution": 76
49
- },
50
- {
51
- "id": "radar-3",
52
- "name": "Product",
53
- "speed": 78,
54
- "quality": 72,
55
- "focus": 66,
56
- "collaboration": 90,
57
- "execution": 81
58
- },
59
- {
60
- "id": "radar-4",
61
- "name": "Research",
62
- "speed": 60,
63
- "quality": 88,
64
- "focus": 92,
65
- "collaboration": 64,
66
- "execution": 70
67
- },
68
- {
69
- "id": "radar-5",
70
- "name": "Marketing",
71
- "speed": 85,
72
- "quality": 69,
73
- "focus": 58,
74
- "collaboration": 83,
75
- "execution": 79
76
- },
77
- {
78
- "id": "radar-6",
79
- "name": "Operations",
80
- "speed": 73,
81
- "quality": 77,
82
- "focus": 80,
83
- "collaboration": 75,
84
- "execution": 84
85
- }
86
- ]
87
- }
@@ -1,2 +0,0 @@
1
- /*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
2
- @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}@layer theme{:root,:host{--font-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-black:#000;--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-ink:#32302c;--color-ink-muted:#6b6b68;--color-ink-faint:#9b9a97;--color-ink-fainter:#b3b3b0;--color-nav-ink:#2c2c2b;--color-paper:#fbfbfa;--color-hairline:#e6e5e3;--color-ui-hover:#3b14000d;--color-panel:#42230308;--color-canvas:#fff;--color-pill:#0000000d;--color-pill-dark:#ffffff0e;--color-dark-ink:#ffffffcf;--color-dark-ink-muted:#ffffff75;--color-sidebar:#f7f7f5;--color-sidebar-active:#00000008;--color-sidebar-ink:#5f5e59;--color-sidebar-ink-strong:#1d1b16;--color-sidebar-ink-muted:#7d7a75;--color-hairline-soft:#f0efed;--color-toggle:#e9e9e7;--color-accent:#2383e2;--color-match:#dcf3e3;--color-match-ink:#1f6d3d;--color-mismatch:#fbe4e4;--color-mismatch-ink:#a33}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}:root{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}body{background:var(--color-paper);color:var(--color-ink);margin:0}[data-theme=dark]{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--color-ink:#ffffffcf;--color-ink-muted:#ffffff94;--color-ink-faint:#ffffff6b;--color-ink-fainter:#ffffff52;--color-nav-ink:#ffffffcf;--color-paper:#202020;--color-hairline:#3a3a3a;--color-ui-hover:#ffffff14;--color-panel:#ffffff0e;--color-canvas:#191919;--color-pill:#ffffff14;--color-sidebar:#191919;--color-sidebar-active:#ffffff14;--color-sidebar-ink:#ffffffb8;--color-sidebar-ink-strong:#ffffffe6;--color-sidebar-ink-muted:#ffffff80;--color-hairline-soft:#2b2b2b;--color-hover:#2a2a2a;--color-toggle:#303030;--color-tooltip:#f7f7f5;--color-match:#46b47838;--color-match-ink:#7bd59d;--color-mismatch:#dc505033;--color-mismatch-ink:#f08b8b}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:0}.top-0{top:0}.top-1\/2{top:50%}.top-full{top:100%}.right-0{right:0}.right-1\.5{right:calc(var(--spacing) * 1.5)}.bottom-full{bottom:100%}.left-0{left:0}.isolate{isolation:isolate}.z-10{z-index:10}.z-50{z-index:50}.row-1{grid-row:1}.row-2{grid-row:2}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.m-0{margin:0}.m-6{margin:calc(var(--spacing) * 6)}.mx-auto{margin-inline:auto}.mt-1{margin-top:var(--spacing)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mb-1{margin-bottom:var(--spacing)}.ml-auto{margin-left:auto}.block{display:block}.contents{display:contents}.flex{display:flex}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.table{display:table}.size-5{width:calc(var(--spacing) * 5);height:calc(var(--spacing) * 5)}.size-6{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.size-7{width:calc(var(--spacing) * 7);height:calc(var(--spacing) * 7)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-9{height:calc(var(--spacing) * 9)}.h-100{height:calc(var(--spacing) * 100)}.h-\[30px\]{height:30px}.h-\[38px\]{height:38px}.h-full{height:100%}.h-screen{height:100vh}.max-h-32{max-height:calc(var(--spacing) * 32)}.max-h-64{max-height:calc(var(--spacing) * 64)}.max-h-\[85vh\]{max-height:85vh}.max-h-full{max-height:100%}.max-h-none{max-height:none}.min-h-0{min-height:0}.w-70{width:calc(var(--spacing) * 70)}.w-\[172px\]{width:172px}.w-full{width:100%}.max-w-120{max-width:calc(var(--spacing) * 120)}.max-w-160{max-width:calc(var(--spacing) * 160)}.max-w-190{max-width:calc(var(--spacing) * 190)}.max-w-\[560px\]{max-width:560px}.max-w-\[720px\]{max-width:720px}.max-w-\[960px\]{max-width:960px}.max-w-full{max-width:100%}.max-w-none{max-width:none}.min-w-0{min-width:0}.min-w-40{min-width:calc(var(--spacing) * 40)}.flex-1{flex:1}.flex-none{flex:none}.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.-translate-y-1\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.cursor-pointer{cursor:pointer}.resize{resize:both}.list-disc{list-style-type:disc}.appearance-none{appearance:none}.flex-col{flex-direction:column}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-px{gap:1px}.self-start{align-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-\[6px\]{border-radius:6px}.rounded-\[10px\]{border-radius:10px}.rounded-\[12px\]{border-radius:12px}.rounded-full{border-radius:2147483647px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-hairline{border-color:var(--color-hairline)}.border-hairline-soft{border-color:var(--color-hairline-soft)}.border-mismatch{border-color:var(--color-mismatch)}.bg-accent{background-color:var(--color-accent)}.bg-black\/40{background-color:#0006}@supports (color:color-mix(in lab, red, red)){.bg-black\/40{background-color:color-mix(in oklab, var(--color-black) 40%, transparent)}}.bg-canvas{background-color:var(--color-canvas)}.bg-match{background-color:var(--color-match)}.bg-panel{background-color:var(--color-panel)}.bg-paper{background-color:var(--color-paper)}.bg-pill{background-color:var(--color-pill)}.bg-pill-dark{background-color:var(--color-pill-dark)}.bg-sidebar{background-color:var(--color-sidebar)}.bg-sidebar-active{background-color:var(--color-sidebar-active)}.bg-transparent{background-color:#0000}.bg-ui-hover{background-color:var(--color-ui-hover)}.p-1{padding:var(--spacing)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-6{padding-inline:calc(var(--spacing) * 6)}.px-10{padding-inline:calc(var(--spacing) * 10)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-10{padding-block:calc(var(--spacing) * 10)}.pt-10{padding-top:calc(var(--spacing) * 10)}.pt-24{padding-top:calc(var(--spacing) * 24)}.pr-1{padding-right:var(--spacing)}.pr-1\.5{padding-right:calc(var(--spacing) * 1.5)}.pr-6{padding-right:calc(var(--spacing) * 6)}.pb-1{padding-bottom:var(--spacing)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-6{padding-bottom:calc(var(--spacing) * 6)}.pl-0\.5{padding-left:calc(var(--spacing) * .5)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-5{padding-left:calc(var(--spacing) * 5)}.text-center{text-align:center}.text-left{text-align:left}.align-top{vertical-align:top}.font-mono{font-family:var(--font-mono)}.text-body{letter-spacing:-.154px;font-size:14px;line-height:20px}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-caption{font-size:12px;line-height:16px}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[11px\]{font-size:11px}.text-\[13px\]{font-size:13px}.text-\[17px\]{font-size:17px}.text-\[32px\]{font-size:32px}.text-\[40px\]{font-size:40px}.leading-4{--tw-leading:calc(var(--spacing) * 4);line-height:calc(var(--spacing) * 4)}.leading-10{--tw-leading:calc(var(--spacing) * 10);line-height:calc(var(--spacing) * 10)}.leading-\[1\.2\]{--tw-leading:1.2;line-height:1.2}.leading-\[20px\]{--tw-leading:20px;line-height:20px}.leading-\[22px\]{--tw-leading:22px;line-height:22px}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\[-0\.442px\]{--tw-tracking:-.442px;letter-spacing:-.442px}.tracking-\[-1\.55px\]{--tw-tracking:-1.55px;letter-spacing:-1.55px}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-dark-ink{color:var(--color-dark-ink)}.text-dark-ink-muted{color:var(--color-dark-ink-muted)}.text-ink{color:var(--color-ink)}.text-ink-faint{color:var(--color-ink-faint)}.text-ink-fainter{color:var(--color-ink-fainter)}.text-ink-muted{color:var(--color-ink-muted)}.text-match-ink{color:var(--color-match-ink)}.text-mismatch-ink{color:var(--color-mismatch-ink)}.text-nav-ink{color:var(--color-nav-ink)}.text-sidebar-ink{color:var(--color-sidebar-ink)}.text-sidebar-ink-muted{color:var(--color-sidebar-ink-muted)}.text-sidebar-ink-strong{color:var(--color-sidebar-ink-strong)}.text-white{color:var(--color-white)}.lowercase{text-transform:lowercase}.opacity-0{opacity:0}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[0_4px_12px_rgb\(0_0_0\/10\%\)\]{--tw-shadow:0 4px 12px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[0_12px_40px_rgb\(0_0_0\/25\%\)\]{--tw-shadow:0 12px 40px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.select-all{-webkit-user-select:all;user-select:all}.select-text{-webkit-user-select:text;user-select:text}@media (hover:hover){.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}}.backdrop\:bg-black\/40::backdrop{background-color:#0006}@supports (color:color-mix(in lab, red, red)){.backdrop\:bg-black\/40::backdrop{background-color:color-mix(in oklab, var(--color-black) 40%, transparent)}}.last\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.open\:flex:is([open],:popover-open,:open){display:flex}@media (hover:hover){.hover\:bg-sidebar-active:hover{background-color:var(--color-sidebar-active)}.hover\:bg-ui-hover:hover{background-color:var(--color-ui-hover)}.hover\:opacity-90:hover{opacity:.9}}.focus-visible\:opacity-100:focus-visible{opacity:1}.disabled\:cursor-default:disabled{cursor:default}.disabled\:bg-toggle:disabled{background-color:var(--color-toggle)}.disabled\:text-ink-faint:disabled{color:var(--color-ink-faint)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}