@vibecook/ice 0.16.0 → 0.17.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.
Files changed (52) hide show
  1. package/README.md +10 -5
  2. package/dist/{chunk-ZTY2VRIS.js → chunk-6W2FPXR7.js} +13 -7
  3. package/dist/chunk-6W2FPXR7.js.map +1 -0
  4. package/dist/{chunk-Y7K6CHSF.js → chunk-LAZIY3J7.js} +286 -189
  5. package/dist/chunk-LAZIY3J7.js.map +1 -0
  6. package/dist/{chunk-REJTEK3V.js → chunk-M2HUDENL.js} +288 -318
  7. package/dist/chunk-M2HUDENL.js.map +1 -0
  8. package/dist/{chunk-BH5AFWJX.js → chunk-VZEZ7CYW.js} +9 -13
  9. package/dist/chunk-VZEZ7CYW.js.map +1 -0
  10. package/dist/desk-kit.js +2 -2
  11. package/dist/desk-objects.js +45 -14
  12. package/dist/desk-objects.js.map +1 -1
  13. package/dist/desk.js +3 -3
  14. package/dist/devtools.js +1 -1
  15. package/dist/dom.js +2 -2
  16. package/dist/index.js +7 -1
  17. package/dist/react.js +2 -2
  18. package/dist/types/packages/core/src/canvas/engine-catalog.d.ts +6 -0
  19. package/dist/types/packages/core/src/catalog/desk.d.ts +6 -6
  20. package/dist/types/packages/core/src/catalog/gesture.d.ts +2 -0
  21. package/dist/types/packages/core/src/catalog/selection-presence.d.ts +2 -0
  22. package/dist/types/packages/core/src/catalog/settings-resources.d.ts +8 -4
  23. package/dist/types/packages/core/src/facade/create-canvas-engine.d.ts +11 -5
  24. package/dist/types/packages/core/src/index.d.ts +1 -1
  25. package/dist/types/packages/core/src/ops/selection-drag.d.ts +8 -0
  26. package/dist/types/packages/core/src/settings/defaults.d.ts +2 -0
  27. package/dist/types/packages/core/src/systems/camera-sim.d.ts +13 -0
  28. package/dist/types/packages/core/src/systems/tray.d.ts +5 -4
  29. package/dist/types/packages/core/src/tools/define-tool.d.ts +2 -2
  30. package/dist/types/packages/core/src/widget/define-widget.d.ts +2 -1
  31. package/dist/types/packages/desk/src/ground.d.ts +4 -3
  32. package/dist/types/packages/desk/src/host/layer.d.ts +1 -3
  33. package/dist/types/packages/desk/src/mat/layout.d.ts +45 -5
  34. package/dist/types/packages/desk/src/mat/mat-pass.d.ts +7 -0
  35. package/dist/types/packages/desk/src/mat/ruler-regions.d.ts +17 -0
  36. package/dist/types/packages/desk/src/shaders.gen.d.ts +4 -4
  37. package/dist/types/packages/desk/src/theme.d.ts +0 -15
  38. package/dist/types/packages/desk/src/tray/drawer.d.ts +10 -8
  39. package/dist/types/packages/desk/src/tray/flux.d.ts +2 -3
  40. package/dist/types/packages/desk/src/tray/layout.d.ts +1 -6
  41. package/dist/types/packages/desk/src/tray/look.d.ts +0 -9
  42. package/dist/types/packages/desk/src/tray/pass.d.ts +7 -18
  43. package/dist/types/packages/desk/src/tray/specimens.d.ts +2 -19
  44. package/dist/types/packages/dom/src/pointer-adapter.d.ts +1 -1
  45. package/dist/types/packages/objects/src/minimat/layout.d.ts +1 -1
  46. package/dist/types/packages/objects/src/photo/photo.d.ts +2 -2
  47. package/dist/types/packages/objects/src/preset.d.ts +5 -3
  48. package/package.json +15 -16
  49. package/dist/chunk-BH5AFWJX.js.map +0 -1
  50. package/dist/chunk-REJTEK3V.js.map +0 -1
  51. package/dist/chunk-Y7K6CHSF.js.map +0 -1
  52. package/dist/chunk-ZTY2VRIS.js.map +0 -1
