@wix/himalaya-cli 0.1382.0 → 0.1384.0

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 (99) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/builder.d.ts +9 -1
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/camera/src/index.d.ts +18 -1
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/file-picker/src/index.d.ts +14 -4
  4. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/files/src/index.d.ts +1 -1
  5. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/photos/src/index.d.ts +9 -4
  6. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/presigned-upload/src/index.d.ts +1 -1
  7. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/sdk-types/src/capabilities.generated.d.ts +1 -1
  8. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/sdk-types/src/index.d.ts +12 -0
  9. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts +13 -2
  10. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/validator.d.ts +2 -2
  11. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/audio-record.mjs +1 -1
  12. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/calendar.mjs +1 -1
  13. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/calls.mjs +1 -1
  14. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/camera.mjs +17 -1
  15. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/contacts.mjs +1 -1
  16. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +2 -1
  17. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/file-picker.mjs +17 -5
  18. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/files.mjs +9 -5
  19. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/location.mjs +1 -1
  20. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/motion.mjs +1 -1
  21. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/photos.mjs +17 -5
  22. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/presigned-upload.mjs +2 -1
  23. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdk-types.mjs +1 -1
  24. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdui.mjs +2 -1
  25. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/share.mjs +3 -0
  26. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/tasks.mjs +1 -1
  27. package/dist/cli.mjs +540 -41
  28. package/dist/preview-assets.generated.bin +0 -0
  29. package/guides/component-reference.json +1 -1
  30. package/guides/component-reference.md +12 -1
  31. package/guides/sdk-reference.json +58 -10
  32. package/guides/web-page-sdk-reference.md +3 -3
  33. package/package.json +2 -2
  34. package/templates/beauty-salon-owner/config.ts +1 -1
  35. package/templates/beauty-salon-owner/dev/index.ts +3 -0
  36. package/templates/beauty-salon-owner/tier5-src/_shared/aria-attachments.ts +35 -18
  37. package/templates/beauty-salon-owner/tier5-src/_shared/aria-chat.ts +114 -44
  38. package/templates/beauty-salon-owner/tier5-src/_shared/aria-upload-queue.ts +47 -0
  39. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-aria/index.ts +64 -13
  40. package/templates/community-club-owner/config.ts +1 -1
  41. package/templates/community-club-owner/dev/index.ts +3 -0
  42. package/templates/community-club-owner/tier5-src/_shared/aria-attachments.ts +35 -18
  43. package/templates/community-club-owner/tier5-src/_shared/aria-chat.ts +114 -44
  44. package/templates/community-club-owner/tier5-src/_shared/aria-upload-queue.ts +47 -0
  45. package/templates/community-club-owner/tier5-src/himi-owner-lite-aria/index.ts +64 -13
  46. package/templates/events-meetups-owner/config.ts +1 -1
  47. package/templates/events-meetups-owner/dev/index.ts +3 -0
  48. package/templates/events-meetups-owner/tier5-src/_shared/aria-attachments.ts +35 -18
  49. package/templates/events-meetups-owner/tier5-src/_shared/aria-chat.ts +114 -44
  50. package/templates/events-meetups-owner/tier5-src/_shared/aria-upload-queue.ts +47 -0
  51. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-aria/index.ts +64 -13
  52. package/templates/gym-fitness-owner/config.ts +1 -1
  53. package/templates/gym-fitness-owner/dev/index.ts +3 -0
  54. package/templates/gym-fitness-owner/tier5-src/_shared/aria-attachments.ts +35 -18
  55. package/templates/gym-fitness-owner/tier5-src/_shared/aria-chat.ts +114 -44
  56. package/templates/gym-fitness-owner/tier5-src/_shared/aria-upload-queue.ts +47 -0
  57. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-aria/index.ts +64 -13
  58. package/templates/nonprofit-cause-owner/config.ts +1 -1
  59. package/templates/nonprofit-cause-owner/dev/index.ts +3 -0
  60. package/templates/nonprofit-cause-owner/tier5-src/_shared/aria-attachments.ts +35 -18
  61. package/templates/nonprofit-cause-owner/tier5-src/_shared/aria-chat.ts +114 -44
  62. package/templates/nonprofit-cause-owner/tier5-src/_shared/aria-upload-queue.ts +47 -0
  63. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-aria/index.ts +64 -13
  64. package/templates/owner-lite/config.ts +1 -1
  65. package/templates/owner-lite/dev/index.ts +3 -0
  66. package/templates/owner-lite/tier5-src/_shared/aria-attachments.ts +35 -18
  67. package/templates/owner-lite/tier5-src/_shared/aria-chat.ts +114 -44
  68. package/templates/owner-lite/tier5-src/_shared/aria-upload-queue.ts +47 -0
  69. package/templates/owner-lite/tier5-src/himi-owner-lite-aria/index.ts +64 -13
  70. package/templates/podcast-creator-owner/config.ts +1 -1
  71. package/templates/podcast-creator-owner/dev/index.ts +3 -0
  72. package/templates/podcast-creator-owner/tier5-src/_shared/aria-attachments.ts +35 -18
  73. package/templates/podcast-creator-owner/tier5-src/_shared/aria-chat.ts +114 -44
  74. package/templates/podcast-creator-owner/tier5-src/_shared/aria-upload-queue.ts +47 -0
  75. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-aria/index.ts +64 -13
  76. package/templates/portfolio-creative-owner/config.ts +1 -1
  77. package/templates/portfolio-creative-owner/dev/index.ts +3 -0
  78. package/templates/portfolio-creative-owner/tier5-src/_shared/aria-attachments.ts +35 -18
  79. package/templates/portfolio-creative-owner/tier5-src/_shared/aria-chat.ts +114 -44
  80. package/templates/portfolio-creative-owner/tier5-src/_shared/aria-upload-queue.ts +47 -0
  81. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-aria/index.ts +64 -13
  82. package/templates/restaurant-owner/config.ts +1 -1
  83. package/templates/restaurant-owner/dev/index.ts +3 -0
  84. package/templates/restaurant-owner/tier5-src/_shared/aria-attachments.ts +35 -18
  85. package/templates/restaurant-owner/tier5-src/_shared/aria-chat.ts +114 -44
  86. package/templates/restaurant-owner/tier5-src/_shared/aria-upload-queue.ts +47 -0
  87. package/templates/restaurant-owner/tier5-src/himi-owner-lite-aria/index.ts +64 -13
  88. package/templates/retail-store-owner/config.ts +1 -1
  89. package/templates/retail-store-owner/dev/index.ts +3 -0
  90. package/templates/retail-store-owner/tier5-src/_shared/aria-attachments.ts +35 -18
  91. package/templates/retail-store-owner/tier5-src/_shared/aria-chat.ts +114 -44
  92. package/templates/retail-store-owner/tier5-src/_shared/aria-upload-queue.ts +47 -0
  93. package/templates/retail-store-owner/tier5-src/himi-owner-lite-aria/index.ts +64 -13
  94. package/templates/yoga-studio-owner/config.ts +1 -1
  95. package/templates/yoga-studio-owner/dev/index.ts +3 -0
  96. package/templates/yoga-studio-owner/tier5-src/_shared/aria-attachments.ts +35 -18
  97. package/templates/yoga-studio-owner/tier5-src/_shared/aria-chat.ts +114 -44
  98. package/templates/yoga-studio-owner/tier5-src/_shared/aria-upload-queue.ts +47 -0
  99. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-aria/index.ts +64 -13
