@shoplix-ai/block-kit 5.28.0 → 5.30.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/README.md CHANGED
@@ -219,7 +219,9 @@ written against this package and nothing else from the runtime. It holds:
219
219
  `listingToolbarLook` and `listingToolbarColors` are the listing toolbar's
220
220
  parts, measures and colours at `listing_toolbar.<part>`, the role the
221
221
  merchant chose for the bar, its stroke, its words or the switch's track over
222
- them; `listingCount` is the count of the products a listing has loaded,
222
+ them, its side space and the space between its rows, its count as one run,
223
+ and the filter drawn as a row of chips with each chip's least width, inset
224
+ and words; `listingCount` is the count of the products a listing has loaded,
223
225
  "24+" while Shopify names more, with its word in the form the buyer's
224
226
  language counts it in; `listingSortRows` and `listingSortLabel` are the
225
227
  sorts the sheet offers in the merchant's order and words, the catalog's
@@ -20,8 +20,8 @@ declare const LISTING_TOOLBAR_ROLES: {
20
20
  readonly clear_all: "accent";
21
21
  };
22
22
  export type ListingToolbarPart = keyof typeof LISTING_TOOLBAR_ROLES;
23
- /** The toolbar's colours, and the ink that reads on the badge and on a chip's remove button. */
24
- export type ListingToolbarColors = Readonly<Record<ListingToolbarPart | 'badge_ink' | 'chip_remove_ink', string>>;
23
+ /** The toolbar's colours, the ink that reads on the badge and on a chip's remove button, and the ink of the count drawn as one run. */
24
+ export type ListingToolbarColors = Readonly<Record<ListingToolbarPart | 'badge_ink' | 'chip_remove_ink' | 'count_run', string>>;
25
25
  /**
26
26
  * Every colour the listing toolbar draws: the count and its word, the bar
27
27
  * that opens the sorts and the filters with its stroke, its words and the line
@@ -31,9 +31,10 @@ export type ListingToolbarColors = Readonly<Record<ListingToolbarPart | 'badge_i
31
31
  * merchant chose for the bar, its stroke, its words, the track, the badge or
32
32
  * the chips wins; every other part is its role with `listing_toolbar.<part>`
33
33
  * over it, and the badge and the remove button write in whichever ink reads on
34
- * them. The phone and its web twin read this one table.
34
+ * them. The count drawn as one run writes in the word's ink, or the role the
35
+ * merchant chose for it. The phone and its web twin read this one table.
35
36
  */
36
- export declare function listingToolbarColors(theme: ThemeStyle, settings?: Pick<ListingToolbarSettings, 'surface' | 'stroke' | 'ink' | 'track' | 'badge' | 'chipSurface' | 'chipStroke' | 'chipInk'>): ListingToolbarColors;
37
+ export declare function listingToolbarColors(theme: ThemeStyle, settings?: Pick<ListingToolbarSettings, 'surface' | 'stroke' | 'ink' | 'track' | 'badge' | 'chipSurface' | 'chipStroke' | 'chipInk' | 'countRunInk'>): ListingToolbarColors;
37
38
  /** Every measure of the toolbar, and which of its parts it draws. */