@@ -30,7 +30,7 @@ export interface TraySpecimen {
30
30
  readonly h: number;
31
31
  };
32
32
  readonly props: Readonly<Record<string, unknown>>;
33
- /** Its hang's accessory and pegs (pitches from its hang point) — the entry's. */
33
+ /** Layout metadata from the entry. Mounting hardware is not rendered. */
34
34
  readonly accessory: TrayAccessory;
35
35
  readonly pegs: readonly (readonly [number, number])[];
36
36
  readonly label: string;
@@ -39,7 +39,7 @@ export interface TraySpecimen {
39
39
  /** A per-specimen asset (a still's committed raster — the oracle's; the product's writing pins its own). */
40
40
  readonly asset?: unknown;
41
41
  }
42
- /** One specimen this frame: its kind's record under its own view block, where it is on screen, its accessory's pegs on screen, its tag. */
42
+ /** One specimen this frame: its kind's record under its own view block, where it is on screen, and its tag. */
43
43
  export interface TraySpecimenFrame {
44
44
  readonly type: string;
45
45
  /** The kind's registry name, and the record its `record` made for this frame. */
@@ -65,9 +65,6 @@ export interface TraySpecimenFrame {
65
65
  readonly x1: number;
66
66
  readonly y1: number;
67
67
  };
68
- /** Its pegs' hole centres on screen, CSS px. */
69
- readonly pegs: readonly (readonly [number, number])[];
70
- readonly accessory: TrayAccessory;
71
68
  readonly label: string;
72
69
  }
73
70
  /** The drawer this frame, as its flux drew it: the rect and the SHOWN scroll (the band in it) — and a host's foot inset (I21), when it has one. */
@@ -112,20 +109,6 @@ export declare function trayGrid(grid: GridConfig): GridConfig;
112
109
  * `tray.local` — a note's writing, a print's pictures), whose records the reflector lets go of as the specimen goes.
113
110
  */
114
111
  export declare function specimenFrames(specimens: readonly TraySpecimen[], drawn: TrayDrawn, env: TraySpecimenEnv): TraySpecimenFrame[];
115
- /** The accessories' numbers (theme.ts `TRAY.accessory`): the kind index the shader reads, each's standing-off in pitches. */
116
- export declare const ACCESSORY_INDEX: Readonly<Record<TrayAccessory, number>>;
117
- /**
118
- * One specimen's accessory record (tray.wgsl `TrayAccessory`), screen CSS px: its quad the ACCESSORY's own parts — the plugs and what they
119
- * hold, a shelf's plank, a rail's bar, never the specimen's body between — grown by the shadow's push and blur (down and right, away
120
- * from the lamp) and a pixel.
121
- */
122
- export declare function accessoryOf(f: TraySpecimenFrame): {
123
- readonly box: number[];
124
- readonly kind: number[];
125
- readonly rect: number[];
126
- readonly pegs0: number[];
127
- readonly pegs1: number[];
128
- };
129
112
  /** A carried object this frame (K5b — tray/carry.ts): its kind's record under its pose's view, the slot it is drawn in, where it is on screen. */
