@session-services/web-elements 0.1.28 → 0.1.31

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 (37) hide show
  1. package/README.md +5 -0
  2. package/dist/cjs/{index-BYBgrATL.js → index-B2ZmNnji.js} +292 -245
  3. package/dist/cjs/loader.cjs.js +2 -2
  4. package/dist/cjs/session-services-elements.cjs.js +3 -3
  5. package/dist/cjs/session-services-formatted-text.cjs.entry.js +8 -20
  6. package/dist/cjs/session-services-ticketing.cjs.entry.js +2188 -23012
  7. package/dist/collection/collection-manifest.json +4 -3
  8. package/dist/collection/components/session-services-ticketing/bot-detection.js +83 -0
  9. package/dist/collection/components/session-services-ticketing/bot-detection.test.js +74 -0
  10. package/dist/collection/components/session-services-ticketing/session-services-ticketing.css +164 -36
  11. package/dist/collection/components/session-services-ticketing/session-services-ticketing.js +811 -262
  12. package/dist/collection/components/session-services-ticketing/session-services-ticketing.logic.js +39 -8
  13. package/dist/collection/components/session-services-ticketing/session-services-ticketing.logic.test.js +47 -3
  14. package/dist/collection/components/session-services-ticketing/session-services-ticketing.test.js +611 -20
  15. package/dist/components/index.d.ts +2 -0
  16. package/dist/components/index.js +1 -1311
  17. package/dist/components/session-services-formatted-text.js +1 -1802
  18. package/dist/components/session-services-ticketing.js +1 -25072
  19. package/dist/esm/{index-CNOpF6tk.js → index-DhbVMqIT.js} +292 -245
  20. package/dist/esm/loader.js +3 -3
  21. package/dist/esm/session-services-elements.js +4 -4
  22. package/dist/esm/session-services-formatted-text.entry.js +8 -20
  23. package/dist/esm/session-services-ticketing.entry.js +2188 -23012
  24. package/dist/session-services-elements/{p-703444ed.entry.js → p-8483ca88.entry.js} +1 -1
  25. package/dist/session-services-elements/p-DhbVMqIT.js +2 -0
  26. package/dist/session-services-elements/p-d7264f6b.entry.js +1 -0
  27. package/dist/session-services-elements/session-services-elements.esm.js +1 -1
  28. package/dist/types/components/session-services-ticketing/bot-detection.d.ts +13 -0
  29. package/dist/types/components/session-services-ticketing/bot-detection.test.d.ts +1 -0
  30. package/dist/types/components/session-services-ticketing/session-services-ticketing.d.ts +67 -9
  31. package/dist/types/components/session-services-ticketing/session-services-ticketing.logic.d.ts +11 -2
  32. package/dist/types/components.d.ts +36 -8
  33. package/dist/types/index.d.ts +1 -1
  34. package/dist/types/stencil-public-runtime.d.ts +67 -5
  35. package/package.json +15 -11
  36. package/dist/session-services-elements/p-1acfcdfd.entry.js +0 -1
  37. package/dist/session-services-elements/p-CNOpF6tk.js +0 -2
