Skip to content

v2.0.0 — @studiolxd/scorm: framework-agnostic core + multi-framework adapters#2

Merged
studiolxd merged 13 commits into
mainfrom
feat/agnostic-core
Jun 15, 2026
Merged

v2.0.0 — @studiolxd/scorm: framework-agnostic core + multi-framework adapters#2
studiolxd merged 13 commits into
mainfrom
feat/agnostic-core

Conversation

@studiolxd

Copy link
Copy Markdown
Owner

Breaking. Renames @studiolxd/react-scorm@studiolxd/scorm (2.0.0) and turns the package into a framework-agnostic core with thin adapters. Going straight to 2.0.0 — 1.1.0 is not published standalone.

What's included

Core (framework-agnostic, subpath .)

  • createScormSession(version, options) — observable session (on/off/destroy, reactive status)
  • Vanilla autoTerminate(session) / autoCommit(session, ms) helpers (the React hooks now delegate to these)
  • All existing engine code (locator, drivers, ScormApi, mock, Result) — zero framework imports

Adapters (subpaths)

  • ./reactScormProvider, useScorm, useScormSession (now useSyncExternalStore), useScormAutoTerminate/Commit
  • ./vueuseScorm() composable
  • ./angularprovideScorm() + SCORM token — decorator-free, builds as plain ESM (no ng-packagr). Angular 17+
  • ./sveltecreateScormStore()
  • ./wc<scorm-session> Web Component (SSR-safe, auto-registers)
  • IIFE/global build window.Scorm (dist/scorm.global.js) for <script>/CDN

Packaging

  • exports map per subpath; framework deps are optional peer dependencies; sideEffects only on ./wc

Docs & tooling

  • llms.txt (shipped), AGENTS.md, README rewrite + import fixes across 6 languages
  • skills/ — single source → Claude Code plugin/marketplace, Cursor .mdc, portable baseline
  • Example app: migrated to @studiolxd/scorm/react + new Vanilla / Web Component tab

Verification

  • 415 tests green (+28: session, vanilla lifecycle, WC, Vue/Svelte/Angular adapters)
  • typecheck clean; all 6 entries build with .d.ts (incl. Angular as plain ESM); example builds + lints

Follow-ups (not in this PR)

  • Angular 17+ CI smoke test (real AOT compile) — adapter validated by the dts build + a structural test
  • Full translation of the non-English READMEs (imports already corrected)
  • npm deprecate @studiolxd/react-scorm — only at publish time

See docs/PLAN-agnostic-core.md for the full plan and rationale.

🤖 Generated with Claude Code

studiolxd and others added 8 commits June 15, 2026 15:49
BREAKING: package renamed @studiolxd/react-scorm → @studiolxd/scorm.
React adapter now at the ./react subpath.

- Move package packages/react-scorm → packages/scorm; name @studiolxd/scorm@2.0.0
- Split entries: "." = framework-agnostic core (no React imports), "./react" = adapter
- New createScormSession() observable session (on/off/destroy emitter)
- Extract autoTerminate/autoCommit to framework-agnostic src/lifecycle; React hooks
  now delegate to them; useScormSession uses useSyncExternalStore over session
- Provider builds a ScormSession and exposes it via context
- tsup multi-entry (index, react) + IIFE global build (window.Scorm) for <script>/CDN
- package.json: exports map (., ./react), unpkg/jsdelivr, optional framework peers
- Migrate example app imports to @studiolxd/scorm/react
- 408 tests green (14 new for session + vanilla lifecycle); typecheck + builds OK

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- ./wc: <scorm-session> custom element (vanilla, SSR-safe, auto-registers)
- ./vue: useScorm() composable (shallowRef + onScopeDispose)
- ./svelte: createScormStore() (readable store)
- ./angular: provideScorm() + SCORM token — decorator-free, builds as plain ESM
  (no ng-packagr), Angular >=17 (signals/DestroyRef); validated via tsup dts build
- tsup: 6 entries; exports for ./wc ./vue ./angular ./svelte; sideEffects only wc
- framework devDeps (@angular/core, vue, svelte, rxjs) for type builds
- 415 tests green (+7 adapter/WC tests); typecheck + full build OK

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- packages/scorm/llms.txt: LLM-friendly API overview (shipped in the tarball)
- AGENTS.md: repo conventions for AI coding agents
- README.md (en): new name, entry-points table, vanilla quickstart, Vue/Angular/
  Svelte/WC/CDN snippets, useScormSession reactive note
- Fix import/install lines across all language READMEs to @studiolxd/scorm[/react]

Note: non-English README prose still needs a full translation pass (follow-up).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- source/skill.md: canonical skill teaching @studiolxd/scorm usage
- scripts/build.mjs: generates Claude Code plugin+marketplace, Cursor .mdc rule,
  and a portable AGENTS-style baseline from the single source
- build/: generated outputs; README explains per-tool install + distribution

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
New PlatformsSection demonstrates createScormSession() (vanilla) and the
<scorm-session> Web Component, both in mock mode, independent of the React provider.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…m-example

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- tests/angular-smoke/: minimal Angular 17 standalone app using provideScorm() +
  inject(SCORM); compiles the decorator-free adapter in AOT/production
- .github/workflows/angular-smoke.yml: build lib → npm pack → install into fixture →
  ng build --configuration production (Angular 17, the documented floor)
- Verified locally: Angular 17 AOT production build succeeds against the packed
  plain-ESM @studiolxd/scorm/angular (no ng-packagr needed)
- Plan §11 acceptance criterion met

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
react-scorm Ready Ready Preview, Comment Jun 15, 2026 7:36pm

- Update English root + example READMEs to 2.0.0 (new name, agnostic core,
  entry-points table, 10 demo sections incl. Vanilla/WC)
- Re-translate all 15 non-English READMEs (root, packages/scorm, example × 5 langs)
  from the updated English sources — structure-identical, code/identifiers/nav line
  preserved
- Plan: translation follow-up marked done

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Review finding: example/package.json still declared @studiolxd/react-scorm@^1.0.1 (the renamed-away package), leaving a dangling node_modules symlink to the deleted packages/react-scorm and stale package-lock entries — a potential npm ci break. Build only passed via workspace hoisting.

- example/package.json: dependency -> @studiolxd/scorm; root name -> @studiolxd/scorm-monorepo; removed leftover packages/react-scorm/ dir; regenerated clean lockfile (npm ci --dry-run in sync); 415 tests + example build green

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- wc: announce initial state before auto-wiring so auto-terminate yields a distinct initialized event instead of a duplicate initial one

- vue: return destroy() and guard onScopeDispose with getCurrentScope() — no silent session leak when used outside an effect scope

- svelte: readable pushes the current status on subscribe so late subscribers do not see the stale creation-time snapshot

+4 tests (419 total); typecheck + build green

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…lup on Linux)

npm/cli#4828: a macOS-generated lockfile makes npm ci skip @rollup/rollup-linux-x64-gnu on the Linux runner, breaking tsup. npm install re-resolves the platform binary.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…nal-dep fix)

npm install alone still respected the macOS lockfile and skipped @rollup/rollup-linux-x64-gnu. Removing package-lock.json forces a fresh platform-correct resolution on the runner (npm/cli#4828).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@studiolxd studiolxd merged commit cae53f0 into main Jun 15, 2026
4 checks passed
@studiolxd studiolxd deleted the feat/agnostic-core branch June 15, 2026 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant