@wix/himalaya-cli 0.1569.0 → 0.1571.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 (159) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/l10n-strings.d.ts +3 -2
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/define-app.d.ts +8 -0
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/auth-providers/wix/src/index.d.ts +7 -0
  4. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/screens/src/business-contact-service.d.ts +17 -0
  5. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/screens/src/business-contact.d.ts +73 -0
  6. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/screens/src/index.d.ts +3 -0
  7. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/screens/src/invite-target.d.ts +1 -0
  8. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/screens/src/invite.d.ts +148 -0
  9. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/blog-v3/src/extensions.d.ts +6 -3
  10. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/auth.mjs +17 -7
  11. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core/validation.mjs +17 -7
  12. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +17 -7
  13. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/screens.mjs +575 -91
  14. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/state.mjs +17 -7
  15. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-auth.mjs +7 -1
  16. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-blog.mjs +1 -0
  17. package/dist/cli.mjs +1897 -1226
  18. package/dist/preview-assets.generated.bin +0 -0
  19. package/guides/base44-app-to-himi-app.md +1 -1
  20. package/guides/capabilities.md +7 -0
  21. package/guides/getting-started.md +5 -0
  22. package/guides/himi-json-output.md +11 -0
  23. package/guides/himi-skill.md +5 -0
  24. package/guides/one-app-to-himi-app.md +267 -8
  25. package/guides/sdk-reference.json +2 -2
  26. package/guides/skill.md +5 -0
  27. package/guides/splash-screens.md +10 -1
  28. package/guides/tier-5-add-a-screen.md +20 -0
  29. package/guides/trim-a-template.md +5 -0
  30. package/guides/wix-business-context.md +11 -2
  31. package/package.json +2 -2
  32. package/templates/beauty-salon/config.ts +8 -1
  33. package/templates/beauty-salon/dev/index.ts +244 -1
  34. package/templates/beauty-salon/himalaya.content.json +3 -0
  35. package/templates/beauty-salon/tier5-src/_shared/member-read.ts +52 -0
  36. package/templates/beauty-salon/tier5-src/_shared/program-description.ts +11 -0
  37. package/templates/beauty-salon/tier5-src/business-contact/index.ts +6 -0
  38. package/templates/beauty-salon/tier5-src/himi-blog-post/index.ts +35 -12
  39. package/templates/beauty-salon/tier5-src/himi-branded-lite-home/index.ts +3 -3
  40. package/templates/beauty-salon/tier5-src/himi-store-product/index.ts +6 -9
  41. package/templates/beauty-salon-owner/config.ts +1 -1
  42. package/templates/branded-lite/config.ts +8 -1
  43. package/templates/branded-lite/dev/index.ts +409 -2
  44. package/templates/branded-lite/himalaya.content.json +3 -0
  45. package/templates/branded-lite/tier5-src/_shared/member-read.ts +52 -0
  46. package/templates/branded-lite/tier5-src/_shared/program-description.ts +11 -0
  47. package/templates/branded-lite/tier5-src/business-contact/index.ts +6 -0
  48. package/templates/branded-lite/tier5-src/himi-blog-post/index.ts +35 -12
  49. package/templates/branded-lite/tier5-src/himi-branded-lite-home/index.ts +3 -3
  50. package/templates/branded-lite/tier5-src/himi-branded-lite-notifsettings/index.ts +39 -11
  51. package/templates/branded-lite/tier5-src/himi-branded-lite-program/index.ts +16 -14
  52. package/templates/branded-lite/tier5-src/himi-branded-lite-programs/index.ts +3 -7
  53. package/templates/branded-lite/tier5-src/himi-events-my-events/index.ts +76 -42
  54. package/templates/branded-lite/tier5-src/himi-store-product/index.ts +6 -9
  55. package/templates/branded-lite/tier5-src/wix-spaces-chat-thread/index.ts +101 -34
  56. package/templates/branded-lite/tier5-src/wix-spaces-forum-post/index.ts +23 -6
  57. package/templates/branded-lite/tier5-src/wix-spaces-member-detail/index.ts +26 -11
  58. package/templates/community-club/config.ts +8 -1
  59. package/templates/community-club/dev/index.ts +278 -2
  60. package/templates/community-club/himalaya.content.json +3 -0
  61. package/templates/community-club/tier5-src/_shared/branded-load-state.ts +106 -0
  62. package/templates/community-club/tier5-src/_shared/member-read.ts +52 -0
  63. package/templates/community-club/tier5-src/_shared/program-description.ts +11 -0
  64. package/templates/community-club/tier5-src/business-contact/index.ts +6 -0
  65. package/templates/community-club/tier5-src/himi-blog-post/index.ts +35 -12
  66. package/templates/community-club/tier5-src/himi-branded-lite-home/index.ts +3 -3
  67. package/templates/community-club/tier5-src/himi-events-my-events/index.ts +76 -42
  68. package/templates/community-club-owner/config.ts +1 -1
  69. package/templates/events-meetups/config.ts +8 -1
  70. package/templates/events-meetups/dev/index.ts +278 -2
  71. package/templates/events-meetups/himalaya.content.json +3 -0
  72. package/templates/events-meetups/tier5-src/_shared/branded-load-state.ts +106 -0
  73. package/templates/events-meetups/tier5-src/_shared/member-read.ts +52 -0
  74. package/templates/events-meetups/tier5-src/_shared/program-description.ts +11 -0
  75. package/templates/events-meetups/tier5-src/business-contact/index.ts +6 -0
  76. package/templates/events-meetups/tier5-src/himi-blog-post/index.ts +35 -12
  77. package/templates/events-meetups/tier5-src/himi-branded-lite-home/index.ts +3 -3
  78. package/templates/events-meetups/tier5-src/himi-events-my-events/index.ts +76 -42
  79. package/templates/events-meetups-owner/config.ts +1 -1
  80. package/templates/gym-fitness/config.ts +8 -1
  81. package/templates/gym-fitness/dev/index.ts +278 -2
  82. package/templates/gym-fitness/himalaya.content.json +3 -0
  83. package/templates/gym-fitness/tier5-src/_shared/member-read.ts +52 -0
  84. package/templates/gym-fitness/tier5-src/_shared/program-description.ts +11 -0
  85. package/templates/gym-fitness/tier5-src/business-contact/index.ts +6 -0
  86. package/templates/gym-fitness/tier5-src/himi-blog-post/index.ts +35 -12
  87. package/templates/gym-fitness/tier5-src/himi-branded-lite-home/index.ts +3 -3
  88. package/templates/gym-fitness/tier5-src/himi-events-my-events/index.ts +76 -42
  89. package/templates/gym-fitness/tier5-src/himi-store-product/index.ts +6 -9
  90. package/templates/gym-fitness-owner/config.ts +1 -1
  91. package/templates/nonprofit-cause/config.ts +8 -1
  92. package/templates/nonprofit-cause/dev/index.ts +278 -2
  93. package/templates/nonprofit-cause/himalaya.content.json +3 -0
  94. package/templates/nonprofit-cause/tier5-src/_shared/branded-load-state.ts +106 -0
  95. package/templates/nonprofit-cause/tier5-src/_shared/member-read.ts +52 -0
  96. package/templates/nonprofit-cause/tier5-src/_shared/program-description.ts +11 -0
  97. package/templates/nonprofit-cause/tier5-src/business-contact/index.ts +6 -0
  98. package/templates/nonprofit-cause/tier5-src/himi-blog-post/index.ts +35 -12
  99. package/templates/nonprofit-cause/tier5-src/himi-branded-lite-home/index.ts +3 -3
  100. package/templates/nonprofit-cause/tier5-src/himi-events-my-events/index.ts +76 -42
  101. package/templates/nonprofit-cause-owner/config.ts +1 -1
  102. package/templates/owner-lite/config.ts +1 -1
  103. package/templates/podcast-creator/config.ts +8 -1
  104. package/templates/podcast-creator/dev/index.ts +278 -2
  105. package/templates/podcast-creator/himalaya.content.json +3 -0
  106. package/templates/podcast-creator/tier5-src/_shared/branded-load-state.ts +106 -0
  107. package/templates/podcast-creator/tier5-src/_shared/member-read.ts +52 -0
  108. package/templates/podcast-creator/tier5-src/_shared/program-description.ts +11 -0
  109. package/templates/podcast-creator/tier5-src/business-contact/index.ts +6 -0
  110. package/templates/podcast-creator/tier5-src/himi-blog-post/index.ts +35 -12
  111. package/templates/podcast-creator/tier5-src/himi-branded-lite-home/index.ts +3 -3
  112. package/templates/podcast-creator/tier5-src/himi-events-my-events/index.ts +76 -42
  113. package/templates/podcast-creator-owner/config.ts +1 -1
  114. package/templates/portfolio-creative/config.ts +8 -1
  115. package/templates/portfolio-creative/dev/index.ts +278 -2
  116. package/templates/portfolio-creative/himalaya.content.json +3 -0
  117. package/templates/portfolio-creative/tier5-src/_shared/branded-load-state.ts +106 -0
  118. package/templates/portfolio-creative/tier5-src/_shared/member-read.ts +52 -0
  119. package/templates/portfolio-creative/tier5-src/_shared/program-description.ts +11 -0
  120. package/templates/portfolio-creative/tier5-src/business-contact/index.ts +6 -0
  121. package/templates/portfolio-creative/tier5-src/himi-blog-post/index.ts +35 -12
  122. package/templates/portfolio-creative/tier5-src/himi-branded-lite-home/index.ts +3 -3
  123. package/templates/portfolio-creative/tier5-src/himi-events-my-events/index.ts +76 -42
  124. package/templates/portfolio-creative/tier5-src/himi-store-product/index.ts +6 -9
  125. package/templates/portfolio-creative-owner/config.ts +1 -1
  126. package/templates/restaurant/config.ts +8 -1
  127. package/templates/restaurant/dev/index.ts +278 -2
  128. package/templates/restaurant/himalaya.content.json +3 -0
  129. package/templates/restaurant/tier5-src/_shared/branded-load-state.ts +106 -0
  130. package/templates/restaurant/tier5-src/_shared/member-read.ts +52 -0
  131. package/templates/restaurant/tier5-src/_shared/program-description.ts +11 -0
  132. package/templates/restaurant/tier5-src/business-contact/index.ts +6 -0
  133. package/templates/restaurant/tier5-src/himi-blog-post/index.ts +35 -12
  134. package/templates/restaurant/tier5-src/himi-branded-lite-home/index.ts +3 -3
  135. package/templates/restaurant/tier5-src/himi-events-my-events/index.ts +76 -42
  136. package/templates/restaurant-owner/config.ts +1 -1
  137. package/templates/retail-store/config.ts +8 -1
  138. package/templates/retail-store/dev/index.ts +244 -1
  139. package/templates/retail-store/himalaya.content.json +3 -0
  140. package/templates/retail-store/tier5-src/_shared/branded-load-state.ts +106 -0
  141. package/templates/retail-store/tier5-src/_shared/member-read.ts +52 -0
  142. package/templates/retail-store/tier5-src/_shared/program-description.ts +11 -0
  143. package/templates/retail-store/tier5-src/business-contact/index.ts +6 -0
  144. package/templates/retail-store/tier5-src/himi-blog-post/index.ts +35 -12
  145. package/templates/retail-store/tier5-src/himi-branded-lite-home/index.ts +3 -3
  146. package/templates/retail-store/tier5-src/himi-store-product/index.ts +6 -9
  147. package/templates/retail-store-owner/config.ts +1 -1
  148. package/templates/yoga-studio/config.ts +8 -1
  149. package/templates/yoga-studio/dev/index.ts +306 -2
  150. package/templates/yoga-studio/himalaya.content.json +3 -0
  151. package/templates/yoga-studio/tier5-src/_shared/member-read.ts +52 -0
  152. package/templates/yoga-studio/tier5-src/_shared/program-description.ts +11 -0
  153. package/templates/yoga-studio/tier5-src/business-contact/index.ts +6 -0
  154. package/templates/yoga-studio/tier5-src/himi-blog-post/index.ts +35 -12
  155. package/templates/yoga-studio/tier5-src/himi-branded-lite-home/index.ts +3 -3
  156. package/templates/yoga-studio/tier5-src/himi-branded-lite-program/index.ts +16 -14
  157. package/templates/yoga-studio/tier5-src/himi-branded-lite-programs/index.ts +3 -7
  158. package/templates/yoga-studio/tier5-src/himi-events-my-events/index.ts +76 -42
  159. package/templates/yoga-studio-owner/config.ts +1 -1
