@civitai/blocks-react 0.57.2 → 0.57.4
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 -59
- package/dist/hooks/useBuzzWorkflow.d.ts +4 -1
- package/dist/hooks/useBuzzWorkflow.js +4 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1497,30 +1497,6 @@ does not publish — open an issue rather than reaching into `dist/internal/`.
|
|
|
1497
1497
|
> exists for one caller: a `pnpm dev:live` harness. **It must never appear in a
|
|
1498
1498
|
> test suite.** The free one is `createMockHost`, on `./testing`.
|
|
1499
1499
|
|
|
1500
|
-
### Why it has its own subpath
|
|
1501
|
-
|
|
1502
|
-
Until `0.55.0` this code was exported from `./testing`. The argument for moving
|
|
1503
|
-
it, in full, is that **a client which spends the caller's money should not be
|
|
1504
|
-
reachable through an import path named `testing`** — the import line is the one
|
|
1505
|
-
piece of context that travels with every call site, and `…/testing` actively
|
|
1506
|
-
asserts the opposite of what this module does. That is
|
|
1507
|
-
[#334](https://github.com/civitai/civitai-app-starters/issues/334)'s literal
|
|
1508
|
-
closing condition.
|
|
1509
|
-
|
|
1510
|
-
Two arguments that were made for this change and **do not hold** — recorded so
|
|
1511
|
-
they are not made again:
|
|
1512
|
-
|
|
1513
|
-
- **It does not shrink the install.** Measured: **+4,447 B**. See
|
|
1514
|
-
[What the host-simulation subpaths cost you](#what-the-host-simulation-subpaths-cost-you).
|
|
1515
|
-
- **It does not close a wrong-autocomplete hazard**, because there was none to
|
|
1516
|
-
close. `createMockHost(options: MockHostOptions = {})` is callable bare;
|
|
1517
|
-
`createLiveHost(options: LiveHostOptions)` takes a **required** argument whose
|
|
1518
|
-
`blockToken` is a **required** short-lived RS256 JWT that a human mints and
|
|
1519
|
-
pastes by hand. `createLiveHost()` and `createLiveHost({})` do not compile, so
|
|
1520
|
-
nobody reaches this module by picking the wrong completion. Earlier revisions
|
|
1521
|
-
of this file, of the changeset, and of #334 called the two signatures
|
|
1522
|
-
"near-identical"; none of them had read the signatures.
|
|
1523
|
-
|
|
1524
1500
|
### The whole surface
|
|
1525
1501
|
|
|
1526
1502
|
One value and one type. `test/subpathSurfaces.test.ts` pins the runtime export
|
|
@@ -1553,6 +1529,10 @@ The same terms as `./testing`: a normal subpath of a `0.x` package where a minor
|
|
|
1553
1529
|
may break it, with the runtime symbol set pinned by
|
|
1554
1530
|
`test/subpathSurfaces.test.ts` so it cannot change silently.
|
|
1555
1531
|
|
|
1532
|
+
It moved off `./testing` in `0.55.0`: an import path named `testing` asserts the
|
|
1533
|
+
opposite of what this module does, and the import line is the one piece of context
|
|
1534
|
+
that travels with every call site.
|
|
1535
|
+
|
|
1556
1536
|
🔴 One cost worth stating plainly: publishing and documenting this subpath makes
|
|
1557
1537
|
[#334](https://github.com/civitai/civitai-app-starters/issues/334) **item 3** —
|
|
1558
1538
|
getting the live-host code out of the tarball entirely — *harder*, not easier.
|
|
@@ -1562,42 +1542,14 @@ many on a subpath nobody was told to rely on.
|
|
|
1562
1542
|
|
|
1563
1543
|
## What the host-simulation subpaths cost you
|
|
1564
1544
|
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
```text
|
|
1570
|
-
118,590 dist/internal/mockHost.js ← ./testing (createMockHost)
|
|
1571
|
-
86,688 dist/internal/liveHost.js ← ./live (createLiveHost)
|
|
1572
|
-
29,508 dist/internal/pickerOverlay.js ← ./live (via liveHost)
|
|
1573
|
-
15,351 dist/internal/catalog.js ← ./live (via pickerOverlay)
|
|
1574
|
-
9,141 dist/testing.js
|
|
1575
|
-
4,697 dist/internal/consent.js ← BOTH hosts import it
|
|
1576
|
-
2,815 dist/live.js
|
|
1577
|
-
```
|
|
1578
|
-
|
|
1579
|
-
**They ship in every install**, production dependency trees included. They are
|
|
1580
|
-
tree-shaken out of application *bundles* — no block ships a mock host to a
|
|
1581
|
-
browser — so this is `node_modules` weight, not bundle weight.
|
|
1582
|
-
|
|
1583
|
-
🔴 **Splitting `createLiveHost` onto its own subpath removed none of this — it
|
|
1584
|
-
ADDS 4,447 B of code, and trimming the export list moved nothing either.**
|
|
1585
|
-
Measured with `pnpm pack` on both sides of the split, in a detached worktree so
|
|
1586
|
-
neither pack is contaminated by the other change in this release: **319 → 323
|
|
1587
|
-
entries, 1,590,099 B → 1,597,161 B uncompressed.** The only files that differ are
|
|
1588
|
-
|
|
1589
|
-
```text
|
|
1590
|
-
+6,048 dist/live.* (new: .js 2,815, .d.ts 2,839, + maps)
|
|
1591
|
-
-1,692 dist/testing.* (the re-export and its docblock leaving)
|
|
1592
|
-
+91 package.json (the new exports-map key)
|
|
1593
|
-
+2,615 README.md (this section)
|
|
1594
|
-
```
|
|
1545
|
+
The `dist/` modules reachable only from `./testing` and `./live`, and from nothing
|
|
1546
|
+
under `.` or `./ui`, **ship in every install**, production dependency trees
|
|
1547
|
+
included. They are tree-shaken out of application *bundles* — no block ships a
|
|
1548
|
+
mock host to a browser — so this is `node_modules` weight, not bundle weight.
|
|
1595
1549
|
|
|
1596
|
-
`
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
`exports` map has no bearing whatsoever on tarball contents; it decides only what
|
|
1600
|
-
a consumer can *name*.
|
|
1550
|
+
`files` is `["dist", "README.md"]` and `tsconfig` compiles all of `src/**/*`, so
|
|
1551
|
+
the `exports` map has no bearing whatsoever on tarball contents; it decides only
|
|
1552
|
+
what a consumer can *name*.
|
|
1601
1553
|
**The `/live` split buys safety, not size.** Moving these bytes needs the code
|
|
1602
1554
|
deleted or published as a second artifact; that is
|
|
1603
1555
|
[#334](https://github.com/civitai/civitai-app-starters/issues/334) item 3, and it
|
|
@@ -563,7 +563,10 @@ export interface UseBuzzWorkflow {
|
|
|
563
563
|
* names a server-registered recipe; `WorkflowBodyCustomComfyInline`
|
|
564
564
|
* (`mode: 'inline'`) carries the graph itself, plus its declared AIR
|
|
565
565
|
* `resources` and a `maxBuzz` bound. The inline arm is LIVE in production
|
|
566
|
-
* (
|
|
566
|
+
* (page-tokens-only, and NOT developer-only — this parenthetical said
|
|
567
|
+
* "developer-only", which is false: no `customComfy` arm runs an app-developer
|
|
568
|
+
* check. See `WorkflowBodyCustomComfyInline` for the refusals that DO run) and
|
|
569
|
+
* this comment used to describe `customComfy` as a
|
|
567
570
|
* recipe-only `{ kind, recipe, params }` shape — written when that was true and
|
|
568
571
|
* never revisited once the arm shipped. A developer working against the live
|
|
569
572
|
* feature read the equivalent claim on the type, believed it over their own
|
|
@@ -478,7 +478,10 @@ export class WorkflowSubmitError extends Error {
|
|
|
478
478
|
* names a server-registered recipe; `WorkflowBodyCustomComfyInline`
|
|
479
479
|
* (`mode: 'inline'`) carries the graph itself, plus its declared AIR
|
|
480
480
|
* `resources` and a `maxBuzz` bound. The inline arm is LIVE in production
|
|
481
|
-
* (
|
|
481
|
+
* (page-tokens-only, and NOT developer-only — this parenthetical said
|
|
482
|
+
* "developer-only", which is false: no `customComfy` arm runs an app-developer
|
|
483
|
+
* check. See `WorkflowBodyCustomComfyInline` for the refusals that DO run) and
|
|
484
|
+
* this comment used to describe `customComfy` as a
|
|
482
485
|
* recipe-only `{ kind, recipe, params }` shape — written when that was true and
|
|
483
486
|
* never revisited once the arm shipped. A developer working against the live
|
|
484
487
|
* feature read the equivalent claim on the type, believed it over their own
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@civitai/blocks-react",
|
|
3
|
-
"version": "0.57.
|
|
3
|
+
"version": "0.57.4",
|
|
4
4
|
"description": "React hooks and iframe transport for Civitai Apps. Pairs with @civitai/app-sdk/blocks.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"node": ">=20"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@civitai/
|
|
41
|
-
"@civitai/
|
|
40
|
+
"@civitai/components": "^0.7.1",
|
|
41
|
+
"@civitai/theme": "^0.4.0"
|
|
42
42
|
},
|
|
43
43
|
"comment-peerDependencies": "This floor is DERIVED, not chosen — the lowest published app-sdk that exports every symbol this package imports. Do not edit it without reading ./PEER_FLOOR.md (in-repo, unpublished) and tests/guards/blocks-react-peer-floor.test.mjs.",
|
|
44
44
|
"peerDependencies": {
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"typescript": "^5.9.2",
|
|
59
59
|
"vite": "^8.0.14",
|
|
60
60
|
"vitest": "^4.1.11",
|
|
61
|
-
"@civitai/app-sdk": "^0.51.
|
|
61
|
+
"@civitai/app-sdk": "^0.51.1"
|
|
62
62
|
},
|
|
63
63
|
"publishConfig": {
|
|
64
64
|
"access": "public"
|