New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@jasperdai/uikit-base-component-vue3

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jasperdai/uikit-base-component-vue3 - npm Package Compare versions

Comparing version 0.5.0 to 0.6.0

dist/constants/utils.d.ts

8

dist/index.js

@@ -1,6 +0,6 @@

import { _ as e } from "./UIKitProvider.vue_vue_type_script_setup_true_lang-y299M22i.js";
import { useUIKit as i } from "./providers/UIKitProvider/contexts/UIKitProvider/useUIKitProvider.js";
import { _ } from "./UIKitProvider.vue_vue_type_script_setup_true_lang-CUqXKH1B.js";
import { useUIKit } from "./providers/UIKitProvider/contexts/UIKitProvider/useUIKitProvider.js";
export {
e as UIKitProvider,
i as useUIKit
_ as UIKitProvider,
useUIKit
};

@@ -1,24 +0,37 @@

import { defineComponent as n, openBlock as c, createElementBlock as m, normalizeClass as a, unref as i, renderSlot as l } from "vue";
import { useTheme as p } from "./useThemeProvider.js";
import '../../../../styles/index.css';const u = /* @__PURE__ */ n({
import '../../../../styles/index.css';import { defineComponent, onMounted, openBlock, createElementBlock, renderSlot } from "vue";
import { useTheme } from "./useThemeProvider.js";
const _hoisted_1 = { class: "uikit-theme-context" };
const _sfc_main = /* @__PURE__ */ defineComponent({
__name: "ThemeProvider",
props: {
theme: { default: "light" }
theme: {}
},
setup(e) {
const o = e, { setTheme: t, uikitThemeClass: r } = p();
return t(o.theme), (s, f) => (c(), m("div", {
class: a(["uikit-theme-context", i(r)])
}, [
l(s.$slots, "default", {}, void 0, !0)
], 2));
setup(__props) {
const { setTheme } = useTheme();
const props = __props;
onMounted(() => {
if (typeof props.theme === "object") {
const { themeStyle, primaryColor } = props.theme;
setTheme({ themeStyle, primaryColor });
} else {
setTheme(props.theme);
}
});
return (_ctx, _cache) => {
return openBlock(), createElementBlock("div", _hoisted_1, [
renderSlot(_ctx.$slots, "default", {}, void 0, true)
]);
};
}
}), d = (e, o) => {
const t = e.__vccOpts || e;
for (const [r, s] of o)
t[r] = s;
return t;
}, v = /* @__PURE__ */ d(u, [["__scopeId", "data-v-10b309f6"]]);
});
const _export_sfc = (sfc, props) => {
const target = sfc.__vccOpts || sfc;
for (const [key, val] of props) {
target[key] = val;
}
return target;
};
const ThemeProvider = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-63ca3502"]]);
export {
v as default
ThemeProvider as default
};

@@ -0,1 +1,2 @@

import { ThemeObject } from '../../../../constants/utils';

@@ -5,13 +6,7 @@ declare function __VLS_template(): {

};
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
theme?: string;
}>, {
theme: string;
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
theme?: string;
}>, {
theme: string;
}>>> & Readonly<{}>, {
theme: string;
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
theme: string | ThemeObject;
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
theme: string | ThemeObject;
}>>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;

