@data-fair/lib-common-types 1.12.0 → 1.14.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.
@@ -11,6 +11,7 @@ export const schemaExports: string[]
11
11
  * - importConfig: The plugin gives an import configuration schema
12
12
  * - publishDataset: The plugin can publish a dataset
13
13
  * - deletePublication: The plugin can delete a dataset or a resource published in a remote catalog
14
+ * - thumbnail: The plugin provides a thumbnail image
14
15
  *
15
16
  * This interface was referenced by `CatalogsCommonTypes`'s JSON-Schema
16
17
  * via the `definition` "capability".
@@ -22,7 +23,8 @@ export type Capability =
22
23
  | "additionalFilters"
23
24
  | "importConfig"
24
25
  | "publishDataset"
25
- | "deletePublication";
26
+ | "deletePublication"
27
+ | "thumbnail";
26
28
 
27
29
  export type CatalogsCommonTypes = {}
28
30
  /**
@@ -44,6 +46,10 @@ export type Metadata = {
44
46
  * The list of capabilities that a catalog can have.
45
47
  */
46
48
  capabilities: Capability[];
49
+ /**
50
+ * Optional path of the thumbnail image from the root of the plugin to be displayed in the UI.
51
+ */
52
+ thumbnailPath?: string;
47
53
  }
48
54
  /**
49
55
  * This interface was referenced by `CatalogsCommonTypes`'s JSON-Schema
@@ -104,7 +110,16 @@ export type Resource = {
104
110
  * The URL of the image representing the resource, if available
105
111
  */
106
112
  image?: string;
107
- license?: string;
113
+ license?: {
114
+ /**
115
+ * Short title for the license
116
+ */
117
+ title: string;
118
+ /**
119
+ * The URL where the license can be read
120
+ */
121
+ href: string;
122
+ };
108
123
  /**
109
124
  * The list of keywords associated with the resource, if available
110
125
  */
@@ -210,4 +210,6 @@ export type DeletePublicationContext<TCatalogConfig> = {
210
210
  export type CatalogMetadata<TCapabilities extends Capability[]> = Metadata & {
211
211
  /** The capabilities of the catalog plugin */
212
212
  capabilities: TCapabilities;
213
- };
213
+ } & (Includes<TCapabilities, 'thumbnail'> extends true ? {
214
+ thumbnailPath: string;
215
+ } : {});
@@ -31,6 +31,10 @@ declare const _default: {
31
31
  $ref: string;
32
32
  };
33
33
  };
34
+ thumbnailPath: {
35
+ description: string;
36
+ type: string;
37
+ };
34
38
  };
35
39
  };
