@wix/himalaya-cli 0.1161.0 → 0.1162.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.
- package/dist/cli.mjs +83 -7
- package/package.json +2 -2
package/dist/cli.mjs
CHANGED
|
@@ -13256,7 +13256,6 @@ function resolveIdiom(tokens2, ctx = {}) {
|
|
|
13256
13256
|
var IDIOM_CONTEXTS, UNSAFE_KEYS;
|
|
13257
13257
|
var init_idiom = __esm({
|
|
13258
13258
|
"../../core/ts/src/idiom.ts"() {
|
|
13259
|
-
"use strict";
|
|
13260
13259
|
IDIOM_CONTEXTS = {
|
|
13261
13260
|
ios: { native: ["ios"] },
|
|
13262
13261
|
android: { native: ["material"] },
|
|
@@ -24517,7 +24516,6 @@ function shouldRevealError(args) {
|
|
|
24517
24516
|
var EMAIL_RE, URL_HOST_RE, INTEGER_RE, NUMBER_RE;
|
|
24518
24517
|
var init_validation = __esm({
|
|
24519
24518
|
"../../core/ts/src/validation.ts"() {
|
|
24520
|
-
"use strict";
|
|
24521
24519
|
EMAIL_RE = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*\.[A-Za-z]{2,}$/;
|
|
24522
24520
|
URL_HOST_RE = /^[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(:[0-9]+)?$/;
|
|
24523
24521
|
INTEGER_RE = /^[+-]?[0-9]+$/;
|
|
@@ -25177,7 +25175,6 @@ function validateWorkerSubtree(raw, slotId, policy, actionCatalog) {
|
|
|
25177
25175
|
var WORKER_SUBTREE_CEILINGS, ID_PART, ACTION_ID;
|
|
25178
25176
|
var init_worker_subtree = __esm({
|
|
25179
25177
|
"../../core/ts/src/worker-subtree.ts"() {
|
|
25180
|
-
"use strict";
|
|
25181
25178
|
init_worker_subtree_safe_types_generated();
|
|
25182
25179
|
WORKER_SUBTREE_CEILINGS = Object.freeze({
|
|
25183
25180
|
maxEncodedBytes: 65536,
|
|
@@ -39190,6 +39187,62 @@ __export(render_descriptor_exports, {
|
|
|
39190
39187
|
stabilizePngPage: () => stabilizePngPage,
|
|
39191
39188
|
withRetry: () => withRetry2
|
|
39192
39189
|
});
|
|
39190
|
+
function a11ySemantics(type, props, modifiers, ancestorHidden, resolve57) {
|
|
39191
|
+
if (!A11Y_MODIFIER_KEYS.some((k) => modifiers[k] !== void 0)) return void 0;
|
|
39192
|
+
const literal = (v) => typeof v === "string" && v.trim() !== "" && !isDynamicValue(v) ? v : void 0;
|
|
39193
|
+
const spoken = (v) => {
|
|
39194
|
+
const lit = literal(v);
|
|
39195
|
+
if (lit !== void 0 || !resolve57 || typeof v !== "string" || !isDynamicValue(v)) return lit;
|
|
39196
|
+
const r = resolve57(v);
|
|
39197
|
+
if (r === v) return void 0;
|
|
39198
|
+
return typeof r === "string" && r.trim() !== "" ? r : typeof r === "number" ? String(r) : void 0;
|
|
39199
|
+
};
|
|
39200
|
+
const exposure = ancestorHidden ? "hidden" : atExposureOf({ ...props, modifiers });
|
|
39201
|
+
const declared = literal(modifiers.accessibilityRole);
|
|
39202
|
+
const inferred = (typeof modifiers.headingLevel === "number" ? "heading" : void 0) ?? (type === "SelectionControl" && props.kind === "radio" ? "radio" : void 0) ?? A11Y_CONTRACT[type]?.role ?? "unspecified";
|
|
39203
|
+
const role = declared === "decorative" && isInteractive({ ...props, modifiers }) ? "button" : declared ?? inferred;
|
|
39204
|
+
if (exposure === "hidden") return { role, exposure };
|
|
39205
|
+
const out2 = { role };
|
|
39206
|
+
const name = spoken(modifiers.accessibilityLabel) ?? ACCESSIBLE_NAME_KEYS.map((k) => spoken(props[k])).find((v) => v !== void 0);
|
|
39207
|
+
if (name !== void 0 && exposure === "exposed") out2.name = name;
|
|
39208
|
+
const hint = spoken(modifiers.accessibilityHint);
|
|
39209
|
+
if (hint !== void 0) out2.hint = hint;
|
|
39210
|
+
const value = spoken(modifiers.accessibilityValue) ?? controlState(role, props, resolve57);
|
|
39211
|
+
if (value !== void 0) out2.value = value;
|
|
39212
|
+
if (typeof modifiers.headingLevel === "number") out2.headingLevel = modifiers.headingLevel;
|
|
39213
|
+
if (exposure !== "exposed") out2.exposure = exposure;
|
|
39214
|
+
if (Array.isArray(modifiers.accessibilityTraits) && modifiers.accessibilityTraits.length) {
|
|
39215
|
+
out2.traits = modifiers.accessibilityTraits.map(String);
|
|
39216
|
+
}
|
|
39217
|
+
if (modifiers.initialFocus === true) out2.initialFocus = true;
|
|
39218
|
+
if (typeof modifiers.focusOrder === "number") out2.focusOrder = modifiers.focusOrder;
|
|
39219
|
+
if (modifiers.focusGroup === true) out2.focusGroup = true;
|
|
39220
|
+
const announce = modifiers.announce;
|
|
39221
|
+
if (announce && typeof announce === "object" && !Array.isArray(announce)) {
|
|
39222
|
+
const a = announce;
|
|
39223
|
+
out2.live = {
|
|
39224
|
+
politeness: literal(a.politeness) ?? "polite",
|
|
39225
|
+
trigger: literal(a.trigger) ?? "on_change",
|
|
39226
|
+
...literal(a.text) !== void 0 ? { text: literal(a.text) } : {}
|
|
39227
|
+
};
|
|
39228
|
+
}
|
|
39229
|
+
return out2;
|
|
39230
|
+
}
|
|
39231
|
+
function controlState(role, props, resolve57) {
|
|
39232
|
+
if (role !== "toggle" && role !== "checkbox" && role !== "radio") return void 0;
|
|
39233
|
+
if (role === "checkbox" && props.indeterminate === true) return "mixed";
|
|
39234
|
+
const binding2 = typeof props.valuePath === "string" ? props.valuePath : typeof props.value === "string" && isDynamicValue(props.value) ? props.value : void 0;
|
|
39235
|
+
let on3;
|
|
39236
|
+
if (binding2 !== void 0) {
|
|
39237
|
+
const v = resolve57 ? resolve57(binding2) : void 0;
|
|
39238
|
+
if (v === true || v === 1 || v === "true" || v === "1") on3 = true;
|
|
39239
|
+
else if (v === false || v === 0 || v === "false" || v === "0") on3 = false;
|
|
39240
|
+
else return void 0;
|
|
39241
|
+
} else {
|
|
39242
|
+
on3 = props.value === true || props.value === "true" || props.value === void 0 && props.on === true;
|
|
39243
|
+
}
|
|
39244
|
+
return role === "toggle" ? on3 ? "on" : "off" : on3 ? "checked" : "unchecked";
|
|
39245
|
+
}
|
|
39193
39246
|
function hiddenBool2(v) {
|
|
39194
39247
|
if (typeof v === "boolean") return v;
|
|
39195
39248
|
if (typeof v === "number") return v !== 0;
|
|
@@ -39270,7 +39323,7 @@ function collectNativeOnly(node) {
|
|
|
39270
39323
|
walk2(node);
|
|
39271
39324
|
return [...found].sort();
|
|
39272
39325
|
}
|
|
39273
|
-
function buildRenderTree(node, path2 = "$", provider = null, itemScope = void 0, includeRawProps = false, env = null) {
|
|
39326
|
+
function buildRenderTree(node, path2 = "$", provider = null, itemScope = void 0, includeRawProps = false, env = null, a11yHiddenAbove = false) {
|
|
39274
39327
|
if (!node || typeof node !== "object") return null;
|
|
39275
39328
|
const obj3 = node;
|
|
39276
39329
|
const body = obj3.body ?? {};
|
|
@@ -39294,6 +39347,15 @@ function buildRenderTree(node, path2 = "$", provider = null, itemScope = void 0,
|
|
|
39294
39347
|
}
|
|
39295
39348
|
if (Object.keys(raw).length) out2.props = raw;
|
|
39296
39349
|
}
|
|
39350
|
+
const a11y = a11ySemantics(
|
|
39351
|
+
type,
|
|
39352
|
+
props,
|
|
39353
|
+
modifiers,
|
|
39354
|
+
a11yHiddenAbove,
|
|
39355
|
+
provider ? (v) => resolveTreeScalar(v, provider, itemScope) : null
|
|
39356
|
+
);
|
|
39357
|
+
const a11yHidden = a11yHiddenAbove || modifiers.accessibilityHidden === true;
|
|
39358
|
+
if (a11y) out2.a11y = a11y;
|
|
39297
39359
|
if (provider) {
|
|
39298
39360
|
const values = {};
|
|
39299
39361
|
for (const [key2, value] of Object.entries(props)) {
|
|
@@ -39332,7 +39394,7 @@ function buildRenderTree(node, path2 = "$", provider = null, itemScope = void 0,
|
|
|
39332
39394
|
(el, i) => buildRenderTree(template, `${id}/${type}[${i}]`, provider, {
|
|
39333
39395
|
...el && typeof el === "object" ? el : { value: el },
|
|
39334
39396
|
__index: i
|
|
39335
|
-
}, includeRawProps, env)
|
|
39397
|
+
}, includeRawProps, env, a11yHidden)
|
|
39336
39398
|
).filter((c) => c != null);
|
|
39337
39399
|
if (kids3.length) out2.children = kids3;
|
|
39338
39400
|
return out2;
|
|
@@ -39348,7 +39410,7 @@ function buildRenderTree(node, path2 = "$", provider = null, itemScope = void 0,
|
|
|
39348
39410
|
if (v && typeof v === "object") {
|
|
39349
39411
|
const o = v;
|
|
39350
39412
|
if (o.body && typeof o.body === "object") {
|
|
39351
|
-
const c = buildRenderTree(o, `${id}/${type}`, provider, itemScope, includeRawProps, env);
|
|
39413
|
+
const c = buildRenderTree(o, `${id}/${type}`, provider, itemScope, includeRawProps, env, a11yHidden);
|
|
39352
39414
|
if (c) children.push(c);
|
|
39353
39415
|
} else {
|
|
39354
39416
|
for (const [k, val] of Object.entries(o)) visit(val, `${p}.${k}`);
|
|
@@ -39531,12 +39593,26 @@ async function renderPngBatch(items) {
|
|
|
39531
39593
|
});
|
|
39532
39594
|
}
|
|
39533
39595
|
}
|
|
39534
|
-
var TREE_TEXT_VALUE_PROPS, asStringOrNumber, asStringOnly, asOtpCode, VALUE_PATH_TEXT, MEDIA_PLAYER_QUEUE_PROPERTIES, NATIVE_ONLY_TYPES, HOST_PAGE_FONT, pngFontCss;
|
|
39596
|
+
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
39597
|
var init_render_descriptor = __esm({
|
|
39536
39598
|
"../../core/dev-server/src/render-descriptor.ts"() {
|
|
39537
39599
|
init_FakeServiceProvider();
|
|
39538
39600
|
init_env();
|
|
39539
39601
|
init_media_value();
|
|
39602
|
+
init_a11y_contract();
|
|
39603
|
+
A11Y_MODIFIER_KEYS = [
|
|
39604
|
+
"accessibilityLabel",
|
|
39605
|
+
"accessibilityRole",
|
|
39606
|
+
"accessibilityHint",
|
|
39607
|
+
"accessibilityHidden",
|
|
39608
|
+
"headingLevel",
|
|
39609
|
+
"accessibilityValue",
|
|
39610
|
+
"accessibilityTraits",
|
|
39611
|
+
"focusOrder",
|
|
39612
|
+
"focusGroup",
|
|
39613
|
+
"initialFocus",
|
|
39614
|
+
"announce"
|
|
39615
|
+
];
|
|
39540
39616
|
TREE_TEXT_VALUE_PROPS = /* @__PURE__ */ new Set(["text", "title", "label", "value", "placeholder", "message"]);
|
|
39541
39617
|
asStringOrNumber = (v) => typeof v === "string" ? v : typeof v === "number" ? String(v) : void 0;
|
|
39542
39618
|
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.
|
|
3
|
+
"version": "0.1162.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": "
|
|
70
|
+
"falconPackageHash": "bac428c020d4e0fca85b381b22b38e07687673c5384fd25eca3d471a"
|
|
71
71
|
}
|