@limrun/ui 0.16.0 → 0.17.0-rc.2

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 (73) hide show
  1. package/README.md +64 -0
  2. package/dist/GLTFLoader-Cami_vza.mjs +1679 -0
  3. package/dist/GLTFLoader-DeCLxW_q.js +1 -0
  4. package/dist/components/duo-button-hinge.d.ts +16 -0
  5. package/dist/components/duo-controls.d.ts +21 -0
  6. package/dist/components/duo-flat-frame.d.ts +7 -0
  7. package/dist/components/duo-flat-geometry.d.ts +52 -0
  8. package/dist/components/duo-fold-motion.d.ts +27 -0
  9. package/dist/components/duo-fold-renderer.d.ts +19 -0
  10. package/dist/components/duo-fold-timing.d.ts +1 -0
  11. package/dist/components/duo-frame.d.ts +16 -0
  12. package/dist/components/duo-hardware.d.ts +20 -0
  13. package/dist/components/duo-loading.d.ts +8 -0
  14. package/dist/components/duo-model.d.ts +19 -0
  15. package/dist/components/duo-screen-handoff.d.ts +4 -0
  16. package/dist/components/duo-view.d.ts +9 -0
  17. package/dist/components/remote-control.d.ts +5 -1
  18. package/dist/core/duo.d.ts +63 -0
  19. package/dist/duo-fold-renderer-BXejNHcY.mjs +257 -0
  20. package/dist/duo-fold-renderer-DdltAnF7.js +53 -0
  21. package/dist/duo-frame-Cmw4p2uN.mjs +26767 -0
  22. package/dist/duo-frame-iMtrvx_a.js +4059 -0
  23. package/dist/duo-view-BAh-w2Kz.js +1 -0
  24. package/dist/duo-view-D9Ae00rj.mjs +512 -0
  25. package/dist/index.cjs +1 -1
  26. package/dist/index.css +1 -1
  27. package/dist/index.js +2 -2
  28. package/dist/lite.cjs +1 -1
  29. package/dist/lite.js +1 -1
  30. package/dist/remote-control-B2jZpf3c.js +1 -0
  31. package/dist/remote-control-DiddxS8l.mjs +2883 -0
  32. package/package.json +8 -2
  33. package/dist/demo.d.ts +0 -1
  34. package/dist/remote-control-BRgbD7yo.mjs +0 -2516
  35. package/dist/remote-control-VISrP1zI.js +0 -1
  36. package/index.html +0 -199
  37. package/src/assets/Apple_logo_white.svg +0 -4
  38. package/src/assets/android_boot.gif +0 -0
  39. package/src/assets/android_boot.webp +0 -0
  40. package/src/assets/iphone16pro_black.webp +0 -0
  41. package/src/assets/iphone16pro_black_bg.webp +0 -0
  42. package/src/assets/iphone16pro_black_landscape.webp +0 -0
  43. package/src/assets/iphone16pro_black_landscape_bg.webp +0 -0
  44. package/src/assets/pixel9_black.webp +0 -0
  45. package/src/assets/pixel9_black_landscape.webp +0 -0
  46. package/src/assets/pixel_tablet_landscape.webp +0 -0
  47. package/src/assets/pixel_tablet_portrait.webp +0 -0
  48. package/src/components/device-install/index.ts +0 -1
  49. package/src/components/inspect-overlay.css +0 -223
  50. package/src/components/inspect-overlay.tsx +0 -437
  51. package/src/components/remote-control-framed.tsx +0 -14
  52. package/src/components/remote-control.css +0 -131
  53. package/src/components/remote-control.test.ts +0 -34
  54. package/src/components/remote-control.tsx +0 -3853
  55. package/src/core/ax-fetcher.test.ts +0 -418
  56. package/src/core/ax-fetcher.ts +0 -387
  57. package/src/core/ax-tree.test.ts +0 -491
  58. package/src/core/ax-tree.ts +0 -416
  59. package/src/core/camera.test.ts +0 -155
  60. package/src/core/camera.ts +0 -133
  61. package/src/core/constants.ts +0 -344
  62. package/src/core/webrtc-messages.ts +0 -148
  63. package/src/demo.tsx +0 -269
  64. package/src/frame-assets.ts +0 -22
  65. package/src/hooks/index.ts +0 -1
  66. package/src/index.ts +0 -29
  67. package/src/lite.test.ts +0 -30
  68. package/src/lite.ts +0 -30
  69. package/src/vite-env.d.ts +0 -1
  70. package/tsconfig.json +0 -26
  71. package/tsconfig.node.json +0 -26
  72. package/vite.config.ts +0 -35
  73. package/vitest.config.ts +0 -24
