@wix/himalaya-cli 0.1172.0 → 0.1174.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 (68) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/stores-v1/src/extensions.d.ts +13 -3
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/stores-v1/src/products-v3.d.ts +13 -1
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-stores.mjs +10 -3
  4. package/dist/cli.mjs +38 -16
  5. package/dist/preview-assets.generated.bin +0 -0
  6. package/guides/sdk-reference.json +15 -3
  7. package/package.json +2 -2
  8. package/templates/beauty-salon-owner/dev/index.ts +172 -6
  9. package/templates/beauty-salon-owner/tier5-src/_shared/owner-editor-value.ts +71 -5
  10. package/templates/beauty-salon-owner/tier5-src/_shared/owner-rich-guard.ts +1 -9
  11. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-post-form/index.ts +17 -42
  12. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-product-form/index.ts +130 -27
  13. package/templates/community-club-owner/dev/index.ts +257 -8
  14. package/templates/community-club-owner/tier5-src/_shared/owner-editor-value.ts +71 -5
  15. package/templates/community-club-owner/tier5-src/_shared/owner-rich-guard.ts +1 -9
  16. package/templates/community-club-owner/tier5-src/himi-owner-lite-event-form/index.ts +117 -51
  17. package/templates/community-club-owner/tier5-src/himi-owner-lite-post-form/index.ts +17 -42
  18. package/templates/community-club-owner/tier5-src/himi-owner-lite-product-form/index.ts +130 -27
  19. package/templates/events-meetups-owner/dev/index.ts +87 -4
  20. package/templates/events-meetups-owner/tier5-src/_shared/owner-editor-value.ts +71 -5
  21. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-event-form/index.ts +117 -51
  22. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-post-form/index.ts +17 -42
  23. package/templates/gym-fitness-owner/dev/index.ts +257 -8
  24. package/templates/gym-fitness-owner/tier5-src/_shared/owner-editor-value.ts +71 -5
  25. package/templates/gym-fitness-owner/tier5-src/_shared/owner-rich-guard.ts +1 -9
  26. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-event-form/index.ts +117 -51
  27. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-post-form/index.ts +17 -42
  28. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-product-form/index.ts +130 -27
  29. package/templates/nonprofit-cause-owner/dev/index.ts +87 -4
  30. package/templates/nonprofit-cause-owner/tier5-src/_shared/owner-editor-value.ts +71 -5
  31. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-event-form/index.ts +117 -51
  32. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-post-form/index.ts +17 -42
  33. package/templates/owner-lite/dev/index.ts +512 -17
  34. package/templates/owner-lite/tier5-src/_shared/owner-editor-value.ts +71 -5
  35. package/templates/owner-lite/tier5-src/_shared/owner-rich-guard.ts +1 -9
  36. package/templates/owner-lite/tier5-src/himi-owner-lite-event-form/index.ts +117 -51
  37. package/templates/owner-lite/tier5-src/himi-owner-lite-faq-question-form/index.ts +77 -10
  38. package/templates/owner-lite/tier5-src/himi-owner-lite-post-form/index.ts +17 -42
  39. package/templates/owner-lite/tier5-src/himi-owner-lite-product-form/index.ts +130 -27
  40. package/templates/podcast-creator-owner/dev/index.ts +257 -8
  41. package/templates/podcast-creator-owner/tier5-src/_shared/owner-editor-value.ts +71 -5
  42. package/templates/podcast-creator-owner/tier5-src/_shared/owner-rich-guard.ts +1 -9
  43. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-event-form/index.ts +117 -51
  44. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-post-form/index.ts +17 -42
  45. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-product-form/index.ts +130 -27
  46. package/templates/portfolio-creative-owner/dev/index.ts +172 -6
  47. package/templates/portfolio-creative-owner/tier5-src/_shared/owner-editor-value.ts +71 -5
  48. package/templates/portfolio-creative-owner/tier5-src/_shared/owner-rich-guard.ts +1 -9
  49. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-post-form/index.ts +17 -42
  50. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-product-form/index.ts +130 -27
  51. package/templates/restaurant-owner/dev/index.ts +257 -8
  52. package/templates/restaurant-owner/tier5-src/_shared/owner-editor-value.ts +71 -5
  53. package/templates/restaurant-owner/tier5-src/_shared/owner-rich-guard.ts +1 -9
  54. package/templates/restaurant-owner/tier5-src/himi-owner-lite-event-form/index.ts +117 -51
  55. package/templates/restaurant-owner/tier5-src/himi-owner-lite-post-form/index.ts +17 -42
  56. package/templates/restaurant-owner/tier5-src/himi-owner-lite-product-form/index.ts +130 -27
  57. package/templates/retail-store-owner/dev/index.ts +172 -6
  58. package/templates/retail-store-owner/tier5-src/_shared/owner-editor-value.ts +71 -5
  59. package/templates/retail-store-owner/tier5-src/_shared/owner-rich-guard.ts +1 -9
  60. package/templates/retail-store-owner/tier5-src/himi-owner-lite-post-form/index.ts +17 -42
  61. package/templates/retail-store-owner/tier5-src/himi-owner-lite-product-form/index.ts +130 -27
  62. package/templates/yoga-studio-owner/dev/index.ts +87 -4
  63. package/templates/yoga-studio-owner/tier5-src/_shared/owner-editor-value.ts +71 -5
  64. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-event-form/index.ts +117 -51
  65. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-post-form/index.ts +17 -42
  66. package/templates/events-meetups-owner/tier5-src/_shared/owner-rich-guard.ts +0 -35
  67. package/templates/nonprofit-cause-owner/tier5-src/_shared/owner-rich-guard.ts +0 -35
  68. package/templates/yoga-studio-owner/tier5-src/_shared/owner-rich-guard.ts +0 -35
