@ciderpress/ui 1.0.0-rc.10 → 1.0.0-rc.11

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 (80) 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 +408 -15
  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/workspaces/card.css +4 -0
  26. package/dist/theme/components/workspaces/card.tsx +3 -3
  27. package/dist/theme/components/workspaces/grid.tsx +18 -6
  28. package/dist/theme/index.tsx +5 -0
  29. package/dist/theme/lib/rich-text-parse.ts +740 -0
  30. package/dist/theme/lib/rich-text.test.tsx +342 -0
  31. package/dist/theme/lib/rich-text.tsx +86 -0
  32. package/dist/theme/styles/overrides/fonts.css +7 -4
  33. package/dist/theme/styles/overrides/home.css +11 -2
  34. package/dist/theme/styles/overrides/rspress.css +10 -5
  35. package/dist/theme/styles/overrides/tokens.css +41 -23
  36. package/dist/theme/styles/rich-text.css +106 -0
  37. package/dist/theme/styles/themes/amber.css +32 -2
  38. package/dist/theme/styles/themes/arcade.css +16 -1
  39. package/dist/theme/styles/themes/grannysmith.css +32 -2
  40. package/dist/theme/styles/themes/honeycrisp.css +37 -7
  41. package/dist/theme/styles/themes/midnight.css +16 -1
  42. package/dist/theme/styles/themes/mulled.css +54 -9
  43. package/package.json +3 -3
  44. package/src/theme/components/home/cta.css +15 -0
  45. package/src/theme/components/home/cta.tsx +10 -2
  46. package/src/theme/components/home/feature-card.css +1 -1
  47. package/src/theme/components/home/feature-card.tsx +3 -2
  48. package/src/theme/components/home/feature.tsx +34 -31
  49. package/src/theme/components/home/hero-demo.css +11 -0
  50. package/src/theme/components/home/home-visual.tsx +226 -0
  51. package/src/theme/components/home/layout.tsx +350 -171
  52. package/src/theme/components/home/split.css +46 -19
  53. package/src/theme/components/home/split.tsx +28 -8
  54. package/src/theme/components/home/tabs.css +299 -0
  55. package/src/theme/components/home/tabs.tsx +351 -0
  56. package/src/theme/components/home/trust-strip.css +41 -0
  57. package/src/theme/components/home/trust-strip.tsx +168 -11
  58. package/src/theme/components/home/workspaces.tsx +171 -69
  59. package/src/theme/components/workspaces/card.css +4 -0
  60. package/src/theme/components/workspaces/card.tsx +3 -3
  61. package/src/theme/components/workspaces/grid.tsx +18 -6
  62. package/src/theme/index.tsx +5 -0
  63. package/src/theme/lib/rich-text-parse.ts +740 -0
  64. package/src/theme/lib/rich-text.test.tsx +342 -0
  65. package/src/theme/lib/rich-text.tsx +86 -0
  66. package/src/theme/styles/overrides/fonts.css +7 -4
  67. package/src/theme/styles/overrides/home.css +11 -2
  68. package/src/theme/styles/overrides/rspress.css +10 -5
  69. package/src/theme/styles/overrides/tokens.css +41 -23
  70. package/src/theme/styles/rich-text.css +106 -0
  71. package/src/theme/styles/themes/amber.css +32 -2
  72. package/src/theme/styles/themes/arcade.css +16 -1
  73. package/src/theme/styles/themes/grannysmith.css +32 -2
  74. package/src/theme/styles/themes/honeycrisp.css +37 -7
  75. package/src/theme/styles/themes/midnight.css +16 -1
  76. package/src/theme/styles/themes/mulled.css +54 -9
  77. package/dist/theme/components/home/hero-demo-custom.tsx +0 -116
  78. package/dist/theme/components/home/split-visual-custom.tsx +0 -26
  79. package/src/theme/components/home/hero-demo-custom.tsx +0 -116
  80. package/src/theme/components/home/split-visual-custom.tsx +0 -26