package/README.md CHANGED
@@ -43,3 +43,67 @@ Related browser workflow packages are published separately:
43
43
  ## Releasing
44
44
 
45
45
  This package is not part of generated SDK, hence you need to publish it manually in GitHub Actions.
46
+
47
+ ## iPhone Duo
48
+
49
+ `RemoteControl` discovers native Duo support and starts in 2D with native video
50
+ inside a silver Duo frame, including its hinge spine and physical buttons.
51
+ Both modes share the fold, hinge-angle and rotation toolbar. No model prop is required. Select **3D**
52
+ to load the interactive frame and its model on demand. Returning to **2D** releases
53
+ the renderer and its graphics resources without reconnecting the simulator.
54
+
55
+ ```tsx
56
+ import { RemoteControl } from '@limrun/ui';
57
+
58
+ <RemoteControl url={instanceWebsocketUrl} token={instanceToken} deviceModel="iphone-duo" showFrame />;
59
+ ```
60
+
61
+ The built-in 2D frame and procedural 3D model ship with the UI package; customers
62
+ do not need to host a model file. `deviceModel` can be omitted when native Duo
63
+ capabilities are discovered from the connection. The CLI and API control the
64
+ simulator; the UI package renders its frame.
65
+
66
+ Set `showFrame={false}` for the active display alone, without the frame, hardware
67
+ buttons, viewer toolbar, or 2D/3D toggle. Touch and keyboard input still work, and
68
+ the video follows display and orientation changes without loading a 3D renderer.
69
+
70
+ Use the hinge slider for any angle from 0° closed to 180° flat. In 2D, the active
71
+ display stays flat between folds. A brief folding animation shows the silver frame, hinge and buttons
72
+ when switching displays; 3D shows the physical hinge pose continuously. Touch and drag
73
+ on the visible display interact with iOS. In 3D, position starts unlocked. Drag the frame or
74
+ background, or Alt-drag the screen, to rotate the view. Use Lock position to prevent
75
+ rotation. Rotate device changes the native orientation. Laptop view sets the
76
+ hinge and orientation; it does not enable Apple's separate Table Mode.
77
+
78
+ In either mode, click the frame's Sleep/Wake, Volume Up, or Volume Down buttons to send native
79
+ hardware input. Press and hold is supported. These buttons remain active while
80
+ the position is locked. Hover near an edge to reveal its button icons, then click
81
+ either the icon or the physical button. Volume icons appear together above their
82
+ edge; Sleep/Wake appears beside its edge. Icons follow native rotation and folding.
83
+ Hover raises the physical button slightly without changing the camera framing.
84
+ Tab, Space and Enter also operate the icons. Camera Control is not yet supported.
85
+
86
+ The optional 2D fold animation loads a small WebGL renderer on demand and releases it after each fold.
87
+ Reduced motion or unavailable WebGL keeps the flat display. The full 3D view requires WebGL and renders when video frames arrive or the view changes,
88
+ and pauses while hidden. Duo currently supports single-finger gestures;
89
+ accessibility inspection and the existing recording API do not follow the
90
+ inner display. Use `screenshotDisplay` and `tapDisplay` from the TypeScript
91
+ iOS client for explicit display automation.
92
+
93
+ ### Optional Duo appearance
94
+
95
+ `duoModelUrl` replaces the rigid body with a host-supplied GLB. The host provides
96
+ and licenses the asset; no third-party model is bundled with this package.
97
+ Live simulator screens, hinge control and input remain active. A failed load keeps
98
+ the built-in frame available and reports the error.
99
+
100
+ The prepared model must contain `folding-half` and `stationary-half` groups with
101
+ flat mesh children measured in centimeters. Inner display surfaces lie in the
102
+ XY plane, centered at the hinge with positive Z facing the inner display.
103
+ Material names `inner-screen` and `cover-screen` identify surfaces replaced by live
104
+ video. Optimized models may instead mark those mesh nodes with `extras.sourceDisplay`
105
+ set to `inner` or `outer`, so material deduplication preserves display identity.
106
+ Hardware meshes under `stationary-half` must carry `extras.button` with
107
+ `side`, `volumeUp`, or `volumeDown`. All three are required. This is a prepared Duo
108
+ appearance contract, not a general-purpose GLB viewer. Serve the file on the same
109
+ origin or with suitable CORS headers.