@mocanvas/editor · function
declare function createDeepLinkString(deepLink: TLDeepLink): stringEncode a deep link as a short string.
The encoding is a one-character kind tag followed by dot-separated payload,
chosen so the result needs no percent-encoding in a query string: ids have
their shape: / page: prefixes stripped, and viewport numbers are rounded
to whole page units, which is well below what anyone can see.
SEMANTICS-ASSUMED: the exact wire format. The docs pin the *round trip*
(parseDeepLinkString(createDeepLinkString(x)) equals x) but not the
bytes, and a format nobody else parses is free to be the readable one.
mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.