@@ -28,10 +23,2 @@ export default _default;

};
type __VLS_WithDefaults<P, D> = {
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
default: D[K];
}> : P[K];
};
type __VLS_Prettify<T> = {
[K in keyof T]: T[K];
} & {};
type __VLS_WithTemplateSlots<T, S> = T & {

@@ -38,0 +25,0 @@ new (): {

@@ -0,5 +1,6 @@

import { ThemeObject } from '../../../../constants/utils';
export declare function useTheme(): {
theme: import('vue').Ref<string, string>;
setTheme: (newTheme: string) => void;
uikitThemeClass: import('vue').ComputedRef<string>;
theme: import('vue').Ref<any, any>;
setTheme: (newTheme: string | ThemeObject) => void;
};

@@ -1,20 +0,21 @@

import { ref as r, computed as d } from "vue";
const e = r(""), o = ["light", "dark"], m = d(() => `tui-theme-${e.value}`);
function h() {
function s(t) {
if (o.includes(t)) {
e.value = t;
const i = t === "light" ? "dark" : "light", u = t;
document.body.classList.remove(`tui-theme-${i}`), document.body.classList.add(`tui-theme-${u}`);
} else
throw new Error(`Theme "${t}" is not supported. Supported themes: [${o.join(", ")}]`);
import { ref } from "vue";
import { ThemeColorGenerator } from "./colorGenerator.js";
const theme = ref();
function useTheme() {
function setTheme(newTheme) {
theme.value = typeof newTheme === "object" ? newTheme.themeStyle : newTheme;
document.documentElement.removeAttribute("tui-theme-mode");
document.documentElement.setAttribute("tui-theme-mode", `${theme.value}`);
if (typeof newTheme === "object" && newTheme.primaryColor) {
document.documentElement.style.setProperty("--primary-color", newTheme.primaryColor);
ThemeColorGenerator.applyThemeColor();
}
}
return {
theme: e,
setTheme: s,
uikitThemeClass: m
theme,
setTheme
};
}
export {
h as useTheme
useTheme
};

@@ -1,4 +0,4 @@

import { _ as f } from "../../../../UIKitProvider.vue_vue_type_script_setup_true_lang-y299M22i.js";
import { _ as _sfc_main } from "../../../../UIKitProvider.vue_vue_type_script_setup_true_lang-CUqXKH1B.js";
export {
f as default
_sfc_main as default
};

@@ -0,15 +1,11 @@

import { ThemeObject } from '../../../../constants/utils';
declare function __VLS_template(): {
default?(_: {}): any;
};
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
theme?: string;
}>, {
theme: string;
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
theme?: string;
}>, {
theme: string;
}>>> & Readonly<{}>, {
theme: string;
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
theme: string | ThemeObject;
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
theme: string | ThemeObject;
}>>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;

@@ -26,10 +22,2 @@ export default _default;

};
type __VLS_WithDefaults<P, D> = {
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
default: D[K];
}> : P[K];
};
type __VLS_Prettify<T> = {
[K in keyof T]: T[K];
} & {};
type __VLS_WithTemplateSlots<T, S> = T & {

@@ -36,0 +24,0 @@ new (): {

export declare function useUIKit(): {
theme: import('vue').Ref<string, string>;
setTheme: (newTheme: string) => void;
uikitThemeClass: import('vue').ComputedRef<string>;
theme: import('vue').Ref<any, any>;
setTheme: (newTheme: string | import('../../../../constants/utils').ThemeObject) => void;
};

@@ -1,9 +0,8 @@

import { useTheme as e } from "../ThemeProvider/useThemeProvider.js";
function n() {
return {
...e()
};
import { useTheme } from "../ThemeProvider/useThemeProvider.js";
function useUIKit() {
const themeContext = useTheme();
return themeContext;
}
export {
n as useUIKit
useUIKit
};

@@ -1,6 +0,6 @@

import { _ as e } from "../../UIKitProvider.vue_vue_type_script_setup_true_lang-y299M22i.js";
import { useUIKit as i } from "./contexts/UIKitProvider/useUIKitProvider.js";
import { _ } from "../../UIKitProvider.vue_vue_type_script_setup_true_lang-CUqXKH1B.js";
import { useUIKit } from "./contexts/UIKitProvider/useUIKitProvider.js";
export {
e as UIKitProvider,
i as useUIKit
_ as UIKitProvider,
useUIKit
};
{
"name": "@jasperdai/uikit-base-component-vue3",
"version": "0.5.0",
"version": "0.6.0",
"type": "module",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

@@ -18,2 +18,4 @@ import { extname, relative, resolve } from 'path';

build: {
cssMinify: false,
minify: false,
lib: {

@@ -43,3 +45,3 @@ entry: resolve(__dirname, 'src/index.ts'),

{
src: './src/providers/UIKitProvider/styles/themes',
src: './src/providers/UIKitProvider/styles',
dest: 'styles',

@@ -46,0 +48,0 @@ },

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc