@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
Binary file
@@ -723,7 +723,7 @@
723
723
  "bindings": [
724
724
  "presentedPath"
725
725
  ],
726
- "propsSource": "export interface BottomSheetProps {\n /** Place the sheet as a root-payload sibling (normally the final child), not\n * inside the trigger row, so its presented overlay can cover the whole screen. */\n content?: Component;\n /** Fractional heights, e.g. [0.3, 0.9]. */\n detents?: number[];\n dismissible?: boolean;\n showGrabber?: boolean;\n onDismiss?: Action;\n presented?: boolean;\n /** \"$service:\" binding → bool (overrides `presented`). */\n presentedPath?: string;\n edge?: \"bottom\" | \"leading\" | \"trailing\";\n /** The overlay traps focus and hides the rest of the tree from AT while\n * presented (iOS `accessibilityViewIsModal`, Android `isTraversalGroup`, ARIA\n * `aria-modal`). TRI-STATE: absent takes this component's default (**true**), an\n * explicit `false` opts it out. */\n modal?: boolean;\n}"
726
+ "propsSource": "export interface BottomSheetProps {\n /** Place the sheet as a root-payload sibling (normally the final child), not\n * inside the trigger row, so its presented overlay can cover the whole screen. */\n content?: Component;\n /** Fractional heights, e.g. [0.3, 0.9]. */\n detents?: number[];\n dismissible?: boolean;\n showGrabber?: boolean;\n onDismiss?: Action;\n presented?: boolean;\n /** \"$service:\" binding → bool (overrides `presented`). */\n presentedPath?: string;\n edge?: \"bottom\" | \"leading\" | \"trailing\";\n /** The overlay traps focus and hides the rest of the tree from AT while\n * presented (iOS `accessibilityViewIsModal`, Android `isTraversalGroup`, ARIA\n * `aria-modal`). TRI-STATE: absent takes this component's default (**true**), an\n * explicit `false` opts it out. Since an explicit `false` also drops the scrim: the\n * sheet is non-blocking and the screen behind it stays usable. */\n modal?: boolean;\n /** Where the sheet is drawn. `\"overlay\"` (default) floats over the screen and the\n * tab bar; `\"inline\"` draws it over the bottom of the content region, directly above the tab\n * bar. `\"inline\"` needs `modal: false`. */\n placement?: \"overlay\" | \"inline\";\n /** > 0 closes the sheet after this many milliseconds, with the countdown owned by\n * the RENDERER (no worker timer). Interaction inside the sheet pauses it; a drag up to a larger\n * detent cancels it. Needs `modal: false`. */\n autoDismissMs?: number;\n /** Accessible name of a non-modal sheet, announced as an alert when it presents. */\n label?: string;\n}"
727
727
  },
