@koralabs/kora-labs-common 4.3.0 → 4.3.2

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.
@@ -1,4 +1,4 @@
1
- import { BoolInt, HexString, HexStringOrEmpty } from '../types';
1
+ import { BoolInt, FeaturedItemType, HexString, HexStringOrEmpty } from '../types';
2
2
  export declare enum Rarity {
3
3
  basic = "basic",
4
4
  common = "common",
@@ -34,6 +34,7 @@ export interface IPersonalizationDesigner extends ISharedPzDesigner {
34
34
  qr_link?: string;
35
35
  socials?: SocialItem[];
36
36
  creator_defaults_enabled?: BoolInt;
37
+ custom_dollar_symbol?: BoolInt;
37
38
  }
38
39
  export interface ICreatorDefaults extends ISharedPzDesigner {
39
40
  bg_border_colors?: HexStringOrEmpty[];
@@ -47,11 +48,20 @@ export interface ICreatorDefaults extends ISharedPzDesigner {
47
48
  custom_dollar_symbol?: BoolInt;
48
49
  circuit_colors?: HexStringOrEmpty[];
49
50
  }
51
+ export interface GallerySettings {
52
+ include: string[];
53
+ exclude: string[];
54
+ align: 'center' | 'left' | 'right';
55
+ groupBy: 'policy' | 'none';
56
+ featured: FeaturedItemType[];
57
+ sort: 'amount' | 'name';
58
+ displayAmount: boolean;
59
+ }
50
60
  export interface IPersonalizationPortal {
51
61
  type: string;
52
62
  domain?: string | null;
53
63
  custom_settings?: string[] | null;
54
- gallery_settings?: string | null;
64
+ gallery_settings?: GallerySettings | null;
55
65
  }
56
66
  export declare enum ScriptType {
57
67
  PZ_CONTRACT = "pz_contract",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@koralabs/kora-labs-common",
3
- "version": "4.3.0",
3
+ "version": "4.3.2",
4
4
  "description": "Kora Labs Common Utilities",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -0,0 +1,20 @@
1
+ interface PolicyFeaturedItem {
2
+ type: 'policy';
3
+ hex: string;
4
+ name?: string;
5
+ image?: string;
6
+ sort: string;
7
+ fileIndex?: number;
8
+ attributeFilter: string[];
9
+ featuredTokens: string[];
10
+ }
11
+ interface SeparatorFeaturedItem {
12
+ type: 'separator';
13
+ }
14
+ interface AssetFeaturedItem {
15
+ type: 'asset';
16
+ hex: string;
17
+ fileIndex?: number;
18
+ }
19
+ type FeaturedItemType = PolicyFeaturedItem | SeparatorFeaturedItem | AssetFeaturedItem;
20
+ export { PolicyFeaturedItem, SeparatorFeaturedItem, AssetFeaturedItem, FeaturedItemType };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/types/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export * from './gallery';
1
2
  export type BoolInt = 0 | 1;
2
3
  export type HexString = `0x${string}`;
3
4
  export type HexStringOrEmpty = HexString | '';
package/types/index.js CHANGED
@@ -1,6 +1,21 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
2
16
  Object.defineProperty(exports, "__esModule", { value: true });
3
17
  exports.CardanoNetwork = exports.AssetNameLabel = void 0;
18
+ __exportStar(require("./gallery"), exports);
4
19
  /**
5
20
  * The Cip67Label is a string that is used to identify the asset type.
6
21
  * First, remove the first and last 0.