@charisol/plexo-sdk 1.4.42 → 2.0.2

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.
Files changed (255) hide show
  1. package/README.md +72 -0
  2. package/dist/InlineColorPicker-8ewm1Asx.js +2912 -0
  3. package/dist/client-DlVJt_6V.js +339 -0
  4. package/dist/colorUtils-ohNG3v1i.js +222 -0
  5. package/dist/columnOrder-f5-VOg2T.js +11 -0
  6. package/dist/{compiler-BvseEhDC.js → compiler-Dhpsq71h.js} +121 -120
  7. package/dist/compiler.js +1 -1
  8. package/dist/{compilerClient-BIrZIgfG.js → compilerClient-BC4TGAr9.js} +93 -92
  9. package/dist/compilerClient.js +1 -1
  10. package/dist/{iconSvgStatic-CGue7nyp.js → iconSvgStatic-Lnpg27U9.js} +66 -75
  11. package/dist/index.js +14042 -15423
  12. package/dist/legacy-B4E71HSa.js +16192 -0
  13. package/dist/lint-D-2x-Yeb.js +225 -0
  14. package/dist/{mjmlBrowser-DWk0mRD6.js → mjmlBrowser-wlHcAT8n.js} +2 -2
  15. package/dist/plexo-sdk.css +1 -1
  16. package/dist/rolldown-runtime-B1bRi_D7.js +27 -0
  17. package/dist/sanitize.js +1 -1
  18. package/dist/{sanitizeCompiledHtml-CNjUXlMK.js → sanitizeCompiledHtml-GgGsetm3.js} +673 -698
  19. package/dist/{zoom-in-DL4pfiLG.js → schemas-Bq5o5MfF.js} +916 -2120
  20. package/dist/utilities/colorUtils.d.ts +35 -0
  21. package/dist/utilities/playground.interfaces.d.ts +19 -1
  22. package/dist/v2/V2Editor.d.ts +25 -0
  23. package/dist/v2/compile/build.d.ts +38 -0
  24. package/dist/v2/compile/html.d.ts +18 -0
  25. package/dist/v2/compile/index.d.ts +28 -15
  26. package/dist/v2/compile/react.d.ts +17 -0
  27. package/dist/v2/compile/schema.d.ts +16 -0
  28. package/dist/v2/components/canvas/AlignmentGuidesOverlay.d.ts +7 -0
  29. package/dist/v2/components/canvas/CanvasArea.d.ts +2 -0
  30. package/dist/v2/components/canvas/CanvasControls.d.ts +2 -0
  31. package/dist/v2/components/canvas/ContextualToolbar.d.ts +7 -0
  32. package/dist/v2/components/canvas/DropIndicator.d.ts +6 -0
  33. package/dist/v2/components/canvas/IrView.d.ts +12 -0
  34. package/dist/v2/components/canvas/NodeRenderer.d.ts +12 -0
  35. package/dist/v2/components/canvas/PageFrame.d.ts +9 -0
  36. package/dist/v2/components/canvas/ResizeHandles.d.ts +8 -0
  37. package/dist/v2/components/canvas/SectionToolbar.d.ts +6 -0
  38. package/dist/v2/components/canvas/SpacingOverlay.d.ts +7 -0
  39. package/dist/v2/components/design/AutoUpdateWatcher.d.ts +7 -0
  40. package/dist/v2/components/design/DesignSystemPanel.d.ts +7 -0
  41. package/dist/v2/components/design/ReviewView.d.ts +7 -0
  42. package/dist/v2/components/design/StrataCard.d.ts +8 -0
  43. package/dist/v2/components/design/TidyView.d.ts +15 -0
  44. package/dist/v2/components/design/bits.d.ts +20 -0
  45. package/dist/v2/components/design/useStrataSync.d.ts +51 -0
  46. package/dist/v2/components/layout/ContextMenu.d.ts +2 -0
  47. package/dist/v2/components/layout/EditorShell.d.ts +2 -0
  48. package/dist/v2/components/layout/LeftToolRail.d.ts +2 -0
  49. package/dist/v2/components/layout/PreviewOverlay.d.ts +6 -0
  50. package/dist/v2/components/layout/TopToolbar.d.ts +8 -0
  51. package/dist/v2/components/modals/SettingsModal.d.ts +7 -0
  52. package/dist/v2/components/modals/ShortcutsModal.d.ts +7 -0
  53. package/dist/v2/components/properties/ColorField.d.ts +14 -0
  54. package/dist/v2/components/properties/ElementSettings.d.ts +39 -0
  55. package/dist/v2/components/properties/LinkField.d.ts +26 -0
  56. package/dist/v2/components/properties/PageInspector.d.ts +2 -0
  57. package/dist/v2/components/properties/PropertiesPanel.d.ts +2 -0
  58. package/dist/v2/components/properties/SectionSettings.d.ts +6 -0
  59. package/dist/v2/components/properties/sections/ConstraintsSection.d.ts +7 -0
  60. package/dist/v2/components/properties/sections/LayoutDiagnostics.d.ts +7 -0
  61. package/dist/v2/components/sections/BlockInspector.d.ts +9 -0
  62. package/dist/v2/components/sections/FieldForm.d.ts +14 -0
  63. package/dist/v2/components/sections/ManagedChildNotice.d.ts +7 -0
  64. package/dist/v2/components/sections/SectionThumb.d.ts +11 -0
  65. package/dist/v2/components/sidebar/FlyoutDrawer.d.ts +2 -0
  66. package/dist/v2/components/sidebar/InsertPanel.d.ts +2 -0
  67. package/dist/v2/components/sidebar/LayersPanel.d.ts +2 -0
  68. package/dist/v2/components/sidebar/LibraryPanel.d.ts +3 -0
  69. package/dist/v2/components/sidebar/PagesPanel.d.ts +2 -0
  70. package/dist/v2/components/sidebar/SectionsPanel.d.ts +6 -0
  71. package/dist/v2/components/sidebar/SolPanel.d.ts +3 -0
  72. package/dist/v2/components/sidebar/TemplateChooser.d.ts +13 -0
  73. package/dist/v2/context/BlockContext.d.ts +7 -0
  74. package/dist/v2/context/EditorContext.d.ts +213 -0
  75. package/dist/v2/context/FrameContext.d.ts +3 -0
  76. package/dist/v2/context/ParentLayoutContext.d.ts +10 -0
  77. package/dist/v2/context/PlacementContext.d.ts +4 -0
  78. package/dist/v2/data/blankPage.d.ts +3 -0
  79. package/dist/v2/data/insertableComponents.d.ts +17 -0
  80. package/dist/v2/data/samplePageData.d.ts +3 -0
  81. package/dist/v2/design/audit.d.ts +78 -0
  82. package/dist/v2/design/baseline.d.ts +3 -0
  83. package/dist/v2/design/baselineData.d.ts +3 -0
  84. package/dist/v2/design/components.d.ts +9 -0
  85. package/dist/v2/design/css.d.ts +16 -0
  86. package/dist/v2/design/fonts.d.ts +10 -0
  87. package/dist/v2/design/index.d.ts +11 -0
  88. package/dist/v2/design/lint.d.ts +22 -0
  89. package/dist/v2/design/shades.d.ts +15 -0
  90. package/dist/v2/design/textStyles.d.ts +29 -0
  91. package/dist/v2/design/themes.d.ts +35 -0
  92. package/dist/v2/design/tokens.d.ts +24 -0
  93. package/dist/v2/design/types.d.ts +81 -0
  94. package/dist/v2/host/HostContext.d.ts +176 -0
  95. package/dist/v2/host/SolMark.d.ts +8 -0
  96. package/dist/v2/index.d.ts +19 -11
  97. package/dist/v2/migrate/legacy.d.ts +26 -0
  98. package/dist/v2/render/adapt.d.ts +12 -0
  99. package/dist/v2/render/anchors.d.ts +7 -0
  100. package/dist/v2/render/elementCss.d.ts +7 -0
  101. package/dist/v2/render/elementProps.d.ts +92 -0
  102. package/dist/v2/render/elements.d.ts +32 -0
  103. package/dist/v2/render/formAction.d.ts +33 -0
  104. package/dist/v2/render/frames.d.ts +10 -0
  105. package/dist/v2/render/iconSet.d.ts +5 -0
  106. package/dist/v2/render/ir.d.ts +20 -0
  107. package/dist/v2/render/nodeStyle.d.ts +24 -0
  108. package/dist/v2/render/placement.d.ts +12 -0
  109. package/dist/v2/render/resolve.d.ts +3 -0
  110. package/dist/v2/render/runtime.d.ts +18 -0
  111. package/dist/v2/render/sanitize.d.ts +15 -0
  112. package/dist/v2/render/socialIcons.d.ts +83 -0
  113. package/dist/v2/sections/catalog/about.d.ts +2 -0
  114. package/dist/v2/sections/catalog/announcement.d.ts +2 -0
  115. package/dist/v2/sections/catalog/contact.d.ts +2 -0
  116. package/dist/v2/sections/catalog/cta.d.ts +2 -0
  117. package/dist/v2/sections/catalog/faq.d.ts +2 -0
  118. package/dist/v2/sections/catalog/features.d.ts +2 -0
  119. package/dist/v2/sections/catalog/footer.d.ts +5 -0
  120. package/dist/v2/sections/catalog/gallery.d.ts +2 -0
  121. package/dist/v2/sections/catalog/header.d.ts +2 -0
  122. package/dist/v2/sections/catalog/hero.d.ts +2 -0
  123. package/dist/v2/sections/catalog/logos.d.ts +2 -0
  124. package/dist/v2/sections/catalog/pricing.d.ts +2 -0
  125. package/dist/v2/sections/catalog/stats.d.ts +2 -0
  126. package/dist/v2/sections/catalog/steps.d.ts +2 -0
  127. package/dist/v2/sections/catalog/team.d.ts +2 -0
  128. package/dist/v2/sections/catalog/testimonials.d.ts +2 -0
  129. package/dist/v2/sections/catalog/video.d.ts +2 -0
  130. package/dist/v2/sections/kit.d.ts +64 -0
  131. package/dist/v2/sections/materialize.d.ts +72 -0
  132. package/dist/v2/sections/names.d.ts +6 -0
  133. package/dist/v2/sections/pageTemplates.d.ts +52 -0
  134. package/dist/v2/sections/registry.d.ts +5 -0
  135. package/dist/v2/sections/types.d.ts +103 -0
  136. package/dist/v2/sol/catalogSchema.d.ts +43 -0
  137. package/dist/v2/sol/commands.d.ts +21 -0
  138. package/dist/v2/sol/describe.d.ts +32 -0
  139. package/dist/v2/sol/index.d.ts +7 -0
  140. package/dist/v2/sol/parse.d.ts +10 -0
  141. package/dist/v2/sol/prompt.d.ts +5 -0
  142. package/dist/v2/sol/schema.d.ts +177 -0
  143. package/dist/v2/sol/summarize.d.ts +4 -0
  144. package/dist/v2/strata/autoUpdate.d.ts +37 -0
  145. package/dist/v2/strata/client.d.ts +38 -0
  146. package/dist/v2/strata/index.d.ts +8 -0
  147. package/dist/v2/strata/merge.d.ts +27 -0
  148. package/dist/v2/strata/types.d.ts +115 -0
  149. package/dist/v2/types/editor.d.ts +175 -0
  150. package/dist/v2/utils/css.d.ts +3 -0
  151. package/dist/v2/utils/id.d.ts +3 -0
  152. package/dist/v2-compile.js +138 -7
  153. package/dist/v2-strata.js +2 -0
  154. package/dist/v2.js +11089 -8174
  155. package/package.json +6 -1
  156. package/dist/toReact-BBzjWoFG.js +0 -595
  157. package/dist/v2/ai/commands.d.ts +0 -616
  158. package/dist/v2/ai/dispatch.d.ts +0 -24
  159. package/dist/v2/ai/nodeSchema.d.ts +0 -196
  160. package/dist/v2/brand/BrandColorSwatches.d.ts +0 -4
  161. package/dist/v2/brand/BrandPanel.d.ts +0 -4
  162. package/dist/v2/brand/ChangeSetGallery.d.ts +0 -10
  163. package/dist/v2/brand/StyleSetEditor.d.ts +0 -22
  164. package/dist/v2/canvas/CatalogDragContext.d.ts +0 -27
  165. package/dist/v2/canvas/ContextMenuContext.d.ts +0 -16
  166. package/dist/v2/canvas/DeviceModeContext.d.ts +0 -20
  167. package/dist/v2/canvas/DragEngineContext.d.ts +0 -13
  168. package/dist/v2/canvas/LayoutGuideContext.d.ts +0 -22
  169. package/dist/v2/canvas/PreviewModeContext.d.ts +0 -15
  170. package/dist/v2/canvas/SidebarContext.d.ts +0 -21
  171. package/dist/v2/canvas/StylePainterContext.d.ts +0 -19
  172. package/dist/v2/canvas/WorkspaceThemeContext.d.ts +0 -19
  173. package/dist/v2/canvas/aiTextTransforms.d.ts +0 -24
  174. package/dist/v2/canvas/animationPresets.d.ts +0 -12
  175. package/dist/v2/canvas/constants.d.ts +0 -6
  176. package/dist/v2/canvas/layoutRoles.d.ts +0 -12
  177. package/dist/v2/canvas/modelRect.d.ts +0 -4
  178. package/dist/v2/canvas/rectMath.d.ts +0 -34
  179. package/dist/v2/canvas/reorderMath.d.ts +0 -8
  180. package/dist/v2/canvas/resizeMath.d.ts +0 -16
  181. package/dist/v2/canvas/resolveBoxStyle.d.ts +0 -12
  182. package/dist/v2/canvas/resolveTargetSection.d.ts +0 -10
  183. package/dist/v2/canvas/sectionDividerShapes.d.ts +0 -12
  184. package/dist/v2/canvas/snapping.d.ts +0 -28
  185. package/dist/v2/canvas/useAlignNode.d.ts +0 -10
  186. package/dist/v2/canvas/useClipboardKeyBinding.d.ts +0 -7
  187. package/dist/v2/canvas/useDeleteKeyBinding.d.ts +0 -3
  188. package/dist/v2/canvas/useDragEngine.d.ts +0 -44
  189. package/dist/v2/canvas/useDraggableNode.d.ts +0 -30
  190. package/dist/v2/canvas/useInlineTextEdit.d.ts +0 -29
  191. package/dist/v2/canvas/usePointerEngine.d.ts +0 -22
  192. package/dist/v2/canvas/useResizeHandle.d.ts +0 -12
  193. package/dist/v2/canvas/useResolvedTextStyles.d.ts +0 -13
  194. package/dist/v2/canvas/useSelectionRects.d.ts +0 -13
  195. package/dist/v2/canvas/useUndoRedoKeyBinding.d.ts +0 -8
  196. package/dist/v2/catalog/elementCatalog.d.ts +0 -31
  197. package/dist/v2/catalog/imagePreset.d.ts +0 -7
  198. package/dist/v2/compile/toReact.d.ts +0 -32
  199. package/dist/v2/components/AdornmentLayer.d.ts +0 -20
  200. package/dist/v2/components/AskSolPanel.d.ts +0 -25
  201. package/dist/v2/components/CatalogDragGhost.d.ts +0 -6
  202. package/dist/v2/components/CellBoundary.d.ts +0 -14
  203. package/dist/v2/components/CenterCanvas.d.ts +0 -3
  204. package/dist/v2/components/ContentTabPanel.d.ts +0 -12
  205. package/dist/v2/components/ContextMenu.d.ts +0 -5
  206. package/dist/v2/components/ContextualToolbar.d.ts +0 -25
  207. package/dist/v2/components/ImagesTabPanel.d.ts +0 -15
  208. package/dist/v2/components/LayoutGuidePanel.d.ts +0 -10
  209. package/dist/v2/components/ManageLayersPanel.d.ts +0 -13
  210. package/dist/v2/components/NodeRenderer.d.ts +0 -8
  211. package/dist/v2/components/PreviewOverlay.d.ts +0 -11
  212. package/dist/v2/components/ResizeHandle.d.ts +0 -6
  213. package/dist/v2/components/RightRail.d.ts +0 -13
  214. package/dist/v2/components/SectionDividerOverlay.d.ts +0 -8
  215. package/dist/v2/components/SectionEdgeAddZone.d.ts +0 -17
  216. package/dist/v2/components/SectionGridOverlay.d.ts +0 -10
  217. package/dist/v2/components/SectionNamePill.d.ts +0 -6
  218. package/dist/v2/components/SectionNode.d.ts +0 -5
  219. package/dist/v2/components/SectionSideRail.d.ts +0 -17
  220. package/dist/v2/components/SelectionToolbar.d.ts +0 -11
  221. package/dist/v2/components/StylePainterToast.d.ts +0 -5
  222. package/dist/v2/components/V2Canvas.d.ts +0 -59
  223. package/dist/v2/components/nodes/ButtonNode.d.ts +0 -4
  224. package/dist/v2/components/nodes/ContainerNode.d.ts +0 -11
  225. package/dist/v2/components/nodes/EmbedNode.d.ts +0 -4
  226. package/dist/v2/components/nodes/ImageNode.d.ts +0 -4
  227. package/dist/v2/components/nodes/InputNode.d.ts +0 -4
  228. package/dist/v2/components/nodes/MenuNode.d.ts +0 -18
  229. package/dist/v2/components/nodes/TextNode.d.ts +0 -4
  230. package/dist/v2/inspector/AiQuickEditPanel.d.ts +0 -12
  231. package/dist/v2/inspector/AnimationPanel.d.ts +0 -11
  232. package/dist/v2/inspector/DesignAccordions.d.ts +0 -7
  233. package/dist/v2/inspector/FieldRenderer.d.ts +0 -9
  234. package/dist/v2/inspector/IconPopoverButton.d.ts +0 -9
  235. package/dist/v2/inspector/MenuIconPanel.d.ts +0 -7
  236. package/dist/v2/inspector/MenuManagePanel.d.ts +0 -8
  237. package/dist/v2/inspector/Popover.d.ts +0 -21
  238. package/dist/v2/inspector/SectionDividerPanel.d.ts +0 -9
  239. package/dist/v2/inspector/fieldStyles.d.ts +0 -15
  240. package/dist/v2/inspector/fields/ColorField.d.ts +0 -7
  241. package/dist/v2/inspector/fields/NumberField.d.ts +0 -7
  242. package/dist/v2/inspector/fields/SelectField.d.ts +0 -7
  243. package/dist/v2/inspector/fields/TextField.d.ts +0 -7
  244. package/dist/v2/inspector/fields/TextStyleField.d.ts +0 -11
  245. package/dist/v2/inspector/fields/TextareaField.d.ts +0 -7
  246. package/dist/v2/inspector/schema.d.ts +0 -25
  247. package/dist/v2/inspector/useFieldCommit.d.ts +0 -12
  248. package/dist/v2/store/brandDefaults.d.ts +0 -4
  249. package/dist/v2/store/brandTypes.d.ts +0 -40
  250. package/dist/v2/store/cloneSubtree.d.ts +0 -12
  251. package/dist/v2/store/createBrandStore.d.ts +0 -2
  252. package/dist/v2/store/createCanvasStore.d.ts +0 -2
  253. package/dist/v2/store/seed.d.ts +0 -17
  254. package/dist/v2/store/types.d.ts +0 -163
  255. package/dist/v2/ui/theme.d.ts +0 -85
