@wix/himalaya-cli 0.1723.0 → 0.1725.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 (84) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/app-config.d.ts +1 -0
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/app-module.d.ts +2 -0
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/godot/src/index.d.ts +3 -0
  4. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/iap/src/attendance-classifier.d.ts +1 -1
  5. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/iap/src/wix-payments-contract.d.ts +9 -43
  6. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/location/src/index.d.ts +5 -3
  7. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/on-device-ai/src/index.d.ts +19 -7
  8. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/sdk-types/src/capabilities.generated.d.ts +1 -1
  9. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/define-app.d.ts +10 -0
  10. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/index.d.ts +2 -0
  11. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/preview-surfaces.d.ts +24 -0
  12. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/site-web-sdk.d.ts +37 -0
  13. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/site-web-sdk.generated.d.ts +1 -0
  14. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/wrapped-app-link.d.ts +13 -0
  15. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/checkout-source.d.ts +5 -3
  16. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/iap-order-backend.d.ts +0 -2
  17. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/iap-verticals/attendance.d.ts +2 -8
  18. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/iap-verticals/index.d.ts +4 -13
  19. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/iap-verticals/videos.d.ts +31 -1
  20. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/index.d.ts +1 -1
  21. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/audio-record.mjs +1 -1
  22. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/calendar.mjs +1 -1
  23. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/calls.mjs +1 -1
  24. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/contacts.mjs +1 -1
  25. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +175 -1
  26. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/iap-checkout.mjs +127 -509
  27. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/iap.mjs +5 -26
  28. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/location.mjs +1 -1
  29. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/motion.mjs +1 -1
  30. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/on-device-ai.mjs +49 -3
  31. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/photos.mjs +1 -1
  32. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/screens.mjs +150 -644
  33. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdk-types.mjs +1 -1
  34. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdui.mjs +1 -0
  35. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/tasks.mjs +1 -1
  36. package/dist/browser-plane/assets.json +7 -7
  37. package/dist/browser-plane/package-reader.js +4 -4
  38. package/dist/browser-plane/preview-deferred/{74e5b76ecf38392d7eb3f9a9512d60a0675de85d411c9c56293e123152b3f70b.bin → 49dfd582c5a8fb38ceabd1c544343d87fd478063c04f90c4e7a4ed5ee774f1eb.bin} +1 -1
  39. package/dist/browser-plane/sw.js +9 -9
  40. package/dist/browser-plane/t5-frame.html +16 -0
  41. package/dist/browser-plane/t5-worker-frame.html +16 -0
  42. package/dist/cli.mjs +3039 -1831
  43. package/dist/preview-assets.generated.bin +0 -0
  44. package/guides/capabilities.md +2 -2
  45. package/guides/headless-loop.md +2 -1
  46. package/guides/himi-json-output.md +6 -2
  47. package/guides/iap-products.md +2 -2
  48. package/guides/iap-screen-adoption.md +5 -5
  49. package/guides/sdk-reference.json +47 -82
  50. package/guides/skill.md +1 -1
  51. package/guides/testing-himi-apps.md +4 -3
  52. package/guides/web-page-sdk-reference.md +1 -1
  53. package/guides/webview-page-sdk.md +14 -0
  54. package/guides/wix-business-context.md +24 -0
  55. package/guides/wix-site-to-himi-app.md +2 -1
  56. package/package.json +2 -2
  57. package/templates/beauty-salon/tier5-src/himi-store-account/index.ts +2 -2
  58. package/templates/beauty-salon/tier5-src/himi-store-product/index.ts +5 -8
  59. package/templates/branded-lite/dev/index.ts +35 -0
  60. package/templates/branded-lite/tier5-src/himi-branded-lite-video/index.ts +82 -12
  61. package/templates/branded-lite/tier5-src/himi-store-account/index.ts +2 -2
  62. package/templates/branded-lite/tier5-src/himi-store-product/index.ts +5 -8
  63. package/templates/brandy/README.md +13 -0
  64. package/templates/brandy/config.ts +15 -1
  65. package/templates/brandy/dev/index.ts +10 -7
  66. package/templates/community-club/tier5-src/himi-store-account/index.ts +2 -2
  67. package/templates/conference/tier5-src/himi-store-account/index.ts +2 -2
  68. package/templates/events-meetups/tier5-src/himi-store-account/index.ts +2 -2
  69. package/templates/gym-fitness/tier5-src/himi-store-account/index.ts +2 -2
  70. package/templates/gym-fitness/tier5-src/himi-store-product/index.ts +5 -8
  71. package/templates/nonprofit-cause/tier5-src/himi-store-account/index.ts +2 -2
  72. package/templates/podcast-creator/tier5-src/himi-store-account/index.ts +2 -2
  73. package/templates/portfolio-creative/tier5-src/himi-store-account/index.ts +2 -2
  74. package/templates/portfolio-creative/tier5-src/himi-store-product/index.ts +5 -8
  75. package/templates/restaurant/tier5-src/himi-store-account/index.ts +2 -2
  76. package/templates/retail-store/tier5-src/himi-store-account/index.ts +2 -2
  77. package/templates/retail-store/tier5-src/himi-store-product/index.ts +5 -8
  78. package/templates/salon-spa/tier5-src/himi-store-account/index.ts +2 -2
  79. package/templates/wholesale-store/tier5-src/himi-store-account/index.ts +2 -2
  80. package/templates/wholesale-store/tier5-src/himi-store-product/index.ts +5 -8
  81. package/templates/yoga-studio/tier5-src/himi-store-account/index.ts +2 -2
  82. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/iap-verticals/attendance-orders.d.ts +0 -10
  83. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/iap-verticals/online-programs-orders.d.ts +0 -2
  84. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/iap-verticals/pricing-plans-orders.d.ts +0 -2
