@conduction/docusaurus-preset 0.1.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.
Files changed (163) hide show
  1. package/MISSING_COMPONENTS.md +109 -0
  2. package/README.md +171 -0
  3. package/package.json +59 -0
  4. package/src/components/AgentTrace/AgentTrace.jsx +128 -0
  5. package/src/components/AgentTrace/AgentTrace.module.css +115 -0
  6. package/src/components/AppMock/AppMock.jsx +86 -0
  7. package/src/components/AppMock/AppMock.module.css +629 -0
  8. package/src/components/AppMock/variants/DeciDeskMock.jsx +71 -0
  9. package/src/components/AppMock/variants/DocuDeskMock.jsx +69 -0
  10. package/src/components/AppMock/variants/LarpingAppMock.jsx +59 -0
  11. package/src/components/AppMock/variants/MyDashBiMock.jsx +135 -0
  12. package/src/components/AppMock/variants/MyDashMock.jsx +96 -0
  13. package/src/components/AppMock/variants/MyDashTilesMock.jsx +103 -0
  14. package/src/components/AppMock/variants/MyDashWidgetsMock.jsx +123 -0
  15. package/src/components/AppMock/variants/NLDesignMock.jsx +70 -0
  16. package/src/components/AppMock/variants/OpenCatalogiMock.jsx +61 -0
  17. package/src/components/AppMock/variants/OpenConnectorMock.jsx +83 -0
  18. package/src/components/AppMock/variants/OpenRegisterMock.jsx +100 -0
  19. package/src/components/AppMock/variants/OpenWooMock.jsx +61 -0
  20. package/src/components/AppMock/variants/PipelinQMock.jsx +88 -0
  21. package/src/components/AppMock/variants/ProcestMock.jsx +87 -0
  22. package/src/components/AppMock/variants/SoftwareCatalogMock.jsx +71 -0
  23. package/src/components/AppMock/variants/ZaakAfhandelAppMock.jsx +71 -0
  24. package/src/components/AppsGrid/AppsGrid.jsx +84 -0
  25. package/src/components/AppsGrid/AppsGrid.module.css +46 -0
  26. package/src/components/AppsPreview/AppsPreview.jsx +85 -0
  27. package/src/components/AppsPreview/AppsPreview.module.css +128 -0
  28. package/src/components/Clients/Clients.jsx +205 -0
  29. package/src/components/Clients/Clients.module.css +166 -0
  30. package/src/components/ComposeBlock/ComposeBlock.jsx +70 -0
  31. package/src/components/ComposeBlock/ComposeBlock.module.css +74 -0
  32. package/src/components/ConductionBg/ConductionBg.jsx +150 -0
  33. package/src/components/ConductionBg/ConductionBg.module.css +41 -0
  34. package/src/components/ContentCard/ContentCard.jsx +126 -0
  35. package/src/components/ContentCard/ContentCard.module.css +84 -0
  36. package/src/components/ContentDetailHero/ContentDetailHero.jsx +136 -0
  37. package/src/components/ContentDetailHero/ContentDetailHero.module.css +96 -0
  38. package/src/components/ContentTypeFilter/ContentTypeFilter.jsx +103 -0
  39. package/src/components/ContentTypeFilter/ContentTypeFilter.module.css +60 -0
  40. package/src/components/ContentTypeFilter/contentTypes.js +58 -0
  41. package/src/components/CookieCli/CookieCli.jsx +223 -0
  42. package/src/components/CookieCli/CookieCli.module.css +166 -0
  43. package/src/components/CtaBanner/CtaBanner.jsx +61 -0
  44. package/src/components/CtaBanner/CtaBanner.module.css +65 -0
  45. package/src/components/DetailHero/DetailHero.jsx +143 -0
  46. package/src/components/DetailHero/DetailHero.module.css +154 -0
  47. package/src/components/Diagrams/Diagrams.jsx +148 -0
  48. package/src/components/EmployeeCard/EmployeeCard.jsx +127 -0
  49. package/src/components/EmployeeCard/EmployeeCard.module.css +144 -0
  50. package/src/components/ExternalAppShelf/ExternalAppShelf.jsx +61 -0
  51. package/src/components/ExternalAppShelf/ExternalAppShelf.module.css +90 -0
  52. package/src/components/FAQ/FAQ.jsx +42 -0
  53. package/src/components/FAQ/FAQ.module.css +74 -0
  54. package/src/components/FacetedFilters/FacetedFilters.jsx +125 -0
  55. package/src/components/FacetedFilters/FacetedFilters.module.css +133 -0
  56. package/src/components/FeatureGrid/FeatureGrid.jsx +94 -0
  57. package/src/components/FeatureGrid/FeatureGrid.module.css +114 -0
  58. package/src/components/FeatureList/FeatureList.jsx +54 -0
  59. package/src/components/FeatureList/FeatureList.module.css +52 -0
  60. package/src/components/FeaturedCard/FeaturedCard.jsx +101 -0
  61. package/src/components/FeaturedCard/FeaturedCard.module.css +98 -0
  62. package/src/components/GameModal/GameModal.jsx +197 -0
  63. package/src/components/GameModal/GameModal.module.css +184 -0
  64. package/src/components/Hero/Hero.jsx +101 -0
  65. package/src/components/Hero/Hero.module.css +95 -0
  66. package/src/components/HexBackground/HexBackground.jsx +56 -0
  67. package/src/components/HexBackground/HexBackground.module.css +73 -0
  68. package/src/components/HexNetwork/HexNetwork.jsx +141 -0
  69. package/src/components/HexNetwork/HexNetwork.module.css +187 -0
  70. package/src/components/HexRain/HexRain.jsx +81 -0
  71. package/src/components/HowSteps/HowSteps.jsx +57 -0
  72. package/src/components/HowSteps/HowSteps.module.css +52 -0
  73. package/src/components/ManagedCommonGround/ManagedCommonGround.jsx +78 -0
  74. package/src/components/ManagedCommonGround/ManagedCommonGround.module.css +16 -0
  75. package/src/components/NewsletterCta/NewsletterCta.jsx +83 -0
  76. package/src/components/NewsletterCta/NewsletterCta.module.css +103 -0
  77. package/src/components/PairCard/PairCard.jsx +58 -0
  78. package/src/components/PairCard/PairCard.module.css +54 -0
  79. package/src/components/PartnerCard/PartnerCard.jsx +130 -0
  80. package/src/components/PartnerCard/PartnerCard.module.css +198 -0
  81. package/src/components/PartnerDirectory/PartnerDirectory.jsx +122 -0
  82. package/src/components/PartnerDirectory/PartnerDirectory.module.css +25 -0
  83. package/src/components/PartnerSidecard/PartnerSidecard.jsx +116 -0
  84. package/src/components/PartnerSidecard/PartnerSidecard.module.css +185 -0
  85. package/src/components/Pipeline/Pipeline.jsx +198 -0
  86. package/src/components/Pipeline/Pipeline.module.css +206 -0
  87. package/src/components/PlatformDiagram/PlatformDiagram.jsx +110 -0
  88. package/src/components/PlatformOverview/PlatformOverview.jsx +68 -0
  89. package/src/components/PlatformOverview/PlatformOverview.module.css +71 -0
  90. package/src/components/ReferenceCard/ReferenceCard.jsx +44 -0
  91. package/src/components/ReferenceCard/ReferenceCard.module.css +57 -0
  92. package/src/components/RelatedPosts/RelatedPosts.jsx +58 -0
  93. package/src/components/RelatedPosts/RelatedPosts.module.css +51 -0
  94. package/src/components/RotatingCards/RotatingCards.jsx +98 -0
  95. package/src/components/RotatingCards/RotatingCards.module.css +153 -0
  96. package/src/components/Showcase/Showcase.jsx +129 -0
  97. package/src/components/Showcase/Showcase.module.css +168 -0
  98. package/src/components/SolutionCard/SolutionCard.jsx +83 -0
  99. package/src/components/SolutionCard/SolutionCard.module.css +99 -0
  100. package/src/components/StatsStrip/StatsStrip.jsx +38 -0
  101. package/src/components/StatsStrip/StatsStrip.module.css +53 -0
  102. package/src/components/WidgetShelf/WidgetShelf.jsx +67 -0
  103. package/src/components/WidgetShelf/WidgetShelf.module.css +73 -0
  104. package/src/components/index.js +96 -0
  105. package/src/components/primitives/AuthorByline.jsx +85 -0
  106. package/src/components/primitives/AuthorByline.module.css +57 -0
  107. package/src/components/primitives/BrandCitation.jsx +71 -0
  108. package/src/components/primitives/Button.jsx +46 -0
  109. package/src/components/primitives/Button.module.css +88 -0
  110. package/src/components/primitives/Card.jsx +42 -0
  111. package/src/components/primitives/Card.module.css +42 -0
  112. package/src/components/primitives/Eyebrow.jsx +37 -0
  113. package/src/components/primitives/Eyebrow.module.css +19 -0
  114. package/src/components/primitives/HexBullet.jsx +37 -0
  115. package/src/components/primitives/HexBullet.module.css +16 -0
  116. package/src/components/primitives/HexThumbnail.jsx +70 -0
  117. package/src/components/primitives/HexThumbnail.module.css +45 -0
  118. package/src/components/primitives/Pill.jsx +42 -0
  119. package/src/components/primitives/Pill.module.css +30 -0
  120. package/src/components/primitives/Section.jsx +51 -0
  121. package/src/components/primitives/Section.module.css +31 -0
  122. package/src/components/primitives/SectionHead.jsx +36 -0
  123. package/src/components/primitives/SectionHead.module.css +43 -0
  124. package/src/components/primitives/index.js +22 -0
  125. package/src/css/brand.css +158 -0
  126. package/src/css/tokens.css +12 -0
  127. package/src/data/app-downloads.js +42 -0
  128. package/src/diagrams/README.md +74 -0
  129. package/src/diagrams/cn-domain-tree.js +105 -0
  130. package/src/diagrams/cn-hex-prism.js +163 -0
  131. package/src/diagrams/cn-hex.js +181 -0
  132. package/src/diagrams/cn-honeycomb-bg.js +135 -0
  133. package/src/diagrams/cn-pipeline.js +150 -0
  134. package/src/diagrams/cn-platform.js +156 -0
  135. package/src/diagrams/cn-side-box.js +104 -0
  136. package/src/diagrams/index.js +28 -0
  137. package/src/index.js +183 -0
  138. package/src/theme/Footer/index.jsx +516 -0
  139. package/src/theme/MDXPage/index.jsx +134 -0
  140. package/src/theme/Navbar/index.jsx +120 -0
  141. package/src/theme/Navbar/styles.module.css +114 -0
  142. package/src/theme/brand.jsx +63 -0
  143. package/src/theme.js +45 -0
  144. package/src/utils/lazyScript.js +37 -0
  145. package/static/img/favicon.svg +14 -0
  146. package/static/img/honeycomb-scatter.svg +23 -0
  147. package/static/img/honeycomb-watermark.svg +108 -0
  148. package/static/img/logo-dark.svg +11 -0
  149. package/static/img/logo.svg +14 -0
  150. package/static/img/nextcloud-logo.svg +5 -0
  151. package/static/lib/canal-footer.css +418 -0
  152. package/static/lib/canal-footer.js +499 -0
  153. package/static/lib/clients-flow.js +317 -0
  154. package/static/lib/conduction-bg.css +50 -0
  155. package/static/lib/conduction-bg.js +122 -0
  156. package/static/lib/hex-rain.css +128 -0
  157. package/static/lib/hex-rain.js +284 -0
  158. package/static/lib/kade-cyclist.css +264 -0
  159. package/static/lib/kade-cyclist.js +420 -0
  160. package/static/lib/logo-memory.css +219 -0
  161. package/static/lib/logo-memory.js +540 -0
  162. package/static/lib/platform-diagram.css +458 -0
  163. package/static/lib/platform-diagram.js +414 -0
