hanap-labs 0.1.11 → 0.1.13

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/index.js CHANGED
@@ -3,4 +3,32 @@ import { C as r, S as i, _ as a, a as o, b as s, c, d as l, f as u, g as d, h as
3
3
  import { n as E, r as D, t as O } from "./chunks/usePopup-Dt76ZiED.js";
4
4
  import { t as k } from "./chunks/helpers-QkG7gR6t.js";
5
5
  import { createToolkitAutoImportModules as A, createToolkitAutoImportOptions as j, createToolkitComponentsResolver as M } from "./auto-import/index.js";
6
- export { i as AH_ICON_NAMES, T as HLAvatar, s as HLBreadcrumb, C as HLButton, d as HLCheckbox, u as HLGlobalNotify, c as HLGlobalPopup, w as HLIcon, f as HLInput, a as HLLabel, h as HLMenuAction, m as HLPopup, o as HLSelect, p as HLSkeleton, g as HLTable, y as HLTabs, x as HLTextarea, v as HLToast, S as createNotifyPlugin, _ as createPopupPlugin, A as createToolkitAutoImportModules, j as createToolkitAutoImportOptions, M as createToolkitComponentsResolver, e as createUseQuery, k as formatLabel, r as getAHIconSvg, l as unmountNotifyHost, b as unmountPopupHost, D as useFloat, n as useForm, E as useNotify, O as usePopup, t as useQuery };
6
+ //#region src/plugins/themePlugin.ts
7
+ var N = {
8
+ themeClass: "hanap-labs-theme",
9
+ autoInject: !0
10
+ };
11
+ function P(e = {}) {
12
+ let t = {
13
+ ...N,
14
+ ...e
15
+ };
16
+ if (typeof document > "u") return;
17
+ let n = document.body;
18
+ n.classList.contains(t.themeClass) || n.classList.add(t.themeClass);
19
+ }
20
+ function F(e = N.themeClass) {
21
+ typeof document > "u" || document.body.classList.remove(e);
22
+ }
23
+ var I = { install(e, ...t) {
24
+ let n = t[0] ?? {}, r = {
25
+ ...N,
26
+ ...n
27
+ };
28
+ r.autoInject && P(r), e.provide("hanapLabsTheme", {
29
+ inject: () => P(r),
30
+ remove: () => F(r.themeClass)
31
+ });
32
+ } };
33
+ //#endregion
34
+ export { i as AH_ICON_NAMES, T as HLAvatar, s as HLBreadcrumb, C as HLButton, d as HLCheckbox, u as HLGlobalNotify, c as HLGlobalPopup, w as HLIcon, f as HLInput, a as HLLabel, h as HLMenuAction, m as HLPopup, o as HLSelect, p as HLSkeleton, g as HLTable, y as HLTabs, x as HLTextarea, v as HLToast, I as HanapLabsThemePlugin, S as createNotifyPlugin, _ as createPopupPlugin, A as createToolkitAutoImportModules, j as createToolkitAutoImportOptions, M as createToolkitComponentsResolver, e as createUseQuery, k as formatLabel, r as getAHIconSvg, P as injectTheme, F as removeTheme, l as unmountNotifyHost, b as unmountPopupHost, D as useFloat, n as useForm, E as useNotify, O as usePopup, t as useQuery };
@@ -4,3 +4,4 @@ export * from "./helpers";
4
4
  export * from "./composables";
5
5
  export * from "./auto-import";
6
6
  export * from "./types";
7
+ export { HanapLabsThemePlugin, injectTheme, removeTheme, type ThemePluginOptions, } from "./plugins/themePlugin";
@@ -0,0 +1,24 @@
1
+ import type { Plugin } from "vue";
2
+ export interface ThemePluginOptions {
3
+ /** CSS class to add to document body */
4
+ themeClass?: string;
5
+ /** Whether to auto-inject theme on install */
6
+ autoInject?: boolean;
7
+ }
8
+ export declare const defaultOptions: Required<ThemePluginOptions>;
9
+ /**
10
+ * Injects hanap-labs theme class to document body
11
+ * @param options - Plugin configuration options
12
+ */
13
+ export declare function injectTheme(options?: ThemePluginOptions): void;
14
+ /**
15
+ * Removes hanap-labs theme class from document body
16
+ * @param themeClass - CSS class to remove (default: 'hanap-labs-theme')
17
+ */
18
+ export declare function removeTheme(themeClass?: string): void;
19
+ /**
20
+ * Vue plugin for hanap-labs theme
21
+ * Automatically injects theme class to body on install
22
+ */
23
+ export declare const HanapLabsThemePlugin: Plugin<ThemePluginOptions[]>;
24
+ export default HanapLabsThemePlugin;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hanap-labs",
3
- "version": "0.1.11",
3
+ "version": "0.1.13",
4
4
  "license": "MIT",
5
5
  "keywords": [
6
6
  "vue",