@@ -1 +1 @@
1
- import{p as e,b as t}from"./p-CNOpF6tk.js";export{s as setNonce}from"./p-CNOpF6tk.js";import{g as o}from"./p-DQuL1Twl.js";(()=>{const t=import.meta.url,o={};return""!==t&&(o.resourcesUrl=new URL(".",t).href),e(o)})().then((async e=>(await o(),t([["p-703444ed",[[769,"session-services-formatted-text",{text:[1],theme:[1],currentTheme:[32],segments:[32]},null,{text:["textChanged"],theme:["themeChanged"]}]]],["p-1acfcdfd",[[769,"session-services-ticketing",{tenantId:[1,"tenant-id"],eventId:[1,"event-id"],apiUrl:[1,"api-url"],locale:[1],returnUrl:[1,"return-url"],couponCode:[1,"coupon-code"],initialAdmissionPrices:[1,"initial-admission-prices"],initialPreviewQuote:[1,"initial-preview-quote"],passcode:[1],stickyCheckout:[4,"sticky-checkout"],theme:[1],enableAnalytics:[4,"enable-analytics"],debugAnalytics:[4,"debug-analytics"],event:[32],selectedItems:[32],quote:[32],previewQuote:[32],loading:[32],error:[32],quoteLoading:[32],previewLoading:[32],quoteError:[32],couponError:[32],couponInput:[32],appliedCouponCode:[32],passcodeInput:[32],activePasscode:[32],passcodeDenied:[32],selectionPrompt:[32],checkoutLoading:[32],currentTheme:[32],openModalAdmissionId:[32]},null,{tenantId:["propsChanged"],eventId:["propsChanged"],apiUrl:["propsChanged"],passcode:["propsChanged"],couponCode:["couponCodeChanged"],initialAdmissionPrices:["couponCodeChanged"],initialPreviewQuote:["couponCodeChanged"],theme:["themeChanged"]}]]]],e))));
1
+ import{p as e,b as o}from"./p-DhbVMqIT.js";export{s as setNonce}from"./p-DhbVMqIT.js";import{g as n}from"./p-DQuL1Twl.js";(()=>{const o=import.meta.url,n={};return""!==o&&(n.resourcesUrl=new URL(".",o).href),e(n)})().then((async e=>(await n(),o([["p-8483ca88",[[513,"session-services-formatted-text",{text:[1],theme:[1],currentTheme:[32],segments:[32]},null,{text:[{textChanged:0}],theme:[{themeChanged:0}]}]]],["p-d7264f6b",[[513,"session-services-ticketing",{tenantId:[1,"tenant-id"],eventId:[1,"event-id"],apiUrl:[1,"api-url"],locale:[1],returnUrl:[1,"return-url"],couponCode:[1,"coupon-code"],initialAdmissionPrices:[1,"initial-admission-prices"],initialPreviewQuote:[1,"initial-preview-quote"],passcode:[1],stickyCheckout:[4,"sticky-checkout"],theme:[1],enableAnalytics:[4,"enable-analytics"],debugAnalytics:[4,"debug-analytics"],event:[32],selectedItems:[32],quote:[32],previewQuote:[32],initialLoading:[32],eventLoading:[32],retryLoading:[32],passcodeLoading:[32],error:[32],errorKind:[32],refreshError:[32],quoteLoading:[32],previewLoading:[32],quoteError:[32],couponError:[32],couponInput:[32],appliedCouponCode:[32],passcodeInput:[32],activePasscode:[32],passcodeDenied:[32],selectionPrompt:[32],checkoutLoading:[32],checkoutError:[32],currentTheme:[32],openModalAdmissionId:[32],verificationRequired:[32]},null,{tenantId:[{propsChanged:0}],eventId:[{propsChanged:0}],apiUrl:[{propsChanged:0}],passcode:[{propsChanged:0}],couponCode:[{couponCodeChanged:0}],initialAdmissionPrices:[{couponCodeChanged:0}],initialPreviewQuote:[{couponCodeChanged:0}],theme:[{themeChanged:0}]}]]]],e))));
@@ -0,0 +1,13 @@
1
+ export type BotSignal = "automation-user-agent" | "chromedriver" | "phantomjs" | "playwright" | "puppeteer" | "selenium" | "webdriver";
2
+ export type BotDetection = {
3
+ bot: boolean;
4
+ signals: BotSignal[];
5
+ };
6
+ export type BotEnvironment = {
7
+ globals: object;
8
+ root: Pick<Element, "hasAttribute">;
9
+ userAgent: string;
10
+ webdriver: boolean;
11
+ };
12
+ export declare function detectBot(env?: BotEnvironment): BotDetection;
13
+ export declare function isProductionApi(apiUrl: string): boolean;
@@ -1,6 +1,15 @@
1
1
  import type { DetailedEvent, OrderQuote } from "@session-services/sdk/schemas";
2
2
  import { type EventEmitter } from "../../stencil-public-runtime";
3
3
  import { type SelectionKey } from "./session-services-ticketing.logic";