@@ -3,7 +3,7 @@ import { withOnlineWrites, offlineWritesEnabled, offlineWriteMessage } from "../
3
3
  import { defineService as registerState } from "@himalaya/state";
4
4
  // Tier-5 bundle: himi-store — product detail.
5
5
  import { withIapPresentation } from "../_shared/iap-presentation.js";
6
- import { storesAppleSalesEnabled, storesProductOrders, type IapCommerce, type IapPurchaseFields } from "@himalaya/iap-checkout";
6
+ import { storesProductOrders, type IapCommerce, type IapPurchaseFields } from "@himalaya/iap-checkout";
7
7
  import { iapPriceCopy, iapPurchaseCopy } from "../_shared/iap-worker.js";
8
8
  import { share as shareSheet } from "@himalaya/share";
9
9
  import { addToCurrentCart, getCurrentCart } from "@himalaya/wix-ecom";
@@ -451,10 +451,8 @@ function derive(s: S): S {
451
451
  // read answering late — must not replace the badge the add set (#3468 review).
452
452
  let cartBadgeEpoch = 0;
453
453
 
454
- // A digital product with no options sells through the App Store once the platform sells Wix Stores
455
- // items there (`storesAppleSalesEnabled`): wix-iap StartItemPayment places and charges its order.
456
- // Until then, and for any other product, an App Store route only blocks the regular checkout.
457
- const SELLS_THROUGH_APPLE = storesAppleSalesEnabled();
454
+ // A digital product with no options sells through the App Store: wix-iap StartItemPayment places and
455
+ // charges its order. For any other product, an App Store route only blocks the regular checkout.
458
456
  const WIX_STORES_APP = "215238eb-22a5-4c36-9e7b-e7c08025e04e";
459
457
  const NOT_APPLE: IapPurchaseFields = { appleRoute: false, accessReady: false, buyLabel: "", buyDisabled: true, buyBusy: false, buyNote: "" };
460
458
 
@@ -462,7 +460,7 @@ let productPricing: IapCommerce;
462
460
  let checkoutEntered = false;
463
461
  const registerProduct = withIapPresentation<S>({
464
462
  register: withOnlineWrites(registerState, ["beginAdd", "addToCart", "buy"], { derive, messageFields: action => action === "buy" ? ["buyNote"] : ["cartHint"] }),
465
- adapters: SELLS_THROUGH_APPLE ? [storesProductOrders] : [],
463
+ adapters: [storesProductOrders],
466
464
  onCreate: commerce => { productPricing = commerce; }, prefix: "product",
467
465
  transientKeys: ["optionValidationTarget", "optionValidationRequest", "opt1ScrollRequest", "opt2ScrollRequest", "opt3ScrollRequest", "galleryIndex", "price", "optionsIncomplete", "cartHint", "cartHidden", "buyHidden", "buyLabel", "buyDisabled", "buyNote", "purchasedNote", "addedSheetPresented", "shareHint"], contentActions: ["load", "readChanged"], concurrentPublishActions: ["buy"],
468
466
  items: state => inputId() ? [{ reference: { kind: "storesProduct", id: inputId() }, commerceDisplayPrice: state.price }] : [],
@@ -513,7 +511,7 @@ const defineService = withReadLifecycle(registerProduct, "load", {
513
511
  function applePurchase(state: S): IapPurchaseFields {
514
512
  const id = inputId();
515
513
  const loaded = !!id && lastLoadedId === id;
516
- const sellable = SELLS_THROUGH_APPLE && loaded && lastProduct?.productType?.toLowerCase() === "digital" && !state.optionsUnknown && state.optionGroups.length === 0;
514
+ const sellable = loaded && lastProduct?.productType?.toLowerCase() === "digital" && !state.optionsUnknown && state.optionGroups.length === 0;
517
515
  const copy = iapPurchaseCopy("product");
518
516
  const fields = sellable ? productPricing.purchaseFields({ kind: "storesProduct", id }, copy) : NOT_APPLE;
519
517
  return fields.appleRoute ? fields : NOT_APPLE;
@@ -521,7 +519,6 @@ function applePurchase(state: S): IapPurchaseFields {
521
519
 
522
520
  /** On every entry: the first starts the checkout (recovering held purchases), later ones reconcile. */
523
521
  function enterCheckout(): void {
524
- if (!SELLS_THROUGH_APPLE) return;
525
522
  void (checkoutEntered ? productPricing.reconcile() : productPricing.start());
526
523
  checkoutEntered = true;
527
524
  }
@@ -17,7 +17,7 @@ import { stashCopy, copyParam, copyTemplate } from "../_shared/himi-copy.js";
17
17
  import { signInPageStyle, signInSheetStyle } from "../_shared/sign-in-sheet.js";
18
18
  import { memberAccountRoutes } from "../_shared/member-account-routes.js";
19
19
  import { CONTINUATION_BUDGET_MS, memberScreenTarget, within } from "../_shared/member-screen.js";
20
- import { createIapCommerce, onlineProgramOrders, pricingPlanOrders, storesAppleSalesEnabled, storesProductOrders } from "@himalaya/iap-checkout";
20
+ import { createIapCommerce, onlineProgramOrders, pricingPlanOrders, storesProductOrders } from "@himalaya/iap-checkout";
21
21
  import { IAP_RESTORE_KEYS, NO_IAP_RESTORE, createIapRestore, resetUnhydratedKeysOnOlderRuntime, type IapRestoreFields } from "../_shared/iap-worker.js";
22
22
 
23
23
  interface AuthRouteInput {
@@ -615,7 +615,7 @@ interface S extends IapRestoreFields {
615
615
  // row shows once purchasing is ready on this host (a bound iOS binary with managed StoreKit), to a
616
616
  // guest too: the restore itself asks them to sign in.
617
617
  const commerce = createIapCommerce({
618
- adapters: [onlineProgramOrders, pricingPlanOrders, ...(storesAppleSalesEnabled() ? [storesProductOrders] : [])],
618
+ adapters: [onlineProgramOrders, pricingPlanOrders, storesProductOrders],
619
619
  onChange: () => { void svc.restorePublish(); },
620
620
  });
621
621
  const restore = createIapRestore(commerce, { prefix: "storeAccount", repaint: () => { void svc.restorePublish(); } });
@@ -17,7 +17,7 @@ import { stashCopy, copyParam, copyTemplate } from "../_shared/himi-copy.js";
17
17
  import { signInPageStyle, signInSheetStyle } from "../_shared/sign-in-sheet.js";
18
18
  import { memberAccountRoutes } from "../_shared/member-account-routes.js";
19
19
  import { CONTINUATION_BUDGET_MS, memberScreenTarget, within } from "../_shared/member-screen.js";
20
- import { createIapCommerce, onlineProgramOrders, pricingPlanOrders, storesAppleSalesEnabled, storesProductOrders } from "@himalaya/iap-checkout";
20
+ import { createIapCommerce, onlineProgramOrders, pricingPlanOrders, storesProductOrders } from "@himalaya/iap-checkout";
21
21
  import { IAP_RESTORE_KEYS, NO_IAP_RESTORE, createIapRestore, resetUnhydratedKeysOnOlderRuntime, type IapRestoreFields } from "../_shared/iap-worker.js";
22
22
 
23
23
  interface AuthRouteInput {
@@ -615,7 +615,7 @@ interface S extends IapRestoreFields {
615
615
  // row shows once purchasing is ready on this host (a bound iOS binary with managed StoreKit), to a
616
616
  // guest too: the restore itself asks them to sign in.
617
617
  const commerce = createIapCommerce({
618
- adapters: [onlineProgramOrders, pricingPlanOrders, ...(storesAppleSalesEnabled() ? [storesProductOrders] : [])],
618
+ adapters: [onlineProgramOrders, pricingPlanOrders, storesProductOrders],
619
619
  onChange: () => { void svc.restorePublish(); },
620
620
  });
621
621
  const restore = createIapRestore(commerce, { prefix: "storeAccount", repaint: () => { void svc.restorePublish(); } });
@@ -3,7 +3,7 @@ import { withOnlineWrites, offlineWritesEnabled, offlineWriteMessage } from "../
3
3
  import { defineService as registerState } from "@himalaya/state";
4
4
  // Tier-5 bundle: himi-store — product detail.
5
5
  import { withIapPresentation } from "../_shared/iap-presentation.js";
6
- import { storesAppleSalesEnabled, storesProductOrders, type IapCommerce, type IapPurchaseFields } from "@himalaya/iap-checkout";
6
+ import { storesProductOrders, type IapCommerce, type IapPurchaseFields } from "@himalaya/iap-checkout";
7
7
  import { iapPriceCopy, iapPurchaseCopy } from "../_shared/iap-worker.js";
8
8
  import { share as shareSheet } from "@himalaya/share";
9
9
  import { addToCurrentCart, getCurrentCart } from "@himalaya/wix-ecom";
@@ -451,10 +451,8 @@ function derive(s: S): S {
451
451
  // read answering late — must not replace the badge the add set (#3468 review).
452
452
  let cartBadgeEpoch = 0;
453
453
 
454
- // A digital product with no options sells through the App Store once the platform sells Wix Stores
455
- // items there (`storesAppleSalesEnabled`): wix-iap StartItemPayment places and charges its order.
456
- // Until then, and for any other product, an App Store route only blocks the regular checkout.
457
- const SELLS_THROUGH_APPLE = storesAppleSalesEnabled();
454
+ // A digital product with no options sells through the App Store: wix-iap StartItemPayment places and
455
+ // charges its order. For any other product, an App Store route only blocks the regular checkout.
458
456
  const WIX_STORES_APP = "215238eb-22a5-4c36-9e7b-e7c08025e04e";
459
457
  const NOT_APPLE: IapPurchaseFields = { appleRoute: false, accessReady: false, buyLabel: "", buyDisabled: true, buyBusy: false, buyNote: "" };
460
458
 
@@ -462,7 +460,7 @@ let productPricing: IapCommerce;
462
460
  let checkoutEntered = false;
463
461
  const registerProduct = withIapPresentation<S>({
464
462
  register: withOnlineWrites(registerState, ["beginAdd", "addToCart", "buy"], { derive, messageFields: action => action === "buy" ? ["buyNote"] : ["cartHint"] }),
465
- adapters: SELLS_THROUGH_APPLE ? [storesProductOrders] : [],
463
+ adapters: [storesProductOrders],
466
464
  onCreate: commerce => { productPricing = commerce; }, prefix: "product",
467
465
  transientKeys: ["optionValidationTarget", "optionValidationRequest", "opt1ScrollRequest", "opt2ScrollRequest", "opt3ScrollRequest", "galleryIndex", "price", "optionsIncomplete", "cartHint", "cartHidden", "buyHidden", "buyLabel", "buyDisabled", "buyNote", "purchasedNote", "addedSheetPresented", "shareHint"], contentActions: ["load", "readChanged"], concurrentPublishActions: ["buy"],
468
466
  items: state => inputId() ? [{ reference: { kind: "storesProduct", id: inputId() }, commerceDisplayPrice: state.price }] : [],
@@ -513,7 +511,7 @@ const defineService = withReadLifecycle(registerProduct, "load", {
513
511
  function applePurchase(state: S): IapPurchaseFields {
514
512
  const id = inputId();
515
513
  const loaded = !!id && lastLoadedId === id;
516
- const sellable = SELLS_THROUGH_APPLE && loaded && lastProduct?.productType?.toLowerCase() === "digital" && !state.optionsUnknown && state.optionGroups.length === 0;
514
+ const sellable = loaded && lastProduct?.productType?.toLowerCase() === "digital" && !state.optionsUnknown && state.optionGroups.length === 0;
517
515
  const copy = iapPurchaseCopy("product");
518
516
  const fields = sellable ? productPricing.purchaseFields({ kind: "storesProduct", id }, copy) : NOT_APPLE;
519
517
  return fields.appleRoute ? fields : NOT_APPLE;
@@ -521,7 +519,6 @@ function applePurchase(state: S): IapPurchaseFields {
521
519
 
522
520
  /** On every entry: the first starts the checkout (recovering held purchases), later ones reconcile. */
523
521
  function enterCheckout(): void {
524
- if (!SELLS_THROUGH_APPLE) return;
525
522
  void (checkoutEntered ? productPricing.reconcile() : productPricing.start());
526
523
  checkoutEntered = true;
527
524
  }
@@ -17,7 +17,7 @@ import { stashCopy, copyParam, copyTemplate } from "../_shared/himi-copy.js";
17
17
  import { signInPageStyle, signInSheetStyle } from "../_shared/sign-in-sheet.js";
18
18
  import { memberAccountRoutes } from "../_shared/member-account-routes.js";
19
19
  import { CONTINUATION_BUDGET_MS, memberScreenTarget, within } from "../_shared/member-screen.js";
20
- import { createIapCommerce, onlineProgramOrders, pricingPlanOrders, storesAppleSalesEnabled, storesProductOrders } from "@himalaya/iap-checkout";
20
+ import { createIapCommerce, onlineProgramOrders, pricingPlanOrders, storesProductOrders } from "@himalaya/iap-checkout";
21
21
  import { IAP_RESTORE_KEYS, NO_IAP_RESTORE, createIapRestore, resetUnhydratedKeysOnOlderRuntime, type IapRestoreFields } from "../_shared/iap-worker.js";
22
22
 
23
23
  interface AuthRouteInput {
@@ -615,7 +615,7 @@ interface S extends IapRestoreFields {
615
615
  // row shows once purchasing is ready on this host (a bound iOS binary with managed StoreKit), to a
616
616
  // guest too: the restore itself asks them to sign in.
617
617
  const commerce = createIapCommerce({
618
- adapters: [onlineProgramOrders, pricingPlanOrders, ...(storesAppleSalesEnabled() ? [storesProductOrders] : [])],
618
+ adapters: [onlineProgramOrders, pricingPlanOrders, storesProductOrders],
619
619
  onChange: () => { void svc.restorePublish(); },
620
620
  });
621
621
  const restore = createIapRestore(commerce, { prefix: "storeAccount", repaint: () => { void svc.restorePublish(); } });
@@ -1,10 +0,0 @@
1
- import type { IapOrderAdapter } from "../apple-iap-contract.js";
2
- export declare function attendanceClientOrdersWith(options: {
3
- bookingsEnabled: boolean;
4
- eventsEnabled: boolean;
5
- now?: () => number;
6
- }): {
7
- bookingOrders: IapOrderAdapter;
8
- eventTicketOrders: IapOrderAdapter;
9
- };
10
- export declare const bookingClientOrders: IapOrderAdapter, eventTicketClientOrders: IapOrderAdapter;
@@ -1,2 +0,0 @@
1
- import type { IapOrderAdapter } from "../apple-iap-contract.js";
2
- export declare const onlineProgramClientOrders: IapOrderAdapter;
@@ -1,2 +0,0 @@
1
- import type { IapOrderAdapter } from "../apple-iap-contract.js";
2
- export declare const pricingPlanClientOrders: IapOrderAdapter;