@replohq/sandbox-runtime 1.16.0 → 1.16.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 (32) hide show
  1. package/_vendor/replo-utils/lib/object.d.ts +16 -1
  2. package/_vendor/replo-utils/lib/viewportSnapshot.d.ts +1 -1
  3. package/_vendor/replo-utils/lib/viewportSnapshot.mjs +1 -1
  4. package/_vendor/replo-utils/react/use-viewport-snapshot-responder.mjs +28 -5222
  5. package/_vendor/schemas/componentPreview.d.ts +1 -1
  6. package/_vendor/schemas/componentPreview.mjs +18 -18
  7. package/_vendor/schemas/designLibrary.d.ts +1 -1
  8. package/_vendor/schemas/designLibrary.mjs +72 -72
  9. package/_vendor/schemas/errors.d.ts +3 -43
  10. package/_vendor/schemas/iframeRpcChannel.d.ts +1 -1
  11. package/_vendor/schemas/iframeRpcChannel.mjs +27 -26
  12. package/_vendor/schemas/loaderKeys.d.ts +1 -1
  13. package/_vendor/schemas/pageAnnotations.d.ts +1 -1
  14. package/_vendor/schemas/pageAnnotations.mjs +1 -1
  15. package/_vendor/schemas/reploError.d.ts +43 -0
  16. package/_vendor/schemas/savedStyles.d.ts +1 -1
  17. package/_vendor/schemas/selectMode.d.ts +1 -1
  18. package/_vendor/schemas/selectMode.mjs +1 -1
  19. package/_vendor/schemas/selectModeIframeRpc.d.ts +1 -8
  20. package/_vendor/schemas/selectModeIframeRpc.mjs +3 -10
  21. package/buildMetadata.js +3 -3
  22. package/capturePage.js +1 -1
  23. package/{chunk-3YA3QXUQ.mjs → chunk-B3PLD7SH.mjs} +29 -18
  24. package/{chunk-KFJZ2OLV.mjs → chunk-TP4ZXK4R.mjs} +1 -1
  25. package/package.json +4 -4
  26. package/rrweb-snapshot-GTQBXO2Y.mjs +5761 -0
  27. package/select-mode/descriptor/elementDescriptor.js +1 -1
  28. package/select-mode/fiber.js +1 -1
  29. package/select-mode/hooks/useOptimisticOverrides.js +1 -1
  30. package/select-mode/hooks/useParentMessaging.js +1 -1
  31. package/select-mode/iframeRpcChannel.d.ts +0 -6
  32. package/select-mode/iframeRpcChannel.js +2 -8
@@ -26,6 +26,21 @@ export declare const deepEqual: typeof dequalLite;
26
26
  * @returns A new object without the specified keys
27
27
  */
28
28
  export declare function omit<ObjectType extends Record<string, any>, KeyType extends keyof ObjectType>(obj: ObjectType, keysToOmit: KeyType[]): Omit<ObjectType, KeyType>;
29
- export declare function filterUndefined<ObjectType extends Record<string, unknown>>(data: ObjectType): Partial<ObjectType>;
29
+ /**
30
+ * `ObjectType` with every key that can hold `undefined` made optional and
31
+ * `undefined` removed from its value type. Keys that can't be `undefined`
32
+ * stay required.
33
+ */
34
+ export type WithoutUndefined<ObjectType> = {
35
+ [Key in keyof ObjectType as undefined extends ObjectType[Key] ? never : Key]: ObjectType[Key];
36
+ } & {
37
+ [Key in keyof ObjectType as undefined extends ObjectType[Key] ? Key : never]?: Exclude<ObjectType[Key], undefined>;
38
+ };
39
+ /**
40
+ * Copies `data` without its `undefined`-valued own keys. A plain loop rather
41
+ * than lodash `pickBy`: this ships in the published SDK, and `pickBy` drags in
42
+ * lodash's iteratee-shorthand machinery (~6 KB gzipped) for a one-line check.
43
+ */
44
+ export declare function filterUndefined<ObjectType extends Record<string, unknown>>(data: ObjectType): WithoutUndefined<ObjectType>;
30
45
  export declare function toNullableIfDefined<ValueType>(value: ValueType | undefined): ValueType | null | undefined;
31
46
  export {};
@@ -98,7 +98,7 @@ export declare function requestChildViewportContexts(input: Parameters<typeof re
98
98
  */
99
99
  export declare function startViewportSnapshotResponder({ targetWindow, takeSnapshot, measureFrameRect, measureViewportContext, isTrustedRequester, cascadeTimeoutMs, }: {
100
100
  targetWindow: RelayWindow;
101
- takeSnapshot: () => unknown;
101
+ takeSnapshot: () => unknown | Promise<unknown>;
102
102
  measureFrameRect: (frameIndex: number) => ViewportFrameRect | null;
103
103
  measureViewportContext?: () => ViewportFrameContext;
104
104
  isTrustedRequester?: (origin: string) => boolean;
@@ -1 +1 @@
1
- export { VIEWPORT_CONTEXT_REQUEST, VIEWPORT_CONTEXT_RESPONSE, VIEWPORT_SNAPSHOT_MAX_DEPTH, VIEWPORT_SNAPSHOT_REQUEST, VIEWPORT_SNAPSHOT_RESPONSE, isTrustedViewportSnapshotRequester, requestChildViewportContexts, requestChildViewportSnapshots, startViewportSnapshotResponder } from '../../../chunk-3YA3QXUQ.mjs';
1
+ export { VIEWPORT_CONTEXT_REQUEST, VIEWPORT_CONTEXT_RESPONSE, VIEWPORT_SNAPSHOT_MAX_DEPTH, VIEWPORT_SNAPSHOT_REQUEST, VIEWPORT_SNAPSHOT_RESPONSE, isTrustedViewportSnapshotRequester, requestChildViewportContexts, requestChildViewportSnapshots, startViewportSnapshotResponder } from '../../../chunk-B3PLD7SH.mjs';