@ciderpress/ui 1.0.0-rc.10 → 1.0.0-rc.12
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/head/css/loader-apple.css +1 -1
- package/dist/head/css/loader-dots.css +1 -1
- package/dist/head/css/themes/amber.css +1 -1
- package/dist/head/css/themes/arcade.css +1 -1
- package/dist/head/css/themes/grannysmith.css +1 -1
- package/dist/head/css/themes/honeycrisp.css +1 -1
- package/dist/head/css/themes/midnight.css +1 -1
- package/dist/head/css/themes/mulled.css +1 -1
- package/dist/node.mjs +1110 -28
- package/dist/theme/components/home/cta.css +15 -0
- package/dist/theme/components/home/cta.tsx +10 -2
- package/dist/theme/components/home/feature-card.css +1 -1
- package/dist/theme/components/home/feature-card.tsx +3 -2
- package/dist/theme/components/home/feature.tsx +34 -31
- package/dist/theme/components/home/hero-demo.css +11 -0
- package/dist/theme/components/home/home-visual.tsx +226 -0
- package/dist/theme/components/home/layout.tsx +350 -171
- package/dist/theme/components/home/split.css +46 -19
- package/dist/theme/components/home/split.tsx +28 -8
- package/dist/theme/components/home/tabs.css +299 -0
- package/dist/theme/components/home/tabs.tsx +351 -0
- package/dist/theme/components/home/trust-strip.css +41 -0
- package/dist/theme/components/home/trust-strip.tsx +168 -11
- package/dist/theme/components/home/workspaces.tsx +171 -69
- package/dist/theme/components/seo-head-data.test.ts +196 -0
- package/dist/theme/components/seo-head-data.ts +490 -0
- package/dist/theme/components/seo-head.tsx +102 -0
- package/dist/theme/components/shared/IssueLinkIcon.tsx +42 -0
- package/dist/theme/components/shared/issue-link.css +74 -0
- package/dist/theme/components/workspaces/card.css +4 -0
- package/dist/theme/components/workspaces/card.tsx +3 -3
- package/dist/theme/components/workspaces/grid.tsx +18 -6
- package/dist/theme/index.tsx +6 -0
- package/dist/theme/lib/rich-text-parse.ts +740 -0
- package/dist/theme/lib/rich-text.test.tsx +342 -0
- package/dist/theme/lib/rich-text.tsx +86 -0
- package/dist/theme/lib/seo-url.ts +28 -0
- package/dist/theme/styles/overrides/fonts.css +7 -4
- package/dist/theme/styles/overrides/home.css +11 -2
- package/dist/theme/styles/overrides/rspress.css +10 -5
- package/dist/theme/styles/overrides/tokens.css +41 -23
- package/dist/theme/styles/rich-text.css +106 -0
- package/dist/theme/styles/themes/amber.css +32 -2
- package/dist/theme/styles/themes/arcade.css +16 -1
- package/dist/theme/styles/themes/grannysmith.css +32 -2
- package/dist/theme/styles/themes/honeycrisp.css +37 -7
- package/dist/theme/styles/themes/midnight.css +16 -1
- package/dist/theme/styles/themes/mulled.css +54 -9
- package/package.json +6 -5
- package/src/theme/components/home/cta.css +15 -0
- package/src/theme/components/home/cta.tsx +10 -2
- package/src/theme/components/home/feature-card.css +1 -1
- package/src/theme/components/home/feature-card.tsx +3 -2
- package/src/theme/components/home/feature.tsx +34 -31
- package/src/theme/components/home/hero-demo.css +11 -0
- package/src/theme/components/home/home-visual.tsx +226 -0
- package/src/theme/components/home/layout.tsx +350 -171
- package/src/theme/components/home/split.css +46 -19
- package/src/theme/components/home/split.tsx +28 -8
- package/src/theme/components/home/tabs.css +299 -0
- package/src/theme/components/home/tabs.tsx +351 -0
- package/src/theme/components/home/trust-strip.css +41 -0
- package/src/theme/components/home/trust-strip.tsx +168 -11
- package/src/theme/components/home/workspaces.tsx +171 -69
- package/src/theme/components/seo-head-data.test.ts +196 -0
- package/src/theme/components/seo-head-data.ts +490 -0
- package/src/theme/components/seo-head.tsx +102 -0
- package/src/theme/components/shared/IssueLinkIcon.tsx +42 -0
- package/src/theme/components/shared/issue-link.css +74 -0
- package/src/theme/components/workspaces/card.css +4 -0
- package/src/theme/components/workspaces/card.tsx +3 -3
- package/src/theme/components/workspaces/grid.tsx +18 -6
- package/src/theme/index.tsx +6 -0
- package/src/theme/lib/rich-text-parse.ts +740 -0
- package/src/theme/lib/rich-text.test.tsx +342 -0
- package/src/theme/lib/rich-text.tsx +86 -0
- package/src/theme/lib/seo-url.ts +28 -0
- package/src/theme/styles/overrides/fonts.css +7 -4
- package/src/theme/styles/overrides/home.css +11 -2
- package/src/theme/styles/overrides/rspress.css +10 -5
- package/src/theme/styles/overrides/tokens.css +41 -23
- package/src/theme/styles/rich-text.css +106 -0
- package/src/theme/styles/themes/amber.css +32 -2
- package/src/theme/styles/themes/arcade.css +16 -1
- package/src/theme/styles/themes/grannysmith.css +32 -2
- package/src/theme/styles/themes/honeycrisp.css +37 -7
- package/src/theme/styles/themes/midnight.css +16 -1
- package/src/theme/styles/themes/mulled.css +54 -9
- package/dist/theme/components/home/hero-demo-custom.tsx +0 -116
- package/dist/theme/components/home/split-visual-custom.tsx +0 -26
- package/src/theme/components/home/hero-demo-custom.tsx +0 -116
- package/src/theme/components/home/split-visual-custom.tsx +0 -26
|
@@ -69,6 +69,10 @@
|
|
|
69
69
|
font-size: 15px;
|
|
70
70
|
font-weight: 700;
|
|
71
71
|
color: var(--cp-c-text-1);
|
|
72
|
+
/* Presentational lowercase. Done here rather than in JS because the
|
|
73
|
+
title may carry inline markup — lowercasing the source would also
|
|
74
|
+
lowercase link targets and class names inside it. */
|
|
75
|
+
text-transform: lowercase;
|
|
72
76
|
}
|
|
73
77
|
|
|
74
78
|
.cp-workspace-card__desc {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { match, P } from 'massaman/match'
|
|
2
2
|
import type React from 'react'
|
|
3
3
|
|
|
4
|
+
import { renderRichText } from '../../lib/rich-text.tsx'
|
|
4
5
|
import { Card } from '../shared/card'
|
|
5
6
|
import { CardIcon } from '../shared/card-icon'
|
|
6
7
|
import type { CardIconInput } from '../shared/resolve-card-icon'
|
|
@@ -65,7 +66,6 @@ export function WorkspaceCard({
|
|
|
65
66
|
titleLines,
|
|
66
67
|
descriptionLines,
|
|
67
68
|
}: WorkspaceCardProps): React.ReactElement {
|
|
68
|
-
const name = title.toLowerCase()
|
|
69
69
|
const resolved = resolveCardIcon(icon)
|
|
70
70
|
|
|
71
71
|
const iconEl = match(resolved)
|
|
@@ -93,7 +93,7 @@ export function WorkspaceCard({
|
|
|
93
93
|
className={clampClass('cp-workspace-card__desc', descriptionLines)}
|
|
94
94
|
style={clampStyle(descriptionLines)}
|
|
95
95
|
>
|
|
96
|
-
{d}
|
|
96
|
+
{renderRichText(d)}
|
|
97
97
|
</span>
|
|
98
98
|
))
|
|
99
99
|
.otherwise(() => null)
|
|
@@ -122,7 +122,7 @@ export function WorkspaceCard({
|
|
|
122
122
|
className={clampClass('cp-workspace-card__name', titleLines)}
|
|
123
123
|
style={clampStyle(titleLines)}
|
|
124
124
|
>
|
|
125
|
-
{
|
|
125
|
+
{renderRichText(title)}
|
|
126
126
|
</span>
|
|
127
127
|
</div>
|
|
128
128
|
</div>
|
|
@@ -1,16 +1,21 @@
|
|
|
1
|
+
import { match, P } from 'massaman/match'
|
|
1
2
|
import type React from 'react'
|
|
2
3
|
|
|
4
|
+
import { renderRichText } from '../../lib/rich-text.tsx'
|
|
5
|
+
|
|
3
6
|
import './card.css'
|
|
4
7
|
|
|
5
8
|
export interface WorkspaceGridProps {
|
|
6
9
|
/**
|
|
7
|
-
* Section heading (e.g. "Apps", "Packages").
|
|
10
|
+
* Section heading (e.g. "Apps", "Packages"). Omitted for an ungrouped
|
|
11
|
+
* grid, such as a showcase block with an explicit `source` list.
|
|
8
12
|
*/
|
|
9
|
-
readonly heading
|
|
13
|
+
readonly heading?: string
|
|
10
14
|
/**
|
|
11
|
-
* Brief description rendered below the heading.
|
|
15
|
+
* Brief description rendered below the heading. Omitted for an
|
|
16
|
+
* ungrouped grid.
|
|
12
17
|
*/
|
|
13
|
-
readonly description
|
|
18
|
+
readonly description?: string
|
|
14
19
|
/**
|
|
15
20
|
* Number of grid columns.
|
|
16
21
|
*/
|
|
@@ -38,8 +43,15 @@ export function WorkspaceGrid({
|
|
|
38
43
|
|
|
39
44
|
return (
|
|
40
45
|
<>
|
|
41
|
-
|
|
42
|
-
|
|
46
|
+
{/* Rich text, matching the card titles and descriptions this grid
|
|
47
|
+
wraps — a group heading was the one string in the block that
|
|
48
|
+
showed its `**markers**` literally. */}
|
|
49
|
+
{match(heading)
|
|
50
|
+
.with(P.string, (h) => <h2>{renderRichText(h)}</h2>)
|
|
51
|
+
.otherwise(() => null)}
|
|
52
|
+
{match(description)
|
|
53
|
+
.with(P.string, (d) => <p className="cp-workspace-section__desc">{renderRichText(d)}</p>)
|
|
54
|
+
.otherwise(() => null)}
|
|
43
55
|
<div className="cp-workspace-grid" style={style}>
|
|
44
56
|
{children}
|
|
45
57
|
</div>
|
package/src/theme/index.tsx
CHANGED
|
@@ -23,6 +23,7 @@ import './styles/layers.css'
|
|
|
23
23
|
import './styles/overrides/fonts.css'
|
|
24
24
|
import './styles/overrides/tokens.css'
|
|
25
25
|
import './styles/overrides/rspress.css'
|
|
26
|
+
import './styles/rich-text.css'
|
|
26
27
|
// Theme color palettes — scoped via [data-cp-theme][data-cp-variant] selectors.
|
|
27
28
|
// `mulled.css` ships first because it is `DEFAULT_THEME_NAME` — its rules emit
|
|
28
29
|
// the `:root { ... }` FOUC fallback that paints before JS hydrates the
|
|
@@ -72,6 +73,7 @@ import './components/openapi/openapi.css'
|
|
|
72
73
|
import './components/shared/accordion.css'
|
|
73
74
|
import './components/shared/columns.css'
|
|
74
75
|
import './components/shared/status-badge.css'
|
|
76
|
+
import './components/shared/issue-link.css'
|
|
75
77
|
import './components/shared/frame.css'
|
|
76
78
|
import './components/shared/tooltip.css'
|
|
77
79
|
import './components/shared/prompt.css'
|
|
@@ -106,6 +108,10 @@ export { TrustStrip } from './components/home/trust-strip'
|
|
|
106
108
|
export type { TrustStripProps } from './components/home/trust-strip'
|
|
107
109
|
export { HomeSplit } from './components/home/split'
|
|
108
110
|
export type { SplitProps, SplitAction } from './components/home/split'
|
|
111
|
+
export { HomeTabs } from './components/home/tabs'
|
|
112
|
+
export { RichText, renderRichText } from './lib/rich-text.tsx'
|
|
113
|
+
export { hasAccentMarker, toPlainText } from './lib/rich-text-parse.ts'
|
|
114
|
+
export type { HomeTabsProps, HomeTabEntry, TabsAction } from './components/home/tabs'
|
|
109
115
|
export { CTA } from './components/home/cta'
|
|
110
116
|
export type { CTAProps } from './components/home/cta'
|
|
111
117
|
export { WorkspaceCard } from './components/workspaces/card'
|