@dropi/ui-components 1.0.1 → 1.0.3

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,97 +0,0 @@
1
- # ✅ Checklist de Publicación
2
-
3
- ## Antes de Publicar
4
-
5
- - [x] Build exitoso (674ms)
6
- - [x] npm link funcionando
7
- - [x] dropi-core_front integrado
8
- - [x] angular.json actualizado
9
- - [x] Documentación completa
10
-
11
- ## Publicar a GitHub (5 minutos)
12
-
13
- ### Paso 1: Crear Repositorio en GitHub
14
-
15
- 1. Ir a https://github.com/new
16
- 2. **Repository name**: `ui-components`
17
- 3. **Owner**: Selecciona tu organización `dropi` (o personal)
18
- 4. **Description**: `Dropi UI Components - Framework-agnostic Web Components library`
19
- 5. **Visibility**: Privado (recommended) o Público
20
- 6. ✅ **NO** marcar "Add a README file"
21
- 7. ✅ **NO** marcar "Add .gitignore"
22
- 8. ✅ **NO** marcar "Choose a license"
23
- 9. Click "Create repository"
24
-
25
- ### Paso 2: Ejecutar Script de Publicación
26
-
27
- ```bash
28
- cd ~/Desktop/dropi-ui-components
29
- bash publish.sh
30
- ```
31
-
32
- El script te pedirá:
33
- 1. **URL del repositorio**: Copia la URL HTTPS que GitHub te muestra
34
- - Ejemplo: `https://github.com/dropi/ui-components.git`
35
- 2. **Publicar a NPM**: Responde `n` por ahora (lo haremos después)
36
-
37
- ### Paso 3: Verificar Publicación
38
-
39
- ```bash
40
- # Ver repo en GitHub
41
- git remote get-url origin
42
-
43
- # Verificar commits en GitHub
44
- # Abre la URL en el navegador
45
- ```
46
-
47
- ## Publicar a NPM (Opcional - Después)
48
-
49
- ```bash
50
- # 1. Login a NPM
51
- npm login
52
-
53
- # 2. Build
54
- cd ~/Desktop/dropi-ui-components
55
- npm run build:complete
56
-
57
- # 3. Publicar
58
- cd ../dist
59
- npm publish --access public
60
-
61
- # 4. Verificar
62
- npm info @dropi/ui-components
63
- ```
64
-
65
- ## Verificar Integración en dropi-core_front
66
-
67
- El dev server ya debería estar funcionando con los nuevos tokens CSS.
68
-
69
- ### Opción A: Verificar sin reiniciar
70
-
71
- Abre http://localhost:4500 y verifica que los componentes se ven bien.
72
-
73
- ### Opción B: Reiniciar dev server
74
-
75
- ```bash
76
- # Detener el servidor actual (Ctrl+C)
77
- # Luego:
78
- cd ~/Documents/dropi-core_front
79
- npm start
80
- ```
81
-
82
- ## ¿Qué Sigue?
83
-
84
- ### Corto Plazo
85
- - [ ] Publicar a GitHub ✅ (hoy)
86
- - [ ] Verificar en localhost:4500 funciona
87
- - [ ] (Opcional) Publicar a NPM
88
-
89
- ### Mediano Plazo
90
- - [ ] CI/CD para auto-publicar en cada release
91
- - [ ] Primer micro frontend consumiendo la librería
92
- - [ ] Storybook público en ui.dropi.co
93
-
94
- ### Largo Plazo
95
- - [ ] 3+ micro frontends usando @dropi/ui-components
96
- - [ ] Equipo UI independiente
97
- - [ ] Versión 2.0 con nuevos componentes
package/QUICK_START.md DELETED
@@ -1,108 +0,0 @@
1
- # Guía Rápida: Publicación y Uso
2
-
3
- ## 🚀 Para Publicar (Ejecuta UNA VEZ)
4
-
5
- ```bash
6
- cd ~/Desktop/dropi-ui-components
7
- bash publish.sh
8
- ```
9
-
10
- El script te pedirá:
11
-
12
- 1. URL del repo GitHub (créalo primero en github.com)
13
- 2. Si quieres publicar a NPM
14
-
15
- ## 📖 Para Usar en dropi-core_front
16
-
17
- ### Opción A: Desde NPM (después de publicar)
18
-
19
- ```bash
20
- cd ~/Documents/dropi-core_front
21
- npm install @dropi/ui-components
22
- ```
23
-
24
- ### Opción B: Desde GitHub (antes de NPM)
25
-
26
- ```bash
27
- cd ~/Documents/dropi-core_front
28
- npm install git+https://github.com/dropi/ui-components.git
29
- ```
30
-
31
- ### Opción C: npm link (desarrollo local)
32
-
33
- ```bash
34
- # En ui-components
35
- cd ~/Desktop/dist
36
- npm link
37
-
38
- # En dropi-core_front
39
- cd ~/Documents/dropi-core_front
40
- npm link @dropi/ui-components
41
- ```
42
-
43
- ## 📝 Usar en el Código
44
-
45
- ```typescript
46
- // src/main.ts o app.module.ts
47
- import "@dropi/ui-components/dropi-tokens.css"; // CSS primero
48
- import "@dropi/ui-components"; // Web Components
49
-
50
- // Ya puedes usar en HTML:
51
- // <dropi-button type="primary" text="Click"></dropi-button>
52
- ```
53
-
54
- ## 🔄 Para Nueva Versión
55
-
56
- ```bash
57
- cd ~/Desktop/dropi-ui-components
58
-
59
- # Hacer cambios en src/...
60
-
61
- # Actualizar versión
62
- npm version patch # 1.0.0 → 1.0.1
63
- npm version minor # 1.0.1 → 1.1.0
64
- npm version major # 1.1.0 → 2.0.0
65
-
66
- # Build y publicar
67
- npm run build:complete
68
- cd ../dist
69
- npm publish
70
-
71
- # Push git tags
72
- git push --tags
73
- ```
74
-
75
- ## 📦 Archivos Importantes
76
-
77
- | Archivo | Descripción |
78
- | ---------------- | ---------------------------------- |
79
- | `publish.sh` | Script automatizado de publicación |
80
- | `QUICK_START.md` | Esta guía |
81
- | `README.md` | Documentación completa |
82
- | `src/` | Código fuente |
83
- | `dist/` | Build output (no commiteado) |
84
-
85
- ## 🆘 Troubleshooting
86
-
87
- ### "remote origin already exists"
88
-
89
- ```bash
90
- git remote remove origin
91
- git remote add origin <nueva-url>
92
- ```
93
-
94
- ### "npm ERR! need auth"
95
-
96
- ```bash
97
- npm login
98
- ```
99
-
100
- ### "Module not found" en dropi-core_front
101
-
102
- ```bash
103
- # Verificar que instalaste el paquete
104
- npm list @dropi/ui-components
105
-
106
- # Re-instalar
107
- npm install @dropi/ui-components --force
108
- ```
package/jest.config.ts DELETED
@@ -1,21 +0,0 @@
1
- export default {
2
- displayName: 'dropi-ui-elements',
3
- preset: '../../jest.preset.js',
4
- setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
5
- coverageDirectory: '../../coverage/libs/dropi-ui-elements',
6
- transform: {
7
- '^.+\\.(ts|mjs|js|html)$': [
8
- 'jest-preset-angular',
9
- {
10
- tsconfig: '<rootDir>/tsconfig.spec.json',
11
- stringifyContentPathRegex: '\\.(html|svg)$',
12
- },
13
- ],
14
- },
15
- transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'],
16
- snapshotSerializers: [
17
- 'jest-preset-angular/build/serializers/no-ng-attributes',
18
- 'jest-preset-angular/build/serializers/ng-snapshot',
19
- 'jest-preset-angular/build/serializers/html-comment',
20
- ],
21
- };
package/ng-package.json DELETED
@@ -1,8 +0,0 @@
1
- {
2
- "$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
3
- "dest": "../dist",
4
- "lib": {
5
- "entryFile": "src/index.ts"
6
- },
7
- "allowedNonPeerDependencies": ["@ngx-translate/core"]
8
- }
package/project.json DELETED
@@ -1,48 +0,0 @@
1
- {
2
- "name": "dropi-ui-elements",
3
- "$schema": "../../node_modules/nx/schemas/project-schema.json",
4
- "sourceRoot": "libs/dropi-ui-elements/src",
5
- "prefix": "dropi",
6
- "projectType": "library",
7
- "release": {
8
- "version": {
9
- "manifestRootsToUpdate": ["dist/{projectRoot}"],
10
- "currentVersionResolver": "git-tag",
11
- "fallbackCurrentVersionResolver": "disk"
12
- }
13
- },
14
- "tags": [],
15
- "targets": {
16
- "build": {
17
- "executor": "@nx/angular:package",
18
- "outputs": ["{workspaceRoot}/dist/{projectRoot}"],
19
- "options": {
20
- "project": "libs/dropi-ui-elements/ng-package.json",
21
- "tsConfig": "libs/dropi-ui-elements/tsconfig.lib.json"
22
- },
23
- "configurations": {
24
- "production": {
25
- "tsConfig": "libs/dropi-ui-elements/tsconfig.lib.prod.json"
26
- },
27
- "development": {}
28
- },
29
- "defaultConfiguration": "production"
30
- },
31
- "nx-release-publish": {
32
- "options": {
33
- "packageRoot": "dist/{projectRoot}"
34
- }
35
- },
36
- "test": {
37
- "executor": "@nx/jest:jest",
38
- "outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
39
- "options": {
40
- "jestConfig": "libs/dropi-ui-elements/jest.config.ts",
41
- "tsConfig": "libs/dropi-ui-elements/tsconfig.spec.json"
42
- }
43
- },
44
- "lint": {
45
- "executor": "@nx/eslint:lint"
46
- }
47
- }
48
- }
package/publish-npm.sh DELETED
@@ -1,81 +0,0 @@
1
- #!/bin/bash
2
- # Script para publicar @dropi/ui-components a NPM
3
- # Ubicación: ~/Desktop/dropi-ui-components/publish-npm.sh
4
-
5
- set -e
6
-
7
- echo "📦 Publicación de @dropi/ui-components a NPM"
8
- echo "============================================"
9
- echo ""
10
-
11
- # Verificar login
12
- if ! npm whoami &> /dev/null; then
13
- echo "⚠️ No estás logueado en NPM"
14
- echo ""
15
- echo "Pasos para crear cuenta NPM (si no tienes):"
16
- echo "1. Ir a: https://www.npmjs.com/signup"
17
- echo "2. Crear cuenta gratuita"
18
- echo ""
19
- echo "Ejecuta: npm login"
20
- echo " Username: tu_usuario_npm"
21
- echo " Password: tu_contraseña"
22
- echo " Email: tu_email@example.com"
23
- echo ""
24
- exit 1
25
- fi
26
-
27
- echo "✅ Usuario NPM: $(npm whoami)"
28
- echo ""
29
-
30
- # Verificar directorio
31
- if [ ! -f "package.json" ]; then
32
- echo "❌ Error: No se encuentra package.json"
33
- echo " Ejecuta desde ~/Desktop/dropi-ui-components"
34
- exit 1
35
- fi
36
-
37
- # Build
38
- echo "🔨 Building package..."
39
- npm run build:complete
40
-
41
- if [ ! -d "../dist" ]; then
42
- echo "❌ Error: Build falló"
43
- exit 1
44
- fi
45
-
46
- echo "✅ Build completado"
47
- echo ""
48
-
49
- # Verificar package.json en dist
50
- cd ../dist
51
-
52
- echo "📋 Información del paquete:"
53
- echo " Nombre: $(node -p "require('./package.json').name")"
54
- echo " Versión: $(node -p "require('./package.json').version")"
55
- echo ""
56
-
57
- read -p "¿Publicar a NPM? (y/n): " CONFIRM
58
-
59
- if [ "$CONFIRM" != "y" ] && [ "$CONFIRM" != "Y" ]; then
60
- echo "❌ Publicación cancelada"
61
- exit 0
62
- fi
63
-
64
- read -p "¿Paquete público? (y/n): " PUBLIC
65
-
66
- if [ "$PUBLIC" = "y" ] || [ "$PUBLIC" = "Y" ]; then
67
- echo "📤 Publicando como paquete público..."
68
- npm publish --access public
69
- else
70
- echo "📤 Publicando como paquete privado..."
71
- npm publish
72
- fi
73
-
74
- echo ""
75
- echo "✅ Paquete publicado exitosamente!"
76
- echo ""
77
- echo "Verificar en: https://www.npmjs.com/package/@dropi/ui-components"
78
- echo ""
79
- echo "Para instalar:"
80
- echo " npm install @dropi/ui-components"
81
- echo ""
package/publish.sh DELETED
@@ -1,113 +0,0 @@
1
- #!/bin/bash
2
-
3
- # Script para publicar dropi-ui-components a GitHub y NPM
4
- # Ejecutar: bash publish.sh
5
-
6
- set -e # Exit on error
7
-
8
- echo "🚀 Publicación de @dropi/ui-components"
9
- echo "========================================="
10
- echo ""
11
-
12
- # Colores
13
- GREEN='\033[0;32m'
14
- YELLOW='\033[1;33m'
15
- NC='\033[0m' # No Color
16
-
17
- # Verificar que estamos en el directorio correcto
18
- if [ ! -f "package.json" ]; then
19
- echo "❌ Error: No se encuentra package.json"
20
- echo " Ejecuta este script desde ~/Desktop/dropi-ui-components"
21
- exit 1
22
- fi
23
-
24
- echo "📍 Directorio: $(pwd)"
25
- echo ""
26
-
27
- # Paso 1: Verificar si ya hay un remote
28
- if git remote get-url origin &> /dev/null; then
29
- echo "✅ Git remote ya configurado"
30
- git remote -v
31
- else
32
- echo "${YELLOW}⚠️ No hay remote configurado${NC}"
33
- echo ""
34
- echo "Por favor, crea el repositorio en GitHub primero:"
35
- echo " 1. Ir a: https://github.com/new"
36
- echo " 2. Nombre: ui-components"
37
- echo " 3. Organización: dropi (o tu org)"
38
- echo " 4. NO inicializar con README"
39
- echo ""
40
- read -p "URL del repositorio (ej: https://github.com/dropi/ui-components.git): " REPO_URL
41
-
42
- if [ -z "$REPO_URL" ]; then
43
- echo "❌ URL no proporcionada. Saliendo..."
44
- exit 1
45
- fi
46
-
47
- git remote add origin "$REPO_URL"
48
- echo "${GREEN}✅ Remote agregado${NC}"
49
- fi
50
-
51
- echo ""
52
-
53
- # Paso 2: Push a GitHub
54
- echo "📤 Haciendo push a GitHub..."
55
- git branch -M main
56
- git push -u origin main --tags
57
-
58
- echo "${GREEN}✅ Código publicado en GitHub${NC}"
59
- echo ""
60
-
61
- # Paso 3: Preguntar si publicar a NPM
62
- read -p "¿Deseas publicar a NPM ahora? (y/n): " PUBLISH_NPM
63
-
64
- if [ "$PUBLISH_NPM" = "y" ] || [ "$PUBLISH_NPM" = "Y" ]; then
65
- echo ""
66
- echo "📦 Publicando a NPM..."
67
-
68
- # Verificar si hay un build
69
- if [ ! -d "../dist" ]; then
70
- echo "❌ No se encuentra el directorio dist/"
71
- echo " Ejecuta: npm run build:complete"
72
- exit 1
73
- fi
74
-
75
- cd ../dist
76
-
77
- # Verificar login de NPM
78
- if ! npm whoami &> /dev/null; then
79
- echo "${YELLOW}⚠️ No estás logueado en NPM${NC}"
80
- npm login
81
- fi
82
-
83
- echo ""
84
- echo "Usuario NPM: $(npm whoami)"
85
- echo ""
86
-
87
- read -p "¿Publicar como paquete público? (y/n): " PUBLIC_PKG
88
-
89
- if [ "$PUBLIC_PKG" = "y" ] || [ "$PUBLIC_PKG" = "Y" ]; then
90
- npm publish --access public
91
- else
92
- npm publish
93
- fi
94
-
95
- echo ""
96
- echo "${GREEN}✅ Paquete publicado a NPM${NC}"
97
- cd -
98
- else
99
- echo ""
100
- echo "⏭️ Publicación a NPM omitida"
101
- echo " Puedes hacerlo más tarde con:"
102
- echo " cd ~/Desktop/dist && npm publish --access public"
103
- fi
104
-
105
- echo ""
106
- echo "========================================="
107
- echo "${GREEN}🎉 Proceso completado!${NC}"
108
- echo ""
109
- echo "Comandos útiles:"
110
- echo " Ver en GitHub: git remote get-url origin"
111
- echo " Nueva versión: npm version patch (o minor/major)"
112
- echo " Re-publicar: npm run build:complete && cd ../dist && npm publish"
113
- echo ""
package/tsconfig.json DELETED
@@ -1,28 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.base.json",
3
- "compilerOptions": {
4
- "isolatedModules": true,
5
- "moduleResolution": "bundler",
6
- "strict": true,
7
- "noImplicitOverride": true,
8
- "noPropertyAccessFromIndexSignature": true,
9
- "noImplicitReturns": true,
10
- "noFallthroughCasesInSwitch": true
11
- },
12
- "angularCompilerOptions": {
13
- "enableI18nLegacyMessageIdFormat": false,
14
- "strictInjectionParameters": true,
15
- "strictInputAccessModifiers": true,
16
- "strictTemplates": true
17
- },
18
- "files": [],
19
- "include": [],
20
- "references": [
21
- {
22
- "path": "./tsconfig.lib.json"
23
- },
24
- {
25
- "path": "./tsconfig.spec.json"
26
- }
27
- ]
28
- }
package/tsconfig.lib.json DELETED
@@ -1,18 +0,0 @@
1
- {
2
- "extends": "./tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "../../dist/out-tsc",
5
- "declaration": true,
6
- "declarationMap": true,
7
- "inlineSources": true,
8
- "types": []
9
- },
10
- "include": ["src/**/*.ts"],
11
- "exclude": [
12
- "src/**/*.spec.ts",
13
- "src/**/*.test.ts",
14
- "jest.config.ts",
15
- "jest.config.cts",
16
- "src/test-setup.ts"
17
- ]
18
- }
@@ -1,9 +0,0 @@
1
- {
2
- "extends": "./tsconfig.lib.json",
3
- "compilerOptions": {
4
- "declarationMap": false
5
- },
6
- "angularCompilerOptions": {
7
- "compilationMode": "partial"
8
- }
9
- }
@@ -1,12 +0,0 @@
1
- {
2
- "extends": "./tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "../../dist/out-tsc",
5
- "module": "commonjs",
6
- "target": "es2016",
7
- "types": ["jest", "node"],
8
- "moduleResolution": "node10"
9
- },
10
- "files": ["src/test-setup.ts"],
11
- "include": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts", "src/**/*.d.ts"]
12
- }