@shoplix-ai/block-kit 5.50.0 → 5.51.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 +11 -8
- package/dist/skeleton.d.ts +1 -1
- package/dist/skeleton.d.ts.map +1 -1
- package/dist/skeleton.js +1 -0
- package/dist/skeleton.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -383,9 +383,10 @@ written against this package and nothing else from the runtime. It holds:
|
|
|
383
383
|
## The rendering libraries a Code Block may import
|
|
384
384
|
|
|
385
385
|
Beside this package, the schema package, React and React Native, a Shop
|
|
386
|
-
package's Code Blocks may import
|
|
386
|
+
package's Code Blocks may import six rendering libraries the app already
|
|
387
387
|
ships: `react-native-svg`, `react-native-reanimated`,
|
|
388
|
-
`react-native-gesture-handler`, `expo-image
|
|
388
|
+
`react-native-gesture-handler`, `expo-image`, `expo-linear-gradient` and
|
|
389
|
+
`expo-video`, the app's own player. This
|
|
389
390
|
package names them, with the app's own ranges, under
|
|
390
391
|
`shoplix.renderingLibraries` in its `package.json`, the one place the ranges
|
|
391
392
|
are written.
|
|
@@ -399,7 +400,7 @@ on.
|
|
|
399
400
|
|
|
400
401
|
The ranges are part of the contract. A major of any library is a major of this
|
|
401
402
|
package, and the api's `RUNTIME_CONTRACT_MAJOR` follows it; a test holds the
|
|
402
|
-
majors of the
|
|
403
|
+
majors of the six to the ones written down for the contract major, so a
|
|
403
404
|
library major that moves alone fails. They are named here rather than as this
|
|
404
405
|
package's own peer dependencies: every workspace that depends on the contract
|
|
405
406
|
would otherwise install them, the api and the dashboard images among them.
|
|
@@ -532,11 +533,13 @@ export default defineCodeBlock({
|
|
|
532
533
|
|
|
533
534
|
The name comes from `SKELETON_SHAPES`: `product_card`, `product_grid`,
|
|
534
535
|
`product_rail`, `collection_row`, `collection_circles`, `category_grid`,
|
|
535
|
-
`gallery`, `product_summary`, `option_chips`, `buy_box`,
|
|
536
|
-
`cart_lines`, `order_card`, `address_list`, `deliver_to` and
|
|
537
|
-
phone draws that shape with the platform block's own
|
|
538
|
-
|
|
539
|
-
|
|
536
|
+
`gallery`, `gallery_portrait`, `product_summary`, `option_chips`, `buy_box`,
|
|
537
|
+
`action_bar`, `cart_lines`, `order_card`, `address_list`, `deliver_to` and
|
|
538
|
+
`text_lines`. The phone draws that shape with the platform block's own
|
|
539
|
+
defaults, `gallery` square and `gallery_portrait` cut at 4:5 for a gallery of
|
|
540
|
+
portrait photos. A build before `gallery_portrait` draws nothing for it, as for
|
|
541
|
+
any name it does not know. A Code Block's settings never change a named shape.
|
|
542
|
+
To follow a setting, pick the name with a function, as below.
|
|
540
543
|
|
|
541
544
|
A block whose look follows a setting picks the shape from its own settings
|
|
542
545
|
instead. The function receives the settings the document holds, typed from the
|
package/dist/skeleton.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type { BlockSettings } from './contract.js';
|
|
|
5
5
|
* block each one is named for. A Code Block names one, or picks one from its
|
|
6
6
|
* own settings, and the host draws it as it draws the platform block's own.
|
|
7
7
|
*/
|
|
8
|
-
export declare const SKELETON_SHAPES: readonly ["product_card", "product_grid", "product_rail", "collection_row", "collection_circles", "category_grid", "gallery", "product_summary", "option_chips", "buy_box", "action_bar", "cart_lines", "order_card", "address_list", "deliver_to", "text_lines"];
|
|
8
|
+
export declare const SKELETON_SHAPES: readonly ["product_card", "product_grid", "product_rail", "collection_row", "collection_circles", "category_grid", "gallery", "gallery_portrait", "product_summary", "option_chips", "buy_box", "action_bar", "cart_lines", "order_card", "address_list", "deliver_to", "text_lines"];
|
|
9
9
|
export type SkeletonShapeName = (typeof SKELETON_SHAPES)[number];
|
|
10
10
|
/** A shape, or a function of the block's own settings that picks one or none. */
|
|
11
11
|
export type SkeletonChoice<TSettings extends BlockSettings = BlockSettings> = SkeletonShapeName | ((settings: TSettings) => SkeletonShapeName | undefined);
|
package/dist/skeleton.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skeleton.d.ts","sourceRoot":"","sources":["../src/skeleton.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD;;;;;GAKG;AACH,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"skeleton.d.ts","sourceRoot":"","sources":["../src/skeleton.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD;;;;;GAKG;AACH,eAAO,MAAM,eAAe,uRAkBlB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjE,iFAAiF;AACjF,MAAM,MAAM,cAAc,CAAC,SAAS,SAAS,aAAa,GAAG,aAAa,IACxE,iBAAiB,GAAG,CAAC,CAAC,QAAQ,EAAE,SAAS,KAAK,iBAAiB,GAAG,SAAS,CAAC,CAAC;AAQ/E;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,cAAc,GAAG,SAAS,EAClC,QAAQ,EAAE,aAAa,GACtB,iBAAiB,GAAG,IAAI,CAO1B"}
|
package/dist/skeleton.js
CHANGED
package/dist/skeleton.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skeleton.js","sourceRoot":"","sources":["../src/skeleton.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,cAAc;IACd,cAAc;IACd,cAAc;IACd,gBAAgB;IAChB,oBAAoB;IACpB,eAAe;IACf,SAAS;IACT,iBAAiB;IACjB,cAAc;IACd,SAAS;IACT,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,cAAc;IACd,YAAY;IACZ,YAAY;CACJ,CAAC;AAQX,MAAM,KAAK,GAAwB,IAAI,GAAG,CAAC,eAAe,CAAC,CAAC;AAE5D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AAO,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;IAClC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
|
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.
|
|
7
|
+
export declare const CONTRACT_VERSION = "5.51.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.
|
|
7
|
+
export const CONTRACT_VERSION = '5.51.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.
|
|
3
|
+
"version": "5.51.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": {
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
"renderingLibraries": {
|
|
36
36
|
"expo-image": "~56.0.8",
|
|
37
37
|
"expo-linear-gradient": "~56.0.4",
|
|
38
|
+
"expo-video": "~56.1.4",
|
|
38
39
|
"react-native-gesture-handler": "~2.31.1",
|
|
39
40
|
"react-native-reanimated": "4.3.1",
|
|
40
41
|
"react-native-svg": "15.15.4"
|