g360-cli 1.13.1 → 1.15.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/package.json +71 -71
- package/src/assets/config/g360-skills.json +165 -0
- package/src/assets/config/project-types.json +23 -4
- package/src/assets/snippets/snippets.json +4 -0
- package/src/assets/templates/lit-web/src/index.js +1 -1
- package/src/assets/templates/python-cli/src/core/__init__.py +0 -0
- package/src/assets/templates/python-flet/README.md +6 -1
- package/src/assets/templates/python-flet/pyproject.toml +2 -2
- package/src/assets/templates/python-flet/src/core/skill.json +1 -1
- package/src/assets/templates/python-flet-migrate/pyproject.toml +1 -3
- package/src/assets/templates/python-flet-polished/README.md +170 -0
- package/src/assets/templates/python-flet-polished/assets/data/sample_data.json +12 -0
- package/src/assets/templates/python-flet-polished/assets/fonts/Inter-Variable.ttf +0 -0
- package/src/assets/templates/python-flet-polished/assets/fonts/JetBrainsMono-Variable.ttf +0 -0
- package/src/assets/templates/python-flet-polished/assets/images/app.ico +0 -0
- package/src/assets/templates/python-flet-polished/assets/images/logo.svg +9 -0
- package/src/assets/templates/python-flet-polished/build-portable.bat +42 -0
- package/src/assets/templates/python-flet-polished/create_shortcut.vbs +15 -0
- package/src/assets/templates/python-flet-polished/g360_flet/__init__.py +0 -0
- package/src/assets/templates/python-flet-polished/g360_flet/g360_signature.py +210 -0
- package/src/assets/templates/python-flet-polished/launch.vbs +3 -0
- package/src/assets/templates/python-flet-polished/launch_minimized.bat +3 -0
- package/src/assets/templates/python-flet-polished/main.py +47 -0
- package/src/assets/templates/python-flet-polished/pyproject.toml +18 -0
- package/src/assets/templates/python-flet-polished/requirements.txt +3 -0
- package/src/assets/templates/python-flet-polished/run.bat +189 -0
- package/src/assets/templates/python-flet-polished/skill.json +28 -0
- package/src/assets/templates/python-flet-polished/src/__init__.py +0 -0
- package/src/assets/templates/python-flet-polished/src/app.py +343 -0
- package/src/assets/templates/python-flet-polished/src/config/__init__.py +0 -0
- package/src/assets/templates/python-flet-polished/src/config/theme.py +122 -0
- package/src/assets/templates/python-flet-polished/src/core/__init__.py +0 -0
- package/src/assets/templates/python-flet-polished/src/core/constants.py +49 -0
- package/src/assets/templates/python-flet-polished/src/core/processor.py +128 -0
- package/src/assets/templates/python-flet-polished/src/core/skill.json +40 -0
- package/src/assets/templates/python-flet-polished/src/ui/__init__.py +0 -0
- package/src/assets/templates/python-flet-polished/src/ui/dashboard.py +308 -0
- package/src/assets/templates/python-flet-polished/src/ui/kpi_card.py +69 -0
- package/src/assets/templates/python-flet-polished/src/ui/search_overlay.py +143 -0
- package/src/assets/templates/python-flet-polished/sync_portable.py +71 -0
- package/src/assets/templates/solid-web/src/components/App.jsx +2 -2
- package/src/cli.js +4 -4
- package/src/commands/clean.js +0 -12
- package/src/commands/docs.js +105 -1
- package/src/commands/ingest.js +11 -61
- package/src/commands/init.js +34 -3
- package/src/commands/lint.js +35 -77
- package/src/commands/scan.js +9 -37
- package/src/commands/validate.js +6 -36
- package/src/lib/file-utils.js +89 -2
- package/src/lib/python-runner.js +77 -0
- package/py/src/g360_core/__pycache__/__init__.cpython-312.pyc +0 -0
- package/py/src/g360_core/__pycache__/__init__.cpython-314.pyc +0 -0
- package/py/src/g360_core/__pycache__/batch_processor.cpython-312.pyc +0 -0
- package/py/src/g360_core/__pycache__/batch_processor.cpython-314.pyc +0 -0
- package/py/src/g360_core/__pycache__/commercial_engine.cpython-314.pyc +0 -0
- package/py/src/g360_core/__pycache__/logger.cpython-312.pyc +0 -0
- package/py/src/g360_core/__pycache__/logger.cpython-314.pyc +0 -0
- package/py/src/g360_core/__pycache__/pipeline.cpython-312.pyc +0 -0
- package/py/src/g360_core/__pycache__/pipeline.cpython-314.pyc +0 -0
- package/py/src/g360_core/__pycache__/processor.cpython-312.pyc +0 -0
- package/py/src/g360_core/__pycache__/processor.cpython-314.pyc +0 -0
- package/py/src/g360_core/__pycache__/processor_segmentacion.cpython-312.pyc +0 -0
- package/py/src/g360_core/__pycache__/processor_segmentacion.cpython-314.pyc +0 -0
- package/py/src/g360_core/__pycache__/processor_sku.cpython-312.pyc +0 -0
- package/py/src/g360_core/__pycache__/processor_sku.cpython-314.pyc +0 -0
- package/py/src/g360_core/__pycache__/scanner.cpython-312.pyc +0 -0
- package/py/src/g360_core/__pycache__/scanner.cpython-314.pyc +0 -0
- package/py/src/g360_core/__pycache__/utils.cpython-312.pyc +0 -0
- package/py/src/g360_core/__pycache__/utils.cpython-314.pyc +0 -0
- package/src/assets/ingestion/core/__pycache__/ingestion.cpython-312.pyc +0 -0
- package/src/assets/signature/g360_flet/__pycache__/__init__.cpython-312.pyc +0 -0
- package/src/assets/signature/g360_flet/__pycache__/__init__.cpython-314.pyc +0 -0
- package/src/assets/signature/g360_flet/__pycache__/g360_signature.cpython-312.pyc +0 -0
- package/src/assets/signature/g360_flet/__pycache__/g360_signature.cpython-314.pyc +0 -0
- package/src/assets/templates/python-cli/package.json +0 -7
- /package/src/assets/config/{skills.json → agent-skills.json} +0 -0
package/package.json
CHANGED
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "g360-cli",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "CLI tool for bootstrapping G360 projects with standardized structure, assets, identity, and ERP data processing",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "src/cli.js",
|
|
7
|
-
"bin": {
|
|
8
|
-
"g360": "src/cli.js"
|
|
9
|
-
},
|
|
10
|
-
"files": [
|
|
11
|
-
"src/",
|
|
12
|
-
"!src/assets/templates/**/node_modules",
|
|
13
|
-
"!src/assets/templates/**/package-lock.json",
|
|
14
|
-
"!src/assets/templates/**/__pycache__",
|
|
15
|
-
"!src/assets/templates/**/.pytest_cache",
|
|
16
|
-
"py/",
|
|
17
|
-
"README.md",
|
|
18
|
-
"LICENSE",
|
|
19
|
-
"package.json"
|
|
20
|
-
],
|
|
21
|
-
"scripts": {
|
|
22
|
-
"prepublishOnly": "node -e \"console.log('Use: npm install -g g360-cli')\"",
|
|
23
|
-
"test": "vitest",
|
|
24
|
-
"test:watch": "vitest --watch",
|
|
25
|
-
"test:ui": "vitest --ui",
|
|
26
|
-
"test:coverage": "vitest --coverage",
|
|
27
|
-
"build": "npm run build:portable",
|
|
28
|
-
"build:portable": "pkg . --targets node18-win-x64 --output dist/g360.exe",
|
|
29
|
-
"postinstall": "node -e \"try{require('child_process').execSync('python --version',{encoding:'utf8',stdio:'pipe'})}catch{console.log('⚠️ Python no detectado. Instala Python 3.11+ para funcionalidad completa.')}\""
|
|
30
|
-
},
|
|
31
|
-
"pkg": {
|
|
32
|
-
"assets": [
|
|
33
|
-
"src/assets/**/*",
|
|
34
|
-
"py/**/*"
|
|
35
|
-
],
|
|
36
|
-
"outputPath": "dist",
|
|
37
|
-
"scripts": [],
|
|
38
|
-
"targets": "node18-win-x64"
|
|
39
|
-
},
|
|
40
|
-
"keywords": [
|
|
41
|
-
"g360",
|
|
42
|
-
"cli",
|
|
43
|
-
"scaffolding",
|
|
44
|
-
"generator",
|
|
45
|
-
"erp",
|
|
46
|
-
"data-processing"
|
|
47
|
-
],
|
|
48
|
-
"author": "Carlos Cusi",
|
|
49
|
-
"license": "MIT",
|
|
50
|
-
"dependencies": {
|
|
51
|
-
"ajv": "^8.20.0",
|
|
52
|
-
"chalk": "^5.6.2",
|
|
53
|
-
"commander": "^14.0.3",
|
|
54
|
-
"fs-extra": "^11.3.4",
|
|
55
|
-
"inquirer": "^13.4.2",
|
|
56
|
-
"ora": "^9.4.0",
|
|
57
|
-
"winston": "^3.19.0"
|
|
58
|
-
},
|
|
59
|
-
"devDependencies": {
|
|
60
|
-
"@vitest/ui": "^4.1.6",
|
|
61
|
-
"pkg": "^5.8.1",
|
|
62
|
-
"vitest": "^4.1.6"
|
|
63
|
-
},
|
|
64
|
-
"engines": {
|
|
65
|
-
"node": ">=18.0.0"
|
|
66
|
-
},
|
|
67
|
-
"repository": {
|
|
68
|
-
"type": "git",
|
|
69
|
-
"url": "https://github.com/ccusi/g360-cli.git"
|
|
70
|
-
}
|
|
71
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "g360-cli",
|
|
3
|
+
"version": "1.15.0",
|
|
4
|
+
"description": "CLI tool for bootstrapping G360 projects with standardized structure, assets, identity, and ERP data processing",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "src/cli.js",
|
|
7
|
+
"bin": {
|
|
8
|
+
"g360": "src/cli.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"src/",
|
|
12
|
+
"!src/assets/templates/**/node_modules",
|
|
13
|
+
"!src/assets/templates/**/package-lock.json",
|
|
14
|
+
"!src/assets/templates/**/__pycache__",
|
|
15
|
+
"!src/assets/templates/**/.pytest_cache",
|
|
16
|
+
"py/",
|
|
17
|
+
"README.md",
|
|
18
|
+
"LICENSE",
|
|
19
|
+
"package.json"
|
|
20
|
+
],
|
|
21
|
+
"scripts": {
|
|
22
|
+
"prepublishOnly": "node -e \"console.log('Use: npm install -g g360-cli')\"",
|
|
23
|
+
"test": "vitest",
|
|
24
|
+
"test:watch": "vitest --watch",
|
|
25
|
+
"test:ui": "vitest --ui",
|
|
26
|
+
"test:coverage": "vitest --coverage",
|
|
27
|
+
"build": "npm run build:portable",
|
|
28
|
+
"build:portable": "pkg . --targets node18-win-x64 --output dist/g360.exe",
|
|
29
|
+
"postinstall": "node -e \"try{require('child_process').execSync('python --version',{encoding:'utf8',stdio:'pipe'})}catch{console.log('⚠️ Python no detectado. Instala Python 3.11+ para funcionalidad completa.')}\""
|
|
30
|
+
},
|
|
31
|
+
"pkg": {
|
|
32
|
+
"assets": [
|
|
33
|
+
"src/assets/**/*",
|
|
34
|
+
"py/**/*"
|
|
35
|
+
],
|
|
36
|
+
"outputPath": "dist",
|
|
37
|
+
"scripts": [],
|
|
38
|
+
"targets": "node18-win-x64"
|
|
39
|
+
},
|
|
40
|
+
"keywords": [
|
|
41
|
+
"g360",
|
|
42
|
+
"cli",
|
|
43
|
+
"scaffolding",
|
|
44
|
+
"generator",
|
|
45
|
+
"erp",
|
|
46
|
+
"data-processing"
|
|
47
|
+
],
|
|
48
|
+
"author": "Carlos Cusi",
|
|
49
|
+
"license": "MIT",
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"ajv": "^8.20.0",
|
|
52
|
+
"chalk": "^5.6.2",
|
|
53
|
+
"commander": "^14.0.3",
|
|
54
|
+
"fs-extra": "^11.3.4",
|
|
55
|
+
"inquirer": "^13.4.2",
|
|
56
|
+
"ora": "^9.4.0",
|
|
57
|
+
"winston": "^3.19.0"
|
|
58
|
+
},
|
|
59
|
+
"devDependencies": {
|
|
60
|
+
"@vitest/ui": "^4.1.6",
|
|
61
|
+
"pkg": "^5.8.1",
|
|
62
|
+
"vitest": "^4.1.6"
|
|
63
|
+
},
|
|
64
|
+
"engines": {
|
|
65
|
+
"node": ">=18.0.0"
|
|
66
|
+
},
|
|
67
|
+
"repository": {
|
|
68
|
+
"type": "git",
|
|
69
|
+
"url": "https://github.com/ccusi/g360-cli.git"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -279,6 +279,171 @@
|
|
|
279
279
|
"framework": "flet",
|
|
280
280
|
"portable": true,
|
|
281
281
|
"brand": "cipsa"
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
"name": "flet-desktop-polished",
|
|
285
|
+
"description": "App Flet desktop con patrones UI avanzados: dual theme, auto-refresh, hash cache, search debounce, KPI glow, G360 signature widget",
|
|
286
|
+
"version": "1.0.0",
|
|
287
|
+
"device": "pc",
|
|
288
|
+
"colors": {
|
|
289
|
+
"bg": "#0b1220",
|
|
290
|
+
"surface": "#1a2333",
|
|
291
|
+
"accent": "#34d399",
|
|
292
|
+
"text": "#f0f6fc",
|
|
293
|
+
"muted": "#8b949e",
|
|
294
|
+
"success": "#34d399",
|
|
295
|
+
"warning": "#f59e0b",
|
|
296
|
+
"error": "#ef4444"
|
|
297
|
+
},
|
|
298
|
+
"effects": {
|
|
299
|
+
"glassmorphism": true,
|
|
300
|
+
"blur": "12px",
|
|
301
|
+
"rounded": "12px"
|
|
302
|
+
},
|
|
303
|
+
"signature": {
|
|
304
|
+
"mode": "powered",
|
|
305
|
+
"text": "powered by G360"
|
|
306
|
+
},
|
|
307
|
+
"framework": "flet",
|
|
308
|
+
"portable": true,
|
|
309
|
+
"features": [
|
|
310
|
+
"dual-theme",
|
|
311
|
+
"auto-launcher",
|
|
312
|
+
"portable-sync",
|
|
313
|
+
"g360-signature-flet",
|
|
314
|
+
"custom-fonts",
|
|
315
|
+
"cache-hash-diff",
|
|
316
|
+
"auto-refresh-thread",
|
|
317
|
+
"search-debounce",
|
|
318
|
+
"kpi-glow-cards",
|
|
319
|
+
"rotating-logger"
|
|
320
|
+
]
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
"name": "react-web",
|
|
324
|
+
"description": "Aplicaciones web con React/JSX - estilo G360 moderno",
|
|
325
|
+
"device": "pc",
|
|
326
|
+
"colors": {
|
|
327
|
+
"bg": "#0b1220",
|
|
328
|
+
"surface": "#1a2332",
|
|
329
|
+
"accent": "#00d084",
|
|
330
|
+
"text": "#f0f4f8",
|
|
331
|
+
"muted": "#94a3b8",
|
|
332
|
+
"success": "#22c55e",
|
|
333
|
+
"warning": "#f59e0b",
|
|
334
|
+
"error": "#ef4444"
|
|
335
|
+
},
|
|
336
|
+
"effects": {
|
|
337
|
+
"glassmorphism": true,
|
|
338
|
+
"blur": "12px",
|
|
339
|
+
"rounded": "12px"
|
|
340
|
+
},
|
|
341
|
+
"signature": {
|
|
342
|
+
"mode": "powered",
|
|
343
|
+
"text": "powered by G360"
|
|
344
|
+
},
|
|
345
|
+
"framework": "react"
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
"name": "solid-web",
|
|
349
|
+
"description": "Aplicaciones web con SolidJS - estilo G360 moderno",
|
|
350
|
+
"device": "pc",
|
|
351
|
+
"colors": {
|
|
352
|
+
"bg": "#0b1220",
|
|
353
|
+
"surface": "#1a2332",
|
|
354
|
+
"accent": "#00d084",
|
|
355
|
+
"text": "#f0f4f8",
|
|
356
|
+
"muted": "#94a3b8",
|
|
357
|
+
"success": "#22c55e",
|
|
358
|
+
"warning": "#f59e0b",
|
|
359
|
+
"error": "#ef4444"
|
|
360
|
+
},
|
|
361
|
+
"effects": {
|
|
362
|
+
"glassmorphism": true,
|
|
363
|
+
"blur": "12px",
|
|
364
|
+
"rounded": "12px"
|
|
365
|
+
},
|
|
366
|
+
"signature": {
|
|
367
|
+
"mode": "powered",
|
|
368
|
+
"text": "powered by G360"
|
|
369
|
+
},
|
|
370
|
+
"framework": "solid"
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
"name": "svelte-web",
|
|
374
|
+
"description": "Aplicaciones web con Svelte/SvelteKit - estilo G360 moderno",
|
|
375
|
+
"device": "pc",
|
|
376
|
+
"colors": {
|
|
377
|
+
"bg": "#0b1220",
|
|
378
|
+
"surface": "#1a2332",
|
|
379
|
+
"accent": "#00d084",
|
|
380
|
+
"text": "#f0f4f8",
|
|
381
|
+
"muted": "#94a3b8",
|
|
382
|
+
"success": "#22c55e",
|
|
383
|
+
"warning": "#f59e0b",
|
|
384
|
+
"error": "#ef4444"
|
|
385
|
+
},
|
|
386
|
+
"effects": {
|
|
387
|
+
"glassmorphism": true,
|
|
388
|
+
"blur": "12px",
|
|
389
|
+
"rounded": "12px"
|
|
390
|
+
},
|
|
391
|
+
"signature": {
|
|
392
|
+
"mode": "powered",
|
|
393
|
+
"text": "powered by G360"
|
|
394
|
+
},
|
|
395
|
+
"framework": "svelte"
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
"name": "lit-web",
|
|
399
|
+
"description": "Aplicaciones web con Lit Web Components - estilo G360 moderno",
|
|
400
|
+
"device": "pc",
|
|
401
|
+
"colors": {
|
|
402
|
+
"bg": "#0b1220",
|
|
403
|
+
"surface": "#1a2332",
|
|
404
|
+
"accent": "#00d084",
|
|
405
|
+
"text": "#f0f4f8",
|
|
406
|
+
"muted": "#94a3b8",
|
|
407
|
+
"success": "#22c55e",
|
|
408
|
+
"warning": "#f59e0b",
|
|
409
|
+
"error": "#ef4444"
|
|
410
|
+
},
|
|
411
|
+
"effects": {
|
|
412
|
+
"glassmorphism": true,
|
|
413
|
+
"blur": "12px",
|
|
414
|
+
"rounded": "12px"
|
|
415
|
+
},
|
|
416
|
+
"signature": {
|
|
417
|
+
"mode": "powered",
|
|
418
|
+
"text": "powered by G360"
|
|
419
|
+
},
|
|
420
|
+
"framework": "lit"
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
"name": "customtkinter",
|
|
424
|
+
"description": "Aplicaciones desktop con CustomTkinter - estilo G360 moderno",
|
|
425
|
+
"device": "pc",
|
|
426
|
+
"colors": {
|
|
427
|
+
"bg": "#0b1220",
|
|
428
|
+
"surface": "#1a2332",
|
|
429
|
+
"accent": "#00d084",
|
|
430
|
+
"text": "#f0f4f8",
|
|
431
|
+
"muted": "#94a3b8",
|
|
432
|
+
"success": "#22c55e",
|
|
433
|
+
"warning": "#f59e0b",
|
|
434
|
+
"error": "#ef4444"
|
|
435
|
+
},
|
|
436
|
+
"effects": {
|
|
437
|
+
"glassmorphism": true,
|
|
438
|
+
"blur": "12px",
|
|
439
|
+
"rounded": "12px"
|
|
440
|
+
},
|
|
441
|
+
"signature": {
|
|
442
|
+
"mode": "powered",
|
|
443
|
+
"text": "powered by G360"
|
|
444
|
+
},
|
|
445
|
+
"framework": "customtkinter",
|
|
446
|
+
"portable": true
|
|
282
447
|
}
|
|
283
448
|
]
|
|
284
449
|
}
|
|
@@ -21,13 +21,24 @@
|
|
|
21
21
|
"framework": "python",
|
|
22
22
|
"features": ["cli", "argparse", "rich"]
|
|
23
23
|
},
|
|
24
|
+
{
|
|
25
|
+
"id": "python-flet-polished",
|
|
26
|
+
"name": "Python Flet Polished",
|
|
27
|
+
"description": "Python desktop app with Flet — estandar actual (dual theme, auto-refresh, hash cache, search debounce, KPI glow, G360 signature)",
|
|
28
|
+
"framework": "flet",
|
|
29
|
+
"features": ["desktop", "gui", "cross-platform", "portable", "dual-theme", "auto-refresh", "search-debounce", "kpi-glow", "g360-signature"],
|
|
30
|
+
"portable": true,
|
|
31
|
+
"default": true
|
|
32
|
+
},
|
|
24
33
|
{
|
|
25
34
|
"id": "python-flet",
|
|
26
|
-
"name": "Python Flet
|
|
27
|
-
"description": "Python desktop app with Flet framework",
|
|
35
|
+
"name": "Python Flet (Legacy)",
|
|
36
|
+
"description": "Python desktop app with Flet framework — LEGACY: usar python-flet-polished para nuevos proyectos",
|
|
28
37
|
"framework": "flet",
|
|
29
|
-
"features": ["desktop", "gui", "cross-platform"
|
|
30
|
-
"portable": true
|
|
38
|
+
"features": ["desktop", "gui", "cross-platform"],
|
|
39
|
+
"portable": true,
|
|
40
|
+
"deprecated": true,
|
|
41
|
+
"deprecationNote": "Usa 'python-flet-polished' en su lugar. Este template se mantiene solo por compatibilidad con proyectos existentes."
|
|
31
42
|
},
|
|
32
43
|
{
|
|
33
44
|
"id": "python-flet-migrate",
|
|
@@ -43,6 +54,14 @@
|
|
|
43
54
|
"description": "Excel VBA macros",
|
|
44
55
|
"framework": "vba",
|
|
45
56
|
"features": ["excel", "macros", "forms"]
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"id": "python-customtkinter",
|
|
60
|
+
"name": "Python CustomTkinter Desktop",
|
|
61
|
+
"description": "Python desktop app with CustomTkinter framework",
|
|
62
|
+
"framework": "customtkinter",
|
|
63
|
+
"features": ["desktop", "gui", "cross-platform"],
|
|
64
|
+
"portable": true
|
|
46
65
|
}
|
|
47
66
|
]
|
|
48
67
|
}
|
|
@@ -45,21 +45,25 @@
|
|
|
45
45
|
{
|
|
46
46
|
"name": "g360-header",
|
|
47
47
|
"description": "Standard G360 header",
|
|
48
|
+
"language": "html",
|
|
48
49
|
"code": "<header class='g360-header'>...</header>"
|
|
49
50
|
},
|
|
50
51
|
{
|
|
51
52
|
"name": "g360-button",
|
|
52
53
|
"description": "G360 styled button",
|
|
54
|
+
"language": "html",
|
|
53
55
|
"code": "<button class='g360-btn'>Click</button>"
|
|
54
56
|
},
|
|
55
57
|
{
|
|
56
58
|
"name": "g360-card",
|
|
57
59
|
"description": "G360 card component",
|
|
60
|
+
"language": "html",
|
|
58
61
|
"code": "<div class='g360-card'>...</div>"
|
|
59
62
|
},
|
|
60
63
|
{
|
|
61
64
|
"name": "g360-badge",
|
|
62
65
|
"description": "G360 status badge",
|
|
66
|
+
"language": "html",
|
|
63
67
|
"code": "<span class='g360-badge g360-badge-success'>Active</span>"
|
|
64
68
|
},
|
|
65
69
|
{
|
|
File without changes
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# Mi Proyecto G360 Flet
|
|
2
2
|
|
|
3
|
+
> ⚠️ **LEGACY** — Este template fue reemplazado por `python-flet-polished` (estandar actual).
|
|
4
|
+
> Para nuevos proyectos usar: `g360 init <name> --template python-flet-polished --skill flet-desktop-polished`
|
|
5
|
+
|
|
3
6
|
<picture>
|
|
4
7
|
<source media="(prefers-color-scheme: dark)" srcset="g360/brand/g360/logotypes/logo-g360-light.svg">
|
|
5
8
|
<img alt="G360" height="64" src="g360/brand/g360/logotypes/logo-g360-dark.svg">
|
|
@@ -65,5 +68,7 @@ page.add(g360_footer())
|
|
|
65
68
|
|
|
66
69
|
---
|
|
67
70
|
|
|
71
|
+
> **Nota**: Este es el template base original. Para proyectos nuevos se recomienda `python-flet-polished` que incluye: dual theme, auto-refresh con hash cache, search debounce, KPI glow cards, G360 signature widget y launcher auto-instalable de 5 pasos.
|
|
72
|
+
|
|
68
73
|
**Marca**: G360 · **Isotipo**: 3 puntos + chevron `>`
|
|
69
|
-
**Signature**: G360 Desktop · **Powered by**: [g360-signature](https://github.com/carloscus/g360-signature)
|
|
74
|
+
**Signature**: G360 Desktop · **Powered by**: [g360-signature](https://github.com/carloscus/g360-signature)
|
|
@@ -7,11 +7,11 @@ authors = [
|
|
|
7
7
|
]
|
|
8
8
|
requires-python = ">=3.11,<4.0"
|
|
9
9
|
dependencies = [
|
|
10
|
-
"flet>=0.
|
|
10
|
+
"flet>=0.28.3",
|
|
11
|
+
"numpy>=1.24.0",
|
|
11
12
|
"openpyxl>=3.1.0",
|
|
12
13
|
"pandas>=2.0.0",
|
|
13
14
|
"xlrd>=2.0.0",
|
|
14
|
-
"g360-core>=0.1.0",
|
|
15
15
|
]
|
|
16
16
|
|
|
17
17
|
[project.optional-dependencies]
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
# G360 App Polished
|
|
2
|
+
|
|
3
|
+
> 🚀 **Plantilla estandar G360 para apps Flet desktop** — La evolucion de `python-flet` con patrones de UI avanzados heredados de produccion.
|
|
4
|
+
|
|
5
|
+
[]()
|
|
6
|
+
[](https://python.org)
|
|
7
|
+
[](https://flet.dev)
|
|
8
|
+
|
|
9
|
+
## Quick Start
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
# La app auto-instala uv, Python 3.11, dependencias y crea acceso directo
|
|
13
|
+
run.bat
|
|
14
|
+
|
|
15
|
+
# O lanzador minimizado (sin consola visible)
|
|
16
|
+
launch.vbs
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Caracteristicas
|
|
20
|
+
|
|
21
|
+
| Caracteristica | Detalle |
|
|
22
|
+
|---|---|
|
|
23
|
+
| **Dual theme** | Dark/light con toggle y persistencia en `~/.g360/` |
|
|
24
|
+
| **Auto-refresh** | Cada 15 min con lock thread-safe |
|
|
25
|
+
| **Cache con hash diff** | SHA-256 evita rebuilds si los datos no cambiaron |
|
|
26
|
+
| **Search overlay** | Buscador flotante con debounce 250ms, Enter abre, Escape cierra |
|
|
27
|
+
| **KPI cards con glow** | Colores semanticos + efecto de luz |
|
|
28
|
+
| **G360 Signature** | Isotipo G360 detecta tema automaticamente (dark/light) |
|
|
29
|
+
| **Fonts embebidas** | Inter + JetBrains Mono Variable |
|
|
30
|
+
| **Launcher 5 pasos** | Auto-instala uv → Python 3.11 → .venv → deps → shortcut |
|
|
31
|
+
| **Portable** | `sync_portable.py` + `launch.vbs` para PCs sin Python |
|
|
32
|
+
| **Logger rotativo** | `RotatingFileHandler` max 2MB, backupCount=3 |
|
|
33
|
+
| **Shutdown limpio** | `page.on_close` detiene threads |
|
|
34
|
+
|
|
35
|
+
## Estructura
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
g360-app-polished/
|
|
39
|
+
├── main.py # Entry point (ft.app + logger setup)
|
|
40
|
+
├── src/
|
|
41
|
+
│ ├── __init__.py
|
|
42
|
+
│ ├── app.py # G360App base (orquestador)
|
|
43
|
+
│ ├── config/
|
|
44
|
+
│ │ ├── __init__.py
|
|
45
|
+
│ │ └── theme.py # Paleta dual + rgba() + persistencia
|
|
46
|
+
│ ├── core/
|
|
47
|
+
│ │ ├── __init__.py
|
|
48
|
+
│ │ ├── constants.py # Rutas, versiones, configuracion global
|
|
49
|
+
│ │ ├── processor.py # BaseProcessor (heredar y extender)
|
|
50
|
+
│ │ └── skill.json # Skill metadata
|
|
51
|
+
│ └── ui/
|
|
52
|
+
│ ├── __init__.py
|
|
53
|
+
│ ├── dashboard.py # Layout base: sidebar, KPIs, search
|
|
54
|
+
│ ├── kpi_card.py # Card reutilizable con glow
|
|
55
|
+
│ └── search_overlay.py # Buscador flotante con debounce
|
|
56
|
+
├── g360_flet/
|
|
57
|
+
│ ├── __init__.py
|
|
58
|
+
│ └── g360_signature.py # Widget isotipo G360
|
|
59
|
+
├── assets/
|
|
60
|
+
│ ├── fonts/ # Inter + JetBrains Mono Variable
|
|
61
|
+
│ ├── images/ # Logo + icono
|
|
62
|
+
│ └── data/ # Sample data + cache runtime
|
|
63
|
+
├── skill.json # Skill G360 aplicado
|
|
64
|
+
├── run.bat # Launcher 5 pasos auto-instalable
|
|
65
|
+
├── launch.vbs # Lanzador minimizado
|
|
66
|
+
├── launch_minimized.bat # Delega a launch.vbs
|
|
67
|
+
├── build-portable.bat # PyInstaller onefile + windowed
|
|
68
|
+
├── sync_portable.py # Sync sincronizacion
|
|
69
|
+
├── create_shortcut.vbs # Acceso directo escritorio
|
|
70
|
+
├── requirements.txt # Dependencias
|
|
71
|
+
├── pyproject.toml # Metadata del proyecto
|
|
72
|
+
└── .gitignore
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Como extender
|
|
76
|
+
|
|
77
|
+
### 1. Implementar tu logica de datos
|
|
78
|
+
|
|
79
|
+
En `src/app.py`, sobrescribe `_fetch_data`:
|
|
80
|
+
|
|
81
|
+
```python
|
|
82
|
+
from src.app import G360App
|
|
83
|
+
|
|
84
|
+
class MiApp(G360App):
|
|
85
|
+
def _fetch_data(self) -> dict | None:
|
|
86
|
+
"""Descarga datos desde tu API/ERP."""
|
|
87
|
+
import requests
|
|
88
|
+
resp = requests.get("https://mi-api.com/data")
|
|
89
|
+
return resp.json() if resp.ok else None
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### 2. Procesar y renderizar
|
|
93
|
+
|
|
94
|
+
En `src/core/processor.py`, extiende `BaseProcessor`:
|
|
95
|
+
|
|
96
|
+
```python
|
|
97
|
+
from src.core.processor import BaseProcessor
|
|
98
|
+
|
|
99
|
+
class MiProcessor(BaseProcessor):
|
|
100
|
+
def calcular_kpis(self, raw_data: dict) -> dict:
|
|
101
|
+
# Tu logica de KPIs
|
|
102
|
+
return {
|
|
103
|
+
"primary": {"value": "100", "subtext": "items"},
|
|
104
|
+
...
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### 3. Customizar el dashboard
|
|
109
|
+
|
|
110
|
+
```python
|
|
111
|
+
from src.ui.dashboard import Dashboard
|
|
112
|
+
|
|
113
|
+
class MiDashboard(Dashboard):
|
|
114
|
+
def _render(self):
|
|
115
|
+
"""Renderiza los datos procesados en el UI."""
|
|
116
|
+
kpis = MiProcessor().calcular_kpis(self._raw_data)
|
|
117
|
+
self._kpi_row.controls = self._build_kpi_row(kpis)
|
|
118
|
+
self.page.update()
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Theme Colors
|
|
122
|
+
|
|
123
|
+
Colores semanticos definidos en `skill.json`, accesibles via `get_colors(mode)`:
|
|
124
|
+
|
|
125
|
+
| Token | Dark | Light | Uso |
|
|
126
|
+
|-------|------|-------|-----|
|
|
127
|
+
| `bg` | `#0A0F1E` | `#F3F5F9` | Fondo principal |
|
|
128
|
+
| `surface` | `#141D33` | `#FFFFFF` | Cards, contenedores |
|
|
129
|
+
| `accent` | `#10B981` | `#047857` | Accentos principales |
|
|
130
|
+
| KPI cyan | `#06B6D4` | `#0891B2` | Indicador 1 |
|
|
131
|
+
| KPI violet | `#8B5CF6` | `#7C3AED` | Indicador 2 |
|
|
132
|
+
| KPI red | `#EF4444` | `#DC2626` | Indicador critico |
|
|
133
|
+
| KPI amber | `#F59E0B` | `#B45309` | Indicador warning |
|
|
134
|
+
|
|
135
|
+
## Arquitectura
|
|
136
|
+
|
|
137
|
+
```
|
|
138
|
+
main.py → G360App ──→ Dashboard ──→ KPICard, SearchOverlay
|
|
139
|
+
├──→ theme.py (colores)
|
|
140
|
+
└──→ processor.py (logic)
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### Capas (Regla G360: Core sin UI, UI con Core)
|
|
144
|
+
|
|
145
|
+
| Capa | Archivo | Responsabilidad |
|
|
146
|
+
|------|---------|-----------------|
|
|
147
|
+
| **Entry** | `main.py` | Boot, sys.path, ft.app, logger |
|
|
148
|
+
| **App** | `src/app.py` | Page setup, ciclo de vida, cache, auto-refresh, overlay |
|
|
149
|
+
| **Core** | `src/core/processor.py` | BaseProcessor (heredar) — KPIs, export |
|
|
150
|
+
| **Core** | `src/core/constants.py` | URL, rutas, version |
|
|
151
|
+
| **UI** | `src/ui/dashboard.py` | Layout completo, callbacks |
|
|
152
|
+
| **Config** | `src/config/theme.py` | Paleta dual, utility rgba, persistencia |
|
|
153
|
+
| **Brand** | `g360_flet/g360_signature.py` | Isotipo G360 auto-temado |
|
|
154
|
+
|
|
155
|
+
## Comandos G360
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
g360 init mi-app --template python-flet-polished --skill flet-desktop-polished --portable
|
|
159
|
+
|
|
160
|
+
# El template se resuelve automaticamente si usas un skill Flet:
|
|
161
|
+
g360 init mi-app --skill flet-desktop-polished
|
|
162
|
+
# ↓ usa python-flet-polished por defecto
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
> **Estandar desde v1.14.0.** El template `python-flet` clasico queda en **legacy** — usa `python-flet-polished` para nuevos proyectos.
|
|
168
|
+
|
|
169
|
+
**Marca**: G360 · **Isotipo**: 3 puntos + chevron `>` · **Signature**: powered by G360
|
|
170
|
+
**Powered by**: [g360-signature](https://github.com/carloscus/g360-signature)
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"items": [
|
|
3
|
+
{"sku": "1001", "descripcion": "Producto ejemplo A", "stock": 150, "predespacho": 30, "disponible": 120, "linea": "PELOTAS", "categoria": "DEPORTES"},
|
|
4
|
+
{"sku": "1002", "descripcion": "Producto ejemplo B", "stock": 80, "predespacho": 20, "disponible": 60, "linea": "ESCRITURA", "categoria": "OFICINA"},
|
|
5
|
+
{"sku": "1003", "descripcion": "Producto ejemplo C", "stock": 200, "predespacho": 50, "disponible": 150, "linea": "PELOTAS", "categoria": "DEPORTES"},
|
|
6
|
+
{"sku": "1004", "descripcion": "Producto ejemplo D", "stock": 10, "predespacho": 5, "disponible": 5, "linea": "ARCHIVO", "categoria": "OFICINA"},
|
|
7
|
+
{"sku": "1005", "descripcion": "Producto ejemplo E", "stock": 300, "predespacho": 0, "disponible": 300, "linea": "PINTURA", "categoria": "ARTE"},
|
|
8
|
+
{"sku": "1006", "descripcion": "Producto ejemplo F", "stock": 45, "predespacho": 40, "disponible": 5, "linea": "MASCOTAS", "categoria": "OTROS"},
|
|
9
|
+
{"sku": "1007", "descripcion": "Producto ejemplo G", "stock": 120, "predespacho": 25, "disponible": 95, "linea": "DIBUJO", "categoria": "ARTE"},
|
|
10
|
+
{"sku": "1008", "descripcion": "Producto ejemplo H", "stock": 60, "predespacho": 10, "disponible": 50, "linea": "PEGAMENTOS", "categoria": "OFICINA"}
|
|
11
|
+
]
|
|
12
|
+
}
|
|
Binary file
|
|
Binary file
|