@@ -926,8 +926,16 @@ export declare function bottomSheet(props: {
926
926
  presentedPath?: string;
927
927
  edge?: "bottom" | "leading" | "trailing";
928
928
  /** RFC 0058 §4 — trap focus and hide the rest of the tree from AT while presented.
929
- * Tri-state: absent takes the BottomSheet default (modal), `false` opts out. */
929
+ * Tri-state: absent takes the BottomSheet default (modal), `false` opts out — and, since
930
+ * RFC 0068, drops the scrim: the sheet is non-blocking and the screen stays usable. */
930
931
  modal?: boolean;
932
+ /** RFC 0068 — `"overlay"` (default) floats over the screen and the tab bar; `"inline"` sits
933
+ * directly above the tab bar. `"inline"` needs `modal: false`. */
934
+ placement?: "overlay" | "inline";
935
+ /** RFC 0068 — close after this many ms; the renderer owns the countdown. Needs `modal: false`. */
936
+ autoDismissMs?: number;
937
+ /** RFC 0068 — accessible name of a non-modal sheet, announced as an alert when it presents. */
938
+ label?: string;
931
939
  }, opts?: {
932
940
  id?: string;
933
941
  }): Component;
@@ -1,3 +1,4 @@
1
+ import type { FileHandle } from "@wix/himalaya/sdk-types";
1
2
  export type CaptureSource = "camera" | "library";
