@vibecook/ice 0.16.0-portals.3 → 0.16.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 (37) hide show
  1. package/dist/{chunk-NB4ALBIY.js → chunk-BH5AFWJX.js} +57 -215
  2. package/dist/chunk-BH5AFWJX.js.map +1 -0
  3. package/dist/{chunk-SUNUMQLC.js → chunk-REJTEK3V.js} +214 -14
  4. package/dist/chunk-REJTEK3V.js.map +1 -0
  5. package/dist/{chunk-SHU3HVMF.js → chunk-Y7K6CHSF.js} +21 -1
  6. package/dist/chunk-Y7K6CHSF.js.map +1 -0
  7. package/dist/{chunk-6VY7I6VA.js → chunk-ZTY2VRIS.js} +2 -2
  8. package/dist/desk-kit.js +2 -6
  9. package/dist/desk-objects.js +17 -10
  10. package/dist/desk-objects.js.map +1 -1
  11. package/dist/desk.js +7 -5
  12. package/dist/devtools.js +1 -1
  13. package/dist/dom.js +2 -2
  14. package/dist/index.js +3 -1
  15. package/dist/react.js +9 -5
  16. package/dist/react.js.map +1 -1
  17. package/dist/types/packages/core/src/facade/create-canvas-engine.d.ts +2 -1
  18. package/dist/types/packages/core/src/index.d.ts +1 -1
  19. package/dist/types/packages/core/src/systems/held.d.ts +5 -1
  20. package/dist/types/packages/core/src/widget/held-tools.d.ts +35 -0
  21. package/dist/types/packages/desk/src/compose/marks.d.ts +17 -4
  22. package/dist/types/packages/desk/src/compose/reflector.d.ts +5 -2
  23. package/dist/types/packages/desk/src/host/index.d.ts +1 -0
  24. package/dist/types/packages/desk/src/host/live-texture.d.ts +70 -0
  25. package/dist/types/packages/desk/src/index.d.ts +1 -1
  26. package/dist/types/packages/desk/src/kinds/world.d.ts +16 -6
  27. package/dist/types/packages/desk/src/kit/live.d.ts +11 -71
  28. package/dist/types/packages/desk/src/theme.d.ts +12 -0
  29. package/dist/types/packages/objects/src/board/board-pen.d.ts +1 -1
  30. package/dist/types/packages/objects/src/calendar/hand.d.ts +5 -1
  31. package/dist/types/packages/objects/src/notebook/leaf.d.ts +1 -1
  32. package/dist/types/packages/react/src/selection-menu.d.ts +4 -1
  33. package/package.json +1 -1
  34. package/dist/chunk-NB4ALBIY.js.map +0 -1
  35. package/dist/chunk-SHU3HVMF.js.map +0 -1
  36. package/dist/chunk-SUNUMQLC.js.map +0 -1
  37. /package/dist/{chunk-6VY7I6VA.js.map → chunk-ZTY2VRIS.js.map} +0 -0
