@unisphere/nx 4.15.8 → 5.0.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/generators/utils.d.ts +2 -2
- package/dist/generators/utils.d.ts.map +1 -1
- package/dist/generators/utils.js +1 -1
- package/dist/migrations/3-15-0/add-experience-documentation.d.ts +3 -4
- package/dist/migrations/3-15-0/add-experience-documentation.d.ts.map +1 -1
- package/dist/migrations/3-15-0/add-experience-documentation.js +4 -18
- package/dist/migrations/3-23-0/update-documentation-typedoc-plugins.d.ts +3 -6
- package/dist/migrations/3-23-0/update-documentation-typedoc-plugins.d.ts.map +1 -1
- package/dist/migrations/3-23-0/update-documentation-typedoc-plugins.js +4 -166
- package/dist/migrations/4-15-2/move-cli-to-dev-dependencies.d.ts +4 -0
- package/dist/migrations/4-15-2/move-cli-to-dev-dependencies.d.ts.map +1 -1
- package/dist/migrations/4-15-2/move-cli-to-dev-dependencies.js +70 -0
- package/dist/migrations/4-15-9/templates/_publish-artifacts.template +361 -0
- package/dist/migrations/4-15-9/update-publish-artifacts-workflow.d.ts +10 -0
- package/dist/migrations/4-15-9/update-publish-artifacts-workflow.d.ts.map +1 -0
- package/dist/migrations/4-15-9/update-publish-artifacts-workflow.js +42 -0
- package/dist/migrations/5-0-0/remove-documentation.d.ts +9 -0
- package/dist/migrations/5-0-0/remove-documentation.d.ts.map +1 -0
- package/dist/migrations/5-0-0/remove-documentation.js +45 -0
- package/generators.json +0 -5
- package/migrations.json +17 -0
- package/package.json +1 -1
- package/dist/generators/add-documentation/USAGE.md +0 -64
- package/dist/generators/add-documentation/add-documentation.d.ts +0 -5
- package/dist/generators/add-documentation/add-documentation.d.ts.map +0 -1
- package/dist/generators/add-documentation/add-documentation.js +0 -145
- package/dist/generators/add-documentation/discover-typedoc-plugins.d.ts +0 -23
- package/dist/generators/add-documentation/discover-typedoc-plugins.d.ts.map +0 -1
- package/dist/generators/add-documentation/discover-typedoc-plugins.js +0 -128
- package/dist/generators/add-documentation/schema.d.ts +0 -4
- package/dist/generators/add-documentation/schema.json +0 -20
- package/dist/generators/add-documentation/templates/babel.config.js +0 -3
- package/dist/generators/add-documentation/templates/docs/changelog/overview.md +0 -9
- package/dist/generators/add-documentation/templates/docs/documentations/overview.md +0 -9
- package/dist/generators/add-documentation/templates/docs/reference/overview.md +0 -9
- package/dist/generators/add-documentation/templates/docusaurus.config.ts.template +0 -134
- package/dist/generators/add-documentation/templates/package.json.template +0 -59
- package/dist/generators/add-documentation/templates/plugins/discover-typedoc-plugins.mjs +0 -156
- package/dist/generators/add-documentation/templates/plugins/typedoc-plugins.ts.template +0 -7
- package/dist/generators/add-documentation/templates/postcss.config.js +0 -6
- package/dist/generators/add-documentation/templates/sidebars.ts +0 -9
- package/dist/generators/add-documentation/templates/src/components/demo-placeholder-card.tsx +0 -33
- package/dist/generators/add-documentation/templates/src/components/guides/experiences/genie/integrate-genie-guide.tsx +0 -149
- package/dist/generators/add-documentation/templates/src/components/guides/experiences/notifications/notifications-react-guide.tsx +0 -211
- package/dist/generators/add-documentation/templates/src/components/homepage-features/index.tsx +0 -141
- package/dist/generators/add-documentation/templates/src/components/homepage-features/styles.module.css +0 -87
- package/dist/generators/add-documentation/templates/src/components/homepage-modules/index.tsx +0 -76
- package/dist/generators/add-documentation/templates/src/components/homepage-modules/styles.module.css +0 -120
- package/dist/generators/add-documentation/templates/src/components/homepage-start-now/index.tsx +0 -22
- package/dist/generators/add-documentation/templates/src/components/homepage-start-now/styles.module.css +0 -38
- package/dist/generators/add-documentation/templates/src/components/interactive-code-panel.tsx +0 -258
- package/dist/generators/add-documentation/templates/src/components/introductions/developer-toolbox-experience.tsx +0 -84
- package/dist/generators/add-documentation/templates/src/components/introductions/hello-world-experience.tsx +0 -133
- package/dist/generators/add-documentation/templates/src/components/introductions/notificaitons-experience.tsx +0 -635
- package/dist/generators/add-documentation/templates/src/components/introductions/reactions-experience.tsx +0 -117
- package/dist/generators/add-documentation/templates/src/components/ui-shared/introduction-card.tsx +0 -117
- package/dist/generators/add-documentation/templates/src/components/ui-shared/playground-card.tsx +0 -67
- package/dist/generators/add-documentation/templates/src/components/ui-shared/use-color-mode.ts +0 -20
- package/dist/generators/add-documentation/templates/src/components/ui-shared/utils.ts +0 -8
- package/dist/generators/add-documentation/templates/src/css/custom.css +0 -710
- package/dist/generators/add-documentation/templates/src/css/hero.module.css +0 -190
- package/dist/generators/add-documentation/templates/src/pages/index.module.css +0 -59
- package/dist/generators/add-documentation/templates/src/pages/index.tsx.template +0 -79
- package/dist/generators/add-documentation/templates/src/theme/Navbar/Content/index.tsx +0 -103
- package/dist/generators/add-documentation/templates/src/theme/Navbar/Content/styles.module.css +0 -9
- package/dist/generators/add-documentation/templates/src/theme/Navbar/MobileSidebar/Header/index.tsx +0 -45
- package/dist/generators/add-documentation/templates/static/.nojekyll +0 -0
- package/dist/generators/add-documentation/templates/static/homepage/divider.svg +0 -5
- package/dist/generators/add-documentation/templates/static/homepage/icons/Architecture.svg +0 -4
- package/dist/generators/add-documentation/templates/static/homepage/icons/Cost.svg +0 -4
- package/dist/generators/add-documentation/templates/static/homepage/icons/ExternalLink.svg +0 -3
- package/dist/generators/add-documentation/templates/static/homepage/icons/Infra.svg +0 -8
- package/dist/generators/add-documentation/templates/static/homepage/icons/Redundancies.svg +0 -6
- package/dist/generators/add-documentation/templates/static/homepage/icons/Speed.svg +0 -6
- package/dist/generators/add-documentation/templates/static/homepage/icons/Standards.svg +0 -4
- package/dist/generators/add-documentation/templates/static/homepage/icons/Unified.svg +0 -12
- package/dist/generators/add-documentation/templates/static/homepage/services/custo.jpg +0 -0
- package/dist/generators/add-documentation/templates/static/homepage/services/flame.jpg +0 -0
- package/dist/generators/add-documentation/templates/static/homepage/services/keepr.jpg +0 -0
- package/dist/generators/add-documentation/templates/static/homepage/services/loggi.jpg +0 -0
- package/dist/generators/add-documentation/templates/static/homepage/services/palleto.jpg +0 -0
- package/dist/generators/add-documentation/templates/static/homepage/services/publi.jpg +0 -0
- package/dist/generators/add-documentation/templates/static/homepage/services/tinker.jpg +0 -0
- package/dist/generators/add-documentation/templates/static/img/favicon.ico +0 -0
- package/dist/generators/add-documentation/templates/static/img/logo.svg +0 -6
- package/dist/generators/add-documentation/templates/static/img/logo_dark.svg +0 -6
- package/dist/generators/add-documentation/templates/static/robots.txt +0 -5
- package/dist/generators/add-documentation/templates/tailwind.config.js +0 -30
- package/dist/generators/add-documentation/templates/tsconfig.json +0 -7
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { getUnisphereInstance } from '@unisphere/runtime-js'
|
|
4
|
-
import { useEffect } from 'react'
|
|
5
|
-
import { useState } from 'react';
|
|
6
|
-
import { PlaygroundCard } from '@site/src/components/ui-shared/playground-card';
|
|
7
|
-
|
|
8
|
-
export const ReactionsExperience = ({ preload }: { preload?: boolean }) => {
|
|
9
|
-
|
|
10
|
-
const [loaded, setLoaded] = useState(false);
|
|
11
|
-
|
|
12
|
-
const loadReactionsExperience = async () => {
|
|
13
|
-
try {
|
|
14
|
-
setLoaded(true);
|
|
15
|
-
const workspace = await getUnisphereInstance('')
|
|
16
|
-
const runtime = await workspace.loadRuntime('unisphere.widget.reactions', 'showcase', {
|
|
17
|
-
autoStart: true
|
|
18
|
-
});
|
|
19
|
-
(runtime?.runtime as any).assignArea('reactions-experience-container');
|
|
20
|
-
|
|
21
|
-
} catch (e) {
|
|
22
|
-
console.error(e)
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
useEffect(() => {
|
|
27
|
-
if (preload) {
|
|
28
|
-
loadReactionsExperience();
|
|
29
|
-
}
|
|
30
|
-
}, [preload])
|
|
31
|
-
|
|
32
|
-
const playIcon = (
|
|
33
|
-
<svg
|
|
34
|
-
width="32"
|
|
35
|
-
height="32"
|
|
36
|
-
viewBox="0 0 24 24"
|
|
37
|
-
fill="none"
|
|
38
|
-
stroke="currentColor"
|
|
39
|
-
strokeWidth="1.5"
|
|
40
|
-
style={{
|
|
41
|
-
color: 'var(--ifm-color-content-secondary)',
|
|
42
|
-
opacity: 0.7
|
|
43
|
-
}}
|
|
44
|
-
>
|
|
45
|
-
<circle cx="12" cy="12" r="10" />
|
|
46
|
-
<polygon points="10,8 16,12 10,16 10,8" />
|
|
47
|
-
</svg>
|
|
48
|
-
);
|
|
49
|
-
|
|
50
|
-
return (
|
|
51
|
-
<PlaygroundCard
|
|
52
|
-
title="Playground - Loading Experience"
|
|
53
|
-
icon={!loaded ? playIcon : undefined}
|
|
54
|
-
>
|
|
55
|
-
<div style={{ marginBottom: '1rem' }}>
|
|
56
|
-
{loaded ? (
|
|
57
|
-
<div style={{ color: 'var(--ifm-color-content-secondary)', fontSize: '0.9rem', marginBottom: '0.5rem' }}>
|
|
58
|
-
This reactions experience is {preload ? 'preloaded' : 'dynamically loaded at runtime'} with just about five lines of code.
|
|
59
|
-
<br />
|
|
60
|
-
<strong style={{ color: 'var(--ifm-color-content)' }}>Try hovering over the reactions below!</strong>
|
|
61
|
-
</div>
|
|
62
|
-
) : (
|
|
63
|
-
<div style={{ color: 'var(--ifm-color-content-secondary)', fontSize: '0.9rem' }}>
|
|
64
|
-
Lazy load the reactions experience in demo mode (backend connection disabled)
|
|
65
|
-
</div>
|
|
66
|
-
)}
|
|
67
|
-
</div>
|
|
68
|
-
|
|
69
|
-
<div
|
|
70
|
-
style={{
|
|
71
|
-
display: 'inline-flex',
|
|
72
|
-
alignItems: 'center',
|
|
73
|
-
gap: '12px',
|
|
74
|
-
padding: '12px 24px',
|
|
75
|
-
backgroundColor: 'var(--ifm-background-surface-color)',
|
|
76
|
-
borderRadius: 'var(--ifm-code-border-radius)',
|
|
77
|
-
border: '1px solid var(--uc-border-color)',
|
|
78
|
-
boxShadow: 'var(--ifm-global-shadow-lw)',
|
|
79
|
-
flexWrap: 'wrap',
|
|
80
|
-
justifyContent: 'center',
|
|
81
|
-
minHeight: '48px',
|
|
82
|
-
}}
|
|
83
|
-
>
|
|
84
|
-
<div id="reactions-experience-container"></div>
|
|
85
|
-
{!loaded && (
|
|
86
|
-
<button
|
|
87
|
-
onClick={loadReactionsExperience}
|
|
88
|
-
style={{
|
|
89
|
-
padding: '8px 16px',
|
|
90
|
-
background: 'var(--ifm-color-primary)',
|
|
91
|
-
color: 'white',
|
|
92
|
-
border: 'none',
|
|
93
|
-
borderRadius: 'var(--ifm-code-border-radius)',
|
|
94
|
-
fontSize: '14px',
|
|
95
|
-
fontWeight: '500',
|
|
96
|
-
cursor: 'pointer',
|
|
97
|
-
transition: 'all 0.2s ease',
|
|
98
|
-
boxShadow: 'var(--ifm-global-shadow-lw)',
|
|
99
|
-
}}
|
|
100
|
-
onMouseEnter={(e) => {
|
|
101
|
-
e.currentTarget.style.backgroundColor = 'var(--ifm-color-primary-dark)';
|
|
102
|
-
e.currentTarget.style.transform = 'translateY(-1px)';
|
|
103
|
-
e.currentTarget.style.boxShadow = 'var(--ifm-global-shadow-md)';
|
|
104
|
-
}}
|
|
105
|
-
onMouseLeave={(e) => {
|
|
106
|
-
e.currentTarget.style.backgroundColor = 'var(--ifm-color-primary)';
|
|
107
|
-
e.currentTarget.style.transform = 'translateY(0)';
|
|
108
|
-
e.currentTarget.style.boxShadow = 'var(--ifm-global-shadow-lw)';
|
|
109
|
-
}}
|
|
110
|
-
>
|
|
111
|
-
Load Reactions Experience
|
|
112
|
-
</button>
|
|
113
|
-
)}
|
|
114
|
-
</div>
|
|
115
|
-
</PlaygroundCard>
|
|
116
|
-
);
|
|
117
|
-
}
|
package/dist/generators/add-documentation/templates/src/components/ui-shared/introduction-card.tsx
DELETED
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { invertHex } from '@site/src/components/ui-shared/utils';
|
|
3
|
-
import { useColorMode } from '@site/src/components/ui-shared/use-color-mode';
|
|
4
|
-
|
|
5
|
-
interface IntroductionCardProps {
|
|
6
|
-
title: string;
|
|
7
|
-
header?: string;
|
|
8
|
-
content: string;
|
|
9
|
-
backgroundColor: string;
|
|
10
|
-
className?: string;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export const IntroductionCard: React.FC<IntroductionCardProps> = ({
|
|
14
|
-
title,
|
|
15
|
-
header,
|
|
16
|
-
content,
|
|
17
|
-
backgroundColor,
|
|
18
|
-
className = ''
|
|
19
|
-
}) => {
|
|
20
|
-
const colorMode = useColorMode();
|
|
21
|
-
|
|
22
|
-
// More subtle background colors with better contrast
|
|
23
|
-
const cardBgColor = colorMode === 'dark'
|
|
24
|
-
? `${invertHex(backgroundColor)}15` // Very subtle tint
|
|
25
|
-
: `${backgroundColor}40`; // Reduced opacity for subtlety
|
|
26
|
-
const textColor = colorMode === 'dark' ? '#f1f5f9' : '#0f172a';
|
|
27
|
-
const headerColor = colorMode === 'dark' ? '#94a3b8' : '#475569';
|
|
28
|
-
|
|
29
|
-
return (
|
|
30
|
-
<article
|
|
31
|
-
className={`group relative flex-1 min-w-0 transition-all duration-200 ease-out hover:scale-[1.01] focus-within:scale-[1.01] ${className}`}
|
|
32
|
-
style={{
|
|
33
|
-
minWidth: '280px',
|
|
34
|
-
}}
|
|
35
|
-
role="article"
|
|
36
|
-
aria-labelledby={`card-title-${title.toLowerCase().replace(/\s+/g, '-')}`}
|
|
37
|
-
>
|
|
38
|
-
{/* Card container with modern styling */}
|
|
39
|
-
<div
|
|
40
|
-
className="relative h-full overflow-hidden"
|
|
41
|
-
style={{
|
|
42
|
-
backgroundColor: cardBgColor,
|
|
43
|
-
borderRadius: '12px',
|
|
44
|
-
border: colorMode === 'dark'
|
|
45
|
-
? '1px solid rgba(255, 255, 255, 0.08)'
|
|
46
|
-
: '1px solid rgba(0, 0, 0, 0.08)',
|
|
47
|
-
boxShadow: colorMode === 'dark'
|
|
48
|
-
? '0 2px 4px -1px rgba(0, 0, 0, 0.2), 0 1px 2px -1px rgba(0, 0, 0, 0.1)'
|
|
49
|
-
: '0 2px 4px -1px rgba(0, 0, 0, 0.06), 0 1px 2px -1px rgba(0, 0, 0, 0.04)',
|
|
50
|
-
}}
|
|
51
|
-
>
|
|
52
|
-
{/* Subtle gradient overlay for depth */}
|
|
53
|
-
<div
|
|
54
|
-
className="absolute inset-0 opacity-30"
|
|
55
|
-
style={{
|
|
56
|
-
background: colorMode === 'dark'
|
|
57
|
-
? 'linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%)'
|
|
58
|
-
: 'linear-gradient(135deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.2) 100%)',
|
|
59
|
-
}}
|
|
60
|
-
/>
|
|
61
|
-
|
|
62
|
-
{/* Content container */}
|
|
63
|
-
<div className="relative z-10 p-4 sm:p-5 h-full flex flex-col">
|
|
64
|
-
{/* Title */}
|
|
65
|
-
<h2
|
|
66
|
-
id={`card-title-${title.toLowerCase().replace(/\s+/g, '-')}`}
|
|
67
|
-
className="text-base sm:text-lg font-semibold leading-tight mb-2 text-center"
|
|
68
|
-
style={{
|
|
69
|
-
color: textColor,
|
|
70
|
-
fontWeight: '600',
|
|
71
|
-
letterSpacing: '-0.015em',
|
|
72
|
-
}}
|
|
73
|
-
>
|
|
74
|
-
{title}
|
|
75
|
-
</h2>
|
|
76
|
-
|
|
77
|
-
{/* Header/Subtitle */}
|
|
78
|
-
{header && (
|
|
79
|
-
<div className="mb-3">
|
|
80
|
-
<h3
|
|
81
|
-
className="text-xs sm:text-sm font-medium italic text-center leading-snug"
|
|
82
|
-
style={{
|
|
83
|
-
color: headerColor,
|
|
84
|
-
fontWeight: '500',
|
|
85
|
-
}}
|
|
86
|
-
>
|
|
87
|
-
{header}
|
|
88
|
-
</h3>
|
|
89
|
-
</div>
|
|
90
|
-
)}
|
|
91
|
-
|
|
92
|
-
{/* Content */}
|
|
93
|
-
<div className="flex-1 flex items-center justify-center">
|
|
94
|
-
<p
|
|
95
|
-
className="text-xs sm:text-sm leading-relaxed text-center max-w-none"
|
|
96
|
-
style={{
|
|
97
|
-
color: textColor,
|
|
98
|
-
lineHeight: '1.5',
|
|
99
|
-
opacity: 0.85,
|
|
100
|
-
}}
|
|
101
|
-
>
|
|
102
|
-
{content}
|
|
103
|
-
</p>
|
|
104
|
-
</div>
|
|
105
|
-
</div>
|
|
106
|
-
|
|
107
|
-
{/* Hover effect border */}
|
|
108
|
-
<div
|
|
109
|
-
className="absolute inset-0 rounded-xl opacity-0 group-hover:opacity-60 transition-opacity duration-200 pointer-events-none"
|
|
110
|
-
style={{
|
|
111
|
-
border: '1px solid rgba(59, 130, 246, 0.2)',
|
|
112
|
-
}}
|
|
113
|
-
/>
|
|
114
|
-
</div>
|
|
115
|
-
</article>
|
|
116
|
-
);
|
|
117
|
-
};
|
package/dist/generators/add-documentation/templates/src/components/ui-shared/playground-card.tsx
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import React, { ReactNode, useState } from 'react';
|
|
2
|
-
|
|
3
|
-
interface PlaygroundCardProps {
|
|
4
|
-
title: string;
|
|
5
|
-
children: ReactNode;
|
|
6
|
-
icon?: ReactNode;
|
|
7
|
-
maxWidth?: string;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export const PlaygroundCard: React.FC<PlaygroundCardProps> = ({
|
|
11
|
-
title,
|
|
12
|
-
children,
|
|
13
|
-
icon,
|
|
14
|
-
maxWidth = '600px'
|
|
15
|
-
}) => {
|
|
16
|
-
const [isHovered, setIsHovered] = useState(false);
|
|
17
|
-
|
|
18
|
-
return (
|
|
19
|
-
<div
|
|
20
|
-
className="playground-card"
|
|
21
|
-
style={{
|
|
22
|
-
maxWidth,
|
|
23
|
-
margin: '2rem auto',
|
|
24
|
-
backgroundColor: isHovered ? 'var(--ifm-background-surface-color)' : 'var(--ifm-background-color)',
|
|
25
|
-
border: `1px solid ${isHovered ? 'var(--ifm-color-primary)' : 'var(--uc-border-color)'}`,
|
|
26
|
-
borderRadius: 'var(--ifm-card-border-radius)',
|
|
27
|
-
padding: '2rem',
|
|
28
|
-
textAlign: 'center',
|
|
29
|
-
transition: 'all 0.2s ease-in-out',
|
|
30
|
-
boxShadow: isHovered ? 'var(--ifm-global-shadow-md)' : 'var(--ifm-global-shadow-lw)',
|
|
31
|
-
transform: isHovered ? 'translateY(-2px)' : 'translateY(0)',
|
|
32
|
-
}}
|
|
33
|
-
onMouseEnter={() => setIsHovered(true)}
|
|
34
|
-
onMouseLeave={() => setIsHovered(false)}
|
|
35
|
-
>
|
|
36
|
-
{icon && (
|
|
37
|
-
<div style={{ marginBottom: '1rem' }}>
|
|
38
|
-
{icon}
|
|
39
|
-
</div>
|
|
40
|
-
)}
|
|
41
|
-
|
|
42
|
-
<h3
|
|
43
|
-
style={{
|
|
44
|
-
color: 'var(--ifm-heading-color)',
|
|
45
|
-
fontWeight: 'var(--ifm-heading-font-weight)',
|
|
46
|
-
marginBottom: '1rem',
|
|
47
|
-
fontSize: '1.25rem',
|
|
48
|
-
margin: '0 0 1rem 0'
|
|
49
|
-
}}
|
|
50
|
-
>
|
|
51
|
-
{title}
|
|
52
|
-
</h3>
|
|
53
|
-
|
|
54
|
-
<div
|
|
55
|
-
style={{
|
|
56
|
-
color: 'var(--ifm-color-content-secondary)',
|
|
57
|
-
lineHeight: 'var(--ifm-line-height-base)',
|
|
58
|
-
fontSize: '0.9rem'
|
|
59
|
-
}}
|
|
60
|
-
>
|
|
61
|
-
{children}
|
|
62
|
-
</div>
|
|
63
|
-
</div>
|
|
64
|
-
);
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
export default PlaygroundCard;
|
package/dist/generators/add-documentation/templates/src/components/ui-shared/use-color-mode.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { useMemo, useRef } from 'react';
|
|
2
|
-
import { useColorMode as useDocuColorMode } from '@docusaurus/theme-common';
|
|
3
|
-
import useIsBrowser from '@docusaurus/useIsBrowser';
|
|
4
|
-
|
|
5
|
-
export const useColorMode = () => {
|
|
6
|
-
const { colorMode } = useDocuColorMode();
|
|
7
|
-
const isBrowser = useIsBrowser();
|
|
8
|
-
const renderCount = useRef(0);
|
|
9
|
-
|
|
10
|
-
return useMemo(() => {
|
|
11
|
-
if (!isBrowser) {
|
|
12
|
-
return;
|
|
13
|
-
}
|
|
14
|
-
renderCount.current += 1;
|
|
15
|
-
if (renderCount.current === 1) {
|
|
16
|
-
return document.documentElement.getAttribute('data-theme');
|
|
17
|
-
}
|
|
18
|
-
return colorMode;
|
|
19
|
-
}, [colorMode, isBrowser]);
|
|
20
|
-
};
|