@frontify/guideline-blocks-settings 0.16.0 → 0.19.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.
@@ -1,8 +1,13 @@
1
- import { BaseBlock } from './base';
2
- import { Checkbox } from './checkbox';
1
+ import type { BaseBlock } from './base';
2
+ import type { Checkbox } from './checkbox';
3
+ import type { AppBridgeBlock } from '@frontify/app-bridge';
4
+ declare type ChoicesFn = (props: {
5
+ appBridge: AppBridgeBlock;
6
+ }) => Promise<Checkbox[]>;
3
7
  export declare type ChecklistBlock = {
4
8
  type: 'checklist';
5
- choices: Checkbox[];
9
+ choices: Checkbox[] | ChoicesFn;
6
10
  showClearAndSelectAllButtons?: boolean;
7
11
  columns?: 1 | 2;
8
12
  } & BaseBlock<string[] | null>;
13
+ export {};
@@ -1,5 +1,7 @@
1
- import { Color } from '@frontify/fondue';
1
+ import { Color, ColorRgb } from '@frontify/fondue';
2
2
  import { BaseBlock } from './base';
3
+ declare type ColorFormats = Color | ColorRgb;
3
4
  export declare type ColorInputBlock = {
4
5
  type: 'colorInput';
5
- } & BaseBlock<Color>;
6
+ } & BaseBlock<ColorFormats>;
7
+ export {};
package/dist/index.cjs.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var a=(r=>(r.Library="Library",r.Upload="Upload",r))(a||{}),e=(r=>(r.BrowseAndUpload="BrowseAndUpload",r.UploadOnly="UploadOnly",r.BrowseOnly="BrowseOnly",r))(e||{}),l=(r=>(r.Library="Library",r.Upload="Upload",r))(l||{}),n=(r=>(r.BrowseAndUpload="BrowseAndUpload",r.UploadOnly="UploadOnly",r.BrowseOnly="BrowseOnly",r))(n||{}),o=(r=>(r.Warning="Warning",r.Negative="Negative",r.Positive="Positive",r.Info="Info",r))(o||{}),t=(r=>(r.Top="Top",r.Bottom="Bottom",r.Both="Both",r.None="None",r))(t||{}),d=(r=>(r.Main="main",r.Content="content",r.Layout="layout",r.Style="style",r.Security="security",r.Targets="targets",r))(d||{});exports.AssetInputMode=e;exports.AssetInputSource=a;exports.LegacyAssetInputMode=n;exports.LegacyAssetInputSource=l;exports.NotificationBlockDividerPosition=t;exports.NotificationStyleType=o;exports.Sections=d;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var a=(r=>(r.Library="Library",r.Upload="Upload",r))(a||{}),e=(r=>(r.BrowseAndUpload="BrowseAndUpload",r.UploadOnly="UploadOnly",r.BrowseOnly="BrowseOnly",r))(e||{}),l=(r=>(r.Library="Library",r.Upload="Upload",r))(l||{}),o=(r=>(r.BrowseAndUpload="BrowseAndUpload",r.UploadOnly="UploadOnly",r.BrowseOnly="BrowseOnly",r))(o||{}),n=(r=>(r.Warning="Warning",r.Negative="Negative",r.Positive="Positive",r.Info="Info",r))(n||{}),d=(r=>(r.Top="Top",r.Bottom="Bottom",r.Both="Both",r.None="None",r))(d||{}),u=(r=>(r.Main="main",r.Basics="basics",r.Layout="layout",r.Style="style",r.Security="security",r.Targets="targets",r))(u||{});exports.AssetInputMode=e;exports.AssetInputSource=a;exports.LegacyAssetInputMode=o;exports.LegacyAssetInputSource=l;exports.NotificationBlockDividerPosition=d;exports.NotificationStyleType=n;exports.Sections=u;
2
2
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":["../types/blocks/assetInput.ts","../types/blocks/legacyAssetInput.ts","../types/blocks/notification.ts","../types/index.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { AssetChooserObjectType, AssetChooserProjectType, FileExtension } from '@frontify/app-bridge';\nimport { BaseBlock } from './base';\n\nexport enum AssetInputSource {\n Library = 'Library',\n Upload = 'Upload',\n}\n\nexport enum AssetInputMode {\n BrowseAndUpload = 'BrowseAndUpload',\n UploadOnly = 'UploadOnly',\n BrowseOnly = 'BrowseOnly',\n}\n\nexport type AssetInputValue = {\n source: AssetInputSource;\n value: number;\n};\n\nexport type AssetInputBlock = {\n type: 'assetInput';\n multiSelection?: boolean;\n extensions?: (FileExtension | string)[];\n projectTypes?: AssetChooserProjectType[];\n objectTypes?: AssetChooserObjectType[];\n mode?: AssetInputMode;\n} & BaseBlock<AssetInputValue | AssetInputValue['value']>;\n","/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { AssetChooserObjectType, AssetChooserProjectType, FileExtension } from '@frontify/app-bridge';\nimport { BaseBlock } from './base';\n\nexport enum LegacyAssetInputSource {\n Library = 'Library',\n Upload = 'Upload',\n}\n\nexport enum LegacyAssetInputMode {\n BrowseAndUpload = 'BrowseAndUpload',\n UploadOnly = 'UploadOnly',\n BrowseOnly = 'BrowseOnly',\n}\n\nexport type LegacyAssetInputValue = {\n source: LegacyAssetInputSource;\n value: number;\n};\n\nexport type LegacyAssetInputBlock = {\n type: 'legacyAssetInput';\n multiSelection?: boolean;\n extensions?: (FileExtension | string)[];\n projectTypes?: AssetChooserProjectType[];\n objectTypes?: AssetChooserObjectType[];\n mode?: LegacyAssetInputMode;\n} & BaseBlock<LegacyAssetInputValue | LegacyAssetInputValue['value']>;\n","/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { BaseBlock } from './base';\n\nexport enum NotificationStyleType {\n Warning = 'Warning',\n Negative = 'Negative',\n Positive = 'Positive',\n Info = 'Info',\n}\n\nexport type Link = {\n label?: string;\n href: string;\n target?: '_self' | '_blank';\n};\n\nexport enum NotificationBlockDividerPosition {\n Top = 'Top',\n Bottom = 'Bottom',\n Both = 'Both',\n None = 'None',\n}\n\nexport type NotificationBlock = {\n type: 'notification';\n title?: string;\n text?: string;\n link?: Link;\n styles: {\n type: NotificationStyleType;\n icon?: boolean;\n divider?: NotificationBlockDividerPosition;\n };\n} & BaseBlock;\n","/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { SettingBlock } from './blocks';\n\nexport * from './blocks';\nexport type { BaseBlock } from './blocks/base';\nexport type { Bundle, SettingValue } from './bundle';\nexport type { Rule } from './validation';\n\nexport enum Sections {\n Main = 'main',\n Content = 'content',\n Layout = 'layout',\n Style = 'style',\n Security = 'security',\n Targets = 'targets',\n}\n\nexport type BlockSettings = {\n [Sections.Main]?: SettingBlock[];\n [Sections.Content]?: SettingBlock[];\n [Sections.Layout]?: SettingBlock[];\n [Sections.Style]?: SettingBlock[];\n [Sections.Security]?: SettingBlock[];\n};\n"],"names":["AssetInputSource","AssetInputMode","LegacyAssetInputSource","LegacyAssetInputMode","NotificationStyleType","NotificationBlockDividerPosition","Sections"],"mappings":"4GAKY,IAAAA,GAAAA,IACRA,EAAA,QAAU,UACVA,EAAA,OAAS,SAFDA,IAAAA,GAAA,CAAA,CAAA,EAKAC,GAAAA,IACRA,EAAA,gBAAkB,kBAClBA,EAAA,WAAa,aACbA,EAAA,WAAa,aAHLA,IAAAA,GAAA,CAAA,CAAA,ECLAC,GAAAA,IACRA,EAAA,QAAU,UACVA,EAAA,OAAS,SAFDA,IAAAA,GAAA,CAAA,CAAA,EAKAC,GAAAA,IACRA,EAAA,gBAAkB,kBAClBA,EAAA,WAAa,aACbA,EAAA,WAAa,aAHLA,IAAAA,GAAA,CAAA,CAAA,ECNAC,GAAAA,IACRA,EAAA,QAAU,UACVA,EAAA,SAAW,WACXA,EAAA,SAAW,WACXA,EAAA,KAAO,OAJCA,IAAAA,GAAA,CAAA,CAAA,EAaAC,GAAAA,IACRA,EAAA,IAAM,MACNA,EAAA,OAAS,SACTA,EAAA,KAAO,OACPA,EAAA,KAAO,OAJCA,IAAAA,GAAA,CAAA,CAAA,ECRAC,GAAAA,IACRA,EAAA,KAAO,OACPA,EAAA,QAAU,UACVA,EAAA,OAAS,SACTA,EAAA,MAAQ,QACRA,EAAA,SAAW,WACXA,EAAA,QAAU,UANFA,IAAAA,GAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"index.cjs.js","sources":["../types/blocks/assetInput.ts","../types/blocks/legacyAssetInput.ts","../types/blocks/notification.ts","../types/index.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { AssetChooserObjectType, AssetChooserProjectType, FileExtension } from '@frontify/app-bridge';\nimport { BaseBlock } from './base';\n\nexport enum AssetInputSource {\n Library = 'Library',\n Upload = 'Upload',\n}\n\nexport enum AssetInputMode {\n BrowseAndUpload = 'BrowseAndUpload',\n UploadOnly = 'UploadOnly',\n BrowseOnly = 'BrowseOnly',\n}\n\nexport type AssetInputValue = {\n source: AssetInputSource;\n value: number;\n};\n\nexport type AssetInputBlock = {\n type: 'assetInput';\n multiSelection?: boolean;\n extensions?: (FileExtension | string)[];\n projectTypes?: AssetChooserProjectType[];\n objectTypes?: AssetChooserObjectType[];\n mode?: AssetInputMode;\n} & BaseBlock<AssetInputValue | AssetInputValue['value']>;\n","/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { AssetChooserObjectType, AssetChooserProjectType, FileExtension } from '@frontify/app-bridge';\nimport { BaseBlock } from './base';\n\nexport enum LegacyAssetInputSource {\n Library = 'Library',\n Upload = 'Upload',\n}\n\nexport enum LegacyAssetInputMode {\n BrowseAndUpload = 'BrowseAndUpload',\n UploadOnly = 'UploadOnly',\n BrowseOnly = 'BrowseOnly',\n}\n\nexport type LegacyAssetInputValue = {\n source: LegacyAssetInputSource;\n value: number;\n};\n\nexport type LegacyAssetInputBlock = {\n type: 'legacyAssetInput';\n multiSelection?: boolean;\n extensions?: (FileExtension | string)[];\n projectTypes?: AssetChooserProjectType[];\n objectTypes?: AssetChooserObjectType[];\n mode?: LegacyAssetInputMode;\n} & BaseBlock<LegacyAssetInputValue | LegacyAssetInputValue['value']>;\n","/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { BaseBlock } from './base';\n\nexport enum NotificationStyleType {\n Warning = 'Warning',\n Negative = 'Negative',\n Positive = 'Positive',\n Info = 'Info',\n}\n\nexport type Link = {\n label?: string;\n href: string;\n target?: '_self' | '_blank';\n};\n\nexport enum NotificationBlockDividerPosition {\n Top = 'Top',\n Bottom = 'Bottom',\n Both = 'Both',\n None = 'None',\n}\n\nexport type NotificationBlock = {\n type: 'notification';\n title?: string;\n text?: string;\n link?: Link;\n styles: {\n type: NotificationStyleType;\n icon?: boolean;\n divider?: NotificationBlockDividerPosition;\n };\n} & BaseBlock;\n","/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { SettingBlock } from './blocks';\n\nexport * from './blocks';\nexport type { BaseBlock } from './blocks/base';\nexport type { Bundle, SettingValue } from './bundle';\nexport type { Rule } from './validation';\n\nexport enum Sections {\n Main = 'main',\n Basics = 'basics',\n Layout = 'layout',\n Style = 'style',\n Security = 'security',\n Targets = 'targets',\n}\n\nexport type BlockSettings = {\n [Sections.Main]?: SettingBlock[];\n [Sections.Basics]?: SettingBlock[];\n [Sections.Layout]?: SettingBlock[];\n [Sections.Style]?: SettingBlock[];\n [Sections.Security]?: SettingBlock[];\n};\n"],"names":["AssetInputSource","AssetInputMode","LegacyAssetInputSource","LegacyAssetInputMode","NotificationStyleType","NotificationBlockDividerPosition","Sections"],"mappings":"4GAKY,IAAAA,GAAAA,IACRA,EAAA,QAAU,UACVA,EAAA,OAAS,SAFDA,IAAAA,GAAA,CAAA,CAAA,EAKAC,GAAAA,IACRA,EAAA,gBAAkB,kBAClBA,EAAA,WAAa,aACbA,EAAA,WAAa,aAHLA,IAAAA,GAAA,CAAA,CAAA,ECLAC,GAAAA,IACRA,EAAA,QAAU,UACVA,EAAA,OAAS,SAFDA,IAAAA,GAAA,CAAA,CAAA,EAKAC,GAAAA,IACRA,EAAA,gBAAkB,kBAClBA,EAAA,WAAa,aACbA,EAAA,WAAa,aAHLA,IAAAA,GAAA,CAAA,CAAA,ECNAC,GAAAA,IACRA,EAAA,QAAU,UACVA,EAAA,SAAW,WACXA,EAAA,SAAW,WACXA,EAAA,KAAO,OAJCA,IAAAA,GAAA,CAAA,CAAA,EAaAC,GAAAA,IACRA,EAAA,IAAM,MACNA,EAAA,OAAS,SACTA,EAAA,KAAO,OACPA,EAAA,KAAO,OAJCA,IAAAA,GAAA,CAAA,CAAA,ECRAC,GAAAA,IACRA,EAAA,KAAO,OACPA,EAAA,OAAS,SACTA,EAAA,OAAS,SACTA,EAAA,MAAQ,QACRA,EAAA,SAAW,WACXA,EAAA,QAAU,UANFA,IAAAA,GAAA,CAAA,CAAA"}
package/dist/index.d.ts CHANGED
@@ -5,7 +5,7 @@ export type { Bundle, SettingValue } from './bundle';
5
5
  export type { Rule } from './validation';
