Skip to content

Releases: jpcamara/lexxy-realtime

lexxy-realtime 0.5.0

Choose a tag to compare

@jpcamara jpcamara released this 12 Aug 07:21

Changed

  • yrby-client is a regular dependency instead of being bundled into the
    npm package's dist. Consumers resolve one copy of the provider (shared
    with any direct yrby-client use), and the version relationship is an
    explicit ^0.5.0 instead of whatever was inlined at build time. The
    Rails gem's import-map asset still bakes everything in and is unchanged.

Fixed

  • The npm package ships real TypeScript declarations. package.json pointed
    types at dist/lexxy-realtime.d.ts, a file the build never produced, so
    strict TypeScript consumers failed with TS7016. types/lexxy-realtime.d.ts
    now declares Collaboration and setConsumer and re-exports
    YrbyProvider's types from yrby-client. The test suite compiles a strict
    consumer against the declarations, including an @anycable/web consumer.
  • The AnyCable example calls createConsumer from @anycable/web. The
    README and the setConsumer docs showed createCable(), whose native
    Cable has no subscriptions and fails as a consumer when an editor
    mounts. The ActionCable-compat createConsumer() is the supported shape,
    pinned by a compile-time check.

v0.4.0

Choose a tag to compare

@jpcamara jpcamara released this 08 Aug 17:33

Added

  • The lexxy-realtime Rails gem, first release: has_collaborative_rich_text
    (with encrypted: true through Y::EncryptedDocument and
    ActionText::EncryptedRichText), collaborative_rich_textarea,
    field-scoped signed tokens, write-through rendering to Action Text via
    Y::Lexxy, and an install generator for the channel, tables, and
    import-map pins. Storage comes from yrby-rails.

  • Import maps work with no bundler: the Rails gem ships pinnable builds
    (lexxy_realtime/lexical.js, lexxy_realtime/lexxy.js,
    lexxy_realtime/lexxy-realtime.js, each readable with a sourcemap
    plus a .min.js, following Lexxy's gem asset layout), and the
    install generator adds the pins when config/importmap.rb exists. lexical is the one
    module the Lexxy and lexxy-realtime bundles share, so both are built
    with it external and it resolves through its own pin; the
    @37signals/lexxy pin must point at this gem's build, since Lexxy's
    own asset bundles a second lexical. A stopgap until Lexxy ships
    import-map-ready builds.

  • Zero-config element: with no consumer, doc, or provider assigned, the
    element creates a shared Action Cable consumer (from the standard
    action-cable-url meta tag, falling back to /cable), builds its own
    doc and provider, and connects itself. setConsumer(consumerOrFactory)
    sets the app-wide default for other transports such as @anycable/web;
    a consumer assigned directly on an element still wins. The element now
    also exposes doc, like provider and awareness.

  • A document opened for the first time on a record with an existing body
    seeds the collaborative document from the editor's server-rendered
    value, instead of clearing it to an empty paragraph. Existing documents
    load exactly as before. Two first-ever openers can both seed, the same
    check-then-act race as Lexical's CollaborationPlugin (whose docs call
    client bootstrap dev-only); accepted knowingly, since the duplicate is
    confined to a document's first open, visible, and easily deleted.

  • Attachments work under collaboration: an attachment created by one
    collaborator materializes for every peer and for late joiners. Uploads
    sync live (progress bar and error state; a finished upload no longer
    leaves a zombie placeholder), server-generated previews (PDFs) render
    their poll-until-ready placeholder, remote placeholders drop the
    "NaN undefined" size caption, and re-binding the element keeps the
    exclusions. The browser e2e covers the scenarios.

Changed

  • The runtime constructor shims are gone. Lexxy constructs attachment
    nodes bare (basecamp/lexxy#1196), which retires the no-arg constructor
    probe, the guarded subclass swap, the constructor lookup patch, and the
    mutation-listener re-key. What remains: the unsyncable-property
    exclusions (file, editor, previewSrc, uploadUrl,
    blobUrlTemplate), keyed by node type and passed to createBinding,
    and the CollabElementNode.splice patch, a separate @lexical/yjs
    empty-bootstrap issue.
  • The @37signals/lexxy peer floor is ^0.9.29, the first release with
    the constructor fix; earlier versions throw at bind. CI installs it
    from the registry instead of overlaying a dist built from the merge
    commit.

v0.3.0

Choose a tag to compare

@jpcamara jpcamara released this 14 Jul 01:56

Fixed

  • The element-managed wiring works. When the host supplies only a cable consumer plus attributes, the element builds its own YrbyProvider — which does not auto-connect — and nothing ever connected it, so that wiring produced a dead editor. The element now connects a provider it created and still leaves host-supplied providers alone.

Added

  • TypeScript declarations, covering the <lexxy-collaboration> element (both wirings, all attributes), the provider surface the element requires, and the YrbyProvider re-export.
  • The browser e2e suite runs in CI (real Chrome). It is the only suite that exercises the actual editor binding and the runtime shims; before, CI ran only the build and the headless protocol tests.
  • README sections for persisting to ActionText with server-side rendering (Y::Lexxy) and Turbo Drive, plus a typing GIF and a live presence GIF captured from real browsers.

Changed

  • The README leads with the provider contract: lexxy-realtime works with any Yjs provider, assumes yrby only when you don't supply one, and never requires yrby-client on the bring-your-own-provider path.
  • Bundles yrby-client 0.5.0 from the registry (adds provider.whenSynced); the vendored-tarball workaround is gone.
  • package.json declares sideEffects, ships types, adds keywords, and drops the unused @anycable/web peer dependency.

Full changelog: v0.2.1...v0.3.0