@charisol/plexo-sdk 1.4.40 → 1.4.42

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.
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { type SaveState } from './ContextualToolbar';
3
- import type { AskSolMessage } from './AskSolPanel';
3
+ import type { AskSolContext, AskSolMessage } from './AskSolPanel';
4
4
  /**
5
5
  * Everything a host app (plexo-web in production, PlaygroundHost.tsx in dev) can hand
6
6
  * in rather than the SDK hardcoding or faking it. Persistence, uploads, and Ask SOL
@@ -39,6 +39,9 @@ export interface V2CanvasProps {
39
39
  * job. Omit both to get a normal in-memory-only conversation. */
40
40
  askSolHistory?: AskSolMessage[];
41
41
  onAskSolMessage?: (message: AskSolMessage) => void;
42
+ /** Answers Ask SOL questions with the host's real SOL (the question, plus the selected
43
+ * element if the question is scoped to it). Omitted, Ask SOL gives canned pointers. */
44
+ onAskSol?: (question: string, context: AskSolContext) => Promise<string>;
42
45
  /** Left/right header slots — named to match V1's own `headerLeftContent`/
43
46
  * `headerRightContent` props (PlexoBuilder.tsx) so a host already integrating V1
44
47
  * can carry the same content over with no naming translation. The SDK renders each
@@ -8,5 +8,6 @@ export { V2Canvas } from './components/V2Canvas';
8
8
  export { useCanvasStore } from './store/createCanvasStore';
9
9
  export { useBrandStore } from './store/createBrandStore';
10
10
  export type { V2CanvasProps } from './components/V2Canvas';
11
+ export type { AskSolContext, AskSolMessage } from './components/AskSolPanel';
11
12
  export type { PlexoNode, PlexoNodeType, CanvasState, CanvasStore, SectionNode, TextNode, ImageNode, ButtonNode, ContainerNode, } from './store/types';
12
13
  export { compilePageToReact, componentNameFor, DESIGN_WIDTH, type CompileOptions, type TextStyleSlots } from "./compile/toReact";
@@ -0,0 +1,4 @@
1
+ import type { StyleSet } from './brandTypes';
2
+ export declare const BUTTON_SETS: StyleSet[];
3
+ export declare const BOX_SETS: StyleSet[];
4
+ export declare const TEXT_STYLE_SETS: StyleSet[];
@@ -0,0 +1,9 @@
1
+ import { c as e, f as t, l as n, n as r, r as i, t as a, u as o } from "./toReact-BBzjWoFG.js";
2
+ //#region src/v2/compile/index.ts
3
+ function s(e = o, t) {
4
+ let n = e.find((e) => e.id === t) ?? e[0], r = {};
5
+ for (let e of n?.slots ?? []) r[e.id] = e.styles;
6
+ return r;
7
+ }
8
+ //#endregion
9
+ export { e as DEFAULT_BOX_SETS, n as DEFAULT_BUTTON_SETS, o as DEFAULT_TEXT_STYLE_SETS, a as DESIGN_WIDTH, t as buildSeedNodes, r as compilePageToReact, i as componentNameFor, s as textStyleSlots };