@charisol/plexo-sdk 2.0.18 → 2.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -250,6 +250,8 @@ The editor fills its container (give the parent a height), and it is client-only
250
250
  | **Host prop** — needs the host's server, accounts or secrets | `<V2Editor … />` props | saving (`onSave`, `onPublish`, `autoSave`), files (`onUpload`, `onUploadFont`, `media`, `stockImages`), AI (`onAskSol`), brand colours (`colors`), ready-made sections (`sections`), link targets (`linkTargets`), where forms send (`formAction`, `apiKey`, `templateId`), permissions (`readOnly`, `commentMode`), header slots, turning panels off (`features`) |
251
251
  | **Separate entry** — no React, runs on a server | `@charisol/plexo-sdk/v2/compile` | `compilePageToHtml`, `compilePageToReact`, `parsePages`, `convertLegacyDesign`, frame sizes, `computePlacements` |
252
252
 
253
+ **Streaming SOL.** `onAskSol(question, context, io)` may stream: call `io.onText(replySoFar)` with the whole reply each time more arrives (the panel shows it growing), and watch `io.signal` — it aborts when the owner presses Stop. Return the full reply at the end. Hosts that ignore `io` and just return the reply keep working. Add `solAutoApply` and each change SOL writes (the fenced `plexo-commands` list) is made on the page the moment it has arrived, so the page changes while SOL is still answering; one Undo takes back the whole answer. Without `solAutoApply` the owner still reviews and presses Apply. `context` also carries `nodeName` and the panel's earlier `history`, so follow-ups like "make it shorter" make sense. `readStreamingSolReply` (exported) is the incremental reader, if a host builds its own panel.
254
+
253
255
  Nothing is faked when a prop is missing: with no `onAskSol` the SOL button is hidden, with no `onSave` there is no Save button, with no `onUpload` images are embedded in the design (up to 1.5 MB) with a clear message beyond that; with no `onUploadFont` the font picker offers Google Fonts only (no "Add a font" button). Uploaded fonts are stored in the design system (`designSystem.fonts`) and compiled to `@font-face` rules; if the host stores font files on another origin, pass it to `sanitizeV2Html(html, { fontOrigins: [...] })`. `compilePageToHtml` also returns `head` (font `<link>` tags) and `fontLinks` for hosts that place `html` + `css` in their own page. No provider key ever lives in the browser — AI and stock-image search go through the host, as in V1.
254
256
 
255
257
  ### Theming the editor