@tampadevs/react 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Avatar.d.ts +16 -0
- package/dist/components/Avatar.d.ts.map +1 -0
- package/dist/components/AvatarGroup.d.ts +14 -0
- package/dist/components/AvatarGroup.d.ts.map +1 -0
- package/dist/components/Button.d.ts +13 -0
- package/dist/components/Button.d.ts.map +1 -0
- package/dist/components/Button.test.d.ts +2 -0
- package/dist/components/Button.test.d.ts.map +1 -0
- package/dist/components/Calendar.d.ts +27 -0
- package/dist/components/Calendar.d.ts.map +1 -0
- package/dist/components/Carousel.d.ts +11 -0
- package/dist/components/Carousel.d.ts.map +1 -0
- package/dist/components/CtaSection.d.ts +13 -0
- package/dist/components/CtaSection.d.ts.map +1 -0
- package/dist/components/EventCard.d.ts +19 -0
- package/dist/components/EventCard.d.ts.map +1 -0
- package/dist/components/Footer.d.ts +25 -0
- package/dist/components/Footer.d.ts.map +1 -0
- package/dist/components/Header.d.ts +17 -0
- package/dist/components/Header.d.ts.map +1 -0
- package/dist/components/Icon.d.ts +8 -0
- package/dist/components/Icon.d.ts.map +1 -0
- package/dist/components/Image.d.ts +17 -0
- package/dist/components/Image.d.ts.map +1 -0
- package/dist/components/ImageCarousel.d.ts +18 -0
- package/dist/components/ImageCarousel.d.ts.map +1 -0
- package/dist/components/ImageText.d.ts +16 -0
- package/dist/components/ImageText.d.ts.map +1 -0
- package/dist/components/Logo.d.ts +15 -0
- package/dist/components/Logo.d.ts.map +1 -0
- package/dist/components/Logo3d.d.ts +28 -0
- package/dist/components/Logo3d.d.ts.map +1 -0
- package/dist/components/LogoMarquee.d.ts +18 -0
- package/dist/components/LogoMarquee.d.ts.map +1 -0
- package/dist/components/NewsletterSignup.d.ts +11 -0
- package/dist/components/NewsletterSignup.d.ts.map +1 -0
- package/dist/components/OpenCollective.d.ts +16 -0
- package/dist/components/OpenCollective.d.ts.map +1 -0
- package/dist/components/PersonCard.d.ts +20 -0
- package/dist/components/PersonCard.d.ts.map +1 -0
- package/dist/components/PersonTable.d.ts +28 -0
- package/dist/components/PersonTable.d.ts.map +1 -0
- package/dist/components/PromoSection.d.ts +20 -0
- package/dist/components/PromoSection.d.ts.map +1 -0
- package/dist/components/SponsorCard.d.ts +10 -0
- package/dist/components/SponsorCard.d.ts.map +1 -0
- package/dist/components/SponsorGrid.d.ts +21 -0
- package/dist/components/SponsorGrid.d.ts.map +1 -0
- package/dist/components/Table.d.ts +30 -0
- package/dist/components/Table.d.ts.map +1 -0
- package/dist/components/VideoEmbed.d.ts +14 -0
- package/dist/components/VideoEmbed.d.ts.map +1 -0
- package/dist/components/VideoHero.d.ts +16 -0
- package/dist/components/VideoHero.d.ts.map +1 -0
- package/dist/index.d.ts +53 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +55 -0
- package/dist/index.js.map +1 -0
- package/dist/index10.js +185 -0
- package/dist/index10.js.map +1 -0
- package/dist/index11.js +268 -0
- package/dist/index11.js.map +1 -0
- package/dist/index12.js +133 -0
- package/dist/index12.js.map +1 -0
- package/dist/index13.js +112 -0
- package/dist/index13.js.map +1 -0
- package/dist/index14.js +286 -0
- package/dist/index14.js.map +1 -0
- package/dist/index15.js +325 -0
- package/dist/index15.js.map +1 -0
- package/dist/index16.js +204 -0
- package/dist/index16.js.map +1 -0
- package/dist/index17.js +269 -0
- package/dist/index17.js.map +1 -0
- package/dist/index18.js +147 -0
- package/dist/index18.js.map +1 -0
- package/dist/index19.js +697 -0
- package/dist/index19.js.map +1 -0
- package/dist/index2.js +181 -0
- package/dist/index2.js.map +1 -0
- package/dist/index20.js +492 -0
- package/dist/index20.js.map +1 -0
- package/dist/index21.js +277 -0
- package/dist/index21.js.map +1 -0
- package/dist/index22.js +331 -0
- package/dist/index22.js.map +1 -0
- package/dist/index23.js +98 -0
- package/dist/index23.js.map +1 -0
- package/dist/index24.js +406 -0
- package/dist/index24.js.map +1 -0
- package/dist/index25.js +464 -0
- package/dist/index25.js.map +1 -0
- package/dist/index26.js +280 -0
- package/dist/index26.js.map +1 -0
- package/dist/index27.js +234 -0
- package/dist/index27.js.map +1 -0
- package/dist/index28.js +18 -0
- package/dist/index28.js.map +1 -0
- package/dist/index29.js +10779 -0
- package/dist/index29.js.map +1 -0
- package/dist/index3.js +39 -0
- package/dist/index3.js.map +1 -0
- package/dist/index30.js +358 -0
- package/dist/index30.js.map +1 -0
- package/dist/index31.js +199 -0
- package/dist/index31.js.map +1 -0
- package/dist/index32.js +22762 -0
- package/dist/index32.js.map +1 -0
- package/dist/index4.js +142 -0
- package/dist/index4.js.map +1 -0
- package/dist/index5.js +128 -0
- package/dist/index5.js.map +1 -0
- package/dist/index6.js +109 -0
- package/dist/index6.js.map +1 -0
- package/dist/index7.js +254 -0
- package/dist/index7.js.map +1 -0
- package/dist/index8.js +237 -0
- package/dist/index8.js.map +1 -0
- package/dist/index9.js +142 -0
- package/dist/index9.js.map +1 -0
- package/dist/test/setup.d.ts +2 -0
- package/dist/test/setup.d.ts.map +1 -0
- package/package.json +58 -0
package/dist/index26.js
ADDED
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
import { jsxs as i, Fragment as F, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { useState as M, useEffect as S } from "react";
|
|
3
|
+
import { clsx as n } from "./index28.js";
|
|
4
|
+
function H({
|
|
5
|
+
title: o,
|
|
6
|
+
columns: p,
|
|
7
|
+
data: f = [],
|
|
8
|
+
tabs: r = [],
|
|
9
|
+
activeTab: x,
|
|
10
|
+
onTabChange: s,
|
|
11
|
+
compact: w = !1,
|
|
12
|
+
striped: u = !1,
|
|
13
|
+
hoverable: v = !0,
|
|
14
|
+
emptyMessage: y = "No data to display",
|
|
15
|
+
titleActions: c,
|
|
16
|
+
className: k
|
|
17
|
+
}) {
|
|
18
|
+
var _, m;
|
|
19
|
+
const l = r.length > 0, [N, g] = M(((_ = r[0]) == null ? void 0 : _.id) || ""), b = x ?? N;
|
|
20
|
+
S(() => {
|
|
21
|
+
l && !b && r.length > 0 && g(r[0].id);
|
|
22
|
+
}, [l, b, r]);
|
|
23
|
+
const h = l ? ((m = r.find((e) => e.id === b)) == null ? void 0 : m.data) ?? [] : f, T = (e) => {
|
|
24
|
+
g(e), s == null || s(e);
|
|
25
|
+
}, j = (e, d) => {
|
|
26
|
+
const a = e[d.key];
|
|
27
|
+
return d.render ? d.render(a, e) : String(a ?? "—");
|
|
28
|
+
}, z = () => /* @__PURE__ */ t("div", { className: "td-table__tabs-wrapper", children: /* @__PURE__ */ t("div", { className: "td-table__tabs-scroll", children: r.map((e) => /* @__PURE__ */ i(
|
|
29
|
+
"button",
|
|
30
|
+
{
|
|
31
|
+
className: n("td-table__tab", b === e.id && "td-table__tab--active"),
|
|
32
|
+
onClick: () => T(e.id),
|
|
33
|
+
children: [
|
|
34
|
+
e.label,
|
|
35
|
+
/* @__PURE__ */ t("span", { className: "td-table__tab-badge", children: e.data.length })
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
e.id
|
|
39
|
+
)) }) }), E = o || l || c;
|
|
40
|
+
return /* @__PURE__ */ i(F, { children: [
|
|
41
|
+
/* @__PURE__ */ i("div", { className: n("td-table", w && "td-table--compact", k), children: [
|
|
42
|
+
E && /* @__PURE__ */ i("div", { className: "td-table__header", children: [
|
|
43
|
+
o && /* @__PURE__ */ t("h2", { className: "td-table__title", children: o }),
|
|
44
|
+
l && z(),
|
|
45
|
+
c && /* @__PURE__ */ t("div", { className: "td-table__title-actions", children: c })
|
|
46
|
+
] }),
|
|
47
|
+
h.length === 0 ? /* @__PURE__ */ t("div", { className: "td-table__empty", children: l ? "No data for this tab" : y }) : /* @__PURE__ */ t("div", { className: "td-table__wrapper", children: /* @__PURE__ */ i("table", { children: [
|
|
48
|
+
/* @__PURE__ */ t("thead", { children: /* @__PURE__ */ t("tr", { children: p.map((e) => /* @__PURE__ */ t(
|
|
49
|
+
"th",
|
|
50
|
+
{
|
|
51
|
+
className: n(
|
|
52
|
+
e.align && `td-table__align-${e.align}`,
|
|
53
|
+
e.hideOnMobile && "td-table__hide-mobile"
|
|
54
|
+
),
|
|
55
|
+
style: e.width ? { width: e.width } : void 0,
|
|
56
|
+
children: e.label
|
|
57
|
+
},
|
|
58
|
+
e.key
|
|
59
|
+
)) }) }),
|
|
60
|
+
/* @__PURE__ */ t("tbody", { className: n(u && "td-table__striped", v && "td-table__hoverable"), children: h.map((e, d) => /* @__PURE__ */ t("tr", { children: p.map((a) => /* @__PURE__ */ t(
|
|
61
|
+
"td",
|
|
62
|
+
{
|
|
63
|
+
className: n(
|
|
64
|
+
a.align && `td-table__align-${a.align}`,
|
|
65
|
+
a.hideOnMobile && "td-table__hide-mobile"
|
|
66
|
+
),
|
|
67
|
+
children: j(e, a)
|
|
68
|
+
},
|
|
69
|
+
a.key
|
|
70
|
+
)) }, d)) })
|
|
71
|
+
] }) })
|
|
72
|
+
] }),
|
|
73
|
+
/* @__PURE__ */ t(A, {})
|
|
74
|
+
] });
|
|
75
|
+
}
|
|
76
|
+
function A() {
|
|
77
|
+
return /* @__PURE__ */ t("style", { children: `
|
|
78
|
+
.td-table {
|
|
79
|
+
background: rgba(28, 36, 56, 0.8);
|
|
80
|
+
backdrop-filter: blur(12px);
|
|
81
|
+
-webkit-backdrop-filter: blur(12px);
|
|
82
|
+
border: 1px solid rgba(255, 255, 255, 0.05);
|
|
83
|
+
border-radius: 0.875rem;
|
|
84
|
+
overflow: hidden;
|
|
85
|
+
box-shadow:
|
|
86
|
+
inset 0 1px 1px 0 rgba(255, 255, 255, 0.05),
|
|
87
|
+
0 8px 24px -4px rgba(0, 0, 0, 0.15);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.td-table__header {
|
|
91
|
+
display: flex;
|
|
92
|
+
align-items: stretch;
|
|
93
|
+
min-height: 56px;
|
|
94
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.05);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.td-table__title {
|
|
98
|
+
display: flex;
|
|
99
|
+
align-items: center;
|
|
100
|
+
font-size: 1.25rem;
|
|
101
|
+
font-weight: 700;
|
|
102
|
+
color: white;
|
|
103
|
+
margin: 0;
|
|
104
|
+
padding: 0 1.5rem;
|
|
105
|
+
flex-shrink: 0;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.td-table__title-actions {
|
|
109
|
+
display: flex;
|
|
110
|
+
align-items: center;
|
|
111
|
+
gap: 0.5rem;
|
|
112
|
+
padding: 0 1.5rem;
|
|
113
|
+
margin-left: auto;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.td-table__tabs-wrapper {
|
|
117
|
+
display: flex;
|
|
118
|
+
align-items: stretch;
|
|
119
|
+
margin-left: auto;
|
|
120
|
+
flex-shrink: 0;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.td-table__tabs-scroll {
|
|
124
|
+
display: flex;
|
|
125
|
+
align-items: stretch;
|
|
126
|
+
overflow-x: auto;
|
|
127
|
+
scrollbar-width: none;
|
|
128
|
+
-ms-overflow-style: none;
|
|
129
|
+
scroll-behavior: smooth;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.td-table__tabs-scroll::-webkit-scrollbar {
|
|
133
|
+
display: none;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.td-table__tab {
|
|
137
|
+
display: flex;
|
|
138
|
+
align-items: center;
|
|
139
|
+
justify-content: center;
|
|
140
|
+
gap: 0.5rem;
|
|
141
|
+
padding: 0 1.25rem;
|
|
142
|
+
font-size: 0.875rem;
|
|
143
|
+
font-weight: 500;
|
|
144
|
+
color: rgba(156, 163, 175, 0.8);
|
|
145
|
+
background: transparent;
|
|
146
|
+
border: none;
|
|
147
|
+
border-left: 1px solid rgba(255, 255, 255, 0.05);
|
|
148
|
+
cursor: pointer;
|
|
149
|
+
white-space: nowrap;
|
|
150
|
+
transition: all 0.15s ease;
|
|
151
|
+
flex-shrink: 0;
|
|
152
|
+
min-height: 100%;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.td-table__tab:hover {
|
|
156
|
+
background: rgba(255, 255, 255, 0.03);
|
|
157
|
+
color: rgba(255, 255, 255, 0.9);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.td-table__tab--active {
|
|
161
|
+
background: rgba(255, 255, 255, 0.08);
|
|
162
|
+
color: white;
|
|
163
|
+
box-shadow: inset 0 -2px 0 #E85A4F;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.td-table__tab-badge {
|
|
167
|
+
display: inline-flex;
|
|
168
|
+
align-items: center;
|
|
169
|
+
justify-content: center;
|
|
170
|
+
min-width: 18px;
|
|
171
|
+
height: 18px;
|
|
172
|
+
padding: 0 0.375rem;
|
|
173
|
+
border-radius: 9px;
|
|
174
|
+
background: rgba(255, 255, 255, 0.1);
|
|
175
|
+
font-size: 0.625rem;
|
|
176
|
+
font-weight: 600;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.td-table__tab--active .td-table__tab-badge {
|
|
180
|
+
background: rgba(232, 90, 79, 0.3);
|
|
181
|
+
color: #E85A4F;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.td-table__wrapper {
|
|
185
|
+
overflow-x: auto;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.td-table table {
|
|
189
|
+
width: 100%;
|
|
190
|
+
border-collapse: collapse;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.td-table th,
|
|
194
|
+
.td-table td {
|
|
195
|
+
text-align: left;
|
|
196
|
+
padding: 1rem 1.5rem;
|
|
197
|
+
vertical-align: middle;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.td-table th {
|
|
201
|
+
font-size: 0.75rem;
|
|
202
|
+
font-weight: 600;
|
|
203
|
+
text-transform: uppercase;
|
|
204
|
+
letter-spacing: 0.05em;
|
|
205
|
+
color: rgba(156, 163, 175, 0.8);
|
|
206
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.05);
|
|
207
|
+
background: rgba(0, 0, 0, 0.1);
|
|
208
|
+
white-space: nowrap;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.td-table td {
|
|
212
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.03);
|
|
213
|
+
color: rgba(255, 255, 255, 0.9);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.td-table--compact td {
|
|
217
|
+
padding: 0.75rem 1.5rem;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.td-table tr:last-child td {
|
|
221
|
+
border-bottom: none;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.td-table__hoverable tr:hover td {
|
|
225
|
+
background: rgba(255, 255, 255, 0.02);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.td-table__striped tr:nth-child(even) td {
|
|
229
|
+
background: rgba(0, 0, 0, 0.1);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.td-table__align-center {
|
|
233
|
+
text-align: center;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.td-table__align-right {
|
|
237
|
+
text-align: right;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.td-table__empty {
|
|
241
|
+
padding: 3rem;
|
|
242
|
+
text-align: center;
|
|
243
|
+
color: rgba(156, 163, 175, 0.6);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
@media (max-width: 768px) {
|
|
247
|
+
.td-table__hide-mobile {
|
|
248
|
+
display: none;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.td-table th,
|
|
252
|
+
.td-table td {
|
|
253
|
+
padding: 0.75rem 1rem;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.td-table__header {
|
|
257
|
+
flex-wrap: wrap;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.td-table__title {
|
|
261
|
+
padding: 1rem 1.5rem;
|
|
262
|
+
width: 100%;
|
|
263
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.05);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.td-table__tabs-wrapper {
|
|
267
|
+
width: 100%;
|
|
268
|
+
margin-left: 0;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.td-table__tab {
|
|
272
|
+
padding: 0.75rem 1rem;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
` });
|
|
276
|
+
}
|
|
277
|
+
export {
|
|
278
|
+
H as Table
|
|
279
|
+
};
|
|
280
|
+
//# sourceMappingURL=index26.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index26.js","sources":["../src/components/Table.tsx"],"sourcesContent":["'use client';\n\nimport { useState, ReactNode, useEffect } from 'react';\nimport { clsx } from 'clsx';\n\nexport interface TableColumn {\n key: string;\n label: string;\n width?: string;\n align?: 'left' | 'center' | 'right';\n hideOnMobile?: boolean;\n render?: (value: unknown, row: Record<string, unknown>) => ReactNode;\n}\n\nexport interface TableTab {\n id: string;\n label: string;\n data: Record<string, unknown>[];\n}\n\nexport interface TableProps {\n title?: string;\n columns: TableColumn[];\n data?: Record<string, unknown>[];\n tabs?: TableTab[];\n activeTab?: string;\n onTabChange?: (tabId: string) => void;\n compact?: boolean;\n striped?: boolean;\n hoverable?: boolean;\n emptyMessage?: string;\n titleActions?: ReactNode;\n className?: string;\n}\n\nexport function Table({\n title,\n columns,\n data = [],\n tabs = [],\n activeTab: controlledActiveTab,\n onTabChange,\n compact = false,\n striped = false,\n hoverable = true,\n emptyMessage = 'No data to display',\n titleActions,\n className,\n}: TableProps) {\n const isTabbedMode = tabs.length > 0;\n const [internalActiveTab, setInternalActiveTab] = useState(tabs[0]?.id || '');\n\n const activeTab = controlledActiveTab ?? internalActiveTab;\n\n useEffect(() => {\n if (isTabbedMode && !activeTab && tabs.length > 0) {\n setInternalActiveTab(tabs[0].id);\n }\n }, [isTabbedMode, activeTab, tabs]);\n\n const displayData = isTabbedMode\n ? tabs.find((t) => t.id === activeTab)?.data ?? []\n : data;\n\n const handleTabClick = (tabId: string) => {\n setInternalActiveTab(tabId);\n onTabChange?.(tabId);\n };\n\n const renderCell = (row: Record<string, unknown>, column: TableColumn) => {\n const value = row[column.key];\n if (column.render) {\n return column.render(value, row);\n }\n return String(value ?? '—');\n };\n\n const renderTabs = () => (\n <div className=\"td-table__tabs-wrapper\">\n <div className=\"td-table__tabs-scroll\">\n {tabs.map((tab) => (\n <button\n key={tab.id}\n className={clsx('td-table__tab', activeTab === tab.id && 'td-table__tab--active')}\n onClick={() => handleTabClick(tab.id)}\n >\n {tab.label}\n <span className=\"td-table__tab-badge\">{tab.data.length}</span>\n </button>\n ))}\n </div>\n </div>\n );\n\n const hasHeader = title || isTabbedMode || titleActions;\n\n return (\n <>\n <div className={clsx('td-table', compact && 'td-table--compact', className)}>\n {hasHeader && (\n <div className=\"td-table__header\">\n {title && <h2 className=\"td-table__title\">{title}</h2>}\n {isTabbedMode && renderTabs()}\n {titleActions && <div className=\"td-table__title-actions\">{titleActions}</div>}\n </div>\n )}\n\n {displayData.length === 0 ? (\n <div className=\"td-table__empty\">\n {isTabbedMode ? 'No data for this tab' : emptyMessage}\n </div>\n ) : (\n <div className=\"td-table__wrapper\">\n <table>\n <thead>\n <tr>\n {columns.map((col) => (\n <th\n key={col.key}\n className={clsx(\n col.align && `td-table__align-${col.align}`,\n col.hideOnMobile && 'td-table__hide-mobile'\n )}\n style={col.width ? { width: col.width } : undefined}\n >\n {col.label}\n </th>\n ))}\n </tr>\n </thead>\n <tbody className={clsx(striped && 'td-table__striped', hoverable && 'td-table__hoverable')}>\n {displayData.map((row, rowIndex) => (\n <tr key={rowIndex}>\n {columns.map((col) => (\n <td\n key={col.key}\n className={clsx(\n col.align && `td-table__align-${col.align}`,\n col.hideOnMobile && 'td-table__hide-mobile'\n )}\n >\n {renderCell(row, col)}\n </td>\n ))}\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n )}\n </div>\n <TableStyles />\n </>\n );\n}\n\nfunction TableStyles() {\n return (\n <style>{`\n .td-table {\n background: rgba(28, 36, 56, 0.8);\n backdrop-filter: blur(12px);\n -webkit-backdrop-filter: blur(12px);\n border: 1px solid rgba(255, 255, 255, 0.05);\n border-radius: 0.875rem;\n overflow: hidden;\n box-shadow:\n inset 0 1px 1px 0 rgba(255, 255, 255, 0.05),\n 0 8px 24px -4px rgba(0, 0, 0, 0.15);\n }\n\n .td-table__header {\n display: flex;\n align-items: stretch;\n min-height: 56px;\n border-bottom: 1px solid rgba(255, 255, 255, 0.05);\n }\n\n .td-table__title {\n display: flex;\n align-items: center;\n font-size: 1.25rem;\n font-weight: 700;\n color: white;\n margin: 0;\n padding: 0 1.5rem;\n flex-shrink: 0;\n }\n\n .td-table__title-actions {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n padding: 0 1.5rem;\n margin-left: auto;\n }\n\n .td-table__tabs-wrapper {\n display: flex;\n align-items: stretch;\n margin-left: auto;\n flex-shrink: 0;\n }\n\n .td-table__tabs-scroll {\n display: flex;\n align-items: stretch;\n overflow-x: auto;\n scrollbar-width: none;\n -ms-overflow-style: none;\n scroll-behavior: smooth;\n }\n\n .td-table__tabs-scroll::-webkit-scrollbar {\n display: none;\n }\n\n .td-table__tab {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n padding: 0 1.25rem;\n font-size: 0.875rem;\n font-weight: 500;\n color: rgba(156, 163, 175, 0.8);\n background: transparent;\n border: none;\n border-left: 1px solid rgba(255, 255, 255, 0.05);\n cursor: pointer;\n white-space: nowrap;\n transition: all 0.15s ease;\n flex-shrink: 0;\n min-height: 100%;\n }\n\n .td-table__tab:hover {\n background: rgba(255, 255, 255, 0.03);\n color: rgba(255, 255, 255, 0.9);\n }\n\n .td-table__tab--active {\n background: rgba(255, 255, 255, 0.08);\n color: white;\n box-shadow: inset 0 -2px 0 #E85A4F;\n }\n\n .td-table__tab-badge {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 18px;\n height: 18px;\n padding: 0 0.375rem;\n border-radius: 9px;\n background: rgba(255, 255, 255, 0.1);\n font-size: 0.625rem;\n font-weight: 600;\n }\n\n .td-table__tab--active .td-table__tab-badge {\n background: rgba(232, 90, 79, 0.3);\n color: #E85A4F;\n }\n\n .td-table__wrapper {\n overflow-x: auto;\n }\n\n .td-table table {\n width: 100%;\n border-collapse: collapse;\n }\n\n .td-table th,\n .td-table td {\n text-align: left;\n padding: 1rem 1.5rem;\n vertical-align: middle;\n }\n\n .td-table th {\n font-size: 0.75rem;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.05em;\n color: rgba(156, 163, 175, 0.8);\n border-bottom: 1px solid rgba(255, 255, 255, 0.05);\n background: rgba(0, 0, 0, 0.1);\n white-space: nowrap;\n }\n\n .td-table td {\n border-bottom: 1px solid rgba(255, 255, 255, 0.03);\n color: rgba(255, 255, 255, 0.9);\n }\n\n .td-table--compact td {\n padding: 0.75rem 1.5rem;\n }\n\n .td-table tr:last-child td {\n border-bottom: none;\n }\n\n .td-table__hoverable tr:hover td {\n background: rgba(255, 255, 255, 0.02);\n }\n\n .td-table__striped tr:nth-child(even) td {\n background: rgba(0, 0, 0, 0.1);\n }\n\n .td-table__align-center {\n text-align: center;\n }\n\n .td-table__align-right {\n text-align: right;\n }\n\n .td-table__empty {\n padding: 3rem;\n text-align: center;\n color: rgba(156, 163, 175, 0.6);\n }\n\n @media (max-width: 768px) {\n .td-table__hide-mobile {\n display: none;\n }\n\n .td-table th,\n .td-table td {\n padding: 0.75rem 1rem;\n }\n\n .td-table__header {\n flex-wrap: wrap;\n }\n\n .td-table__title {\n padding: 1rem 1.5rem;\n width: 100%;\n border-bottom: 1px solid rgba(255, 255, 255, 0.05);\n }\n\n .td-table__tabs-wrapper {\n width: 100%;\n margin-left: 0;\n }\n\n .td-table__tab {\n padding: 0.75rem 1rem;\n }\n }\n `}</style>\n );\n}\n"],"names":["Table","title","columns","data","tabs","controlledActiveTab","onTabChange","compact","striped","hoverable","emptyMessage","titleActions","className","isTabbedMode","internalActiveTab","setInternalActiveTab","useState","_a","activeTab","useEffect","displayData","_b","t","handleTabClick","tabId","renderCell","row","column","value","renderTabs","jsx","tab","jsxs","clsx","hasHeader","Fragment","col","rowIndex","TableStyles"],"mappings":";;;AAmCO,SAASA,EAAM;AAAA,EACpB,OAAAC;AAAA,EACA,SAAAC;AAAA,EACA,MAAAC,IAAO,CAAA;AAAA,EACP,MAAAC,IAAO,CAAA;AAAA,EACP,WAAWC;AAAA,EACX,aAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,SAAAC,IAAU;AAAA,EACV,WAAAC,IAAY;AAAA,EACZ,cAAAC,IAAe;AAAA,EACf,cAAAC;AAAA,EACA,WAAAC;AACF,GAAe;;AACb,QAAMC,IAAeT,EAAK,SAAS,GAC7B,CAACU,GAAmBC,CAAoB,IAAIC,IAASC,IAAAb,EAAK,CAAC,MAAN,gBAAAa,EAAS,OAAM,EAAE,GAEtEC,IAAYb,KAAuBS;AAEzC,EAAAK,EAAU,MAAM;AACd,IAAIN,KAAgB,CAACK,KAAad,EAAK,SAAS,KAC9CW,EAAqBX,EAAK,CAAC,EAAE,EAAE;AAAA,EAEnC,GAAG,CAACS,GAAcK,GAAWd,CAAI,CAAC;AAElC,QAAMgB,IAAcP,MAChBQ,IAAAjB,EAAK,KAAK,CAACkB,MAAMA,EAAE,OAAOJ,CAAS,MAAnC,gBAAAG,EAAsC,SAAQ,CAAA,IAC9ClB,GAEEoB,IAAiB,CAACC,MAAkB;AACxC,IAAAT,EAAqBS,CAAK,GAC1BlB,KAAA,QAAAA,EAAckB;AAAA,EAChB,GAEMC,IAAa,CAACC,GAA8BC,MAAwB;AACxE,UAAMC,IAAQF,EAAIC,EAAO,GAAG;AAC5B,WAAIA,EAAO,SACFA,EAAO,OAAOC,GAAOF,CAAG,IAE1B,OAAOE,KAAS,GAAG;AAAA,EAC5B,GAEMC,IAAa,MACjB,gBAAAC,EAAC,OAAA,EAAI,WAAU,0BACb,UAAA,gBAAAA,EAA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AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,OAsMN;AAEN;"}
|
package/dist/index27.js
ADDED
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
import { jsxs as M, Fragment as G, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as l, useState as D, useEffect as y, useCallback as h } from "react";
|
|
3
|
+
import { clsx as P } from "./index28.js";
|
|
4
|
+
function ce({
|
|
5
|
+
objUrl: E = "",
|
|
6
|
+
mtlUrl: T = "",
|
|
7
|
+
width: g = 300,
|
|
8
|
+
height: p = 300,
|
|
9
|
+
autoRotate: F = !0,
|
|
10
|
+
rotationSpeed: Y = 0.01,
|
|
11
|
+
backgroundColor: L = "transparent",
|
|
12
|
+
enableZoom: j = !1,
|
|
13
|
+
enablePan: _ = !0,
|
|
14
|
+
className: X
|
|
15
|
+
}) {
|
|
16
|
+
const R = l(null), [N, b] = D(!0), [C, S] = D(null), [u, B] = D(!1), a = l(null), s = l(null), r = l(null), n = l(null), v = l(null), f = l(!1), d = l({ x: 0, y: 0 }), w = l(null);
|
|
17
|
+
y(() => {
|
|
18
|
+
let e = !0;
|
|
19
|
+
return (async () => {
|
|
20
|
+
try {
|
|
21
|
+
const o = await import(
|
|
22
|
+
/* webpackIgnore: true */
|
|
23
|
+
"./index29.js"
|
|
24
|
+
), m = await import(
|
|
25
|
+
/* webpackIgnore: true */
|
|
26
|
+
"./index30.js"
|
|
27
|
+
), c = await import(
|
|
28
|
+
/* webpackIgnore: true */
|
|
29
|
+
"./index31.js"
|
|
30
|
+
);
|
|
31
|
+
if (!e) return;
|
|
32
|
+
w.current = {
|
|
33
|
+
THREE: o,
|
|
34
|
+
OBJLoader: m.OBJLoader,
|
|
35
|
+
MTLLoader: c.MTLLoader
|
|
36
|
+
}, B(!0);
|
|
37
|
+
} catch (o) {
|
|
38
|
+
console.warn("Three.js not available:", o), e && (B(!1), b(!1));
|
|
39
|
+
}
|
|
40
|
+
})(), () => {
|
|
41
|
+
e = !1;
|
|
42
|
+
};
|
|
43
|
+
}, []), y(() => {
|
|
44
|
+
if (!u || !R.current || !w.current) return;
|
|
45
|
+
const { THREE: e } = w.current, t = R.current;
|
|
46
|
+
a.current = new e.Scene(), s.current = new e.PerspectiveCamera(45, g / p, 0.1, 1e3), s.current.position.z = 5, r.current = new e.WebGLRenderer({
|
|
47
|
+
antialias: !0,
|
|
48
|
+
alpha: L === "transparent"
|
|
49
|
+
}), r.current.setSize(g, p), r.current.setPixelRatio(window.devicePixelRatio), L !== "transparent" && r.current.setClearColor(L), t.appendChild(r.current.domElement);
|
|
50
|
+
const o = new e.AmbientLight(16777215, 0.6);
|
|
51
|
+
a.current.add(o);
|
|
52
|
+
const m = new e.DirectionalLight(16777215, 0.8);
|
|
53
|
+
m.position.set(5, 5, 5), a.current.add(m);
|
|
54
|
+
const c = new e.DirectionalLight(16777215, 0.4);
|
|
55
|
+
return c.position.set(-5, -5, -5), a.current.add(c), () => {
|
|
56
|
+
v.current && cancelAnimationFrame(v.current), r.current && (r.current.dispose(), t.contains(r.current.domElement) && t.removeChild(r.current.domElement));
|
|
57
|
+
};
|
|
58
|
+
}, [u, g, p, L]), y(() => {
|
|
59
|
+
if (!u || !w.current || !a.current) return;
|
|
60
|
+
(async () => {
|
|
61
|
+
const { THREE: t, OBJLoader: o, MTLLoader: m } = w.current;
|
|
62
|
+
if (!E) {
|
|
63
|
+
b(!1);
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
try {
|
|
67
|
+
let c = null;
|
|
68
|
+
if (T) {
|
|
69
|
+
const k = new m();
|
|
70
|
+
c = await new Promise((z, ee) => {
|
|
71
|
+
k.load(
|
|
72
|
+
T,
|
|
73
|
+
(W) => {
|
|
74
|
+
W.preload(), z(W);
|
|
75
|
+
},
|
|
76
|
+
void 0,
|
|
77
|
+
ee
|
|
78
|
+
);
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
const H = new o();
|
|
82
|
+
c && H.setMaterials(c);
|
|
83
|
+
const x = await new Promise((k, z) => {
|
|
84
|
+
H.load(E, k, void 0, z);
|
|
85
|
+
}), J = new t.Box3().setFromObject(x), U = J.getCenter(new t.Vector3()), A = J.getSize(new t.Vector3()), Z = 2 / Math.max(A.x, A.y, A.z);
|
|
86
|
+
x.position.sub(U), x.scale.setScalar(Z), n.current && a.current.remove(n.current), n.current = x, a.current.add(x), b(!1), S(null);
|
|
87
|
+
} catch (c) {
|
|
88
|
+
console.error("Failed to load 3D model:", c), S("Failed to load 3D model"), b(!1);
|
|
89
|
+
}
|
|
90
|
+
})();
|
|
91
|
+
}, [u, E, T]), y(() => {
|
|
92
|
+
if (!u || !r.current || !a.current || !s.current) return;
|
|
93
|
+
const e = () => {
|
|
94
|
+
v.current = requestAnimationFrame(e), n.current && F && !f.current && (n.current.rotation.y += Y), r.current.render(a.current, s.current);
|
|
95
|
+
};
|
|
96
|
+
return e(), () => {
|
|
97
|
+
v.current && cancelAnimationFrame(v.current);
|
|
98
|
+
};
|
|
99
|
+
}, [u, F, Y]);
|
|
100
|
+
const q = h((e) => {
|
|
101
|
+
_ && (f.current = !0, d.current = { x: e.clientX, y: e.clientY });
|
|
102
|
+
}, [_]), I = h((e) => {
|
|
103
|
+
!_ || e.touches.length !== 1 || (f.current = !0, d.current = { x: e.touches[0].clientX, y: e.touches[0].clientY });
|
|
104
|
+
}, [_]), K = h((e) => {
|
|
105
|
+
if (!f.current || !n.current) return;
|
|
106
|
+
const t = e.clientX - d.current.x, o = e.clientY - d.current.y;
|
|
107
|
+
n.current.rotation.y += t * 0.01, n.current.rotation.x += o * 0.01, d.current = { x: e.clientX, y: e.clientY };
|
|
108
|
+
}, []), Q = h((e) => {
|
|
109
|
+
if (!f.current || !n.current || e.touches.length !== 1) return;
|
|
110
|
+
const t = e.touches[0].clientX - d.current.x, o = e.touches[0].clientY - d.current.y;
|
|
111
|
+
n.current.rotation.y += t * 0.01, n.current.rotation.x += o * 0.01, d.current = { x: e.touches[0].clientX, y: e.touches[0].clientY };
|
|
112
|
+
}, []), O = h(() => {
|
|
113
|
+
f.current = !1;
|
|
114
|
+
}, []), $ = h((e) => {
|
|
115
|
+
!j || !s.current || (e.preventDefault(), s.current.position.z += e.deltaY * 0.01, s.current.position.z = Math.max(2, Math.min(10, s.current.position.z)));
|
|
116
|
+
}, [j]);
|
|
117
|
+
return y(() => {
|
|
118
|
+
const e = () => {
|
|
119
|
+
f.current = !1;
|
|
120
|
+
};
|
|
121
|
+
return window.addEventListener("mouseup", e), window.addEventListener("touchend", e), () => {
|
|
122
|
+
window.removeEventListener("mouseup", e), window.removeEventListener("touchend", e);
|
|
123
|
+
};
|
|
124
|
+
}, []), !u && !N ? /* @__PURE__ */ M(G, { children: [
|
|
125
|
+
/* @__PURE__ */ i(
|
|
126
|
+
"div",
|
|
127
|
+
{
|
|
128
|
+
className: P("td-logo-3d td-logo-3d--fallback", X),
|
|
129
|
+
style: { width: g, height: p },
|
|
130
|
+
children: /* @__PURE__ */ M("span", { className: "td-logo-3d__fallback-text", children: [
|
|
131
|
+
"Tampa",
|
|
132
|
+
/* @__PURE__ */ i("span", { className: "td-logo-3d__fallback-accent", children: ".dev" })
|
|
133
|
+
] })
|
|
134
|
+
}
|
|
135
|
+
),
|
|
136
|
+
/* @__PURE__ */ i("style", { children: V })
|
|
137
|
+
] }) : /* @__PURE__ */ M(G, { children: [
|
|
138
|
+
/* @__PURE__ */ M(
|
|
139
|
+
"div",
|
|
140
|
+
{
|
|
141
|
+
className: P("td-logo-3d", X),
|
|
142
|
+
style: { width: g, height: p },
|
|
143
|
+
onMouseDown: q,
|
|
144
|
+
onMouseMove: K,
|
|
145
|
+
onMouseUp: O,
|
|
146
|
+
onTouchStart: I,
|
|
147
|
+
onTouchMove: Q,
|
|
148
|
+
onTouchEnd: O,
|
|
149
|
+
onWheel: $,
|
|
150
|
+
children: [
|
|
151
|
+
/* @__PURE__ */ i("div", { ref: R, className: "td-logo-3d__canvas" }),
|
|
152
|
+
N && /* @__PURE__ */ i("div", { className: "td-logo-3d__loading", children: /* @__PURE__ */ i("div", { className: "td-logo-3d__spinner" }) }),
|
|
153
|
+
C && /* @__PURE__ */ i("div", { className: "td-logo-3d__error", children: /* @__PURE__ */ i("p", { children: C }) })
|
|
154
|
+
]
|
|
155
|
+
}
|
|
156
|
+
),
|
|
157
|
+
/* @__PURE__ */ i("style", { children: V })
|
|
158
|
+
] });
|
|
159
|
+
}
|
|
160
|
+
const V = `
|
|
161
|
+
.td-logo-3d {
|
|
162
|
+
position: relative;
|
|
163
|
+
overflow: hidden;
|
|
164
|
+
border-radius: var(--td-radius-lg, 12px);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.td-logo-3d__canvas {
|
|
168
|
+
width: 100%;
|
|
169
|
+
height: 100%;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.td-logo-3d__canvas canvas {
|
|
173
|
+
display: block;
|
|
174
|
+
width: 100%;
|
|
175
|
+
height: 100%;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.td-logo-3d__loading {
|
|
179
|
+
position: absolute;
|
|
180
|
+
inset: 0;
|
|
181
|
+
display: flex;
|
|
182
|
+
align-items: center;
|
|
183
|
+
justify-content: center;
|
|
184
|
+
background: rgba(28, 36, 56, 0.1);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.td-logo-3d__spinner {
|
|
188
|
+
width: 2rem;
|
|
189
|
+
height: 2rem;
|
|
190
|
+
border: 2px solid var(--td-color-border, rgba(255, 255, 255, 0.1));
|
|
191
|
+
border-top-color: var(--td-color-coral, #E85A4F);
|
|
192
|
+
border-radius: 50%;
|
|
193
|
+
animation: td-logo-3d-spin 1s linear infinite;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
@keyframes td-logo-3d-spin {
|
|
197
|
+
to { transform: rotate(360deg); }
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.td-logo-3d__error {
|
|
201
|
+
position: absolute;
|
|
202
|
+
inset: 0;
|
|
203
|
+
display: flex;
|
|
204
|
+
flex-direction: column;
|
|
205
|
+
align-items: center;
|
|
206
|
+
justify-content: center;
|
|
207
|
+
background: rgba(28, 36, 56, 0.05);
|
|
208
|
+
color: var(--td-color-text-muted, #9CA3AF);
|
|
209
|
+
font-size: 0.875rem;
|
|
210
|
+
text-align: center;
|
|
211
|
+
padding: 1rem;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.td-logo-3d--fallback {
|
|
215
|
+
display: flex;
|
|
216
|
+
align-items: center;
|
|
217
|
+
justify-content: center;
|
|
218
|
+
background: linear-gradient(135deg, var(--td-color-navy, #1C2438) 0%, var(--td-color-navy-dark, #1A2031) 100%);
|
|
219
|
+
color: white;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.td-logo-3d__fallback-text {
|
|
223
|
+
font-size: 2rem;
|
|
224
|
+
font-weight: 700;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.td-logo-3d__fallback-accent {
|
|
228
|
+
color: var(--td-color-coral, #E85A4F);
|
|
229
|
+
}
|
|
230
|
+
`;
|
|
231
|
+
export {
|
|
232
|
+
ce as Logo3d
|
|
233
|
+
};
|
|
234
|
+
//# sourceMappingURL=index27.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index27.js","sources":["../src/components/Logo3d.tsx"],"sourcesContent":["'use client';\n\nimport { useEffect, useRef, useState, useCallback } from 'react';\nimport clsx from 'clsx';\n\nexport interface Logo3dProps {\n /** URL to the OBJ file */\n objUrl?: string;\n /** URL to the MTL file (optional) */\n mtlUrl?: string;\n /** Canvas width */\n width?: number;\n /** Canvas height */\n height?: number;\n /** Enable auto-rotation */\n autoRotate?: boolean;\n /** Auto-rotation speed */\n rotationSpeed?: number;\n /** Background color (use 'transparent' for transparent) */\n backgroundColor?: string;\n /** Enable mouse wheel zoom */\n enableZoom?: boolean;\n /** Enable click-and-drag rotation */\n enablePan?: boolean;\n /** Additional CSS class */\n className?: string;\n}\n\n// Three.js types - using any since Three.js is an optional peer dependency\ninterface ThreeModules {\n THREE: any;\n OBJLoader: any;\n MTLLoader: any;\n}\n\n/**\n * Tampa Devs 3D Logo Component\n * Interactive 3D logo using Three.js with OBJ/MTL support\n */\nexport function Logo3d({\n objUrl = '',\n mtlUrl = '',\n width = 300,\n height = 300,\n autoRotate = true,\n rotationSpeed = 0.01,\n backgroundColor = 'transparent',\n enableZoom = false,\n enablePan = true,\n className,\n}: Logo3dProps) {\n const containerRef = useRef<HTMLDivElement>(null);\n const [loading, setLoading] = useState(true);\n const [error, setError] = useState<string | null>(null);\n const [threeAvailable, setThreeAvailable] = useState(false);\n\n // Refs for Three.js objects\n const sceneRef = useRef<any>(null);\n const cameraRef = useRef<any>(null);\n const rendererRef = useRef<any>(null);\n const modelRef = useRef<any>(null);\n const animationIdRef = useRef<number | null>(null);\n const isDraggingRef = useRef(false);\n const previousMouseRef = useRef({ x: 0, y: 0 });\n const threeRef = useRef<ThreeModules | null>(null);\n\n // Initialize Three.js\n useEffect(() => {\n let mounted = true;\n\n const loadThree = async () => {\n try {\n // Dynamic imports with type assertions to handle optional three.js dependency\n const threeModule = await import(/* webpackIgnore: true */ 'three') as any;\n const objLoaderModule = await import(/* webpackIgnore: true */ 'three/addons/loaders/OBJLoader.js') as any;\n const mtlLoaderModule = await import(/* webpackIgnore: true */ 'three/addons/loaders/MTLLoader.js') as any;\n\n if (!mounted) return;\n\n threeRef.current = {\n THREE: threeModule,\n OBJLoader: objLoaderModule.OBJLoader,\n MTLLoader: mtlLoaderModule.MTLLoader,\n };\n\n setThreeAvailable(true);\n } catch (e) {\n console.warn('Three.js not available:', e);\n if (mounted) {\n setThreeAvailable(false);\n setLoading(false);\n }\n }\n };\n\n loadThree();\n\n return () => {\n mounted = false;\n };\n }, []);\n\n // Initialize scene when Three.js is available\n useEffect(() => {\n if (!threeAvailable || !containerRef.current || !threeRef.current) return;\n\n const { THREE } = threeRef.current;\n const container = containerRef.current;\n\n // Create scene\n sceneRef.current = new THREE.Scene();\n\n // Create camera\n cameraRef.current = new THREE.PerspectiveCamera(45, width / height, 0.1, 1000);\n cameraRef.current.position.z = 5;\n\n // Create renderer\n rendererRef.current = new THREE.WebGLRenderer({\n antialias: true,\n alpha: backgroundColor === 'transparent',\n });\n rendererRef.current.setSize(width, height);\n rendererRef.current.setPixelRatio(window.devicePixelRatio);\n\n if (backgroundColor !== 'transparent') {\n rendererRef.current.setClearColor(backgroundColor);\n }\n\n container.appendChild(rendererRef.current.domElement);\n\n // Add lights\n const ambientLight = new THREE.AmbientLight(0xffffff, 0.6);\n sceneRef.current.add(ambientLight);\n\n const directionalLight = new THREE.DirectionalLight(0xffffff, 0.8);\n directionalLight.position.set(5, 5, 5);\n sceneRef.current.add(directionalLight);\n\n const directionalLight2 = new THREE.DirectionalLight(0xffffff, 0.4);\n directionalLight2.position.set(-5, -5, -5);\n sceneRef.current.add(directionalLight2);\n\n // Cleanup\n return () => {\n if (animationIdRef.current) {\n cancelAnimationFrame(animationIdRef.current);\n }\n if (rendererRef.current) {\n rendererRef.current.dispose();\n if (container.contains(rendererRef.current.domElement)) {\n container.removeChild(rendererRef.current.domElement);\n }\n }\n };\n }, [threeAvailable, width, height, backgroundColor]);\n\n // Load model\n useEffect(() => {\n if (!threeAvailable || !threeRef.current || !sceneRef.current) return;\n\n const loadModel = async () => {\n const { THREE, OBJLoader, MTLLoader } = threeRef.current!;\n\n if (!objUrl) {\n setLoading(false);\n return;\n }\n\n try {\n let materials: any = null;\n\n // Load materials if MTL URL provided\n if (mtlUrl) {\n const mtlLoader = new MTLLoader();\n materials = await new Promise((resolve, reject) => {\n mtlLoader.load(\n mtlUrl,\n (mtl: any) => {\n mtl.preload();\n resolve(mtl);\n },\n undefined,\n reject\n );\n });\n }\n\n // Load OBJ model\n const objLoader = new OBJLoader();\n if (materials) {\n objLoader.setMaterials(materials);\n }\n\n const object = await new Promise<any>((resolve, reject) => {\n objLoader.load(objUrl, resolve, undefined, reject);\n });\n\n // Center and scale the model\n const box = new THREE.Box3().setFromObject(object);\n const center = box.getCenter(new THREE.Vector3());\n const size = box.getSize(new THREE.Vector3());\n const maxDim = Math.max(size.x, size.y, size.z);\n const scale = 2 / maxDim;\n\n object.position.sub(center);\n object.scale.setScalar(scale);\n\n // Remove old model if exists\n if (modelRef.current) {\n sceneRef.current.remove(modelRef.current);\n }\n\n modelRef.current = object;\n sceneRef.current.add(object);\n setLoading(false);\n setError(null);\n } catch (e) {\n console.error('Failed to load 3D model:', e);\n setError('Failed to load 3D model');\n setLoading(false);\n }\n };\n\n loadModel();\n }, [threeAvailable, objUrl, mtlUrl]);\n\n // Animation loop\n useEffect(() => {\n if (!threeAvailable || !rendererRef.current || !sceneRef.current || !cameraRef.current) return;\n\n const animate = () => {\n animationIdRef.current = requestAnimationFrame(animate);\n\n if (modelRef.current && autoRotate && !isDraggingRef.current) {\n modelRef.current.rotation.y += rotationSpeed;\n }\n\n rendererRef.current.render(sceneRef.current, cameraRef.current);\n };\n\n animate();\n\n return () => {\n if (animationIdRef.current) {\n cancelAnimationFrame(animationIdRef.current);\n }\n };\n }, [threeAvailable, autoRotate, rotationSpeed]);\n\n // Mouse/touch handlers\n const handleMouseDown = useCallback((e: React.MouseEvent) => {\n if (!enablePan) return;\n isDraggingRef.current = true;\n previousMouseRef.current = { x: e.clientX, y: e.clientY };\n }, [enablePan]);\n\n const handleTouchStart = useCallback((e: React.TouchEvent) => {\n if (!enablePan || e.touches.length !== 1) return;\n isDraggingRef.current = true;\n previousMouseRef.current = { x: e.touches[0].clientX, y: e.touches[0].clientY };\n }, [enablePan]);\n\n const handleMouseMove = useCallback((e: React.MouseEvent) => {\n if (!isDraggingRef.current || !modelRef.current) return;\n\n const deltaX = e.clientX - previousMouseRef.current.x;\n const deltaY = e.clientY - previousMouseRef.current.y;\n\n modelRef.current.rotation.y += deltaX * 0.01;\n modelRef.current.rotation.x += deltaY * 0.01;\n\n previousMouseRef.current = { x: e.clientX, y: e.clientY };\n }, []);\n\n const handleTouchMove = useCallback((e: React.TouchEvent) => {\n if (!isDraggingRef.current || !modelRef.current || e.touches.length !== 1) return;\n\n const deltaX = e.touches[0].clientX - previousMouseRef.current.x;\n const deltaY = e.touches[0].clientY - previousMouseRef.current.y;\n\n modelRef.current.rotation.y += deltaX * 0.01;\n modelRef.current.rotation.x += deltaY * 0.01;\n\n previousMouseRef.current = { x: e.touches[0].clientX, y: e.touches[0].clientY };\n }, []);\n\n const handleMouseUp = useCallback(() => {\n isDraggingRef.current = false;\n }, []);\n\n const handleWheel = useCallback((e: React.WheelEvent) => {\n if (!enableZoom || !cameraRef.current) return;\n e.preventDefault();\n\n cameraRef.current.position.z += e.deltaY * 0.01;\n cameraRef.current.position.z = Math.max(2, Math.min(10, cameraRef.current.position.z));\n }, [enableZoom]);\n\n // Global mouse up listener\n useEffect(() => {\n const handleGlobalMouseUp = () => {\n isDraggingRef.current = false;\n };\n\n window.addEventListener('mouseup', handleGlobalMouseUp);\n window.addEventListener('touchend', handleGlobalMouseUp);\n\n return () => {\n window.removeEventListener('mouseup', handleGlobalMouseUp);\n window.removeEventListener('touchend', handleGlobalMouseUp);\n };\n }, []);\n\n // Fallback when Three.js is not available\n if (!threeAvailable && !loading) {\n return (\n <>\n <div\n className={clsx('td-logo-3d td-logo-3d--fallback', className)}\n style={{ width, height }}\n >\n <span className=\"td-logo-3d__fallback-text\">\n Tampa<span className=\"td-logo-3d__fallback-accent\">.dev</span>\n </span>\n </div>\n <style>{styles}</style>\n </>\n );\n }\n\n return (\n <>\n <div\n className={clsx('td-logo-3d', className)}\n style={{ width, height }}\n onMouseDown={handleMouseDown}\n onMouseMove={handleMouseMove}\n onMouseUp={handleMouseUp}\n onTouchStart={handleTouchStart}\n onTouchMove={handleTouchMove}\n onTouchEnd={handleMouseUp}\n onWheel={handleWheel}\n >\n <div ref={containerRef} className=\"td-logo-3d__canvas\" />\n\n {loading && (\n <div className=\"td-logo-3d__loading\">\n <div className=\"td-logo-3d__spinner\" />\n </div>\n )}\n\n {error && (\n <div className=\"td-logo-3d__error\">\n <p>{error}</p>\n </div>\n )}\n </div>\n <style>{styles}</style>\n </>\n );\n}\n\nconst styles = `\n .td-logo-3d {\n position: relative;\n overflow: hidden;\n border-radius: var(--td-radius-lg, 12px);\n }\n\n .td-logo-3d__canvas {\n width: 100%;\n height: 100%;\n }\n\n .td-logo-3d__canvas canvas {\n display: block;\n width: 100%;\n height: 100%;\n }\n\n .td-logo-3d__loading {\n position: absolute;\n inset: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n background: rgba(28, 36, 56, 0.1);\n }\n\n .td-logo-3d__spinner {\n width: 2rem;\n height: 2rem;\n border: 2px solid var(--td-color-border, rgba(255, 255, 255, 0.1));\n border-top-color: var(--td-color-coral, #E85A4F);\n border-radius: 50%;\n animation: td-logo-3d-spin 1s linear infinite;\n }\n\n @keyframes td-logo-3d-spin {\n to { transform: rotate(360deg); }\n }\n\n .td-logo-3d__error {\n position: absolute;\n inset: 0;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n background: rgba(28, 36, 56, 0.05);\n color: var(--td-color-text-muted, #9CA3AF);\n font-size: 0.875rem;\n text-align: center;\n padding: 1rem;\n }\n\n .td-logo-3d--fallback {\n display: flex;\n align-items: center;\n justify-content: center;\n background: linear-gradient(135deg, var(--td-color-navy, #1C2438) 0%, var(--td-color-navy-dark, #1A2031) 100%);\n color: white;\n }\n\n .td-logo-3d__fallback-text {\n font-size: 2rem;\n font-weight: 700;\n }\n\n .td-logo-3d__fallback-accent {\n color: var(--td-color-coral, #E85A4F);\n }\n`;\n"],"names":["Logo3d","objUrl","mtlUrl","width","height","autoRotate","rotationSpeed","backgroundColor","enableZoom","enablePan","className","containerRef","useRef","loading","setLoading","useState","error","setError","threeAvailable","setThreeAvailable","sceneRef","cameraRef","rendererRef","modelRef","animationIdRef","isDraggingRef","previousMouseRef","threeRef","useEffect","mounted","threeModule","objLoaderModule","mtlLoaderModule","e","THREE","container","ambientLight","directionalLight","directionalLight2","OBJLoader","MTLLoader","materials","mtlLoader","resolve","reject","mtl","objLoader","object","box","center","size","scale","animate","handleMouseDown","useCallback","handleTouchStart","handleMouseMove","deltaX","deltaY","handleTouchMove","handleMouseUp","handleWheel","handleGlobalMouseUp","jsxs","Fragment","jsx","clsx","styles"],"mappings":";;;AAuCO,SAASA,GAAO;AAAA,EACrB,QAAAC,IAAS;AAAA,EACT,QAAAC,IAAS;AAAA,EACT,OAAAC,IAAQ;AAAA,EACR,QAAAC,IAAS;AAAA,EACT,YAAAC,IAAa;AAAA,EACb,eAAAC,IAAgB;AAAA,EAChB,iBAAAC,IAAkB;AAAA,EAClB,YAAAC,IAAa;AAAA,EACb,WAAAC,IAAY;AAAA,EACZ,WAAAC;AACF,GAAgB;AACd,QAAMC,IAAeC,EAAuB,IAAI,GAC1C,CAACC,GAASC,CAAU,IAAIC,EAAS,EAAI,GACrC,CAACC,GAAOC,CAAQ,IAAIF,EAAwB,IAAI,GACh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AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
|
package/dist/index28.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
function a(r) {
|
|
2
|
+
var n, f, t = "";
|
|
3
|
+
if (typeof r == "string" || typeof r == "number") t += r;
|
|
4
|
+
else if (typeof r == "object") if (Array.isArray(r)) {
|
|
5
|
+
var o = r.length;
|
|
6
|
+
for (n = 0; n < o; n++) r[n] && (f = a(r[n])) && (t && (t += " "), t += f);
|
|
7
|
+
} else for (f in r) r[f] && (t && (t += " "), t += f);
|
|
8
|
+
return t;
|
|
9
|
+
}
|
|
10
|
+
function i() {
|
|
11
|
+
for (var r, n, f = 0, t = "", o = arguments.length; f < o; f++) (r = arguments[f]) && (n = a(r)) && (t && (t += " "), t += n);
|
|
12
|
+
return t;
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
i as clsx,
|
|
16
|
+
i as default
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=index28.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index28.js","sources":["../../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs"],"sourcesContent":["function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;"],"names":["r","e","t","n","clsx"],"mappings":"AAAA,SAASA,EAAEC,GAAE;AAAC,MAAIC,GAAE,GAAEC,IAAE;AAAG,MAAa,OAAOF,KAAjB,YAA8B,OAAOA,KAAjB,SAAmB,CAAAE,KAAGF;AAAA,WAAoB,OAAOA,KAAjB,SAAmB,KAAG,MAAM,QAAQA,CAAC,GAAE;AAAC,QAAI,IAAEA,EAAE;AAAO,SAAIC,IAAE,GAAEA,IAAE,GAAEA,IAAI,CAAAD,EAAEC,CAAC,MAAI,IAAEF,EAAEC,EAAEC,CAAC,CAAC,OAAKC,MAAIA,KAAG,MAAKA,KAAG;AAAA,EAAE,MAAM,MAAI,KAAKF,EAAE,CAAAA,EAAE,CAAC,MAAIE,MAAIA,KAAG,MAAKA,KAAG;AAAG,SAAOA;AAAC;AAAQ,SAASC,IAAM;AAAC,WAAQH,GAAEC,GAAE,IAAE,GAAEC,IAAE,IAAG,IAAE,UAAU,QAAO,IAAE,GAAE,IAAI,EAACF,IAAE,UAAU,CAAC,OAAKC,IAAEF,EAAEC,CAAC,OAAKE,MAAIA,KAAG,MAAKA,KAAGD;AAAG,SAAOC;AAAC;","x_google_ignoreList":[0]}
|