@luxfi/ui 5.5.5 → 5.5.6
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/commerce/ui/context.tsx +13 -16
- package/components/access-code-input.tsx +3 -4
- package/components/analytics.tsx +8 -17
- package/components/auth/login-panel.tsx +7 -6
- package/components/auth/login.tsx +1 -1
- package/components/auth/widget.tsx +1 -1
- package/components/back-button.tsx +4 -7
- package/components/chat-widget.tsx +5 -6
- package/components/commerce/bag-button.tsx +8 -7
- package/components/commerce/buy-button.tsx +2 -3
- package/components/commerce/checkout-button.tsx +12 -10
- package/components/commerce/checkout-panel/cart-accordian.tsx +3 -4
- package/components/commerce/checkout-panel/desktop-cp.tsx +5 -6
- package/components/commerce/checkout-panel/index.tsx +1 -1
- package/components/commerce/checkout-panel/mobile-cp.tsx +4 -4
- package/components/commerce/checkout-panel/policy-links.tsx +7 -12
- package/components/commerce/checkout-panel/steps-indicator.tsx +1 -1
- package/components/commerce/desktop-bag-popup.tsx +1 -1
- package/components/commerce/drawer/micro.tsx +30 -30
- package/components/commerce/drawer/shell.tsx +3 -5
- package/components/contact-dialog/contact-form.tsx +6 -13
- package/components/contact-dialog/index.tsx +2 -2
- package/components/copyright.tsx +3 -2
- package/components/drawer-margin.tsx +2 -2
- package/components/footer.tsx +6 -7
- package/components/header/desktop-nav-menu.tsx +6 -6
- package/components/header/desktop.tsx +5 -5
- package/components/header/index.tsx +1 -1
- package/components/header/mobile-bag-drawer.tsx +1 -1
- package/components/header/mobile-menu-toggle-button.tsx +5 -6
- package/components/header/mobile-nav-menu-ai.tsx +13 -12
- package/components/header/mobile-nav-menu-item.tsx +12 -11
- package/components/header/mobile-nav-menu.tsx +17 -16
- package/components/header/mobile.tsx +7 -8
- package/components/icons/social-icon.tsx +1 -1
- package/components/logo.tsx +3 -2
- package/components/main.tsx +3 -4
- package/components/mini-chart/mini-chart.tsx +2 -1
- package/next/font/font-desc.ts +18 -0
- package/next/font/fonts.ts +40 -0
- package/next/font/get-app-router-font-classes.ts +14 -12
- package/next/font/load-and-return-lux-next-fonts-on-import.ts +16 -24
- package/next/font/local/Zen-Variable.woff2 +0 -0
- package/next/font/next-font-desc.ts +18 -17
- package/next/head-metadata/index.tsx +7 -6
- package/next/head-metadata/next-metadata.ts +49 -0
- package/package.json +9 -10
- package/root-layout/index.tsx +39 -19
- package/style/fonts/Zen-Variable.woff2 +0 -0
- package/style/lux-colors.css +0 -1
- package/style/lux-fonts.css +5 -11
- package/style/lux-global-non-next.css +9 -9
- package/style/lux-global.css +56 -21
- package/tsconfig.json +8 -0
- package/next/font/local/Druk-Wide-Bold.ttf +0 -0
- package/next/font/local/Druk-Wide-Medium.ttf +0 -0
- 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/style/fonts/Druk-Wide-Bold.ttf +0 -0
- package/style/fonts/Druk-Wide-Medium.ttf +0 -0
- 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/style/lux-global.css
CHANGED
|
@@ -1,21 +1,43 @@
|
|
|
1
|
-
/*
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
/* The Lux surface.
|
|
2
|
+
*
|
|
3
|
+
* No utility engine. @hanzo/ui ships the reset and the token scale (theme.css +
|
|
4
|
+
* styles.css, imported by name in each app's layout), so what is left here is
|
|
5
|
+
* what is actually Lux: the colour set, the display face, the one place Hanzo
|
|
6
|
+
* IAM's unskinned sign-in markup meets this surface, and a few corrections to
|
|
7
|
+
* third-party widgets.
|
|
8
|
+
*
|
|
9
|
+
* The Tailwind layers this used to open with — base, components, utilities —
|
|
10
|
+
* generated every class the chrome was written against. Removing them without
|
|
11
|
+
* the rest of the migration is what leaves a site rendering with browser
|
|
12
|
+
* defaults, so `body` states its own ground here.
|
|
13
|
+
*/
|
|
14
|
+
@import "./lux-colors.css";
|
|
9
15
|
|
|
10
|
-
|
|
11
|
-
|
|
16
|
+
body {
|
|
17
|
+
background: var(--background);
|
|
18
|
+
color: var(--foreground);
|
|
19
|
+
min-height: 100%;
|
|
20
|
+
/* One column, floored at 0 so long content wraps instead of widening the
|
|
21
|
+
page. A row track of 1fr lets a short page still fill the viewport. */
|
|
22
|
+
display: grid;
|
|
23
|
+
grid-template-columns: minmax(0, 1fr);
|
|
24
|
+
grid-template-rows: 1fr;
|
|
25
|
+
font-family: var(--font-inter), ui-sans-serif, system-ui, sans-serif;
|
|
26
|
+
}
|
|
12
27
|
|
|
13
28
|
div.nextjs-toast-errors-parent[data-nextjs-toast="true"] {
|
|
14
29
|
display: none;
|
|
15
30
|
}
|
|
16
31
|
|
|
32
|
+
/* Headings are Zen cut wide: the '.zen-wide' preset from @hanzo/font, fitted
|
|
33
|
+
against Druk Wide Bold. The preset's scaleX(1.56) is left out on purpose --
|
|
34
|
+
a transform does not reflow, and these land on block h1-h4 that would overrun
|
|
35
|
+
their container. Use the class itself where a word has room to be monumental. */
|
|
17
36
|
.font-heading {
|
|
18
|
-
|
|
37
|
+
font-family: var(--font-zen-sans), var(--font-inter), sans-serif;
|
|
38
|
+
text-transform: uppercase;
|
|
39
|
+
font-variation-settings: 'wght' 845;
|
|
40
|
+
letter-spacing: -0.04em;
|
|
19
41
|
}
|
|
20
42
|
|
|
21
43
|
/* Hanzo IAM's sign-in views ship structure, not skin. This is the one place
|
|
@@ -24,11 +46,17 @@ div.nextjs-toast-errors-parent[data-nextjs-toast="true"] {
|
|
|
24
46
|
*/
|
|
25
47
|
.hanzo-iam-card,
|
|
26
48
|
.hanzo-iam-form {
|
|
27
|
-
|
|
49
|
+
display: grid;
|
|
50
|
+
grid-template-columns: minmax(0, 1fr);
|
|
51
|
+
gap: 0.75rem;
|
|
52
|
+
width: 100%;
|
|
28
53
|
}
|
|
29
54
|
|
|
30
55
|
.hanzo-iam-form input {
|
|
31
|
-
|
|
56
|
+
width: 100%;
|
|
57
|
+
border-radius: var(--radius-sm, 0.375rem);
|
|
58
|
+
padding: 0.5rem 0.75rem;
|
|
59
|
+
font-size: var(--text-base);
|
|
32
60
|
background-color: var(--hz-ui-bg-1);
|
|
33
61
|
color: var(--hz-ui-fg-body);
|
|
34
62
|
border: 1px solid var(--hz-ui-bg-2);
|
|
@@ -44,7 +72,12 @@ div.nextjs-toast-errors-parent[data-nextjs-toast="true"] {
|
|
|
44
72
|
}
|
|
45
73
|
|
|
46
74
|
.hanzo-iam-btn {
|
|
47
|
-
|
|
75
|
+
width: 100%;
|
|
76
|
+
border-radius: var(--radius-sm, 0.375rem);
|
|
77
|
+
padding: 0.5rem 0.75rem;
|
|
78
|
+
font-size: var(--text-base);
|
|
79
|
+
font-weight: 600;
|
|
80
|
+
cursor: pointer;
|
|
48
81
|
background-color: var(--hz-ui-bg-inverted);
|
|
49
82
|
color: var(--hz-ui-fg-inverted);
|
|
50
83
|
}
|
|
@@ -54,16 +87,18 @@ div.nextjs-toast-errors-parent[data-nextjs-toast="true"] {
|
|
|
54
87
|
}
|
|
55
88
|
|
|
56
89
|
.hanzo-iam-btn:disabled {
|
|
57
|
-
|
|
90
|
+
opacity: 0.5;
|
|
91
|
+
cursor: default;
|
|
58
92
|
}
|
|
59
93
|
|
|
60
94
|
.hanzo-iam-divider {
|
|
61
|
-
|
|
95
|
+
font-size: var(--text-sm);
|
|
96
|
+
text-transform: uppercase;
|
|
62
97
|
color: var(--hz-ui-fg-3);
|
|
63
98
|
}
|
|
64
99
|
|
|
65
100
|
.hanzo-iam-error {
|
|
66
|
-
|
|
101
|
+
font-size: var(--text-sm);
|
|
67
102
|
color: hsl(0 70% 60%);
|
|
68
103
|
}
|
|
69
104
|
|
|
@@ -79,7 +114,6 @@ div.nextjs-toast-errors-parent[data-nextjs-toast="true"] {
|
|
|
79
114
|
margin-bottom: 0 !important;
|
|
80
115
|
}
|
|
81
116
|
|
|
82
|
-
|
|
83
117
|
.element-container:hover .icon-container-nor {
|
|
84
118
|
display: none;
|
|
85
119
|
}
|
|
@@ -95,6 +129,7 @@ div.nextjs-toast-errors-parent[data-nextjs-toast="true"] {
|
|
|
95
129
|
.element-container:hover .text-container {
|
|
96
130
|
background: transparent;
|
|
97
131
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
132
|
+
|
|
133
|
+
.overflow-scroll::-webkit-scrollbar {
|
|
134
|
+
display: none;
|
|
135
|
+
}
|
package/tsconfig.json
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"extends": "../tsconfig.modules.base.json",
|
|
3
|
+
// An `.mdx` import is a React component; the bundler learns that from
|
|
4
|
+
|
|
5
|
+
// @next/mdx and the type checker does not. Shared with every app —
|
|
6
|
+
|
|
7
|
+
// referenced, not copied.
|
|
8
|
+
|
|
9
|
+
"files": ["../../mdx.d.ts"],
|
|
10
|
+
|
|
3
11
|
"include": [
|
|
4
12
|
"**/*.ts",
|
|
5
13
|
"**/*.tsx", "components/commerce/_to_deprecate_checkout-widget/index.tsx_",
|
|
Binary file
|
|
Binary file
|
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* Metadata types
|
|
4
|
-
*
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
export interface DeprecatedMetadataFields {
|
|
8
|
-
/**
|
|
9
|
-
* Deprecated options that have a preferred method
|
|
10
|
-
* @deprecated Use appWebApp to configure apple-mobile-web-app-capable which provides
|
|
11
|
-
* @see https://www.appsloveworld.com/coding/iphone/11/difference-between-apple-mobile-web-app-capable-and-apple-touch-fullscreen-ipho
|
|
12
|
-
*/
|
|
13
|
-
'apple-touch-fullscreen'?: never
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Obsolete since iOS 7.
|
|
17
|
-
* @see https://web.dev/apple-touch-icon/
|
|
18
|
-
* @deprecated use icons.apple or instead
|
|
19
|
-
*/
|
|
20
|
-
'apple-touch-icon-precomposed'?: never
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export type TemplateString =
|
|
24
|
-
| DefaultTemplateString
|
|
25
|
-
| AbsoluteTemplateString
|
|
26
|
-
| AbsoluteString
|
|
27
|
-
export type DefaultTemplateString = {
|
|
28
|
-
default: string
|
|
29
|
-
template: string
|
|
30
|
-
}
|
|
31
|
-
export type AbsoluteTemplateString = {
|
|
32
|
-
absolute: string
|
|
33
|
-
template: string | null
|
|
34
|
-
}
|
|
35
|
-
export type AbsoluteString = {
|
|
36
|
-
absolute: string
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export type Author = {
|
|
40
|
-
// renders as <link rel="author"...
|
|
41
|
-
url?: string | URL
|
|
42
|
-
// renders as <meta name="author"...
|
|
43
|
-
name?: string
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
// does not include "unsafe-URL". to use this users should
|
|
47
|
-
// use '"unsafe-URL" as ReferrerEnum'
|
|
48
|
-
export type ReferrerEnum =
|
|
49
|
-
| 'no-referrer'
|
|
50
|
-
| 'origin'
|
|
51
|
-
| 'no-referrer-when-downgrade'
|
|
52
|
-
| 'origin-when-cross-origin'
|
|
53
|
-
| 'same-origin'
|
|
54
|
-
| 'strict-origin'
|
|
55
|
-
| 'strict-origin-when-cross-origin'
|
|
56
|
-
|
|
57
|
-
export type ColorSchemeEnum =
|
|
58
|
-
| 'normal'
|
|
59
|
-
| 'light'
|
|
60
|
-
| 'dark'
|
|
61
|
-
| 'light dark'
|
|
62
|
-
| 'dark light'
|
|
63
|
-
| 'only light'
|
|
64
|
-
|
|
65
|
-
type RobotsInfo = {
|
|
66
|
-
// all and none will be inferred from index/follow boolean options
|
|
67
|
-
index?: boolean
|
|
68
|
-
follow?: boolean
|
|
69
|
-
|
|
70
|
-
/** @deprecated set index to false instead */
|
|
71
|
-
noindex?: never
|
|
72
|
-
/** @deprecated set follow to false instead */
|
|
73
|
-
nofollow?: never
|
|
74
|
-
|
|
75
|
-
noarchive?: boolean
|
|
76
|
-
nosnippet?: boolean
|
|
77
|
-
noimageindex?: boolean
|
|
78
|
-
nocache?: boolean
|
|
79
|
-
notranslate?: boolean
|
|
80
|
-
indexifembedded?: boolean
|
|
81
|
-
nositelinkssearchbox?: boolean
|
|
82
|
-
unavailable_after?: string
|
|
83
|
-
'max-video-preview'?: number | string
|
|
84
|
-
'max-image-preview'?: 'none' | 'standard' | 'large'
|
|
85
|
-
'max-snippet'?: number
|
|
86
|
-
}
|
|
87
|
-
export type Robots = RobotsInfo & {
|
|
88
|
-
// if you want to specify an alternate robots just for google
|
|
89
|
-
googleBot?: string | RobotsInfo
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
export type ResolvedRobots = {
|
|
93
|
-
basic: string | null
|
|
94
|
-
googleBot: string | null
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
export type IconURL = string | URL
|
|
98
|
-
export type Icon = IconURL | IconDescriptor
|
|
99
|
-
export type IconDescriptor = {
|
|
100
|
-
url: string | URL
|
|
101
|
-
type?: string
|
|
102
|
-
sizes?: string
|
|
103
|
-
color?: string
|
|
104
|
-
/** defaults to rel="icon" unless superseded by Icons map */
|
|
105
|
-
rel?: string
|
|
106
|
-
media?: string
|
|
107
|
-
/**
|
|
108
|
-
* @see https://developer.mozilla.org/docs/Web/API/HTMLImageElement/fetchPriority
|
|
109
|
-
*/
|
|
110
|
-
fetchPriority?: 'high' | 'low' | 'auto'
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
export type Icons = {
|
|
114
|
-
/** rel="icon" */
|
|
115
|
-
icon?: Icon | Icon[]
|
|
116
|
-
/** rel="shortcut icon" */
|
|
117
|
-
shortcut?: Icon | Icon[]
|
|
118
|
-
/**
|
|
119
|
-
* @see https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/ConfiguringWebApplications/ConfiguringWebApplications.html
|
|
120
|
-
* rel="apple-touch-icon"
|
|
121
|
-
*/
|
|
122
|
-
apple?: Icon | Icon[]
|
|
123
|
-
/** rel inferred from descriptor, defaults to "icon" */
|
|
124
|
-
other?: IconDescriptor | IconDescriptor[]
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
export type Verification = {
|
|
128
|
-
google?: null | string | number | (string | number)[]
|
|
129
|
-
yahoo?: null | string | number | (string | number)[]
|
|
130
|
-
yandex?: null | string | number | (string | number)[]
|
|
131
|
-
me?: null | string | number | (string | number)[]
|
|
132
|
-
// if you ad-hoc additional verification
|
|
133
|
-
other?: {
|
|
134
|
-
[name: string]: string | number | (string | number)[]
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
export type ResolvedVerification = {
|
|
139
|
-
google?: null | (string | number)[]
|
|
140
|
-
yahoo?: null | (string | number)[]
|
|
141
|
-
yandex?: null | (string | number)[]
|
|
142
|
-
me?: null | (string | number)[]
|
|
143
|
-
other?: {
|
|
144
|
-
[name: string]: (string | number)[]
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
export type ResolvedIcons = {
|
|
149
|
-
icon: IconDescriptor[]
|
|
150
|
-
apple: IconDescriptor[]
|
|
151
|
-
shortcut?: IconDescriptor[]
|
|
152
|
-
other?: IconDescriptor[]
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
export type ThemeColorDescriptor = {
|
|
156
|
-
color: string
|
|
157
|
-
media?: string
|
|
158
|
-
}
|
|
@@ -1,267 +0,0 @@
|
|
|
1
|
-
import type { AbsoluteTemplateString, TemplateString } from './metadata-types'
|
|
2
|
-
|
|
3
|
-
export type OpenGraphType =
|
|
4
|
-
| 'article'
|
|
5
|
-
| 'book'
|
|
6
|
-
| 'music.song'
|
|
7
|
-
| 'music.album'
|
|
8
|
-
| 'music.playlist'
|
|
9
|
-
| 'music.radio_station'
|
|
10
|
-
| 'profile'
|
|
11
|
-
| 'website'
|
|
12
|
-
| 'video.tv_show'
|
|
13
|
-
| 'video.other'
|
|
14
|
-
| 'video.movie'
|
|
15
|
-
| 'video.episode'
|
|
16
|
-
|
|
17
|
-
export type OpenGraph =
|
|
18
|
-
| OpenGraphWebsite
|
|
19
|
-
| OpenGraphArticle
|
|
20
|
-
| OpenGraphBook
|
|
21
|
-
| OpenGraphProfile
|
|
22
|
-
| OpenGraphMusicSong
|
|
23
|
-
| OpenGraphMusicAlbum
|
|
24
|
-
| OpenGraphMusicPlaylist
|
|
25
|
-
| OpenGraphRadioStation
|
|
26
|
-
| OpenGraphVideoMovie
|
|
27
|
-
| OpenGraphVideoEpisode
|
|
28
|
-
| OpenGraphVideoTVShow
|
|
29
|
-
| OpenGraphVideoOther
|
|
30
|
-
| OpenGraphMetadata
|
|
31
|
-
|
|
32
|
-
// update this type to reflect actual locales
|
|
33
|
-
type Locale = string
|
|
34
|
-
|
|
35
|
-
type OpenGraphMetadata = {
|
|
36
|
-
determiner?: 'a' | 'an' | 'the' | 'auto' | ''
|
|
37
|
-
title?: string | TemplateString
|
|
38
|
-
description?: string
|
|
39
|
-
emails?: string | Array<string>
|
|
40
|
-
phoneNumbers?: string | Array<string>
|
|
41
|
-
faxNumbers?: string | Array<string>
|
|
42
|
-
siteName?: string
|
|
43
|
-
locale?: Locale
|
|
44
|
-
alternateLocale?: Locale | Array<Locale>
|
|
45
|
-
images?: OGImage | Array<OGImage>
|
|
46
|
-
audio?: OGAudio | Array<OGAudio>
|
|
47
|
-
videos?: OGVideo | Array<OGVideo>
|
|
48
|
-
url?: string | URL
|
|
49
|
-
countryName?: string
|
|
50
|
-
ttl?: number
|
|
51
|
-
}
|
|
52
|
-
export type OpenGraphWebsite = OpenGraphMetadata & {
|
|
53
|
-
type: 'website'
|
|
54
|
-
}
|
|
55
|
-
type OpenGraphArticle = OpenGraphMetadata & {
|
|
56
|
-
type: 'article'
|
|
57
|
-
publishedTime?: string // datetime
|
|
58
|
-
modifiedTime?: string // datetime
|
|
59
|
-
expirationTime?: string // datetime
|
|
60
|
-
authors?: null | string | URL | Array<string | URL>
|
|
61
|
-
section?: null | string
|
|
62
|
-
tags?: null | string | Array<string>
|
|
63
|
-
}
|
|
64
|
-
type OpenGraphBook = OpenGraphMetadata & {
|
|
65
|
-
type: 'book'
|
|
66
|
-
isbn?: null | string
|
|
67
|
-
releaseDate?: null | string // datetime
|
|
68
|
-
authors?: null | string | URL | Array<string | URL>
|
|
69
|
-
tags?: null | string | Array<string>
|
|
70
|
-
}
|
|
71
|
-
type OpenGraphProfile = OpenGraphMetadata & {
|
|
72
|
-
type: 'profile'
|
|
73
|
-
firstName?: null | string
|
|
74
|
-
lastName?: null | string
|
|
75
|
-
username?: null | string
|
|
76
|
-
gender?: null | string
|
|
77
|
-
}
|
|
78
|
-
type OpenGraphMusicSong = OpenGraphMetadata & {
|
|
79
|
-
type: 'music.song'
|
|
80
|
-
duration?: null | number
|
|
81
|
-
albums?: null | string | URL | OGAlbum | Array<string | URL | OGAlbum>
|
|
82
|
-
musicians?: null | string | URL | Array<string | URL>
|
|
83
|
-
}
|
|
84
|
-
type OpenGraphMusicAlbum = OpenGraphMetadata & {
|
|
85
|
-
type: 'music.album'
|
|
86
|
-
songs?: null | string | URL | OGSong | Array<string | URL | OGSong>
|
|
87
|
-
musicians?: null | string | URL | Array<string | URL>
|
|
88
|
-
releaseDate?: null | string // datetime
|
|
89
|
-
}
|
|
90
|
-
type OpenGraphMusicPlaylist = OpenGraphMetadata & {
|
|
91
|
-
type: 'music.playlist'
|
|
92
|
-
songs?: null | string | URL | OGSong | Array<string | URL | OGSong>
|
|
93
|
-
creators?: null | string | URL | Array<string | URL>
|
|
94
|
-
}
|
|
95
|
-
type OpenGraphRadioStation = OpenGraphMetadata & {
|
|
96
|
-
type: 'music.radio_station'
|
|
97
|
-
creators?: null | string | URL | Array<string | URL>
|
|
98
|
-
}
|
|
99
|
-
type OpenGraphVideoMovie = OpenGraphMetadata & {
|
|
100
|
-
type: 'video.movie'
|
|
101
|
-
actors?: null | string | URL | OGActor | Array<string | URL | OGActor>
|
|
102
|
-
directors?: null | string | URL | Array<string | URL>
|
|
103
|
-
writers?: null | string | URL | Array<string | URL>
|
|
104
|
-
duration?: null | number
|
|
105
|
-
releaseDate?: null | string // datetime
|
|
106
|
-
tags?: null | string | Array<string>
|
|
107
|
-
}
|
|
108
|
-
type OpenGraphVideoEpisode = OpenGraphMetadata & {
|
|
109
|
-
type: 'video.episode'
|
|
110
|
-
actors?: null | string | URL | OGActor | Array<string | URL | OGActor>
|
|
111
|
-
directors?: null | string | URL | Array<string | URL>
|
|
112
|
-
writers?: null | string | URL | Array<string | URL>
|
|
113
|
-
duration?: null | number
|
|
114
|
-
releaseDate?: null | string // datetime
|
|
115
|
-
tags?: null | string | Array<string>
|
|
116
|
-
series?: null | string | URL
|
|
117
|
-
}
|
|
118
|
-
type OpenGraphVideoTVShow = OpenGraphMetadata & {
|
|
119
|
-
type: 'video.tv_show'
|
|
120
|
-
}
|
|
121
|
-
type OpenGraphVideoOther = OpenGraphMetadata & {
|
|
122
|
-
type: 'video.other'
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
export type OGImage = string | OGImageDescriptor | URL
|
|
126
|
-
type OGImageDescriptor = {
|
|
127
|
-
url: string | URL
|
|
128
|
-
secureUrl?: string | URL
|
|
129
|
-
alt?: string
|
|
130
|
-
type?: string
|
|
131
|
-
width?: string | number
|
|
132
|
-
height?: string | number
|
|
133
|
-
}
|
|
134
|
-
type OGAudio = string | OGAudioDescriptor | URL
|
|
135
|
-
type OGAudioDescriptor = {
|
|
136
|
-
url: string | URL
|
|
137
|
-
secureUrl?: string | URL
|
|
138
|
-
type?: string
|
|
139
|
-
}
|
|
140
|
-
type OGVideo = string | OGVideoDescriptor | URL
|
|
141
|
-
type OGVideoDescriptor = {
|
|
142
|
-
url: string | URL
|
|
143
|
-
secureUrl?: string | URL
|
|
144
|
-
type?: string
|
|
145
|
-
width?: string | number
|
|
146
|
-
height?: string | number
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
export type ResolvedOpenGraph =
|
|
150
|
-
| ResolvedOpenGraphWebsite
|
|
151
|
-
| ResolvedOpenGraphArticle
|
|
152
|
-
| ResolvedOpenGraphBook
|
|
153
|
-
| ResolvedOpenGraphProfile
|
|
154
|
-
| ResolvedOpenGraphMusicSong
|
|
155
|
-
| ResolvedOpenGraphMusicAlbum
|
|
156
|
-
| ResolvedOpenGraphMusicPlaylist
|
|
157
|
-
| ResolvedOpenGraphRadioStation
|
|
158
|
-
| ResolvedOpenGraphVideoMovie
|
|
159
|
-
| ResolvedOpenGraphVideoEpisode
|
|
160
|
-
| ResolvedOpenGraphVideoTVShow
|
|
161
|
-
| ResolvedOpenGraphVideoOther
|
|
162
|
-
| ResolvedOpenGraphMetadata
|
|
163
|
-
|
|
164
|
-
type ResolvedOpenGraphMetadata = {
|
|
165
|
-
determiner?: 'a' | 'an' | 'the' | 'auto' | ''
|
|
166
|
-
title: AbsoluteTemplateString
|
|
167
|
-
description?: string
|
|
168
|
-
emails?: Array<string>
|
|
169
|
-
phoneNumbers?: Array<string>
|
|
170
|
-
faxNumbers?: Array<string>
|
|
171
|
-
siteName?: string
|
|
172
|
-
locale?: Locale
|
|
173
|
-
alternateLocale?: Array<Locale>
|
|
174
|
-
images?: Array<OGImage>
|
|
175
|
-
audio?: Array<OGAudio>
|
|
176
|
-
videos?: Array<OGVideo>
|
|
177
|
-
url: null | URL | string
|
|
178
|
-
countryName?: string
|
|
179
|
-
ttl?: number
|
|
180
|
-
}
|
|
181
|
-
type ResolvedOpenGraphWebsite = ResolvedOpenGraphMetadata & {
|
|
182
|
-
type: 'website'
|
|
183
|
-
}
|
|
184
|
-
type ResolvedOpenGraphArticle = ResolvedOpenGraphMetadata & {
|
|
185
|
-
type: 'article'
|
|
186
|
-
publishedTime?: string // datetime
|
|
187
|
-
modifiedTime?: string // datetime
|
|
188
|
-
expirationTime?: string // datetime
|
|
189
|
-
authors?: Array<string>
|
|
190
|
-
section?: string
|
|
191
|
-
tags?: Array<string>
|
|
192
|
-
}
|
|
193
|
-
type ResolvedOpenGraphBook = ResolvedOpenGraphMetadata & {
|
|
194
|
-
type: 'book'
|
|
195
|
-
isbn?: string
|
|
196
|
-
releaseDate?: string // datetime
|
|
197
|
-
authors?: Array<string>
|
|
198
|
-
tags?: Array<string>
|
|
199
|
-
}
|
|
200
|
-
type ResolvedOpenGraphProfile = ResolvedOpenGraphMetadata & {
|
|
201
|
-
type: 'profile'
|
|
202
|
-
firstName?: string
|
|
203
|
-
lastName?: string
|
|
204
|
-
username?: string
|
|
205
|
-
gender?: string
|
|
206
|
-
}
|
|
207
|
-
type ResolvedOpenGraphMusicSong = ResolvedOpenGraphMetadata & {
|
|
208
|
-
type: 'music.song'
|
|
209
|
-
duration?: number
|
|
210
|
-
albums?: Array<OGAlbum>
|
|
211
|
-
musicians?: Array<string | URL>
|
|
212
|
-
}
|
|
213
|
-
type ResolvedOpenGraphMusicAlbum = ResolvedOpenGraphMetadata & {
|
|
214
|
-
type: 'music.album'
|
|
215
|
-
songs?: Array<string | URL | OGSong>
|
|
216
|
-
musicians?: Array<string | URL>
|
|
217
|
-
releaseDate?: string // datetime
|
|
218
|
-
}
|
|
219
|
-
type ResolvedOpenGraphMusicPlaylist = ResolvedOpenGraphMetadata & {
|
|
220
|
-
type: 'music.playlist'
|
|
221
|
-
songs?: Array<string | URL | OGSong>
|
|
222
|
-
creators?: Array<string | URL>
|
|
223
|
-
}
|
|
224
|
-
type ResolvedOpenGraphRadioStation = ResolvedOpenGraphMetadata & {
|
|
225
|
-
type: 'music.radio_station'
|
|
226
|
-
creators?: Array<string | URL>
|
|
227
|
-
}
|
|
228
|
-
type ResolvedOpenGraphVideoMovie = ResolvedOpenGraphMetadata & {
|
|
229
|
-
type: 'video.movie'
|
|
230
|
-
actors?: Array<string | URL | OGActor>
|
|
231
|
-
directors?: Array<string | URL>
|
|
232
|
-
writers?: Array<string | URL>
|
|
233
|
-
duration?: number
|
|
234
|
-
releaseDate?: string // datetime
|
|
235
|
-
tags?: Array<string>
|
|
236
|
-
}
|
|
237
|
-
type ResolvedOpenGraphVideoEpisode = ResolvedOpenGraphMetadata & {
|
|
238
|
-
type: 'video.episode'
|
|
239
|
-
actors?: Array<string | URL | OGActor>
|
|
240
|
-
directors?: Array<string | URL>
|
|
241
|
-
writers?: Array<string | URL>
|
|
242
|
-
duration?: number
|
|
243
|
-
releaseDate?: string // datetime
|
|
244
|
-
tags?: Array<string>
|
|
245
|
-
series?: string | URL
|
|
246
|
-
}
|
|
247
|
-
type ResolvedOpenGraphVideoTVShow = ResolvedOpenGraphMetadata & {
|
|
248
|
-
type: 'video.tv_show'
|
|
249
|
-
}
|
|
250
|
-
type ResolvedOpenGraphVideoOther = ResolvedOpenGraphMetadata & {
|
|
251
|
-
type: 'video.other'
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
type OGSong = {
|
|
255
|
-
url: string | URL
|
|
256
|
-
disc?: number
|
|
257
|
-
track?: number
|
|
258
|
-
}
|
|
259
|
-
type OGAlbum = {
|
|
260
|
-
url: string | URL
|
|
261
|
-
disc?: number
|
|
262
|
-
track?: number
|
|
263
|
-
}
|
|
264
|
-
type OGActor = {
|
|
265
|
-
url: string | URL
|
|
266
|
-
role?: string
|
|
267
|
-
}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
// Reference: https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/markup
|
|
2
|
-
|
|
3
|
-
import type { AbsoluteTemplateString, TemplateString } from './metadata-types'
|
|
4
|
-
|
|
5
|
-
export type Twitter =
|
|
6
|
-
| TwitterSummary
|
|
7
|
-
| TwitterSummaryLargeImage
|
|
8
|
-
| TwitterPlayer
|
|
9
|
-
| TwitterApp
|
|
10
|
-
| TwitterMetadata
|
|
11
|
-
|
|
12
|
-
type TwitterMetadata = {
|
|
13
|
-
// defaults to card="summary"
|
|
14
|
-
site?: string // username for account associated to the site itself
|
|
15
|
-
siteId?: string // id for account associated to the site itself
|
|
16
|
-
creator?: string // username for the account associated to the creator of the content on the site
|
|
17
|
-
creatorId?: string // id for the account associated to the creator of the content on the site
|
|
18
|
-
description?: string
|
|
19
|
-
title?: string | TemplateString
|
|
20
|
-
images?: TwitterImage | Array<TwitterImage>
|
|
21
|
-
}
|
|
22
|
-
type TwitterSummary = TwitterMetadata & {
|
|
23
|
-
card: 'summary'
|
|
24
|
-
}
|
|
25
|
-
type TwitterSummaryLargeImage = TwitterMetadata & {
|
|
26
|
-
card: 'summary_large_image'
|
|
27
|
-
}
|
|
28
|
-
type TwitterPlayer = TwitterMetadata & {
|
|
29
|
-
card: 'player'
|
|
30
|
-
players: TwitterPlayerDescriptor | Array<TwitterPlayerDescriptor>
|
|
31
|
-
}
|
|
32
|
-
type TwitterApp = TwitterMetadata & {
|
|
33
|
-
card: 'app'
|
|
34
|
-
app: TwitterAppDescriptor
|
|
35
|
-
}
|
|
36
|
-
export type TwitterAppDescriptor = {
|
|
37
|
-
id: {
|
|
38
|
-
iphone?: string | number
|
|
39
|
-
ipad?: string | number
|
|
40
|
-
googleplay?: string
|
|
41
|
-
}
|
|
42
|
-
url?: {
|
|
43
|
-
iphone?: string | URL
|
|
44
|
-
ipad?: string | URL
|
|
45
|
-
googleplay?: string | URL
|
|
46
|
-
}
|
|
47
|
-
name?: string
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export type TwitterImage = string | TwitterImageDescriptor | URL
|
|
51
|
-
type TwitterImageDescriptor = {
|
|
52
|
-
url: string | URL
|
|
53
|
-
alt?: string
|
|
54
|
-
secureUrl?: string | URL
|
|
55
|
-
type?: string
|
|
56
|
-
width?: string | number
|
|
57
|
-
height?: string | number
|
|
58
|
-
}
|
|
59
|
-
type TwitterPlayerDescriptor = {
|
|
60
|
-
playerUrl: string | URL
|
|
61
|
-
streamUrl: string | URL
|
|
62
|
-
width: number
|
|
63
|
-
height: number
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
type ResolvedTwitterImage = {
|
|
67
|
-
url: string | URL
|
|
68
|
-
alt?: string
|
|
69
|
-
secureUrl?: string | URL
|
|
70
|
-
type?: string
|
|
71
|
-
width?: string | number
|
|
72
|
-
height?: string | number
|
|
73
|
-
}
|
|
74
|
-
type ResolvedTwitterSummary = {
|
|
75
|
-
site: string | null
|
|
76
|
-
siteId: string | null
|
|
77
|
-
creator: string | null
|
|
78
|
-
creatorId: string | null
|
|
79
|
-
description: string | null
|
|
80
|
-
title: AbsoluteTemplateString
|
|
81
|
-
images?: Array<ResolvedTwitterImage>
|
|
82
|
-
}
|
|
83
|
-
type ResolvedTwitterPlayer = ResolvedTwitterSummary & {
|
|
84
|
-
players: Array<TwitterPlayerDescriptor>
|
|
85
|
-
}
|
|
86
|
-
type ResolvedTwitterApp = ResolvedTwitterSummary & { app: TwitterAppDescriptor }
|
|
87
|
-
|
|
88
|
-
export type ResolvedTwitterMetadata =
|
|
89
|
-
| ({ card: 'summary' } & ResolvedTwitterSummary)
|
|
90
|
-
| ({ card: 'summary_large_image' } & ResolvedTwitterSummary)
|
|
91
|
-
| ({ card: 'player' } & ResolvedTwitterPlayer)
|
|
92
|
-
| ({ card: 'app' } & ResolvedTwitterApp)
|
|
Binary file
|
|
Binary file
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { TwFontDesc } from '@hanzo/ui/tailwind'
|
|
2
|
-
|
|
3
|
-
import luxTwFonts from './lux-tw-fonts'
|
|
4
|
-
|
|
5
|
-
export const fontFamily = (ignoreTheme: any): {
|
|
6
|
-
[key: string]: string[]
|
|
7
|
-
} => {
|
|
8
|
-
|
|
9
|
-
let result: any = {}
|
|
10
|
-
luxTwFonts.forEach((font: TwFontDesc) => {
|
|
11
|
-
result[font.twName] = font.fontFamily
|
|
12
|
-
// eg: heading: ['var(--font-druk-text-wide)']
|
|
13
|
-
})
|
|
14
|
-
|
|
15
|
-
return result as {
|
|
16
|
-
[key: string]: string[]
|
|
17
|
-
}
|
|
18
|
-
}
|
package/tailwind/index.ts
DELETED