Skip to content

feat(solid): [WIP] Add wrapper implementation for SolidJS as @superdoc-dev/solid#3292

Draft
msviderok wants to merge 10 commits into
superdoc-dev:mainfrom
msviderok:feat/solidjs-implementation
Draft

feat(solid): [WIP] Add wrapper implementation for SolidJS as @superdoc-dev/solid#3292
msviderok wants to merge 10 commits into
superdoc-dev:mainfrom
msviderok:feat/solidjs-implementation

Conversation

@msviderok
Copy link
Copy Markdown

@msviderok msviderok commented May 14, 2026

Summary

Adds SolidJS wrapper package @superdoc-dev/solid.

This PR introduces a Solid-native SuperDocEditor component which is practically identical to @superdoc-dev/react with the only differences being the framework-specific lifecycle/state management parts.

What Changed

  • Added packages/solid as a new workspace package
  • Implemented SuperDocEditor for SolidJS
  • Copied and adjusted all the .md and config files to match packages/react
  • Added Solid-specific TypeScript types derived from the core superdoc constructor config
  • Copied and modified SuperDocEditor.test.tsx from `packages/react to keep the tests intact in terms of logic/behaviour/visual aspects
  • Added semantic-release config and scripts/publish-solid.cjs for publishing @superdoc-dev/solid
  • Updated workspace/catalog dependencies and lockfile with the Solid-related packages

What differs from packages/react

  • Miscellaneous files:
    • "find-and-replace"-ed React to Solid
    • changed examples in .md files to adhere to Solid practices
  • src/utils:
    • the only utility needed is shallowJsonEqual due to fine-grained reactivity of Solid negating the need for the rest of React-specific ones
    • test file is unnecessary as the original one didn't cover shallowJsonEqual

Testing

  • Added packages/solid/src/SuperDocEditor.test.tsx
  • Solid package can be tested with:
pnpm --filter @superdoc-dev/solid test

⚠️ For some reason, SuperDocEditor.test.tsx testsuite passes but with a post-error. Currently, I'm in progress resolving this issue, related to: discord conversation

TypeError: Cannot read properties of undefined (reading 'state')
 ❯ createCommentForTrackChanges ../superdoc/dist/superdoc.es.js:3455:30
    3453|    }
    3454|   });
    3455|   const { tr } = editor.view.state;
       |                              ^
    3456|   tr.setMeta(CommentsPluginKey, { type: "force" });
    3457|   editor.view.dispatch(tr);
 ❯ bootstrapImportedTrackedChangeComments ../superdoc/dist/superdoc.es.js:3333:3
 ❯ Timeout._onTimeout ../superdoc/dist/superdoc.es.js:3383:4
 ❯ listOnTimeout node:internal/timers:605:17
 ❯ processTimers node:internal/timers:541:7

Test Files  1 passed (1)
      Tests  20 passed | 3 skipped (23)
     Errors  12 errors

@msviderok msviderok changed the title feat(solid): Add wrapper implementation for SolidJS as @superdoc-dev/solid feat(solid): Add wrapper implementation for SolidJS as @superdoc-dev/solid *[WIP]* May 14, 2026
@msviderok msviderok changed the title feat(solid): Add wrapper implementation for SolidJS as @superdoc-dev/solid *[WIP]* feat(solid): [WIP] Add wrapper implementation for SolidJS as @superdoc-dev/solid May 14, 2026
@caio-pizzol caio-pizzol self-assigned this May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants