hisonvue 1.1.9 → 1.1.11
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/{HAccordion-CwX4X5rP.js → HAccordion-BPcUkox0.js} +1 -1
- package/dist/{HAccordion-B9X5a8uS.mjs → HAccordion-DzD88p_k.mjs} +2 -2
- package/dist/{HBaggie-BkdjoUd8.mjs → HBaggie-CoE3swPJ.mjs} +2 -2
- package/dist/{HBaggie-p4YtANgJ.js → HBaggie-DN3TUx7R.js} +1 -1
- package/dist/{HBanner-XHxPBDDx.js → HBanner-CO620JW2.js} +1 -1
- package/dist/{HBanner-DJSW0-oC.mjs → HBanner-wYmOu8Da.mjs} +2 -2
- package/dist/{HButton-BTx3hnGw.mjs → HButton-BcGJbrDW.mjs} +2 -2
- package/dist/{HButton-Cog_ozZo.js → HButton-DuHEt4L4.js} +1 -1
- package/dist/{HCalendar-DBOIOJU5.mjs → HCalendar-BCnJmmwt.mjs} +2 -2
- package/dist/{HCalendar-CNQKtcAW.js → HCalendar-w59hzWIb.js} +2 -2
- package/dist/{HCaption-DxHNXOQT.js → HCaption-BS-kcsPL.js} +1 -1
- package/dist/{HCaption-CLJuVeBS.mjs → HCaption-CEcuoI2Z.mjs} +1 -1
- package/dist/{HChart-DDf5oZRS.mjs → HChart-BVErh-TI.mjs} +1 -1
- package/dist/{HChart-BL9C0v1k.js → HChart-GW0MC1O-.js} +1 -1
- package/dist/{HDrawer-C34D6Yyn.js → HDrawer-BYNWM5oo.js} +1 -1
- package/dist/{HDrawer-BoOaLn_5.mjs → HDrawer-BeFNw6it.mjs} +1 -1
- package/dist/{HDropdown-YYE5X-xr.js → HDropdown-4PzlwYQK.js} +1 -1
- package/dist/{HDropdown-Qv-J_mld.mjs → HDropdown-DAPxzzLT.mjs} +2 -2
- package/dist/{HFileset-BA_iNeiI.js → HFileset-C3jH-75M.js} +1 -1
- package/dist/{HFileset-BvDO3aNe.mjs → HFileset-DH4RVJMc.mjs} +1 -1
- package/dist/{HGap-BrB040ot.js → HGap-BICfHf2P.js} +1 -1
- package/dist/{HGap-BHFeKNmj.mjs → HGap-xEp9kuzW.mjs} +1 -1
- package/dist/{HGrid-DqB9uUXP.js → HGrid-BYpzERIV.js} +1 -1
- package/dist/{HGrid-B3sogW2X.mjs → HGrid-CMj1N_CR.mjs} +7 -7
- package/dist/{HImagebox-CJ6ZePsH.js → HImagebox-BK13d9hC.js} +1 -1
- package/dist/{HImagebox-FskJNzsv.mjs → HImagebox-CjP4ifUf.mjs} +1 -1
- package/dist/{HInput-CXjTaPED.mjs → HInput-BsQwJ4oK.mjs} +1 -1
- package/dist/{HInput-CJr5PE-7.js → HInput-C6P1WBQR.js} +1 -1
- package/dist/{HInputGroup-D8p9jS7n.js → HInputGroup-CJvqmDw_.js} +1 -1
- package/dist/{HInputGroup-BhSyxYq0.mjs → HInputGroup-DSytkVgB.mjs} +1 -1
- package/dist/{HLabel-5ptBVe28.js → HLabel-BZmcQdJZ.js} +1 -1
- package/dist/{HLabel-BVsI-mje.mjs → HLabel-CVlUjx2J.mjs} +2 -2
- package/dist/{HLayout-DryvkRqE.mjs → HLayout-CTokm5DW.mjs} +1 -1
- package/dist/{HLayout-DtM-cTSx.js → HLayout-Cvh9owsl.js} +1 -1
- package/dist/{HList-DU3WuYwD.js → HList-B56HtoRE.js} +1 -1
- package/dist/{HList-DtOpQ2V3.mjs → HList-CjQUGjSi.mjs} +2 -2
- package/dist/{HModal-BJKdf65e.mjs → HModal-B60an2UM.mjs} +1 -1
- package/dist/{HModal-C_mi279o.js → HModal-pR6tdZaS.js} +1 -1
- package/dist/{HNote-B6GFOj0S.mjs → HNote-DbolymFq.mjs} +1 -1
- package/dist/{HNote-B9gSb3LH.js → HNote-aGk4Iq2z.js} +1 -1
- package/dist/{HPagination-4wmIvYNJ.js → HPagination-BZ17GWQO.js} +1 -1
- package/dist/{HPagination-CqOA6UCF.mjs → HPagination-BrMrMfTw.mjs} +2 -2
- package/dist/{HParagraph-PTHx_RN4.js → HParagraph-BSv_Wsjz.js} +1 -1
- package/dist/{HParagraph-CM2yycMU.mjs → HParagraph-D5k1Wd5x.mjs} +1 -1
- package/dist/{HPopup-VSP63YBK.js → HPopup-ASomoAz9.js} +1 -1
- package/dist/{HPopup-CRXaObMA.mjs → HPopup-BvZpNjfs.mjs} +1 -1
- package/dist/{HSpinner-CMNqrFQm.mjs → HSpinner-BpZVFnXH.mjs} +1 -1
- package/dist/{HSpinner-DUSvlAUB.js → HSpinner-CmyqXHMh.js} +1 -1
- package/dist/{HTable-D_7pbQh6.mjs → HTable-CV3PO9DY.mjs} +1 -1
- package/dist/{HTable-Cxnp6Dcb.js → HTable-lqvTk19w.js} +1 -1
- package/dist/hisonvue.cjs.js +1 -1
- package/dist/hisonvue.css +1 -1
- package/dist/hisonvue.d.ts +11 -129
- package/dist/hisonvue.es.js +15 -16
- package/dist/{index-CTBjU64J.mjs → index-CC0B7Mqx.mjs} +4 -4
- package/dist/{index-8ra42Geo.js → index-DeOa0YJA.js} +2 -2
- package/dist/{setButtonCssEvent-D2gKOB4N.mjs → setButtonCssEvent-CYoAPu2n.mjs} +1 -1
- package/dist/{setButtonCssEvent-Dr7JxaDk.js → setButtonCssEvent-DK69MUM5.js} +1 -1
- package/nuxt/module.mjs +36 -16
- package/package.json +1 -1
- package/nuxt/plugin.mjs +0 -21
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as n } from "./index-
|
|
1
|
+
import { h as n } from "./index-CC0B7Mqx.mjs";
|
|
2
2
|
const o = /* @__PURE__ */ new WeakMap(), r = /* @__PURE__ */ new WeakSet(), u = (t) => {
|
|
3
3
|
const e = t.currentTarget;
|
|
4
4
|
if (n.event.cssEvent.button_onBeforeFocus(t) === !1) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const o=require("./index-
|
|
1
|
+
"use strict";const o=require("./index-DeOa0YJA.js"),n=new WeakMap,r=new WeakSet,u=t=>{const e=t.currentTarget;if(o.hisonCloser.event.cssEvent.button_onBeforeFocus(t)===!1){t.stopPropagation(),t.preventDefault();return}e.classList.add("hison-button-on-focus"),o.hisonCloser.event.cssEvent.button_onAfterFocus(t)},a=t=>{const e=t.currentTarget;if(o.hisonCloser.event.cssEvent.button_onBeforeBlur(t)===!1){t.stopPropagation(),t.preventDefault();return}e.classList.remove("hison-button-on-focus"),e.classList.remove("hison-button-on-active");const s=n.get(e);s&&(clearTimeout(s),n.delete(e)),o.hisonCloser.event.cssEvent.button_onAfterBlur(t)},c=t=>{const e=t.currentTarget;if(o.hisonCloser.event.cssEvent.button_onBeforeClick(t)===!1){t.stopPropagation(),t.preventDefault();return}e.classList.remove("hison-button-on-mouseover","hison-button-on-focus"),e.classList.add("hison-button-on-active");const s=n.get(e);s&&clearTimeout(s);const l=window.setTimeout(()=>{e.classList.remove("hison-button-on-active"),document.activeElement===e&&e.classList.add("hison-button-on-focus"),o.hisonCloser.event.cssEvent.button_onAfterClick(t),n.delete(e)},100);n.set(e,l)},i=t=>{const e=t.currentTarget;if(o.hisonCloser.event.cssEvent.button_onBeforeMouseover(t)===!1){t.stopPropagation(),t.preventDefault();return}e.classList.add("hison-button-on-mouseover"),o.hisonCloser.event.cssEvent.button_onAfterMouseover(t)},v=t=>{const e=t.currentTarget;if(o.hisonCloser.event.cssEvent.button_onBeforeMouseout(t)===!1){t.stopPropagation(),t.preventDefault();return}e.classList.remove("hison-button-on-mouseover"),o.hisonCloser.event.cssEvent.button_onAfterMouseout(t)},f=t=>{const e=t.currentTarget;if(o.hisonCloser.event.cssEvent.button_onBeforeTouchstart(t)===!1){t.stopPropagation(),t.preventDefault();return}e.classList.add("hison-button-on-mouseover"),o.hisonCloser.event.cssEvent.button_onAfterTouchstart(t)},d=t=>{const e=t.currentTarget;if(o.hisonCloser.event.cssEvent.button_onBeforeTouchend(t)===!1){t.stopPropagation(),t.preventDefault();return}e.classList.remove("hison-button-on-mouseover"),o.hisonCloser.event.cssEvent.button_onAfterTouchend(t)},h=t=>{r.has(t)||(r.add(t),t.addEventListener("click",c,{capture:!0}),t.addEventListener("focus",u),t.addEventListener("blur",a),t.addEventListener("mouseenter",i),t.addEventListener("mouseleave",v),t.addEventListener("touchstart",f,{passive:!1,capture:!0}),t.addEventListener("touchend",d,{passive:!1,capture:!0}))},E=t=>{if(!r.has(t))return;r.delete(t),t.removeEventListener("click",c,{capture:!0}),t.removeEventListener("focus",u),t.removeEventListener("blur",a),t.removeEventListener("mouseenter",i),t.removeEventListener("mouseleave",v),t.removeEventListener("touchstart",f,{capture:!0}),t.removeEventListener("touchend",d,{capture:!0});const e=n.get(t);e&&(clearTimeout(e),n.delete(t))};exports.addButtonCssEvent=h;exports.removeButtonCssEvent=E;
|
package/nuxt/module.mjs
CHANGED
|
@@ -1,27 +1,48 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
defineNuxtModule,
|
|
3
|
+
addTemplate,
|
|
4
|
+
addPlugin,
|
|
5
|
+
createResolver,
|
|
6
|
+
addTypeTemplate,
|
|
7
|
+
} from '@nuxt/kit'
|
|
2
8
|
import { readFileSync } from 'fs'
|
|
3
9
|
import { fileURLToPath } from 'url'
|
|
4
10
|
import { dirname, resolve } from 'path'
|
|
5
11
|
|
|
6
12
|
export default defineNuxtModule({
|
|
7
|
-
meta: {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
defaults: {
|
|
12
|
-
autoInstall: true
|
|
13
|
-
},
|
|
14
|
-
setup(options, nuxt) {
|
|
13
|
+
meta: { name: 'hisonvue', configKey: 'hisonvue' },
|
|
14
|
+
defaults: { autoInstall: true },
|
|
15
|
+
setup(_options, nuxt) {
|
|
16
|
+
|
|
15
17
|
const resolver = createResolver(import.meta.url)
|
|
16
18
|
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
const tpl = addTemplate({
|
|
20
|
+
filename: 'hisonvue.plugin.mjs',
|
|
21
|
+
getContents: () => `
|
|
22
|
+
import { defineNuxtPlugin, useAppConfig, useRuntimeConfig } from '#app'
|
|
23
|
+
import { hisonvue, getDefaultHisonConfig } from 'hisonvue'
|
|
24
|
+
|
|
25
|
+
export default defineNuxtPlugin((nuxtApp) => {
|
|
26
|
+
try {
|
|
27
|
+
const installed = (nuxtApp.vueApp && (nuxtApp.vueApp)._context && (nuxtApp.vueApp)._context.installedPlugins)
|
|
28
|
+
if (installed && installed.has(hisonvue)) return
|
|
29
|
+
|
|
30
|
+
const cfg = getDefaultHisonConfig()
|
|
31
|
+
try {
|
|
32
|
+
const appCfg = (useAppConfig() || {}).hisonvue || {}
|
|
33
|
+
const runtimeCfg = ((useRuntimeConfig() || {}).public || {}).hisonvue || {}
|
|
34
|
+
Object.assign(cfg, appCfg, runtimeCfg)
|
|
35
|
+
} catch {}
|
|
36
|
+
|
|
37
|
+
nuxtApp.vueApp.use(hisonvue, cfg)
|
|
38
|
+
} catch (err) {
|
|
39
|
+
console.error('[hisonvue] plugin failed on', process.server ? 'SSR' : 'CSR', err)
|
|
40
|
+
}
|
|
41
|
+
})
|
|
42
|
+
`.trim()
|
|
20
43
|
})
|
|
21
44
|
|
|
22
|
-
|
|
23
|
-
addPlugin(resolver.resolve('./plugin.mjs'))
|
|
24
|
-
}
|
|
45
|
+
addPlugin({ src: tpl.dst })
|
|
25
46
|
|
|
26
47
|
const __filename = fileURLToPath(import.meta.url)
|
|
27
48
|
const __dirname = dirname(__filename)
|
|
@@ -31,7 +52,6 @@ export default defineNuxtModule({
|
|
|
31
52
|
filename: 'types/hisonvue-components.d.ts',
|
|
32
53
|
getContents: () => readFileSync(globalComponentsPath, 'utf-8')
|
|
33
54
|
})
|
|
34
|
-
|
|
35
55
|
nuxt.hook('prepare:types', (opts) => {
|
|
36
56
|
opts.references.push({ path: resolver.resolve('types/hisonvue-components.d.ts') })
|
|
37
57
|
})
|
package/package.json
CHANGED
package/nuxt/plugin.mjs
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { defineNuxtPlugin, useAppConfig, useRuntimeConfig } from '#app'
|
|
2
|
-
import { hisonvue, getDefaultHisonConfig } from 'hisonvue'
|
|
3
|
-
import 'hisonvue/style.css'
|
|
4
|
-
|
|
5
|
-
export default defineNuxtPlugin((nuxtApp) => {
|
|
6
|
-
if (!process.client) return
|
|
7
|
-
|
|
8
|
-
const installed = (nuxtApp.vueApp && (nuxtApp.vueApp)._context && (nuxtApp.vueApp)._context.installedPlugins)
|
|
9
|
-
if (installed && installed.has(hisonvue)) {
|
|
10
|
-
return
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const cfg = getDefaultHisonConfig()
|
|
14
|
-
try {
|
|
15
|
-
const appCfg = (useAppConfig() || {}).hisonvue || {}
|
|
16
|
-
const runtimeCfg = ((useRuntimeConfig() || {}).public || {}).hisonvue || {}
|
|
17
|
-
Object.assign(cfg, appCfg, runtimeCfg)
|
|
18
|
-
} catch (_) { }
|
|
19
|
-
|
|
20
|
-
nuxtApp.vueApp.use(hisonvue, cfg)
|
|
21
|
-
})
|