728
728
  {
729
729
  "name": "Menu",
@@ -1322,8 +1322,19 @@ export interface BottomSheetProps {
1322
1322
  /** The overlay traps focus and hides the rest of the tree from AT while
1323
1323
  * presented (iOS `accessibilityViewIsModal`, Android `isTraversalGroup`, ARIA
1324
1324
  * `aria-modal`). TRI-STATE: absent takes this component's default (**true**), an
1325
- * explicit `false` opts it out. */
1325
+ * explicit `false` opts it out. Since an explicit `false` also drops the scrim: the
1326
+ * sheet is non-blocking and the screen behind it stays usable. */
1326
1327
  modal?: boolean;
1328
+ /** Where the sheet is drawn. `"overlay"` (default) floats over the screen and the
1329
+ * tab bar; `"inline"` draws it over the bottom of the content region, directly above the tab
1330
+ * bar. `"inline"` needs `modal: false`. */
1331
+ placement?: "overlay" | "inline";
1332
+ /** > 0 closes the sheet after this many milliseconds, with the countdown owned by
1333
+ * the RENDERER (no worker timer). Interaction inside the sheet pauses it; a drag up to a larger
1334
+ * detent cancels it. Needs `modal: false`. */
1335
+ autoDismissMs?: number;
1336
+ /** Accessible name of a non-modal sheet, announced as an alert when it presents. */
1337
+ label?: string;
1327
1338
  }
1328
1339
  ```
1329
1340
 
@@ -853,11 +853,23 @@
853
853
  "jsdoc": "/**\n * Present a full-screen QR scanner (iOS AVFoundation; camera-based). Resolves with\n * the decoded string, or `null` if the user cancelled / no code was found.\n */",
854
854
  "decl": "export async function scanQR(): Promise<string | null>;"
855
855
  },
856
+ {
857
+ "name": "PreparedImage",
858
+ "kind": "interface",
859
+ "jsdoc": "",
860
+ "decl": "export interface PreparedImage {\n file: FileHandle;\n /** Small JPEG preview; full upload bytes stay in the file substrate. */\n previewUri: string;\n width: number;\n height: number;\n}"
861
+ },
862
+ {
863
+ "name": "prepareImage",
864
+ "kind": "function",
865
+ "jsdoc": "/** Normalize a picked substrate image for uploading without moving its full\n * bytes through the worker. Native hosts decode HEIC/HEIF, apply orientation,\n * and bound the dimensions/encoded size. Unsupported browser codecs fail\n * explicitly instead of returning an unpreviewable original. Requires camera\n * capability version 2; does not present a picker or request camera access. */",
866
+ "decl": "export async function prepareImage(file: FileHandle, options?: { maxEdgePixels?: number; maxBytes?: number }): Promise<PreparedImage>;"
867
+ },
856
868
  {
857
869
  "name": "version",
858
870
  "kind": "const",
859
871
  "jsdoc": "",
860
- "decl": "export const version = 1;"
872
+ "decl": "export const version = 2;"
861
873
  }
862
874
  ]
863
875
  },
@@ -1108,12 +1120,30 @@
1108
1120
  "name": "FilePickOptions",
1109
1121
  "kind": "interface",
1110
1122
  "jsdoc": "",
1111
- "decl": "export interface FilePickOptions {\n /** Allowed types — UTType identifiers (iOS) or MIME types (Android/web). */\n types?: string[];\n /** Allow selecting multiple documents. */\n multiple?: boolean;\n}"
1123
+ "decl": "export interface FilePickOptions {\n /** Allowed types — UTType identifiers (iOS) or MIME types (Android/web). */\n types?: string[];\n /** Allow selecting multiple documents. */\n multiple?: boolean;\n /** Rejected before materializing bytes; an unknown provider length is bounded while reading. */\n maxBytes?: number;\n /** Optional source-image limit, before host preparation. Defaults to maxBytes. */\n maxImageBytes?: number;\n maxItems?: number;\n maxTotalBytes?: number;\n}"
1124
+ },
1125
+ {
1126
+ "name": "FilePickRejection",
1127
+ "kind": "type",
1128
+ "jsdoc": "",
1129
+ "decl": "export type FilePickRejection = FileSelectionRejection;"
1130
+ },
1131
+ {
1132
+ "name": "FilePickResult",
1133
+ "kind": "type",
1134
+ "jsdoc": "",
1135
+ "decl": "export type FilePickResult = FileSelectionResult;"
1136
+ },
1137
+ {
1138
+ "name": "pickDetailed",
1139
+ "kind": "function",
1140
+ "jsdoc": "/** Detailed bounded selection: valid files survive alongside explicit refusals. */",
1141
+ "decl": "export async function pickDetailed(options?: FilePickOptions): Promise<FilePickResult>;"
1112
1142
  },
1113
1143
  {
1114
1144
  "name": "pick",
1115
1145
  "kind": "function",
1116
- "jsdoc": "/** Present the OS document picker. Resolves the picked documents as FileHandles\n * copied into the substrate, or [] on cancel. */",
1146
+ "jsdoc": "/** Present the document picker and return accepted substrate FileHandles, or []\n * on cancellation. Use pickDetailed to inspect explicit import refusals. */",
1117
1147
  "decl": "export async function pick(options?: FilePickOptions): Promise<FileHandle[]>;"
1118
1148
  },
1119
1149
  {
@@ -1126,7 +1156,7 @@
1126
1156
  "name": "version",
1127
1157
  "kind": "const",
1128
1158
  "jsdoc": "/** Capability version, for bundles that gate on min binary version. */",
1129
- "decl": "export const version = 1;"
1159
+ "decl": "export const version = 2;"
1130
1160
  }
1131
1161
  ]
1132
1162
  },
@@ -1187,7 +1217,7 @@
1187
1217
  "name": "version",
1188
1218
  "kind": "const",
1189
1219
  "jsdoc": "/** Capability version, for bundles that gate on min binary version. */",
1190
- "decl": "export const version = 1;"
1220
+ "decl": "export const version = 2;"
1191
1221
  }
1192
1222
  ]
1193
1223
  },
@@ -3543,12 +3573,18 @@
3543
3573
  "name": "PickOptions",
3544
3574
  "kind": "interface",
3545
3575
  "jsdoc": "",
3546
- "decl": "export interface PickOptions {\n /** Max items to pick (default: platform default, usually 1). */\n limit?: number;\n /** Media kinds to offer. */\n type?: \"images\" | \"videos\" | \"any\";\n}"
3576
+ "decl": "export interface PickOptions {\n /** Max items to pick (default: platform default, usually 1). */\n limit?: number;\n /** Media kinds to offer. */\n type?: \"images\" | \"videos\" | \"any\";\n maxBytes?: number;\n maxTotalBytes?: number;\n}"
3577
+ },
3578
+ {
3579
+ "name": "pickDetailed",
3580
+ "kind": "function",
3581
+ "jsdoc": "/** Present the OS photo picker without a permission prompt. Returns substrate\n * FileHandles and explicit count/size/total refusals; cancellation returns empty arrays. */",
3582
+ "decl": "export async function pickDetailed(options?: PickOptions): Promise<FileSelectionResult>;"
3547
3583
  },
3548
3584
  {
3549
3585
  "name": "pick",
3550
3586
  "kind": "function",
3551
- "jsdoc": "/** Present the OS photo picker (no permission). Resolves the picked items as\n * FileHandles copied into the substrate, or [] on cancel. */",
3587
+ "jsdoc": "/** Present the photo picker and return accepted substrate FileHandles, or [] on\n * cancellation. Use pickDetailed to inspect explicit import refusals. */",
3552
3588
  "decl": "export async function pick(options?: PickOptions): Promise<FileHandle[]>;"
3553
3589
  },
3554
3590
  {
@@ -3567,7 +3603,7 @@
3567
3603
  "name": "version",
3568
3604
  "kind": "const",
3569
3605
  "jsdoc": "/** Capability version, for bundles that gate on min binary version. */",
3570
- "decl": "export const version = 1;"
3606
+ "decl": "export const version = 2;"
3571
3607
  }
3572
3608
  ]
3573
3609
  },
@@ -3622,7 +3658,7 @@
3622
3658
  "name": "version",
3623
3659
  "kind": "const",
3624
3660
  "jsdoc": "/** Capability version, for bundles that gate on min binary version. */",
3625
- "decl": "export const version = 1;"
3661
+ "decl": "export const version = 2;"
3626
3662
  }
3627
3663
  ]
3628
3664
  },
@@ -3914,7 +3950,19 @@
3914
3950
  "name": "FileHandle",
3915
3951
  "kind": "interface",
3916
3952
  "jsdoc": "/** A reference to a file in the per-account substrate\n * (`Library/Application Support/<App>/{accountId}/files/…`). Capabilities that\n * produce or consume binary data (photos, file_picker, files, audio_record)\n * pass these instead of moving bytes across the structured-clone worker bridge\n * (\"handles, not blobs\" — spec R3). The `uri` is also what the on-device agent's\n * `read_file` tool resolves, so everything captured is agent-legible for free\n * (invariant 25). */",
3917
- "decl": "export interface FileHandle {\n /** Stable path/URI within the substrate; valid within an account across\n * worker restarts. Use `files.stat` as the existence check. */\n uri: string;\n /** Display/base file name. */\n name: string;\n /** MIME type (e.g. \"image/jpeg\", \"application/pdf\"). */\n mimeType: string;\n /** Byte length of the file the handle points at. */\n sizeBytes: number;\n}"
3953
+ "decl": "export interface FileHandle {\n /** Stable path/URI within the substrate; valid within an account across\n * worker restarts. Use `files.stat` as the existence check. */\n uri: string;\n /** Display/base file name. */\n name: string;\n /** MIME type (e.g. \"image/jpeg\", \"application/pdf\"). */\n mimeType: string;\n /** Byte length of the file the handle points at. */\n sizeBytes: number;\n /** Opaque owner-partition stamp; hosts reject use after an account switch. */\n ownerScope?: string;\n}"
3954
+ },
3955
+ {
3956
+ "name": "FileSelectionRejection",
3957
+ "kind": "interface",
3958
+ "jsdoc": "/** A bounded OS selection can retain valid files while explaining rejected ones. */",
3959
+ "decl": "export interface FileSelectionRejection {\n name: string;\n mimeType: string;\n reason: \"size\" | \"count\" | \"total\";\n}"
3960
+ },
3961
+ {
3962
+ "name": "FileSelectionResult",
3963
+ "kind": "interface",
3964
+ "jsdoc": "",
3965
+ "decl": "export interface FileSelectionResult {\n items: FileHandle[];\n rejected: FileSelectionRejection[];\n}"
3918
3966
  },
3919
3967
  {
3920
3968
  "name": "PermissionStatus",
@@ -21,10 +21,10 @@ the SDK sources, so it matches the shipped SDKs.
21
21
  - [`browser_auth`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Fbrowser_auth?format=md) — Native browser SSO. 1 method.
22
22
  - [`calendar`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Fcalendar?format=md) — Device calendar. 6 methods.
23
23
  - [`calls`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Fcalls?format=md) — Real-time 1:1 audio calls (Stage 1). 16 methods.
24
- - [`camera`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Fcamera?format=md) — Camera capability. 3 methods.
24
+ - [`camera`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Fcamera?format=md) — Camera capability. 4 methods · returns FileHandles.
25
25
  - [`clipboard`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Fclipboard?format=md) — System clipboard. 3 methods.
26
26
  - [`contacts`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Fcontacts?format=md) — Device address book. 4 methods.
27
- - [`file_picker`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Ffile_picker?format=md) — User-mediated document access OUTSIDE the app sandbox. 2 methods · returns FileHandles.
27
+ - [`file_picker`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Ffile_picker?format=md) — User-mediated document access OUTSIDE the app sandbox. 3 methods · returns FileHandles.
28
28
  - [`files`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Ffiles?format=md) — App-scoped document storage. 6 methods · returns FileHandles.
29
29
  - [`godot`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Fgodot?format=md) — A Godot game surface. 3 methods · not in Brandy.
30
30
  - [`haptic`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Fhaptic?format=md) — Haptic capability. 1 method.
@@ -40,7 +40,7 @@ the SDK sources, so it matches the shipped SDKs.
40
40
  - [`on_device_ai`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Fon_device_ai?format=md) — ON-DEVICE text generation. 4 methods.
41
41
  - [`open_url`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Fopen_url?format=md) — Opening links + external apps. 2 methods.
42
42
  - [`pdf`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Fpdf?format=md) — Viewing PDF documents. 2 methods.
43
- - [`photos`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Fphotos?format=md) — Photo library (picker-first). 3 methods · returns FileHandles.
43
+ - [`photos`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Fphotos?format=md) — Photo library (picker-first). 4 methods · returns FileHandles.
44
44
  - [`presigned_upload`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Fpresigned_upload?format=md) — A RAW binary upload to a pre-signed, self-authorizing URL. 2 methods.
45
45
  - [`push`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Fpush?format=md) — Push capability. 12 methods.
46
46
  - [`release_control`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Frelease_control?format=md) — On-device OTA release picker. 5 methods · not in Brandy.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.1382.0",
3
+ "version": "0.1384.0",
4
4
  "type": "module",
5
5
  "description": "himi — the Himalaya authoring CLI. Build a Tier-5 content package on your own machine, push it to the production serve as a draft, preview it on web + Himi Player, and read worker logs back — the remote dev loop. Wraps @himalaya/serve-cli for transport.",
6
6
  "keywords": [
@@ -71,5 +71,5 @@
71
71
  "artifactId": "himalaya-cli"
72
72
  }
73
73
  },
74
- "falconPackageHash": "bf48846c2a2431e3a6162243ce2bec22f1c9ee0b1d1fbc13f3ea648c"
74
+ "falconPackageHash": "3417218b8a343184cc3d53f78c7a33615e79fc87778ce68ef648388b"
75
75
  }
@@ -37,7 +37,7 @@ export default defineApp({
37
37
  actions: "http://localhost:8190/v1/actions",
38
38
  sync: "http://localhost:8190/v1/sync",
39
39
  },
40
- capabilities: ["live_activity","push","share","secure_storage","open_url","local_database","clipboard","ui","speech","camera","presigned_upload","app_info","biometrics","wix_platform"],
40
+ capabilities: ["live_activity","push","share","secure_storage","open_url","local_database","clipboard","ui","speech","camera","photos","file_picker","files","presigned_upload","app_info","biometrics","wix_platform"],
41
41
  designTokensPath: "./tokens.json",
42
42
  navigation: {
43
43
  "navKind": "responsive",
@@ -61284,6 +61284,9 @@ const SCREENS = runtimeSetting({
61284
61284
  "ui",
61285
61285
  "speech",
61286
61286
  "camera",
61287
+ "photos",
61288
+ "file_picker",
61289
+ "files",
61287
61290
  "presigned_upload",
61288
61291
  "stream",
61289
61292
  "wix_platform"
@@ -18,6 +18,8 @@
18
18
  * never silently dropped — the native Aria app drops unsupported files without a
19
19
  * word, and an owner who picked something and sees nothing happen assumes the
20
20
  * button is broken. */
21
+ import type { FileHandle } from "@himalaya/sdk-types";
22
+
21
23
  export const ARIA_IMAGE_TYPES: readonly string[] = [
22
24
  "image/png",
23
25
  "image/jpeg",
@@ -25,6 +27,7 @@ export const ARIA_IMAGE_TYPES: readonly string[] = [
25
27
  "image/webp",
26
28
  "image/gif",
27
29
  "image/heic",
30
+ "image/heif",
28
31
  ];
29
32
 
30
33
  /** Document MIME types supported by the native Aria reference. */
@@ -33,24 +36,22 @@ export const ARIA_DOCUMENT_TYPES: readonly string[] = [
33
36
  "application/vnd.ms-excel", "application/vnd.ms-powerpoint",
34
37
  "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
35
38
  "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
39
+ "application/vnd.openxmlformats-officedocument.presentationml.presentation",
36
40
  ];
37
41
 
42
+ /** Android's actual DocumentsProvider reports CSV using this equivalent MIME.
43
+ * Include it in picker filters, then normalize it back to the wire's text/csv. */
44
+ export const ARIA_DOCUMENT_PICKER_TYPES: readonly string[] = [...ARIA_DOCUMENT_TYPES, "text/comma-separated-values"];
45
+
38
46
  /** At most this many attachments ride one message. The native Aria app caps at
39
47
  * 10; nothing on the wire says otherwise. */
40
48
  export const ARIA_MAX_ATTACHMENTS = 10;
41
49
 
42
- /** The largest image the composer will try to send, in bytes.
43
- *
44
- * Not a product choice: it is the ceiling of the transfer this slice uses. A
45
- * picked photo crosses the worker bridge as a base64 string and is sent inline,
46
- * and the inline upload refuses anything over 8 MiB (the `MAX_INLINE_BASE64_BYTES`
47
- * bound of the pre-signed upload capability, which it enforces on every arm).
48
- * Checking it HERE is what turns that refusal into a sentence the owner can act
49
- * on, instead of a chip that fails for no stated reason. */
50
- export const ARIA_MAX_IMAGE_BYTES = 8 * 1024 * 1024;
51
- // Inline documents include base64 and JSON overhead under the 4 MiB frame bridge.
52
- // Larger documents use the file-backed attachment follow-up.
53
- export const ARIA_MAX_DOCUMENT_BYTES = 2 * 1024 * 1024;
50
+ /** Prepared/staged limits from first-party Composer policy b2205e5f. Full
51
+ * upload bytes stay in FileHandles; the inline bridge bound is separate. */
52
+ export const ARIA_MAX_IMAGE_BYTES = 4 * 1024 * 1024;
53
+ export const ARIA_MAX_DOCUMENT_BYTES = 25 * 1024 * 1024;
54
+ export const ARIA_MAX_STAGED_BYTES = 100 * 1024 * 1024;
54
55
 
55
56
  /** A chip in the composer. Every field is always present — a `$item.` path that
56
57
  * is missing on some rows does not substitute — and each `…Hidden` flag
@@ -64,7 +65,7 @@ export interface AriaAttachmentChip {
64
65
  state: "uploading" | "ready" | "failed";
65
66
  /** The chip's thumbnail as a `data:` URI, set only when the picked image is
66
67
  * small; "" otherwise, which collapses the preview. The full bytes an upload
67
- * and a retry send are held by the worker, never in the chip, because the chip
68
+ * and a retry send stay in the host file substrate; only its handle rides the chip, which
68
69
  * rides the service state and a large photo there would exceed the web
69
70
  * runtime's frame limit. */
70
71
  thumbUrl: string;
@@ -80,6 +81,9 @@ export interface AriaAttachmentChip {
80
81
  /** `genie-upload://<id>` once the bytes have landed; "" until then. The send
81
82
  * carries a chip only when this is set. */
82
83
  ref: string;
84
+ /** Persistent substrate handle: retry after worker restart needs no inline bytes. */
85
+ file: FileHandle | null;
86
+ sizeBytes: number;
83
87
  }
