You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Two packaging improvements for embedding hosts. First, `yjs` and `y-protocols` are now required peer dependencies instead of being bundled, so your app and Apollon share a single Yjs instance — no duplicate payload and no cross-instance document errors. Second, a new `@tumaet/apollon/external` entry exposes the same imperative `ApollonEditor` API as the default entry but leaves **every** dependency external (React, xyflow, Base UI, lucide, @dnd-kit, zustand, uuid, @chenglou/pretext, …) — so a bundler host of any framework resolves and de-duplicates each one from its own `node_modules` and gets full supply-chain / SBOM visibility, instead of a copy inlined invisibly into the bundle. The default `@tumaet/apollon` (self-contained) and `@tumaet/apollon/react` entries are unchanged. Action required only if you adopt the new entry or the Yjs peer: install the corresponding peers (most package managers do this automatically).
`@chenglou/pretext`), which arrive transitively with the package. Your bundler
77
+
resolves and de-duplicates each one against your app's `node_modules`, and your
78
+
bundle analyzer / SBOM tooling sees them as real packages instead of code
79
+
inlined invisibly into one chunk. Use it from any framework with a bundler,
80
+
including non-React ones (the editor still runs on the React you provide
81
+
internally; your own code never touches it).
82
+
45
83
## Type definitions
46
84
47
-
Types ship with the package (`dist/index.d.ts`) and are identical for both subpaths. Requires TypeScript 5.0+ with `moduleResolution: "bundler" | "node16" | "nodenext"`.
85
+
Types ship with the package (`dist/index.d.ts`) and are identical for every subpath. Requires TypeScript 5.0+ with `moduleResolution: "bundler" | "node16" | "nodenext"`.
|`@tumaet/apollon`_(default)_| bundled |~2.4 MB | Any framework that doesn't already have React installed — Angular (the primary use case for [Artemis](https://artemis.tum.de/)), Vue, Svelte, vanilla JS. Zero peer deps to install. |
22
-
|`@tumaet/apollon/react`| externalized |~875 KB | React 18.3 hosts that want to share their React instance with the editor and dedupe the bundle. |
|`@tumaet/apollon`_(default)_| all bundled (except Yjs) | No bundler — vanilla JS, a `<script>` tag, or a CDN. Also any framework without React installed: Angular ([Artemis](https://artemis.tum.de/)), Vue, Svelte. Self-contained; only `yjs` + `y-protocols` to install. |
22
+
|`@tumaet/apollon/react`| React family external | A React 19 host that shares its own React instance with the editor and wants the `<Apollon>` component. |
23
+
|`@tumaet/apollon/external`| everything external | A bundler host of any framework — Angular, Vue, Svelte, React — that wants one shared, fully auditable copy of every dependency. |
23
24
24
-
`peerDependenciesMeta.optional` covers all peers — `npm install @tumaet/apollon` never warns about missing React.
25
+
`peerDependenciesMeta.optional` covers the React-family peers (`react`, `react-dom`, `@xyflow/react`), so `npm install @tumaet/apollon` never warns about missing React. `yjs` and `y-protocols` are required peers of all builds — they power Apollon's document model and undo/redo (and live collaboration when enabled), so the editor needs them either way, and keeping them external lets a host that already uses Yjs own a single instance. Most package managers add them automatically. The `/external` entry additionally externalizes Apollon's own runtime deps (`@base-ui/react`, `lucide-react`, `@dnd-kit`, `zustand`, `uuid`, `@chenglou/pretext`), which install transitively with the package.
0 commit comments