@@ -8,7 +8,7 @@ import {
8
8
  Viewport,
9
9
  defineQuery,
10
10
  writeRuntimeResource
11
- } from "./chunk-SHU3HVMF.js";
11
+ } from "./chunk-Y7K6CHSF.js";
12
12
  import {
13
13
  clientToScreen,
14
14
  screenSizeOf,
@@ -706,4 +706,4 @@ export {
706
706
  createDeskHost,
707
707
  DOM_VERSION
708
708
  };
709
- //# sourceMappingURL=chunk-6VY7I6VA.js.map
709
+ //# sourceMappingURL=chunk-ZTY2VRIS.js.map
package/dist/desk-kit.js CHANGED
@@ -49,7 +49,6 @@ import {
49
49
  chainBytes,
50
50
  clip,
51
51
  clipOf,
52
- createLiveTexture,
53
52
  createMemoryBlobStore,
54
53
  createServices,
55
54
  createSight,
@@ -113,7 +112,6 @@ import {
113
112
  settled,
114
113
  shaderText,
115
114
  spring,
116
- stillLive,
117
115
  strokeRow,
118
116
  strokeSeed,
119
117
  tailBase,
@@ -123,9 +121,9 @@ import {
123
121
  visibleRect,
124
122
  worldBounds,
125
123
  writeChanged
126
- } from "./chunk-NB4ALBIY.js";
124
+ } from "./chunk-BH5AFWJX.js";
127
125
  import "./chunk-RTBW5AIZ.js";
128
- import "./chunk-SHU3HVMF.js";
126
+ import "./chunk-Y7K6CHSF.js";
129
127
  import "./chunk-RE4GDHFJ.js";
130
128
  export {
131
129
  BLOB_STORE,
@@ -178,7 +176,6 @@ export {
178
176
  chainBytes,
179
177
  clip,
180
178
  clipOf,
181
- createLiveTexture,
182
179
  createMemoryBlobStore,
183
180
  createServices,
184
181
  createSight,
@@ -242,7 +239,6 @@ export {
242
239
  settled,
243
240
  shaderText,
244
241
  spring,
245
- stillLive,
246
242
  strokeRow,
247
243
  strokeSeed,
248
244
  tailBase,
@@ -8,7 +8,7 @@ import {
8
8
  rasterPriority,
9
9
  stringProp,
10
10
  writable
11
- } from "./chunk-SUNUMQLC.js";
11
+ } from "./chunk-REJTEK3V.js";
12
12
  import "./chunk-BKV4ZEU3.js";
13
13
  import {
14
14
  compile,
@@ -110,7 +110,7 @@ import {
110
110
  unproject,
111
111
  worldBounds,
112
112
  writeChanged
113
- } from "./chunk-NB4ALBIY.js";
113
+ } from "./chunk-BH5AFWJX.js";
114
114
  import {
115
115
  bindGroup,
116
116
  bindLayout,
@@ -170,7 +170,7 @@ import {
170
170
  setWidgetProps,
171
171
  tools,
172
172
  trayOpen
173
- } from "./chunk-SHU3HVMF.js";
173
+ } from "./chunk-Y7K6CHSF.js";
174
174
  import {
175
175
  clientToScreen
176
176
  } from "./chunk-RE4GDHFJ.js";
@@ -4136,6 +4136,10 @@ function createBoardPen(opts) {
4136
4136
  const [x, y] = toSurface(G, at[0], at[1]);
4137
4137
  return [f32(x), f32(y)];
4138
4138
  };
4139
+ const boardInHand = () => {
4140
+ const held = heldEntity(world);
4141
+ return held !== void 0 && world.isAlive(held) && opts.isBoard(held) ? held : void 0;
4142
+ };
4139
4143
  const lift = (s, at, now) => {
4140
4144
  const ink = opts.ink();
4141
4145
  const G = opts.geometryOf(s.board);
@@ -4175,8 +4179,7 @@ function createBoardPen(opts) {
4175
4179
  };
4176
4180
  return {
4177
4181
  follow(now) {
4178
- const held = heldEntity(world);
4179
- const board2 = held !== void 0 && world.isAlive(held) && opts.isBoard(held) ? held : void 0;
4182
+ const board2 = boardInHand();
4180
4183
  if (last !== null && last.board !== board2) {
4181
4184
  if (stroke !== null && stroke.board === last.board) {
4182
4185
  lift(stroke, void 0, now);
@@ -4245,7 +4248,7 @@ function createBoardPen(opts) {
4245
4248
  ...screen !== void 0 ? { screen: [screen.x, screen.y], t: now } : {}
4246
4249
  });
4247
4250
  },
4248
- idle: () => stroke === null && last === null && heldEntity(world) === void 0,
4251
+ idle: () => stroke === null && last === null && boardInHand() === void 0,
4249
4252
  live: () => stroke === null ? null : { board: stroke.board, samples: stroke.points.length },
4250
4253
  commits: () => commits
4251
4254
  };
@@ -7427,7 +7430,8 @@ function createCalendarHand(opts) {
7427
7430
  for (const pad of [...homes.keys()]) if (!world.isAlive(pad) || !world.has(pad, PadSelection)) homes.delete(pad);
7428
7431
  },
7429
7432
  idle() {
7430
- if (heldEntity(world) !== void 0 || hands.size > 0 || peeked.size > 0 || marked.size > 0 || homes.size > 0 || glides.length > 0) return false;
7433
+ const held = heldEntity(world);
7434
+ if (held !== void 0 && opts.isPad?.(held) === true || hands.size > 0 || peeked.size > 0 || marked.size > 0 || homes.size > 0 || glides.length > 0) return false;
7431
7435
  const pads = opts.pads();
7432
7436
  if (pads?.rollOwed() === true) return false;
7433
7437
  if (pads?.busy() === true && (world.resourceStamp(PointerVersion) !== seenPointer || world.resourceStamp(Camera) !== seenCamera)) return false;
@@ -10544,6 +10548,10 @@ function createNotebookHand(opts) {
10544
10548
  books.face(book, face);
10545
10549
  if (at !== spreadOf(books, book)) write(books, book, at);
10546
10550
  };
10551
+ const bookInHand = () => {
10552
+ const held = heldEntity(world);
10553
+ return held !== void 0 && world.isAlive(held) && opts.isBook(held) ? held : void 0;
10554
+ };
10547
10555
  const onPage = (G, at, s) => {
10548
10556
  const h = pageHitAt(G, at[0], at[1]);
10549
10557
  if (h === null || h.part !== "page") return null;
@@ -10583,10 +10591,9 @@ function createNotebookHand(opts) {
10583
10591
  });
10584
10592
  };
10585
10593
  return {
10586
- idle: () => stroke === null && turn === null && inHand === null && heldEntity(world) === void 0,
10594
+ idle: () => stroke === null && turn === null && inHand === null && bookInHand() === void 0,
10587
10595
  follow(now) {
10588
- const held = heldEntity(world);
10589
- const book = held !== void 0 && world.isAlive(held) && opts.isBook(held) ? held : void 0;
10596
+ const book = bookInHand();
10590
10597
  if (stroke !== null && !world.isAlive(stroke.book)) {
10591
10598
  opts.books()?.write(stroke.book, null);
10592
10599
  stroke = null;