@conduction/docusaurus-preset 3.18.0 → 3.20.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@conduction/docusaurus-preset",
3
- "version": "3.18.0",
3
+ "version": "3.20.0",
4
4
  "scripts": {
5
5
  "prepack": "node scripts/prepack-bundle-css.js"
6
6
  },
@@ -0,0 +1,84 @@
1
+ /**
2
+ * <PullQuote />
3
+ *
4
+ * Editorial emphasis for long-form prose. Lifts one or two load-
5
+ * bearing sentences out of an opinion piece, product page, or
6
+ * academy post into an orange-bordered cobalt panel. Optional
7
+ * attribution slot turns the pull-quote into a citable position.
8
+ *
9
+ * Use sparingly. One to three per page; on the sentences that
10
+ * carry the argument. The hero variant is for a single citable
11
+ * thesis near the top of the post.
12
+ *
13
+ * Variants:
14
+ * - "default" — orange-knvb left border, cobalt-50 fill,
15
+ * italic cobalt body. Drop into MDX between paragraphs.
16
+ * - "hero" — larger (28px), no italics, eyebrow hex bullet.
17
+ * Use once per page for the thesis statement.
18
+ * - "compact" — smaller (16px), tighter padding. For sidebars
19
+ * or dense layouts.
20
+ *
21
+ * Usage:
22
+ *
23
+ * <PullQuote>
24
+ * You buy a suite. You use a workspace. You inhabit a platform.
25
+ * </PullQuote>
26
+ *
27
+ * <PullQuote
28
+ * attribution="Ruben van der Linde"
29
+ * role="CTO Conduction"
30
+ * >
31
+ * Nextcloud-as-platform is true today in every structural sense
32
+ * that matters.
33
+ * </PullQuote>
34
+ *
35
+ * <PullQuote
36
+ * variant="hero"
37
+ * eyebrow="The thesis"
38
+ * attribution="Ruben van der Linde"
39
+ * role="CTO Conduction"
40
+ * >
41
+ * Tomorrow's functionality will not be built by vendors. It will
42
+ * be built by users with AI. In that world, scale wins.
43
+ * </PullQuote>
44
+ *
45
+ * Mirrors preview/components/pull-quote.html.
46
+ */
47
+
48
+ import React from 'react';
49
+ import styles from './PullQuote.module.css';
50
+
51
+ export default function PullQuote({
52
+ children,
53
+ attribution,
54
+ role,
55
+ variant = 'default',
56
+ eyebrow,
57
+ className,
58
+ }) {
59
+ const composed = [
60
+ styles.quote,
61
+ variant === 'hero' && styles.hero,
62
+ variant === 'compact' && styles.compact,
63
+ className,
64
+ ].filter(Boolean).join(' ');
65
+
66
+ return (
67
+ <blockquote className={composed}>
68
+ {variant === 'hero' && eyebrow && (
69
+ <span className={styles.eyebrow}>
70
+ <span className={styles.eyebrowHex} aria-hidden="true" />
71
+ {eyebrow}
72
+ </span>
73
+ )}
74
+ {typeof children === 'string' ? <p>{children}</p> : children}
75
+ {(attribution || role) && (
76
+ <cite className={styles.cite}>
77
+ {attribution && <span className={styles.citeName}>{attribution}</span>}
78
+ {attribution && role && ', '}
79
+ {role}
80
+ </cite>
81
+ )}
82
+ </blockquote>
83
+ );
84
+ }
@@ -0,0 +1,78 @@
1
+ /**
2
+ * <PullQuote /> styles. Editorial emphasis for long-form prose:
3
+ * opinion pieces, product pages, academy blog posts. Orange-knvb
4
+ * left border, cobalt-50 fill, italic cobalt body, code-font cite.
5
+ *
6
+ * Mirrors preview/components/pull-quote.html and lifts the
7
+ * cg-pullquote pattern from conduction.nl/commonground into a
8
+ * reusable component.
9
+ */
10
+
11
+ .quote {
12
+ position: relative;
13
+ border-left: 4px solid var(--c-orange-knvb);
14
+ background: var(--c-cobalt-50);
15
+ padding: var(--space-5) var(--space-6);
16
+ margin: var(--space-7) 0;
17
+ border-radius: 0 var(--radius-md) var(--radius-md) 0;
18
+ font-family: var(--conduction-typography-font-family-body);
19
+ font-size: 22px;
20
+ font-weight: 500;
21
+ color: var(--c-blue-cobalt);
22
+ line-height: 1.4;
23
+ font-style: italic;
24
+ }
25
+
26
+ .quote p { margin: 0; }
27
+ .quote p + p { margin-top: var(--space-3); }
28
+
29
+ .cite {
30
+ display: block;
31
+ margin-top: var(--space-4);
32
+ font-family: var(--conduction-typography-font-family-code);
33
+ font-size: 11px;
34
+ font-style: normal;
35
+ font-weight: 400;
36
+ text-transform: uppercase;
37
+ letter-spacing: 0.06em;
38
+ color: var(--c-cobalt-700);
39
+ }
40
+
41
+ .citeName {
42
+ color: var(--c-cobalt-900);
43
+ }
44
+
45
+ /* Hero variant — larger, eyebrow hex, no italics. For one citable
46
+ position statement near the top of an opinion piece. */
47
+ .hero {
48
+ font-size: 28px;
49
+ font-style: normal;
50
+ padding: var(--space-7) var(--space-8);
51
+ }
52
+
53
+ .eyebrow {
54
+ display: inline-flex;
55
+ align-items: center;
56
+ gap: 8px;
57
+ font-family: var(--conduction-typography-font-family-code);
58
+ font-size: 11px;
59
+ font-style: normal;
60
+ font-weight: 400;
61
+ text-transform: uppercase;
62
+ letter-spacing: 0.08em;
63
+ color: var(--c-cobalt-700);
64
+ margin-bottom: var(--space-4);
65
+ }
66
+
67
+ .eyebrowHex {
68
+ width: 10px;
69
+ height: 12px;
70
+ clip-path: var(--hex-pointy-top);
71
+ background: var(--c-orange-knvb);
72
+ }
73
+
74
+ /* Compact variant — sidebar pull-out, lighter weight. */
75
+ .compact {
76
+ font-size: 16px;
77
+ padding: var(--space-4) var(--space-5);
78
+ }
@@ -0,0 +1,81 @@
1
+ /**
2
+ * <SetupSteps /> + <SetupStep />
3
+ *
4
+ * Vertical numbered-step list for docs setup/install/walkthrough
5
+ * sections and editorial action prompts. A small orange hex with a
6
+ * white number sits on the left of each row; bold title + one short
7
+ * body paragraph sit on the right.
8
+ *
9
+ * Distinct from <HowSteps />, which renders a 3-up card row for
10
+ * marketing surfaces (How install works, How to get help, …).
11
+ * SetupSteps lives in body prose where steps are sequential and
12
+ * detailed, and the list reads top to bottom.
13
+ *
14
+ * Numbers are auto-assigned in document order. Pass `start` to
15
+ * resume after a break (e.g. a continued procedure split across
16
+ * sections).
17
+ *
18
+ * Usage:
19
+ *
20
+ * <SetupSteps title="Setup" lede="Numbered steps you read top to bottom.">
21
+ * <SetupStep title="Add an xWiki source">
22
+ * Open *Integrations → Sources → New source*, paste the base URL.
23
+ * </SetupStep>
24
+ * <SetupStep title="Pick the spaces to index">
25
+ * Per source, choose one or more xWiki spaces.
26
+ * </SetupStep>
27
+ * <SetupStep title="Verify">
28
+ * Open the app's chat sidebar and ask a matching question.
29
+ * </SetupStep>
30
+ * </SetupSteps>
31
+ *
32
+ * // Editorial / action-prompt use, no h2 above the list:
33
+ * <SetupSteps title={null}>
34
+ * <SetupStep title="Call Nextcloud by its proper name.">
35
+ * In tenders, in policy documents, in architecture diagrams.
36
+ * </SetupStep>
37
+ * ...
38
+ * </SetupSteps>
39
+ *
40
+ * Mirrors preview/components/setup-steps.html.
41
+ */
42
+
43
+ import React, {Children, cloneElement, isValidElement} from 'react';
44
+ import styles from './SetupSteps.module.css';
45
+
46
+ export function SetupStep({number, title, children, className}) {
47
+ const composed = [styles.row, className].filter(Boolean).join(' ');
48
+ return (
49
+ <div className={composed}>
50
+ {number != null && <div className={styles.num}>{number}</div>}
51
+ {/* div not p: MDX may wrap inline children in its own <p>,
52
+ which would be invalid nested inside another <p>. */}
53
+ <div className={styles.body}>
54
+ {title && <span className={styles.bodyTitle}>{title}</span>}
55
+ {children}
56
+ </div>
57
+ </div>
58
+ );
59
+ }
60
+
61
+ export default function SetupSteps({
62
+ title,
63
+ lede,
64
+ start = 1,
65
+ children,
66
+ className,
67
+ }) {
68
+ const numbered = Children.map(children, (child, i) => {
69
+ if (!isValidElement(child)) return child;
70
+ if (child.props.number != null) return child;
71
+ return cloneElement(child, {number: start + i});
72
+ });
73
+ const composed = [styles.wrap, className].filter(Boolean).join(' ');
74
+ return (
75
+ <section className={composed}>
76
+ {title && <h2 className={styles.title}>{title}</h2>}
77
+ {lede && <p className={styles.lede}>{lede}</p>}
78
+ {numbered}
79
+ </section>
80
+ );
81
+ }
@@ -0,0 +1,82 @@
1
+ /**
2
+ * <SetupSteps /> + <SetupStep /> styles. Vertical numbered-row
3
+ * pattern for docs setup/install/walkthrough sections and editorial
4
+ * action lists. Small orange hex with a white number on the left,
5
+ * bold title + one short body paragraph on the right.
6
+ *
7
+ * Distinct from <HowSteps /> which is a 3-up card row for marketing
8
+ * surfaces. SetupSteps lives inside body prose, so steps stack
9
+ * vertically and read like sentences in a list.
10
+ *
11
+ * Mirrors preview/components/setup-steps.html.
12
+ */
13
+
14
+ .wrap {
15
+ margin: var(--space-7) 0;
16
+ font-family: var(--conduction-typography-font-family-body);
17
+ }
18
+
19
+ .title {
20
+ font-size: 28px;
21
+ font-weight: 700;
22
+ letter-spacing: -0.01em;
23
+ color: var(--c-cobalt-900);
24
+ margin: 0 0 var(--space-3);
25
+ line-height: 1.2;
26
+ }
27
+
28
+ .lede {
29
+ font-size: 16px;
30
+ line-height: 1.6;
31
+ color: var(--c-cobalt-700);
32
+ margin: 0 0 var(--space-5);
33
+ max-width: 60ch;
34
+ }
35
+
36
+ .row {
37
+ display: flex;
38
+ align-items: flex-start;
39
+ gap: var(--space-4);
40
+ margin: var(--space-4) 0;
41
+ }
42
+
43
+ .num {
44
+ width: 36px;
45
+ height: 42px;
46
+ clip-path: var(--hex-pointy-top);
47
+ background: var(--c-orange-knvb);
48
+ color: white;
49
+ display: flex;
50
+ align-items: center;
51
+ justify-content: center;
52
+ font-weight: 600;
53
+ flex-shrink: 0;
54
+ }
55
+
56
+ .body {
57
+ font-size: 14px;
58
+ line-height: 1.55;
59
+ color: var(--c-cobalt-700);
60
+ }
61
+
62
+ .body strong,
63
+ .bodyTitle {
64
+ display: block;
65
+ margin-bottom: 4px;
66
+ color: var(--c-cobalt-900);
67
+ font-size: 17px;
68
+ font-weight: 600;
69
+ }
70
+
71
+ .body p {
72
+ margin: 0;
73
+ }
74
+
75
+ .body code {
76
+ background: var(--c-cobalt-50);
77
+ padding: 1px 6px;
78
+ border-radius: 3px;
79
+ font-family: var(--conduction-typography-font-family-code);
80
+ font-size: 13px;
81
+ color: var(--c-cobalt-900);
82
+ }
@@ -48,6 +48,7 @@ export {default as ReferenceCard, ReferenceGrid} from './ReferenceCard/Reference
48
48
  export {default as PairCard, PairRow} from './PairCard/PairCard.jsx';
49
49
  export {default as FeatureList, FeatureItem} from './FeatureList/FeatureList.jsx';
50
50
  export {default as HowSteps, HowStep} from './HowSteps/HowSteps.jsx';
51
+ export {default as SetupSteps, SetupStep} from './SetupSteps/SetupSteps.jsx';
51
52
  export {default as FAQ, FAQItem} from './FAQ/FAQ.jsx';
52
53
  export {default as EmployeeCard, TeamGrid} from './EmployeeCard/EmployeeCard.jsx';
53
54
  export {default as DetailHero} from './DetailHero/DetailHero.jsx';
@@ -133,6 +134,7 @@ export {
133
134
  patterns that academy tutorials kept duplicating. Designed for use
134
135
  inside an MDX academy post body. */
135
136
  export {default as HexCard} from './HexCard/HexCard.jsx';
137
+ export {default as PullQuote} from './PullQuote/PullQuote.jsx';
136
138
  export {default as Outcomes, Outcome} from './Outcomes/Outcomes.jsx';
137
139
  export {default as Prerequisites, PrerequisiteItem} from './Prerequisites/Prerequisites.jsx';
138
140
  export {default as Troubleshooting, TroubleshootingItem} from './Troubleshooting/Troubleshooting.jsx';