@wix/himalaya-cli 0.1262.0 → 0.1263.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 (42) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/builder.d.ts +1 -0
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts +2 -0
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/tokens.d.ts +4 -0
  4. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +26 -0
  5. package/dist/cli.mjs +155 -38
  6. package/dist/preview-assets.generated.bin +0 -0
  7. package/guides/component-reference.json +1 -1
  8. package/guides/component-reference.md +2 -0
  9. package/package.json +2 -2
  10. package/templates/beauty-salon-owner/dev/index.ts +256 -87
  11. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-ask/index.ts +5 -0
  12. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-drawer/logic.ts +3 -0
  13. package/templates/community-club-owner/dev/index.ts +192 -71
  14. package/templates/community-club-owner/tier5-src/himi-owner-lite-ask/index.ts +5 -0
  15. package/templates/community-club-owner/tier5-src/himi-owner-lite-drawer/logic.ts +3 -0
  16. package/templates/events-meetups-owner/dev/index.ts +96 -47
  17. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-ask/index.ts +5 -0
  18. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-drawer/logic.ts +3 -0
  19. package/templates/gym-fitness-owner/dev/index.ts +288 -95
  20. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-ask/index.ts +5 -0
  21. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-drawer/logic.ts +3 -0
  22. package/templates/nonprofit-cause-owner/dev/index.ts +192 -71
  23. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-ask/index.ts +5 -0
  24. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-drawer/logic.ts +3 -0
  25. package/templates/owner-lite/dev/index.ts +288 -95
  26. package/templates/owner-lite/tier5-src/himi-owner-lite-ask/index.ts +5 -0
  27. package/templates/owner-lite/tier5-src/himi-owner-lite-drawer/logic.ts +3 -0
  28. package/templates/podcast-creator-owner/dev/index.ts +192 -71
  29. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-ask/index.ts +5 -0
  30. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-drawer/logic.ts +3 -0
  31. package/templates/portfolio-creative-owner/dev/index.ts +256 -87
  32. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-ask/index.ts +5 -0
  33. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-drawer/logic.ts +3 -0
  34. package/templates/restaurant-owner/dev/index.ts +288 -95
  35. package/templates/restaurant-owner/tier5-src/himi-owner-lite-ask/index.ts +5 -0
  36. package/templates/restaurant-owner/tier5-src/himi-owner-lite-drawer/logic.ts +3 -0
  37. package/templates/retail-store-owner/dev/index.ts +160 -63
  38. package/templates/retail-store-owner/tier5-src/himi-owner-lite-ask/index.ts +5 -0
  39. package/templates/retail-store-owner/tier5-src/himi-owner-lite-drawer/logic.ts +3 -0
  40. package/templates/yoga-studio-owner/dev/index.ts +192 -71
  41. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-ask/index.ts +5 -0
  42. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-drawer/logic.ts +3 -0