36
40
  folder: {
@@ -85,6 +89,18 @@ declare const _default: {
85
89
  };
86
90
  license: {
87
91
  type: string;
92
+ additionalProperties: boolean;
93
+ required: string[];
94
+ properties: {
95
+ title: {
96
+ type: string;
97
+ description: string;
98
+ };
99
+ href: {
100
+ type: string;
101
+ description: string;
102
+ };
103
+ };
88
104
  };
89
105
  keywords: {
90
106
  type: string;
package/catalog/schema.js CHANGED
@@ -14,7 +14,8 @@ export default {
14
14
  - additionalFilters: The plugin can use additional filters in the list method
15
15
  - importConfig: The plugin gives an import configuration schema
16
16
  - publishDataset: The plugin can publish a dataset
17
- - deletePublication: The plugin can delete a dataset or a resource published in a remote catalog`,
17
+ - deletePublication: The plugin can delete a dataset or a resource published in a remote catalog
18
+ - thumbnail: The plugin provides a thumbnail image`,
18
19
  enum: [
19
20
  'import',
20
21
  'search',
@@ -22,7 +23,8 @@ export default {
22
23
  'additionalFilters',
23
24
  'importConfig',
24
25
  'publishDataset',
25
- 'deletePublication'
26
+ 'deletePublication',
27
+ 'thumbnail'
26
28
  ]
27
29
  },
28
30
  metadata: {
@@ -45,6 +47,10 @@ export default {
45
47
  items: {
46
48
  $ref: '#/$defs/capability'
47
49
  }
50
+ },
51
+ thumbnailPath: {
52
+ description: 'Optional path of the thumbnail image from the root of the plugin to be displayed in the UI.',
53
+ type: 'string',
48
54
  }
49
55
  }
50
56
  },
@@ -100,7 +106,19 @@ export default {
100
106
  description: 'The URL of the image representing the resource, if available'
101
107
  },
102
108
  license: {
103
- type: 'string'
109
+ type: 'object',
110
+ additionalProperties: false,
111
+ required: ['title', 'href'],
112
+ properties: {
113
+ title: {
114
+ type: 'string',
115
+ description: 'Short title for the license'
116
+ },
117
+ href: {
118
+ type: 'string',
119
+ description: 'The URL where the license can be read'
120
+ }
121
+ }
104
122
  },
105
123
  keywords: {
106
124
  type: 'array',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@data-fair/lib-common-types",
3
- "version": "1.12.0",
3
+ "version": "1.14.0",
4
4
  "description": "Shared schemas and built type definitions in the data-fair stack.",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/processings.js CHANGED
@@ -1 +1 @@
1
- export {}
1
+ export {};
@@ -0,0 +1,104 @@
1
+
2
+ export const schemaExports: string[]
3
+
4
+ // see https://github.com/bcherny/json-schema-to-typescript/issues/439 if some types are not exported
5
+ export type URLDUnLogo = string;
6
+ /**
7
+ * Par défaut une police Nunito auto-hébergée est utilisée. Vous pouvez aussi copier le CSS proposé par une plateforme comme Google Fonts, dans ce cas il faut remplacer le nom de la police par '{FONT_FAMILY}'.
8
+ */
9
+ export type CSSPoliceDeCaracteresPourLeCorpsDuTexte = string;
10
+ /**
11
+ * Renseignez de la même manière que pour le corps de texte, ou laissez vide pour utiliser la police du corps du texte
12
+ */
13
+ export type CSSPoliceDeCaracteresPourLesTitres = string;
14
+ /**
15
+ * Si activé vous ne devrez saisir que les couleurs principales du thème, d'autres couleurs seront affectées par défaut et les couleurs de texte seront automatiquement ajustées pour être lisibles sur les couleurs de fond.
16
+ */
17
+ export type ModeDeGestionDesCouleursSimplifie = boolean;
18
+ export type CouleurPrincipale = string;
19
+ export type CouleurSecondaire = string;
20
+ export type CouleurAccentuee = string;
21
+ export type CouleurDeFond = string;
22
+ export type CouleurDeTexteSurCouleurDeFond = string;
23
+ export type CouleurDesSurfacesVignettesListesEtc = string;
24
+ export type CouleurDeTexteSurCouleurDesSurfaces = string;
25
+ export type CouleurPrincipale1 = string;
26
+ export type CouleurDeTexteSurCouleurPrincipale = string;
27
+ export type CouleurDeTextePrincipal = string;
28
+ export type CouleurSecondaire1 = string;
29
+ export type CouleurDeTexteSurCouleurSecondaire = string;
30
+ export type CouleurDeTexteSecondaire = string;
31
+ export type CouleurAccentuee1 = string;
32
+ export type CouleurDeTexteSurCouleurAccentuee = string;
33
+ export type CouleurDeTexteAccentue = string;
34
+ export type CouleurInfo = string;
35
+ export type CouleurDeTexteSurCouleurInfo = string;
36
+ export type CouleurDeTexteInfo = string;
37
+ export type CouleurSucces = string;
38
+ export type CouleurSucces1 = string;
39
+ export type CouleurDeTexteSucces = string;
40
+ export type CouleurErreur = string;
41
+ export type CouleurDeTexteSurCouleurErreur = string;
42
+ export type CouleurDeTexteErreur = string;
43
+ export type CouleurAvertissement = string;
44
+ export type CouleurDeTexteSurAvertissement = string;
45
+ export type CouleurDeTexteAvertissement = string;
46
+ export type ProposerCeThemeAuxUtilisateurs = boolean;
47
+ export type ProposerCeThemeAuxUtilisateurs1 = boolean;
48
+ export type ProposerCeThemeAuxUtilisateurs2 = boolean;
49
+
50
+ export type Theme = {
51
+ logo?: URLDUnLogo;
52
+ bodyFontFamilyCss?: CSSPoliceDeCaracteresPourLeCorpsDuTexte;
53
+ headingFontFamilyCss?: CSSPoliceDeCaracteresPourLesTitres;
54
+ assistedMode?: ModeDeGestionDesCouleursSimplifie;
55
+ assistedModeColors?: {
56
+ primary?: CouleurPrincipale;
57
+ secondary?: CouleurSecondaire;
58
+ accent?: CouleurAccentuee;
59
+ [k: string]: unknown;
60
+ };
61
+ colors: Colors;
62
+ dark?: ProposerCeThemeAuxUtilisateurs;
63
+ darkColors?: Colors;
64
+ hc?: ProposerCeThemeAuxUtilisateurs1;
65
+ hcColors?: Colors;
66
+ hcDark?: ProposerCeThemeAuxUtilisateurs2;
67
+ hcDarkColors?: Colors;
68
+ [k: string]: unknown;
69
+ }
70
+ /**
71
+ * This interface was referenced by `Theme`'s JSON-Schema
72
+ * via the `definition` "colors".
73
+ */
74
+ export type Colors = {
75
+ background: CouleurDeFond;
76
+ "on-background": CouleurDeTexteSurCouleurDeFond;
77
+ surface: CouleurDesSurfacesVignettesListesEtc;
78
+ "on-surface": CouleurDeTexteSurCouleurDesSurfaces;
79
+ primary: CouleurPrincipale1;
80
+ "on-primary": CouleurDeTexteSurCouleurPrincipale;
81
+ "text-primary"?: CouleurDeTextePrincipal;
82
+ secondary: CouleurSecondaire1;
83
+ "on-secondary": CouleurDeTexteSurCouleurSecondaire;
84
+ "text-secondary"?: CouleurDeTexteSecondaire;
85
+ accent: CouleurAccentuee1;
86
+ "on-accent": CouleurDeTexteSurCouleurAccentuee;
87
+ "text-accent"?: CouleurDeTexteAccentue;
88
+ info: CouleurInfo;
89
+ "on-info": CouleurDeTexteSurCouleurInfo;
90
+ "text-info"?: CouleurDeTexteInfo;
91
+ success: CouleurSucces;
92
+ "on-success": CouleurSucces1;
93
+ "text-success"?: CouleurDeTexteSucces;
94
+ error: CouleurErreur;
95
+ "on-error": CouleurDeTexteSurCouleurErreur;
96
+ "text-error"?: CouleurDeTexteErreur;
97
+ warning: CouleurAvertissement;
98
+ "on-warning": CouleurDeTexteSurAvertissement;
99
+ "text-warning"?: CouleurDeTexteAvertissement;
100
+ admin: string;
101
+ "on-admin": string;
102
+ "text-admin"?: string;
103
+ }
104
+
@@ -0,0 +1,7 @@
1
+ /* eslint-disable */
2
+
3
+
4
+
5
+ export const schemaExports = [
6
+ "types"
7
+ ]
@@ -0,0 +1,129 @@
1
+ export * from './.type/index.js';
2
+ export declare const defaultTheme: {
3
+ logo: undefined;
4
+ bodyFontFamilyCss: string;
5
+ headingFontFamilyCss: undefined;
6
+ colors: {
7
+ background: string;
8
+ 'on-background': string;
9
+ surface: string;
10
+ 'on-surface': string;
11
+ primary: string;
12
+ 'on-primary': string;
13
+ 'text-primary': string;
14
+ secondary: string;
15
+ 'on-secondary': string;
16
+ 'text-secondary': string;
17
+ accent: string;
18
+ 'on-accent': string;
19
+ 'text-accent': undefined;
20
+ info: string;
21
+ 'on-info': string;
22
+ 'text-info': string;
23
+ success: string;
24
+ 'on-success': string;
25
+ 'text-success': string;
26
+ error: string;
27
+ 'on-error': string;
28
+ 'text-error': undefined;
29
+ warning: string;
30
+ 'on-warning': string;
31
+ 'text-warning': undefined;
32
+ admin: string;
33
+ 'on-admin': string;
34
+ 'text-admin': undefined;
35
+ };
36
+ dark: boolean;
37
+ darkColors: {
38
+ background: string;
39
+ 'on-background': string;
40
+ surface: string;
41
+ 'on-surface': string;
42
+ primary: string;
43
+ 'on-primary': string;
44
+ 'text-primary': string;
45
+ secondary: string;
46
+ 'on-secondary': string;
47
+ 'text-secondary': undefined;
48
+ accent: string;
49
+ 'on-accent': string;
50
+ 'text-accent': string;
51
+ error: string;
52
+ 'on-error': string;
53
+ 'text-error': string;
54
+ info: string;
55
+ 'on-info': string;
56
+ 'text-info': undefined;
57
+ success: string;
58
+ 'on-success': string;
59
+ 'text-success': undefined;
60
+ warning: string;
61
+ 'on-warning': string;
62
+ 'text-warning': string;
63
+ admin: string;
64
+ 'on-admin': string;
65
+ 'text-admin': string;
66
+ };
67
+ hc: boolean;
68
+ hcColors: {
69
+ background: string;
70
+ 'on-background': string;
71
+ surface: string;
72
+ 'on-surface': string;
73
+ primary: string;
74
+ 'on-primary': string;
75
+ 'text-primary': undefined;
76
+ secondary: string;
77
+ 'on-secondary': string;
78
+ 'text-secondary': string;
79
+ accent: string;
80
+ 'on-accent': string;
81
+ 'text-accent': undefined;
82
+ info: string;
83
+ 'on-info': string;
84
+ 'text-info': string;
85
+ success: string;
86
+ 'on-success': string;
87
+ 'text-success': string;
88
+ error: string;
89
+ 'on-error': string;
90
+ 'text-error': undefined;
91
+ warning: string;
92
+ 'on-warning': string;
93
+ 'text-warning': undefined;
94
+ admin: string;
95
+ 'on-admin': string;
96
+ 'text-admin': undefined;
97
+ };
98
+ hcDark: boolean;
99
+ hcDarkColors: {
100
+ background: string;
101
+ 'on-background': string;
102
+ surface: string;
103
+ 'on-surface': string;
104
+ primary: string;
105
+ 'on-primary': string;
106
+ 'text-primary': string;
107
+ secondary: string;
108
+ 'on-secondary': string;
109
+ 'text-secondary': undefined;
110
+ accent: string;
111
+ 'on-accent': string;
112
+ 'text-accent': string;
113
+ error: string;
114
+ 'on-error': string;
115
+ 'text-error': string;
116
+ info: string;
117
+ 'on-info': string;
118
+ 'text-info': undefined;
119
+ success: string;
120
+ 'on-success': string;
121
+ 'text-success': undefined;
122
+ warning: string;
123
+ 'on-warning': string;
124
+ 'text-warning': string;
125
+ admin: string;
126
+ 'on-admin': string;
127
+ 'text-admin': string;
128
+ };
129
+ };
package/theme/index.js ADDED
@@ -0,0 +1,131 @@
1
+ export * from './.type/index.js'
2
+ export const defaultTheme = {
3
+ logo: undefined,
4
+ bodyFontFamilyCss: "@font-face{font-family:{FONT_FAMILY};font-style:italic;font-weight:200 1000;font-display:swap;src:url({SITE_PATH}/simple-directory/fonts/XRXX3I6Li01BKofIMNaORs71cA-Bm_i0Dk1.woff2) format('woff2');unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:{FONT_FAMILY};font-style:italic;font-weight:200 1000;font-display:swap;src:url({SITE_PATH}/simple-directory/fonts/XRXX3I6Li01BKofIMNaHRs71cA-Cznx39fA.woff2) format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:{FONT_FAMILY};font-style:italic;font-weight:200 1000;font-display:swap;src:url({SITE_PATH}/simple-directory/fonts/XRXX3I6Li01BKofIMNaMRs71cA-CuWrHpFO.woff2) format('woff2');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:{FONT_FAMILY};font-style:italic;font-weight:200 1000;font-display:swap;src:url({SITE_PATH}/simple-directory/fonts/XRXX3I6Li01BKofIMNaNRs71cA-D1eeM49Z.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:{FONT_FAMILY};font-style:italic;font-weight:200 1000;font-display:swap;src:url({SITE_PATH}/simple-directory/fonts/XRXX3I6Li01BKofIMNaDRs4-BbMn9XSX.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:{FONT_FAMILY};font-style:normal;font-weight:200 1000;font-display:swap;src:url({SITE_PATH}/simple-directory/fonts/XRXV3I6Li01BKofIOOaBXso-BWI5zH9R.woff2) format('woff2');unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:{FONT_FAMILY};font-style:normal;font-weight:200 1000;font-display:swap;src:url({SITE_PATH}/simple-directory/fonts/XRXV3I6Li01BKofIMeaBXso-C3IBG1kp.woff2) format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:{FONT_FAMILY};font-style:normal;font-weight:200 1000;font-display:swap;src:url({SITE_PATH}/simple-directory/fonts/XRXV3I6Li01BKofIOuaBXso-B55YuedR.woff2) format('woff2');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:{FONT_FAMILY};font-style:normal;font-weight:200 1000;font-display:swap;src:url({SITE_PATH}/simple-directory/fonts/XRXV3I6Li01BKofIO-aBXso-DcJfvmGA.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:{FONT_FAMILY};font-style:normal;font-weight:200 1000;font-display:swap;src:url({SITE_PATH}/simple-directory/fonts/XRXV3I6Li01BKofINeaB-BaTF6Vo7.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}",
5
+ headingFontFamilyCss: undefined,
6
+ colors: {
7
+ // standard vuetify colors, see https://vuetifyjs.com/en/styles/colors/#material-colors
8
+ background: '#FAFAFA', // grey-lighten-5
9
+ 'on-background': '#424242', // grey-darken-3
10
+ surface: '#FFFFFF',
11
+ 'on-surface': '#424242', // grey-darken-3
12
+ primary: '#1976D2', // blue-darken-2
13
+ 'on-primary': '#FFFFFF',
14
+ 'text-primary': '#1565C0',
15
+ secondary: '#81D4FA', // light-blue-lighten-3
16
+ 'on-secondary': '#000000',
17
+ 'text-secondary': '#0277BD', // light-blue-darken-3
18
+ accent: '#2962FF', // blue-accent-4
19
+ 'on-accent': '#FFFFFF',
20
+ 'text-accent': undefined,
21
+ info: '#FFE0B2', // orange-lighten-4
22
+ 'on-info': '#000000',
23
+ 'text-info': '#BF4300',
24
+ success: '#B9F6CA', // green-accent-1
25
+ 'on-success': '#000000',
26
+ 'text-success': '#2E7D32', // green-darken-3
27
+ error: '#D50000', // red-accent-4
28
+ 'on-error': '#FFFFFF',
29
+ 'text-error': undefined,
30
+ warning: '#D81B60', // pink-darken-1
31
+ 'on-warning': '#FFFFFF',
32
+ 'text-warning': undefined,
33
+ admin: '#B71C1C', // red-darken-4
34
+ 'on-admin': '#FFFFFF',
35
+ 'text-admin': undefined,
36
+ },
37
+ dark: false,
38
+ darkColors: {
39
+ background: '#121212',
40
+ 'on-background': '#FFFFFF', // white
41
+ surface: '#212121',
42
+ 'on-surface': '#FFFFFF', // white
43
+ primary: '#1976D2', // blue-darken-2
44
+ 'on-primary': '#FFFFFF', // white
45
+ 'text-primary': '#2196F3', // blue
46
+ secondary: '#BBDEFB', // blue-lighten-4
47
+ 'on-secondary': '#000000',
48
+ 'text-secondary': undefined,
49
+ accent: '#2962FF', // blue-accent-1
50
+ 'on-accent': '#FFFFFF',
51
+ 'text-accent': '#82B1FF',
52
+ error: '#D50000', // red-accent-4
53
+ 'on-error': '#FFFFFF',
54
+ 'text-error': '#FF5252', // red-accent-2
55
+ info: '#FFE0B2',
56
+ 'on-info': '#000000',
57
+ 'text-info': undefined,
58
+ success: '#B9F6CA', // green-accent-1
59
+ 'on-success': '#000000',
60
+ 'text-success': undefined,
61
+ warning: '#D81B60', // pink-darken-1
62
+ 'on-warning': '#FFFFFF',
63
+ 'text-warning': '#FF4081', // pink-accent-2
64
+ admin: '#B71C1C', // red-darken-4
65
+ 'on-admin': '#FFFFFF',
66
+ 'text-admin': '#FFCDD2'
67
+ },
68
+ hc: false,
69
+ hcColors: {
70
+ // standard vuetify colors, see https://vuetifyjs.com/en/styles/colors/#material-colors
71
+ background: '#FFFFFF',
72
+ 'on-background': '#000000',
73
+ surface: '#FFFFFF',
74
+ 'on-surface': '#000000',
75
+ primary: '#0D47A1', // blue-darken-4
76
+ 'on-primary': '#FFFFFF',
77
+ 'text-primary': undefined,
78
+ secondary: '#81D4FA', // light-blue-lighten-3
79
+ 'on-secondary': '#000000',
80
+ 'text-secondary': '#01579B', // light-blue-darken-3
81
+ accent: '#1d44b3', // blue-accent-4
82
+ 'on-accent': '#FFFFFF',
83
+ 'text-accent': undefined,
84
+ info: '#FFE0B2', // orange-lighten-4
85
+ 'on-info': '#000000',
86
+ 'text-info': '#993500',
87
+ success: '#B9F6CA', // green-accent-1
88
+ 'on-success': '#000000',
89
+ 'text-success': '#1B5E20', // green-darken-4
90
+ error: '#b30000',
91
+ 'on-error': '#FFFFFF',
92
+ 'text-error': undefined,
93
+ warning: '#880E4F', // pink-darken-4
94
+ 'on-warning': '#FFFFFF',
95
+ 'text-warning': undefined,
96
+ admin: '#b30000',
97
+ 'on-admin': '#FFFFFF',
98
+ 'text-admin': undefined,
99
+ },
100
+ hcDark: false,
101
+ hcDarkColors: {
102
+ background: '#121212',
103
+ 'on-background': '#FFFFFF', // white
104
+ surface: '#121212',
105
+ 'on-surface': '#FFFFFF', // white
106
+ primary: '#0D47A1', // blue-darken-4
107
+ 'on-primary': '#FFFFFF', // white
108
+ 'text-primary': '#42A5F5', // blue-lighten-1
109
+ secondary: '#BBDEFB', // blue-lighten-4
110
+ 'on-secondary': '#000000',
111
+ 'text-secondary': undefined,
112
+ accent: '#1d44b3', // blue-accent-1
113
+ 'on-accent': '#FFFFFF',
114
+ 'text-accent': '#82B1FF',
115
+ error: '#b30000',
116
+ 'on-error': '#FFFFFF',
117
+ 'text-error': '#FF8A80', // red-accent-1
118
+ info: '#FFE0B2',
119
+ 'on-info': '#000000',
120
+ 'text-info': undefined,
121
+ success: '#B9F6CA', // green-accent-1
122
+ 'on-success': '#000000',
123
+ 'text-success': undefined,
124
+ warning: '#880E4F', // pink-darken-4
125
+ 'on-warning': '#FFFFFF',
126
+ 'text-warning': '#FF80AB', // pink-accent-1
127
+ admin: '#b30000',
128
+ 'on-admin': '#FFFFFF',
129
+ 'text-admin': '#FFCDD2'
130
+ },
131
+ }
@@ -0,0 +1,376 @@
1
+ declare const _default: {
2
+ $id: string;
3
+ 'x-exports': string[];
4
+ type: string;
5
+ title: string;
6
+ required: string[];
7
+ layout: (string | {
8
+ key: string;
9
+ cols: number;
10
+ comp?: undefined;
11
+ if?: undefined;
12
+ children?: undefined;
13
+ } | {
14
+ comp: string;
15
+ if: string;
16
+ children: ({
17
+ title: string;
18
+ children: ({
19
+ key: string;
20
+ cols: {
21
+ sm: number;
22
+ lg: number;
23
+ };
24
+ name?: undefined;
25
+ props?: undefined;
26
+ } | {
27
+ name: string;
28
+ cols: {
29
+ sm: number;
30
+ lg: number;
31
+ };
32
+ props: {
33
+ colorsKey: string;
34
+ dark: boolean;
35
+ };
36
+ key?: undefined;
37
+ })[];
38
+ } | {
39
+ title: string;
40
+ children: ({
41
+ children: string[];
42
+ cols: {
43
+ sm: number;
44
+ lg: number;
45
+ };
46
+ name?: undefined;
47
+ props?: undefined;
48
+ } | {
49
+ name: string;
50
+ cols: {
51
+ sm: number;
52
+ lg: number;
53
+ };
54
+ props: {
55
+ colorsKey: string;
56
+ dark: boolean;
57
+ };
58
+ children?: undefined;
59
+ })[];
60
+ })[];
61
+ key?: undefined;
62
+ cols?: undefined;
63
+ })[];
64
+ properties: {
65
+ logo: {
66
+ title: string;
67
+ type: string;
68
+ };
69
+ bodyFontFamilyCss: {
70
+ title: string;
71
+ layout: {
72
+ comp: string;
73
+ rows: number;
74
+ };
75
+ description: string;
76
+ type: string;
77
+ };
78
+ headingFontFamilyCss: {
79
+ title: string;
80
+ layout: {
81
+ comp: string;
82
+ rows: number;
83
+ };
84
+ description: string;
85
+ type: string;
86
+ };
87
+ assistedMode: {
88
+ type: string;
89
+ title: string;
90
+ description: string;
91
+ default: boolean;
92
+ };
93
+ assistedModeColors: {
94
+ type: string;
95
+ properties: {
96
+ primary: {
97
+ type: string;
98
+ title: string;
99
+ layout: {
100
+ comp: string;
101
+ cols: number;
102
+ };
103
+ };
104
+ secondary: {
105
+ type: string;
106
+ title: string;
107
+ layout: {
108
+ comp: string;
109
+ cols: number;
110
+ };
111
+ };
112
+ accent: {
113
+ type: string;
114
+ title: string;
115
+ layout: {
116
+ comp: string;
117
+ cols: number;
118
+ };
119
+ };
120
+ };
121
+ };
122
+ colors: {
123
+ $ref: string;
124
+ };
125
+ dark: {
126
+ type: string;
127
+ title: string;
128
+ };
129
+ darkColors: {
130
+ $ref: string;
131
+ };
132
+ hc: {
133
+ type: string;
134
+ title: string;
135
+ };
136
+ hcColors: {
137
+ $ref: string;
138
+ };
139
+ hcDark: {
140
+ type: string;
141
+ title: string;
142
+ };
143
+ hcDarkColors: {
144
+ $ref: string;
145
+ };
146
+ };
147
+ $defs: {
148
+ colors: {
149
+ type: string;
150
+ additionalProperties: boolean;
151
+ required: string[];
152
+ properties: {
153
+ background: {
154
+ type: string;
155
+ title: string;
156
+ layout: {
157
+ comp: string;
158
+ cols: number;
159
+ };
160
+ };
161
+ 'on-background': {
162
+ type: string;
163
+ title: string;
164
+ layout: {
165
+ comp: string;
166
+ cols: number;
167
+ };
168
+ };
169
+ surface: {
170
+ type: string;
171
+ title: string;
172
+ layout: {
173
+ comp: string;
174
+ cols: number;
175
+ };
176
+ };
177
+ 'on-surface': {
178
+ type: string;
179
+ title: string;
180
+ layout: {
181
+ comp: string;
182
+ cols: number;
183
+ };
184
+ };
185
+ primary: {
186
+ type: string;
187
+ title: string;
188
+ layout: {
189
+ comp: string;
190
+ cols: number;
191
+ };
192
+ };
193
+ 'on-primary': {
194
+ type: string;
195
+ title: string;
196
+ layout: {
197
+ comp: string;
198
+ cols: number;
199
+ };
200
+ };
201
+ 'text-primary': {
202
+ type: string;
203
+ title: string;
204
+ layout: {
205
+ comp: string;
206
+ cols: number;
207
+ hint: string;
208
+ };
209
+ };
210
+ secondary: {
211
+ type: string;
212
+ title: string;
213
+ layout: {
214
+ comp: string;
215
+ cols: number;
216
+ };
217
+ };
218
+ 'on-secondary': {
219
+ type: string;
220
+ title: string;
221
+ layout: {
222
+ comp: string;
223
+ cols: number;
224
+ };
225
+ };
226
+ 'text-secondary': {
227
+ type: string;
228
+ title: string;
229
+ layout: {
230
+ comp: string;
231
+ cols: number;
232
+ hint: string;
233
+ };
234
+ };
235
+ accent: {
236
+ type: string;
237
+ title: string;
238
+ layout: {
239
+ comp: string;
240
+ cols: number;
241
+ };
242
+ };
243
+ 'on-accent': {
244
+ type: string;
245
+ title: string;
246
+ layout: {
247
+ comp: string;
248
+ cols: number;
249
+ };
250
+ };
251
+ 'text-accent': {
252
+ type: string;
253
+ title: string;
254
+ layout: {
255
+ comp: string;
256
+ cols: number;
257
+ hint: string;
258
+ };
259
+ };
260
+ info: {
261
+ type: string;
262
+ title: string;
263
+ layout: {
264
+ comp: string;
265
+ cols: number;
266
+ };
267
+ };
268
+ 'on-info': {
269
+ type: string;
270
+ title: string;
271
+ layout: {
272
+ comp: string;
273
+ cols: number;
274
+ };
275
+ };
276
+ 'text-info': {
277
+ type: string;
278
+ title: string;
279
+ layout: {
280
+ comp: string;
281
+ cols: number;
282
+ hint: string;
283
+ };
284
+ };
285
+ success: {
286
+ type: string;
287
+ title: string;
288
+ layout: {
289
+ comp: string;
290
+ cols: number;
291
+ };
292
+ };
293
+ 'on-success': {
294
+ type: string;
295
+ title: string;
296
+ layout: {
297
+ comp: string;
298
+ cols: number;
299
+ };
300
+ };
301
+ 'text-success': {
302
+ type: string;
303
+ title: string;
304
+ layout: {
305
+ comp: string;
306
+ cols: number;
307
+ hint: string;
308
+ };
309
+ };
310
+ error: {
311
+ type: string;
312
+ title: string;
313
+ layout: {
314
+ comp: string;
315
+ cols: number;
316
+ };
317
+ };
318
+ 'on-error': {
319
+ type: string;
320
+ title: string;
321
+ layout: {
322
+ comp: string;
323
+ cols: number;
324
+ };
325
+ };
326
+ 'text-error': {
327
+ type: string;
328
+ title: string;
329
+ layout: {
330
+ comp: string;
331
+ cols: number;
332
+ hint: string;
333
+ };
334
+ };
335
+ warning: {
336
+ type: string;
337
+ title: string;
338
+ layout: {
339
+ comp: string;
340
+ cols: number;
341
+ };
342
+ };
343
+ 'on-warning': {
344
+ type: string;
345
+ title: string;
346
+ layout: {
347
+ comp: string;
348
+ cols: number;
349
+ };
350
+ };
351
+ 'text-warning': {
352
+ type: string;
353
+ title: string;
354
+ layout: {
355
+ comp: string;
356
+ cols: number;
357
+ hint: string;
358
+ };
359
+ };
360
+ admin: {
361
+ type: string;
362
+ layout: string;
363
+ };
364
+ 'on-admin': {
365
+ type: string;
366
+ layout: string;
367
+ };
368
+ 'text-admin': {
369
+ type: string;
370
+ layout: string;
371
+ };
372
+ };
373
+ };
374
+ };
375
+ };
376
+ export default _default;
@@ -0,0 +1,377 @@
1
+ export default {
2
+ $id: 'https://github.com/data-fair/lib/theme',
3
+ 'x-exports': ['types'],
4
+ type: 'object',
5
+ title: 'Thème',
6
+ required: ['colors'],
7
+ layout: [
8
+ 'logo',
9
+ { key: 'bodyFontFamilyCss', cols: 6 },
10
+ { key: 'headingFontFamilyCss', cols: 6 },
11
+ 'assistedMode',
12
+ {
13
+ comp: 'tabs',
14
+ if: 'data.assistedMode',
15
+ children: [{
16
+ title: 'Thème par défaut',
17
+ children: [
18
+ { key: 'assistedModeColors', cols: { sm: 7, lg: 9 } },
19
+ { name: 'colors-preview', cols: { sm: 5, lg: 3 }, props: { colorsKey: 'colors', dark: false } }
20
+ ]
21
+ }, {
22
+ title: 'Thème sombre',
23
+ children: [
24
+ { key: 'dark', cols: { sm: 7, lg: 9 } },
25
+ { name: 'colors-preview', cols: { sm: 5, lg: 3 }, props: { colorsKey: 'darkColors', dark: true } }
26
+ ]
27
+ }, {
28
+ title: 'Thème à fort contraste',
29
+ children: [
30
+ { key: 'hc', cols: { sm: 7, lg: 9 } },
31
+ { name: 'colors-preview', cols: { sm: 5, lg: 3 }, props: { colorsKey: 'hcColors', dark: false } }
32
+ ]
33
+ }, {
34
+ title: 'Thème sombre à fort contraste',
35
+ children: [
36
+ { key: 'hcDark', cols: { sm: 7, lg: 9 } },
37
+ { name: 'colors-preview', cols: { sm: 5, lg: 3 }, props: { colorsKey: 'hcDarkColors', dark: true } }
38
+ ]
39
+ }]
40
+ },
41
+ {
42
+ comp: 'tabs',
43
+ if: '!data.assistedMode',
44
+ children: [{
45
+ title: 'Thème par défaut',
46
+ children: [
47
+ { key: 'colors', cols: { sm: 7, lg: 9 } },
48
+ { name: 'colors-preview', cols: { sm: 5, lg: 3 }, props: { colorsKey: 'colors', dark: false } }
49
+ ]
50
+ }, {
51
+ title: 'Thème sombre',
52
+ children: [
53
+ { children: ['dark', 'darkColors'], cols: { sm: 7, lg: 9 } },
54
+ { name: 'colors-preview', cols: { sm: 5, lg: 3 }, props: { colorsKey: 'darkColors', dark: true } }
55
+ ]
56
+ }, {
57
+ title: 'Thème à fort contraste',
58
+ children: [
59
+ { children: ['hc', 'hcColors'], cols: { sm: 7, lg: 9 } },
60
+ { name: 'colors-preview', cols: { sm: 5, lg: 3 }, props: { colorsKey: 'hcColors', dark: false } }
61
+ ]
62
+ }, {
63
+ title: 'Thème sombre à fort contraste',
64
+ children: [
65
+ { children: ['hcDark', 'hcDarkColors'], cols: { sm: 7, lg: 9 } },
66
+ { name: 'colors-preview', cols: { sm: 5, lg: 3 }, props: { colorsKey: 'hcDarkColors', dark: true } }
67
+ ]
68
+ }]
69
+ }
70
+ ],
71
+ properties: {
72
+ logo: {
73
+ title: "URL d'un logo",
74
+ type: 'string'
75
+ },
76
+ bodyFontFamilyCss: {
77
+ title: 'CSS police de caractères pour le corps du texte',
78
+ layout: {
79
+ comp: 'textarea',
80
+ rows: 3
81
+ },
82
+ description: "Par défaut une police Nunito auto-hébergée est utilisée. Vous pouvez aussi copier le CSS proposé par une plateforme comme Google Fonts, dans ce cas il faut remplacer le nom de la police par '{FONT_FAMILY}'.",
83
+ type: 'string'
84
+ },
85
+ headingFontFamilyCss: {
86
+ title: 'CSS police de caractères pour les titres',
87
+ layout: {
88
+ comp: 'textarea',
89
+ rows: 3
90
+ },
91
+ description: 'Renseignez de la même manière que pour le corps de texte, ou laissez vide pour utiliser la police du corps du texte',
92
+ type: 'string'
93
+ },
94
+ assistedMode: {
95
+ type: 'boolean',
96
+ title: 'mode de gestion des couleurs simplifié',
97
+ description: "Si activé vous ne devrez saisir que les couleurs principales du thème, d'autres couleurs seront affectées par défaut et les couleurs de texte seront automatiquement ajustées pour être lisibles sur les couleurs de fond.",
98
+ default: true
99
+ },
100
+ assistedModeColors: {
101
+ type: 'object',
102
+ properties: {
103
+ primary: {
104
+ type: 'string',
105
+ title: 'Couleur principale',
106
+ layout: {
107
+ comp: 'color-picker',
108
+ cols: 4
109
+ }
110
+ },
111
+ secondary: {
112
+ type: 'string',
113
+ title: 'Couleur secondaire',
114
+ layout: {
115
+ comp: 'color-picker',
116
+ cols: 4
117
+ }
118
+ },
119
+ accent: {
120
+ type: 'string',
121
+ title: 'Couleur accentuée',
122
+ layout: {
123
+ comp: 'color-picker',
124
+ cols: 4
125
+ }
126
+ }
127
+ }
128
+ },
129
+ colors: { $ref: '#/$defs/colors' },
130
+ dark: { type: 'boolean', title: 'proposer ce thème aux utilisateurs' },
131
+ darkColors: { $ref: '#/$defs/colors' },
132
+ hc: { type: 'boolean', title: 'proposer ce thème aux utilisateurs' },
133
+ hcColors: { $ref: '#/$defs/colors' },
134
+ hcDark: { type: 'boolean', title: 'proposer ce thème aux utilisateurs' },
135
+ hcDarkColors: { $ref: '#/$defs/colors' }
136
+ },
137
+ $defs: {
138
+ colors: {
139
+ type: 'object',
140
+ additionalProperties: false,
141
+ required: [
142
+ 'background',
143
+ 'on-background',
144
+ 'surface',
145
+ 'on-surface',
146
+ 'primary',
147
+ 'on-primary',
148
+ 'secondary',
149
+ 'on-secondary',
150
+ 'accent',
151
+ 'on-accent',
152
+ 'error',
153
+ 'on-error',
154
+ 'info',
155
+ 'on-info',
156
+ 'success',
157
+ 'on-success',
158
+ 'warning',
159
+ 'on-warning',
160
+ 'admin',
161
+ 'on-admin'
162
+ ],
163
+ properties: {
164
+ background: {
165
+ type: 'string',
166
+ title: 'Couleur de fond',
167
+ layout: {
168
+ comp: 'color-picker',
169
+ cols: 3
170
+ }
171
+ },
172
+ 'on-background': {
173
+ type: 'string',
174
+ title: 'Couleur de texte sur couleur de fond',
175
+ layout: {
176
+ comp: 'color-picker',
177
+ cols: 3
178
+ }
179
+ },
180
+ surface: {
181
+ type: 'string',
182
+ title: 'Couleur des surfaces (vignettes, listes, etc)',
183
+ layout: {
184
+ comp: 'color-picker',
185
+ cols: 3
186
+ }
187
+ },
188
+ 'on-surface': {
189
+ type: 'string',
190
+ title: 'Couleur de texte sur couleur des surfaces',
191
+ layout: {
192
+ comp: 'color-picker',
193
+ cols: 3
194
+ }
195
+ },
196
+ primary: {
197
+ type: 'string',
198
+ title: 'Couleur principale',
199
+ layout: {
200
+ comp: 'color-picker',
201
+ cols: 4
202
+ }
203
+ },
204
+ 'on-primary': {
205
+ type: 'string',
206
+ title: 'Couleur de texte sur couleur principale',
207
+ layout: {
208
+ comp: 'color-picker',
209
+ cols: 4
210
+ }
211
+ },
212
+ 'text-primary': {
213
+ type: 'string',
214
+ title: 'Couleur de texte principal',
215
+ layout: {
216
+ comp: 'color-picker',
217
+ cols: 4,
218
+ hint: 'laissez vide pour utiliser la couleur principale'
219
+ }
220
+ },
221
+ secondary: {
222
+ type: 'string',
223
+ title: 'Couleur secondaire',
224
+ layout: {
225
+ comp: 'color-picker',
226
+ cols: 4
227
+ }
228
+ },
229
+ 'on-secondary': {
230
+ type: 'string',
231
+ title: 'Couleur de texte sur couleur secondaire',
232
+ layout: {
233
+ comp: 'color-picker',
234
+ cols: 4
235
+ }
236
+ },
237
+ 'text-secondary': {
238
+ type: 'string',
239
+ title: 'Couleur de texte secondaire',
240
+ layout: {
241
+ comp: 'color-picker',
242
+ cols: 4,
243
+ hint: 'laissez vide pour utiliser la couleur secondaire'
244
+ }
245
+ },
246
+ accent: {
247
+ type: 'string',
248
+ title: 'Couleur accentuée',
249
+ layout: {
250
+ comp: 'color-picker',
251
+ cols: 4
252
+ }
253
+ },
254
+ 'on-accent': {
255
+ type: 'string',
256
+ title: 'Couleur de texte sur couleur accentuée',
257
+ layout: {
258
+ comp: 'color-picker',
259
+ cols: 4
260
+ }
261
+ },
262
+ 'text-accent': {
263
+ type: 'string',
264
+ title: 'Couleur de texte accentué',
265
+ layout: {
266
+ comp: 'color-picker',
267
+ cols: 4,
268
+ hint: 'laissez vide pour utiliser la couleur accentuée'
269
+ }
270
+ },
271
+ info: {
272
+ type: 'string',
273
+ title: 'Couleur info',
274
+ layout: {
275
+ comp: 'color-picker',
276
+ cols: 4
277
+ }
278
+ },
279
+ 'on-info': {
280
+ type: 'string',
281
+ title: 'Couleur de texte sur couleur info',
282
+ layout: {
283
+ comp: 'color-picker',
284
+ cols: 4
285
+ }
286
+ },
287
+ 'text-info': {
288
+ type: 'string',
289
+ title: 'Couleur de texte info',
290
+ layout: {
291
+ comp: 'color-picker',
292
+ cols: 4,
293
+ hint: 'laissez vide pour utiliser la couleur info'
294
+ }
295
+ },
296
+ success: {
297
+ type: 'string',
298
+ title: 'Couleur succès',
299
+ layout: {
300
+ comp: 'color-picker',
301
+ cols: 4
302
+ }
303
+ },
304
+ 'on-success': {
305
+ type: 'string',
306
+ title: 'Couleur succès',
307
+ layout: {
308
+ comp: 'color-picker',
309
+ cols: 4
310
+ }
311
+ },
312
+ 'text-success': {
313
+ type: 'string',
314
+ title: 'Couleur de texte succès',
315
+ layout: {
316
+ comp: 'color-picker',
317
+ cols: 4,
318
+ hint: 'laissez vide pour utiliser la couleur succès'
319
+ }
320
+ },
321
+ error: {
322
+ type: 'string',
323
+ title: 'Couleur erreur',
324
+ layout: {
325
+ comp: 'color-picker',
326
+ cols: 4
327
+ }
328
+ },
329
+ 'on-error': {
330
+ type: 'string',
331
+ title: 'Couleur de texte sur couleur erreur',
332
+ layout: {
333
+ comp: 'color-picker',
334
+ cols: 4
335
+ }
336
+ },
337
+ 'text-error': {
338
+ type: 'string',
339
+ title: 'Couleur de texte erreur',
340
+ layout: {
341
+ comp: 'color-picker',
342
+ cols: 4,
343
+ hint: 'laissez vide pour utiliser la couleur erreur'
344
+ }
345
+ },
346
+ warning: {
347
+ type: 'string',
348
+ title: 'Couleur avertissement',
349
+ layout: {
350
+ comp: 'color-picker',
351
+ cols: 4
352
+ }
353
+ },
354
+ 'on-warning': {
355
+ type: 'string',
356
+ title: 'Couleur de texte sur avertissement',
357
+ layout: {
358
+ comp: 'color-picker',
359
+ cols: 4
360
+ }
361
+ },
362
+ 'text-warning': {
363
+ type: 'string',
364
+ title: 'Couleur de texte avertissement',
365
+ layout: {
366
+ comp: 'color-picker',
367
+ cols: 4,
368
+ hint: 'laissez vide pour utiliser la couleur avertissement'
369
+ }
370
+ },
371
+ admin: { type: 'string', layout: 'none' },
372
+ 'on-admin': { type: 'string', layout: 'none' },
373
+ 'text-admin': { type: 'string', layout: 'none' }
374
+ }
375
+ }
376
+ }
377
+ }
package/ws.js CHANGED
@@ -1 +1 @@
1
- export {}
1
+ export {};