pixelagent 0.1.4 → 0.1.5

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,4 +1,4 @@
1
- import type { HostTheme, PixelAgentUiSettings } from '@pixelagent/shared';
1
+ import type { ApplyPayload, ApplyVisualDiffResult, HostTheme, PixelAgentUiSettings } from '@pixelagent/shared';
2
2
  import './styles/pixelagent.css';
3
3
  export type PixelAgentMode = 'annotate' | 'edit' | 'idle';
4
4
  export interface PixelAgentProps {
@@ -7,7 +7,15 @@ export interface PixelAgentProps {
7
7
  /** Controlled host page theme (e.g. demo `data-theme`). */
8
8
  hostTheme?: HostTheme;
9
9
  onHostThemeChange?: (theme: HostTheme) => void;
10
+ /**
11
+ * Explicit POST endpoint for Apply. When unset, the component auto-probes
12
+ * the standard Vite plugin path (`/__pixelagent/apply`) at mount; if that
13
+ * fails it falls back to clipboard.
14
+ */
15
+ applyEndpoint?: string;
16
+ /** Custom transport. Takes precedence over `applyEndpoint`. */
17
+ onApply?: (payload: ApplyPayload) => Promise<ApplyVisualDiffResult | null>;
10
18
  }
11
- export declare function PixelAgent({ ui, hostTheme, onHostThemeChange }?: PixelAgentProps): import("react/jsx-runtime").JSX.Element;
19
+ export declare function PixelAgent({ ui, hostTheme, onHostThemeChange, applyEndpoint, onApply, }?: PixelAgentProps): import("react/jsx-runtime").JSX.Element;
12
20
  export { PixelAgent as default };
13
21
  //# sourceMappingURL=PixelAgent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PixelAgent.d.ts","sourceRoot":"","sources":["../src/PixelAgent.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAIV,SAAS,EACT,oBAAoB,EAErB,MAAM,oBAAoB,CAAC;AAsB5B,OAAO,yBAAyB,CAAC;AAEjC,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,CAAC;AAE1D,MAAM,WAAW,eAAe;IAC9B,mEAAmE;IACnE,EAAE,C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