2
3
  export interface CaptureOptions {
3
4
  source: CaptureSource;
@@ -34,4 +35,20 @@ export declare function pickDocument(): Promise<PickedDocument | null>;
34
35
  * the decoded string, or `null` if the user cancelled / no code was found.
35
36
  */
36
37
  export declare function scanQR(): Promise<string | null>;
37
- export declare const version = 1;
38
+ export interface PreparedImage {
39
+ file: FileHandle;
40
+ /** Small JPEG preview; full upload bytes stay in the file substrate. */
41
+ previewUri: string;
42
+ width: number;
43
+ height: number;
44
+ }
45
+ /** Normalize a picked substrate image for uploading without moving its full
46
+ * bytes through the worker. Native hosts decode HEIC/HEIF, apply orientation,
47
+ * and bound the dimensions/encoded size. Unsupported browser codecs fail
48
+ * explicitly instead of returning an unpreviewable original. Requires camera
49
+ * capability version 2; does not present a picker or request camera access. */
50
+ export declare function prepareImage(file: FileHandle, options?: {
51
+ maxEdgePixels?: number;
52
+ maxBytes?: number;
53
+ }): Promise<PreparedImage>;
54
+ export declare const version = 2;
@@ -1,17 +1,27 @@
1
- import type { FileHandle } from "@wix/himalaya/sdk-types";
1
+ import type { FileHandle, FileSelectionRejection, FileSelectionResult } from "@wix/himalaya/sdk-types";
2
2
  export type { FileHandle } from "@wix/himalaya/sdk-types";
3
3
  export interface FilePickOptions {
4
4
  /** Allowed types — UTType identifiers (iOS) or MIME types (Android/web). */
5
5
  types?: string[];
6
6
  /** Allow selecting multiple documents. */
7
7
  multiple?: boolean;
8
+ /** Rejected before materializing bytes; an unknown provider length is bounded while reading. */
9
+ maxBytes?: number;
10
+ /** Optional source-image limit, before host preparation. Defaults to maxBytes. */
11
+ maxImageBytes?: number;
12
+ maxItems?: number;
13
+ maxTotalBytes?: number;
8
14
  }
9
- /** Present the OS document picker. Resolves the picked documents as FileHandles
10
- * copied into the substrate, or [] on cancel. */
15
+ export type FilePickRejection = FileSelectionRejection;
16
+ export type FilePickResult = FileSelectionResult;
17
+ /** Detailed bounded selection: valid files survive alongside explicit refusals. */
18
+ export declare function pickDetailed(options?: FilePickOptions): Promise<FilePickResult>;
19
+ /** Present the document picker and return accepted substrate FileHandles, or []
20
+ * on cancellation. Use pickDetailed to inspect explicit import refusals. */
11
21
  export declare function pick(options?: FilePickOptions): Promise<FileHandle[]>;
12
22
  /** Export a substrate file out to a user-chosen location (save/export picker). */
13
23
  export declare function pickDirectoryForExport(file: FileHandle | string): Promise<{
14
24
  exported: boolean;
15
25
  }>;
16
26
  /** Capability version, for bundles that gate on min binary version. */
17
- export declare const version = 1;
27
+ export declare const version = 2;
@@ -37,4 +37,4 @@ export declare function remove(ref: FileHandle | string): Promise<void>;
37
37
  /** Stat a path, or `null` if it doesn't exist (the existence check for handles). */
38
38
  export declare function stat(path: string): Promise<FileStat | null>;
39
39
  /** Capability version, for bundles that gate on min binary version. */
40
- export declare const version = 1;
40
+ export declare const version = 2;
@@ -1,13 +1,18 @@
1
- import type { FileHandle, PermissionStatus } from "@wix/himalaya/sdk-types";
1
+ import type { FileHandle, PermissionStatus, FileSelectionResult } from "@wix/himalaya/sdk-types";
2
2
  export type { FileHandle, PermissionStatus } from "@wix/himalaya/sdk-types";
3
3
  export interface PickOptions {
4
4
  /** Max items to pick (default: platform default, usually 1). */
5
5
  limit?: number;
6
6
  /** Media kinds to offer. */
7
7
  type?: "images" | "videos" | "any";
8
+ maxBytes?: number;
9
+ maxTotalBytes?: number;
8
10
  }
9
- /** Present the OS photo picker (no permission). Resolves the picked items as
10
- * FileHandles copied into the substrate, or [] on cancel. */
11
+ /** Present the OS photo picker without a permission prompt. Returns substrate
12
+ * FileHandles and explicit count/size/total refusals; cancellation returns empty arrays. */
13
+ export declare function pickDetailed(options?: PickOptions): Promise<FileSelectionResult>;
14
+ /** Present the photo picker and return accepted substrate FileHandles, or [] on
15
+ * cancellation. Use pickDetailed to inspect explicit import refusals. */
11
16
  export declare function pick(options?: PickOptions): Promise<FileHandle[]>;
12
17
  /** Save a file (from files/camera/etc.) into the user's photo library. The only
13
18
  * permission-gated method in v1. */
@@ -17,4 +22,4 @@ export declare function saveToLibrary(file: FileHandle | string): Promise<{
17
22
  /** Add-to-library permission status (no prompt). `limited` = iOS limited access. */
18
23
  export declare function getSavePermissionStatus(): Promise<PermissionStatus>;
19
24
  /** Capability version, for bundles that gate on min binary version. */
20
- export declare const version = 1;
25
+ export declare const version = 2;
@@ -62,4 +62,4 @@ export declare function put(url: string, bytes: {
62
62
  */
63
63
  export declare function putFile(url: string, ref: FileHandle | string, opts?: UploadOptions): Promise<UploadResult>;
64
64
  /** Capability version, for bundles that gate on min binary version. */
65
- export declare const version = 1;
65
+ export declare const version = 2;
@@ -7,7 +7,7 @@ export declare const CAPABILITY_REGISTRY: {
7
7
  readonly browser_auth: readonly ["start"];
8
8
  readonly calendar: readonly ["createEvent", "deleteEvent", "getPermissionStatus", "listEvents", "requestPermission", "updateEvent"];
9
9
  readonly calls: readonly ["answer", "availability", "getPermissionStatus", "getState", "hangup", "listCalls", "offer", "receiveSignal", "reject", "requestPermission", "setMuted", "setRingback", "setSpeaker", "signalNext", "signalStart", "signalStop", "start", "subscribeEvents"];
10
- readonly camera: readonly ["capture", "pickDocument", "scanQR"];
10
+ readonly camera: readonly ["capture", "pickDocument", "prepareImage", "scanQR"];
11
11
  readonly clipboard: readonly ["hasText", "readText", "writeText"];
12
12
  readonly contacts: readonly ["getPermissionStatus", "pick", "requestPermission", "search"];
13
13
  readonly file_picker: readonly ["pick", "pickDirectoryForExport"];
@@ -15,6 +15,18 @@ export interface FileHandle {
15
15
  mimeType: string;
16
16
  /** Byte length of the file the handle points at. */
17
17
  sizeBytes: number;
18
+ /** Opaque owner-partition stamp; hosts reject use after an account switch. */
19
+ ownerScope?: string;
20
+ }
21
+ /** A bounded OS selection can retain valid files while explaining rejected ones. */
22
+ export interface FileSelectionRejection {
23
+ name: string;
24
+ mimeType: string;
25
+ reason: "size" | "count" | "total";
26
+ }
27
+ export interface FileSelectionResult {
28
+ items: FileHandle[];
29
+ rejected: FileSelectionRejection[];
18
30
  }
19
31
  /** OS permission state for a gated capability (the R1 permission triad).
20
32
  * `undetermined` ⇒ not yet asked; `limited` ⇒ a partial grant (iOS limited
@@ -400,7 +400,7 @@ export type LiveRegionTrigger = "on_change" | "on_appear" | "both" | "none";
400
400
  /** RFC 0058 §3.2 — the role AT announces for a node. The union of what iOS,
401
401
  * Android, web and React Native can express; an arm that cannot express a role
402
402
  * exactly falls back to the nearest one it has. */
403
- export type AccessibilityRole = "decorative" | "text" | "heading" | "image" | "button" | "link" | "toggle" | "checkbox" | "radio" | "tab" | "tablist" | "adjustable" | "search" | "textfield" | "combobox" | "list" | "listitem" | "menu" | "menuitem" | "dialog" | "alert" | "progressbar" | "summary" | "status" | "group" | "grid" | "gridcell";
403
+ export type AccessibilityRole = "decorative" | "text" | "heading" | "image" | "button" | "link" | "toggle" | "checkbox" | "radio" | "tab" | "tablist" | "adjustable" | "search" | "textfield" | "combobox" | "list" | "listitem" | "menu" | "menuitem" | "dialog" | "alert" | "progressbar" | "summary" | "status" | "group" | "grid" | "gridcell" | "region";
404
404
  /** RFC 0058 §3.2 — additive, orthogonal state a single role cannot carry. */
405
405
  export type AccessibilityTrait = "selected" | "disabled" | "updates_frequently" | "plays_sound" | "starts_media";
406
406
  /** Motion grammar (Phase-3) — drag-to-dismiss config (see `Modifiers.swipeDismiss`). */
@@ -1314,8 +1314,19 @@ export interface BottomSheetProps {
1314
1314
  /** RFC 0058 §4 — the overlay traps focus and hides the rest of the tree from AT while
1315
1315
  * presented (iOS `accessibilityViewIsModal`, Android `isTraversalGroup`, ARIA
1316
1316
  * `aria-modal`). TRI-STATE: absent takes this component's default (**true**), an
1317
- * explicit `false` opts it out. */
1317
+ * explicit `false` opts it out. Since RFC 0068 an explicit `false` also drops the scrim: the
1318
+ * sheet is non-blocking and the screen behind it stays usable. */
1318
1319
  modal?: boolean;
1320
+ /** RFC 0068 — where the sheet is drawn. `"overlay"` (default) floats over the screen and the
1321
+ * tab bar; `"inline"` draws it over the bottom of the content region, directly above the tab
1322
+ * bar. `"inline"` needs `modal: false`. */
1323
+ placement?: "overlay" | "inline";
1324
+ /** RFC 0068 — > 0 closes the sheet after this many milliseconds, with the countdown owned by
1325
+ * the RENDERER (no worker timer). Interaction inside the sheet pauses it; a drag up to a larger
1326
+ * detent cancels it. Needs `modal: false`. */
1327
+ autoDismissMs?: number;
1328
+ /** RFC 0068 — accessible name of a non-modal sheet, announced as an alert when it presents. */
1329
+ label?: string;
1319
1330
  }
1320
1331
  export interface MenuItem {
1321
1332
  id: string;
@@ -627,7 +627,7 @@ export declare const screenDescriptorSchema: {
627
627
  };
628
628
  readonly accessibilityRole: {
629
629
  readonly type: "string";
630
- readonly enum: readonly ["decorative", "text", "heading", "image", "button", "link", "toggle", "checkbox", "radio", "tab", "tablist", "adjustable", "search", "textfield", "combobox", "list", "listitem", "menu", "menuitem", "dialog", "alert", "progressbar", "summary", "status", "group", "grid", "gridcell"];
630
+ readonly enum: readonly ["decorative", "text", "heading", "image", "button", "link", "toggle", "checkbox", "radio", "tab", "tablist", "adjustable", "search", "textfield", "combobox", "list", "listitem", "menu", "menuitem", "dialog", "alert", "progressbar", "summary", "status", "group", "grid", "gridcell", "region"];
631
631
  };
632
632
  readonly accessibilityHint: {
633
633
  readonly type: "string";
@@ -1615,7 +1615,7 @@ export declare const widgetSnapshotSchema: {
1615
1615
  };
1616
1616
  readonly accessibilityRole: {
1617
1617
  readonly type: "string";
1618
- readonly enum: readonly ["decorative", "text", "heading", "image", "button", "link", "toggle", "checkbox", "radio", "tab", "tablist", "adjustable", "search", "textfield", "combobox", "list", "listitem", "menu", "menuitem", "dialog", "alert", "progressbar", "summary", "status", "group", "grid", "gridcell"];
1618
+ readonly enum: readonly ["decorative", "text", "heading", "image", "button", "link", "toggle", "checkbox", "radio", "tab", "tablist", "adjustable", "search", "textfield", "combobox", "list", "listitem", "menu", "menuitem", "dialog", "alert", "progressbar", "summary", "status", "group", "grid", "gridcell", "region"];
1619
1619
  };
1620
1620
  readonly accessibilityHint: {
1621
1621
  readonly type: "string";
@@ -22,7 +22,7 @@ var CAPABILITY_REGISTRY = {
22
22
  "browser_auth": ["start"],
23
23
  "calendar": ["createEvent", "deleteEvent", "getPermissionStatus", "listEvents", "requestPermission", "updateEvent"],
24
24
  "calls": ["answer", "availability", "getPermissionStatus", "getState", "hangup", "listCalls", "offer", "receiveSignal", "reject", "requestPermission", "setMuted", "setRingback", "setSpeaker", "signalNext", "signalStart", "signalStop", "start", "subscribeEvents"],
25
- "camera": ["capture", "pickDocument", "scanQR"],
25
+ "camera": ["capture", "pickDocument", "prepareImage", "scanQR"],
26
26
  "clipboard": ["hasText", "readText", "writeText"],
27
27
  "contacts": ["getPermissionStatus", "pick", "requestPermission", "search"],
28
28
  "file_picker": ["pick", "pickDirectoryForExport"],
@@ -22,7 +22,7 @@ var CAPABILITY_REGISTRY = {
22
22
  "browser_auth": ["start"],
23
23
  "calendar": ["createEvent", "deleteEvent", "getPermissionStatus", "listEvents", "requestPermission", "updateEvent"],
24
24
  "calls": ["answer", "availability", "getPermissionStatus", "getState", "hangup", "listCalls", "offer", "receiveSignal", "reject", "requestPermission", "setMuted", "setRingback", "setSpeaker", "signalNext", "signalStart", "signalStop", "start", "subscribeEvents"],
25
- "camera": ["capture", "pickDocument", "scanQR"],
25
+ "camera": ["capture", "pickDocument", "prepareImage", "scanQR"],
26
26
  "clipboard": ["hasText", "readText", "writeText"],
27
27
  "contacts": ["getPermissionStatus", "pick", "requestPermission", "search"],
28
28
  "file_picker": ["pick", "pickDirectoryForExport"],
@@ -22,7 +22,7 @@ var CAPABILITY_REGISTRY = {
22
22
  "browser_auth": ["start"],
23
23
  "calendar": ["createEvent", "deleteEvent", "getPermissionStatus", "listEvents", "requestPermission", "updateEvent"],
24
24
  "calls": ["answer", "availability", "getPermissionStatus", "getState", "hangup", "listCalls", "offer", "receiveSignal", "reject", "requestPermission", "setMuted", "setRingback", "setSpeaker", "signalNext", "signalStart", "signalStop", "start", "subscribeEvents"],
25
- "camera": ["capture", "pickDocument", "scanQR"],
25
+ "camera": ["capture", "pickDocument", "prepareImage", "scanQR"],
26
26
  "clipboard": ["hasText", "readText", "writeText"],
27
27
  "contacts": ["getPermissionStatus", "pick", "requestPermission", "search"],
28
28
  "file_picker": ["pick", "pickDirectoryForExport"],
@@ -48,10 +48,26 @@ async function scanQR() {
48
48
  if (!result || result.cancelled) return null;
49
49
  return result.code ?? null;
50
50
  }
51
- var version = 1;
51
+ async function prepareImage(file, options) {
52
+ const result = await dispatch("capability.camera.prepareImage", {
53
+ uri: file.uri,
54
+ name: file.name,
55
+ mimeType: file.mimeType,
56
+ ...file.ownerScope ? { ownerScope: file.ownerScope } : {},
57
+ maxEdgePixels: options?.maxEdgePixels ?? 2048,
58
+ maxBytes: options?.maxBytes ?? 4 * 1024 * 1024
59
+ });
60
+ if (result?.error) throw new Error(`camera.prepareImage: ${result.error}`);
61
+ if (!result?.file?.uri || typeof result.width !== "number" || typeof result.height !== "number") {
62
+ throw new Error("camera.prepareImage: native handler returned no prepared image");
63
+ }
64
+ return { file: result.file, previewUri: result.previewUri ?? "", width: result.width, height: result.height };
65
+ }
66
+ var version = 2;
52
67
  export {
53
68
  capturePhoto,
54
69
  pickDocument,
70
+ prepareImage,
55
71
  scanQR,
56
72
  version
57
73
  };
@@ -22,7 +22,7 @@ var CAPABILITY_REGISTRY = {
22
22
  "browser_auth": ["start"],
23
23
  "calendar": ["createEvent", "deleteEvent", "getPermissionStatus", "listEvents", "requestPermission", "updateEvent"],
24
24
  "calls": ["answer", "availability", "getPermissionStatus", "getState", "hangup", "listCalls", "offer", "receiveSignal", "reject", "requestPermission", "setMuted", "setRingback", "setSpeaker", "signalNext", "signalStart", "signalStop", "start", "subscribeEvents"],
25
- "camera": ["capture", "pickDocument", "scanQR"],
25
+ "camera": ["capture", "pickDocument", "prepareImage", "scanQR"],
26
26
  "clipboard": ["hasText", "readText", "writeText"],
27
27
  "contacts": ["getPermissionStatus", "pick", "requestPermission", "search"],
28
28
  "file_picker": ["pick", "pickDirectoryForExport"],
@@ -8509,7 +8509,8 @@ var screenDescriptorSchema = {
8509
8509
  "status",
8510
8510
  "group",
8511
8511
  "grid",
8512
- "gridcell"
8512
+ "gridcell",
8513
+ "region"
8513
8514
  ]
8514
8515
  },
8515
8516
  accessibilityHint: { type: "string" },
@@ -14,21 +14,33 @@ function dispatch(handlerId, params, _options) {
14
14
  }
15
15
 
16
16
  // ../../core/sdk/file-picker/src/index.ts
17
- async function pick(options) {
17
+ async function pickDetailed(options) {
18
18
  const params = {};
19
- if (options?.types && options.types.length > 0) params.types = options.types.join(",");
19
+ if (options?.types?.length) params.types = options.types.join(",");
20
20
  if (options?.multiple) params.multiple = "true";
21
+ for (const key of ["maxBytes", "maxImageBytes", "maxItems", "maxTotalBytes"]) {
22
+ const n = options?.[key];
23
+ if (n !== void 0) {
24
+ if (!Number.isSafeInteger(n) || n <= 0) throw new Error(`file-picker: ${key} must be a positive safe integer`);
25
+ params[key] = String(n);
26
+ }
27
+ }
21
28
  const r = await dispatch("capability.file_picker.pick", params);
22
- return Array.isArray(r?.items) ? r.items : [];
29
+ return { items: Array.isArray(r?.items) ? r.items : [], rejected: Array.isArray(r?.rejected) ? r.rejected : [] };
30
+ }
31
+ async function pick(options) {
32
+ return (await pickDetailed(options)).items;
23
33
  }
24
34
  async function pickDirectoryForExport(file) {
25
35
  const uri = typeof file === "string" ? file : file.uri;
26
- const r = await dispatch("capability.file_picker.pickDirectoryForExport", { uri });
36
+ const ownerScope = typeof file === "string" ? void 0 : file.ownerScope;
37
+ const r = await dispatch("capability.file_picker.pickDirectoryForExport", { uri, ...ownerScope ? { ownerScope } : {} });
27
38
  return { exported: r?.exported === true };
28
39
  }
29
- var version = 1;
40
+ var version = 2;
30
41
  export {
31
42
  pick,
43
+ pickDetailed,
32
44
  pickDirectoryForExport,
33
45
  version
34
46
  };
@@ -26,7 +26,8 @@ function toHandle(r, fallbackPath) {
26
26
  uri: r?.uri ?? fallbackPath,
27
27
  name: r?.name ?? basename(fallbackPath),
28
28
  mimeType: r?.mimeType ?? "application/octet-stream",
29
- sizeBytes: typeof r?.sizeBytes === "number" ? r.sizeBytes : 0
29
+ sizeBytes: typeof r?.sizeBytes === "number" ? r.sizeBytes : 0,
30
+ ...r?.ownerScope ? { ownerScope: r.ownerScope } : {}
30
31
  };
31
32
  }
32
33
  async function write(path, content, opts) {
@@ -38,11 +39,11 @@ async function write(path, content, opts) {
38
39
  return toHandle(r, path);
39
40
  }
40
41
  async function readText(ref) {
41
- const r = await dispatch("capability.files.readText", { uri: refToPath(ref) });
42
+ const r = await dispatch("capability.files.readText", { uri: refToPath(ref), ...typeof ref !== "string" && ref.ownerScope ? { ownerScope: ref.ownerScope } : {} });
42
43
  return r?.text ?? "";
43
44
  }
44
45
  async function readBase64(ref) {
45
- const r = await dispatch("capability.files.readBase64", { uri: refToPath(ref) });
46
+ const r = await dispatch("capability.files.readBase64", { uri: refToPath(ref), ...typeof ref !== "string" && ref.ownerScope ? { ownerScope: ref.ownerScope } : {} });
46
47
  if (r?.error) throw new Error(`files.readBase64: ${r.error}`);
47
48
  return r?.base64 ?? "";
48
49
  }
@@ -51,13 +52,16 @@ async function list(dirPath) {
51
52
  return Array.isArray(r?.items) ? r.items : [];
52
53
  }
53
54
  async function remove(ref) {
54
- await dispatch("capability.files.remove", { uri: refToPath(ref) });
55
+ await dispatch("capability.files.remove", {
56
+ uri: refToPath(ref),
57
+ ...typeof ref !== "string" && ref.ownerScope ? { ownerScope: ref.ownerScope } : {}
58
+ });
55
59
  }
56
60
  async function stat(path) {
57
61
  const r = await dispatch("capability.files.stat", { path });
58
62
  return r?.stat ?? null;
59
63
  }
60
- var version = 1;
64
+ var version = 2;
61
65
  export {
62
66
  list,
63
67
  readBase64,
@@ -22,7 +22,7 @@ var CAPABILITY_REGISTRY = {
22
22
  "browser_auth": ["start"],
23
23
  "calendar": ["createEvent", "deleteEvent", "getPermissionStatus", "listEvents", "requestPermission", "updateEvent"],
24
24
  "calls": ["answer", "availability", "getPermissionStatus", "getState", "hangup", "listCalls", "offer", "receiveSignal", "reject", "requestPermission", "setMuted", "setRingback", "setSpeaker", "signalNext", "signalStart", "signalStop", "start", "subscribeEvents"],
25
- "camera": ["capture", "pickDocument", "scanQR"],
25
+ "camera": ["capture", "pickDocument", "prepareImage", "scanQR"],
26
26
  "clipboard": ["hasText", "readText", "writeText"],
27
27
  "contacts": ["getPermissionStatus", "pick", "requestPermission", "search"],
28
28
  "file_picker": ["pick", "pickDirectoryForExport"],
@@ -22,7 +22,7 @@ var CAPABILITY_REGISTRY = {
22
22
  "browser_auth": ["start"],
23
23
  "calendar": ["createEvent", "deleteEvent", "getPermissionStatus", "listEvents", "requestPermission", "updateEvent"],
24
24
  "calls": ["answer", "availability", "getPermissionStatus", "getState", "hangup", "listCalls", "offer", "receiveSignal", "reject", "requestPermission", "setMuted", "setRingback", "setSpeaker", "signalNext", "signalStart", "signalStop", "start", "subscribeEvents"],
25
- "camera": ["capture", "pickDocument", "scanQR"],
25
+ "camera": ["capture", "pickDocument", "prepareImage", "scanQR"],
26
26
  "clipboard": ["hasText", "readText", "writeText"],
27
27
  "contacts": ["getPermissionStatus", "pick", "requestPermission", "search"],
28
28
  "file_picker": ["pick", "pickDirectoryForExport"],
@@ -22,7 +22,7 @@ var CAPABILITY_REGISTRY = {
22
22
  "browser_auth": ["start"],
23
23
  "calendar": ["createEvent", "deleteEvent", "getPermissionStatus", "listEvents", "requestPermission", "updateEvent"],
24
24
  "calls": ["answer", "availability", "getPermissionStatus", "getState", "hangup", "listCalls", "offer", "receiveSignal", "reject", "requestPermission", "setMuted", "setRingback", "setSpeaker", "signalNext", "signalStart", "signalStop", "start", "subscribeEvents"],
25
- "camera": ["capture", "pickDocument", "scanQR"],
25
+ "camera": ["capture", "pickDocument", "prepareImage", "scanQR"],
26
26
  "clipboard": ["hasText", "readText", "writeText"],
27
27
  "contacts": ["getPermissionStatus", "pick", "requestPermission", "search"],
28
28
  "file_picker": ["pick", "pickDirectoryForExport"],
@@ -68,25 +68,37 @@ function normalizePermissionStatus(s) {
68
68
  function toHandles(items) {
69
69
  return Array.isArray(items) ? items : [];
70
70
  }
71
- async function pick(options) {
71
+ async function pickDetailed(options) {
72
72
  const params = { type: options?.type ?? "images" };
73
73
  if (typeof options?.limit === "number") params.limit = options.limit;
74
+ for (const key of ["maxBytes", "maxTotalBytes"]) {
75
+ const n = options?.[key];
76
+ if (n !== void 0) {
77
+ if (!Number.isSafeInteger(n) || n <= 0) throw new Error(`photos: ${key} must be a positive safe integer`);
78
+ params[key] = n;
79
+ }
80
+ }
74
81
  const r = await dispatch("capability.photos.pick", params);
75
- return toHandles(r?.items);
82
+ return { items: toHandles(r?.items), rejected: Array.isArray(r?.rejected) ? r.rejected : [] };
83
+ }
84
+ async function pick(options) {
85
+ return (await pickDetailed(options)).items;
76
86
  }
77
87
  async function saveToLibrary(file) {
78
88
  const uri = typeof file === "string" ? file : file.uri;
79
- const r = await dispatch("capability.photos.saveToLibrary", { uri });
89
+ const ownerScope = typeof file === "string" ? void 0 : file.ownerScope;
90
+ const r = await dispatch("capability.photos.saveToLibrary", { uri, ...ownerScope ? { ownerScope } : {} });
80
91
  return { saved: r?.saved === true };
81
92
  }
82
93
  async function getSavePermissionStatus() {
83
94
  const r = await dispatch("capability.photos.getSavePermissionStatus");
84
95
  return normalizePermissionStatus(r?.status);
85
96
  }
86
- var version = 1;
97
+ var version = 2;
87
98
  export {
88
99
  getSavePermissionStatus,
89
100
  pick,
101
+ pickDetailed,
90
102
  saveToLibrary,
91
103
  version
92
104
  };
@@ -41,12 +41,13 @@ async function putFile(url, ref, opts) {
41
41
  await dispatch("capability.presigned_upload.putFile", {
42
42
  url: url ?? "",
43
43
  uri: typeof ref === "string" ? ref : ref?.uri ?? "",
44
+ ...typeof ref !== "string" && ref?.ownerScope ? { ownerScope: ref.ownerScope } : {},
44
45
  contentType: opts?.contentType ?? "",
45
46
  method: opts?.method ?? "PUT"
46
47
  })
47
48
  );
48
49
  }
49
- var version = 1;
50
+ var version = 2;
50
51
  export {
51
52
  MAX_INLINE_BASE64_BYTES,
52
53
  MAX_UPLOAD_BYTES,
@@ -7,7 +7,7 @@ var CAPABILITY_REGISTRY = {
7
7
  "browser_auth": ["start"],
8
8
  "calendar": ["createEvent", "deleteEvent", "getPermissionStatus", "listEvents", "requestPermission", "updateEvent"],
9
9
  "calls": ["answer", "availability", "getPermissionStatus", "getState", "hangup", "listCalls", "offer", "receiveSignal", "reject", "requestPermission", "setMuted", "setRingback", "setSpeaker", "signalNext", "signalStart", "signalStop", "start", "subscribeEvents"],
10
- "camera": ["capture", "pickDocument", "scanQR"],
10
+ "camera": ["capture", "pickDocument", "prepareImage", "scanQR"],
11
11
  "clipboard": ["hasText", "readText", "writeText"],
12
12
  "contacts": ["getPermissionStatus", "pick", "requestPermission", "search"],
13
13
  "file_picker": ["pick", "pickDirectoryForExport"],
@@ -7379,7 +7379,8 @@ var screenDescriptorSchema = {
7379
7379
  "status",
7380
7380
  "group",
7381
7381
  "grid",
7382
- "gridcell"
7382
+ "gridcell",
7383
+ "region"
7383
7384
  ]
7384
7385
  },
7385
7386
  accessibilityHint: { type: "string" },
@@ -21,6 +21,9 @@ async function share(options) {
21
21
  if (options.subject) params.subject = options.subject;
22
22
  if (options.files && options.files.length > 0) {
23
23
  params.files = JSON.stringify(options.files.map((f) => f.uri));
24
+ if (options.files.some((f) => f.ownerScope)) {
25
+ params.fileOwners = JSON.stringify(options.files.map((f) => f.ownerScope ?? ""));
26
+ }
24
27
  }
25
28
  const r = await dispatch("capability.share.share", params);
26
29
  return { completed: r?.completed === true };
@@ -22,7 +22,7 @@ var CAPABILITY_REGISTRY = {
22
22
  "browser_auth": ["start"],
23
23
  "calendar": ["createEvent", "deleteEvent", "getPermissionStatus", "listEvents", "requestPermission", "updateEvent"],
24
24
  "calls": ["answer", "availability", "getPermissionStatus", "getState", "hangup", "listCalls", "offer", "receiveSignal", "reject", "requestPermission", "setMuted", "setRingback", "setSpeaker", "signalNext", "signalStart", "signalStop", "start", "subscribeEvents"],
25
- "camera": ["capture", "pickDocument", "scanQR"],
25
+ "camera": ["capture", "pickDocument", "prepareImage", "scanQR"],
26
26
  "clipboard": ["hasText", "readText", "writeText"],
27
27
  "contacts": ["getPermissionStatus", "pick", "requestPermission", "search"],
28
28
  "file_picker": ["pick", "pickDirectoryForExport"],