Releases: spencerc99/playhtml
[email protected]
Minor Changes
-
cd467ce: Add page-level shared data and presence API
playhtml.createPageData(name, default)for named persistent data channels not tied to DOM elementsplayhtml.presencefor unified per-user presence with named channels,isMeflag, and channel-scopedonPresenceChange- Deprecate
playhtml.cursorClientin favor ofplayhtml.presence
-
6b0964f: Add
playhtml.createPresenceRoom(name)— creates a domain-scoped presence-only room connection. Returns aPresenceRoomwith aPresenceAPIinstance and adestroy()cleanup function. Useful for cross-page coordination like lobbies, page directories, and ambient social awareness without cursor rendering overhead.
Patch Changes
- bdfa16f: Fix phantom duplicate cursors when same user has multiple tabs open on the same URL. Cursors are now deduplicated by publicKey instead of Yjs clientId. Also fixes scroll lag for inactive cursors by switching absolute-mode cursors to position:absolute (browser-native scroll compositing) and replacing the 150ms scroll debounce with requestAnimationFrame throttle.
- Updated dependencies [cd467ce]
- Updated dependencies [6b0964f]
- @playhtml/[email protected]
@playhtml/[email protected]
Patch Changes
- 8d34468: Fix React can-* elements (CanMove, CanSpin, CanGrow, CanToggle) not applying visual updates. The built-in capability's updateElement (which applies CSS transforms, class toggles, etc.) was being overwritten by the React state updater instead of composed with it.
- Updated dependencies [bdfa16f]
- Updated dependencies [cd467ce]
- Updated dependencies [6b0964f]
- [email protected]
- @playhtml/[email protected]
@playhtml/[email protected]
Minor Changes
-
cd467ce: Add page-level shared data and presence API
playhtml.createPageData(name, default)for named persistent data channels not tied to DOM elementsplayhtml.presencefor unified per-user presence with named channels,isMeflag, and channel-scopedonPresenceChange- Deprecate
playhtml.cursorClientin favor ofplayhtml.presence
-
6b0964f: Add
playhtml.createPresenceRoom(name)— creates a domain-scoped presence-only room connection. Returns aPresenceRoomwith aPresenceAPIinstance and adestroy()cleanup function. Useful for cross-page coordination like lobbies, page directories, and ambient social awareness without cursor rendering overhead.
[email protected]
Minor Changes
- 09e380f: Add cursor zones: elements can be registered as zones so that remote cursors are positioned relative to the zone element rather than using absolute viewport coordinates. This enables accurate cursor presence within scrollable containers, embedded editors, and other bounded regions. Adds
CursorZonePositiontype andzonefield to cursor presence in common, cursor zone registry with zone-relative broadcasting and rendering in the core library, anduseCursorZonehook withregisterCursorZone/unregisterCursorZoneon PlayContext in React.
Patch Changes
- b7fc2e6: Fix built-in tag types (can-move, can-spin, etc.) ignoring custom properties set via withSharedState. Previously, only can-play elements read custom defaultData, onDrag, and other overrides from the DOM element. Now built-in tag initializers are merged with any custom properties, allowing withSharedState users to override defaultData and handlers for built-in capabilities. Also fix React setData/setMyAwareness callbacks to look up element handlers by actual tag instead of hardcoding can-play.
- 2d16755: Fix room normalization: strip www. prefix so that www.example.com and example.com resolve to the same room. Use "LOCAL" identifier for file:// protocol rooms (empty host) to make them easily identifiable for cleanup. Default cursor coordinate mode changed to absolute so cursors track document position across scroll and zoom.
- Updated dependencies [09768d4]
- Updated dependencies [09768d4]
- Updated dependencies [09e380f]
- Updated dependencies [2d16755]
- @playhtml/[email protected]
@playhtml/[email protected]
Minor Changes
- 09e380f: Add cursor zones: elements can be registered as zones so that remote cursors are positioned relative to the zone element rather than using absolute viewport coordinates. This enables accurate cursor presence within scrollable containers, embedded editors, and other bounded regions. Adds
CursorZonePositiontype andzonefield to cursor presence in common, cursor zone registry with zone-relative broadcasting and rendering in the core library, anduseCursorZonehook withregisterCursorZone/unregisterCursorZoneon PlayContext in React.
Patch Changes
- b7fc2e6: Fix built-in tag types (can-move, can-spin, etc.) ignoring custom properties set via withSharedState. Previously, only can-play elements read custom defaultData, onDrag, and other overrides from the DOM element. Now built-in tag initializers are merged with any custom properties, allowing withSharedState users to override defaultData and handlers for built-in capabilities. Also fix React setData/setMyAwareness callbacks to look up element handlers by actual tag instead of hardcoding can-play.
- Updated dependencies [b7fc2e6]
- Updated dependencies [09768d4]
- Updated dependencies [09768d4]
- Updated dependencies [09e380f]
- Updated dependencies [2d16755]
- [email protected]
- @playhtml/[email protected]
@playhtml/[email protected]
Minor Changes
- 09768d4: Add can-hover capability for syncing hover state across connected clients via awareness. Style with [data-playhtml-hover] instead of :hover to reflect collaborative hover state.
- 09e380f: Add cursor zones: elements can be registered as zones so that remote cursors are positioned relative to the zone element rather than using absolute viewport coordinates. This enables accurate cursor presence within scrollable containers, embedded editors, and other bounded regions. Adds
CursorZonePositiontype andzonefield to cursor presence in common, cursor zone registry with zone-relative broadcasting and rendering in the core library, anduseCursorZonehook withregisterCursorZone/unregisterCursorZoneon PlayContext in React.
Patch Changes
- 09768d4: Fix can-mirror feedback loops and improve state syncing. Breaks infinite MutationObserver/updateElement loop by disconnecting the observer during remote state application. Moves hover and focus to awareness for ephemeral per-user syncing. Fixes boolean attribute stripping (e.g. details open). Switches to positional child matching to avoid unnecessary DOM destruction. Makes form state sync recursive for nested inputs like radio groups. Adds contenteditable support via input event child syncing. Extracts can-mirror logic into dedicated canMirror.ts file.
- 2d16755: Fix room normalization: strip www. prefix so that www.example.com and example.com resolve to the same room. Use "LOCAL" identifier for file:// protocol rooms (empty host) to make them easily identifiable for cleanup. Default cursor coordinate mode changed to absolute so cursors track document position across scroll and zoom.
we were online extension v0.1.1
closed beta release
we were online v0.1.0
closed beta release
[email protected]
Minor Changes
- 90fa88a: Add cursor animation API:
triggerCursorAnimation(stableId, animationClass, durationMs)applies a CSS class to a cursor element for a given duration. Includes self-cursor support via a temporary ghost cursor element, animation stacking prevention, and guards to prevent position/visibility updates from interfering with active animations. Also improves coordinate conversion to account for browser zoom via visualViewport.
@playhtml/[email protected]
Minor Changes
- 90fa88a: Add cursor animation API:
triggerCursorAnimation(stableId, animationClass, durationMs)applies a CSS class to a cursor element for a given duration. Includes self-cursor support via a temporary ghost cursor element, animation stacking prevention, and guards to prevent position/visibility updates from interfering with active animations. Also improves coordinate conversion to account for browser zoom via visualViewport.
Patch Changes
- Updated dependencies [90fa88a]