create-canaima-app 1.0.11 → 1.0.12
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/index.js +3 -0
- package/package.json +1 -2
- package/tauri-material-tailwind/.gitignore copy +24 -0
- package/tauri-material-tailwind/.prettierignore +8 -0
- package/tauri-material-tailwind/.prettierrc +9 -0
- package/tauri-material-tailwind/.vscode/extensions.json +3 -0
- package/tauri-material-tailwind/README.md +7 -0
- package/tauri-material-tailwind/gitignore +24 -0
- package/tauri-material-tailwind/index.html +28 -0
- package/tauri-material-tailwind/package-lock.json +2859 -0
- package/tauri-material-tailwind/package.json +32 -0
- package/tauri-material-tailwind/public/ripple.js +95 -0
- package/tauri-material-tailwind/public/tauri.svg +6 -0
- package/tauri-material-tailwind/public/vite.svg +1 -0
- package/tauri-material-tailwind/src/App.vue +16 -0
- package/tauri-material-tailwind/src/assets/image.png +0 -0
- package/tauri-material-tailwind/src/assets/vue.svg +1 -0
- package/tauri-material-tailwind/src/components/Bienvenido.vue +417 -0
- package/tauri-material-tailwind/src/main.ts +12 -0
- package/tauri-material-tailwind/src/router/index.ts +16 -0
- package/tauri-material-tailwind/src/stores/useAppStore.ts +35 -0
- package/tauri-material-tailwind/src/style.css +22 -0
- package/tauri-material-tailwind/src/views/HomeView.vue +8 -0
- package/tauri-material-tailwind/src/vite-env.d.ts +7 -0
- package/tauri-material-tailwind/src-tauri/Cargo.lock +5471 -0
- package/tauri-material-tailwind/src-tauri/Cargo.toml +33 -0
- package/tauri-material-tailwind/src-tauri/build.rs +3 -0
- package/tauri-material-tailwind/src-tauri/capabilities/default.json +7 -0
- package/tauri-material-tailwind/src-tauri/icons/128x128.png +0 -0
- package/tauri-material-tailwind/src-tauri/icons/128x128@2x.png +0 -0
- package/tauri-material-tailwind/src-tauri/icons/32x32.png +0 -0
- package/tauri-material-tailwind/src-tauri/icons/Square107x107Logo.png +0 -0
- package/tauri-material-tailwind/src-tauri/icons/Square142x142Logo.png +0 -0
- package/tauri-material-tailwind/src-tauri/icons/Square150x150Logo.png +0 -0
- package/tauri-material-tailwind/src-tauri/icons/Square284x284Logo.png +0 -0
- package/tauri-material-tailwind/src-tauri/icons/Square30x30Logo.png +0 -0
- package/tauri-material-tailwind/src-tauri/icons/Square310x310Logo.png +0 -0
- package/tauri-material-tailwind/src-tauri/icons/Square44x44Logo.png +0 -0
- package/tauri-material-tailwind/src-tauri/icons/Square71x71Logo.png +0 -0
- package/tauri-material-tailwind/src-tauri/icons/Square89x89Logo.png +0 -0
- package/tauri-material-tailwind/src-tauri/icons/StoreLogo.png +0 -0
- package/tauri-material-tailwind/src-tauri/icons/icon.icns +0 -0
- package/tauri-material-tailwind/src-tauri/icons/icon.ico +0 -0
- package/tauri-material-tailwind/src-tauri/icons/icon.png +0 -0
- package/tauri-material-tailwind/src-tauri/src/lib.rs +17 -0
- package/tauri-material-tailwind/src-tauri/src/main.rs +6 -0
- package/tauri-material-tailwind/src-tauri/tauri.conf.json +29 -0
- package/tauri-material-tailwind/tsconfig.json +25 -0
- package/tauri-material-tailwind/tsconfig.node.json +10 -0
- package/tauri-material-tailwind/vite.config.ts +33 -0
- package/tauri-materialize/.vscode/settings.json +13 -0
- package/tauri-materialize/gitignore +24 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "tauri-material-tailwind",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "npm run format || true && vite",
|
|
8
|
+
"build": "vue-tsc --noEmit && vite build",
|
|
9
|
+
"preview": "vite preview",
|
|
10
|
+
"tauri": "npm run format || true && tauri",
|
|
11
|
+
"format": "prettier --write . && cd src-tauri && cargo fmt --all || true"
|
|
12
|
+
},
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"@material-tailwind/html": "^3.0.0-beta.7",
|
|
15
|
+
"@tailwindcss/vite": "^4.2.2",
|
|
16
|
+
"@tauri-apps/api": "^2",
|
|
17
|
+
"@tauri-apps/plugin-opener": "^2",
|
|
18
|
+
"lucide-vue-next": "^1.0.0",
|
|
19
|
+
"pinia": "^3.0.4",
|
|
20
|
+
"tailwindcss": "^4.2.2",
|
|
21
|
+
"vue": "^3.5.13",
|
|
22
|
+
"vue-router": "^5.0.4"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@tauri-apps/cli": "^2",
|
|
26
|
+
"@vitejs/plugin-vue": "^5.2.1",
|
|
27
|
+
"prettier": "^3.8.1",
|
|
28
|
+
"typescript": "~5.6.2",
|
|
29
|
+
"vite": "^6.0.3",
|
|
30
|
+
"vue-tsc": "^2.1.10"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
function _class_call_check(instance, Constructor) {
|
|
2
|
+
if (!(instance instanceof Constructor)) {
|
|
3
|
+
throw new TypeError('Cannot call a class as a function')
|
|
4
|
+
}
|
|
5
|
+
}
|
|
6
|
+
function _defineProperties(target, props) {
|
|
7
|
+
for (var i = 0; i < props.length; i++) {
|
|
8
|
+
var descriptor = props[i]
|
|
9
|
+
descriptor.enumerable = descriptor.enumerable || false
|
|
10
|
+
descriptor.configurable = true
|
|
11
|
+
if ('value' in descriptor) descriptor.writable = true
|
|
12
|
+
Object.defineProperty(target, descriptor.key, descriptor)
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
function _create_class(Constructor, protoProps, staticProps) {
|
|
16
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps)
|
|
17
|
+
if (staticProps) _defineProperties(Constructor, staticProps)
|
|
18
|
+
return Constructor
|
|
19
|
+
}
|
|
20
|
+
var Ripple = (function () {
|
|
21
|
+
'use strict'
|
|
22
|
+
function Ripple() {
|
|
23
|
+
_class_call_check(this, Ripple)
|
|
24
|
+
this.x = 0
|
|
25
|
+
this.y = 0
|
|
26
|
+
this.z = 0
|
|
27
|
+
}
|
|
28
|
+
_create_class(Ripple, [
|
|
29
|
+
{
|
|
30
|
+
key: 'findFurthestPoint',
|
|
31
|
+
value: function findFurthestPoint(clickPointX, elementWidth, offsetX, clickPointY, elementHeight, offsetY) {
|
|
32
|
+
this.x = clickPointX - offsetX > elementWidth / 2 ? 0 : elementWidth
|
|
33
|
+
this.y = clickPointY - offsetY > elementHeight / 2 ? 0 : elementHeight
|
|
34
|
+
this.z = Math.hypot(this.x - (clickPointX - offsetX), this.y - (clickPointY - offsetY))
|
|
35
|
+
return this.z
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
key: 'appyStyles',
|
|
40
|
+
value: function appyStyles(element, color, rect, radius, event) {
|
|
41
|
+
element.classList.add('ripple')
|
|
42
|
+
element.style.backgroundColor = color === 'dark' ? 'rgba(0,0,0, 0.2)' : 'rgba(255,255,255, 0.3)'
|
|
43
|
+
element.style.borderRadius = '50%'
|
|
44
|
+
element.style.pointerEvents = 'none'
|
|
45
|
+
element.style.position = 'absolute'
|
|
46
|
+
element.style.left = event.clientX - rect.left - radius + 'px'
|
|
47
|
+
element.style.top = event.clientY - rect.top - radius + 'px'
|
|
48
|
+
element.style.width = element.style.height = radius * 2 + 'px'
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
key: 'applyAnimation',
|
|
53
|
+
value: function applyAnimation(element) {
|
|
54
|
+
element.animate(
|
|
55
|
+
[
|
|
56
|
+
{ transform: 'scale(0)', opacity: 1 },
|
|
57
|
+
{ transform: 'scale(1.5)', opacity: 0 },
|
|
58
|
+
],
|
|
59
|
+
{ duration: 500, easing: 'linear' },
|
|
60
|
+
)
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
key: 'create',
|
|
65
|
+
value: function create(event, color) {
|
|
66
|
+
var element = event.currentTarget
|
|
67
|
+
element.style.position = 'relative'
|
|
68
|
+
element.style.overflow = 'hidden'
|
|
69
|
+
var rect = element.getBoundingClientRect()
|
|
70
|
+
var radius = this.findFurthestPoint(event.clientX, element.offsetWidth, rect.left, event.clientY, element.offsetHeight, rect.top)
|
|
71
|
+
var circle = document.createElement('span')
|
|
72
|
+
this.appyStyles(circle, color, rect, radius, event)
|
|
73
|
+
this.applyAnimation(circle)
|
|
74
|
+
element.appendChild(circle)
|
|
75
|
+
setTimeout(function () {
|
|
76
|
+
return circle.remove()
|
|
77
|
+
}, 500)
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
])
|
|
81
|
+
return Ripple
|
|
82
|
+
})()
|
|
83
|
+
;(function setRipple() {
|
|
84
|
+
var ripple = new Ripple()
|
|
85
|
+
document.addEventListener('mousedown', function (event) {
|
|
86
|
+
var target = event.target.closest('[data-ripple-light="true"], [data-ripple-dark="true"]')
|
|
87
|
+
if (target) {
|
|
88
|
+
if (target.getAttribute('data-ripple-light') === 'true') {
|
|
89
|
+
ripple.create({ currentTarget: target, clientX: event.clientX, clientY: event.clientY }, 'light')
|
|
90
|
+
} else {
|
|
91
|
+
ripple.create({ currentTarget: target, clientX: event.clientX, clientY: event.clientY }, 'dark')
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
})
|
|
95
|
+
})()
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg width="206" height="231" viewBox="0 0 206 231" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M143.143 84C143.143 96.1503 133.293 106 121.143 106C108.992 106 99.1426 96.1503 99.1426 84C99.1426 71.8497 108.992 62 121.143 62C133.293 62 143.143 71.8497 143.143 84Z" fill="#FFC131"/>
|
|
3
|
+
<ellipse cx="84.1426" cy="147" rx="22" ry="22" transform="rotate(180 84.1426 147)" fill="#24C8DB"/>
|
|
4
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M166.738 154.548C157.86 160.286 148.023 164.269 137.757 166.341C139.858 160.282 141 153.774 141 147C141 144.543 140.85 142.121 140.558 139.743C144.975 138.204 149.215 136.139 153.183 133.575C162.73 127.404 170.292 118.608 174.961 108.244C179.63 97.8797 181.207 86.3876 179.502 75.1487C177.798 63.9098 172.884 53.4021 165.352 44.8883C157.82 36.3744 147.99 30.2165 137.042 27.1546C126.095 24.0926 114.496 24.2568 103.64 27.6274C92.7839 30.998 83.1319 37.4317 75.8437 46.1553C74.9102 47.2727 74.0206 48.4216 73.176 49.5993C61.9292 50.8488 51.0363 54.0318 40.9629 58.9556C44.2417 48.4586 49.5653 38.6591 56.679 30.1442C67.0505 17.7298 80.7861 8.57426 96.2354 3.77762C111.685 -1.01901 128.19 -1.25267 143.769 3.10474C159.348 7.46215 173.337 16.2252 184.056 28.3411C194.775 40.457 201.767 55.4101 204.193 71.404C206.619 87.3978 204.374 103.752 197.73 118.501C191.086 133.25 180.324 145.767 166.738 154.548ZM41.9631 74.275L62.5557 76.8042C63.0459 72.813 63.9401 68.9018 65.2138 65.1274C57.0465 67.0016 49.2088 70.087 41.9631 74.275Z" fill="#FFC131"/>
|
|
5
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M38.4045 76.4519C47.3493 70.6709 57.2677 66.6712 67.6171 64.6132C65.2774 70.9669 64 77.8343 64 85.0001C64 87.1434 64.1143 89.26 64.3371 91.3442C60.0093 92.8732 55.8533 94.9092 51.9599 97.4256C42.4128 103.596 34.8505 112.392 30.1816 122.756C25.5126 133.12 23.9357 144.612 25.6403 155.851C27.3449 167.09 32.2584 177.598 39.7906 186.112C47.3227 194.626 57.153 200.784 68.1003 203.846C79.0476 206.907 90.6462 206.743 101.502 203.373C112.359 200.002 122.011 193.568 129.299 184.845C130.237 183.722 131.131 182.567 131.979 181.383C143.235 180.114 154.132 176.91 164.205 171.962C160.929 182.49 155.596 192.319 148.464 200.856C138.092 213.27 124.357 222.426 108.907 227.222C93.458 232.019 76.9524 232.253 61.3736 227.895C45.7948 223.538 31.8055 214.775 21.0867 202.659C10.3679 190.543 3.37557 175.59 0.949823 159.596C-1.47592 143.602 0.768139 127.248 7.41237 112.499C14.0566 97.7497 24.8183 85.2327 38.4045 76.4519ZM163.062 156.711L163.062 156.711C162.954 156.773 162.846 156.835 162.738 156.897C162.846 156.835 162.954 156.773 163.062 156.711Z" fill="#24C8DB"/>
|
|
6
|
+
</svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { onMounted } from 'vue'
|
|
3
|
+
import { RouterView } from 'vue-router'
|
|
4
|
+
import { useAppStore } from './stores/useAppStore'
|
|
5
|
+
|
|
6
|
+
const appStore = useAppStore()
|
|
7
|
+
|
|
8
|
+
onMounted(() => {
|
|
9
|
+
appStore.initTheme() // Aplica el tema seleccionado almacenado en cache
|
|
10
|
+
})
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<template>
|
|
14
|
+
<!-- <RouterView> monta automáticamente el componente `HomeView.vue` que configuraste -->
|
|
15
|
+
<RouterView />
|
|
16
|
+
</template>
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="37.07" height="36" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 198"><path fill="#41B883" d="M204.8 0H256L128 220.8L0 0h97.92L128 51.2L157.44 0h47.36Z"></path><path fill="#41B883" d="m0 0l128 220.8L256 0h-51.2L128 132.48L50.56 0H0Z"></path><path fill="#35495E" d="M50.56 0L128 133.12L204.8 0h-47.36L128 51.2L97.92 0H50.56Z"></path></svg>
|
|
@@ -0,0 +1,417 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ref } from 'vue'
|
|
3
|
+
import { invoke } from '@tauri-apps/api/core'
|
|
4
|
+
import { useAppStore } from '../stores/useAppStore'
|
|
5
|
+
import imageLogo from '../assets/image.png'
|
|
6
|
+
import { Sparkles, Layers, Database, Palette, Cpu, Smartphone, Sun, Moon, ArrowDown, Terminal, RefreshCw, CheckCircle, Code, Lock, Brush, Star } from 'lucide-vue-next'
|
|
7
|
+
|
|
8
|
+
const appStore = useAppStore()
|
|
9
|
+
const greetMsg = ref('')
|
|
10
|
+
const name = ref('')
|
|
11
|
+
|
|
12
|
+
async function greet() {
|
|
13
|
+
if (name.value) {
|
|
14
|
+
greetMsg.value = await invoke('greet', { name: name.value })
|
|
15
|
+
name.value = ''
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<template>
|
|
21
|
+
<div class="min-h-screen bg-[#ececec] dark:bg-[#191919] text-gray-800 dark:text-gray-100 transition-colors duration-300">
|
|
22
|
+
<!-- ====== NAVBAR ====== -->
|
|
23
|
+
<div class="fixed top-0 left-0 right-0 z-50">
|
|
24
|
+
<nav class="bg-[#0b6793] dark:bg-[#121212] shadow-lg">
|
|
25
|
+
<div class="max-w-7xl mx-auto px-4 flex items-center justify-between h-16">
|
|
26
|
+
<!-- Brand -->
|
|
27
|
+
<a
|
|
28
|
+
href="#"
|
|
29
|
+
class="text-white text-xl font-medium flex items-center h-full"
|
|
30
|
+
>
|
|
31
|
+
Canaima App
|
|
32
|
+
</a>
|
|
33
|
+
<!-- Nav Links -->
|
|
34
|
+
<ul class="hidden sm:flex items-center gap-2">
|
|
35
|
+
<li>
|
|
36
|
+
<button
|
|
37
|
+
@click.prevent="appStore.toggleDarkMode()"
|
|
38
|
+
title="Alternar Tema"
|
|
39
|
+
class="text-white flex items-center justify-center w-10 h-10 rounded-full hover:bg-white/10 transition-colors"
|
|
40
|
+
>
|
|
41
|
+
<Sun
|
|
42
|
+
v-if="appStore.isDarkMode"
|
|
43
|
+
:size="20"
|
|
44
|
+
/>
|
|
45
|
+
<Moon
|
|
46
|
+
v-else
|
|
47
|
+
:size="20"
|
|
48
|
+
/>
|
|
49
|
+
</button>
|
|
50
|
+
</li>
|
|
51
|
+
<li>
|
|
52
|
+
<a
|
|
53
|
+
href="https://tauri.app"
|
|
54
|
+
target="_blank"
|
|
55
|
+
class="text-white hover:bg-white/10 px-4 py-2 rounded transition-colors"
|
|
56
|
+
>
|
|
57
|
+
Tauri
|
|
58
|
+
</a>
|
|
59
|
+
</li>
|
|
60
|
+
<li>
|
|
61
|
+
<a
|
|
62
|
+
href="https://vuejs.org"
|
|
63
|
+
target="_blank"
|
|
64
|
+
class="text-white hover:bg-white/10 px-4 py-2 rounded transition-colors"
|
|
65
|
+
>
|
|
66
|
+
Vue 3
|
|
67
|
+
</a>
|
|
68
|
+
</li>
|
|
69
|
+
<li>
|
|
70
|
+
<a
|
|
71
|
+
href="https://tailwindcss.com"
|
|
72
|
+
target="_blank"
|
|
73
|
+
class="text-white hover:bg-white/10 px-4 py-2 rounded transition-colors"
|
|
74
|
+
>
|
|
75
|
+
Tailwind
|
|
76
|
+
</a>
|
|
77
|
+
</li>
|
|
78
|
+
</ul>
|
|
79
|
+
</div>
|
|
80
|
+
</nav>
|
|
81
|
+
</div>
|
|
82
|
+
|
|
83
|
+
<!-- ====== HERO ====== -->
|
|
84
|
+
<div class="pt-16">
|
|
85
|
+
<div class="py-16 px-4">
|
|
86
|
+
<div class="max-w-7xl mx-auto text-center">
|
|
87
|
+
<div class="flex justify-center mb-6">
|
|
88
|
+
<img
|
|
89
|
+
:src="imageLogo"
|
|
90
|
+
alt="Canaima Logo"
|
|
91
|
+
class="max-h-36 rounded-xl"
|
|
92
|
+
/>
|
|
93
|
+
</div>
|
|
94
|
+
<h1 class="font-light text-5xl sm:text-6xl flex items-center justify-center gap-4 mb-4 text-gray-800 dark:text-gray-100">
|
|
95
|
+
Arquitectura Profesional
|
|
96
|
+
<Sparkles
|
|
97
|
+
:size="40"
|
|
98
|
+
stroke-width="1.5"
|
|
99
|
+
class="text-[#0b6793]"
|
|
100
|
+
/>
|
|
101
|
+
</h1>
|
|
102
|
+
<p class="text-lg text-gray-600 dark:text-gray-300 max-w-2xl mx-auto leading-relaxed">Esta plantilla implementa Vue 3, Pinia, Vue Router y Tailwind CSS + Material Tailwind de forma nativa e impulsada por el rendimiento de Tauri (Rust).</p>
|
|
103
|
+
<div class="mt-8">
|
|
104
|
+
<a
|
|
105
|
+
href="#test-ipc"
|
|
106
|
+
data-ripple-light="true"
|
|
107
|
+
class="inline-flex items-center gap-2 px-8 py-3 rounded-full bg-[#0b6793] hover:bg-[#1079ab] text-white font-medium tracking-wide transition-colors shadow-md"
|
|
108
|
+
>
|
|
109
|
+
Hacer Prueba IPC
|
|
110
|
+
<ArrowDown :size="20" />
|
|
111
|
+
</a>
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
|
|
117
|
+
<!-- ====== DOCUMENTACIÓN TÉCNICA ====== -->
|
|
118
|
+
<div class="max-w-7xl mx-auto px-4 py-16">
|
|
119
|
+
<h4 class="text-center text-3xl font-light mb-10 text-gray-800 dark:text-gray-100">¿Cómo funciona esta Plantilla?</h4>
|
|
120
|
+
|
|
121
|
+
<div class="space-y-3">
|
|
122
|
+
<!-- Accordion 1 -->
|
|
123
|
+
<details
|
|
124
|
+
class="group bg-white dark:bg-[#242424] rounded-xl shadow-sm overflow-hidden"
|
|
125
|
+
open
|
|
126
|
+
>
|
|
127
|
+
<summary class="flex items-center gap-3 px-6 py-4 cursor-pointer font-medium text-gray-700 dark:text-gray-200 hover:bg-gray-50 dark:hover:bg-[#2a2a2a] transition-colors list-none">
|
|
128
|
+
<Layers
|
|
129
|
+
:size="20"
|
|
130
|
+
class="text-[#0b6793] shrink-0"
|
|
131
|
+
/>
|
|
132
|
+
<span>1. Rutas y Vistas (Vue Router)</span>
|
|
133
|
+
<svg
|
|
134
|
+
class="ml-auto w-5 h-5 text-gray-400 transition-transform group-open:rotate-180"
|
|
135
|
+
fill="none"
|
|
136
|
+
viewBox="0 0 24 24"
|
|
137
|
+
stroke="currentColor"
|
|
138
|
+
>
|
|
139
|
+
<path
|
|
140
|
+
stroke-linecap="round"
|
|
141
|
+
stroke-linejoin="round"
|
|
142
|
+
stroke-width="2"
|
|
143
|
+
d="M19 9l-7 7-7-7"
|
|
144
|
+
/>
|
|
145
|
+
</svg>
|
|
146
|
+
</summary>
|
|
147
|
+
<div class="px-6 py-4 border-t border-gray-100 dark:border-gray-700 text-gray-600 dark:text-gray-300 text-sm leading-relaxed">
|
|
148
|
+
El proyecto utiliza
|
|
149
|
+
<code class="px-1.5 py-0.5 rounded bg-gray-100 dark:bg-gray-700 text-[#0b6793] font-mono text-xs">vue-router</code>
|
|
150
|
+
. En tu
|
|
151
|
+
<code class="px-1.5 py-0.5 rounded bg-gray-100 dark:bg-gray-700 text-[#0b6793] font-mono text-xs">App.vue</code>
|
|
152
|
+
hay un
|
|
153
|
+
<code class="px-1.5 py-0.5 rounded bg-gray-100 dark:bg-gray-700 text-[#0b6793] font-mono text-xs"><RouterView /></code>
|
|
154
|
+
que carga dinámicamente el componente correcto dependiendo de la URL. Añade tus nuevas pantallas en el directorio
|
|
155
|
+
<code class="px-1.5 py-0.5 rounded bg-gray-100 dark:bg-gray-700 text-[#0b6793] font-mono text-xs">/src/views/</code>
|
|
156
|
+
y regístralas en
|
|
157
|
+
<code class="px-1.5 py-0.5 rounded bg-gray-100 dark:bg-gray-700 text-[#0b6793] font-mono text-xs">/src/router/index.ts</code>
|
|
158
|
+
.
|
|
159
|
+
</div>
|
|
160
|
+
</details>
|
|
161
|
+
|
|
162
|
+
<!-- Accordion 2 -->
|
|
163
|
+
<details class="group bg-white dark:bg-[#242424] rounded-xl shadow-sm overflow-hidden">
|
|
164
|
+
<summary class="flex items-center gap-3 px-6 py-4 cursor-pointer font-medium text-gray-700 dark:text-gray-200 hover:bg-gray-50 dark:hover:bg-[#2a2a2a] transition-colors list-none">
|
|
165
|
+
<Database
|
|
166
|
+
:size="20"
|
|
167
|
+
class="text-[#0b6793] shrink-0"
|
|
168
|
+
/>
|
|
169
|
+
<span>2. Estado Global (Pinia)</span>
|
|
170
|
+
<svg
|
|
171
|
+
class="ml-auto w-5 h-5 text-gray-400 transition-transform group-open:rotate-180"
|
|
172
|
+
fill="none"
|
|
173
|
+
viewBox="0 0 24 24"
|
|
174
|
+
stroke="currentColor"
|
|
175
|
+
>
|
|
176
|
+
<path
|
|
177
|
+
stroke-linecap="round"
|
|
178
|
+
stroke-linejoin="round"
|
|
179
|
+
stroke-width="2"
|
|
180
|
+
d="M19 9l-7 7-7-7"
|
|
181
|
+
/>
|
|
182
|
+
</svg>
|
|
183
|
+
</summary>
|
|
184
|
+
<div class="px-6 py-4 border-t border-gray-100 dark:border-gray-700 text-gray-600 dark:text-gray-300 text-sm leading-relaxed">
|
|
185
|
+
Incluye la arquitectura oficial de Pinia activada. Mira
|
|
186
|
+
<code class="px-1.5 py-0.5 rounded bg-gray-100 dark:bg-gray-700 text-[#0b6793] font-mono text-xs">src/stores/useAppStore.ts</code>
|
|
187
|
+
para ver cómo se guarda la configuración del Modo Oscuro. Este almacén global preserva el estado en todo momento y utiliza
|
|
188
|
+
<code class="px-1.5 py-0.5 rounded bg-gray-100 dark:bg-gray-700 text-[#0b6793] font-mono text-xs">localStorage</code>
|
|
189
|
+
directamente allí.
|
|
190
|
+
</div>
|
|
191
|
+
</details>
|
|
192
|
+
|
|
193
|
+
<!-- Accordion 3 -->
|
|
194
|
+
<details class="group bg-white dark:bg-[#242424] rounded-xl shadow-sm overflow-hidden">
|
|
195
|
+
<summary class="flex items-center gap-3 px-6 py-4 cursor-pointer font-medium text-gray-700 dark:text-gray-200 hover:bg-gray-50 dark:hover:bg-[#2a2a2a] transition-colors list-none">
|
|
196
|
+
<Palette
|
|
197
|
+
:size="20"
|
|
198
|
+
class="text-[#0b6793] shrink-0"
|
|
199
|
+
/>
|
|
200
|
+
<span>3. Estilos (Tailwind CSS v4 + Material Tailwind)</span>
|
|
201
|
+
<svg
|
|
202
|
+
class="ml-auto w-5 h-5 text-gray-400 transition-transform group-open:rotate-180"
|
|
203
|
+
fill="none"
|
|
204
|
+
viewBox="0 0 24 24"
|
|
205
|
+
stroke="currentColor"
|
|
206
|
+
>
|
|
207
|
+
<path
|
|
208
|
+
stroke-linecap="round"
|
|
209
|
+
stroke-linejoin="round"
|
|
210
|
+
stroke-width="2"
|
|
211
|
+
d="M19 9l-7 7-7-7"
|
|
212
|
+
/>
|
|
213
|
+
</svg>
|
|
214
|
+
</summary>
|
|
215
|
+
<div class="px-6 py-4 border-t border-gray-100 dark:border-gray-700 text-gray-600 dark:text-gray-300 text-sm leading-relaxed">
|
|
216
|
+
Los estilos se construyen con Tailwind CSS v4 y el complemento
|
|
217
|
+
<code class="px-1.5 py-0.5 rounded bg-gray-100 dark:bg-gray-700 text-[#0b6793] font-mono text-xs">@material-tailwind/html</code>
|
|
218
|
+
. Los tres colores estándar de la app son: primario (
|
|
219
|
+
<code class="px-1.5 py-0.5 rounded bg-gray-100 dark:bg-gray-700 text-[#0b6793] font-mono text-xs">#0b6793</code>
|
|
220
|
+
), oscuro (
|
|
221
|
+
<code class="px-1.5 py-0.5 rounded bg-gray-100 dark:bg-gray-700 text-[#0b6793] font-mono text-xs">#191919</code>
|
|
222
|
+
) y claro (
|
|
223
|
+
<code class="px-1.5 py-0.5 rounded bg-gray-100 dark:bg-gray-700 text-[#0b6793] font-mono text-xs">#ececec</code>
|
|
224
|
+
). El modo oscuro se activa con la clase
|
|
225
|
+
<code class="px-1.5 py-0.5 rounded bg-gray-100 dark:bg-gray-700 text-[#0b6793] font-mono text-xs">dark</code>
|
|
226
|
+
en el elemento
|
|
227
|
+
<code class="px-1.5 py-0.5 rounded bg-gray-100 dark:bg-gray-700 text-[#0b6793] font-mono text-xs"><html></code>
|
|
228
|
+
.
|
|
229
|
+
</div>
|
|
230
|
+
</details>
|
|
231
|
+
|
|
232
|
+
<!-- Accordion 4 -->
|
|
233
|
+
<details class="group bg-white dark:bg-[#242424] rounded-xl shadow-sm overflow-hidden">
|
|
234
|
+
<summary class="flex items-center gap-3 px-6 py-4 cursor-pointer font-medium text-gray-700 dark:text-gray-200 hover:bg-gray-50 dark:hover:bg-[#2a2a2a] transition-colors list-none">
|
|
235
|
+
<Cpu
|
|
236
|
+
:size="20"
|
|
237
|
+
class="text-[#0b6793] shrink-0"
|
|
238
|
+
/>
|
|
239
|
+
<span>4. Backend (Tauri & Rust)</span>
|
|
240
|
+
<svg
|
|
241
|
+
class="ml-auto w-5 h-5 text-gray-400 transition-transform group-open:rotate-180"
|
|
242
|
+
fill="none"
|
|
243
|
+
viewBox="0 0 24 24"
|
|
244
|
+
stroke="currentColor"
|
|
245
|
+
>
|
|
246
|
+
<path
|
|
247
|
+
stroke-linecap="round"
|
|
248
|
+
stroke-linejoin="round"
|
|
249
|
+
stroke-width="2"
|
|
250
|
+
d="M19 9l-7 7-7-7"
|
|
251
|
+
/>
|
|
252
|
+
</svg>
|
|
253
|
+
</summary>
|
|
254
|
+
<div class="px-6 py-4 border-t border-gray-100 dark:border-gray-700 text-gray-600 dark:text-gray-300 text-sm leading-relaxed">
|
|
255
|
+
La carpeta
|
|
256
|
+
<code class="px-1.5 py-0.5 rounded bg-gray-100 dark:bg-gray-700 text-[#0b6793] font-mono text-xs">src-tauri/</code>
|
|
257
|
+
posee el kernel basado en Rust. Es considerablemente más veloz y ligero que Electron. La comunicación entre tu vista Vue y Rust ocurre a través de peticiones IPC ultrarrápidas con la librería
|
|
258
|
+
<code class="px-1.5 py-0.5 rounded bg-gray-100 dark:bg-gray-700 text-[#0b6793] font-mono text-xs">@tauri-apps/api/core</code>
|
|
259
|
+
. Puedes probarlo abajo.
|
|
260
|
+
</div>
|
|
261
|
+
</details>
|
|
262
|
+
|
|
263
|
+
<!-- Accordion 5 -->
|
|
264
|
+
<details class="group bg-white dark:bg-[#242424] rounded-xl shadow-sm overflow-hidden">
|
|
265
|
+
<summary class="flex items-center gap-3 px-6 py-4 cursor-pointer font-medium text-gray-700 dark:text-gray-200 hover:bg-gray-50 dark:hover:bg-[#2a2a2a] transition-colors list-none">
|
|
266
|
+
<Smartphone
|
|
267
|
+
:size="20"
|
|
268
|
+
class="text-[#0b6793] shrink-0"
|
|
269
|
+
/>
|
|
270
|
+
<span>5. Iconografía (Lucide)</span>
|
|
271
|
+
<svg
|
|
272
|
+
class="ml-auto w-5 h-5 text-gray-400 transition-transform group-open:rotate-180"
|
|
273
|
+
fill="none"
|
|
274
|
+
viewBox="0 0 24 24"
|
|
275
|
+
stroke="currentColor"
|
|
276
|
+
>
|
|
277
|
+
<path
|
|
278
|
+
stroke-linecap="round"
|
|
279
|
+
stroke-linejoin="round"
|
|
280
|
+
stroke-width="2"
|
|
281
|
+
d="M19 9l-7 7-7-7"
|
|
282
|
+
/>
|
|
283
|
+
</svg>
|
|
284
|
+
</summary>
|
|
285
|
+
<div class="px-6 py-4 border-t border-gray-100 dark:border-gray-700 text-gray-600 dark:text-gray-300 text-sm leading-relaxed">
|
|
286
|
+
Esta plantilla integra
|
|
287
|
+
<code class="px-1.5 py-0.5 rounded bg-gray-100 dark:bg-gray-700 text-[#0b6793] font-mono text-xs">lucide-vue-next</code>
|
|
288
|
+
para iconos vectoriales modernos y ligeros. Puedes importarlos individualmente como componentes Vue, lo que permite un mejor árbol-shaking y personalización de tamaño o color dinámica.
|
|
289
|
+
</div>
|
|
290
|
+
</details>
|
|
291
|
+
</div>
|
|
292
|
+
</div>
|
|
293
|
+
|
|
294
|
+
<!-- ====== FORM IPC ====== -->
|
|
295
|
+
<div
|
|
296
|
+
id="test-ipc"
|
|
297
|
+
class="py-16 px-4"
|
|
298
|
+
>
|
|
299
|
+
<div class="max-w-lg mx-auto">
|
|
300
|
+
<div class="bg-white dark:bg-[#242424] rounded-2xl shadow-lg overflow-hidden transition-shadow hover:shadow-xl">
|
|
301
|
+
<div class="p-10">
|
|
302
|
+
<h2 class="text-center text-xl font-medium mb-8 text-gray-800 dark:text-gray-100">Prueba IPC (Inter-Process)</h2>
|
|
303
|
+
|
|
304
|
+
<form @submit.prevent="greet">
|
|
305
|
+
<!-- Input field Material-style -->
|
|
306
|
+
<div class="relative border-b-2 border-gray-300 dark:border-gray-600 focus-within:border-[#0b6793] transition-colors flex items-end gap-3 pb-1">
|
|
307
|
+
<Terminal
|
|
308
|
+
:size="22"
|
|
309
|
+
class="text-gray-400 focus-within:text-[#0b6793] mb-0.5 shrink-0"
|
|
310
|
+
/>
|
|
311
|
+
<div class="relative flex-1">
|
|
312
|
+
<input
|
|
313
|
+
id="greet-name"
|
|
314
|
+
type="text"
|
|
315
|
+
v-model="name"
|
|
316
|
+
required
|
|
317
|
+
placeholder=" "
|
|
318
|
+
class="w-full bg-transparent outline-none text-gray-800 dark:text-gray-100 peer pt-4 pb-0.5 text-sm"
|
|
319
|
+
/>
|
|
320
|
+
<label
|
|
321
|
+
for="greet-name"
|
|
322
|
+
class="absolute left-0 top-4 text-gray-500 text-sm transition-all duration-200 peer-focus:-top-1 peer-focus:text-xs peer-focus:text-[#0b6793] peer-not-placeholder-shown:-top-1 peer-not-placeholder-shown:text-xs"
|
|
323
|
+
>
|
|
324
|
+
Escribe tu nombre
|
|
325
|
+
</label>
|
|
326
|
+
</div>
|
|
327
|
+
</div>
|
|
328
|
+
|
|
329
|
+
<div class="text-center mt-8">
|
|
330
|
+
<button
|
|
331
|
+
type="submit"
|
|
332
|
+
data-ripple-light="true"
|
|
333
|
+
class="inline-flex items-center gap-2 px-8 py-3 rounded-full bg-[#0b6793] hover:bg-[#1079ab] text-white font-medium tracking-wide transition-colors shadow-md"
|
|
334
|
+
>
|
|
335
|
+
Probar Respuesta
|
|
336
|
+
<RefreshCw :size="18" />
|
|
337
|
+
</button>
|
|
338
|
+
</div>
|
|
339
|
+
</form>
|
|
340
|
+
</div>
|
|
341
|
+
|
|
342
|
+
<!-- Response -->
|
|
343
|
+
<div
|
|
344
|
+
v-if="greetMsg"
|
|
345
|
+
class="border-t border-gray-100 dark:border-gray-700 px-8 py-5 text-center text-[#0b6793] font-semibold"
|
|
346
|
+
>
|
|
347
|
+
<span class="flex items-center justify-center gap-2 text-base">
|
|
348
|
+
<CheckCircle :size="22" />
|
|
349
|
+
{{ greetMsg }}
|
|
350
|
+
</span>
|
|
351
|
+
</div>
|
|
352
|
+
</div>
|
|
353
|
+
</div>
|
|
354
|
+
</div>
|
|
355
|
+
|
|
356
|
+
<!-- ====== FOOTER ====== -->
|
|
357
|
+
<footer class="bg-[#0b6793] dark:bg-[#121212] text-white pt-12 pb-0">
|
|
358
|
+
<div class="max-w-7xl mx-auto px-4">
|
|
359
|
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-8 pb-8">
|
|
360
|
+
<div>
|
|
361
|
+
<h5 class="text-lg font-semibold mb-3">Garantía Full-Stack</h5>
|
|
362
|
+
<p class="text-white/75 text-sm leading-relaxed">
|
|
363
|
+
Comience a añadir vistas al enrutador en
|
|
364
|
+
<code class="bg-white/10 px-1.5 py-0.5 rounded text-xs font-mono">src/views/</code>
|
|
365
|
+
, maneje estado en
|
|
366
|
+
<code class="bg-white/10 px-1.5 py-0.5 rounded text-xs font-mono">src/stores/</code>
|
|
367
|
+
y construya componentes encapsulados en
|
|
368
|
+
<code class="bg-white/10 px-1.5 py-0.5 rounded text-xs font-mono">src/components/</code>
|
|
369
|
+
.
|
|
370
|
+
</p>
|
|
371
|
+
</div>
|
|
372
|
+
<div>
|
|
373
|
+
<h5 class="text-lg font-semibold mb-3">Stack Moderno</h5>
|
|
374
|
+
<ul class="space-y-2 text-sm text-white/80">
|
|
375
|
+
<li class="flex items-center gap-2">
|
|
376
|
+
<Code :size="15" />
|
|
377
|
+
Vite + Vue 3
|
|
378
|
+
</li>
|
|
379
|
+
<li class="flex items-center gap-2">
|
|
380
|
+
<Lock :size="15" />
|
|
381
|
+
Tauri / Rust API
|
|
382
|
+
</li>
|
|
383
|
+
<li class="flex items-center gap-2">
|
|
384
|
+
<Brush :size="15" />
|
|
385
|
+
Tailwind CSS v4
|
|
386
|
+
</li>
|
|
387
|
+
<li class="flex items-center gap-2">
|
|
388
|
+
<Database :size="15" />
|
|
389
|
+
Pinia Store
|
|
390
|
+
</li>
|
|
391
|
+
<li class="flex items-center gap-2">
|
|
392
|
+
<Star :size="15" />
|
|
393
|
+
Lucide Icons
|
|
394
|
+
</li>
|
|
395
|
+
</ul>
|
|
396
|
+
</div>
|
|
397
|
+
</div>
|
|
398
|
+
</div>
|
|
399
|
+
<div class="bg-black/15 py-4 text-center text-sm text-white/70">© 2026 Plantilla Avanzada Canaima App</div>
|
|
400
|
+
</footer>
|
|
401
|
+
</div>
|
|
402
|
+
</template>
|
|
403
|
+
|
|
404
|
+
<style scoped>
|
|
405
|
+
/* Smooth transition for accordion arrow */
|
|
406
|
+
details > summary svg:last-child {
|
|
407
|
+
transition: transform 0.2s ease;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
/* Floating label: show small when input has value */
|
|
411
|
+
input:not(:placeholder-shown) + label,
|
|
412
|
+
input:focus + label {
|
|
413
|
+
top: -0.25rem;
|
|
414
|
+
font-size: 0.7rem;
|
|
415
|
+
color: #0b6793;
|
|
416
|
+
}
|
|
417
|
+
</style>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { createRouter, createWebHistory } from 'vue-router'
|
|
2
|
+
import HomeView from '../views/HomeView.vue'
|
|
3
|
+
|
|
4
|
+
const router = createRouter({
|
|
5
|
+
history: createWebHistory(import.meta.env.BASE_URL),
|
|
6
|
+
routes: [
|
|
7
|
+
{
|
|
8
|
+
path: '/',
|
|
9
|
+
name: 'home',
|
|
10
|
+
component: HomeView,
|
|
11
|
+
},
|
|
12
|
+
// Añade más rutas y vistas aquí para expandir el enrutamiento...
|
|
13
|
+
],
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
export default router
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { defineStore } from 'pinia'
|
|
2
|
+
import { ref } from 'vue'
|
|
3
|
+
|
|
4
|
+
// 'useAppStore' actúa como el almacén global (Global State) principal
|
|
5
|
+
export const useAppStore = defineStore('app', () => {
|
|
6
|
+
// === Estado (Variables Globales) ===
|
|
7
|
+
const isDarkMode = ref(localStorage.getItem('theme') === 'dark')
|
|
8
|
+
|
|
9
|
+
// Inicializar el tema actual basado en las preferencias guardadas
|
|
10
|
+
// Tailwind v4 usa la clase 'dark' en <html> en lugar de 'dark-mode' en <body>
|
|
11
|
+
function initTheme() {
|
|
12
|
+
if (isDarkMode.value) {
|
|
13
|
+
document.documentElement.classList.add('dark')
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// === Acciones (Mutaciones) ===
|
|
18
|
+
function toggleDarkMode() {
|
|
19
|
+
isDarkMode.value = !isDarkMode.value
|
|
20
|
+
if (isDarkMode.value) {
|
|
21
|
+
document.documentElement.classList.add('dark')
|
|
22
|
+
localStorage.setItem('theme', 'dark')
|
|
23
|
+
} else {
|
|
24
|
+
document.documentElement.classList.remove('dark')
|
|
25
|
+
localStorage.setItem('theme', 'light')
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// === Exportar ===
|
|
30
|
+
return {
|
|
31
|
+
isDarkMode,
|
|
32
|
+
initTheme,
|
|
33
|
+
toggleDarkMode,
|
|
34
|
+
}
|
|
35
|
+
})
|