84
88
 
85
89
  /** What an upload reports back, delivered as a fresh action so it lands on the
@@ -120,6 +124,7 @@ export function normalizeMime(mime: string): string {
120
124
  case "public.jpeg": return "image/jpeg";
121
125
  case "public.png": return "image/png";
122
126
  case "public.heic": return "image/heic";
127
+ case "public.heif": return "image/heif";
123
128
  case "com.compuserve.gif": return "image/gif";
124
129
  case "org.webmproject.webp": return "image/webp";
125
130
  case "image/jpg": return "image/jpeg";
@@ -156,20 +161,29 @@ export function imageFileName(mimeType: string, n: number, given?: string): stri
156
161
  }
157
162
 
158
163
  /** Why a picked file cannot be attached, or "" when it can. */
159
- export type AttachRefusal = "" | "type" | "size" | "count";
164
+ export type AttachRefusal = "" | "type" | "size" | "count" | "total";
160
165
 
161
- export function refusalFor(parsed: ParsedDataUri | null, mimeType: string, attached: number): AttachRefusal {
166
+ /** Pinned first-party Composer policy, revision b2205e5f. The file here is
167
+ * already normalized: raster preparation happens in the host before staging. */
168
+ export function refusalForFile(bytes: number, mimeType: string, attached: number, stagedBytes = 0): AttachRefusal {
162
169
  if (attached >= ARIA_MAX_ATTACHMENTS) return "count";
163
- if (!parsed || ![...ARIA_IMAGE_TYPES, ...ARIA_DOCUMENT_TYPES].includes(mimeType)) return "type";
164
- if (parsed.bytes > (mimeType.startsWith("image/") ? ARIA_MAX_IMAGE_BYTES : ARIA_MAX_DOCUMENT_BYTES)) return "size";
170
+ if (![...ARIA_IMAGE_TYPES, ...ARIA_DOCUMENT_TYPES].includes(mimeType) || !Number.isFinite(bytes) || bytes < 0) return "type";
171
+ const limit = mimeType.startsWith("image/") ? ARIA_MAX_IMAGE_BYTES : ARIA_MAX_DOCUMENT_BYTES;
172
+ if (bytes > limit) return "size";
173
+ if (bytes + stagedBytes > ARIA_MAX_STAGED_BYTES) return "total";
165
174
  return "";
166
175
  }
167
176
 
177
+ export function refusalFor(parsed: ParsedDataUri | null, mimeType: string, attached: number): AttachRefusal {
178
+ if (!parsed) return attached >= ARIA_MAX_ATTACHMENTS ? "count" : "type";
179
+ return refusalForFile(parsed.bytes, mimeType, attached);
180
+ }
181
+
168
182
  /** A chip in a given state. One constructor so the flags can never disagree
169
183
  * with the state they describe — a failed chip without its retry control is
170
184
  * the shape of bug this rules out. */
171
185
  export function chipIn(
172
- base: Pick<AriaAttachmentChip, "id" | "name" | "mimeType" | "thumbUrl">,
186
+ base: Pick<AriaAttachmentChip, "id" | "name" | "mimeType" | "thumbUrl"> & Partial<Pick<AriaAttachmentChip, "file" | "sizeBytes">>,
173
187
  state: AriaAttachmentChip["state"],
174
188
  labels: { uploading: string; failed: string },
175
189
  ref = "",
@@ -182,9 +196,12 @@ export function chipIn(
182
196
  "application/vnd.ms-excel": "XLS", "application/vnd.ms-powerpoint": "PPT",
183
197
  "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "XLSX",
184
198
  "application/vnd.openxmlformats-officedocument.wordprocessingml.document": "DOCX",
199
+ "application/vnd.openxmlformats-officedocument.presentationml.presentation": "PPTX",
185
200
  };
186
201
  return {
187
202
  ...base,
203
+ file: base.file ?? null,
204
+ sizeBytes: base.sizeBytes ?? 0,
188
205
  state,
189
206
  thumbHidden: !base.thumbUrl,
190
207
  documentHidden: base.mimeType.startsWith("image/"),