@amedia/brick-mcp 0.0.1-LLM-DOCS → 0.0.1-NEW-PATH-1

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 (65) hide show
  1. package/README.md +241 -98
  2. package/dist/data/components/brick-actions.json +6 -0
  3. package/dist/data/components/brick-alt-teaser.json +10 -0
  4. package/dist/data/components/brick-avatar.json +11 -0
  5. package/dist/data/components/brick-button.json +12 -0
  6. package/dist/data/components/brick-card.json +10 -0
  7. package/dist/data/components/brick-carousel.json +11 -0
  8. package/dist/data/components/brick-classnames.json +10 -0
  9. package/dist/data/components/brick-countdown.json +7 -0
  10. package/dist/data/components/brick-dialog.json +11 -0
  11. package/dist/data/components/brick-fonts.json +10 -0
  12. package/dist/data/components/brick-helloworld.json +7 -0
  13. package/dist/data/components/brick-icon.json +10 -0
  14. package/dist/data/components/brick-icons.json +11 -0
  15. package/dist/data/components/brick-illustrations.json +7 -0
  16. package/dist/data/components/brick-image.json +10 -0
  17. package/dist/data/components/brick-input.json +12 -0
  18. package/{data → dist/data}/components/brick-mcp.json +1 -1
  19. package/dist/data/components/brick-nifs.json +7 -0
  20. package/{data → dist/data}/components/brick-pill.json +1 -1
  21. package/{data → dist/data}/components/brick-player.json +1 -1
  22. package/dist/data/components/brick-published.json +7 -0
  23. package/{data → dist/data}/components/brick-share.json +1 -1
  24. package/{data → dist/data}/components/brick-stepper.json +1 -1
  25. package/{data → dist/data}/components/brick-tab.json +1 -1
  26. package/{data → dist/data}/components/brick-tabs.json +1 -1
  27. package/{data → dist/data}/components/brick-tag.json +1 -1
  28. package/{data → dist/data}/components/brick-teaser-player.json +1 -1
  29. package/{data → dist/data}/components/brick-teaser-reels.json +1 -1
  30. package/{data → dist/data}/components/brick-teaser.json +1 -1
  31. package/{data → dist/data}/components/brick-textarea.json +1 -1
  32. package/{data → dist/data}/components/brick-toast.json +1 -1
  33. package/{data → dist/data}/components/brick-toggle.json +1 -1
  34. package/{data → dist/data}/components/brick-tokens.json +1 -1
  35. package/{data → dist/data}/components/brick-tooltip.json +1 -1
  36. package/{data → dist/data}/components-metadata.json +29 -29
  37. package/dist/data/components.json +321 -0
  38. package/dist/http.js +311 -0
  39. package/dist/http.js.map +7 -0
  40. package/dist/index.js +52 -81
  41. package/dist/index.js.map +4 -4
  42. package/package.json +3 -6
  43. package/scripts/generate-data.js +37 -40
  44. package/data/components/brick-actions.md +0 -59
  45. package/data/components/brick-alt-teaser.md +0 -253
  46. package/data/components/brick-avatar.md +0 -265
  47. package/data/components/brick-button.md +0 -364
  48. package/data/components/brick-card.md +0 -329
  49. package/data/components/brick-carousel.md +0 -330
  50. package/data/components/brick-classnames.md +0 -150
  51. package/data/components/brick-countdown.md +0 -179
  52. package/data/components/brick-dialog.md +0 -418
  53. package/data/components/brick-fonts.md +0 -335
  54. package/data/components/brick-helloworld.md +0 -202
  55. package/data/components/brick-icon.md +0 -271
  56. package/data/components/brick-icons.md +0 -430
  57. package/data/components/brick-illustrations.md +0 -552
  58. package/data/components/brick-image.md +0 -335
  59. package/data/components/brick-input.md +0 -521
  60. package/data/components/brick-nifs.md +0 -163
  61. package/data/components/brick-published.json +0 -7
  62. package/data/tokens-documentation.json +0 -7
  63. /package/{data → dist/data}/components/brick-template.json +0 -0
  64. /package/{data → dist/data}/components/brick-themes.json +0 -0
  65. /package/{data → dist/data}/tokens.json +0 -0
