@civitai/app-sdk 0.24.0 → 0.24.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 +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -97,7 +97,7 @@ interface BlockInitPayload {
|
|
|
97
97
|
| Export | What |
|
|
98
98
|
|---|---|
|
|
99
99
|
| `defineBlock({ manifest })` | Validates a `BlockManifestV1` (subset of the server checks) and returns it. Call at module scope so authoring mistakes throw before mount. Throws `BlockManifestError` (has a `.field` dot-path). |
|
|
100
|
-
| `BLOCK_SCOPES` / `BLOCK_SCOPE_PATTERN` | The
|
|
100
|
+
| `BLOCK_SCOPES` / `BLOCK_SCOPE_PATTERN` | The 15 known block scope strings (the authoritative enum `defineBlock` validates against) + the `domain:verb:target` format-helper regex. A scope is valid only if it's a member of `BLOCK_SCOPES`, matching the [canonical schema](https://civitai.com/schemas/app-block/v1.json). |
|
|
101
101
|
| `isMessage(data, type)` | Discriminator-only message narrowing (see above). |
|
|
102
102
|
| types | `BlockManifestV1`, `ManifestSettings` (+ field types), `BlockContext`, `ModelSlotContext`, `BlockCheckpointInfo`, `ShowcaseImage`, `BlockToken`, `WrappedToken`, `BlockSettings`, `ViewerInfo`, `Theme`, `WorkflowBody`, `BlockTextToImageParams`, `BlockWorkflowSnapshot`, `WorkflowStatus`, `BlockInitPayload`, `ParentToBlockMessage`, `BlockToParentMessage`. |
|
|
103
103
|
|
|
@@ -113,7 +113,7 @@ Mirrors a strict subset of the civitai/civitai server gate. It throws on:
|
|
|
113
113
|
the blockId becomes `<blockId>.civit.ai`; `version` not semver; `name` > 80 chars.
|
|
114
114
|
- `type` not `block` | `embed`; `contentRating` not `g|pg|pg13|r|x`.
|
|
115
115
|
- **Empty `scopes`** (must be a non-empty array) or any scope that isn't one of
|
|
116
|
-
the
|
|
116
|
+
the 15 known block scopes (`BLOCK_SCOPES`). The [canonical schema](https://civitai.com/schemas/app-block/v1.json)
|
|
117
117
|
validates `scopes` by **enum membership**, so a well-formed but unknown scope
|
|
118
118
|
(e.g. `models:read:all`) is rejected; PascalCase like `ModelsReadSelf` gets a
|
|
119
119
|
pointed error.
|
package/package.json
CHANGED