Skip to content

Utility for a markwhen view to communicate with hosting app

Notifications You must be signed in to change notification settings

mark-when/view-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Mar 22, 2025
8779749 · Mar 22, 2025

History

38 Commits
Mar 22, 2025
Apr 3, 2023
Nov 21, 2023
Mar 22, 2025
Mar 22, 2025
Apr 3, 2023
Sep 1, 2023

Repository files navigation

Markwhen view client

Usage

import { useLpc } from "@markwhen/view-client"

const { postRequest } = useLpc({
  markwhenState(ms) {
    // When there is some state change from the editor
    console.log(ms)
  }
  appState(newState) {
    // When the app state changes (dark mode, hovering event, selected event, etc)
    console.log(newState)
  }
})

Changelog

1.4.4

  • Bump deps

1.4.3

  • Bump parser
  • Add close function to close sockets and/or remove event listeners

1.4.2

  • VS code support

1.4.1

  • Error if nothing to post to

1.4.0

  • Separate state into appState and markwhenState instead of sending both at the same time

1.3.0

  • Bump parser (0.9.1)
  • Support for imports

1.2.1

  • Bump parser (0.8.1)
  • Add colorMap to appState

1.1.1

  • Use initially set state even if we have a socket connection

1.1.0

  • Add websocket support

About

Utility for a markwhen view to communicate with hosting app

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published