@@ -50,8 +50,9 @@ export interface L10nStringFinding {
50
50
  export declare function collectDescriptorStrings(descriptor: unknown, options?: {
51
51
  /**
52
52
  * Values the app has DECLARED as copy (its `strings/<locale>.json` table), for which
53
- * the "has a letter" rule of `isUserVisibleCopy` is waived — and only that rule: the
54
- * binding/id/url/hex/length filters still apply. Exists for letterless copy — a phone
53
+ * the "has a letter" and lowercase-word heuristics are waived: a declared unit
54
+ * such as "member" is copy despite looking like an id. Binding/id/url/hex/length
55
+ * filters still apply, and only copy fields are collected. Exists for letterless copy — a phone
55
56
  * or number format such as "+1 555 0100" has no letter, so the heuristic calls it
56
57
  * noise, and the extractor dropped `reserve.phonePlaceholder` (#3320). Only exact
57
58
  * table values qualify, so an arbitrary "4.8" in sample data stays out.
@@ -229,6 +229,14 @@ export interface AppConfig {
229
229
  * omitted. Must satisfy `capabilities ⊆ capabilityEnvelope`.
230
230
  */
231
231
  capabilityEnvelope?: Capability[];
232
+ /**
233
+ * For a shell that `himi dist` builds other apps from: the capabilities such a build STARTS from,
234
+ * instead of this config's own `capabilities`. The build adds what the release declares, so a
235
+ * customer's binary carries this base plus its own opt-ins, not every feature the shell's
236
+ * reference app has. Must list what the shell's boot needs and what a build cannot add
237
+ * (`distAddRefusal`). A local build of the shell still uses `capabilities`.
238
+ */
239
+ capabilityBase?: Capability[];
232
240
  /**
233
241
  * Per-capability permission prompt copy — the sentence the OS shows when the app asks for
234
242
  * camera, location, photos, … (iOS usage strings). Served on app-config, so `himi dist` bakes
@@ -128,5 +128,12 @@ export interface WixNativeAuthConfig {
128
128
  * active site (`HostIdentity`) and show no login of its own. Run standalone, the app keeps this
129
129
  * provider and its login, unchanged. Baked into auth.json by tools/auth-bake. */
130
130
  hostProvided?: boolean;
131
+ /** #4655 — OWNER mode only. On the first launch after this app replaced an older one IN PLACE
132
+ * (same bundle id / applicationId and signing identity), adopt — once — a live Wix session the
133
+ * previous app left in the platform cookie jars (iOS `HTTPCookieStorage.shared`, Android WebView
134
+ * `CookieManager`), so the upgrading owner lands signed in. A dead session falls through to the
135
+ * login gate; a Himi sign-out is never undone by it. Refused in consumer and account mode.
136
+ * See docs/wix-authentication.md → "Adopting a legacy session on an in-place upgrade". */
137
+ adoptLegacySession?: boolean;
131
138
  }
132
139
  export declare function WixNativeAuthProvider(config: WixNativeAuthConfig): AuthProvider;
@@ -0,0 +1,17 @@
1
+ export interface BusinessContactServiceOptions {
2
+ service?: string;
3
+ /** Must read an allowed, site-bound public total. Never use a preview/page length. */
4
+ loadMemberCount?: () => Promise<unknown>;
5
+ }
6
+ /** Shared worker half of businessContactSection. The caller supplies its allowed count read. */
7
+ export declare function createBusinessContactService(opts?: BusinessContactServiceOptions): import("@wix/himalaya/state", { with: { "resolution-mode": "import" } }).ServiceHandle<any> & {
8
+ load: (arg?: {
9
+ showMemberCount?: boolean;
10
+ memberCount?: number;
11
+ }) => Promise<any>;
12
+ open: (arg?: {
13
+ kind?: string;
14
+ value?: string;
15
+ failureLabel?: string;
16
+ }) => Promise<any>;
17
+ };
@@ -0,0 +1,73 @@
1
+ /** Public, build-time business evidence. Coordinates describe the business, never the device. */
2
+ export interface BusinessContact {
3
+ address?: string;
4
+ phone?: string;
5
+ email?: string;
6
+ website?: string;
7
+ description?: string;
8
+ isPhysical?: boolean;
9
+ coordinates?: {
10
+ latitude: number;
11
+ longitude: number;
12
+ };
13
+ }
14
+ export interface BusinessContactSettings {
15
+ isBusinessProfile?: boolean;
16
+ isAddressVisible?: boolean;
17
+ showMap?: boolean;
18
+ isPhoneVisible?: boolean;
19
+ isWebSiteLinkVisible?: boolean;
20
+ isEmailVisible?: boolean;
21
+ isDescriptionVisible?: boolean;
22
+ isGetInTouchVisible?: boolean;
23
+ getInTouchTitle?: string;
24
+ getInTouchDescription?: string;
25
+ getInTouchButton?: string;
26
+ }
27
+ export interface BusinessContactCopy {
28
+ title: string;
29
+ message: string;
30
+ directions: string;
31
+ unavailable: string;
32
+ memberCountUnavailable: string;
33
+ member: string;
34
+ members: string;
35
+ }
36
+ export interface BusinessContactOptions {
37
+ id?: string;
38
+ contact?: BusinessContact;
39
+ /** Raw One App contact settings, including the Business Profile discriminator when applicable. */
40
+ settings?: BusinessContactSettings;
41
+ copy?: Partial<BusinessContactCopy>;
42
+ service?: string;
43
+ /** Omit when this app has no business-chat destination. The chat owns its normal auth flow. */
44
+ chatScreenId?: string;
45
+ /** Present a source-requested count. False keeps copy extractable in a hidden fragment. */
46
+ showMemberCount?: boolean;
47
+ }
48
+ /** Optional build-time source evidence shared by a provisioned app and a migration recipe. */
49
+ export interface BusinessContactContent {
50
+ contact?: BusinessContact;
51
+ settings?: BusinessContactSettings;
52
+ showMemberCount?: boolean;
53
+ /** Public source total, when collected. Missing is unknown, not zero. */
54
+ memberCount?: number;
55
+ }
56
+ type Node = {
57
+ id: string;
58
+ body: {
59
+ package: string;
60
+ type: string;
61
+ props: Record<string, unknown>;
62
+ };
63
+ modifiers?: Record<string, unknown>;
64
+ };
65
+ /** Mirrors mapContactUsSettingsByApp: empty normal settings get defaults; partial settings do not. */
66
+ export declare function businessContactSettings(source?: BusinessContactSettings): BusinessContactSettings;
67
+ /** Return only a complete, finite physical business point, preserving valid zero coordinates. */
68
+ export declare function businessContactPoint(contact: BusinessContact): BusinessContact["coordinates"];
69
+ /** Typed link inputs, shared by the descriptor and worker. No arbitrary source URL or scheme dispatch. */
70
+ export declare function businessContactLink(kind: string, value: unknown): string;
71
+ /** A content section made of standard primitives. Native shells own navigation bars and bottom tabs. */
72
+ export declare function businessContactSection(opts?: BusinessContactOptions): Node;
73
+ export {};
@@ -1,3 +1,6 @@
1
+ export * from "./business-contact.js";
2
+ export * from "./business-contact-service.js";
3
+ export * from "./invite.js";
1
4
  import { entitlement } from "@wix/himalaya/checkout";
2
5
  type Node = Record<string, any>;
3
6
  /** An action shown by `detailedHeader`. */
@@ -0,0 +1 @@
1
+ export declare function inviteTarget(identity: string): string;
@@ -0,0 +1,148 @@
1
+ /** Resolved for the current app/site. A website URL is not an invitation.
2
+ * Use the source invite response or a verified published target-app link. */
3
+ export interface InviteMetadata {
4
+ showInviteButton: boolean;
5
+ /** Collected manifest.source.metaSiteId. The bound Wix transport mints the
6
+ * site's instance; this recipe never supplies credentials. */
7
+ businessId?: string;
8
+ url?: string;
9
+ text?: string;
10
+ subject?: string;
11
+ }
12
+ export interface InviteControlOptions {
13
+ id?: string;
14
+ service?: string;
15
+ label?: string;
16
+ }
17
+ /** Native action opens the shared flow. The nav worker owns its visibility;
18
+ * the screen worker owns login and sharing. Register the same ID/binding in
19
+ * topBarDefault and any complete screen override that shows this action. */
20
+ export declare function inviteAction(opts: InviteControlOptions & {
21
+ screenId: string;
22
+ }): {
23
+ id: string;
24
+ icon: string;
25
+ label: string;
26
+ accessibilityLabel: string;
27
+ hiddenPath: string;
28
+ onTap: {
29
+ actionId: string;
30
+ params: {
31
+ screenId: string;
32
+ };
33
+ };
34
+ };
35
+ /** Standard Share button inside the screen that owns createInviteService. */
36
+ export declare function inviteButton(opts?: InviteControlOptions): {
37
+ id: string;
38
+ body: {
39
+ package: string;
40
+ type: string;
41
+ props: {
42
+ title: string;
43
+ style: string;
44
+ fullWidth: boolean;
45
+ action: {
46
+ actionId: string;
47
+ };
48
+ };
49
+ };
50
+ modifiers: {
51
+ hiddenPath: string;
52
+ };
53
+ };
54
+ /** Shared source-style Invite modal/page, using ordinary native navigation. */
55
+ export declare function inviteScreen(opts: {
56
+ screenId: string;
57
+ bundleUrl: string;
58
+ service?: string;
59
+ title?: string;
60
+ shareLabel?: string;
61
+ }): {
62
+ screenId: string;
63
+ renderer: string;
64
+ title: string;
65
+ schemaVersion: number;
66
+ cacheControl: {
67
+ maxAge: number;
68
+ staleWhileRevalidate: number;
69
+ };
70
+ topBar: {
71
+ actions: any[];
72
+ };
73
+ logicBundle: {
74
+ url: string;
75
+ integrity: string;
76
+ declaredCapabilities: string[];
77
+ };
78
+ payload: {
79
+ id: string;
80
+ body: {
81
+ package: string;
82
+ type: string;
83
+ props: {
84
+ spacing: number;
85
+ alignment: string;
86
+ children: ({
87
+ id: string;
88
+ body: {
89
+ package: string;
90
+ type: string;
91
+ props: {
92
+ title: string;
93
+ style: string;
94
+ fullWidth: boolean;
95
+ action: {
96
+ actionId: string;
97
+ };
98
+ };
99
+ };
100
+ modifiers: {
101
+ hiddenPath: string;
102
+ };
103
+ } | {
104
+ id: string;
105
+ body: {
106
+ package: string;
107
+ type: string;
108
+ props: {
109
+ text: string;
110
+ style: string;
111
+ };
112
+ };
113
+ })[];
114
+ };
115
+ };
116
+ };
117
+ };
118
+ export interface InviteSourceOptions {
119
+ service?: string;
120
+ /** Read current bound metadata; never use route parameters as a share target. */
121
+ source: () => InviteMetadata | undefined | Promise<InviteMetadata | undefined>;
122
+ }
123
+ export interface InviteServiceOptions extends InviteSourceOptions {
124
+ /** Existing shared consumer sign-in screen, linked in navigation. It must forward
125
+ * the host continuation token with signInDirect/registerDirect. */
126
+ signInScreenId: string;
127
+ }
128
+ interface InviteState {
129
+ hidden: boolean;
130
+ error: string;
131
+ }
132
+ /** Read-only native action visibility. Mount in navLogicBundle; never creates
133
+ * an invitation, opens login, or consumes a pending screen-owned intent. */
134
+ export declare function createInviteAvailabilityService(opts: InviteSourceOptions): import("@wix/himalaya/state", { with: { "resolution-mode": "import" } }).ServiceHandle<{
135
+ hidden: boolean;
136
+ }> & {
137
+ load: (...args: never[]) => Promise<{
138
+ hidden: boolean;
139
+ }>;
140
+ };
141
+ /** Screen-owned Invite flow. Only an explicit Share tap or its once-consumed,
142
+ * host-confirmed login continuation can create an invitation. Ordinary loads,
143
+ * routes, hydration and native action visibility never authorize a write. */
144
+ export declare function createInviteService(opts: InviteServiceOptions): import("@wix/himalaya/state", { with: { "resolution-mode": "import" } }).ServiceHandle<InviteState> & {
145
+ load: (...args: never[]) => Promise<InviteState>;
146
+ invite: (...args: never[]) => Promise<InviteState>;
147
+ };
148
+ export {};
@@ -34,11 +34,12 @@ export interface WixGetPostRequest {
34
34
  * but a body-less 200 was never the "body preserved whenever the backend is
35
35
  * healthy" the earlier comment claimed; the body was simply never requested.)
36
36
  *
37
- * On any rejection (network / backend error) we still fall back to a queryPosts
37
+ * On network / backend rejection we still fall back to a queryPosts
38
38
  * filter-by-id — a graceful degrade to the LIST projection (no body) that keeps
39
39
  * blog detail + saved screens rendering instead of erroring out. `queryPosts`'s
40
40
  * request type has no `fieldsets` field, so that fallback path cannot carry the
41
- * body.
41
+ * body. Detail readers can opt into `preserveAccessErrors` to keep HTTP 401/403
42
+ * refusals instead of a public metadata fallback; default callers are unchanged.
42
43
  *
43
44
  * When that fallback ALSO finds nothing — a deleted post, or one this visitor
44
45
  * may not see — we reject rather than resolve. `WixGetPostResponse.post`
@@ -50,7 +51,9 @@ export interface WixGetPostRequest {
50
51
  * `catch`, or an `allSettled` filter), so rejecting is what routes them into the
51
52
  * graceful degrade they already implement. The originating failure travels as
52
53
  * `cause`, so the 404-vs-network distinction is not lost. */
53
- export declare function getPost(postId: string, req?: WixGetPostRequest, readOptions?: WixCallOptions): Promise<WixGetPostResponse>;
54
+ export declare function getPost(postId: string, req?: WixGetPostRequest, readOptions?: WixCallOptions & {
55
+ preserveAccessErrors?: boolean;
56
+ }): Promise<WixGetPostResponse>;
54
57
  export interface WixBlogCategory {
55
58
  id: string;
56
59
  label?: string;
@@ -74,6 +74,21 @@ function matchesType(type, value) {
74
74
  return true;
75
75
  }
76
76
  }
77
+ var AUTHORED_PATTERN_LIMIT = 64;
78
+ var authoredPatterns = /* @__PURE__ */ new Map();
79
+ function authoredPattern(pattern) {
80
+ const known = authoredPatterns.get(pattern);
81
+ if (known !== void 0) return known;
82
+ let re;
83
+ try {
84
+ re = new RegExp(`^(?:${pattern})$`);
85
+ } catch {
86
+ re = null;
87
+ }
88
+ if (authoredPatterns.size >= AUTHORED_PATTERN_LIMIT) authoredPatterns.delete(authoredPatterns.keys().next().value);
89
+ authoredPatterns.set(pattern, re);
90
+ return re;
91
+ }
77
92
  function validate(rule, rawValue) {
78
93
  if (!rule) return null;
79
94
  const value = rawValue ?? "";
@@ -84,13 +99,8 @@ function validate(rule, rawValue) {
84
99
  return { rule: "type", type: rule.type };
85
100
  }
86
101
  if (rule.regex) {
87
- let ok;
88
- try {
89
- ok = new RegExp(`^(?:${rule.regex})$`).test(value);
90
- } catch {
91
- ok = true;
92
- }
93
- if (!ok) return { rule: "regex" };
102
+ const re = authoredPattern(rule.regex);
103
+ if (re && !re.test(value)) return { rule: "regex" };
94
104
  }
95
105
  if (typeof rule.minLength === "number" && rule.minLength > 0 && value.length < rule.minLength) {
96
106
  return { rule: "minLength", limit: rule.minLength };
@@ -112,6 +112,21 @@ function matchesType(type, value) {
112
112
  return true;
113
113
  }
114
114
  }
115
+ var AUTHORED_PATTERN_LIMIT = 64;
116
+ var authoredPatterns = /* @__PURE__ */ new Map();
117
+ function authoredPattern(pattern) {
118
+ const known = authoredPatterns.get(pattern);
119
+ if (known !== void 0) return known;
120
+ let re;
121
+ try {
122
+ re = new RegExp(`^(?:${pattern})$`);
123
+ } catch {
124
+ re = null;
125
+ }
126
+ if (authoredPatterns.size >= AUTHORED_PATTERN_LIMIT) authoredPatterns.delete(authoredPatterns.keys().next().value);
127
+ authoredPatterns.set(pattern, re);
128
+ return re;
129
+ }
115
130
  function validate(rule, rawValue) {
116
131
  if (!rule) return null;
117
132
  const value = rawValue ?? "";
@@ -122,13 +137,8 @@ function validate(rule, rawValue) {
122
137
  return { rule: "type", type: rule.type };
123
138
  }
124
139
  if (rule.regex) {
125
- let ok;
126
- try {
127
- ok = new RegExp(`^(?:${rule.regex})$`).test(value);
128
- } catch {
129
- ok = true;
130
- }
131
- if (!ok) return { rule: "regex" };
140
+ const re = authoredPattern(rule.regex);
141
+ if (re && !re.test(value)) return { rule: "regex" };
132
142
  }
133
143
  if (typeof rule.minLength === "number" && rule.minLength > 0 && value.length < rule.minLength) {
134
144
  return { rule: "minLength", limit: rule.minLength };
@@ -9827,6 +9827,21 @@ function matchesType(type, value) {
9827
9827
  return true;
9828
9828
  }
9829
9829
  }
9830
+ var AUTHORED_PATTERN_LIMIT = 64;
9831
+ var authoredPatterns = /* @__PURE__ */ new Map();
9832
+ function authoredPattern(pattern) {
9833
+ const known = authoredPatterns.get(pattern);
9834
+ if (known !== void 0) return known;
9835
+ let re;
9836
+ try {
9837
+ re = new RegExp(`^(?:${pattern})$`);
9838
+ } catch {
9839
+ re = null;
9840
+ }
9841
+ if (authoredPatterns.size >= AUTHORED_PATTERN_LIMIT) authoredPatterns.delete(authoredPatterns.keys().next().value);
9842
+ authoredPatterns.set(pattern, re);
9843
+ return re;
9844
+ }
9830
9845
  function validate(rule, rawValue) {
9831
9846
  if (!rule) return null;
9832
9847
  const value = rawValue ?? "";
@@ -9837,13 +9852,8 @@ function validate(rule, rawValue) {
9837
9852
  return { rule: "type", type: rule.type };
9838
9853
  }
9839
9854
  if (rule.regex) {
9840
- let ok;
9841
- try {
9842
- ok = new RegExp(`^(?:${rule.regex})$`).test(value);
9843
- } catch {
9844
- ok = true;
9845
- }
9846
- if (!ok) return { rule: "regex" };
9855
+ const re = authoredPattern(rule.regex);
9856
+ if (re && !re.test(value)) return { rule: "regex" };
9847
9857
  }
9848
9858
  if (typeof rule.minLength === "number" && rule.minLength > 0 && value.length < rule.minLength) {
9849
9859
  return { rule: "minLength", limit: rule.minLength };