@luxfi/ui 5.5.3 → 5.6.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/accordion.cjs +213 -0
- package/dist/accordion.js +186 -0
- package/dist/alert.cjs +553 -0
- package/dist/alert.js +531 -0
- package/dist/avatar.cjs +149 -0
- package/dist/avatar.js +125 -0
- package/dist/badge.cjs +611 -0
- package/dist/badge.js +589 -0
- package/dist/button.cjs +689 -0
- package/dist/button.js +664 -0
- package/dist/checkbox.cjs +265 -0
- package/dist/checkbox.js +241 -0
- package/dist/close-button.cjs +73 -0
- package/dist/close-button.js +51 -0
- package/dist/collapsible.cjs +702 -0
- package/dist/collapsible.js +679 -0
- package/dist/color-mode.cjs +96 -0
- package/dist/color-mode.js +72 -0
- package/dist/dialog.cjs +279 -0
- package/dist/dialog.js +246 -0
- package/dist/drawer.cjs +207 -0
- package/dist/drawer.js +175 -0
- package/dist/empty-state.cjs +93 -0
- package/dist/empty-state.js +71 -0
- package/dist/field.cjs +183 -0
- package/dist/field.js +160 -0
- package/dist/heading.cjs +46 -0
- package/dist/heading.js +40 -0
- package/dist/icon-button.cjs +491 -0
- package/dist/icon-button.js +470 -0
- package/dist/image.cjs +572 -0
- package/dist/image.js +551 -0
- package/dist/index.cjs +5779 -0
- package/dist/index.js +5619 -0
- package/dist/input-group.cjs +155 -0
- package/dist/input-group.js +133 -0
- package/dist/input.cjs +65 -0
- package/dist/input.js +59 -0
- package/dist/link.cjs +630 -0
- package/dist/link.js +606 -0
- package/dist/menu.cjs +305 -0
- package/dist/menu.js +269 -0
- package/dist/pin-input.cjs +182 -0
- package/dist/pin-input.js +160 -0
- package/dist/popover.cjs +327 -0
- package/dist/popover.js +294 -0
- package/dist/progress-circle.cjs +152 -0
- package/dist/progress-circle.js +128 -0
- package/dist/progress.cjs +117 -0
- package/dist/progress.js +94 -0
- package/dist/provider.cjs +62 -0
- package/dist/provider.js +40 -0
- package/dist/radio.cjs +177 -0
- package/dist/radio.js +153 -0
- package/dist/rating.cjs +80 -0
- package/dist/rating.js +58 -0
- package/dist/select.cjs +791 -0
- package/dist/select.js +757 -0
- package/dist/separator.cjs +57 -0
- package/dist/separator.js +51 -0
- package/dist/skeleton.cjs +370 -0
- package/dist/skeleton.js +346 -0
- package/dist/slider.cjs +138 -0
- package/dist/slider.js +115 -0
- package/dist/switch.cjs +163 -0
- package/dist/switch.js +140 -0
- package/dist/table.cjs +1044 -0
- package/dist/table.js +1013 -0
- package/dist/tabs.cjs +240 -0
- package/dist/tabs.js +213 -0
- package/dist/tag.cjs +651 -0
- package/dist/tag.js +628 -0
- package/dist/textarea.cjs +65 -0
- package/dist/textarea.js +59 -0
- package/dist/toaster.cjs +99 -0
- package/dist/toaster.js +96 -0
- package/dist/tooltip.cjs +171 -0
- package/dist/tooltip.js +148 -0
- package/dist/utils.cjs +11 -0
- package/dist/utils.js +9 -0
- package/package.json +270 -65
- package/src/accordion.tsx +285 -0
- package/src/alert.tsx +221 -0
- package/src/avatar.tsx +174 -0
- package/src/badge.tsx +158 -0
- package/src/button.tsx +411 -0
- package/src/checkbox.tsx +307 -0
- package/src/close-button.tsx +51 -0
- package/src/collapsible.tsx +126 -0
- package/src/color-mode.tsx +125 -0
- package/src/dialog.tsx +356 -0
- package/src/drawer.tsx +186 -0
- package/src/empty-state.tsx +97 -0
- package/src/field.tsx +202 -0
- package/src/heading.tsx +55 -0
- package/src/icon-button.tsx +192 -0
- package/src/image.tsx +280 -0
- package/src/index.ts +192 -0
- package/src/input-group.tsx +159 -0
- package/src/input.tsx +60 -0
- package/src/link.tsx +326 -0
- package/src/menu.tsx +471 -0
- package/src/pin-input.tsx +187 -0
- package/src/popover.tsx +400 -0
- package/src/progress-circle.tsx +180 -0
- package/src/progress.tsx +109 -0
- package/src/provider.tsx +12 -0
- package/src/radio.tsx +175 -0
- package/src/rating.tsx +79 -0
- package/src/select.tsx +696 -0
- package/src/separator.tsx +59 -0
- package/src/skeleton.tsx +302 -0
- package/src/slider.tsx +152 -0
- package/src/switch.tsx +158 -0
- package/src/table.tsx +621 -0
- package/src/tabs.tsx +354 -0
- package/src/tag.tsx +159 -0
- package/src/textarea.tsx +60 -0
- package/src/toaster.tsx +117 -0
- package/src/tokens.css +438 -0
- package/src/tooltip.tsx +184 -0
- package/src/utils/cn.ts +7 -0
- package/src/utils.ts +6 -0
- package/tokens.css +438 -0
- package/commerce/ui/conf.ts +0 -13
- package/commerce/ui/context.tsx +0 -123
- package/commerce/ui/store.ts +0 -295
- package/components/access-code-input.tsx +0 -71
- package/components/analytics.tsx +0 -23
- package/components/auth/auth-listener.tsx +0 -29
- package/components/auth/auth-token/clear-auth-token.tsx +0 -12
- package/components/auth/auth-token/set-auth-token.tsx +0 -16
- package/components/auth/common-auth-domains.ts +0 -17
- package/components/auth/login-panel.tsx +0 -111
- package/components/auth/mobile-login-button.tsx +0 -107
- package/components/auth/signup-panel.tsx +0 -113
- package/components/back-button.tsx +0 -49
- package/components/chat-widget.tsx +0 -85
- package/components/commerce/bag-button.tsx +0 -98
- package/components/commerce/buy-button.tsx +0 -34
- package/components/commerce/checkout-button.tsx +0 -129
- package/components/commerce/checkout-panel/cart-accordian.tsx +0 -66
- package/components/commerce/checkout-panel/checkout-panel-props.ts +0 -10
- package/components/commerce/checkout-panel/desktop-bag-carousel.tsx +0 -36
- package/components/commerce/checkout-panel/desktop-cp.tsx +0 -83
- package/components/commerce/checkout-panel/index.tsx +0 -126
- package/components/commerce/checkout-panel/mobile-cp.tsx +0 -67
- package/components/commerce/checkout-panel/policy-links.tsx +0 -29
- package/components/commerce/checkout-panel/steps-indicator.tsx +0 -39
- package/components/commerce/checkout-panel/thank-you.tsx +0 -18
- package/components/commerce/desktop-bag-popup.tsx +0 -78
- package/components/commerce/drawer/index.tsx +0 -88
- package/components/commerce/drawer/micro.tsx +0 -145
- package/components/commerce/drawer/shell.tsx +0 -85
- package/components/contact-dialog/contact-form.tsx +0 -116
- package/components/contact-dialog/disclaimer.tsx +0 -13
- package/components/contact-dialog/index.tsx +0 -64
- package/components/copyright.tsx +0 -21
- package/components/drawer-margin.tsx +0 -28
- package/components/footer.tsx +0 -78
- package/components/header/desktop-nav-menu.tsx +0 -204
- package/components/header/desktop.tsx +0 -65
- package/components/header/index.tsx +0 -50
- package/components/header/mobile-bag-drawer.tsx +0 -51
- package/components/header/mobile-menu-toggle-button.tsx +0 -35
- package/components/header/mobile-nav-menu-ai.tsx +0 -51
- package/components/header/mobile-nav-menu-item.tsx +0 -47
- package/components/header/mobile-nav-menu.tsx +0 -102
- package/components/header/mobile.tsx +0 -170
- package/components/header/theme-toggle.tsx +0 -26
- package/components/icons/avatar.tsx +0 -11
- package/components/icons/bag-icon.tsx +0 -10
- package/components/icons/index.ts +0 -6
- package/components/icons/left-arrow.tsx +0 -11
- package/components/icons/lux-logo.tsx +0 -10
- package/components/icons/right-arrow.tsx +0 -10
- package/components/icons/social-icon.tsx +0 -35
- package/components/icons/social-svg.css +0 -3
- package/components/index.ts +0 -26
- package/components/logo.tsx +0 -92
- package/components/main.tsx +0 -27
- package/components/mini-chart/index.tsx +0 -8
- package/components/mini-chart/mini-chart-props.ts +0 -44
- package/components/mini-chart/mini-chart.tsx +0 -85
- package/components/mini-chart/wrapper.tsx +0 -23
- package/components/not-found/index.tsx +0 -28
- package/components/not-found/not-found-content.mdx +0 -5
- package/components/tooltip.tsx +0 -31
- package/environment.d.ts +0 -6
- package/next/analytics/fpixel.ts +0 -16
- package/next/analytics/google-analytics.ts +0 -14
- package/next/analytics/index.ts +0 -3
- package/next/analytics/pixel-analytics.tsx +0 -55
- package/next/font/get-app-router-font-classes.ts +0 -17
- package/next/font/load-and-return-lux-next-fonts-on-import.ts +0 -68
- package/next/font/local/Druk-Wide-Bold.ttf +0 -0
- package/next/font/local/Druk-Wide-Medium.ttf +0 -0
- package/next/font/local/InterVariable-Italic.ttf +0 -0
- package/next/font/local/InterVariable-Italic.woff2 +0 -0
- package/next/font/local/InterVariable.ttf +0 -0
- package/next/font/local/InterVariable.woff2 +0 -0
- package/next/font/next-font-desc.ts +0 -28
- package/next/font/pages-router-font-vars.tsx +0 -18
- package/next/head-metadata/from-next/metadata-types.ts +0 -158
- package/next/head-metadata/from-next/opengraph-types.ts +0 -267
- package/next/head-metadata/from-next/twitter-types.ts +0 -92
- package/next/head-metadata/index.tsx +0 -208
- package/next/index.ts +0 -2
- package/next/middleware/determine-device-mw.ts +0 -29
- package/root-layout/WHY_THIS_IS_SEPARATE.txt +0 -2
- package/root-layout/index.tsx +0 -112
- package/site-def/footer/community.tsx +0 -61
- package/site-def/footer/company.ts +0 -37
- package/site-def/footer/ecosystem.ts +0 -37
- package/site-def/footer/index.tsx +0 -26
- package/site-def/footer/legal.ts +0 -28
- package/site-def/footer/network.ts +0 -45
- package/site-def/footer/svg/warpcast-logo.svg +0 -12
- package/site-def/index.ts +0 -4
- package/site-def/main-nav.tsx +0 -460
- package/style/cart-animation.css +0 -29
- package/style/checkout-animation.css +0 -23
- package/style/drawer-handle-overrides.css +0 -160
- package/style/fonts/COPY_TO_PUBLIC_FOR_NON_NEXT.txt +0 -0
- package/style/fonts/Druk-Wide-Bold.ttf +0 -0
- package/style/fonts/Druk-Wide-Medium.ttf +0 -0
- package/style/fonts/InterVariable-Italic.ttf +0 -0
- package/style/fonts/InterVariable-Italic.woff2 +0 -0
- package/style/fonts/InterVariable.ttf +0 -0
- package/style/fonts/InterVariable.woff2 +0 -0
- package/style/lux-colors.css +0 -85
- package/style/lux-fonts.css +0 -30
- package/style/lux-global-non-next.css +0 -52
- package/style/lux-global.css +0 -51
- package/tailwind/fontFamily.tailwind.lux.ts +0 -18
- package/tailwind/index.ts +0 -2
- package/tailwind/lux-tw-fonts.ts +0 -40
- package/tailwind/tailwind.config.lux-preset.ts +0 -10
- package/tsconfig.json +0 -15
- package/types/chatbot-config.ts +0 -7
- package/types/chatbot-suggested-question.ts +0 -7
- package/types/contact-info.ts +0 -11
- package/types/index.ts +0 -4
- package/types/site-def.ts +0 -46
|
@@ -1,208 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
|
|
3
|
-
import type { Metadata } from 'next'
|
|
4
|
-
import Head from "next/head"
|
|
5
|
-
|
|
6
|
-
import type {
|
|
7
|
-
IconDescriptor,
|
|
8
|
-
TemplateString,
|
|
9
|
-
Author,
|
|
10
|
-
ThemeColorDescriptor
|
|
11
|
-
} from './from-next/metadata-types'
|
|
12
|
-
|
|
13
|
-
import type { OpenGraph, OGImage } from './from-next/opengraph-types'
|
|
14
|
-
import type { Twitter, TwitterImage } from './from-next/twitter-types'
|
|
15
|
-
|
|
16
|
-
/*
|
|
17
|
-
NOTE: This is ONLY for sites that use the pages router in next.
|
|
18
|
-
The app router does this automatically
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
const getURLasString = (url: string | URL) => {
|
|
22
|
-
return (
|
|
23
|
-
(typeof url === 'string') ? (url as string) : (url.href)
|
|
24
|
-
)
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
// https://stackoverflow.com/questions/68746228/next-head-wont-render-meta-tags-inside-of-fragment
|
|
28
|
-
const Icons: React.FC<{icons: IconDescriptor[]}> = ({
|
|
29
|
-
icons
|
|
30
|
-
}) => {
|
|
31
|
-
return <Head>
|
|
32
|
-
{icons.map(({url, ...rest}: IconDescriptor, index) => (
|
|
33
|
-
<link {...rest} href={getURLasString(url)} key={`icons-${index}`}/>
|
|
34
|
-
))}
|
|
35
|
-
</Head>
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export const getTitleFromTemplateString = (title: string | TemplateString | null | undefined): string | null => {
|
|
39
|
-
|
|
40
|
-
if (!title) {
|
|
41
|
-
return null
|
|
42
|
-
}
|
|
43
|
-
if (typeof title === 'object') {
|
|
44
|
-
if ('default' in title) {
|
|
45
|
-
return title.default
|
|
46
|
-
}
|
|
47
|
-
else if ('absolute' in title) {
|
|
48
|
-
return title.absolute
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
return title as string
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
const Authors: React.FC<{
|
|
55
|
-
authors: null | undefined | Author | Array<Author>
|
|
56
|
-
}> = ({
|
|
57
|
-
authors
|
|
58
|
-
}) => {
|
|
59
|
-
|
|
60
|
-
const Author: React.FC<{author: Author}> = ({author}) => (<>
|
|
61
|
-
{author.name && <meta name="author" content={author.name} />}
|
|
62
|
-
{author.url && <link rel="author" href={getURLasString(author.url)}/>}
|
|
63
|
-
</>)
|
|
64
|
-
|
|
65
|
-
if (!authors) {
|
|
66
|
-
return null
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
if (Array.isArray(authors)) {
|
|
70
|
-
return (<>
|
|
71
|
-
{authors.map((el: Author, index) => (
|
|
72
|
-
<Author author={el} key={`authors-${index}`} />
|
|
73
|
-
))}
|
|
74
|
-
</>)
|
|
75
|
-
}
|
|
76
|
-
return (<Author author={authors as Author} />)
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
const Keywords: React.FC<{keywords: undefined | null | string | Array<string>}> = ({
|
|
80
|
-
keywords
|
|
81
|
-
}) => {
|
|
82
|
-
if (!keywords) return null
|
|
83
|
-
const content = (Array.isArray(keywords) ? keywords.join(', ') : keywords as string)
|
|
84
|
-
return (<meta name="keywords" content={content} />)
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
const ThemeColor: React.FC<{
|
|
88
|
-
thColors: null | undefined | string | ThemeColorDescriptor | ThemeColorDescriptor[]
|
|
89
|
-
}> = ({
|
|
90
|
-
thColors
|
|
91
|
-
}) => {
|
|
92
|
-
|
|
93
|
-
const ThColor: React.FC<{thColor: ThemeColorDescriptor}> = ({thColor}) => {
|
|
94
|
-
const toSpread: any = {
|
|
95
|
-
content: thColor.color
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
if ('media' in thColor) {
|
|
99
|
-
toSpread.media = thColor.media
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
return <meta name="theme-color" {...toSpread}/>
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
if (!thColors) {
|
|
106
|
-
return null
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
if (Array.isArray(thColors)) {
|
|
110
|
-
return (<>
|
|
111
|
-
{thColors.map((el: ThemeColorDescriptor, index) => (
|
|
112
|
-
<ThColor thColor={el} key={`theme-colors-${index}`} />
|
|
113
|
-
))}
|
|
114
|
-
</>)
|
|
115
|
-
}
|
|
116
|
-
else if (typeof thColors === 'string') {
|
|
117
|
-
<meta name="theme-color" content={thColors as string}/>
|
|
118
|
-
}
|
|
119
|
-
return (<ThColor thColor={thColors as ThemeColorDescriptor} />)
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
const Manifest: React.FC<{
|
|
123
|
-
manifest: undefined | null | string | URL
|
|
124
|
-
}> = ({
|
|
125
|
-
manifest
|
|
126
|
-
}) => (
|
|
127
|
-
manifest && (<link rel="manifest" href={getURLasString(manifest)}/>)
|
|
128
|
-
)
|
|
129
|
-
|
|
130
|
-
const getOGImageURL = (img: OGImage | undefined): string | null => {
|
|
131
|
-
|
|
132
|
-
if (!img) {
|
|
133
|
-
return null
|
|
134
|
-
}
|
|
135
|
-
if (typeof img === 'object' && 'url' in img) { // this is a OGImageDescriptor
|
|
136
|
-
return getURLasString(img.url)
|
|
137
|
-
}
|
|
138
|
-
return getURLasString(img) // this is a URL or string
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
const getTwitterImageURL = (img: TwitterImage | undefined): string | null => {
|
|
142
|
-
|
|
143
|
-
if (!img) {
|
|
144
|
-
return null
|
|
145
|
-
}
|
|
146
|
-
if (typeof img === 'object' && 'url' in img) { // this is a TwitterImageDescriptor
|
|
147
|
-
return getURLasString(img.url)
|
|
148
|
-
}
|
|
149
|
-
return getURLasString(img) // this is a URL or string
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
// https://stackoverflow.com/questions/68746228/next-head-wont-render-meta-tags-inside-of-fragment
|
|
153
|
-
const OpenGraphComponent: React.FC<{
|
|
154
|
-
og: OpenGraph | undefined | null
|
|
155
|
-
}> = ({
|
|
156
|
-
og
|
|
157
|
-
}) => (og && (<Head>
|
|
158
|
-
{og.url && (<meta property="og:url" content={(typeof og.url === 'string') ? (og.url as string) : (og.url.href)} />)}
|
|
159
|
-
{(og as any).type && (<meta property="og:type" content={(og as any).type} />)}
|
|
160
|
-
{og.title && (<meta property="og:title" content={getTitleFromTemplateString(og.title)!} />)}
|
|
161
|
-
{og.description && (<meta property="og:description" content={og.description} />)}
|
|
162
|
-
{og.images && (<meta property="og:image" content={getOGImageURL(Array.isArray(og.images) ? og.images[0] : og.images)!} />)}
|
|
163
|
-
</Head>))
|
|
164
|
-
|
|
165
|
-
// https://stackoverflow.com/questions/68746228/next-head-wont-render-meta-tags-inside-of-fragment
|
|
166
|
-
export const TwitterComponent: React.FC<{
|
|
167
|
-
tw: Twitter | undefined | null
|
|
168
|
-
}> = ({
|
|
169
|
-
tw
|
|
170
|
-
}) => (tw && (<Head>
|
|
171
|
-
{(tw as any).card && (<meta name="twitter:card" content={(tw as any).card} />)}
|
|
172
|
-
{tw.title && (<meta name="twitter:title" content={getTitleFromTemplateString(tw.title)!} />)}
|
|
173
|
-
{tw.description && (<meta name="twitter:description" content={tw.description} />)}
|
|
174
|
-
{tw.images && (<meta name="twitter:image" content={getTwitterImageURL(Array.isArray(tw.images) ? tw.images[0] : tw.images)!} />)}
|
|
175
|
-
{tw.site && (<meta name="twitter:site" content={tw.site} />)}
|
|
176
|
-
</Head>))
|
|
177
|
-
|
|
178
|
-
/* See NOTE at top of file! */
|
|
179
|
-
// https://stackoverflow.com/questions/68746228/next-head-wont-render-meta-tags-inside-of-fragment
|
|
180
|
-
const HeadMetadataComponent: React.FC<{
|
|
181
|
-
metadata: Metadata
|
|
182
|
-
}> = ({
|
|
183
|
-
metadata
|
|
184
|
-
}) => {
|
|
185
|
-
const mainTitle = getTitleFromTemplateString(metadata.title)
|
|
186
|
-
|
|
187
|
-
return (<>
|
|
188
|
-
<Head>
|
|
189
|
-
{mainTitle && (<title>{mainTitle}</title>) /* must be here, directly under Head component */}
|
|
190
|
-
{metadata.description && (
|
|
191
|
-
<meta name="description" content={metadata.description} />
|
|
192
|
-
)}
|
|
193
|
-
{metadata.applicationName && (
|
|
194
|
-
<meta name="application-name" content={metadata.applicationName} />
|
|
195
|
-
)}
|
|
196
|
-
<Authors authors={metadata.authors} />
|
|
197
|
-
<Keywords keywords={metadata.keywords} />
|
|
198
|
-
<ThemeColor thColors={metadata.themeColor} />
|
|
199
|
-
<Manifest manifest={metadata.manifest} />
|
|
200
|
-
</Head>
|
|
201
|
-
{/* Icons: We only support this format for now */}
|
|
202
|
-
<Icons icons={metadata.icons as IconDescriptor[]} />
|
|
203
|
-
<OpenGraphComponent og={metadata.openGraph} />
|
|
204
|
-
<TwitterComponent tw={metadata.twitter} />
|
|
205
|
-
</>)
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
export default HeadMetadataComponent
|
package/next/index.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { NextRequest, NextResponse, userAgent } from 'next/server'
|
|
2
|
-
import { getSelectorsByUserAgent } from 'react-device-detect'
|
|
3
|
-
import { setCookie } from 'cookies-next'
|
|
4
|
-
|
|
5
|
-
// writed this way so they can be chained :)
|
|
6
|
-
const determineDeviceMW = async (request: NextRequest) => {
|
|
7
|
-
|
|
8
|
-
const ua = userAgent(request)
|
|
9
|
-
const { isMobileOnly, isTablet, isDesktop } = getSelectorsByUserAgent(ua.ua)
|
|
10
|
-
const agent = isMobileOnly ? 'phone' : (isTablet ? 'tablet' : (isDesktop ? 'desktop' : 'unknown'))
|
|
11
|
-
const { nextUrl: url } = request
|
|
12
|
-
//console.log(`\n=== from ${url.href} on a *${agent && agent.toUpperCase()}* device. ===\n`)
|
|
13
|
-
const auth_token = url.searchParams.get('auth-token')
|
|
14
|
-
if (auth_token) {
|
|
15
|
-
setCookie('auth-token', auth_token, {
|
|
16
|
-
domain: url.hostname,
|
|
17
|
-
path: '/',
|
|
18
|
-
sameSite: 'none',
|
|
19
|
-
secure: true,
|
|
20
|
-
httpOnly: false,
|
|
21
|
-
expires: new Date(Date.now() + 1000 * 60 * 60 * 24 * 30), // 30 days
|
|
22
|
-
})
|
|
23
|
-
url.searchParams.delete('auth-token')
|
|
24
|
-
}
|
|
25
|
-
url.searchParams.set('agent', agent)
|
|
26
|
-
return NextResponse.rewrite(url)
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export default determineDeviceMW
|
package/root-layout/index.tsx
DELETED
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import React, { type PropsWithChildren } from 'react'
|
|
2
|
-
import type { Viewport } from 'next'
|
|
3
|
-
|
|
4
|
-
import { Toaster } from '@hanzo/ui/primitives'
|
|
5
|
-
import { AuthServiceProvider } from '@hanzo/auth/service'
|
|
6
|
-
import type { AuthServiceConf } from '@hanzo/auth/types'
|
|
7
|
-
import { CommerceProvider } from '@hanzo/commerce'
|
|
8
|
-
|
|
9
|
-
import getAppRouterBodyFontClasses from '../next/font/get-app-router-font-classes'
|
|
10
|
-
import { FacebookPixelHead } from '../next/analytics/pixel-analytics'
|
|
11
|
-
|
|
12
|
-
import { CommerceUIProvider } from '../commerce/ui/context'
|
|
13
|
-
import { AuthListener, ChatWidget, Header, Analytics } from '../components'
|
|
14
|
-
|
|
15
|
-
import CommerceDrawer from '../components/commerce/drawer'
|
|
16
|
-
|
|
17
|
-
import type SiteDef from '../types/site-def'
|
|
18
|
-
|
|
19
|
-
import '../style/lux-global.css'
|
|
20
|
-
import '../style/cart-animation.css'
|
|
21
|
-
import '../style/checkout-animation.css'
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
// Next 14: https://nextjs.org/docs/app/building-your-application/upgrading/codemods#use-viewport-export
|
|
25
|
-
const viewport = {
|
|
26
|
-
themeColor: [
|
|
27
|
-
{ media: '(prefers-color-scheme: light)', color: 'white' },
|
|
28
|
-
{ media: '(prefers-color-scheme: dark)', color: 'black' },
|
|
29
|
-
],
|
|
30
|
-
} satisfies Viewport
|
|
31
|
-
|
|
32
|
-
/*
|
|
33
|
-
These '.variable' fields are actually autogenerate css classnames that *define* the actual
|
|
34
|
-
css variables ('--<ugly-name>') that one asks for in the tailwind classes.
|
|
35
|
-
They are what make them available in the global scope. So this MUST
|
|
36
|
-
be done like this for the tailwind font classes to work.
|
|
37
|
-
|
|
38
|
-
(...not to be confused with the css var itself. This field should be named something else!)
|
|
39
|
-
*/
|
|
40
|
-
|
|
41
|
-
/*
|
|
42
|
-
re body: overflow-y-hidden overflow-x-hidden, h-full
|
|
43
|
-
We cannot have these on body tag for scroll-snap to work on iOS!
|
|
44
|
-
*/
|
|
45
|
-
const bodyClasses =
|
|
46
|
-
'bg-background text-foreground flex flex-col min-h-full ' +
|
|
47
|
-
getAppRouterBodyFontClasses()
|
|
48
|
-
|
|
49
|
-
function RootLayout({
|
|
50
|
-
showHeader = false,
|
|
51
|
-
chatbot = false,
|
|
52
|
-
siteDef,
|
|
53
|
-
children,
|
|
54
|
-
} : {
|
|
55
|
-
siteDef: SiteDef
|
|
56
|
-
showHeader?: boolean
|
|
57
|
-
chatbot?: boolean
|
|
58
|
-
} & PropsWithChildren) {
|
|
59
|
-
|
|
60
|
-
// For static export, we don't have server-side auth
|
|
61
|
-
// User auth will be handled client-side via AuthListener
|
|
62
|
-
const currentUser = null
|
|
63
|
-
|
|
64
|
-
const Guts: React.FC = () => (<>
|
|
65
|
-
{showHeader && <Header siteDef={siteDef}/>}
|
|
66
|
-
{children}
|
|
67
|
-
{chatbot && (<ChatWidget
|
|
68
|
-
title='LUX'
|
|
69
|
-
subtitle='AI'
|
|
70
|
-
chatbotUrl='https://lux.chat/iframe'
|
|
71
|
-
suggestedQuestions={siteDef.chatbot?.suggestedQuestions ?? []}
|
|
72
|
-
buttonClx='hidden md:block'
|
|
73
|
-
/>)}
|
|
74
|
-
</>)
|
|
75
|
-
|
|
76
|
-
return (
|
|
77
|
-
<html lang='en' suppressHydrationWarning className='hanzo-ui-dark-theme' style={{backgroundColor: '#000'}}>
|
|
78
|
-
<head >
|
|
79
|
-
{/* https://stackoverflow.com/a/75716588/11645689 */ }
|
|
80
|
-
<base target='_blank' />
|
|
81
|
-
<FacebookPixelHead/>
|
|
82
|
-
</head>
|
|
83
|
-
|
|
84
|
-
<body suppressHydrationWarning className={bodyClasses} style={{
|
|
85
|
-
|
|
86
|
-
// As noted above: 'overflow: hidden' on the <body> tag breaks scroll snap!
|
|
87
|
-
display: 'none', // see analytics.tsx
|
|
88
|
-
}}>
|
|
89
|
-
<Analytics/>
|
|
90
|
-
<AuthServiceProvider user={currentUser} conf={{} as AuthServiceConf}>
|
|
91
|
-
{siteDef?.commerce ? (
|
|
92
|
-
<CommerceProvider config={siteDef.commerce!} >
|
|
93
|
-
<CommerceUIProvider >
|
|
94
|
-
<Guts />
|
|
95
|
-
<CommerceDrawer />
|
|
96
|
-
</CommerceUIProvider>
|
|
97
|
-
</CommerceProvider>
|
|
98
|
-
) : (
|
|
99
|
-
<Guts />
|
|
100
|
-
)}
|
|
101
|
-
<AuthListener/>
|
|
102
|
-
</AuthServiceProvider>
|
|
103
|
-
<Toaster position='top-center' duration={3000}/>
|
|
104
|
-
</body>
|
|
105
|
-
</html>
|
|
106
|
-
)
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
export {
|
|
110
|
-
RootLayout,
|
|
111
|
-
viewport
|
|
112
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import type { LinkDef } from '@hanzo/ui/types'
|
|
2
|
-
|
|
3
|
-
import { SocialIcon } from '../../components/icons'
|
|
4
|
-
|
|
5
|
-
// @ts-ignore (will build in project that has @svgr support)
|
|
6
|
-
import SVG_warp_logo from './svg/warpcast-logo.svg'
|
|
7
|
-
|
|
8
|
-
const SOC_ICON_SIZE = 18
|
|
9
|
-
|
|
10
|
-
export default [
|
|
11
|
-
{
|
|
12
|
-
title: 'Community',
|
|
13
|
-
href: '',
|
|
14
|
-
variant: 'linkFG',
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
title: 'Lux Channel',
|
|
18
|
-
href: 'https://warpcast.com/~/channel/lux',
|
|
19
|
-
icon: <SVG_warp_logo width={SOC_ICON_SIZE} height={SOC_ICON_SIZE} /> //<SocialIcon network='warpcast' size={SOC_ICON_SIZE} />
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
title: 'Lux Discussions',
|
|
23
|
-
href: 'https://github.com/orgs/luxfi/discussions',
|
|
24
|
-
icon: <SocialIcon network='github' size={SOC_ICON_SIZE} />
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
title: 'Discord',
|
|
28
|
-
href: 'https://discord.gg/sxaS7FFHwh',
|
|
29
|
-
icon: <SocialIcon network='discord' size={SOC_ICON_SIZE} />
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
title: 'Telegram',
|
|
33
|
-
href: 'https://t.me/luxdefi',
|
|
34
|
-
icon: <SocialIcon network='telegram' size={SOC_ICON_SIZE} />
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
title: '@luxdefi',
|
|
38
|
-
href: 'https://twitter.com/luxdefi',
|
|
39
|
-
icon: <SocialIcon network='x' size={SOC_ICON_SIZE} />
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
title: '@luxdefi',
|
|
43
|
-
href: 'https://facebook.com/luxdefi',
|
|
44
|
-
icon: <SocialIcon network='facebook' size={SOC_ICON_SIZE + 2} />
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
title: '@luxdefi',
|
|
48
|
-
href: 'https://www.instagram.com/luxdefi',
|
|
49
|
-
icon: <SocialIcon network='instagram' size={SOC_ICON_SIZE + 2} />
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
title: '@luxdefi',
|
|
53
|
-
href: 'https://linkedin.com/company/luxdefi',
|
|
54
|
-
icon: <SocialIcon network='linkedin' size={SOC_ICON_SIZE + 2} />
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
title: '@luxdefi',
|
|
58
|
-
href: 'https://www.youtube.com/@luxdefi',
|
|
59
|
-
icon: <SocialIcon network='youtube' size={SOC_ICON_SIZE + 2} />
|
|
60
|
-
},
|
|
61
|
-
] satisfies LinkDef[]
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import type { LinkDef } from '@hanzo/ui/types'
|
|
2
|
-
|
|
3
|
-
export default [
|
|
4
|
-
{
|
|
5
|
-
title: 'Company',
|
|
6
|
-
href: "https://lux.partners/",
|
|
7
|
-
variant: 'linkFG',
|
|
8
|
-
newTab: false,
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
title: 'About',
|
|
12
|
-
href: 'https://lux.partners',
|
|
13
|
-
newTab: false,
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
title: 'Brand',
|
|
17
|
-
href: 'https://drive.google.com/drive/folders/14OJtKLVakGY6883XO9yGbiHtlFxQUUm5?usp=share_link',
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
title: 'Careers',
|
|
21
|
-
href: 'https://docs.google.com/document/d/1SCt0Hg7EIs06TootKCA1am1xo4mcXoKF/edit#heading=h.30j0zll',
|
|
22
|
-
newTab: true,
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
title: 'Partnerships',
|
|
26
|
-
href: 'https://apply.lux.partners/',
|
|
27
|
-
newTab: false,
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
title: 'Press',
|
|
31
|
-
href: 'mailto:ai@lux.partners?subject=%E2%96%BC%20Press',
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
title: 'Help',
|
|
35
|
-
href: 'mailto:ai@lux.partners?subject=%E2%96%BC%20Help',
|
|
36
|
-
},
|
|
37
|
-
] satisfies LinkDef[]
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import type { LinkDef } from '@hanzo/ui/types'
|
|
2
|
-
|
|
3
|
-
export default [
|
|
4
|
-
{
|
|
5
|
-
title: 'Ecosystem',
|
|
6
|
-
href: 'https://lux.link',
|
|
7
|
-
variant: 'linkFG'
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
title: 'Lux AI',
|
|
11
|
-
href: 'https://lux.chat',
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
title: 'Lux Credit',
|
|
15
|
-
href: 'https://lux.credit',
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
title: 'Lux Exchange',
|
|
19
|
-
href: 'https://lux.exchange',
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
title: 'Lux Finance',
|
|
23
|
-
href: 'https://lux.finance',
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
title: 'Lux Market',
|
|
27
|
-
href: 'https://lux.market',
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
title: 'Lux Shop',
|
|
31
|
-
href: 'https://lux.shop',
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
title: 'Lux Quest',
|
|
35
|
-
href: 'https://lux.quest',
|
|
36
|
-
},
|
|
37
|
-
] satisfies LinkDef[]
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { LinkDef } from '@hanzo/ui/types'
|
|
2
|
-
|
|
3
|
-
import ecosystem from './ecosystem'
|
|
4
|
-
import network from './network'
|
|
5
|
-
import company from './company'
|
|
6
|
-
import community from './community'
|
|
7
|
-
import { legal, legalColumn } from './legal'
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const standard = [
|
|
11
|
-
ecosystem,
|
|
12
|
-
network,
|
|
13
|
-
company,
|
|
14
|
-
community,
|
|
15
|
-
] satisfies LinkDef[][]
|
|
16
|
-
|
|
17
|
-
export {
|
|
18
|
-
ecosystem,
|
|
19
|
-
network,
|
|
20
|
-
company,
|
|
21
|
-
community,
|
|
22
|
-
legal,
|
|
23
|
-
legalColumn,
|
|
24
|
-
standard
|
|
25
|
-
}
|
|
26
|
-
|
package/site-def/footer/legal.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { LinkDef } from '@hanzo/ui/types'
|
|
2
|
-
|
|
3
|
-
const legal: LinkDef[] = [
|
|
4
|
-
{
|
|
5
|
-
title: 'Terms and Conditions',
|
|
6
|
-
href: 'https://docs.google.com/document/d/1mvkjr1w8Rv8ttirs1mu-_2fw_PXclOyS/preview',
|
|
7
|
-
newTab: true,
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
title: 'Privacy Policy',
|
|
11
|
-
href: 'https://docs.google.com/document/d/1vZjOKaNdOoThDIaVLERWxflQLtOsuvLn/preview',
|
|
12
|
-
newTab: true,
|
|
13
|
-
},
|
|
14
|
-
]
|
|
15
|
-
|
|
16
|
-
const title: LinkDef =
|
|
17
|
-
{
|
|
18
|
-
title: 'Legal',
|
|
19
|
-
href: '',
|
|
20
|
-
variant: 'linkFG',
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const legalColumn: LinkDef[] = [title, ...legal]
|
|
24
|
-
|
|
25
|
-
export {
|
|
26
|
-
legal,
|
|
27
|
-
legalColumn
|
|
28
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import type { LinkDef } from '@hanzo/ui/types'
|
|
2
|
-
|
|
3
|
-
export default [
|
|
4
|
-
{
|
|
5
|
-
title: 'Network',
|
|
6
|
-
href: "https://lux.network/",
|
|
7
|
-
variant: 'linkFG'
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
title: 'Lux Bridge',
|
|
11
|
-
href: "https://bridge.lux.network/",
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
title: 'Lux Explorer',
|
|
15
|
-
href: "https://explore.lux.network/",
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
title: 'Lux Wallet',
|
|
19
|
-
href: "https://wallet.lux.network/",
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
title: 'Lux Safe',
|
|
23
|
-
href: "https://safe.lux.network/",
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
title: 'Lux Validator',
|
|
27
|
-
href: "https://lux.network/validator",
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
title: 'Lux Coin',
|
|
31
|
-
href: "https://lux.network/coin",
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
title: 'Governance',
|
|
35
|
-
href: "https://lux.vote",
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
title: 'Open Source',
|
|
39
|
-
href: 'https://github.com/luxfi',
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
title: 'Launch Subnet',
|
|
43
|
-
href: 'https://docs.lux.network/build/subnet/hello-subnet',
|
|
44
|
-
},
|
|
45
|
-
] satisfies LinkDef[]
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<svg viewBox="0 0 1260 1260" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<g clip-path="url(#clip0_1_2)">
|
|
3
|
-
<!-- path d="M947.747 1259.61H311.861C139.901 1259.61 0 1119.72 0 947.752V311.871C0 139.907 139.901 0.00541362 311.861 0.00541362H947.747C1119.71 0.00541362 1259.61 139.907 1259.61 311.871V947.752C1259.61 1119.72 1119.71 1259.61 947.747 1259.61Z" fill="#472A91"></path -->
|
|
4
|
-
<path d="M826.513 398.633L764.404 631.889L702.093 398.633H558.697L495.789 633.607L433.087 398.633H269.764L421.528 914.36H562.431L629.807 674.876L697.181 914.36H838.388L989.819 398.633H826.513Z" fill="currentColor">
|
|
5
|
-
</path>
|
|
6
|
-
</g>
|
|
7
|
-
<defs>
|
|
8
|
-
<clipPath id="clip0_1_2">
|
|
9
|
-
<rect width="1259.61" height="1259.61" fill="white"></rect>
|
|
10
|
-
</clipPath>
|
|
11
|
-
</defs>
|
|
12
|
-
</svg>
|
package/site-def/index.ts
DELETED