@vibecook/ice 0.8.1 → 0.9.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/dist/devtools.js CHANGED
@@ -14,7 +14,7 @@ import {
14
14
  WheelPan,
15
15
  WheelZoom,
16
16
  Wire
17
- } from "./chunk-VITC7U3J.js";
17
+ } from "./chunk-LBRHND4G.js";
18
18
  import "./chunk-OR5FNVUE.js";
19
19
 
20
20
  // ../devtools/src/attach.ts
package/dist/dom.js CHANGED
@@ -19,8 +19,8 @@ import {
19
19
  startRafLoop,
20
20
  wheelCede,
21
21
  wireMeasurement
22
- } from "./chunk-M5SFRVMH.js";
23
- import "./chunk-VITC7U3J.js";
22
+ } from "./chunk-E33I7R2Z.js";
23
+ import "./chunk-LBRHND4G.js";
24
24
  import "./chunk-OR5FNVUE.js";
25
25
  export {
26
26
  CLAIM_OWNS_ESCAPE,
package/dist/ground.js CHANGED
@@ -23,7 +23,7 @@ import {
23
23
  defineQuery,
24
24
  portSlots,
25
25
  widgets
26
- } from "./chunk-VITC7U3J.js";
26
+ } from "./chunk-LBRHND4G.js";
27
27
  import {
28
28
  portAnchor,
29
29
  tessellateCubic,
package/dist/index.js CHANGED
@@ -280,7 +280,7 @@ import {
280
280
  widgetSpawnInits,
281
281
  widgets,
282
282
  writeRuntimeResource
283
- } from "./chunk-VITC7U3J.js";
283
+ } from "./chunk-LBRHND4G.js";
284
284
  import "./chunk-OR5FNVUE.js";
285
285
  export {
286
286
  Accepts,
package/dist/r3f.js CHANGED
@@ -2,8 +2,8 @@ import {
2
2
  EngineProvider,
3
3
  hasPreviewSnapshot,
4
4
  setPreviewSnapshot
5
- } from "./chunk-4BOR42FZ.js";
6
- import "./chunk-M5SFRVMH.js";
5
+ } from "./chunk-HM25ULBP.js";
6
+ import "./chunk-E33I7R2Z.js";
7
7
  import {
8
8
  Active,
9
9
  Camera,
@@ -26,7 +26,7 @@ import {
26
26
  navFlightActive,
27
27
  pickTopAt,
28
28
  widgets
29
- } from "./chunk-VITC7U3J.js";
29
+ } from "./chunk-LBRHND4G.js";
30
30
  import {
31
31
  compositeCameraFrustum,
32
32
  computeIslandPhase,
package/dist/react.js CHANGED
@@ -25,9 +25,9 @@ import {
25
25
  useWidgetProps,
26
26
  useWorld,
27
27
  useWorldComponent
28
- } from "./chunk-4BOR42FZ.js";
29
- import "./chunk-M5SFRVMH.js";
30
- import "./chunk-VITC7U3J.js";
28
+ } from "./chunk-HM25ULBP.js";
29
+ import "./chunk-E33I7R2Z.js";
30
+ import "./chunk-LBRHND4G.js";
31
31
  import "./chunk-OR5FNVUE.js";
