@fiction/sdk 1.0.1 → 1.0.2
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 +6 -221
- package/dist/api.d.ts +23 -0
- package/dist/base-CEr2lLFg.js +194 -0
- package/dist/base-CEr2lLFg.js.map +1 -0
- package/dist/index-C-0XxdQQ.js +299 -0
- package/dist/{index-iLB4ucpG.js.map → index-C-0XxdQQ.js.map} +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/sdk.css +1 -1
- package/dist/sdk.js +2616 -3397
- package/dist/sdk.js.map +1 -1
- package/dist/sdkClient.d.ts +666 -0
- package/dist/sdkStorage.d.ts +27 -0
- package/dist/self/ClientAudio.d.ts +75 -0
- package/dist/self/SelfController.d.ts +68 -0
- package/dist/self/constants.d.ts +29 -0
- package/dist/self/index.d.ts +7 -0
- package/dist/self/schema.d.ts +28 -0
- package/dist/self/ui/ElAudioVisualizer.vue.d.ts +19 -0
- package/dist/self/ui/ElSelfAbout.vue.d.ts +6 -0
- package/dist/self/ui/ElSelfChat.vue.d.ts +8 -0
- package/dist/self/ui/ElSelfHeader.vue.d.ts +9 -0
- package/dist/self/ui/ElSelfSidebar.vue.d.ts +11 -0
- package/dist/self/ui/ElSelfVoice.vue.d.ts +6 -0
- package/dist/self/ui/SelfAgent.vue.d.ts +19 -0
- package/dist/self/ui/SelfProvider.vue.d.ts +12 -0
- package/dist/self/ui/SelfWrap.vue.d.ts +142 -0
- package/dist/self/utils.d.ts +18 -0
- package/dist/self.js +4874 -0
- package/dist/self.js.map +1 -0
- package/dist/types/SDKAppType.stub.d.ts +6 -0
- package/package.json +25 -26
- package/dist/base-CWJerwpW.js +0 -299
- package/dist/base-CWJerwpW.js.map +0 -1
- package/dist/index-iLB4ucpG.js +0 -402
- package/dist/sdk.d.ts +0 -460
- package/dist/ui.d.ts +0 -19
- package/dist/ui.js +0 -30388
- package/dist/ui.js.map +0 -1
package/dist/self.js
ADDED
|
@@ -0,0 +1,4874 @@
|
|
|
1
|
+
var bt = Object.defineProperty;
|
|
2
|
+
var Xt = (e, o, r) => o in e ? bt(e, o, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[o] = r;
|
|
3
|
+
var n = (e, o) => bt(e, "name", { value: o, configurable: !0 });
|
|
4
|
+
var T = (e, o, r) => Xt(e, typeof o != "symbol" ? o + "" : o, r);
|
|
5
|
+
import { ref as j, defineComponent as oe, createElementBlock as k, openBlock as p, createElementVNode as l, normalizeClass as I, computed as re, createBlock as ke, resolveDynamicComponent as _t, withCtx as ie, createCommentVNode as q, createVNode as U, renderSlot as zt, watch as Te, toDisplayString as Z, Fragment as De, renderList as Qe, createTextVNode as Pe, nextTick as pt, withDirectives as er, withKeys as tr, vModelText as rr, unref as te, onMounted as He, onBeforeUnmount as or, Transition as vt, withModifiers as $t, TransitionGroup as nr, normalizeStyle as it, onUnmounted as Lt, shallowRef as sr, mergeProps as xt } from "vue";
|
|
6
|
+
import { S as Et } from "./base-CEr2lLFg.js";
|
|
7
|
+
import { Conversation as yt } from "@elevenlabs/client";
|
|
8
|
+
import { objectId as ir } from "@fiction/utils";
|
|
9
|
+
const ar = 256, lr = 0.8, dr = 50, cr = {
|
|
10
|
+
bars: 64,
|
|
11
|
+
barWidth: 3,
|
|
12
|
+
barSpacing: 1,
|
|
13
|
+
minHeight: 4,
|
|
14
|
+
maxHeight: 80,
|
|
15
|
+
// Enhanced physics constants
|
|
16
|
+
STIFFNESS: 0.18,
|
|
17
|
+
DAMPING: 0.22,
|
|
18
|
+
PEAK_HOLD_TIME: 300,
|
|
19
|
+
// ms to hold peaks
|
|
20
|
+
PEAK_DECAY_STIFFNESS: 0.12,
|
|
21
|
+
PEAK_DECAY_DAMPING: 0.15
|
|
22
|
+
}, ur = [
|
|
23
|
+
{
|
|
24
|
+
mode: "talk",
|
|
25
|
+
label: "Talk",
|
|
26
|
+
icon: "i-tabler-phone"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
mode: "chat",
|
|
30
|
+
label: "Chat",
|
|
31
|
+
icon: "i-tabler-message-circle"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
mode: "info",
|
|
35
|
+
label: "Info",
|
|
36
|
+
icon: "i-tabler-user-circle"
|
|
37
|
+
}
|
|
38
|
+
], W = [
|
|
39
|
+
// Low fundamentals
|
|
40
|
+
85,
|
|
41
|
+
100,
|
|
42
|
+
120,
|
|
43
|
+
140,
|
|
44
|
+
155,
|
|
45
|
+
170,
|
|
46
|
+
185,
|
|
47
|
+
200,
|
|
48
|
+
215,
|
|
49
|
+
230,
|
|
50
|
+
245,
|
|
51
|
+
260,
|
|
52
|
+
275,
|
|
53
|
+
290,
|
|
54
|
+
315,
|
|
55
|
+
340,
|
|
56
|
+
// Mid fundamentals (voice clarity)
|
|
57
|
+
355,
|
|
58
|
+
375,
|
|
59
|
+
400,
|
|
60
|
+
425,
|
|
61
|
+
450,
|
|
62
|
+
475,
|
|
63
|
+
500,
|
|
64
|
+
530,
|
|
65
|
+
560,
|
|
66
|
+
590,
|
|
67
|
+
630,
|
|
68
|
+
670,
|
|
69
|
+
700,
|
|
70
|
+
730,
|
|
71
|
+
780,
|
|
72
|
+
820,
|
|
73
|
+
// Harmonics (speech intelligibility)
|
|
74
|
+
880,
|
|
75
|
+
940,
|
|
76
|
+
1e3,
|
|
77
|
+
1100,
|
|
78
|
+
1200,
|
|
79
|
+
1300,
|
|
80
|
+
1400,
|
|
81
|
+
1500,
|
|
82
|
+
1600,
|
|
83
|
+
1700,
|
|
84
|
+
1800,
|
|
85
|
+
1900,
|
|
86
|
+
2e3,
|
|
87
|
+
2200,
|
|
88
|
+
// High harmonics (consonant clarity)
|
|
89
|
+
2300,
|
|
90
|
+
2500,
|
|
91
|
+
2600,
|
|
92
|
+
2800,
|
|
93
|
+
3e3,
|
|
94
|
+
3200,
|
|
95
|
+
3500,
|
|
96
|
+
3800,
|
|
97
|
+
4e3,
|
|
98
|
+
4300,
|
|
99
|
+
4500,
|
|
100
|
+
4800,
|
|
101
|
+
5e3,
|
|
102
|
+
5300,
|
|
103
|
+
// Presence/air (voice definition)
|
|
104
|
+
5500,
|
|
105
|
+
5800,
|
|
106
|
+
6e3,
|
|
107
|
+
6500,
|
|
108
|
+
7e3,
|
|
109
|
+
7500,
|
|
110
|
+
8e3,
|
|
111
|
+
8500
|
|
112
|
+
], dt = class dt extends Et {
|
|
113
|
+
constructor(r) {
|
|
114
|
+
super("ClientAudio", r);
|
|
115
|
+
T(this, "audioContext");
|
|
116
|
+
T(this, "analyser");
|
|
117
|
+
T(this, "microphone");
|
|
118
|
+
T(this, "audioLevelInterval");
|
|
119
|
+
T(this, "stream");
|
|
120
|
+
T(this, "visibilityChangeHandler");
|
|
121
|
+
// Public reactive state
|
|
122
|
+
T(this, "audioLevels", j({ inputLevel: 0, outputLevel: 0 }));
|
|
123
|
+
this.setupVisibilityHandler();
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Setup iOS-specific visibility change handler
|
|
127
|
+
*/
|
|
128
|
+
setupVisibilityHandler() {
|
|
129
|
+
typeof document > "u" || (this.visibilityChangeHandler = () => {
|
|
130
|
+
document.hidden ? (this.logger.info("App backgrounded, suspending audio context"), this.handleAppBackground()) : (this.logger.info("App foregrounded, resuming audio context"), this.handleAppForeground());
|
|
131
|
+
}, document.addEventListener("visibilitychange", this.visibilityChangeHandler, { passive: !0 }), window.addEventListener("beforeunload", () => {
|
|
132
|
+
this.cleanup().catch(this.logger.error.bind(this, "Error during beforeunload cleanup"));
|
|
133
|
+
}, { passive: !0 }));
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Handle app going to background (iOS microphone indicator fix)
|
|
137
|
+
*/
|
|
138
|
+
handleAppBackground() {
|
|
139
|
+
this.audioContext && this.audioContext.state === "running" && this.audioContext.suspend().catch(this.logger.error.bind(this, "Error suspending audio context")), this.audioLevelInterval && (clearInterval(this.audioLevelInterval), this.audioLevelInterval = void 0);
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Handle app returning to foreground
|
|
143
|
+
*/
|
|
144
|
+
handleAppForeground() {
|
|
145
|
+
this.audioContext && this.audioContext.state === "suspended" && this.audioContext.resume().catch(this.logger.error.bind(this, "Error resuming audio context")), this.analyser && !this.audioLevelInterval && this.startAudioLevelMonitoring();
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Request microphone permission and setup audio analysis
|
|
149
|
+
*/
|
|
150
|
+
async requestMicrophonePermission(r = {}) {
|
|
151
|
+
try {
|
|
152
|
+
const {
|
|
153
|
+
noiseSuppression: t = !0,
|
|
154
|
+
echoCancellation: s = !0,
|
|
155
|
+
autoGainControl: i = !0
|
|
156
|
+
} = r;
|
|
157
|
+
return this.stream = await navigator.mediaDevices.getUserMedia({
|
|
158
|
+
audio: {
|
|
159
|
+
noiseSuppression: t,
|
|
160
|
+
echoCancellation: s,
|
|
161
|
+
autoGainControl: i
|
|
162
|
+
}
|
|
163
|
+
}), this.logger.info("Microphone permission granted"), await this.setupAudioAnalysis(), !0;
|
|
164
|
+
} catch (t) {
|
|
165
|
+
return this.logger.error("Microphone permission denied:", t), !1;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Setup audio analysis for level monitoring
|
|
170
|
+
*/
|
|
171
|
+
async setupAudioAnalysis() {
|
|
172
|
+
if (!this.stream)
|
|
173
|
+
throw new Error("No audio stream available");
|
|
174
|
+
try {
|
|
175
|
+
this.audioContext = new AudioContext(), this.analyser = this.audioContext.createAnalyser(), this.microphone = this.audioContext.createMediaStreamSource(this.stream), this.analyser.fftSize = ar, this.analyser.smoothingTimeConstant = lr, this.microphone.connect(this.analyser), this.logger.info("Audio analysis setup complete");
|
|
176
|
+
} catch (r) {
|
|
177
|
+
throw this.logger.error("Failed to setup audio analysis:", r), r;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Start monitoring audio levels
|
|
182
|
+
*/
|
|
183
|
+
startAudioLevelMonitoring(r) {
|
|
184
|
+
if (!this.analyser) {
|
|
185
|
+
this.logger.info("Audio level monitoring not started - missing analyser");
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
this.logger.info("Starting audio level monitoring at timestamp:", Date.now());
|
|
189
|
+
const t = new Uint8Array(this.analyser.frequencyBinCount), s = /* @__PURE__ */ n(async () => {
|
|
190
|
+
if (!this.analyser) {
|
|
191
|
+
this.logger.info("Stopping audio level monitoring - missing analyser");
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
try {
|
|
195
|
+
this.analyser.getByteFrequencyData(t);
|
|
196
|
+
const a = t.reduce((h, m) => h + m, 0) / t.length, f = Math.min(a / 128, 1), g = r?.() ? 0.3 : 0;
|
|
197
|
+
this.audioLevels.value = { inputLevel: f, outputLevel: g };
|
|
198
|
+
} catch (a) {
|
|
199
|
+
this.logger.error("Error in audio level monitoring:", a), this.stopAudioLevelMonitoring();
|
|
200
|
+
}
|
|
201
|
+
}, "updateLevels"), i = /* @__PURE__ */ n(() => {
|
|
202
|
+
s().catch((a) => {
|
|
203
|
+
this.logger.error("Async error in audio level monitoring:", a);
|
|
204
|
+
});
|
|
205
|
+
}, "intervalWrapper");
|
|
206
|
+
this.audioLevelInterval = window.setInterval(i, dr);
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Stop monitoring audio levels
|
|
210
|
+
*/
|
|
211
|
+
stopAudioLevelMonitoring() {
|
|
212
|
+
this.audioLevelInterval ? (this.logger.info("Stopping audio level monitoring interval"), clearInterval(this.audioLevelInterval), this.audioLevelInterval = void 0) : this.logger.info("No audio level monitoring interval to stop");
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Reset audio levels to zero
|
|
216
|
+
*/
|
|
217
|
+
resetAudioLevels() {
|
|
218
|
+
this.audioLevels.value = { inputLevel: 0, outputLevel: 0 };
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* Check if audio context is available
|
|
222
|
+
*/
|
|
223
|
+
isAudioContextAvailable() {
|
|
224
|
+
return !!this.audioContext;
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Get current audio context state
|
|
228
|
+
*/
|
|
229
|
+
getAudioContextState() {
|
|
230
|
+
return this.audioContext?.state;
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Get shared analyser for AudioVisualizer (prevents duplicate audio contexts)
|
|
234
|
+
*/
|
|
235
|
+
getSharedAnalyser() {
|
|
236
|
+
return this.analyser;
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Cleanup audio resources
|
|
240
|
+
*/
|
|
241
|
+
async cleanup() {
|
|
242
|
+
this.stopAudioLevelMonitoring(), this.resetAudioLevels(), this.visibilityChangeHandler && typeof document < "u" && (document.removeEventListener("visibilitychange", this.visibilityChangeHandler), this.visibilityChangeHandler = void 0), this.stream && (this.stream.getTracks().forEach((r) => r.stop()), this.stream = void 0), this.audioContext && (await this.audioContext.close(), this.audioContext = void 0), this.analyser = void 0, this.microphone = void 0, this.logger.info("Audio resources cleaned up");
|
|
243
|
+
}
|
|
244
|
+
};
|
|
245
|
+
n(dt, "ClientAudio");
|
|
246
|
+
let et = dt;
|
|
247
|
+
const at = "-", hr = /* @__PURE__ */ n((e) => {
|
|
248
|
+
const o = fr(e), {
|
|
249
|
+
conflictingClassGroups: r,
|
|
250
|
+
conflictingClassGroupModifiers: t
|
|
251
|
+
} = e;
|
|
252
|
+
return {
|
|
253
|
+
getClassGroupId: /* @__PURE__ */ n((a) => {
|
|
254
|
+
const f = a.split(at);
|
|
255
|
+
return f[0] === "" && f.length !== 1 && f.shift(), Tt(f, o) || gr(a);
|
|
256
|
+
}, "getClassGroupId"),
|
|
257
|
+
getConflictingClassGroupIds: /* @__PURE__ */ n((a, f) => {
|
|
258
|
+
const g = r[a] || [];
|
|
259
|
+
return f && t[a] ? [...g, ...t[a]] : g;
|
|
260
|
+
}, "getConflictingClassGroupIds")
|
|
261
|
+
};
|
|
262
|
+
}, "createClassGroupUtils"), Tt = /* @__PURE__ */ n((e, o) => {
|
|
263
|
+
if (e.length === 0)
|
|
264
|
+
return o.classGroupId;
|
|
265
|
+
const r = e[0], t = o.nextPart.get(r), s = t ? Tt(e.slice(1), t) : void 0;
|
|
266
|
+
if (s)
|
|
267
|
+
return s;
|
|
268
|
+
if (o.validators.length === 0)
|
|
269
|
+
return;
|
|
270
|
+
const i = e.join(at);
|
|
271
|
+
return o.validators.find(({
|
|
272
|
+
validator: a
|
|
273
|
+
}) => a(i))?.classGroupId;
|
|
274
|
+
}, "getGroupRecursive"), kt = /^\[(.+)\]$/, gr = /* @__PURE__ */ n((e) => {
|
|
275
|
+
if (kt.test(e)) {
|
|
276
|
+
const o = kt.exec(e)[1], r = o?.substring(0, o.indexOf(":"));
|
|
277
|
+
if (r)
|
|
278
|
+
return "arbitrary.." + r;
|
|
279
|
+
}
|
|
280
|
+
}, "getGroupIdForArbitraryProperty"), fr = /* @__PURE__ */ n((e) => {
|
|
281
|
+
const {
|
|
282
|
+
theme: o,
|
|
283
|
+
classGroups: r
|
|
284
|
+
} = e, t = {
|
|
285
|
+
nextPart: /* @__PURE__ */ new Map(),
|
|
286
|
+
validators: []
|
|
287
|
+
};
|
|
288
|
+
for (const s in r)
|
|
289
|
+
tt(r[s], t, s, o);
|
|
290
|
+
return t;
|
|
291
|
+
}, "createClassMap"), tt = /* @__PURE__ */ n((e, o, r, t) => {
|
|
292
|
+
e.forEach((s) => {
|
|
293
|
+
if (typeof s == "string") {
|
|
294
|
+
const i = s === "" ? o : wt(o, s);
|
|
295
|
+
i.classGroupId = r;
|
|
296
|
+
return;
|
|
297
|
+
}
|
|
298
|
+
if (typeof s == "function") {
|
|
299
|
+
if (mr(s)) {
|
|
300
|
+
tt(s(t), o, r, t);
|
|
301
|
+
return;
|
|
302
|
+
}
|
|
303
|
+
o.validators.push({
|
|
304
|
+
validator: s,
|
|
305
|
+
classGroupId: r
|
|
306
|
+
});
|
|
307
|
+
return;
|
|
308
|
+
}
|
|
309
|
+
Object.entries(s).forEach(([i, a]) => {
|
|
310
|
+
tt(a, wt(o, i), r, t);
|
|
311
|
+
});
|
|
312
|
+
});
|
|
313
|
+
}, "processClassesRecursively"), wt = /* @__PURE__ */ n((e, o) => {
|
|
314
|
+
let r = e;
|
|
315
|
+
return o.split(at).forEach((t) => {
|
|
316
|
+
r.nextPart.has(t) || r.nextPart.set(t, {
|
|
317
|
+
nextPart: /* @__PURE__ */ new Map(),
|
|
318
|
+
validators: []
|
|
319
|
+
}), r = r.nextPart.get(t);
|
|
320
|
+
}), r;
|
|
321
|
+
}, "getPart"), mr = /* @__PURE__ */ n((e) => e.isThemeGetter, "isThemeGetter"), br = /* @__PURE__ */ n((e) => {
|
|
322
|
+
if (e < 1)
|
|
323
|
+
return {
|
|
324
|
+
get: /* @__PURE__ */ n(() => {
|
|
325
|
+
}, "get"),
|
|
326
|
+
set: /* @__PURE__ */ n(() => {
|
|
327
|
+
}, "set")
|
|
328
|
+
};
|
|
329
|
+
let o = 0, r = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map();
|
|
330
|
+
const s = /* @__PURE__ */ n((i, a) => {
|
|
331
|
+
r.set(i, a), o++, o > e && (o = 0, t = r, r = /* @__PURE__ */ new Map());
|
|
332
|
+
}, "update");
|
|
333
|
+
return {
|
|
334
|
+
get(i) {
|
|
335
|
+
let a = r.get(i);
|
|
336
|
+
if (a !== void 0)
|
|
337
|
+
return a;
|
|
338
|
+
if ((a = t.get(i)) !== void 0)
|
|
339
|
+
return s(i, a), a;
|
|
340
|
+
},
|
|
341
|
+
set(i, a) {
|
|
342
|
+
r.has(i) ? r.set(i, a) : s(i, a);
|
|
343
|
+
}
|
|
344
|
+
};
|
|
345
|
+
}, "createLruCache"), rt = "!", ot = ":", pr = ot.length, vr = /* @__PURE__ */ n((e) => {
|
|
346
|
+
const {
|
|
347
|
+
prefix: o,
|
|
348
|
+
experimentalParseClassName: r
|
|
349
|
+
} = e;
|
|
350
|
+
let t = /* @__PURE__ */ n((s) => {
|
|
351
|
+
const i = [];
|
|
352
|
+
let a = 0, f = 0, g = 0, h;
|
|
353
|
+
for (let E = 0; E < s.length; E++) {
|
|
354
|
+
let V = s[E];
|
|
355
|
+
if (a === 0 && f === 0) {
|
|
356
|
+
if (V === ot) {
|
|
357
|
+
i.push(s.slice(g, E)), g = E + pr;
|
|
358
|
+
continue;
|
|
359
|
+
}
|
|
360
|
+
if (V === "/") {
|
|
361
|
+
h = E;
|
|
362
|
+
continue;
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
V === "[" ? a++ : V === "]" ? a-- : V === "(" ? f++ : V === ")" && f--;
|
|
366
|
+
}
|
|
367
|
+
const m = i.length === 0 ? s : s.substring(g), A = xr(m), K = A !== m, L = h && h > g ? h - g : void 0;
|
|
368
|
+
return {
|
|
369
|
+
modifiers: i,
|
|
370
|
+
hasImportantModifier: K,
|
|
371
|
+
baseClassName: A,
|
|
372
|
+
maybePostfixModifierPosition: L
|
|
373
|
+
};
|
|
374
|
+
}, "parseClassName");
|
|
375
|
+
if (o) {
|
|
376
|
+
const s = o + ot, i = t;
|
|
377
|
+
t = /* @__PURE__ */ n((a) => a.startsWith(s) ? i(a.substring(s.length)) : {
|
|
378
|
+
isExternal: !0,
|
|
379
|
+
modifiers: [],
|
|
380
|
+
hasImportantModifier: !1,
|
|
381
|
+
baseClassName: a,
|
|
382
|
+
maybePostfixModifierPosition: void 0
|
|
383
|
+
}, "parseClassName");
|
|
384
|
+
}
|
|
385
|
+
if (r) {
|
|
386
|
+
const s = t;
|
|
387
|
+
t = /* @__PURE__ */ n((i) => r({
|
|
388
|
+
className: i,
|
|
389
|
+
parseClassName: s
|
|
390
|
+
}), "parseClassName");
|
|
391
|
+
}
|
|
392
|
+
return t;
|
|
393
|
+
}, "createParseClassName"), xr = /* @__PURE__ */ n((e) => e.endsWith(rt) ? e.substring(0, e.length - 1) : e.startsWith(rt) ? e.substring(1) : e, "stripImportantModifier"), yr = /* @__PURE__ */ n((e) => {
|
|
394
|
+
const o = Object.fromEntries(e.orderSensitiveModifiers.map((t) => [t, !0]));
|
|
395
|
+
return /* @__PURE__ */ n((t) => {
|
|
396
|
+
if (t.length <= 1)
|
|
397
|
+
return t;
|
|
398
|
+
const s = [];
|
|
399
|
+
let i = [];
|
|
400
|
+
return t.forEach((a) => {
|
|
401
|
+
a[0] === "[" || o[a] ? (s.push(...i.sort(), a), i = []) : i.push(a);
|
|
402
|
+
}), s.push(...i.sort()), s;
|
|
403
|
+
}, "sortModifiers");
|
|
404
|
+
}, "createSortModifiers"), kr = /* @__PURE__ */ n((e) => ({
|
|
405
|
+
cache: br(e.cacheSize),
|
|
406
|
+
parseClassName: vr(e),
|
|
407
|
+
sortModifiers: yr(e),
|
|
408
|
+
...hr(e)
|
|
409
|
+
}), "createConfigUtils"), wr = /\s+/, Cr = /* @__PURE__ */ n((e, o) => {
|
|
410
|
+
const {
|
|
411
|
+
parseClassName: r,
|
|
412
|
+
getClassGroupId: t,
|
|
413
|
+
getConflictingClassGroupIds: s,
|
|
414
|
+
sortModifiers: i
|
|
415
|
+
} = o, a = [], f = e.trim().split(wr);
|
|
416
|
+
let g = "";
|
|
417
|
+
for (let h = f.length - 1; h >= 0; h -= 1) {
|
|
418
|
+
const m = f[h], {
|
|
419
|
+
isExternal: A,
|
|
420
|
+
modifiers: K,
|
|
421
|
+
hasImportantModifier: L,
|
|
422
|
+
baseClassName: E,
|
|
423
|
+
maybePostfixModifierPosition: V
|
|
424
|
+
} = r(m);
|
|
425
|
+
if (A) {
|
|
426
|
+
g = m + (g.length > 0 ? " " + g : g);
|
|
427
|
+
continue;
|
|
428
|
+
}
|
|
429
|
+
let H = !!V, Q = t(H ? E.substring(0, V) : E);
|
|
430
|
+
if (!Q) {
|
|
431
|
+
if (!H) {
|
|
432
|
+
g = m + (g.length > 0 ? " " + g : g);
|
|
433
|
+
continue;
|
|
434
|
+
}
|
|
435
|
+
if (Q = t(E), !Q) {
|
|
436
|
+
g = m + (g.length > 0 ? " " + g : g);
|
|
437
|
+
continue;
|
|
438
|
+
}
|
|
439
|
+
H = !1;
|
|
440
|
+
}
|
|
441
|
+
const Se = i(K).join(":"), we = L ? Se + rt : Se, de = we + Q;
|
|
442
|
+
if (a.includes(de))
|
|
443
|
+
continue;
|
|
444
|
+
a.push(de);
|
|
445
|
+
const be = s(Q, H);
|
|
446
|
+
for (let ce = 0; ce < be.length; ++ce) {
|
|
447
|
+
const X = be[ce];
|
|
448
|
+
a.push(we + X);
|
|
449
|
+
}
|
|
450
|
+
g = m + (g.length > 0 ? " " + g : g);
|
|
451
|
+
}
|
|
452
|
+
return g;
|
|
453
|
+
}, "mergeClassList");
|
|
454
|
+
function Sr() {
|
|
455
|
+
let e = 0, o, r, t = "";
|
|
456
|
+
for (; e < arguments.length; )
|
|
457
|
+
(o = arguments[e++]) && (r = Pt(o)) && (t && (t += " "), t += r);
|
|
458
|
+
return t;
|
|
459
|
+
}
|
|
460
|
+
n(Sr, "twJoin");
|
|
461
|
+
const Pt = /* @__PURE__ */ n((e) => {
|
|
462
|
+
if (typeof e == "string")
|
|
463
|
+
return e;
|
|
464
|
+
let o, r = "";
|
|
465
|
+
for (let t = 0; t < e.length; t++)
|
|
466
|
+
e[t] && (o = Pt(e[t])) && (r && (r += " "), r += o);
|
|
467
|
+
return r;
|
|
468
|
+
}, "toValue");
|
|
469
|
+
function Mr(e, ...o) {
|
|
470
|
+
let r, t, s, i = a;
|
|
471
|
+
function a(g) {
|
|
472
|
+
const h = o.reduce((m, A) => A(m), e());
|
|
473
|
+
return r = kr(h), t = r.cache.get, s = r.cache.set, i = f, f(g);
|
|
474
|
+
}
|
|
475
|
+
n(a, "initTailwindMerge");
|
|
476
|
+
function f(g) {
|
|
477
|
+
const h = t(g);
|
|
478
|
+
if (h)
|
|
479
|
+
return h;
|
|
480
|
+
const m = Cr(g, r);
|
|
481
|
+
return s(g, m), m;
|
|
482
|
+
}
|
|
483
|
+
return n(f, "tailwindMerge"), /* @__PURE__ */ n(function() {
|
|
484
|
+
return i(Sr.apply(null, arguments));
|
|
485
|
+
}, "callTailwindMerge");
|
|
486
|
+
}
|
|
487
|
+
n(Mr, "createTailwindMerge");
|
|
488
|
+
const N = /* @__PURE__ */ n((e) => {
|
|
489
|
+
const o = /* @__PURE__ */ n((r) => r[e] || [], "themeGetter");
|
|
490
|
+
return o.isThemeGetter = !0, o;
|
|
491
|
+
}, "fromTheme"), Ft = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, Dt = /^\((?:(\w[\w-]*):)?(.+)\)$/i, Ar = /^\d+\/\d+$/, Ir = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, zr = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, $r = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, Lr = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Er = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, Ee = /* @__PURE__ */ n((e) => Ar.test(e), "isFraction"), C = /* @__PURE__ */ n((e) => !!e && !Number.isNaN(Number(e)), "isNumber"), ye = /* @__PURE__ */ n((e) => !!e && Number.isInteger(Number(e)), "isInteger"), Xe = /* @__PURE__ */ n((e) => e.endsWith("%") && C(e.slice(0, -1)), "isPercent"), me = /* @__PURE__ */ n((e) => Ir.test(e), "isTshirtSize"), Tr = /* @__PURE__ */ n(() => !0, "isAny"), Pr = /* @__PURE__ */ n((e) => (
|
|
492
|
+
// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
|
|
493
|
+
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
|
494
|
+
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
495
|
+
zr.test(e) && !$r.test(e)
|
|
496
|
+
), "isLengthOnly"), Rt = /* @__PURE__ */ n(() => !1, "isNever"), Fr = /* @__PURE__ */ n((e) => Lr.test(e), "isShadow"), Dr = /* @__PURE__ */ n((e) => Er.test(e), "isImage"), Rr = /* @__PURE__ */ n((e) => !c(e) && !u(e), "isAnyNonArbitrary"), Br = /* @__PURE__ */ n((e) => Re(e, jt, Rt), "isArbitrarySize"), c = /* @__PURE__ */ n((e) => Ft.test(e), "isArbitraryValue"), Ce = /* @__PURE__ */ n((e) => Re(e, Vt, Pr), "isArbitraryLength"), _e = /* @__PURE__ */ n((e) => Re(e, Or, C), "isArbitraryNumber"), Ct = /* @__PURE__ */ n((e) => Re(e, Bt, Rt), "isArbitraryPosition"), Nr = /* @__PURE__ */ n((e) => Re(e, Nt, Dr), "isArbitraryImage"), Ke = /* @__PURE__ */ n((e) => Re(e, Gt, Fr), "isArbitraryShadow"), u = /* @__PURE__ */ n((e) => Dt.test(e), "isArbitraryVariable"), qe = /* @__PURE__ */ n((e) => Be(e, Vt), "isArbitraryVariableLength"), jr = /* @__PURE__ */ n((e) => Be(e, qr), "isArbitraryVariableFamilyName"), St = /* @__PURE__ */ n((e) => Be(e, Bt), "isArbitraryVariablePosition"), Vr = /* @__PURE__ */ n((e) => Be(e, jt), "isArbitraryVariableSize"), Gr = /* @__PURE__ */ n((e) => Be(e, Nt), "isArbitraryVariableImage"), Ye = /* @__PURE__ */ n((e) => Be(e, Gt, !0), "isArbitraryVariableShadow"), Re = /* @__PURE__ */ n((e, o, r) => {
|
|
497
|
+
const t = Ft.exec(e);
|
|
498
|
+
return t ? t[1] ? o(t[1]) : r(t[2]) : !1;
|
|
499
|
+
}, "getIsArbitraryValue"), Be = /* @__PURE__ */ n((e, o, r = !1) => {
|
|
500
|
+
const t = Dt.exec(e);
|
|
501
|
+
return t ? t[1] ? o(t[1]) : r : !1;
|
|
502
|
+
}, "getIsArbitraryVariable"), Bt = /* @__PURE__ */ n((e) => e === "position" || e === "percentage", "isLabelPosition"), Nt = /* @__PURE__ */ n((e) => e === "image" || e === "url", "isLabelImage"), jt = /* @__PURE__ */ n((e) => e === "length" || e === "size" || e === "bg-size", "isLabelSize"), Vt = /* @__PURE__ */ n((e) => e === "length", "isLabelLength"), Or = /* @__PURE__ */ n((e) => e === "number", "isLabelNumber"), qr = /* @__PURE__ */ n((e) => e === "family-name", "isLabelFamilyName"), Gt = /* @__PURE__ */ n((e) => e === "shadow", "isLabelShadow"), Hr = /* @__PURE__ */ n(() => {
|
|
503
|
+
const e = N("color"), o = N("font"), r = N("text"), t = N("font-weight"), s = N("tracking"), i = N("leading"), a = N("breakpoint"), f = N("container"), g = N("spacing"), h = N("radius"), m = N("shadow"), A = N("inset-shadow"), K = N("text-shadow"), L = N("drop-shadow"), E = N("blur"), V = N("perspective"), H = N("aspect"), Q = N("ease"), Se = N("animate"), we = /* @__PURE__ */ n(() => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], "scaleBreak"), de = /* @__PURE__ */ n(() => [
|
|
504
|
+
"center",
|
|
505
|
+
"top",
|
|
506
|
+
"bottom",
|
|
507
|
+
"left",
|
|
508
|
+
"right",
|
|
509
|
+
"top-left",
|
|
510
|
+
// Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
|
|
511
|
+
"left-top",
|
|
512
|
+
"top-right",
|
|
513
|
+
// Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
|
|
514
|
+
"right-top",
|
|
515
|
+
"bottom-right",
|
|
516
|
+
// Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
|
|
517
|
+
"right-bottom",
|
|
518
|
+
"bottom-left",
|
|
519
|
+
// Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
|
|
520
|
+
"left-bottom"
|
|
521
|
+
], "scalePosition"), be = /* @__PURE__ */ n(() => [...de(), u, c], "scalePositionWithArbitrary"), ce = /* @__PURE__ */ n(() => ["auto", "hidden", "clip", "visible", "scroll"], "scaleOverflow"), X = /* @__PURE__ */ n(() => ["auto", "contain", "none"], "scaleOverscroll"), x = /* @__PURE__ */ n(() => [u, c, g], "scaleUnambiguousSpacing"), _ = /* @__PURE__ */ n(() => [Ee, "full", "auto", ...x()], "scaleInset"), ae = /* @__PURE__ */ n(() => [ye, "none", "subgrid", u, c], "scaleGridTemplateColsRows"), ue = /* @__PURE__ */ n(() => ["auto", {
|
|
522
|
+
span: ["full", ye, u, c]
|
|
523
|
+
}, ye, u, c], "scaleGridColRowStartAndEnd"), he = /* @__PURE__ */ n(() => [ye, "auto", u, c], "scaleGridColRowStartOrEnd"), We = /* @__PURE__ */ n(() => ["auto", "min", "max", "fr", u, c], "scaleGridAutoColsRows"), Me = /* @__PURE__ */ n(() => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], "scaleAlignPrimaryAxis"), ge = /* @__PURE__ */ n(() => ["start", "end", "center", "stretch", "center-safe", "end-safe"], "scaleAlignSecondaryAxis"), F = /* @__PURE__ */ n(() => ["auto", ...x()], "scaleMargin"), ne = /* @__PURE__ */ n(() => [Ee, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...x()], "scaleSizing"), v = /* @__PURE__ */ n(() => [e, u, c], "scaleColor"), Ue = /* @__PURE__ */ n(() => [...de(), St, Ct, {
|
|
524
|
+
position: [u, c]
|
|
525
|
+
}], "scaleBgPosition"), Ne = /* @__PURE__ */ n(() => ["no-repeat", {
|
|
526
|
+
repeat: ["", "x", "y", "space", "round"]
|
|
527
|
+
}], "scaleBgRepeat"), pe = /* @__PURE__ */ n(() => ["auto", "cover", "contain", Vr, Br, {
|
|
528
|
+
size: [u, c]
|
|
529
|
+
}], "scaleBgSize"), ve = /* @__PURE__ */ n(() => [Xe, qe, Ce], "scaleGradientStopPosition"), P = /* @__PURE__ */ n(() => [
|
|
530
|
+
// Deprecated since Tailwind CSS v4.0.0
|
|
531
|
+
"",
|
|
532
|
+
"none",
|
|
533
|
+
"full",
|
|
534
|
+
h,
|
|
535
|
+
u,
|
|
536
|
+
c
|
|
537
|
+
], "scaleRadius"), D = /* @__PURE__ */ n(() => ["", C, qe, Ce], "scaleBorderWidth"), Ae = /* @__PURE__ */ n(() => ["solid", "dashed", "dotted", "double"], "scaleLineStyle"), Ie = /* @__PURE__ */ n(() => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], "scaleBlendMode"), $ = /* @__PURE__ */ n(() => [C, Xe, St, Ct], "scaleMaskImagePosition"), je = /* @__PURE__ */ n(() => [
|
|
538
|
+
// Deprecated since Tailwind CSS v4.0.0
|
|
539
|
+
"",
|
|
540
|
+
"none",
|
|
541
|
+
E,
|
|
542
|
+
u,
|
|
543
|
+
c
|
|
544
|
+
], "scaleBlur"), xe = /* @__PURE__ */ n(() => ["none", C, u, c], "scaleRotate"), ze = /* @__PURE__ */ n(() => ["none", C, u, c], "scaleScale"), Ve = /* @__PURE__ */ n(() => [C, u, c], "scaleSkew"), $e = /* @__PURE__ */ n(() => [Ee, "full", ...x()], "scaleTranslate");
|
|
545
|
+
return {
|
|
546
|
+
cacheSize: 500,
|
|
547
|
+
theme: {
|
|
548
|
+
animate: ["spin", "ping", "pulse", "bounce"],
|
|
549
|
+
aspect: ["video"],
|
|
550
|
+
blur: [me],
|
|
551
|
+
breakpoint: [me],
|
|
552
|
+
color: [Tr],
|
|
553
|
+
container: [me],
|
|
554
|
+
"drop-shadow": [me],
|
|
555
|
+
ease: ["in", "out", "in-out"],
|
|
556
|
+
font: [Rr],
|
|
557
|
+
"font-weight": ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black"],
|
|
558
|
+
"inset-shadow": [me],
|
|
559
|
+
leading: ["none", "tight", "snug", "normal", "relaxed", "loose"],
|
|
560
|
+
perspective: ["dramatic", "near", "normal", "midrange", "distant", "none"],
|
|
561
|
+
radius: [me],
|
|
562
|
+
shadow: [me],
|
|
563
|
+
spacing: ["px", C],
|
|
564
|
+
text: [me],
|
|
565
|
+
"text-shadow": [me],
|
|
566
|
+
tracking: ["tighter", "tight", "normal", "wide", "wider", "widest"]
|
|
567
|
+
},
|
|
568
|
+
classGroups: {
|
|
569
|
+
// --------------
|
|
570
|
+
// --- Layout ---
|
|
571
|
+
// --------------
|
|
572
|
+
/**
|
|
573
|
+
* Aspect Ratio
|
|
574
|
+
* @see https://tailwindcss.com/docs/aspect-ratio
|
|
575
|
+
*/
|
|
576
|
+
aspect: [{
|
|
577
|
+
aspect: ["auto", "square", Ee, c, u, H]
|
|
578
|
+
}],
|
|
579
|
+
/**
|
|
580
|
+
* Container
|
|
581
|
+
* @see https://tailwindcss.com/docs/container
|
|
582
|
+
* @deprecated since Tailwind CSS v4.0.0
|
|
583
|
+
*/
|
|
584
|
+
container: ["container"],
|
|
585
|
+
/**
|
|
586
|
+
* Columns
|
|
587
|
+
* @see https://tailwindcss.com/docs/columns
|
|
588
|
+
*/
|
|
589
|
+
columns: [{
|
|
590
|
+
columns: [C, c, u, f]
|
|
591
|
+
}],
|
|
592
|
+
/**
|
|
593
|
+
* Break After
|
|
594
|
+
* @see https://tailwindcss.com/docs/break-after
|
|
595
|
+
*/
|
|
596
|
+
"break-after": [{
|
|
597
|
+
"break-after": we()
|
|
598
|
+
}],
|
|
599
|
+
/**
|
|
600
|
+
* Break Before
|
|
601
|
+
* @see https://tailwindcss.com/docs/break-before
|
|
602
|
+
*/
|
|
603
|
+
"break-before": [{
|
|
604
|
+
"break-before": we()
|
|
605
|
+
}],
|
|
606
|
+
/**
|
|
607
|
+
* Break Inside
|
|
608
|
+
* @see https://tailwindcss.com/docs/break-inside
|
|
609
|
+
*/
|
|
610
|
+
"break-inside": [{
|
|
611
|
+
"break-inside": ["auto", "avoid", "avoid-page", "avoid-column"]
|
|
612
|
+
}],
|
|
613
|
+
/**
|
|
614
|
+
* Box Decoration Break
|
|
615
|
+
* @see https://tailwindcss.com/docs/box-decoration-break
|
|
616
|
+
*/
|
|
617
|
+
"box-decoration": [{
|
|
618
|
+
"box-decoration": ["slice", "clone"]
|
|
619
|
+
}],
|
|
620
|
+
/**
|
|
621
|
+
* Box Sizing
|
|
622
|
+
* @see https://tailwindcss.com/docs/box-sizing
|
|
623
|
+
*/
|
|
624
|
+
box: [{
|
|
625
|
+
box: ["border", "content"]
|
|
626
|
+
}],
|
|
627
|
+
/**
|
|
628
|
+
* Display
|
|
629
|
+
* @see https://tailwindcss.com/docs/display
|
|
630
|
+
*/
|
|
631
|
+
display: ["block", "inline-block", "inline", "flex", "inline-flex", "table", "inline-table", "table-caption", "table-cell", "table-column", "table-column-group", "table-footer-group", "table-header-group", "table-row-group", "table-row", "flow-root", "grid", "inline-grid", "contents", "list-item", "hidden"],
|
|
632
|
+
/**
|
|
633
|
+
* Screen Reader Only
|
|
634
|
+
* @see https://tailwindcss.com/docs/display#screen-reader-only
|
|
635
|
+
*/
|
|
636
|
+
sr: ["sr-only", "not-sr-only"],
|
|
637
|
+
/**
|
|
638
|
+
* Floats
|
|
639
|
+
* @see https://tailwindcss.com/docs/float
|
|
640
|
+
*/
|
|
641
|
+
float: [{
|
|
642
|
+
float: ["right", "left", "none", "start", "end"]
|
|
643
|
+
}],
|
|
644
|
+
/**
|
|
645
|
+
* Clear
|
|
646
|
+
* @see https://tailwindcss.com/docs/clear
|
|
647
|
+
*/
|
|
648
|
+
clear: [{
|
|
649
|
+
clear: ["left", "right", "both", "none", "start", "end"]
|
|
650
|
+
}],
|
|
651
|
+
/**
|
|
652
|
+
* Isolation
|
|
653
|
+
* @see https://tailwindcss.com/docs/isolation
|
|
654
|
+
*/
|
|
655
|
+
isolation: ["isolate", "isolation-auto"],
|
|
656
|
+
/**
|
|
657
|
+
* Object Fit
|
|
658
|
+
* @see https://tailwindcss.com/docs/object-fit
|
|
659
|
+
*/
|
|
660
|
+
"object-fit": [{
|
|
661
|
+
object: ["contain", "cover", "fill", "none", "scale-down"]
|
|
662
|
+
}],
|
|
663
|
+
/**
|
|
664
|
+
* Object Position
|
|
665
|
+
* @see https://tailwindcss.com/docs/object-position
|
|
666
|
+
*/
|
|
667
|
+
"object-position": [{
|
|
668
|
+
object: be()
|
|
669
|
+
}],
|
|
670
|
+
/**
|
|
671
|
+
* Overflow
|
|
672
|
+
* @see https://tailwindcss.com/docs/overflow
|
|
673
|
+
*/
|
|
674
|
+
overflow: [{
|
|
675
|
+
overflow: ce()
|
|
676
|
+
}],
|
|
677
|
+
/**
|
|
678
|
+
* Overflow X
|
|
679
|
+
* @see https://tailwindcss.com/docs/overflow
|
|
680
|
+
*/
|
|
681
|
+
"overflow-x": [{
|
|
682
|
+
"overflow-x": ce()
|
|
683
|
+
}],
|
|
684
|
+
/**
|
|
685
|
+
* Overflow Y
|
|
686
|
+
* @see https://tailwindcss.com/docs/overflow
|
|
687
|
+
*/
|
|
688
|
+
"overflow-y": [{
|
|
689
|
+
"overflow-y": ce()
|
|
690
|
+
}],
|
|
691
|
+
/**
|
|
692
|
+
* Overscroll Behavior
|
|
693
|
+
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
694
|
+
*/
|
|
695
|
+
overscroll: [{
|
|
696
|
+
overscroll: X()
|
|
697
|
+
}],
|
|
698
|
+
/**
|
|
699
|
+
* Overscroll Behavior X
|
|
700
|
+
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
701
|
+
*/
|
|
702
|
+
"overscroll-x": [{
|
|
703
|
+
"overscroll-x": X()
|
|
704
|
+
}],
|
|
705
|
+
/**
|
|
706
|
+
* Overscroll Behavior Y
|
|
707
|
+
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
708
|
+
*/
|
|
709
|
+
"overscroll-y": [{
|
|
710
|
+
"overscroll-y": X()
|
|
711
|
+
}],
|
|
712
|
+
/**
|
|
713
|
+
* Position
|
|
714
|
+
* @see https://tailwindcss.com/docs/position
|
|
715
|
+
*/
|
|
716
|
+
position: ["static", "fixed", "absolute", "relative", "sticky"],
|
|
717
|
+
/**
|
|
718
|
+
* Top / Right / Bottom / Left
|
|
719
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
720
|
+
*/
|
|
721
|
+
inset: [{
|
|
722
|
+
inset: _()
|
|
723
|
+
}],
|
|
724
|
+
/**
|
|
725
|
+
* Right / Left
|
|
726
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
727
|
+
*/
|
|
728
|
+
"inset-x": [{
|
|
729
|
+
"inset-x": _()
|
|
730
|
+
}],
|
|
731
|
+
/**
|
|
732
|
+
* Top / Bottom
|
|
733
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
734
|
+
*/
|
|
735
|
+
"inset-y": [{
|
|
736
|
+
"inset-y": _()
|
|
737
|
+
}],
|
|
738
|
+
/**
|
|
739
|
+
* Start
|
|
740
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
741
|
+
*/
|
|
742
|
+
start: [{
|
|
743
|
+
start: _()
|
|
744
|
+
}],
|
|
745
|
+
/**
|
|
746
|
+
* End
|
|
747
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
748
|
+
*/
|
|
749
|
+
end: [{
|
|
750
|
+
end: _()
|
|
751
|
+
}],
|
|
752
|
+
/**
|
|
753
|
+
* Top
|
|
754
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
755
|
+
*/
|
|
756
|
+
top: [{
|
|
757
|
+
top: _()
|
|
758
|
+
}],
|
|
759
|
+
/**
|
|
760
|
+
* Right
|
|
761
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
762
|
+
*/
|
|
763
|
+
right: [{
|
|
764
|
+
right: _()
|
|
765
|
+
}],
|
|
766
|
+
/**
|
|
767
|
+
* Bottom
|
|
768
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
769
|
+
*/
|
|
770
|
+
bottom: [{
|
|
771
|
+
bottom: _()
|
|
772
|
+
}],
|
|
773
|
+
/**
|
|
774
|
+
* Left
|
|
775
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
776
|
+
*/
|
|
777
|
+
left: [{
|
|
778
|
+
left: _()
|
|
779
|
+
}],
|
|
780
|
+
/**
|
|
781
|
+
* Visibility
|
|
782
|
+
* @see https://tailwindcss.com/docs/visibility
|
|
783
|
+
*/
|
|
784
|
+
visibility: ["visible", "invisible", "collapse"],
|
|
785
|
+
/**
|
|
786
|
+
* Z-Index
|
|
787
|
+
* @see https://tailwindcss.com/docs/z-index
|
|
788
|
+
*/
|
|
789
|
+
z: [{
|
|
790
|
+
z: [ye, "auto", u, c]
|
|
791
|
+
}],
|
|
792
|
+
// ------------------------
|
|
793
|
+
// --- Flexbox and Grid ---
|
|
794
|
+
// ------------------------
|
|
795
|
+
/**
|
|
796
|
+
* Flex Basis
|
|
797
|
+
* @see https://tailwindcss.com/docs/flex-basis
|
|
798
|
+
*/
|
|
799
|
+
basis: [{
|
|
800
|
+
basis: [Ee, "full", "auto", f, ...x()]
|
|
801
|
+
}],
|
|
802
|
+
/**
|
|
803
|
+
* Flex Direction
|
|
804
|
+
* @see https://tailwindcss.com/docs/flex-direction
|
|
805
|
+
*/
|
|
806
|
+
"flex-direction": [{
|
|
807
|
+
flex: ["row", "row-reverse", "col", "col-reverse"]
|
|
808
|
+
}],
|
|
809
|
+
/**
|
|
810
|
+
* Flex Wrap
|
|
811
|
+
* @see https://tailwindcss.com/docs/flex-wrap
|
|
812
|
+
*/
|
|
813
|
+
"flex-wrap": [{
|
|
814
|
+
flex: ["nowrap", "wrap", "wrap-reverse"]
|
|
815
|
+
}],
|
|
816
|
+
/**
|
|
817
|
+
* Flex
|
|
818
|
+
* @see https://tailwindcss.com/docs/flex
|
|
819
|
+
*/
|
|
820
|
+
flex: [{
|
|
821
|
+
flex: [C, Ee, "auto", "initial", "none", c]
|
|
822
|
+
}],
|
|
823
|
+
/**
|
|
824
|
+
* Flex Grow
|
|
825
|
+
* @see https://tailwindcss.com/docs/flex-grow
|
|
826
|
+
*/
|
|
827
|
+
grow: [{
|
|
828
|
+
grow: ["", C, u, c]
|
|
829
|
+
}],
|
|
830
|
+
/**
|
|
831
|
+
* Flex Shrink
|
|
832
|
+
* @see https://tailwindcss.com/docs/flex-shrink
|
|
833
|
+
*/
|
|
834
|
+
shrink: [{
|
|
835
|
+
shrink: ["", C, u, c]
|
|
836
|
+
}],
|
|
837
|
+
/**
|
|
838
|
+
* Order
|
|
839
|
+
* @see https://tailwindcss.com/docs/order
|
|
840
|
+
*/
|
|
841
|
+
order: [{
|
|
842
|
+
order: [ye, "first", "last", "none", u, c]
|
|
843
|
+
}],
|
|
844
|
+
/**
|
|
845
|
+
* Grid Template Columns
|
|
846
|
+
* @see https://tailwindcss.com/docs/grid-template-columns
|
|
847
|
+
*/
|
|
848
|
+
"grid-cols": [{
|
|
849
|
+
"grid-cols": ae()
|
|
850
|
+
}],
|
|
851
|
+
/**
|
|
852
|
+
* Grid Column Start / End
|
|
853
|
+
* @see https://tailwindcss.com/docs/grid-column
|
|
854
|
+
*/
|
|
855
|
+
"col-start-end": [{
|
|
856
|
+
col: ue()
|
|
857
|
+
}],
|
|
858
|
+
/**
|
|
859
|
+
* Grid Column Start
|
|
860
|
+
* @see https://tailwindcss.com/docs/grid-column
|
|
861
|
+
*/
|
|
862
|
+
"col-start": [{
|
|
863
|
+
"col-start": he()
|
|
864
|
+
}],
|
|
865
|
+
/**
|
|
866
|
+
* Grid Column End
|
|
867
|
+
* @see https://tailwindcss.com/docs/grid-column
|
|
868
|
+
*/
|
|
869
|
+
"col-end": [{
|
|
870
|
+
"col-end": he()
|
|
871
|
+
}],
|
|
872
|
+
/**
|
|
873
|
+
* Grid Template Rows
|
|
874
|
+
* @see https://tailwindcss.com/docs/grid-template-rows
|
|
875
|
+
*/
|
|
876
|
+
"grid-rows": [{
|
|
877
|
+
"grid-rows": ae()
|
|
878
|
+
}],
|
|
879
|
+
/**
|
|
880
|
+
* Grid Row Start / End
|
|
881
|
+
* @see https://tailwindcss.com/docs/grid-row
|
|
882
|
+
*/
|
|
883
|
+
"row-start-end": [{
|
|
884
|
+
row: ue()
|
|
885
|
+
}],
|
|
886
|
+
/**
|
|
887
|
+
* Grid Row Start
|
|
888
|
+
* @see https://tailwindcss.com/docs/grid-row
|
|
889
|
+
*/
|
|
890
|
+
"row-start": [{
|
|
891
|
+
"row-start": he()
|
|
892
|
+
}],
|
|
893
|
+
/**
|
|
894
|
+
* Grid Row End
|
|
895
|
+
* @see https://tailwindcss.com/docs/grid-row
|
|
896
|
+
*/
|
|
897
|
+
"row-end": [{
|
|
898
|
+
"row-end": he()
|
|
899
|
+
}],
|
|
900
|
+
/**
|
|
901
|
+
* Grid Auto Flow
|
|
902
|
+
* @see https://tailwindcss.com/docs/grid-auto-flow
|
|
903
|
+
*/
|
|
904
|
+
"grid-flow": [{
|
|
905
|
+
"grid-flow": ["row", "col", "dense", "row-dense", "col-dense"]
|
|
906
|
+
}],
|
|
907
|
+
/**
|
|
908
|
+
* Grid Auto Columns
|
|
909
|
+
* @see https://tailwindcss.com/docs/grid-auto-columns
|
|
910
|
+
*/
|
|
911
|
+
"auto-cols": [{
|
|
912
|
+
"auto-cols": We()
|
|
913
|
+
}],
|
|
914
|
+
/**
|
|
915
|
+
* Grid Auto Rows
|
|
916
|
+
* @see https://tailwindcss.com/docs/grid-auto-rows
|
|
917
|
+
*/
|
|
918
|
+
"auto-rows": [{
|
|
919
|
+
"auto-rows": We()
|
|
920
|
+
}],
|
|
921
|
+
/**
|
|
922
|
+
* Gap
|
|
923
|
+
* @see https://tailwindcss.com/docs/gap
|
|
924
|
+
*/
|
|
925
|
+
gap: [{
|
|
926
|
+
gap: x()
|
|
927
|
+
}],
|
|
928
|
+
/**
|
|
929
|
+
* Gap X
|
|
930
|
+
* @see https://tailwindcss.com/docs/gap
|
|
931
|
+
*/
|
|
932
|
+
"gap-x": [{
|
|
933
|
+
"gap-x": x()
|
|
934
|
+
}],
|
|
935
|
+
/**
|
|
936
|
+
* Gap Y
|
|
937
|
+
* @see https://tailwindcss.com/docs/gap
|
|
938
|
+
*/
|
|
939
|
+
"gap-y": [{
|
|
940
|
+
"gap-y": x()
|
|
941
|
+
}],
|
|
942
|
+
/**
|
|
943
|
+
* Justify Content
|
|
944
|
+
* @see https://tailwindcss.com/docs/justify-content
|
|
945
|
+
*/
|
|
946
|
+
"justify-content": [{
|
|
947
|
+
justify: [...Me(), "normal"]
|
|
948
|
+
}],
|
|
949
|
+
/**
|
|
950
|
+
* Justify Items
|
|
951
|
+
* @see https://tailwindcss.com/docs/justify-items
|
|
952
|
+
*/
|
|
953
|
+
"justify-items": [{
|
|
954
|
+
"justify-items": [...ge(), "normal"]
|
|
955
|
+
}],
|
|
956
|
+
/**
|
|
957
|
+
* Justify Self
|
|
958
|
+
* @see https://tailwindcss.com/docs/justify-self
|
|
959
|
+
*/
|
|
960
|
+
"justify-self": [{
|
|
961
|
+
"justify-self": ["auto", ...ge()]
|
|
962
|
+
}],
|
|
963
|
+
/**
|
|
964
|
+
* Align Content
|
|
965
|
+
* @see https://tailwindcss.com/docs/align-content
|
|
966
|
+
*/
|
|
967
|
+
"align-content": [{
|
|
968
|
+
content: ["normal", ...Me()]
|
|
969
|
+
}],
|
|
970
|
+
/**
|
|
971
|
+
* Align Items
|
|
972
|
+
* @see https://tailwindcss.com/docs/align-items
|
|
973
|
+
*/
|
|
974
|
+
"align-items": [{
|
|
975
|
+
items: [...ge(), {
|
|
976
|
+
baseline: ["", "last"]
|
|
977
|
+
}]
|
|
978
|
+
}],
|
|
979
|
+
/**
|
|
980
|
+
* Align Self
|
|
981
|
+
* @see https://tailwindcss.com/docs/align-self
|
|
982
|
+
*/
|
|
983
|
+
"align-self": [{
|
|
984
|
+
self: ["auto", ...ge(), {
|
|
985
|
+
baseline: ["", "last"]
|
|
986
|
+
}]
|
|
987
|
+
}],
|
|
988
|
+
/**
|
|
989
|
+
* Place Content
|
|
990
|
+
* @see https://tailwindcss.com/docs/place-content
|
|
991
|
+
*/
|
|
992
|
+
"place-content": [{
|
|
993
|
+
"place-content": Me()
|
|
994
|
+
}],
|
|
995
|
+
/**
|
|
996
|
+
* Place Items
|
|
997
|
+
* @see https://tailwindcss.com/docs/place-items
|
|
998
|
+
*/
|
|
999
|
+
"place-items": [{
|
|
1000
|
+
"place-items": [...ge(), "baseline"]
|
|
1001
|
+
}],
|
|
1002
|
+
/**
|
|
1003
|
+
* Place Self
|
|
1004
|
+
* @see https://tailwindcss.com/docs/place-self
|
|
1005
|
+
*/
|
|
1006
|
+
"place-self": [{
|
|
1007
|
+
"place-self": ["auto", ...ge()]
|
|
1008
|
+
}],
|
|
1009
|
+
// Spacing
|
|
1010
|
+
/**
|
|
1011
|
+
* Padding
|
|
1012
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1013
|
+
*/
|
|
1014
|
+
p: [{
|
|
1015
|
+
p: x()
|
|
1016
|
+
}],
|
|
1017
|
+
/**
|
|
1018
|
+
* Padding X
|
|
1019
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1020
|
+
*/
|
|
1021
|
+
px: [{
|
|
1022
|
+
px: x()
|
|
1023
|
+
}],
|
|
1024
|
+
/**
|
|
1025
|
+
* Padding Y
|
|
1026
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1027
|
+
*/
|
|
1028
|
+
py: [{
|
|
1029
|
+
py: x()
|
|
1030
|
+
}],
|
|
1031
|
+
/**
|
|
1032
|
+
* Padding Start
|
|
1033
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1034
|
+
*/
|
|
1035
|
+
ps: [{
|
|
1036
|
+
ps: x()
|
|
1037
|
+
}],
|
|
1038
|
+
/**
|
|
1039
|
+
* Padding End
|
|
1040
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1041
|
+
*/
|
|
1042
|
+
pe: [{
|
|
1043
|
+
pe: x()
|
|
1044
|
+
}],
|
|
1045
|
+
/**
|
|
1046
|
+
* Padding Top
|
|
1047
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1048
|
+
*/
|
|
1049
|
+
pt: [{
|
|
1050
|
+
pt: x()
|
|
1051
|
+
}],
|
|
1052
|
+
/**
|
|
1053
|
+
* Padding Right
|
|
1054
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1055
|
+
*/
|
|
1056
|
+
pr: [{
|
|
1057
|
+
pr: x()
|
|
1058
|
+
}],
|
|
1059
|
+
/**
|
|
1060
|
+
* Padding Bottom
|
|
1061
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1062
|
+
*/
|
|
1063
|
+
pb: [{
|
|
1064
|
+
pb: x()
|
|
1065
|
+
}],
|
|
1066
|
+
/**
|
|
1067
|
+
* Padding Left
|
|
1068
|
+
* @see https://tailwindcss.com/docs/padding
|
|
1069
|
+
*/
|
|
1070
|
+
pl: [{
|
|
1071
|
+
pl: x()
|
|
1072
|
+
}],
|
|
1073
|
+
/**
|
|
1074
|
+
* Margin
|
|
1075
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1076
|
+
*/
|
|
1077
|
+
m: [{
|
|
1078
|
+
m: F()
|
|
1079
|
+
}],
|
|
1080
|
+
/**
|
|
1081
|
+
* Margin X
|
|
1082
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1083
|
+
*/
|
|
1084
|
+
mx: [{
|
|
1085
|
+
mx: F()
|
|
1086
|
+
}],
|
|
1087
|
+
/**
|
|
1088
|
+
* Margin Y
|
|
1089
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1090
|
+
*/
|
|
1091
|
+
my: [{
|
|
1092
|
+
my: F()
|
|
1093
|
+
}],
|
|
1094
|
+
/**
|
|
1095
|
+
* Margin Start
|
|
1096
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1097
|
+
*/
|
|
1098
|
+
ms: [{
|
|
1099
|
+
ms: F()
|
|
1100
|
+
}],
|
|
1101
|
+
/**
|
|
1102
|
+
* Margin End
|
|
1103
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1104
|
+
*/
|
|
1105
|
+
me: [{
|
|
1106
|
+
me: F()
|
|
1107
|
+
}],
|
|
1108
|
+
/**
|
|
1109
|
+
* Margin Top
|
|
1110
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1111
|
+
*/
|
|
1112
|
+
mt: [{
|
|
1113
|
+
mt: F()
|
|
1114
|
+
}],
|
|
1115
|
+
/**
|
|
1116
|
+
* Margin Right
|
|
1117
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1118
|
+
*/
|
|
1119
|
+
mr: [{
|
|
1120
|
+
mr: F()
|
|
1121
|
+
}],
|
|
1122
|
+
/**
|
|
1123
|
+
* Margin Bottom
|
|
1124
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1125
|
+
*/
|
|
1126
|
+
mb: [{
|
|
1127
|
+
mb: F()
|
|
1128
|
+
}],
|
|
1129
|
+
/**
|
|
1130
|
+
* Margin Left
|
|
1131
|
+
* @see https://tailwindcss.com/docs/margin
|
|
1132
|
+
*/
|
|
1133
|
+
ml: [{
|
|
1134
|
+
ml: F()
|
|
1135
|
+
}],
|
|
1136
|
+
/**
|
|
1137
|
+
* Space Between X
|
|
1138
|
+
* @see https://tailwindcss.com/docs/margin#adding-space-between-children
|
|
1139
|
+
*/
|
|
1140
|
+
"space-x": [{
|
|
1141
|
+
"space-x": x()
|
|
1142
|
+
}],
|
|
1143
|
+
/**
|
|
1144
|
+
* Space Between X Reverse
|
|
1145
|
+
* @see https://tailwindcss.com/docs/margin#adding-space-between-children
|
|
1146
|
+
*/
|
|
1147
|
+
"space-x-reverse": ["space-x-reverse"],
|
|
1148
|
+
/**
|
|
1149
|
+
* Space Between Y
|
|
1150
|
+
* @see https://tailwindcss.com/docs/margin#adding-space-between-children
|
|
1151
|
+
*/
|
|
1152
|
+
"space-y": [{
|
|
1153
|
+
"space-y": x()
|
|
1154
|
+
}],
|
|
1155
|
+
/**
|
|
1156
|
+
* Space Between Y Reverse
|
|
1157
|
+
* @see https://tailwindcss.com/docs/margin#adding-space-between-children
|
|
1158
|
+
*/
|
|
1159
|
+
"space-y-reverse": ["space-y-reverse"],
|
|
1160
|
+
// --------------
|
|
1161
|
+
// --- Sizing ---
|
|
1162
|
+
// --------------
|
|
1163
|
+
/**
|
|
1164
|
+
* Size
|
|
1165
|
+
* @see https://tailwindcss.com/docs/width#setting-both-width-and-height
|
|
1166
|
+
*/
|
|
1167
|
+
size: [{
|
|
1168
|
+
size: ne()
|
|
1169
|
+
}],
|
|
1170
|
+
/**
|
|
1171
|
+
* Width
|
|
1172
|
+
* @see https://tailwindcss.com/docs/width
|
|
1173
|
+
*/
|
|
1174
|
+
w: [{
|
|
1175
|
+
w: [f, "screen", ...ne()]
|
|
1176
|
+
}],
|
|
1177
|
+
/**
|
|
1178
|
+
* Min-Width
|
|
1179
|
+
* @see https://tailwindcss.com/docs/min-width
|
|
1180
|
+
*/
|
|
1181
|
+
"min-w": [{
|
|
1182
|
+
"min-w": [
|
|
1183
|
+
f,
|
|
1184
|
+
"screen",
|
|
1185
|
+
/** Deprecated. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
|
|
1186
|
+
"none",
|
|
1187
|
+
...ne()
|
|
1188
|
+
]
|
|
1189
|
+
}],
|
|
1190
|
+
/**
|
|
1191
|
+
* Max-Width
|
|
1192
|
+
* @see https://tailwindcss.com/docs/max-width
|
|
1193
|
+
*/
|
|
1194
|
+
"max-w": [{
|
|
1195
|
+
"max-w": [
|
|
1196
|
+
f,
|
|
1197
|
+
"screen",
|
|
1198
|
+
"none",
|
|
1199
|
+
/** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
|
|
1200
|
+
"prose",
|
|
1201
|
+
/** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
|
|
1202
|
+
{
|
|
1203
|
+
screen: [a]
|
|
1204
|
+
},
|
|
1205
|
+
...ne()
|
|
1206
|
+
]
|
|
1207
|
+
}],
|
|
1208
|
+
/**
|
|
1209
|
+
* Height
|
|
1210
|
+
* @see https://tailwindcss.com/docs/height
|
|
1211
|
+
*/
|
|
1212
|
+
h: [{
|
|
1213
|
+
h: ["screen", "lh", ...ne()]
|
|
1214
|
+
}],
|
|
1215
|
+
/**
|
|
1216
|
+
* Min-Height
|
|
1217
|
+
* @see https://tailwindcss.com/docs/min-height
|
|
1218
|
+
*/
|
|
1219
|
+
"min-h": [{
|
|
1220
|
+
"min-h": ["screen", "lh", "none", ...ne()]
|
|
1221
|
+
}],
|
|
1222
|
+
/**
|
|
1223
|
+
* Max-Height
|
|
1224
|
+
* @see https://tailwindcss.com/docs/max-height
|
|
1225
|
+
*/
|
|
1226
|
+
"max-h": [{
|
|
1227
|
+
"max-h": ["screen", "lh", ...ne()]
|
|
1228
|
+
}],
|
|
1229
|
+
// ------------------
|
|
1230
|
+
// --- Typography ---
|
|
1231
|
+
// ------------------
|
|
1232
|
+
/**
|
|
1233
|
+
* Font Size
|
|
1234
|
+
* @see https://tailwindcss.com/docs/font-size
|
|
1235
|
+
*/
|
|
1236
|
+
"font-size": [{
|
|
1237
|
+
text: ["base", r, qe, Ce]
|
|
1238
|
+
}],
|
|
1239
|
+
/**
|
|
1240
|
+
* Font Smoothing
|
|
1241
|
+
* @see https://tailwindcss.com/docs/font-smoothing
|
|
1242
|
+
*/
|
|
1243
|
+
"font-smoothing": ["antialiased", "subpixel-antialiased"],
|
|
1244
|
+
/**
|
|
1245
|
+
* Font Style
|
|
1246
|
+
* @see https://tailwindcss.com/docs/font-style
|
|
1247
|
+
*/
|
|
1248
|
+
"font-style": ["italic", "not-italic"],
|
|
1249
|
+
/**
|
|
1250
|
+
* Font Weight
|
|
1251
|
+
* @see https://tailwindcss.com/docs/font-weight
|
|
1252
|
+
*/
|
|
1253
|
+
"font-weight": [{
|
|
1254
|
+
font: [t, u, _e]
|
|
1255
|
+
}],
|
|
1256
|
+
/**
|
|
1257
|
+
* Font Stretch
|
|
1258
|
+
* @see https://tailwindcss.com/docs/font-stretch
|
|
1259
|
+
*/
|
|
1260
|
+
"font-stretch": [{
|
|
1261
|
+
"font-stretch": ["ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "normal", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded", Xe, c]
|
|
1262
|
+
}],
|
|
1263
|
+
/**
|
|
1264
|
+
* Font Family
|
|
1265
|
+
* @see https://tailwindcss.com/docs/font-family
|
|
1266
|
+
*/
|
|
1267
|
+
"font-family": [{
|
|
1268
|
+
font: [jr, c, o]
|
|
1269
|
+
}],
|
|
1270
|
+
/**
|
|
1271
|
+
* Font Variant Numeric
|
|
1272
|
+
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
1273
|
+
*/
|
|
1274
|
+
"fvn-normal": ["normal-nums"],
|
|
1275
|
+
/**
|
|
1276
|
+
* Font Variant Numeric
|
|
1277
|
+
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
1278
|
+
*/
|
|
1279
|
+
"fvn-ordinal": ["ordinal"],
|
|
1280
|
+
/**
|
|
1281
|
+
* Font Variant Numeric
|
|
1282
|
+
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
1283
|
+
*/
|
|
1284
|
+
"fvn-slashed-zero": ["slashed-zero"],
|
|
1285
|
+
/**
|
|
1286
|
+
* Font Variant Numeric
|
|
1287
|
+
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
1288
|
+
*/
|
|
1289
|
+
"fvn-figure": ["lining-nums", "oldstyle-nums"],
|
|
1290
|
+
/**
|
|
1291
|
+
* Font Variant Numeric
|
|
1292
|
+
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
1293
|
+
*/
|
|
1294
|
+
"fvn-spacing": ["proportional-nums", "tabular-nums"],
|
|
1295
|
+
/**
|
|
1296
|
+
* Font Variant Numeric
|
|
1297
|
+
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
1298
|
+
*/
|
|
1299
|
+
"fvn-fraction": ["diagonal-fractions", "stacked-fractions"],
|
|
1300
|
+
/**
|
|
1301
|
+
* Letter Spacing
|
|
1302
|
+
* @see https://tailwindcss.com/docs/letter-spacing
|
|
1303
|
+
*/
|
|
1304
|
+
tracking: [{
|
|
1305
|
+
tracking: [s, u, c]
|
|
1306
|
+
}],
|
|
1307
|
+
/**
|
|
1308
|
+
* Line Clamp
|
|
1309
|
+
* @see https://tailwindcss.com/docs/line-clamp
|
|
1310
|
+
*/
|
|
1311
|
+
"line-clamp": [{
|
|
1312
|
+
"line-clamp": [C, "none", u, _e]
|
|
1313
|
+
}],
|
|
1314
|
+
/**
|
|
1315
|
+
* Line Height
|
|
1316
|
+
* @see https://tailwindcss.com/docs/line-height
|
|
1317
|
+
*/
|
|
1318
|
+
leading: [{
|
|
1319
|
+
leading: [
|
|
1320
|
+
/** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
|
|
1321
|
+
i,
|
|
1322
|
+
...x()
|
|
1323
|
+
]
|
|
1324
|
+
}],
|
|
1325
|
+
/**
|
|
1326
|
+
* List Style Image
|
|
1327
|
+
* @see https://tailwindcss.com/docs/list-style-image
|
|
1328
|
+
*/
|
|
1329
|
+
"list-image": [{
|
|
1330
|
+
"list-image": ["none", u, c]
|
|
1331
|
+
}],
|
|
1332
|
+
/**
|
|
1333
|
+
* List Style Position
|
|
1334
|
+
* @see https://tailwindcss.com/docs/list-style-position
|
|
1335
|
+
*/
|
|
1336
|
+
"list-style-position": [{
|
|
1337
|
+
list: ["inside", "outside"]
|
|
1338
|
+
}],
|
|
1339
|
+
/**
|
|
1340
|
+
* List Style Type
|
|
1341
|
+
* @see https://tailwindcss.com/docs/list-style-type
|
|
1342
|
+
*/
|
|
1343
|
+
"list-style-type": [{
|
|
1344
|
+
list: ["disc", "decimal", "none", u, c]
|
|
1345
|
+
}],
|
|
1346
|
+
/**
|
|
1347
|
+
* Text Alignment
|
|
1348
|
+
* @see https://tailwindcss.com/docs/text-align
|
|
1349
|
+
*/
|
|
1350
|
+
"text-alignment": [{
|
|
1351
|
+
text: ["left", "center", "right", "justify", "start", "end"]
|
|
1352
|
+
}],
|
|
1353
|
+
/**
|
|
1354
|
+
* Placeholder Color
|
|
1355
|
+
* @deprecated since Tailwind CSS v3.0.0
|
|
1356
|
+
* @see https://v3.tailwindcss.com/docs/placeholder-color
|
|
1357
|
+
*/
|
|
1358
|
+
"placeholder-color": [{
|
|
1359
|
+
placeholder: v()
|
|
1360
|
+
}],
|
|
1361
|
+
/**
|
|
1362
|
+
* Text Color
|
|
1363
|
+
* @see https://tailwindcss.com/docs/text-color
|
|
1364
|
+
*/
|
|
1365
|
+
"text-color": [{
|
|
1366
|
+
text: v()
|
|
1367
|
+
}],
|
|
1368
|
+
/**
|
|
1369
|
+
* Text Decoration
|
|
1370
|
+
* @see https://tailwindcss.com/docs/text-decoration
|
|
1371
|
+
*/
|
|
1372
|
+
"text-decoration": ["underline", "overline", "line-through", "no-underline"],
|
|
1373
|
+
/**
|
|
1374
|
+
* Text Decoration Style
|
|
1375
|
+
* @see https://tailwindcss.com/docs/text-decoration-style
|
|
1376
|
+
*/
|
|
1377
|
+
"text-decoration-style": [{
|
|
1378
|
+
decoration: [...Ae(), "wavy"]
|
|
1379
|
+
}],
|
|
1380
|
+
/**
|
|
1381
|
+
* Text Decoration Thickness
|
|
1382
|
+
* @see https://tailwindcss.com/docs/text-decoration-thickness
|
|
1383
|
+
*/
|
|
1384
|
+
"text-decoration-thickness": [{
|
|
1385
|
+
decoration: [C, "from-font", "auto", u, Ce]
|
|
1386
|
+
}],
|
|
1387
|
+
/**
|
|
1388
|
+
* Text Decoration Color
|
|
1389
|
+
* @see https://tailwindcss.com/docs/text-decoration-color
|
|
1390
|
+
*/
|
|
1391
|
+
"text-decoration-color": [{
|
|
1392
|
+
decoration: v()
|
|
1393
|
+
}],
|
|
1394
|
+
/**
|
|
1395
|
+
* Text Underline Offset
|
|
1396
|
+
* @see https://tailwindcss.com/docs/text-underline-offset
|
|
1397
|
+
*/
|
|
1398
|
+
"underline-offset": [{
|
|
1399
|
+
"underline-offset": [C, "auto", u, c]
|
|
1400
|
+
}],
|
|
1401
|
+
/**
|
|
1402
|
+
* Text Transform
|
|
1403
|
+
* @see https://tailwindcss.com/docs/text-transform
|
|
1404
|
+
*/
|
|
1405
|
+
"text-transform": ["uppercase", "lowercase", "capitalize", "normal-case"],
|
|
1406
|
+
/**
|
|
1407
|
+
* Text Overflow
|
|
1408
|
+
* @see https://tailwindcss.com/docs/text-overflow
|
|
1409
|
+
*/
|
|
1410
|
+
"text-overflow": ["truncate", "text-ellipsis", "text-clip"],
|
|
1411
|
+
/**
|
|
1412
|
+
* Text Wrap
|
|
1413
|
+
* @see https://tailwindcss.com/docs/text-wrap
|
|
1414
|
+
*/
|
|
1415
|
+
"text-wrap": [{
|
|
1416
|
+
text: ["wrap", "nowrap", "balance", "pretty"]
|
|
1417
|
+
}],
|
|
1418
|
+
/**
|
|
1419
|
+
* Text Indent
|
|
1420
|
+
* @see https://tailwindcss.com/docs/text-indent
|
|
1421
|
+
*/
|
|
1422
|
+
indent: [{
|
|
1423
|
+
indent: x()
|
|
1424
|
+
}],
|
|
1425
|
+
/**
|
|
1426
|
+
* Vertical Alignment
|
|
1427
|
+
* @see https://tailwindcss.com/docs/vertical-align
|
|
1428
|
+
*/
|
|
1429
|
+
"vertical-align": [{
|
|
1430
|
+
align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", u, c]
|
|
1431
|
+
}],
|
|
1432
|
+
/**
|
|
1433
|
+
* Whitespace
|
|
1434
|
+
* @see https://tailwindcss.com/docs/whitespace
|
|
1435
|
+
*/
|
|
1436
|
+
whitespace: [{
|
|
1437
|
+
whitespace: ["normal", "nowrap", "pre", "pre-line", "pre-wrap", "break-spaces"]
|
|
1438
|
+
}],
|
|
1439
|
+
/**
|
|
1440
|
+
* Word Break
|
|
1441
|
+
* @see https://tailwindcss.com/docs/word-break
|
|
1442
|
+
*/
|
|
1443
|
+
break: [{
|
|
1444
|
+
break: ["normal", "words", "all", "keep"]
|
|
1445
|
+
}],
|
|
1446
|
+
/**
|
|
1447
|
+
* Overflow Wrap
|
|
1448
|
+
* @see https://tailwindcss.com/docs/overflow-wrap
|
|
1449
|
+
*/
|
|
1450
|
+
wrap: [{
|
|
1451
|
+
wrap: ["break-word", "anywhere", "normal"]
|
|
1452
|
+
}],
|
|
1453
|
+
/**
|
|
1454
|
+
* Hyphens
|
|
1455
|
+
* @see https://tailwindcss.com/docs/hyphens
|
|
1456
|
+
*/
|
|
1457
|
+
hyphens: [{
|
|
1458
|
+
hyphens: ["none", "manual", "auto"]
|
|
1459
|
+
}],
|
|
1460
|
+
/**
|
|
1461
|
+
* Content
|
|
1462
|
+
* @see https://tailwindcss.com/docs/content
|
|
1463
|
+
*/
|
|
1464
|
+
content: [{
|
|
1465
|
+
content: ["none", u, c]
|
|
1466
|
+
}],
|
|
1467
|
+
// -------------------
|
|
1468
|
+
// --- Backgrounds ---
|
|
1469
|
+
// -------------------
|
|
1470
|
+
/**
|
|
1471
|
+
* Background Attachment
|
|
1472
|
+
* @see https://tailwindcss.com/docs/background-attachment
|
|
1473
|
+
*/
|
|
1474
|
+
"bg-attachment": [{
|
|
1475
|
+
bg: ["fixed", "local", "scroll"]
|
|
1476
|
+
}],
|
|
1477
|
+
/**
|
|
1478
|
+
* Background Clip
|
|
1479
|
+
* @see https://tailwindcss.com/docs/background-clip
|
|
1480
|
+
*/
|
|
1481
|
+
"bg-clip": [{
|
|
1482
|
+
"bg-clip": ["border", "padding", "content", "text"]
|
|
1483
|
+
}],
|
|
1484
|
+
/**
|
|
1485
|
+
* Background Origin
|
|
1486
|
+
* @see https://tailwindcss.com/docs/background-origin
|
|
1487
|
+
*/
|
|
1488
|
+
"bg-origin": [{
|
|
1489
|
+
"bg-origin": ["border", "padding", "content"]
|
|
1490
|
+
}],
|
|
1491
|
+
/**
|
|
1492
|
+
* Background Position
|
|
1493
|
+
* @see https://tailwindcss.com/docs/background-position
|
|
1494
|
+
*/
|
|
1495
|
+
"bg-position": [{
|
|
1496
|
+
bg: Ue()
|
|
1497
|
+
}],
|
|
1498
|
+
/**
|
|
1499
|
+
* Background Repeat
|
|
1500
|
+
* @see https://tailwindcss.com/docs/background-repeat
|
|
1501
|
+
*/
|
|
1502
|
+
"bg-repeat": [{
|
|
1503
|
+
bg: Ne()
|
|
1504
|
+
}],
|
|
1505
|
+
/**
|
|
1506
|
+
* Background Size
|
|
1507
|
+
* @see https://tailwindcss.com/docs/background-size
|
|
1508
|
+
*/
|
|
1509
|
+
"bg-size": [{
|
|
1510
|
+
bg: pe()
|
|
1511
|
+
}],
|
|
1512
|
+
/**
|
|
1513
|
+
* Background Image
|
|
1514
|
+
* @see https://tailwindcss.com/docs/background-image
|
|
1515
|
+
*/
|
|
1516
|
+
"bg-image": [{
|
|
1517
|
+
bg: ["none", {
|
|
1518
|
+
linear: [{
|
|
1519
|
+
to: ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
|
|
1520
|
+
}, ye, u, c],
|
|
1521
|
+
radial: ["", u, c],
|
|
1522
|
+
conic: [ye, u, c]
|
|
1523
|
+
}, Gr, Nr]
|
|
1524
|
+
}],
|
|
1525
|
+
/**
|
|
1526
|
+
* Background Color
|
|
1527
|
+
* @see https://tailwindcss.com/docs/background-color
|
|
1528
|
+
*/
|
|
1529
|
+
"bg-color": [{
|
|
1530
|
+
bg: v()
|
|
1531
|
+
}],
|
|
1532
|
+
/**
|
|
1533
|
+
* Gradient Color Stops From Position
|
|
1534
|
+
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1535
|
+
*/
|
|
1536
|
+
"gradient-from-pos": [{
|
|
1537
|
+
from: ve()
|
|
1538
|
+
}],
|
|
1539
|
+
/**
|
|
1540
|
+
* Gradient Color Stops Via Position
|
|
1541
|
+
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1542
|
+
*/
|
|
1543
|
+
"gradient-via-pos": [{
|
|
1544
|
+
via: ve()
|
|
1545
|
+
}],
|
|
1546
|
+
/**
|
|
1547
|
+
* Gradient Color Stops To Position
|
|
1548
|
+
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1549
|
+
*/
|
|
1550
|
+
"gradient-to-pos": [{
|
|
1551
|
+
to: ve()
|
|
1552
|
+
}],
|
|
1553
|
+
/**
|
|
1554
|
+
* Gradient Color Stops From
|
|
1555
|
+
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1556
|
+
*/
|
|
1557
|
+
"gradient-from": [{
|
|
1558
|
+
from: v()
|
|
1559
|
+
}],
|
|
1560
|
+
/**
|
|
1561
|
+
* Gradient Color Stops Via
|
|
1562
|
+
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1563
|
+
*/
|
|
1564
|
+
"gradient-via": [{
|
|
1565
|
+
via: v()
|
|
1566
|
+
}],
|
|
1567
|
+
/**
|
|
1568
|
+
* Gradient Color Stops To
|
|
1569
|
+
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1570
|
+
*/
|
|
1571
|
+
"gradient-to": [{
|
|
1572
|
+
to: v()
|
|
1573
|
+
}],
|
|
1574
|
+
// ---------------
|
|
1575
|
+
// --- Borders ---
|
|
1576
|
+
// ---------------
|
|
1577
|
+
/**
|
|
1578
|
+
* Border Radius
|
|
1579
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1580
|
+
*/
|
|
1581
|
+
rounded: [{
|
|
1582
|
+
rounded: P()
|
|
1583
|
+
}],
|
|
1584
|
+
/**
|
|
1585
|
+
* Border Radius Start
|
|
1586
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1587
|
+
*/
|
|
1588
|
+
"rounded-s": [{
|
|
1589
|
+
"rounded-s": P()
|
|
1590
|
+
}],
|
|
1591
|
+
/**
|
|
1592
|
+
* Border Radius End
|
|
1593
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1594
|
+
*/
|
|
1595
|
+
"rounded-e": [{
|
|
1596
|
+
"rounded-e": P()
|
|
1597
|
+
}],
|
|
1598
|
+
/**
|
|
1599
|
+
* Border Radius Top
|
|
1600
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1601
|
+
*/
|
|
1602
|
+
"rounded-t": [{
|
|
1603
|
+
"rounded-t": P()
|
|
1604
|
+
}],
|
|
1605
|
+
/**
|
|
1606
|
+
* Border Radius Right
|
|
1607
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1608
|
+
*/
|
|
1609
|
+
"rounded-r": [{
|
|
1610
|
+
"rounded-r": P()
|
|
1611
|
+
}],
|
|
1612
|
+
/**
|
|
1613
|
+
* Border Radius Bottom
|
|
1614
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1615
|
+
*/
|
|
1616
|
+
"rounded-b": [{
|
|
1617
|
+
"rounded-b": P()
|
|
1618
|
+
}],
|
|
1619
|
+
/**
|
|
1620
|
+
* Border Radius Left
|
|
1621
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1622
|
+
*/
|
|
1623
|
+
"rounded-l": [{
|
|
1624
|
+
"rounded-l": P()
|
|
1625
|
+
}],
|
|
1626
|
+
/**
|
|
1627
|
+
* Border Radius Start Start
|
|
1628
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1629
|
+
*/
|
|
1630
|
+
"rounded-ss": [{
|
|
1631
|
+
"rounded-ss": P()
|
|
1632
|
+
}],
|
|
1633
|
+
/**
|
|
1634
|
+
* Border Radius Start End
|
|
1635
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1636
|
+
*/
|
|
1637
|
+
"rounded-se": [{
|
|
1638
|
+
"rounded-se": P()
|
|
1639
|
+
}],
|
|
1640
|
+
/**
|
|
1641
|
+
* Border Radius End End
|
|
1642
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1643
|
+
*/
|
|
1644
|
+
"rounded-ee": [{
|
|
1645
|
+
"rounded-ee": P()
|
|
1646
|
+
}],
|
|
1647
|
+
/**
|
|
1648
|
+
* Border Radius End Start
|
|
1649
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1650
|
+
*/
|
|
1651
|
+
"rounded-es": [{
|
|
1652
|
+
"rounded-es": P()
|
|
1653
|
+
}],
|
|
1654
|
+
/**
|
|
1655
|
+
* Border Radius Top Left
|
|
1656
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1657
|
+
*/
|
|
1658
|
+
"rounded-tl": [{
|
|
1659
|
+
"rounded-tl": P()
|
|
1660
|
+
}],
|
|
1661
|
+
/**
|
|
1662
|
+
* Border Radius Top Right
|
|
1663
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1664
|
+
*/
|
|
1665
|
+
"rounded-tr": [{
|
|
1666
|
+
"rounded-tr": P()
|
|
1667
|
+
}],
|
|
1668
|
+
/**
|
|
1669
|
+
* Border Radius Bottom Right
|
|
1670
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1671
|
+
*/
|
|
1672
|
+
"rounded-br": [{
|
|
1673
|
+
"rounded-br": P()
|
|
1674
|
+
}],
|
|
1675
|
+
/**
|
|
1676
|
+
* Border Radius Bottom Left
|
|
1677
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
1678
|
+
*/
|
|
1679
|
+
"rounded-bl": [{
|
|
1680
|
+
"rounded-bl": P()
|
|
1681
|
+
}],
|
|
1682
|
+
/**
|
|
1683
|
+
* Border Width
|
|
1684
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
1685
|
+
*/
|
|
1686
|
+
"border-w": [{
|
|
1687
|
+
border: D()
|
|
1688
|
+
}],
|
|
1689
|
+
/**
|
|
1690
|
+
* Border Width X
|
|
1691
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
1692
|
+
*/
|
|
1693
|
+
"border-w-x": [{
|
|
1694
|
+
"border-x": D()
|
|
1695
|
+
}],
|
|
1696
|
+
/**
|
|
1697
|
+
* Border Width Y
|
|
1698
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
1699
|
+
*/
|
|
1700
|
+
"border-w-y": [{
|
|
1701
|
+
"border-y": D()
|
|
1702
|
+
}],
|
|
1703
|
+
/**
|
|
1704
|
+
* Border Width Start
|
|
1705
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
1706
|
+
*/
|
|
1707
|
+
"border-w-s": [{
|
|
1708
|
+
"border-s": D()
|
|
1709
|
+
}],
|
|
1710
|
+
/**
|
|
1711
|
+
* Border Width End
|
|
1712
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
1713
|
+
*/
|
|
1714
|
+
"border-w-e": [{
|
|
1715
|
+
"border-e": D()
|
|
1716
|
+
}],
|
|
1717
|
+
/**
|
|
1718
|
+
* Border Width Top
|
|
1719
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
1720
|
+
*/
|
|
1721
|
+
"border-w-t": [{
|
|
1722
|
+
"border-t": D()
|
|
1723
|
+
}],
|
|
1724
|
+
/**
|
|
1725
|
+
* Border Width Right
|
|
1726
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
1727
|
+
*/
|
|
1728
|
+
"border-w-r": [{
|
|
1729
|
+
"border-r": D()
|
|
1730
|
+
}],
|
|
1731
|
+
/**
|
|
1732
|
+
* Border Width Bottom
|
|
1733
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
1734
|
+
*/
|
|
1735
|
+
"border-w-b": [{
|
|
1736
|
+
"border-b": D()
|
|
1737
|
+
}],
|
|
1738
|
+
/**
|
|
1739
|
+
* Border Width Left
|
|
1740
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
1741
|
+
*/
|
|
1742
|
+
"border-w-l": [{
|
|
1743
|
+
"border-l": D()
|
|
1744
|
+
}],
|
|
1745
|
+
/**
|
|
1746
|
+
* Divide Width X
|
|
1747
|
+
* @see https://tailwindcss.com/docs/border-width#between-children
|
|
1748
|
+
*/
|
|
1749
|
+
"divide-x": [{
|
|
1750
|
+
"divide-x": D()
|
|
1751
|
+
}],
|
|
1752
|
+
/**
|
|
1753
|
+
* Divide Width X Reverse
|
|
1754
|
+
* @see https://tailwindcss.com/docs/border-width#between-children
|
|
1755
|
+
*/
|
|
1756
|
+
"divide-x-reverse": ["divide-x-reverse"],
|
|
1757
|
+
/**
|
|
1758
|
+
* Divide Width Y
|
|
1759
|
+
* @see https://tailwindcss.com/docs/border-width#between-children
|
|
1760
|
+
*/
|
|
1761
|
+
"divide-y": [{
|
|
1762
|
+
"divide-y": D()
|
|
1763
|
+
}],
|
|
1764
|
+
/**
|
|
1765
|
+
* Divide Width Y Reverse
|
|
1766
|
+
* @see https://tailwindcss.com/docs/border-width#between-children
|
|
1767
|
+
*/
|
|
1768
|
+
"divide-y-reverse": ["divide-y-reverse"],
|
|
1769
|
+
/**
|
|
1770
|
+
* Border Style
|
|
1771
|
+
* @see https://tailwindcss.com/docs/border-style
|
|
1772
|
+
*/
|
|
1773
|
+
"border-style": [{
|
|
1774
|
+
border: [...Ae(), "hidden", "none"]
|
|
1775
|
+
}],
|
|
1776
|
+
/**
|
|
1777
|
+
* Divide Style
|
|
1778
|
+
* @see https://tailwindcss.com/docs/border-style#setting-the-divider-style
|
|
1779
|
+
*/
|
|
1780
|
+
"divide-style": [{
|
|
1781
|
+
divide: [...Ae(), "hidden", "none"]
|
|
1782
|
+
}],
|
|
1783
|
+
/**
|
|
1784
|
+
* Border Color
|
|
1785
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
1786
|
+
*/
|
|
1787
|
+
"border-color": [{
|
|
1788
|
+
border: v()
|
|
1789
|
+
}],
|
|
1790
|
+
/**
|
|
1791
|
+
* Border Color X
|
|
1792
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
1793
|
+
*/
|
|
1794
|
+
"border-color-x": [{
|
|
1795
|
+
"border-x": v()
|
|
1796
|
+
}],
|
|
1797
|
+
/**
|
|
1798
|
+
* Border Color Y
|
|
1799
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
1800
|
+
*/
|
|
1801
|
+
"border-color-y": [{
|
|
1802
|
+
"border-y": v()
|
|
1803
|
+
}],
|
|
1804
|
+
/**
|
|
1805
|
+
* Border Color S
|
|
1806
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
1807
|
+
*/
|
|
1808
|
+
"border-color-s": [{
|
|
1809
|
+
"border-s": v()
|
|
1810
|
+
}],
|
|
1811
|
+
/**
|
|
1812
|
+
* Border Color E
|
|
1813
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
1814
|
+
*/
|
|
1815
|
+
"border-color-e": [{
|
|
1816
|
+
"border-e": v()
|
|
1817
|
+
}],
|
|
1818
|
+
/**
|
|
1819
|
+
* Border Color Top
|
|
1820
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
1821
|
+
*/
|
|
1822
|
+
"border-color-t": [{
|
|
1823
|
+
"border-t": v()
|
|
1824
|
+
}],
|
|
1825
|
+
/**
|
|
1826
|
+
* Border Color Right
|
|
1827
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
1828
|
+
*/
|
|
1829
|
+
"border-color-r": [{
|
|
1830
|
+
"border-r": v()
|
|
1831
|
+
}],
|
|
1832
|
+
/**
|
|
1833
|
+
* Border Color Bottom
|
|
1834
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
1835
|
+
*/
|
|
1836
|
+
"border-color-b": [{
|
|
1837
|
+
"border-b": v()
|
|
1838
|
+
}],
|
|
1839
|
+
/**
|
|
1840
|
+
* Border Color Left
|
|
1841
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
1842
|
+
*/
|
|
1843
|
+
"border-color-l": [{
|
|
1844
|
+
"border-l": v()
|
|
1845
|
+
}],
|
|
1846
|
+
/**
|
|
1847
|
+
* Divide Color
|
|
1848
|
+
* @see https://tailwindcss.com/docs/divide-color
|
|
1849
|
+
*/
|
|
1850
|
+
"divide-color": [{
|
|
1851
|
+
divide: v()
|
|
1852
|
+
}],
|
|
1853
|
+
/**
|
|
1854
|
+
* Outline Style
|
|
1855
|
+
* @see https://tailwindcss.com/docs/outline-style
|
|
1856
|
+
*/
|
|
1857
|
+
"outline-style": [{
|
|
1858
|
+
outline: [...Ae(), "none", "hidden"]
|
|
1859
|
+
}],
|
|
1860
|
+
/**
|
|
1861
|
+
* Outline Offset
|
|
1862
|
+
* @see https://tailwindcss.com/docs/outline-offset
|
|
1863
|
+
*/
|
|
1864
|
+
"outline-offset": [{
|
|
1865
|
+
"outline-offset": [C, u, c]
|
|
1866
|
+
}],
|
|
1867
|
+
/**
|
|
1868
|
+
* Outline Width
|
|
1869
|
+
* @see https://tailwindcss.com/docs/outline-width
|
|
1870
|
+
*/
|
|
1871
|
+
"outline-w": [{
|
|
1872
|
+
outline: ["", C, qe, Ce]
|
|
1873
|
+
}],
|
|
1874
|
+
/**
|
|
1875
|
+
* Outline Color
|
|
1876
|
+
* @see https://tailwindcss.com/docs/outline-color
|
|
1877
|
+
*/
|
|
1878
|
+
"outline-color": [{
|
|
1879
|
+
outline: v()
|
|
1880
|
+
}],
|
|
1881
|
+
// ---------------
|
|
1882
|
+
// --- Effects ---
|
|
1883
|
+
// ---------------
|
|
1884
|
+
/**
|
|
1885
|
+
* Box Shadow
|
|
1886
|
+
* @see https://tailwindcss.com/docs/box-shadow
|
|
1887
|
+
*/
|
|
1888
|
+
shadow: [{
|
|
1889
|
+
shadow: [
|
|
1890
|
+
// Deprecated since Tailwind CSS v4.0.0
|
|
1891
|
+
"",
|
|
1892
|
+
"none",
|
|
1893
|
+
m,
|
|
1894
|
+
Ye,
|
|
1895
|
+
Ke
|
|
1896
|
+
]
|
|
1897
|
+
}],
|
|
1898
|
+
/**
|
|
1899
|
+
* Box Shadow Color
|
|
1900
|
+
* @see https://tailwindcss.com/docs/box-shadow#setting-the-shadow-color
|
|
1901
|
+
*/
|
|
1902
|
+
"shadow-color": [{
|
|
1903
|
+
shadow: v()
|
|
1904
|
+
}],
|
|
1905
|
+
/**
|
|
1906
|
+
* Inset Box Shadow
|
|
1907
|
+
* @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-shadow
|
|
1908
|
+
*/
|
|
1909
|
+
"inset-shadow": [{
|
|
1910
|
+
"inset-shadow": ["none", A, Ye, Ke]
|
|
1911
|
+
}],
|
|
1912
|
+
/**
|
|
1913
|
+
* Inset Box Shadow Color
|
|
1914
|
+
* @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-shadow-color
|
|
1915
|
+
*/
|
|
1916
|
+
"inset-shadow-color": [{
|
|
1917
|
+
"inset-shadow": v()
|
|
1918
|
+
}],
|
|
1919
|
+
/**
|
|
1920
|
+
* Ring Width
|
|
1921
|
+
* @see https://tailwindcss.com/docs/box-shadow#adding-a-ring
|
|
1922
|
+
*/
|
|
1923
|
+
"ring-w": [{
|
|
1924
|
+
ring: D()
|
|
1925
|
+
}],
|
|
1926
|
+
/**
|
|
1927
|
+
* Ring Width Inset
|
|
1928
|
+
* @see https://v3.tailwindcss.com/docs/ring-width#inset-rings
|
|
1929
|
+
* @deprecated since Tailwind CSS v4.0.0
|
|
1930
|
+
* @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
|
|
1931
|
+
*/
|
|
1932
|
+
"ring-w-inset": ["ring-inset"],
|
|
1933
|
+
/**
|
|
1934
|
+
* Ring Color
|
|
1935
|
+
* @see https://tailwindcss.com/docs/box-shadow#setting-the-ring-color
|
|
1936
|
+
*/
|
|
1937
|
+
"ring-color": [{
|
|
1938
|
+
ring: v()
|
|
1939
|
+
}],
|
|
1940
|
+
/**
|
|
1941
|
+
* Ring Offset Width
|
|
1942
|
+
* @see https://v3.tailwindcss.com/docs/ring-offset-width
|
|
1943
|
+
* @deprecated since Tailwind CSS v4.0.0
|
|
1944
|
+
* @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
|
|
1945
|
+
*/
|
|
1946
|
+
"ring-offset-w": [{
|
|
1947
|
+
"ring-offset": [C, Ce]
|
|
1948
|
+
}],
|
|
1949
|
+
/**
|
|
1950
|
+
* Ring Offset Color
|
|
1951
|
+
* @see https://v3.tailwindcss.com/docs/ring-offset-color
|
|
1952
|
+
* @deprecated since Tailwind CSS v4.0.0
|
|
1953
|
+
* @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
|
|
1954
|
+
*/
|
|
1955
|
+
"ring-offset-color": [{
|
|
1956
|
+
"ring-offset": v()
|
|
1957
|
+
}],
|
|
1958
|
+
/**
|
|
1959
|
+
* Inset Ring Width
|
|
1960
|
+
* @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-ring
|
|
1961
|
+
*/
|
|
1962
|
+
"inset-ring-w": [{
|
|
1963
|
+
"inset-ring": D()
|
|
1964
|
+
}],
|
|
1965
|
+
/**
|
|
1966
|
+
* Inset Ring Color
|
|
1967
|
+
* @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-ring-color
|
|
1968
|
+
*/
|
|
1969
|
+
"inset-ring-color": [{
|
|
1970
|
+
"inset-ring": v()
|
|
1971
|
+
}],
|
|
1972
|
+
/**
|
|
1973
|
+
* Text Shadow
|
|
1974
|
+
* @see https://tailwindcss.com/docs/text-shadow
|
|
1975
|
+
*/
|
|
1976
|
+
"text-shadow": [{
|
|
1977
|
+
"text-shadow": ["none", K, Ye, Ke]
|
|
1978
|
+
}],
|
|
1979
|
+
/**
|
|
1980
|
+
* Text Shadow Color
|
|
1981
|
+
* @see https://tailwindcss.com/docs/text-shadow#setting-the-shadow-color
|
|
1982
|
+
*/
|
|
1983
|
+
"text-shadow-color": [{
|
|
1984
|
+
"text-shadow": v()
|
|
1985
|
+
}],
|
|
1986
|
+
/**
|
|
1987
|
+
* Opacity
|
|
1988
|
+
* @see https://tailwindcss.com/docs/opacity
|
|
1989
|
+
*/
|
|
1990
|
+
opacity: [{
|
|
1991
|
+
opacity: [C, u, c]
|
|
1992
|
+
}],
|
|
1993
|
+
/**
|
|
1994
|
+
* Mix Blend Mode
|
|
1995
|
+
* @see https://tailwindcss.com/docs/mix-blend-mode
|
|
1996
|
+
*/
|
|
1997
|
+
"mix-blend": [{
|
|
1998
|
+
"mix-blend": [...Ie(), "plus-darker", "plus-lighter"]
|
|
1999
|
+
}],
|
|
2000
|
+
/**
|
|
2001
|
+
* Background Blend Mode
|
|
2002
|
+
* @see https://tailwindcss.com/docs/background-blend-mode
|
|
2003
|
+
*/
|
|
2004
|
+
"bg-blend": [{
|
|
2005
|
+
"bg-blend": Ie()
|
|
2006
|
+
}],
|
|
2007
|
+
/**
|
|
2008
|
+
* Mask Clip
|
|
2009
|
+
* @see https://tailwindcss.com/docs/mask-clip
|
|
2010
|
+
*/
|
|
2011
|
+
"mask-clip": [{
|
|
2012
|
+
"mask-clip": ["border", "padding", "content", "fill", "stroke", "view"]
|
|
2013
|
+
}, "mask-no-clip"],
|
|
2014
|
+
/**
|
|
2015
|
+
* Mask Composite
|
|
2016
|
+
* @see https://tailwindcss.com/docs/mask-composite
|
|
2017
|
+
*/
|
|
2018
|
+
"mask-composite": [{
|
|
2019
|
+
mask: ["add", "subtract", "intersect", "exclude"]
|
|
2020
|
+
}],
|
|
2021
|
+
/**
|
|
2022
|
+
* Mask Image
|
|
2023
|
+
* @see https://tailwindcss.com/docs/mask-image
|
|
2024
|
+
*/
|
|
2025
|
+
"mask-image-linear-pos": [{
|
|
2026
|
+
"mask-linear": [C]
|
|
2027
|
+
}],
|
|
2028
|
+
"mask-image-linear-from-pos": [{
|
|
2029
|
+
"mask-linear-from": $()
|
|
2030
|
+
}],
|
|
2031
|
+
"mask-image-linear-to-pos": [{
|
|
2032
|
+
"mask-linear-to": $()
|
|
2033
|
+
}],
|
|
2034
|
+
"mask-image-linear-from-color": [{
|
|
2035
|
+
"mask-linear-from": v()
|
|
2036
|
+
}],
|
|
2037
|
+
"mask-image-linear-to-color": [{
|
|
2038
|
+
"mask-linear-to": v()
|
|
2039
|
+
}],
|
|
2040
|
+
"mask-image-t-from-pos": [{
|
|
2041
|
+
"mask-t-from": $()
|
|
2042
|
+
}],
|
|
2043
|
+
"mask-image-t-to-pos": [{
|
|
2044
|
+
"mask-t-to": $()
|
|
2045
|
+
}],
|
|
2046
|
+
"mask-image-t-from-color": [{
|
|
2047
|
+
"mask-t-from": v()
|
|
2048
|
+
}],
|
|
2049
|
+
"mask-image-t-to-color": [{
|
|
2050
|
+
"mask-t-to": v()
|
|
2051
|
+
}],
|
|
2052
|
+
"mask-image-r-from-pos": [{
|
|
2053
|
+
"mask-r-from": $()
|
|
2054
|
+
}],
|
|
2055
|
+
"mask-image-r-to-pos": [{
|
|
2056
|
+
"mask-r-to": $()
|
|
2057
|
+
}],
|
|
2058
|
+
"mask-image-r-from-color": [{
|
|
2059
|
+
"mask-r-from": v()
|
|
2060
|
+
}],
|
|
2061
|
+
"mask-image-r-to-color": [{
|
|
2062
|
+
"mask-r-to": v()
|
|
2063
|
+
}],
|
|
2064
|
+
"mask-image-b-from-pos": [{
|
|
2065
|
+
"mask-b-from": $()
|
|
2066
|
+
}],
|
|
2067
|
+
"mask-image-b-to-pos": [{
|
|
2068
|
+
"mask-b-to": $()
|
|
2069
|
+
}],
|
|
2070
|
+
"mask-image-b-from-color": [{
|
|
2071
|
+
"mask-b-from": v()
|
|
2072
|
+
}],
|
|
2073
|
+
"mask-image-b-to-color": [{
|
|
2074
|
+
"mask-b-to": v()
|
|
2075
|
+
}],
|
|
2076
|
+
"mask-image-l-from-pos": [{
|
|
2077
|
+
"mask-l-from": $()
|
|
2078
|
+
}],
|
|
2079
|
+
"mask-image-l-to-pos": [{
|
|
2080
|
+
"mask-l-to": $()
|
|
2081
|
+
}],
|
|
2082
|
+
"mask-image-l-from-color": [{
|
|
2083
|
+
"mask-l-from": v()
|
|
2084
|
+
}],
|
|
2085
|
+
"mask-image-l-to-color": [{
|
|
2086
|
+
"mask-l-to": v()
|
|
2087
|
+
}],
|
|
2088
|
+
"mask-image-x-from-pos": [{
|
|
2089
|
+
"mask-x-from": $()
|
|
2090
|
+
}],
|
|
2091
|
+
"mask-image-x-to-pos": [{
|
|
2092
|
+
"mask-x-to": $()
|
|
2093
|
+
}],
|
|
2094
|
+
"mask-image-x-from-color": [{
|
|
2095
|
+
"mask-x-from": v()
|
|
2096
|
+
}],
|
|
2097
|
+
"mask-image-x-to-color": [{
|
|
2098
|
+
"mask-x-to": v()
|
|
2099
|
+
}],
|
|
2100
|
+
"mask-image-y-from-pos": [{
|
|
2101
|
+
"mask-y-from": $()
|
|
2102
|
+
}],
|
|
2103
|
+
"mask-image-y-to-pos": [{
|
|
2104
|
+
"mask-y-to": $()
|
|
2105
|
+
}],
|
|
2106
|
+
"mask-image-y-from-color": [{
|
|
2107
|
+
"mask-y-from": v()
|
|
2108
|
+
}],
|
|
2109
|
+
"mask-image-y-to-color": [{
|
|
2110
|
+
"mask-y-to": v()
|
|
2111
|
+
}],
|
|
2112
|
+
"mask-image-radial": [{
|
|
2113
|
+
"mask-radial": [u, c]
|
|
2114
|
+
}],
|
|
2115
|
+
"mask-image-radial-from-pos": [{
|
|
2116
|
+
"mask-radial-from": $()
|
|
2117
|
+
}],
|
|
2118
|
+
"mask-image-radial-to-pos": [{
|
|
2119
|
+
"mask-radial-to": $()
|
|
2120
|
+
}],
|
|
2121
|
+
"mask-image-radial-from-color": [{
|
|
2122
|
+
"mask-radial-from": v()
|
|
2123
|
+
}],
|
|
2124
|
+
"mask-image-radial-to-color": [{
|
|
2125
|
+
"mask-radial-to": v()
|
|
2126
|
+
}],
|
|
2127
|
+
"mask-image-radial-shape": [{
|
|
2128
|
+
"mask-radial": ["circle", "ellipse"]
|
|
2129
|
+
}],
|
|
2130
|
+
"mask-image-radial-size": [{
|
|
2131
|
+
"mask-radial": [{
|
|
2132
|
+
closest: ["side", "corner"],
|
|
2133
|
+
farthest: ["side", "corner"]
|
|
2134
|
+
}]
|
|
2135
|
+
}],
|
|
2136
|
+
"mask-image-radial-pos": [{
|
|
2137
|
+
"mask-radial-at": de()
|
|
2138
|
+
}],
|
|
2139
|
+
"mask-image-conic-pos": [{
|
|
2140
|
+
"mask-conic": [C]
|
|
2141
|
+
}],
|
|
2142
|
+
"mask-image-conic-from-pos": [{
|
|
2143
|
+
"mask-conic-from": $()
|
|
2144
|
+
}],
|
|
2145
|
+
"mask-image-conic-to-pos": [{
|
|
2146
|
+
"mask-conic-to": $()
|
|
2147
|
+
}],
|
|
2148
|
+
"mask-image-conic-from-color": [{
|
|
2149
|
+
"mask-conic-from": v()
|
|
2150
|
+
}],
|
|
2151
|
+
"mask-image-conic-to-color": [{
|
|
2152
|
+
"mask-conic-to": v()
|
|
2153
|
+
}],
|
|
2154
|
+
/**
|
|
2155
|
+
* Mask Mode
|
|
2156
|
+
* @see https://tailwindcss.com/docs/mask-mode
|
|
2157
|
+
*/
|
|
2158
|
+
"mask-mode": [{
|
|
2159
|
+
mask: ["alpha", "luminance", "match"]
|
|
2160
|
+
}],
|
|
2161
|
+
/**
|
|
2162
|
+
* Mask Origin
|
|
2163
|
+
* @see https://tailwindcss.com/docs/mask-origin
|
|
2164
|
+
*/
|
|
2165
|
+
"mask-origin": [{
|
|
2166
|
+
"mask-origin": ["border", "padding", "content", "fill", "stroke", "view"]
|
|
2167
|
+
}],
|
|
2168
|
+
/**
|
|
2169
|
+
* Mask Position
|
|
2170
|
+
* @see https://tailwindcss.com/docs/mask-position
|
|
2171
|
+
*/
|
|
2172
|
+
"mask-position": [{
|
|
2173
|
+
mask: Ue()
|
|
2174
|
+
}],
|
|
2175
|
+
/**
|
|
2176
|
+
* Mask Repeat
|
|
2177
|
+
* @see https://tailwindcss.com/docs/mask-repeat
|
|
2178
|
+
*/
|
|
2179
|
+
"mask-repeat": [{
|
|
2180
|
+
mask: Ne()
|
|
2181
|
+
}],
|
|
2182
|
+
/**
|
|
2183
|
+
* Mask Size
|
|
2184
|
+
* @see https://tailwindcss.com/docs/mask-size
|
|
2185
|
+
*/
|
|
2186
|
+
"mask-size": [{
|
|
2187
|
+
mask: pe()
|
|
2188
|
+
}],
|
|
2189
|
+
/**
|
|
2190
|
+
* Mask Type
|
|
2191
|
+
* @see https://tailwindcss.com/docs/mask-type
|
|
2192
|
+
*/
|
|
2193
|
+
"mask-type": [{
|
|
2194
|
+
"mask-type": ["alpha", "luminance"]
|
|
2195
|
+
}],
|
|
2196
|
+
/**
|
|
2197
|
+
* Mask Image
|
|
2198
|
+
* @see https://tailwindcss.com/docs/mask-image
|
|
2199
|
+
*/
|
|
2200
|
+
"mask-image": [{
|
|
2201
|
+
mask: ["none", u, c]
|
|
2202
|
+
}],
|
|
2203
|
+
// ---------------
|
|
2204
|
+
// --- Filters ---
|
|
2205
|
+
// ---------------
|
|
2206
|
+
/**
|
|
2207
|
+
* Filter
|
|
2208
|
+
* @see https://tailwindcss.com/docs/filter
|
|
2209
|
+
*/
|
|
2210
|
+
filter: [{
|
|
2211
|
+
filter: [
|
|
2212
|
+
// Deprecated since Tailwind CSS v3.0.0
|
|
2213
|
+
"",
|
|
2214
|
+
"none",
|
|
2215
|
+
u,
|
|
2216
|
+
c
|
|
2217
|
+
]
|
|
2218
|
+
}],
|
|
2219
|
+
/**
|
|
2220
|
+
* Blur
|
|
2221
|
+
* @see https://tailwindcss.com/docs/blur
|
|
2222
|
+
*/
|
|
2223
|
+
blur: [{
|
|
2224
|
+
blur: je()
|
|
2225
|
+
}],
|
|
2226
|
+
/**
|
|
2227
|
+
* Brightness
|
|
2228
|
+
* @see https://tailwindcss.com/docs/brightness
|
|
2229
|
+
*/
|
|
2230
|
+
brightness: [{
|
|
2231
|
+
brightness: [C, u, c]
|
|
2232
|
+
}],
|
|
2233
|
+
/**
|
|
2234
|
+
* Contrast
|
|
2235
|
+
* @see https://tailwindcss.com/docs/contrast
|
|
2236
|
+
*/
|
|
2237
|
+
contrast: [{
|
|
2238
|
+
contrast: [C, u, c]
|
|
2239
|
+
}],
|
|
2240
|
+
/**
|
|
2241
|
+
* Drop Shadow
|
|
2242
|
+
* @see https://tailwindcss.com/docs/drop-shadow
|
|
2243
|
+
*/
|
|
2244
|
+
"drop-shadow": [{
|
|
2245
|
+
"drop-shadow": [
|
|
2246
|
+
// Deprecated since Tailwind CSS v4.0.0
|
|
2247
|
+
"",
|
|
2248
|
+
"none",
|
|
2249
|
+
L,
|
|
2250
|
+
Ye,
|
|
2251
|
+
Ke
|
|
2252
|
+
]
|
|
2253
|
+
}],
|
|
2254
|
+
/**
|
|
2255
|
+
* Drop Shadow Color
|
|
2256
|
+
* @see https://tailwindcss.com/docs/filter-drop-shadow#setting-the-shadow-color
|
|
2257
|
+
*/
|
|
2258
|
+
"drop-shadow-color": [{
|
|
2259
|
+
"drop-shadow": v()
|
|
2260
|
+
}],
|
|
2261
|
+
/**
|
|
2262
|
+
* Grayscale
|
|
2263
|
+
* @see https://tailwindcss.com/docs/grayscale
|
|
2264
|
+
*/
|
|
2265
|
+
grayscale: [{
|
|
2266
|
+
grayscale: ["", C, u, c]
|
|
2267
|
+
}],
|
|
2268
|
+
/**
|
|
2269
|
+
* Hue Rotate
|
|
2270
|
+
* @see https://tailwindcss.com/docs/hue-rotate
|
|
2271
|
+
*/
|
|
2272
|
+
"hue-rotate": [{
|
|
2273
|
+
"hue-rotate": [C, u, c]
|
|
2274
|
+
}],
|
|
2275
|
+
/**
|
|
2276
|
+
* Invert
|
|
2277
|
+
* @see https://tailwindcss.com/docs/invert
|
|
2278
|
+
*/
|
|
2279
|
+
invert: [{
|
|
2280
|
+
invert: ["", C, u, c]
|
|
2281
|
+
}],
|
|
2282
|
+
/**
|
|
2283
|
+
* Saturate
|
|
2284
|
+
* @see https://tailwindcss.com/docs/saturate
|
|
2285
|
+
*/
|
|
2286
|
+
saturate: [{
|
|
2287
|
+
saturate: [C, u, c]
|
|
2288
|
+
}],
|
|
2289
|
+
/**
|
|
2290
|
+
* Sepia
|
|
2291
|
+
* @see https://tailwindcss.com/docs/sepia
|
|
2292
|
+
*/
|
|
2293
|
+
sepia: [{
|
|
2294
|
+
sepia: ["", C, u, c]
|
|
2295
|
+
}],
|
|
2296
|
+
/**
|
|
2297
|
+
* Backdrop Filter
|
|
2298
|
+
* @see https://tailwindcss.com/docs/backdrop-filter
|
|
2299
|
+
*/
|
|
2300
|
+
"backdrop-filter": [{
|
|
2301
|
+
"backdrop-filter": [
|
|
2302
|
+
// Deprecated since Tailwind CSS v3.0.0
|
|
2303
|
+
"",
|
|
2304
|
+
"none",
|
|
2305
|
+
u,
|
|
2306
|
+
c
|
|
2307
|
+
]
|
|
2308
|
+
}],
|
|
2309
|
+
/**
|
|
2310
|
+
* Backdrop Blur
|
|
2311
|
+
* @see https://tailwindcss.com/docs/backdrop-blur
|
|
2312
|
+
*/
|
|
2313
|
+
"backdrop-blur": [{
|
|
2314
|
+
"backdrop-blur": je()
|
|
2315
|
+
}],
|
|
2316
|
+
/**
|
|
2317
|
+
* Backdrop Brightness
|
|
2318
|
+
* @see https://tailwindcss.com/docs/backdrop-brightness
|
|
2319
|
+
*/
|
|
2320
|
+
"backdrop-brightness": [{
|
|
2321
|
+
"backdrop-brightness": [C, u, c]
|
|
2322
|
+
}],
|
|
2323
|
+
/**
|
|
2324
|
+
* Backdrop Contrast
|
|
2325
|
+
* @see https://tailwindcss.com/docs/backdrop-contrast
|
|
2326
|
+
*/
|
|
2327
|
+
"backdrop-contrast": [{
|
|
2328
|
+
"backdrop-contrast": [C, u, c]
|
|
2329
|
+
}],
|
|
2330
|
+
/**
|
|
2331
|
+
* Backdrop Grayscale
|
|
2332
|
+
* @see https://tailwindcss.com/docs/backdrop-grayscale
|
|
2333
|
+
*/
|
|
2334
|
+
"backdrop-grayscale": [{
|
|
2335
|
+
"backdrop-grayscale": ["", C, u, c]
|
|
2336
|
+
}],
|
|
2337
|
+
/**
|
|
2338
|
+
* Backdrop Hue Rotate
|
|
2339
|
+
* @see https://tailwindcss.com/docs/backdrop-hue-rotate
|
|
2340
|
+
*/
|
|
2341
|
+
"backdrop-hue-rotate": [{
|
|
2342
|
+
"backdrop-hue-rotate": [C, u, c]
|
|
2343
|
+
}],
|
|
2344
|
+
/**
|
|
2345
|
+
* Backdrop Invert
|
|
2346
|
+
* @see https://tailwindcss.com/docs/backdrop-invert
|
|
2347
|
+
*/
|
|
2348
|
+
"backdrop-invert": [{
|
|
2349
|
+
"backdrop-invert": ["", C, u, c]
|
|
2350
|
+
}],
|
|
2351
|
+
/**
|
|
2352
|
+
* Backdrop Opacity
|
|
2353
|
+
* @see https://tailwindcss.com/docs/backdrop-opacity
|
|
2354
|
+
*/
|
|
2355
|
+
"backdrop-opacity": [{
|
|
2356
|
+
"backdrop-opacity": [C, u, c]
|
|
2357
|
+
}],
|
|
2358
|
+
/**
|
|
2359
|
+
* Backdrop Saturate
|
|
2360
|
+
* @see https://tailwindcss.com/docs/backdrop-saturate
|
|
2361
|
+
*/
|
|
2362
|
+
"backdrop-saturate": [{
|
|
2363
|
+
"backdrop-saturate": [C, u, c]
|
|
2364
|
+
}],
|
|
2365
|
+
/**
|
|
2366
|
+
* Backdrop Sepia
|
|
2367
|
+
* @see https://tailwindcss.com/docs/backdrop-sepia
|
|
2368
|
+
*/
|
|
2369
|
+
"backdrop-sepia": [{
|
|
2370
|
+
"backdrop-sepia": ["", C, u, c]
|
|
2371
|
+
}],
|
|
2372
|
+
// --------------
|
|
2373
|
+
// --- Tables ---
|
|
2374
|
+
// --------------
|
|
2375
|
+
/**
|
|
2376
|
+
* Border Collapse
|
|
2377
|
+
* @see https://tailwindcss.com/docs/border-collapse
|
|
2378
|
+
*/
|
|
2379
|
+
"border-collapse": [{
|
|
2380
|
+
border: ["collapse", "separate"]
|
|
2381
|
+
}],
|
|
2382
|
+
/**
|
|
2383
|
+
* Border Spacing
|
|
2384
|
+
* @see https://tailwindcss.com/docs/border-spacing
|
|
2385
|
+
*/
|
|
2386
|
+
"border-spacing": [{
|
|
2387
|
+
"border-spacing": x()
|
|
2388
|
+
}],
|
|
2389
|
+
/**
|
|
2390
|
+
* Border Spacing X
|
|
2391
|
+
* @see https://tailwindcss.com/docs/border-spacing
|
|
2392
|
+
*/
|
|
2393
|
+
"border-spacing-x": [{
|
|
2394
|
+
"border-spacing-x": x()
|
|
2395
|
+
}],
|
|
2396
|
+
/**
|
|
2397
|
+
* Border Spacing Y
|
|
2398
|
+
* @see https://tailwindcss.com/docs/border-spacing
|
|
2399
|
+
*/
|
|
2400
|
+
"border-spacing-y": [{
|
|
2401
|
+
"border-spacing-y": x()
|
|
2402
|
+
}],
|
|
2403
|
+
/**
|
|
2404
|
+
* Table Layout
|
|
2405
|
+
* @see https://tailwindcss.com/docs/table-layout
|
|
2406
|
+
*/
|
|
2407
|
+
"table-layout": [{
|
|
2408
|
+
table: ["auto", "fixed"]
|
|
2409
|
+
}],
|
|
2410
|
+
/**
|
|
2411
|
+
* Caption Side
|
|
2412
|
+
* @see https://tailwindcss.com/docs/caption-side
|
|
2413
|
+
*/
|
|
2414
|
+
caption: [{
|
|
2415
|
+
caption: ["top", "bottom"]
|
|
2416
|
+
}],
|
|
2417
|
+
// ---------------------------------
|
|
2418
|
+
// --- Transitions and Animation ---
|
|
2419
|
+
// ---------------------------------
|
|
2420
|
+
/**
|
|
2421
|
+
* Transition Property
|
|
2422
|
+
* @see https://tailwindcss.com/docs/transition-property
|
|
2423
|
+
*/
|
|
2424
|
+
transition: [{
|
|
2425
|
+
transition: ["", "all", "colors", "opacity", "shadow", "transform", "none", u, c]
|
|
2426
|
+
}],
|
|
2427
|
+
/**
|
|
2428
|
+
* Transition Behavior
|
|
2429
|
+
* @see https://tailwindcss.com/docs/transition-behavior
|
|
2430
|
+
*/
|
|
2431
|
+
"transition-behavior": [{
|
|
2432
|
+
transition: ["normal", "discrete"]
|
|
2433
|
+
}],
|
|
2434
|
+
/**
|
|
2435
|
+
* Transition Duration
|
|
2436
|
+
* @see https://tailwindcss.com/docs/transition-duration
|
|
2437
|
+
*/
|
|
2438
|
+
duration: [{
|
|
2439
|
+
duration: [C, "initial", u, c]
|
|
2440
|
+
}],
|
|
2441
|
+
/**
|
|
2442
|
+
* Transition Timing Function
|
|
2443
|
+
* @see https://tailwindcss.com/docs/transition-timing-function
|
|
2444
|
+
*/
|
|
2445
|
+
ease: [{
|
|
2446
|
+
ease: ["linear", "initial", Q, u, c]
|
|
2447
|
+
}],
|
|
2448
|
+
/**
|
|
2449
|
+
* Transition Delay
|
|
2450
|
+
* @see https://tailwindcss.com/docs/transition-delay
|
|
2451
|
+
*/
|
|
2452
|
+
delay: [{
|
|
2453
|
+
delay: [C, u, c]
|
|
2454
|
+
}],
|
|
2455
|
+
/**
|
|
2456
|
+
* Animation
|
|
2457
|
+
* @see https://tailwindcss.com/docs/animation
|
|
2458
|
+
*/
|
|
2459
|
+
animate: [{
|
|
2460
|
+
animate: ["none", Se, u, c]
|
|
2461
|
+
}],
|
|
2462
|
+
// ------------------
|
|
2463
|
+
// --- Transforms ---
|
|
2464
|
+
// ------------------
|
|
2465
|
+
/**
|
|
2466
|
+
* Backface Visibility
|
|
2467
|
+
* @see https://tailwindcss.com/docs/backface-visibility
|
|
2468
|
+
*/
|
|
2469
|
+
backface: [{
|
|
2470
|
+
backface: ["hidden", "visible"]
|
|
2471
|
+
}],
|
|
2472
|
+
/**
|
|
2473
|
+
* Perspective
|
|
2474
|
+
* @see https://tailwindcss.com/docs/perspective
|
|
2475
|
+
*/
|
|
2476
|
+
perspective: [{
|
|
2477
|
+
perspective: [V, u, c]
|
|
2478
|
+
}],
|
|
2479
|
+
/**
|
|
2480
|
+
* Perspective Origin
|
|
2481
|
+
* @see https://tailwindcss.com/docs/perspective-origin
|
|
2482
|
+
*/
|
|
2483
|
+
"perspective-origin": [{
|
|
2484
|
+
"perspective-origin": be()
|
|
2485
|
+
}],
|
|
2486
|
+
/**
|
|
2487
|
+
* Rotate
|
|
2488
|
+
* @see https://tailwindcss.com/docs/rotate
|
|
2489
|
+
*/
|
|
2490
|
+
rotate: [{
|
|
2491
|
+
rotate: xe()
|
|
2492
|
+
}],
|
|
2493
|
+
/**
|
|
2494
|
+
* Rotate X
|
|
2495
|
+
* @see https://tailwindcss.com/docs/rotate
|
|
2496
|
+
*/
|
|
2497
|
+
"rotate-x": [{
|
|
2498
|
+
"rotate-x": xe()
|
|
2499
|
+
}],
|
|
2500
|
+
/**
|
|
2501
|
+
* Rotate Y
|
|
2502
|
+
* @see https://tailwindcss.com/docs/rotate
|
|
2503
|
+
*/
|
|
2504
|
+
"rotate-y": [{
|
|
2505
|
+
"rotate-y": xe()
|
|
2506
|
+
}],
|
|
2507
|
+
/**
|
|
2508
|
+
* Rotate Z
|
|
2509
|
+
* @see https://tailwindcss.com/docs/rotate
|
|
2510
|
+
*/
|
|
2511
|
+
"rotate-z": [{
|
|
2512
|
+
"rotate-z": xe()
|
|
2513
|
+
}],
|
|
2514
|
+
/**
|
|
2515
|
+
* Scale
|
|
2516
|
+
* @see https://tailwindcss.com/docs/scale
|
|
2517
|
+
*/
|
|
2518
|
+
scale: [{
|
|
2519
|
+
scale: ze()
|
|
2520
|
+
}],
|
|
2521
|
+
/**
|
|
2522
|
+
* Scale X
|
|
2523
|
+
* @see https://tailwindcss.com/docs/scale
|
|
2524
|
+
*/
|
|
2525
|
+
"scale-x": [{
|
|
2526
|
+
"scale-x": ze()
|
|
2527
|
+
}],
|
|
2528
|
+
/**
|
|
2529
|
+
* Scale Y
|
|
2530
|
+
* @see https://tailwindcss.com/docs/scale
|
|
2531
|
+
*/
|
|
2532
|
+
"scale-y": [{
|
|
2533
|
+
"scale-y": ze()
|
|
2534
|
+
}],
|
|
2535
|
+
/**
|
|
2536
|
+
* Scale Z
|
|
2537
|
+
* @see https://tailwindcss.com/docs/scale
|
|
2538
|
+
*/
|
|
2539
|
+
"scale-z": [{
|
|
2540
|
+
"scale-z": ze()
|
|
2541
|
+
}],
|
|
2542
|
+
/**
|
|
2543
|
+
* Scale 3D
|
|
2544
|
+
* @see https://tailwindcss.com/docs/scale
|
|
2545
|
+
*/
|
|
2546
|
+
"scale-3d": ["scale-3d"],
|
|
2547
|
+
/**
|
|
2548
|
+
* Skew
|
|
2549
|
+
* @see https://tailwindcss.com/docs/skew
|
|
2550
|
+
*/
|
|
2551
|
+
skew: [{
|
|
2552
|
+
skew: Ve()
|
|
2553
|
+
}],
|
|
2554
|
+
/**
|
|
2555
|
+
* Skew X
|
|
2556
|
+
* @see https://tailwindcss.com/docs/skew
|
|
2557
|
+
*/
|
|
2558
|
+
"skew-x": [{
|
|
2559
|
+
"skew-x": Ve()
|
|
2560
|
+
}],
|
|
2561
|
+
/**
|
|
2562
|
+
* Skew Y
|
|
2563
|
+
* @see https://tailwindcss.com/docs/skew
|
|
2564
|
+
*/
|
|
2565
|
+
"skew-y": [{
|
|
2566
|
+
"skew-y": Ve()
|
|
2567
|
+
}],
|
|
2568
|
+
/**
|
|
2569
|
+
* Transform
|
|
2570
|
+
* @see https://tailwindcss.com/docs/transform
|
|
2571
|
+
*/
|
|
2572
|
+
transform: [{
|
|
2573
|
+
transform: [u, c, "", "none", "gpu", "cpu"]
|
|
2574
|
+
}],
|
|
2575
|
+
/**
|
|
2576
|
+
* Transform Origin
|
|
2577
|
+
* @see https://tailwindcss.com/docs/transform-origin
|
|
2578
|
+
*/
|
|
2579
|
+
"transform-origin": [{
|
|
2580
|
+
origin: be()
|
|
2581
|
+
}],
|
|
2582
|
+
/**
|
|
2583
|
+
* Transform Style
|
|
2584
|
+
* @see https://tailwindcss.com/docs/transform-style
|
|
2585
|
+
*/
|
|
2586
|
+
"transform-style": [{
|
|
2587
|
+
transform: ["3d", "flat"]
|
|
2588
|
+
}],
|
|
2589
|
+
/**
|
|
2590
|
+
* Translate
|
|
2591
|
+
* @see https://tailwindcss.com/docs/translate
|
|
2592
|
+
*/
|
|
2593
|
+
translate: [{
|
|
2594
|
+
translate: $e()
|
|
2595
|
+
}],
|
|
2596
|
+
/**
|
|
2597
|
+
* Translate X
|
|
2598
|
+
* @see https://tailwindcss.com/docs/translate
|
|
2599
|
+
*/
|
|
2600
|
+
"translate-x": [{
|
|
2601
|
+
"translate-x": $e()
|
|
2602
|
+
}],
|
|
2603
|
+
/**
|
|
2604
|
+
* Translate Y
|
|
2605
|
+
* @see https://tailwindcss.com/docs/translate
|
|
2606
|
+
*/
|
|
2607
|
+
"translate-y": [{
|
|
2608
|
+
"translate-y": $e()
|
|
2609
|
+
}],
|
|
2610
|
+
/**
|
|
2611
|
+
* Translate Z
|
|
2612
|
+
* @see https://tailwindcss.com/docs/translate
|
|
2613
|
+
*/
|
|
2614
|
+
"translate-z": [{
|
|
2615
|
+
"translate-z": $e()
|
|
2616
|
+
}],
|
|
2617
|
+
/**
|
|
2618
|
+
* Translate None
|
|
2619
|
+
* @see https://tailwindcss.com/docs/translate
|
|
2620
|
+
*/
|
|
2621
|
+
"translate-none": ["translate-none"],
|
|
2622
|
+
// ---------------------
|
|
2623
|
+
// --- Interactivity ---
|
|
2624
|
+
// ---------------------
|
|
2625
|
+
/**
|
|
2626
|
+
* Accent Color
|
|
2627
|
+
* @see https://tailwindcss.com/docs/accent-color
|
|
2628
|
+
*/
|
|
2629
|
+
accent: [{
|
|
2630
|
+
accent: v()
|
|
2631
|
+
}],
|
|
2632
|
+
/**
|
|
2633
|
+
* Appearance
|
|
2634
|
+
* @see https://tailwindcss.com/docs/appearance
|
|
2635
|
+
*/
|
|
2636
|
+
appearance: [{
|
|
2637
|
+
appearance: ["none", "auto"]
|
|
2638
|
+
}],
|
|
2639
|
+
/**
|
|
2640
|
+
* Caret Color
|
|
2641
|
+
* @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities
|
|
2642
|
+
*/
|
|
2643
|
+
"caret-color": [{
|
|
2644
|
+
caret: v()
|
|
2645
|
+
}],
|
|
2646
|
+
/**
|
|
2647
|
+
* Color Scheme
|
|
2648
|
+
* @see https://tailwindcss.com/docs/color-scheme
|
|
2649
|
+
*/
|
|
2650
|
+
"color-scheme": [{
|
|
2651
|
+
scheme: ["normal", "dark", "light", "light-dark", "only-dark", "only-light"]
|
|
2652
|
+
}],
|
|
2653
|
+
/**
|
|
2654
|
+
* Cursor
|
|
2655
|
+
* @see https://tailwindcss.com/docs/cursor
|
|
2656
|
+
*/
|
|
2657
|
+
cursor: [{
|
|
2658
|
+
cursor: ["auto", "default", "pointer", "wait", "text", "move", "help", "not-allowed", "none", "context-menu", "progress", "cell", "crosshair", "vertical-text", "alias", "copy", "no-drop", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out", u, c]
|
|
2659
|
+
}],
|
|
2660
|
+
/**
|
|
2661
|
+
* Field Sizing
|
|
2662
|
+
* @see https://tailwindcss.com/docs/field-sizing
|
|
2663
|
+
*/
|
|
2664
|
+
"field-sizing": [{
|
|
2665
|
+
"field-sizing": ["fixed", "content"]
|
|
2666
|
+
}],
|
|
2667
|
+
/**
|
|
2668
|
+
* Pointer Events
|
|
2669
|
+
* @see https://tailwindcss.com/docs/pointer-events
|
|
2670
|
+
*/
|
|
2671
|
+
"pointer-events": [{
|
|
2672
|
+
"pointer-events": ["auto", "none"]
|
|
2673
|
+
}],
|
|
2674
|
+
/**
|
|
2675
|
+
* Resize
|
|
2676
|
+
* @see https://tailwindcss.com/docs/resize
|
|
2677
|
+
*/
|
|
2678
|
+
resize: [{
|
|
2679
|
+
resize: ["none", "", "y", "x"]
|
|
2680
|
+
}],
|
|
2681
|
+
/**
|
|
2682
|
+
* Scroll Behavior
|
|
2683
|
+
* @see https://tailwindcss.com/docs/scroll-behavior
|
|
2684
|
+
*/
|
|
2685
|
+
"scroll-behavior": [{
|
|
2686
|
+
scroll: ["auto", "smooth"]
|
|
2687
|
+
}],
|
|
2688
|
+
/**
|
|
2689
|
+
* Scroll Margin
|
|
2690
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2691
|
+
*/
|
|
2692
|
+
"scroll-m": [{
|
|
2693
|
+
"scroll-m": x()
|
|
2694
|
+
}],
|
|
2695
|
+
/**
|
|
2696
|
+
* Scroll Margin X
|
|
2697
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2698
|
+
*/
|
|
2699
|
+
"scroll-mx": [{
|
|
2700
|
+
"scroll-mx": x()
|
|
2701
|
+
}],
|
|
2702
|
+
/**
|
|
2703
|
+
* Scroll Margin Y
|
|
2704
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2705
|
+
*/
|
|
2706
|
+
"scroll-my": [{
|
|
2707
|
+
"scroll-my": x()
|
|
2708
|
+
}],
|
|
2709
|
+
/**
|
|
2710
|
+
* Scroll Margin Start
|
|
2711
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2712
|
+
*/
|
|
2713
|
+
"scroll-ms": [{
|
|
2714
|
+
"scroll-ms": x()
|
|
2715
|
+
}],
|
|
2716
|
+
/**
|
|
2717
|
+
* Scroll Margin End
|
|
2718
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2719
|
+
*/
|
|
2720
|
+
"scroll-me": [{
|
|
2721
|
+
"scroll-me": x()
|
|
2722
|
+
}],
|
|
2723
|
+
/**
|
|
2724
|
+
* Scroll Margin Top
|
|
2725
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2726
|
+
*/
|
|
2727
|
+
"scroll-mt": [{
|
|
2728
|
+
"scroll-mt": x()
|
|
2729
|
+
}],
|
|
2730
|
+
/**
|
|
2731
|
+
* Scroll Margin Right
|
|
2732
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2733
|
+
*/
|
|
2734
|
+
"scroll-mr": [{
|
|
2735
|
+
"scroll-mr": x()
|
|
2736
|
+
}],
|
|
2737
|
+
/**
|
|
2738
|
+
* Scroll Margin Bottom
|
|
2739
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2740
|
+
*/
|
|
2741
|
+
"scroll-mb": [{
|
|
2742
|
+
"scroll-mb": x()
|
|
2743
|
+
}],
|
|
2744
|
+
/**
|
|
2745
|
+
* Scroll Margin Left
|
|
2746
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2747
|
+
*/
|
|
2748
|
+
"scroll-ml": [{
|
|
2749
|
+
"scroll-ml": x()
|
|
2750
|
+
}],
|
|
2751
|
+
/**
|
|
2752
|
+
* Scroll Padding
|
|
2753
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2754
|
+
*/
|
|
2755
|
+
"scroll-p": [{
|
|
2756
|
+
"scroll-p": x()
|
|
2757
|
+
}],
|
|
2758
|
+
/**
|
|
2759
|
+
* Scroll Padding X
|
|
2760
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2761
|
+
*/
|
|
2762
|
+
"scroll-px": [{
|
|
2763
|
+
"scroll-px": x()
|
|
2764
|
+
}],
|
|
2765
|
+
/**
|
|
2766
|
+
* Scroll Padding Y
|
|
2767
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2768
|
+
*/
|
|
2769
|
+
"scroll-py": [{
|
|
2770
|
+
"scroll-py": x()
|
|
2771
|
+
}],
|
|
2772
|
+
/**
|
|
2773
|
+
* Scroll Padding Start
|
|
2774
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2775
|
+
*/
|
|
2776
|
+
"scroll-ps": [{
|
|
2777
|
+
"scroll-ps": x()
|
|
2778
|
+
}],
|
|
2779
|
+
/**
|
|
2780
|
+
* Scroll Padding End
|
|
2781
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2782
|
+
*/
|
|
2783
|
+
"scroll-pe": [{
|
|
2784
|
+
"scroll-pe": x()
|
|
2785
|
+
}],
|
|
2786
|
+
/**
|
|
2787
|
+
* Scroll Padding Top
|
|
2788
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2789
|
+
*/
|
|
2790
|
+
"scroll-pt": [{
|
|
2791
|
+
"scroll-pt": x()
|
|
2792
|
+
}],
|
|
2793
|
+
/**
|
|
2794
|
+
* Scroll Padding Right
|
|
2795
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2796
|
+
*/
|
|
2797
|
+
"scroll-pr": [{
|
|
2798
|
+
"scroll-pr": x()
|
|
2799
|
+
}],
|
|
2800
|
+
/**
|
|
2801
|
+
* Scroll Padding Bottom
|
|
2802
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2803
|
+
*/
|
|
2804
|
+
"scroll-pb": [{
|
|
2805
|
+
"scroll-pb": x()
|
|
2806
|
+
}],
|
|
2807
|
+
/**
|
|
2808
|
+
* Scroll Padding Left
|
|
2809
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2810
|
+
*/
|
|
2811
|
+
"scroll-pl": [{
|
|
2812
|
+
"scroll-pl": x()
|
|
2813
|
+
}],
|
|
2814
|
+
/**
|
|
2815
|
+
* Scroll Snap Align
|
|
2816
|
+
* @see https://tailwindcss.com/docs/scroll-snap-align
|
|
2817
|
+
*/
|
|
2818
|
+
"snap-align": [{
|
|
2819
|
+
snap: ["start", "end", "center", "align-none"]
|
|
2820
|
+
}],
|
|
2821
|
+
/**
|
|
2822
|
+
* Scroll Snap Stop
|
|
2823
|
+
* @see https://tailwindcss.com/docs/scroll-snap-stop
|
|
2824
|
+
*/
|
|
2825
|
+
"snap-stop": [{
|
|
2826
|
+
snap: ["normal", "always"]
|
|
2827
|
+
}],
|
|
2828
|
+
/**
|
|
2829
|
+
* Scroll Snap Type
|
|
2830
|
+
* @see https://tailwindcss.com/docs/scroll-snap-type
|
|
2831
|
+
*/
|
|
2832
|
+
"snap-type": [{
|
|
2833
|
+
snap: ["none", "x", "y", "both"]
|
|
2834
|
+
}],
|
|
2835
|
+
/**
|
|
2836
|
+
* Scroll Snap Type Strictness
|
|
2837
|
+
* @see https://tailwindcss.com/docs/scroll-snap-type
|
|
2838
|
+
*/
|
|
2839
|
+
"snap-strictness": [{
|
|
2840
|
+
snap: ["mandatory", "proximity"]
|
|
2841
|
+
}],
|
|
2842
|
+
/**
|
|
2843
|
+
* Touch Action
|
|
2844
|
+
* @see https://tailwindcss.com/docs/touch-action
|
|
2845
|
+
*/
|
|
2846
|
+
touch: [{
|
|
2847
|
+
touch: ["auto", "none", "manipulation"]
|
|
2848
|
+
}],
|
|
2849
|
+
/**
|
|
2850
|
+
* Touch Action X
|
|
2851
|
+
* @see https://tailwindcss.com/docs/touch-action
|
|
2852
|
+
*/
|
|
2853
|
+
"touch-x": [{
|
|
2854
|
+
"touch-pan": ["x", "left", "right"]
|
|
2855
|
+
}],
|
|
2856
|
+
/**
|
|
2857
|
+
* Touch Action Y
|
|
2858
|
+
* @see https://tailwindcss.com/docs/touch-action
|
|
2859
|
+
*/
|
|
2860
|
+
"touch-y": [{
|
|
2861
|
+
"touch-pan": ["y", "up", "down"]
|
|
2862
|
+
}],
|
|
2863
|
+
/**
|
|
2864
|
+
* Touch Action Pinch Zoom
|
|
2865
|
+
* @see https://tailwindcss.com/docs/touch-action
|
|
2866
|
+
*/
|
|
2867
|
+
"touch-pz": ["touch-pinch-zoom"],
|
|
2868
|
+
/**
|
|
2869
|
+
* User Select
|
|
2870
|
+
* @see https://tailwindcss.com/docs/user-select
|
|
2871
|
+
*/
|
|
2872
|
+
select: [{
|
|
2873
|
+
select: ["none", "text", "all", "auto"]
|
|
2874
|
+
}],
|
|
2875
|
+
/**
|
|
2876
|
+
* Will Change
|
|
2877
|
+
* @see https://tailwindcss.com/docs/will-change
|
|
2878
|
+
*/
|
|
2879
|
+
"will-change": [{
|
|
2880
|
+
"will-change": ["auto", "scroll", "contents", "transform", u, c]
|
|
2881
|
+
}],
|
|
2882
|
+
// -----------
|
|
2883
|
+
// --- SVG ---
|
|
2884
|
+
// -----------
|
|
2885
|
+
/**
|
|
2886
|
+
* Fill
|
|
2887
|
+
* @see https://tailwindcss.com/docs/fill
|
|
2888
|
+
*/
|
|
2889
|
+
fill: [{
|
|
2890
|
+
fill: ["none", ...v()]
|
|
2891
|
+
}],
|
|
2892
|
+
/**
|
|
2893
|
+
* Stroke Width
|
|
2894
|
+
* @see https://tailwindcss.com/docs/stroke-width
|
|
2895
|
+
*/
|
|
2896
|
+
"stroke-w": [{
|
|
2897
|
+
stroke: [C, qe, Ce, _e]
|
|
2898
|
+
}],
|
|
2899
|
+
/**
|
|
2900
|
+
* Stroke
|
|
2901
|
+
* @see https://tailwindcss.com/docs/stroke
|
|
2902
|
+
*/
|
|
2903
|
+
stroke: [{
|
|
2904
|
+
stroke: ["none", ...v()]
|
|
2905
|
+
}],
|
|
2906
|
+
// ---------------------
|
|
2907
|
+
// --- Accessibility ---
|
|
2908
|
+
// ---------------------
|
|
2909
|
+
/**
|
|
2910
|
+
* Forced Color Adjust
|
|
2911
|
+
* @see https://tailwindcss.com/docs/forced-color-adjust
|
|
2912
|
+
*/
|
|
2913
|
+
"forced-color-adjust": [{
|
|
2914
|
+
"forced-color-adjust": ["auto", "none"]
|
|
2915
|
+
}]
|
|
2916
|
+
},
|
|
2917
|
+
conflictingClassGroups: {
|
|
2918
|
+
overflow: ["overflow-x", "overflow-y"],
|
|
2919
|
+
overscroll: ["overscroll-x", "overscroll-y"],
|
|
2920
|
+
inset: ["inset-x", "inset-y", "start", "end", "top", "right", "bottom", "left"],
|
|
2921
|
+
"inset-x": ["right", "left"],
|
|
2922
|
+
"inset-y": ["top", "bottom"],
|
|
2923
|
+
flex: ["basis", "grow", "shrink"],
|
|
2924
|
+
gap: ["gap-x", "gap-y"],
|
|
2925
|
+
p: ["px", "py", "ps", "pe", "pt", "pr", "pb", "pl"],
|
|
2926
|
+
px: ["pr", "pl"],
|
|
2927
|
+
py: ["pt", "pb"],
|
|
2928
|
+
m: ["mx", "my", "ms", "me", "mt", "mr", "mb", "ml"],
|
|
2929
|
+
mx: ["mr", "ml"],
|
|
2930
|
+
my: ["mt", "mb"],
|
|
2931
|
+
size: ["w", "h"],
|
|
2932
|
+
"font-size": ["leading"],
|
|
2933
|
+
"fvn-normal": ["fvn-ordinal", "fvn-slashed-zero", "fvn-figure", "fvn-spacing", "fvn-fraction"],
|
|
2934
|
+
"fvn-ordinal": ["fvn-normal"],
|
|
2935
|
+
"fvn-slashed-zero": ["fvn-normal"],
|
|
2936
|
+
"fvn-figure": ["fvn-normal"],
|
|
2937
|
+
"fvn-spacing": ["fvn-normal"],
|
|
2938
|
+
"fvn-fraction": ["fvn-normal"],
|
|
2939
|
+
"line-clamp": ["display", "overflow"],
|
|
2940
|
+
rounded: ["rounded-s", "rounded-e", "rounded-t", "rounded-r", "rounded-b", "rounded-l", "rounded-ss", "rounded-se", "rounded-ee", "rounded-es", "rounded-tl", "rounded-tr", "rounded-br", "rounded-bl"],
|
|
2941
|
+
"rounded-s": ["rounded-ss", "rounded-es"],
|
|
2942
|
+
"rounded-e": ["rounded-se", "rounded-ee"],
|
|
2943
|
+
"rounded-t": ["rounded-tl", "rounded-tr"],
|
|
2944
|
+
"rounded-r": ["rounded-tr", "rounded-br"],
|
|
2945
|
+
"rounded-b": ["rounded-br", "rounded-bl"],
|
|
2946
|
+
"rounded-l": ["rounded-tl", "rounded-bl"],
|
|
2947
|
+
"border-spacing": ["border-spacing-x", "border-spacing-y"],
|
|
2948
|
+
"border-w": ["border-w-x", "border-w-y", "border-w-s", "border-w-e", "border-w-t", "border-w-r", "border-w-b", "border-w-l"],
|
|
2949
|
+
"border-w-x": ["border-w-r", "border-w-l"],
|
|
2950
|
+
"border-w-y": ["border-w-t", "border-w-b"],
|
|
2951
|
+
"border-color": ["border-color-x", "border-color-y", "border-color-s", "border-color-e", "border-color-t", "border-color-r", "border-color-b", "border-color-l"],
|
|
2952
|
+
"border-color-x": ["border-color-r", "border-color-l"],
|
|
2953
|
+
"border-color-y": ["border-color-t", "border-color-b"],
|
|
2954
|
+
translate: ["translate-x", "translate-y", "translate-none"],
|
|
2955
|
+
"translate-none": ["translate", "translate-x", "translate-y", "translate-z"],
|
|
2956
|
+
"scroll-m": ["scroll-mx", "scroll-my", "scroll-ms", "scroll-me", "scroll-mt", "scroll-mr", "scroll-mb", "scroll-ml"],
|
|
2957
|
+
"scroll-mx": ["scroll-mr", "scroll-ml"],
|
|
2958
|
+
"scroll-my": ["scroll-mt", "scroll-mb"],
|
|
2959
|
+
"scroll-p": ["scroll-px", "scroll-py", "scroll-ps", "scroll-pe", "scroll-pt", "scroll-pr", "scroll-pb", "scroll-pl"],
|
|
2960
|
+
"scroll-px": ["scroll-pr", "scroll-pl"],
|
|
2961
|
+
"scroll-py": ["scroll-pt", "scroll-pb"],
|
|
2962
|
+
touch: ["touch-x", "touch-y", "touch-pz"],
|
|
2963
|
+
"touch-x": ["touch"],
|
|
2964
|
+
"touch-y": ["touch"],
|
|
2965
|
+
"touch-pz": ["touch"]
|
|
2966
|
+
},
|
|
2967
|
+
conflictingClassGroupModifiers: {
|
|
2968
|
+
"font-size": ["leading"]
|
|
2969
|
+
},
|
|
2970
|
+
orderSensitiveModifiers: ["*", "**", "after", "backdrop", "before", "details-content", "file", "first-letter", "first-line", "marker", "placeholder", "selection"]
|
|
2971
|
+
};
|
|
2972
|
+
}, "getDefaultConfig"), Wr = /* @__PURE__ */ Mr(Hr), Ur = { class: "spinner max-w-sm" }, Zr = {
|
|
2973
|
+
class: "ring-circular h-full w-full origin-center",
|
|
2974
|
+
viewBox: "25 25 50 50"
|
|
2975
|
+
}, Ot = /* @__PURE__ */ oe({
|
|
2976
|
+
__name: "FSpinner",
|
|
2977
|
+
props: {
|
|
2978
|
+
width: { type: String, default: "" },
|
|
2979
|
+
colorMode: { type: String, default: "primary" }
|
|
2980
|
+
},
|
|
2981
|
+
setup(e) {
|
|
2982
|
+
return (o, r) => (p(), k("div", Ur, [
|
|
2983
|
+
(p(), k("svg", Zr, [
|
|
2984
|
+
l("circle", {
|
|
2985
|
+
class: I([e.colorMode, "ring-path"]),
|
|
2986
|
+
cx: "50",
|
|
2987
|
+
cy: "50",
|
|
2988
|
+
r: "20",
|
|
2989
|
+
fill: "none",
|
|
2990
|
+
stroke: "currentColor",
|
|
2991
|
+
"stroke-width": "5",
|
|
2992
|
+
"stroke-miterlimit": "30"
|
|
2993
|
+
}, null, 2)
|
|
2994
|
+
]))
|
|
2995
|
+
]));
|
|
2996
|
+
}
|
|
2997
|
+
}), Je = {
|
|
2998
|
+
default: {
|
|
2999
|
+
solid: {
|
|
3000
|
+
base: "bg-theme-0 dark:bg-theme-700/40 text-theme-600 dark:text-theme-50",
|
|
3001
|
+
input: `bg-white dark:bg-theme-800/50
|
|
3002
|
+
ring-theme-200 dark:ring-theme-600/70
|
|
3003
|
+
focus:ring-theme-600 focus:bg-white
|
|
3004
|
+
dark:focus:ring-theme-500 dark:focus:bg-theme-800
|
|
3005
|
+
focus-within:ring-theme-600 dark:focus-within:ring-theme-500
|
|
3006
|
+
text-theme-900 dark:text-theme-100
|
|
3007
|
+
placeholder:text-theme-400 dark:placeholder:text-theme-500`,
|
|
3008
|
+
border: "border-theme-300/80 dark:border-theme-600",
|
|
3009
|
+
hover: "hover:border-theme-300 dark:hover:border-theme-500",
|
|
3010
|
+
icon: "text-theme-600 dark:text-theme-50"
|
|
3011
|
+
},
|
|
3012
|
+
ghost: {
|
|
3013
|
+
base: "bg-theme-50 dark:bg-theme-600/30 text-theme-700 dark:text-theme-50",
|
|
3014
|
+
border: "border-theme-100 dark:border-theme-800/20",
|
|
3015
|
+
hover: "hover:bg-theme-200 dark:hover:bg-theme-600/50 hover:border-theme-200 dark:hover:border-theme-600",
|
|
3016
|
+
icon: "text-theme-500 dark:text-theme-500"
|
|
3017
|
+
},
|
|
3018
|
+
outline: {
|
|
3019
|
+
base: "bg-transparent text-theme-700 dark:text-theme-50",
|
|
3020
|
+
border: "border-theme-300 dark:border-theme-400",
|
|
3021
|
+
hover: "hover:opacity-70",
|
|
3022
|
+
icon: "text-theme-700 dark:text-theme-300"
|
|
3023
|
+
},
|
|
3024
|
+
link: {
|
|
3025
|
+
base: "bg-transparent text-theme-600 dark:text-theme-50",
|
|
3026
|
+
border: "border-transparent",
|
|
3027
|
+
hover: "hover:opacity-70",
|
|
3028
|
+
icon: "text-theme-600 dark:text-theme-400"
|
|
3029
|
+
}
|
|
3030
|
+
},
|
|
3031
|
+
muted: {
|
|
3032
|
+
solid: {
|
|
3033
|
+
base: "bg-gray-100 dark:bg-gray-700/40 text-gray-900 dark:text-gray-50",
|
|
3034
|
+
input: `bg-white dark:bg-gray-800/50
|
|
3035
|
+
ring-gray-200 dark:ring-gray-600/70
|
|
3036
|
+
focus:ring-gray-600 focus:bg-white
|
|
3037
|
+
dark:focus:ring-gray-500 dark:focus:bg-gray-800
|
|
3038
|
+
focus-within:ring-gray-600 dark:focus-within:ring-gray-500
|
|
3039
|
+
text-gray-900 dark:text-gray-100
|
|
3040
|
+
placeholder:text-gray-400 dark:placeholder:text-gray-500`,
|
|
3041
|
+
border: "border-gray-300/80 dark:border-gray-600",
|
|
3042
|
+
hover: "hover:border-gray-300 dark:hover:border-gray-500",
|
|
3043
|
+
icon: "text-gray-600 dark:text-gray-50"
|
|
3044
|
+
},
|
|
3045
|
+
ghost: {
|
|
3046
|
+
base: "bg-gray-100 dark:bg-gray-600/30 text-gray-700 dark:text-gray-50",
|
|
3047
|
+
border: "border-gray-100 dark:border-gray-800/20",
|
|
3048
|
+
hover: "hover:bg-gray-200 dark:hover:bg-gray-600/50 hover:border-gray-200 dark:hover:border-gray-600",
|
|
3049
|
+
icon: "text-gray-500 dark:text-gray-500"
|
|
3050
|
+
},
|
|
3051
|
+
outline: {
|
|
3052
|
+
base: "bg-transparent text-gray-700 dark:text-gray-50",
|
|
3053
|
+
border: "border-gray-500 dark:border-gray-400",
|
|
3054
|
+
hover: "hover:opacity-70",
|
|
3055
|
+
icon: "text-gray-700 dark:text-gray-300"
|
|
3056
|
+
},
|
|
3057
|
+
link: {
|
|
3058
|
+
base: "bg-transparent text-gray-600 dark:text-gray-50",
|
|
3059
|
+
border: "border-transparent",
|
|
3060
|
+
hover: "hover:opacity-70",
|
|
3061
|
+
icon: "text-gray-600 dark:text-gray-400"
|
|
3062
|
+
}
|
|
3063
|
+
},
|
|
3064
|
+
overlay: {
|
|
3065
|
+
solid: {
|
|
3066
|
+
base: "bg-white/100 text-black backdrop-blur-sm shadow-sm mix-blend-overlay [text-shadow:_0_1px_1px_rgb(255_255_255_/_100%)]",
|
|
3067
|
+
border: "border-white/100",
|
|
3068
|
+
input: `bg-white/10 ring-white
|
|
3069
|
+
focus:ring-white/90 focus:bg-white/20
|
|
3070
|
+
dark:focus:ring-white/70
|
|
3071
|
+
text-white
|
|
3072
|
+
placeholder:text-white/60`,
|
|
3073
|
+
hover: "hover:bg-white/70 ",
|
|
3074
|
+
icon: "text-black"
|
|
3075
|
+
},
|
|
3076
|
+
ghost: {
|
|
3077
|
+
base: "bg-white/70 text-black backdrop-blur-sm shadow-sm mix-blend-overlay [text-shadow:_0_1px_1px_rgb(255_255_255_/_100%)]",
|
|
3078
|
+
border: "border-white/100",
|
|
3079
|
+
hover: "hover:bg-white/70 hover:border-white/90",
|
|
3080
|
+
icon: "text-black"
|
|
3081
|
+
},
|
|
3082
|
+
outline: {
|
|
3083
|
+
base: "bg-white/10 text-white backdrop-blur-sm shadow-sm [text-shadow:_0_0.5px_0_rgb(0_0_0_/_40%)]",
|
|
3084
|
+
border: "border-white",
|
|
3085
|
+
hover: "hover:border-white/80",
|
|
3086
|
+
icon: "text-white"
|
|
3087
|
+
},
|
|
3088
|
+
link: {
|
|
3089
|
+
base: "bg-transparent text-white [text-shadow:_0_0.5px_0_rgb(0_0_0_/_40%)]",
|
|
3090
|
+
border: "border-transparent",
|
|
3091
|
+
hover: "hover:opacity-70",
|
|
3092
|
+
icon: "text-white"
|
|
3093
|
+
}
|
|
3094
|
+
},
|
|
3095
|
+
primary: {
|
|
3096
|
+
solid: {
|
|
3097
|
+
base: "bg-primary-500 dark:bg-primary-700/70 text-primary-0 dark:text-primary-50",
|
|
3098
|
+
border: "border-primary-600/80 dark:border-primary-600",
|
|
3099
|
+
input: `bg-primary-50 dark:bg-primary-800/20
|
|
3100
|
+
ring-primary-500 dark:ring-primary-600/70
|
|
3101
|
+
focus:ring-primary-700 focus:bg-primary-50/50
|
|
3102
|
+
dark:focus:ring-primary-600 dark:focus:bg-primary-800/40
|
|
3103
|
+
text-primary-800 dark:text-primary-0
|
|
3104
|
+
placeholder:text-primary-300 dark:placeholder:text-primary-600`,
|
|
3105
|
+
hover: "hover:bg-primary-600 dark:hover:bg-primary-800",
|
|
3106
|
+
icon: "text-primary-0 dark:text-primary-50"
|
|
3107
|
+
},
|
|
3108
|
+
ghost: {
|
|
3109
|
+
base: "bg-primary-50 dark:bg-primary-800/40 text-primary-800 dark:text-primary-0",
|
|
3110
|
+
border: "border-primary-100 dark:border-primary-800/20",
|
|
3111
|
+
hover: "hover:bg-primary-100 dark:hover:bg-primary-800/60 hover:border-primary-200 dark:hover:border-primary-700",
|
|
3112
|
+
icon: "text-primary-500 dark:text-primary-500"
|
|
3113
|
+
},
|
|
3114
|
+
outline: {
|
|
3115
|
+
base: "bg-transparent text-primary-500 dark:text-primary-100",
|
|
3116
|
+
border: "border-primary-500 dark:border-primary-500",
|
|
3117
|
+
hover: "hover:bg-primary-500/10 dark:hover:bg-primary-500/20",
|
|
3118
|
+
icon: "text-primary-700 dark:text-primary-100"
|
|
3119
|
+
},
|
|
3120
|
+
link: {
|
|
3121
|
+
base: "bg-transparent text-primary-600 dark:text-primary-400",
|
|
3122
|
+
border: "border-transparent",
|
|
3123
|
+
hover: "hover:opacity-70",
|
|
3124
|
+
icon: "text-primary-600 dark:text-primary-400"
|
|
3125
|
+
}
|
|
3126
|
+
},
|
|
3127
|
+
theme: {
|
|
3128
|
+
solid: {
|
|
3129
|
+
base: "bg-theme-500 dark:bg-theme-600/70 text-theme-0 dark:text-theme-0",
|
|
3130
|
+
border: "border-theme-600/80 dark:border-theme-600",
|
|
3131
|
+
hover: "hover:bg-theme-600 dark:hover:bg-theme-800",
|
|
3132
|
+
icon: "text-theme-50 dark:text-theme-50"
|
|
3133
|
+
},
|
|
3134
|
+
ghost: {
|
|
3135
|
+
base: "bg-theme-100 dark:bg-theme-600/50 text-theme-900 dark:text-theme-100",
|
|
3136
|
+
border: "border-theme-100 dark:border-theme-800/20",
|
|
3137
|
+
hover: "hover:bg-theme-200 dark:hover:bg-theme-600/40 hover:border-theme-200 dark:hover:border-theme-600",
|
|
3138
|
+
icon: "text-theme-500 dark:text-theme-500"
|
|
3139
|
+
},
|
|
3140
|
+
outline: {
|
|
3141
|
+
base: "bg-transparent text-theme-500 dark:text-theme-300",
|
|
3142
|
+
border: "border-theme-500 dark:border-theme-400",
|
|
3143
|
+
hover: "hover:bg-theme-500/10 dark:hover:bg-theme-400/20",
|
|
3144
|
+
icon: "text-theme-500 dark:text-theme-300"
|
|
3145
|
+
},
|
|
3146
|
+
link: {
|
|
3147
|
+
base: "bg-transparent text-theme-600 dark:text-theme-400",
|
|
3148
|
+
border: "border-transparent",
|
|
3149
|
+
hover: "hover:opacity-70",
|
|
3150
|
+
icon: "text-theme-600 dark:text-theme-400"
|
|
3151
|
+
}
|
|
3152
|
+
},
|
|
3153
|
+
green: {
|
|
3154
|
+
solid: {
|
|
3155
|
+
base: "bg-green-600 dark:bg-green-700/70 text-green-50 dark:text-green-50",
|
|
3156
|
+
border: "border-green-600 dark:border-green-600",
|
|
3157
|
+
hover: "hover:bg-green-700 dark:hover:bg-green-800",
|
|
3158
|
+
icon: "text-green-50 dark:text-green-50"
|
|
3159
|
+
},
|
|
3160
|
+
ghost: {
|
|
3161
|
+
base: "bg-green-100 dark:bg-green-800/20 text-green-900 dark:text-green-100",
|
|
3162
|
+
border: "border-green-100 dark:border-green-800/20",
|
|
3163
|
+
hover: "hover:bg-green-200 dark:hover:bg-green-800/40 hover:border-green-200 dark:hover:border-green-700",
|
|
3164
|
+
icon: "text-green-500 dark:text-green-500"
|
|
3165
|
+
},
|
|
3166
|
+
outline: {
|
|
3167
|
+
base: "bg-transparent text-green-500 dark:text-green-50",
|
|
3168
|
+
border: "border-green-500 dark:border-green-600",
|
|
3169
|
+
hover: "hover:bg-green-500/10 dark:hover:bg-green-400/10",
|
|
3170
|
+
icon: "text-green-500 dark:text-green-50"
|
|
3171
|
+
},
|
|
3172
|
+
link: {
|
|
3173
|
+
base: "bg-transparent text-green-600 dark:text-green-400",
|
|
3174
|
+
border: "border-transparent",
|
|
3175
|
+
hover: "hover:opacity-70",
|
|
3176
|
+
icon: "text-green-600 dark:text-green-400"
|
|
3177
|
+
}
|
|
3178
|
+
},
|
|
3179
|
+
orange: {
|
|
3180
|
+
solid: {
|
|
3181
|
+
base: "bg-orange-500 dark:bg-orange-700/70 text-orange-50 dark:text-orange-50",
|
|
3182
|
+
border: "border-orange-700 dark:border-orange-600",
|
|
3183
|
+
hover: "hover:bg-orange-700 dark:hover:bg-orange-800",
|
|
3184
|
+
icon: "text-orange-50 dark:text-orange-50"
|
|
3185
|
+
},
|
|
3186
|
+
ghost: {
|
|
3187
|
+
base: "bg-orange-100 dark:bg-orange-800/20 text-orange-900 dark:text-orange-100",
|
|
3188
|
+
border: "border-orange-100 dark:border-orange-800/20",
|
|
3189
|
+
hover: "hover:bg-orange-200 dark:hover:bg-orange-800/40 hover:border-orange-200 dark:hover:border-orange-700",
|
|
3190
|
+
icon: "text-orange-500 dark:text-orange-500"
|
|
3191
|
+
},
|
|
3192
|
+
outline: {
|
|
3193
|
+
base: "bg-transparent text-orange-500 dark:text-orange-50",
|
|
3194
|
+
border: "border-orange-500 dark:border-orange-600",
|
|
3195
|
+
hover: "hover:bg-orange-500/10 dark:hover:bg-orange-400/10",
|
|
3196
|
+
icon: "text-orange-500 dark:text-orange-50"
|
|
3197
|
+
},
|
|
3198
|
+
link: {
|
|
3199
|
+
base: "bg-transparent text-orange-600 dark:text-orange-400",
|
|
3200
|
+
border: "border-transparent",
|
|
3201
|
+
hover: "hover:opacity-70",
|
|
3202
|
+
icon: "text-orange-600 dark:text-orange-400"
|
|
3203
|
+
}
|
|
3204
|
+
},
|
|
3205
|
+
rose: {
|
|
3206
|
+
solid: {
|
|
3207
|
+
base: "bg-rose-500 dark:bg-rose-700/70 text-rose-50 dark:text-rose-50",
|
|
3208
|
+
border: "border-rose-600/80 dark:border-rose-600",
|
|
3209
|
+
hover: "hover:bg-rose-600 dark:hover:bg-rose-800",
|
|
3210
|
+
icon: "text-rose-50 dark:text-rose-50"
|
|
3211
|
+
},
|
|
3212
|
+
ghost: {
|
|
3213
|
+
base: "bg-rose-100 dark:bg-rose-800/20 text-rose-900 dark:text-rose-100",
|
|
3214
|
+
border: "border-rose-100 dark:border-rose-800/20",
|
|
3215
|
+
hover: "hover:bg-rose-200 dark:hover:bg-rose-800/40 hover:border-rose-200 dark:hover:border-rose-700",
|
|
3216
|
+
icon: "text-rose-500 dark:text-rose-500"
|
|
3217
|
+
},
|
|
3218
|
+
outline: {
|
|
3219
|
+
base: "bg-transparent text-rose-500 dark:text-rose-50",
|
|
3220
|
+
border: "border-rose-500 dark:border-rose-600",
|
|
3221
|
+
hover: "hover:bg-rose-500/10 dark:hover:bg-rose-400/10",
|
|
3222
|
+
icon: "text-rose-500 dark:text-rose-50"
|
|
3223
|
+
},
|
|
3224
|
+
link: {
|
|
3225
|
+
base: "bg-transparent text-rose-600 dark:text-rose-400",
|
|
3226
|
+
border: "border-transparent",
|
|
3227
|
+
hover: "hover:opacity-70",
|
|
3228
|
+
icon: "text-rose-600 dark:text-rose-400"
|
|
3229
|
+
}
|
|
3230
|
+
},
|
|
3231
|
+
indigo: {
|
|
3232
|
+
solid: {
|
|
3233
|
+
base: "bg-indigo-500 dark:bg-indigo-700/70 text-indigo-50 dark:text-indigo-50",
|
|
3234
|
+
border: "border-indigo-600/80 dark:border-indigo-600",
|
|
3235
|
+
hover: "hover:bg-indigo-600 dark:hover:bg-indigo-800",
|
|
3236
|
+
icon: "text-indigo-50 dark:text-indigo-50"
|
|
3237
|
+
},
|
|
3238
|
+
ghost: {
|
|
3239
|
+
base: "bg-indigo-100 dark:bg-indigo-800/20 text-indigo-900 dark:text-indigo-100",
|
|
3240
|
+
border: "border-indigo-100 dark:border-indigo-800/20",
|
|
3241
|
+
hover: "hover:bg-indigo-200 dark:hover:bg-indigo-800/40 hover:border-indigo-200 dark:hover:border-indigo-700",
|
|
3242
|
+
icon: "text-indigo-500 dark:text-indigo-500"
|
|
3243
|
+
},
|
|
3244
|
+
outline: {
|
|
3245
|
+
base: "bg-transparent text-indigo-500 dark:text-indigo-50",
|
|
3246
|
+
border: "border-indigo-500 dark:border-indigo-600",
|
|
3247
|
+
hover: "hover:bg-indigo-500/10 dark:hover:bg-indigo-400/10",
|
|
3248
|
+
icon: "text-indigo-500 dark:text-indigo-50"
|
|
3249
|
+
},
|
|
3250
|
+
link: {
|
|
3251
|
+
base: "bg-transparent text-indigo-600 dark:text-indigo-400",
|
|
3252
|
+
border: "border-transparent",
|
|
3253
|
+
hover: "hover:opacity-70",
|
|
3254
|
+
icon: "text-indigo-600 dark:text-indigo-400"
|
|
3255
|
+
}
|
|
3256
|
+
},
|
|
3257
|
+
red: {
|
|
3258
|
+
solid: {
|
|
3259
|
+
base: "bg-red-500 dark:bg-red-700/70 text-red-50 dark:text-red-50",
|
|
3260
|
+
border: "border-red-600/80 dark:border-red-600",
|
|
3261
|
+
hover: "hover:bg-red-600 dark:hover:bg-red-800",
|
|
3262
|
+
icon: "text-red-50 dark:text-red-50"
|
|
3263
|
+
},
|
|
3264
|
+
ghost: {
|
|
3265
|
+
base: "bg-red-100 dark:bg-red-800/20 text-red-900 dark:text-red-100",
|
|
3266
|
+
border: "border-red-100 dark:border-red-800/20",
|
|
3267
|
+
hover: "hover:bg-red-200 dark:hover:bg-red-800/40 hover:border-red-200 dark:hover:border-red-700",
|
|
3268
|
+
icon: "text-red-500 dark:text-red-500"
|
|
3269
|
+
},
|
|
3270
|
+
outline: {
|
|
3271
|
+
base: "bg-transparent text-red-500 dark:text-red-50",
|
|
3272
|
+
border: "border-red-500 dark:border-red-600",
|
|
3273
|
+
hover: "hover:bg-red-500/10 dark:hover:bg-red-400/10",
|
|
3274
|
+
icon: "text-red-500 dark:text-red-50"
|
|
3275
|
+
},
|
|
3276
|
+
link: {
|
|
3277
|
+
base: "bg-transparent text-red-600 dark:text-red-400",
|
|
3278
|
+
border: "border-transparent",
|
|
3279
|
+
hover: "hover:opacity-70",
|
|
3280
|
+
icon: "text-red-600 dark:text-red-400"
|
|
3281
|
+
}
|
|
3282
|
+
}
|
|
3283
|
+
}, Kr = {
|
|
3284
|
+
key: 0,
|
|
3285
|
+
class: "absolute inset-0 flex items-center justify-center"
|
|
3286
|
+
}, Fe = /* @__PURE__ */ oe({
|
|
3287
|
+
__name: "FButton",
|
|
3288
|
+
props: {
|
|
3289
|
+
theme: { default: "default" },
|
|
3290
|
+
design: { default: "solid" },
|
|
3291
|
+
size: { default: "md" },
|
|
3292
|
+
rounding: { default: "full" },
|
|
3293
|
+
href: {},
|
|
3294
|
+
icon: {},
|
|
3295
|
+
iconAfter: {},
|
|
3296
|
+
tag: { default: "button" },
|
|
3297
|
+
loading: { type: Boolean, default: !1 },
|
|
3298
|
+
class: { default: "" }
|
|
3299
|
+
},
|
|
3300
|
+
setup(e) {
|
|
3301
|
+
const o = re(() => ({
|
|
3302
|
+
icon: typeof e.icon == "string" ? e.icon : e.icon?.className,
|
|
3303
|
+
iconAfter: typeof e.iconAfter == "string" ? e.iconAfter : e.iconAfter?.className
|
|
3304
|
+
})), r = re(() => e.href ? "a" : e.tag), t = re(() => ({
|
|
3305
|
+
xxs: "size-2.5",
|
|
3306
|
+
xs: "size-3",
|
|
3307
|
+
sm: "size-3.5",
|
|
3308
|
+
md: "size-4",
|
|
3309
|
+
lg: "size-5",
|
|
3310
|
+
xl: "size-6"
|
|
3311
|
+
})[e.size]), s = re(() => {
|
|
3312
|
+
const a = "relative inline-flex items-center justify-center gap-2 font-medium transition-all duration-200 focus:outline-none active:opacity-80 cursor-pointer", f = {
|
|
3313
|
+
xxs: "px-2 py-0.5 text-[10px]",
|
|
3314
|
+
xs: "px-3 py-1 text-[11px]",
|
|
3315
|
+
sm: "px-3 py-1.5 text-xs",
|
|
3316
|
+
md: "px-4 py-2 text-sm",
|
|
3317
|
+
lg: "px-6 py-3 text-base",
|
|
3318
|
+
xl: "px-8 py-4 text-base"
|
|
3319
|
+
}, g = e.design === "link" ? "!px-1" : "", h = {
|
|
3320
|
+
md: "rounded-md",
|
|
3321
|
+
lg: "rounded-lg",
|
|
3322
|
+
full: "rounded-full"
|
|
3323
|
+
}, m = Je[e.theme]?.[e.design] || Je.default[e.design], A = [
|
|
3324
|
+
a,
|
|
3325
|
+
f[e.size],
|
|
3326
|
+
g,
|
|
3327
|
+
h[e.rounding],
|
|
3328
|
+
m.base,
|
|
3329
|
+
`border ${m.border}`,
|
|
3330
|
+
m.hover
|
|
3331
|
+
].filter(Boolean).join(" ");
|
|
3332
|
+
return Wr(A, e.class);
|
|
3333
|
+
}), i = re(() => ({
|
|
3334
|
+
design: (Je[e.theme]?.[e.design] || Je.default[e.design]).icon || ""
|
|
3335
|
+
}));
|
|
3336
|
+
return (a, f) => (p(), ke(_t(r.value), {
|
|
3337
|
+
href: e.href,
|
|
3338
|
+
class: I(s.value)
|
|
3339
|
+
}, {
|
|
3340
|
+
default: ie(() => [
|
|
3341
|
+
e.loading ? (p(), k("div", Kr, [
|
|
3342
|
+
U(Ot, {
|
|
3343
|
+
class: I(t.value)
|
|
3344
|
+
}, null, 8, ["class"])
|
|
3345
|
+
])) : q("", !0),
|
|
3346
|
+
l("span", {
|
|
3347
|
+
class: I(["flex items-center gap-2 transition-opacity duration-200 whitespace-nowrap", e.loading ? "opacity-0" : "opacity-100"])
|
|
3348
|
+
}, [
|
|
3349
|
+
o.value.icon ? (p(), k("span", {
|
|
3350
|
+
key: 0,
|
|
3351
|
+
class: I(["flex items-center size-[1.1em] mt-[-.07em]", [o.value.icon, i.value]])
|
|
3352
|
+
}, null, 2)) : q("", !0),
|
|
3353
|
+
zt(a.$slots, "default"),
|
|
3354
|
+
o.value.iconAfter ? (p(), k("span", {
|
|
3355
|
+
key: 1,
|
|
3356
|
+
class: I(["flex items-center size-[1.1em] mt-[-.07em]", [o.value.iconAfter, i.value]])
|
|
3357
|
+
}, null, 2)) : q("", !0)
|
|
3358
|
+
], 2)
|
|
3359
|
+
]),
|
|
3360
|
+
_: 3
|
|
3361
|
+
}, 8, ["href", "class"]));
|
|
3362
|
+
}
|
|
3363
|
+
});
|
|
3364
|
+
function Mt(e) {
|
|
3365
|
+
return e ? typeof e == "string" ? e : e.src || "" : "";
|
|
3366
|
+
}
|
|
3367
|
+
n(Mt, "getImageSrc");
|
|
3368
|
+
function At(e) {
|
|
3369
|
+
return Mt(e.cover) || Mt(e.avatar) || "/img/placeholder-avatar.png";
|
|
3370
|
+
}
|
|
3371
|
+
n(At, "getSelfAvatarUrl");
|
|
3372
|
+
function lt() {
|
|
3373
|
+
return "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODAiIGhlaWdodD0iODAiIHZpZXdCb3g9IjAgMCA4MCA4MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjgwIiBoZWlnaHQ9IjgwIiByeD0iNDAiIGZpbGw9IiM2MzY2RjEiLz4KPHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeD0iMjAiIHk9IjIwIj4KPHA0aCBkPSJNMTIgMTJjMi4yMSAwIDQtMS43OSA0LTRTNC4yMSA0IDIgNHMxLjc5IDQgNCA0em0wIDJjLTIuNjcgMC04IDEuMzQtOCA0djJoMTZ2LTJjMC0yLjY2LTUuMzMtNC04LTR6IiBmaWxsPSJ3aGl0ZSIvPgo8L3N2Zz4KPC9zdmc+";
|
|
3374
|
+
}
|
|
3375
|
+
n(lt, "getFallbackAvatarDataUrl");
|
|
3376
|
+
function It(e) {
|
|
3377
|
+
const o = e.target;
|
|
3378
|
+
o.dataset.fallbackUsed || (o.dataset.fallbackUsed = "true", o.src = lt());
|
|
3379
|
+
}
|
|
3380
|
+
n(It, "handleImageError");
|
|
3381
|
+
function Yr(e) {
|
|
3382
|
+
const { message: o } = e;
|
|
3383
|
+
if (!o)
|
|
3384
|
+
return null;
|
|
3385
|
+
if (typeof o == "string")
|
|
3386
|
+
return o.trim() ? { text: o.trim(), sender: "agent" } : null;
|
|
3387
|
+
if (typeof o != "object")
|
|
3388
|
+
return null;
|
|
3389
|
+
const r = [
|
|
3390
|
+
(t) => {
|
|
3391
|
+
if (!("source" in t))
|
|
3392
|
+
return null;
|
|
3393
|
+
const i = {
|
|
3394
|
+
user: "user",
|
|
3395
|
+
ai: "agent",
|
|
3396
|
+
agent: "agent"
|
|
3397
|
+
}[t.source];
|
|
3398
|
+
return i ? { text: t.message || "", sender: i } : null;
|
|
3399
|
+
}
|
|
3400
|
+
];
|
|
3401
|
+
for (const t of r) {
|
|
3402
|
+
const s = t(o);
|
|
3403
|
+
if (s && s.text.trim())
|
|
3404
|
+
return { text: s.text.trim(), sender: s.sender };
|
|
3405
|
+
}
|
|
3406
|
+
return null;
|
|
3407
|
+
}
|
|
3408
|
+
n(Yr, "parseVoiceMessage");
|
|
3409
|
+
function kn(e) {
|
|
3410
|
+
const { name: o, context: r } = e;
|
|
3411
|
+
return r === "welcome" ? `Welcome to Fiction! I'm ${o}, your digital self. I'm here to help you understand how I can represent you and assist with your daily tasks. What would you like to know about how I work?` : r === "onboarding" ? `Hi! I'm ${o}, your newly created digital self. I can handle conversations, answer questions about your expertise, and represent you professionally. Ready to see what I can do?` : `Hello! I'm ${o}. How can I help you today?`;
|
|
3412
|
+
}
|
|
3413
|
+
n(kn, "generateFirstMessage");
|
|
3414
|
+
const ct = class ct extends Et {
|
|
3415
|
+
constructor(r) {
|
|
3416
|
+
super("SelfController", r);
|
|
3417
|
+
T(this, "conversation");
|
|
3418
|
+
T(this, "isTextMode", !1);
|
|
3419
|
+
T(this, "lastMessage", { hash: "", time: 0 });
|
|
3420
|
+
T(this, "clientAudio");
|
|
3421
|
+
T(this, "unwatchAudio");
|
|
3422
|
+
T(this, "isConnecting", !1);
|
|
3423
|
+
// Simple usage tracking
|
|
3424
|
+
T(this, "sessionId");
|
|
3425
|
+
T(this, "conversationStartTime");
|
|
3426
|
+
T(this, "chatCharacterCount", 0);
|
|
3427
|
+
T(this, "voiceState", j({
|
|
3428
|
+
isActive: !1,
|
|
3429
|
+
isConnected: !1,
|
|
3430
|
+
isSpeaking: !1,
|
|
3431
|
+
isListening: !1,
|
|
3432
|
+
transcript: "Tap to begin voice conversation",
|
|
3433
|
+
connectionStatus: "disconnected"
|
|
3434
|
+
}));
|
|
3435
|
+
T(this, "textState", j({
|
|
3436
|
+
isActive: !1,
|
|
3437
|
+
isConnected: !1,
|
|
3438
|
+
isThinking: !1,
|
|
3439
|
+
connectionStatus: "disconnected"
|
|
3440
|
+
}));
|
|
3441
|
+
T(this, "agentMode", j("select"));
|
|
3442
|
+
T(this, "sharedMessages", j([]));
|
|
3443
|
+
if (!r.self.elevenlabsAgentId || r.self.elevenlabsAgentId.trim() === "")
|
|
3444
|
+
throw new Error(`Agent ID is required for SelfController. Self "${r.self.name}" (${r.self.selfId}) does not have a valid elevenlabsAgentId.`);
|
|
3445
|
+
this.clientAudio = new et(r), this.setupModeWatcher();
|
|
3446
|
+
}
|
|
3447
|
+
get audioLevels() {
|
|
3448
|
+
return this.clientAudio.audioLevels;
|
|
3449
|
+
}
|
|
3450
|
+
getClientAudio() {
|
|
3451
|
+
return this.clientAudio;
|
|
3452
|
+
}
|
|
3453
|
+
getOutputFrequencyData() {
|
|
3454
|
+
if (!this.conversation)
|
|
3455
|
+
return console.warn("No ElevenLabs conversation available for frequency data"), null;
|
|
3456
|
+
try {
|
|
3457
|
+
const r = this.conversation.getOutputByteFrequencyData();
|
|
3458
|
+
if (r && r.length > 0) {
|
|
3459
|
+
const t = Array.from(r).filter((a) => Number(a) > 0).length, s = Math.max(...Array.from(r)), i = Array.from(r).reduce((a, f) => a + Number(f), 0) / r.length;
|
|
3460
|
+
return console.warn(`ElevenLabs frequency data: ${r.length} bins, ${t} with signal, max: ${s}, avg: ${i.toFixed(1)}`), new Uint8Array(r);
|
|
3461
|
+
} else
|
|
3462
|
+
return console.warn("ElevenLabs returned empty frequency data"), null;
|
|
3463
|
+
} catch (r) {
|
|
3464
|
+
return console.error("Failed to get ElevenLabs output frequency data:", r), null;
|
|
3465
|
+
}
|
|
3466
|
+
}
|
|
3467
|
+
isDuplicateMessage(r, t) {
|
|
3468
|
+
const s = `${t}:${r.toLowerCase().trim()}`, i = Date.now(), a = s === this.lastMessage.hash && i - this.lastMessage.time < 500;
|
|
3469
|
+
return a || (this.lastMessage = { hash: s, time: i }), a;
|
|
3470
|
+
}
|
|
3471
|
+
addMessage(r, t) {
|
|
3472
|
+
this.isDuplicateMessage(r, t) || (this.sharedMessages.value = [
|
|
3473
|
+
...this.sharedMessages.value,
|
|
3474
|
+
{ id: Date.now().toString(), text: r, sender: t, timestamp: /* @__PURE__ */ new Date() }
|
|
3475
|
+
]);
|
|
3476
|
+
}
|
|
3477
|
+
getDynamicSettings() {
|
|
3478
|
+
return {
|
|
3479
|
+
dynamicVariables: {
|
|
3480
|
+
context: this.settings.context || "",
|
|
3481
|
+
firstMessage: this.settings.firstMessage || ""
|
|
3482
|
+
},
|
|
3483
|
+
overrides: {
|
|
3484
|
+
agent: this.settings.firstMessage ? { firstMessage: this.settings.firstMessage } : {}
|
|
3485
|
+
}
|
|
3486
|
+
};
|
|
3487
|
+
}
|
|
3488
|
+
updateState(r, t) {
|
|
3489
|
+
r.value = { ...r.value, ...t };
|
|
3490
|
+
}
|
|
3491
|
+
resetState(r) {
|
|
3492
|
+
r ? this.updateState(this.textState, {
|
|
3493
|
+
isActive: !1,
|
|
3494
|
+
isConnected: !1,
|
|
3495
|
+
isThinking: !1,
|
|
3496
|
+
connectionStatus: "disconnected",
|
|
3497
|
+
error: void 0
|
|
3498
|
+
}) : (this.updateState(this.voiceState, {
|
|
3499
|
+
isActive: !1,
|
|
3500
|
+
isConnected: !1,
|
|
3501
|
+
isSpeaking: !1,
|
|
3502
|
+
isListening: !1,
|
|
3503
|
+
transcript: "Ready to start a call...",
|
|
3504
|
+
connectionStatus: "disconnected",
|
|
3505
|
+
error: void 0
|
|
3506
|
+
}), this.clientAudio.resetAudioLevels());
|
|
3507
|
+
}
|
|
3508
|
+
setupModeWatcher() {
|
|
3509
|
+
Te(this.agentMode, async (r, t) => {
|
|
3510
|
+
if (this.logger.info(`Mode changed from ${t} to ${r}`), this.conversation && (t === "talk" || t === "chat") && await this.endConversation(), r === "talk" && !this.voiceState.value.isActive)
|
|
3511
|
+
try {
|
|
3512
|
+
await this.startVoiceConversation();
|
|
3513
|
+
} catch (s) {
|
|
3514
|
+
this.logger.error("Failed to auto-start voice conversation:", s), this.agentMode.value = "select";
|
|
3515
|
+
}
|
|
3516
|
+
else if (r === "chat" && !this.textState.value.isActive)
|
|
3517
|
+
try {
|
|
3518
|
+
await this.startTextConversation();
|
|
3519
|
+
} catch (s) {
|
|
3520
|
+
this.logger.error("Failed to auto-start text conversation:", s), this.agentMode.value = "select";
|
|
3521
|
+
}
|
|
3522
|
+
});
|
|
3523
|
+
}
|
|
3524
|
+
handleMessage(r, t) {
|
|
3525
|
+
const s = Yr(r);
|
|
3526
|
+
s && (this.addMessage(s.text, s.sender), !t && s.sender === "agent" && this.updateState(this.textState, { isThinking: !1 }));
|
|
3527
|
+
}
|
|
3528
|
+
handleError(r, t) {
|
|
3529
|
+
const s = r.message;
|
|
3530
|
+
this.logger.error("Conversation error:", r), this.resetState(t), t ? this.updateState(this.voiceState, {
|
|
3531
|
+
error: s,
|
|
3532
|
+
connectionStatus: "error",
|
|
3533
|
+
transcript: "Failed to start call."
|
|
3534
|
+
}) : this.updateState(this.textState, {
|
|
3535
|
+
error: s,
|
|
3536
|
+
connectionStatus: "error"
|
|
3537
|
+
});
|
|
3538
|
+
}
|
|
3539
|
+
async setMode(r) {
|
|
3540
|
+
this.agentMode.value !== r && (this.agentMode.value = r);
|
|
3541
|
+
}
|
|
3542
|
+
async startVoiceConversation(r = {}) {
|
|
3543
|
+
if (this.isConnecting) {
|
|
3544
|
+
this.logger.info("Voice conversation already connecting, ignoring duplicate request");
|
|
3545
|
+
return;
|
|
3546
|
+
}
|
|
3547
|
+
if (this.isConnecting = !0, this.isTextMode = !1, this.updateState(this.voiceState, {
|
|
3548
|
+
isActive: !0,
|
|
3549
|
+
transcript: "Connecting...",
|
|
3550
|
+
connectionStatus: "connecting"
|
|
3551
|
+
}), !await this.clientAudio.requestMicrophonePermission())
|
|
3552
|
+
throw this.isConnecting = !1, this.updateState(this.voiceState, {
|
|
3553
|
+
isActive: !1,
|
|
3554
|
+
error: "Microphone permission required",
|
|
3555
|
+
transcript: "Failed to get microphone permission",
|
|
3556
|
+
connectionStatus: "error"
|
|
3557
|
+
}), new Error("Microphone permission required");
|
|
3558
|
+
this.startSession("voice");
|
|
3559
|
+
const t = this.getDynamicSettings(), s = this.settings.self.elevenlabsAgentId;
|
|
3560
|
+
this.logger.info("Starting voice conversation...", { agentId: s, dynamicSettings: t });
|
|
3561
|
+
try {
|
|
3562
|
+
this.conversation = await yt.startSession({
|
|
3563
|
+
agentId: s,
|
|
3564
|
+
connectionType: "websocket",
|
|
3565
|
+
...t,
|
|
3566
|
+
onConnect: /* @__PURE__ */ n(() => {
|
|
3567
|
+
this.isConnecting = !1, this.clientAudio.startAudioLevelMonitoring(() => this.isVoiceConnected()), this.updateState(this.voiceState, {
|
|
3568
|
+
isConnected: !0,
|
|
3569
|
+
isListening: !0,
|
|
3570
|
+
transcript: "Connected! Start speaking...",
|
|
3571
|
+
connectionStatus: "connected"
|
|
3572
|
+
}), r.onConnect?.(), r.onAudioLevel && (this.unwatchAudio = Te(this.audioLevels, r.onAudioLevel, { immediate: !0 }));
|
|
3573
|
+
}, "onConnect"),
|
|
3574
|
+
onDisconnect: /* @__PURE__ */ n(() => {
|
|
3575
|
+
this.logger.info("Voice conversation disconnected"), this.conversation = void 0, this.clientAudio.stopAudioLevelMonitoring(), this.endSession().catch((i) => console.error("Failed to end session:", i)), this.resetState(!1), r.onDisconnect?.();
|
|
3576
|
+
}, "onDisconnect"),
|
|
3577
|
+
onError: /* @__PURE__ */ n((i) => {
|
|
3578
|
+
let a = i;
|
|
3579
|
+
i.includes("does not exist") ? a = `Agent not found: ${this.settings.self.elevenlabsAgentId}. Check ElevenLabs configuration.` : i.includes("limit") || i.includes("quota") ? a = "ElevenLabs account limit reached. Check your subscription and usage." : (i.includes("unauthorized") || i.includes("invalid")) && (a = "ElevenLabs API authentication failed. Check ELEVENLABS_API_KEY."), this.endSession().catch((f) => console.error("Failed to end session:", f)), this.handleError(new Error(a), !0), r.onError?.(new Error(a));
|
|
3580
|
+
}, "onError"),
|
|
3581
|
+
onModeChange: /* @__PURE__ */ n((i) => {
|
|
3582
|
+
const a = i.mode === "speaking";
|
|
3583
|
+
this.updateState(this.voiceState, {
|
|
3584
|
+
isSpeaking: a,
|
|
3585
|
+
isListening: !a,
|
|
3586
|
+
transcript: a ? "Agent is speaking..." : "Listening for your voice..."
|
|
3587
|
+
}), r.onModeChange?.(i.mode);
|
|
3588
|
+
}, "onModeChange"),
|
|
3589
|
+
onMessage: /* @__PURE__ */ n((i) => {
|
|
3590
|
+
this.handleMessage(i, !0), r.onMessage?.(i);
|
|
3591
|
+
}, "onMessage")
|
|
3592
|
+
});
|
|
3593
|
+
} catch (i) {
|
|
3594
|
+
throw this.isConnecting = !1, this.endSession().catch((a) => console.error("Failed to end session:", a)), this.handleError(i, !0), i;
|
|
3595
|
+
}
|
|
3596
|
+
}
|
|
3597
|
+
async startTextConversation(r = {}) {
|
|
3598
|
+
if (this.isConnecting) {
|
|
3599
|
+
this.logger.info("Text conversation already connecting, ignoring duplicate request");
|
|
3600
|
+
return;
|
|
3601
|
+
}
|
|
3602
|
+
this.isConnecting = !0, this.isTextMode = !0, this.updateState(this.textState, { isActive: !0, connectionStatus: "connecting" }), this.startSession("chat");
|
|
3603
|
+
try {
|
|
3604
|
+
this.conversation = await yt.startSession({
|
|
3605
|
+
agentId: this.settings.self.elevenlabsAgentId,
|
|
3606
|
+
connectionType: "websocket",
|
|
3607
|
+
...this.getDynamicSettings(),
|
|
3608
|
+
textOnly: !0,
|
|
3609
|
+
onConnect: /* @__PURE__ */ n(() => {
|
|
3610
|
+
this.isConnecting = !1, this.updateState(this.textState, { isConnected: !0, connectionStatus: "connected" }), r.onConnect?.();
|
|
3611
|
+
}, "onConnect"),
|
|
3612
|
+
onDisconnect: /* @__PURE__ */ n(() => {
|
|
3613
|
+
this.conversation = void 0, this.endSession().catch((t) => console.error("Failed to end session:", t)), this.resetState(!0), r.onDisconnect?.();
|
|
3614
|
+
}, "onDisconnect"),
|
|
3615
|
+
onError: /* @__PURE__ */ n((t) => {
|
|
3616
|
+
let s = t;
|
|
3617
|
+
t.includes("does not exist") ? s = `Agent not found: ${this.settings.self.elevenlabsAgentId}. Check ElevenLabs configuration.` : t.includes("limit") || t.includes("quota") ? s = "ElevenLabs account limit reached. Check your subscription and usage." : (t.includes("unauthorized") || t.includes("invalid")) && (s = "ElevenLabs API authentication failed. Check ELEVENLABS_API_KEY."), this.endSession().catch((i) => console.error("Failed to end session:", i)), this.handleError(new Error(s), !1), r.onError?.(new Error(s));
|
|
3618
|
+
}, "onError"),
|
|
3619
|
+
onModeChange: /* @__PURE__ */ n((t) => {
|
|
3620
|
+
r.onModeChange?.(t.mode);
|
|
3621
|
+
}, "onModeChange"),
|
|
3622
|
+
onMessage: /* @__PURE__ */ n((t) => {
|
|
3623
|
+
this.handleMessage(t, !1), r.onMessage?.(t);
|
|
3624
|
+
}, "onMessage")
|
|
3625
|
+
});
|
|
3626
|
+
} catch (t) {
|
|
3627
|
+
throw this.isConnecting = !1, this.endSession().catch((s) => console.error("Failed to end session:", s)), this.handleError(t, !1), t;
|
|
3628
|
+
}
|
|
3629
|
+
}
|
|
3630
|
+
async endConversation() {
|
|
3631
|
+
if (!this.conversation) {
|
|
3632
|
+
this.resetState(this.isTextMode);
|
|
3633
|
+
return;
|
|
3634
|
+
}
|
|
3635
|
+
try {
|
|
3636
|
+
await this.conversation.endSession();
|
|
3637
|
+
} finally {
|
|
3638
|
+
this.conversation = void 0, this.unwatchAudio?.(), this.unwatchAudio = void 0, this.resetState(this.isTextMode), this.isTextMode = !1;
|
|
3639
|
+
}
|
|
3640
|
+
}
|
|
3641
|
+
async sendChatMessage(r) {
|
|
3642
|
+
if (!(!this.conversation || !this.isTextMode)) {
|
|
3643
|
+
this.addMessage(r, "user"), this.chatCharacterCount += r.length;
|
|
3644
|
+
try {
|
|
3645
|
+
this.updateState(this.textState, { isThinking: !0 }), this.conversation.sendUserMessage(r);
|
|
3646
|
+
} catch (t) {
|
|
3647
|
+
this.handleError(t, !1);
|
|
3648
|
+
}
|
|
3649
|
+
}
|
|
3650
|
+
}
|
|
3651
|
+
isConnected() {
|
|
3652
|
+
return !!this.conversation;
|
|
3653
|
+
}
|
|
3654
|
+
isVoiceConnected() {
|
|
3655
|
+
return this.isConnected() && !this.isTextMode;
|
|
3656
|
+
}
|
|
3657
|
+
isTextConnected() {
|
|
3658
|
+
return this.isConnected() && this.isTextMode;
|
|
3659
|
+
}
|
|
3660
|
+
async destroy() {
|
|
3661
|
+
await this.endConversation(), await this.clientAudio.cleanup(), this.endSession().catch((r) => console.error("Failed to end session:", r));
|
|
3662
|
+
}
|
|
3663
|
+
// Simple session tracking - minimal implementation
|
|
3664
|
+
startSession(r) {
|
|
3665
|
+
this.sessionId = ir(), this.conversationStartTime = /* @__PURE__ */ new Date(), this.chatCharacterCount = 0, this.logger.info("Started conversation session", {
|
|
3666
|
+
sessionId: this.sessionId,
|
|
3667
|
+
type: r
|
|
3668
|
+
});
|
|
3669
|
+
}
|
|
3670
|
+
async endSession() {
|
|
3671
|
+
if (!this.sessionId || !this.conversationStartTime)
|
|
3672
|
+
return;
|
|
3673
|
+
const { self: r, sdk: t } = this.settings;
|
|
3674
|
+
if (!r.orgId || !t.activeUser.value?.userId) {
|
|
3675
|
+
this.logger.info("No org/user context - skipping usage recording"), this.resetSession();
|
|
3676
|
+
return;
|
|
3677
|
+
}
|
|
3678
|
+
const s = Math.round((Date.now() - this.conversationStartTime.getTime()) / 1e3), i = this.isTextMode ? "chat" : "voice", a = i === "voice" ? s : this.chatCharacterCount;
|
|
3679
|
+
try {
|
|
3680
|
+
(await fetch("/api/usage/record", {
|
|
3681
|
+
method: "POST",
|
|
3682
|
+
headers: {
|
|
3683
|
+
"Content-Type": "application/json",
|
|
3684
|
+
Authorization: `Bearer ${localStorage.getItem("token") || ""}`
|
|
3685
|
+
},
|
|
3686
|
+
body: JSON.stringify({
|
|
3687
|
+
orgId: r.orgId,
|
|
3688
|
+
selfId: r.selfId,
|
|
3689
|
+
sessionId: this.sessionId,
|
|
3690
|
+
type: i,
|
|
3691
|
+
quantity: a
|
|
3692
|
+
})
|
|
3693
|
+
})).ok && this.logger.info("Recorded usage", {
|
|
3694
|
+
sessionId: this.sessionId,
|
|
3695
|
+
type: i,
|
|
3696
|
+
quantity: a,
|
|
3697
|
+
duration: s
|
|
3698
|
+
});
|
|
3699
|
+
} catch (f) {
|
|
3700
|
+
this.logger.warn("Failed to record usage - continuing normally", f);
|
|
3701
|
+
}
|
|
3702
|
+
this.resetSession();
|
|
3703
|
+
}
|
|
3704
|
+
resetSession() {
|
|
3705
|
+
this.sessionId = void 0, this.conversationStartTime = void 0, this.chatCharacterCount = 0;
|
|
3706
|
+
}
|
|
3707
|
+
};
|
|
3708
|
+
n(ct, "SelfController");
|
|
3709
|
+
let nt = ct;
|
|
3710
|
+
const Jr = { class: "flex-1 flex flex-col min-h-0 py-6 space-y-6 h-full overflow-scroll [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden relative" }, Qr = { class: "flex-1 space-y-6" }, Xr = {
|
|
3711
|
+
key: 0,
|
|
3712
|
+
class: "bg-white/5 backdrop-blur-sm rounded-2xl p-4 border border-white/10"
|
|
3713
|
+
}, _r = { class: "text-sm text-white/70 leading-relaxed" }, eo = {
|
|
3714
|
+
key: 1,
|
|
3715
|
+
class: "bg-white/5 backdrop-blur-sm rounded-2xl p-4 border border-white/10"
|
|
3716
|
+
}, to = ["innerHTML"], ro = {
|
|
3717
|
+
key: 2,
|
|
3718
|
+
class: "bg-white/5 backdrop-blur-sm rounded-2xl p-4 border border-white/10"
|
|
3719
|
+
}, oo = { class: "text-sm text-white/70 leading-relaxed" }, no = {
|
|
3720
|
+
key: 3,
|
|
3721
|
+
class: "space-y-3"
|
|
3722
|
+
}, so = { class: "grid grid-cols-2 gap-3" }, io = { class: "bg-white/5 backdrop-blur-sm rounded-2xl p-4 border border-white/10" }, ao = { class: "text-sm text-white/70 leading-relaxed space-y-2" }, lo = { class: "flex items-center gap-2 pt-2" }, co = { class: "text-xs text-white/60" }, uo = /* @__PURE__ */ oe({
|
|
3723
|
+
__name: "ElSelfAbout",
|
|
3724
|
+
props: {
|
|
3725
|
+
self: {}
|
|
3726
|
+
},
|
|
3727
|
+
setup(e) {
|
|
3728
|
+
const o = re(() => [
|
|
3729
|
+
{
|
|
3730
|
+
key: "email",
|
|
3731
|
+
condition: /* @__PURE__ */ n(() => !!e.self.email, "condition"),
|
|
3732
|
+
generate: /* @__PURE__ */ n(() => ({
|
|
3733
|
+
title: "Contact",
|
|
3734
|
+
url: `mailto:${e.self.email}`,
|
|
3735
|
+
icon: "i-heroicons-envelope"
|
|
3736
|
+
}), "generate")
|
|
3737
|
+
},
|
|
3738
|
+
{
|
|
3739
|
+
key: "linkedin",
|
|
3740
|
+
condition: /* @__PURE__ */ n(() => !!e.self.accounts?.linkedin?.handle, "condition"),
|
|
3741
|
+
generate: /* @__PURE__ */ n(() => ({
|
|
3742
|
+
title: "LinkedIn",
|
|
3743
|
+
url: e.self.accounts?.linkedin?.url || `https://linkedin.com/in/${e.self.accounts?.linkedin?.handle}`,
|
|
3744
|
+
icon: "i-simple-icons-linkedin"
|
|
3745
|
+
}), "generate")
|
|
3746
|
+
},
|
|
3747
|
+
{
|
|
3748
|
+
key: "x",
|
|
3749
|
+
condition: /* @__PURE__ */ n(() => !!e.self.accounts?.x?.handle, "condition"),
|
|
3750
|
+
generate: /* @__PURE__ */ n(() => ({
|
|
3751
|
+
title: "X (Twitter)",
|
|
3752
|
+
url: e.self.accounts?.x?.url || `https://x.com/${e.self.accounts?.x?.handle}`,
|
|
3753
|
+
icon: "i-simple-icons-x"
|
|
3754
|
+
}), "generate")
|
|
3755
|
+
},
|
|
3756
|
+
{
|
|
3757
|
+
key: "github",
|
|
3758
|
+
condition: /* @__PURE__ */ n(() => !!e.self.accounts?.github?.handle, "condition"),
|
|
3759
|
+
generate: /* @__PURE__ */ n(() => ({
|
|
3760
|
+
title: "GitHub",
|
|
3761
|
+
url: e.self.accounts?.github?.url || `https://github.com/${e.self.accounts?.github?.handle}`,
|
|
3762
|
+
icon: "i-simple-icons-github"
|
|
3763
|
+
}), "generate")
|
|
3764
|
+
},
|
|
3765
|
+
{
|
|
3766
|
+
key: "website",
|
|
3767
|
+
condition: /* @__PURE__ */ n(() => !!e.self.accounts?.website?.url, "condition"),
|
|
3768
|
+
generate: /* @__PURE__ */ n(() => ({
|
|
3769
|
+
title: "Website",
|
|
3770
|
+
url: e.self.accounts?.website?.url,
|
|
3771
|
+
icon: "i-heroicons-globe-alt"
|
|
3772
|
+
}), "generate")
|
|
3773
|
+
}
|
|
3774
|
+
].filter((t) => t.condition()).map((t) => t.generate()));
|
|
3775
|
+
return (r, t) => (p(), k("div", Jr, [
|
|
3776
|
+
l("div", Qr, [
|
|
3777
|
+
e.self.headline ? (p(), k("div", Xr, [
|
|
3778
|
+
t[0] || (t[0] = l("h3", { class: "text-sm font-medium text-white/90 mb-2" }, " Professional Tagline ", -1)),
|
|
3779
|
+
l("div", _r, Z(e.self.headline), 1)
|
|
3780
|
+
])) : q("", !0),
|
|
3781
|
+
e.self.summary ? (p(), k("div", eo, [
|
|
3782
|
+
t[1] || (t[1] = l("h3", { class: "text-sm font-medium text-white/90 mb-2" }, " About ", -1)),
|
|
3783
|
+
l("div", {
|
|
3784
|
+
class: "text-sm text-white/70 leading-relaxed",
|
|
3785
|
+
innerHTML: e.self.summary
|
|
3786
|
+
}, null, 8, to)
|
|
3787
|
+
])) : q("", !0),
|
|
3788
|
+
e.self.entityType === "company" ? (p(), k("div", ro, [
|
|
3789
|
+
t[2] || (t[2] = l("h3", { class: "text-sm font-medium text-white/90 mb-2" }, " Company Info ", -1)),
|
|
3790
|
+
l("p", oo, " This is a company digital self representing " + Z(e.self.name) + ". ", 1)
|
|
3791
|
+
])) : q("", !0),
|
|
3792
|
+
o.value.length > 0 ? (p(), k("div", no, [
|
|
3793
|
+
t[3] || (t[3] = l("h3", { class: "text-sm font-medium text-white/90" }, " Connect ", -1)),
|
|
3794
|
+
l("div", so, [
|
|
3795
|
+
(p(!0), k(De, null, Qe(o.value, (s) => (p(), ke(Fe, {
|
|
3796
|
+
key: s.title,
|
|
3797
|
+
design: "ghost",
|
|
3798
|
+
theme: "default",
|
|
3799
|
+
size: "sm",
|
|
3800
|
+
class: "bg-white/5 hover:bg-white/10 border border-white/10 text-white/80 text-sm justify-start h-10",
|
|
3801
|
+
href: s.url,
|
|
3802
|
+
target: "_blank"
|
|
3803
|
+
}, {
|
|
3804
|
+
default: ie(() => [
|
|
3805
|
+
l("i", {
|
|
3806
|
+
class: I([s.icon, "size-4 mr-2"])
|
|
3807
|
+
}, null, 2),
|
|
3808
|
+
Pe(" " + Z(s.title), 1)
|
|
3809
|
+
]),
|
|
3810
|
+
_: 2
|
|
3811
|
+
}, 1032, ["href"]))), 128))
|
|
3812
|
+
])
|
|
3813
|
+
])) : q("", !0),
|
|
3814
|
+
l("div", io, [
|
|
3815
|
+
t[5] || (t[5] = l("h3", { class: "text-sm font-medium text-white/90 mb-2" }, " Digital Self ", -1)),
|
|
3816
|
+
l("div", ao, [
|
|
3817
|
+
l("p", null, " This digital self can engage in conversations, answer questions about " + Z(e.self.name) + ", and provide assistance based on their expertise and background. ", 1),
|
|
3818
|
+
l("div", lo, [
|
|
3819
|
+
t[4] || (t[4] = l("div", { class: "w-2 h-2 bg-green-500 rounded-full" }, null, -1)),
|
|
3820
|
+
l("span", co, Z(e.self.entityType === "company" ? "Company" : "Personal") + " assistant ", 1)
|
|
3821
|
+
])
|
|
3822
|
+
])
|
|
3823
|
+
])
|
|
3824
|
+
]),
|
|
3825
|
+
t[6] || (t[6] = l("div", { class: "pt-4 border-t border-white/10" }, [
|
|
3826
|
+
l("p", { class: "text-sm text-white/50 text-center" }, " Powered by Fiction ")
|
|
3827
|
+
], -1))
|
|
3828
|
+
]));
|
|
3829
|
+
}
|
|
3830
|
+
}), ho = { class: "flex flex-col h-full relative" }, go = {
|
|
3831
|
+
key: 0,
|
|
3832
|
+
class: "absolute top-[-10px] left-1/2 transform -translate-x-1/2 z-30 px-4 py-1 bg-theme-900 text-theme-500 text-[10px] font-mono rounded-full"
|
|
3833
|
+
}, fo = { class: "text-xs leading-relaxed" }, mo = {
|
|
3834
|
+
key: 0,
|
|
3835
|
+
class: "flex justify-start"
|
|
3836
|
+
}, bo = { class: "flex-shrink-0 pt-6 mt-4 border-t border-white/10" }, po = { class: "flex gap-2" }, vo = ["placeholder", "disabled"], xo = /* @__PURE__ */ oe({
|
|
3837
|
+
__name: "ElSelfChat",
|
|
3838
|
+
props: {
|
|
3839
|
+
selfController: {}
|
|
3840
|
+
},
|
|
3841
|
+
setup(e) {
|
|
3842
|
+
const o = j(""), r = j();
|
|
3843
|
+
async function t() {
|
|
3844
|
+
if (!o.value.trim() || !e.selfController || !e.selfController.textState.value.isConnected)
|
|
3845
|
+
return;
|
|
3846
|
+
const i = o.value;
|
|
3847
|
+
o.value = "";
|
|
3848
|
+
try {
|
|
3849
|
+
await e.selfController.sendChatMessage(i), s();
|
|
3850
|
+
} catch (a) {
|
|
3851
|
+
console.error("Error sending message:", a);
|
|
3852
|
+
}
|
|
3853
|
+
}
|
|
3854
|
+
n(t, "sendMessage");
|
|
3855
|
+
function s() {
|
|
3856
|
+
r.value && pt(() => {
|
|
3857
|
+
const i = r.value;
|
|
3858
|
+
i.scrollTop = i.scrollHeight;
|
|
3859
|
+
});
|
|
3860
|
+
}
|
|
3861
|
+
return n(s, "scrollToBottom"), Te(() => e.selfController?.sharedMessages.value, (i) => {
|
|
3862
|
+
i && i.length > 0 && pt(() => s());
|
|
3863
|
+
}, { immediate: !0, deep: !0 }), (i, a) => (p(), k("div", ho, [
|
|
3864
|
+
e.selfController?.textState.value.connectionStatus !== "connected" ? (p(), k("div", go, Z(e.selfController?.textState.value.connectionStatus === "connecting" ? "Connecting..." : "Disconnected"), 1)) : q("", !0),
|
|
3865
|
+
l("div", {
|
|
3866
|
+
ref_key: "messagesContainer",
|
|
3867
|
+
ref: r,
|
|
3868
|
+
class: "flex-1 overflow-y-auto overflow-x-hidden py-8 space-y-4 min-h-0 [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden border-t border-white/10"
|
|
3869
|
+
}, [
|
|
3870
|
+
(p(!0), k(De, null, Qe(e.selfController?.sharedMessages.value.filter((f) => f.sender !== "system") ?? [], (f) => (p(), k("div", {
|
|
3871
|
+
key: f.id,
|
|
3872
|
+
class: I(["flex", {
|
|
3873
|
+
"justify-end": f.sender === "user",
|
|
3874
|
+
"justify-start": f.sender === "agent"
|
|
3875
|
+
}])
|
|
3876
|
+
}, [
|
|
3877
|
+
l("div", {
|
|
3878
|
+
class: I(["max-w-[400px] rounded-xl px-4 py-2 backdrop-blur-sm", f.sender === "user" ? "bg-primary-400/40 text-white border border-primary-400/60 ml-6" : "bg-white/10 text-white/90 border border-white/10 mr-6"])
|
|
3879
|
+
}, [
|
|
3880
|
+
l("p", fo, Z(f.text), 1)
|
|
3881
|
+
], 2)
|
|
3882
|
+
], 2))), 128)),
|
|
3883
|
+
e.selfController?.textState.value.isThinking ? (p(), k("div", mo, [...a[1] || (a[1] = [
|
|
3884
|
+
l("div", { class: "max-w-[400px] rounded-xl px-4 py-1 backdrop-blur-sm bg-white/10 text-white/90 border border-white/10 mr-6 flex items-center" }, [
|
|
3885
|
+
l("i", { class: "i-svg-spinners-3-dots-fade size-6" })
|
|
3886
|
+
], -1)
|
|
3887
|
+
])])) : q("", !0)
|
|
3888
|
+
], 512),
|
|
3889
|
+
l("div", bo, [
|
|
3890
|
+
l("div", po, [
|
|
3891
|
+
er(l("input", {
|
|
3892
|
+
"onUpdate:modelValue": a[0] || (a[0] = (f) => o.value = f),
|
|
3893
|
+
type: "text",
|
|
3894
|
+
placeholder: e.selfController?.textState.value.isConnected ? "Type a message..." : "Connecting...",
|
|
3895
|
+
disabled: e.selfController?.textState.value.isThinking || !e.selfController?.textState.value.isConnected,
|
|
3896
|
+
class: "flex-1 bg-white/10 backdrop-blur-sm border border-white/20 rounded-full px-4 py-2 text-white placeholder-white/50 text-sm focus:outline-none focus:border-white/40 disabled:opacity-50",
|
|
3897
|
+
onKeyup: tr(t, ["enter"])
|
|
3898
|
+
}, null, 40, vo), [
|
|
3899
|
+
[rr, o.value]
|
|
3900
|
+
]),
|
|
3901
|
+
U(Fe, {
|
|
3902
|
+
design: "solid",
|
|
3903
|
+
theme: "primary",
|
|
3904
|
+
size: "sm",
|
|
3905
|
+
class: "bg-white/20 backdrop-blur-sm border border-white/20 text-white rounded-full size-10 hover:bg-white/30 disabled:opacity-50 disabled:cursor-not-allowed",
|
|
3906
|
+
disabled: e.selfController?.textState.value.isThinking || !o.value.trim() || !e.selfController?.textState.value.isConnected,
|
|
3907
|
+
onClick: t
|
|
3908
|
+
}, {
|
|
3909
|
+
default: ie(() => [...a[2] || (a[2] = [
|
|
3910
|
+
l("i", { class: "i-heroicons-paper-airplane size-4" }, null, -1)
|
|
3911
|
+
])]),
|
|
3912
|
+
_: 1
|
|
3913
|
+
}, 8, ["disabled"])
|
|
3914
|
+
])
|
|
3915
|
+
])
|
|
3916
|
+
]));
|
|
3917
|
+
}
|
|
3918
|
+
}), yo = { class: "relative flex-shrink-0" }, ko = ["src", "alt"], wo = {
|
|
3919
|
+
key: 0,
|
|
3920
|
+
class: "absolute top-1 right-1"
|
|
3921
|
+
}, Co = { class: "min-w-0" }, st = /* @__PURE__ */ oe({
|
|
3922
|
+
__name: "ElSelfHeader",
|
|
3923
|
+
props: {
|
|
3924
|
+
self: {},
|
|
3925
|
+
size: { default: "md" },
|
|
3926
|
+
showOnlineIndicator: { type: Boolean, default: !0 },
|
|
3927
|
+
layout: { default: "centered" }
|
|
3928
|
+
},
|
|
3929
|
+
setup(e) {
|
|
3930
|
+
function o() {
|
|
3931
|
+
return e.self.avatar?.src ? e.self.avatar.src : lt();
|
|
3932
|
+
}
|
|
3933
|
+
return n(o, "getAvatarSrc"), (r, t) => (p(), k("div", {
|
|
3934
|
+
class: I(["flex gap-4", [
|
|
3935
|
+
e.layout === "centered" ? "flex-col items-center text-center" : "flex-row items-center justify-center"
|
|
3936
|
+
]])
|
|
3937
|
+
}, [
|
|
3938
|
+
l("div", yo, [
|
|
3939
|
+
l("div", {
|
|
3940
|
+
class: I(["rounded-full overflow-hidden border-white", e.size === "lg" ? "w-20 h-20 sm:w-24 sm:h-24 border-4" : "w-16 sm:size-16 border-2"])
|
|
3941
|
+
}, [
|
|
3942
|
+
l("img", {
|
|
3943
|
+
src: o(),
|
|
3944
|
+
alt: e.self.name,
|
|
3945
|
+
class: "w-full h-full object-cover",
|
|
3946
|
+
onError: t[0] || (t[0] = //@ts-ignore
|
|
3947
|
+
(...s) => te(It) && te(It)(...s))
|
|
3948
|
+
}, null, 40, ko)
|
|
3949
|
+
], 2),
|
|
3950
|
+
e.showOnlineIndicator ? (p(), k("div", wo, [...t[1] || (t[1] = [
|
|
3951
|
+
l("div", {
|
|
3952
|
+
class: "w-4 h-4 bg-green-500 rounded-full ring-2 ring-white absolute",
|
|
3953
|
+
style: { animation: "ping 3s cubic-bezier(0, 0, 0.2, 1) infinite" }
|
|
3954
|
+
}, null, -1),
|
|
3955
|
+
l("div", { class: "w-4 h-4 bg-green-500 rounded-full ring-2 ring-white" }, null, -1)
|
|
3956
|
+
])])) : q("", !0)
|
|
3957
|
+
]),
|
|
3958
|
+
l("div", Co, [
|
|
3959
|
+
l("h1", {
|
|
3960
|
+
class: I(["font-light text-white mb-1 truncate", [
|
|
3961
|
+
e.size === "lg" ? "text-3xl mb-2" : "text-xl sm:text-2xl tracking-wide leading-tight",
|
|
3962
|
+
e.layout === "horizontal" ? "text-white/95" : ""
|
|
3963
|
+
]])
|
|
3964
|
+
}, Z(e.self.name), 3),
|
|
3965
|
+
l("p", {
|
|
3966
|
+
class: I(["font-light line-clamp-1", [
|
|
3967
|
+
e.size === "lg" ? "text-base text-white/60" : "text-sm sm:text-base",
|
|
3968
|
+
e.layout === "horizontal" ? "text-white/70 truncate" : "text-white/60"
|
|
3969
|
+
]])
|
|
3970
|
+
}, Z(e.layout === "horizontal" ? e.self.title || "Digital Self" : e.self.title), 3)
|
|
3971
|
+
])
|
|
3972
|
+
], 2));
|
|
3973
|
+
}
|
|
3974
|
+
}), So = { class: "close-wrap overflow-hidden top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[28px] h-[28px] absolute" }, Mo = /* @__PURE__ */ oe({
|
|
3975
|
+
name: "FClose",
|
|
3976
|
+
__name: "FClose",
|
|
3977
|
+
props: {
|
|
3978
|
+
colorMode: { default: "auto" }
|
|
3979
|
+
},
|
|
3980
|
+
emits: ["click"],
|
|
3981
|
+
setup(e) {
|
|
3982
|
+
const o = j(!1), r = `close-${Math.random().toString(36).substr(2, 9)}`;
|
|
3983
|
+
He(() => {
|
|
3984
|
+
setTimeout(() => {
|
|
3985
|
+
o.value = !0;
|
|
3986
|
+
}, 100);
|
|
3987
|
+
}), or(() => {
|
|
3988
|
+
o.value = !1;
|
|
3989
|
+
});
|
|
3990
|
+
const t = re(() => e.colorMode === "light" ? "bg-white" : e.colorMode === "dark" ? "bg-theme-950" : "bg-theme-950 dark:bg-white");
|
|
3991
|
+
return (s, i) => (p(), k("a", {
|
|
3992
|
+
id: r,
|
|
3993
|
+
class: I(["close block cursor-pointer duration-1000 hover:scale-110 active:scale-90 hover:rotate-90 transition-all ease-[cubic-bezier(0.25,1,0.33,1)] w-[60px] h-[60px] rounded-full", o.value ? "in-view" : "out-view"]),
|
|
3994
|
+
onClick: i[0] || (i[0] = (a) => s.$emit("click", a))
|
|
3995
|
+
}, [
|
|
3996
|
+
i[1] || (i[1] = l("span", { class: "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[60px] h-[60px] rounded-full transition-all" }, null, -1)),
|
|
3997
|
+
l("span", So, [
|
|
3998
|
+
l("span", {
|
|
3999
|
+
class: I([t.value, "close-line close-line1 h-full w-[3px] absolute rounded-[5px] left-[13px] transition-all"])
|
|
4000
|
+
}, null, 2),
|
|
4001
|
+
l("span", {
|
|
4002
|
+
class: I([t.value, "close-line close-line2 h-full w-[3px] absolute rounded-[5px] left-[13px] transition-all"])
|
|
4003
|
+
}, null, 2)
|
|
4004
|
+
])
|
|
4005
|
+
], 2));
|
|
4006
|
+
}
|
|
4007
|
+
}), Ao = /* @__PURE__ */ n((e, o) => {
|
|
4008
|
+
const r = e.__vccOpts || e;
|
|
4009
|
+
for (const [t, s] of o)
|
|
4010
|
+
r[t] = s;
|
|
4011
|
+
return r;
|
|
4012
|
+
}, "_export_sfc"), Io = /* @__PURE__ */ Ao(Mo, [["__scopeId", "data-v-bbf0f1cb"]]), zo = { class: "px-4 pt-12 pb-8 border-b border-white/10" }, $o = { class: "flex-1 p-6 space-y-2" }, Lo = ["onClick"], Eo = { class: "flex items-center gap-3" }, To = { class: "flex-1" }, Po = { class: "font-medium text-white" }, Fo = /* @__PURE__ */ oe({
|
|
4013
|
+
name: "SelfSidebar",
|
|
4014
|
+
__name: "ElSelfSidebar",
|
|
4015
|
+
props: {
|
|
4016
|
+
modelValue: { type: Boolean },
|
|
4017
|
+
self: {}
|
|
4018
|
+
},
|
|
4019
|
+
emits: ["update:modelValue"],
|
|
4020
|
+
setup(e, { emit: o }) {
|
|
4021
|
+
const r = e, t = o, s = j(!1);
|
|
4022
|
+
He(() => {
|
|
4023
|
+
s.value = !0;
|
|
4024
|
+
});
|
|
4025
|
+
const i = re({
|
|
4026
|
+
get: /* @__PURE__ */ n(() => r.modelValue, "get"),
|
|
4027
|
+
set: /* @__PURE__ */ n((h) => t("update:modelValue", h), "set")
|
|
4028
|
+
}), a = [
|
|
4029
|
+
{
|
|
4030
|
+
icon: "i-tabler-share",
|
|
4031
|
+
label: "Share This Digital Self",
|
|
4032
|
+
action: "share"
|
|
4033
|
+
},
|
|
4034
|
+
{
|
|
4035
|
+
icon: "i-tabler-user",
|
|
4036
|
+
label: "Visit Full Profile",
|
|
4037
|
+
action: "profile"
|
|
4038
|
+
},
|
|
4039
|
+
{
|
|
4040
|
+
icon: "i-tabler-sparkles",
|
|
4041
|
+
label: "Create Your Own",
|
|
4042
|
+
action: "create"
|
|
4043
|
+
},
|
|
4044
|
+
{
|
|
4045
|
+
icon: "i-tabler-bug",
|
|
4046
|
+
label: "Report an Issue",
|
|
4047
|
+
action: "report"
|
|
4048
|
+
}
|
|
4049
|
+
];
|
|
4050
|
+
function f(h) {
|
|
4051
|
+
const { action: m, self: A = r.self } = h;
|
|
4052
|
+
switch (m) {
|
|
4053
|
+
case "share": {
|
|
4054
|
+
const K = `${window.location.origin}/@${A.handle || A.selfId}`;
|
|
4055
|
+
navigator.clipboard.writeText(K);
|
|
4056
|
+
break;
|
|
4057
|
+
}
|
|
4058
|
+
case "profile":
|
|
4059
|
+
window.open(`/@${A.handle || A.selfId}`, "_blank");
|
|
4060
|
+
break;
|
|
4061
|
+
case "create":
|
|
4062
|
+
window.open("/auth", "_blank");
|
|
4063
|
+
break;
|
|
4064
|
+
case "report":
|
|
4065
|
+
window.location.href = "mailto:support@fiction.com";
|
|
4066
|
+
break;
|
|
4067
|
+
}
|
|
4068
|
+
i.value = !1;
|
|
4069
|
+
}
|
|
4070
|
+
n(f, "handleNavigation");
|
|
4071
|
+
function g(h) {
|
|
4072
|
+
f({ action: h });
|
|
4073
|
+
}
|
|
4074
|
+
return n(g, "handleAction"), (h, m) => (p(), k(De, null, [
|
|
4075
|
+
U(vt, {
|
|
4076
|
+
"enter-active-class": "transition-opacity duration-300 ease-out",
|
|
4077
|
+
"leave-active-class": "transition-opacity duration-200 ease-in",
|
|
4078
|
+
"enter-from-class": "opacity-0",
|
|
4079
|
+
"enter-to-class": "opacity-100",
|
|
4080
|
+
"leave-from-class": "opacity-100",
|
|
4081
|
+
"leave-to-class": "opacity-0"
|
|
4082
|
+
}, {
|
|
4083
|
+
default: ie(() => [
|
|
4084
|
+
i.value ? (p(), k("div", {
|
|
4085
|
+
key: 0,
|
|
4086
|
+
class: "absolute inset-0 z-40 bg-black/50 backdrop-blur-sm",
|
|
4087
|
+
onClick: m[0] || (m[0] = (A) => i.value = !1)
|
|
4088
|
+
})) : q("", !0)
|
|
4089
|
+
]),
|
|
4090
|
+
_: 1
|
|
4091
|
+
}),
|
|
4092
|
+
U(vt, {
|
|
4093
|
+
"enter-active-class": "transition-all duration-500 ease-[cubic-bezier(0.25,1,0.33,1)]",
|
|
4094
|
+
"leave-active-class": "transition-all duration-400 ease-[cubic-bezier(0.25,1,0.33,1)]",
|
|
4095
|
+
"enter-from-class": "-translate-x-full",
|
|
4096
|
+
"enter-to-class": "translate-x-0",
|
|
4097
|
+
"leave-from-class": "translate-x-0",
|
|
4098
|
+
"leave-to-class": "-translate-x-full"
|
|
4099
|
+
}, {
|
|
4100
|
+
default: ie(() => [
|
|
4101
|
+
i.value ? (p(), k("div", {
|
|
4102
|
+
key: 0,
|
|
4103
|
+
class: "absolute inset-0 z-50 flex",
|
|
4104
|
+
onClick: m[3] || (m[3] = (A) => i.value = !1)
|
|
4105
|
+
}, [
|
|
4106
|
+
l("div", {
|
|
4107
|
+
class: "relative w-[80%] max-w-[420px] h-full shadow-2xl bg-black/70 backdrop-blur-xl flex flex-col justify-center",
|
|
4108
|
+
onClick: m[2] || (m[2] = $t(() => {
|
|
4109
|
+
}, ["stop"]))
|
|
4110
|
+
}, [
|
|
4111
|
+
U(Io, {
|
|
4112
|
+
class: "absolute -right-16 top-4 z-10",
|
|
4113
|
+
theme: "light",
|
|
4114
|
+
onClick: m[1] || (m[1] = (A) => i.value = !1)
|
|
4115
|
+
}),
|
|
4116
|
+
l("div", zo, [
|
|
4117
|
+
U(st, {
|
|
4118
|
+
self: { ...e.self, title: `@${e.self.handle || e.self.selfId}` },
|
|
4119
|
+
size: "md",
|
|
4120
|
+
"show-online-indicator": !1,
|
|
4121
|
+
layout: "horizontal"
|
|
4122
|
+
}, null, 8, ["self"])
|
|
4123
|
+
]),
|
|
4124
|
+
l("div", $o, [
|
|
4125
|
+
U(nr, {
|
|
4126
|
+
"enter-active-class": "transition-all duration-400 ease-[cubic-bezier(0.25,1,0.33,1)]",
|
|
4127
|
+
"leave-active-class": "transition-all duration-200 ease-[cubic-bezier(0.25,1,0.33,1)]",
|
|
4128
|
+
"enter-from-class": "-translate-x-4 opacity-0",
|
|
4129
|
+
"enter-to-class": "translate-x-0 opacity-100",
|
|
4130
|
+
"leave-from-class": "translate-x-0 opacity-100",
|
|
4131
|
+
"leave-to-class": "-translate-x-4 opacity-0"
|
|
4132
|
+
}, {
|
|
4133
|
+
default: ie(() => [
|
|
4134
|
+
(p(), k(De, null, Qe(a, (A, K) => l("button", {
|
|
4135
|
+
key: A.action,
|
|
4136
|
+
style: it({ transitionDelay: `${K * 40}ms` }),
|
|
4137
|
+
class: "cursor-pointer w-full text-left p-3 rounded-xl hover:bg-white/10 transition-all duration-200 ease-[cubic-bezier(0.25,1,0.33,1)] group",
|
|
4138
|
+
onClick: /* @__PURE__ */ n((L) => g(A.action), "onClick")
|
|
4139
|
+
}, [
|
|
4140
|
+
l("div", Eo, [
|
|
4141
|
+
l("i", {
|
|
4142
|
+
class: I([A.icon, "size-5 transition-transform duration-200 ease-[cubic-bezier(0.25,1,0.33,1)] group-hover:scale-110 text-white/70 group-hover:text-white"])
|
|
4143
|
+
}, null, 2),
|
|
4144
|
+
l("div", To, [
|
|
4145
|
+
l("div", Po, Z(A.label), 1)
|
|
4146
|
+
])
|
|
4147
|
+
])
|
|
4148
|
+
], 12, Lo)), 64))
|
|
4149
|
+
]),
|
|
4150
|
+
_: 1
|
|
4151
|
+
})
|
|
4152
|
+
]),
|
|
4153
|
+
m[4] || (m[4] = l("div", { class: "p-6" }, [
|
|
4154
|
+
l("div", { class: "text-center" }, [
|
|
4155
|
+
l("p", { class: "text-xs text-white/50" }, [
|
|
4156
|
+
Pe(" Digital Self by "),
|
|
4157
|
+
l("a", {
|
|
4158
|
+
href: "https://www.fiction.com",
|
|
4159
|
+
class: "text-white/70 hover:text-white transition-colors ml-0.5",
|
|
4160
|
+
target: "_blank"
|
|
4161
|
+
}, " Fiction.com ")
|
|
4162
|
+
])
|
|
4163
|
+
])
|
|
4164
|
+
], -1))
|
|
4165
|
+
])
|
|
4166
|
+
])) : q("", !0)
|
|
4167
|
+
]),
|
|
4168
|
+
_: 1
|
|
4169
|
+
})
|
|
4170
|
+
], 64));
|
|
4171
|
+
}
|
|
4172
|
+
}), Do = { class: "w-full max-w-full flex items-center justify-center" }, Ro = ["width", "height"], Bo = /* @__PURE__ */ oe({
|
|
4173
|
+
__name: "ElAudioVisualizer",
|
|
4174
|
+
props: {
|
|
4175
|
+
rms: {},
|
|
4176
|
+
color: {},
|
|
4177
|
+
isActive: { type: Boolean },
|
|
4178
|
+
audioLevels: {},
|
|
4179
|
+
isListening: { type: Boolean },
|
|
4180
|
+
isSpeaking: { type: Boolean },
|
|
4181
|
+
isConnected: { type: Boolean },
|
|
4182
|
+
enableRealAudio: { type: Boolean },
|
|
4183
|
+
selfController: {},
|
|
4184
|
+
enableWaveMotion: { type: Boolean },
|
|
4185
|
+
enableScrollingWave: { type: Boolean }
|
|
4186
|
+
},
|
|
4187
|
+
setup(e) {
|
|
4188
|
+
const o = e, r = j();
|
|
4189
|
+
let t = null, s = null;
|
|
4190
|
+
const i = j(!1), a = j(!0), f = /* @__PURE__ */ new Map();
|
|
4191
|
+
let g = null, h = null, m = null;
|
|
4192
|
+
const A = j(!1), K = j(null), { bars: L, barWidth: E, barSpacing: V, minHeight: H, maxHeight: Q, STIFFNESS: Se, DAMPING: we, PEAK_HOLD_TIME: de, PEAK_DECAY_STIFFNESS: be, PEAK_DECAY_DAMPING: ce } = cr, X = new Float32Array(L).fill(H), x = new Float32Array(L).fill(0), _ = new Float32Array(L).fill(H), ae = new Float32Array(L).fill(H), ue = new Float32Array(L).fill(0), he = new Float32Array(L).fill(0);
|
|
4193
|
+
function We(d) {
|
|
4194
|
+
return d < 200 ? { stiffnessMultiplier: 0.7, dampingMultiplier: 1.2 } : d < 1e3 ? { stiffnessMultiplier: 1, dampingMultiplier: 1 } : d < 4e3 ? { stiffnessMultiplier: 1.3, dampingMultiplier: 0.8 } : { stiffnessMultiplier: 1.5, dampingMultiplier: 0.6 };
|
|
4195
|
+
}
|
|
4196
|
+
n(We, "getFrequencyPhysics");
|
|
4197
|
+
async function Me() {
|
|
4198
|
+
if (!(typeof window > "u" || !o.enableRealAudio || !o.selfController))
|
|
4199
|
+
try {
|
|
4200
|
+
const d = o.selfController.getClientAudio();
|
|
4201
|
+
if (d?.isAudioContextAvailable()) {
|
|
4202
|
+
const y = d.getSharedAnalyser();
|
|
4203
|
+
if (y) {
|
|
4204
|
+
h = y;
|
|
4205
|
+
const w = new ArrayBuffer(y.frequencyBinCount);
|
|
4206
|
+
m = new Uint8Array(w), A.value = !0, K.value = null, console.warn("AudioVisualizer: Using shared audio context from ClientAudio");
|
|
4207
|
+
return;
|
|
4208
|
+
}
|
|
4209
|
+
}
|
|
4210
|
+
console.warn("AudioVisualizer: Could not use shared context, creating independent audio analysis"), A.value = !1, K.value = "Shared audio context not available";
|
|
4211
|
+
} catch (d) {
|
|
4212
|
+
K.value = d instanceof Error ? d.message : "Failed to setup shared audio", A.value = !1, console.error("Shared audio setup failed:", d);
|
|
4213
|
+
}
|
|
4214
|
+
}
|
|
4215
|
+
n(Me, "setupAudio");
|
|
4216
|
+
function ge() {
|
|
4217
|
+
h = null, m = null, A.value = !1, K.value = null;
|
|
4218
|
+
}
|
|
4219
|
+
n(ge, "cleanupAudio");
|
|
4220
|
+
let F = 1;
|
|
4221
|
+
function ne() {
|
|
4222
|
+
if (!r.value)
|
|
4223
|
+
return;
|
|
4224
|
+
typeof window < "u" && (F = Math.max(1, Math.min(2, window.devicePixelRatio || 1)));
|
|
4225
|
+
const d = (E + V) * L - V, y = Q;
|
|
4226
|
+
r.value.width = Math.floor(d * F), r.value.height = Math.floor(y * F), r.value.style.width = `${d}px`, r.value.style.height = `${y}px`, t && t.setTransform(F, 0, 0, F, 0, 0), Wt();
|
|
4227
|
+
}
|
|
4228
|
+
n(ne, "resizeCanvas");
|
|
4229
|
+
function v() {
|
|
4230
|
+
return !h || !m || !A.value ? Array.from({ length: W.length }, () => 0) : (h.getByteFrequencyData(m), Ne(m));
|
|
4231
|
+
}
|
|
4232
|
+
n(v, "generateRealInputFrequencyBands");
|
|
4233
|
+
function Ue() {
|
|
4234
|
+
if (!o.selfController)
|
|
4235
|
+
return Array.from({ length: W.length }, () => 0);
|
|
4236
|
+
try {
|
|
4237
|
+
const d = o.selfController.getOutputFrequencyData();
|
|
4238
|
+
if (d && d.length > 0)
|
|
4239
|
+
return Ne(d);
|
|
4240
|
+
} catch (d) {
|
|
4241
|
+
console.warn("Failed to get output frequency data:", d);
|
|
4242
|
+
}
|
|
4243
|
+
return Array.from({ length: W.length }, () => 0);
|
|
4244
|
+
}
|
|
4245
|
+
n(Ue, "generateRealOutputFrequencyBands");
|
|
4246
|
+
function Ne(d) {
|
|
4247
|
+
return Array.from({ length: W.length }, (w, M) => {
|
|
4248
|
+
const S = W[M], B = Math.floor(S / 12e3 * d.length), fe = Math.max(1, Math.floor(d.length / W.length / 2));
|
|
4249
|
+
let G = 0;
|
|
4250
|
+
for (let O = 0; O < fe && B + O < d.length; O++)
|
|
4251
|
+
G += d[B + O];
|
|
4252
|
+
G = G / fe / 255;
|
|
4253
|
+
let z = 1;
|
|
4254
|
+
S < 150 ? z = 0.1 : S < 200 ? z = 0.3 : S >= 400 && S <= 600 ? z = 1.4 : S >= 1400 && S <= 1600 ? z = 1.3 : S >= 2400 && S <= 2600 ? z = 1.2 : S >= 200 && S <= 2e3 ? z = 1.1 : S >= 2e3 && S <= 4e3 ? z = 0.9 : S > 6e3 ? z = 0.4 : z = 0.7;
|
|
4255
|
+
const Y = G ** 0.5 * 0.6 * z;
|
|
4256
|
+
return Math.min(0.85, Y);
|
|
4257
|
+
});
|
|
4258
|
+
}
|
|
4259
|
+
n(Ne, "mapFrequencyDataToBands");
|
|
4260
|
+
let pe = 0, ve = 0, P = 0;
|
|
4261
|
+
const D = [
|
|
4262
|
+
{ name: "a", f1: 730, f2: 1090, f3: 2440, duration: 120, energy: 0.9 },
|
|
4263
|
+
{ name: "e", f1: 530, f2: 1840, f3: 2480, duration: 100, energy: 0.8 },
|
|
4264
|
+
{ name: "i", f1: 270, f2: 2290, f3: 3010, duration: 110, energy: 0.85 },
|
|
4265
|
+
{ name: "o", f1: 570, f2: 840, f3: 2410, duration: 130, energy: 0.9 },
|
|
4266
|
+
{ name: "u", f1: 300, f2: 870, f3: 2240, duration: 140, energy: 0.8 },
|
|
4267
|
+
{ name: "s", f1: 4e3, f2: 6e3, f3: 8e3, duration: 80, energy: 0.4 },
|
|
4268
|
+
{ name: "t", f1: 1500, f2: 4e3, f3: 6e3, duration: 60, energy: 0.3 },
|
|
4269
|
+
{ name: "n", f1: 280, f2: 1700, f3: 2600, duration: 70, energy: 0.6 },
|
|
4270
|
+
{ name: "r", f1: 350, f2: 1200, f3: 1650, duration: 90, energy: 0.7 },
|
|
4271
|
+
{ name: "pause", f1: 0, f2: 0, f3: 0, duration: 150, energy: 0.05 }
|
|
4272
|
+
];
|
|
4273
|
+
function Ae(d) {
|
|
4274
|
+
const y = Array.from({ length: W.length }, () => 0);
|
|
4275
|
+
if (d <= 0)
|
|
4276
|
+
return y;
|
|
4277
|
+
ve += 16.67, P += 0.02, ve > D[pe].duration && (pe = (pe + 1) % D.length, ve = 0);
|
|
4278
|
+
const w = D[pe], M = D[(pe + 1) % D.length], S = ve / w.duration, R = 0.5 * (1 + Math.cos(Math.PI + S * Math.PI)), B = 0.7 + 0.3 * Math.sin(P * 0.5), fe = 0.9 + 0.1 * Math.sin(P * 8);
|
|
4279
|
+
for (let G = 0; G < W.length; G++) {
|
|
4280
|
+
const z = W[G];
|
|
4281
|
+
let b = 0;
|
|
4282
|
+
const le = Ie(z, w.f1, M.f1, R, 200), Y = Ie(z, w.f2, M.f2, R, 300), O = Ie(z, w.f3, M.f3, R, 400);
|
|
4283
|
+
b = (le * 0.4 + Y * 0.35 + O * 0.25) * (w.energy * (1 - R) + M.energy * R);
|
|
4284
|
+
const ee = 150 + 50 * Math.sin(P * 0.3);
|
|
4285
|
+
(Math.abs(z - ee) < 20 || Math.abs(z - ee * 2) < 30 || Math.abs(z - ee * 3) < 40) && (b += 0.3 * w.energy), b *= d * B * fe, b *= 0.85 + Math.random() * 0.3, y[G] = Math.max(0, Math.min(1, b));
|
|
4286
|
+
}
|
|
4287
|
+
return y;
|
|
4288
|
+
}
|
|
4289
|
+
n(Ae, "generateSpeechPatterns");
|
|
4290
|
+
function Ie(d, y, w, M, S) {
|
|
4291
|
+
if (y === 0 && w === 0)
|
|
4292
|
+
return 0;
|
|
4293
|
+
const R = y * (1 - M) + w * M;
|
|
4294
|
+
if (R === 0)
|
|
4295
|
+
return 0;
|
|
4296
|
+
const B = Math.abs(d - R);
|
|
4297
|
+
return Math.exp(-((B / S) ** 2));
|
|
4298
|
+
}
|
|
4299
|
+
n(Ie, "getFormantResponse");
|
|
4300
|
+
let $ = [], je = 0, xe = 0;
|
|
4301
|
+
function ze() {
|
|
4302
|
+
const d = i.value ? 100 : 50, y = Math.min(2 ** xe, 8);
|
|
4303
|
+
return d * y;
|
|
4304
|
+
}
|
|
4305
|
+
n(ze, "getApiThrottleInterval");
|
|
4306
|
+
function Ve(d) {
|
|
4307
|
+
let y = [];
|
|
4308
|
+
if (o.enableRealAudio && o.isListening && A.value && h && m) {
|
|
4309
|
+
const w = v();
|
|
4310
|
+
w.some((S) => S > 0.05) && (y = w);
|
|
4311
|
+
}
|
|
4312
|
+
if (!y.length && o.isSpeaking && o.selfController && o.audioLevels && o.audioLevels.outputLevel > 0.05) {
|
|
4313
|
+
const M = Date.now(), S = ze();
|
|
4314
|
+
if (M - je > S) {
|
|
4315
|
+
je = M;
|
|
4316
|
+
try {
|
|
4317
|
+
const B = Ue();
|
|
4318
|
+
B.some((G) => G > 0.05) && ($ = B, xe = 0);
|
|
4319
|
+
} catch (B) {
|
|
4320
|
+
console.warn("Error fetching frequency data:", B), xe++;
|
|
4321
|
+
}
|
|
4322
|
+
}
|
|
4323
|
+
$.some((B) => B > 0.05) && (y = $);
|
|
4324
|
+
}
|
|
4325
|
+
return y.length || (d > 0 && (o.isListening || o.isSpeaking) ? y = o.isSpeaking ? Ae(d) : ut(d) : o.isConnected ? y = ut(0.02) : y = Array.from({ length: W.length }, () => 0)), o.enableWaveMotion && typeof window < "u" && (y = $e(y, d)), y;
|
|
4326
|
+
}
|
|
4327
|
+
n(Ve, "generateFrequencyBands");
|
|
4328
|
+
function $e(d, y) {
|
|
4329
|
+
const w = performance.now() * 1e-3, M = [...d];
|
|
4330
|
+
for (let S = 0; S < d.length; S++) {
|
|
4331
|
+
const R = S * (2 * Math.PI) / d.length;
|
|
4332
|
+
let B = 0;
|
|
4333
|
+
if (o.isListening || o.isSpeaking) {
|
|
4334
|
+
const G = Math.sin(w * 4.2 + R * 0.6 - (o.enableScrollingWave ? w * 2 : 0)) * 0.15, z = Math.sin(w * 6.8 + R * 1.2 - (o.enableScrollingWave ? w * 1.5 : 0)) * 0.08, b = Math.sin(w * 0.8) * 0.05;
|
|
4335
|
+
B = G + z + b;
|
|
4336
|
+
} else if (o.isConnected) {
|
|
4337
|
+
const G = Math.sin(w * 0.6) * 0.1, z = Math.sin(w * 2 + R * 0.3) * 0.05;
|
|
4338
|
+
B = G + z;
|
|
4339
|
+
}
|
|
4340
|
+
const fe = Math.max(0.3, y);
|
|
4341
|
+
M[S] = Math.max(0, Math.min(0.9, d[S] + B * fe));
|
|
4342
|
+
}
|
|
4343
|
+
return M;
|
|
4344
|
+
}
|
|
4345
|
+
n($e, "addWaveMotionOverlay");
|
|
4346
|
+
function ut(d) {
|
|
4347
|
+
const y = Array.from({ length: W.length }, () => 0);
|
|
4348
|
+
if (d <= 0)
|
|
4349
|
+
return y;
|
|
4350
|
+
for (let w = 0; w < W.length; w++) {
|
|
4351
|
+
const M = W[w];
|
|
4352
|
+
let S = 0;
|
|
4353
|
+
M >= 400 && M <= 600 ? S = d * 0.9 : M >= 1400 && M <= 1600 ? S = d * 0.8 : M >= 2400 && M <= 2600 ? S = d * 0.7 : M >= 200 && M <= 2e3 ? S = d * 0.6 : M >= 85 && M <= 300 ? S = d * 0.4 : S = d * 0.2, S *= 0.8 + Math.random() * 0.4, y[w] = Math.max(0, Math.min(1, S));
|
|
4354
|
+
}
|
|
4355
|
+
return y;
|
|
4356
|
+
}
|
|
4357
|
+
n(ut, "generateIntensityBasedBands");
|
|
4358
|
+
function qt() {
|
|
4359
|
+
if (typeof window > "u")
|
|
4360
|
+
return;
|
|
4361
|
+
const d = navigator.userAgent.toLowerCase(), y = /android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(d);
|
|
4362
|
+
i.value = y;
|
|
4363
|
+
}
|
|
4364
|
+
n(qt, "detectMobile");
|
|
4365
|
+
function Ht(d, y) {
|
|
4366
|
+
return f.has(d) || f.set(d, y()), f.get(d);
|
|
4367
|
+
}
|
|
4368
|
+
n(Ht, "getGradient");
|
|
4369
|
+
function Wt() {
|
|
4370
|
+
f.clear(), g = null;
|
|
4371
|
+
}
|
|
4372
|
+
n(Wt, "clearGradientCache");
|
|
4373
|
+
function ht() {
|
|
4374
|
+
if (typeof window > "u" || !t || !r.value)
|
|
4375
|
+
return;
|
|
4376
|
+
qt();
|
|
4377
|
+
const d = r.value, y = d.width / F, w = d.height / F;
|
|
4378
|
+
function M(S) {
|
|
4379
|
+
if (!t)
|
|
4380
|
+
return;
|
|
4381
|
+
if (!a.value) {
|
|
4382
|
+
s = requestAnimationFrame(M);
|
|
4383
|
+
return;
|
|
4384
|
+
}
|
|
4385
|
+
t.clearRect(0, 0, y, w);
|
|
4386
|
+
let R = 0;
|
|
4387
|
+
o.audioLevels ? o.isListening ? R = Math.min(o.audioLevels.inputLevel * 1.5, 1) : o.isSpeaking && (R = Math.min(o.audioLevels.outputLevel * 1.8, 1)) : o.rms !== void 0 && (R = Math.min(o.rms / 70, 1));
|
|
4388
|
+
const B = Ve(R);
|
|
4389
|
+
for (let b = 0; b < L; b++)
|
|
4390
|
+
_[b] = H + B[b] * (Q - H);
|
|
4391
|
+
const fe = 16.67;
|
|
4392
|
+
for (let b = 0; b < L; b++) {
|
|
4393
|
+
const le = W[b], Y = We(le), O = _[b] - X[b], ee = Se * Y.stiffnessMultiplier, Le = we * Y.dampingMultiplier, se = O * ee - x[b] * Le;
|
|
4394
|
+
if (x[b] += se, X[b] += x[b], X[b] > ae[b])
|
|
4395
|
+
ae[b] = X[b], ue[b] = de, he[b] = 0;
|
|
4396
|
+
else if (ue[b] = Math.max(0, ue[b] - fe), ue[b] <= 0) {
|
|
4397
|
+
const Oe = (Math.max(H, X[b] * 1.1) - ae[b]) * be - he[b] * ce;
|
|
4398
|
+
he[b] += Oe, ae[b] = Math.max(H, ae[b] + he[b]);
|
|
4399
|
+
}
|
|
4400
|
+
}
|
|
4401
|
+
const G = L * 0.15;
|
|
4402
|
+
function z() {
|
|
4403
|
+
t && (g || (g = t.createRadialGradient(
|
|
4404
|
+
y * 0.5,
|
|
4405
|
+
w * 0.6,
|
|
4406
|
+
w * 0.1,
|
|
4407
|
+
y * 0.5,
|
|
4408
|
+
w * 0.6,
|
|
4409
|
+
w * 0.9
|
|
4410
|
+
), g.addColorStop(0, "rgba(255,255,255,0.02)"), g.addColorStop(1, "rgba(0,0,0,0.08)")), t.fillStyle = g, t.fillRect(0, 0, y, w));
|
|
4411
|
+
}
|
|
4412
|
+
if (n(z, "drawBackground"), z(), (o.isListening || o.isSpeaking) && !i.value) {
|
|
4413
|
+
const b = performance.now() * 1e-3, le = 0.1 + Math.sin(b * 2) * 0.05;
|
|
4414
|
+
t.save(), t.globalCompositeOperation = "lighter", t.globalAlpha = le;
|
|
4415
|
+
const Y = o.isSpeaking ? "rgba(34,197,94,0.4)" : "rgba(59,130,246,0.4)";
|
|
4416
|
+
t.fillStyle = Y;
|
|
4417
|
+
for (let O = 0; O < L; O++) {
|
|
4418
|
+
const ee = O * (E + V), Le = X[O], se = w - Le;
|
|
4419
|
+
t.beginPath(), t.roundRect(ee - 1, se - 1, E + 2, Le + 2, [2, 2, 0, 0]), t.fill();
|
|
4420
|
+
}
|
|
4421
|
+
t.restore();
|
|
4422
|
+
}
|
|
4423
|
+
for (let b = 0; b < L; b++) {
|
|
4424
|
+
const le = b * (E + V), Y = X[b], O = w - Y, ee = W[b], Le = Math.min(b, L - 1 - b), se = Math.min(1, Le / G), Ge = Math.min(1, Y / Q), Oe = (0.8 + Ge * 0.2) * se, ft = (0.6 + Ge * 0.2) * se, mt = (0.3 + Ge * 0.1) * se, Ut = Math.round(Ge * 10) / 10, Zt = Math.round(se * 10) / 10, Kt = `${o.isSpeaking ? "speaking" : o.isListening ? "listening" : "idle"}-${Ut}-${Zt}-${Y}`, Yt = Ht(Kt, () => {
|
|
4425
|
+
const J = t.createLinearGradient(0, O, 0, O + Y);
|
|
4426
|
+
if (o.isSpeaking)
|
|
4427
|
+
J.addColorStop(0, `rgba(34, 197, 94, ${Oe})`), J.addColorStop(0.5, `rgba(34, 197, 94, ${ft})`), J.addColorStop(1, `rgba(34, 197, 94, ${mt})`), (ee >= 400 && ee <= 600 || ee >= 1400 && ee <= 1600) && J.addColorStop(0, `rgba(74, 222, 128, ${Math.min(1, Oe + 0.2)})`);
|
|
4428
|
+
else if (o.isListening)
|
|
4429
|
+
J.addColorStop(0, `rgba(59, 130, 246, ${Oe})`), J.addColorStop(0.5, `rgba(59, 130, 246, ${ft})`), J.addColorStop(1, `rgba(59, 130, 246, ${mt})`);
|
|
4430
|
+
else {
|
|
4431
|
+
const Ze = 0.6 * se, Jt = 0.4 * se, Qt = 0.2 * se;
|
|
4432
|
+
J.addColorStop(0, `rgba(156, 163, 175, ${Ze})`), J.addColorStop(0.6, `rgba(156, 163, 175, ${Jt})`), J.addColorStop(1, `rgba(156, 163, 175, ${Qt})`);
|
|
4433
|
+
}
|
|
4434
|
+
return J;
|
|
4435
|
+
});
|
|
4436
|
+
if (t.fillStyle = Yt, t.beginPath(), t.roundRect(le, O, E, Y, [1, 1, 0, 0]), t.fill(), ae[b] > H + 2) {
|
|
4437
|
+
const J = w - ae[b], Ze = ue[b] > 0 ? 0.9 : Math.max(0.3, ue[b] / de);
|
|
4438
|
+
t.fillStyle = `rgba(255, 255, 255, ${Ze})`, t.fillRect(le, J - 1, E, 2), Ze > 0.5 && !i.value && (t.shadowColor = o.isSpeaking ? "rgba(34, 197, 94, 0.5)" : "rgba(59, 130, 246, 0.5)", t.shadowBlur = 3, t.fillRect(le, J - 1, E, 2), t.shadowBlur = 0);
|
|
4439
|
+
}
|
|
4440
|
+
}
|
|
4441
|
+
s = requestAnimationFrame(M);
|
|
4442
|
+
}
|
|
4443
|
+
n(M, "animate"), s = requestAnimationFrame(M);
|
|
4444
|
+
}
|
|
4445
|
+
n(ht, "startAnimation"), He(() => {
|
|
4446
|
+
if (r.value && (t = r.value.getContext("2d"), ne(), typeof window < "u")) {
|
|
4447
|
+
window.addEventListener("resize", gt, { passive: !0 });
|
|
4448
|
+
const d = /* @__PURE__ */ n(() => {
|
|
4449
|
+
a.value = !document.hidden;
|
|
4450
|
+
}, "handleVisibilityChange");
|
|
4451
|
+
document.addEventListener("visibilitychange", d, { passive: !0 });
|
|
4452
|
+
}
|
|
4453
|
+
o.enableRealAudio && o.isListening && setTimeout(() => {
|
|
4454
|
+
Me().catch(console.error);
|
|
4455
|
+
}, 100);
|
|
4456
|
+
});
|
|
4457
|
+
function gt() {
|
|
4458
|
+
if (typeof window < "u") {
|
|
4459
|
+
const d = Math.max(1, Math.min(2, window.devicePixelRatio || 1));
|
|
4460
|
+
d !== F && (F = d);
|
|
4461
|
+
}
|
|
4462
|
+
ne();
|
|
4463
|
+
}
|
|
4464
|
+
return n(gt, "onResize"), Lt(() => {
|
|
4465
|
+
s && cancelAnimationFrame(s), typeof window < "u" && (window.removeEventListener("resize", gt), document.removeEventListener("visibilitychange", () => {
|
|
4466
|
+
a.value = !document.hidden;
|
|
4467
|
+
})), ge();
|
|
4468
|
+
}), Te(
|
|
4469
|
+
[() => o.isActive, () => o.isConnected, () => o.isListening, () => o.isSpeaking, () => o.rms],
|
|
4470
|
+
() => {
|
|
4471
|
+
!t && r.value && (t = r.value.getContext("2d")), s && cancelAnimationFrame(s), ht();
|
|
4472
|
+
},
|
|
4473
|
+
{ immediate: !0 }
|
|
4474
|
+
), Te(
|
|
4475
|
+
[() => o.enableRealAudio, () => o.isListening],
|
|
4476
|
+
async ([d, y], [w, M]) => {
|
|
4477
|
+
d && y && (!w || !M) && (A.value || await Me().catch(console.error)), (!d || !y) && w && M && ge();
|
|
4478
|
+
},
|
|
4479
|
+
{ immediate: !1 }
|
|
4480
|
+
), Te(r, (d) => {
|
|
4481
|
+
d && !t && (t = d.getContext("2d"), ne(), ht());
|
|
4482
|
+
}), (d, y) => (p(), k("div", Do, [
|
|
4483
|
+
l("canvas", {
|
|
4484
|
+
ref_key: "canvasRef",
|
|
4485
|
+
ref: r,
|
|
4486
|
+
width: (te(E) + te(V)) * te(L) - te(V),
|
|
4487
|
+
height: te(Q),
|
|
4488
|
+
class: "w-full max-w-full [image-rendering:-webkit-optimize-contrast]",
|
|
4489
|
+
style: it({ height: `${te(Q)}px` })
|
|
4490
|
+
}, null, 12, Ro)
|
|
4491
|
+
]));
|
|
4492
|
+
}
|
|
4493
|
+
}), No = { class: "flex flex-col h-full items-center justify-center px-6 py-8" }, jo = { class: "flex-1 flex flex-col items-center justify-center space-y-8 py-4" }, Vo = { class: "h-32 w-full max-w-md" }, Go = { class: "text-center flex gap-2 items-center text-xs" }, Oo = { class: "flex items-center justify-center gap-2" }, qo = {
|
|
4494
|
+
key: 0,
|
|
4495
|
+
class: "size-2 bg-blue-500 rounded-full animate-pulse"
|
|
4496
|
+
}, Ho = {
|
|
4497
|
+
key: 1,
|
|
4498
|
+
class: "size-2 bg-green-500 rounded-full animate-pulse"
|
|
4499
|
+
}, Wo = {
|
|
4500
|
+
key: 2,
|
|
4501
|
+
class: "size-2 bg-white/50 rounded-full"
|
|
4502
|
+
}, Uo = {
|
|
4503
|
+
key: 3,
|
|
4504
|
+
class: "size-2 bg-red-500 rounded-full"
|
|
4505
|
+
}, Zo = { class: "text-white/70 text-sm max-w-xs leading-relaxed" }, Ko = { class: "flex flex-col items-center space-y-6" }, Yo = /* @__PURE__ */ oe({
|
|
4506
|
+
__name: "ElSelfVoice",
|
|
4507
|
+
props: {
|
|
4508
|
+
selfController: {}
|
|
4509
|
+
},
|
|
4510
|
+
setup(e) {
|
|
4511
|
+
const o = re(() => e.selfController?.voiceState.value), r = re(() => o.value?.isConnected ? "bg-red-500 border-red-400 hover:bg-red-600" : o.value?.connectionStatus === "connecting" ? "bg-green-500 border-green-400 cursor-not-allowed" : "bg-green-500 border-green-400 hover:bg-green-600"), t = re(() => {
|
|
4512
|
+
const i = e.selfController?.voiceState.value;
|
|
4513
|
+
return !!i?.error || i?.connectionStatus === "connecting";
|
|
4514
|
+
});
|
|
4515
|
+
async function s() {
|
|
4516
|
+
if (e.selfController)
|
|
4517
|
+
try {
|
|
4518
|
+
e.selfController.voiceState.value.isConnected ? await e.selfController.endConversation() : (e.selfController.isConnected() && await e.selfController.endConversation(), await e.selfController.startVoiceConversation(), e.selfController.agentMode.value = "talk");
|
|
4519
|
+
} catch (i) {
|
|
4520
|
+
console.error("Error toggling call:", i);
|
|
4521
|
+
}
|
|
4522
|
+
}
|
|
4523
|
+
return n(s, "toggleCall"), (i, a) => (p(), k("div", No, [
|
|
4524
|
+
l("div", jo, [
|
|
4525
|
+
l("div", Vo, [
|
|
4526
|
+
U(Bo, {
|
|
4527
|
+
"audio-levels": e.selfController?.audioLevels.value ?? { inputLevel: 0, outputLevel: 0 },
|
|
4528
|
+
"is-listening": e.selfController?.voiceState.value.isListening ?? !1,
|
|
4529
|
+
"is-speaking": e.selfController?.voiceState.value.isSpeaking ?? !1,
|
|
4530
|
+
"is-connected": e.selfController?.voiceState.value.isConnected ?? !1,
|
|
4531
|
+
"enable-real-audio": !0,
|
|
4532
|
+
"enable-wave-motion": !0,
|
|
4533
|
+
"enable-scrolling-wave": !0,
|
|
4534
|
+
"self-controller": e.selfController
|
|
4535
|
+
}, null, 8, ["audio-levels", "is-listening", "is-speaking", "is-connected", "self-controller"])
|
|
4536
|
+
]),
|
|
4537
|
+
l("div", Go, [
|
|
4538
|
+
l("div", Oo, [
|
|
4539
|
+
e.selfController?.voiceState.value.isListening ? (p(), k("div", qo)) : e.selfController?.voiceState.value.isSpeaking ? (p(), k("div", Ho)) : e.selfController?.voiceState.value.isConnected && !e.selfController?.voiceState.value.isListening && !e.selfController?.voiceState.value.isSpeaking ? (p(), k("div", Wo)) : e.selfController?.voiceState.value.error ? (p(), k("div", Uo)) : q("", !0)
|
|
4540
|
+
]),
|
|
4541
|
+
l("p", Zo, Z(e.selfController?.voiceState.value.error ? `Error: ${e.selfController.voiceState.value.error}` : e.selfController?.voiceState.value.transcript || "Ready to start a call..."), 1)
|
|
4542
|
+
])
|
|
4543
|
+
]),
|
|
4544
|
+
l("div", Ko, [
|
|
4545
|
+
U(Fe, {
|
|
4546
|
+
design: "solid",
|
|
4547
|
+
theme: o.value?.isConnected ? "red" : (o.value?.connectionStatus === "connecting", "green"),
|
|
4548
|
+
size: "lg",
|
|
4549
|
+
class: I(r.value),
|
|
4550
|
+
disabled: t.value,
|
|
4551
|
+
onClick: s
|
|
4552
|
+
}, {
|
|
4553
|
+
default: ie(() => [
|
|
4554
|
+
l("div", {
|
|
4555
|
+
class: I(["size-5 mr-2", e.selfController?.voiceState.value.isConnected ? "i-heroicons-phone-x-mark" : e.selfController?.voiceState.value.connectionStatus === "connecting" ? "i-heroicons-arrow-path animate-spin" : "i-heroicons-phone"])
|
|
4556
|
+
}, null, 2),
|
|
4557
|
+
Pe(" " + Z(e.selfController?.voiceState.value.isConnected ? "End Call" : e.selfController?.voiceState.value.connectionStatus === "connecting" ? "Connecting..." : "Start a Call"), 1)
|
|
4558
|
+
]),
|
|
4559
|
+
_: 1
|
|
4560
|
+
}, 8, ["theme", "class", "disabled"])
|
|
4561
|
+
])
|
|
4562
|
+
]));
|
|
4563
|
+
}
|
|
4564
|
+
}), Jo = {
|
|
4565
|
+
key: 0,
|
|
4566
|
+
class: "absolute inset-0 flex items-center justify-center bg-gradient-to-br from-theme-800 to-theme-950 rounded-3xl z-10"
|
|
4567
|
+
}, Qo = { class: "relative z-20 p-2" }, Xo = { class: "flex items-center justify-between" }, _o = {
|
|
4568
|
+
key: 0,
|
|
4569
|
+
class: "relative grid grid-cols-3 rounded-full p-0.5 bg-white/5 backdrop-blur-sm ring-1 ring-inset ring-white/10"
|
|
4570
|
+
}, en = ["onClick"], tn = { class: "flex items-center justify-center gap-0.5 @[200px]/agent:gap-1 @[280px]/agent:gap-1.5" }, rn = { class: "hidden @[140px]/agent:inline @[200px]/agent:text-xs text-[9px]" }, on = {
|
|
4571
|
+
key: 0,
|
|
4572
|
+
class: "w-full space-y-6 py-6"
|
|
4573
|
+
}, nn = { class: "grid grid-cols-2 gap-6 w-full" }, sn = {
|
|
4574
|
+
key: 2,
|
|
4575
|
+
class: "bg-gradient-to-br from-theme-800 to-theme-950 text-white flex items-center justify-center h-full p-8"
|
|
4576
|
+
}, an = { class: "text-center max-w-md space-y-4" }, ln = { class: "text-sm text-white/70 leading-relaxed" }, dn = {
|
|
4577
|
+
key: 3,
|
|
4578
|
+
class: "bg-white/10 backdrop-blur-sm text-white/70 flex items-center justify-center h-full"
|
|
4579
|
+
}, cn = /* @__PURE__ */ oe({
|
|
4580
|
+
__name: "SelfAgent",
|
|
4581
|
+
props: {
|
|
4582
|
+
sdk: {},
|
|
4583
|
+
self: {},
|
|
4584
|
+
context: {},
|
|
4585
|
+
firstMessage: {},
|
|
4586
|
+
hasClose: { type: Boolean, default: !1 },
|
|
4587
|
+
isActive: { type: Boolean, default: !0 },
|
|
4588
|
+
loading: { type: Boolean, default: !1 }
|
|
4589
|
+
},
|
|
4590
|
+
emits: ["close", "error"],
|
|
4591
|
+
setup(e, { emit: o }) {
|
|
4592
|
+
const r = o, t = sr(), s = j(!1), i = j(), a = re(() => t.value?.agentMode?.value ?? "select");
|
|
4593
|
+
function f() {
|
|
4594
|
+
t.value && t.value.destroy();
|
|
4595
|
+
try {
|
|
4596
|
+
t.value = new nt({
|
|
4597
|
+
sdk: e.sdk,
|
|
4598
|
+
self: e.self,
|
|
4599
|
+
context: e.context,
|
|
4600
|
+
firstMessage: e.firstMessage
|
|
4601
|
+
});
|
|
4602
|
+
} catch (g) {
|
|
4603
|
+
throw console.error("SelfController creation failed:", g), g;
|
|
4604
|
+
}
|
|
4605
|
+
}
|
|
4606
|
+
return n(f, "createSelfController"), He(() => {
|
|
4607
|
+
try {
|
|
4608
|
+
f();
|
|
4609
|
+
} catch (g) {
|
|
4610
|
+
const h = g instanceof Error ? g.message : "Failed to initialize digital self";
|
|
4611
|
+
i.value = h, r("error", h);
|
|
4612
|
+
}
|
|
4613
|
+
}), Lt(() => {
|
|
4614
|
+
t.value && t.value.destroy();
|
|
4615
|
+
}), (g, h) => (p(), k("div", {
|
|
4616
|
+
key: te(At)(e.self),
|
|
4617
|
+
class: "@container/agent self-agent w-full h-full rounded-3xl overflow-hidden relative shadow-2xl border border-white/10",
|
|
4618
|
+
"data-test": "self-agent"
|
|
4619
|
+
}, [
|
|
4620
|
+
e.loading ? (p(), k("div", Jo, [
|
|
4621
|
+
U(Ot, { class: "text-white size-8" })
|
|
4622
|
+
])) : e.self && !i.value ? (p(), k("div", {
|
|
4623
|
+
key: 1,
|
|
4624
|
+
class: "absolute inset-0 bg-cover bg-center bg-no-repeat",
|
|
4625
|
+
style: it({ backgroundImage: `url(${te(At)(e.self) || te(lt)()})` })
|
|
4626
|
+
}, [
|
|
4627
|
+
l("div", {
|
|
4628
|
+
class: I(["absolute inset-0 bg-gradient-to-br z-0", a.value === "select" ? "from-black/70 via-black/50 to-black/80" : "from-black/90 via-black/90 to-black/100"])
|
|
4629
|
+
}, null, 2),
|
|
4630
|
+
l("div", {
|
|
4631
|
+
class: I(["relative z-10 flex flex-col h-full transition-all duration-500 ease-[cubic-bezier(0.25,1,0.33,1)] will-change-transform", e.isActive ? "opacity-100 translate-y-0" : "opacity-0 translate-y-2"])
|
|
4632
|
+
}, [
|
|
4633
|
+
l("div", Qo, [
|
|
4634
|
+
l("div", Xo, [
|
|
4635
|
+
l("button", {
|
|
4636
|
+
class: "cursor-pointer p-3 flex items-center rounded-2xl text-white/70 hover:bg-white/10 transition-all duration-300 ease-[cubic-bezier(0.25,1,0.33,1)] hover:scale-105 active:scale-95",
|
|
4637
|
+
onClick: h[0] || (h[0] = (m) => s.value = !0)
|
|
4638
|
+
}, [...h[6] || (h[6] = [
|
|
4639
|
+
l("i", { class: "i-tabler-menu size-6" }, null, -1)
|
|
4640
|
+
])]),
|
|
4641
|
+
a.value !== "select" ? (p(), k("div", _o, [
|
|
4642
|
+
(p(!0), k(De, null, Qe(te(ur), (m) => (p(), k("button", {
|
|
4643
|
+
key: m.mode,
|
|
4644
|
+
class: I(["z-10 select-none relative cursor-pointer rounded-full px-2 @[400px]/agent:px-2 @[580px]/agent:px-3 py-1.5 text-[10px] @[200px]/agent:text-xs font-medium transition-all", [
|
|
4645
|
+
a.value === m.mode ? "text-white bg-white/10" : "text-white/60 hover:text-white/80"
|
|
4646
|
+
]]),
|
|
4647
|
+
onClick: /* @__PURE__ */ n((A) => t.value?.setMode(m.mode), "onClick")
|
|
4648
|
+
}, [
|
|
4649
|
+
l("span", tn, [
|
|
4650
|
+
l("i", {
|
|
4651
|
+
class: I(["w-3 h-3 @[200px]/agent:w-3.5 @[200px]/agent:h-3.5", [m.icon]])
|
|
4652
|
+
}, null, 2),
|
|
4653
|
+
l("span", rn, Z(m.label), 1)
|
|
4654
|
+
])
|
|
4655
|
+
], 10, en))), 128))
|
|
4656
|
+
])) : q("", !0),
|
|
4657
|
+
e.hasClose || a.value !== "select" ? (p(), k("button", {
|
|
4658
|
+
key: 1,
|
|
4659
|
+
class: "cursor-pointer flex items-center p-3 rounded-2xl text-white/70 hover:bg-white/10 transition-colors",
|
|
4660
|
+
onClick: h[1] || (h[1] = $t((m) => e.hasClose ? r("close", "button") : t.value?.setMode("select"), ["stop"]))
|
|
4661
|
+
}, [
|
|
4662
|
+
l("i", {
|
|
4663
|
+
class: I(["size-6", e.hasClose ? "i-tabler-x" : "i-tabler-home"])
|
|
4664
|
+
}, null, 2)
|
|
4665
|
+
])) : q("", !0)
|
|
4666
|
+
])
|
|
4667
|
+
]),
|
|
4668
|
+
l("div", {
|
|
4669
|
+
class: I(["flex-1 flex flex-col relative z-20 min-h-0 px-4 @[480px]/agent:px-6 max-w-md mx-auto w-full", a.value === "select" ? "justify-end h-full" : ""])
|
|
4670
|
+
}, [
|
|
4671
|
+
a.value === "select" ? (p(), ke(st, {
|
|
4672
|
+
key: 0,
|
|
4673
|
+
self: e.self,
|
|
4674
|
+
size: "lg",
|
|
4675
|
+
"show-online-indicator": !0,
|
|
4676
|
+
layout: "centered"
|
|
4677
|
+
}, null, 8, ["self"])) : (p(), ke(st, {
|
|
4678
|
+
key: 1,
|
|
4679
|
+
class: "px-4 pt-4 pb-4 sm:pb-6",
|
|
4680
|
+
self: e.self,
|
|
4681
|
+
size: "md",
|
|
4682
|
+
"show-online-indicator": !1,
|
|
4683
|
+
layout: "horizontal"
|
|
4684
|
+
}, null, 8, ["self"])),
|
|
4685
|
+
l("div", {
|
|
4686
|
+
class: I(["min-h-0", a.value !== "select" ? "h-full" : ""])
|
|
4687
|
+
}, [
|
|
4688
|
+
a.value === "select" ? (p(), k("div", on, [
|
|
4689
|
+
U(Fe, {
|
|
4690
|
+
design: "solid",
|
|
4691
|
+
theme: "green",
|
|
4692
|
+
size: "lg",
|
|
4693
|
+
class: "w-full px-8 py-4 rounded-full backdrop-blur-sm border-2 border-green-400 bg-green-500 hover:bg-green-600 transition-all duration-200 text-white font-medium",
|
|
4694
|
+
"data-test": "voice-button",
|
|
4695
|
+
onClick: h[2] || (h[2] = (m) => t.value?.setMode("talk"))
|
|
4696
|
+
}, {
|
|
4697
|
+
default: ie(() => [...h[7] || (h[7] = [
|
|
4698
|
+
l("i", { class: "i-heroicons-phone mr-2" }, null, -1),
|
|
4699
|
+
Pe(" Start a Call ", -1)
|
|
4700
|
+
])]),
|
|
4701
|
+
_: 1
|
|
4702
|
+
}),
|
|
4703
|
+
l("div", nn, [
|
|
4704
|
+
U(Fe, {
|
|
4705
|
+
design: "ghost",
|
|
4706
|
+
theme: "default",
|
|
4707
|
+
size: "lg",
|
|
4708
|
+
class: "bg-white/10 hover:bg-white/30 backdrop-blur-sm border border-white/20 text-white/90 font-medium py-3 @sm:py-4 rounded-full",
|
|
4709
|
+
onClick: h[3] || (h[3] = (m) => t.value?.setMode("info"))
|
|
4710
|
+
}, {
|
|
4711
|
+
default: ie(() => [...h[8] || (h[8] = [
|
|
4712
|
+
l("i", { class: "i-tabler-user-circle mr-2" }, null, -1),
|
|
4713
|
+
Pe(" Profile ", -1)
|
|
4714
|
+
])]),
|
|
4715
|
+
_: 1
|
|
4716
|
+
}),
|
|
4717
|
+
U(Fe, {
|
|
4718
|
+
design: "ghost",
|
|
4719
|
+
theme: "default",
|
|
4720
|
+
size: "lg",
|
|
4721
|
+
class: "bg-white/10 hover:bg-white/30 backdrop-blur-sm border border-white/20 text-white/90 font-medium py-3 @sm:py-4 rounded-full",
|
|
4722
|
+
"data-test": "chat-button",
|
|
4723
|
+
onClick: h[4] || (h[4] = (m) => t.value?.setMode("chat"))
|
|
4724
|
+
}, {
|
|
4725
|
+
default: ie(() => [...h[9] || (h[9] = [
|
|
4726
|
+
l("i", { class: "i-tabler-message-circle mr-2" }, null, -1),
|
|
4727
|
+
Pe(" Text Chat ", -1)
|
|
4728
|
+
])]),
|
|
4729
|
+
_: 1
|
|
4730
|
+
})
|
|
4731
|
+
])
|
|
4732
|
+
])) : (p(), k(De, { key: 1 }, [
|
|
4733
|
+
a.value === "chat" ? (p(), ke(xo, {
|
|
4734
|
+
key: 0,
|
|
4735
|
+
"self-controller": t.value
|
|
4736
|
+
}, null, 8, ["self-controller"])) : a.value === "talk" ? (p(), ke(Yo, {
|
|
4737
|
+
key: 1,
|
|
4738
|
+
"self-controller": t.value
|
|
4739
|
+
}, null, 8, ["self-controller"])) : a.value === "info" ? (p(), ke(uo, {
|
|
4740
|
+
key: 2,
|
|
4741
|
+
self: e.self
|
|
4742
|
+
}, null, 8, ["self"])) : q("", !0)
|
|
4743
|
+
], 64))
|
|
4744
|
+
], 2)
|
|
4745
|
+
], 2),
|
|
4746
|
+
l("div", {
|
|
4747
|
+
class: I(["relative z-20 text-center py-5 px-6", a.value === "info" ? "hidden" : ""])
|
|
4748
|
+
}, [...h[10] || (h[10] = [
|
|
4749
|
+
l("a", {
|
|
4750
|
+
href: "https://www.fiction.com",
|
|
4751
|
+
class: "flex items-center justify-center gap-1.5 text-[10px] font-mono font-normal text-white/50 hover:text-white/70 transition-colors"
|
|
4752
|
+
}, [
|
|
4753
|
+
l("span", { class: "" }, "Digital Self™"),
|
|
4754
|
+
l("span", { class: "text-white/20" }, "by"),
|
|
4755
|
+
l("span", null, "Fiction.com")
|
|
4756
|
+
], -1)
|
|
4757
|
+
])], 2)
|
|
4758
|
+
], 2)
|
|
4759
|
+
], 4)) : i.value ? (p(), k("div", sn, [
|
|
4760
|
+
l("div", an, [
|
|
4761
|
+
h[11] || (h[11] = l("div", { class: "flex justify-center" }, [
|
|
4762
|
+
l("div", { class: "rounded-full bg-red-500/20 flex items-center justify-center size-10" }, [
|
|
4763
|
+
l("i", { class: "i-tabler-alert-circle size-6 text-red-400" })
|
|
4764
|
+
])
|
|
4765
|
+
], -1)),
|
|
4766
|
+
h[12] || (h[12] = l("h3", { class: "text-lg font-medium" }, " Self Error ", -1)),
|
|
4767
|
+
l("p", ln, Z(i.value), 1)
|
|
4768
|
+
])
|
|
4769
|
+
])) : (p(), k("div", dn, " There was an error loading the digital self. Please try again later. ")),
|
|
4770
|
+
U(Fo, {
|
|
4771
|
+
modelValue: s.value,
|
|
4772
|
+
"onUpdate:modelValue": h[5] || (h[5] = (m) => s.value = m),
|
|
4773
|
+
self: e.self
|
|
4774
|
+
}, null, 8, ["modelValue", "self"])
|
|
4775
|
+
]));
|
|
4776
|
+
}
|
|
4777
|
+
}), un = { class: "self-wrap" }, hn = {
|
|
4778
|
+
key: 0,
|
|
4779
|
+
class: "flex items-center justify-center h-full"
|
|
4780
|
+
}, gn = {
|
|
4781
|
+
key: 2,
|
|
4782
|
+
class: "flex items-center justify-center h-full text-theme-500 text-xs"
|
|
4783
|
+
}, fn = { class: "flex flex-col items-center gap-2" }, mn = /* @__PURE__ */ oe({
|
|
4784
|
+
__name: "SelfWrap",
|
|
4785
|
+
props: {
|
|
4786
|
+
sdk: {},
|
|
4787
|
+
self: {},
|
|
4788
|
+
handle: {},
|
|
4789
|
+
context: {},
|
|
4790
|
+
firstMessage: {},
|
|
4791
|
+
hasClose: { type: Boolean }
|
|
4792
|
+
},
|
|
4793
|
+
setup(e) {
|
|
4794
|
+
const o = e, r = j(!o.self), t = j(o.self), s = j();
|
|
4795
|
+
return He(async () => {
|
|
4796
|
+
if (o.self) {
|
|
4797
|
+
r.value = !1;
|
|
4798
|
+
return;
|
|
4799
|
+
}
|
|
4800
|
+
if (!o.handle) {
|
|
4801
|
+
s.value = "No handle or self provided", r.value = !1;
|
|
4802
|
+
return;
|
|
4803
|
+
}
|
|
4804
|
+
try {
|
|
4805
|
+
r.value = !0;
|
|
4806
|
+
const i = await o.sdk.getPublicSelf({ handle: o.handle });
|
|
4807
|
+
i ? t.value = i : (s.value = o.sdk.error.value || "Self not found", console.error("Failed to fetch digital self:", o.sdk.error.value));
|
|
4808
|
+
} catch (i) {
|
|
4809
|
+
s.value = i instanceof Error ? i.message : "Failed to fetch self", console.error("Error fetching digital self:", i);
|
|
4810
|
+
} finally {
|
|
4811
|
+
r.value = !1;
|
|
4812
|
+
}
|
|
4813
|
+
}), (i, a) => (p(), k("div", un, [
|
|
4814
|
+
r.value ? (p(), k("div", hn, [...a[0] || (a[0] = [
|
|
4815
|
+
l("div", { class: "animate-spin rounded-full size-6 border-b-2 border-white" }, null, -1)
|
|
4816
|
+
])])) : t.value ? zt(i.$slots, "default", {
|
|
4817
|
+
key: 1,
|
|
4818
|
+
self: t.value,
|
|
4819
|
+
context: e.context,
|
|
4820
|
+
firstMessage: e.firstMessage,
|
|
4821
|
+
loading: r.value
|
|
4822
|
+
}) : s.value ? (p(), k("div", gn, [
|
|
4823
|
+
l("div", fn, [
|
|
4824
|
+
a[1] || (a[1] = l("div", null, [
|
|
4825
|
+
l("div", { class: "i-tabler-user-off size-8" })
|
|
4826
|
+
], -1)),
|
|
4827
|
+
l("div", null, Z(s.value), 1)
|
|
4828
|
+
])
|
|
4829
|
+
])) : q("", !0)
|
|
4830
|
+
]));
|
|
4831
|
+
}
|
|
4832
|
+
}), wn = /* @__PURE__ */ oe({
|
|
4833
|
+
__name: "SelfProvider",
|
|
4834
|
+
props: {
|
|
4835
|
+
sdk: {},
|
|
4836
|
+
self: {},
|
|
4837
|
+
handle: {},
|
|
4838
|
+
context: {},
|
|
4839
|
+
firstMessage: {},
|
|
4840
|
+
hasClose: { type: Boolean }
|
|
4841
|
+
},
|
|
4842
|
+
setup(e) {
|
|
4843
|
+
const o = e;
|
|
4844
|
+
return (r, t) => (p(), ke(mn, xt(o, { class: "self-provider size-full relative" }), {
|
|
4845
|
+
default: ie((s) => [
|
|
4846
|
+
U(cn, xt(o, {
|
|
4847
|
+
self: s.self,
|
|
4848
|
+
"is-active": !0,
|
|
4849
|
+
class: "size-full"
|
|
4850
|
+
}), null, 16, ["self"])
|
|
4851
|
+
]),
|
|
4852
|
+
_: 1
|
|
4853
|
+
}, 16));
|
|
4854
|
+
}
|
|
4855
|
+
});
|
|
4856
|
+
export {
|
|
4857
|
+
ur as AGENT_MODES,
|
|
4858
|
+
ar as AUDIO_FFT_SIZE,
|
|
4859
|
+
dr as AUDIO_LEVEL_UPDATE_INTERVAL,
|
|
4860
|
+
lr as AUDIO_SMOOTHING,
|
|
4861
|
+
et as ClientAudio,
|
|
4862
|
+
cn as SelfAgent,
|
|
4863
|
+
wn as SelfProvider,
|
|
4864
|
+
mn as SelfWrap,
|
|
4865
|
+
cr as VISUALIZER_CONFIG,
|
|
4866
|
+
W as VOICE_FREQUENCIES,
|
|
4867
|
+
kn as generateFirstMessage,
|
|
4868
|
+
lt as getFallbackAvatarDataUrl,
|
|
4869
|
+
Mt as getImageSrc,
|
|
4870
|
+
At as getSelfAvatarUrl,
|
|
4871
|
+
It as handleImageError,
|
|
4872
|
+
Yr as parseVoiceMessage
|
|
4873
|
+
};
|
|
4874
|
+
//# sourceMappingURL=self.js.map
|