glass-studio-ui-pro 1.1.1 → 1.1.3

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/README.md CHANGED
@@ -2,17 +2,39 @@
2
2
 
3
3
  **Premium Liquid Glass UI Library for Vue 3**
4
4
 
5
+ > [!IMPORTANT]
6
+ > **DỰ ÁN ĐANG PHÁT TRIỂN**: Thư viện hiện tại đang trong giai đoạn Beta và chưa mở công khai cho mọi người sử dụng.
7
+ > **Ngày ra mắt chính thức: 01/05/2026**.
8
+
5
9
  ![Glass Studio Preview](https://i.ibb.co/yc8QmHwZ/Screenshot-2026-03-27-154613.png)
6
10
 
7
- `glass-studio-ui-pro` is a high-fidelity glassmorphism UI library designed for modern Vue 3 applications.
11
+ `glass-studio-ui-pro` thư viện UI chuyên về hiệu ứng kính mờ (Glassmorphism) hiệu năng cao cho Vue 3. Thư viện cung cấp các bộ lọc biến dạng lỏng (Liquid Distortion), hệ thống đổ bóng đa tầng và các preset chuyên nghiệp giúp tạo ra giao diện sang trọng, đẳng cấp.
12
+
13
+ ---
14
+
15
+ ## ✨ Tính năng nổi bật
16
+
17
+ - **Liquid Glass Distortion**: Tích hợp các bộ lọc biến dạng kính chân thực (Mist, Grain, Frosted, Ripple).
18
+ - **Pro Presets**: Hơn 10 mã thiết kế kính được tinh chỉnh sẵn (Heavy-frost, Crystal, Deep-velvet...).
19
+ - **Advanced Shadow Engine**: Hệ thống đổ bóng phản xạ (Reflex) và bóng mờ (Mist) tạo độ sâu vật lý.
20
+ - **License Guard**: Hệ thống bảo mật và quản lý bản quyền thời gian thực.
21
+ - **TypeScript First**: Hỗ trợ đầy đủ kiểu dữ liệu, tối ưu cho DX (Developer Experience).
22
+
23
+ ---
24
+
25
+ ## 🚀 Bắt đầu sử dụng
8
26
 
9
- ## 🚀 Getting Started
27
+ ### 1. Cài đặt
10
28
 
11
29
  ```bash
12
30
  npm install glass-studio-ui-pro
31
+ # hoặc
32
+ yarn add glass-studio-ui-pro
13
33
  ```
14
34
 
15
- ### Global Setup
35
+ ### 2. Cấu hình Plugin (main.ts)
36
+
37
+ Để kích hoạt đầy đủ tính năng Pro, bạn cần đăng ký plugin và truyền vào **License Key**:
16
38
 
17
39
  ```typescript
18
40
  import { createApp } from "vue";
@@ -20,15 +42,18 @@ import { GlassUI } from "glass-studio-ui-pro";
20
42
  import "glass-studio-ui-pro/style.css";
21
43
 
22
44
  const app = createApp(App);
45
+
46
+ // Khởi tạo GlassUI với License Key của bạn
23
47
  app.use(GlassUI, {
24
- licenseKey: "YOUR-LICENSE-KEY",
48
+ licenseKey: "YOUR-PRO-LICENSE-KEY",
25
49
  });
50
+
26
51
  app.mount("#app");
27
52
  ```
28
53
 
29
- ### SVG Filters Setup (Required)
54
+ ### 3. Cài đặt SVG Filters (Root App)
30
55
 
31
- Add `CmFilters` to your root `App.vue`:
56
+ Để các hiệu ứng biến dạng (Distortion) hoạt động, bạn **bắt buộc** phải đặt `CmFilters` tại file root (thường là `App.vue`):
32
57
 
33
58
  ```vue
34
59
  <script setup>
@@ -39,10 +64,93 @@ import { CmFilters } from "glass-studio-ui-pro";
39
64
  <div id="app">
40
65
  <router-view />
41
66
  <CmFilters />
67
+ <!-- Engine xử lý hiệu ứng kính -->
42
68
  </div>
43
69
  </template>
44
70
  ```
45
71
 
46
72
  ---
47
73
 
48
- (C) 2026 Glass Studio All Rights Reserved.
74
+ ## 🎨 Sử dụng linh kiện
75
+
76
+ ### CmCard (Thẻ kính)
77
+
78
+ ```vue
79
+ <template>
80
+ <CmCard type="heavy-frost" shadow="mist" distortion="wavy">
81
+ <h3>Liquid Glass Performance</h3>
82
+ <p>Nội dung hiển thị với hiệu ứng kính cao cấp.</p>
83
+ </CmCard>
84
+ </template>
85
+ ```
86
+
87
+ ### CmButton (Nút bấm thủy tinh)
88
+
89
+ ```vue
90
+ <template>
91
+ <CmButton variant="primary" glow :blur="20" distortion="frosted">
92
+ Bắt đầu ngay
93
+ </CmButton>
94
+ </template>
95
+ ```
96
+
97
+ ---
98
+
99
+ ## 📖 Bảng thông số (API Reference)
100
+
101
+ ### CmCard Props
102
+
103
+ | Prop | Type | Default | Description |
104
+ | :----------- | :----------- | :------- | :------------------------------------------------------------- |
105
+ | `type` | `CardPreset` | `'none'` | Các preset sẵn có: `glass-frost`, `heavy-frost`, `crystal`... |
106
+ | `blur` | `number` | `12` | Độ mờ của lớp kính (px). |
107
+ | `opacity` | `number` | `0.12` | Độ trong suốt của nền (0-1). |
108
+ | `distortion` | `string` | `'none'` | Kiểu biến dạng: `wavy`, `frosted`, `grain`, `ripple`, `mist`. |
109
+ | `shadow` | `string` \| `boolean` | `false` | Kiểu đổ bóng: `mist`, `reflex`. |
110
+
111
+ ### CmModal Props
112
+
113
+ | Prop | Type | Default | Description |
114
+ | :--- | :--- | :--- | :--- |
115
+ | `v-model` | `boolean` | `false` | Trạng thái hiển thị (Bắt buộc). |
116
+ | `title` | `string` | `''` | Tiêu đề của Modal. |
117
+ | `width` | `string` | `'500px'` | Chiều rộng tối đa của Modal. |
118
+ | `distortion`| `string` | `'frosted'`| Kiểu biến dạng bề mặt kính. |
119
+ | `showClose` | `boolean` | `true` | Hiển thị nút đóng (X). |
120
+
121
+ ### CmToolbar Props
122
+
123
+ | Prop | Type | Default | Description |
124
+ | :--- | :--- | :--- | :--- |
125
+ | `position` | `string` | `'static'`| Vị trí: `top`, `bottom`, `static`. |
126
+ | `floating` | `boolean` | `false` | Hiển thị dạng trôi nổi (có margin). |
127
+ | `narrow` | `boolean` | `false` | Giảm kích thước padding dọc. |
128
+ | `distortion`| `string` | `'mist'` | Kiểu biến dạng bề mặt kính. |
129
+ | `shadow` | `string` | `'reflex'`| Hiệu ứng đổ bóng đặc thù. |
130
+
131
+ ---
132
+
133
+ ## 🔐 Bảo mật & Bản quyền
134
+
135
+ Đây là phiên bản **Pro**. Nếu không có License Key hợp lệ hoặc bản quyền hết hạn:
136
+
137
+ - Linh kiện sẽ chuyển sang trạng thái **Secure Lock** (Giao diện tối giản).
138
+ - Hiển thị thông báo lỗi trực tiếp từ hệ thống (Vd: **"LICENSE HAS EXPIRED"**).
139
+ - Các bộ lọc cao cấp sẽ bị vô hiệu hóa để bảo vệ tài sản trí tuệ.
140
+
141
+ Bạn có thể kiểm tra trạng thái bản quyền:
142
+
143
+ ```typescript
144
+ import { getLicenseStatus } from "glass-studio-ui-pro";
145
+
146
+ const status = getLicenseStatus();
147
+ if (!status.isValid) {
148
+ console.error("Lỗi bản quyền:", status.message);
149
+ }
150
+ ```
151
+
152
+ ---
153
+
154
+ ## 📄 Bản quyền
155
+
156
+ (C) 2026 Glass Studio & CM Team. Mọi quyền được bảo lưu.
@@ -1,5 +1,6 @@
1
1
  interface Props {
2
- variant?: 'default' | 'primary' | 'ghost';
2
+ variant?: 'default' | 'primary' | 'ghost' | 'solid';
3
+ type?: 'glass-frost' | 'light-frost' | 'heavy-frost' | 'grain-frost' | 'fine-frost' | 'soft-mist';
3
4
  active?: boolean;
4
5
  glow?: boolean;
5
6
  blur?: number;
@@ -21,11 +22,12 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
21
22
  }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
22
23
  onClick?: ((...args: any[]) => any) | undefined;
23
24
  }>, {
25
+ type: "glass-frost" | "light-frost" | "heavy-frost" | "grain-frost" | "fine-frost" | "soft-mist";
24
26
  blur: number;
25
27
  opacity: number;
26
28
  distortion: "none" | "wavy" | "frosted" | "grain" | "ripple" | "mist";
27
29
  shadow: boolean | string;
28
- variant: "default" | "primary" | "ghost";
30
+ variant: "default" | "primary" | "ghost" | "solid";
29
31
  active: boolean;
30
32
  glow: boolean;
31
33
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLButtonElement>;
@@ -1,4 +1,4 @@
1
- export type CardPreset = 'glass-frost' | 'light-frost' | 'heavy-frost' | 'grain-frost' | 'fine-frost' | 'soft-mist' | 'crystal' | 'deep-velvet' | 'frosted' | 'none' | 'glass';
1
+ export type CardPreset = 'glass-frost' | 'light-frost' | 'heavy-frost' | 'grain-frost' | 'fine-frost' | 'soft-mist';
2
2
  export type DistortionType = 'none' | 'wavy' | 'frosted' | 'grain' | 'ripple' | 'mist';
3
3
  interface Props {
4
4
  type?: CardPreset;
@@ -0,0 +1,45 @@
1
+ interface Props {
2
+ modelValue: boolean;
3
+ title?: string;
4
+ width?: string;
5
+ blur?: number;
6
+ opacity?: number;
7
+ distortion?: "none" | "wavy" | "frosted" | "grain" | "ripple" | "mist";
8
+ shadow?: boolean | string;
9
+ showClose?: boolean;
10
+ type?: "none" | "glass-frost" | "light-frost" | "heavy-frost" | "grain-frost" | "fine-frost" | "soft-mist" | "crystal";
11
+ }
12
+ declare function __VLS_template(): {
13
+ attrs: Partial<{}>;
14
+ slots: {
15
+ header?(_: {}): any;
16
+ default?(_: {}): any;
17
+ footer?(_: {}): any;
18
+ };
19
+ refs: {};
20
+ rootEl: any;
21
+ };
22
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
23
+ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
24
+ close: (...args: any[]) => void;
25
+ "update:modelValue": (...args: any[]) => void;
26
+ }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
27
+ onClose?: ((...args: any[]) => any) | undefined;
28
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
29
+ }>, {
30
+ type: "none" | "glass-frost" | "light-frost" | "heavy-frost" | "grain-frost" | "fine-frost" | "soft-mist" | "crystal";
31
+ blur: number;
32
+ opacity: number;
33
+ distortion: "none" | "wavy" | "frosted" | "grain" | "ripple" | "mist";
34
+ shadow: boolean | string;
35
+ title: string;
36
+ width: string;
37
+ showClose: boolean;
38
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
39
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
40
+ export default _default;
41
+ type __VLS_WithTemplateSlots<T, S> = T & {
42
+ new (): {
43
+ $slots: S;
44
+ };
45
+ };
@@ -0,0 +1,42 @@
1
+ interface Props {
2
+ position?: "top" | "bottom" | "static";
3
+ floating?: boolean;
4
+ width?: "full" | "fit" | "floating";
5
+ type?: "glass-frost" | "light-frost" | "heavy-frost" | "grain-frost" | "fine-frost" | "soft-mist";
6
+ blur?: number;
7
+ opacity?: number;
8
+ distortion?: "none" | "wavy" | "frosted" | "grain" | "ripple" | "mist";
9
+ shadow?: boolean | string;
10
+ height?: string;
11
+ narrow?: boolean;
12
+ }
13
+ declare function __VLS_template(): {
14
+ attrs: Partial<{}>;
15
+ slots: {
16
+ left?(_: {}): any;
17
+ default?(_: {}): any;
18
+ right?(_: {}): any;
19
+ };
20
+ refs: {};
21
+ rootEl: HTMLDivElement;
22
+ };
23
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
24
+ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
25
+ type: "glass-frost" | "light-frost" | "heavy-frost" | "grain-frost" | "fine-frost" | "soft-mist";
26
+ blur: number;
27
+ opacity: number;
28
+ distortion: "none" | "wavy" | "frosted" | "grain" | "ripple" | "mist";
29
+ shadow: boolean | string;
30
+ position: "top" | "bottom" | "static";
31
+ height: string;
32
+ width: "full" | "fit" | "floating";
33
+ floating: boolean;
34
+ narrow: boolean;
35
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
36
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
37
+ export default _default;
38
+ type __VLS_WithTemplateSlots<T, S> = T & {
39
+ new (): {
40
+ $slots: S;
41
+ };
42
+ };
package/dist/index.d.ts CHANGED
@@ -2,8 +2,10 @@ import { default as CmCard } from './components/CmCard.vue';
2
2
  import { default as CmButton } from './components/CmButton.vue';
3
3
  import { default as CmCheckbox } from './components/CmCheckbox.vue';
4
4
  import { default as CmFilters } from './components/CmFilters.vue';
5
+ import { default as CmModal } from './components/CmModal.vue';
6
+ import { default as CmToolbar } from './components/CmToolbar.vue';
5
7
  import { getLicenseStatus } from './core/license';
6
- export { CmCard, CmButton, CmCheckbox, CmFilters, getLicenseStatus };
8
+ export { CmCard, CmButton, CmCheckbox, CmFilters, CmModal, CmToolbar, getLicenseStatus };
7
9
  export interface GlassUIOptions {
8
10
  licenseKey?: string;
9
11
  }