@wix/himalaya-cli 0.955.0 → 0.957.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.
@@ -18,7 +18,10 @@ export interface ScheduleLocalOptions {
18
18
  link?: string;
19
19
  /** Actionable category id (must match a `PushConfig.categories[].id`). */
20
20
  category?: string;
21
- /** App-icon badge number to set when this notification is delivered. */
21
+ /** App-icon badge number to set when this notification is delivered. `0` clears
22
+ * it; omit to leave the current badge alone. Honored on iOS (`aps.badge`) and
23
+ * Android (the shared badge slot, see `setBadge`). Web cannot badge from a
24
+ * notification — call `setBadge` directly there. */
22
25
  badge?: number;
23
26
  /** Rich media: an image URL. iOS attaches it (UNNotificationAttachment),
24
27
  * Android renders it as a BigPicture. Omit for a plain text notification. */
@@ -42,10 +45,47 @@ export declare function scheduleLocal(options: ScheduleLocalOptions): Promise<{
42
45
  export declare function cancelLocal(id: string): Promise<void>;
43
46
  /** Cancel every pending local notification this app scheduled. */
44
47
  export declare function cancelAllLocal(): Promise<void>;
45
- /** Set the app-icon badge count. `0` clears it. */
48
+ /**
49
+ * Set the app-icon badge count ("the pimple"). `0` clears it; negatives and
50
+ * fractions are clamped/truncated. The badge persists until you change it — it is
51
+ * not tied to any notification, and nothing decrements it for you.
52
+ *
53
+ * How each surface draws it, because the differences are visible to users:
54
+ * - **iOS / macOS** — `UNUserNotificationCenter.setBadgeCount`. Needs the `.badge`
55
+ * notification authorization, so call `requestPermission()` first or the number
56
+ * is stored and never shown.
57
+ * - **Android** — stock Android has no set-count API and a third-party badger
58
+ * dependency is disallowed, so the count rides on ONE silent, low-importance
59
+ * notification in a dedicated `himalaya.badge` channel. Consequences worth
60
+ * designing around: it is **visible in the notification shade**, the user can
61
+ * turn that channel off, launchers that only do dots show a dot rather than the
62
+ * number, and without the API 33+ `POST_NOTIFICATIONS` grant it is a silent no-op.
63
+ * - **Web** — `navigator.setAppBadge`, which needs an installed PWA and notification
64
+ * permission; unsupported browsers no-op.
65
+ *
66
+ * Best-effort everywhere: this never throws when the platform refuses.
67
+ */
46
68
  export declare function setBadge(count: number): Promise<void>;
47
- /** Clear the app-icon badge (equivalent to `setBadge(0)`). */
69
+ /** Clear the app-icon badge — exactly `setBadge(0)`. On Android this cancels the
70
+ * badge-carrier notification, so it also disappears from the shade. */
48
71
  export declare function clearBadge(): Promise<void>;
72
+ /**
73
+ * Read the current app-icon badge count.
74
+ *
75
+ * What "current" means differs by surface, and the difference is worth knowing
76
+ * before you build an increment on top of it:
77
+ * - **iOS** — the real OS value, so it survives a cold start and reflects a badge a
78
+ * remote push set. (Read through `applicationIconBadgeNumber`: notifications has a
79
+ * `setBadgeCount` setter but no matching reader, so write and read are asymmetric.)
80
+ * - **macOS / Android / web** — the last value THIS PROCESS set. None of the three
81
+ * can read the badge back (macOS exposes only a display string, Android derives
82
+ * the badge from a notification, the web Badging API is write-only), so a cold
83
+ * start reports `0` even when the icon still shows a number.
84
+ *
85
+ * Because of that, prefer deriving the badge from your own state and calling
86
+ * `setBadge(total)` over a read-modify-write of this value.
87
+ */
88
+ export declare function getBadge(): Promise<number>;
49
89
  /** The registered remote device token (APNs hex / FCM token), or null if the
50
90
  * app has not registered for remote notifications yet. */
51
91
  export declare function getDeviceToken(): Promise<string | null>;
@@ -26,7 +26,7 @@ export declare const CAPABILITY_REGISTRY: {
26
26
  readonly pdf: readonly ["isAvailable", "open"];
27
27
  readonly photos: readonly ["getSavePermissionStatus", "pick", "saveToLibrary"];
28
28
  readonly presigned_upload: readonly ["put", "putFile"];
29
- readonly push: readonly ["cancelAllLocal", "cancelLocal", "clearDelivered", "getDeviceToken", "getPermissionStatus", "listDelivered", "requestPermission", "scheduleLocal", "setBadge"];
29
+ readonly push: readonly ["cancelAllLocal", "cancelLocal", "clearDelivered", "getBadge", "getDeviceToken", "getPermissionStatus", "listDelivered", "requestPermission", "scheduleLocal", "setBadge"];
30
30
  readonly release_control: readonly ["active", "available", "list", "select"];
31
31
  readonly secure_storage: readonly ["availability", "read", "remove", "write"];
32
32
  readonly share: readonly ["availability", "share"];
@@ -41,7 +41,7 @@ var CAPABILITY_REGISTRY = {
41
41
  "pdf": ["isAvailable", "open"],
42
42
  "photos": ["getSavePermissionStatus", "pick", "saveToLibrary"],
43
43
  "presigned_upload": ["put", "putFile"],
44
- "push": ["cancelAllLocal", "cancelLocal", "clearDelivered", "getDeviceToken", "getPermissionStatus", "listDelivered", "requestPermission", "scheduleLocal", "setBadge"],
44
+ "push": ["cancelAllLocal", "cancelLocal", "clearDelivered", "getBadge", "getDeviceToken", "getPermissionStatus", "listDelivered", "requestPermission", "scheduleLocal", "setBadge"],
45
45
  "release_control": ["active", "available", "list", "select"],
46
46
  "secure_storage": ["availability", "read", "remove", "write"],
47
47
  "share": ["availability", "share"],
@@ -41,7 +41,7 @@ var CAPABILITY_REGISTRY = {
41
41
  "pdf": ["isAvailable", "open"],
42
42
  "photos": ["getSavePermissionStatus", "pick", "saveToLibrary"],
43
43
  "presigned_upload": ["put", "putFile"],
44
- "push": ["cancelAllLocal", "cancelLocal", "clearDelivered", "getDeviceToken", "getPermissionStatus", "listDelivered", "requestPermission", "scheduleLocal", "setBadge"],
44
+ "push": ["cancelAllLocal", "cancelLocal", "clearDelivered", "getBadge", "getDeviceToken", "getPermissionStatus", "listDelivered", "requestPermission", "scheduleLocal", "setBadge"],
45
45
  "release_control": ["active", "available", "list", "select"],
46
46
  "secure_storage": ["availability", "read", "remove", "write"],
47
47
  "share": ["availability", "share"],
@@ -41,7 +41,7 @@ var CAPABILITY_REGISTRY = {
41
41
  "pdf": ["isAvailable", "open"],
42
42
  "photos": ["getSavePermissionStatus", "pick", "saveToLibrary"],
43
43
  "presigned_upload": ["put", "putFile"],
44
- "push": ["cancelAllLocal", "cancelLocal", "clearDelivered", "getDeviceToken", "getPermissionStatus", "listDelivered", "requestPermission", "scheduleLocal", "setBadge"],
44
+ "push": ["cancelAllLocal", "cancelLocal", "clearDelivered", "getBadge", "getDeviceToken", "getPermissionStatus", "listDelivered", "requestPermission", "scheduleLocal", "setBadge"],
45
45
  "release_control": ["active", "available", "list", "select"],
46
46
  "secure_storage": ["availability", "read", "remove", "write"],
47
47
  "share": ["availability", "share"],
@@ -41,7 +41,7 @@ var CAPABILITY_REGISTRY = {
41
41
  "pdf": ["isAvailable", "open"],
42
42
  "photos": ["getSavePermissionStatus", "pick", "saveToLibrary"],
43
43
  "presigned_upload": ["put", "putFile"],
44
- "push": ["cancelAllLocal", "cancelLocal", "clearDelivered", "getDeviceToken", "getPermissionStatus", "listDelivered", "requestPermission", "scheduleLocal", "setBadge"],
44
+ "push": ["cancelAllLocal", "cancelLocal", "clearDelivered", "getBadge", "getDeviceToken", "getPermissionStatus", "listDelivered", "requestPermission", "scheduleLocal", "setBadge"],
45
45
  "release_control": ["active", "available", "list", "select"],
46
46
  "secure_storage": ["availability", "read", "remove", "write"],
47
47
  "share": ["availability", "share"],
@@ -41,7 +41,7 @@ var CAPABILITY_REGISTRY = {
41
41
  "pdf": ["isAvailable", "open"],
42
42
  "photos": ["getSavePermissionStatus", "pick", "saveToLibrary"],
43
43
  "presigned_upload": ["put", "putFile"],
44
- "push": ["cancelAllLocal", "cancelLocal", "clearDelivered", "getDeviceToken", "getPermissionStatus", "listDelivered", "requestPermission", "scheduleLocal", "setBadge"],
44
+ "push": ["cancelAllLocal", "cancelLocal", "clearDelivered", "getBadge", "getDeviceToken", "getPermissionStatus", "listDelivered", "requestPermission", "scheduleLocal", "setBadge"],
45
45
  "release_control": ["active", "available", "list", "select"],
46
46
  "secure_storage": ["availability", "read", "remove", "write"],
47
47
  "share": ["availability", "share"],
@@ -41,7 +41,7 @@ var CAPABILITY_REGISTRY = {
41
41
  "pdf": ["isAvailable", "open"],
42
42
  "photos": ["getSavePermissionStatus", "pick", "saveToLibrary"],
43
43
  "presigned_upload": ["put", "putFile"],
44
- "push": ["cancelAllLocal", "cancelLocal", "clearDelivered", "getDeviceToken", "getPermissionStatus", "listDelivered", "requestPermission", "scheduleLocal", "setBadge"],
44
+ "push": ["cancelAllLocal", "cancelLocal", "clearDelivered", "getBadge", "getDeviceToken", "getPermissionStatus", "listDelivered", "requestPermission", "scheduleLocal", "setBadge"],
45
45
  "release_control": ["active", "available", "list", "select"],
46
46
  "secure_storage": ["availability", "read", "remove", "write"],
47
47
  "share": ["availability", "share"],
@@ -41,7 +41,7 @@ var CAPABILITY_REGISTRY = {
41
41
  "pdf": ["isAvailable", "open"],
42
42
  "photos": ["getSavePermissionStatus", "pick", "saveToLibrary"],
43
43
  "presigned_upload": ["put", "putFile"],
44
- "push": ["cancelAllLocal", "cancelLocal", "clearDelivered", "getDeviceToken", "getPermissionStatus", "listDelivered", "requestPermission", "scheduleLocal", "setBadge"],
44
+ "push": ["cancelAllLocal", "cancelLocal", "clearDelivered", "getBadge", "getDeviceToken", "getPermissionStatus", "listDelivered", "requestPermission", "scheduleLocal", "setBadge"],
45
45
  "release_control": ["active", "available", "list", "select"],
46
46
  "secure_storage": ["availability", "read", "remove", "write"],
47
47
  "share": ["availability", "share"],
@@ -50,6 +50,11 @@ async function setBadge(count) {
50
50
  async function clearBadge() {
51
51
  await dispatch("capability.push.setBadge", { count: 0 });
52
52
  }
53
+ async function getBadge() {
54
+ const r = await dispatch("capability.push.getBadge");
55
+ const n = Number(r?.count);
56
+ return Number.isFinite(n) && n > 0 ? Math.trunc(n) : 0;
57
+ }
53
58
  async function getDeviceToken() {
54
59
  const r = await dispatch("capability.push.getDeviceToken");
55
60
  return r?.token && r.token.length > 0 ? r.token : null;
@@ -70,6 +75,7 @@ export {
70
75
  cancelLocal,
71
76
  clearBadge,
72
77
  clearDelivered,
78
+ getBadge,
73
79
  getDeviceToken,
74
80
  getPermissionStatus,
75
81
  listDelivered,
@@ -26,7 +26,7 @@ var CAPABILITY_REGISTRY = {
26
26
  "pdf": ["isAvailable", "open"],
27
27
  "photos": ["getSavePermissionStatus", "pick", "saveToLibrary"],
28
28
  "presigned_upload": ["put", "putFile"],
29
- "push": ["cancelAllLocal", "cancelLocal", "clearDelivered", "getDeviceToken", "getPermissionStatus", "listDelivered", "requestPermission", "scheduleLocal", "setBadge"],
29
+ "push": ["cancelAllLocal", "cancelLocal", "clearDelivered", "getBadge", "getDeviceToken", "getPermissionStatus", "listDelivered", "requestPermission", "scheduleLocal", "setBadge"],
30
30
  "release_control": ["active", "available", "list", "select"],
31
31
  "secure_storage": ["availability", "read", "remove", "write"],
32
32
  "share": ["availability", "share"],
@@ -41,7 +41,7 @@ var CAPABILITY_REGISTRY = {
41
41
  "pdf": ["isAvailable", "open"],
42
42
  "photos": ["getSavePermissionStatus", "pick", "saveToLibrary"],
43
43
  "presigned_upload": ["put", "putFile"],
44
- "push": ["cancelAllLocal", "cancelLocal", "clearDelivered", "getDeviceToken", "getPermissionStatus", "listDelivered", "requestPermission", "scheduleLocal", "setBadge"],
44
+ "push": ["cancelAllLocal", "cancelLocal", "clearDelivered", "getBadge", "getDeviceToken", "getPermissionStatus", "listDelivered", "requestPermission", "scheduleLocal", "setBadge"],
45
45
  "release_control": ["active", "available", "list", "select"],
46
46
  "secure_storage": ["availability", "read", "remove", "write"],
47
47
  "share": ["availability", "share"],
package/dist/cli.mjs CHANGED
@@ -5261,6 +5261,7 @@ function resolveTranslation(value, catalog, sourceCatalog) {
5261
5261
  var BINDING_SIGILS, BINDING_SIGIL_RE, TRANSLATION_PREFIX, TRANSLATION_KEY_RE;
5262
5262
  var init_bindings = __esm({
5263
5263
  "../../core/ts/src/bindings.ts"() {
5264
+ "use strict";
5264
5265
  BINDING_SIGILS = ["service", "flag", "item", "t"];
5265
5266
  BINDING_SIGIL_RE = new RegExp(
5266
5267
  `^\\$(?:${BINDING_SIGILS.filter((s) => s !== "t").join("|")})\\b|^\\$t:`
@@ -18546,7 +18547,6 @@ function shouldRevealError(args) {
18546
18547
  var EMAIL_RE, URL_HOST_RE, INTEGER_RE, NUMBER_RE;
18547
18548
  var init_validation = __esm({
18548
18549
  "../../core/ts/src/validation.ts"() {
18549
- "use strict";
18550
18550
  EMAIL_RE = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*\.[A-Za-z]{2,}$/;
18551
18551
  URL_HOST_RE = /^[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(:[0-9]+)?$/;
18552
18552
  INTEGER_RE = /^[+-]?[0-9]+$/;
@@ -21971,7 +21971,6 @@ function validateWorkerSubtree(raw, slotId, policy, actionCatalog) {
21971
21971
  var WORKER_SUBTREE_CEILINGS, ID_PART, ACTION_ID;
21972
21972
  var init_worker_subtree = __esm({
21973
21973
  "../../core/ts/src/worker-subtree.ts"() {
21974
- "use strict";
21975
21974
  init_worker_subtree_safe_types_generated();
21976
21975
  WORKER_SUBTREE_CEILINGS = Object.freeze({
21977
21976
  maxEncodedBytes: 65536,
@@ -43358,19 +43357,19 @@ var init_preview_assets_generated = __esm({
43358
43357
  "../../packages/serve/src/preview-assets.generated.ts"() {
43359
43358
  init_preview_assets_format();
43360
43359
  PREVIEW_ASSET_MANIFEST = [
43361
- { key: "assets/index-BjeU573D.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 984799, sha256: "c9d1cae4cb78ee9be62f41d1f84c87599fa347404cc256580bca700f71f0c045" },
43362
- { key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 984807, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
43363
- { key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 1075731, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
43364
- { key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 1166715, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
43365
- { key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 1257695, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
43366
- { key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 1348567, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
43367
- { key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 1439547, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
43368
- { key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 1548183, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
43369
- { key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 1657267, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
43370
- { key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 1766315, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
43371
- { key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 1874015, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
43372
- { key: "index.html", contentType: "text/html; charset=utf-8", offset: 1962123, length: 4448, sha256: "5f8763e9a491dc85c1c0dd52572d5f61bf4c3f978e4fd39262bae1f46e101a54" },
43373
- { key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 1966571, length: 13784, sha256: "cfb9465254fab84f0e084bb4542c282758ea29774b5f172840cc0b9e4194ef89" }
43360
+ { key: "assets/index-BdjUMoXo.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 985049, sha256: "f401b5ebead76d81b1f3d1d401b77925b53123856ababfc4d2d407656c10601d" },
43361
+ { key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 985057, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
43362
+ { key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 1075981, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
43363
+ { key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 1166965, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
43364
+ { key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 1257945, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
43365
+ { key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 1348817, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
43366
+ { key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 1439797, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
43367
+ { key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 1548433, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
43368
+ { key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 1657517, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
43369
+ { key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 1766565, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
43370
+ { key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 1874265, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
43371
+ { key: "index.html", contentType: "text/html; charset=utf-8", offset: 1962373, length: 4448, sha256: "03bf2b6c0fec31fec522df8100cdc53a195a5fe4b792d9dc2888476cb5226624" },
43372
+ { key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 1966821, length: 13784, sha256: "cfb9465254fab84f0e084bb4542c282758ea29774b5f172840cc0b9e4194ef89" }
43374
43373
  ];
43375
43374
  }
43376
43375
  });
@@ -46300,6 +46299,33 @@ function withDerivedAccents(tokensOverlay, wst) {
46300
46299
  colors.textOnAccent = keepCrawledLight(family.textOnAccent, tokensOverlay.colors?.textOnAccent);
46301
46300
  return { ...tokensOverlay, colors };
46302
46301
  }
46302
+ function mergedArm(colors, name, arm, fallback) {
46303
+ const value = colors[name];
46304
+ if (typeof value === "string" && value.trim() !== "") return value;
46305
+ if (value && typeof value === "object" && !Array.isArray(value)) {
46306
+ const scheme = value;
46307
+ for (const candidate of [scheme[arm], scheme.light]) {
46308
+ if (typeof candidate === "string" && candidate.trim() !== "") return candidate;
46309
+ }
46310
+ }
46311
+ return fallback;
46312
+ }
46313
+ function alignAccentsToSurfaces(mergedColors, overlayColors) {
46314
+ const primary = lightArm2(overlayColors?.accentPrimary);
46315
+ if (!primary) return mergedColors;
46316
+ const secondary = lightArm2(overlayColors?.accentSecondary) ?? deriveSecondaryAccent(primary);
46317
+ const colors = { ...mergedColors };
46318
+ const family = deriveAccentFamily(primary, secondary, {
46319
+ light: mergedArm(colors, "surfacePrimary", "light", "#FFFFFF"),
46320
+ dark: mergedArm(colors, "surfacePrimary", "dark", "#0D1117"),
46321
+ highContrast: mergedArm(colors, "surfacePrimary", "highContrast", "#000000")
46322
+ });
46323
+ colors.accentPrimary = family.accentPrimary;
46324
+ colors.accentSecondary = family.accentSecondary;
46325
+ colors.accentSurface = family.accentSurface;
46326
+ colors.textOnAccent = family.textOnAccent;
46327
+ return colors;
46328
+ }
46303
46329
  function deriveBranding(input) {
46304
46330
  const primaryColor = lightArm2(input.tokensOverlay.colors?.accentPrimary);
46305
46331
  const secondaryColor = secondBrandColour(input.wst) ?? (primaryColor ? deriveSecondaryAccent(primaryColor) : void 0);
@@ -48835,6 +48861,10 @@ async function applyOverlays(input) {
48835
48861
  if (existsSync52(pkgTokens) && (tokens.colors || tokens.typography)) {
48836
48862
  const cur = JSON.parse(readFileSync62(pkgTokens, "utf8"));
48837
48863
  const merged = deepMerge3(cur, tokens);
48864
+ const mergedColors = merged.colors;
48865
+ if (mergedColors && typeof mergedColors === "object" && !Array.isArray(mergedColors)) {
48866
+ merged.colors = alignAccentsToSurfaces(mergedColors, tokens.colors);
48867
+ }
48838
48868
  writeFileSync21(pkgTokens, JSON.stringify(merged, null, 2) + "\n");
48839
48869
  wrote.push(pkgTokens);
48840
48870
  }
@@ -48951,6 +48981,7 @@ var init_apply2 = __esm({
48951
48981
  init_icon();
48952
48982
  init_brandable_shells();
48953
48983
  init_customer_build();
48984
+ init_branding_derive();
48954
48985
  init_home_descriptor();
48955
48986
  STAGED = ".himi/brand";
48956
48987
  }
Binary file
@@ -2410,7 +2410,7 @@
2410
2410
  "name": "ScheduleLocalOptions",
2411
2411
  "kind": "interface",
2412
2412
  "jsdoc": "",
2413
- "decl": "export interface ScheduleLocalOptions {\n /** Stable identifier. Reusing an id replaces the pending notification. Omit ⇒\n * the platform generates a UUID and returns it. */\n id?: string;\n title: string;\n body: string;\n /** Fire this many seconds from now (min 1). Mutually exclusive with `at`;\n * if both are set `at` wins. */\n afterSeconds?: number;\n /** Absolute fire time, epoch milliseconds. Mutually exclusive with `afterSeconds`. */\n at?: number;\n /** Repeat at the `afterSeconds` interval (iOS requires interval ≥ 60 to repeat). */\n repeats?: boolean;\n /** Deeplink routed on tap — same resolver as a remote push `link`\n * (`<scheme>://screen/<id>` or a curated pattern). Omit ⇒ just opens the app. */\n link?: string;\n /** Actionable category id (must match a `PushConfig.categories[].id`). */\n category?: string;\n /** App-icon badge number to set when this notification is delivered. */\n badge?: number;\n /** Rich media: an image URL. iOS attaches it (UNNotificationAttachment),\n * Android renders it as a BigPicture. Omit for a plain text notification. */\n image?: string;\n}"
2413
+ "decl": "export interface ScheduleLocalOptions {\n /** Stable identifier. Reusing an id replaces the pending notification. Omit ⇒\n * the platform generates a UUID and returns it. */\n id?: string;\n title: string;\n body: string;\n /** Fire this many seconds from now (min 1). Mutually exclusive with `at`;\n * if both are set `at` wins. */\n afterSeconds?: number;\n /** Absolute fire time, epoch milliseconds. Mutually exclusive with `afterSeconds`. */\n at?: number;\n /** Repeat at the `afterSeconds` interval (iOS requires interval ≥ 60 to repeat). */\n repeats?: boolean;\n /** Deeplink routed on tap — same resolver as a remote push `link`\n * (`<scheme>://screen/<id>` or a curated pattern). Omit ⇒ just opens the app. */\n link?: string;\n /** Actionable category id (must match a `PushConfig.categories[].id`). */\n category?: string;\n /** App-icon badge number to set when this notification is delivered. `0` clears\n * it; omit to leave the current badge alone. Honored on iOS (`aps.badge`) and\n * Android (the shared badge slot, see `setBadge`). Web cannot badge from a\n * notification — call `setBadge` directly there. */\n badge?: number;\n /** Rich media: an image URL. iOS attaches it (UNNotificationAttachment),\n * Android renders it as a BigPicture. Omit for a plain text notification. */\n image?: string;\n}"
2414
2414
  },
2415
2415
  {
2416
2416
  "name": "DeliveredNotification",
@@ -2451,15 +2451,21 @@
2451
2451
  {
2452
2452
  "name": "setBadge",
2453
2453
  "kind": "function",
2454
- "jsdoc": "/** Set the app-icon badge count. `0` clears it. */",
2454
+ "jsdoc": "/**\n * Set the app-icon badge count (\"the pimple\"). `0` clears it; negatives and\n * fractions are clamped/truncated. The badge persists until you change it — it is\n * not tied to any notification, and nothing decrements it for you.\n *\n * How each surface draws it, because the differences are visible to users:\n * - **iOS / macOS** — `UNUserNotificationCenter.setBadgeCount`. Needs the `.badge`\n * notification authorization, so call `requestPermission()` first or the number\n * is stored and never shown.\n * - **Android** — stock Android has no set-count API and a third-party badger\n * dependency is disallowed, so the count rides on ONE silent, low-importance\n * notification in a dedicated `himalaya.badge` channel. Consequences worth\n * designing around: it is **visible in the notification shade**, the user can\n * turn that channel off, launchers that only do dots show a dot rather than the\n * number, and without the API 33+ `POST_NOTIFICATIONS` grant it is a silent no-op.\n * - **Web** — `navigator.setAppBadge`, which needs an installed PWA and notification\n * permission; unsupported browsers no-op.\n *\n * Best-effort everywhere: this never throws when the platform refuses.\n */",
2455
2455
  "decl": "export async function setBadge(count: number): Promise<void>;"
2456
2456
  },
2457
2457
  {
2458
2458
  "name": "clearBadge",
2459
2459
  "kind": "function",
2460
- "jsdoc": "/** Clear the app-icon badge (equivalent to `setBadge(0)`). */",
2460
+ "jsdoc": "/** Clear the app-icon badge — exactly `setBadge(0)`. On Android this cancels the\n * badge-carrier notification, so it also disappears from the shade. */",
2461
2461
  "decl": "export async function clearBadge(): Promise<void>;"
2462
2462
  },
2463
+ {
2464
+ "name": "getBadge",
2465
+ "kind": "function",
2466
+ "jsdoc": "/**\n * Read the current app-icon badge count.\n *\n * What \"current\" means differs by surface, and the difference is worth knowing\n * before you build an increment on top of it:\n * - **iOS** — the real OS value, so it survives a cold start and reflects a badge a\n * remote push set. (Read through `applicationIconBadgeNumber`: notifications has a\n * `setBadgeCount` setter but no matching reader, so write and read are asymmetric.)\n * - **macOS / Android / web** — the last value THIS PROCESS set. None of the three\n * can read the badge back (macOS exposes only a display string, Android derives\n * the badge from a notification, the web Badging API is write-only), so a cold\n * start reports `0` even when the icon still shows a number.\n *\n * Because of that, prefer deriving the badge from your own state and calling\n * `setBadge(total)` over a read-modify-write of this value.\n */",
2467
+ "decl": "export async function getBadge(): Promise<number>;"
2468
+ },
2463
2469
  {
2464
2470
  "name": "getDeviceToken",
2465
2471
  "kind": "function",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.955.0",
3
+ "version": "0.957.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": [
@@ -64,5 +64,5 @@
64
64
  "artifactId": "himalaya-cli"
65
65
  }
66
66
  },
67
- "falconPackageHash": "488a8187a93cc20d20df3b2397dccd790d4d6e98fd6e4599788d160f"
67
+ "falconPackageHash": "a7db2f8e9c09e46f2cb60d150cf40484b1d2db3b2df744e87b20634d"
68
68
  }