@frontify/guideline-blocks-settings 0.15.0 → 0.15.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.
@@ -0,0 +1,13 @@
1
+ var AssetInputSource = /* @__PURE__ */ ((AssetInputSource2) => {
2
+ AssetInputSource2["Library"] = "Library";
3
+ AssetInputSource2["Upload"] = "Upload";
4
+ return AssetInputSource2;
5
+ })(AssetInputSource || {});
6
+ var AssetInputMode = /* @__PURE__ */ ((AssetInputMode2) => {
7
+ AssetInputMode2["BrowseAndUpload"] = "BrowseAndUpload";
8
+ AssetInputMode2["UploadOnly"] = "UploadOnly";
9
+ AssetInputMode2["BrowseOnly"] = "BrowseOnly";
10
+ return AssetInputMode2;
11
+ })(AssetInputMode || {});
12
+ export { AssetInputMode, AssetInputSource };
13
+ //# sourceMappingURL=index.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.es.js","sources":["../../types/blocks/assetInput.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"],"names":[],"mappings":"AAKY,IAAA,qCAAA,sBAAL;AACO,oBAAA,aAAA;AACD,oBAAA,YAAA;AAFD,SAAA;AAAA,GAAA,oBAAA,CAAA,CAAA;AAKA,IAAA,mCAAA,oBAAL;AACe,kBAAA,qBAAA;AACL,kBAAA,gBAAA;AACA,kBAAA,gBAAA;AAHL,SAAA;AAAA,GAAA,kBAAA,CAAA,CAAA;;"}
@@ -0,0 +1,13 @@
1
+ var LegacyAssetInputSource = /* @__PURE__ */ ((LegacyAssetInputSource2) => {
2
+ LegacyAssetInputSource2["Library"] = "Library";
3
+ LegacyAssetInputSource2["Upload"] = "Upload";
4
+ return LegacyAssetInputSource2;
5
+ })(LegacyAssetInputSource || {});
6
+ var LegacyAssetInputMode = /* @__PURE__ */ ((LegacyAssetInputMode2) => {
7
+ LegacyAssetInputMode2["BrowseAndUpload"] = "BrowseAndUpload";
8
+ LegacyAssetInputMode2["UploadOnly"] = "UploadOnly";
9
+ LegacyAssetInputMode2["BrowseOnly"] = "BrowseOnly";
10
+ return LegacyAssetInputMode2;
11
+ })(LegacyAssetInputMode || {});
12
+ export { LegacyAssetInputMode, LegacyAssetInputSource };
13
+ //# sourceMappingURL=index.es2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.es2.js","sources":["../../types/blocks/legacyAssetInput.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 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"],"names":[],"mappings":"AAKY,IAAA,2CAAA,4BAAL;AACO,0BAAA,aAAA;AACD,0BAAA,YAAA;AAFD,SAAA;AAAA,GAAA,0BAAA,CAAA,CAAA;AAKA,IAAA,yCAAA,0BAAL;AACe,wBAAA,qBAAA;AACL,wBAAA,gBAAA;AACA,wBAAA,gBAAA;AAHL,SAAA;AAAA,GAAA,wBAAA,CAAA,CAAA;;"}
@@ -0,0 +1,16 @@
1
+ var NotificationStyleType = /* @__PURE__ */ ((NotificationStyleType2) => {
2
+ NotificationStyleType2["Warning"] = "Warning";
3
+ NotificationStyleType2["Negative"] = "Negative";
4
+ NotificationStyleType2["Positive"] = "Positive";
5
+ NotificationStyleType2["Info"] = "Info";
6
+ return NotificationStyleType2;
7
+ })(NotificationStyleType || {});
8
+ var NotificationBlockDividerPosition = /* @__PURE__ */ ((NotificationBlockDividerPosition2) => {
9
+ NotificationBlockDividerPosition2["Top"] = "Top";
10
+ NotificationBlockDividerPosition2["Bottom"] = "Bottom";
11
+ NotificationBlockDividerPosition2["Both"] = "Both";
12
+ NotificationBlockDividerPosition2["None"] = "None";
13
+ return NotificationBlockDividerPosition2;
14
+ })(NotificationBlockDividerPosition || {});
15
+ export { NotificationBlockDividerPosition, NotificationStyleType };
16
+ //# sourceMappingURL=index.es3.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.es3.js","sources":["../../types/blocks/notification.ts"],"sourcesContent":["/* (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"],"names":[],"mappings":"AAIY,IAAA,0CAAA,2BAAL;AACO,yBAAA,aAAA;AACC,yBAAA,cAAA;AACA,yBAAA,cAAA;AACJ,yBAAA,UAAA;AAJC,SAAA;AAAA,GAAA,yBAAA,CAAA,CAAA;AAaA,IAAA,qDAAA,sCAAL;AACG,oCAAA,SAAA;AACG,oCAAA,YAAA;AACF,oCAAA,UAAA;AACA,oCAAA,UAAA;AAJC,SAAA;AAAA,GAAA,oCAAA,CAAA,CAAA;;"}
package/dist/index.es.js CHANGED
@@ -1,39 +1,6 @@
1
- var AssetInputSource = /* @__PURE__ */ ((AssetInputSource2) => {
2
- AssetInputSource2["Library"] = "Library";
3
- AssetInputSource2["Upload"] = "Upload";
4
- return AssetInputSource2;
5
- })(AssetInputSource || {});
6
- var AssetInputMode = /* @__PURE__ */ ((AssetInputMode2) => {
7
- AssetInputMode2["BrowseAndUpload"] = "BrowseAndUpload";
8
- AssetInputMode2["UploadOnly"] = "UploadOnly";
9
- AssetInputMode2["BrowseOnly"] = "BrowseOnly";
10
- return AssetInputMode2;
11
- })(AssetInputMode || {});
12
- var LegacyAssetInputSource = /* @__PURE__ */ ((LegacyAssetInputSource2) => {
13
- LegacyAssetInputSource2["Library"] = "Library";
14
- LegacyAssetInputSource2["Upload"] = "Upload";
15
- return LegacyAssetInputSource2;
16
- })(LegacyAssetInputSource || {});
17
- var LegacyAssetInputMode = /* @__PURE__ */ ((LegacyAssetInputMode2) => {
18
- LegacyAssetInputMode2["BrowseAndUpload"] = "BrowseAndUpload";
19
- LegacyAssetInputMode2["UploadOnly"] = "UploadOnly";
20
- LegacyAssetInputMode2["BrowseOnly"] = "BrowseOnly";
21
- return LegacyAssetInputMode2;
22
- })(LegacyAssetInputMode || {});
23
- var NotificationStyleType = /* @__PURE__ */ ((NotificationStyleType2) => {
24
- NotificationStyleType2["Warning"] = "Warning";
25
- NotificationStyleType2["Negative"] = "Negative";
26
- NotificationStyleType2["Positive"] = "Positive";
27
- NotificationStyleType2["Info"] = "Info";
28
- return NotificationStyleType2;
29
- })(NotificationStyleType || {});
30
- var NotificationBlockDividerPosition = /* @__PURE__ */ ((NotificationBlockDividerPosition2) => {
31
- NotificationBlockDividerPosition2["Top"] = "Top";
32
- NotificationBlockDividerPosition2["Bottom"] = "Bottom";
33
- NotificationBlockDividerPosition2["Both"] = "Both";
34
- NotificationBlockDividerPosition2["None"] = "None";
35
- return NotificationBlockDividerPosition2;
36
- })(NotificationBlockDividerPosition || {});
1
+ export { AssetInputMode, AssetInputSource } from "./blocks/index.es.js";
2
+ export { LegacyAssetInputMode, LegacyAssetInputSource } from "./blocks/index.es2.js";
3
+ export { NotificationBlockDividerPosition, NotificationStyleType } from "./blocks/index.es3.js";
37
4
  var Sections = /* @__PURE__ */ ((Sections2) => {
38
5
  Sections2["Main"] = "main";
39
6
  Sections2["Content"] = "content";
@@ -43,5 +10,5 @@ var Sections = /* @__PURE__ */ ((Sections2) => {
43
10
  Sections2["Targets"] = "targets";
44
11
  return Sections2;
45
12
  })(Sections || {});
46
- export { AssetInputMode, AssetInputSource, LegacyAssetInputMode, LegacyAssetInputSource, NotificationBlockDividerPosition, NotificationStyleType, Sections };
13
+ export { Sections };
47
14
  //# sourceMappingURL=index.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es.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":[],"mappings":"AAKY,IAAA,qCAAA,sBAAL;AACO,oBAAA,aAAA;AACD,oBAAA,YAAA;AAFD,SAAA;AAAA,GAAA,oBAAA,CAAA,CAAA;AAKA,IAAA,mCAAA,oBAAL;AACe,kBAAA,qBAAA;AACL,kBAAA,gBAAA;AACA,kBAAA,gBAAA;AAHL,SAAA;AAAA,GAAA,kBAAA,CAAA,CAAA;ACLA,IAAA,2CAAA,4BAAL;AACO,0BAAA,aAAA;AACD,0BAAA,YAAA;AAFD,SAAA;AAAA,GAAA,0BAAA,CAAA,CAAA;AAKA,IAAA,yCAAA,0BAAL;AACe,wBAAA,qBAAA;AACL,wBAAA,gBAAA;AACA,wBAAA,gBAAA;AAHL,SAAA;AAAA,GAAA,wBAAA,CAAA,CAAA;ACNA,IAAA,0CAAA,2BAAL;AACO,yBAAA,aAAA;AACC,yBAAA,cAAA;AACA,yBAAA,cAAA;AACJ,yBAAA,UAAA;AAJC,SAAA;AAAA,GAAA,yBAAA,CAAA,CAAA;AAaA,IAAA,qDAAA,sCAAL;AACG,oCAAA,SAAA;AACG,oCAAA,YAAA;AACF,oCAAA,UAAA;AACA,oCAAA,UAAA;AAJC,SAAA;AAAA,GAAA,oCAAA,CAAA,CAAA;ACRA,IAAA,6BAAA,cAAL;AACI,YAAA,UAAA;AACG,YAAA,aAAA;AACD,YAAA,YAAA;AACD,YAAA,WAAA;AACG,YAAA,cAAA;AACD,YAAA,aAAA;AANF,SAAA;AAAA,GAAA,YAAA,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 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":[],"mappings":";;;AASY,IAAA,6BAAA,cAAL;AACI,YAAA,UAAA;AACG,YAAA,aAAA;AACD,YAAA,YAAA;AACD,YAAA,WAAA;AACG,YAAA,cAAA;AACD,YAAA,aAAA;AANF,SAAA;AAAA,GAAA,YAAA,CAAA,CAAA;;"}
package/package.json CHANGED
@@ -1,37 +1,37 @@
1
1
  {
2
- "name": "@frontify/guideline-blocks-settings",
3
- "version": "0.15.0",
4
- "description": "Provides the types for the block settings",
5
- "sideEffects": false,
6
- "main": "dist/index.umd.js",
7
- "unpkg": "dist/index.umd.js",
8
- "jsdelivr": "dist/index.umd.js",
9
- "module": "dist/index.es.js",
10
- "types": "dist/index.d.ts",
11
- "publishConfig": {
12
- "access": "public"
13
- },
14
- "author": "Frontify Developers <developers@frontify.com>",
15
- "scripts": {
16
- "build": "vite build",
17
- "lint": "eslint types",
18
- "lint:fix": "eslint --fix types",
19
- "prettier": "prettier --check types",
20
- "prettier:fix": "prettier --write types",
21
- "typecheck": "tsc --noEmit"
22
- },
23
- "devDependencies": {
24
- "@frontify/eslint-config-typescript": "0.15.2",
25
- "eslint": "8.15.0",
26
- "prettier": "2.6.2",
27
- "react": "17.0.2",
28
- "react-dom": "17.0.2",
29
- "typescript": "4.6.4",
30
- "vite": "2.9.9",
31
- "vite-plugin-dts": "1.2.0"
32
- },
33
- "dependencies": {
34
- "@frontify/app-bridge": "*",
35
- "@frontify/fondue": "*"
36
- }
37
- }
2
+ "name": "@frontify/guideline-blocks-settings",
3
+ "version": "0.15.1",
4
+ "description": "Provides the types for the block settings",
5
+ "sideEffects": false,
6
+ "main": "dist/index.umd.js",
7
+ "unpkg": "dist/index.umd.js",
8
+ "jsdelivr": "dist/index.umd.js",
9
+ "module": "dist/index.es.js",
10
+ "types": "dist/index.d.ts",
11
+ "publishConfig": {
12
+ "access": "public"
13
+ },
14
+ "author": "Frontify Developers <developers@frontify.com>",
15
+ "devDependencies": {
16
+ "@frontify/eslint-config-typescript": "0.15.2",
17
+ "eslint": "8.15.0",
18
+ "prettier": "2.6.2",
19
+ "react": "17.0.2",
20
+ "react-dom": "17.0.2",
21
+ "typescript": "4.6.4",
22
+ "vite": "2.9.9",
23
+ "vite-plugin-dts": "1.2.0"
24
+ },
25
+ "dependencies": {
26
+ "@frontify/app-bridge": "*",
27
+ "@frontify/fondue": "*"
28
+ },
29
+ "scripts": {
30
+ "build": "vite build",
31
+ "lint": "eslint types",
32
+ "lint:fix": "eslint --fix types",
33
+ "prettier": "prettier --check types",
34
+ "prettier:fix": "prettier --write types",
35
+ "typecheck": "tsc --noEmit"
36
+ }
37
+ }
package/vite.config.ts CHANGED
@@ -13,13 +13,25 @@ export default defineConfig({
13
13
  lib: {
14
14
  entry: resolve(__dirname, 'types/index.ts'),
15
15
  fileName: (format: string) => `index.${format}.js`,
16
- formats: ['es', 'umd', 'cjs'],
17
16
  name: 'GuidelineBlocksSettings',
18
17
  },
19
18
  sourcemap: true,
20
19
  minify: true,
21
20
  rollupOptions: {
22
21
  external: [...dependencies],
22
+ output: [
23
+ {
24
+ format: 'es',
25
+ preserveModules: true,
26
+ preserveModulesRoot: 'src',
27
+ },
28
+ {
29
+ format: 'umd',
30
+ },
31
+ {
32
+ format: 'cjs',
33
+ },
34
+ ],
23
35
  },
24
36
  },
25
37
  });