@wix/himalaya-cli 0.1135.0 → 0.1136.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 CHANGED
@@ -6762,6 +6762,7 @@ function walk(node, registry, path2, out2) {
6762
6762
  var SYSTEM_FONT_FAMILY, TONAL_ELEVATION_ALPHA;
6763
6763
  var init_tokens = __esm({
6764
6764
  "../../core/ts/src/tokens.ts"() {
6765
+ "use strict";
6765
6766
  SYSTEM_FONT_FAMILY = "$system";
6766
6767
  TONAL_ELEVATION_ALPHA = [0, 0.05, 0.08, 0.11, 0.12, 0.14];
6767
6768
  }
@@ -6788,6 +6789,7 @@ function resolveTranslation(value, catalog, sourceCatalog) {
6788
6789
  var BINDING_SIGILS, BINDING_SIGIL_RE, TRANSLATION_PREFIX, TRANSLATION_KEY_RE;
6789
6790
  var init_bindings = __esm({
6790
6791
  "../../core/ts/src/bindings.ts"() {
6792
+ "use strict";
6791
6793
  BINDING_SIGILS = ["service", "flag", "item", "t"];
6792
6794
  BINDING_SIGIL_RE = new RegExp(
6793
6795
  `^\\$(?:${BINDING_SIGILS.filter((s) => s !== "t").join("|")})\\b|^\\$t:`
@@ -31388,6 +31390,9 @@ function renderInner(node, ctx) {
31388
31390
  case "SplitView":
31389
31391
  return /* @__PURE__ */ jsx8(SplitViewNode, { props, ctx, wrap });
31390
31392
  case "Divider":
31393
+ if (ctx.rowDivider) {
31394
+ return /* @__PURE__ */ jsx8("div", { style: { width: 1, alignSelf: "stretch", flexShrink: 0, margin: "4px 0", background: C("border", "#e6edf3"), ...wrap } });
31395
+ }
31391
31396
  return /* @__PURE__ */ jsx8("div", { style: { height: 1, alignSelf: "stretch", width: "100%", background: C("border", "#e6edf3"), ...wrap } });
31392
31397
  case "Spacer": {
31393
31398
  if (props.collapseWhenEmpty === true) {
@@ -31796,7 +31801,7 @@ function renderInner(node, ctx) {
31796
31801
  }
31797
31802
  }
31798
31803
  }
31799
- var useIsomorphicLayoutEffect, ResponsiveGrid, SPLIT_EXPANDED_MIN_WIDTH, SPLIT_COLUMN_GAP, ResponsiveSplitView, ABSOLUTE_URL_RE, appearKeyframesInjected, pressStylesInjected, FOCUS_RING_CSS, focusStylesInjected, HLIST_CHILD_CSS, hListStylesInjected, listAnimateRuntimeInstalled, transitionKeyframesInjected, countUpRuntimeInjected, MEASURE_PREFIX, measureRuntimeInjected, revealRuntimeInjected, vectorAnimStylesInjected, scrollProgressRuntimeInjected, confettiRuntimeInjected, lottieRuntimeInjected, riveRuntimeInjected, gradientKeyframesInjected, parallaxRuntimeInjected, spinKeyframesInjected, marqueeKeyframesInjected, alignItems, zJustifyItems, hAlignItems, bodyFont, kids2, rowKids, staggeredKids, asTextL10n, asBoundText, useBoundString, InterpolatedTextView, txt, selectFragmentCase, fragmentValueHash, fragmentSlotContent, FragmentSlotNode, RichContentEditorNode, WorkerSubtreeNode, RichContentNode, resolveItemDeep2, resolveSwipeActions, resolveModBindings, resolvedComponentId, directServiceBindings, ReactiveDirectScalars, HiddenGate, KEYBOARD_INPUT_MODES, AUTOCAPITALIZE_VALUES, ENTER_KEY_HINTS, AUTOGROW_CEILING, EditableField, MenuNode, LoadMoreSentinel, FieldErrorNode, FormView, MediaSlotProvider, MEDIA_ITEM_BINDABLE, MediaPlayerView, VideoNode, PdfViewNode, WebViewNode, InteractivePicker, InteractiveDatePicker, InteractiveSearchField, InteractiveStepper, SYNTHETIC_TAP_ROLE, SYNTHETIC_TABINDEX, INFERRED_DECORATIVE, SELF_RENDERED_LEAF, ROLE_WHEN_NAMED, AUTHORED_ROLE, PENDING_RANGE, RANGE_ROLES, A11Y_PART, NODE_A11Y_ATTRS, INTERACTIVE_ROLES, ALWAYS_INTERACTIVE_COMPONENT_TYPES, controlNode, ToggleNode, SliderNode, SelectionControlNode, TabsNode, SegmentedControlNode, DisclosureGroupNode, GridNode, SplitViewNode, TextNode, ImageNode, ANIMATION_LEAF, LottieNode, RiveNode, AvatarNode, IconNode, ButtonNode, OtpInputNode, ProgressBarNode, ActivityIndicatorNode, NATIVELY_TABBABLE, BottomSheetNode, PRESENTED_OVERLAY_ATTR, PopoverNode, ChipsInputNode, ChipNode, TableNode, GaugeRing, GaugeNode, RATING_METRICS, ratingMetrics, RatingNode, AvatarStripNode, CHART_STROKE_CYCLE, chartStrokeAt, chartBarCenter, ChartNode, donutSliceOpacity, DonutChartNode, LegendMarker, LegendNode, cellAlign, DataTableNode, voiceNoteState, voiceNoteDelivery, VOICE_NOTE_DEFAULT_BARS, clampBarCount, VoiceNoteNode, TimelineNode, WheelPickerNode, ColorPickerNode, FilterChipsNode, TILE_PX, MAX_MERCATOR_LAT, DEFAULT_TILE_MAX_ZOOM, CIRCLE_SEGMENTS, METRES_PER_DEG_LAT, MARKER_HIT_RADIUS, SHAPE_HIT_RADIUS, MapNode, CollapsingHeaderNode, UnsupportedOnSurface, CALENDAR_DATE_ONLY_RE, CAL_DEFAULT_MAX_DOTS, CAL_AGENDA_INITIAL_DAYS, CAL_AGENDA_PAGE_DAYS, CAL_DEFAULT_SNAP_MINUTES, CAL_UNASSIGNED_LANE_ID, MonthCalendarNode, TimeGridNode, AgendaNode, ARIA_ROLE, initialFocusScheduled, PRESENTED_SCOPE, focusRoots, A11yHintDescription, WebRenderer;
31804
+ var useIsomorphicLayoutEffect, ResponsiveGrid, SPLIT_EXPANDED_MIN_WIDTH, SPLIT_COLUMN_GAP, ResponsiveSplitView, ABSOLUTE_URL_RE, appearKeyframesInjected, pressStylesInjected, FOCUS_RING_CSS, focusStylesInjected, HLIST_CHILD_CSS, hListStylesInjected, listAnimateRuntimeInstalled, transitionKeyframesInjected, countUpRuntimeInjected, MEASURE_PREFIX, measureRuntimeInjected, revealRuntimeInjected, vectorAnimStylesInjected, scrollProgressRuntimeInjected, confettiRuntimeInjected, lottieRuntimeInjected, riveRuntimeInjected, gradientKeyframesInjected, parallaxRuntimeInjected, spinKeyframesInjected, marqueeKeyframesInjected, alignItems, zJustifyItems, hAlignItems, bodyFont, kids2, rowKidCtx, rowKids, staggeredKids, asTextL10n, asBoundText, useBoundString, InterpolatedTextView, txt, selectFragmentCase, fragmentValueHash, fragmentSlotContent, FragmentSlotNode, RichContentEditorNode, WorkerSubtreeNode, RichContentNode, resolveItemDeep2, resolveSwipeActions, resolveModBindings, resolvedComponentId, directServiceBindings, ReactiveDirectScalars, HiddenGate, KEYBOARD_INPUT_MODES, AUTOCAPITALIZE_VALUES, ENTER_KEY_HINTS, AUTOGROW_CEILING, EditableField, MenuNode, LoadMoreSentinel, FieldErrorNode, FormView, MediaSlotProvider, MEDIA_ITEM_BINDABLE, MediaPlayerView, VideoNode, PdfViewNode, WebViewNode, InteractivePicker, InteractiveDatePicker, InteractiveSearchField, InteractiveStepper, SYNTHETIC_TAP_ROLE, SYNTHETIC_TABINDEX, INFERRED_DECORATIVE, SELF_RENDERED_LEAF, ROLE_WHEN_NAMED, AUTHORED_ROLE, PENDING_RANGE, RANGE_ROLES, A11Y_PART, NODE_A11Y_ATTRS, INTERACTIVE_ROLES, ALWAYS_INTERACTIVE_COMPONENT_TYPES, controlNode, ToggleNode, SliderNode, SelectionControlNode, TabsNode, SegmentedControlNode, DisclosureGroupNode, GridNode, SplitViewNode, TextNode, ImageNode, ANIMATION_LEAF, LottieNode, RiveNode, AvatarNode, IconNode, ButtonNode, OtpInputNode, ProgressBarNode, ActivityIndicatorNode, NATIVELY_TABBABLE, BottomSheetNode, PRESENTED_OVERLAY_ATTR, PopoverNode, ChipsInputNode, ChipNode, TableNode, GaugeRing, GaugeNode, RATING_METRICS, ratingMetrics, RatingNode, AvatarStripNode, CHART_STROKE_CYCLE, chartStrokeAt, chartBarCenter, ChartNode, donutSliceOpacity, DonutChartNode, LegendMarker, LegendNode, cellAlign, DataTableNode, voiceNoteState, voiceNoteDelivery, VOICE_NOTE_DEFAULT_BARS, clampBarCount, VoiceNoteNode, TimelineNode, WheelPickerNode, ColorPickerNode, FilterChipsNode, TILE_PX, MAX_MERCATOR_LAT, DEFAULT_TILE_MAX_ZOOM, CIRCLE_SEGMENTS, METRES_PER_DEG_LAT, MARKER_HIT_RADIUS, SHAPE_HIT_RADIUS, MapNode, CollapsingHeaderNode, UnsupportedOnSurface, CALENDAR_DATE_ONLY_RE, CAL_DEFAULT_MAX_DOTS, CAL_AGENDA_INITIAL_DAYS, CAL_AGENDA_PAGE_DAYS, CAL_DEFAULT_SNAP_MINUTES, CAL_UNASSIGNED_LANE_ID, MonthCalendarNode, TimeGridNode, AgendaNode, ARIA_ROLE, initialFocusScheduled, PRESENTED_SCOPE, focusRoots, A11yHintDescription, WebRenderer;
31800
31805
  var init_renderNode = __esm({
31801
31806
  "../../core/web-renderer/src/renderNode.tsx"() {
31802
31807
  "use strict";
@@ -31941,7 +31946,8 @@ var init_renderNode = __esm({
31941
31946
  };
31942
31947
  bodyFont = (ctx) => fontStack(ctx.font("body").family, ctx.idiom);
31943
31948
  kids2 = (arr, ctx) => Array.isArray(arr) ? arr.map((n, i) => /* @__PURE__ */ jsx8(React7.Fragment, { children: renderNode(n, ctx) }, n?.id ?? i)) : null;
31944
- rowKids = (arr, ctx) => Array.isArray(arr) ? arr.map((n, i) => /* @__PURE__ */ jsx8(React7.Fragment, { children: renderNode(n, wantsRowStretch(n) ? { ...ctx, rowStretch: true } : ctx) }, n?.id ?? i)) : null;
31949
+ rowKidCtx = (n, ctx) => wantsRowStretch(n) ? { ...ctx, rowStretch: true } : normalize(n).type === "Divider" ? { ...ctx, rowDivider: true } : ctx;
31950
+ rowKids = (arr, ctx) => Array.isArray(arr) ? arr.map((n, i) => /* @__PURE__ */ jsx8(React7.Fragment, { children: renderNode(n, rowKidCtx(n, ctx)) }, n?.id ?? i)) : null;
31945
31951
  staggeredKids = (arr, ctx, staggerMs) => Array.isArray(arr) ? arr.map((n, i) => {
31946
31952
  const el = renderNode(n, ctx);
31947
31953
  if (!React7.isValidElement(el)) return /* @__PURE__ */ jsx8(React7.Fragment, { children: el }, n?.id ?? i);
@@ -58155,21 +58161,21 @@ var init_preview_assets_generated = __esm({
58155
58161
  "../../packages/serve/src/preview-assets.generated.ts"() {
58156
58162
  init_preview_assets_format();
58157
58163
  PREVIEW_ASSET_MANIFEST = [
58158
- { key: "assets/index-B-1B15q7.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 1104811, sha256: "bd81d6b74d2a1b72072c1c20303e225dbc620861e50f66e5b7a90a6d64c66ed2" },
58159
- { key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset: 1104819, length: 4610, sha256: "994062dd7af4186a739de55dd9e151c63b6301f8e2cbafc608d35c2e87da0cd2" },
58160
- { key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset: 1109429, length: 488584, sha256: "d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134" },
58161
- { key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 1598013, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
58162
- { key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 1688937, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
58163
- { key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 1779921, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
58164
- { key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 1870901, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
58165
- { key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 1961773, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
58166
- { key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 2052753, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
58167
- { key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 2161389, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
58168
- { key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 2270473, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
58169
- { key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 2379521, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
58170
- { key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 2487221, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
58171
- { key: "index.html", contentType: "text/html; charset=utf-8", offset: 2575329, length: 4947, sha256: "e6135ff25467aef302a26590c7f740191c93ee3acc0abcfbd4f218780559ff9f" },
58172
- { key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 2580276, length: 17209, sha256: "dffc9718e2faa63ae2cc919e0a842f585ed565aaaa7c53778e90379442c731b6" }
58164
+ { key: "assets/index-YVoPQOFl.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 1105012, sha256: "40b489aee006a784e93cf93d75b92cdec7f4b90e185f72e3c31b482989e6b6b8" },
58165
+ { key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset: 1105020, length: 4610, sha256: "994062dd7af4186a739de55dd9e151c63b6301f8e2cbafc608d35c2e87da0cd2" },
58166
+ { key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset: 1109630, length: 488584, sha256: "d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134" },
58167
+ { key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 1598214, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
58168
+ { key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 1689138, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
58169
+ { key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 1780122, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
58170
+ { key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 1871102, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
58171
+ { key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 1961974, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
58172
+ { key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 2052954, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
58173
+ { key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 2161590, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
58174
+ { key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 2270674, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
58175
+ { key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 2379722, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
58176
+ { key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 2487422, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
58177
+ { key: "index.html", contentType: "text/html; charset=utf-8", offset: 2575530, length: 4947, sha256: "76370be356cffe5550b7214447ae46166c1854a8a617da0b2be8d562e52e7115" },
58178
+ { key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 2580477, length: 17209, sha256: "dffc9718e2faa63ae2cc919e0a842f585ed565aaaa7c53778e90379442c731b6" }
58173
58179
  ];
58174
58180
  }
58175
58181
  });
@@ -74091,7 +74097,7 @@ function serveUnreachableError(target, base, cause, plane = "serve") {
74091
74097
  function loopbackTargetWarning(base, explicitTarget) {
74092
74098
  if (explicitTarget) return null;
74093
74099
  if (!isLoopbackBase(base)) return null;
74094
- return `Published to the LOCAL dev serve (${base}). The default target is a local dev plane that only exists in a monorepo checkout, so this release is NOT on the bo.wix.com serve and its preview will 404. Off-repo, publish with \`--target bo\` (after \`himi login --dpx --target bo\`), or set HIMI_SERVE_TARGET=bo.`;
74100
+ return `Published to the LOCAL dev serve (${base}). The default target is a local dev plane that only exists in a monorepo checkout, so this release is NOT on the bo.wix.com serve and its preview will 404. Off-repo, publish with \`--target wix\` (after \`himi login --browser --target wix\`) \u2014 Wix employees can use \`--target bo\` (after \`himi login --dpx --target bo\`) \u2014 or set HIMI_SERVE_TARGET=wix.`;
74095
74101
  }
74096
74102
  function isLoopbackBase(base) {
74097
74103
  return /^https?:\/\/(127\.0\.0\.1|localhost|0\.0\.0\.0|\[::1\])(:|\/|$)/i.test(base);
Binary file
@@ -281,7 +281,7 @@ Concrete patterns lifted from real usage:
281
281
  - **Cell list** — `card([ vstack({ spacing: 0, alignment: "leading", children: [ …ListItem cells… ] }) ])`. `spacing: 0` because the cells own their own dividers/padding.
282
282
  - **Overlay** — `zstack({ alignment: "center", children: [ backdropImage(cornerRadius 12), withModifiers(label, { padding, background: { token: "accentPrimary" }, cornerRadius: 10 }) ] })`.
283
283
  - **Responsive** — `grid({ columns: 1, columnsMedium: 2, spacing: 12 })` for 1-up on phone / 2-up on tablet; `splitView({ primary, detail, primaryMaxWidth: 280 })` for master/detail that stacks on a phone; set `contentMaxWidth` in tokens so wide surfaces keep a readable column instead of running edge-to-edge.
284
- - **Centered separator, not a flanked divider** — the classic "—— or ——" needs each `divider()` to take equal remaining width, and the HStack row-share only kicks in for controls with an intrinsic fill. **Never put a bare `divider()` inside an HStack**: it is a horizontal rule on every surface, and on web and Android it claims the row's full width and squeezes its siblings (a stat row's `12` wraps to `1`/`2`); only iOS draws a thin vertical line. For a stats row, separate the columns with `spacer()`s or spacing instead. Use a **centered caption** instead: `hstack({ children: [spacer(), text("or continue with", "caption", { color: "textSecondary" }), spacer()] })`, optionally over a single full-width `divider()`.
284
+ - **Centered separator, not a flanked divider** — the classic "—— or ——" needs each `divider()` to take equal remaining width, and the HStack row-share only kicks in for controls with an intrinsic fill. **Never put a bare `divider()` inside an HStack for a row that must render on Android**: iOS and web draw it as a thin vertical rule the height of the row, but Android still draws a horizontal rule that claims the row's full width and squeezes its siblings (a stat row's `12` wraps to `1`/`2`). For a stats row, separate the columns with `spacer()`s or spacing instead. Use a **centered caption** instead: `hstack({ children: [spacer(), text("or continue with", "caption", { color: "textSecondary" }), spacer()] })`, optionally over a single full-width `divider()`.
285
285
 
286
286
  > **Intrinsic-fill controls grab the row.** `Button` and `TextField` have an intrinsic FILL, so the next four idioms are about NOT letting that surprise you (they were the papercuts every off-repo app hit):
287
287
 
@@ -43,7 +43,7 @@ State holds the **normalized rows** plus the display strings for every screen st
43
43
  Actions are `load` (kicked at boot) and `retry`; a `search` action filters in-worker.
44
44
 
45
45
  ```ts
46
- import { defineService } from "@himalaya/state";
46
+ import { defineService } from "@wix/himalaya/state";
47
47
 
48
48
  interface Row { // FLAT strings/booleans only — see "Normalize" below
49
49
  id: string; name: string; price: string; initial: string;
@@ -83,8 +83,8 @@ see [tier-5-add-a-screen.md](../tier-5-add-a-screen.md#cross-field-validation).
83
83
  ## 2. The worker: validate in `submit`, return the outcome as state
84
84
 
85
85
  ```ts
86
- import { defineService } from "@himalaya/state";
87
- import { createDraftPost, type WixDraftPostWrite } from "@himalaya/wix-blog";
86
+ import { defineService } from "@wix/himalaya/state";
87
+ import { createDraftPost, type WixDraftPostWrite } from "@wix/himalaya/wix-blog";
88
88
 
89
89
  interface FormState {
90
90
  title: string; body: string; // prefill values (edit mode / echo after save)
@@ -6,10 +6,10 @@ processing. A background build must declare `audio_record_background`; web and m
6
6
  foreground capture only.
7
7
 
8
8
  ```ts
9
- import { startSession, stopSession, listSegments } from "@himalaya/audio-record";
10
- import * as speech from "@himalaya/speech";
11
- import * as diarization from "@himalaya/speaker-diarization";
12
- import { upsert } from "@himalaya/local-db";
9
+ import { startSession, stopSession, listSegments } from "@wix/himalaya/audio-record";
10
+ import * as speech from "@wix/himalaya/speech";
11
+ import * as diarization from "@wix/himalaya/speaker-diarization";
12
+ import { upsert } from "@wix/himalaya/local-db";
13
13
 
14
14
  export async function beginVoiceJournal() {
15
15
  const session = await startSession({ mode: "foreground", chunkSeconds: 30 });
@@ -129,7 +129,17 @@ one object either way.
129
129
  > the two in step. Until that divergence list is empty, defensive reducers
130
130
  > (`String(p?.value ?? p?.text ?? "")`) remain the safe way to read a payload.
131
131
 
132
- So a text-input reducer is `setDraft: (s, { value }) => ({ ...s, draft: value })`, bound with `onChange: { actionId: "tier5.notes.setDraft" }`.
132
+ So a text-input reducer is `setDraft: (s, p) => ({ ...s, draft: String(p?.value ?? "") })`, bound with `onChange: { actionId: "tier5.notes.setDraft" }`.
133
+
134
+ **The payload argument can be absent.** A host calls the reducer with one merged object when
135
+ `params`/`args` carry anything, and with **no argument at all** when both are empty — so the
136
+ second parameter is `undefined`, not `{}`. A device always injects `{ value }` for the controls in
137
+ the table, but `himi test` does not always have a value to type: a field whose legal value it
138
+ cannot read off the app (a `Slider`, `Stepper`, `Toggle`, `DatePicker`, or a text field with no
139
+ seeded word to borrow) is dispatched **with no payload**, exactly as an argument-less button is.
140
+ Destructuring in the signature — `(s, { value }) => …` — then throws `Cannot destructure property
141
+ 'value' of 'undefined'`, and the crawl reports it against your reducer. Read through `p?.` (or
142
+ default the parameter, `(s, { value } = {}) => …`) and every reducer survives both callers.
133
143
 
134
144
  **Per-row actions carry `$item` fields.** In a bound list/grid, `$item.<field>` substitutes into an action's `params` per row — so a per-row delete is `action: { actionId: "tier5.notes.remove", params: { id: "$item.id" } }`, and the reducer reads `remove: (s, { id }) => …`. (`$item` also substitutes into any prop string, e.g. `text: "$item.title"`.)
135
145
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.1135.0",
3
+ "version": "0.1136.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": "708ea7531c66305a8eece0a6f7cffeefca465601cdfac12eb39a0f14"
70
+ "falconPackageHash": "0c3678539afa365f0de04b4c967184453cab4af35a8dffde750e6583"
71
71
  }