130
113
  export interface TrayCarriedFrame {
131
114
  /** Its slot's key in `TraySlots` — one per type, apart from the specimens' (a copy and its specimen draw in the same frame). */
@@ -30,7 +30,7 @@
30
30
  * `data-canvas-keyboard` claim it cedes the pan SEMANTICS but keeps killing
31
31
  * the page-scroll default (the key still reaches the widget's own listener —
32
32
  * preventDefault is not stopPropagation); elsewhere it pans, as ever;
33
- * - wheel: ctrl-wheel / trackpad pinch is ALWAYS `preventDefault` + the canvas
33
+ * - wheel: Cmd/Ctrl-wheel / trackpad pinch is ALWAYS `preventDefault` + the canvas
34
34
  * zoom signal (`wheel.pinch`) — a browser page-zoom over a widget is
35
35
  * catastrophic, claimed or not. A PLAIN wheel over a scroller-with-room
36
36
  * inside a claim/`data-canvas-interactive`/editable subtree (`wheelCede`,
@@ -1,7 +1,7 @@
1
1
  import { type PortalAffine, type GlyphAtlasMeta } from "../../../desk/src/kit/index";
2
2
  import type { RGB } from "../../../desk/src/index";
3
3
  import { type Chip, type FaceLattice, type MiniMatGeometry, type MiniMatLaw, type Numerals } from "./minimat";
4
- export declare const MiniMat: import("../../../desk/src/engine/index").StructDef<"ground" | "ring" | "lamp" | "inside" | "name" | "live" | "rungs" | "centre" | "half" | "lift" | "alpha" | "margin" | "slope" | "radius" | "thick" | "lampZ" | "chipFirst" | "chipCount" | "nameLen" | "pad0" | "weights" | "widths" | "numerals">;
4
+ export declare const MiniMat: import("../../../desk/src/engine/index").StructDef<"ground" | "ring" | "lamp" | "inside" | "name" | "live" | "rungs" | "centre" | "half" | "margin" | "lift" | "alpha" | "slope" | "radius" | "thick" | "lampZ" | "chipFirst" | "chipCount" | "nameLen" | "pad0" | "weights" | "widths" | "numerals">;
5
5
  export declare const ChipRecord: import("../../../desk/src/engine/index").StructDef<"kind" | "frame" | "ink" | "centre" | "half" | "colour" | "radius" | "rot" | "lines">;
6
6
  export declare const MiniMatUniforms: import("../../../desk/src/engine/index").StructDef<"shadow" | "shadow2" | "select" | "edge" | "ticks" | "atlas" | "text" | "print" | "cream" | "castTint" | "digits" | "atlas2">;
7
7
  export declare const MAX_MINIMATS = 256;
@@ -32,8 +32,8 @@ export declare const CAST: RGB;
32
32
  declare const PHOTO_SPEC: {
33
33
  /** The print's long side — a 6×4 at the note's scale. */
34
34
  readonly long: 400;
35
- /** The white border, as a fraction of the short side (a classic bordered print). 0 = borderless. */
36
- readonly border: 0.05;
35
+ /** Optional host styling, as a fraction of the short side. Images fill the sheet by default. */
36
+ readonly border: 0;
37
37
  /** The die-cut corner. */
38
38
  readonly radius: 2.5;
39
39
  /** The paper under the emulsion: a resin-coated white, a touch warm (sRGB), and its fibre ±/255. */
@@ -2,7 +2,7 @@ import { type Tool } from "../../core/src/index";
2
2
  /** The desk's reference objects, in the order an app registers them. */
3
3
  export declare const DESK_OBJECTS: readonly [import("../../core/src/index").WidgetType, import("../../core/src/index").WidgetType, import("../../core/src/index").WidgetType, import("../../core/src/index").WidgetType, import("../../core/src/index").WidgetType, import("../../core/src/index").WidgetType];
4
4
  /**
5
- * The desk's select tool: the bare mat pans, shift-drag draws the vellum marquee; a drag on an object moves it. It answers `v` — core's
5
+ * The desk's select tool: the bare mat draws a marquee, shift-drag adds to the selection; a drag on an object moves it. It answers `v` — core's
6
6
  * select's letter — since core's select is compiled but never legal on the desk, and the keymap binds a letter only to a tool legal in
7
7
  * the current canvas (K9 S8: `v` threw on the desk, and `h` left it in pan with no letter back).
8
8
  */
@@ -18,7 +18,7 @@ export declare const DeskCanvas: import("../../core/src/index").CanvasType;
18
18
  /**
19
19
  * THE PRESET — `createCanvasEngine(DESK_ENGINE)` is the desk the README describes: the six reference objects, the desk's
20
20
  * tools with `desk.select` in hand, the desk canvas as the root, the scale-free zoom (design-015 §9: `ZOOM_MIN`–`ZOOM_MAX`),
21
- * the plain wheel zooming about the pointer, and the zoom-through ON (a wheel that leaves a face covering the view cuts into it).
21
+ * two-axis scrolling, pointer-anchored pinch/modifier zoom, and zoom-through ON (zooming a face to cover the view enters it).
22
22
  * Spread it to add to it: `createCanvasEngine({ ...DESK_ENGINE, widgets: [...DESK_OBJECTS, Mine] })`.
23
23
  */
24
24
  export declare const DESK_ENGINE: {
@@ -33,7 +33,9 @@ export declare const DESK_ENGINE: {
33
33
  readonly max: 100000000;
34
34
  };
35
35
  readonly gestures: {
36
- readonly wheel: "zoom";
36
+ readonly wheel: "pan";
37
+ readonly wheelZoomCurve: "exponential";
38
+ readonly wheelZoomRate: 0.01;
37
39
  };
38
40
  readonly nav: {
39
41
  readonly zoomThrough: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibecook/ice",
3
- "version": "0.16.0",
3
+ "version": "0.17.0",
4
4
  "description": "ICE — infinite canvas engine. The desk: every object under the camera drawn by one WebGPU renderer from a CRDT-synced ECS world, the DOM in screen space. defineObject turns a GPU kind into a canvas citizen — selectable, movable, nested in mini mats, undoable per gesture, collaborative.",
5
5
  "license": "MIT",
6
6
  "author": "James Yong <me@jamesyong42.com>",
@@ -75,12 +75,6 @@
75
75
  "publishConfig": {
76
76
  "access": "public"
77
77
  },
78
- "scripts": {
79
- "typecheck": "tsc --noEmit",
80
- "build": "tsup && tsc -p tsconfig.dts.json && node scripts/fix-dts-specifiers.mjs",
81
- "prepack": "pnpm run pack:audit",
82
- "pack:audit": "pnpm run build && node tools/audit-pack.mjs"
83
- },
84
78
  "dependencies": {
85
79
  "@vibecook/strata-ecs": "0.13.0",
86
80
  "loro-crdt": "^1.13.8",
@@ -100,17 +94,22 @@
100
94
  }
101
95
  },
102
96
  "devDependencies": {
103
- "@ice/core": "workspace:*",
104
- "@ice/desk": "workspace:*",
105
- "@ice/devtools": "workspace:*",
106
- "@ice/dom": "workspace:*",
107
- "@ice/kernel": "workspace:*",
108
- "@ice/objects": "workspace:*",
109
- "@ice/react": "workspace:*",
110
97
  "@types/rbush": "^3.0.3",
111
98
  "@types/react": "^19",
112
99
  "@types/react-dom": "^19",
113
100
  "react": "^19",
114
- "react-dom": "^19"
101
+ "react-dom": "^19",
102
+ "@ice/core": "0.0.0",
103
+ "@ice/desk": "0.0.0",
104
+ "@ice/devtools": "0.0.0",
105
+ "@ice/dom": "0.0.0",
106
+ "@ice/react": "0.0.0",
107
+ "@ice/objects": "0.0.0",
108
+ "@ice/kernel": "0.0.0"
109
+ },
110
+ "scripts": {
111
+ "typecheck": "tsc --noEmit",
112
+ "build": "tsup && tsc -p tsconfig.dts.json && node scripts/fix-dts-specifiers.mjs",
113
+ "pack:audit": "pnpm run build && node tools/audit-pack.mjs"
115
114
  }
116
- }
115
+ }