@vitrumui/react 2.1.0 → 2.2.0
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/chunk-2ASVBPU4.js +2 -0
- package/dist/chunk-3IIHEP6U.js +2 -0
- package/dist/chunk-4NMYG4TZ.js +2 -0
- package/dist/chunk-5RKCH57V.js +2 -0
- package/dist/chunk-5WUTOVNB.js +2 -0
- package/dist/chunk-CUPBYLM4.js +2 -0
- package/dist/chunk-EAZ62QSO.js +2 -0
- package/dist/chunk-EVRORS2V.js +2 -0
- package/dist/chunk-JQBQXLGN.js +2 -0
- package/dist/chunk-LMO3IKGQ.js +2 -0
- package/dist/chunk-LZNPHZ4X.js +2 -0
- package/dist/chunk-NKRH4Q2H.js +2 -0
- package/dist/chunk-TUMBPPSO.js +2 -0
- package/dist/chunk-VVSLSFDY.js +2 -0
- package/dist/chunk-XVVYMZ5F.js +2 -0
- package/dist/chunk-ZW3IR2KQ.js +2 -0
- package/dist/controls/Checkbox.d.ts +16 -3
- package/dist/controls/Checkbox.js +1 -1
- package/dist/controls/RangeSlider.d.ts +10 -2
- package/dist/controls/RangeSlider.js +1 -1
- package/dist/controls/Switch.d.ts +11 -2
- package/dist/controls/Switch.js +1 -1
- package/dist/controls/glass/runtime.d.ts +88 -0
- package/dist/controls/shared.d.ts +25 -1
- package/dist/glass-action-button.js +1 -1
- package/dist/glass-badge.d.ts +4 -2
- package/dist/glass-badge.js +1 -1
- package/dist/glass-button-group.js +1 -1
- package/dist/glass-button.d.ts +2 -2
- package/dist/glass-button.js +1 -1
- package/dist/glass-card.js +1 -1
- package/dist/glass-dropdown-menu.js +1 -1
- package/dist/glass-droplet-row.d.ts +3 -0
- package/dist/glass-layer.d.ts +45 -3
- package/dist/glass-menu.js +1 -1
- package/dist/glass-popover.js +1 -1
- package/dist/glass-popup.d.ts +15 -1
- package/dist/glass-search.d.ts +11 -1
- package/dist/glass-search.js +1 -1
- package/dist/glass-select.js +1 -1
- package/dist/glass-slide-to-confirm.d.ts +20 -5
- package/dist/glass-slide-to-confirm.js +1 -1
- package/dist/glass-surface.d.ts +9 -1
- package/dist/glass-surface.js +1 -1
- package/dist/glass-tabs.d.ts +4 -3
- package/dist/glass-tabs.js +1 -1
- package/dist/index.js +1 -1
- package/dist/runtime-OC3NF25O.js +2 -0
- package/dist/styles.css +1 -1
- package/dist/theme.d.ts +10 -2
- package/dist/theme.js +1 -1
- package/package.json +9 -7
- package/dist/chunk-64FU3V6M.js +0 -2
- package/dist/chunk-6WKVAPHT.js +0 -2
- package/dist/chunk-E47S3IAV.js +0 -2
- package/dist/chunk-E5F7TQ7I.js +0 -2
- package/dist/chunk-G4DHIVZ3.js +0 -2
- package/dist/chunk-IY3Z3YRE.js +0 -2
- package/dist/chunk-JX2YNK3K.js +0 -2
- package/dist/chunk-LEGYEZLT.js +0 -2
- package/dist/chunk-MPLXH7C7.js +0 -2
- package/dist/chunk-NFXA7OZV.js +0 -2
- package/dist/chunk-QRP4FKTZ.js +0 -2
- package/dist/chunk-RNQ7YPHJ.js +0 -2
- package/dist/chunk-YOR2LMKG.js +0 -2
- package/dist/chunk-YZKUQ6ID.js +0 -2
- package/dist/chunk-ZCV4ENGP.js +0 -2
- package/dist/runtime-WIL6WCEJ.js +0 -2
|
@@ -1,7 +1,14 @@
|
|
|
1
|
+
import { type ComponentProps } from "react";
|
|
1
2
|
import { type Theme } from "./shared.js";
|
|
2
|
-
export type SwitchProps = {
|
|
3
|
+
export type SwitchProps = Omit<ComponentProps<"button">, "onChange" | "children" | "value" | "defaultValue" | "defaultChecked" | "type" | "role" | "color"> & {
|
|
4
|
+
/** On or off, controlled: the switch shows this and reports changes through `onCheckedChange`. */
|
|
3
5
|
checked?: boolean;
|
|
6
|
+
/** Where an uncontrolled switch starts (default `false`). */
|
|
7
|
+
defaultChecked?: boolean;
|
|
8
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
9
|
+
/** @deprecated Use `onCheckedChange`; `onChange` stays as an alias until 3.0. */
|
|
4
10
|
onChange?: (checked: boolean) => void;
|
|
11
|
+
/** The visible label. Without one, give the switch an `aria-label` or `aria-labelledby`. */
|
|
5
12
|
label?: string;
|
|
6
13
|
description?: string;
|
|
7
14
|
theme?: Theme;
|
|
@@ -14,6 +21,8 @@ export type SwitchProps = {
|
|
|
14
21
|
lensScale?: number;
|
|
15
22
|
refraction?: number;
|
|
16
23
|
knobBounce?: number;
|
|
24
|
+
/** On the outermost element. `ref` and the other props go to the switch itself (the button). */
|
|
25
|
+
className?: string;
|
|
17
26
|
};
|
|
18
|
-
export declare function Switch({ checked, onChange, label, description, theme, color, size, labelSide, disabled, lensScale, refraction, knobBounce, }: SwitchProps): import("react").JSX.Element;
|
|
27
|
+
export declare function Switch({ checked, defaultChecked, onCheckedChange, onChange, label, description, theme, color, size, labelSide, disabled, lensScale, refraction, knobBounce, className, id: idProp, ...rest }: SwitchProps): import("react").JSX.Element;
|
|
19
28
|
export default Switch;
|
package/dist/controls/Switch.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
/*! Vitrum © 2026 Onuzulike Anthony Ifechukwu. All rights reserved. Includes Liquid Glass UI © 2026 Bilal Abdullah Gürşen (MIT), see THIRD_PARTY_NOTICES.md */
|
|
3
|
-
|
|
3
|
+
function _0x120d(){const _0x2895fb=['switch','current','pointer-events-none\x20absolute','checked','pos','inline-flex\x20items-center\x20gap-3\x20','569035YEwYbj','144BmPXIJ','accent','aria-label','#ffffff','8Wamqih','button','top','onClick','104820NXLywv','#e9ebef','onCheckedChange','dragPos','1073592aLdUlN','aria-labelledby','9429417lcFuLK','omega','startPos','64687qPzTQa','pressed','relative\x20shrink-0\x20cursor-pointer\x20touch-none\x20rounded-full\x20disabled:cursor-not-allowed\x20disabled:opacity-40\x20','relative\x20flex\x20cursor-pointer\x20flex-col\x20select-none','onPointerCancel','Switch','span','pointerId','div','concat','zeta','currentTarget','349432qLeKAY','635718rdEktO','moved','bottom','press'];_0x120d=function(){return _0x2895fb;};return _0x120d();}(function(_0x3788cf,_0x4ff1bb){const _0xdd9597=_0x2ff2,_0x42e050=_0x3788cf();while(!![]){try{const _0x341bdd=parseInt(_0xdd9597(0x10a))/0x1+parseInt(_0xdd9597(0x10b))/0x2+parseInt(_0xdd9597(0x122))/0x3+-parseInt(_0xdd9597(0x11e))/0x4+parseInt(_0xdd9597(0x115))/0x5+parseInt(_0xdd9597(0x116))/0x6*(parseInt(_0xdd9597(0x127))/0x7)+parseInt(_0xdd9597(0x11a))/0x8*(-parseInt(_0xdd9597(0x124))/0x9);if(_0x341bdd===_0x4ff1bb)break;else _0x42e050['push'](_0x42e050['shift']());}catch(_0x7e695){_0x42e050['push'](_0x42e050['shift']());}}}(_0x120d,0x4606c));import{l,b,f,c as _0x141e1d,g,h,d,e,i}from'../chunk-NKRH4Q2H.js';import{a as _0x339a3f,c,d as _0x397f59,b as _0xe8f72f}from'../chunk-TUMBPPSO.js';import{useId,useRef}from'react';import{jsxs,jsx}from'react/jsx-runtime';var s={'w':0x89,'h':0x3c},a={'w':0x51,'h':0x33},S=(s['h']-a['h'])/0x2,o={'x':0x3c,'top':0x32,'bottom':0x82},ie={'sm':0x16,'md':0x1c,'lg':0x24};function de({checked:_0x5cf9d5,defaultChecked:_0x44395e=![],onCheckedChange:_0x512efb,onChange:_0x30aea4,label:_0x30fe49,description:_0x50f401,theme:_0x422502,color:_0x5382d8,size:_0x35c51f='md',labelSide:_0x4c2fee='right',disabled:_0x57fab9=![],lensScale:_0x582579=1.55,refraction:_0x5b627f=0x1a,knobBounce:_0x23b064=0.3,className:_0x44c0a8='',id:_0x2d68b6,..._0x2a0af2}){const _0x1c7fc2=_0x2ff2;let _0x596964=useId(),_0x12a342=_0x2d68b6??_0x596964,[_0x355128,_0x580220]=_0x339a3f(_0x5cf9d5,_0x44395e,_0x2cc22e=>{_0x512efb?.(_0x2cc22e),_0x30aea4?.(_0x2cc22e);},{'hasHandler':!!(_0x512efb||_0x30aea4),'component':'Switch','prop':_0x1c7fc2(0x112),'defaultProp':'defaultChecked','handler':_0x1c7fc2(0x120)});c(_0x1c7fc2(0x103),_0x30fe49||_0x2a0af2[_0x1c7fc2(0x118)]||_0x2a0af2[_0x1c7fc2(0x123)]);let _0xd2e1ad=ie[_0x35c51f]/s['h'],_0x4d19b2=s['w']*_0xd2e1ad,_0x5ce05c=s['h']*_0xd2e1ad,_0x54fc04=s['w']-a['w']-S*0x2,_0x27e384=useRef({'pos':{'x':_0x355128?0x1:0x0,'v':0x0},'press':{'x':0x0,'v':0x0},'pressed':![],'dragPos':null}),_0x58f358=useRef(null),_0x411966=useRef(![]),{canvasRef:_0x3129d1,ready:_0x1269b7}=l({'width':(s['w']+o['x']*0x2)*_0xd2e1ad,'height':(s['h']+o[_0x1c7fc2(0x11c)]+o[_0x1c7fc2(0x10d)])*_0xd2e1ad,'unit':_0xd2e1ad,'cursorLight':!![],'step'(_0x3fd427,_0x5efd89){const _0x52cde4=_0x1c7fc2;let _0x1b7701=_0x27e384['current'],_0x4fc1fc=_0x1b7701['dragPos']??(_0x355128?0x1:0x0);if(_0x5efd89)return _0x1b7701['pos']={'x':_0x4fc1fc,'v':0x0},_0x1b7701[_0x52cde4(0x10e)]={'x':_0x1b7701[_0x52cde4(0x128)]?0x1:0x0,'v':0x0},![];let _0x44da92=_0x1b7701['dragPos']===null&&Math['abs'](_0x1b7701['pos']['x']-_0x4fc1fc)>0.08,_0xb1854f=_0x1b7701['dragPos']!==null?d(_0x1b7701['pos'],_0x4fc1fc,0x28,0x1,_0x3fd427):d(_0x1b7701[_0x52cde4(0x113)],_0x4fc1fc,0xf,0x1-_0x23b064,_0x3fd427),_0x310c41=d(_0x1b7701['press'],_0x1b7701['pressed']||_0x44da92?0x1:0x0,e[_0x52cde4(0x125)],e[_0x52cde4(0x108)],_0x3fd427);return _0xb1854f||_0x310c41;},'draw'(_0x6b4951,_0x14546c,_0x97593f){const _0xe89a7d=_0x1c7fc2;let _0x45f31c=_0x27e384['current'];b(_0x6b4951,{'x':o['x']*_0xd2e1ad,'y':(o[_0xe89a7d(0x11c)]+s['h']/0x2)*_0xd2e1ad,'length':_0x4d19b2,'height':_0x5ce05c,'fillEnd':(o['x']+s['w'])*_0xd2e1ad,'track':_0x97593f['track'],'accent':_0x5382d8??_0x97593f[_0xe89a7d(0x117)],'fillOpacity':f(_0x45f31c['pos']['x'])});let _0x38ec6b=a['h']*_0x582579/0x78,_0xbd43f8={..._0x141e1d(g,_0x38ec6b),'refraction':_0x5b627f,'cornerRadius':0x3e7};return{...h(_0x45f31c['press']['x'],a,{'w':a['w']*_0x582579,'h':a['h']*_0x582579},0x1,_0xbd43f8),'x':o['x']+S+a['w']/0x2+_0x45f31c[_0xe89a7d(0x113)]['x']*_0x54fc04,'y':o['top']+s['h']/0x2,'stretchX':0x1,'stretchY':0x1,'shiftX':0x0,'frostCenter':_0xe89a7d(0x119),'frostEdge':_0xe89a7d(0x11f)};}}),_0x31fe8d=_0x2881d9=>_0x2881d9['clientX']-_0x2881d9['currentTarget']['getBoundingClientRect']()['left'],_0x4d841b=_0x4c2c20=>{const _0x22f587=_0x1c7fc2;_0x57fab9||_0x4c2c20[_0x22f587(0x11b)]!==0x0||(_0x4c2c20[_0x22f587(0x109)]['setPointerCapture'](_0x4c2c20[_0x22f587(0x105)]),_0x27e384[_0x22f587(0x110)][_0x22f587(0x128)]=!![],_0x58f358['current']={'startX':_0x31fe8d(_0x4c2c20),'startPos':_0x355128?0x1:0x0,'moved':![]});},_0x5710f5=_0x216a2d=>{const _0x403e24=_0x1c7fc2;let _0x1c8438=_0x58f358[_0x403e24(0x110)];if(!_0x1c8438)return;let _0x4e4a45=_0x31fe8d(_0x216a2d)-_0x1c8438['startX'];!_0x1c8438[_0x403e24(0x10c)]&&Math['abs'](_0x4e4a45)<0x3||(_0x1c8438[_0x403e24(0x10c)]=!![],_0x27e384[_0x403e24(0x110)][_0x403e24(0x121)]=f(_0x1c8438[_0x403e24(0x126)]+_0x4e4a45/(_0x54fc04*_0xd2e1ad)));},_0x47034e=()=>{const _0x2b1746=_0x1c7fc2;let _0x517c44=_0x58f358['current'];_0x58f358[_0x2b1746(0x110)]=null;let _0x7e46b2=_0x27e384[_0x2b1746(0x110)];if(_0x7e46b2[_0x2b1746(0x128)]=![],!_0x517c44)return;let _0x35089e=_0x517c44[_0x2b1746(0x10c)]?(_0x7e46b2[_0x2b1746(0x121)]??0x0)>0.5:!_0x355128;_0x7e46b2['dragPos']=null,_0x411966['current']=!![],_0x580220(_0x35089e);},_0x292ebb=jsxs(_0x1c7fc2(0x11b),{..._0x2a0af2,'id':_0x12a342,'type':_0x1c7fc2(0x11b),'role':_0x1c7fc2(0x10f),'aria-checked':_0x355128,'disabled':_0x57fab9,'onClick':_0xe8f72f(()=>{_0x411966['current']?_0x411966['current']=![]:_0x580220(!_0x355128);},_0x2a0af2[_0x1c7fc2(0x11d)]),'onPointerDown':_0xe8f72f(_0x4d841b,_0x2a0af2['onPointerDown']),'onPointerMove':_0xe8f72f(_0x5710f5,_0x2a0af2['onPointerMove']),'onPointerUp':_0xe8f72f(_0x47034e,_0x2a0af2['onPointerUp']),'onPointerCancel':_0xe8f72f(_0x47034e,_0x2a0af2[_0x1c7fc2(0x102)]),'className':_0x1c7fc2(0x129)['concat'](_0x397f59),'style':{'width':_0x4d19b2,'height':_0x5ce05c},'children':[!_0x1269b7&&jsx(i,{'on':_0x355128,'color':_0x5382d8,'width':_0x4d19b2,'height':_0x5ce05c,'knob':{'w':a['w']*_0xd2e1ad,'h':a['h']*_0xd2e1ad},'pad':S*_0xd2e1ad}),jsx('canvas',{'ref':_0x3129d1,'data-vt-ready':_0x1269b7?'':void 0x0,'aria-hidden':'true','className':_0x1c7fc2(0x111),'style':{'left':-0x3c*_0xd2e1ad,'top':-0x32*_0xd2e1ad,'width':(s['w']+o['x']*0x2)*_0xd2e1ad,'height':(s['h']+o[_0x1c7fc2(0x11c)]+o['bottom'])*_0xd2e1ad}})]});return _0x30fe49?jsxs(_0x1c7fc2(0x106),{'data-theme':_0x422502,'className':_0x1c7fc2(0x114)[_0x1c7fc2(0x107)](_0x4c2fee==='left'?'flex-row-reverse':'','\x20')['concat'](_0x44c0a8),'children':[_0x292ebb,jsxs('label',{'htmlFor':_0x12a342,'className':_0x1c7fc2(0x101),'children':[jsx('span',{'className':'text-[13px]\x20font-medium\x20text-neutral-900\x20dark:text-white','children':_0x30fe49}),_0x50f401&&jsx('span',{'className':'text-[12px]\x20text-neutral-500','children':_0x50f401})]})]}):jsx(_0x1c7fc2(0x104),{'data-theme':_0x422502,'className':'inline-flex\x20'['concat'](_0x44c0a8),'children':_0x292ebb});}function _0x2ff2(_0x15d2b0,_0x2d4f79){_0x15d2b0=_0x15d2b0-0x101;const _0x120de4=_0x120d();let _0x2ff2cc=_0x120de4[_0x15d2b0];return _0x2ff2cc;}var we=de;export{de as Switch,we as default};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type Spring } from "@vitrumui/core/internal";
|
|
1
2
|
import type { LensState } from "./physics.js";
|
|
2
3
|
import { type GlassThemeName, type GlassTokens } from "./tokens.js";
|
|
3
4
|
export type GlassViewSpec = {
|
|
@@ -26,8 +27,95 @@ export type GlassViewHandle = {
|
|
|
26
27
|
invalidate: () => void;
|
|
27
28
|
dispose: () => void;
|
|
28
29
|
stats: () => GlassViewStats;
|
|
30
|
+
/**
|
|
31
|
+
* Called with `true` once a frame of glass is on the canvas, and with `false` when the GPU
|
|
32
|
+
* context is lost (the control shows its CSS look until the glass is back). Called at once
|
|
33
|
+
* with where it stands now.
|
|
34
|
+
*/
|
|
35
|
+
watch: (fn: (drawn: boolean) => void) => void;
|
|
36
|
+
};
|
|
37
|
+
type View = {
|
|
38
|
+
canvas: HTMLCanvasElement;
|
|
39
|
+
ctx: CanvasRenderingContext2D;
|
|
40
|
+
spec: () => GlassViewSpec;
|
|
41
|
+
bgCanvas: HTMLCanvasElement;
|
|
42
|
+
fgCanvas: HTMLCanvasElement;
|
|
43
|
+
bgTex: any;
|
|
44
|
+
fgTex: any;
|
|
45
|
+
/** This view's uniform values. Copied into the shared material's uniforms before it draws. */
|
|
46
|
+
u: ReturnType<typeof createUniforms>;
|
|
47
|
+
devW: number;
|
|
48
|
+
devH: number;
|
|
49
|
+
dpr: number;
|
|
50
|
+
dirty: boolean;
|
|
51
|
+
visible: boolean;
|
|
52
|
+
ready: boolean;
|
|
53
|
+
/** Renders left to confirm the first frame really reached the canvas. */
|
|
54
|
+
verifyLeft: number;
|
|
55
|
+
surface: string;
|
|
56
|
+
/** Last lens centre in design units, for aiming the cursor light. */
|
|
57
|
+
lensX: number;
|
|
58
|
+
lensY: number;
|
|
59
|
+
/** Where the cursor light last pointed, in half degrees (9999 = nowhere yet). */
|
|
60
|
+
aim: number;
|
|
61
|
+
/** Last lens half size in design units, as drawn (0 while it is hidden). */
|
|
62
|
+
lensHx: number;
|
|
63
|
+
lensHy: number;
|
|
64
|
+
/** Pointer light (LIGHT in engine.ts): how bright, where from the lens centre (CSS px), and why. */
|
|
65
|
+
light: {
|
|
66
|
+
glow: Spring;
|
|
67
|
+
x: number;
|
|
68
|
+
y: number;
|
|
69
|
+
press: boolean;
|
|
70
|
+
key: boolean;
|
|
71
|
+
};
|
|
72
|
+
renders: number;
|
|
73
|
+
renderMs: number;
|
|
74
|
+
/** A frame of glass is on the canvas now (false again while the context is lost). */
|
|
75
|
+
shown: boolean;
|
|
76
|
+
/** Told when `shown` changes (GlassViewHandle.watch). */
|
|
77
|
+
drawn?: (shown: boolean) => void;
|
|
78
|
+
};
|
|
79
|
+
declare function createUniforms(): {
|
|
80
|
+
size: any;
|
|
81
|
+
unit: any;
|
|
82
|
+
devicePx: any;
|
|
83
|
+
blurShift: any;
|
|
84
|
+
center: any;
|
|
85
|
+
half: any;
|
|
86
|
+
radius: any;
|
|
87
|
+
bevel: any;
|
|
88
|
+
refract: any;
|
|
89
|
+
mag: any;
|
|
90
|
+
disp: any;
|
|
91
|
+
blurC: any;
|
|
92
|
+
blurE: any;
|
|
93
|
+
frost: any;
|
|
94
|
+
rim: any;
|
|
95
|
+
caustic: any;
|
|
96
|
+
inner: any;
|
|
97
|
+
topRefl: any;
|
|
98
|
+
shOp: any;
|
|
99
|
+
shSoft: any;
|
|
100
|
+
shOff: any;
|
|
101
|
+
stretch: any;
|
|
102
|
+
shift: any;
|
|
103
|
+
frostCenter: any;
|
|
104
|
+
frostEdge: any;
|
|
105
|
+
surface: any;
|
|
106
|
+
lensOn: any;
|
|
107
|
+
lightDir: any;
|
|
108
|
+
lightMix: any;
|
|
109
|
+
light: any;
|
|
110
|
+
fgHide: any;
|
|
29
111
|
};
|
|
30
112
|
/** Lazily creates the shared renderer (client only). */
|
|
31
113
|
export declare function getGlassRuntime(): Promise<{
|
|
114
|
+
wake: () => void;
|
|
115
|
+
adopt: (view: View, fresh?: boolean) => Promise<void>;
|
|
116
|
+
drop(view: View): void;
|
|
117
|
+
/** Takes this runtime apart, leaving the context to the next one, and hands back its views. */
|
|
118
|
+
dispose(): View[];
|
|
32
119
|
createView(canvas: HTMLCanvasElement, spec: () => GlassViewSpec): Promise<GlassViewHandle>;
|
|
33
120
|
}>;
|
|
121
|
+
export {};
|
|
@@ -1,6 +1,30 @@
|
|
|
1
1
|
/** Per-component theme override; omit it to follow the page (data-theme="dark" or class="dark"). */
|
|
2
2
|
export type Theme = "light" | "dark";
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* The standard controlled/uncontrolled pattern (A4-03): pass `value` with a change handler and
|
|
5
|
+
* the component shows it and only reports changes (a parent that rejects one keeps the control
|
|
6
|
+
* where it was); leave it out and the component keeps its own state, starting at `defaultValue`.
|
|
7
|
+
*
|
|
8
|
+
* `value` WITHOUT a handler keeps the 2.1 behaviour: it is only where the control starts (and
|
|
9
|
+
* where it goes when the prop changes), and the control still moves on its own. Development
|
|
10
|
+
* builds warn once per component type. This fallback is removed in 3.0 (docs/sdlc/REMOVALS-3.0.md).
|
|
11
|
+
*/
|
|
12
|
+
export declare function useControllableState<T>(value: T | undefined, defaultValue: T, onChange: ((value: T) => void) | undefined, fallback: {
|
|
13
|
+
hasHandler: boolean;
|
|
14
|
+
component: string;
|
|
15
|
+
prop: string;
|
|
16
|
+
defaultProp: string;
|
|
17
|
+
handler: string;
|
|
18
|
+
}): readonly [T, (next: T) => void];
|
|
19
|
+
/** Test helper: forget which components have warned about a value without a handler. */
|
|
20
|
+
export declare function __resetFallbackWarnings(): void;
|
|
21
|
+
/** Calls both handlers: the component's own first, then the one passed in. */
|
|
22
|
+
export declare function chain<E>(own: (e: E) => void, theirs: ((e: E) => void) | undefined): (e: E) => void;
|
|
23
|
+
/**
|
|
24
|
+
* Warns once, in development only, when a control has no accessible name: no `label`, no
|
|
25
|
+
* `aria-label` and no `aria-labelledby` (A4-02). There are no default labels any more.
|
|
26
|
+
*/
|
|
27
|
+
export declare function useNameWarning(component: string, named: boolean | string | undefined): void;
|
|
4
28
|
export declare const focusRing = "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[#3291FF]";
|
|
5
29
|
export declare function useElementSize<T extends HTMLElement>(): readonly [import("react").RefObject<T | null>, {
|
|
6
30
|
width: number;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
/*! Vitrum © 2026 Onuzulike Anthony Ifechukwu. All rights reserved. Includes Liquid Glass UI © 2026 Bilal Abdullah Gürşen (MIT), see THIRD_PARTY_NOTICES.md */
|
|
3
|
-
|
|
3
|
+
(function(_0xcabca5,_0x5805f3){var _0x52da71=_0x33dc,_0x5850a4=_0xcabca5();while(!![]){try{var _0x43d279=-parseInt(_0x52da71(0xbb))/0x1*(parseInt(_0x52da71(0xb5))/0x2)+parseInt(_0x52da71(0xb4))/0x3+parseInt(_0x52da71(0xb9))/0x4+parseInt(_0x52da71(0xb3))/0x5+parseInt(_0x52da71(0xb8))/0x6+-parseInt(_0x52da71(0xb7))/0x7*(-parseInt(_0x52da71(0xb2))/0x8)+-parseInt(_0x52da71(0xba))/0x9*(parseInt(_0x52da71(0xb6))/0xa);if(_0x43d279===_0x5805f3)break;else _0x5850a4['push'](_0x5850a4['shift']());}catch(_0x52680c){_0x5850a4['push'](_0x5850a4['shift']());}}}(_0x5203,0x3f136));function _0x33dc(_0x3ae311,_0x5c7cd5){_0x3ae311=_0x3ae311-0xb2;var _0x520315=_0x5203();var _0x33dca6=_0x520315[_0x3ae311];return _0x33dca6;}function _0x5203(){var _0x59d6a9=['216IjHWaL','1529224JAahXj','1394490rEuRDi','1030341GElUGH','726lWMNtt','239810NzNztO','7eWGvnU','2732442YBQBvF','12480PAKxBo','351BKaLKB'];_0x5203=function(){return _0x59d6a9;};return _0x5203();}export{a as GlassActionButton,b as default}from'./chunk-EAZ62QSO.js';import'./chunk-ZW3IR2KQ.js';import'./chunk-EVRORS2V.js';
|
package/dist/glass-badge.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { type ComponentProps } from "react";
|
|
2
|
+
export type GlassBadgeProps = Omit<ComponentProps<"span">, "children"> & {
|
|
2
3
|
children: string;
|
|
3
4
|
/** Separator colour (CSS). Default: the text colour. */
|
|
4
5
|
dotColor?: string;
|
|
@@ -6,7 +7,8 @@ export type GlassBadgeProps = {
|
|
|
6
7
|
speed?: number;
|
|
7
8
|
/** Opacity of the tint over the backdrop (0–1). */
|
|
8
9
|
tint?: number;
|
|
10
|
+
/** On the badge, like `ref` and the other props. */
|
|
9
11
|
className?: string;
|
|
10
12
|
};
|
|
11
|
-
export declare function GlassBadge({ children, dotColor, speed, tint, className, }: GlassBadgeProps): import("react").JSX.Element;
|
|
13
|
+
export declare function GlassBadge({ children, dotColor, speed, tint, className, ...rest }: GlassBadgeProps): import("react").JSX.Element;
|
|
12
14
|
export default GlassBadge;
|
package/dist/glass-badge.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
/*! Vitrum © 2026 Onuzulike Anthony Ifechukwu. All rights reserved. Includes Liquid Glass UI © 2026 Bilal Abdullah Gürşen (MIT), see THIRD_PARTY_NOTICES.md */
|
|
3
|
-
function
|
|
3
|
+
function _0x1a2c(_0x3eb4ea,_0x55d644){_0x3eb4ea=_0x3eb4ea-0x18a;var _0x200844=_0x2008();var _0x1a2ce6=_0x200844[_0x3eb4ea];return _0x1a2ce6;}(function(_0x2c1b94,_0x36866e){var _0x385c54=_0x1a2c,_0x1e6f71=_0x2c1b94();while(!![]){try{var _0x2000e9=parseInt(_0x385c54(0x18d))/0x1+-parseInt(_0x385c54(0x191))/0x2+-parseInt(_0x385c54(0x18f))/0x3+-parseInt(_0x385c54(0x18a))/0x4*(-parseInt(_0x385c54(0x192))/0x5)+parseInt(_0x385c54(0x18b))/0x6*(-parseInt(_0x385c54(0x18e))/0x7)+parseInt(_0x385c54(0x18c))/0x8+parseInt(_0x385c54(0x190))/0x9;if(_0x2000e9===_0x36866e)break;else _0x1e6f71['push'](_0x1e6f71['shift']());}catch(_0x3029ab){_0x1e6f71['push'](_0x1e6f71['shift']());}}}(_0x2008,0xdc44a));export{a as GlassBadge,b as default}from'./chunk-XVVYMZ5F.js';function _0x2008(){var _0x57e050=['8031762rBMNHa','376712DvXCkC','1494637vAFPKI','7dXMWlg','2167707BGEANJ','17473797gEnlII','1654536QTyQKd','5jTWNnk','1229692CTJxuN'];_0x2008=function(){return _0x57e050;};return _0x2008();}import'./chunk-ZW3IR2KQ.js';import'./chunk-EVRORS2V.js';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
/*! Vitrum © 2026 Onuzulike Anthony Ifechukwu. All rights reserved. Includes Liquid Glass UI © 2026 Bilal Abdullah Gürşen (MIT), see THIRD_PARTY_NOTICES.md */
|
|
3
|
-
function
|
|
3
|
+
function _0x7570(_0x159fc8,_0x95e81b){_0x159fc8=_0x159fc8-0x1a0;var _0x149111=_0x1491();var _0x757060=_0x149111[_0x159fc8];return _0x757060;}function _0x1491(){var _0x3ea02f=['457945VgPhhS','132chLjxJ','524wwfyTf','2792816YFWtMc','295561PkRoZt','3332318cuLUSl','4215ctvtVp','10801350fDyZwq','4207518eQzMly'];_0x1491=function(){return _0x3ea02f;};return _0x1491();}(function(_0x25ed0b,_0x15ec65){var _0x50fc62=_0x7570,_0x1b2169=_0x25ed0b();while(!![]){try{var _0x19bbc3=parseInt(_0x50fc62(0x1a0))/0x1+parseInt(_0x50fc62(0x1a5))/0x2+-parseInt(_0x50fc62(0x1a8))/0x3+parseInt(_0x50fc62(0x1a2))/0x4*(parseInt(_0x50fc62(0x1a6))/0x5)+-parseInt(_0x50fc62(0x1a1))/0x6*(-parseInt(_0x50fc62(0x1a4))/0x7)+parseInt(_0x50fc62(0x1a3))/0x8+-parseInt(_0x50fc62(0x1a7))/0x9;if(_0x19bbc3===_0x15ec65)break;else _0x1b2169['push'](_0x1b2169['shift']());}catch(_0x33e775){_0x1b2169['push'](_0x1b2169['shift']());}}}(_0x1491,0xde241));export{a as GlassButtonGroup,b as GlassButtonGroupItem,c as GlassButtonGroupSeparator,d as GlassButtonGroupText,e as default}from'./chunk-3IIHEP6U.js';import'./chunk-LZNPHZ4X.js';import'./chunk-ZW3IR2KQ.js';import'./chunk-EVRORS2V.js';
|
package/dist/glass-button.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ComponentProps, type ReactNode } from "react";
|
|
2
2
|
import { type GlassMaterial } from "./glass-layer.js";
|
|
3
3
|
export type GlassButtonSize = "sm" | "md" | "lg" | "xl";
|
|
4
4
|
export type GlassButtonProps = {
|
|
@@ -16,6 +16,6 @@ export type GlassButtonProps = {
|
|
|
16
16
|
/** Render the glass on the single child element (e.g. a router `<Link>`) instead of a `<button>`. */
|
|
17
17
|
asChild?: boolean;
|
|
18
18
|
className?: string;
|
|
19
|
-
} & Omit<
|
|
19
|
+
} & Omit<ComponentProps<"button">, "children" | "className">;
|
|
20
20
|
export declare function GlassButton({ children, material, size, icon, iconPosition, tint, pull, asChild, className, type, ...rest }: GlassButtonProps): import("react").JSX.Element;
|
|
21
21
|
export default GlassButton;
|
package/dist/glass-button.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
/*! Vitrum © 2026 Onuzulike Anthony Ifechukwu. All rights reserved. Includes Liquid Glass UI © 2026 Bilal Abdullah Gürşen (MIT), see THIRD_PARTY_NOTICES.md */
|
|
3
|
-
(function(
|
|
3
|
+
function _0x152b(){var _0x2253c0=['16723652ZbbhiB','30EwoHck','2knERiZ','2572443wESOxh','2411121EHKFKl','5iHnSuu','123634xzksTB','2010640ibKuLg','276NyAINY','3410756CArMdm','47346YOpiTe'];_0x152b=function(){return _0x2253c0;};return _0x152b();}(function(_0x469a7e,_0x210153){var _0xd5dc29=_0x2a12,_0x1f6e2e=_0x469a7e();while(!![]){try{var _0x15c5c7=parseInt(_0xd5dc29(0x1b7))/0x1+-parseInt(_0xd5dc29(0x1af))/0x2*(parseInt(_0xd5dc29(0x1b1))/0x3)+-parseInt(_0xd5dc29(0x1b6))/0x4*(-parseInt(_0xd5dc29(0x1b2))/0x5)+-parseInt(_0xd5dc29(0x1b5))/0x6*(-parseInt(_0xd5dc29(0x1b3))/0x7)+parseInt(_0xd5dc29(0x1b4))/0x8+-parseInt(_0xd5dc29(0x1b0))/0x9*(-parseInt(_0xd5dc29(0x1ae))/0xa)+-parseInt(_0xd5dc29(0x1ad))/0xb;if(_0x15c5c7===_0x210153)break;else _0x1f6e2e['push'](_0x1f6e2e['shift']());}catch(_0x4ba9b5){_0x1f6e2e['push'](_0x1f6e2e['shift']());}}}(_0x152b,0x7966b));export{a as GlassButton,b as default}from'./chunk-JQBQXLGN.js';function _0x2a12(_0x1530d6,_0x234d69){_0x1530d6=_0x1530d6-0x1ad;var _0x152b59=_0x152b();var _0x2a12e9=_0x152b59[_0x1530d6];return _0x2a12e9;}import'./chunk-ZW3IR2KQ.js';import'./chunk-EVRORS2V.js';
|
package/dist/glass-card.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
/*! Vitrum © 2026 Onuzulike Anthony Ifechukwu. All rights reserved. Includes Liquid Glass UI © 2026 Bilal Abdullah Gürşen (MIT), see THIRD_PARTY_NOTICES.md */
|
|
3
|
-
(function(
|
|
3
|
+
function _0x53da(_0x43d359,_0x1fb6b0){_0x43d359=_0x43d359-0x1e8;var _0x1d45a7=_0x1d45();var _0x53dadb=_0x1d45a7[_0x43d359];return _0x53dadb;}(function(_0x1faca8,_0x2ab1c8){var _0x5ab728=_0x53da,_0x304184=_0x1faca8();while(!![]){try{var _0x33c437=-parseInt(_0x5ab728(0x1e8))/0x1+-parseInt(_0x5ab728(0x1ed))/0x2+parseInt(_0x5ab728(0x1ec))/0x3+-parseInt(_0x5ab728(0x1ee))/0x4+parseInt(_0x5ab728(0x1ea))/0x5*(-parseInt(_0x5ab728(0x1ef))/0x6)+parseInt(_0x5ab728(0x1e9))/0x7*(parseInt(_0x5ab728(0x1f0))/0x8)+parseInt(_0x5ab728(0x1eb))/0x9;if(_0x33c437===_0x2ab1c8)break;else _0x304184['push'](_0x304184['shift']());}catch(_0x8f0fcb){_0x304184['push'](_0x304184['shift']());}}}(_0x1d45,0x1b19c));export{a as GlassCard,b as default}from'./chunk-VVSLSFDY.js';function _0x1d45(){var _0xb84840=['101348KUDVow','737132eCYibI','745782iuOpNu','8mqtRwg','108698sIqJAA','1360198XkzYVQ','5LwHTSL','2396358XKImGm','355140UZKfgL'];_0x1d45=function(){return _0xb84840;};return _0x1d45();}import'./chunk-ZW3IR2KQ.js';import'./chunk-EVRORS2V.js';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
/*! Vitrum © 2026 Onuzulike Anthony Ifechukwu. All rights reserved. Includes Liquid Glass UI © 2026 Bilal Abdullah Gürşen (MIT), see THIRD_PARTY_NOTICES.md */
|
|
3
|
-
const
|
|
3
|
+
const _0x36f842=_0x3ee6;(function(_0xc48a0e,_0x2e24a6){const _0xe54ba=_0x3ee6,_0x30b63d=_0xc48a0e();while(!![]){try{const _0x4b56dc=parseInt(_0xe54ba(0x192))/0x1+-parseInt(_0xe54ba(0x188))/0x2*(-parseInt(_0xe54ba(0x18c))/0x3)+parseInt(_0xe54ba(0x182))/0x4+parseInt(_0xe54ba(0x191))/0x5+parseInt(_0xe54ba(0x185))/0x6*(parseInt(_0xe54ba(0x193))/0x7)+parseInt(_0xe54ba(0x184))/0x8*(parseInt(_0xe54ba(0x195))/0x9)+parseInt(_0xe54ba(0x180))/0xa*(-parseInt(_0xe54ba(0x18e))/0xb);if(_0x4b56dc===_0x2e24a6)break;else _0x30b63d['push'](_0x30b63d['shift']());}catch(_0x2110ae){_0x30b63d['push'](_0x30b63d['shift']());}}}(_0x4031,0x9643f));import{h,c,e,g,a,b,d as _0x4b2997}from'./chunk-LZNPHZ4X.js';import'./chunk-ZW3IR2KQ.js';import'./chunk-EVRORS2V.js';import{Menu,MenuTrigger,MenuContent,MenuItem,MenuSeparator}from'@ui-sdk/react/menu';import{createContext,useContext,Children,isValidElement,cloneElement}from'react';function _0x3ee6(_0x4110ad,_0x2ecc58){_0x4110ad=_0x4110ad-0x180;const _0x403199=_0x4031();let _0x3ee60d=_0x403199[_0x4110ad];return _0x3ee60d;}import{jsx,jsxs}from'react/jsx-runtime';var d=createContext(void 0x0);function E({children:_0x4681e2,over:_0x197df4,from:_0x1dc143=_0x36f842(0x187),..._0x48d61a}){const _0x1cdd9f=_0x36f842;let _0x3a1034=h({'opening':_0x197df4?_0x1cdd9f(0x197):'stretch','from':_0x1dc143});return jsx(Menu,{..._0x48d61a,'children':jsx(d[_0x1cdd9f(0x186)],{'value':_0x197df4,'children':jsx(c['Provider'],{'value':_0x3a1034,'children':_0x4681e2})})});}function _0x4031(){const _0x2e19cf=['div','2002593FlaFtG','mx-3.5\x20my-1\x20h-px\x20shrink-0\x20bg-current/15\x20','66ERoOTf','props','inline-flex\x20items-center\x20gap-[inherit]','5110640dwvCdP','137375LAOdYC','3822VcjXlm','span','2057139giqtsK','concat','morph','5333530nWsSYe','toArray','4748424YvyycE','center','24YQWCDI','1272QANaDc','Provider','top','2ebljfH','relative\x20flex\x20h-10\x20cursor-pointer\x20items-center\x20gap-2.5\x20rounded-2xl\x20px-3.5\x20font-medium\x20whitespace-nowrap\x20outline-none\x20select-none\x20transition-colors\x20duration-100\x20data-disabled:cursor-not-allowed\x20data-highlighted:bg-current/10\x20data-destructive:text-red-600\x20group-data-[vt-tone=dark]/vt:data-destructive:text-red-400\x20[&_svg]:size-4\x20[&_svg]:shrink-0\x20','inline-flex\x20h-10\x20shrink-0\x20cursor-pointer\x20items-center\x20justify-center\x20gap-2\x20rounded-full\x20border\x20border-black/10\x20bg-white/60\x20px-5\x20text-sm\x20font-semibold\x20whitespace-nowrap\x20text-neutral-900\x20outline-none\x20select-none\x20focus-visible:ring-2\x20focus-visible:ring-[#3291FF]\x20focus-visible:ring-offset-2\x20disabled:cursor-not-allowed\x20disabled:opacity-40\x20dark:border-white/15\x20dark:bg-white/10\x20dark:text-white\x20data-[vt-tone=dark]:text-white\x20data-[vt-tone=light]:text-neutral-900\x20[&_svg]:size-4\x20[&_svg]:shrink-0\x20'];_0x4031=function(){return _0x2e19cf;};return _0x4031();}function _({children:_0xb8bae2,asChild:_0x87dc63=![],className:_0x81656a='',..._0x16f80b}){const _0xfba57d=_0x36f842;let _0x5a9753=useContext(c),_0x31f269=useContext(d);return _0x87dc63||!_0x5a9753?jsx(MenuTrigger,{'render':Children['only'](_0xb8bae2),..._0x16f80b}):jsxs(MenuTrigger,{'data-vt-host':'','className':_0xfba57d(0x18a)[_0xfba57d(0x196)](_0x81656a),..._0x16f80b,'children':[jsx(e,{'popup':_0x5a9753}),jsx(_0xfba57d(0x194),{'className':_0xfba57d(0x190),'children':_0x31f269?g(_0xb8bae2):_0xb8bae2})]});}function I({children:_0x5b2243,className:_0x72d8f9='',sideOffset:_0x256647,align:_0x1bbd44='center',..._0x300467}){const _0x52c2ba=_0x36f842;let _0x2974f2=useContext(c),_0x43b5e6=useContext(d),_0x2c6f12=_0x43b5e6===_0x52c2ba(0x183);return jsxs(MenuContent,{'data-vt-popup':'','data-vt-skip':'','sideOffset':_0x256647??(_0x43b5e6?0x0:0xc),'align':_0x1bbd44,'className':'group/vt\x20min-w-44\x20rounded-3xl\x20p-1.5\x20text-[15px]\x20text-neutral-900\x20outline-none\x20data-[vt-tone=dark]:text-white\x20data-[vt-tone=light]:text-neutral-900\x20'[_0x52c2ba(0x196)](_0x43b5e6&&_0x256647===void 0x0?_0x2c6f12?a:b:'','\x20')[_0x52c2ba(0x196)](_0x72d8f9),..._0x300467,..._0x2c6f12?{'side':'bottom'}:null,'children':[_0x2974f2&&jsx(_0x4b2997,{'popup':_0x2974f2}),jsx(_0x52c2ba(0x18b),{'data-vt-list':'','className':'flex\x20flex-col','children':Children[_0x52c2ba(0x181)](_0x5b2243)['map']((_0x10d159,_0xe9004b)=>isValidElement(_0x10d159)?cloneElement(_0x10d159,{'style':{'--vt-i':_0xe9004b,..._0x10d159[_0x52c2ba(0x18f)]['style']}}):_0x10d159)})]});}function $({className:_0x3981cd='',..._0x1cdb7d}){const _0x53d39b=_0x36f842;return jsx(MenuItem,{'className':_0x53d39b(0x189)[_0x53d39b(0x196)](_0x3981cd),..._0x1cdb7d});}function V({className:_0xd8228e='',style:_0x14313a}){const _0x3b834e=_0x36f842;return jsx(MenuSeparator,{'data-vt-item':'','style':_0x14313a,'className':_0x3b834e(0x18d)['concat'](_0xd8228e)});}var z=E;export{E as GlassDropdownMenu,I as GlassDropdownMenuContent,$ as GlassDropdownMenuItem,V as GlassDropdownMenuSeparator,_ as GlassDropdownMenuTrigger,z as default};
|
package/dist/glass-layer.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type SpringConfig } from "@vitrumui/core/internal";
|
|
1
2
|
export type GlassMaterial = "clear" | "tinted";
|
|
2
3
|
export type GlassDroplet = "none" | "apart" | "merged";
|
|
3
4
|
/**
|
|
@@ -71,6 +72,33 @@ export type GlassOptics = {
|
|
|
71
72
|
outlineAlpha?: number;
|
|
72
73
|
};
|
|
73
74
|
};
|
|
75
|
+
/**
|
|
76
|
+
* A row of droplets budding off the glass's end (see glass-droplet-row.ts). GlassLayer measures
|
|
77
|
+
* the host, steps its own springs and asks the row for the rest.
|
|
78
|
+
* @internal Used by GlassSearch; its shape may change in a minor release.
|
|
79
|
+
*/
|
|
80
|
+
export type GlassDropletRow = {
|
|
81
|
+
/** How far the body pulls back once the row is all out, and the canvas room beside it for the furthest droplet's swing (px). */
|
|
82
|
+
pull: number;
|
|
83
|
+
swing: number;
|
|
84
|
+
/** Reads where each marked child rests. `false`: no row (fewer than two). */
|
|
85
|
+
measure: (host: HTMLElement, marked: HTMLElement[], w: number, h: number) => boolean;
|
|
86
|
+
/** The body's spring while the row comes out or goes back in. */
|
|
87
|
+
body: (apart: boolean) => SpringConfig;
|
|
88
|
+
/** Steps the droplets' own springs; `true` while any moves. */
|
|
89
|
+
step: (apart: boolean, dt: number) => boolean;
|
|
90
|
+
/** Puts every droplet at rest at once (out or in). */
|
|
91
|
+
still: (out: boolean) => void;
|
|
92
|
+
/** The droplets to draw (GlassLens.droplets), for glass shaded `sh` px tall. */
|
|
93
|
+
shape: (sh: number) => {
|
|
94
|
+
x: number;
|
|
95
|
+
y: number;
|
|
96
|
+
r: number;
|
|
97
|
+
k: number;
|
|
98
|
+
}[];
|
|
99
|
+
/** Takes back what it wrote on the droplets' elements. */
|
|
100
|
+
clear: () => void;
|
|
101
|
+
};
|
|
74
102
|
export type GlassLayerProps = {
|
|
75
103
|
/**
|
|
76
104
|
* `clear`: transparent glass that bends the page behind it (default).
|
|
@@ -115,12 +143,26 @@ export type GlassLayerProps = {
|
|
|
115
143
|
* height it has at rest.
|
|
116
144
|
*/
|
|
117
145
|
restHeight?: number;
|
|
146
|
+
/**
|
|
147
|
+
* Bud the host's `[data-vt-drop]` children off its end as one chain (more than one of them):
|
|
148
|
+
* pass `createDropletRow` from glass-droplet-row.ts. Read when the glass mounts.
|
|
149
|
+
* @internal Used by GlassSearch.
|
|
150
|
+
*/
|
|
151
|
+
row?: () => GlassDropletRow;
|
|
118
152
|
/** Fine-tuning: tint colour, a rim line, frost mix, bend, light and shadow (see GlassOptics). */
|
|
119
153
|
optics?: GlassOptics;
|
|
120
154
|
};
|
|
121
|
-
/**
|
|
155
|
+
/**
|
|
156
|
+
* The CSS the glass relies on. Rendered once per page by <GlassStyles /> (React 19 dedupes it).
|
|
157
|
+
* @deprecated Internal to Vitrum, not a public API. Leaves the public exports in 3.0.
|
|
158
|
+
* @internal
|
|
159
|
+
*/
|
|
122
160
|
export declare const GLASS_CSS = "\n/* Layered, so a utility class on the host (absolute, fixed) still wins over relative. */\n@layer components{:where([data-vt-host]){position:relative;isolation:isolate}}\n/* Unlayered on purpose: once the glass draws, it must beat the host's own fill utilities. */\n[data-vt-host][data-vt-ready]{background:transparent!important;border-color:transparent!important;box-shadow:none!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important}\n@keyframes vt-marquee{to{transform:translateX(-50%)}}\n[data-vt-marquee]{animation:vt-marquee var(--vt-marquee-duration,5s) linear infinite}\n/* Swapped labels and icons rise from a soft blur; a check draws itself in. */\n@keyframes vt-in{from{opacity:0;filter:blur(3px);transform:translateY(4px)}}\n[data-vt-in]{animation:vt-in .38s cubic-bezier(.2,.8,.2,1) both}\n@keyframes vt-draw{from{stroke-dashoffset:25}}\n[data-vt-draw]{stroke-dasharray:25;animation:vt-draw .42s cubic-bezier(.65,0,.35,1) .12s both}\n@keyframes vt-spin{to{transform:rotate(1turn)}}\n[data-vt-spin]{animation:vt-spin .8s linear infinite}\n[data-vt-ready] [data-vt-fallback]{visibility:hidden}\n/* A hidden fallback stops moving too. Its marquee ran on unseen, on the main thread, and made the browser work out the page's layers again on every frame of anything else on the page. */\n[data-vt-ready] [data-vt-fallback] [data-vt-marquee]{animation:none}\n@media (prefers-reduced-motion:reduce){[data-vt-marquee],[data-vt-in],[data-vt-draw],[data-vt-spin]{animation:none}}\n";
|
|
123
|
-
/**
|
|
161
|
+
/**
|
|
162
|
+
* Injects GLASS_CSS once (React 19 hoists and dedupes `<style href precedence>`).
|
|
163
|
+
* @deprecated Internal to Vitrum, not a public API. Leaves the public exports in 3.0.
|
|
164
|
+
* @internal
|
|
165
|
+
*/
|
|
124
166
|
export declare function GlassStyles(): import("react").JSX.Element;
|
|
125
|
-
export declare function GlassLayer({ material, droplet, tint, blur, backdrop, live, trigger, disabled, swell, pulse, pulseHold, pull, restHeight, optics, }: GlassLayerProps): import("react").JSX.Element;
|
|
167
|
+
export declare function GlassLayer({ material, droplet, tint, blur, backdrop, live, trigger, disabled, swell, pulse, pulseHold, pull, restHeight, row: makeRow, optics, }: GlassLayerProps): import("react").JSX.Element;
|
|
126
168
|
export default GlassLayer;
|
package/dist/glass-menu.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
/*! Vitrum © 2026 Onuzulike Anthony Ifechukwu. All rights reserved. Includes Liquid Glass UI © 2026 Bilal Abdullah Gürşen (MIT), see THIRD_PARTY_NOTICES.md */
|
|
3
|
-
(function(
|
|
3
|
+
(function(_0x102707,_0x3f5939){var _0x52f7b1=_0x33c0,_0xfcefab=_0x102707();while(!![]){try{var _0x25d336=parseInt(_0x52f7b1(0x1ef))/0x1*(-parseInt(_0x52f7b1(0x1eb))/0x2)+-parseInt(_0x52f7b1(0x1ea))/0x3+parseInt(_0x52f7b1(0x1ee))/0x4+-parseInt(_0x52f7b1(0x1f1))/0x5+-parseInt(_0x52f7b1(0x1ec))/0x6+-parseInt(_0x52f7b1(0x1f0))/0x7+parseInt(_0x52f7b1(0x1ed))/0x8;if(_0x25d336===_0x3f5939)break;else _0xfcefab['push'](_0xfcefab['shift']());}catch(_0xc6e832){_0xfcefab['push'](_0xfcefab['shift']());}}}(_0x1501,0x6f7fa));function _0x1501(){var _0x4a7583=['2QcYcoc','4181526Uvjhzz','20548320yxdUNl','1091960LpWpEK','300284vABNQC','3099789YLtSCN','2411255jpERbJ','1387647OqKnum'];_0x1501=function(){return _0x4a7583;};return _0x1501();}function _0x33c0(_0xa29807,_0x460ed0){_0xa29807=_0xa29807-0x1ea;var _0x1501ac=_0x1501();var _0x33c09a=_0x1501ac[_0xa29807];return _0x33c09a;}export{a as GlassMenu,e as GlassMenuCheckboxItem,c as GlassMenuContent,h as GlassMenuGroup,d as GlassMenuItem,i as GlassMenuLabel,f as GlassMenuRadioGroup,g as GlassMenuRadioItem,k as GlassMenuSeparator,j as GlassMenuShortcut,l as GlassMenuSub,n as GlassMenuSubContent,m as GlassMenuSubTrigger,b as GlassMenuTrigger,o as default}from'./chunk-5WUTOVNB.js';import'./chunk-VVSLSFDY.js';import'./chunk-LZNPHZ4X.js';import'./chunk-ZW3IR2KQ.js';import'./chunk-EVRORS2V.js';
|
package/dist/glass-popover.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
/*! Vitrum © 2026 Onuzulike Anthony Ifechukwu. All rights reserved. Includes Liquid Glass UI © 2026 Bilal Abdullah Gürşen (MIT), see THIRD_PARTY_NOTICES.md */
|
|
3
|
-
(function(
|
|
3
|
+
(function(_0x42c475,_0x3aadc3){var _0x39e3af=_0x2742,_0x41b6da=_0x42c475();while(!![]){try{var _0x1772d0=parseInt(_0x39e3af(0x179))/0x1*(parseInt(_0x39e3af(0x174))/0x2)+parseInt(_0x39e3af(0x17b))/0x3*(-parseInt(_0x39e3af(0x175))/0x4)+-parseInt(_0x39e3af(0x172))/0x5+parseInt(_0x39e3af(0x17a))/0x6+-parseInt(_0x39e3af(0x17c))/0x7*(-parseInt(_0x39e3af(0x177))/0x8)+-parseInt(_0x39e3af(0x173))/0x9*(-parseInt(_0x39e3af(0x178))/0xa)+parseInt(_0x39e3af(0x176))/0xb;if(_0x1772d0===_0x3aadc3)break;else _0x41b6da['push'](_0x41b6da['shift']());}catch(_0x2ef774){_0x41b6da['push'](_0x41b6da['shift']());}}}(_0x12e8,0x489c8));export{a as GlassPopover,f as GlassPopoverClose,c as GlassPopoverContent,e as GlassPopoverDescription,d as GlassPopoverTitle,b as GlassPopoverTrigger,g as default}from'./chunk-CUPBYLM4.js';import'./chunk-LZNPHZ4X.js';function _0x12e8(){var _0x2367c8=['37970ijbmKD','107269ZoMpUi','650388eyAfIj','523797jHhBKy','450793cnJtNv','2768185xtskSt','603avHdSQ','6uvhSlF','12tYOQtW','6175928DBWlcb','16CiFdnD'];_0x12e8=function(){return _0x2367c8;};return _0x12e8();}function _0x2742(_0x2a2112,_0x354bbb){_0x2a2112=_0x2a2112-0x172;var _0x12e819=_0x12e8();var _0x27429f=_0x12e819[_0x2a2112];return _0x27429f;}import'./chunk-ZW3IR2KQ.js';import'./chunk-EVRORS2V.js';
|
package/dist/glass-popup.d.ts
CHANGED
|
@@ -23,6 +23,8 @@ export type GlassPopupFrom = "top" | "bottom";
|
|
|
23
23
|
* height on the content (`--anchor-height`), so it is pulled back by half of it and then by half
|
|
24
24
|
* of its own height. Always with a transform: UI SDK places the box as if it had none, while a
|
|
25
25
|
* margin it would take for its own error and undo the moment the control moves (a hover's swell).
|
|
26
|
+
* @deprecated Internal to Vitrum, not a public API. Leaves the public exports in 3.0.
|
|
27
|
+
* @internal
|
|
26
28
|
*/
|
|
27
29
|
export declare const OVER_CENTER = "[position-try-fallbacks:none]! data-[side=bottom]:-translate-y-1/2 data-[side=top]:translate-y-1/2 data-[side=bottom]:[transform:translateY(calc(var(--anchor-height)*-0.5))] data-[side=top]:[transform:translateY(calc(var(--anchor-height)*0.5))]";
|
|
28
30
|
/**
|
|
@@ -32,8 +34,14 @@ export declare const OVER_CENTER = "[position-try-fallbacks:none]! data-[side=bo
|
|
|
32
34
|
/**
|
|
33
35
|
* And classes that lay a popup edge on edge with its control, growing away from it: pulled back
|
|
34
36
|
* by the control's whole height, from whichever side it landed on.
|
|
37
|
+
* @deprecated Internal to Vitrum, not a public API. Leaves the public exports in 3.0.
|
|
38
|
+
* @internal
|
|
35
39
|
*/
|
|
36
40
|
export declare const OVER_EDGE = "data-[side=bottom]:[transform:translateY(calc(var(--anchor-height)*-1))] data-[side=top]:[transform:translateY(var(--anchor-height))]";
|
|
41
|
+
/**
|
|
42
|
+
* @deprecated Internal to Vitrum, not a public API. Leaves the public exports in 3.0.
|
|
43
|
+
* @internal
|
|
44
|
+
*/
|
|
37
45
|
export declare const GlassPopupContext: import("react").Context<{
|
|
38
46
|
setTrigger: (canvas: HTMLCanvasElement | null) => () => void;
|
|
39
47
|
setPanel: (canvas: HTMLCanvasElement | null, hold: HTMLElement | null, cardShadow: HTMLElement | null) => () => void;
|
|
@@ -49,13 +57,19 @@ export declare function GlassPopupAnchor({ popup }: {
|
|
|
49
57
|
/**
|
|
50
58
|
* The label of a morphing control, coming back letter by letter the moment the surface is back in,
|
|
51
59
|
* with the control's swell. `delay` (seconds) starts it that much later. Read aloud as one string.
|
|
60
|
+
* @deprecated Internal to Vitrum, not a public API. Leaves the public exports in 3.0.
|
|
61
|
+
* @internal
|
|
52
62
|
*/
|
|
53
63
|
export declare function GlassPopupText({ children, delay, className, }: {
|
|
54
64
|
children: string;
|
|
55
65
|
delay?: number;
|
|
56
66
|
className?: string;
|
|
57
67
|
}): import("react").JSX.Element;
|
|
58
|
-
/**
|
|
68
|
+
/**
|
|
69
|
+
* A control's children, each plain text among them in GlassPopupText: its label comes back letter by letter.
|
|
70
|
+
* @deprecated Internal to Vitrum, not a public API. Leaves the public exports in 3.0.
|
|
71
|
+
* @internal
|
|
72
|
+
*/
|
|
59
73
|
export declare const spellLabel: (children: ReactNode) => (string | number | bigint | import("react").JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | import("react").ReactPortal | null | undefined>)[] | null | undefined;
|
|
60
74
|
/** One gooey popup: hand the result to its GlassPopupAnchor and GlassPopupSurface. `matchWidth` keeps the surface as wide as the anchor; `opening` picks the motion (see GlassPopupOpening) and `from` the way a morphing surface comes in (see GlassPopupFrom). */
|
|
61
75
|
export declare function useGlassPopup({ matchWidth, mode, opening, from, }?: {
|
package/dist/glass-search.d.ts
CHANGED
|
@@ -62,6 +62,8 @@ export type GlassSearchProps = OwnProps & Omit<HTMLAttributes<HTMLDivElement>, k
|
|
|
62
62
|
/**
|
|
63
63
|
* The field's own timing and measures, read on every render (the droplets' motion itself is the
|
|
64
64
|
* engine's: BUD and SPRINGS.bud* in @vitrumui/core). These values are the look: do not tune them casually.
|
|
65
|
+
* @deprecated Internal to Vitrum, not a public API. Leaves the public exports in 3.0.
|
|
66
|
+
* @internal
|
|
65
67
|
*/
|
|
66
68
|
export declare const SEARCH: {
|
|
67
69
|
/** The gap between droplets, and between the field and the first one (px). */
|
|
@@ -106,8 +108,16 @@ export declare const SEARCH: {
|
|
|
106
108
|
arriveMs: number;
|
|
107
109
|
arriveScale: number;
|
|
108
110
|
};
|
|
111
|
+
/**
|
|
112
|
+
* @deprecated Internal to Vitrum, not a public API. Leaves the public exports in 3.0.
|
|
113
|
+
* @internal
|
|
114
|
+
*/
|
|
109
115
|
export declare const fold: (text: string) => string;
|
|
110
|
-
/**
|
|
116
|
+
/**
|
|
117
|
+
* How well a result answers what was typed (already folded): 0 = not at all. The start of the label counts most, then the start of a word, then anywhere, then a keyword.
|
|
118
|
+
* @deprecated Internal to Vitrum, not a public API. Leaves the public exports in 3.0.
|
|
119
|
+
* @internal
|
|
120
|
+
*/
|
|
111
121
|
export declare function rank(item: GlassSearchItem, typed: string): 0 | 1 | 2 | 3 | 4 | 5;
|
|
112
122
|
export declare function GlassSearch({ layers, label, placeholder, onAction, onQueryChange, defaultLayer, onLayerChange, layersAfter, arrive, empty, limit, material, tint, blur, optics, className, ref, style, onFocus, onBlur, onPointerEnter, onPointerLeave, ...rest }: GlassSearchProps): import("react").JSX.Element;
|
|
113
123
|
export default GlassSearch;
|
package/dist/glass-search.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
/*! Vitrum © 2026 Onuzulike Anthony Ifechukwu. All rights reserved. Includes Liquid Glass UI © 2026 Bilal Abdullah Gürşen (MIT), see THIRD_PARTY_NOTICES.md */
|
|
3
|
-
|
|
3
|
+
(function(_0x199306,_0x48f345){var _0x5f0a71=_0x13e5,_0x2ba0d1=_0x199306();while(!![]){try{var _0x5698aa=-parseInt(_0x5f0a71(0x8e))/0x1*(-parseInt(_0x5f0a71(0x8d))/0x2)+parseInt(_0x5f0a71(0x8a))/0x3*(parseInt(_0x5f0a71(0x8f))/0x4)+parseInt(_0x5f0a71(0x91))/0x5*(parseInt(_0x5f0a71(0x93))/0x6)+-parseInt(_0x5f0a71(0x89))/0x7+-parseInt(_0x5f0a71(0x95))/0x8*(-parseInt(_0x5f0a71(0x90))/0x9)+parseInt(_0x5f0a71(0x8c))/0xa*(parseInt(_0x5f0a71(0x94))/0xb)+-parseInt(_0x5f0a71(0x8b))/0xc*(parseInt(_0x5f0a71(0x92))/0xd);if(_0x5698aa===_0x48f345)break;else _0x2ba0d1['push'](_0x2ba0d1['shift']());}catch(_0x4482bc){_0x2ba0d1['push'](_0x2ba0d1['shift']());}}}(_0x2064,0x7495c));export{d as GlassSearch,a as SEARCH,e as default,b as fold,c as rank}from'./chunk-5RKCH57V.js';function _0x2064(){var _0x3b9a16=['4EJRtPI','8ZNYJJT','237996SuTjHA','1580xcPjGC','2834mskDmi','7098PitCcB','1272458QTBRXY','16uzsxUL','2831570haBirv','1405581reRrPk','92604ggMDVa','30swkdHJ','426772lIHklx'];_0x2064=function(){return _0x3b9a16;};return _0x2064();}function _0x13e5(_0x939576,_0x82f2f5){_0x939576=_0x939576-0x89;var _0x2064e4=_0x2064();var _0x13e56b=_0x2064e4[_0x939576];return _0x13e56b;}import'./chunk-ZW3IR2KQ.js';import'./chunk-EVRORS2V.js';
|
package/dist/glass-select.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
/*! Vitrum © 2026 Onuzulike Anthony Ifechukwu. All rights reserved. Includes Liquid Glass UI © 2026 Bilal Abdullah Gürşen (MIT), see THIRD_PARTY_NOTICES.md */
|
|
3
|
-
(function(
|
|
3
|
+
(function(_0x3d83dd,_0x23be29){const _0x42502e=_0x1255,_0x11d3c4=_0x3d83dd();while(!![]){try{const _0x2b1c38=parseInt(_0x42502e(0x130))/0x1*(-parseInt(_0x42502e(0x125))/0x2)+parseInt(_0x42502e(0x133))/0x3*(-parseInt(_0x42502e(0x124))/0x4)+parseInt(_0x42502e(0x123))/0x5*(-parseInt(_0x42502e(0x128))/0x6)+parseInt(_0x42502e(0x122))/0x7*(parseInt(_0x42502e(0x12b))/0x8)+-parseInt(_0x42502e(0x137))/0x9*(parseInt(_0x42502e(0x138))/0xa)+-parseInt(_0x42502e(0x134))/0xb+-parseInt(_0x42502e(0x129))/0xc*(-parseInt(_0x42502e(0x12f))/0xd);if(_0x2b1c38===_0x23be29)break;else _0x11d3c4['push'](_0x11d3c4['shift']());}catch(_0x4470a5){_0x11d3c4['push'](_0x11d3c4['shift']());}}}(_0x125f,0x81446));function _0x125f(){const _0x58e272=['path','0\x200\x2024\x2024','48eYenJj','36422472HYphjr','div','487624ZcwqiX','relative\x20flex\x20h-10\x20cursor-pointer\x20items-center\x20rounded-2xl\x20px-3.5\x20font-medium\x20outline-none\x20select-none\x20data-disabled:cursor-not-allowed\x20data-disabled:opacity-40\x20data-highlighted:bg-black/8\x20data-selected:font-semibold\x20dark:data-highlighted:bg-white/12','map','value','13gOFhBo','9217gHIQKV','text-sm\x20font-medium\x20text-neutral-900\x20dark:text-white','rounded-3xl\x20p-1.5\x20text-[15px]\x20text-neutral-900\x20outline-none\x20data-[vt-tone=dark]:text-white\x20data-[vt-tone=light]:text-neutral-900','6jNdVyr','1926122THWaND','round','none','1607481QZaPAk','40WdFijp','7IXoHOK','352745TkfxTf','548008JgsgSc','182HLSwXx'];_0x125f=function(){return _0x58e272;};return _0x125f();}import{h,e,d}from'./chunk-LZNPHZ4X.js';import'./chunk-ZW3IR2KQ.js';import'./chunk-EVRORS2V.js';import{Select,SelectLabel,SelectTrigger,SelectValue,SelectContent,SelectList,SelectItem}from'@ui-sdk/react/select';import{jsxs,jsx}from'react/jsx-runtime';function y({label:_0x449a28,options:_0x11cbc7,value:_0x4dfd7c,defaultValue:_0x15c39d,onValueChange:_0x2f8ef8,placeholder:_0x52e249,disabled:_0x5bad36,name:_0x1f0a2a,className:_0x4395a7=''}){const _0x48cac8=_0x1255;let _0x35f0c0=h({'matchWidth':!![]});return jsxs(Select,{..._0x4dfd7c!==void 0x0?{'value':_0x4dfd7c}:{},..._0x15c39d!==void 0x0?{'defaultValue':_0x15c39d}:{},'onValueChange':_0x23b148=>_0x2f8ef8?.(_0x23b148??null),'placeholder':_0x52e249,'disabled':_0x5bad36,'name':_0x1f0a2a,'children':[jsxs(_0x48cac8(0x12a),{'className':'flex\x20w-64\x20flex-col\x20gap-2\x20'['concat'](_0x4395a7),'children':[jsx(SelectLabel,{'className':_0x48cac8(0x131),'children':_0x449a28}),jsxs(SelectTrigger,{'data-vt-host':'','className':'flex\x20h-12\x20w-full\x20cursor-pointer\x20items-center\x20justify-between\x20rounded-full\x20border\x20border-black/10\x20bg-white/60\x20pr-4\x20pl-5\x20text-[15px]\x20font-medium\x20text-neutral-900\x20outline-none\x20select-none\x20focus-visible:ring-2\x20focus-visible:ring-[#3291FF]\x20focus-visible:ring-offset-2\x20disabled:cursor-not-allowed\x20disabled:opacity-40\x20dark:border-white/15\x20dark:bg-white/10\x20dark:text-white\x20data-[vt-tone=dark]:text-white\x20data-[vt-tone=light]:text-neutral-900','children':[jsx(e,{'popup':_0x35f0c0}),jsx(SelectValue,{}),jsx('svg',{'aria-hidden':!![],'viewBox':_0x48cac8(0x127),'fill':_0x48cac8(0x136),'stroke':'currentColor','strokeWidth':'2','strokeLinecap':_0x48cac8(0x135),'strokeLinejoin':'round','className':'size-4\x20shrink-0\x20opacity-60','children':jsx(_0x48cac8(0x126),{'d':'m6\x209\x206\x206\x206-6'})})]})]}),jsxs(SelectContent,{'data-vt-popup':'','data-vt-skip':'','sideOffset':0xc,'className':_0x48cac8(0x132),'children':[jsx(d,{'popup':_0x35f0c0}),jsx(SelectList,{'className':'max-h-72\x20overflow-y-auto\x20rounded-[18px]\x20outline-none','children':_0x11cbc7[_0x48cac8(0x12d)]((_0x4bc2d3,_0x8abb2b)=>jsx(SelectItem,{'value':_0x4bc2d3['value'],'disabled':_0x4bc2d3['disabled'],'style':{'--vt-i':_0x8abb2b},'className':_0x48cac8(0x12c),'children':_0x4bc2d3['label']},_0x4bc2d3[_0x48cac8(0x12e)]))})]})]});}function _0x1255(_0x4ee365,_0x1f6ce6){_0x4ee365=_0x4ee365-0x122;const _0x125f56=_0x125f();let _0x12550b=_0x125f56[_0x4ee365];return _0x12550b;}var O=y;export{y as GlassSelect,O as default};
|