@civitai/blocks-react 0.56.0 → 0.56.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.
Files changed (2) hide show
  1. package/README.md +2 -2
  2. package/package.json +4 -147
package/README.md CHANGED
@@ -1586,8 +1586,8 @@ Runnable, minimal blocks — one per feature, each with its own README:
1586
1586
 
1587
1587
  | `@civitai/blocks-react` | pairs with `@civitai/app-sdk` | adds |
1588
1588
  |---|---|---|
1589
- | `0.50.x` | `^0.40.0` | `useCreatePostFromApp()` (`CREATE_POST_FROM_APP`) + the `posts:write:self` scope. 🔴 Same wide `peerDependencies` floor as the row below, so **npm will not warn you**: pairing this with an SDK below `0.40.0` fails at `tsc` with `Cannot find name 'BlockCreatePostHostError'`, not at install. |
1590
- | `0.48.x` | `^0.38.0` | `useCollectionFollow()` + `<FollowButton>` / `<TipButton>` (`SET_COLLECTION_FOLLOW`). 🔴 The `peerDependencies` floor stays the deliberately-wide `>=0.29.0 <1.0.0` (#206 — a per-minor floor forced a major on consumers), so **npm will not warn you**: pairing this with an SDK below `0.38.0` fails at `tsc` with `Cannot find name 'BlockCollectionFollowErrorCode'`, not at install. |
1589
+ | `0.50.x` | `^0.40.0` | `useCreatePostFromApp()` (`CREATE_POST_FROM_APP`) + the `posts:write:self` scope. Pairing `0.50.x` with an SDK below `0.40.0` fails at `tsc` with `Cannot find name 'BlockCreatePostHostError'`, not at install. |
1590
+ | `0.48.x` | `^0.38.0` | `useCollectionFollow()` + `<FollowButton>` / `<TipButton>` (`SET_COLLECTION_FOLLOW`). Pairing `0.48.x` with an SDK below `0.38.0` fails at `tsc` with `Cannot find name 'BlockCollectionFollowErrorCode'`, not at install — the floor those releases declared was deliberately wide (#206 — a per-minor floor forced a major on consumers). |
1591
1591
  | `0.36.x` | `^0.27.0` | auto-installs the SDK's opaque-origin web-storage shim (`@civitai/app-sdk/safe-storage`) on import |
1592
1592
  | `0.29.x` | `^0.24.0` | `useAppWorkflows()` — app generator subqueue read + cancel (`QUERY_APP_WORKFLOWS` / `CANCEL_APP_WORKFLOW`) |
1593
1593
  | `0.27.x`–`0.28.x` | `^0.23.0` | async-scan image upload; transport validators for all `SHARED_*` / `APP_STORAGE_*` / picker replies |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@civitai/blocks-react",
3
- "version": "0.56.0",
3
+ "version": "0.56.1",
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",
@@ -35,153 +35,10 @@
35
35
  "node": ">=20"
36
36
  },
37
37
  "dependencies": {
38
- "@civitai/components": "0.4.2",
39
- "@civitai/theme": "0.3.1"
38
+ "@civitai/theme": "0.3.1",
39
+ "@civitai/components": "0.4.2"
40
40
  },
41
- "comment-peerDependencies": [
42
- "The @civitai/app-sdk floor is DERIVED, not chosen: it is the lowest published",
43
- "version that exports every symbol this package imports from the peer.",
44
- "",
45
- "🔴 RAISED 0.47.0 -> 0.49.0 (THE FOURTH TIME: #309, #317, #344, then this) when",
46
- "`internal/mockHost.ts` began importing four NEW peer VALUE symbols --",
47
- "`APP_STORAGE_ERROR_VALUE_TOO_LARGE`, `APP_STORAGE_ERROR_USER_QUOTA_EXCEEDED`,",
48
- "`APP_STORAGE_ERROR_USER_ROW_LIMIT` and `APP_STORAGE_ERROR_REQUEST_FAILED`, the",
49
- "host's own storage-rejection messages, which it now emits instead of the invented",
50
- "`PAYLOAD_TOO_LARGE` / `STORAGE_UNAVAILABLE` (#343). All four ship for the first",
51
- "time in the app-sdk minor released alongside this change.",
52
- "",
53
- "HOW 0.49.0 WAS DERIVED (computed, not predicted from release ordering) -- the same",
54
- "three steps as 0.47.0 below, RE-RUN after this branch was rebased onto 8971ba3",
55
- "(`chore(release): version packages (#365)`), because a rebase invalidates the base:",
56
- " - in-tree `packages/civitai-app-sdk/package.json` is 0.48.0, and 0.48.0 is also",
57
- " `npm view @civitai/app-sdk version` -- nothing is mid-flight. #365 bumped only",
58
- " @civitai/blocks-react (0.55.0 -> 0.55.1) and @civitai/components; app-sdk did",
59
- " not move.",
60
- " - `git ls-tree -r origin/main .changeset/` shows main carries NO pending",
61
- " changesets at all -- #365 consumed every one -- so this branch's changeset is",
62
- " the only input to the next release plan.",
63
- " - `pnpm exec changeset status --verbose` on this branch prints",
64
- " `@civitai/app-sdk 0.49.0` (and `@civitai/blocks-react 0.56.0`).",
65
- "There is no published tarball to probe for these four: they do not exist on npm",
66
- "yet. That is the same position #344 was in, and the same derivation is used.",
67
- "",
68
- "🔴 SO 0.49.0 IS A PREDICTION, AND IT IS PINNED AS ONE. The four symbols are",
69
- "declared in `PEER_SYMBOLS_PREDICTED_BY_THIS_BRANCH` in",
70
- "`tests/guards/blocks-react-peer-floor.test.mjs`; its `PREDICTED ENTRY` test",
71
- "re-derives the version from the tree on every run and requires BOTH that the",
72
- "ledger entries name it and that this floor equals it exactly. If another app-sdk",
73
- "minor publishes first, the computed version becomes 0.50.0 and that test goes RED",
74
- "-- where every other assertion in the file stays green on the stale number, which",
75
- "is #344's shape for a fourth time. Delete the four from that list and re-measure",
76
- "against the real tarball once this release has actually published.",
77
- "",
78
- "⚠️ `changeset status` now logs `Package \"@civitai/blocks-react\" must depend on the",
79
- "current version of \"@civitai/app-sdk\": \"0.48.0\" vs \">=0.49.0 <1.0.0\"`. That is",
80
- "EXPECTED and not a failure (rc=0, and the release plan still prints): the floor",
81
- "names the version this PR's own changeset publishes, which by construction does not",
82
- "exist yet. #344 raised the floor to 0.47.0 from an in-tree 0.46.0 in exactly the",
83
- "same way, logged the same line, and published. No CI job runs `changeset status`",
84
- "-- tracked as #367, and the guard above is the tree-local mitigation, not a fix.",
85
- "",
86
- "🔴 RAISED 0.45.0 -> 0.47.0 (THE THIRD TIME THIS CLASS HAS BITTEN: #309, then",
87
- "#317 caught it in review, then this) when `internal/mockHost.ts` began importing",
88
- "three NEW peer VALUE symbols -- `APP_STORAGE_MAX_BYTES`, `APP_STORAGE_MAX_ROWS`",
89
- "and `APP_STORAGE_MAX_VALUE_BYTES`, the App Storage ceilings, which it assigns to",
90
- "its mock storage defaults. All three ship for the first time in the app-sdk minor",
91
- "released alongside this change.",
92
- "",
93
- "HOW 0.47.0 WAS DERIVED (computed, not predicted from release ordering):",
94
- " - in-tree `packages/civitai-app-sdk/package.json` is 0.46.0, and 0.46.0 is also",
95
- " `npm view @civitai/app-sdk version` -- the tree is at the last published",
96
- " version, so nothing is mid-flight.",
97
- " - the pending changeset set is exactly ONE file, `.changeset/",
98
- " app-storage-real-ceilings-2026-09-19.md`, declaring `@civitai/app-sdk: minor`;",
99
- " `git ls-tree -r origin/main .changeset/` shows main carries no others.",
100
- " - `pnpm exec changeset status --verbose` on this branch prints",
101
- " `@civitai/app-sdk 0.47.0` (and `@civitai/blocks-react 0.54.0`). That is the",
102
- " tool that will actually run, answering with the number it will actually write.",
103
- "",
104
- "MEASURED, both directions, against the REAL tarballs (not the workspace copy):",
105
- " - published 0.46.0 -- which the OLD `>=0.45.0` range SATISFIED, installing with",
106
- " no peer warning at all -- does not export any of the three. `node -e` on a",
107
- " scratch `npm i @civitai/app-sdk@0.46.0`:",
108
- " SyntaxError: The requested module '@civitai/app-sdk/blocks'",
109
- " does not provide an export named 'APP_STORAGE_MAX_BYTES'",
110
- " Controls were run BOTH ways before believing that zero: an impossible symbol",
111
- " reported absent (the probe can go red) and `BrowsingLevel`/`SFW_LEVELS`",
112
- " resolved (the probe can see a symbol that IS there).",
113
- " - blast radius is the `./testing` subpath ONLY, and that is measured too, by",
114
- " `pnpm pack`ing this package and importing both entries against 0.46.0:",
115
- " `@civitai/blocks-react` resolved 61 exports fine; `@civitai/blocks-react/",
116
- " testing` threw the SyntaxError above out of `dist/internal/mockHost.js`.",
117
- " `src/testing.tsx` reaches `mockHost`, `src/index.ts` does not -- so the block",
118
- " boots and every dev harness and downstream test suite dies instead.",
119
- " - with the floor at 0.47.0, that same install is refused: npm reports",
120
- " ERESOLVE against `@civitai/app-sdk@0.46.0`.",
121
- "",
122
- "⚠️ THE RESIDUAL RISK IS RELEASE ORDERING, AND IT IS NOT REMOVABLE FROM HERE.",
123
- "0.47.0 is the version THIS changeset publishes from THIS base. If another app-sdk",
124
- "minor merges and publishes before this PR does, 0.47.0 ships WITHOUT the",
125
- "constants, this changeset publishes 0.48.0, and this range admits a broken",
126
- "version -- #309's shape exactly. So: RE-RUN `changeset status --verbose` after any",
127
- "rebase onto a moved main, and re-read this range. The number here is a",
128
- "measurement of a base, and a rebase invalidates the base.",
129
- "",
130
- "🔴 `changeset version` WILL NOT FIX A STALE FLOOR -- IT IS NOT A BACKSTOP.",
131
- "`.changeset/config.json` sets `onlyUpdatePeerDependentsWhenOutOfRange: true`, so a",
132
- "peer range is rewritten ONLY when the computed version falls OUT of it. A floor",
133
- "that is too LOW is, by construction, still satisfied -- so it is left exactly as",
134
- "it is and ships stale. (The flag does bite in the other direction, which an",
135
- "earlier note recorded: run before a rebase, when the computed version is BELOW the",
136
- "declared floor, it rewrites the range DOWNWARD and drops the upper bound. Both",
137
- "readings say the same thing -- never let this number be the flag's problem.)",
138
- "",
139
- "🔴 A PEER RANGE IS METADATA AND NOTHING CHECKS IT AGAINST THE CODE. 0.49.0-0.51.0",
140
- "declared >=0.29.0 while importing `effectiveBrowsingCeiling` (app-sdk 0.39.0) and",
141
- "the create-post types (0.40.0). The range was SATISFIED, so no install warned;",
142
- "the failure landed at module evaluation in a consumer's tests, where 27 of 43",
143
- "test files collected ZERO tests -- 292 tests stopped running and the summary line",
144
- "reported no failures. See #309. NO BUILD OR TYPECHECK CAN CATCH THIS:",
145
- "`pnpm.overrides` maps the peer to the workspace copy, so every in-repo typecheck,",
146
- "test and build resolves the symbol from `packages/civitai-app-sdk` and is",
147
- "structurally blind to whatever this range says.",
148
- "",
149
- "🔴 SINCE #344 ONE GATE DOES SEE PART OF IT: `tests/guards/",
150
- "blocks-react-peer-floor.test.mjs` fails when this range admits an app-sdk version",
151
- "measured NOT to export the App Storage constants, and when the derivation below",
152
- "stops being recorded here. Read its KNOWN LIMITS before relying on it -- CI checks",
153
- "out at `fetch-depth: 1` and the guard job has no registry access, so it is",
154
- "offline and tree-local: it re-asserts a measurement taken by hand, it does not",
155
- "take one. The steps below are still the only way to MAKE the measurement.",
156
- "",
157
- "🔴 AND #309'S OWN SUGGESTED FLOOR (>=0.39.0) WAS WRONG. `effectiveBrowsingCeiling`",
158
- "arrives in 0.39.0, but `BlockCreatePostRequest`, `BlockCreatePostResult`,",
159
- "`BlockCreatePostHostError` and `BlockPostSource` arrive in 0.40.0, and there is no",
160
- "0.39.x patch between them. Landing the issue's number would have closed it and",
161
- "stayed broken. Do not take a floor from a ticket.",
162
- "",
163
- "TO RE-DERIVE IT (do this when this package starts importing a new peer symbol):",
164
- " 1. collect the symbols -- every named `import`/`export … from '@civitai/app-sdk*'`",
165
- " clause in src/, plus bare and star forms, which name a SUBPATH and no symbols",
166
- " but still have to resolve. Measured at #344: 64 distinct symbols over 2",
167
- " subpaths ('/blocks' and '/safe-storage'), counting unique names across every",
168
- " named import clause in src/**/*.ts{,x}. An earlier derivation recorded 62;",
169
- " re-count rather than trusting either figure.",
170
- " 2. in a scratch dir OUTSIDE this workspace (pnpm would resolve the peer to the",
171
- " workspace copy and measure nothing), `npm i @civitai/app-sdk@<version>` and",
172
- " typecheck a file importing all of them -- each in the POSITION it is imported",
173
- " in here, since a type-only export satisfies a plain value import and that is",
174
- " the #309 failure mode itself.",
175
- " 3. the floor is the lowest version with zero missing. Confirm the version BELOW",
176
- " it is missing something, or the floor is higher than it needs to be.",
177
- " 4. include a symbol you know does not exist, and check it reports. A run that",
178
- " finds nothing is indistinguishable from one wired to nothing.",
179
- "",
180
- "A 584-line script that automated this was written and then cut: three audit rounds",
181
- "found defects in the SCRIPT while the floor value it derived never changed, and",
182
- "nothing in the repo ran it. The derivation is rare and the number is recorded here;",
183
- "the tool was the expensive half."
184
- ],
41
+ "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.",
185
42
  "peerDependencies": {
186
43
  "@civitai/app-sdk": ">=0.49.0 <1.0.0",
187
44
  "react": "^18.0.0 || ^19.0.0"