@wix/himalaya-cli 0.1161.0 → 0.1163.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.
@@ -83,8 +83,9 @@ export declare function siteHost(origin: string): string;
83
83
  * • never a prefix of another host — `https://site.com/` does not admit `site.com.evil.io`.
84
84
  * A custom Wix domain also admits its apex / `www.` twin, because Wix redirects between them.
85
85
  * Nothing else is admitted for any kind: a Base44 tenant gets its own host only, never every
86
- * `*.base44.app` tenant — Base44 sign-in runs in the system auth session (RFC 0062 phase 5),
87
- * not in this WebView.
86
+ * `*.base44.app` tenant — Base44 sign-in is the app's native Account screen, whose session the
87
+ * bridge seeds into this WebView; only browser OAuth will run in the system auth session (RFC 0062 §5
88
+ * item 8), never here.
88
89
  */
89
90
  export declare function siteAllowedOrigins(origin: string, kind: SiteKind): string[];
90
91
  /** Join a page path onto the site's base URL. Rejects absolute URLs and `..`. */
package/dist/cli.mjs CHANGED
@@ -6783,7 +6783,6 @@ function walk(node, registry, path2, out2) {
6783
6783
  var SYSTEM_FONT_FAMILY, TONAL_ELEVATION_ALPHA, COLOR_TOKEN_PROPS, TYPOGRAPHY_TOKEN_PROPS;
6784
6784
  var init_tokens = __esm({
6785
6785
  "../../core/ts/src/tokens.ts"() {
6786
- "use strict";
6787
6786
  SYSTEM_FONT_FAMILY = "$system";
6788
6787
  TONAL_ELEVATION_ALPHA = [0, 0.05, 0.08, 0.11, 0.12, 0.14];
6789
6788
  COLOR_TOKEN_PROPS = {
@@ -13256,7 +13255,6 @@ function resolveIdiom(tokens2, ctx = {}) {
13256
13255
  var IDIOM_CONTEXTS, UNSAFE_KEYS;
13257
13256
  var init_idiom = __esm({
13258
13257
  "../../core/ts/src/idiom.ts"() {
13259
- "use strict";
13260
13258
  IDIOM_CONTEXTS = {
13261
13259
  ios: { native: ["ios"] },
13262
13260
  android: { native: ["material"] },
@@ -24517,7 +24515,6 @@ function shouldRevealError(args) {
24517
24515
  var EMAIL_RE, URL_HOST_RE, INTEGER_RE, NUMBER_RE;
24518
24516
  var init_validation = __esm({
24519
24517
  "../../core/ts/src/validation.ts"() {
24520
- "use strict";
24521
24518
  EMAIL_RE = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*\.[A-Za-z]{2,}$/;
24522
24519
  URL_HOST_RE = /^[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(:[0-9]+)?$/;
24523
24520
  INTEGER_RE = /^[+-]?[0-9]+$/;
@@ -25177,7 +25174,6 @@ function validateWorkerSubtree(raw, slotId, policy, actionCatalog) {
25177
25174
  var WORKER_SUBTREE_CEILINGS, ID_PART, ACTION_ID;
25178
25175
  var init_worker_subtree = __esm({
25179
25176
  "../../core/ts/src/worker-subtree.ts"() {
25180
- "use strict";
25181
25177
  init_worker_subtree_safe_types_generated();
25182
25178
  WORKER_SUBTREE_CEILINGS = Object.freeze({
25183
25179
  maxEncodedBytes: 65536,
@@ -39190,6 +39186,62 @@ __export(render_descriptor_exports, {
39190
39186
  stabilizePngPage: () => stabilizePngPage,
39191
39187
  withRetry: () => withRetry2
39192
39188
  });
39189
+ function a11ySemantics(type, props, modifiers, ancestorHidden, resolve57) {
39190
+ if (!A11Y_MODIFIER_KEYS.some((k) => modifiers[k] !== void 0)) return void 0;
39191
+ const literal = (v) => typeof v === "string" && v.trim() !== "" && !isDynamicValue(v) ? v : void 0;
39192
+ const spoken = (v) => {
39193
+ const lit = literal(v);
39194
+ if (lit !== void 0 || !resolve57 || typeof v !== "string" || !isDynamicValue(v)) return lit;
39195
+ const r = resolve57(v);
39196
+ if (r === v) return void 0;
39197
+ return typeof r === "string" && r.trim() !== "" ? r : typeof r === "number" ? String(r) : void 0;
39198
+ };
39199
+ const exposure = ancestorHidden ? "hidden" : atExposureOf({ ...props, modifiers });
39200
+ const declared = literal(modifiers.accessibilityRole);
39201
+ const inferred = (typeof modifiers.headingLevel === "number" ? "heading" : void 0) ?? (type === "SelectionControl" && props.kind === "radio" ? "radio" : void 0) ?? A11Y_CONTRACT[type]?.role ?? "unspecified";
39202
+ const role = declared === "decorative" && isInteractive({ ...props, modifiers }) ? "button" : declared ?? inferred;
39203
+ if (exposure === "hidden") return { role, exposure };
39204
+ const out2 = { role };
39205
+ const name = spoken(modifiers.accessibilityLabel) ?? ACCESSIBLE_NAME_KEYS.map((k) => spoken(props[k])).find((v) => v !== void 0);
39206
+ if (name !== void 0 && exposure === "exposed") out2.name = name;
39207
+ const hint = spoken(modifiers.accessibilityHint);
39208
+ if (hint !== void 0) out2.hint = hint;
39209
+ const value = spoken(modifiers.accessibilityValue) ?? controlState(role, props, resolve57);
39210
+ if (value !== void 0) out2.value = value;
39211
+ if (typeof modifiers.headingLevel === "number") out2.headingLevel = modifiers.headingLevel;
39212
+ if (exposure !== "exposed") out2.exposure = exposure;
39213
+ if (Array.isArray(modifiers.accessibilityTraits) && modifiers.accessibilityTraits.length) {
39214
+ out2.traits = modifiers.accessibilityTraits.map(String);
39215
+ }
39216
+ if (modifiers.initialFocus === true) out2.initialFocus = true;
39217
+ if (typeof modifiers.focusOrder === "number") out2.focusOrder = modifiers.focusOrder;
39218
+ if (modifiers.focusGroup === true) out2.focusGroup = true;
39219
+ const announce = modifiers.announce;
39220
+ if (announce && typeof announce === "object" && !Array.isArray(announce)) {
39221
+ const a = announce;
39222
+ out2.live = {
39223
+ politeness: literal(a.politeness) ?? "polite",
39224
+ trigger: literal(a.trigger) ?? "on_change",
39225
+ ...literal(a.text) !== void 0 ? { text: literal(a.text) } : {}
39226
+ };
39227
+ }
39228
+ return out2;
39229
+ }
39230
+ function controlState(role, props, resolve57) {
39231
+ if (role !== "toggle" && role !== "checkbox" && role !== "radio") return void 0;
39232
+ if (role === "checkbox" && props.indeterminate === true) return "mixed";
39233
+ const binding2 = typeof props.valuePath === "string" ? props.valuePath : typeof props.value === "string" && isDynamicValue(props.value) ? props.value : void 0;
39234
+ let on3;
39235
+ if (binding2 !== void 0) {
39236
+ const v = resolve57 ? resolve57(binding2) : void 0;
39237
+ if (v === true || v === 1 || v === "true" || v === "1") on3 = true;
39238
+ else if (v === false || v === 0 || v === "false" || v === "0") on3 = false;
39239
+ else return void 0;
39240
+ } else {
39241
+ on3 = props.value === true || props.value === "true" || props.value === void 0 && props.on === true;
39242
+ }
39243
+ return role === "toggle" ? on3 ? "on" : "off" : on3 ? "checked" : "unchecked";
39244
+ }
39193
39245
  function hiddenBool2(v) {
39194
39246
  if (typeof v === "boolean") return v;
39195
39247
  if (typeof v === "number") return v !== 0;
@@ -39270,7 +39322,7 @@ function collectNativeOnly(node) {
39270
39322
  walk2(node);
39271
39323
  return [...found].sort();
39272
39324
  }
39273
- function buildRenderTree(node, path2 = "$", provider = null, itemScope = void 0, includeRawProps = false, env = null) {
39325
+ function buildRenderTree(node, path2 = "$", provider = null, itemScope = void 0, includeRawProps = false, env = null, a11yHiddenAbove = false) {
39274
39326
  if (!node || typeof node !== "object") return null;
39275
39327
  const obj3 = node;
39276
39328
  const body = obj3.body ?? {};
@@ -39294,6 +39346,15 @@ function buildRenderTree(node, path2 = "$", provider = null, itemScope = void 0,
39294
39346
  }
39295
39347
  if (Object.keys(raw).length) out2.props = raw;
39296
39348
  }
39349
+ const a11y = a11ySemantics(
39350
+ type,
39351
+ props,
39352
+ modifiers,
39353
+ a11yHiddenAbove,
39354
+ provider ? (v) => resolveTreeScalar(v, provider, itemScope) : null
39355
+ );
39356
+ const a11yHidden = a11yHiddenAbove || modifiers.accessibilityHidden === true;
39357
+ if (a11y) out2.a11y = a11y;
39297
39358
  if (provider) {
39298
39359
  const values = {};
39299
39360
  for (const [key2, value] of Object.entries(props)) {
@@ -39332,7 +39393,7 @@ function buildRenderTree(node, path2 = "$", provider = null, itemScope = void 0,
39332
39393
  (el, i) => buildRenderTree(template, `${id}/${type}[${i}]`, provider, {
39333
39394
  ...el && typeof el === "object" ? el : { value: el },
39334
39395
  __index: i
39335
- }, includeRawProps, env)
39396
+ }, includeRawProps, env, a11yHidden)
39336
39397
  ).filter((c) => c != null);
39337
39398
  if (kids3.length) out2.children = kids3;
39338
39399
  return out2;
@@ -39348,7 +39409,7 @@ function buildRenderTree(node, path2 = "$", provider = null, itemScope = void 0,
39348
39409
  if (v && typeof v === "object") {
39349
39410
  const o = v;
39350
39411
  if (o.body && typeof o.body === "object") {
39351
- const c = buildRenderTree(o, `${id}/${type}`, provider, itemScope, includeRawProps, env);
39412
+ const c = buildRenderTree(o, `${id}/${type}`, provider, itemScope, includeRawProps, env, a11yHidden);
39352
39413
  if (c) children.push(c);
39353
39414
  } else {
39354
39415
  for (const [k, val] of Object.entries(o)) visit(val, `${p}.${k}`);
@@ -39531,12 +39592,26 @@ async function renderPngBatch(items) {
39531
39592
  });
39532
39593
  }
39533
39594
  }
39534
- var TREE_TEXT_VALUE_PROPS, asStringOrNumber, asStringOnly, asOtpCode, VALUE_PATH_TEXT, MEDIA_PLAYER_QUEUE_PROPERTIES, NATIVE_ONLY_TYPES, HOST_PAGE_FONT, pngFontCss;
39595
+ var A11Y_MODIFIER_KEYS, TREE_TEXT_VALUE_PROPS, asStringOrNumber, asStringOnly, asOtpCode, VALUE_PATH_TEXT, MEDIA_PLAYER_QUEUE_PROPERTIES, NATIVE_ONLY_TYPES, HOST_PAGE_FONT, pngFontCss;
39535
39596
  var init_render_descriptor = __esm({
39536
39597
  "../../core/dev-server/src/render-descriptor.ts"() {
39537
39598
  init_FakeServiceProvider();
39538
39599
  init_env();
39539
39600
  init_media_value();
39601
+ init_a11y_contract();
39602
+ A11Y_MODIFIER_KEYS = [
39603
+ "accessibilityLabel",
39604
+ "accessibilityRole",
39605
+ "accessibilityHint",
39606
+ "accessibilityHidden",
39607
+ "headingLevel",
39608
+ "accessibilityValue",
39609
+ "accessibilityTraits",
39610
+ "focusOrder",
39611
+ "focusGroup",
39612
+ "initialFocus",
39613
+ "announce"
39614
+ ];
39540
39615
  TREE_TEXT_VALUE_PROPS = /* @__PURE__ */ new Set(["text", "title", "label", "value", "placeholder", "message"]);
39541
39616
  asStringOrNumber = (v) => typeof v === "string" ? v : typeof v === "number" ? String(v) : void 0;
39542
39617
  asStringOnly = (v) => typeof v === "string" ? v : void 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.1161.0",
3
+ "version": "0.1163.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": [
@@ -67,5 +67,5 @@
67
67
  "artifactId": "himalaya-cli"
68
68
  }
69
69
  },
70
- "falconPackageHash": "cc720c71144f4be2d598eb2d2705a9e2ce5cc9345d2a65d43bb8f055"
70
+ "falconPackageHash": "efbdec15e5b9c09d41f6b28844709584bc9a749b54bcbefaed0bf52e"
71
71
  }