@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
@@ -73043,7 +73043,7 @@ const SCREENS = runtimeSetting({
73043
73043
  "package": "himalaya",
73044
73044
  "type": "FormField",
73045
73045
  "props": {
73046
- "id": "description",
73046
+ "id": "descriptionText",
73047
73047
  "label": "Description",
73048
73048
  "kind": "text",
73049
73049
  "text": {
@@ -73056,7 +73056,90 @@ const SCREENS = runtimeSetting({
73056
73056
  }
73057
73057
  },
73058
73058
  "modifiers": {
73059
- "hiddenPath": "$service:himiOwnerLiteProductForm.descriptionProtected"
73059
+ "hiddenPath": "$service:himiOwnerLiteProductForm.descriptionFieldHidden"
73060
+ }
73061
+ },
73062
+ {
73063
+ "id": "product_form.description_slot",
73064
+ "body": {
73065
+ "package": "himalaya",
73066
+ "type": "VStack",
73067
+ "props": {
73068
+ "spacing": 6,
73069
+ "alignment": "leading",
73070
+ "children": [
73071
+ {
73072
+ "id": "",
73073
+ "body": {
73074
+ "package": "himalaya",
73075
+ "type": "Text",
73076
+ "props": {
73077
+ "text": "Description",
73078
+ "style": "bodyEmphasis"
73079
+ }
73080
+ }
73081
+ },
73082
+ {
73083
+ "id": "product_description_editor",
73084
+ "body": {
73085
+ "package": "himalaya",
73086
+ "type": "RichContentEditor",
73087
+ "props": {
73088
+ "name": "description",
73089
+ "documentPath": "$service:himiOwnerLiteProductForm.descriptionJson",
73090
+ "placeholder": "Optional",
73091
+ "uploadService": "himiOwnerLiteProductFormUploads",
73092
+ "onChange": {
73093
+ "actionId": "tier5.himiOwnerLiteProductForm.descriptionChanged"
73094
+ },
73095
+ "minHeight": 200,
73096
+ "fallback": {
73097
+ "id": "product_form.description_unavailable",
73098
+ "body": {
73099
+ "package": "himalaya",
73100
+ "type": "VStack",
73101
+ "props": {
73102
+ "spacing": 4,
73103
+ "alignment": "leading",
73104
+ "children": [
73105
+ {
73106
+ "id": "",
73107
+ "body": {
73108
+ "package": "himalaya",
73109
+ "type": "Text",
73110
+ "props": {
73111
+ "text": "Editor unavailable",
73112
+ "style": "title3"
73113
+ }
73114
+ }
73115
+ },
73116
+ {
73117
+ "id": "",
73118
+ "body": {
73119
+ "package": "himalaya",
73120
+ "type": "Text",
73121
+ "props": {
73122
+ "text": "The description can’t be edited here right now. Name, price and SKU still save, and the description stays as it is.",
73123
+ "style": "footnote",
73124
+ "color": "textSecondary"
73125
+ }
73126
+ }
73127
+ }
73128
+ ]
73129
+ }
73130
+ }
73131
+ }
73132
+ }
73133
+ },
73134
+ "modifiers": {
73135
+ "hiddenPath": "$service:himiOwnerLiteProductForm.descriptionPending"
73136
+ }
73137
+ }
73138
+ ]
73139
+ }
73140
+ },
73141
+ "modifiers": {
73142
+ "hiddenPath": "$service:himiOwnerLiteProductForm.descriptionEditorHidden"
73060
73143
  }
73061
73144
  }
73062
73145
  ],
@@ -73325,7 +73408,7 @@ const SCREENS = runtimeSetting({
73325
73408
  "onChange": {
73326
73409
  "actionId": "tier5.himiOwnerLitePostForm.bodyChanged"
73327
73410
  },
73328
- "minHeight": 360,
73411
+ "minHeight": 240,
73329
73412
  "fallback": {
73330
73413
  "id": "post_form.body_unavailable",
73331
73414
  "body": {
@@ -73783,7 +73866,7 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
73783
73866
  "package": "himalaya",
73784
73867
  "type": "FormField",
73785
73868
  "props": {
73786
- "id": "description",
73869
+ "id": "descriptionText",
73787
73870
  "label": "Description",
73788
73871
  "kind": "text",
73789
73872
  "text": {
@@ -73796,7 +73879,90 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
73796
73879
  }
73797
73880
  },
73798
73881
  "modifiers": {
73799
- "hiddenPath": "$service:himiOwnerLiteProductForm.descriptionProtected"
73882
+ "hiddenPath": "$service:himiOwnerLiteProductForm.descriptionFieldHidden"
73883
+ }
73884
+ },
73885
+ {
73886
+ "id": "product_form.description_slot",
73887
+ "body": {
73888
+ "package": "himalaya",
73889
+ "type": "VStack",
73890
+ "props": {
73891
+ "spacing": 6,
73892
+ "alignment": "leading",
73893
+ "children": [
73894
+ {
73895
+ "id": "",
73896
+ "body": {
73897
+ "package": "himalaya",
73898
+ "type": "Text",
73899
+ "props": {
73900
+ "text": "Description",
73901
+ "style": "bodyEmphasis"
73902
+ }
73903
+ }
73904
+ },
73905
+ {
73906
+ "id": "product_description_editor",
73907
+ "body": {
73908
+ "package": "himalaya",
73909
+ "type": "RichContentEditor",
73910
+ "props": {
73911
+ "name": "description",
73912
+ "documentPath": "$service:himiOwnerLiteProductForm.descriptionJson",
73913
+ "placeholder": "Optional",
73914
+ "uploadService": "himiOwnerLiteProductFormUploads",
73915
+ "onChange": {
73916
+ "actionId": "tier5.himiOwnerLiteProductForm.descriptionChanged"
73917
+ },
73918
+ "minHeight": 200,
73919
+ "fallback": {
73920
+ "id": "product_form.description_unavailable",
73921
+ "body": {
73922
+ "package": "himalaya",
73923
+ "type": "VStack",
73924
+ "props": {
73925
+ "spacing": 4,
73926
+ "alignment": "leading",
73927
+ "children": [
73928
+ {
73929
+ "id": "",
73930
+ "body": {
73931
+ "package": "himalaya",
73932
+ "type": "Text",
73933
+ "props": {
73934
+ "text": "Editor unavailable",
73935
+ "style": "title3"
73936
+ }
73937
+ }
73938
+ },
73939
+ {
73940
+ "id": "",
73941
+ "body": {
73942
+ "package": "himalaya",
73943
+ "type": "Text",
73944
+ "props": {
73945
+ "text": "The description can’t be edited here right now. Name, price and SKU still save, and the description stays as it is.",
73946
+ "style": "footnote",
73947
+ "color": "textSecondary"
73948
+ }
73949
+ }
73950
+ }
73951
+ ]
73952
+ }
73953
+ }
73954
+ }
73955
+ }
73956
+ },
73957
+ "modifiers": {
73958
+ "hiddenPath": "$service:himiOwnerLiteProductForm.descriptionPending"
73959
+ }
73960
+ }
73961
+ ]
73962
+ }
73963
+ },
73964
+ "modifiers": {
73965
+ "hiddenPath": "$service:himiOwnerLiteProductForm.descriptionEditorHidden"
73800
73966
  }
73801
73967
  }
73802
73968
  ],
@@ -74056,7 +74222,7 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
74056
74222
  "package": "himalaya",
74057
74223
  "type": "FormField",
74058
74224
  "props": {
74059
- "id": "description",
74225
+ "id": "descriptionText",
74060
74226
  "label": "Description",
74061
74227
  "kind": "text",
74062
74228
  "text": {
@@ -74069,7 +74235,90 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
74069
74235
  }
74070
74236
  },
74071
74237
  "modifiers": {
74072
- "hiddenPath": "$service:himiOwnerLiteEventForm.descriptionProtected"
74238
+ "hiddenPath": "$service:himiOwnerLiteEventForm.descriptionFieldHidden"
74239
+ }
74240
+ },
74241
+ {
74242
+ "id": "event_form.description_slot",
74243
+ "body": {
74244
+ "package": "himalaya",
74245
+ "type": "VStack",
74246
+ "props": {
74247
+ "spacing": 6,
74248
+ "alignment": "leading",
74249
+ "children": [
74250
+ {
74251
+ "id": "",
74252
+ "body": {
74253
+ "package": "himalaya",
74254
+ "type": "Text",
74255
+ "props": {
74256
+ "text": "Description",
74257
+ "style": "bodyEmphasis"
74258
+ }
74259
+ }
74260
+ },
74261
+ {
74262
+ "id": "event_description_editor",
74263
+ "body": {
74264
+ "package": "himalaya",
74265
+ "type": "RichContentEditor",
74266
+ "props": {
74267
+ "name": "description",
74268
+ "documentPath": "$service:himiOwnerLiteEventForm.descriptionJson",
74269
+ "placeholder": "Optional",
74270
+ "uploadService": "himiOwnerLiteEventFormUploads",
74271
+ "onChange": {
74272
+ "actionId": "tier5.himiOwnerLiteEventForm.descriptionChanged"
74273
+ },
74274
+ "minHeight": 200,
74275
+ "fallback": {
74276
+ "id": "event_form.description_unavailable",
74277
+ "body": {
74278
+ "package": "himalaya",
74279
+ "type": "VStack",
74280
+ "props": {
74281
+ "spacing": 4,
74282
+ "alignment": "leading",
74283
+ "children": [
74284
+ {
74285
+ "id": "",
74286
+ "body": {
74287
+ "package": "himalaya",
74288
+ "type": "Text",
74289
+ "props": {
74290
+ "text": "Editor unavailable",
74291
+ "style": "title3"
74292
+ }
74293
+ }
74294
+ },
74295
+ {
74296
+ "id": "",
74297
+ "body": {
74298
+ "package": "himalaya",
74299
+ "type": "Text",
74300
+ "props": {
74301
+ "text": "The description can’t be edited here right now. The title still saves, and the description stays as it is.",
74302
+ "style": "footnote",
74303
+ "color": "textSecondary"
74304
+ }
74305
+ }
74306
+ }
74307
+ ]
74308
+ }
74309
+ }
74310
+ }
74311
+ }
74312
+ },
74313
+ "modifiers": {
74314
+ "hiddenPath": "$service:himiOwnerLiteEventForm.descriptionPending"
74315
+ }
74316
+ }
74317
+ ]
74318
+ }
74319
+ },
74320
+ "modifiers": {
74321
+ "hiddenPath": "$service:himiOwnerLiteEventForm.descriptionEditorHidden"
74073
74322
  }
74074
74323
  }
74075
74324
  ],
@@ -74342,7 +74591,7 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
74342
74591
  "onChange": {
74343
74592
  "actionId": "tier5.himiOwnerLitePostForm.bodyChanged"
74344
74593
  },
74345
- "minHeight": 360,
74594
+ "minHeight": 240,
74346
74595
  "fallback": {
74347
74596
  "id": "post_form.body_unavailable",
74348
74597
  "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 {