@@ -442,6 +442,7 @@ export declare function button(props: {
442
442
  title: string;
443
443
  action: ActionShape;
444
444
  style?: string;
445
+ role?: "destructive" | "cancel";
445
446
  disabled?: boolean;
446
447
  /** #3117 — `$service:`/`$item.` bool binding, OR'd with `disabled`/`loading`. */
447
448
  disabledPath?: string;
@@ -693,6 +693,8 @@ export interface IconProps {
693
693
  contentDescription?: string;
694
694
  }
695
695
  export interface ButtonProps {
696
+ /** RFC 0068 — destructive/cancel role independent of style; unknown values warn and behave as absent. */
697
+ role?: string;
696
698
  /** Button label — binding-aware ("$item."/"$service:") on web, iOS and Android. */
697
699
  title: string;
698
700
  action: Action;
@@ -428,3 +428,7 @@ export interface TokenViolation {
428
428
  kind: "color" | "spacing" | "typography" | "radius";
429
429
  name: string;
430
430
  }
431
+ /** RFC 0068 — shared web/RN Button presentation families. Legacy keys remain token keys. */
432
+ export declare const BUTTON_VARIANTS: readonly ["filled", "tonal", "outlined", "text", "elevated", "bordered", "prominent", "plain", "glass"];
433
+ export declare const BUTTON_LEGACY_STYLES: readonly ["primary", "secondary", "tertiary", "link", "destructive"];
434
+ export declare function buttonVariant(style: string | undefined): "text" | "filled" | "tonal" | "outlined" | "elevated" | "glass";
@@ -7985,6 +7985,29 @@ var TYPOGRAPHY_TOKEN_PROPS = {
7985
7985
  Label: ["style"],
7986
7986
  Marquee: ["style"]
7987
7987
  };
7988
+ var BUTTON_VARIANTS = ["filled", "tonal", "outlined", "text", "elevated", "bordered", "prominent", "plain", "glass"];
7989
+ var BUTTON_LEGACY_STYLES = ["primary", "secondary", "tertiary", "link", "destructive"];
7990
+ function buttonVariant(style) {
7991
+ switch (style ?? "primary") {
7992
+ case "primary":
7993
+ case "destructive":
7994
+ case "filled":
7995
+ case "prominent":
7996
+ return "filled";
7997
+ case "secondary":
7998
+ case "outlined":
7999
+ case "bordered":
8000
+ return "outlined";
8001
+ case "tonal":
8002
+ return "tonal";
8003
+ case "elevated":
8004
+ return "elevated";
8005
+ case "glass":
8006
+ return "glass";
8007
+ default:
8008
+ return "text";
8009
+ }
8010
+ }
7988
8011
 
7989
8012
  // ../../core/ts/src/widget-vocabulary.ts
7990
8013
  var WIDGET_FAMILIES = ["ios_home", "ios_lock", "android_home", "web_card", "ios_live_activity", "watch_complication", "car_list"];
@@ -13434,8 +13457,10 @@ export {
13434
13457
  APP_ID_PATTERN,
13435
13458
  AppRegistryClient,
13436
13459
  BASE44_ORIGINS,
13460
+ BUTTON_LEGACY_STYLES,
13437
13461
  BUTTON_MIN_HIT_TARGET,
13438
13462
  BUTTON_SIZES,
13463
+ BUTTON_VARIANTS,
13439
13464
  CHASSIS_GEOMETRY,
13440
13465
  CORE_COMPONENTS,
13441
13466
  DEFAULT_DISTRIBUTION,
@@ -13496,6 +13521,7 @@ export {
13496
13521
  buildPlayerPreviewUrl,
13497
13522
  buildTokenRegistry,
13498
13523
  buttonHitSlop,
13524
+ buttonVariant,
13499
13525
  chassisOuterSize,
13500
13526
  checkTierCaps,
13501
13527
  chooseCandidate,
package/dist/cli.mjs CHANGED
@@ -6869,7 +6869,28 @@ function walk(node, registry, path2, out2) {
6869
6869
  walk(value, registry, `${path2}.${key2}`, out2);
6870
6870
  }
6871
6871
  }
6872
- var SYSTEM_FONT_FAMILY, TONAL_ELEVATION_ALPHA, BUTTON_MIN_HIT_TARGET, nonNegative, nonEmpty, own, COLOR_TOKEN_PROPS, TYPOGRAPHY_TOKEN_PROPS;
6872
+ function buttonVariant(style) {
6873
+ switch (style ?? "primary") {
6874
+ case "primary":
6875
+ case "destructive":
6876
+ case "filled":
6877
+ case "prominent":
6878
+ return "filled";
6879
+ case "secondary":
6880
+ case "outlined":
6881
+ case "bordered":
6882
+ return "outlined";
6883
+ case "tonal":
6884
+ return "tonal";
6885
+ case "elevated":
6886
+ return "elevated";
6887
+ case "glass":
6888
+ return "glass";
6889
+ default:
6890
+ return "text";
6891
+ }
6892
+ }
6893
+ var SYSTEM_FONT_FAMILY, TONAL_ELEVATION_ALPHA, BUTTON_MIN_HIT_TARGET, nonNegative, nonEmpty, own, COLOR_TOKEN_PROPS, TYPOGRAPHY_TOKEN_PROPS, BUTTON_VARIANTS;
6873
6894
  var init_tokens = __esm({
6874
6895
  "../../core/ts/src/tokens.ts"() {
6875
6896
  "use strict";
@@ -6903,6 +6924,7 @@ var init_tokens = __esm({
6903
6924
  Label: ["style"],
6904
6925
  Marquee: ["style"]
6905
6926
  };
6927
+ BUTTON_VARIANTS = ["filled", "tonal", "outlined", "text", "elevated", "bordered", "prominent", "plain", "glass"];
6906
6928
  }
6907
6929
  });
6908
6930
 
@@ -8200,12 +8222,46 @@ function ownName(n2) {
8200
8222
  }
8201
8223
  return false;
8202
8224
  }
8225
+ function renderedRecordName(value) {
8226
+ if (Array.isArray(value)) return value.some(renderedRecordName);
8227
+ return !!value && typeof value === "object" && !isActionEnvelope(value) && ownName(value);
8228
+ }
8229
+ function renderedTableName(props) {
8230
+ const nonempty = (v2) => typeof v2 === "string" && v2.trim() !== "";
8231
+ const columns = own2(props, "columns");
8232
+ if (Array.isArray(columns) && columns.some(nonempty)) return true;
8233
+ const rows = own2(props, "rows");
8234
+ return Array.isArray(rows) && rows.some((row) => {
8235
+ if (!row || typeof row !== "object" || Array.isArray(row)) return false;
8236
+ const cells = own2(row, "cells");
8237
+ return Array.isArray(cells) && cells.some(nonempty);
8238
+ });
8239
+ }
8240
+ function activeStatefulSlot(props) {
8241
+ const state = own2(props, "state");
8242
+ return state === "loading" || state === "empty" || state === "error" || state === "data" ? state : null;
8243
+ }
8244
+ function componentOwnName(n2) {
8245
+ const type = componentTypeOf(n2);
8246
+ if (type === null) return false;
8247
+ const bag = (v2) => v2 && typeof v2 === "object" && !Array.isArray(v2) ? v2 : null;
8248
+ const body = bag(n2.body);
8249
+ const props = [bag(n2.props), bag(body?.props)];
8250
+ if ([n2, ...props, bag(n2.modifiers), body, bag(body?.modifiers)].some((part) => part !== null && ownName(part))) return true;
8251
+ if (type === "StatefulSection" && props.some((part) => {
8252
+ if (part === null) return false;
8253
+ const slot = activeStatefulSlot(part);
8254
+ return (slot === "empty" || slot === "error") && renderedRecordName(own2(part, slot));
8255
+ })) return true;
8256
+ if (type === "Table" && props.some((part) => part !== null && renderedTableName(part))) return true;
8257
+ return props.some((part) => part !== null && (own2(RENDERED_NAME_PROPS, type) ?? []).some((key2) => renderedRecordName(own2(part, key2))));
8258
+ }
8203
8259
  function isWireWrapper(n2) {
8204
8260
  return componentTypeOf(n2) !== null && typeof n2.body?.type === "string";
8205
8261
  }
8206
- function nameIn(node, at2) {
8262
+ function nameIn(node, at2, renderedNamesOnly) {
8207
8263
  if (!node || typeof node !== "object") return false;
8208
- if (Array.isArray(node)) return node.some((v2) => nameIn(v2, at2));
8264
+ if (Array.isArray(node)) return node.some((v2) => nameIn(v2, at2, renderedNamesOnly));
8209
8265
  if (isActionEnvelope(node)) return false;
8210
8266
  const n2 = node;
8211
8267
  let readOwnKeys = true;
@@ -8214,23 +8270,31 @@ function nameIn(node, at2) {
8214
8270
  if (exposure === "hidden") return false;
8215
8271
  if (exposure === "decorative") readOwnKeys = false;
8216
8272
  } else if (at2 === "decorativeOwn") {
8217
- if (componentTypeOf(n2) !== null) return nameIn(n2, "descendant");
8273
+ if (componentTypeOf(n2) !== null) return nameIn(n2, "descendant", renderedNamesOnly);
8218
8274
  readOwnKeys = false;
8219
8275
  }
8220
8276
  if (readOwnKeys) {
8221
- if (ownName(n2)) return true;
8222
- return Object.values(n2).some((v2) => nameIn(v2, "descendant"));
8277
+ if (renderedNamesOnly ? at2 === "self" ? ownName(n2) || componentOwnName(n2) : componentOwnName(n2) : ownName(n2)) return true;
8278
+ if (renderedNamesOnly && componentTypeOf(n2) === "StatefulSection") {
8279
+ const body = n2.body;
8280
+ const props = n2.props ?? body?.props;
8281
+ if (props && typeof props === "object" && !Array.isArray(props)) {
8282
+ const slot = activeStatefulSlot(props);
8283
+ if (slot !== null) return nameIn(own2(props, slot), "descendant", true);
8284
+ }
8285
+ }
8286
+ return Object.values(n2).some((v2) => nameIn(v2, "descendant", renderedNamesOnly));
8223
8287
  }
8224
8288
  const wrapper = isWireWrapper(n2);
8225
8289
  return Object.entries(n2).some(([k2, v2]) => {
8226
8290
  if (k2 === "body" && wrapper && v2 && typeof v2 === "object" && !Array.isArray(v2)) {
8227
- return Object.values(v2).some((w2) => nameIn(w2, "decorativeOwn"));
8291
+ return Object.values(v2).some((w2) => nameIn(w2, "decorativeOwn", renderedNamesOnly));
8228
8292
  }
8229
- return nameIn(v2, "decorativeOwn");
8293
+ return nameIn(v2, "decorativeOwn", renderedNamesOnly);
8230
8294
  });
8231
8295
  }
8232
- function hasAccessibleName(node) {
8233
- return nameIn(node, "self");
8296
+ function hasAccessibleName(node, renderedNamesOnly = false) {
8297
+ return nameIn(node, "self", renderedNamesOnly);
8234
8298
  }
8235
8299
  function componentTypeOf(node) {
8236
8300
  const body = node.body;
@@ -8265,7 +8329,7 @@ function accessibleNameGaps(descriptor, options = {}) {
8265
8329
  const type = componentTypeOf(n2);
8266
8330
  const row = type ? own2(A11Y_CONTRACT, type) : void 0;
8267
8331
  const contractual = !interactiveOnly && row?.name === "required";
8268
- if ((tappable || contractual) && !hasAccessibleName(n2)) {
8332
+ if ((tappable || contractual) && !hasAccessibleName(n2, options.renderedNamesOnly === true)) {
8269
8333
  out2.push({
8270
8334
  at: path2 || "root",
8271
8335
  type: type ?? (n2.icon ? "icon" : "node"),
@@ -8283,7 +8347,7 @@ function accessibleNameGaps(descriptor, options = {}) {
8283
8347
  walk2(descriptor, "", "");
8284
8348
  return out2;
8285
8349
  }
8286
- var A11Y_CONTRACT, ACCESSIBLE_NAME_KEYS, CONTENT_ARM_KEYS, TAP_MODIFIER_KEYS, PROP_HANDLER_KEYS;
8350
+ var A11Y_CONTRACT, ACCESSIBLE_NAME_KEYS, CONTENT_ARM_KEYS, TAP_MODIFIER_KEYS, PROP_HANDLER_KEYS, RENDERED_NAME_PROPS;
8287
8351
  var init_a11y_contract = __esm({
8288
8352
  "../../core/dev-server/src/a11y-contract.ts"() {
8289
8353
  A11Y_CONTRACT = {
@@ -8432,6 +8496,26 @@ var init_a11y_contract = __esm({
8432
8496
  CONTENT_ARM_KEYS = ["template", "timeRef"];
8433
8497
  TAP_MODIFIER_KEYS = ["onTap", "onLongPress", "onDoubleTap"];
8434
8498
  PROP_HANDLER_KEYS = ["action", ...TAP_MODIFIER_KEYS];
8499
+ RENDERED_NAME_PROPS = {
8500
+ RichText: ["runs"],
8501
+ AvatarStrip: ["avatars"],
8502
+ FilterChips: ["chips"],
8503
+ Tabs: ["tabs"],
8504
+ SegmentedControl: ["options"],
8505
+ Picker: ["options"],
8506
+ WheelPicker: ["options"],
8507
+ Menu: ["items"],
8508
+ Timeline: ["entries"],
8509
+ DataTable: ["columns"],
8510
+ Chart: ["series"],
8511
+ DonutChart: ["slices"],
8512
+ TimeGrid: ["events", "resources"],
8513
+ Agenda: ["events"],
8514
+ MonthCalendar: ["decorations"],
8515
+ Map: ["markers", "route"],
8516
+ MediaPlayer: ["items"],
8517
+ Legend: ["items"]
8518
+ };
8435
8519
  }
8436
8520
  });
8437
8521
 
@@ -10463,6 +10547,28 @@ function mediaFieldFindings(descriptor) {
10463
10547
  visit(descriptor, "", true);
10464
10548
  return out2;
10465
10549
  }
10550
+ function buttonVariantFindings(descriptor) {
10551
+ const out2 = [];
10552
+ const visit = (v2, path2, atRoot) => {
10553
+ if (Array.isArray(v2)) {
10554
+ v2.forEach((x2, i2) => visit(x2, `${path2}[${i2}]`, false));
10555
+ return;
10556
+ }
10557
+ if (!v2 || typeof v2 !== "object") return;
10558
+ const record2 = v2;
10559
+ const body = record2.body;
10560
+ if (body?.package === "himalaya" && body.type === "Button") {
10561
+ const props = body.props ?? {};
10562
+ if (typeof props.style === "string" && !BUTTON_STYLES.has(props.style)) out2.push({ path: `${path2}.body.props.style`, message: `Unknown Button.style ${JSON.stringify(props.style)}; using the platform text-button fallback` });
10563
+ if (props.role !== void 0 && props.role !== "destructive" && props.role !== "cancel") out2.push({ path: `${path2}.body.props.role`, message: `Unknown Button.role ${JSON.stringify(props.role)}; expected destructive or cancel` });
10564
+ }
10565
+ for (const [key2, child] of Object.entries(record2)) {
10566
+ if (!isOpaqueAuthorJson(key2, child, atRoot)) visit(child, path2 ? `${path2}.${key2}` : key2, false);
10567
+ }
10568
+ };
10569
+ visit(descriptor, "", true);
10570
+ return out2;
10571
+ }
10466
10572
  function emptyStateFindings(descriptor) {
10467
10573
  const out2 = [];
10468
10574
  const visit = (v2, path2, atRoot) => {
@@ -10637,6 +10743,9 @@ function validateScreenDescriptor(screenId, descriptor, opts = {}) {
10637
10743
  for (const finding of richTextFieldFindings(descriptor)) {
10638
10744
  issues.push({ severity: "error", pass: "rich-text-field", path: finding.path, message: finding.message });
10639
10745
  }
10746
+ for (const finding of buttonVariantFindings(descriptor)) {
10747
+ issues.push({ severity: "warning", pass: "button-variants", path: finding.path, message: finding.message });
10748
+ }
10640
10749
  for (const finding of emptyStateFindings(descriptor)) {
10641
10750
  issues.push({ severity: "error", pass: "empty-state", path: finding.path, message: finding.message });
10642
10751
  }
@@ -11137,7 +11246,7 @@ function validateScreenDescriptor(screenId, descriptor, opts = {}) {
11137
11246
  services: Object.keys(services)
11138
11247
  };
11139
11248
  }
11140
- var CRAWL_BLOCKING_PASSES, BOOT_EVAL_TIMEOUT_MS, DRIFT_PROBES, DEVICE_PARITY_WITHHELD, defaultEvaluator, bootEvaluator, actionEvaluator, NATIVE_PROP_ENUMS, KNOWN_PROPS, IN_ARRAY_BINDING_PROPS, SERVICE_SIGIL, INTEGER_PROPS, NATIVE_REQUIRED_PROPS, bareNestedClass, NATIVE_NESTED_CLASSES, NATIVE_MODIFIERS_CLASS, NATIVE_DESCRIPTOR_CLASS, NATIVE_DESCRIPTOR_NESTED, NATIVE_NESTED_PROPS, MODIFIER_KEYS, INTEGER_MODIFIERS, MODIFIER_KINDS, SCHEMA_SCORED_NODES, CORE_PACKAGES, LEGACY_UNSCORED_KEYS, DYNAMIC_PLACEHOLDER, LITERAL_ONLY_PROPS, SERVICE_ONLY_BINDING_PROPS, WHOLE_VALUE_BINDING, EMBEDDED_BINDING, OPTIONS_BINDING_PROPS, EDITOR_SERVICE_NAME, EMPTY_STATE_ACTION_STYLES, EMPTY_STATE_ACTION_SIZES;
11249
+ var CRAWL_BLOCKING_PASSES, BOOT_EVAL_TIMEOUT_MS, DRIFT_PROBES, DEVICE_PARITY_WITHHELD, defaultEvaluator, bootEvaluator, actionEvaluator, NATIVE_PROP_ENUMS, KNOWN_PROPS, IN_ARRAY_BINDING_PROPS, SERVICE_SIGIL, INTEGER_PROPS, NATIVE_REQUIRED_PROPS, bareNestedClass, NATIVE_NESTED_CLASSES, NATIVE_MODIFIERS_CLASS, NATIVE_DESCRIPTOR_CLASS, NATIVE_DESCRIPTOR_NESTED, NATIVE_NESTED_PROPS, MODIFIER_KEYS, INTEGER_MODIFIERS, MODIFIER_KINDS, SCHEMA_SCORED_NODES, CORE_PACKAGES, LEGACY_UNSCORED_KEYS, DYNAMIC_PLACEHOLDER, LITERAL_ONLY_PROPS, SERVICE_ONLY_BINDING_PROPS, WHOLE_VALUE_BINDING, EMBEDDED_BINDING, OPTIONS_BINDING_PROPS, EDITOR_SERVICE_NAME, BUTTON_STYLES, EMPTY_STATE_ACTION_STYLES, EMPTY_STATE_ACTION_SIZES;
11141
11250
  var init_validate_descriptor_core = __esm({
11142
11251
  "../../core/dev-server/src/validate-descriptor.core.ts"() {
11143
11252
  init_validator();
@@ -11261,6 +11370,7 @@ var init_validate_descriptor_core = __esm({
11261
11370
  minHeight: "number",
11262
11371
  size: "string",
11263
11372
  style: "string",
11373
+ role: "string",
11264
11374
  title: "string",
11265
11375
  trailingIcon: "string"
11266
11376
  },
@@ -12104,6 +12214,7 @@ var init_validate_descriptor_core = __esm({
12104
12214
  EMBEDDED_BINDING = /\$service:[A-Za-z0-9_-]+\.[A-Za-z0-9_.[\]]+|\$flag:[A-Za-z0-9_.-]+|\$t:[A-Za-z0-9_.-]+|\$item(?:\.[A-Za-z0-9_.[\]]+)?/;
12105
12215
  OPTIONS_BINDING_PROPS = /* @__PURE__ */ new Set(["optionsPath"]);
12106
12216
  EDITOR_SERVICE_NAME = /^[A-Za-z][A-Za-z0-9_-]{0,63}$/;
12217
+ BUTTON_STYLES = /* @__PURE__ */ new Set(["filled", "tonal", "outlined", "text", "elevated", "bordered", "prominent", "plain", "glass", "primary", "secondary", "tertiary", "link", "destructive"]);
12107
12218
  EMPTY_STATE_ACTION_STYLES = /* @__PURE__ */ new Set(["primary", "secondary", "plain"]);
12108
12219
  EMPTY_STATE_ACTION_SIZES = /* @__PURE__ */ new Set(["sm", "md"]);
12109
12220
  }
@@ -116476,7 +116587,7 @@ function wantsRowStretch(node) {
116476
116587
  if (props?.iconOnly) return false;
116477
116588
  if (typeof props?.fullWidth === "boolean") return props.fullWidth;
116478
116589
  const style = props?.style ?? "primary";
116479
- return !(style === "tertiary" || style === "link");
116590
+ return !(BUTTON_VARIANTS.includes(style) || style === "tertiary" || style === "link");
116480
116591
  }
116481
116592
  return false;
116482
116593
  }
@@ -120796,21 +120907,23 @@ var init_renderNode = __esm({
120796
120907
  const resolvedLeadingIcon = isBinding(props.leadingIcon) ? boundLeadingIcon : props.leadingIcon;
120797
120908
  const resolvedTrailingIcon = isBinding(props.trailingIcon) ? boundTrailingIcon : props.trailingIcon;
120798
120909
  const buttonStyle = props.style ?? "primary";
120799
- const destructive = buttonStyle === "destructive";
120800
- const primary = buttonStyle === "primary" || destructive;
120910
+ const variant = buttonVariant(buttonStyle);
120911
+ const destructive = buttonStyle === "destructive" || props.role === "destructive";
120912
+ const primary = variant === "filled";
120801
120913
  const bt2 = resolveButtonTokens(ctx.tokens, props.size, buttonStyle);
120802
- const borderWidth = bt2.borderWidth ?? (buttonStyle === "secondary" ? 1 : 0);
120914
+ const borderWidth = bt2.borderWidth ?? (variant === "outlined" ? 1 : 0);
120803
120915
  const outlined = borderWidth > 0;
120804
- const builtInFill = !primary ? "transparent" : destructive ? C2("danger", "#E62214") : C2("accentPrimary", "#116DFF");
120916
+ const roleAccent = destructive ? C2("danger", "#E62214") : C2("accentPrimary", "#116DFF");
120917
+ const builtInFill = primary ? roleAccent : variant === "tonal" ? rgba(roleAccent, 0.12) : variant === "glass" ? rgba(C2("surfacePrimary", "#ffffff"), 0.65) : variant === "elevated" ? C2("surfacePrimary", "#ffffff") : "transparent";
120805
120918
  const accent = bt2.fill != null ? C2(bt2.fill, builtInFill) : builtInFill;
120806
- const filled = primary || bt2.fill != null;
120919
+ const filled = primary || variant === "tonal" || variant === "elevated" || variant === "glass" || bt2.fill != null;
120807
120920
  const boundDisabled = useResolvedScalar(props.disabledPath, ctx);
120808
120921
  const disabled = props.disabled === true || props.loading === true || hiddenBool(boundDisabled);
120809
120922
  const onClick = ctx.onAction && props.action && !disabled ? (e2) => {
120810
120923
  e2?.stopPropagation?.();
120811
120924
  ctx.onAction(resolveItemDeep2(props.action, ctx));
120812
120925
  } : void 0;
120813
- const builtInFg = primary ? C2("textOnAccent", "#fff") : accentTextColor(ctx);
120926
+ const builtInFg = primary ? C2("textOnAccent", "#fff") : destructive ? C2("danger", "#E62214") : accentTextColor(ctx);
120814
120927
  const fg = bt2.label != null ? C2(bt2.label, builtInFg) : builtInFg;
120815
120928
  const outlineColor = bt2.border != null ? C2(bt2.border, fg) : fg;
120816
120929
  const pillRadius = props.cornerRadius != null ? props.cornerRadius : bt2.radius ?? ctx.radius("pill", 24);
@@ -120835,6 +120948,8 @@ var init_renderNode = __esm({
120835
120948
  disabled,
120836
120949
  "aria-label": accessibleLabel,
120837
120950
  "aria-busy": props.loading === true ? true : void 0,
120951
+ "data-button-variant": variant,
120952
+ "data-button-role": props.role,
120838
120953
  "data-himalaya-idiom-press": idiomPress(ctx, "button"),
120839
120954
  onClick,
120840
120955
  style: rowShareFloor({
@@ -120868,7 +120983,7 @@ var init_renderNode = __esm({
120868
120983
  // would otherwise land last and hand the button straight back to a 0 floor —
120869
120984
  // the same collapse, reached through a modifier instead of through `auto`.
120870
120985
  display: props.fullWidth || rowStretch ? "flex" : "inline-flex",
120871
- width: props.fullWidth ? "100%" : void 0,
120986
+ width: props.fullWidth ? "100%" : (BUTTON_VARIANTS.includes(buttonStyle) || props.fullWidth === false) && !rowStretch ? "fit-content" : void 0,
120872
120987
  flex: rowStretch ? "1 1 0" : void 0,
120873
120988
  minWidth: props.iconOnly ? 44 : props.fullWidth ? void 0 : 64,
120874
120989
  minHeight: visibleMin + 2 * slop,
@@ -120889,6 +121004,8 @@ var init_renderNode = __esm({
120889
121004
  background: filled ? accent : "transparent",
120890
121005
  color: fg,
120891
121006
  ...slop > 0 ? { border: "none", borderTop: `${slop}px solid transparent`, borderBottom: `${slop}px solid transparent`, backgroundClip: "padding-box", marginTop: -slop, marginBottom: -slop, ...outlined ? { boxShadow: `inset 0 0 0 ${borderWidth}px ${outlineColor}` } : {} } : { border: outlined ? `${borderWidth}px solid ${outlineColor}` : "none" },
121007
+ ...variant === "elevated" ? { boxShadow: `${slop > 0 && outlined ? `inset 0 0 0 ${borderWidth}px ${outlineColor}, ` : ""}0 2px 4px rgba(0,0,0,0.2)` } : {},
121008
+ ...variant === "glass" ? { backdropFilter: "blur(12px)", WebkitBackdropFilter: "blur(12px)" } : {},
120892
121009
  cursor: disabled ? "default" : "pointer",
120893
121010
  opacity: disabled ? 0.55 : 1,
120894
121011
  boxSizing: "border-box",
@@ -144532,23 +144649,23 @@ var init_preview_assets_generated = __esm({
144532
144649
  "../../packages/serve/src/preview-assets.generated.ts"() {
144533
144650
  init_preview_assets_format();
144534
144651
  PREVIEW_ASSET_MANIFEST = [
144535
- { key: "assets/index-XnF2Yd7q.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 1214546, sha256: "510ce325dc2eebd1170556d2f4e037dd99d7aacbb980684852c358649d137183" },
144536
- { key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/octet-stream", offset: 1214554, length: 1317034, sha256: "a33cfe728c584fdba4fcc1fd54bcdc2f9f2f13889ddbb5b2bd1d0f8cbe49b84e" },
144537
- { key: "assets/pdfDocument-D55HNmZh.js", contentType: "application/javascript; charset=utf-8", offset: 2531588, length: 489166, sha256: "9099f7588448089413dc5a2f8dc68920deb800d0563193097cc58ad8f931a9f6" },
144538
- { key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset: 3020754, length: 4610, sha256: "994062dd7af4186a739de55dd9e151c63b6301f8e2cbafc608d35c2e87da0cd2" },
144539
- { key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset: 3025364, length: 488584, sha256: "d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134" },
144540
- { key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 3513948, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
144541
- { key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 3604872, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
144542
- { key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 3695856, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
144543
- { key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 3786836, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
144544
- { key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 3877708, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
144545
- { key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 3968688, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
144546
- { key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 4077324, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
144547
- { key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 4186408, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
144548
- { key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 4295456, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
144549
- { key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 4403156, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
144550
- { key: "index.html", contentType: "text/html; charset=utf-8", offset: 4491264, length: 4947, sha256: "84664e32e23c937cd72f471f5ad2309d03c6ec218011056d30d30d029e7871b4" },
144551
- { key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 4496211, length: 17344, sha256: "d057298d75e7373e5e2c4d11b7d1bcbea88e03af555ba63d97641c78509c58e4" }
144652
+ { key: "assets/index-Cp9s6iew.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 1215608, sha256: "d8146f84ef505b37316197ed7df5e1dc03254ac000b05ad1fb7c99af4a0f75b1" },
144653
+ { key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/octet-stream", offset: 1215616, length: 1317034, sha256: "a33cfe728c584fdba4fcc1fd54bcdc2f9f2f13889ddbb5b2bd1d0f8cbe49b84e" },
144654
+ { key: "assets/pdfDocument-DI7C0g9C.js", contentType: "application/javascript; charset=utf-8", offset: 2532650, length: 489166, sha256: "f5e341a8e5dd7dcc319b059321b9fab3d65aa41aa8fec7abbdc5251541d01946" },
144655
+ { key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset: 3021816, length: 4610, sha256: "994062dd7af4186a739de55dd9e151c63b6301f8e2cbafc608d35c2e87da0cd2" },
144656
+ { key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset: 3026426, length: 488584, sha256: "d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134" },
144657
+ { key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 3515010, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
144658
+ { key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 3605934, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
144659
+ { key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 3696918, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
144660
+ { key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 3787898, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
144661
+ { key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 3878770, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
144662
+ { key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 3969750, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
144663
+ { key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 4078386, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
144664
+ { key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 4187470, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
144665
+ { key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 4296518, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
144666
+ { key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 4404218, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
144667
+ { key: "index.html", contentType: "text/html; charset=utf-8", offset: 4492326, length: 4947, sha256: "52f0f78045659e6cfa7d3db671275f28cb8a71f08f7ab96b423d5670f693a2ec" },
144668
+ { key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 4497273, length: 17344, sha256: "d057298d75e7373e5e2c4d11b7d1bcbea88e03af555ba63d97641c78509c58e4" }
144552
144669
  ];
144553
144670
  }
144554
144671
  });
Binary file
@@ -129,7 +129,7 @@
129
129
  "disabledPath",
130
130
  "title"
131
131
  ],
132
- "propsSource": "export interface ButtonProps {\n /** Button label — binding-aware (\"$item.\"/\"$service:\") on web, iOS and Android. */\n title: string;\n action: Action;\n style?: string;\n /** LITERAL disabled state. A `\"$service:…\"` string here fails `validate` (the wire type is\n * bool) — bind `disabledPath` instead. */\n disabled?: boolean;\n /** #3117 — `$service:`/`$item.` binding → a live bool that disables the button while true\n * (e.g. a submit while a request is in flight). Binding-aware. OR'd with `disabled`,\n * `loading` and an enclosing Form's validity: a bound `false` never re-enables a button one\n * of those disabled, and an unresolved binding leaves the literal in charge. */\n disabledPath?: string;\n /** Capability enrichments. */\n leadingIcon?: IconRef;\n trailingIcon?: IconRef;\n loading?: boolean;\n size?: \"sm\" | \"md\" | \"lg\";\n fullWidth?: boolean;\n iconOnly?: boolean;\n /** #1049 — corner radius; reshapes the button (overrides the forced pill). */\n cornerRadius?: number;\n /** #1049 — minimum height (pt/dp/px). */\n minHeight?: number;\n}"
132
+ "propsSource": "export interface ButtonProps {\n /** Destructive/cancel role independent of style; unknown values warn and behave as absent. */\n role?: string;\n /** Button label — binding-aware (\"$item.\"/\"$service:\") on web, iOS and Android. */\n title: string;\n action: Action;\n style?: string;\n /** LITERAL disabled state. A `\"$service:…\"` string here fails `validate` (the wire type is\n * bool) — bind `disabledPath` instead. */\n disabled?: boolean;\n /** #3117 — `$service:`/`$item.` binding → a live bool that disables the button while true\n * (e.g. a submit while a request is in flight). Binding-aware. OR'd with `disabled`,\n * `loading` and an enclosing Form's validity: a bound `false` never re-enables a button one\n * of those disabled, and an unresolved binding leaves the literal in charge. */\n disabledPath?: string;\n /** Capability enrichments. */\n leadingIcon?: IconRef;\n trailingIcon?: IconRef;\n loading?: boolean;\n size?: \"sm\" | \"md\" | \"lg\";\n fullWidth?: boolean;\n iconOnly?: boolean;\n /** #1049 — corner radius; reshapes the button (overrides the forced pill). */\n cornerRadius?: number;\n /** #1049 — minimum height (pt/dp/px). */\n minHeight?: number;\n}"
133
133
  },
134
134
  {
135
135
  "name": "TextField",
@@ -500,6 +500,8 @@ export interface IconProps {
500
500
 
501
501
  ```ts
502
502
  export interface ButtonProps {
503
+ /** Destructive/cancel role independent of style; unknown values warn and behave as absent. */
504
+ role?: string;
503
505
  /** Button label — binding-aware ("$item."/"$service:") on web, iOS and Android. */
504
506
  title: string;
505
507
  action: Action;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.1262.0",
3
+ "version": "0.1263.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": "a8e9ac447ebf6fa7dbaf60ff93254cb6ece0338789d32712f2436a06"
70
+ "falconPackageHash": "e96e0fc763f8bd6ab7d22fde5fa5200b516443ebc7e31cca08da2078"
71
71
  }