@@ -0,0 +1,150 @@
1
+ /**
2
+ * <cn-pipeline> — horizontal flow of prisms or hexes connected by arrows.
3
+ *
4
+ * The flattened cousin of cn-platform. Used in solution pages, how-
5
+ * it-works sections, and any sequence diagram where data moves
6
+ * left-to-right through a series of stages.
7
+ *
8
+ * <cn-pipeline>
9
+ * <cn-hex-prism family="coral">Source</cn-hex-prism>
10
+ * <cn-hex-prism family="lavender">Process</cn-hex-prism>
11
+ * <cn-hex-prism family="cobalt">Workspace</cn-hex-prism>
12
+ * <cn-hex-prism family="mint">Sink</cn-hex-prism>
13
+ * </cn-pipeline>
14
+ *
15
+ * The component reads its own light-DOM children, assigns each to a
16
+ * numbered slot, and inserts an arrow connector between consecutive
17
+ * pairs. Re-renders when children change.
18
+ *
19
+ * Slots
20
+ * default — pipeline stages, in left-to-right order
21
+ * caption — optional small text under the row
22
+ *
23
+ * Attributes
24
+ * tone — dotted | solid | dim (default: dotted)
25
+ * Arrow style.
26
+ * align — start | center | end (default: center)
27
+ * Vertical alignment of stages along the baseline.
28
+ */
29
+
30
+ class CnPipeline extends HTMLElement {
31
+ static get observedAttributes() { return ['tone', 'align']; }
32
+
33
+ constructor() {
34
+ super();
35
+ this.attachShadow({ mode: 'open' });
36
+ }
37
+
38
+ connectedCallback() {
39
+ this.render();
40
+ this._observer = new MutationObserver(() => this.render());
41
+ this._observer.observe(this, { childList: true });
42
+ }
43
+
44
+ disconnectedCallback() {
45
+ if (this._observer) this._observer.disconnect();
46
+ }
47
+
48
+ attributeChangedCallback() { if (this.shadowRoot) this.render(); }
49
+
50
+ render() {
51
+ const tone = this.getAttribute('tone') || 'dotted';
52
+ const align = this.getAttribute('align') || 'center';
53
+
54
+ /* Assign each light-DOM child a unique slot name so we can
55
+ interleave arrows between them in the shadow DOM. Skip the
56
+ caption slot. */
57
+ const stages = [...this.children].filter(
58
+ el => el.getAttribute('slot') !== 'caption'
59
+ );
60
+ stages.forEach((el, i) => { el.setAttribute('slot', `step-${i}`); });
61
+
62
+ const arrowDash = tone === 'solid' ? 'none'
63
+ : tone === 'dim' ? '2 4'
64
+ : '4 6';
65
+ const arrowColor = tone === 'dim' ? 'var(--c-cobalt-200)' : 'var(--c-cobalt-400)';
66
+
67
+ const arrowSvg = `
68
+ <svg class="arrow" viewBox="0 0 60 12" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
69
+ <line x1="0" y1="6" x2="48" y2="6" stroke="${arrowColor}" stroke-width="1.5"
70
+ stroke-linecap="round"
71
+ ${arrowDash !== 'none' ? `stroke-dasharray="${arrowDash}"` : ''}/>
72
+ <polyline points="42,1 50,6 42,11" fill="none" stroke="${arrowColor}"
73
+ stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
74
+ </svg>
75
+ `.trim();
76
+
77
+ let pipelineMarkup = '';
78
+ for (let i = 0; i < stages.length; i++) {
79
+ pipelineMarkup += `<slot name="step-${i}"></slot>`;
80
+ if (i < stages.length - 1) {
81
+ pipelineMarkup += arrowSvg;
82
+ }
83
+ }
84
+
85
+ this.shadowRoot.innerHTML = `
86
+ <style>
87
+ :host {
88
+ display: block;
89
+ font-family: var(--conduction-typography-font-family-body, system-ui, sans-serif);
90
+ }
91
+
92
+ .stage {
93
+ background: var(--c-cobalt-50);
94
+ border-radius: var(--radius-lg);
95
+ padding: var(--space-9) var(--space-7);
96
+ overflow-x: auto;
97
+ }
98
+
99
+ .row {
100
+ display: flex;
101
+ align-items: ${align === 'start' ? 'flex-start' : align === 'end' ? 'flex-end' : 'center'};
102
+ justify-content: center;
103
+ gap: var(--space-3);
104
+ flex-wrap: nowrap;
105
+ min-height: 200px;
106
+ }
107
+
108
+ .arrow {
109
+ width: 60px;
110
+ height: 12px;
111
+ flex-shrink: 0;
112
+ }
113
+
114
+ .caption {
115
+ margin-top: var(--space-5);
116
+ font-family: var(--conduction-typography-font-family-code, ui-monospace, monospace);
117
+ font-size: 11px;
118
+ letter-spacing: 0.08em;
119
+ text-transform: uppercase;
120
+ color: var(--c-cobalt-400);
121
+ text-align: center;
122
+ }
123
+ ::slotted([slot="caption"]) {
124
+ font-family: var(--conduction-typography-font-family-code, ui-monospace, monospace);
125
+ font-size: 11px;
126
+ letter-spacing: 0.08em;
127
+ color: var(--c-cobalt-400);
128
+ }
129
+
130
+ @media (max-width: 700px) {
131
+ .row { flex-wrap: wrap; }
132
+ .arrow { transform: rotate(90deg); width: 40px; }
133
+ }
134
+ </style>
135
+
136
+ <div class="stage">
137
+ <div class="row">
138
+ ${pipelineMarkup}
139
+ </div>
140
+ <div class="caption"><slot name="caption"></slot></div>
141
+ </div>
142
+ `;
143
+ }
144
+ }
145
+
146
+ if (!customElements.get('cn-pipeline')) {
147
+ customElements.define('cn-pipeline', CnPipeline);
148
+ }
149
+
150
+ export { CnPipeline };
@@ -0,0 +1,156 @@
1
+ /**
2
+ * <cn-platform> — workspace-plus-orbiting-apps cluster.
3
+ *
4
+ * The canonical "what is ConNext" diagram: a Nextcloud workspace at
5
+ * the centre, six application prisms arranged in a hex ring around
6
+ * it. Used on landing pages, product overviews, ecosystem visuals.
7
+ *
8
+ * Slots
9
+ * apex — central element; required (typically a cobalt cn-hex-prism).
10
+ * Same slot name as cn-domain-tree; "kernel" is a banned
11
+ * word in the brand vocabulary, see identity/voice.html.
12
+ * default — orbiting apps; up to six, positioned in this order:
13
+ * top-left, top-right, left, right, bottom-left, bottom-right
14
+ * caption — optional small text under the cluster
15
+ *
16
+ * Attributes
17
+ * ground — boolean; renders a soft platform shadow under the cluster
18
+ * tone — light | cobalt-50 | white (default: cobalt-50)
19
+ * Background of the surrounding stage.
20
+ *
21
+ * The component owns only layout + ground + optional connector ring.
22
+ * Each child element keeps its own styling, so the apex element can
23
+ * be a hex prism or a flat hex interchangeably.
24
+ */
25
+
26
+ class CnPlatform extends HTMLElement {
27
+ static get observedAttributes() { return ['ground', 'tone']; }
28
+
29
+ constructor() {
30
+ super();
31
+ this.attachShadow({ mode: 'open' });
32
+ }
33
+
34
+ connectedCallback() { this.render(); }
35
+ attributeChangedCallback() { if (this.shadowRoot) this.render(); }
36
+
37
+ render() {
38
+ const ground = this.hasAttribute('ground');
39
+ const tone = this.getAttribute('tone') || 'cobalt-50';
40
+
41
+ const stageBg = tone === 'white'
42
+ ? 'white'
43
+ : tone === 'light'
44
+ ? 'var(--c-cobalt-100)'
45
+ : 'var(--c-cobalt-50)';
46
+
47
+ this.shadowRoot.innerHTML = `
48
+ <style>
49
+ :host {
50
+ display: block;
51
+ font-family: var(--conduction-typography-font-family-body, system-ui, sans-serif);
52
+ }
53
+
54
+ .stage {
55
+ position: relative;
56
+ background: ${stageBg};
57
+ border-radius: var(--radius-lg);
58
+ padding: var(--space-9) var(--space-7);
59
+ overflow: hidden;
60
+ }
61
+
62
+ .grid {
63
+ display: grid;
64
+ grid-template-columns: repeat(5, 1fr);
65
+ grid-template-rows: repeat(3, auto);
66
+ gap: var(--space-3) var(--space-4);
67
+ justify-items: center;
68
+ align-items: center;
69
+ position: relative;
70
+ z-index: 1;
71
+ }
72
+
73
+ /* Apex (workspace) sits dead centre */
74
+ ::slotted([slot="apex"]) {
75
+ grid-column: 3;
76
+ grid-row: 2;
77
+ }
78
+
79
+ /* Six orbiting apps — assigned by nth-child of the default slot */
80
+ ::slotted(*:not([slot])) {
81
+ /* default cells fall outside the grid; positioned per-index below */
82
+ }
83
+ ::slotted(:nth-child(1):not([slot])) { grid-column: 2; grid-row: 1; }
84
+ ::slotted(:nth-child(2):not([slot])) { grid-column: 4; grid-row: 1; }
85
+ ::slotted(:nth-child(3):not([slot])) { grid-column: 1; grid-row: 2; }
86
+ ::slotted(:nth-child(4):not([slot])) { grid-column: 5; grid-row: 2; }
87
+ ::slotted(:nth-child(5):not([slot])) { grid-column: 2; grid-row: 3; }
88
+ ::slotted(:nth-child(6):not([slot])) { grid-column: 4; grid-row: 3; }
89
+
90
+ ${ground ? `
91
+ .ground {
92
+ position: absolute;
93
+ bottom: 8%;
94
+ left: 50%;
95
+ transform: translateX(-50%);
96
+ width: 80%;
97
+ height: 28px;
98
+ background: radial-gradient(ellipse at center,
99
+ rgba(33, 70, 139, 0.18) 0%,
100
+ transparent 70%);
101
+ z-index: 0;
102
+ pointer-events: none;
103
+ }
104
+ ` : ''}
105
+
106
+ .caption {
107
+ margin-top: var(--space-5);
108
+ font-family: var(--conduction-typography-font-family-code, ui-monospace, monospace);
109
+ font-size: 11px;
110
+ letter-spacing: 0.08em;
111
+ text-transform: uppercase;
112
+ color: var(--c-cobalt-400);
113
+ text-align: center;
114
+ }
115
+ ::slotted([slot="caption"]) {
116
+ font-family: var(--conduction-typography-font-family-code, ui-monospace, monospace);
117
+ font-size: 11px;
118
+ letter-spacing: 0.08em;
119
+ color: var(--c-cobalt-400);
120
+ }
121
+
122
+ @media (max-width: 700px) {
123
+ .grid {
124
+ grid-template-columns: 1fr 1fr;
125
+ grid-template-rows: auto;
126
+ }
127
+ ::slotted([slot="apex"]) { grid-column: 1 / -1; grid-row: 1; }
128
+ ::slotted(:nth-child(1):not([slot])),
129
+ ::slotted(:nth-child(2):not([slot])),
130
+ ::slotted(:nth-child(3):not([slot])),
131
+ ::slotted(:nth-child(4):not([slot])),
132
+ ::slotted(:nth-child(5):not([slot])),
133
+ ::slotted(:nth-child(6):not([slot])) {
134
+ grid-column: auto;
135
+ grid-row: auto;
136
+ }
137
+ }
138
+ </style>
139
+
140
+ <div class="stage">
141
+ ${ground ? '<div class="ground"></div>' : ''}
142
+ <div class="grid">
143
+ <slot name="apex"></slot>
144
+ <slot></slot>
145
+ </div>
146
+ <div class="caption"><slot name="caption"></slot></div>
147
+ </div>
148
+ `;
149
+ }
150
+ }
151
+
152
+ if (!customElements.get('cn-platform')) {
153
+ customElements.define('cn-platform', CnPlatform);
154
+ }
155
+
156
+ export { CnPlatform };
@@ -0,0 +1,104 @@
1
+ /**
2
+ * <cn-side-box> — the rectangle-feed-prism pattern.
3
+ *
4
+ * Hex prisms are "the system". Side-boxes are "what feeds it" or
5
+ * "what consumes it". The shape difference is the hierarchy.
6
+ *
7
+ * <cn-side-box header="YOUR DATA">
8
+ * <cn-side-row icon="..." label="Spreadsheets"/>
9
+ * <cn-side-row icon="..." label="Databases"/>
10
+ * <cn-side-row icon="..." label="REST & SOAP"/>
11
+ * <cn-side-row icon="..." label="Legacy systems"/>
12
+ * </cn-side-box>
13
+ *
14
+ * Slots
15
+ * default — rows of icon + label
16
+ * footer — optional "+ N more" line
17
+ *
18
+ * Attributes
19
+ * header — string; the small uppercase chip header
20
+ * compact — boolean; tighter row padding for dense diagrams
21
+ * width — sm (180px) | md (220px) | lg (260px) (default: md)
22
+ */
23
+
24
+ const WIDTHS = { sm: 180, md: 220, lg: 260 };
25
+
26
+ class CnSideBox extends HTMLElement {
27
+ static get observedAttributes() { return ['header', 'compact', 'width']; }
28
+
29
+ constructor() {
30
+ super();
31
+ this.attachShadow({ mode: 'open' });
32
+ }
33
+
34
+ connectedCallback() { this.render(); }
35
+ attributeChangedCallback() { if (this.shadowRoot) this.render(); }
36
+
37
+ render() {
38
+ const header = this.getAttribute('header') || '';
39
+ const compact = this.hasAttribute('compact');
40
+ const widthAttr = this.getAttribute('width') || 'md';
41
+ const widthPx = WIDTHS[widthAttr] ? `${WIDTHS[widthAttr]}px` : widthAttr;
42
+
43
+ this.shadowRoot.innerHTML = `
44
+ <style>
45
+ :host {
46
+ display: inline-block;
47
+ width: ${widthPx};
48
+ background: white;
49
+ border: 1px solid var(--c-cobalt-200);
50
+ border-radius: var(--radius-md);
51
+ padding: ${compact ? '10px 10px 12px' : '14px 14px 16px'};
52
+ font-family: var(--conduction-typography-font-family-body, system-ui, sans-serif);
53
+ }
54
+
55
+ .chip {
56
+ font-family: var(--conduction-typography-font-family-code, ui-monospace, monospace);
57
+ font-size: 10px;
58
+ letter-spacing: 0.16em;
59
+ text-transform: uppercase;
60
+ color: var(--c-cobalt-400);
61
+ margin-bottom: ${compact ? '8px' : '12px'};
62
+ }
63
+ .chip:empty { display: none; }
64
+
65
+ ::slotted(*) {
66
+ display: grid;
67
+ grid-template-columns: ${compact ? '20px' : '28px'} 1fr;
68
+ gap: ${compact ? '8px' : '12px'};
69
+ align-items: center;
70
+ padding: ${compact ? '4px 0' : '6px 0'};
71
+ font-size: ${compact ? '12px' : '13px'};
72
+ color: var(--c-cobalt-700);
73
+ }
74
+
75
+ ::slotted([slot="footer"]) {
76
+ margin-top: ${compact ? '6px' : '8px'};
77
+ padding-top: ${compact ? '6px' : '8px'};
78
+ border-top: 1px dashed var(--c-cobalt-200);
79
+ font-family: var(--conduction-typography-font-family-code, ui-monospace, monospace);
80
+ font-size: 11px;
81
+ color: var(--c-cobalt-400);
82
+ text-align: center;
83
+ display: block;
84
+ }
85
+ </style>
86
+
87
+ <div class="chip">${this._escape(header)}</div>
88
+ <slot></slot>
89
+ <slot name="footer"></slot>
90
+ `;
91
+ }
92
+
93
+ _escape(s) {
94
+ return String(s).replace(/[<>&"']/g, c => ({
95
+ '<': '&lt;', '>': '&gt;', '&': '&amp;', '"': '&quot;', "'": '&#39;'
96
+ }[c]));
97
+ }
98
+ }
99
+
100
+ if (!customElements.get('cn-side-box')) {
101
+ customElements.define('cn-side-box', CnSideBox);
102
+ }
103
+
104
+ export { CnSideBox };
@@ -0,0 +1,28 @@
1
+ /**
2
+ * @conduction/diagrams
3
+ *
4
+ * Brand-strict diagram primitives as web components.
5
+ * Importing this module registers every <cn-*> element on the page.
6
+ *
7
+ * Usage (no build step):
8
+ * <script type="module" src="../diagrams/src/index.js"></script>
9
+ * <cn-hex color="cobalt" size="lg">Connect</cn-hex>
10
+ * <cn-hex-prism family="coral" size="lg">Catalogi</cn-hex-prism>
11
+ *
12
+ * Components:
13
+ * <cn-hex> — pointy-top hex primitive (label + icon)
14
+ * <cn-hex-prism> — 3D isometric prism, the atomic unit for platform diagrams
15
+ * <cn-domain-tree> — vertical apex-and-branches layout for domain maps
16
+ * <cn-platform> — workspace-plus-orbiting-apps cluster
17
+ * <cn-pipeline> — horizontal flow of stages connected by arrows
18
+ * <cn-side-box> — rectangle-feed-prism pattern for non-app surfaces
19
+ * <cn-honeycomb-bg> — honeycomb backdrop wrapper for hero scenes
20
+ */
21
+
22
+ export * from './cn-hex.js';
23
+ export * from './cn-hex-prism.js';
24
+ export * from './cn-domain-tree.js';
25
+ export * from './cn-platform.js';
26
+ export * from './cn-pipeline.js';
27
+ export * from './cn-side-box.js';
28
+ export * from './cn-honeycomb-bg.js';
package/src/index.js ADDED
@@ -0,0 +1,183 @@
1
+ /**
2
+ * @conduction/docusaurus-preset
3
+ *
4
+ * Brand-default Docusaurus 3 config helper. Sites import createConfig()
5
+ * and override only the parts that differ from the brand baseline.
6
+ *
7
+ * // docusaurus.config.js
8
+ * const { createConfig } = require('@conduction/docusaurus-preset');
9
+ *
10
+ * module.exports = createConfig({
11
+ * title: 'Conduction',
12
+ * tagline: 'Open-source apps for the Nextcloud workspace.',
13
+ * url: 'https://conduction.nl',
14
+ * baseUrl: '/',
15
+ * });
16
+ *
17
+ * createConfig() returns a complete Docusaurus config with brand tokens,
18
+ * the four-locale i18n block (nl/en/de/fr, NL default), Plex Mono +
19
+ * Figtree fonts, and Navbar / Footer scaffolding. Sites override any
20
+ * field by passing it in or merging after the call.
21
+ */
22
+
23
+ const path = require('path');
24
+
25
+ /**
26
+ * Brand-default i18n block. Nederlands at the URL root, others at /en/, /de/, /fr/.
27
+ */
28
+ const I18N = {
29
+ defaultLocale: 'nl',
30
+ locales: ['nl', 'en', 'de', 'fr'],
31
+ localeConfigs: {
32
+ nl: { label: 'Nederlands', htmlLang: 'nl-NL', direction: 'ltr' },
33
+ en: { label: 'English', htmlLang: 'en-GB', direction: 'ltr' },
34
+ de: { label: 'Deutsch', htmlLang: 'de-DE', direction: 'ltr' },
35
+ fr: { label: 'Français', htmlLang: 'fr-FR', direction: 'ltr' },
36
+ },
37
+ };
38
+
39
+ /**
40
+ * Brand-default navbar. Sites pass their own items[] and logo; the chrome
41
+ * styling (cobalt-on-white, Plex-Mono caption) is locked.
42
+ */
43
+ const baseNavbar = (siteName) => ({
44
+ title: siteName,
45
+ logo: {
46
+ alt: `${siteName} avatar`,
47
+ src: 'img/logo.svg',
48
+ srcDark: 'img/logo-dark.svg',
49
+ },
50
+ items: [
51
+ { type: 'localeDropdown', position: 'right' },
52
+ { href: 'https://github.com/ConductionNL', label: 'GitHub', position: 'right' },
53
+ ],
54
+ });
55
+
56
+ /**
57
+ * Brand-default footer. Cobalt-900 panel with three-column link grid +
58
+ * the standard Conduction tells (KvK, BTW, EUPL/MIT licence).
59
+ */
60
+ const baseFooter = () => ({
61
+ style: 'dark',
62
+ links: [
63
+ {
64
+ title: 'Product',
65
+ items: [
66
+ { label: 'ConNext', href: 'https://conduction.nl/connext' },
67
+ { label: 'Common Ground', href: 'https://conduction.nl/commonground' },
68
+ { label: 'App store', href: 'https://apps.conduction.nl/' },
69
+ { label: 'Common Ground hosting', href: 'https://commonground.nu/' },
70
+ ],
71
+ },
72
+ {
73
+ title: 'Conduction',
74
+ items: [
75
+ { label: 'About', href: 'https://conduction.nl/about' },
76
+ { label: 'Open source', href: 'https://conduction.nl/about#opensource' },
77
+ { label: 'Team', href: 'https://conduction.nl/about#team' },
78
+ { label: 'ISO', href: 'https://conduction.nl/iso' },
79
+ ],
80
+ },
81
+ {
82
+ title: 'Documentatie',
83
+ items: [
84
+ { label: 'Brand book', href: 'https://connext.conduction.nl/' },
85
+ { label: 'Diagram set', href: 'https://connext.conduction.nl/diagrams/' },
86
+ ],
87
+ },
88
+ ],
89
+ copyright: `Conduction B.V. · KvK 76741850 · BTW NL860784241B01 · IBAN NL51 ABNA 0868951550 · Lauriergracht 14h, 1016 RR Amsterdam · ${new Date().getFullYear()}`,
90
+ });
91
+
92
+ /**
93
+ * Build a complete Docusaurus config from a small set of site-specific opts.
94
+ *
95
+ * Required:
96
+ * title, tagline, url, baseUrl
97
+ *
98
+ * Optional:
99
+ * organizationName, projectName, navbar (deep-merged into base),
100
+ * footer (replaces base), customCss[] (appended to brand.css),
101
+ * plugins[], presets, i18n (overrides defaults)
102
+ */
103
+ function createConfig(opts) {
104
+ if (!opts || !opts.title || !opts.url) {
105
+ throw new Error(
106
+ '@conduction/docusaurus-preset: createConfig() requires { title, tagline, url, baseUrl }'
107
+ );
108
+ }
109
+
110
+ /* brand.css is injected globally by the theme plugin (./theme.js) via
111
+ getClientModules(), so customCss carries site-specific CSS only. */
112
+ const customCss = opts.customCss || [];
113
+
114
+ return {
115
+ title: opts.title,
116
+ tagline: opts.tagline || '',
117
+ favicon: opts.favicon || 'img/favicon.svg',
118
+ url: opts.url,
119
+ baseUrl: opts.baseUrl || '/',
120
+ trailingSlash: true,
121
+
122
+ organizationName: opts.organizationName || 'ConductionNL',
123
+ projectName: opts.projectName || 'design-system',
124
+
125
+ onBrokenLinks: 'warn',
126
+ onBrokenMarkdownLinks: 'warn',
127
+
128
+ /* Two static roots, in increasing-precedence order:
129
+ 1. preset's own ../static (lib/canal-footer, conduction-bg, hex-rain,
130
+ platform-diagram + brand img/favicon, logo, logo-dark, nextcloud-logo)
131
+ 2. site's own static/ (CNAME, site-specific images, overrides)
132
+ Last wins per-file, so a site can drop its own /img/logo.svg into
133
+ static/img/logo.svg to override the brand default. */
134
+ staticDirectories: opts.staticDirectories || [
135
+ path.resolve(__dirname, '..', 'static'),
136
+ 'static',
137
+ ],
138
+
139
+ i18n: opts.i18n || I18N,
140
+
141
+ presets: opts.presets || [
142
+ [
143
+ 'classic',
144
+ {
145
+ docs: {
146
+ sidebarPath: './sidebars.js',
147
+ editUrl: opts.editUrl,
148
+ },
149
+ blog: opts.blog === false ? false : {
150
+ showReadingTime: true,
151
+ blogTitle: opts.title + ' blog',
152
+ blogDescription: 'Updates from Conduction',
153
+ },
154
+ theme: {
155
+ customCss,
156
+ },
157
+ },
158
+ ],
159
+ ],
160
+
161
+ /* Brand theme: registers ./theme/* swizzles (Navbar, Footer, …)
162
+ and auto-loads brand.css. Site-specific themes can be added by
163
+ passing themes: [...] in opts (this default is replaced wholesale). */
164
+ themes: opts.themes || [require.resolve('./theme.js')],
165
+
166
+ themeConfig: Object.assign(
167
+ {
168
+ colorMode: {
169
+ defaultMode: 'light',
170
+ disableSwitch: false,
171
+ respectPrefersColorScheme: true,
172
+ },
173
+ navbar: Object.assign(baseNavbar(opts.title), opts.navbar || {}),
174
+ footer: opts.footer || baseFooter(),
175
+ },
176
+ opts.themeConfig || {}
177
+ ),
178
+
179
+ plugins: opts.plugins || [],
180
+ };
181
+ }
182
+
183
+ module.exports = { createConfig, I18N, baseNavbar, baseFooter };