@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.
Files changed (92) hide show
  1. package/dist/head/css/loader-apple.css +1 -1
  2. package/dist/head/css/loader-dots.css +1 -1
  3. package/dist/head/css/themes/amber.css +1 -1
  4. package/dist/head/css/themes/arcade.css +1 -1
  5. package/dist/head/css/themes/grannysmith.css +1 -1
  6. package/dist/head/css/themes/honeycrisp.css +1 -1
  7. package/dist/head/css/themes/midnight.css +1 -1
  8. package/dist/head/css/themes/mulled.css +1 -1
  9. package/dist/node.mjs +1110 -28
  10. package/dist/theme/components/home/cta.css +15 -0
  11. package/dist/theme/components/home/cta.tsx +10 -2
  12. package/dist/theme/components/home/feature-card.css +1 -1
  13. package/dist/theme/components/home/feature-card.tsx +3 -2
  14. package/dist/theme/components/home/feature.tsx +34 -31
  15. package/dist/theme/components/home/hero-demo.css +11 -0
  16. package/dist/theme/components/home/home-visual.tsx +226 -0
  17. package/dist/theme/components/home/layout.tsx +350 -171
  18. package/dist/theme/components/home/split.css +46 -19
  19. package/dist/theme/components/home/split.tsx +28 -8
  20. package/dist/theme/components/home/tabs.css +299 -0
  21. package/dist/theme/components/home/tabs.tsx +351 -0
  22. package/dist/theme/components/home/trust-strip.css +41 -0
  23. package/dist/theme/components/home/trust-strip.tsx +168 -11
  24. package/dist/theme/components/home/workspaces.tsx +171 -69
  25. package/dist/theme/components/seo-head-data.test.ts +196 -0
  26. package/dist/theme/components/seo-head-data.ts +490 -0
  27. package/dist/theme/components/seo-head.tsx +102 -0
  28. package/dist/theme/components/shared/IssueLinkIcon.tsx +42 -0
  29. package/dist/theme/components/shared/issue-link.css +74 -0
  30. package/dist/theme/components/workspaces/card.css +4 -0
  31. package/dist/theme/components/workspaces/card.tsx +3 -3
  32. package/dist/theme/components/workspaces/grid.tsx +18 -6
  33. package/dist/theme/index.tsx +6 -0
  34. package/dist/theme/lib/rich-text-parse.ts +740 -0
  35. package/dist/theme/lib/rich-text.test.tsx +342 -0
  36. package/dist/theme/lib/rich-text.tsx +86 -0
  37. package/dist/theme/lib/seo-url.ts +28 -0
  38. package/dist/theme/styles/overrides/fonts.css +7 -4
  39. package/dist/theme/styles/overrides/home.css +11 -2
  40. package/dist/theme/styles/overrides/rspress.css +10 -5
  41. package/dist/theme/styles/overrides/tokens.css +41 -23
  42. package/dist/theme/styles/rich-text.css +106 -0
  43. package/dist/theme/styles/themes/amber.css +32 -2
  44. package/dist/theme/styles/themes/arcade.css +16 -1
  45. package/dist/theme/styles/themes/grannysmith.css +32 -2
  46. package/dist/theme/styles/themes/honeycrisp.css +37 -7
  47. package/dist/theme/styles/themes/midnight.css +16 -1
  48. package/dist/theme/styles/themes/mulled.css +54 -9
  49. package/package.json +6 -5
  50. package/src/theme/components/home/cta.css +15 -0
  51. package/src/theme/components/home/cta.tsx +10 -2
  52. package/src/theme/components/home/feature-card.css +1 -1
  53. package/src/theme/components/home/feature-card.tsx +3 -2
  54. package/src/theme/components/home/feature.tsx +34 -31
  55. package/src/theme/components/home/hero-demo.css +11 -0
  56. package/src/theme/components/home/home-visual.tsx +226 -0
  57. package/src/theme/components/home/layout.tsx +350 -171
  58. package/src/theme/components/home/split.css +46 -19
  59. package/src/theme/components/home/split.tsx +28 -8
  60. package/src/theme/components/home/tabs.css +299 -0
  61. package/src/theme/components/home/tabs.tsx +351 -0
  62. package/src/theme/components/home/trust-strip.css +41 -0
  63. package/src/theme/components/home/trust-strip.tsx +168 -11
  64. package/src/theme/components/home/workspaces.tsx +171 -69
  65. package/src/theme/components/seo-head-data.test.ts +196 -0
  66. package/src/theme/components/seo-head-data.ts +490 -0
  67. package/src/theme/components/seo-head.tsx +102 -0
  68. package/src/theme/components/shared/IssueLinkIcon.tsx +42 -0
  69. package/src/theme/components/shared/issue-link.css +74 -0
  70. package/src/theme/components/workspaces/card.css +4 -0
  71. package/src/theme/components/workspaces/card.tsx +3 -3
  72. package/src/theme/components/workspaces/grid.tsx +18 -6
  73. package/src/theme/index.tsx +6 -0
  74. package/src/theme/lib/rich-text-parse.ts +740 -0
  75. package/src/theme/lib/rich-text.test.tsx +342 -0
  76. package/src/theme/lib/rich-text.tsx +86 -0
  77. package/src/theme/lib/seo-url.ts +28 -0
  78. package/src/theme/styles/overrides/fonts.css +7 -4
  79. package/src/theme/styles/overrides/home.css +11 -2
  80. package/src/theme/styles/overrides/rspress.css +10 -5
  81. package/src/theme/styles/overrides/tokens.css +41 -23
  82. package/src/theme/styles/rich-text.css +106 -0
  83. package/src/theme/styles/themes/amber.css +32 -2
  84. package/src/theme/styles/themes/arcade.css +16 -1
  85. package/src/theme/styles/themes/grannysmith.css +32 -2
  86. package/src/theme/styles/themes/honeycrisp.css +37 -7
  87. package/src/theme/styles/themes/midnight.css +16 -1
  88. package/src/theme/styles/themes/mulled.css +54 -9
  89. package/dist/theme/components/home/hero-demo-custom.tsx +0 -116
  90. package/dist/theme/components/home/split-visual-custom.tsx +0 -26
  91. package/src/theme/components/home/hero-demo-custom.tsx +0 -116
  92. 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
- {name}
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: string
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: string
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
- <h2>{heading}</h2>
42
- <p className="cp-workspace-section__desc">{description}</p>
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>
@@ -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'