32
32
  export {
33
33
  EngineProvider,
@@ -46,6 +46,17 @@ export declare function classifyRead(r: BehaviorRead): {
46
46
  } | undefined;
47
47
  /** The read component a `reads:` entry contributes, if it contributes one. */
48
48
  export declare function readComponentOf(r: BehaviorRead): Component | undefined;
49
+ /**
50
+ * The canonical byte measure `maxFacetBytes` is enforced in: UTF-8 JSON of the
51
+ * COMPLETE raw cell (json fields already serialized to strings) with fields in
52
+ * schema declaration order — which is every cell's construction order
53
+ * (`cellForBehavior`, `defaultsOf` both iterate the schema), so a plain
54
+ * `JSON.stringify` is canonical without a key-sort pass. This measures the
55
+ * value placed in the local peer blob, deliberately NOT a wire-frame guess:
56
+ * the I19 division of labor has the host budget encoding/transport headroom
57
+ * on top of the sum of claims it admitted.
58
+ */
59
+ export declare function facetBytesOf(cell: Record<string, unknown>): number;
49
60
  export declare function describeBehavior(behavior: AnyBehaviorDef): BehaviorDescription;
50
61
  export declare function defineBehavior<const S extends BehaviorStore, const Sch extends BehaviorSchema = BehaviorSchema>(name: string, spec: BehaviorSpec<S, Sch>): BehaviorHandle<DataOf<Sch>>;
51
62
  /**
@@ -67,6 +67,12 @@ export interface BehaviorDescription {
67
67
  readonly version: number;
68
68
  readonly phase: BehaviorPhase;
69
69
  readonly budgetMs?: number;
70
+ /**
71
+ * The declared facet byte claim (petition I19), verbatim. ABSENT when the
72
+ * behavior attested no bound — hosts that require one can tell the two
73
+ * apart and refuse admission accordingly.
74
+ */
75
+ readonly maxFacetBytes?: number;
70
76
  readonly tickWhile: "all" | "visible";
71
77
  readonly schema: readonly {
72
78
  readonly name: string;
@@ -293,6 +299,19 @@ export interface BehaviorSpec<S extends BehaviorStore, Sch extends BehaviorSchem
293
299
  readonly phase?: BehaviorPhase;
294
300
  /** Per-frame budget request, ms. The breaker caps it at the seam ceiling. */
295
301
  readonly budgetMs?: number;
302
+ /**
303
+ * Ephemeral only — the producer's own resource claim (petition I19): a hard
304
+ * ceiling on the canonical UTF-8 JSON bytes of this behavior's COMPLETE
305
+ * facet cell after defaults/merge/serialization (the value placed in the
306
+ * local peer blob — not a wire-frame guess; hosts budget transport headroom
307
+ * separately). Enforced in PRODUCTION, not as a dev advisory: an over-budget
308
+ * default fails the definition before anything publishes, and an over-budget
309
+ * `ctx.write` throws before mutating presence — the prior facet stays
310
+ * intact, and in-hook the throw feeds the ordinary fault ladder (BF-D18
311
+ * attribution, three strikes, I17 withdrawal on quarantine). Identity-
312
+ * bearing: part of the definition signature and of `describeBehavior()`.
313
+ */
314
+ readonly maxFacetBytes?: number;
296
315
  readonly reads?: readonly BehaviorRead[];
297
316
  readonly writes?: readonly Component[];
298
317
  /**
@@ -324,6 +343,8 @@ export interface BehaviorHandle<Data> {
324
343
  readonly version: number;
325
344
  readonly phase: BehaviorPhase;
326
345
  readonly budgetMs: number | undefined;
346
+ /** The I19 facet byte claim; `undefined` = no bound attested. */
347
+ readonly maxFacetBytes: number | undefined;
327
348
  readonly schema: BehaviorSchema;
328
349
  /** The generated data component (`behavior:<name>`). Advanced read paths. */
329
350
  readonly component: Component<Record<string, string | number | boolean>>;
@@ -3,7 +3,7 @@
3
3
  * scene systems · doc kit · publish step · engine facade · reflector registry.
4
4
  * Import wall: strata-ecs + @ice/kernel ONLY — never react/dom/three (enforced).
5
5
  */
6
- export declare const CORE_VERSION = "0.8.1";
6
+ export declare const CORE_VERSION = "0.9.0";
7
7
  export { defineSchemaOnce, hmrInvalidateOnSchemaChange } from "./boot/hmr";
8
8
  export { All, Any, Not, Related, createWorld, defineQuery, defineSystem, defineTickSystem, enumOf, field, Local, } from "@vibecook/strata-ecs";
9
9
  export type { Batch, Component, Condition, Entity, OrderPlace, Pipeline, Query, Relation, Resource, System, SystemCtx, Tag, TickSystem, World, } from "@vibecook/strata-ecs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibecook/ice",
3
- "version": "0.8.1",
3
+ "version": "0.9.0",
4
4
  "description": "ICE — infinite canvas engine. Figma-grade infinite-canvas UX as a framework: defineWidget turns React/R3F components into canvas citizens — selectable, movable, resizable, wired into node graphs, CRDT-synced, undoable per gesture.",
5
5
  "license": "MIT",
6
6
  "author": "James Yong <me@jamesyong42.com>",