zen-wdg 2.0.3 → 2.0.5
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/dist/zen-wdg.es.js +3 -2
- package/dist/zen-wdg.umd.js +1 -1
- package/package.json +13 -5
- package/src/index.js +1 -0
- package/src/widgets/z-clock-widget.vue +1 -1
- package/dist/zen-wdg.css +0 -1
- package/index.js +0 -14
package/dist/zen-wdg.es.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { createElementBlock, openBlock, createElementVNode, createTextVNode, toDisplayString, defineCustomElement } from "vue";
|
|
2
|
+
const _style_0 = ".clock-container[data-v-e9445086]{display:flex;justify-content:center;align-items:center;height:100%;width:100%}.clock[data-v-e9445086]{text-align:center;font-family:Arial,sans-serif;color:#333;background-color:#14141466;backdrop-filter:blur(.2rem);border-radius:15px;padding:20px;width:100%}.time[data-v-e9445086]{font-size:4em;font-weight:700;color:#fff;display:flex;justify-content:center}.date[data-v-e9445086]{font-size:1.2em;color:#fff;margin-top:10px}@media (max-width: 500px){.time[data-v-e9445086]{font-size:3em}.date[data-v-e9445086]{font-size:1em}}";
|
|
2
3
|
const _export_sfc = (sfc, props) => {
|
|
3
4
|
const target = sfc.__vccOpts || sfc;
|
|
4
5
|
for (const [key, val] of props) {
|
|
@@ -7,7 +8,7 @@ const _export_sfc = (sfc, props) => {
|
|
|
7
8
|
return target;
|
|
8
9
|
};
|
|
9
10
|
const _sfc_main = {
|
|
10
|
-
name: "
|
|
11
|
+
name: "ZClockWidget",
|
|
11
12
|
data() {
|
|
12
13
|
return {
|
|
13
14
|
hours: "00",
|
|
@@ -75,7 +76,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
75
76
|
])
|
|
76
77
|
]);
|
|
77
78
|
}
|
|
78
|
-
const ClockWidget = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
79
|
+
const ClockWidget = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__scopeId", "data-v-e9445086"]]);
|
|
79
80
|
const widgets = [
|
|
80
81
|
{ name: "z-clock-widget", component: defineCustomElement(ClockWidget) }
|
|
81
82
|
];
|
package/dist/zen-wdg.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("vue")):"function"==typeof define&&define.amd?define(["vue"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Vue)}(this,function(e){"use strict";const t={class:"clock-container"},o={class:"clock"},n={class:"time"},
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("vue")):"function"==typeof define&&define.amd?define(["vue"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Vue)}(this,function(e){"use strict";const t={class:"clock-container"},o={class:"clock"},n={class:"time"},a={class:"date"};const i=((e,t)=>{const o=e.__vccOpts||e;for(const[n,a]of t)o[n]=a;return o})({name:"ZClockWidget",data:()=>({hours:"00",minutes:"00",seconds:"00",dayOfWeek:"",day:"",month:"",year:""}),mounted(){this.updateClock(),setInterval(this.updateClock,1e3)},methods:{updateClock(){const e=new Date;this.hours=e.getHours().toString().padStart(2,"0"),this.minutes=e.getMinutes().toString().padStart(2,"0"),this.seconds=e.getSeconds().toString().padStart(2,"0"),this.dayOfWeek=this.getDayOfWeek(e.getDay()),this.day=e.getDate(),this.month=this.getMonthName(e.getMonth()),this.year=e.getFullYear()},getDayOfWeek:e=>["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado"][e],getMonthName:e=>["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"][e]}},[["render",function(i,s,r,c,d,l){return e.openBlock(),e.createElementBlock("div",t,[e.createElementVNode("div",o,[e.createElementVNode("div",n,[e.createElementVNode("span",null,e.toDisplayString(d.hours),1),s[0]||(s[0]=e.createTextVNode(":",-1)),e.createElementVNode("span",null,e.toDisplayString(d.minutes),1)]),e.createElementVNode("div",a,[e.createElementVNode("span",null,e.toDisplayString(d.dayOfWeek)+", "+e.toDisplayString(d.day)+" "+e.toDisplayString(d.month)+" "+e.toDisplayString(d.year),1)])])])}],["styles",[".clock-container[data-v-e9445086]{display:flex;justify-content:center;align-items:center;height:100%;width:100%}.clock[data-v-e9445086]{text-align:center;font-family:Arial,sans-serif;color:#333;background-color:#14141466;backdrop-filter:blur(.2rem);border-radius:15px;padding:20px;width:100%}.time[data-v-e9445086]{font-size:4em;font-weight:700;color:#fff;display:flex;justify-content:center}.date[data-v-e9445086]{font-size:1.2em;color:#fff;margin-top:10px}@media (max-width: 500px){.time[data-v-e9445086]{font-size:3em}.date[data-v-e9445086]{font-size:1em}}"]],["__scopeId","data-v-e9445086"]]);[{name:"z-clock-widget",component:e.defineCustomElement(i)}].forEach(({name:e,component:t})=>{customElements.get(e)||customElements.define(e,t)})});
|
package/package.json
CHANGED
|
@@ -1,24 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zen-wdg",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.5",
|
|
4
4
|
"description": "Minimal widget library for Gridstack-based newtab extensions",
|
|
5
5
|
"main": "dist/zen-wdg.umd.js",
|
|
6
6
|
"module": "dist/zen-wdg.es.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"require": "./dist/zen-wdg.umd.js",
|
|
11
|
+
"import": "./dist/zen-wdg.es.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
7
14
|
"type": "module",
|
|
8
15
|
"scripts": {
|
|
9
|
-
"build": "vite build",
|
|
16
|
+
"build": "vite build && tsc",
|
|
10
17
|
"dev": "vite"
|
|
11
18
|
},
|
|
12
19
|
"author": "Im-Jota",
|
|
13
20
|
"license": "AGPL-3.0",
|
|
14
21
|
"devDependencies": {
|
|
15
|
-
"@vitejs/plugin-vue": "^
|
|
22
|
+
"@vitejs/plugin-vue": "^6.0.0",
|
|
16
23
|
"terser": "^5.43.1",
|
|
17
|
-
"
|
|
24
|
+
"typescript": "^5.8.3",
|
|
25
|
+
"vite": "^6.0.0"
|
|
18
26
|
},
|
|
19
27
|
"files": [
|
|
20
28
|
"dist/",
|
|
21
|
-
"index.js",
|
|
29
|
+
"src/index.js",
|
|
22
30
|
"src/widgets/",
|
|
23
31
|
"src/register.js",
|
|
24
32
|
"AUTHORS.md"
|
package/src/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './register.js'
|
package/dist/zen-wdg.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.clock-container[data-v-dc4ab000]{display:flex;justify-content:center;align-items:center;height:100%;width:100%}.clock[data-v-dc4ab000]{text-align:center;font-family:Arial,sans-serif;color:#333;background-color:#14141466;backdrop-filter:blur(.2rem);border-radius:15px;padding:20px;width:100%}.time[data-v-dc4ab000]{font-size:4em;font-weight:700;color:#fff;display:flex;justify-content:center}.date[data-v-dc4ab000]{font-size:1.2em;color:#fff;margin-top:10px}@media (max-width: 500px){.time[data-v-dc4ab000]{font-size:3em}.date[data-v-dc4ab000]{font-size:1em}}
|
package/index.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
// src/index.js
|
|
2
|
-
|
|
3
|
-
import { defineCustomElement } from 'vue'
|
|
4
|
-
import ClockWidget from './widgets/z-clock-widget.vue'
|
|
5
|
-
|
|
6
|
-
// Export como Web Component listo para registrar
|
|
7
|
-
export const ZClockWidget = defineCustomElement(ClockWidget);
|
|
8
|
-
|
|
9
|
-
// Opción extra: registro automático si alguien quiere usarlo como <z-clock-widget>
|
|
10
|
-
export function registerAllWidgets() {
|
|
11
|
-
if (!customElements.get('z-clock-widget')) {
|
|
12
|
-
customElements.define('z-clock-widget', ZClockWidget);
|
|
13
|
-
}
|
|
14
|
-
}
|