@frontify/guideline-blocks-settings 0.24.0 → 0.25.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/.eslintrc.js CHANGED
@@ -1,3 +1,27 @@
1
+ /* (c) Copyright Frontify Ltd., all rights reserved. */
2
+
1
3
  module.exports = {
2
- extends: ['@frontify/eslint-config-typescript'],
4
+ extends: ['@frontify/eslint-config-react'],
5
+ plugins: ['notice'],
6
+ settings: {
7
+ react: {
8
+ version: 'detect',
9
+ },
10
+ },
11
+ overrides: [
12
+ {
13
+ files: ['*.js', '*.ts', '*.tsx'],
14
+ rules: {
15
+ 'notice/notice': [
16
+ 'error',
17
+ {
18
+ template: '/* (c) Copyright Frontify Ltd., all rights reserved. */\n\n',
19
+ messages: {
20
+ whenFailedToMatch: 'No Frontify copyright header set.',
21
+ },
22
+ },
23
+ ],
24
+ },
25
+ },
26
+ ],
3
27
  };
package/.prettierrc CHANGED
@@ -1,5 +1,7 @@
1
1
  {
2
- "printWidth": 120,
2
+ "singleQuote": true,
3
3
  "tabWidth": 4,
4
- "singleQuote": true
4
+ "printWidth": 120,
5
+ "arrowParens": "always",
6
+ "endOfLine": "lf"
5
7
  }
package/README.md CHANGED
@@ -5,10 +5,12 @@ Provides the block settings types for the guideline-blocks.
5
5
  ## Example
6
6
 
7
7
  ```ts
8
- import { Bundle, BlockSettings } from '@frontify/guideline-blocks-settings';
8
+ /* (c) Copyright Frontify Ltd., all rights reserved. */
9
+
10
+ import { BlockSettings, Bundle } from '@frontify/guideline-blocks-settings';
9
11
  import { IconEnum } from '@frontify/fondue';
10
12
 
11
- const Settings: BlockSettings = {
13
+ export const settings: BlockSettings = {
12
14
  main: [
13
15
  {
14
16
  id: 'example',
@@ -35,4 +37,5 @@ const Settings: BlockSettings = {
35
37
  },
36
38
  },
37
39
  ],
40
+ };
38
41
  ```
@@ -1,10 +1,10 @@
1
1
  import { IconEnum } from '@frontify/fondue';
2
- import { BaseBlock } from './base';
2
+ import { BaseBlock, ValueOrPromisedValue } from './base';
3
3
  export declare type Choice = {
4
4
  label?: string | number;
5
5
  icon?: IconEnum;
6
6
  value: string | number;
7
7
  };
8
8
  export declare type ChoicesType = {
9
- choices: Choice[];
9
+ choices: ValueOrPromisedValue<Choice[]>;
10
10
  } & BaseBlock<string | number>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frontify/guideline-blocks-settings",
3
- "version": "0.24.0",
3
+ "version": "0.25.0",
4
4
  "description": "Provides the types for the block settings",
5
5
  "sideEffects": false,
6
6
  "main": "dist/index.umd.js",
@@ -13,14 +13,15 @@
13
13
  },
14
14
  "author": "Frontify Developers <developers@frontify.com>",
15
15
  "devDependencies": {
16
- "@frontify/eslint-config-typescript": "0.15.2",
17
- "eslint": "8.24.0",
16
+ "@frontify/eslint-config-typescript": "0.15.5",
17
+ "eslint": "8.27.0",
18
+ "eslint-plugin-notice": "0.9.10",
18
19
  "prettier": "2.7.1",
19
20
  "react": "17.0.2",
20
21
  "react-dom": "17.0.2",
21
- "typescript": "4.8.3",
22
- "vite": "3.1.3",
23
- "vite-plugin-dts": "1.5.0"
22
+ "typescript": "4.8.4",
23
+ "vite": "3.2.3",
24
+ "vite-plugin-dts": "1.7.0"
24
25
  },
25
26
  "dependencies": {
26
27
  "@frontify/app-bridge": "latest",
@@ -28,10 +29,10 @@
28
29
  },
29
30
  "scripts": {
30
31
  "build": "vite build",
31
- "lint": "eslint types",
32
- "lint:fix": "eslint --fix types",
33
- "prettier": "prettier --check types",
34
- "prettier:fix": "prettier --write types",
32
+ "lint": "eslint .",
33
+ "lint:fix": "eslint --fix .",
34
+ "prettier": "prettier --check .",
35
+ "prettier:fix": "prettier --write .",
35
36
  "typecheck": "tsc --noEmit"
36
37
  }
37
38
  }
@@ -1,7 +1,7 @@
1
1
  /* (c) Copyright Frontify Ltd., all rights reserved. */
2
2
 
3
3
  import { IconEnum } from '@frontify/fondue';
4
- import { BaseBlock } from './base';
4
+ import { BaseBlock, ValueOrPromisedValue } from './base';
5
5
 
6
6
  export type Choice = {
7
7
  label?: string | number;
@@ -10,5 +10,5 @@ export type Choice = {
10
10
  };
11
11
 
12
12
  export type ChoicesType = {
13
- choices: Choice[];
13
+ choices: ValueOrPromisedValue<Choice[]>;
14
14
  } & BaseBlock<string | number>;