@@ -76635,7 +76635,7 @@ const SCREENS = runtimeSetting({
76635
76635
  "package": "himalaya",
76636
76636
  "type": "FormField",
76637
76637
  "props": {
76638
- "id": "description",
76638
+ "id": "descriptionText",
76639
76639
  "label": "Description",
76640
76640
  "kind": "text",
76641
76641
  "text": {
@@ -76648,7 +76648,90 @@ const SCREENS = runtimeSetting({
76648
76648
  }
76649
76649
  },
76650
76650
  "modifiers": {
76651
- "hiddenPath": "$service:himiOwnerLiteProductForm.descriptionProtected"
76651
+ "hiddenPath": "$service:himiOwnerLiteProductForm.descriptionFieldHidden"
76652
+ }
76653
+ },
76654
+ {
76655
+ "id": "product_form.description_slot",
76656
+ "body": {
76657
+ "package": "himalaya",
76658
+ "type": "VStack",
76659
+ "props": {
76660
+ "spacing": 6,
76661
+ "alignment": "leading",
76662
+ "children": [
76663
+ {
76664
+ "id": "",
76665
+ "body": {
76666
+ "package": "himalaya",
76667
+ "type": "Text",
76668
+ "props": {
76669
+ "text": "Description",
76670
+ "style": "bodyEmphasis"
76671
+ }
76672
+ }
76673
+ },
76674
+ {
76675
+ "id": "product_description_editor",
76676
+ "body": {
76677
+ "package": "himalaya",
76678
+ "type": "RichContentEditor",
76679
+ "props": {
76680
+ "name": "description",
76681
+ "documentPath": "$service:himiOwnerLiteProductForm.descriptionJson",
76682
+ "placeholder": "Ingredients, allergens, how it’s served",
76683
+ "uploadService": "himiOwnerLiteProductFormUploads",
76684
+ "onChange": {
76685
+ "actionId": "tier5.himiOwnerLiteProductForm.descriptionChanged"
76686
+ },
76687
+ "minHeight": 200,
76688
+ "fallback": {
76689
+ "id": "product_form.description_unavailable",
76690
+ "body": {
76691
+ "package": "himalaya",
76692
+ "type": "VStack",
76693
+ "props": {
76694
+ "spacing": 4,
76695
+ "alignment": "leading",
76696
+ "children": [
76697
+ {
76698
+ "id": "",
76699
+ "body": {
76700
+ "package": "himalaya",
76701
+ "type": "Text",
76702
+ "props": {
76703
+ "text": "Editor unavailable",
76704
+ "style": "title3"
76705
+ }
76706
+ }
76707
+ },
76708
+ {
76709
+ "id": "",
76710
+ "body": {
76711
+ "package": "himalaya",
76712
+ "type": "Text",
76713
+ "props": {
76714
+ "text": "The description can’t be edited here right now. Name, price and SKU still save, and the description stays as it is.",
76715
+ "style": "footnote",
76716
+ "color": "textSecondary"
76717
+ }
76718
+ }
76719
+ }
76720
+ ]
76721
+ }
76722
+ }
76723
+ }
76724
+ }
76725
+ },
76726
+ "modifiers": {
76727
+ "hiddenPath": "$service:himiOwnerLiteProductForm.descriptionPending"
76728
+ }
76729
+ }
76730
+ ]
76731
+ }
76732
+ },
76733
+ "modifiers": {
76734
+ "hiddenPath": "$service:himiOwnerLiteProductForm.descriptionEditorHidden"
76652
76735
  }
76653
76736
  }
76654
76737
  ],
@@ -76918,7 +77001,7 @@ const SCREENS = runtimeSetting({
76918
77001
  "onChange": {
76919
77002
  "actionId": "tier5.himiOwnerLitePostForm.bodyChanged"
76920
77003
  },
76921
- "minHeight": 360,
77004
+ "minHeight": 240,
76922
77005
  "fallback": {
76923
77006
  "id": "post_form.body_unavailable",
76924
77007
  "body": {
@@ -77375,7 +77458,7 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
77375
77458
  "package": "himalaya",
77376
77459
  "type": "FormField",
77377
77460
  "props": {
77378
- "id": "description",
77461
+ "id": "descriptionText",
77379
77462
  "label": "Description",
77380
77463
  "kind": "text",
77381
77464
  "text": {
@@ -77388,7 +77471,90 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
77388
77471
  }
77389
77472
  },
77390
77473
  "modifiers": {
77391
- "hiddenPath": "$service:himiOwnerLiteProductForm.descriptionProtected"
77474
+ "hiddenPath": "$service:himiOwnerLiteProductForm.descriptionFieldHidden"
77475
+ }
77476
+ },
77477
+ {
77478
+ "id": "product_form.description_slot",
77479
+ "body": {
77480
+ "package": "himalaya",
77481
+ "type": "VStack",
77482
+ "props": {
77483
+ "spacing": 6,
77484
+ "alignment": "leading",
77485
+ "children": [
77486
+ {
77487
+ "id": "",
77488
+ "body": {
77489
+ "package": "himalaya",
77490
+ "type": "Text",
77491
+ "props": {
77492
+ "text": "Description",
77493
+ "style": "bodyEmphasis"
77494
+ }
77495
+ }
77496
+ },
77497
+ {
77498
+ "id": "product_description_editor",
77499
+ "body": {
77500
+ "package": "himalaya",
77501
+ "type": "RichContentEditor",
77502
+ "props": {
77503
+ "name": "description",
77504
+ "documentPath": "$service:himiOwnerLiteProductForm.descriptionJson",
77505
+ "placeholder": "Ingredients, allergens, how it’s served",
77506
+ "uploadService": "himiOwnerLiteProductFormUploads",
77507
+ "onChange": {
77508
+ "actionId": "tier5.himiOwnerLiteProductForm.descriptionChanged"
77509
+ },
77510
+ "minHeight": 200,
77511
+ "fallback": {
77512
+ "id": "product_form.description_unavailable",
77513
+ "body": {
77514
+ "package": "himalaya",
77515
+ "type": "VStack",
77516
+ "props": {
77517
+ "spacing": 4,
77518
+ "alignment": "leading",
77519
+ "children": [
77520
+ {
77521
+ "id": "",
77522
+ "body": {
77523
+ "package": "himalaya",
77524
+ "type": "Text",
77525
+ "props": {
77526
+ "text": "Editor unavailable",
77527
+ "style": "title3"
77528
+ }
77529
+ }
77530
+ },
77531
+ {
77532
+ "id": "",
77533
+ "body": {
77534
+ "package": "himalaya",
77535
+ "type": "Text",
77536
+ "props": {
77537
+ "text": "The description can’t be edited here right now. Name, price and SKU still save, and the description stays as it is.",
77538
+ "style": "footnote",
77539
+ "color": "textSecondary"
77540
+ }
77541
+ }
77542
+ }
77543
+ ]
77544
+ }
77545
+ }
77546
+ }
77547
+ }
77548
+ },
77549
+ "modifiers": {
77550
+ "hiddenPath": "$service:himiOwnerLiteProductForm.descriptionPending"
77551
+ }
77552
+ }
77553
+ ]
77554
+ }
77555
+ },
77556
+ "modifiers": {
77557
+ "hiddenPath": "$service:himiOwnerLiteProductForm.descriptionEditorHidden"
77392
77558
  }
77393
77559
  }
77394
77560
  ],
@@ -77890,7 +78056,7 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
77890
78056
  "package": "himalaya",
77891
78057
  "type": "FormField",
77892
78058
  "props": {
77893
- "id": "description",
78059
+ "id": "descriptionText",
77894
78060
  "label": "Description",
77895
78061
  "kind": "text",
77896
78062
  "text": {
@@ -77903,7 +78069,90 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
77903
78069
  }
77904
78070
  },
77905
78071
  "modifiers": {
77906
- "hiddenPath": "$service:himiOwnerLiteEventForm.descriptionProtected"
78072
+ "hiddenPath": "$service:himiOwnerLiteEventForm.descriptionFieldHidden"
78073
+ }
78074
+ },
78075
+ {
78076
+ "id": "event_form.description_slot",
78077
+ "body": {
78078
+ "package": "himalaya",
78079
+ "type": "VStack",
78080
+ "props": {
78081
+ "spacing": 6,
78082
+ "alignment": "leading",
78083
+ "children": [
78084
+ {
78085
+ "id": "",
78086
+ "body": {
78087
+ "package": "himalaya",
78088
+ "type": "Text",
78089
+ "props": {
78090
+ "text": "Description",
78091
+ "style": "bodyEmphasis"
78092
+ }
78093
+ }
78094
+ },
78095
+ {
78096
+ "id": "event_description_editor",
78097
+ "body": {
78098
+ "package": "himalaya",
78099
+ "type": "RichContentEditor",
78100
+ "props": {
78101
+ "name": "description",
78102
+ "documentPath": "$service:himiOwnerLiteEventForm.descriptionJson",
78103
+ "placeholder": "Optional",
78104
+ "uploadService": "himiOwnerLiteEventFormUploads",
78105
+ "onChange": {
78106
+ "actionId": "tier5.himiOwnerLiteEventForm.descriptionChanged"
78107
+ },
78108
+ "minHeight": 200,
78109
+ "fallback": {
78110
+ "id": "event_form.description_unavailable",
78111
+ "body": {
78112
+ "package": "himalaya",
78113
+ "type": "VStack",
78114
+ "props": {
78115
+ "spacing": 4,
78116
+ "alignment": "leading",
78117
+ "children": [
78118
+ {
78119
+ "id": "",
78120
+ "body": {
78121
+ "package": "himalaya",
78122
+ "type": "Text",
78123
+ "props": {
78124
+ "text": "Editor unavailable",
78125
+ "style": "title3"
78126
+ }
78127
+ }
78128
+ },
78129
+ {
78130
+ "id": "",
78131
+ "body": {
78132
+ "package": "himalaya",
78133
+ "type": "Text",
78134
+ "props": {
78135
+ "text": "The description can’t be edited here right now. The title still saves, and the description stays as it is.",
78136
+ "style": "footnote",
78137
+ "color": "textSecondary"
78138
+ }
78139
+ }
78140
+ }
78141
+ ]
78142
+ }
78143
+ }
78144
+ }
78145
+ }
78146
+ },
78147
+ "modifiers": {
78148
+ "hiddenPath": "$service:himiOwnerLiteEventForm.descriptionPending"
78149
+ }
78150
+ }
78151
+ ]
78152
+ }
78153
+ },
78154
+ "modifiers": {
78155
+ "hiddenPath": "$service:himiOwnerLiteEventForm.descriptionEditorHidden"
77907
78156
  }
77908
78157
  }
77909
78158
  ],
@@ -78176,7 +78425,7 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
78176
78425
  "onChange": {
78177
78426
  "actionId": "tier5.himiOwnerLitePostForm.bodyChanged"
78178
78427
  },
78179
- "minHeight": 360,
78428
+ "minHeight": 240,
78180
78429
  "fallback": {
78181
78430
  "id": "post_form.body_unavailable",
78182
78431
  "body": {
@@ -8,7 +8,7 @@
8
8
  // drops nodes the owner never touched).
9
9
  // Inside the platform source this import is a relative path, so node test runs resolve it; an app's
10
10
  // copy imports "@himalaya/wix-rich-content".
11
- import { parseRicosJson, RICH_CONTENT_LIMITS, type RicosDocument } from "@himalaya/wix-rich-content";
11
+ import { parseRicosJson, isPlainRicos, RICH_CONTENT_LIMITS, type RicosDocument } from "@himalaya/wix-rich-content";
12
12
 
13
13
  export type EditorValue =
14
14
  | { kind: "absent" } // leave the stored body untouched
@@ -45,12 +45,78 @@ function overLimits(doc: RicosDocument): boolean {
45
45
  return false;
46
46
  }
47
47
 
48
- /** `raw` is `values[name]`; `seededJson` is the string the form published as the editor's seed. */
49
- export function editorValue(raw: unknown, seededJson: string): EditorValue {
50
- if (typeof raw !== "string" || raw === "") return { kind: "absent" };
51
- if (seededJson !== "" && raw === seededJson) return { kind: "unchanged" };
48
+ const TEXT_ONLY = new Set(["PARAGRAPH", "TEXT", "HEADING", "BULLETED_LIST", "ORDERED_LIST", "LIST_ITEM", "BLOCKQUOTE", "CODE_BLOCK"]);
49
+ /** No visible text and no non-text node (an image, a divider, an embed…): an empty body. */
50
+ export function isEmptyDocument(doc: RicosDocument): boolean {
51
+ const empty = (nodes: RicosDocument["nodes"] | undefined): boolean => (nodes ?? []).every((n) =>
52
+ TEXT_ONLY.has(String(n?.type)) && !String(n.textData?.text ?? "").trim() && empty(n.nodes));
53
+ return empty(doc.nodes);
54
+ }
55
+
56
+ /** A Ricos JSON string checked as every viewer would: the limits first, then the shape. */
57
+ function checkedDocument(raw: string): EditorValue {
52
58
  if (utf8Bytes(raw) > RICH_CONTENT_LIMITS.maxBytes) return { kind: "too_large" };
53
59
  const doc = parseRicosJson(raw);
54
60
  if (!doc) return { kind: "invalid" };
55
61
  return overLimits(doc) ? { kind: "too_large" } : { kind: "doc", doc, json: raw };
56
62
  }
63
+
64
+ /** `raw` is `values[name]`; `seededJson` is the string the form published as the editor's seed. */
65
+ export function editorValue(raw: unknown, seededJson: string): EditorValue {
66
+ if (typeof raw !== "string" || raw === "") return { kind: "absent" };
67
+ if (seededJson !== "" && raw === seededJson) return { kind: "unchanged" };
68
+ const checked = checkedDocument(raw);
69
+ // An empty editor over no body (a record that had none) writes nothing, rather than an empty document.
70
+ if (checked.kind === "doc" && seededJson === "" && isEmptyDocument(checked.doc)) return { kind: "unchanged" };
71
+ return checked;
72
+ }
73
+
74
+ // ── The per-field editor machinery every owner form shares (post body, event / product description,
75
+ // FAQ answer). Each form keeps `<key>Json` (the seed), `<key>Pending` and `<key>Dirty` in its state.
76
+
77
+ /** `<key>Pending`: until this run's load lands, the descriptor hides the editor — it seeds ONCE, so a
78
+ * provisional editor the owner typed into would keep that text over the real document.
79
+ * `<key>Dirty`: the editor's on_change fired since the field was loaded or saved. Once ready the bag
80
+ * ALWAYS holds a document — the engine's own re-serialization of the seed, not byte-equal to it — so
81
+ * only this says the owner edited the field. Every arm fires a pending on_change before it releases a
82
+ * Form submit, so an edit made inside the debounce window is reported before the submit reads it. */
83
+ export interface EditorGate { pending: boolean; dirty: boolean }
84
+
85
+ /** What a live submit does with `values[name]`: only an edit the editor reported counts. */
86
+ export function editorSubmitValue(raw: unknown, seededJson: string, gate: EditorGate): EditorValue {
87
+ return gate.pending || !gate.dirty ? { kind: "absent" } : editorValue(raw, seededJson);
88
+ }
89
+
90
+ /** A queued write's document. A replay runs in a FRESH worker with no editor, so the string is checked
91
+ * again (shape and limits); "absent" when the item carries none. Never "unchanged": it was an edit. */
92
+ export function queuedDocument(raw: unknown): EditorValue {
93
+ return typeof raw === "string" && raw !== "" ? checkedDocument(raw) : { kind: "absent" };
94
+ }
95
+
96
+ /** The editor's on_change: the field is now edited, and a confirmation of an earlier save is stale.
97
+ * No timing window: an arm fires the pending on_change BEFORE it releases a submit, so any on_change
98
+ * that arrives after a save carries an edit that save did not write. */
99
+ export function editorChanged<S extends { status: string; savedMessage: string }>(s: S): Pick<S, "status" | "savedMessage"> {
100
+ return { status: s.status === "saved" ? "idle" : s.status, savedMessage: "" };
101
+ }
102
+
103
+ /** The offline cache's verdict on the stored body (`<key>Protected`): rich unless KNOWN plain. From the
104
+ * document when the form knows it; otherwise plain only when the record was loaded as plain. A bundle
105
+ * rolled back past the editor reads this flag to decide whether its plain field may overwrite the body. */
106
+ export function cachedRichVerdict(doc: RicosDocument | null, knownPlain: boolean): "true" | "false" {
107
+ if (doc) return isPlainRicos(doc) ? "false" : "true";
108
+ return knownPlain ? "false" : "true";
109
+ }
110
+
111
+ /** Cold boot: the runtime lays this service's last persisted snapshot over its declared state, so the
112
+ * editor's first seed would be the document as it was when the screen last ran — and a Save after
113
+ * typing would write it over whatever the record holds now. Blank the hydrated seed and reset the gate
114
+ * before anything renders, in place (no action has run yet). `extra` resets further UI state. */
115
+ export function resetHydratedEditor(svc: unknown, keys: { json: string; pending: string; dirty: string }, pendingAtBoot: boolean, extra: Record<string, unknown> = {}): void {
116
+ const booted = (svc as { getState?: () => Record<string, unknown> | undefined }).getState?.();
117
+ if (!booted || typeof booted !== "object") return;
118
+ if (booted[keys.json]) booted[keys.json] = "";
119
+ booted[keys.pending] = pendingAtBoot;
120
+ booted[keys.dirty] = false;
121
+ Object.assign(booted, extra);
122
+ }
@@ -2,7 +2,7 @@
2
2
  // this file adds the read-only previews the forms show for a locked body, and the FAQ's legacy DraftJS answer.
3
3
  // Inside the platform source this import is a relative path, so node test runs resolve it; an app's copy
4
4
  // imports "@himalaya/wix-rich-content".
5
- import { htmlIsTrivial, isPlainRicos } from "@himalaya/wix-rich-content";
5
+ import { htmlIsTrivial } from "@himalaya/wix-rich-content";
6
6
 
7
7
  export { htmlIsTrivial };
8
8
 
@@ -16,14 +16,6 @@ export function htmlPreviewText(html: string | null | undefined): string {
16
16
  .split("\n").map((l) => l.replace(/\s+/g, " ").trim()).filter(Boolean).join("\n");
17
17
  }
18
18
 
19
- /** True when a plain text field can round-trip this Ricos document: no document styling, and
20
- * only paragraphs of undecorated text whose paragraph data is the wire default (Events v3 sends
21
- * `{ textStyle: { textAlignment: "AUTO" }, indentation: 0 }` on every paragraph). Anything else —
22
- * a heading, list, link, bold run, media node, alignment or indent — is rich, and so is a missing
23
- * document (callers decide what an absent body means). */
24
- export const ricosIsPlain = (doc: { nodes?: unknown; documentStyle?: unknown } | null | undefined): boolean =>
25
- !!doc && isPlainRicos(doc);
26
-
27
19
  /** Preview text for a legacy DraftJS document: its `blocks[].text` joined by a blank line, or ""
28
20
  * when the payload is not DraftJS JSON (never a throw). */
29
21
  export function draftjsText(raw: string | null | undefined): string {