@civitai/blocks-react 0.72.2 → 0.72.3

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.
@@ -4,6 +4,7 @@ import { OriginMatcher } from './originMatcher.js';
4
4
  import { DEFAULT_REQUEST_TIMEOUT_MS } from './requestTimeouts.js';
5
5
  import { isRoutableRequestId } from './requestId.js';
6
6
  import { payloadValidatorFor, projectInboundPayload } from './validate.js';
7
+ import { VERSION } from '../version.generated.js';
7
8
  const INIT_TIMEOUT_MS = 10_000;
8
9
  /**
9
10
  * How many DISTINCT inbound origins are remembered for the init-timeout
@@ -611,7 +612,9 @@ export class IframeTransport {
611
612
  // block's root element mounts. Queued because the iframe's React
612
613
  // tree hasn't rendered yet at this point — the postMessage goes
613
614
  // out on the next microtask via the standard dispatch path.
614
- this.dispatch('BLOCK_READY', { height: 0 });
615
+ // `sdkName`/`sdkVersion` are informational (the host counts versions
616
+ // in the wild); nothing is negotiated on them and older blocks omit them.
617
+ this.dispatch('BLOCK_READY', { height: 0, sdkName: 'blocks-react', sdkVersion: VERSION });
615
618
  this.resolveInit(data.payload);
616
619
  }
617
620
  return;
@@ -0,0 +1,3 @@
1
+ /** This package's version, reported to the host as `sdkVersion` in `BLOCK_READY`. */
2
+ export declare const VERSION = "0.72.3";
3
+ //# sourceMappingURL=version.generated.d.ts.map
@@ -0,0 +1,4 @@
1
+ /* AUTOGENERATED from package.json by scripts/gen-version.mjs. DO NOT EDIT. */
2
+ /** This package's version, reported to the host as `sdkVersion` in `BLOCK_READY`. */
3
+ export const VERSION = "0.72.3";
4
+ //# sourceMappingURL=version.generated.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@civitai/blocks-react",
3
- "version": "0.72.2",
3
+ "version": "0.72.3",
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",
@@ -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.68.0"
61
+ "@civitai/app-sdk": "^0.69.0"
62
62
  },
63
63
  "publishConfig": {
64
64
  "access": "public"
@@ -79,7 +79,8 @@
79
79
  "directory": "packages/civitai-blocks-react"
80
80
  },
81
81
  "scripts": {
82
- "build": "tsc -p tsconfig.json",
82
+ "generate": "node ../../scripts/gen-version.mjs",
83
+ "build": "node ../../scripts/gen-version.mjs && tsc -p tsconfig.json",
83
84
  "typecheck": "tsc -p tsconfig.json --noEmit",
84
85
  "test": "vitest run --project unit",
85
86
  "test:browser": "vitest run --project browser",