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.
Files changed (61) hide show
  1. package/dist/{HAccordion-CwX4X5rP.js → HAccordion-BPcUkox0.js} +1 -1
  2. package/dist/{HAccordion-B9X5a8uS.mjs → HAccordion-DzD88p_k.mjs} +2 -2
  3. package/dist/{HBaggie-BkdjoUd8.mjs → HBaggie-CoE3swPJ.mjs} +2 -2
  4. package/dist/{HBaggie-p4YtANgJ.js → HBaggie-DN3TUx7R.js} +1 -1
  5. package/dist/{HBanner-XHxPBDDx.js → HBanner-CO620JW2.js} +1 -1
  6. package/dist/{HBanner-DJSW0-oC.mjs → HBanner-wYmOu8Da.mjs} +2 -2
  7. package/dist/{HButton-BTx3hnGw.mjs → HButton-BcGJbrDW.mjs} +2 -2
  8. package/dist/{HButton-Cog_ozZo.js → HButton-DuHEt4L4.js} +1 -1
  9. package/dist/{HCalendar-DBOIOJU5.mjs → HCalendar-BCnJmmwt.mjs} +2 -2
  10. package/dist/{HCalendar-CNQKtcAW.js → HCalendar-w59hzWIb.js} +2 -2
  11. package/dist/{HCaption-DxHNXOQT.js → HCaption-BS-kcsPL.js} +1 -1
  12. package/dist/{HCaption-CLJuVeBS.mjs → HCaption-CEcuoI2Z.mjs} +1 -1
  13. package/dist/{HChart-DDf5oZRS.mjs → HChart-BVErh-TI.mjs} +1 -1
  14. package/dist/{HChart-BL9C0v1k.js → HChart-GW0MC1O-.js} +1 -1
  15. package/dist/{HDrawer-C34D6Yyn.js → HDrawer-BYNWM5oo.js} +1 -1
  16. package/dist/{HDrawer-BoOaLn_5.mjs → HDrawer-BeFNw6it.mjs} +1 -1
  17. package/dist/{HDropdown-YYE5X-xr.js → HDropdown-4PzlwYQK.js} +1 -1
  18. package/dist/{HDropdown-Qv-J_mld.mjs → HDropdown-DAPxzzLT.mjs} +2 -2
  19. package/dist/{HFileset-BA_iNeiI.js → HFileset-C3jH-75M.js} +1 -1
  20. package/dist/{HFileset-BvDO3aNe.mjs → HFileset-DH4RVJMc.mjs} +1 -1
  21. package/dist/{HGap-BrB040ot.js → HGap-BICfHf2P.js} +1 -1
  22. package/dist/{HGap-BHFeKNmj.mjs → HGap-xEp9kuzW.mjs} +1 -1
  23. package/dist/{HGrid-DqB9uUXP.js → HGrid-BYpzERIV.js} +1 -1
  24. package/dist/{HGrid-B3sogW2X.mjs → HGrid-CMj1N_CR.mjs} +7 -7
  25. package/dist/{HImagebox-CJ6ZePsH.js → HImagebox-BK13d9hC.js} +1 -1
  26. package/dist/{HImagebox-FskJNzsv.mjs → HImagebox-CjP4ifUf.mjs} +1 -1
  27. package/dist/{HInput-CXjTaPED.mjs → HInput-BsQwJ4oK.mjs} +1 -1
  28. package/dist/{HInput-CJr5PE-7.js → HInput-C6P1WBQR.js} +1 -1
  29. package/dist/{HInputGroup-D8p9jS7n.js → HInputGroup-CJvqmDw_.js} +1 -1
  30. package/dist/{HInputGroup-BhSyxYq0.mjs → HInputGroup-DSytkVgB.mjs} +1 -1
  31. package/dist/{HLabel-5ptBVe28.js → HLabel-BZmcQdJZ.js} +1 -1
  32. package/dist/{HLabel-BVsI-mje.mjs → HLabel-CVlUjx2J.mjs} +2 -2
  33. package/dist/{HLayout-DryvkRqE.mjs → HLayout-CTokm5DW.mjs} +1 -1
  34. package/dist/{HLayout-DtM-cTSx.js → HLayout-Cvh9owsl.js} +1 -1
  35. package/dist/{HList-DU3WuYwD.js → HList-B56HtoRE.js} +1 -1
  36. package/dist/{HList-DtOpQ2V3.mjs → HList-CjQUGjSi.mjs} +2 -2
  37. package/dist/{HModal-BJKdf65e.mjs → HModal-B60an2UM.mjs} +1 -1
  38. package/dist/{HModal-C_mi279o.js → HModal-pR6tdZaS.js} +1 -1
  39. package/dist/{HNote-B6GFOj0S.mjs → HNote-DbolymFq.mjs} +1 -1
  40. package/dist/{HNote-B9gSb3LH.js → HNote-aGk4Iq2z.js} +1 -1
  41. package/dist/{HPagination-4wmIvYNJ.js → HPagination-BZ17GWQO.js} +1 -1
  42. package/dist/{HPagination-CqOA6UCF.mjs → HPagination-BrMrMfTw.mjs} +2 -2
  43. package/dist/{HParagraph-PTHx_RN4.js → HParagraph-BSv_Wsjz.js} +1 -1
  44. package/dist/{HParagraph-CM2yycMU.mjs → HParagraph-D5k1Wd5x.mjs} +1 -1
  45. package/dist/{HPopup-VSP63YBK.js → HPopup-ASomoAz9.js} +1 -1
  46. package/dist/{HPopup-CRXaObMA.mjs → HPopup-BvZpNjfs.mjs} +1 -1
  47. package/dist/{HSpinner-CMNqrFQm.mjs → HSpinner-BpZVFnXH.mjs} +1 -1
  48. package/dist/{HSpinner-DUSvlAUB.js → HSpinner-CmyqXHMh.js} +1 -1
  49. package/dist/{HTable-D_7pbQh6.mjs → HTable-CV3PO9DY.mjs} +1 -1
  50. package/dist/{HTable-Cxnp6Dcb.js → HTable-lqvTk19w.js} +1 -1
  51. package/dist/hisonvue.cjs.js +1 -1
  52. package/dist/hisonvue.css +1 -1
  53. package/dist/hisonvue.d.ts +11 -129
  54. package/dist/hisonvue.es.js +15 -16
  55. package/dist/{index-CTBjU64J.mjs → index-CC0B7Mqx.mjs} +4 -4
  56. package/dist/{index-8ra42Geo.js → index-DeOa0YJA.js} +2 -2
  57. package/dist/{setButtonCssEvent-D2gKOB4N.mjs → setButtonCssEvent-CYoAPu2n.mjs} +1 -1
  58. package/dist/{setButtonCssEvent-Dr7JxaDk.js → setButtonCssEvent-DK69MUM5.js} +1 -1
  59. package/nuxt/module.mjs +36 -16
  60. package/package.json +1 -1
  61. package/nuxt/plugin.mjs +0 -21
@@ -1,4 +1,4 @@
1
- import { h as n } from "./index-CTBjU64J.mjs";
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-8ra42Geo.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;
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 { defineNuxtModule, addPlugin, createResolver, addTypeTemplate } from '@nuxt/kit'
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
- name: 'hisonvue',
9
- configKey: 'hisonvue'
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 hasUserHisonvuePlugin = (nuxt.options.plugins || []).some((p) => {
18
- const src = typeof p === 'string' ? p : p.src
19
- return src && /hisonvue/i.test(src)
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
- if (!hasUserHisonvuePlugin && options.autoInstall !== false) {
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hisonvue",
3
- "version": "1.1.9",
3
+ "version": "1.1.11",
4
4
  "main": "./dist/hisonvue.cjs.js",
5
5
  "module": "./dist/hisonvue.es.js",
6
6
  "types": "./dist/hisonvue.d.ts",
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
- })