@replohq/sandbox-runtime 1.7.10 → 1.7.12
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/_vendor/replo-utils/react/zustand.d.ts +11 -0
- package/_vendor/replo-utils/react/zustand.mjs +13 -0
- package/_vendor/schemas/generated/selectModeIframeRpc.d.ts +11 -8
- package/_vendor/schemas/selectModeIframeRpc.d.ts +66 -130
- package/_vendor/schemas/selectModeIframeRpc.mjs +16 -11
- package/buildMetadata.js +3 -3
- package/package.json +6 -5
- package/select-mode/EditorSelection.d.ts +1 -22
- package/select-mode/EditorSelection.js +61 -100
- package/select-mode/SelectionFrames.d.ts +1 -0
- package/select-mode/SelectionFrames.js +58 -0
- package/select-mode/annotationFrames.d.ts +13 -0
- package/select-mode/annotationFrames.js +31 -1
- package/select-mode/displayModeStore.d.ts +0 -2
- package/select-mode/displayModeStore.js +11 -30
- package/select-mode/hooks/useParentMessaging.js +3 -0
- package/select-mode/hooks/useSelectionHover.d.ts +1 -19
- package/select-mode/hooks/useSelectionHover.js +37 -49
- package/select-mode/hooks/useSelectionInteractions.d.ts +1 -12
- package/select-mode/hooks/useSelectionInteractions.js +57 -39
- package/select-mode/hooks/useSelectionScrollSync.d.ts +1 -25
- package/select-mode/hooks/useSelectionScrollSync.js +48 -40
- package/select-mode/iframeRpcChannel.d.ts +24 -1
- package/select-mode/inlineEditFeedback.d.ts +6 -0
- package/select-mode/inlineEditFeedback.js +47 -0
- package/select-mode/isTextEditableElement.d.ts +1 -0
- package/select-mode/isTextEditableElement.js +15 -0
- package/select-mode/selectModeStore.d.ts +160 -0
- package/select-mode/selectModeStore.js +586 -0
- package/select-mode/selectionFrame.d.ts +10 -59
- package/select-mode/selectionFrame.js +26 -150
- package/select-mode/symbolicate.js +4 -0
- package/select-mode/tiptapInlineEditor.js +16 -1
- package/select-mode/useShallowStore.d.ts +2 -0
- package/select-mode/useShallowStore.js +9 -0
- package/select-mode/hooks/useCrosshairCursor.d.ts +0 -10
- package/select-mode/hooks/useCrosshairCursor.js +0 -23
- package/select-mode/hooks/useEditModeStateMachine.d.ts +0 -16
- package/select-mode/hooks/useEditModeStateMachine.js +0 -228
- package/select-mode/hooks/useSelectModeController.d.ts +0 -11
- package/select-mode/hooks/useSelectModeController.js +0 -72
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { StateCreator, StoreApi } from "zustand";
|
|
2
|
+
/**
|
|
3
|
+
* Drop-in replacement for zustand's `useStore` that uses shallow equality by default.
|
|
4
|
+
* Use this in context-based stores so all selectors automatically get shallow comparison.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useShallowStore<StateType, SelectedType>(store: StoreApi<StateType>, selector: (state: StateType) => SelectedType): SelectedType;
|
|
7
|
+
/**
|
|
8
|
+
* Drop-in replacement for zustand's `create` that uses shallow equality by default.
|
|
9
|
+
* Use this instead of `create()` so all selectors automatically get shallow comparison.
|
|
10
|
+
*/
|
|
11
|
+
export declare function createShallowStore<StateType>(initializer: StateCreator<StateType, [], []>): import("zustand/traditional").UseBoundStoreWithEqualityFn<StoreApi<StateType>>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { useStore } from 'zustand';
|
|
2
|
+
import { useShallow } from 'zustand/react/shallow';
|
|
3
|
+
import { shallow } from 'zustand/shallow';
|
|
4
|
+
import { createWithEqualityFn } from 'zustand/traditional';
|
|
5
|
+
|
|
6
|
+
function useShallowStore(store, selector) {
|
|
7
|
+
return useStore(store, useShallow(selector));
|
|
8
|
+
}
|
|
9
|
+
function createShallowStore(initializer) {
|
|
10
|
+
return createWithEqualityFn(initializer, shallow);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { createShallowStore, useShallowStore };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export type
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import type { SelectModeBoundingRect, DisplayMode, SelectModeSelectionType, SelectModeOptimisticUpdatePayload, SelectModeFormatCommand, SelectableData, SelectModeClickPosition, SelectModeSelectionRect, SelectModeTiptapActiveMarks } from "./selectMode";
|
|
2
|
+
export type InlineEditFeedback = {
|
|
3
|
+
status: "pending" | "unavailable" | "failed";
|
|
4
|
+
rect: SelectModeBoundingRect;
|
|
5
5
|
};
|
|
6
6
|
export type IframeRuntimeBuildMetadata = {
|
|
7
7
|
packageName: string;
|
|
@@ -11,9 +11,6 @@ export type IframeRuntimeBuildMetadata = {
|
|
|
11
11
|
builtAt: string | null;
|
|
12
12
|
};
|
|
13
13
|
export type SelectModeParentMessage = {
|
|
14
|
-
method: "editSelectedComponent";
|
|
15
|
-
data: SelectedComponentEditRequest;
|
|
16
|
-
} | {
|
|
17
14
|
method: "setDisplayMode";
|
|
18
15
|
data: {
|
|
19
16
|
displayMode: DisplayMode;
|
|
@@ -105,11 +102,17 @@ export type SelectModeIframeMessage = {
|
|
|
105
102
|
};
|
|
106
103
|
originalInnerHTML: string;
|
|
107
104
|
};
|
|
105
|
+
} | {
|
|
106
|
+
method: "inlineEditFeedbackChanged";
|
|
107
|
+
data: {
|
|
108
|
+
feedback: InlineEditFeedback | null;
|
|
109
|
+
};
|
|
108
110
|
} | {
|
|
109
111
|
method: "editorStateUpdate";
|
|
110
112
|
data: {
|
|
111
113
|
activeMarks: SelectModeTiptapActiveMarks;
|
|
112
|
-
|
|
114
|
+
isInlineEditing: boolean;
|
|
115
|
+
isInlineEditPending: boolean;
|
|
113
116
|
};
|
|
114
117
|
} | {
|
|
115
118
|
method: "fastRefreshComplete";
|
|
@@ -2,6 +2,23 @@ import type { SelectModeIframeMessage, SelectModeParentMessage } from "./generat
|
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
export declare const SELECT_MODE_IFRAME_RPC_CHANNEL_ID: "replo:select-mode-iframe-rpc";
|
|
4
4
|
export declare const SELECT_MODE_IFRAME_RPC_CHANNEL_VERSION: 1;
|
|
5
|
+
export declare const inlineEditFeedbackSchema: z.ZodObject<{
|
|
6
|
+
status: z.ZodEnum<{
|
|
7
|
+
unavailable: "unavailable";
|
|
8
|
+
pending: "pending";
|
|
9
|
+
failed: "failed";
|
|
10
|
+
}>;
|
|
11
|
+
rect: z.ZodObject<{
|
|
12
|
+
x: z.ZodNumber;
|
|
13
|
+
y: z.ZodNumber;
|
|
14
|
+
left: z.ZodNumber;
|
|
15
|
+
top: z.ZodNumber;
|
|
16
|
+
right: z.ZodNumber;
|
|
17
|
+
bottom: z.ZodNumber;
|
|
18
|
+
width: z.ZodNumber;
|
|
19
|
+
height: z.ZodNumber;
|
|
20
|
+
}, z.core.$strip>;
|
|
21
|
+
}, z.core.$strip>;
|
|
5
22
|
export declare const iframeRuntimeBuildMetadataSchema: z.ZodObject<{
|
|
6
23
|
packageName: z.ZodString;
|
|
7
24
|
version: z.ZodString;
|
|
@@ -9,68 +26,6 @@ export declare const iframeRuntimeBuildMetadataSchema: z.ZodObject<{
|
|
|
9
26
|
commit: z.ZodNullable<z.ZodString>;
|
|
10
27
|
builtAt: z.ZodNullable<z.ZodString>;
|
|
11
28
|
}, z.core.$strip>;
|
|
12
|
-
export declare const selectedComponentEditRequestSchema: z.ZodObject<{
|
|
13
|
-
siteId: z.ZodUUID;
|
|
14
|
-
element: z.ZodObject<{
|
|
15
|
-
kind: z.ZodLiteral<"react-element">;
|
|
16
|
-
selector: z.ZodString;
|
|
17
|
-
tagName: z.ZodString;
|
|
18
|
-
elementType: z.ZodString;
|
|
19
|
-
textContent: z.ZodNullable<z.ZodString>;
|
|
20
|
-
rect: z.ZodObject<{
|
|
21
|
-
x: z.ZodNumber;
|
|
22
|
-
y: z.ZodNumber;
|
|
23
|
-
left: z.ZodNumber;
|
|
24
|
-
top: z.ZodNumber;
|
|
25
|
-
right: z.ZodNumber;
|
|
26
|
-
bottom: z.ZodNumber;
|
|
27
|
-
width: z.ZodNumber;
|
|
28
|
-
height: z.ZodNumber;
|
|
29
|
-
}, z.core.$strip>;
|
|
30
|
-
textMetrics: z.ZodNullable<z.ZodObject<{
|
|
31
|
-
tightWidth: z.ZodNumber;
|
|
32
|
-
lineCount: z.ZodNumber;
|
|
33
|
-
lineHeight: z.ZodNumber;
|
|
34
|
-
}, z.core.$strip>>;
|
|
35
|
-
outerHTML: z.ZodString;
|
|
36
|
-
definedStyles: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
37
|
-
property: z.ZodString;
|
|
38
|
-
variant: z.ZodNullable<z.ZodObject<{
|
|
39
|
-
atRules: z.ZodArray<z.ZodObject<{
|
|
40
|
-
type: z.ZodString;
|
|
41
|
-
text: z.ZodString;
|
|
42
|
-
}, z.core.$strip>>;
|
|
43
|
-
pseudo: z.ZodNullable<z.ZodString>;
|
|
44
|
-
}, z.core.$strip>>;
|
|
45
|
-
className: z.ZodNullable<z.ZodString>;
|
|
46
|
-
raw: z.ZodString;
|
|
47
|
-
resolved: z.ZodString;
|
|
48
|
-
}, z.core.$strip>>>;
|
|
49
|
-
inheritedStyles: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
50
|
-
clickPosition: z.ZodObject<{
|
|
51
|
-
x: z.ZodNumber;
|
|
52
|
-
y: z.ZodNumber;
|
|
53
|
-
}, z.core.$strip>;
|
|
54
|
-
sourceLocation: z.ZodOptional<z.ZodObject<{
|
|
55
|
-
filePath: z.ZodString;
|
|
56
|
-
lineNumber: z.ZodNumber;
|
|
57
|
-
columnNumber: z.ZodOptional<z.ZodNumber>;
|
|
58
|
-
componentName: z.ZodOptional<z.ZodString>;
|
|
59
|
-
}, z.core.$strip>>;
|
|
60
|
-
fiberChain: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
61
|
-
sourceLocation: z.ZodObject<{
|
|
62
|
-
filePath: z.ZodString;
|
|
63
|
-
lineNumber: z.ZodNumber;
|
|
64
|
-
columnNumber: z.ZodOptional<z.ZodNumber>;
|
|
65
|
-
componentName: z.ZodOptional<z.ZodString>;
|
|
66
|
-
}, z.core.$strip>;
|
|
67
|
-
tagName: z.ZodOptional<z.ZodString>;
|
|
68
|
-
componentName: z.ZodOptional<z.ZodString>;
|
|
69
|
-
props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
70
|
-
}, z.core.$strip>>>;
|
|
71
|
-
siblingSelectors: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
72
|
-
}, z.core.$strip>;
|
|
73
|
-
}, z.core.$strip>;
|
|
74
29
|
export declare const websiteBuilderToCanopyMethodConfig: {
|
|
75
30
|
symbolicateSelectedElement: {
|
|
76
31
|
inputSchema: z.ZodObject<{
|
|
@@ -258,8 +213,8 @@ export declare const websiteBuilderToCanopyMethodConfig: {
|
|
|
258
213
|
inputSchema: z.ZodObject<{
|
|
259
214
|
sessionId: z.ZodString;
|
|
260
215
|
outcome: z.ZodEnum<{
|
|
261
|
-
persisted: "persisted";
|
|
262
216
|
failed: "failed";
|
|
217
|
+
persisted: "persisted";
|
|
263
218
|
}>;
|
|
264
219
|
}, z.core.$strip>;
|
|
265
220
|
outputSchema: z.ZodVoid;
|
|
@@ -621,6 +576,28 @@ export declare const canopyToWebsiteBuilderMethodConfig: {
|
|
|
621
576
|
}, z.core.$strip>;
|
|
622
577
|
outputSchema: z.ZodVoid;
|
|
623
578
|
};
|
|
579
|
+
inlineEditFeedbackChanged: {
|
|
580
|
+
inputSchema: z.ZodObject<{
|
|
581
|
+
feedback: z.ZodNullable<z.ZodObject<{
|
|
582
|
+
status: z.ZodEnum<{
|
|
583
|
+
unavailable: "unavailable";
|
|
584
|
+
pending: "pending";
|
|
585
|
+
failed: "failed";
|
|
586
|
+
}>;
|
|
587
|
+
rect: z.ZodObject<{
|
|
588
|
+
x: z.ZodNumber;
|
|
589
|
+
y: z.ZodNumber;
|
|
590
|
+
left: z.ZodNumber;
|
|
591
|
+
top: z.ZodNumber;
|
|
592
|
+
right: z.ZodNumber;
|
|
593
|
+
bottom: z.ZodNumber;
|
|
594
|
+
width: z.ZodNumber;
|
|
595
|
+
height: z.ZodNumber;
|
|
596
|
+
}, z.core.$strip>;
|
|
597
|
+
}, z.core.$strip>>;
|
|
598
|
+
}, z.core.$strip>;
|
|
599
|
+
outputSchema: z.ZodVoid;
|
|
600
|
+
};
|
|
624
601
|
editorStateUpdate: {
|
|
625
602
|
inputSchema: z.ZodObject<{
|
|
626
603
|
activeMarks: z.ZodObject<{
|
|
@@ -629,7 +606,8 @@ export declare const canopyToWebsiteBuilderMethodConfig: {
|
|
|
629
606
|
underline: z.ZodBoolean;
|
|
630
607
|
strike: z.ZodBoolean;
|
|
631
608
|
}, z.core.$strip>;
|
|
632
|
-
|
|
609
|
+
isInlineEditing: z.ZodBoolean;
|
|
610
|
+
isInlineEditPending: z.ZodBoolean;
|
|
633
611
|
}, z.core.$strip>;
|
|
634
612
|
outputSchema: z.ZodVoid;
|
|
635
613
|
};
|
|
@@ -639,70 +617,6 @@ export declare const canopyToWebsiteBuilderMethodConfig: {
|
|
|
639
617
|
};
|
|
640
618
|
};
|
|
641
619
|
export declare const selectModeParentMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
642
|
-
method: z.ZodLiteral<"editSelectedComponent">;
|
|
643
|
-
data: z.ZodObject<{
|
|
644
|
-
siteId: z.ZodUUID;
|
|
645
|
-
element: z.ZodObject<{
|
|
646
|
-
kind: z.ZodLiteral<"react-element">;
|
|
647
|
-
selector: z.ZodString;
|
|
648
|
-
tagName: z.ZodString;
|
|
649
|
-
elementType: z.ZodString;
|
|
650
|
-
textContent: z.ZodNullable<z.ZodString>;
|
|
651
|
-
rect: z.ZodObject<{
|
|
652
|
-
x: z.ZodNumber;
|
|
653
|
-
y: z.ZodNumber;
|
|
654
|
-
left: z.ZodNumber;
|
|
655
|
-
top: z.ZodNumber;
|
|
656
|
-
right: z.ZodNumber;
|
|
657
|
-
bottom: z.ZodNumber;
|
|
658
|
-
width: z.ZodNumber;
|
|
659
|
-
height: z.ZodNumber;
|
|
660
|
-
}, z.core.$strip>;
|
|
661
|
-
textMetrics: z.ZodNullable<z.ZodObject<{
|
|
662
|
-
tightWidth: z.ZodNumber;
|
|
663
|
-
lineCount: z.ZodNumber;
|
|
664
|
-
lineHeight: z.ZodNumber;
|
|
665
|
-
}, z.core.$strip>>;
|
|
666
|
-
outerHTML: z.ZodString;
|
|
667
|
-
definedStyles: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
668
|
-
property: z.ZodString;
|
|
669
|
-
variant: z.ZodNullable<z.ZodObject<{
|
|
670
|
-
atRules: z.ZodArray<z.ZodObject<{
|
|
671
|
-
type: z.ZodString;
|
|
672
|
-
text: z.ZodString;
|
|
673
|
-
}, z.core.$strip>>;
|
|
674
|
-
pseudo: z.ZodNullable<z.ZodString>;
|
|
675
|
-
}, z.core.$strip>>;
|
|
676
|
-
className: z.ZodNullable<z.ZodString>;
|
|
677
|
-
raw: z.ZodString;
|
|
678
|
-
resolved: z.ZodString;
|
|
679
|
-
}, z.core.$strip>>>;
|
|
680
|
-
inheritedStyles: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
681
|
-
clickPosition: z.ZodObject<{
|
|
682
|
-
x: z.ZodNumber;
|
|
683
|
-
y: z.ZodNumber;
|
|
684
|
-
}, z.core.$strip>;
|
|
685
|
-
sourceLocation: z.ZodOptional<z.ZodObject<{
|
|
686
|
-
filePath: z.ZodString;
|
|
687
|
-
lineNumber: z.ZodNumber;
|
|
688
|
-
columnNumber: z.ZodOptional<z.ZodNumber>;
|
|
689
|
-
componentName: z.ZodOptional<z.ZodString>;
|
|
690
|
-
}, z.core.$strip>>;
|
|
691
|
-
fiberChain: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
692
|
-
sourceLocation: z.ZodObject<{
|
|
693
|
-
filePath: z.ZodString;
|
|
694
|
-
lineNumber: z.ZodNumber;
|
|
695
|
-
columnNumber: z.ZodOptional<z.ZodNumber>;
|
|
696
|
-
componentName: z.ZodOptional<z.ZodString>;
|
|
697
|
-
}, z.core.$strip>;
|
|
698
|
-
tagName: z.ZodOptional<z.ZodString>;
|
|
699
|
-
componentName: z.ZodOptional<z.ZodString>;
|
|
700
|
-
props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
701
|
-
}, z.core.$strip>>>;
|
|
702
|
-
siblingSelectors: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
703
|
-
}, z.core.$strip>;
|
|
704
|
-
}, z.core.$strip>;
|
|
705
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
706
620
|
method: z.ZodLiteral<"setDisplayMode">;
|
|
707
621
|
data: z.ZodObject<{
|
|
708
622
|
displayMode: z.ZodEnum<{
|
|
@@ -758,8 +672,8 @@ export declare const selectModeParentMessageSchema: z.ZodDiscriminatedUnion<[z.Z
|
|
|
758
672
|
data: z.ZodObject<{
|
|
759
673
|
sessionId: z.ZodString;
|
|
760
674
|
outcome: z.ZodEnum<{
|
|
761
|
-
persisted: "persisted";
|
|
762
675
|
failed: "failed";
|
|
676
|
+
persisted: "persisted";
|
|
763
677
|
}>;
|
|
764
678
|
}, z.core.$strip>;
|
|
765
679
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -1036,6 +950,27 @@ export declare const selectModeIframeMessageSchema: z.ZodDiscriminatedUnion<[z.Z
|
|
|
1036
950
|
json: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1037
951
|
originalInnerHTML: z.ZodString;
|
|
1038
952
|
}, z.core.$strip>;
|
|
953
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
954
|
+
method: z.ZodLiteral<"inlineEditFeedbackChanged">;
|
|
955
|
+
data: z.ZodObject<{
|
|
956
|
+
feedback: z.ZodNullable<z.ZodObject<{
|
|
957
|
+
status: z.ZodEnum<{
|
|
958
|
+
unavailable: "unavailable";
|
|
959
|
+
pending: "pending";
|
|
960
|
+
failed: "failed";
|
|
961
|
+
}>;
|
|
962
|
+
rect: z.ZodObject<{
|
|
963
|
+
x: z.ZodNumber;
|
|
964
|
+
y: z.ZodNumber;
|
|
965
|
+
left: z.ZodNumber;
|
|
966
|
+
top: z.ZodNumber;
|
|
967
|
+
right: z.ZodNumber;
|
|
968
|
+
bottom: z.ZodNumber;
|
|
969
|
+
width: z.ZodNumber;
|
|
970
|
+
height: z.ZodNumber;
|
|
971
|
+
}, z.core.$strip>;
|
|
972
|
+
}, z.core.$strip>>;
|
|
973
|
+
}, z.core.$strip>;
|
|
1039
974
|
}, z.core.$strip>, z.ZodObject<{
|
|
1040
975
|
method: z.ZodLiteral<"editorStateUpdate">;
|
|
1041
976
|
data: z.ZodObject<{
|
|
@@ -1045,7 +980,8 @@ export declare const selectModeIframeMessageSchema: z.ZodDiscriminatedUnion<[z.Z
|
|
|
1045
980
|
underline: z.ZodBoolean;
|
|
1046
981
|
strike: z.ZodBoolean;
|
|
1047
982
|
}, z.core.$strip>;
|
|
1048
|
-
|
|
983
|
+
isInlineEditing: z.ZodBoolean;
|
|
984
|
+
isInlineEditPending: z.ZodBoolean;
|
|
1049
985
|
}, z.core.$strip>;
|
|
1050
986
|
}, z.core.$strip>, z.ZodObject<{
|
|
1051
987
|
method: z.ZodLiteral<"fastRefreshComplete">;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { selectModeBoundingRectSchema, selectModeFormatCommandSchema, selectModeOptimisticUpdatePayloadSchema, selectModeSelectionTypeSchema, displayModeSchema, selectModeTiptapActiveMarksSchema, selectableDataSchema, selectModeSelectionRectSchema, selectModeClickPositionSchema, selectedElementSchema } from '../../chunk-4T7WSMC3.mjs';
|
|
2
2
|
import '../../chunk-JUKCUPQ6.mjs';
|
|
3
3
|
import '../../chunk-FLYEIRFK.mjs';
|
|
4
4
|
import '../../chunk-TESFJQID.mjs';
|
|
@@ -7,6 +7,10 @@ import { z } from 'zod';
|
|
|
7
7
|
|
|
8
8
|
var SELECT_MODE_IFRAME_RPC_CHANNEL_ID = "replo:select-mode-iframe-rpc";
|
|
9
9
|
var SELECT_MODE_IFRAME_RPC_CHANNEL_VERSION = 1;
|
|
10
|
+
var inlineEditFeedbackSchema = z.object({
|
|
11
|
+
status: z.enum(["pending", "unavailable", "failed"]),
|
|
12
|
+
rect: selectModeBoundingRectSchema
|
|
13
|
+
}).describe("InlineEditFeedback");
|
|
10
14
|
var iframeRuntimeBuildMetadataSchema = z.object({
|
|
11
15
|
packageName: z.string(),
|
|
12
16
|
version: z.string(),
|
|
@@ -14,10 +18,6 @@ var iframeRuntimeBuildMetadataSchema = z.object({
|
|
|
14
18
|
commit: z.string().nullable(),
|
|
15
19
|
builtAt: z.string().nullable()
|
|
16
20
|
}).describe("IframeRuntimeBuildMetadata");
|
|
17
|
-
var selectedComponentEditRequestSchema = z.object({
|
|
18
|
-
siteId: z.uuid(),
|
|
19
|
-
element: selectedElementSchema
|
|
20
|
-
}).describe("SelectedComponentEditRequest");
|
|
21
21
|
var websiteBuilderToCanopyMethodConfig = {
|
|
22
22
|
symbolicateSelectedElement: {
|
|
23
23
|
inputSchema: selectedElementSchema,
|
|
@@ -144,10 +144,15 @@ var canopyToWebsiteBuilderMethodConfig = {
|
|
|
144
144
|
}),
|
|
145
145
|
outputSchema: z.void()
|
|
146
146
|
},
|
|
147
|
+
inlineEditFeedbackChanged: {
|
|
148
|
+
inputSchema: z.object({ feedback: inlineEditFeedbackSchema.nullable() }),
|
|
149
|
+
outputSchema: z.void()
|
|
150
|
+
},
|
|
147
151
|
editorStateUpdate: {
|
|
148
152
|
inputSchema: z.object({
|
|
149
153
|
activeMarks: selectModeTiptapActiveMarksSchema,
|
|
150
|
-
|
|
154
|
+
isInlineEditing: z.boolean(),
|
|
155
|
+
isInlineEditPending: z.boolean()
|
|
151
156
|
}),
|
|
152
157
|
outputSchema: z.void()
|
|
153
158
|
},
|
|
@@ -157,10 +162,6 @@ var canopyToWebsiteBuilderMethodConfig = {
|
|
|
157
162
|
}
|
|
158
163
|
};
|
|
159
164
|
var selectModeParentMessageSchema = z.discriminatedUnion("method", [
|
|
160
|
-
z.object({
|
|
161
|
-
method: z.literal("editSelectedComponent"),
|
|
162
|
-
data: selectedComponentEditRequestSchema
|
|
163
|
-
}),
|
|
164
165
|
z.object({
|
|
165
166
|
method: z.literal("setDisplayMode"),
|
|
166
167
|
data: websiteBuilderToCanopyMethodConfig.setDisplayMode.inputSchema
|
|
@@ -229,6 +230,10 @@ var selectModeIframeMessageSchema = z.discriminatedUnion("method", [
|
|
|
229
230
|
method: z.literal("textCommitted"),
|
|
230
231
|
data: canopyToWebsiteBuilderMethodConfig.textCommitted.inputSchema
|
|
231
232
|
}),
|
|
233
|
+
z.object({
|
|
234
|
+
method: z.literal("inlineEditFeedbackChanged"),
|
|
235
|
+
data: canopyToWebsiteBuilderMethodConfig.inlineEditFeedbackChanged.inputSchema
|
|
236
|
+
}),
|
|
232
237
|
z.object({
|
|
233
238
|
method: z.literal("editorStateUpdate"),
|
|
234
239
|
data: canopyToWebsiteBuilderMethodConfig.editorStateUpdate.inputSchema
|
|
@@ -238,4 +243,4 @@ var selectModeIframeMessageSchema = z.discriminatedUnion("method", [
|
|
|
238
243
|
})
|
|
239
244
|
]).describe("SelectModeIframeMessage");
|
|
240
245
|
|
|
241
|
-
export { SELECT_MODE_IFRAME_RPC_CHANNEL_ID, SELECT_MODE_IFRAME_RPC_CHANNEL_VERSION, canopyToWebsiteBuilderMethodConfig, iframeRuntimeBuildMetadataSchema, selectModeIframeMessageSchema, selectModeParentMessageSchema,
|
|
246
|
+
export { SELECT_MODE_IFRAME_RPC_CHANNEL_ID, SELECT_MODE_IFRAME_RPC_CHANNEL_VERSION, canopyToWebsiteBuilderMethodConfig, iframeRuntimeBuildMetadataSchema, inlineEditFeedbackSchema, selectModeIframeMessageSchema, selectModeParentMessageSchema, websiteBuilderToCanopyMethodConfig };
|
package/buildMetadata.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export const BUILD_METADATA = {
|
|
2
2
|
"packageName": "@replohq/sandbox-runtime",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.12",
|
|
4
4
|
"branch": "HEAD",
|
|
5
|
-
"commit": "
|
|
6
|
-
"builtAt": "2026-09-
|
|
5
|
+
"commit": "25c44bae8033d312c213c7d6d6cd3bba14a38cfd",
|
|
6
|
+
"builtAt": "2026-09-22T04:29:15.711Z"
|
|
7
7
|
};
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@replohq/sandbox-runtime",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.12",
|
|
4
4
|
"reploBuild": {
|
|
5
5
|
"packageName": "@replohq/sandbox-runtime",
|
|
6
|
-
"version": "1.7.
|
|
6
|
+
"version": "1.7.12",
|
|
7
7
|
"branch": "HEAD",
|
|
8
|
-
"commit": "
|
|
9
|
-
"builtAt": "2026-09-
|
|
8
|
+
"commit": "25c44bae8033d312c213c7d6d6cd3bba14a38cfd",
|
|
9
|
+
"builtAt": "2026-09-22T04:29:15.711Z"
|
|
10
10
|
},
|
|
11
11
|
"description": "Replo sandbox runtime — editor integration for agent-built Next.js sites.",
|
|
12
12
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -41,7 +41,8 @@
|
|
|
41
41
|
"@tiptap/extension-underline": "^2.25.0",
|
|
42
42
|
"@tiptap/pm": "^2.25.0",
|
|
43
43
|
"uuid": "^11.1.0",
|
|
44
|
-
"zod": "^4.3.6"
|
|
44
|
+
"zod": "^4.3.6",
|
|
45
|
+
"zustand": "^4.5.7"
|
|
45
46
|
},
|
|
46
47
|
"peerDependencies": {
|
|
47
48
|
"@types/react": ">=19.0.0",
|
|
@@ -1,22 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Mounts the iframe-side selectMode controller. This is a render-less
|
|
3
|
-
* component — every responsibility is delegated to a dedicated hook so each
|
|
4
|
-
* concern (parent messaging, cursor styling, pointer interactions, hover
|
|
5
|
-
* tracking, scroll syncing) can be read in isolation:
|
|
6
|
-
*
|
|
7
|
-
* - `useParentMessaging` — inbound messages from the parent (set mode,
|
|
8
|
-
* set selection type) + outbound `IFRAME_READY` handshake.
|
|
9
|
-
* - `useCrosshairCursor` — crosshair cursor + disable text/drag selection
|
|
10
|
-
* while in selection mode.
|
|
11
|
-
* - `useSelectionInteractions` — pointer-down / move / up state machine
|
|
12
|
-
* that produces `ELEMENT_SELECTED`, `AREA_SELECTED`, and live
|
|
13
|
-
* `DRAG_RECT_UPDATED` messages.
|
|
14
|
-
* - `useSelectionHover` — hover-element rect updates.
|
|
15
|
-
* - `useSelectionScrollSync` — keeps the parent overlay aligned with the
|
|
16
|
-
* selected element/area when the iframe scrolls.
|
|
17
|
-
*
|
|
18
|
-
* The `interactionSessionRef` is the single source of truth for the
|
|
19
|
-
* in-progress drag/selection — every hook reads/writes it via ref so we
|
|
20
|
-
* don't trigger React re-renders during interaction-heavy operations.
|
|
21
|
-
*/
|
|
22
|
-
export declare function EditorSelection(): null;
|
|
1
|
+
export declare function EditorSelection(): import("react/jsx-runtime").JSX.Element;
|