@@ -1,26 +0,0 @@
1
- import type React from 'react'
2
-
3
- interface CustomSplitVisualProps {
4
- readonly code: string
5
- readonly language?: string
6
- }
7
-
8
- /**
9
- * Custom Split visual — renders a user-supplied code snippet inside the
10
- * same `<pre>` shell as the default `ConfigPreview`. Language hint is
11
- * surfaced as a `data-language` attribute so themes can hook into it
12
- * for syntax-highlighter overlays. No client-side highlighting is
13
- * performed in the framework (keeps the bundle slim); the rendered
14
- * `<pre>` matches the default surface so themes that style the
15
- * default block also style the custom one.
16
- *
17
- * @param props - Code snippet + optional language hint
18
- * @returns Pre-formatted code block
19
- */
20
- export function CustomSplitVisual(props: CustomSplitVisualProps): React.ReactElement {
21
- return (
22
- <pre data-language={props.language ?? 'ts'} className="cp-split__code">
23
- {props.code}
24
- </pre>
25
- )
26
- }
@@ -1,116 +0,0 @@
1
- import type { HomeHeroDemoConfig, HomeHeroDemoLine, HomeHeroDemoTerminal } from '@ciderpress/config'
2
- import { match } from 'massaman/match'
3
- import type React from 'react'
4
-
5
- import { withMountBase } from '../../lib/with-mount-base.ts'
6
-
7
- import './hero-demo.css'
8
-
9
- interface CustomHeroDemoProps {
10
- readonly config: HomeHeroDemoConfig
11
- }
12
-
13
- /**
14
- * Custom replacement for `<HeroDemo />`. Driven by `home.hero.demo` from
15
- * `ciderpress.config.ts`:
16
- *
17
- * - **Image form** (`{ src, alt, width?, height? }`) — renders an
18
- * `<img>` inside the framework's framed `cp-hero-demo` container
19
- * (rounded corners + brand-soft glow shadow preserved).
20
- * - **Terminal form** (`{ windowTitle?, command, lines }`) — keeps the
21
- * fake-macOS chrome but paints the user's command + output lines.
22
- *
23
- * The discriminator is structural: image objects carry `src`, terminal
24
- * objects carry `lines`.
25
- *
26
- * @param props - Validated `HomeHeroDemoConfig`
27
- * @returns Custom hero demo element
28
- */
29
- export function CustomHeroDemo(props: CustomHeroDemoProps): React.ReactElement {
30
- return match(props.config)
31
- .when(
32
- (c): c is HomeHeroDemoTerminal => 'lines' in c,
33
- (c) => <CustomTerminal config={c} />
34
- )
35
- .otherwise((c) => (
36
- <div className="cp-hero-demo cp-hero-demo--image">
37
- <img
38
- src={withMountBase(c.src)}
39
- alt={c.alt ?? ''}
40
- width={c.width}
41
- height={c.height}
42
- className="cp-hero-demo__img"
43
- />
44
- </div>
45
- ))
46
- }
47
-
48
- interface CustomTerminalProps {
49
- readonly config: HomeHeroDemoTerminal
50
- }
51
-
52
- /**
53
- * Render the terminal-form hero demo with user-supplied command + lines.
54
- *
55
- * @private
56
- * @param props - Validated terminal config
57
- * @returns Terminal-shell hero demo element
58
- */
59
- function CustomTerminal(props: CustomTerminalProps): React.ReactElement {
60
- const { windowTitle, command, lines } = props.config
61
- return (
62
- <div className="cp-hero-demo">
63
- <div className="cp-hero-demo__bar">
64
- <span className="cp-hero-demo__dot" />
65
- <span className="cp-hero-demo__dot" />
66
- <span className="cp-hero-demo__dot" />
67
- {match(windowTitle)
68
- .with(undefined, () => null)
69
- .otherwise((t) => (
70
- <span className="cp-hero-demo__title">{t}</span>
71
- ))}
72
- </div>
73
- <pre className="cp-hero-demo__body">
74
- <span className="cp-hero-demo__prompt">$ </span>
75
- {command}
76
- {'\n\n'}
77
- {lines.map((line, i) => (
78
- <TerminalLine key={`${line.kind}-${i}`} line={line} />
79
- ))}
80
- </pre>
81
- </div>
82
- )
83
- }
84
-
85
- interface TerminalLineProps {
86
- readonly line: HomeHeroDemoLine
87
- }
88
-
89
- /**
90
- * Render a single line of the structured terminal hero demo. Each
91
- * kind gets a coloured prefix glyph mirroring the framework default.
92
- *
93
- * @private
94
- * @param props - Single line entry
95
- * @returns Glyph-prefixed line followed by a newline
96
- */
97
- function TerminalLine(props: TerminalLineProps): React.ReactElement {
98
- const className = match(props.line.kind)
99
- .with('ok', () => 'cp-hero-demo__ok')
100
- .with('info', () => 'cp-hero-demo__info')
101
- .with('cmt', () => 'cp-hero-demo__cmt')
102
- .with('err', () => 'cp-hero-demo__err')
103
- .exhaustive()
104
- const glyph = match(props.line.kind)
105
- .with('ok', () => ' ✓')
106
- .with('info', () => ' ▸')
107
- .with('cmt', () => ' ↻')
108
- .with('err', () => ' ✗')
109
- .exhaustive()
110
- return (
111
- <>
112
- <span className={className}>{glyph}</span> {props.line.text}
113
- {'\n'}
114
- </>
115
- )
116
- }
@@ -1,26 +0,0 @@
1
- import type React from 'react'
2
-
3
- interface CustomSplitVisualProps {
4
- readonly code: string
5
- readonly language?: string
6
- }
7
-
8
- /**
9
- * Custom Split visual — renders a user-supplied code snippet inside the
10
- * same `<pre>` shell as the default `ConfigPreview`. Language hint is
11
- * surfaced as a `data-language` attribute so themes can hook into it
12
- * for syntax-highlighter overlays. No client-side highlighting is
13
- * performed in the framework (keeps the bundle slim); the rendered
14
- * `<pre>` matches the default surface so themes that style the
15
- * default block also style the custom one.
16
- *
17
- * @param props - Code snippet + optional language hint
18
- * @returns Pre-formatted code block
19
- */
20
- export function CustomSplitVisual(props: CustomSplitVisualProps): React.ReactElement {
21
- return (
22
- <pre data-language={props.language ?? 'ts'} className="cp-split__code">
23
- {props.code}
24
- </pre>
25
- )
26
- }