@@ -1,335 +0,0 @@
1
- ---
2
- name: brick-fonts
3
- version: 2.0.2
4
- category: Resources
5
- tags: [fonts, typography, web-fonts, font-face, css, theming, woff2]
6
- use_cases: [typography, branding, theme-implementation, font-loading, multi-brand]
7
- related: [brick-tokens]
8
- ---
9
-
10
- # Brick Fonts
11
-
12
- Distribution package for Amedia's web fonts, providing theme-specific font files and font-face CSS declarations optimized for CDN delivery via Eik.
13
-
14
- ## Key Capabilities
15
-
16
- - Serves font files (.woff2) and font-face CSS for 5 different Amedia themes
17
- - Optimized font delivery via Eik CDN (assets.acdn.no)
18
- - Supports version pinning for performance optimization
19
- - Uses font-display: swap for improved loading performance
20
- - Includes both proprietary and open-source fonts
21
- - Automatic integration with Maelstrom-served applications
22
-
23
- ## Supported Themes and Font Families
24
-
25
- ### Alfa
26
- - National2 (light, regular, italic, medium, bold)
27
- - National2 Narrow (regular, bold)
28
- - Open Sans (300, 400, 700 with italic variants)
29
- - Playfair Display (variable font 400-900)
30
- - Tiempos Text
31
-
32
- ### Bravo
33
- - National2 (light, regular, italic, medium, bold)
34
- - National2 Narrow (regular, bold, extrabold)
35
- - Open Sans (300, 400, 700 with italic variants)
36
- - Playfair Display (variable font 400-900)
37
- - Merriweather (bold)
38
- - Tiempos Headline
39
-
40
- ### Charlie
41
- - National2 (multiple weights)
42
- - National2 Narrow
43
- - Open Sans
44
- - Playfair Display
45
- - Tiempos Headline (regular, bold)
46
- - Tiempos Text
47
-
48
- ### Nettavisen
49
- - FaktorTittel (regular, medium, black)
50
- - FaktorSans (regular, bold, italic)
51
- - FaktorSerif (regular, bold with italic variants)
52
- - Open Sans (300, 400, 700 with italic variants)
53
-
54
- ### Alt
55
- - ALT Rund Display
56
- - ALT Rund Text
57
- - Crimson Pro
58
-
59
- ## Installation Methods
60
-
61
- ### Via Maelstrom (Automatic)
62
-
63
- If your application is served through Maelstrom, fonts are automatically available. Simply use font-family declarations in your CSS:
64
-
65
- ```css
66
- body {
67
- font-family: 'National2', sans-serif;
68
- }
69
-
70
- h1 {
71
- font-family: 'Playfair Display', serif;
72
- }
73
- ```
74
-
75
- ### Via CDN Link (Manual)
76
-
77
- For applications not using Maelstrom, include the font-face CSS via link element:
78
-
79
- ```html
80
- <!-- Using version alias (easier to update) -->
81
- <link rel="stylesheet" href="https://assets.acdn.no/pkg/@amedia/brick-fonts/v2/css/bravo/font-face.css">
82
-
83
- <!-- Using pinned version (better performance) -->
84
- <link rel="stylesheet" href="https://assets.acdn.no/pkg/@amedia/brick-fonts/2.0.2/css/nettavisen/font-face.css">
85
- ```
86
-
87
- ### Via NPM
88
-
89
- ```bash
90
- npm install @amedia/brick-fonts
91
- ```
92
-
93
- ```javascript
94
- import { bravo, nettavisen } from '@amedia/brick-fonts';
95
- // Exports paths to sample font files for testing
96
- ```
97
-
98
- ## CDN URLs by Theme
99
-
100
- ```
101
- https://assets.acdn.no/pkg/@amedia/brick-fonts/v2/css/alfa/font-face.css
102
- https://assets.acdn.no/pkg/@amedia/brick-fonts/v2/css/bravo/font-face.css
103
- https://assets.acdn.no/pkg/@amedia/brick-fonts/v2/css/charlie/font-face.css
104
- https://assets.acdn.no/pkg/@amedia/brick-fonts/v2/css/nettavisen/font-face.css
105
- https://assets.acdn.no/pkg/@amedia/brick-fonts/v2/css/alt/font-face.css
106
- ```
107
-
108
- ## Examples
109
-
110
- ### Basic Theme Font Loading
111
-
112
- ```html
113
- <!DOCTYPE html>
114
- <html>
115
- <head>
116
- <link rel="stylesheet" href="https://assets.acdn.no/pkg/@amedia/brick-fonts/2.0.2/css/bravo/font-face.css">
117
- <style>
118
- body {
119
- font-family: 'National2', sans-serif;
120
- font-weight: 400;
121
- }
122
-
123
- h1 {
124
- font-family: 'National2 Narrow', sans-serif;
125
- font-weight: 700;
126
- }
127
- </style>
128
- </head>
129
- <body>
130
- <h1>Headline with National2 Narrow</h1>
131
- <p>Body text with National2</p>
132
- </body>
133
- </html>
134
- ```
135
-
136
- ### Multiple Theme Support (Multi-brand Application)
137
-
138
- ```html
139
- <head>
140
- <!-- Load fonts for multiple brands -->
141
- <link rel="stylesheet" href="https://assets.acdn.no/pkg/@amedia/brick-fonts/2.0.2/css/bravo/font-face.css">
142
- <link rel="stylesheet" href="https://assets.acdn.no/pkg/@amedia/brick-fonts/2.0.2/css/nettavisen/font-face.css">
143
-
144
- <style>
145
- .bravo-theme {
146
- font-family: 'National2', sans-serif;
147
- }
148
-
149
- .nettavisen-theme {
150
- font-family: 'FaktorSans', sans-serif;
151
- }
152
-
153
- .nettavisen-theme h1 {
154
- font-family: 'FaktorTittel', sans-serif;
155
- font-weight: 900;
156
- }
157
- </style>
158
- </head>
159
- ```
160
-
161
- ### Using Variable Fonts
162
-
163
- ```css
164
- .headline {
165
- font-family: 'Playfair Display', serif;
166
- font-weight: 600; /* Any value between 400-900 */
167
- }
168
-
169
- .subheadline {
170
- font-family: 'Playfair Display', serif;
171
- font-weight: 800; /* Smoothly interpolated */
172
- }
173
- ```
174
-
175
- ### Storybook Configuration
176
-
177
- ```html
178
- <!-- .storybook/preview-head.html -->
179
- <link rel="stylesheet" href="https://assets.acdn.no/pkg/@amedia/brick-fonts/v2/css/alfa/font-face.css">
180
- <link rel="stylesheet" href="https://assets.acdn.no/pkg/@amedia/brick-fonts/v2/css/bravo/font-face.css">
181
- <link rel="stylesheet" href="https://assets.acdn.no/pkg/@amedia/brick-fonts/v2/css/charlie/font-face.css">
182
- <link rel="stylesheet" href="https://assets.acdn.no/pkg/@amedia/brick-fonts/v2/css/nettavisen/font-face.css">
183
- <link rel="stylesheet" href="https://assets.acdn.no/pkg/@amedia/brick-fonts/v2/css/alt/font-face.css">
184
- ```
185
-
186
- ## Performance Optimization
187
-
188
- ### Version Pinning vs Aliasing
189
-
190
- **Using version alias (v2)**
191
- ```html
192
- <link rel="stylesheet" href="https://assets.acdn.no/pkg/@amedia/brick-fonts/v2/css/bravo/font-face.css">
193
- ```
194
- - Easier to maintain (automatic updates to latest v2.x.x)
195
- - Performance cost: creates critical request chain (alias → CSS → font files)
196
- - Lighthouse may warn about chained requests
197
-
198
- **Using pinned version (2.0.2)**
199
- ```html
200
- <link rel="stylesheet" href="https://assets.acdn.no/pkg/@amedia/brick-fonts/2.0.2/css/bravo/font-face.css">
201
- ```
202
- - Better performance (direct CSS → font files)
203
- - Requires manual version updates
204
- - Recommended for production
205
-
206
- ### Font Loading Strategy
207
-
208
- All fonts use `font-display: swap` which:
209
- - Shows fallback font immediately
210
- - Swaps to web font when loaded
211
- - Prevents invisible text (FOIT)
212
- - Improves perceived performance
213
-
214
- ## Font File Structure
215
-
216
- ### CSS Files
217
- ```
218
- css/
219
- ├── alfa/
220
- │ └── font-face.css
221
- ├── bravo/
222
- │ └── font-face.css
223
- ├── charlie/
224
- │ └── font-face.css
225
- ├── nettavisen/
226
- │ └── font-face.css
227
- └── alt/
228
- └── font-face.css
229
- ```
230
-
231
- ### Font Files
232
- ```
233
- fonts/
234
- ├── alfa/
235
- │ ├── national-2-light.woff2
236
- │ ├── national-2-regular.woff2
237
- │ └── ... (24 total files)
238
- ├── bravo/
239
- │ ├── national-2-bold.woff2
240
- │ ├── national-2-narrow-regular.woff2
241
- │ └── ... (19 total files)
242
- ├── charlie/
243
- │ └── ... (23 total files)
244
- ├── nettavisen/
245
- │ ├── FaktorSans-Bold.woff2
246
- │ ├── FaktorSerif-RegularItalic.woff2
247
- │ └── ... (16 total files)
248
- └── alt/
249
- └── ... (6 total files)
250
- ```
251
-
252
- ## Font-Face Example (Bravo Theme)
253
-
254
- ```css
255
- @font-face {
256
- font-family: 'National2';
257
- src: url('https://assets.acdn.no/pkg/@amedia/brick-fonts/2.0.1/fonts/bravo/national-2-regular.woff2');
258
- font-weight: 400;
259
- font-style: normal;
260
- font-display: swap;
261
- }
262
-
263
- @font-face {
264
- font-family: 'National2';
265
- src: url('https://assets.acdn.no/pkg/@amedia/brick-fonts/2.0.1/fonts/bravo/national-2-bold.woff2');
266
- font-weight: 700;
267
- font-style: normal;
268
- font-display: swap;
269
- }
270
- ```
271
-
272
- ## Technical Details
273
-
274
- - **Package Type**: Asset distribution (fonts + CSS)
275
- - **Format**: WOFF2 (Web Open Font Format 2)
276
- - **Distribution**: Eik CDN (https://assets.acdn.no)
277
- - **Build System**: Custom Node.js build script
278
- - **Dependencies**: None (standalone asset package)
279
-
280
- ## Adding New Fonts
281
-
282
- 1. Add .woff2 file(s) to appropriate theme directory in `fonts/`
283
- 2. Add @font-face rule to matching theme in `css/`
284
- 3. Ensure font-weight and font-style match the font file characteristics
285
- 4. Use [wakamaifondue.com](https://wakamaifondue.com/) to analyze font capabilities
286
- 5. Create changeset and publish new version
287
- 6. Eik automatically publishes both CSS and font files
288
-
289
- ## License Information
290
-
291
- ### Proprietary Fonts
292
- - National2, National2 Narrow
293
- - Faktor (FaktorTittel, FaktorSans, FaktorSerif)
294
- - ALT Rund (Display, Text)
295
- - Tiempos (Headline, Text)
296
- - Merriweather
297
- - Bespoke fonts
298
-
299
- Contact licensing team for details.
300
-
301
- ### Open Source Fonts
302
-
303
- **Open Sans**
304
- - License: SIL Open Font License (OFL)
305
- - Source: [Google Fonts](https://github.com/googlefonts/opensans)
306
-
307
- **Playfair Display**
308
- - License: SIL Open Font License (OFL)
309
- - Source: [GitHub](https://github.com/clauseggers/Playfair)
310
-
311
- **Crimson Pro**
312
- - License: SIL Open Font License (OFL)
313
-
314
- ## Important Notes
315
-
316
- - Font files are served from Eik CDN, not from npm package
317
- - The npm package only contains path references, not actual font files
318
- - All fonts use .woff2 format for optimal compression
319
- - Font-display: swap is used for all fonts to improve loading performance
320
- - Version 2.0.0 removed CommonJS builds (ESM only)
321
- - Automatic integration with Maelstrom removes need for manual link tags
322
-
323
- ## Tools for Font Development
324
-
325
- - [wakamaifondue.com](https://wakamaifondue.com/) - Analyze font file capabilities
326
- - [WhatFont Chrome Extension](https://chrome.google.com/webstore/detail/whatfont/jabopobgcpjmedljpbcaablpmlmfcogm) - Identify fonts on web pages
327
-
328
- ## Version
329
-
330
- Current version: 2.0.2
331
-
332
- ### Recent Changes
333
- - 2.0.2: Better fallback font for National2 Narrow
334
- - 2.0.1: Changed font-display from auto to swap for better loading performance
335
- - 2.0.0: Removed CommonJS build (ESM only)
@@ -1,202 +0,0 @@
1
- ---
2
- name: brick-helloworld
3
- version: 2.0.2
4
- selector: brick-helloworld-v2
5
- category: Development
6
- tags: [example, demo, development, tutorial, web-components, template, getting-started]
7
- use_cases: [learning-brick-components, testing-build-process, understanding-component-anatomy, server-side-rendering-examples, client-side-rendering-examples]
8
- related: [brick-input, brick-toggle, brick-template]
9
- ---
10
-
11
- # Brick Helloworld
12
-
13
- A demonstration component showcasing the anatomy and usage patterns of Brick components, used for testing and educational purposes.
14
-
15
- ## Key Capabilities
16
-
17
- - Demonstrates both server-side and client-side rendering patterns
18
- - Shows template processing with named template slots
19
- - Integrates with other Brick components (brick-input, brick-toggle)
20
- - Illustrates mirrored props and observed attributes
21
- - Provides examples of Stitches styling integration
22
- - Serves as a reference implementation for new Brick components
23
-
24
- ## Props/Attributes
25
-
26
- | Attribute | Type | Default | Required | Description |
27
- |-----------|------|---------|----------|-------------|
28
- | `data-text` | string | undefined | no | Text content to display in the component |
29
- | `data-version` | string | undefined | no | Version string used for styling variants |
30
- | `is-rendered` | boolean | false | no | Indicates if markup was rendered server-side |
31
- | `children-rendered` | string | undefined | no | Internal attribute set when child components finish rendering |
32
-
33
- ## Examples
34
-
35
- ### Basic Usage - Template Literals
36
-
37
- ```html
38
- <brick-helloworld-v2 data-text="Hello, World!" data-version="v2">
39
- <template name="content">
40
- <p>I am a paragraph inside a template named content</p>
41
- </template>
42
- </brick-helloworld-v2>
43
- ```
44
-
45
- ### JavaScript createElement
46
-
47
- ```javascript
48
- const el = document.createElement('brick-helloworld-v2');
49
- el.dataset.text = 'The quick brown fox jumps over the lazy dog';
50
- el.dataset.version = 'v2';
51
- document.body.appendChild(el);
52
- ```
53
-
54
- ### Server-Side Rendering
55
-
56
- ```javascript
57
- import { renderBrickHelloworld, getCssText } from '@amedia/brick-helloworld/template';
58
-
59
- const markup = renderBrickHelloworld({
60
- dataText: 'The quick brown fox jumps over the lazy dog',
61
- dataVersion: 'v2',
62
- isRendered: true
63
- });
64
-
65
- // Include the styles
66
- const css = `<style>${getCssText()}</style>`;
67
- ```
68
-
69
- ### Client-Side Import
70
-
71
- ```javascript
72
- // Via npm
73
- import '@amedia/brick-helloworld';
74
-
75
- // Via Eik CDN
76
- import 'https://assets.acdn.no/pkg/@amedia/brick-helloworld/v2/brick-helloworld.js';
77
- ```
78
-
79
- ### Using Template Slots
80
-
81
- ```html
82
- <brick-helloworld-v2 data-text="Main content" data-version="v2">
83
- <template name="content">
84
- <div class="custom-content">
85
- <h2>Custom Template Content</h2>
86
- <p>This content is processed by the component</p>
87
- </div>
88
- </template>
89
- </brick-helloworld-v2>
90
- ```
91
-
92
- ## Framework Integration
93
-
94
- ### Node.js (>=18) - HTTPS Imports
95
-
96
- ```javascript
97
- // Using HTTPS imports (Node.js >= 18)
98
- import { renderBrickHelloworld, getCssText } from 'https://assets.acdn.no/pkg/@amedia/brick-helloworld/v2/template.js';
99
-
100
- const html = renderBrickHelloworld({
101
- dataText: 'Server rendered content',
102
- dataVersion: 'v2'
103
- });
104
- ```
105
-
106
- ## Programmatic Usage
107
-
108
- ```javascript
109
- import { BrickHelloworld } from '@amedia/brick-helloworld';
110
-
111
- const component = new BrickHelloworld();
112
- component.dataText = 'Programmatically set text';
113
- component.dataVersion = 'v2';
114
- document.body.appendChild(component);
115
- ```
116
-
117
- ## Common Patterns
118
-
119
- ### Hybrid Server/Client Rendering
120
-
121
- When markup is rendered server-side with `isRendered: true`, the component will not recreate the DOM client-side but will still attach event listeners and process templates:
122
-
123
- ```html
124
- <!-- Server-rendered HTML -->
125
- <brick-helloworld-v2 data-version="v2" data-text="Content" is-rendered>
126
- <div class="hello-v2">Content
127
- <div class="hello-v2">v2</div>
128
- </div>
129
- <!-- Child components rendered server-side -->
130
- </brick-helloworld-v2>
131
-
132
- <!-- Client-side script -->
133
- <script type="module" src="https://assets.acdn.no/pkg/@amedia/brick-helloworld/v2/brick-helloworld.js"></script>
134
- ```
135
-
136
- ### Template Processing
137
-
138
- The component demonstrates how to process named template slots and move content:
139
-
140
- ```javascript
141
- // Component processes template[name="content"]
142
- // and moves it into a div wrapper
143
- processTemplates() {
144
- const templateContent = this.querySelector('template[name="content"]');
145
- if (templateContent) {
146
- const range = document.createRange();
147
- range.selectNodeContents(templateContent.content);
148
- const contentWrapper = document.createElement('div');
149
- range.surroundContents(contentWrapper);
150
- this.appendChild(contentWrapper);
151
- templateContent.remove();
152
- }
153
- }
154
- ```
155
-
156
- ### Component Composition
157
-
158
- Shows integration with other Brick components:
159
-
160
- ```html
161
- <brick-helloworld-v2 data-text="Form Example" data-version="v2">
162
- <!-- brick-input and brick-toggle are automatically included -->
163
- </brick-helloworld-v2>
164
- ```
165
-
166
- ## Technical Details
167
-
168
- - **Custom Element**: `brick-helloworld-v2`
169
- - **Base Class**: BrickElement (from @amedia/brick-template)
170
- - **Dependencies**: @amedia/brick-tokens, @amedia/brick-template, @amedia/brick-input, @amedia/brick-toggle
171
- - **Renders as**: Custom element with internal div structure
172
- - **Styling**: Stitches-based styling with variant support
173
- - **Mirrored Props**: `data-text`, `data-version` (automatically synced between attributes and properties)
174
- - **Observed Attributes**: `children-rendered`
175
-
176
- ## Important Notes
177
-
178
- - This is a demonstration/example component primarily for development and testing purposes
179
- - Not intended for production use cases - serves as a reference implementation
180
- - Demonstrates the complete anatomy of a Brick component including build configuration
181
- - Used for testing release workflows, publishing, and build processes
182
- - Template processing occurs after children are rendered (via `children-rendered` attribute)
183
- - The component automatically includes brick-input and brick-toggle as child dependencies
184
- - Server-side rendering requires the `/template` export path
185
- - CSS is automatically injected when used client-side, but must be manually included for SSR via `getCssText()`
186
-
187
- ## Installation
188
-
189
- ```bash
190
- npm install @amedia/brick-helloworld
191
- ```
192
-
193
- ## Version
194
-
195
- Current version: 2.0.2
196
-
197
- ## Package Exports
198
-
199
- - **ESM (Node)**: `dist/index.mjs`
200
- - **CommonJS (Node)**: `dist/index.js`
201
- - **Browser Bundle (Eik)**: `dist/eik/brick-helloworld.js`
202
- - **Template (SSR)**: `template/index.mjs`