@cimplify/sdk 0.89.0 → 0.92.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/advanced.d.mts +3 -3
- package/dist/advanced.d.ts +3 -3
- package/dist/advanced.js +20 -20
- package/dist/advanced.mjs +1 -1
- package/dist/{chunk-JHJTXAPS.js → chunk-3MBMIEWT.js} +4 -4
- package/dist/{chunk-DENWOZEA.mjs → chunk-3XD2FVP4.mjs} +163 -43
- package/dist/{chunk-M4ALCELT.mjs → chunk-54H2YYIW.mjs} +2 -2
- package/dist/{chunk-T2CJ67QV.js → chunk-DCRN67NO.js} +201 -78
- package/dist/{chunk-T7Z25EY4.js → chunk-HKN3YG76.js} +84 -0
- package/dist/{chunk-GHFDYM5K.js → chunk-IVJEUGWF.js} +10 -1
- package/dist/{chunk-ROBTTS3Q.js → chunk-OAHSF542.js} +40 -1
- package/dist/{chunk-APBLFZ2I.mjs → chunk-PYBFTMHI.mjs} +40 -1
- package/dist/{chunk-OZDDHSIB.mjs → chunk-RRBY35TJ.mjs} +80 -1
- package/dist/{chunk-ZU4ZRYUR.mjs → chunk-T7LDBZZZ.mjs} +10 -1
- package/dist/chunk-U4MW6PYU.mjs +23 -0
- package/dist/chunk-XREIZ56K.js +26 -0
- package/dist/{client-CqZgdUtw.d.ts → client-BQbSKlHS.d.mts} +165 -11
- package/dist/{client-CAY2NbRG.d.mts → client-Bw4HtLP1.d.mts} +2 -2
- package/dist/{client-D8ZFs-sq.d.mts → client-CeW3acve.d.ts} +165 -11
- package/dist/{client-CUbwb6Om.d.ts → client-Otzv_rgP.d.ts} +2 -2
- package/dist/{index-CmWOz9bi.d.mts → index-CmIboQjl.d.mts} +3 -3
- package/dist/{index-Bc5qUxAt.d.ts → index-DgoRwz8l.d.ts} +3 -3
- package/dist/index.d.mts +49 -7
- package/dist/index.d.ts +49 -7
- package/dist/index.js +109 -82
- package/dist/index.mjs +11 -5
- package/dist/mock/cli.mjs +61 -1
- package/dist/mock/library.js +61 -1
- package/dist/mock/library.mjs +61 -1
- package/dist/mock/msw.js +61 -1
- package/dist/mock/msw.mjs +61 -1
- package/dist/{payment-Dcgb9n1n.d.mts → payment-BFtLqiG2.d.mts} +1 -1
- package/dist/{payment-Xq0WDZXh.d.ts → payment-Cq8FT1B6.d.ts} +1 -1
- package/dist/{price-DAAjKgAp.d.ts → price-DaFXT-Lr.d.ts} +1 -1
- package/dist/{price--Ma_WO5_.d.mts → price-DleDWk_s.d.mts} +1 -1
- package/dist/{product-BakHcsP2.d.ts → product-bZ8G5Z8D.d.mts} +95 -2
- package/dist/{product-BakHcsP2.d.mts → product-bZ8G5Z8D.d.ts} +95 -2
- package/dist/react.d.mts +471 -8
- package/dist/react.d.ts +471 -8
- package/dist/react.js +2787 -402
- package/dist/react.mjs +2699 -337
- package/dist/{server-Bk_hlefX.d.mts → server-D-iK-bNt.d.mts} +8 -1
- package/dist/{server-Bei5lBrc.d.ts → server-DwsY9hlX.d.ts} +8 -1
- package/dist/server.d.mts +4 -4
- package/dist/server.d.ts +4 -4
- package/dist/server.js +7 -7
- package/dist/server.mjs +2 -2
- package/dist/styles.css +1 -1
- package/dist/testing/msw.d.mts +2 -2
- package/dist/testing/msw.d.ts +2 -2
- package/dist/testing/msw.js +3 -2
- package/dist/testing/msw.mjs +2 -1
- package/dist/testing/suite.d.mts +6 -6
- package/dist/testing/suite.d.ts +6 -6
- package/dist/testing/suite.js +24 -23
- package/dist/testing/suite.mjs +5 -4
- package/dist/testing.d.mts +5 -5
- package/dist/testing.d.ts +5 -5
- package/dist/testing.js +80 -79
- package/dist/testing.mjs +6 -5
- package/dist/utils.d.mts +4 -4
- package/dist/utils.d.ts +4 -4
- package/package.json +4 -1
- package/registry/booking-page.json +1 -1
- package/registry/chat-widget.json +1 -1
- package/registry/customer-input-fields.json +1 -1
- package/registry/date-slot-picker.json +1 -1
- package/registry/product-customizer.json +1 -1
- package/registry/rental-service-card.json +1 -1
package/dist/react.d.mts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React$1, { ReactNode } from 'react';
|
|
2
2
|
import { d as AdSlot, c as AdPosition, a as AdContextValue, S as SignInOptions } from './sign-in-DQlIdqsi.mjs';
|
|
3
3
|
export { A as AdConfig, g as getVariantDisplayName } from './sign-in-DQlIdqsi.mjs';
|
|
4
|
-
import {
|
|
4
|
+
import { af as CimplifyClient, ca as OrderType, cv as ProcessCheckoutResult, ac as CheckoutStatus, ad as CheckoutStatusContext, a_ as EnrichedOrderItem, aZ as EnrichedOrder, w as Business, bz as Location, cM as ReorderResult, c8 as OrderStatus, bP as Order, cx as QuoteBundleSelectionInput, cy as QuoteCompositeSelectionInput, cr as PriceQuote, cB as QuoteUiMessage, d6 as Service, r as AvailableSlot, ay as DayAvailability, aq as CustomerBooking, L as CancelBookingResult, f as ActivityStateResponse, df as SessionMessage, c as ActivityRecommendation, aA as DeliveryFeeResponse, aC as DeliveryOptionsResponse, bc as FxRateResponse, dp as StoreCreditBalance, dr as StorefrontBootstrap, _ as ChatWidgetStarter, W as ChatMessage, Z as ChatUploadAttachment, h as AddressInfo, n as AuthenticatedData, aY as ElementsOptions, cl as PaymentMethodInfo, aW as ElementsCheckoutResult, cu as ProcessCheckoutOptions, ai as CimplifyElements, T as ChatAttachment, bo as LineItem, di as Staff, d1 as Room } from './client-BQbSKlHS.mjs';
|
|
5
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
|
-
import { ad as CurrencyCode, aZ as Product, aQ as Pagination, V as CimplifyError, bb as ProductWithDetails, S as Category, aO as Money, E as BundleSelectionInput, a1 as ComponentSelectionInput, D as BundleSelectionData, aa as CompositeSelectionData, W as Collection, b6 as ProductTaxonomy, bx as TaxonomyWithChildren, b7 as ProductTimeProfile, aj as Deal, b2 as ProductDealInfo, ap as DiscountValidation, G as BundleSummary, a8 as CompositePriceResult, bs as SubscriptionWithDetails, br as SubscriptionStatus, bo as Subscription, ae as CustomAttributeDefinition, bc as PropertyFacet, b1 as ProductBillingPlan, bQ as VariantView, bK as VariantAxisWithValues, f as AddOnWithOptions, y as BundleComponentView, z as BundlePriceType, a6 as CompositeGroupView, as as DisplayCart, b3 as ProductInputField, bi as SaleInfo, bD as UpcomingSale, av as DurationUnit, t as BoundaryKind, bk as SchedulingMode, al as DepositType, af as CustomAttributeValue, b4 as ProductProperty, be as QuantityPricingTier } from './product-
|
|
7
|
-
import { P as ProductWithPrice } from './price
|
|
6
|
+
import { ad as CurrencyCode, aZ as Product, aQ as Pagination, V as CimplifyError, bb as ProductWithDetails, S as Category, aO as Money, E as BundleSelectionInput, a1 as ComponentSelectionInput, D as BundleSelectionData, aa as CompositeSelectionData, W as Collection, b6 as ProductTaxonomy, bx as TaxonomyWithChildren, b7 as ProductTimeProfile, aj as Deal, b2 as ProductDealInfo, ap as DiscountValidation, G as BundleSummary, a8 as CompositePriceResult, bs as SubscriptionWithDetails, br as SubscriptionStatus, bo as Subscription, ae as CustomAttributeDefinition, bc as PropertyFacet, b1 as ProductBillingPlan, bQ as VariantView, bK as VariantAxisWithValues, f as AddOnWithOptions, y as BundleComponentView, z as BundlePriceType, a6 as CompositeGroupView, as as DisplayCart, b3 as ProductInputField, h as AddressValue, bi as SaleInfo, bD as UpcomingSale, av as DurationUnit, t as BoundaryKind, bk as SchedulingMode, al as DepositType, af as CustomAttributeValue, b4 as ProductProperty, be as QuantityPricingTier } from './product-bZ8G5Z8D.mjs';
|
|
7
|
+
import { P as ProductWithPrice } from './price-DleDWk_s.mjs';
|
|
8
8
|
import { ClassValue } from 'clsx';
|
|
9
9
|
import { Matcher } from 'react-day-picker';
|
|
10
|
-
import './payment-
|
|
10
|
+
import './payment-BFtLqiG2.mjs';
|
|
11
11
|
|
|
12
12
|
interface UserIdentity {
|
|
13
13
|
uid: string;
|
|
@@ -955,6 +955,7 @@ interface UseCartItem {
|
|
|
955
955
|
scheduledStart?: string;
|
|
956
956
|
scheduledEnd?: string;
|
|
957
957
|
staffId?: string;
|
|
958
|
+
units?: number;
|
|
958
959
|
lineType?: "simple" | "service" | "bundle" | "composite" | "digital";
|
|
959
960
|
confirmationCode?: string;
|
|
960
961
|
serviceStatus?: string;
|
|
@@ -981,6 +982,7 @@ interface AddToCartOptions {
|
|
|
981
982
|
scheduledEnd?: string;
|
|
982
983
|
staffId?: string;
|
|
983
984
|
resourceId?: string;
|
|
985
|
+
units?: number;
|
|
984
986
|
billingPlanId?: string;
|
|
985
987
|
customerInputs?: Array<{
|
|
986
988
|
field_id: string;
|
|
@@ -1015,6 +1017,7 @@ interface UseCartResult {
|
|
|
1015
1017
|
}
|
|
1016
1018
|
declare function useCart(options?: UseCartOptions): UseCartResult;
|
|
1017
1019
|
|
|
1020
|
+
declare function isTerminalOrderStatus(status: string): boolean;
|
|
1018
1021
|
interface UseOrderOptions {
|
|
1019
1022
|
poll?: boolean;
|
|
1020
1023
|
pollInterval?: number;
|
|
@@ -1247,6 +1250,11 @@ interface UseOrdersResult {
|
|
|
1247
1250
|
refetch: () => Promise<void>;
|
|
1248
1251
|
}
|
|
1249
1252
|
declare function useOrders(options?: UseOrdersOptions): UseOrdersResult;
|
|
1253
|
+
/**
|
|
1254
|
+
* Drop every cached orders list so the next mount refetches. Call after
|
|
1255
|
+
* placing an order — the cache would otherwise serve the stale list until GC.
|
|
1256
|
+
*/
|
|
1257
|
+
declare function clearOrdersCache(): void;
|
|
1250
1258
|
|
|
1251
1259
|
interface UseSubscriptionsOptions {
|
|
1252
1260
|
status?: SubscriptionStatus;
|
|
@@ -1286,6 +1294,7 @@ declare function useServices(options?: UseServicesOptions): UseServicesResult;
|
|
|
1286
1294
|
|
|
1287
1295
|
interface UseAvailableSlotsOptions extends CachedQueryBaseOptions {
|
|
1288
1296
|
participantCount?: number;
|
|
1297
|
+
units?: number;
|
|
1289
1298
|
}
|
|
1290
1299
|
interface UseAvailableSlotsResult {
|
|
1291
1300
|
slots: AvailableSlot[];
|
|
@@ -1297,6 +1306,7 @@ declare function useAvailableSlots(serviceId: string | null, date: string | null
|
|
|
1297
1306
|
|
|
1298
1307
|
interface UseServiceAvailabilityOptions extends CachedQueryBaseOptions {
|
|
1299
1308
|
participantCount?: number;
|
|
1309
|
+
units?: number;
|
|
1300
1310
|
locationId?: string;
|
|
1301
1311
|
}
|
|
1302
1312
|
interface UseServiceAvailabilityResult {
|
|
@@ -1501,8 +1511,43 @@ interface UseChatResult {
|
|
|
1501
1511
|
isSending: boolean;
|
|
1502
1512
|
error: CimplifyError | null;
|
|
1503
1513
|
isActive: boolean;
|
|
1504
|
-
|
|
1514
|
+
/** The customer asked for a person; cleared when an agent message arrives. */
|
|
1515
|
+
humanRequested: boolean;
|
|
1516
|
+
/**
|
|
1517
|
+
* True from an accepted send on an AI-answered conversation until the
|
|
1518
|
+
* reply arrives (30s cap) — the AI is composing, keep typing dots up.
|
|
1519
|
+
*/
|
|
1520
|
+
awaitingReply: boolean;
|
|
1521
|
+
/** Team-wide read watermark (ISO); customer messages at or before it were seen. */
|
|
1522
|
+
seenAt: string | null;
|
|
1523
|
+
/** True while older history may exist above the loaded messages. */
|
|
1524
|
+
mayHaveOlder: boolean;
|
|
1525
|
+
/**
|
|
1526
|
+
* The verified customer this session's conversation is bound to (from the
|
|
1527
|
+
* claim), null while anonymous. Drives "chatting as X — not you?" UI.
|
|
1528
|
+
*/
|
|
1529
|
+
claimedAs: string | null;
|
|
1530
|
+
/**
|
|
1531
|
+
* Sign out of the bound identity: revokes the Link session, clears the
|
|
1532
|
+
* access token, mints a fresh anonymous session, and resets the loaded
|
|
1533
|
+
* conversation so nothing lingers for the next person at this browser.
|
|
1534
|
+
*/
|
|
1535
|
+
signOut: () => Promise<boolean>;
|
|
1536
|
+
/**
|
|
1537
|
+
* Resolves true when the message was accepted; false puts the failure in
|
|
1538
|
+
* `error`. Pass `replyTo` to quote another loaded message.
|
|
1539
|
+
*/
|
|
1540
|
+
send: (content: string, opts?: {
|
|
1541
|
+
replyTo?: ChatMessage;
|
|
1542
|
+
attachments?: ChatUploadAttachment[];
|
|
1543
|
+
}) => Promise<boolean>;
|
|
1505
1544
|
startConversation: (starterText?: string) => Promise<void>;
|
|
1545
|
+
/** React to a loaded message. Resolves true when accepted. */
|
|
1546
|
+
react: (message: ChatMessage, emoji: string) => Promise<boolean>;
|
|
1547
|
+
/** Ask for a person. Resolves true on success. */
|
|
1548
|
+
requestHuman: () => Promise<boolean>;
|
|
1549
|
+
/** Load messages older than the earliest loaded one. Resolves true if any arrived. */
|
|
1550
|
+
loadOlder: () => Promise<boolean>;
|
|
1506
1551
|
}
|
|
1507
1552
|
declare function useChat(options?: UseChatOptions): UseChatResult;
|
|
1508
1553
|
|
|
@@ -1708,6 +1753,7 @@ interface ProductCustomizerClassNames {
|
|
|
1708
1753
|
validation?: string;
|
|
1709
1754
|
specialInstructions?: string;
|
|
1710
1755
|
depositInfo?: string;
|
|
1756
|
+
units?: string;
|
|
1711
1757
|
allergens?: string;
|
|
1712
1758
|
duration?: string;
|
|
1713
1759
|
}
|
|
@@ -1717,10 +1763,12 @@ interface ProductCustomizerProps {
|
|
|
1717
1763
|
/** Lets the parent swap its gallery for `variant.images` on selection. */
|
|
1718
1764
|
onVariantChange?: (variantId: string | undefined, variant: VariantView | undefined) => void;
|
|
1719
1765
|
showSpecialInstructions?: boolean;
|
|
1766
|
+
/** Submit button verb; the running total is appended. Defaults to "Add to Cart". */
|
|
1767
|
+
submitLabel?: string;
|
|
1720
1768
|
className?: string;
|
|
1721
1769
|
classNames?: ProductCustomizerClassNames;
|
|
1722
1770
|
}
|
|
1723
|
-
declare function ProductCustomizer({ product, onAddToCart, onVariantChange, showSpecialInstructions, className, classNames, }: ProductCustomizerProps): React$1.ReactElement;
|
|
1771
|
+
declare function ProductCustomizer({ product, onAddToCart, onVariantChange, showSpecialInstructions, submitLabel, className, classNames, }: ProductCustomizerProps): React$1.ReactElement;
|
|
1724
1772
|
|
|
1725
1773
|
interface ProductImageGalleryProps {
|
|
1726
1774
|
images: string[];
|
|
@@ -1922,6 +1970,45 @@ interface CustomerInputFieldsProps {
|
|
|
1922
1970
|
}
|
|
1923
1971
|
declare function CustomerInputFields({ fields, values, onChange, onFileUpload, currency, className, classNames, }: CustomerInputFieldsProps): React$1.ReactElement | null;
|
|
1924
1972
|
|
|
1973
|
+
interface AddressAutocompleteClassNames {
|
|
1974
|
+
root?: string;
|
|
1975
|
+
input?: string;
|
|
1976
|
+
list?: string;
|
|
1977
|
+
option?: string;
|
|
1978
|
+
activeOption?: string;
|
|
1979
|
+
}
|
|
1980
|
+
interface AddressAutocompleteProps {
|
|
1981
|
+
/** The currently resolved address, if any. Seeds the input text. */
|
|
1982
|
+
value?: AddressValue | null;
|
|
1983
|
+
/** Fires when the customer picks a suggestion and details resolve. */
|
|
1984
|
+
onSelect: (address: AddressValue) => void;
|
|
1985
|
+
/**
|
|
1986
|
+
* Fires on every keystroke after a selection existed — the previous
|
|
1987
|
+
* coordinates no longer describe what's typed, so consumers should clear
|
|
1988
|
+
* any address state derived from the last selection.
|
|
1989
|
+
*/
|
|
1990
|
+
onDirty?: () => void;
|
|
1991
|
+
placeholder?: string;
|
|
1992
|
+
required?: boolean;
|
|
1993
|
+
autoFocus?: boolean;
|
|
1994
|
+
id?: string;
|
|
1995
|
+
className?: string;
|
|
1996
|
+
classNames?: AddressAutocompleteClassNames;
|
|
1997
|
+
}
|
|
1998
|
+
/** Google keys autocomplete billing to a session token that must be spent
|
|
1999
|
+
* (rotated) once details are fetched. */
|
|
2000
|
+
declare function createPlacesSessionToken(): string;
|
|
2001
|
+
/**
|
|
2002
|
+
* AddressAutocomplete — a Places-backed address search that resolves to a
|
|
2003
|
+
* full {@link AddressValue} with coordinates. Delivery checkout requires
|
|
2004
|
+
* latitude/longitude on the wire, so free-text address entry cannot complete
|
|
2005
|
+
* an order; this is the canonical way to capture a deliverable address.
|
|
2006
|
+
*
|
|
2007
|
+
* Headless by default: style via `classNames` or the `data-cimplify-address-*`
|
|
2008
|
+
* attributes.
|
|
2009
|
+
*/
|
|
2010
|
+
declare function AddressAutocomplete({ value, onSelect, onDirty, placeholder, required, autoFocus, id, className, classNames, }: AddressAutocompleteProps): React$1.ReactElement;
|
|
2011
|
+
|
|
1925
2012
|
interface SaleBadgeClassNames {
|
|
1926
2013
|
root?: string;
|
|
1927
2014
|
percentage?: string;
|
|
@@ -2240,6 +2327,14 @@ declare function cn(...inputs: ClassValue[]): string;
|
|
|
2240
2327
|
*/
|
|
2241
2328
|
declare function stripHtmlToText(html: string | null | undefined): string;
|
|
2242
2329
|
|
|
2330
|
+
/**
|
|
2331
|
+
* Whether an attachment should render inline as an image. The mime type is the
|
|
2332
|
+
* source of truth when present, but attachments scraped from tool results (and
|
|
2333
|
+
* some inbound channels) arrive unlabelled — falling back to the URL's
|
|
2334
|
+
* extension keeps those rendering as pictures instead of generic file chips.
|
|
2335
|
+
*/
|
|
2336
|
+
declare function isImageAttachment(attachment: ChatAttachment): boolean;
|
|
2337
|
+
|
|
2243
2338
|
interface BoundaryLabels {
|
|
2244
2339
|
/** e.g. "Check-in" / "Pickup". */
|
|
2245
2340
|
start: string;
|
|
@@ -2618,6 +2713,8 @@ interface DateSlotPickerProps {
|
|
|
2618
2713
|
daysToShow?: number;
|
|
2619
2714
|
/** Number of participants. */
|
|
2620
2715
|
participantCount?: number;
|
|
2716
|
+
/** Whole units needed — forwarded to availability so short days drop out. */
|
|
2717
|
+
units?: number;
|
|
2621
2718
|
/** Currently selected slot. */
|
|
2622
2719
|
selectedSlot?: AvailableSlot | null;
|
|
2623
2720
|
/** Called when a slot is selected. */
|
|
@@ -2641,7 +2738,7 @@ interface DateSlotPickerProps {
|
|
|
2641
2738
|
className?: string;
|
|
2642
2739
|
classNames?: DateSlotPickerClassNames;
|
|
2643
2740
|
}
|
|
2644
|
-
declare function DateSlotPicker({ serviceId, daysToShow, participantCount, selectedSlot, onSlotSelect, availability: availabilityProp, showPrice, currency, schedulingMode, durationUnit, durationValue, hideElapsedSlots, minLeadMinutes, className, classNames, }: DateSlotPickerProps): React$1.ReactElement;
|
|
2741
|
+
declare function DateSlotPicker({ serviceId, daysToShow, participantCount, units, selectedSlot, onSlotSelect, availability: availabilityProp, showPrice, currency, schedulingMode, durationUnit, durationValue, hideElapsedSlots, minLeadMinutes, className, classNames, }: DateSlotPickerProps): React$1.ReactElement;
|
|
2645
2742
|
|
|
2646
2743
|
interface DatePickerClassNames {
|
|
2647
2744
|
/** Outer wrapper around the trigger. */
|
|
@@ -3819,4 +3916,370 @@ interface ChatWidgetProps {
|
|
|
3819
3916
|
}
|
|
3820
3917
|
declare function ChatWidget({ client: clientProp, businessName, greeting, subtitle, starters, placeholder, position, defaultOpen, pollInterval, className, classNames, }: ChatWidgetProps): react_jsx_runtime.JSX.Element;
|
|
3821
3918
|
|
|
3822
|
-
export { AccommodationCard, AccountContent, type AccountContentProps, AccountDashboardPage, type AccountDashboardPageProps, AccountHero, type AccountHeroProps, AccountIdentityStrip, type AccountIdentityStripProps, AccountLineItem, type AccountLineItemData, type AccountLineItemProps, AccountLineItems, type AccountLineItemsProps, AccountNav, type AccountNavProps, AccountOrderDetailPage, type AccountOrderDetailPageProps, AccountOrderView, type AccountOrderViewProps, AccountOrdersPage, type AccountOrdersPageProps, type AccountPageBaseProps, AccountShell, type AccountShellProps, AccountSidebar, type AccountSidebarProps, AccountSignedOutPrompt, type AccountSignedOutPromptProps, AccountSubscriptionDetailPage, type AccountSubscriptionDetailPageProps, AccountSubscriptionsPage, type AccountSubscriptionsPageProps, Ad, AdPosition, type AdProps, AdProvider, AdSlot, AddOnSelector, type AddOnSelectorClassNames, type AddOnSelectorProps, type AddToCartOptions, AddressElement, AuthElement, AvailabilityBadge, type AvailabilityBadgeClassNames, type AvailabilityBadgeProps, BackLink, type BackLinkProps, BillingPlanSelector, type BillingPlanSelectorClassNames, type BillingPlanSelectorProps, BookingCard, type BookingCardClassNames, type BookingCardProps, BookingList, type BookingListClassNames, type BookingListProps, BookingPage, type BookingPageClassNames, type BookingPageProps, BookingSummary, type BookingSummaryClassNames, type BookingSummaryProps, BookingsPage, type BookingsPageClassNames, type BookingsPageProps, type BoundaryLabels, BoxIcon24, BundleProductCard, BundleProductLayout, BundleSelector, type BundleSelectorClassNames, type BundleSelectorProps, Button, type ButtonProps, CardImage, type CardLayoutProps, CardShell, CardVariant, type CartAddOnOptionSelection, CartDrawer, type CartDrawerProps, CartDrawerProvider, type CartLayoutProps, CartPage, type CartPageClassNames, type CartPageProps, CartSummary, type CartSummaryClassNames, type CartSummaryProps, CartTemplate, type CartVariantSelection, CatalogueCollectionLayout, type CatalogueLayoutProps, CataloguePage, type CataloguePageClassNames, type CataloguePageProps, CatalogueTemplate, CategoryFilter, type CategoryFilterClassNames, type CategoryFilterProps, CategoryGrid, type CategoryGridClassNames, type CategoryGridProps, ChatWidget, type ChatWidgetClassNames, type ChatWidgetProps, CheckIcon, CheckoutPage, type CheckoutPageClassNames, type CheckoutPageProps, CimplifyCheckout, type CimplifyCheckoutProps, type CimplifyClientContextValue, type CimplifyClientSession, type CimplifyContextValue, type CimplifyLinkComponent, type CimplifyLinkProps, CimplifyProvider, type CimplifyProviderProps, CimplifySignInButton, type CimplifySignInButtonProps, CimplifyUserButton, type CimplifyUserButtonProps, type CollectionLayoutProps, CollectionPage, type CollectionPageClassNames, type CollectionPageProps, CollectionTemplate, CompactCartLayout, CompactCatalogueLayout, CompactSearchLayout, CompactServiceCard, CompositeProductCard, CompositeProductLayout, CompositeSelector, type CompositeSelectorClassNames, type CompositeSelectorProps, ContextCard, type ContextCardProps, type ContextRow, ContinuityCard, type ContinuityCardProps, CurrencySelector, type CurrencySelectorClassNames, type CurrencySelectorProps, CustomAttributesTable, type CustomerInput, CustomerInputFields, type CustomerInputFieldsClassNames, type CustomerInputFieldsProps, type CustomerInputType, DashboardIcon, DashboardIcon20, DatePicker, type DatePickerClassNames, type DatePickerProps, DateSlotPicker, type DateSlotPickerClassNames, type DateSlotPickerProps, DealBanner, type DealBannerClassNames, type DealBannerProps, DealsPage, type DealsPageClassNames, type DealsPageProps, DefaultCartLayout, DefaultCatalogueLayout, DefaultCollectionLayout, DefaultProductLayout, DefaultSearchLayout, DeliveryEstimate, type DeliveryEstimateClassNames, type DeliveryEstimateProps, type DeliveryLive, type DeliveryRider, DeliveryTracker, type DeliveryTrackerProps, DeliveryTruckIcon, type DigitalFulfillment, DigitalProductCard, DigitalProductLayout, DiscountInput, type DiscountInputClassNames, type DiscountInputProps, ElementsProvider, EmptyState, type EmptyStateProps, ErrorState, type ErrorStateProps, FeaturedCollectionLayout, type FilterTabItem, FilterTabs, type FilterTabsProps, FoodProductCard, FoodProductLayout, HappeningCard, type HappeningCardProps, type HappeningPaneData, IdentityIcon, IdentityOfframp, type IdentityOfframpProps, type IdentitySummary, InventoryBadge, ItemsCard, type ItemsCardProps, LeaseServiceCard, LineItemDetails, type LineItemSemanticKind, type LineScheduling, type LineSelection, type LineStateTone, LocationPicker, type LocationPickerClassNames, type LocationPickerProps, MediaGallery, type MediaGalleryProps, type MediaItem, MetadataStringList, MobileAccountShell, type MobileAccountShellProps, MobileBackButton, MobileMoreButton, MobileTabBar, type MobileTabBarProps, type NavItem, NextDeliveryCard, type NextDeliveryCardProps, OrderDetailHeader, type OrderDetailHeaderProps, OrderDetailMetaPipe, OrderDetailPage, type OrderDetailPageClassNames, type OrderDetailPageProps, OrderHistory, type OrderHistoryClassNames, OrderHistoryPage, type OrderHistoryPageClassNames, type OrderHistoryPageProps, type OrderHistoryProps, type OrderItemData, OrderList, type OrderListProps, OrderRow, type OrderRowData, type OrderRowProps, type OrderRowStatus, type OrderStatusTone, OrderSummary, type OrderSummaryClassNames, type OrderSummaryProps, OrderTimeline, type OrderTimelineProps, OrderTotals, type OrderTotalsProps, type OrderViewDelivery, type OrderViewPayment, type OrderViewPaymentRow, OrdersIcon, OrdersIcon20, OvenIcon, PackageIcon, PaymentElement, type PrefetchMode, type PrefetchOptions, Price, type PriceProps, PriceRange, type PriceRangeProps, ProductCard, type ProductCardClassNames, type ProductCardProps, ProductCustomizer, type ProductCustomizerClassNames, type ProductCustomizerProps, ProductGrid, type ProductGridClassNames, type ProductGridProps, ProductImageGallery, type ProductImageGalleryProps, type ProductLayoutProps, ProductModel3D, type ProductModel3DProps, ProductPage, type ProductPageClassNames, type ProductPageProps, ProductSheet, type ProductSheetClassNames, type ProductSheetProps, ProductTemplate, PropertiesTable, QuantitySelector, type QuantitySelectorClassNames, type QuantitySelectorProps, QuickAddButton, RecentlyViewed, type RecentlyViewedClassNames, type RecentlyViewedProps, RecommendationCarousel, type RecommendationCarouselClassNames, type RecommendationCarouselProps, RelatedProductsSection, RentalServiceCard, type Resource, ResourcePicker, type ResourcePickerClassNames, type ResourcePickerProps, RetailProductCard, RichText, type RichTextProps, SaleBadge, type SaleBadgeClassNames, type SaleBadgeProps, SalePrice, type SalePriceClassNames, type SalePriceProps, SaleTeaser, type SaleTeaserProps, ScheduleServiceCard, SearchInput, type SearchInputClassNames, type SearchInputProps, type SearchLayoutProps, SearchPage, type SearchPageClassNames, type SearchPageProps, SearchTemplate, Section, SectionMore, type SectionMoreProps, type SectionProps, type ServiceCardLayoutProps, ServiceProductLayout, SessionMessageBanner, type SessionMessageBannerClassNames, type SessionMessageBannerProps, SignOutIcon, Skeleton, type SkeletonProps, SlotPicker, type SlotPickerClassNames, type SlotPickerProps, SoldOutOverlay, StaffPicker, type StaffPickerClassNames, type StaffPickerProps, StandardServiceCard, Status, type StatusProps, StoreNav, type StoreNavClassNames, type StoreNavProps, StoreVideo, type StoreVideoProps, SubscriptionCard, SubscriptionList, type SubscriptionListProps, SubscriptionRow, type SubscriptionRowData, type SubscriptionRowProps, SubscriptionsIcon, SubscriptionsIcon20, TagPills, TimePicker, type TimePickerClassNames, type TimePickerProps, type TimelineStep, type ToAccountOrderViewOptions, Toast, type ToastProps, type TotalsData, TwoColumnGrid, type UseActivityStateOptions, type UseActivityStateResult, type UseAttributeDefinitionsOptions, type UseAttributeDefinitionsResult, type UseAvailableSlotsOptions, type UseAvailableSlotsResult, type UseBillingPlansOptions, type UseBillingPlansResult, type UseBookingsOptions, type UseBookingsResult, type UseBootstrapOptions, type UseBootstrapResult, type UseBundlesOptions, type UseBundlesResult, type UseCartItem, type UseCartOptions, type UseCartResult, type UseCategoriesOptions, type UseCategoriesResult, type UseChatOptions, type UseChatResult, type UseCimplifySessionOptions, type UseCimplifySessionResult, type UseCollectionOptions, type UseCollectionResult, type UseCollectionsOptions, type UseCollectionsResult, type UseDealsOptions, type UseDealsResult, type UseDeliveryFeeOptions, type UseDeliveryFeeResult, type UseFxRateOptions, type UseFxRateResult, type UseLocationsOptions, type UseLocationsResult, type UseOrderOptions, type UseOrderResult, type UseOrdersOptions, type UseOrdersResult, type UseProductAvailabilityOptions, type UseProductAvailabilityResult, type UseProductDealsOptions, type UseProductDealsResult, type UseProductOptions, type UseProductPriceInput, type UseProductPriceResult, type UseProductResult, type UseProductSchedulesOptions, type UseProductSchedulesResult, type UseProductsOnSaleOptions, type UseProductsOnSaleResult, type UseProductsOptions, type UseProductsResult, type UsePropertyFacetsOptions, type UsePropertyFacetsResult, type UseQuoteInput, type UseQuoteOptions, type UseQuoteResult, type UseRecommendationsOptions, type UseRecommendationsResult, type UseSearchOptions, type UseSearchResult, type UseServiceAvailabilityOptions, type UseServiceAvailabilityResult, type UseServicesOptions, type UseServicesResult, type UseStoreCreditOptions, type UseStoreCreditResult, type UseTaxonomiesOptions, type UseTaxonomiesResult, type UseTaxonomyOptions, type UseTaxonomyPathOptions, type UseTaxonomyPathResult, type UseTaxonomyResult, type UseValidateDiscountOptions, type UseValidateDiscountResult, type UseVariantSelectorOptions, type UseVariantSelectorResult, type UserButtonLink, VariantSelector, type VariantSelectorClassNames, type VariantSelectorProps, VolumePricing, type VolumePricingClassNames, type VolumePricingProps, WelcomeCard, type WelcomeCardProps, WholesaleProductCard, WholesaleProductLayout, WishlistButton, cn, defaultBoundaryKind, getBoundaryLabels, prefetchProduct, prefetchProducts, resolveBoundaryKind, roomToResource, sanitizeRichTextHtml, stripHtmlToText, toAccountLineItem, toAccountLineItems, toAccountOrderView, useActivityState, useAds, useAttributeDefinitions, useAvailableSlots, useBillingPlans, useBookings, useBootstrap, useBundles, useCart, useCartDrawer, useCategories, useChat, useCheckout, useCimplify, useCimplifyClient, useCimplifySession, useCollection, useCollections, useDeals, useDeliveryFee, useDeliveryOptions, useElements, useElementsReady, useFxRate, useLocations, useOptionalCimplify, useOrder, useOrders, useProduct, useProductAvailability, useProductDeals, useProductPrice, useProductSchedules, useProducts, useProductsOnSale, usePropertyFacets, useQuote, useRecommendations, useSearch, useServiceAvailability, useServices, useStoreCredit, useSubscription, useSubscriptions, useTaxonomies, useTaxonomy, useTaxonomyPath, useValidateDiscount, useVariantSelector };
|
|
3919
|
+
interface ChatMarkdownProps {
|
|
3920
|
+
text: string;
|
|
3921
|
+
className?: string;
|
|
3922
|
+
/** True while this message is still receiving tokens — engages streamdown's
|
|
3923
|
+
* incomplete-markdown smoothing on capable browsers. */
|
|
3924
|
+
streaming?: boolean;
|
|
3925
|
+
}
|
|
3926
|
+
declare const ChatMarkdown: React$1.MemoExoticComponent<({ text, className, streaming, }: ChatMarkdownProps) => react_jsx_runtime.JSX.Element>;
|
|
3927
|
+
|
|
3928
|
+
interface ChatTimeline {
|
|
3929
|
+
bubbles: ChatMessage[];
|
|
3930
|
+
reactionsByTarget: Map<string, ChatMessage[]>;
|
|
3931
|
+
}
|
|
3932
|
+
/**
|
|
3933
|
+
* Reaction rows are references, not bubbles: group each onto its target via
|
|
3934
|
+
* the server-resolved `reply_to`, and drop any whose target isn't loaded —
|
|
3935
|
+
* an emoji must never render as a standalone message.
|
|
3936
|
+
*/
|
|
3937
|
+
declare function partitionMessages(messages: ChatMessage[]): ChatTimeline;
|
|
3938
|
+
|
|
3939
|
+
/**
|
|
3940
|
+
* Discriminated union representing every value that can appear in an
|
|
3941
|
+
* openui-lang expression. The `k` field is the discriminant.
|
|
3942
|
+
*
|
|
3943
|
+
* Literal & structural nodes:
|
|
3944
|
+
* - `Comp` — a component call: `Header("Hello", "Subtitle")`
|
|
3945
|
+
* - `Str` — a string literal: `"hello"`
|
|
3946
|
+
* - `Num` — a number literal: `42` or `3.14`
|
|
3947
|
+
* - `Bool` — a boolean literal: `true` or `false`
|
|
3948
|
+
* - `Null` — the null literal
|
|
3949
|
+
* - `Arr` — an array: `[a, b, c]`
|
|
3950
|
+
* - `Obj` — an object: `{ key: value }`
|
|
3951
|
+
* - `Ref` — a reference to another statement: `myTable`
|
|
3952
|
+
* - `Ph` — a placeholder for an unresolvable reference
|
|
3953
|
+
*
|
|
3954
|
+
* Reactive & expression nodes:
|
|
3955
|
+
* - `StateRef` — a reactive state variable reference: `$count`
|
|
3956
|
+
* - `RuntimeRef` — a reference resolved at runtime (e.g. Query results)
|
|
3957
|
+
* - `BinOp` — a binary operation: `a + b`, `x == y`
|
|
3958
|
+
* - `UnaryOp` — a unary operation: `!flag`
|
|
3959
|
+
* - `Ternary` — a conditional expression: `cond ? a : b`
|
|
3960
|
+
* - `Member` — dot member access: `obj.field`
|
|
3961
|
+
* - `Index` — bracket index access: `arr[0]`
|
|
3962
|
+
* - `Assign` — state assignment: `$count = $count + 1`
|
|
3963
|
+
*/
|
|
3964
|
+
type ASTNode = {
|
|
3965
|
+
k: "Comp";
|
|
3966
|
+
name: string;
|
|
3967
|
+
args: ASTNode[];
|
|
3968
|
+
mappedProps?: Record<string, ASTNode>;
|
|
3969
|
+
} | {
|
|
3970
|
+
k: "Str";
|
|
3971
|
+
v: string;
|
|
3972
|
+
} | {
|
|
3973
|
+
k: "Num";
|
|
3974
|
+
v: number;
|
|
3975
|
+
} | {
|
|
3976
|
+
k: "Bool";
|
|
3977
|
+
v: boolean;
|
|
3978
|
+
} | {
|
|
3979
|
+
k: "Null";
|
|
3980
|
+
} | {
|
|
3981
|
+
k: "Arr";
|
|
3982
|
+
els: ASTNode[];
|
|
3983
|
+
} | {
|
|
3984
|
+
k: "Obj";
|
|
3985
|
+
entries: [string, ASTNode][];
|
|
3986
|
+
} | {
|
|
3987
|
+
k: "Ref";
|
|
3988
|
+
n: string;
|
|
3989
|
+
} | {
|
|
3990
|
+
k: "Ph";
|
|
3991
|
+
n: string;
|
|
3992
|
+
} | {
|
|
3993
|
+
k: "StateRef";
|
|
3994
|
+
n: string;
|
|
3995
|
+
} | {
|
|
3996
|
+
k: "RuntimeRef";
|
|
3997
|
+
n: string;
|
|
3998
|
+
refType: "query" | "mutation";
|
|
3999
|
+
} | {
|
|
4000
|
+
k: "BinOp";
|
|
4001
|
+
op: string;
|
|
4002
|
+
left: ASTNode;
|
|
4003
|
+
right: ASTNode;
|
|
4004
|
+
} | {
|
|
4005
|
+
k: "UnaryOp";
|
|
4006
|
+
op: string;
|
|
4007
|
+
operand: ASTNode;
|
|
4008
|
+
} | {
|
|
4009
|
+
k: "Ternary";
|
|
4010
|
+
cond: ASTNode;
|
|
4011
|
+
then: ASTNode;
|
|
4012
|
+
else: ASTNode;
|
|
4013
|
+
} | {
|
|
4014
|
+
k: "Member";
|
|
4015
|
+
obj: ASTNode;
|
|
4016
|
+
field: string;
|
|
4017
|
+
} | {
|
|
4018
|
+
k: "Index";
|
|
4019
|
+
obj: ASTNode;
|
|
4020
|
+
index: ASTNode;
|
|
4021
|
+
} | {
|
|
4022
|
+
k: "Assign";
|
|
4023
|
+
target: string;
|
|
4024
|
+
value: ASTNode;
|
|
4025
|
+
};
|
|
4026
|
+
|
|
4027
|
+
interface ParamDef {
|
|
4028
|
+
/** Parameter name, e.g. "title", "columns". */
|
|
4029
|
+
name: string;
|
|
4030
|
+
/** Whether the parameter is required by the component. */
|
|
4031
|
+
required: boolean;
|
|
4032
|
+
/** Default value from JSON Schema — used when the required field is missing/null. */
|
|
4033
|
+
defaultValue?: unknown;
|
|
4034
|
+
}
|
|
4035
|
+
/** Internal parameter map for positional-arg to named-prop mapping. */
|
|
4036
|
+
type ParamMap = Map<string, {
|
|
4037
|
+
params: ParamDef[];
|
|
4038
|
+
}>;
|
|
4039
|
+
/**
|
|
4040
|
+
* A fully resolved component node from the parser.
|
|
4041
|
+
*
|
|
4042
|
+
* The parser converts openui-lang text into a tree of these nodes.
|
|
4043
|
+
* Each node represents one component invocation with its positional
|
|
4044
|
+
* arguments mapped into named `props` via the library's Zod key order.
|
|
4045
|
+
*/
|
|
4046
|
+
interface ElementNode {
|
|
4047
|
+
type: "element";
|
|
4048
|
+
/** Source variable name (e.g. "header" from `header = TextContent(...)`). Undefined for inline components. */
|
|
4049
|
+
statementId?: string;
|
|
4050
|
+
/** Component name as defined in the library (e.g. "Table", "BarChart"). */
|
|
4051
|
+
typeName: string;
|
|
4052
|
+
/** Named props produced by positional-to-named mapping in the parser. */
|
|
4053
|
+
props: Record<string, unknown>;
|
|
4054
|
+
/**
|
|
4055
|
+
* True when the parser hasn't received all tokens for this node yet
|
|
4056
|
+
* (streaming in progress).
|
|
4057
|
+
*/
|
|
4058
|
+
partial: boolean;
|
|
4059
|
+
/**
|
|
4060
|
+
* False when all props are static literals — evaluation can be skipped.
|
|
4061
|
+
* Undefined is treated as true (dynamic) for backward compatibility.
|
|
4062
|
+
*/
|
|
4063
|
+
hasDynamicProps?: boolean;
|
|
4064
|
+
}
|
|
4065
|
+
/**
|
|
4066
|
+
* Validation error codes for schema-related issues.
|
|
4067
|
+
*/
|
|
4068
|
+
type ValidationErrorCode = "missing-required" | "null-required" | "unknown-component" | "inline-reserved" | "excess-args";
|
|
4069
|
+
/**
|
|
4070
|
+
* A prop validation error. Components with missing required props are
|
|
4071
|
+
* dropped from the output tree and errors are recorded here.
|
|
4072
|
+
*/
|
|
4073
|
+
interface ValidationError {
|
|
4074
|
+
/** Machine-readable error code. */
|
|
4075
|
+
code: ValidationErrorCode;
|
|
4076
|
+
/** Component type name, e.g. "Header", "BarChart". */
|
|
4077
|
+
component: string;
|
|
4078
|
+
/** JSON Pointer path within the props object, e.g. "/title", "". */
|
|
4079
|
+
path: string;
|
|
4080
|
+
/** Human-readable error message. */
|
|
4081
|
+
message: string;
|
|
4082
|
+
/** Statement name that triggered the error (e.g. "header", "chart"). */
|
|
4083
|
+
statementId?: string;
|
|
4084
|
+
}
|
|
4085
|
+
/**
|
|
4086
|
+
* Extracted info about a Query() call from the parsed program.
|
|
4087
|
+
*/
|
|
4088
|
+
interface QueryStatementInfo {
|
|
4089
|
+
/** Statement name that holds this query (e.g. "metrics"). */
|
|
4090
|
+
statementId: string;
|
|
4091
|
+
/** First arg AST — the tool name (should evaluate to a string). */
|
|
4092
|
+
toolAST: ASTNode | null;
|
|
4093
|
+
/** Second arg AST — the arguments object (may contain $var refs). */
|
|
4094
|
+
argsAST: ASTNode | null;
|
|
4095
|
+
/** Third arg AST — default data returned before fetch resolves. */
|
|
4096
|
+
defaultsAST: ASTNode | null;
|
|
4097
|
+
/** Fourth arg AST — refresh interval in seconds. */
|
|
4098
|
+
refreshAST: ASTNode | null;
|
|
4099
|
+
/** Pre-computed $variable deps from argsAST (extracted at parse time). */
|
|
4100
|
+
deps?: string[];
|
|
4101
|
+
/** False while the Query() call is still being streamed. */
|
|
4102
|
+
complete: boolean;
|
|
4103
|
+
}
|
|
4104
|
+
/**
|
|
4105
|
+
* Extracted info about a Mutation() call from the parsed program.
|
|
4106
|
+
*/
|
|
4107
|
+
interface MutationStatementInfo {
|
|
4108
|
+
/** Statement name that holds this mutation (e.g. "createResult"). */
|
|
4109
|
+
statementId: string;
|
|
4110
|
+
/** First arg AST — the tool name (should evaluate to a string). */
|
|
4111
|
+
toolAST: ASTNode | null;
|
|
4112
|
+
/** Second arg AST — the arguments object (may contain $var refs). */
|
|
4113
|
+
argsAST: ASTNode | null;
|
|
4114
|
+
}
|
|
4115
|
+
/**
|
|
4116
|
+
* The output of a single `parser.parse(text)` call.
|
|
4117
|
+
*
|
|
4118
|
+
* During streaming, each chunk produces a new ParseResult as the
|
|
4119
|
+
* accumulated text is re-parsed. The `root` progressively resolves
|
|
4120
|
+
* from null → partial tree → complete tree.
|
|
4121
|
+
*/
|
|
4122
|
+
interface ParseResult {
|
|
4123
|
+
/** The root ElementNode (typically a Root component), or null if parsing hasn't produced one yet. */
|
|
4124
|
+
root: ElementNode | null;
|
|
4125
|
+
meta: {
|
|
4126
|
+
/** True if the parser detected truncated/incomplete input. */
|
|
4127
|
+
incomplete: boolean;
|
|
4128
|
+
/** Names of references used but not yet defined (dropped as null in output). */
|
|
4129
|
+
unresolved: string[];
|
|
4130
|
+
/** Names of value statements defined but not reachable from root. Excludes $state, Query, and Mutation declarations. */
|
|
4131
|
+
orphaned: string[];
|
|
4132
|
+
/** Total number of `identifier = Expression` statements parsed. */
|
|
4133
|
+
statementCount: number;
|
|
4134
|
+
/**
|
|
4135
|
+
* Prop validation errors. Components with missing required props are
|
|
4136
|
+
* redacted (dropped as null) and listed here.
|
|
4137
|
+
*/
|
|
4138
|
+
errors: ValidationError[];
|
|
4139
|
+
};
|
|
4140
|
+
/** $variable declarations — maps "$varName" to its materialized default value. */
|
|
4141
|
+
stateDeclarations: Record<string, unknown>;
|
|
4142
|
+
/** Extracted Query() calls with their positional args as AST nodes. */
|
|
4143
|
+
queryStatements: QueryStatementInfo[];
|
|
4144
|
+
/** Extracted Mutation() calls with their positional args as AST nodes. */
|
|
4145
|
+
mutationStatements: MutationStatementInfo[];
|
|
4146
|
+
}
|
|
4147
|
+
|
|
4148
|
+
/**
|
|
4149
|
+
* The Cimplify GenUI vocabulary — the component names, ordered params, and
|
|
4150
|
+
* descriptions the model is allowed to emit. This MUST stay in lockstep with
|
|
4151
|
+
* the iOS Swift registry (packages/ios/.../Render/GenUICimplifyLibrary.swift):
|
|
4152
|
+
* the capability-manifest fingerprint is the cross-surface contract, and the
|
|
4153
|
+
* fingerprint-parity tests on both sides fail when either copy drifts.
|
|
4154
|
+
*
|
|
4155
|
+
* Visual implementations are per-surface (SwiftUI on iOS, React maps on
|
|
4156
|
+
* desk/lite); only the vocabulary lives here.
|
|
4157
|
+
*/
|
|
4158
|
+
interface GenUIParamDef {
|
|
4159
|
+
name: string;
|
|
4160
|
+
required?: boolean;
|
|
4161
|
+
}
|
|
4162
|
+
interface GenUIComponentDef {
|
|
4163
|
+
name: string;
|
|
4164
|
+
description: string;
|
|
4165
|
+
params: GenUIParamDef[];
|
|
4166
|
+
}
|
|
4167
|
+
interface GenUIRegistry {
|
|
4168
|
+
version: string;
|
|
4169
|
+
components: GenUIComponentDef[];
|
|
4170
|
+
}
|
|
4171
|
+
declare const CIMPLIFY_GENUI_REGISTRY: GenUIRegistry;
|
|
4172
|
+
|
|
4173
|
+
/** Parser catalog derived from the vocabulary registry — positional args map
|
|
4174
|
+
* to named props in this exact order, so it must never be hand-built. */
|
|
4175
|
+
declare function genUICatalog(registry: GenUIRegistry): ParamMap;
|
|
4176
|
+
|
|
4177
|
+
/** One renderable slice of a message, in source order. */
|
|
4178
|
+
type GenUISegment = {
|
|
4179
|
+
kind: "prose";
|
|
4180
|
+
text: string;
|
|
4181
|
+
} | {
|
|
4182
|
+
kind: "program";
|
|
4183
|
+
source: string;
|
|
4184
|
+
};
|
|
4185
|
+
/**
|
|
4186
|
+
* Split message content into prose and ```genui program segments. An
|
|
4187
|
+
* unterminated fence (streaming, truncation) is treated as a program to its
|
|
4188
|
+
* end — the parser's last-good retention handles the partial tail.
|
|
4189
|
+
*/
|
|
4190
|
+
declare function splitGenUIContent(content: string): GenUISegment[];
|
|
4191
|
+
/**
|
|
4192
|
+
* One-line human preview of a message: prose only, GenUI fences elided.
|
|
4193
|
+
* Shared by reply quotes, composer reply bars, and list snippets — and
|
|
4194
|
+
* mirrored server-side for the customer wire's `reply_to.preview`.
|
|
4195
|
+
*/
|
|
4196
|
+
declare function messagePreview(content: string, max?: number): string;
|
|
4197
|
+
|
|
4198
|
+
/**
|
|
4199
|
+
* Parse a complete openui-lang string in one pass.
|
|
4200
|
+
*
|
|
4201
|
+
* @param input - Full openui-lang source text (may be partial/streaming)
|
|
4202
|
+
* @param cat - Param map for positional-arg → named-prop mapping
|
|
4203
|
+
* @returns ParseResult with root ElementNode (or null) and metadata
|
|
4204
|
+
*/
|
|
4205
|
+
declare function parse(input: string, cat: ParamMap, rootName?: string): ParseResult;
|
|
4206
|
+
|
|
4207
|
+
interface GenUIProgramState {
|
|
4208
|
+
result: ParseResult;
|
|
4209
|
+
/** Last parse that produced a root — retained through transiently broken
|
|
4210
|
+
* streaming states so the surface never blanks mid-stream. */
|
|
4211
|
+
root: ElementNode | null;
|
|
4212
|
+
}
|
|
4213
|
+
/**
|
|
4214
|
+
* Parse a (possibly still-streaming) GenUI program. Pass the full accumulated
|
|
4215
|
+
* text each render — the stream parser diffs internally and re-parses only
|
|
4216
|
+
* the trailing partial statement, and resets itself if the text was replaced
|
|
4217
|
+
* rather than appended.
|
|
4218
|
+
*/
|
|
4219
|
+
declare function useGenUIProgram(text: string, catalog: ParamMap): GenUIProgramState;
|
|
4220
|
+
|
|
4221
|
+
/** Fired when a Button carries a plain "action:name" string. */
|
|
4222
|
+
interface GenUIActionEvent {
|
|
4223
|
+
action: string;
|
|
4224
|
+
label: string;
|
|
4225
|
+
}
|
|
4226
|
+
interface GenUIRenderContext {
|
|
4227
|
+
/** Render any prop value (child element, array of children, or nothing). */
|
|
4228
|
+
render: (value: unknown) => ReactNode;
|
|
4229
|
+
onAction: (event: GenUIActionEvent) => void;
|
|
4230
|
+
isStreaming: boolean;
|
|
4231
|
+
}
|
|
4232
|
+
type GenUIComponentRenderer = (props: {
|
|
4233
|
+
node: ElementNode;
|
|
4234
|
+
ctx: GenUIRenderContext;
|
|
4235
|
+
}) => ReactNode;
|
|
4236
|
+
/** Per-surface visual implementations, keyed by vocabulary component name. */
|
|
4237
|
+
type GenUIComponentMap = Record<string, GenUIComponentRenderer>;
|
|
4238
|
+
interface GenUITelemetryEvent {
|
|
4239
|
+
kind: "unknown-component" | "dropped-node";
|
|
4240
|
+
typeName: string;
|
|
4241
|
+
}
|
|
4242
|
+
interface GenUIViewProps {
|
|
4243
|
+
root: ElementNode | null;
|
|
4244
|
+
components: GenUIComponentMap;
|
|
4245
|
+
onAction?: (event: GenUIActionEvent) => void;
|
|
4246
|
+
isStreaming?: boolean;
|
|
4247
|
+
onTelemetry?: (event: GenUITelemetryEvent) => void;
|
|
4248
|
+
/** Shown while streaming before the first complete root arrives. */
|
|
4249
|
+
placeholder?: ReactNode;
|
|
4250
|
+
}
|
|
4251
|
+
/**
|
|
4252
|
+
* Headless GenUI renderer: walks a parsed program tree and delegates every
|
|
4253
|
+
* node to the surface's component map (the same split as iOS, where the
|
|
4254
|
+
* registry vocabulary is shared and each surface owns its views).
|
|
4255
|
+
*/
|
|
4256
|
+
declare function GenUIView({ root, components, onAction, isStreaming, onTelemetry, placeholder, }: GenUIViewProps): ReactNode;
|
|
4257
|
+
|
|
4258
|
+
/**
|
|
4259
|
+
* Capability manifest + fingerprint — the cross-surface vocabulary contract.
|
|
4260
|
+
* The wire bytes must match the Swift side (GenUIPrompt.swift) exactly:
|
|
4261
|
+
* Swift encodes with JSONEncoder([.sortedKeys]), which emits compact JSON,
|
|
4262
|
+
* sorts object keys at every level, and escapes "/" as "\/". The fingerprint
|
|
4263
|
+
* is the first 16 hex chars of SHA-256 over those bytes. Parity is pinned by
|
|
4264
|
+
* tests on both sides; if you change either registry, both fail together.
|
|
4265
|
+
*/
|
|
4266
|
+
interface GenUIManifestParam {
|
|
4267
|
+
name: string;
|
|
4268
|
+
required: boolean;
|
|
4269
|
+
}
|
|
4270
|
+
interface GenUIManifestComponent {
|
|
4271
|
+
name: string;
|
|
4272
|
+
description: string;
|
|
4273
|
+
params: GenUIManifestParam[];
|
|
4274
|
+
}
|
|
4275
|
+
interface GenUICapabilityManifest {
|
|
4276
|
+
version: string;
|
|
4277
|
+
components: GenUIManifestComponent[];
|
|
4278
|
+
}
|
|
4279
|
+
declare function genUIManifest(registry: GenUIRegistry): GenUICapabilityManifest;
|
|
4280
|
+
/** Swift-JSONEncoder-equivalent bytes for the manifest. */
|
|
4281
|
+
declare function genUIManifestJson(manifest: GenUICapabilityManifest): string;
|
|
4282
|
+
/** First 16 hex chars of SHA-256 over the canonical manifest bytes. */
|
|
4283
|
+
declare function genUIFingerprint(manifest: GenUICapabilityManifest): Promise<string>;
|
|
4284
|
+
|
|
4285
|
+
export { AccommodationCard, AccountContent, type AccountContentProps, AccountDashboardPage, type AccountDashboardPageProps, AccountHero, type AccountHeroProps, AccountIdentityStrip, type AccountIdentityStripProps, AccountLineItem, type AccountLineItemData, type AccountLineItemProps, AccountLineItems, type AccountLineItemsProps, AccountNav, type AccountNavProps, AccountOrderDetailPage, type AccountOrderDetailPageProps, AccountOrderView, type AccountOrderViewProps, AccountOrdersPage, type AccountOrdersPageProps, type AccountPageBaseProps, AccountShell, type AccountShellProps, AccountSidebar, type AccountSidebarProps, AccountSignedOutPrompt, type AccountSignedOutPromptProps, AccountSubscriptionDetailPage, type AccountSubscriptionDetailPageProps, AccountSubscriptionsPage, type AccountSubscriptionsPageProps, Ad, AdPosition, type AdProps, AdProvider, AdSlot, AddOnSelector, type AddOnSelectorClassNames, type AddOnSelectorProps, type AddToCartOptions, AddressAutocomplete, type AddressAutocompleteClassNames, type AddressAutocompleteProps, AddressElement, AuthElement, AvailabilityBadge, type AvailabilityBadgeClassNames, type AvailabilityBadgeProps, BackLink, type BackLinkProps, BillingPlanSelector, type BillingPlanSelectorClassNames, type BillingPlanSelectorProps, BookingCard, type BookingCardClassNames, type BookingCardProps, BookingList, type BookingListClassNames, type BookingListProps, BookingPage, type BookingPageClassNames, type BookingPageProps, BookingSummary, type BookingSummaryClassNames, type BookingSummaryProps, BookingsPage, type BookingsPageClassNames, type BookingsPageProps, type BoundaryLabels, BoxIcon24, BundleProductCard, BundleProductLayout, BundleSelector, type BundleSelectorClassNames, type BundleSelectorProps, Button, type ButtonProps, CIMPLIFY_GENUI_REGISTRY, CardImage, type CardLayoutProps, CardShell, CardVariant, type CartAddOnOptionSelection, CartDrawer, type CartDrawerProps, CartDrawerProvider, type CartLayoutProps, CartPage, type CartPageClassNames, type CartPageProps, CartSummary, type CartSummaryClassNames, type CartSummaryProps, CartTemplate, type CartVariantSelection, CatalogueCollectionLayout, type CatalogueLayoutProps, CataloguePage, type CataloguePageClassNames, type CataloguePageProps, CatalogueTemplate, CategoryFilter, type CategoryFilterClassNames, type CategoryFilterProps, CategoryGrid, type CategoryGridClassNames, type CategoryGridProps, ChatMarkdown, type ChatMarkdownProps, type ChatTimeline, ChatWidget, type ChatWidgetClassNames, type ChatWidgetProps, CheckIcon, CheckoutPage, type CheckoutPageClassNames, type CheckoutPageProps, CimplifyCheckout, type CimplifyCheckoutProps, type CimplifyClientContextValue, type CimplifyClientSession, type CimplifyContextValue, type CimplifyLinkComponent, type CimplifyLinkProps, CimplifyProvider, type CimplifyProviderProps, CimplifySignInButton, type CimplifySignInButtonProps, CimplifyUserButton, type CimplifyUserButtonProps, type CollectionLayoutProps, CollectionPage, type CollectionPageClassNames, type CollectionPageProps, CollectionTemplate, CompactCartLayout, CompactCatalogueLayout, CompactSearchLayout, CompactServiceCard, CompositeProductCard, CompositeProductLayout, CompositeSelector, type CompositeSelectorClassNames, type CompositeSelectorProps, ContextCard, type ContextCardProps, type ContextRow, ContinuityCard, type ContinuityCardProps, CurrencySelector, type CurrencySelectorClassNames, type CurrencySelectorProps, CustomAttributesTable, type CustomerInput, CustomerInputFields, type CustomerInputFieldsClassNames, type CustomerInputFieldsProps, type CustomerInputType, DashboardIcon, DashboardIcon20, DatePicker, type DatePickerClassNames, type DatePickerProps, DateSlotPicker, type DateSlotPickerClassNames, type DateSlotPickerProps, DealBanner, type DealBannerClassNames, type DealBannerProps, DealsPage, type DealsPageClassNames, type DealsPageProps, DefaultCartLayout, DefaultCatalogueLayout, DefaultCollectionLayout, DefaultProductLayout, DefaultSearchLayout, DeliveryEstimate, type DeliveryEstimateClassNames, type DeliveryEstimateProps, type DeliveryLive, type DeliveryRider, DeliveryTracker, type DeliveryTrackerProps, DeliveryTruckIcon, type DigitalFulfillment, DigitalProductCard, DigitalProductLayout, DiscountInput, type DiscountInputClassNames, type DiscountInputProps, ElementsProvider, EmptyState, type EmptyStateProps, ErrorState, type ErrorStateProps, FeaturedCollectionLayout, type FilterTabItem, FilterTabs, type FilterTabsProps, FoodProductCard, FoodProductLayout, type GenUIActionEvent, type GenUICapabilityManifest, type GenUIComponentDef, type GenUIComponentMap, type GenUIComponentRenderer, type ElementNode as GenUIElementNode, type GenUIParamDef, type ParseResult as GenUIParseResult, type GenUIProgramState, type GenUIRegistry, type GenUIRenderContext, type GenUISegment, type GenUITelemetryEvent, GenUIView, HappeningCard, type HappeningCardProps, type HappeningPaneData, IdentityIcon, IdentityOfframp, type IdentityOfframpProps, type IdentitySummary, InventoryBadge, ItemsCard, type ItemsCardProps, LeaseServiceCard, LineItemDetails, type LineItemSemanticKind, type LineScheduling, type LineSelection, type LineStateTone, LocationPicker, type LocationPickerClassNames, type LocationPickerProps, MediaGallery, type MediaGalleryProps, type MediaItem, MetadataStringList, MobileAccountShell, type MobileAccountShellProps, MobileBackButton, MobileMoreButton, MobileTabBar, type MobileTabBarProps, type NavItem, NextDeliveryCard, type NextDeliveryCardProps, OrderDetailHeader, type OrderDetailHeaderProps, OrderDetailMetaPipe, OrderDetailPage, type OrderDetailPageClassNames, type OrderDetailPageProps, OrderHistory, type OrderHistoryClassNames, OrderHistoryPage, type OrderHistoryPageClassNames, type OrderHistoryPageProps, type OrderHistoryProps, type OrderItemData, OrderList, type OrderListProps, OrderRow, type OrderRowData, type OrderRowProps, type OrderRowStatus, type OrderStatusTone, OrderSummary, type OrderSummaryClassNames, type OrderSummaryProps, OrderTimeline, type OrderTimelineProps, OrderTotals, type OrderTotalsProps, type OrderViewDelivery, type OrderViewPayment, type OrderViewPaymentRow, OrdersIcon, OrdersIcon20, OvenIcon, PackageIcon, PaymentElement, type PrefetchMode, type PrefetchOptions, Price, type PriceProps, PriceRange, type PriceRangeProps, ProductCard, type ProductCardClassNames, type ProductCardProps, ProductCustomizer, type ProductCustomizerClassNames, type ProductCustomizerProps, ProductGrid, type ProductGridClassNames, type ProductGridProps, ProductImageGallery, type ProductImageGalleryProps, type ProductLayoutProps, ProductModel3D, type ProductModel3DProps, ProductPage, type ProductPageClassNames, type ProductPageProps, ProductSheet, type ProductSheetClassNames, type ProductSheetProps, ProductTemplate, PropertiesTable, QuantitySelector, type QuantitySelectorClassNames, type QuantitySelectorProps, QuickAddButton, RecentlyViewed, type RecentlyViewedClassNames, type RecentlyViewedProps, RecommendationCarousel, type RecommendationCarouselClassNames, type RecommendationCarouselProps, RelatedProductsSection, RentalServiceCard, type Resource, ResourcePicker, type ResourcePickerClassNames, type ResourcePickerProps, RetailProductCard, RichText, type RichTextProps, SaleBadge, type SaleBadgeClassNames, type SaleBadgeProps, SalePrice, type SalePriceClassNames, type SalePriceProps, SaleTeaser, type SaleTeaserProps, ScheduleServiceCard, SearchInput, type SearchInputClassNames, type SearchInputProps, type SearchLayoutProps, SearchPage, type SearchPageClassNames, type SearchPageProps, SearchTemplate, Section, SectionMore, type SectionMoreProps, type SectionProps, type ServiceCardLayoutProps, ServiceProductLayout, SessionMessageBanner, type SessionMessageBannerClassNames, type SessionMessageBannerProps, SignOutIcon, Skeleton, type SkeletonProps, SlotPicker, type SlotPickerClassNames, type SlotPickerProps, SoldOutOverlay, StaffPicker, type StaffPickerClassNames, type StaffPickerProps, StandardServiceCard, Status, type StatusProps, StoreNav, type StoreNavClassNames, type StoreNavProps, StoreVideo, type StoreVideoProps, SubscriptionCard, SubscriptionList, type SubscriptionListProps, SubscriptionRow, type SubscriptionRowData, type SubscriptionRowProps, SubscriptionsIcon, SubscriptionsIcon20, TagPills, TimePicker, type TimePickerClassNames, type TimePickerProps, type TimelineStep, type ToAccountOrderViewOptions, Toast, type ToastProps, type TotalsData, TwoColumnGrid, type UseActivityStateOptions, type UseActivityStateResult, type UseAttributeDefinitionsOptions, type UseAttributeDefinitionsResult, type UseAvailableSlotsOptions, type UseAvailableSlotsResult, type UseBillingPlansOptions, type UseBillingPlansResult, type UseBookingsOptions, type UseBookingsResult, type UseBootstrapOptions, type UseBootstrapResult, type UseBundlesOptions, type UseBundlesResult, type UseCartItem, type UseCartOptions, type UseCartResult, type UseCategoriesOptions, type UseCategoriesResult, type UseChatOptions, type UseChatResult, type UseCimplifySessionOptions, type UseCimplifySessionResult, type UseCollectionOptions, type UseCollectionResult, type UseCollectionsOptions, type UseCollectionsResult, type UseDealsOptions, type UseDealsResult, type UseDeliveryFeeOptions, type UseDeliveryFeeResult, type UseFxRateOptions, type UseFxRateResult, type UseLocationsOptions, type UseLocationsResult, type UseOrderOptions, type UseOrderResult, type UseOrdersOptions, type UseOrdersResult, type UseProductAvailabilityOptions, type UseProductAvailabilityResult, type UseProductDealsOptions, type UseProductDealsResult, type UseProductOptions, type UseProductPriceInput, type UseProductPriceResult, type UseProductResult, type UseProductSchedulesOptions, type UseProductSchedulesResult, type UseProductsOnSaleOptions, type UseProductsOnSaleResult, type UseProductsOptions, type UseProductsResult, type UsePropertyFacetsOptions, type UsePropertyFacetsResult, type UseQuoteInput, type UseQuoteOptions, type UseQuoteResult, type UseRecommendationsOptions, type UseRecommendationsResult, type UseSearchOptions, type UseSearchResult, type UseServiceAvailabilityOptions, type UseServiceAvailabilityResult, type UseServicesOptions, type UseServicesResult, type UseStoreCreditOptions, type UseStoreCreditResult, type UseTaxonomiesOptions, type UseTaxonomiesResult, type UseTaxonomyOptions, type UseTaxonomyPathOptions, type UseTaxonomyPathResult, type UseTaxonomyResult, type UseValidateDiscountOptions, type UseValidateDiscountResult, type UseVariantSelectorOptions, type UseVariantSelectorResult, type UserButtonLink, VariantSelector, type VariantSelectorClassNames, type VariantSelectorProps, VolumePricing, type VolumePricingClassNames, type VolumePricingProps, WelcomeCard, type WelcomeCardProps, WholesaleProductCard, WholesaleProductLayout, WishlistButton, clearOrdersCache, cn, createPlacesSessionToken, defaultBoundaryKind, genUICatalog, genUIFingerprint, genUIManifest, genUIManifestJson, getBoundaryLabels, isImageAttachment, isTerminalOrderStatus, messagePreview, parse as parseGenUIProgram, partitionMessages, prefetchProduct, prefetchProducts, resolveBoundaryKind, roomToResource, sanitizeRichTextHtml, splitGenUIContent, stripHtmlToText, toAccountLineItem, toAccountLineItems, toAccountOrderView, useActivityState, useAds, useAttributeDefinitions, useAvailableSlots, useBillingPlans, useBookings, useBootstrap, useBundles, useCart, useCartDrawer, useCategories, useChat, useCheckout, useCimplify, useCimplifyClient, useCimplifySession, useCollection, useCollections, useDeals, useDeliveryFee, useDeliveryOptions, useElements, useElementsReady, useFxRate, useGenUIProgram, useLocations, useOptionalCimplify, useOrder, useOrders, useProduct, useProductAvailability, useProductDeals, useProductPrice, useProductSchedules, useProducts, useProductsOnSale, usePropertyFacets, useQuote, useRecommendations, useSearch, useServiceAvailability, useServices, useStoreCredit, useSubscription, useSubscriptions, useTaxonomies, useTaxonomy, useTaxonomyPath, useValidateDiscount, useVariantSelector };
|