pixelagent 0.1.4 → 0.1.6
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/dist/PixelAgent.d.ts +10 -2
- package/dist/PixelAgent.d.ts.map +1 -1
- package/dist/edit/submitApply.d.ts +5 -0
- package/dist/edit/submitApply.d.ts.map +1 -1
- package/dist/pixelagent.js +1106 -1051
- package/dist/pixelagent.js.map +1 -1
- package/package.json +3 -3
package/dist/PixelAgent.d.ts
CHANGED
|
@@ -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
|
package/dist/PixelAgent.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PixelAgent.d.ts","sourceRoot":"","sources":["../src/PixelAgent.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"PixelAgent.d.ts","sourceRoot":"","sources":["../src/PixelAgent.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,YAAY,EACZ,qBAAqB,EAErB,SAAS,EACT,oBAAoB,EAErB,MAAM,oBAAoB,CAAC;AAuB5B,OAAO,yBAAyB,CAAC;AAEjC,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,CAAC;AAE1D,MAAM,WAAW,eAAe;IAC9B,mEAAmE;IACnE,EAAE,CAAC,EAAE,oBAAoB,CAAC;IAC1B,2DAA2D;IAC3D,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;IAC/C;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,+DAA+D;IAC/D,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,OAAO,CAAC,qBAAqB,GAAG,IAAI,CAAC,CAAC;CAC5E;AAwBD,wBAAgB,UAAU,CAAC,EACzB,EAAE,EACF,SAAS,EACT,iBAAiB,EACjB,aAAa,EACb,OAAO,GACR,GAAE,eAAoB,2CAiYtB;AAED,OAAO,EAAE,UAAU,IAAI,OAAO,EAAE,CAAC"}
|
|
@@ -13,5 +13,10 @@ export interface SubmitApplyOptions {
|
|
|
13
13
|
onApply?: (payload: ApplyPayload) => Promise<ApplyVisualDiffResult | null>;
|
|
14
14
|
}
|
|
15
15
|
export declare function submitApply(payload: ApplyPayload, options?: SubmitApplyOptions): Promise<ApplyTransportResult>;
|
|
16
|
+
/**
|
|
17
|
+
* Two outcomes only: applied or failed. Anything that didn't actually write
|
|
18
|
+
* source (errors, clipboard fallback, partial-success without lines changed)
|
|
19
|
+
* collapses to "Apply failed". Detail goes to the console for debugging.
|
|
20
|
+
*/
|
|
16
21
|
export declare function formatApplyFeedback(transport: ApplyTransportResult): string;
|
|
17
22
|
//# sourceMappingURL=submitApply.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"submitApply.d.ts","sourceRoot":"","sources":["../../src/edit/submitApply.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAG9E,MAAM,MAAM,oBAAoB,GAC5B;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,qBAAqB,CAAA;CAAE,GAC9C;IAAE,IAAI,EAAE,WAAW,CAAA;CAAE,GACrB;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAEvC,MAAM,WAAW,kBAAkB;IACjC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,OAAO,CAAC,qBAAqB,GAAG,IAAI,CAAC,CAAC;CAC5E;AAED,wBAAsB,WAAW,CAC/B,OAAO,EAAE,YAAY,EACrB,OAAO,GAAE,kBAAuB,GAC/B,OAAO,CAAC,oBAAoB,CAAC,CAgC/B;AAED,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,oBAAoB,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"submitApply.d.ts","sourceRoot":"","sources":["../../src/edit/submitApply.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAG9E,MAAM,MAAM,oBAAoB,GAC5B;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,qBAAqB,CAAA;C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