libreria-astro-lefebvre 0.0.33 → 0.0.35
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/package.json +34 -30
- package/src/carbins/AstroButton.ts +21 -1
- package/src/env.d.ts +15 -0
- package/src/interfaces/types.ts +6 -0
package/package.json
CHANGED
|
@@ -1,30 +1,34 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "libreria-astro-lefebvre",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "Librería de componentes Astro, React y Vue para Lefebvre",
|
|
5
|
-
"author": "Equipo web desarrollo Lefebvre",
|
|
6
|
-
"type": "module",
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "libreria-astro-lefebvre",
|
|
3
|
+
"version": "0.0.35",
|
|
4
|
+
"description": "Librería de componentes Astro, React y Vue para Lefebvre",
|
|
5
|
+
"author": "Equipo web desarrollo Lefebvre",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"types": "./src/env.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./src/env.d.ts",
|
|
11
|
+
"default": "./src/index.ts"
|
|
12
|
+
},
|
|
13
|
+
"./list": "./src/list.ts"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"src"
|
|
17
|
+
],
|
|
18
|
+
"keywords": [
|
|
19
|
+
"astro",
|
|
20
|
+
"astro-components",
|
|
21
|
+
"ui",
|
|
22
|
+
"component-library",
|
|
23
|
+
"design-system"
|
|
24
|
+
],
|
|
25
|
+
"peerDependencies": {
|
|
26
|
+
"astro": "^5.11.0"
|
|
27
|
+
},
|
|
28
|
+
"scripts": {
|
|
29
|
+
"generate:registry": "node scripts/generateRegistry.js"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"typescript": "^5.8.3"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -8,7 +8,7 @@ export const metadata: ComponentMetadata = {
|
|
|
8
8
|
framework: 'Astro',
|
|
9
9
|
priority: 1,
|
|
10
10
|
tags: ['boton', 'interactivo', 'ejemplo'],
|
|
11
|
-
|
|
11
|
+
fields: [
|
|
12
12
|
{
|
|
13
13
|
name: 'label',
|
|
14
14
|
type: 'text',
|
|
@@ -23,6 +23,25 @@ export const metadata: ComponentMetadata = {
|
|
|
23
23
|
mandatory: true,
|
|
24
24
|
example_value: 'https://lefebvre.es'
|
|
25
25
|
},
|
|
26
|
+
{
|
|
27
|
+
name: 'imagen',
|
|
28
|
+
type: 'image',
|
|
29
|
+
label: 'Imagen de prueba',
|
|
30
|
+
mandatory: true,
|
|
31
|
+
example_value: '',
|
|
32
|
+
image_cuts: [
|
|
33
|
+
{
|
|
34
|
+
label: "mobile",
|
|
35
|
+
width: "300",
|
|
36
|
+
height: "100"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
label: "desktop",
|
|
40
|
+
width: "400",
|
|
41
|
+
height: "400"
|
|
42
|
+
},
|
|
43
|
+
]
|
|
44
|
+
},
|
|
26
45
|
{
|
|
27
46
|
name: 'target',
|
|
28
47
|
type: 'text',
|
|
@@ -31,4 +50,5 @@ export const metadata: ComponentMetadata = {
|
|
|
31
50
|
example_value: '_blank'
|
|
32
51
|
},
|
|
33
52
|
],
|
|
53
|
+
repeat_data: null
|
|
34
54
|
};
|
package/src/env.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="astro/client" />
|
|
2
|
+
|
|
3
|
+
// Declaraciones de tipos para archivos .astro
|
|
4
|
+
declare module '*.astro' {
|
|
5
|
+
import type { AstroComponentFactory } from 'astro/runtime/server/index.js';
|
|
6
|
+
const component: AstroComponentFactory;
|
|
7
|
+
export default component;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
// Declaraciones de tipos para archivos .vue
|
|
11
|
+
declare module '*.vue' {
|
|
12
|
+
import type { DefineComponent } from 'vue';
|
|
13
|
+
const component: DefineComponent<{}, {}, any>;
|
|
14
|
+
export default component;
|
|
15
|
+
}
|
package/src/interfaces/types.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Notas: en image_cuts, la idea es que sea un array de objetos con las propiedades que tenga sergio en limbo
|
|
3
|
+
*
|
|
4
|
+
*/
|
|
1
5
|
export interface ComponentMetadata {
|
|
2
6
|
name: string;
|
|
3
7
|
description: string;
|
|
@@ -15,6 +19,8 @@ export interface ComponentMetadata {
|
|
|
15
19
|
options?: (string | number)[];
|
|
16
20
|
options_labels?: string[];
|
|
17
21
|
example_value?: string | number | boolean;
|
|
22
|
+
image_cuts?: object[];
|
|
18
23
|
}>;
|
|
19
24
|
view?: string;
|
|
25
|
+
repeat_data?: object|null;
|
|
20
26
|
}
|