4
+ export type AnalyticsSkipReason = "analytics_initialization_failed" | "analytics_not_initialized" | "missing_event" | "missing_promoter_id" | "missing_team_id";
5
+ export type AnalyticsEventSkipped = {
6
+ eventType: string;
7
+ eventId: string;
8
+ reason: AnalyticsSkipReason;
9
+ promoterId?: string;
10
+ teamId?: string;
11
+ };
12
+ type ErrorKind = "configuration" | "not_found" | "access" | "transient";
4
13
  export declare class SessionsTicketing {
5
14
  host: HTMLElement;
6
15
  tenantId: string;
@@ -24,8 +33,13 @@ export declare class SessionsTicketing {
24
33
  selectedItems: Map<SelectionKey, number>;
25
34
  quote: OrderQuote | null;
26
35
  previewQuote: OrderQuote | null;
27
- loading: boolean;
36
+ initialLoading: boolean;
37
+ eventLoading: boolean;
38
+ retryLoading: boolean;
39
+ passcodeLoading: boolean;
28
40
  error: string | null;
41
+ errorKind: ErrorKind | null;
42
+ refreshError: string | null;
29
43
  quoteLoading: boolean;
30
44
  previewLoading: boolean;
31
45
  quoteError: string | null;
@@ -37,30 +51,59 @@ export declare class SessionsTicketing {
37
51
  passcodeDenied: boolean;
38
52
  selectionPrompt: boolean;
39
53
  checkoutLoading: boolean;
54
+ checkoutError: string | null;
40
55
  currentTheme: "light" | "dark";
41
56
  openModalAdmissionId: string | null;
57
+ verificationRequired: boolean;
42
58
  checkoutInit: EventEmitter<{
43
- orderId: string;
44
- checkoutUrl: string;
59
+ orderId?: string;
60
+ checkoutUrl?: string;
45
61
  }>;
46
62
  cartUpdate: EventEmitter<OrderQuote>;
47
63
  errorOccurred: EventEmitter<{
48
64
  error: string;
49
65
  }>;
66
+ analyticsEventSkipped: EventEmitter<AnalyticsEventSkipped>;
50
67
  private client;
51
68
  private analytics?;
52
69
  private mediaQueryList?;
53
70
  private requestId;
54
71
  private previewRequestId;
72
+ private eventRequestId;
73
+ private checkoutRequestId;
74
+ private couponRequestId;
75
+ private initializeId;
76
+ private initialSettled;
77
+ private active;
78
+ private trackedIdentity?;
79
+ private quoteRevision?;
80
+ private checkoutIdempotencyKeys;
81
+ private eventController?;
82
+ private quoteController?;
83
+ private previewController?;
84
+ private checkoutController?;
85
+ private couponController?;
55
86
  private quoteTimer?;
56
87
  private promptTimer?;
57
- componentWillLoad(): Promise<void>;
58
- propsChanged(): Promise<void>;
59
- couponCodeChanged(): Promise<void>;
88
+ private botBypassed;
89
+ private modalTrigger?;
90
+ private modalFocusPending;
91
+ private modalRestorePending;
92
+ connectedCallback(): void;
93
+ componentWillLoad(): void;
94
+ componentDidRender(): void;
95
+ propsChanged(): void;
96
+ couponCodeChanged(): void;
60
97
  themeChanged(): void;
61
98
  disconnectedCallback(): void;
62
99
  private handleDiscountQueryChange;
100
+ private continueAfterVerification;
101
+ private startInitialization;
102
+ private handleInitializationError;
63
103
  private initializeComponent;
104
+ private handleLoadedEvent;
105
+ private finishInitialLoad;
106
+ private invalidateRequests;
64
107
  private setInitialCoupon;
65
108
  private initialCouponCode;
66
109
  private parsedInitialPreviewQuote;
@@ -70,15 +113,18 @@ export declare class SessionsTicketing {
70
113
  private setupTheme;
71
114
  private handleSystemThemeChange;
72
115
  private trackEvent;
116
+ private analyticsProperties;
117
+ private analyticsForEvent;
73
118
  private analyticsContext;
74
- private activeAnalytics;
75
- private analyticsEvent;
119
+ private emitAnalyticsEventSkipped;
76
120
  private getLowestPrice;
77
121
  private getAdmissionListProducts;
78
122
  private loadEventData;
123
+ private isEventRequestCurrent;
79
124
  private pruneSelectedItems;
80
125
  private trackLoadedEvent;
81
126
  private setupAnalytics;
127
+ private trackPageViewed;
82
128
  private trackProductViewed;
83
129
  private updateQuantity;
84
130
  private setQuantity;
@@ -90,12 +136,15 @@ export declare class SessionsTicketing {
90
136
  private updateQuote;
91
137
  private scheduleQuoteUpdate;
92
138
  private clearQuoteTimer;
139
+ private invalidateQuote;
93
140
  private clearPromptTimer;
94
141
  private promptTicketSelection;
95
142
  private getQuoteRequestItems;
96
143
  private fetchCartQuote;
97
144
  private applyQuote;
98
145
  private handleQuoteError;
146
+ private quoteRevisionFor;
147
+ private currentQuoteRevision;
99
148
  private updatePreviewQuote;
100
149
  private fetchPreviewQuote;
101
150
  private handleCouponInput;
@@ -105,7 +154,8 @@ export declare class SessionsTicketing {
105
154
  private applyCartCoupon;
106
155
  private applyPreviewCoupon;
107
156
  private removeCartCoupon;
108
- private handleCouponError;
157
+ private isCouponOperationCurrent;
158
+ private isPreviewCouponOperationCurrent;
109
159
  private setCouponError;
110
160
  private trackCouponEntered;
111
161
  private trackCouponApplied;
@@ -113,7 +163,10 @@ export declare class SessionsTicketing {
113
163
  private trackCouponRemoved;
114
164
  private handlePasscodeInput;
115
165
  private submitPasscode;
166
+ private retryEventLoad;
116
167
  private initiateCheckout;
168
+ private getCheckoutIdempotencyKey;
169
+ private isCheckoutRequestCurrent;
117
170
  private trackCheckoutStarted;
118
171
  private trackExternalTicketClick;
119
172
  private getCheckoutItems;
@@ -129,6 +182,7 @@ export declare class SessionsTicketing {
129
182
  private getQuoteAdmission;
130
183
  private getQuoteSection;
131
184
  private formatDateTimeRange;
185
+ private dateFormatter;
132
186
  private formatPriceValue;
133
187
  private handleQuantityDecrease;
134
188
  private handleQuantityIncrease;
@@ -159,6 +213,8 @@ export declare class SessionsTicketing {
159
213
  private renderSectionWithAdmissions;
160
214
  private renderLoadingState;
161
215
  private renderErrorState;
216
+ private renderUpdatingState;
217
+ private renderVerificationState;
162
218
  private renderPasscodeState;
163
219
  private renderNotFoundState;
164
220
  private renderCouponPanel;
@@ -180,6 +236,7 @@ export declare class SessionsTicketing {
180
236
  private renderDoorAlert;
181
237
  private loadingView;
182
238
  private errorView;
239
+ private verificationView;
183
240
  private missingEventView;
184
241
  private pendingView;
185
242
  private renderReadyState;
@@ -187,3 +244,4 @@ export declare class SessionsTicketing {
187
244
  private renderUnavailableState;
188
245
  render(): any;
189
246
  }
247
+ export {};
@@ -75,8 +75,11 @@ export declare function visibleAdmissions(event: DetailedEvent, mode: TicketingM
75
75
  base: number;
76
76
  booking: number;
77
77
  currency: "AUD" | "AED" | "ALL" | "AMD" | "ANG" | "AOA" | "ARS" | "AWG" | "AZN" | "BAM" | "BBD" | "BDT" | "BGN" | "BHD" | "BIF" | "BMD" | "BND" | "BOB" | "BRL" | "BSD" | "BTN" | "BWP" | "BZD" | "CAD" | "CHF" | "CLP" | "CNY" | "COP" | "CRC" | "CVE" | "CZK" | "DJF" | "DKK" | "DOP" | "DZD" | "EGP" | "ERN" | "ETB" | "EUR" | "FJD" | "FKP" | "GBP" | "GEL" | "GHS" | "GIP" | "GMD" | "GNF" | "GTQ" | "GYD" | "HKD" | "HNL" | "HUF" | "IDR" | "ILS" | "INR" | "ISK" | "JMD" | "JOD" | "JPY" | "KES" | "KGS" | "KHR" | "KMF" | "KRW" | "KWD" | "KYD" | "KZT" | "LAK" | "LBP" | "LKR" | "LRD" | "LSL" | "LYD" | "MAD" | "MDL" | "MGA" | "MKD" | "MNT" | "MOP" | "MUR" | "MVR" | "MWK" | "MXN" | "MYR" | "NAD" | "NGN" | "NIO" | "NOK" | "NPR" | "NZD" | "OMR" | "PAB" | "PEN" | "PGK" | "PHP" | "PKR" | "PLN" | "PYG" | "QAR" | "RON" | "RSD" | "RWF" | "SAR" | "SBD" | "SCR" | "SEK" | "SGD" | "SHP" | "SLE" | "SRD" | "SVC" | "SZL" | "THB" | "TJS" | "TMT" | "TND" | "TOP" | "TRY" | "TTD" | "TWD" | "TZS" | "UAH" | "UGX" | "USD" | "UYU" | "UZS" | "VND" | "VUV" | "WST" | "XAF" | "XCD" | "XOF" | "XPF" | "ZAR" | "ZMW" | "ZWL";
78
+ override?: {
79
+ booking: number;
80
+ };
78
81
  };
79
- visibility: "ALWAYS" | "HIDDEN";
82
+ visibility: "ALWAYS" | "HIDDEN" | "AFTER_ADMISSION";
80
83
  teamId: string;
81
84
  promoterId: string;
82
85
  eventId: string;
@@ -89,12 +92,14 @@ export declare function visibleAdmissions(event: DetailedEvent, mode: TicketingM
89
92
  reserved?: number;
90
93
  createdAt?: string;
91
94
  updatedAt?: string;
95
+ visibleAfterAdmissionId?: string;
92
96
  sectionId?: string;
93
97
  }[];
94
98
  export declare function topLevelTicketItems(sections: Section[], admissions: Admission[], input?: AdmissionStackingInput): TopLevelItem[];
95
99
  export declare function getAdmissionDisplayState(input: {
96
100
  admission: Admission;
97
101
  event: DetailedEvent;
102
+ locale?: string;
98
103
  section?: Section;
99
104
  sectionSoldOut?: boolean;
100
105
  }): AdmissionDisplayState;
@@ -135,8 +140,11 @@ export declare function quoteItemsBySelection(quote: OrderQuote | null): Map<str
135
140
  base: number;
136
141
  booking: number;
137
142
  currency: "AUD" | "AED" | "ALL" | "AMD" | "ANG" | "AOA" | "ARS" | "AWG" | "AZN" | "BAM" | "BBD" | "BDT" | "BGN" | "BHD" | "BIF" | "BMD" | "BND" | "BOB" | "BRL" | "BSD" | "BTN" | "BWP" | "BZD" | "CAD" | "CHF" | "CLP" | "CNY" | "COP" | "CRC" | "CVE" | "CZK" | "DJF" | "DKK" | "DOP" | "DZD" | "EGP" | "ERN" | "ETB" | "EUR" | "FJD" | "FKP" | "GBP" | "GEL" | "GHS" | "GIP" | "GMD" | "GNF" | "GTQ" | "GYD" | "HKD" | "HNL" | "HUF" | "IDR" | "ILS" | "INR" | "ISK" | "JMD" | "JOD" | "JPY" | "KES" | "KGS" | "KHR" | "KMF" | "KRW" | "KWD" | "KYD" | "KZT" | "LAK" | "LBP" | "LKR" | "LRD" | "LSL" | "LYD" | "MAD" | "MDL" | "MGA" | "MKD" | "MNT" | "MOP" | "MUR" | "MVR" | "MWK" | "MXN" | "MYR" | "NAD" | "NGN" | "NIO" | "NOK" | "NPR" | "NZD" | "OMR" | "PAB" | "PEN" | "PGK" | "PHP" | "PKR" | "PLN" | "PYG" | "QAR" | "RON" | "RSD" | "RWF" | "SAR" | "SBD" | "SCR" | "SEK" | "SGD" | "SHP" | "SLE" | "SRD" | "SVC" | "SZL" | "THB" | "TJS" | "TMT" | "TND" | "TOP" | "TRY" | "TTD" | "TWD" | "TZS" | "UAH" | "UGX" | "USD" | "UYU" | "UZS" | "VND" | "VUV" | "WST" | "XAF" | "XCD" | "XOF" | "XPF" | "ZAR" | "ZMW" | "ZWL";
143
+ override?: {
144
+ booking: number;
145
+ };
138
146
  };
139
- visibility: "ALWAYS" | "HIDDEN";
147
+ visibility: "ALWAYS" | "HIDDEN" | "AFTER_ADMISSION";
140
148
  teamId: string;
141
149
  promoterId: string;
142
150
  eventId: string;
@@ -149,6 +157,7 @@ export declare function quoteItemsBySelection(quote: OrderQuote | null): Map<str
149
157
  reserved?: number;
150
158
  createdAt?: string;
151
159
  updatedAt?: string;
160
+ visibleAfterAdmissionId?: string;
152
161
  sectionId?: string;
153
162
  };
154
163
  section?: {
@@ -6,7 +6,9 @@
6
6
  */
7
7
  import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
8
  import { OrderQuote } from "@session-services/sdk/schemas";
9
+ import { AnalyticsEventSkipped } from "./components/session-services-ticketing/session-services-ticketing";
9
10
  export { OrderQuote } from "@session-services/sdk/schemas";
11
+ export { AnalyticsEventSkipped } from "./components/session-services-ticketing/session-services-ticketing";
10
12
  export namespace Components {
11
13
  interface SessionServicesFormattedText {
12
14
  /**
@@ -66,11 +68,12 @@ declare global {
66
68
  };
67
69
  interface HTMLSessionServicesTicketingElementEventMap {
68
70
  "checkoutInit": {
69
- orderId: string;
70
- checkoutUrl: string;
71
+ orderId?: string;
72
+ checkoutUrl?: string;
71
73
  };
72
74
  "cartUpdate": OrderQuote;
73
75
  "errorOccurred": { error: string };
76
+ "analyticsEventSkipped": AnalyticsEventSkipped;
74
77
  }
75
78
  interface HTMLSessionServicesTicketingElement extends Components.SessionServicesTicketing, HTMLStencilElement {
76
79
  addEventListener<K extends keyof HTMLSessionServicesTicketingElementEventMap>(type: K, listener: (this: HTMLSessionServicesTicketingElement, ev: SessionServicesTicketingCustomEvent<HTMLSessionServicesTicketingElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
@@ -92,6 +95,8 @@ declare global {
92
95
  }
93
96
  }
94
97
  declare namespace LocalJSX {
98
+ type OneOf<K extends string, PropT, AttrT = PropT> = { [P in K]: PropT } & { [P in `attr:${K}` | `prop:${K}`]?: never } | { [P in `attr:${K}`]: AttrT } & { [P in K | `prop:${K}`]?: never } | { [P in `prop:${K}`]: PropT } & { [P in K | `attr:${K}`]?: never };
99
+
95
100
  interface SessionServicesFormattedText {
96
101
  /**
97
102
  * @default ""
@@ -124,10 +129,11 @@ declare namespace LocalJSX {
124
129
  * @default "en-US"
125
130
  */
126
131
  "locale"?: string;
132
+ "onAnalyticsEventSkipped"?: (event: SessionServicesTicketingCustomEvent<AnalyticsEventSkipped>) => void;
127
133
  "onCartUpdate"?: (event: SessionServicesTicketingCustomEvent<OrderQuote>) => void;
128
134
  "onCheckoutInit"?: (event: SessionServicesTicketingCustomEvent<{
129
- orderId: string;
130
- checkoutUrl: string;
135
+ orderId?: string;
136
+ checkoutUrl?: string;
131
137
  }>) => void;
132
138
  "onErrorOccurred"?: (event: SessionServicesTicketingCustomEvent<{ error: string }>) => void;
133
139
  "passcode"?: string;
@@ -142,17 +148,39 @@ declare namespace LocalJSX {
142
148
  */
143
149
  "theme"?: "light" | "dark" | "system";
144
150
  }
151
+
152
+ interface SessionServicesFormattedTextAttributes {
153
+ "text": string;
154
+ "theme": "light" | "dark" | "system";
155
+ }
156
+ interface SessionServicesTicketingAttributes {
157
+ "tenantId": string;
158
+ "eventId": string;
159
+ "apiUrl": string;
160
+ "locale": string;
161
+ "returnUrl": string;
162
+ "couponCode": string;
163
+ "initialAdmissionPrices": | Record<string, { discount: number; gross: number; total: number }>
164
+ | string;
165
+ "initialPreviewQuote": OrderQuote | string;
166
+ "passcode": string;
167
+ "stickyCheckout": boolean;
168
+ "theme": "light" | "dark" | "system";
169
+ "enableAnalytics": boolean;
170
+ "debugAnalytics": boolean;
171
+ }
172
+
145
173
  interface IntrinsicElements {
146
- "session-services-formatted-text": SessionServicesFormattedText;
147
- "session-services-ticketing": SessionServicesTicketing;
174
+ "session-services-formatted-text": Omit<SessionServicesFormattedText, keyof SessionServicesFormattedTextAttributes> & { [K in keyof SessionServicesFormattedText & keyof SessionServicesFormattedTextAttributes]?: SessionServicesFormattedText[K] } & { [K in keyof SessionServicesFormattedText & keyof SessionServicesFormattedTextAttributes as `attr:${K}`]?: SessionServicesFormattedTextAttributes[K] } & { [K in keyof SessionServicesFormattedText & keyof SessionServicesFormattedTextAttributes as `prop:${K}`]?: SessionServicesFormattedText[K] };
175
+ "session-services-ticketing": Omit<SessionServicesTicketing, keyof SessionServicesTicketingAttributes> & { [K in keyof SessionServicesTicketing & keyof SessionServicesTicketingAttributes]?: SessionServicesTicketing[K] } & { [K in keyof SessionServicesTicketing & keyof SessionServicesTicketingAttributes as `attr:${K}`]?: SessionServicesTicketingAttributes[K] } & { [K in keyof SessionServicesTicketing & keyof SessionServicesTicketingAttributes as `prop:${K}`]?: SessionServicesTicketing[K] } & OneOf<"tenantId", SessionServicesTicketing["tenantId"], SessionServicesTicketingAttributes["tenantId"]> & OneOf<"eventId", SessionServicesTicketing["eventId"], SessionServicesTicketingAttributes["eventId"]>;
148
176
  }
149
177
  }
150
178
  export { LocalJSX as JSX };
151
179
  declare module "@stencil/core" {
152
180
  export namespace JSX {
153
181
  interface IntrinsicElements {
154
- "session-services-formatted-text": LocalJSX.SessionServicesFormattedText & JSXBase.HTMLAttributes<HTMLSessionServicesFormattedTextElement>;
155
- "session-services-ticketing": LocalJSX.SessionServicesTicketing & JSXBase.HTMLAttributes<HTMLSessionServicesTicketingElement>;
182
+ "session-services-formatted-text": LocalJSX.IntrinsicElements["session-services-formatted-text"] & JSXBase.HTMLAttributes<HTMLSessionServicesFormattedTextElement>;
183
+ "session-services-ticketing": LocalJSX.IntrinsicElements["session-services-ticketing"] & JSXBase.HTMLAttributes<HTMLSessionServicesTicketingElement>;
156
184
  }
157
185
  }
158
186
  }
@@ -7,4 +7,4 @@
7
7
  * DO NOT use this file to export your components. Instead, use the recommended approaches
8
8
  * to consume components of this package as outlined in the `README.md`.
9
9
  */
10
- export {};
10
+ export type { Components } from "./components";
@@ -63,6 +63,12 @@ export interface ShadowRootOptions {
63
63
  * focusable part is given focus, and the shadow host is given any available `:focus` styling.
64
64
  */
65
65
  delegatesFocus?: boolean;
66
+ /**
67
+ * Sets the slot assignment mode for the shadow root. When set to `'manual'`, enables imperative
68
+ * slotting using the `HTMLSlotElement.assign()` method. Defaults to `'named'` for standard
69
+ * declarative slotting behavior.
70
+ */
71
+ slotAssignment?: 'manual' | 'named';
66
72
  }
67
73
  export interface ModeStyles {
68
74
  [modeName: string]: string | string[];
@@ -119,8 +125,27 @@ export interface EventOptions {
119
125
  */
120
126
  composed?: boolean;
121
127
  }
128
+ export interface AttachInternalsOptions {
129
+ /**
130
+ * Initial custom states to set on the ElementInternals.states CustomStateSet.
131
+ * Each key is the state name and the value is the initial boolean state.
132
+ *
133
+ * These states can be targeted with the CSS `:state()` pseudo-class.
134
+ *
135
+ * @example
136
+ * ```tsx
137
+ * @AttachInternals({ states: { open: true, active: false } })
138
+ * internals: ElementInternals;
139
+ * ```
140
+ *
141
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/CustomStateSet
142
+ */
143
+ states?: {
144
+ [stateName: string]: boolean;
145
+ };
146
+ }
122
147
  export interface AttachInternalsDecorator {
123
- (): PropertyDecorator;
148
+ (opts?: AttachInternalsOptions): PropertyDecorator;
124
149
  }
125
150
  export interface ListenDecorator {
126
151
  (eventName: string, opts?: ListenOptions): CustomMethodDecorator<any>;
@@ -156,7 +181,9 @@ export interface StateDecorator {
156
181
  (): PropertyDecorator;
157
182
  }
158
183
  export interface WatchDecorator {
159
- (propName: any): CustomMethodDecorator<(newValue?: any, oldValue?: any, propName?: any, ...args: any[]) => any | void>;
184
+ (propName: any, watchOptions?: {
185
+ immediate?: boolean;
186
+ }): CustomMethodDecorator<(newValue?: any, oldValue?: any, propName?: any, ...args: any[]) => any | void>;
160
187
  }
161
188
  export interface PropSerializeDecorator {
162
189
  (propName: any): CustomMethodDecorator<(newValue?: any, propName?: string, ...args: any[]) => string | null>;
@@ -610,7 +637,7 @@ export interface FunctionalUtilities {
610
637
  map: (children: VNode[], cb: (vnode: ChildNode, index: number, array: ChildNode[]) => ChildNode) => VNode[];
611
638
  }
612
639
  export interface FunctionalComponent<T = {}> {
613
- (props: T, children: VNode[], utils: FunctionalUtilities): VNode | VNode[];
640
+ (props: T, children: VNode[], utils: FunctionalUtilities): VNode | VNode[] | null;
614
641
  }
615
642
  /**
616
643
  * A Child VDOM node
@@ -652,6 +679,7 @@ export declare namespace h {
652
679
  function h(sel: any, data: VNodeData | null, text: string): VNode;
653
680
  function h(sel: any, data: VNodeData | null, children: Array<VNode | undefined | null>): VNode;
654
681
  function h(sel: any, data: VNodeData | null, children: VNode): VNode;
682
+ function h(sel: any, data: VNodeData | null, ...children: (VNode | string | number)[]): VNode;
655
683
  namespace JSX {
656
684
  interface IntrinsicElements extends LocalJSX.IntrinsicElements, JSXBase.IntrinsicElements {
657
685
  [tagName: string]: any;
@@ -666,6 +694,36 @@ export declare function h(sel: any, children: Array<VNode | undefined | null>):
666
694
  export declare function h(sel: any, data: VNodeData | null, text: string): VNode;
667
695
  export declare function h(sel: any, data: VNodeData | null, children: Array<VNode | undefined | null>): VNode;
668
696
  export declare function h(sel: any, data: VNodeData | null, children: VNode): VNode;
697
+ export declare function h(sel: any, data: VNodeData | null, ...children: (VNode | string | number)[]): VNode;
698
+ /**
699
+ * Automatic JSX runtime functions for TypeScript's react-jsx mode.
700
+ * These functions are called automatically by TypeScript when using "jsx": "react-jsx".
701
+ * @param type type of node
702
+ * @param props properties of node
703
+ * @param key optional key for the node
704
+ * @returns a jsx vnode
705
+ */
706
+ export declare function jsx(type: any, props: any, key?: string): VNode;
707
+ /**
708
+ * Automatic JSX runtime functions for TypeScript's react-jsxmode with multiple children.
709
+ * @param type type of node
710
+ * @param props properties of node
711
+ * @param key optional key for the node
712
+ * @returns a jsx vnode
713
+ */
714
+ export declare function jsxs(type: any, props: any, key?: string): VNode;
715
+ /**
716
+ * Automatic JSX runtime functions for TypeScript's react-jsxdev mode.
717
+ * These functions are called automatically by TypeScript when using "jsx": "react-jsxdev".
718
+ * @param type type of node
719
+ * @param props properties of node
720
+ * @param key optional key for the node
721
+ * @param isStaticChildren indicates if the children are static
722
+ * @param source source information
723
+ * @param self reference to the component instance
724
+ * @returns a jsx vnode
725
+ */
726
+ export declare function jsxDEV(type: any, props: any, key?: string | number, isStaticChildren?: boolean, source?: any, self?: any): VNode;
669
727
  /**
670
728
  * A virtual DOM node
671
729
  */
@@ -695,7 +753,7 @@ declare namespace LocalJSX {
695
753
  export { LocalJSX as JSX };
696
754
  export declare namespace JSXBase {
697
755
  interface IntrinsicElements {
698
- slot: JSXBase.SlotAttributes;
756
+ slot: JSXBase.SlotAttributes<HTMLSlotElement>;
699
757
  a: JSXBase.AnchorHTMLAttributes<HTMLAnchorElement>;
700
758
  abbr: JSXBase.HTMLAttributes;
701
759
  address: JSXBase.HTMLAttributes;
@@ -865,7 +923,7 @@ export declare namespace JSXBase {
865
923
  use: JSXBase.SVGAttributes;
866
924
  view: JSXBase.SVGAttributes;
867
925
  }
868
- interface SlotAttributes extends JSXAttributes {
926
+ interface SlotAttributes<T = HTMLSlotElement> extends JSXAttributes<T> {
869
927
  name?: string;
870
928
  slot?: string;
871
929
  onSlotchange?: (event: Event) => void;
@@ -921,6 +979,9 @@ export declare namespace JSXBase {
921
979
  popoverTargetAction?: string;
922
980
  popoverTargetElement?: Element | null;
923
981
  popoverTarget?: string;
982
+ command?: string;
983
+ commandFor?: string;
984
+ commandfor?: string;
924
985
  }
925
986
  interface CanvasHTMLAttributes<T> extends HTMLAttributes<T> {
926
987
  height?: number | string;
@@ -1009,6 +1070,7 @@ export declare namespace JSXBase {
1009
1070
  importance?: 'low' | 'auto' | 'high';
1010
1071
  height?: number | string;
1011
1072
  loading?: 'lazy' | 'auto' | 'eager';
1073
+ referrerPolicy?: ReferrerPolicy;
1012
1074
  sizes?: string;
1013
1075
  src?: string;
1014
1076
  srcSet?: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@session-services/web-elements",
3
3
  "private": false,
4
- "version": "0.1.28",
4
+ "version": "0.1.31",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/types/components.d.ts",
@@ -14,6 +14,10 @@
14
14
  "require": "./dist/session-services-elements/session-services-elements.cjs.js",
15
15
  "types": "./dist/types/components.d.ts"
16
16
  },
17
+ "./dist/components": {
18
+ "import": "./dist/components/index.js",
19
+ "types": "./dist/components/index.d.ts"
20
+ },
17
21
  "./dist/*": {
18
22
  "import": "./dist/*",
19
23
  "types": "./dist/*"
@@ -144,18 +148,18 @@
144
148
  "access": "public"
145
149
  },
146
150
  "devDependencies": {
147
- "@stencil/core": "^4.27.1",
148
- "@stencil/react-output-target": "^0.6.0",
149
- "@types/jest": "^29.5.14",
150
- "@types/node": "^24",
151
- "jest": "^29.7.0",
152
- "puppeteer": "^24.3.0",
153
- "rollup": "^4.53.3",
151
+ "@stencil/core": "^4.43.5",
152
+ "@stencil/react-output-target": "^1.5.3",
153
+ "@types/jest": "^30.0.0",
154
+ "@types/node": "^24.13.2",
155
+ "jest": "^30.4.2",
156
+ "puppeteer": "^25.1.0",
157
+ "rollup": "^4.61.1",
154
158
  "rollup-plugin-esbuild": "^6.2.1",
155
- "typescript": "5.9.3",
156
- "vitest": "4.0.15",
159
+ "typescript": "~6.0.3",
160
+ "vitest": "4.1.8",
161
+ "@session-services/sdk": "0.1.31",
157
162
  "@session-services/tsconfig": "0.1.0",
158
- "@session-services/sdk": "0.1.28",
159
163
  "@session-services/utils": "0.1.18"
160
164
  },
161
165
  "scripts": {