@cmssy/react 0.1.9 → 0.2.1
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/client.cjs +575 -2
- package/dist/client.d.cts +39 -2
- package/dist/client.d.ts +39 -2
- package/dist/client.js +567 -3
- package/dist/{registry-e3O4s_bN.d.cts → commerce-queries-DV7PZlKS.d.cts} +57 -1
- package/dist/{registry-e3O4s_bN.d.ts → commerce-queries-DV7PZlKS.d.ts} +57 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/package.json +1 -1
|
@@ -312,4 +312,60 @@ declare function blocksToMeta(blocks: BlockDefinition[], defaults?: {
|
|
|
312
312
|
category?: string;
|
|
313
313
|
}): Record<string, BlockMeta>;
|
|
314
314
|
|
|
315
|
-
|
|
315
|
+
interface CmssyCartItemSnapshot {
|
|
316
|
+
name: string;
|
|
317
|
+
price: number;
|
|
318
|
+
currency: string;
|
|
319
|
+
imageUrl: string | null;
|
|
320
|
+
sku: string | null;
|
|
321
|
+
}
|
|
322
|
+
interface CmssyCartItem {
|
|
323
|
+
id: string;
|
|
324
|
+
recordId: string;
|
|
325
|
+
quantity: number;
|
|
326
|
+
variantSelections: Record<string, string> | null;
|
|
327
|
+
snapshot: CmssyCartItemSnapshot;
|
|
328
|
+
currentPrice: number | null;
|
|
329
|
+
priceMismatch: boolean;
|
|
330
|
+
}
|
|
331
|
+
interface CmssyCartDiscount {
|
|
332
|
+
code: string;
|
|
333
|
+
type: string;
|
|
334
|
+
value: number;
|
|
335
|
+
computedAmount: number;
|
|
336
|
+
}
|
|
337
|
+
interface CmssyCart {
|
|
338
|
+
id: string;
|
|
339
|
+
status: string;
|
|
340
|
+
items: CmssyCartItem[];
|
|
341
|
+
itemCount: number;
|
|
342
|
+
subtotal: number;
|
|
343
|
+
currency: string | null;
|
|
344
|
+
appliedDiscount: CmssyCartDiscount | null;
|
|
345
|
+
discountedTotal: number;
|
|
346
|
+
}
|
|
347
|
+
interface CmssyProductVariant {
|
|
348
|
+
id: string;
|
|
349
|
+
sku: string | null;
|
|
350
|
+
price: number;
|
|
351
|
+
inventory: number | null;
|
|
352
|
+
selectedOptions: Array<{
|
|
353
|
+
name: string;
|
|
354
|
+
value: string;
|
|
355
|
+
}>;
|
|
356
|
+
}
|
|
357
|
+
interface CmssyProduct {
|
|
358
|
+
id: string;
|
|
359
|
+
data: Record<string, unknown>;
|
|
360
|
+
variants: CmssyProductVariant[];
|
|
361
|
+
}
|
|
362
|
+
interface CmssyOrder {
|
|
363
|
+
id: string;
|
|
364
|
+
status: string;
|
|
365
|
+
subtotal: number;
|
|
366
|
+
total: number;
|
|
367
|
+
currency: string;
|
|
368
|
+
customerEmail: string;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
export { fetchLayouts as $, type AppToEditorMessage as A, type BlockSchema as B, type CmssyPageData as C, type CmssySiteConfig as D, type EditorToAppMessage as E, type FieldDefinition as F, FORM_QUERY as G, type FetchLikeResponse as H, type FetchPageOptions as I, type FieldType as J, MODEL_RECORDS_QUERY as K, type ParentReadyMessage as L, MODEL_DEFINITIONS_QUERY as M, type PatchMessage as N, type RawLayoutBlock as O, PROTOCOL_VERSION as P, type ReadyMessage as Q, type RawBlock as R, SITE_CONFIG_QUERY as S, SUBMIT_FORM_MUTATION as T, type SelectMessage as U, type SubmitFormInput as V, blocksToMeta as W, blocksToSchemas as X, buildBlockContext as Y, buildBlockMap as Z, defineBlock as _, type BlockMeta as a, fetchPage as a0, isProtocolCompatible as a1, normalizeSlug as a2, type BlockDefinition as b, type CmssyFormDefinition as c, type CmssyLayoutGroup as d, type CmssyCart as e, type CmssyOrder as f, type CmssyProduct as g, type CmssyCartDiscount as h, type CmssyCartItem as i, type CmssyCartItemSnapshot as j, type CmssyProductVariant as k, type FetchLike as l, type CmssyClientConfig as m, type BlockMap as n, type CmssyBlockContext as o, type BlockRect as p, type BoundsMessage as q, type ClickMessage as r, type CmssyBranding as s, type CmssyFormField as t, type CmssyFormSettings as u, type CmssyFormSubmitResponse as v, type CmssyLocaleContext as w, type CmssyModelDefinition as x, type CmssyModelRecord as y, type CmssyRecordList as z };
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as FieldDefinition, C as CmssyPageData, b as BlockDefinition, c as CmssyFormDefinition, d as CmssyLayoutGroup, E as EditorToAppMessage, A as AppToEditorMessage,
|
|
2
|
-
export { a as BlockMeta,
|
|
1
|
+
import { F as FieldDefinition, C as CmssyPageData, b as BlockDefinition, c as CmssyFormDefinition, d as CmssyLayoutGroup, E as EditorToAppMessage, A as AppToEditorMessage, l as FetchLike, m as CmssyClientConfig, R as RawBlock, n as BlockMap, o as CmssyBlockContext } from './commerce-queries-DV7PZlKS.cjs';
|
|
2
|
+
export { a as BlockMeta, p as BlockRect, B as BlockSchema, q as BoundsMessage, r as ClickMessage, s as CmssyBranding, e as CmssyCart, h as CmssyCartDiscount, i as CmssyCartItem, j as CmssyCartItemSnapshot, t as CmssyFormField, u as CmssyFormSettings, v as CmssyFormSubmitResponse, w as CmssyLocaleContext, x as CmssyModelDefinition, y as CmssyModelRecord, f as CmssyOrder, g as CmssyProduct, k as CmssyProductVariant, z as CmssyRecordList, D as CmssySiteConfig, G as FORM_QUERY, H as FetchLikeResponse, I as FetchPageOptions, J as FieldType, M as MODEL_DEFINITIONS_QUERY, K as MODEL_RECORDS_QUERY, P as PROTOCOL_VERSION, L as ParentReadyMessage, N as PatchMessage, O as RawLayoutBlock, Q as ReadyMessage, S as SITE_CONFIG_QUERY, T as SUBMIT_FORM_MUTATION, U as SelectMessage, V as SubmitFormInput, W as blocksToMeta, X as blocksToSchemas, Y as buildBlockContext, Z as buildBlockMap, _ as defineBlock, $ as fetchLayouts, a0 as fetchPage, a1 as isProtocolCompatible, a2 as normalizeSlug } from './commerce-queries-DV7PZlKS.cjs';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import 'react';
|
|
5
5
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as FieldDefinition, C as CmssyPageData, b as BlockDefinition, c as CmssyFormDefinition, d as CmssyLayoutGroup, E as EditorToAppMessage, A as AppToEditorMessage,
|
|
2
|
-
export { a as BlockMeta,
|
|
1
|
+
import { F as FieldDefinition, C as CmssyPageData, b as BlockDefinition, c as CmssyFormDefinition, d as CmssyLayoutGroup, E as EditorToAppMessage, A as AppToEditorMessage, l as FetchLike, m as CmssyClientConfig, R as RawBlock, n as BlockMap, o as CmssyBlockContext } from './commerce-queries-DV7PZlKS.js';
|
|
2
|
+
export { a as BlockMeta, p as BlockRect, B as BlockSchema, q as BoundsMessage, r as ClickMessage, s as CmssyBranding, e as CmssyCart, h as CmssyCartDiscount, i as CmssyCartItem, j as CmssyCartItemSnapshot, t as CmssyFormField, u as CmssyFormSettings, v as CmssyFormSubmitResponse, w as CmssyLocaleContext, x as CmssyModelDefinition, y as CmssyModelRecord, f as CmssyOrder, g as CmssyProduct, k as CmssyProductVariant, z as CmssyRecordList, D as CmssySiteConfig, G as FORM_QUERY, H as FetchLikeResponse, I as FetchPageOptions, J as FieldType, M as MODEL_DEFINITIONS_QUERY, K as MODEL_RECORDS_QUERY, P as PROTOCOL_VERSION, L as ParentReadyMessage, N as PatchMessage, O as RawLayoutBlock, Q as ReadyMessage, S as SITE_CONFIG_QUERY, T as SUBMIT_FORM_MUTATION, U as SelectMessage, V as SubmitFormInput, W as blocksToMeta, X as blocksToSchemas, Y as buildBlockContext, Z as buildBlockMap, _ as defineBlock, $ as fetchLayouts, a0 as fetchPage, a1 as isProtocolCompatible, a2 as normalizeSlug } from './commerce-queries-DV7PZlKS.js';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import 'react';
|
|
5
5
|
|