@civitai/blocks-react 0.53.0 → 0.54.0
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 +78 -8
- package/dist/hooks/useAppStorage.d.ts +39 -8
- package/dist/hooks/useAppStorage.d.ts.map +1 -1
- package/dist/hooks/useAppStorage.js +14 -1
- package/dist/hooks/useAppStorage.js.map +1 -1
- package/dist/hooks/useBlockContext.d.ts +5 -1
- package/dist/hooks/useBlockContext.d.ts.map +1 -1
- package/dist/hooks/useBlockContext.js +5 -1
- package/dist/hooks/useBlockContext.js.map +1 -1
- package/dist/hooks/useBlockResize.d.ts +26 -0
- package/dist/hooks/useBlockResize.d.ts.map +1 -1
- package/dist/hooks/useBlockResize.js +52 -5
- package/dist/hooks/useBlockResize.js.map +1 -1
- package/dist/internal/liveHost.d.ts +3 -1
- package/dist/internal/liveHost.d.ts.map +1 -1
- package/dist/internal/liveHost.js +22 -21
- package/dist/internal/liveHost.js.map +1 -1
- package/dist/internal/mockHost.d.ts +37 -5
- package/dist/internal/mockHost.d.ts.map +1 -1
- package/dist/internal/mockHost.js +80 -34
- package/dist/internal/mockHost.js.map +1 -1
- package/dist/internal/transport.d.ts +4 -3
- package/dist/internal/transport.d.ts.map +1 -1
- package/dist/internal/transport.js.map +1 -1
- package/dist/internal/validate.d.ts.map +1 -1
- package/dist/internal/validate.js +22 -17
- package/dist/internal/validate.js.map +1 -1
- package/package.json +69 -38
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@civitai/blocks-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.54.0",
|
|
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",
|
|
@@ -38,47 +38,76 @@
|
|
|
38
38
|
"The @civitai/app-sdk floor is DERIVED, not chosen: it is the lowest published",
|
|
39
39
|
"version that exports every symbol this package imports from the peer.",
|
|
40
40
|
"",
|
|
41
|
-
"🔴 RAISED 0.
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"absent from every subpath, and the failure is not a type error: `dist/index.js`",
|
|
48
|
-
"re-exports `IframeTransport`, so the package's MAIN ENTRY is in the failing module",
|
|
49
|
-
"graph and the block does not boot at all. Caught by an adversarial audit that",
|
|
50
|
-
"built the dist and resolved it, not by any gate; the paragraph below says why no",
|
|
51
|
-
"gate can. Step 4's positive control was run (a symbol that cannot exist reported",
|
|
52
|
-
"as absent), so the zero for the other symbols is a measurement and not a silent",
|
|
53
|
-
"pass.",
|
|
41
|
+
"🔴 RAISED 0.45.0 -> 0.47.0 (THE THIRD TIME THIS CLASS HAS BITTEN: #309, then",
|
|
42
|
+
"#317 caught it in review, then this) when `internal/mockHost.ts` began importing",
|
|
43
|
+
"three NEW peer VALUE symbols -- `APP_STORAGE_MAX_BYTES`, `APP_STORAGE_MAX_ROWS`",
|
|
44
|
+
"and `APP_STORAGE_MAX_VALUE_BYTES`, the App Storage ceilings, which it assigns to",
|
|
45
|
+
"its mock storage defaults. All three ship for the first time in the app-sdk minor",
|
|
46
|
+
"released alongside this change.",
|
|
54
47
|
"",
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
48
|
+
"HOW 0.47.0 WAS DERIVED (computed, not predicted from release ordering):",
|
|
49
|
+
" - in-tree `packages/civitai-app-sdk/package.json` is 0.46.0, and 0.46.0 is also",
|
|
50
|
+
" `npm view @civitai/app-sdk version` -- the tree is at the last published",
|
|
51
|
+
" version, so nothing is mid-flight.",
|
|
52
|
+
" - the pending changeset set is exactly ONE file, `.changeset/",
|
|
53
|
+
" app-storage-real-ceilings-2026-09-19.md`, declaring `@civitai/app-sdk: minor`;",
|
|
54
|
+
" `git ls-tree -r origin/main .changeset/` shows main carries no others.",
|
|
55
|
+
" - `pnpm exec changeset status --verbose` on this branch prints",
|
|
56
|
+
" `@civitai/app-sdk 0.47.0` (and `@civitai/blocks-react 0.54.0`). That is the",
|
|
57
|
+
" tool that will actually run, answering with the number it will actually write.",
|
|
61
58
|
"",
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
59
|
+
"MEASURED, both directions, against the REAL tarballs (not the workspace copy):",
|
|
60
|
+
" - published 0.46.0 -- which the OLD `>=0.45.0` range SATISFIED, installing with",
|
|
61
|
+
" no peer warning at all -- does not export any of the three. `node -e` on a",
|
|
62
|
+
" scratch `npm i @civitai/app-sdk@0.46.0`:",
|
|
63
|
+
" SyntaxError: The requested module '@civitai/app-sdk/blocks'",
|
|
64
|
+
" does not provide an export named 'APP_STORAGE_MAX_BYTES'",
|
|
65
|
+
" Controls were run BOTH ways before believing that zero: an impossible symbol",
|
|
66
|
+
" reported absent (the probe can go red) and `BrowsingLevel`/`SFW_LEVELS`",
|
|
67
|
+
" resolved (the probe can see a symbol that IS there).",
|
|
68
|
+
" - blast radius is the `./testing` subpath ONLY, and that is measured too, by",
|
|
69
|
+
" `pnpm pack`ing this package and importing both entries against 0.46.0:",
|
|
70
|
+
" `@civitai/blocks-react` resolved 61 exports fine; `@civitai/blocks-react/",
|
|
71
|
+
" testing` threw the SyntaxError above out of `dist/internal/mockHost.js`.",
|
|
72
|
+
" `src/testing.tsx` reaches `mockHost`, `src/index.ts` does not -- so the block",
|
|
73
|
+
" boots and every dev harness and downstream test suite dies instead.",
|
|
74
|
+
" - with the floor at 0.47.0, that same install is refused: npm reports",
|
|
75
|
+
" ERESOLVE against `@civitai/app-sdk@0.46.0`.",
|
|
76
|
+
"",
|
|
77
|
+
"⚠️ THE RESIDUAL RISK IS RELEASE ORDERING, AND IT IS NOT REMOVABLE FROM HERE.",
|
|
78
|
+
"0.47.0 is the version THIS changeset publishes from THIS base. If another app-sdk",
|
|
79
|
+
"minor merges and publishes before this PR does, 0.47.0 ships WITHOUT the",
|
|
80
|
+
"constants, this changeset publishes 0.48.0, and this range admits a broken",
|
|
81
|
+
"version -- #309's shape exactly. So: RE-RUN `changeset status --verbose` after any",
|
|
82
|
+
"rebase onto a moved main, and re-read this range. The number here is a",
|
|
83
|
+
"measurement of a base, and a rebase invalidates the base.",
|
|
84
|
+
"",
|
|
85
|
+
"🔴 `changeset version` WILL NOT FIX A STALE FLOOR -- IT IS NOT A BACKSTOP.",
|
|
86
|
+
"`.changeset/config.json` sets `onlyUpdatePeerDependentsWhenOutOfRange: true`, so a",
|
|
87
|
+
"peer range is rewritten ONLY when the computed version falls OUT of it. A floor",
|
|
88
|
+
"that is too LOW is, by construction, still satisfied -- so it is left exactly as",
|
|
89
|
+
"it is and ships stale. (The flag does bite in the other direction, which an",
|
|
90
|
+
"earlier note recorded: run before a rebase, when the computed version is BELOW the",
|
|
91
|
+
"declared floor, it rewrites the range DOWNWARD and drops the upper bound. Both",
|
|
92
|
+
"readings say the same thing -- never let this number be the flag's problem.)",
|
|
73
93
|
"",
|
|
74
94
|
"🔴 A PEER RANGE IS METADATA AND NOTHING CHECKS IT AGAINST THE CODE. 0.49.0-0.51.0",
|
|
75
95
|
"declared >=0.29.0 while importing `effectiveBrowsingCeiling` (app-sdk 0.39.0) and",
|
|
76
96
|
"the create-post types (0.40.0). The range was SATISFIED, so no install warned;",
|
|
77
97
|
"the failure landed at module evaluation in a consumer's tests, where 27 of 43",
|
|
78
98
|
"test files collected ZERO tests -- 292 tests stopped running and the summary line",
|
|
79
|
-
"reported no failures. See #309.
|
|
80
|
-
"peer to the workspace copy, so every in-repo typecheck
|
|
81
|
-
"
|
|
99
|
+
"reported no failures. See #309. NO BUILD OR TYPECHECK CAN CATCH THIS:",
|
|
100
|
+
"`pnpm.overrides` maps the peer to the workspace copy, so every in-repo typecheck,",
|
|
101
|
+
"test and build resolves the symbol from `packages/civitai-app-sdk` and is",
|
|
102
|
+
"structurally blind to whatever this range says.",
|
|
103
|
+
"",
|
|
104
|
+
"🔴 SINCE #344 ONE GATE DOES SEE PART OF IT: `tests/guards/",
|
|
105
|
+
"blocks-react-peer-floor.test.mjs` fails when this range admits an app-sdk version",
|
|
106
|
+
"measured NOT to export the App Storage constants, and when the derivation below",
|
|
107
|
+
"stops being recorded here. Read its KNOWN LIMITS before relying on it -- CI checks",
|
|
108
|
+
"out at `fetch-depth: 1` and the guard job has no registry access, so it is",
|
|
109
|
+
"offline and tree-local: it re-asserts a measurement taken by hand, it does not",
|
|
110
|
+
"take one. The steps below are still the only way to MAKE the measurement.",
|
|
82
111
|
"",
|
|
83
112
|
"🔴 AND #309'S OWN SUGGESTED FLOOR (>=0.39.0) WAS WRONG. `effectiveBrowsingCeiling`",
|
|
84
113
|
"arrives in 0.39.0, but `BlockCreatePostRequest`, `BlockCreatePostResult`,",
|
|
@@ -89,8 +118,10 @@
|
|
|
89
118
|
"TO RE-DERIVE IT (do this when this package starts importing a new peer symbol):",
|
|
90
119
|
" 1. collect the symbols -- every named `import`/`export … from '@civitai/app-sdk*'`",
|
|
91
120
|
" clause in src/, plus bare and star forms, which name a SUBPATH and no symbols",
|
|
92
|
-
" but still have to resolve.
|
|
93
|
-
" ('/blocks' and '/safe-storage')
|
|
121
|
+
" but still have to resolve. Measured at #344: 64 distinct symbols over 2",
|
|
122
|
+
" subpaths ('/blocks' and '/safe-storage'), counting unique names across every",
|
|
123
|
+
" named import clause in src/**/*.ts{,x}. An earlier derivation recorded 62;",
|
|
124
|
+
" re-count rather than trusting either figure.",
|
|
94
125
|
" 2. in a scratch dir OUTSIDE this workspace (pnpm would resolve the peer to the",
|
|
95
126
|
" workspace copy and measure nothing), `npm i @civitai/app-sdk@<version>` and",
|
|
96
127
|
" typecheck a file importing all of them -- each in the POSITION it is imported",
|
|
@@ -107,7 +138,7 @@
|
|
|
107
138
|
"the tool was the expensive half."
|
|
108
139
|
],
|
|
109
140
|
"peerDependencies": {
|
|
110
|
-
"@civitai/app-sdk": ">=0.
|
|
141
|
+
"@civitai/app-sdk": ">=0.47.0 <1.0.0",
|
|
111
142
|
"react": "^18.0.0 || ^19.0.0"
|
|
112
143
|
},
|
|
113
144
|
"devDependencies": {
|
|
@@ -122,7 +153,7 @@
|
|
|
122
153
|
"react-dom": "^19.0.0",
|
|
123
154
|
"typescript": "^5.9.2",
|
|
124
155
|
"vitest": "^4.1.11",
|
|
125
|
-
"@civitai/app-sdk": "^0.
|
|
156
|
+
"@civitai/app-sdk": "^0.47.0"
|
|
126
157
|
},
|
|
127
158
|
"publishConfig": {
|
|
128
159
|
"access": "public"
|