6
6
  export declare enum Sections {
7
7
  Main = "main",
8
- Content = "content",
8
+ Basics = "basics",
9
9
  Layout = "layout",
10
10
  Style = "style",
11
11
  Security = "security",
@@ -13,7 +13,7 @@ export declare enum Sections {
13
13
  }
14
14
  export declare type BlockSettings = {
15
15
  [Sections.Main]?: SettingBlock[];
16
- [Sections.Content]?: SettingBlock[];
16
+ [Sections.Basics]?: SettingBlock[];
17
17
  [Sections.Layout]?: SettingBlock[];
18
18
  [Sections.Style]?: SettingBlock[];
19
19
  [Sections.Security]?: SettingBlock[];
package/dist/index.es.js CHANGED
@@ -1,14 +1,14 @@
1
- import { AssetInputMode as a, AssetInputSource as u } from "./blocks/assetInput.es.js";
2
- import { LegacyAssetInputMode as i, LegacyAssetInputSource as n } from "./blocks/legacyAssetInput.es.js";
3
- import { NotificationBlockDividerPosition as s, NotificationStyleType as c } from "./blocks/notification.es.js";
4
- var e = /* @__PURE__ */ ((t) => (t.Main = "main", t.Content = "content", t.Layout = "layout", t.Style = "style", t.Security = "security", t.Targets = "targets", t))(e || {});
1
+ import { AssetInputMode as a, AssetInputSource as s } from "./blocks/assetInput.es.js";
2
+ import { LegacyAssetInputMode as u, LegacyAssetInputSource as y } from "./blocks/legacyAssetInput.es.js";
3
+ import { NotificationBlockDividerPosition as c, NotificationStyleType as f } from "./blocks/notification.es.js";
4
+ var e = /* @__PURE__ */ ((t) => (t.Main = "main", t.Basics = "basics", t.Layout = "layout", t.Style = "style", t.Security = "security", t.Targets = "targets", t))(e || {});
5
5
  export {
6
6
  a as AssetInputMode,
7
- u as AssetInputSource,
8
- i as LegacyAssetInputMode,
9
- n as LegacyAssetInputSource,
10
- s as NotificationBlockDividerPosition,
11
- c as NotificationStyleType,
7
+ s as AssetInputSource,
8
+ u as LegacyAssetInputMode,
9
+ y as LegacyAssetInputSource,
10
+ c as NotificationBlockDividerPosition,
11
+ f as NotificationStyleType,
12
12
  e as Sections
13
13
  };
14
14
  //# sourceMappingURL=index.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es.js","sources":["../types/index.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { SettingBlock } from './blocks';\n\nexport * from './blocks';\nexport type { BaseBlock } from './blocks/base';\nexport type { Bundle, SettingValue } from './bundle';\nexport type { Rule } from './validation';\n\nexport enum Sections {\n Main = 'main',\n Content = 'content',\n Layout = 'layout',\n Style = 'style',\n Security = 'security',\n Targets = 'targets',\n}\n\nexport type BlockSettings = {\n [Sections.Main]?: SettingBlock[];\n [Sections.Content]?: SettingBlock[];\n [Sections.Layout]?: SettingBlock[];\n [Sections.Style]?: SettingBlock[];\n [Sections.Security]?: SettingBlock[];\n};\n"],"names":["Sections"],"mappings":";;;AASY,IAAAA,sBAAAA,OACRA,EAAA,OAAO,QACPA,EAAA,UAAU,WACVA,EAAA,SAAS,UACTA,EAAA,QAAQ,SACRA,EAAA,WAAW,YACXA,EAAA,UAAU,WANFA,IAAAA,KAAA,CAAA,CAAA;"}
1
+ {"version":3,"file":"index.es.js","sources":["../types/index.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { SettingBlock } from './blocks';\n\nexport * from './blocks';\nexport type { BaseBlock } from './blocks/base';\nexport type { Bundle, SettingValue } from './bundle';\nexport type { Rule } from './validation';\n\nexport enum Sections {\n Main = 'main',\n Basics = 'basics',\n Layout = 'layout',\n Style = 'style',\n Security = 'security',\n Targets = 'targets',\n}\n\nexport type BlockSettings = {\n [Sections.Main]?: SettingBlock[];\n [Sections.Basics]?: SettingBlock[];\n [Sections.Layout]?: SettingBlock[];\n [Sections.Style]?: SettingBlock[];\n [Sections.Security]?: SettingBlock[];\n};\n"],"names":["Sections"],"mappings":";;;AASY,IAAAA,sBAAAA,OACRA,EAAA,OAAO,QACPA,EAAA,SAAS,UACTA,EAAA,SAAS,UACTA,EAAA,QAAQ,SACRA,EAAA,WAAW,YACXA,EAAA,UAAU,WANFA,IAAAA,KAAA,CAAA,CAAA;"}
package/dist/index.umd.js CHANGED
@@ -1,2 +1,2 @@
1
- (function(r,n){typeof exports=="object"&&typeof module<"u"?n(exports):typeof define=="function"&&define.amd?define(["exports"],n):(r=typeof globalThis<"u"?globalThis:r||self,n(r.GuidelineBlocksSettings={}))})(this,function(r){"use strict";var n=(e=>(e.Library="Library",e.Upload="Upload",e))(n||{}),a=(e=>(e.BrowseAndUpload="BrowseAndUpload",e.UploadOnly="UploadOnly",e.BrowseOnly="BrowseOnly",e))(a||{}),l=(e=>(e.Library="Library",e.Upload="Upload",e))(l||{}),o=(e=>(e.BrowseAndUpload="BrowseAndUpload",e.UploadOnly="UploadOnly",e.BrowseOnly="BrowseOnly",e))(o||{}),d=(e=>(e.Warning="Warning",e.Negative="Negative",e.Positive="Positive",e.Info="Info",e))(d||{}),t=(e=>(e.Top="Top",e.Bottom="Bottom",e.Both="Both",e.None="None",e))(t||{}),u=(e=>(e.Main="main",e.Content="content",e.Layout="layout",e.Style="style",e.Security="security",e.Targets="targets",e))(u||{});r.AssetInputMode=a,r.AssetInputSource=n,r.LegacyAssetInputMode=o,r.LegacyAssetInputSource=l,r.NotificationBlockDividerPosition=t,r.NotificationStyleType=d,r.Sections=u,Object.defineProperties(r,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(r,n){typeof exports=="object"&&typeof module<"u"?n(exports):typeof define=="function"&&define.amd?define(["exports"],n):(r=typeof globalThis<"u"?globalThis:r||self,n(r.GuidelineBlocksSettings={}))})(this,function(r){"use strict";var n=(e=>(e.Library="Library",e.Upload="Upload",e))(n||{}),a=(e=>(e.BrowseAndUpload="BrowseAndUpload",e.UploadOnly="UploadOnly",e.BrowseOnly="BrowseOnly",e))(a||{}),l=(e=>(e.Library="Library",e.Upload="Upload",e))(l||{}),d=(e=>(e.BrowseAndUpload="BrowseAndUpload",e.UploadOnly="UploadOnly",e.BrowseOnly="BrowseOnly",e))(d||{}),o=(e=>(e.Warning="Warning",e.Negative="Negative",e.Positive="Positive",e.Info="Info",e))(o||{}),u=(e=>(e.Top="Top",e.Bottom="Bottom",e.Both="Both",e.None="None",e))(u||{}),t=(e=>(e.Main="main",e.Basics="basics",e.Layout="layout",e.Style="style",e.Security="security",e.Targets="targets",e))(t||{});r.AssetInputMode=a,r.AssetInputSource=n,r.LegacyAssetInputMode=d,r.LegacyAssetInputSource=l,r.NotificationBlockDividerPosition=u,r.NotificationStyleType=o,r.Sections=t,Object.defineProperties(r,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
2
2
  //# sourceMappingURL=index.umd.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.umd.js","sources":["../types/blocks/assetInput.ts","../types/blocks/legacyAssetInput.ts","../types/blocks/notification.ts","../types/index.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { AssetChooserObjectType, AssetChooserProjectType, FileExtension } from '@frontify/app-bridge';\nimport { BaseBlock } from './base';\n\nexport enum AssetInputSource {\n Library = 'Library',\n Upload = 'Upload',\n}\n\nexport enum AssetInputMode {\n BrowseAndUpload = 'BrowseAndUpload',\n UploadOnly = 'UploadOnly',\n BrowseOnly = 'BrowseOnly',\n}\n\nexport type AssetInputValue = {\n source: AssetInputSource;\n value: number;\n};\n\nexport type AssetInputBlock = {\n type: 'assetInput';\n multiSelection?: boolean;\n extensions?: (FileExtension | string)[];\n projectTypes?: AssetChooserProjectType[];\n objectTypes?: AssetChooserObjectType[];\n mode?: AssetInputMode;\n} & BaseBlock<AssetInputValue | AssetInputValue['value']>;\n","/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { AssetChooserObjectType, AssetChooserProjectType, FileExtension } from '@frontify/app-bridge';\nimport { BaseBlock } from './base';\n\nexport enum LegacyAssetInputSource {\n Library = 'Library',\n Upload = 'Upload',\n}\n\nexport enum LegacyAssetInputMode {\n BrowseAndUpload = 'BrowseAndUpload',\n UploadOnly = 'UploadOnly',\n BrowseOnly = 'BrowseOnly',\n}\n\nexport type LegacyAssetInputValue = {\n source: LegacyAssetInputSource;\n value: number;\n};\n\nexport type LegacyAssetInputBlock = {\n type: 'legacyAssetInput';\n multiSelection?: boolean;\n extensions?: (FileExtension | string)[];\n projectTypes?: AssetChooserProjectType[];\n objectTypes?: AssetChooserObjectType[];\n mode?: LegacyAssetInputMode;\n} & BaseBlock<LegacyAssetInputValue | LegacyAssetInputValue['value']>;\n","/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { BaseBlock } from './base';\n\nexport enum NotificationStyleType {\n Warning = 'Warning',\n Negative = 'Negative',\n Positive = 'Positive',\n Info = 'Info',\n}\n\nexport type Link = {\n label?: string;\n href: string;\n target?: '_self' | '_blank';\n};\n\nexport enum NotificationBlockDividerPosition {\n Top = 'Top',\n Bottom = 'Bottom',\n Both = 'Both',\n None = 'None',\n}\n\nexport type NotificationBlock = {\n type: 'notification';\n title?: string;\n text?: string;\n link?: Link;\n styles: {\n type: NotificationStyleType;\n icon?: boolean;\n divider?: NotificationBlockDividerPosition;\n };\n} & BaseBlock;\n","/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { SettingBlock } from './blocks';\n\nexport * from './blocks';\nexport type { BaseBlock } from './blocks/base';\nexport type { Bundle, SettingValue } from './bundle';\nexport type { Rule } from './validation';\n\nexport enum Sections {\n Main = 'main',\n Content = 'content',\n Layout = 'layout',\n Style = 'style',\n Security = 'security',\n Targets = 'targets',\n}\n\nexport type BlockSettings = {\n [Sections.Main]?: SettingBlock[];\n [Sections.Content]?: SettingBlock[];\n [Sections.Layout]?: SettingBlock[];\n [Sections.Style]?: SettingBlock[];\n [Sections.Security]?: SettingBlock[];\n};\n"],"names":["AssetInputSource","AssetInputMode","LegacyAssetInputSource","LegacyAssetInputMode","NotificationStyleType","NotificationBlockDividerPosition","Sections"],"mappings":"+OAKY,IAAAA,GAAAA,IACRA,EAAA,QAAU,UACVA,EAAA,OAAS,SAFDA,IAAAA,GAAA,CAAA,CAAA,EAKAC,GAAAA,IACRA,EAAA,gBAAkB,kBAClBA,EAAA,WAAa,aACbA,EAAA,WAAa,aAHLA,IAAAA,GAAA,CAAA,CAAA,ECLAC,GAAAA,IACRA,EAAA,QAAU,UACVA,EAAA,OAAS,SAFDA,IAAAA,GAAA,CAAA,CAAA,EAKAC,GAAAA,IACRA,EAAA,gBAAkB,kBAClBA,EAAA,WAAa,aACbA,EAAA,WAAa,aAHLA,IAAAA,GAAA,CAAA,CAAA,ECNAC,GAAAA,IACRA,EAAA,QAAU,UACVA,EAAA,SAAW,WACXA,EAAA,SAAW,WACXA,EAAA,KAAO,OAJCA,IAAAA,GAAA,CAAA,CAAA,EAaAC,GAAAA,IACRA,EAAA,IAAM,MACNA,EAAA,OAAS,SACTA,EAAA,KAAO,OACPA,EAAA,KAAO,OAJCA,IAAAA,GAAA,CAAA,CAAA,ECRAC,GAAAA,IACRA,EAAA,KAAO,OACPA,EAAA,QAAU,UACVA,EAAA,OAAS,SACTA,EAAA,MAAQ,QACRA,EAAA,SAAW,WACXA,EAAA,QAAU,UANFA,IAAAA,GAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"index.umd.js","sources":["../types/blocks/assetInput.ts","../types/blocks/legacyAssetInput.ts","../types/blocks/notification.ts","../types/index.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { AssetChooserObjectType, AssetChooserProjectType, FileExtension } from '@frontify/app-bridge';\nimport { BaseBlock } from './base';\n\nexport enum AssetInputSource {\n Library = 'Library',\n Upload = 'Upload',\n}\n\nexport enum AssetInputMode {\n BrowseAndUpload = 'BrowseAndUpload',\n UploadOnly = 'UploadOnly',\n BrowseOnly = 'BrowseOnly',\n}\n\nexport type AssetInputValue = {\n source: AssetInputSource;\n value: number;\n};\n\nexport type AssetInputBlock = {\n type: 'assetInput';\n multiSelection?: boolean;\n extensions?: (FileExtension | string)[];\n projectTypes?: AssetChooserProjectType[];\n objectTypes?: AssetChooserObjectType[];\n mode?: AssetInputMode;\n} & BaseBlock<AssetInputValue | AssetInputValue['value']>;\n","/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { AssetChooserObjectType, AssetChooserProjectType, FileExtension } from '@frontify/app-bridge';\nimport { BaseBlock } from './base';\n\nexport enum LegacyAssetInputSource {\n Library = 'Library',\n Upload = 'Upload',\n}\n\nexport enum LegacyAssetInputMode {\n BrowseAndUpload = 'BrowseAndUpload',\n UploadOnly = 'UploadOnly',\n BrowseOnly = 'BrowseOnly',\n}\n\nexport type LegacyAssetInputValue = {\n source: LegacyAssetInputSource;\n value: number;\n};\n\nexport type LegacyAssetInputBlock = {\n type: 'legacyAssetInput';\n multiSelection?: boolean;\n extensions?: (FileExtension | string)[];\n projectTypes?: AssetChooserProjectType[];\n objectTypes?: AssetChooserObjectType[];\n mode?: LegacyAssetInputMode;\n} & BaseBlock<LegacyAssetInputValue | LegacyAssetInputValue['value']>;\n","/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { BaseBlock } from './base';\n\nexport enum NotificationStyleType {\n Warning = 'Warning',\n Negative = 'Negative',\n Positive = 'Positive',\n Info = 'Info',\n}\n\nexport type Link = {\n label?: string;\n href: string;\n target?: '_self' | '_blank';\n};\n\nexport enum NotificationBlockDividerPosition {\n Top = 'Top',\n Bottom = 'Bottom',\n Both = 'Both',\n None = 'None',\n}\n\nexport type NotificationBlock = {\n type: 'notification';\n title?: string;\n text?: string;\n link?: Link;\n styles: {\n type: NotificationStyleType;\n icon?: boolean;\n divider?: NotificationBlockDividerPosition;\n };\n} & BaseBlock;\n","/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { SettingBlock } from './blocks';\n\nexport * from './blocks';\nexport type { BaseBlock } from './blocks/base';\nexport type { Bundle, SettingValue } from './bundle';\nexport type { Rule } from './validation';\n\nexport enum Sections {\n Main = 'main',\n Basics = 'basics',\n Layout = 'layout',\n Style = 'style',\n Security = 'security',\n Targets = 'targets',\n}\n\nexport type BlockSettings = {\n [Sections.Main]?: SettingBlock[];\n [Sections.Basics]?: SettingBlock[];\n [Sections.Layout]?: SettingBlock[];\n [Sections.Style]?: SettingBlock[];\n [Sections.Security]?: SettingBlock[];\n};\n"],"names":["AssetInputSource","AssetInputMode","LegacyAssetInputSource","LegacyAssetInputMode","NotificationStyleType","NotificationBlockDividerPosition","Sections"],"mappings":"+OAKY,IAAAA,GAAAA,IACRA,EAAA,QAAU,UACVA,EAAA,OAAS,SAFDA,IAAAA,GAAA,CAAA,CAAA,EAKAC,GAAAA,IACRA,EAAA,gBAAkB,kBAClBA,EAAA,WAAa,aACbA,EAAA,WAAa,aAHLA,IAAAA,GAAA,CAAA,CAAA,ECLAC,GAAAA,IACRA,EAAA,QAAU,UACVA,EAAA,OAAS,SAFDA,IAAAA,GAAA,CAAA,CAAA,EAKAC,GAAAA,IACRA,EAAA,gBAAkB,kBAClBA,EAAA,WAAa,aACbA,EAAA,WAAa,aAHLA,IAAAA,GAAA,CAAA,CAAA,ECNAC,GAAAA,IACRA,EAAA,QAAU,UACVA,EAAA,SAAW,WACXA,EAAA,SAAW,WACXA,EAAA,KAAO,OAJCA,IAAAA,GAAA,CAAA,CAAA,EAaAC,GAAAA,IACRA,EAAA,IAAM,MACNA,EAAA,OAAS,SACTA,EAAA,KAAO,OACPA,EAAA,KAAO,OAJCA,IAAAA,GAAA,CAAA,CAAA,ECRAC,GAAAA,IACRA,EAAA,KAAO,OACPA,EAAA,OAAS,SACTA,EAAA,OAAS,SACTA,EAAA,MAAQ,QACRA,EAAA,SAAW,WACXA,EAAA,QAAU,UANFA,IAAAA,GAAA,CAAA,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frontify/guideline-blocks-settings",
3
- "version": "0.16.0",
3
+ "version": "0.19.0",
4
4
  "description": "Provides the types for the block settings",
5
5
  "sideEffects": false,
6
6
  "main": "dist/index.umd.js",
@@ -1,11 +1,14 @@
1
1
  /* (c) Copyright Frontify Ltd., all rights reserved. */
2
2
 
3
- import { BaseBlock } from './base';
4
- import { Checkbox } from './checkbox';
3
+ import type { BaseBlock } from './base';
4
+ import type { Checkbox } from './checkbox';
5
+ import type { AppBridgeBlock } from '@frontify/app-bridge';
6
+
7
+ type ChoicesFn = (props: { appBridge: AppBridgeBlock }) => Promise<Checkbox[]>;
5
8
 
6
9
  export type ChecklistBlock = {
7
10
  type: 'checklist';
8
- choices: Checkbox[];
11
+ choices: Checkbox[] | ChoicesFn;
9
12
  showClearAndSelectAllButtons?: boolean;
10
13
  columns?: 1 | 2;
11
14
  } & BaseBlock<string[] | null>;
@@ -1,8 +1,10 @@
1
1
  /* (c) Copyright Frontify Ltd., all rights reserved. */
2
2
 
3
- import { Color } from '@frontify/fondue';
3
+ import { Color, ColorRgb } from '@frontify/fondue';
4
4
  import { BaseBlock } from './base';
5
5
 
6
+ type ColorFormats = Color | ColorRgb;
7
+
6
8
  export type ColorInputBlock = {
7
9
  type: 'colorInput';
8
- } & BaseBlock<Color>;
10
+ } & BaseBlock<ColorFormats>;
package/types/index.ts CHANGED
@@ -9,7 +9,7 @@ export type { Rule } from './validation';
9
9
 
10
10
  export enum Sections {
11
11
  Main = 'main',
12
- Content = 'content',
12
+ Basics = 'basics',
13
13
  Layout = 'layout',
14
14
  Style = 'style',
15
15
  Security = 'security',
@@ -18,7 +18,7 @@ export enum Sections {
18
18
 
19
19
  export type BlockSettings = {
20
20
  [Sections.Main]?: SettingBlock[];
21
- [Sections.Content]?: SettingBlock[];
21
+ [Sections.Basics]?: SettingBlock[];
22
22
  [Sections.Layout]?: SettingBlock[];
23
23
  [Sections.Style]?: SettingBlock[];
24
24
  [Sections.Security]?: SettingBlock[];