package/README.md CHANGED
@@ -226,6 +226,78 @@ const json = builderRef.current.getJson();
226
226
 
227
227
  ---
228
228
 
229
+ ## V2 editor — `@charisol/plexo-sdk/v2`
230
+
231
+ A Figma-style visual builder for landing pages and app screens: free, flow or grid layout, per-screen (desktop / tablet / mobile) layouts, and nine ready-made interactive elements (carousel, video, social links, menu, HTML embed, table, countdown timer, form, accordion). A design is plain JSON — an array of pages, each a tree of nodes — and a compiler turns it into HTML or a React component.
232
+
233
+ ```tsx
234
+ import { V2Editor } from '@charisol/plexo-sdk/v2';
235
+ import '@charisol/plexo-sdk/dist/plexo-sdk.css';
236
+
237
+ // Works with no props at all: opens a blank page, fully offline.
238
+ <div style={{ height: '100vh' }}>
239
+ <V2Editor pages={savedPages} onChange={setPages} onSave={(pages) => api.save(pages)} />
240
+ </div>
241
+ ```
242
+
243
+ The editor fills its container (give the parent a height), and it is client-only like V1 — wrap it in `next/dynamic` with `ssr: false` in Next.js.
244
+
245
+ ### What is a default, what is a prop, what is separate
246
+
247
+ | | Where it lives | Examples |
248
+ |---|---|---|
249
+ | **SDK default** — works with no configuration | inside the editor | the whole editing UI, undo (one step per gesture), snapping, desktop/tablet/mobile frames, keyboard shortcuts (scoped to the editor, never the host page), the colour picker, Fit-to-screen, the nine elements, image upload that embeds small images, a blank starting page |
250
+ | **Host prop** — needs the host's server, accounts or secrets | `<V2Editor … />` props | saving (`onSave`, `onPublish`, `autoSave`), files (`onUpload`, `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
+ | **Separate entry** — no React, runs on a server | `@charisol/plexo-sdk/v2/compile` | `compilePageToHtml`, `compilePageToReact`, `parsePages`, `convertLegacyDesign`, frame sizes, `computePlacements` |
252
+
253
+ 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. No provider key ever lives in the browser — AI and stock-image search go through the host, as in V1.
254
+
255
+ ### Where a form sends messages
256
+
257
+ In order: the form's own address (the owner typed one) → the host's `formAction(formId)` → inside Plexo (`apiKey="workspace-internal"` plus `templateId`) Plexo's own form inbox → nothing, which the editor and the compiler both say plainly. A third-party app with a real Plexo key doesn't get Plexo's inbox (it finds the site from the page's own domain), so it passes `formAction`.
258
+
259
+ ### Compiling
260
+
261
+ ```ts
262
+ import { compilePageToHtml, compilePageToReact, parsePages } from '@charisol/plexo-sdk/v2/compile';
263
+
264
+ const parsed = parsePages(json); // untrusted JSON in, plain-language error out
265
+ if (!parsed.ok) throw new Error(parsed.error);
266
+
267
+ // Landing pages / templates → HTML
268
+ const { html, css, script, document, warnings } = compilePageToHtml(parsed.pages[0], {
269
+ apiKey: 'workspace-internal', templateId, // inside Plexo: forms work with no setup
270
+ // formAction: (id) => `https://api.acme.test/leads?form=${id}`, // any other host
271
+ // runtime: 'none', // host forbids scripts on published pages
272
+ // allowEmbedScripts: false, // …and wants HTML embeds script-free too
273
+ });
274
+
275
+ // App projects → a standalone React component (imports only "react")
276
+ const { code } = compilePageToReact(parsed.pages[0], { componentName: 'HomePage' });
277
+ ```
278
+
279
+ Everything works as plain HTML where the browser allows it (scroll-snap carousel, native accordion and mobile menu, real table, form and video). The optional runtime adds carousel autoplay and arrows, the live timer, and sending a form without leaving the page; hosts that don't allow scripts leave it out with `runtime: 'none'`. `warnings` are plain-language things the owner should fix (a form with nowhere to send messages, a screen missing elements the desktop has).
280
+
281
+ ### The visible canvas
282
+
283
+ Each screen (desktop 1200, tablet 768, mobile 375) is a frame. What is **inside** a frame is the page on that screen; what is **outside** is working area that is shown, dimmed, only while editing:
284
+
285
+ - an element entirely outside a screen's frame is not published on that screen (and is left out of the page altogether if no screen shows it);
286
+ - an element partly outside is clipped at its section's edge;
287
+ - the editor counts what's outside, and offers **Fit to this screen** (mobile: one stacked column; tablet: the layout scaled to width) and **Bring into view**. The compiler warns when a screen is missing elements the desktop has.
288
+
289
+ Since a section clips at its edge, leave room under things that grow (an accordion, a form with an error message).
290
+
291
+ ### Untrusted input
292
+
293
+ A design can come from a database, an AI or a third-party app, so the compilers treat it as untrusted: text and attributes are escaped, link and image schemes are allow-listed, CSS values that could add declarations or fetch URLs are dropped, class names are restricted, embeds run in a sandbox, and `parsePages` rejects unknown element types, duplicate ids and oversized trees. **Don't pass V2 HTML through V1's `sanitizeCompiledHtml`.** It keeps V2's stylesheet and layout, but removes `<details>`, `<iframe>`, `<figure>` and `<script>` — which silently breaks the accordion, the phone menu, video, HTML embeds and the carousel. V2's output is built from an allow-list of tags and attributes, so it doesn't need that step; a host that must sanitize should use a sanitizer that allows those tags.
294
+
295
+ ### Upgrading from the previous V2
296
+
297
+ The previous V2 (`V2Canvas`, `useCanvasStore`, `compilePageToReact(nodes, pageOrder, …)`) is replaced; this is a **breaking change** to `@charisol/plexo-sdk/v2` and `/v2/compile`. Designs saved by the old version still open: `isLegacyDesign(doc)` recognises them and `convertLegacyDesign(doc, { name, slug })` upgrades one to a page (the old pages scaled to fit any screen, so tablet and mobile get matching scaled layouts). Not carried over: brand text-style links and pinned sections.
298
+
299
+ ---
300
+
229
301
  ## Framework Notes
230
302
 
231
303
  ### Vite