38
39
  export interface ListingToolbarLook {
39
40
  readonly count: boolean;
@@ -41,10 +42,21 @@ export interface ListingToolbarLook {
41
42
  readonly sort: boolean;
42
43
  readonly filter: boolean;
43
44
  readonly chips: boolean;
45
+ /** The filter as a row of chips, the filter and one per filter the sheet offers, in place of its half of the bar. */
46
+ readonly filterChips: boolean;
47
+ /** The side space the merchant set; none stands the toolbar in the theme's side gutter. */
48
+ readonly gutter: number | undefined;
49
+ /** The space between the toolbar's rows. */
50
+ readonly gap: number;
44
51
  readonly height: number;
45
52
  readonly radius: number;
46
53
  readonly countSize: number;
47
54
  readonly wordSize: number;
55
+ readonly wordWeight: number;
56
+ /** The count as one run, its number and word at one size and weight, the word's where the merchant set none. */
57
+ readonly countRun: boolean;
58
+ readonly runSize: number;
59
+ readonly runWeight: number;
48
60
  readonly labelSize: number;
49
61
  readonly iconSize: number;
50
62
  readonly switchCell: {
@@ -61,17 +73,36 @@ export interface ListingToolbarLook {
61
73
  readonly height: number;
62
74
  readonly radius: number;
63
75
  readonly text: number;
76
+ readonly weight: number;
64
77
  readonly remove: number;
65
78
  readonly gap: number;
66
79
  };
80
+ /**
81
+ * A chip of the filter's row: its least width (none hugs), the space from
82
+ * each side to its content with the stroke counted, the line round it, the
83
+ * space between its glyph or chevron and its words, and the size of its own
84
+ * chevron.
85
+ */
86
+ readonly filterChip: {
87
+ readonly width: number;
88
+ readonly inset: number;
89
+ readonly stroke: number;
90
+ readonly gap: number;
91
+ readonly chevron: number;
92
+ };
67
93
  }
68
94
  /**
69
- * The toolbar as the mot design measures it: the count at 15 over a word at
70
- * 13, the switch's two 34 by 30 cells on a track padded by 3, the bar at the
95
+ * The toolbar as the mot design measures it: the count at 15 beside a word at
96
+ * 13 and 600, the switch's two 34 by 30 cells on a track padded by 3, the bar at the
71
97
  * merchant's height and corner with its words at 12.5 beside a 16 point
72
98
  * glyph, the badge an 18 point circle with its number at 10.5, and each chip
73
99
  * 32 tall at the merchant's corner with its words at 12.5 and an 18 point
74
- * remove button, 8 apart. The merchant switches each part off and sets the bar.
100
+ * remove button, 8 apart, its rows 10 apart. The merchant switches each part
101
+ * off and sets the bar; the side space, the space between the rows, the
102
+ * count's run and every chip's words and gap; and, where the filter draws as a
103
+ * row of chips, each chip's least width and inset. A chip of that row draws a
104
+ * 1 point line round it and holds 6 between its glyph or chevron and its
105
+ * words, its own chevron 15 points.
75
106
  */
76
107
  export declare function listingToolbarLook(settings: ListingToolbarSettings): ListingToolbarLook;
77
108
  /** How many products a listing holds so far: the number, with a plus while more pages exist, and the word after it. */
@@ -1 +1 @@
1
- {"version":3,"file":"listing-toolbar.d.ts","sourceRoot":"","sources":["../src/listing-toolbar.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,UAAU,EAEf,KAAK,UAAU,EAChB,MAAM,yBAAyB,CAAC;AAMjC,KAAK,sBAAsB,GAAG,mBAAmB,CAAC,OAAO,CAAC,CAAC;AAE3D,kHAAkH;AAClH,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;;;CAiBwB,CAAC;AAEpD,MAAM,MAAM,kBAAkB,GAAG,MAAM,OAAO,qBAAqB,CAAC;AAEpE,gGAAgG;AAChG,MAAM,MAAM,oBAAoB,GAAG,QAAQ,CACzC,MAAM,CAAC,kBAAkB,GAAG,WAAW,GAAG,iBAAiB,EAAE,MAAM,CAAC,CACrE,C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B,GAAG,kBAAkB,CAuCvF;AAED,uHAAuH;AACvH,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,OAAO,EACb,QAAQ,EAAE,UAAU,EACpB,eAAe,EAAE,UAAU,GAC1B,YAAY,CAKd;AAED,iEAAiE;AACjE,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,GAAG,EAAE,cAAc,CAAC;IAC7B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,sBAAsB,EAChC,GAAG,EAAE,cAAc,EACnB,QAAQ,EAAE,UAAU,EACpB,eAAe,EAAE,UAAU,GAC1B,MAAM,CAIR;AAED,qEAAqE;AACrE,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,sBAAsB,EAChC,QAAQ,EAAE,UAAU,EACpB,eAAe,EAAE,UAAU,GAC1B,SAAS,cAAc,EAAE,CAK3B;AAED;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;CAQnB,CAAC"}
@@ -31,7 +31,8 @@ const LISTING_TOOLBAR_ROLES = {
31
31
  * merchant chose for the bar, its stroke, its words, the track, the badge or
32
32
  * the chips wins; every other part is its role with `listing_toolbar.<part>`
33
33
  * over it, and the badge and the remove button write in whichever ink reads on
34
- * them. The phone and its web twin read this one table.
34
+ * them. The count drawn as one run writes in the word's ink, or the role the
35
+ * merchant chose for it. The phone and its web twin read this one table.
35
36
  */
36
37
  export function listingToolbarColors(theme, settings = {}) {
37
38
  const table = partColors(theme, 'listing_toolbar', LISTING_TOOLBAR_ROLES);
@@ -39,6 +40,7 @@ export function listingToolbarColors(theme, settings = {}) {
39
40
  const badge = chosen(settings.badge, table.badge);
40
41
  return {
41
42
  ...table,
43
+ count_run: chosen(settings.countRunInk, table.count_word),
42
44
  bar: chosen(settings.surface, table.bar),
43
45
  bar_stroke: chosen(settings.stroke, table.bar_stroke),
44
46
  bar_ink: chosen(settings.ink, table.bar_ink),
@@ -51,13 +53,20 @@ export function listingToolbarColors(theme, settings = {}) {
51
53
  chip_remove_ink: readableInk(table.chip_remove),
52
54
  };
53
55
  }
56
+ /** The word after the count's number, whose type the count drawn as one run takes where the merchant set none. */
57
+ const COUNT_WORD = { size: 13, weight: 600 };
54
58
  /**
55
- * The toolbar as the mot design measures it: the count at 15 over a word at
56
- * 13, the switch's two 34 by 30 cells on a track padded by 3, the bar at the
59
+ * The toolbar as the mot design measures it: the count at 15 beside a word at
60
+ * 13 and 600, the switch's two 34 by 30 cells on a track padded by 3, the bar at the
57
61
  * merchant's height and corner with its words at 12.5 beside a 16 point
58
62
  * glyph, the badge an 18 point circle with its number at 10.5, and each chip
59
63
  * 32 tall at the merchant's corner with its words at 12.5 and an 18 point
60
- * remove button, 8 apart. The merchant switches each part off and sets the bar.
64
+ * remove button, 8 apart, its rows 10 apart. The merchant switches each part
65
+ * off and sets the bar; the side space, the space between the rows, the
66
+ * count's run and every chip's words and gap; and, where the filter draws as a
67
+ * row of chips, each chip's least width and inset. A chip of that row draws a
68
+ * 1 point line round it and holds 6 between its glyph or chevron and its
69
+ * words, its own chevron 15 points.
61
70
  */
62
71
  export function listingToolbarLook(settings) {
63
72
  return {
@@ -66,10 +75,17 @@ export function listingToolbarLook(settings) {
66
75
  sort: settings.sort ?? LISTING_TOOLBAR_DEFAULTS.sort,
67
76
  filter: settings.filter ?? LISTING_TOOLBAR_DEFAULTS.filter,
68
77
  chips: settings.chips ?? LISTING_TOOLBAR_DEFAULTS.chips,
78
+ filterChips: settings.filterChips ?? LISTING_TOOLBAR_DEFAULTS.filterChips,
79
+ gutter: settings.gutter,
80
+ gap: settings.gap ?? LISTING_TOOLBAR_DEFAULTS.gap,
69
81
  height: settings.height ?? LISTING_TOOLBAR_DEFAULTS.height,
70
82
  radius: settings.radius ?? LISTING_TOOLBAR_DEFAULTS.radius,
71
83
  countSize: 15,
72
- wordSize: 13,
84
+ wordSize: COUNT_WORD.size,
85
+ wordWeight: COUNT_WORD.weight,
86
+ countRun: settings.countRun ?? LISTING_TOOLBAR_DEFAULTS.countRun,
87
+ runSize: settings.countRunSize ?? COUNT_WORD.size,
88
+ runWeight: settings.countRunWeight ?? COUNT_WORD.weight,
73
89
  labelSize: 12.5,
74
90
  iconSize: 16,
75
91
  switchCell: { width: 34, height: 30, radius: 6 },
@@ -78,9 +94,17 @@ export function listingToolbarLook(settings) {
78
94
  chip: {
79
95
  height: 32,
80
96
  radius: settings.chipRadius ?? LISTING_TOOLBAR_DEFAULTS.chipRadius,
81
- text: 12.5,
97
+ text: settings.chipLabelSize ?? LISTING_TOOLBAR_DEFAULTS.chipLabelSize,
98
+ weight: settings.chipLabelWeight ?? LISTING_TOOLBAR_DEFAULTS.chipLabelWeight,
82
99
  remove: 18,
83
- gap: 8,
100
+ gap: settings.chipGap ?? LISTING_TOOLBAR_DEFAULTS.chipGap,
101
+ },
102
+ filterChip: {
103
+ width: settings.filterChipWidth ?? LISTING_TOOLBAR_DEFAULTS.filterChipWidth,
104
+ inset: settings.filterChipInset ?? LISTING_TOOLBAR_DEFAULTS.filterChipInset,
105
+ stroke: 1,
106
+ gap: 6,
107
+ chevron: 15,
84
108
  },
85
109
  };
86
110
  }
@@ -1 +1 @@
1
- {"version":3,"file":"listing-toolbar.js","sourceRoot":"","sources":["../src/listing-toolbar.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,cAAc,GAMf,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,WA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C,gBAAgB,GAAG,EAAE,CAAC,CAAC;AACxF,CAAC;AAED,qEAAqE;AACrE,MAAM,UAAU,eAAe,CAC7B,QAAgC,EAChC,QAAoB,EACpB,eAA2B;IAE3B,OAAO,cAAc,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC;QAChD,GAAG;QACH,KAAK,EAAE,gBAAgB,CAAC,QAAQ,EAAE,GAAG,EAAE,QAAQ,EAAE,eAAe,CAAC;KAClE,CAAC,CAAC,CAAC;AACN,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,OAAO,EAAE,GAAG;IACZ,OAAO,EAAE,EAAE;IACX,GAAG,EAAE,EAAE;IACP,MAAM,EAAE,EAAE;IACV,SAAS,EAAE,IAAI;IACf,UAAU,EAAE,CAAC;IACb,SAAS,EAAE,EAAE;CACL,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { LocaleCode, MoneyStyle, ProductSummaryBlock, ThemeStyle } from '@shoplix-ai/sdui-schema';
1
+ import { type LocaleCode, type MoneyStyle, type ProductSummaryBlock, type ThemeStyle } from '@shoplix-ai/sdui-schema';
2
2
  import type { ChosenPrice } from './variant-rows.js';
3
3
  /** The parts of the product summary, each with the theme role it draws unless a component token names another. */
4
4
  declare const PRODUCT_SUMMARY_ROLES: {
@@ -20,6 +20,8 @@ declare const PRODUCT_SUMMARY_ROLES: {
20
20
  readonly amount: "text";
21
21
  readonly struck: "muted";
22
22
  readonly off: "action";
23
+ readonly button_surface: "sunken";
24
+ readonly button_ink: "muted";
23
25
  };
24
26
  export type ProductSummaryPart = keyof typeof PRODUCT_SUMMARY_ROLES;
25
27
  export type ProductSummaryColors = Readonly<Record<ProductSummaryPart, string>>;
@@ -27,9 +29,11 @@ export type ProductSummaryColors = Readonly<Record<ProductSummaryPart, string>>;
27
29
  * Every colour the summary draws, one per part, with `product_summary.<part>`
28
30
  * as the escape hatch over each theme role. The price and the vendor line read
29
31
  * the action role, so a merchant who changes one button colour changes the
30
- * whole product screen with it.
32
+ * whole product screen with it. The plain look's round buttons stand on the
33
+ * page header's own circle and ink unless the merchant chose a role for
34
+ * either.
31
35
  */
32
- export declare function productSummaryColors(theme: ThemeStyle): ProductSummaryColors;
36
+ export declare function productSummaryColors(theme: ThemeStyle, settings?: Pick<ProductSummaryBlock['props'], 'buttonSurface' | 'buttonInk'>): ProductSummaryColors;
33
37
  /**
34
38
  * What the summary says the compare-at price saves, in the way the merchant
35
39
  * chose: the amount ("Save 36.190 KWD"), the percent ("−17%"), or nothing.
@@ -1 +1 @@
1
- {"version":3,"file":"product-summary.d.ts","sourceRoot":"","sources":["../src/product-summary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,UAAU,EACV,mBAAmB,EACnB,UAAU,EACX,MAAM,yBAAyB,CAAC;AAGjC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGrD,kHAAkH;AAClH,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;CAmBoC,CAAC;AAEhE,MAAM,MAAM,kBAAkB,GAAG,MAAM,OAAO,qBAAqB,CAAC;AAEpE,MAAM,MAAM,oBAAoB,GAAG,QAAQ,CAAC,MAAM,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAAC,CAAC;AAEhF;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,UAAU,GAAG,oBAAoB,CAE5E;AAID;;;;GAIG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,EAC9C,QAAQ,EAAE,UAAU,EACpB,eAAe,EAAE,UAAU,EAC3B,KAAK,EAAE,UAAU,GAAG,SAAS,GAC5B,MAAM,GAAG,IAAI,CAaf"}
1
+ {"version":3,"file":"product-summary.d.ts","sourceRoot":"","sources":["../src/product-summary.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,mBAAmB,EACxB,KAAK,UAAU,EAChB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGrD,kHAAkH;AAClH,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;CAqBoC,CAAC;AAEhE,MAAM,MAAM,kBAAkB,GAAG,MAAM,OAAO,qBAAqB,CAAC;AAEpE,MAAM,MAAM,oBAAoB,GAAG,QAAQ,CAAC,MAAM,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAAC,CAAC;AAEhF;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,UAAU,EACjB,QAAQ,GAAE,IAAI,CAAC,mBAAmB,CAAC,OAAO,CAAC,EAAE,eAAe,GAAG,WAAW,CAAM,GAC/E,oBAAoB,CAOtB;AAID;;;;GAIG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,EAC9C,QAAQ,EAAE,UAAU,EACpB,eAAe,EAAE,UAAU,EAC3B,KAAK,EAAE,UAAU,GAAG,SAAS,GAC5B,MAAM,GAAG,IAAI,CAaf"}
@@ -1,5 +1,6 @@
1
+ import { PAGE_HEADER_DEFAULT_INKS, } from '@shoplix-ai/sdui-schema';
1
2
  import { derivedMoney, discountPercent, moneyAmount } from './money.js';
2
- import { partColors } from './part-colors.js';
3
+ import { chosenRole, partColors } from './part-colors.js';
3
4
  import { platformWords } from './words.js';
4
5
  /** The parts of the product summary, each with the theme role it draws unless a component token names another. */
5
6
  const PRODUCT_SUMMARY_ROLES = {
@@ -21,15 +22,24 @@ const PRODUCT_SUMMARY_ROLES = {
21
22
  amount: 'text',
22
23
  struck: 'muted',
23
24
  off: 'action',
25
+ button_surface: PAGE_HEADER_DEFAULT_INKS.circle,
26
+ button_ink: PAGE_HEADER_DEFAULT_INKS.ink,
24
27
  };
25
28
  /**
26
29
  * Every colour the summary draws, one per part, with `product_summary.<part>`
27
30
  * as the escape hatch over each theme role. The price and the vendor line read
28
31
  * the action role, so a merchant who changes one button colour changes the
29
- * whole product screen with it.
32
+ * whole product screen with it. The plain look's round buttons stand on the
33
+ * page header's own circle and ink unless the merchant chose a role for
34
+ * either.
30
35
  */
31
- export function productSummaryColors(theme) {
32
- return partColors(theme, 'product_summary', PRODUCT_SUMMARY_ROLES);
36
+ export function productSummaryColors(theme, settings = {}) {
37
+ const table = partColors(theme, 'product_summary', PRODUCT_SUMMARY_ROLES);
38
+ return {
39
+ ...table,
40
+ button_surface: chosenRole(theme, settings.buttonSurface, table.button_surface),
41
+ button_ink: chosenRole(theme, settings.buttonInk, table.button_ink),
42
+ };
33
43
  }
34
44
  const MINUS = '\u2212';
35
45
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"product-summary.js","sourceRoot":"","sources":["../src/product-summary.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,kHAAkH;AAClH,MAAM,qBAAqB,GAAG;IAC5B,KAAK,EAAE,UAAU;IACjB,KAAK,EAAE,MAAM;IACb,KAAK,EAAE,QAAQ;IACf,KAAK,EAAE,QAAQ;IACf,GAAG,EAAE,QAAQ;IACb,cAAc,EAAE,QAAQ;IACxB,MAAM,EAAE,MAAM;IACd,YAAY,EAAE,QAAQ;IACtB,IAAI,EAAE,SAAS;IACf,aAAa,EAAE,QAAQ;IACvB,SAAS,EAAE,QAAQ;IACnB,SAAS,EAAE,MAAM;IACjB,cAAc,EAAE,QAAQ;IACxB,UAAU,EAAE,SAAS;IACrB,MAAM,EAAE,O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package/dist/version.d.ts CHANGED
@@ -4,6 +4,6 @@
4
4
  * The major is the compatibility line: a Shop package built against another
5
5
  * major never meets this runtime, and a major bump is an announced event.
6
6
  */
7
- export declare const CONTRACT_VERSION = "5.28.0";
7
+ export declare const CONTRACT_VERSION = "5.30.0";
8
8
  export declare const CONTRACT_MAJOR = 5;
9
9
  //# sourceMappingURL=version.d.ts.map
package/dist/version.js CHANGED
@@ -4,6 +4,6 @@
4
4
  * The major is the compatibility line: a Shop package built against another
5
5
  * major never meets this runtime, and a major bump is an announced event.
6
6
  */
7
- export const CONTRACT_VERSION = '5.28.0';
7
+ export const CONTRACT_VERSION = '5.30.0';
8
8
  export const CONTRACT_MAJOR = 5;
9
9
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shoplix-ai/block-kit",
3
- "version": "5.28.0",
3
+ "version": "5.30.0",
4
4
  "description": "The renderer contract every Block Type renderer is written against: what a renderer receives, how a Block Type is registered with its owner, the closed capability set, and the small helpers renderers share. Contract only, no renderers.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -26,7 +26,7 @@
26
26
  "access": "public"
27
27
  },
28
28
  "dependencies": {
29
- "@shoplix-ai/sdui-schema": "1.77.0"
29
+ "@shoplix-ai/sdui-schema": "1.81.0"
30
30
  },
31
31
  "peerDependencies": {
32
32
  "react": ">=19.0.0"