Skip to content

Commit 1c68a95

Browse files
committed
docs: generated READMEs
1 parent c1876da commit 1c68a95

14 files changed

+1125
-3
lines changed

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
},
99
"type": "module",
1010
"scripts": {
11+
"analyze": "node scripts/workspaces-scripts-bin.mjs analyze",
1112
"build": "npm run build:packages && npm run build:site",
1213
"build:packages": "node scripts/workspaces-scripts-bin.mjs build:package",
1314
"build:site": "npm run rocket:build",
@@ -45,6 +46,7 @@
4546
},
4647
"devDependencies": {
4748
"@changesets/cli": "^2.12.0",
49+
"@custom-elements-manifest/analyzer": "^0.4.11",
4850
"@open-wc/testing": "^3.0.0-next.1",
4951
"@rollup/plugin-commonjs": "^17.0.0",
5052
"@rollup/plugin-json": "^4.1.0",
@@ -59,6 +61,7 @@
5961
"@web/test-runner": "^0.12.2",
6062
"@web/test-runner-commands": "^0.4.0",
6163
"@web/test-runner-playwright": "^0.8.0",
64+
"cem-plugin-readme": "^0.1.2",
6265
"chai": "^4.2.0",
6366
"concurrently": "^5.3.0",
6467
"copyfiles": "^2.4.1",

packages/launch/README.head.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Launch Preset for Rocket
2+
3+
For docs please see our homepage [https://rocket.modern-web.dev/docs/presets/launch/](https://rocket.modern-web.dev/docs/presets/launch/).

packages/launch/README.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,57 @@
11
# Launch Preset for Rocket
22

33
For docs please see our homepage [https://rocket.modern-web.dev/docs/presets/launch/](https://rocket.modern-web.dev/docs/presets/launch/).
4+
5+
6+
## `inline-notification/index.js`:
7+
8+
### class: `InlineNotification`, `inline-notification`
9+
10+
#### Superclass
11+
12+
| Name | Module | Package |
13+
| ---------- | ------ | ----------- |
14+
| LitElement | | lit-element |
15+
16+
#### Fields
17+
18+
| Name | Privacy | Type | Default | Description | Inherited From |
19+
| ----- | ------- | ---------------------------- | ------- | ----------- | -------------- |
20+
| title | public | `string` | `''` | | |
21+
| type | public | `'tip'\|'warning'\|'danger'` | `'tip'` | | |
22+
23+
#### Attributes
24+
25+
| Name | Field | Inherited From |
26+
| ----- | ----- | -------------- |
27+
| type | type | |
28+
| title | title | |
29+
30+
#### CSS Properties
31+
32+
| Name | Description |
33+
| ---------------------------------------------- | ----------- |
34+
| --inline-notification-tip-background-color | |
35+
| --inline-notification-tip-border-color | |
36+
| --inline-notification-warning-background-color | |
37+
| --inline-notification-warning-border-color | |
38+
| --inline-notification-danger-background-color | |
39+
| --inline-notification-danger-border-color | |
40+
| --inline-notification-warning-heading-color | |
41+
| --inline-notification-danger-heading-color | |
42+
43+
<hr/>
44+
45+
### Exports
46+
47+
| Kind | Name | Declaration | Module | Package |
48+
| ---- | ------------------ | ------------------ | ---------------------------- | ------- |
49+
| js | InlineNotification | InlineNotification | inline-notification/index.js | |
50+
51+
## `inline-notification/inline-notification.js`:
52+
53+
### Exports
54+
55+
| Kind | Name | Declaration | Module | Package |
56+
| ------------------------- | ------------------- | ------------------ | ----------------------------- | ------- |
57+
| custom-element-definition | inline-notification | InlineNotification | /inline-notification/index.js | |
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { readmePlugin } from 'cem-plugin-readme';
2+
import { fileURLToPath } from 'url';
3+
import { dirname } from 'path';
4+
5+
export default {
6+
globs: ['inline-notification/*.js'],
7+
plugins: [
8+
readmePlugin({
9+
from: dirname(fileURLToPath(import.meta.url)),
10+
header: 'README.head.md',
11+
}),
12+
],
13+
};

packages/launch/custom-elements.json

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
{
2+
"schemaVersion": "1.0.0",
3+
"readme": "",
4+
"modules": [
5+
{
6+
"kind": "javascript-module",
7+
"path": "inline-notification/index.js",
8+
"declarations": [
9+
{
10+
"kind": "class",
11+
"description": "",
12+
"name": "InlineNotification",
13+
"cssProperties": [
14+
{
15+
"name": "--inline-notification-tip-background-color",
16+
"default": "rgba(221, 221, 221, 0.3)"
17+
},
18+
{
19+
"name": "--inline-notification-tip-border-color",
20+
"default": "#42b983"
21+
},
22+
{
23+
"name": "--inline-notification-warning-background-color",
24+
"default": "rgba(255, 229, 100, 0.2)"
25+
},
26+
{
27+
"name": "--inline-notification-warning-border-color",
28+
"default": "#e7c000"
29+
},
30+
{
31+
"name": "--inline-notification-danger-background-color",
32+
"default": "rgba(192, 0, 0, 0.1)"
33+
},
34+
{
35+
"name": "--inline-notification-danger-border-color",
36+
"default": "#c00"
37+
},
38+
{
39+
"name": "--inline-notification-warning-heading-color",
40+
"default": "#b29400"
41+
},
42+
{
43+
"name": "--inline-notification-danger-heading-color",
44+
"default": "#900"
45+
}
46+
],
47+
"cssParts": [
48+
{
49+
"description": "the title heading",
50+
"name": "title"
51+
}
52+
],
53+
"members": [
54+
{
55+
"kind": "field",
56+
"name": "title",
57+
"type": {
58+
"text": "string"
59+
},
60+
"default": "''",
61+
"privacy": "public",
62+
"attribute": "title"
63+
},
64+
{
65+
"kind": "field",
66+
"name": "type",
67+
"type": {
68+
"text": "'tip'|'warning'|'danger'"
69+
},
70+
"default": "'tip'",
71+
"privacy": "public",
72+
"attribute": "type",
73+
"reflects": true
74+
}
75+
],
76+
"attributes": [
77+
{
78+
"name": "type",
79+
"fieldName": "type"
80+
},
81+
{
82+
"name": "title",
83+
"fieldName": "title"
84+
}
85+
],
86+
"superclass": {
87+
"name": "LitElement",
88+
"package": "lit-element"
89+
},
90+
"tagName": "inline-notification",
91+
"customElement": true
92+
}
93+
],
94+
"exports": [
95+
{
96+
"kind": "js",
97+
"name": "InlineNotification",
98+
"declaration": {
99+
"name": "InlineNotification",
100+
"module": "inline-notification/index.js"
101+
}
102+
}
103+
]
104+
},
105+
{
106+
"kind": "javascript-module",
107+
"path": "inline-notification/inline-notification.js",
108+
"declarations": [],
109+
"exports": [
110+
{
111+
"kind": "custom-element-definition",
112+
"name": "inline-notification",
113+
"declaration": {
114+
"name": "InlineNotification",
115+
"module": "/inline-notification/index.js"
116+
}
117+
}
118+
]
119+
}
120+
]
121+
}

packages/launch/inline-notification/index.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
import { LitElement, css, html } from 'lit-element';
22

3+
/**
4+
* @element inline-notification
5+
* @cssprop [--inline-notification-tip-background-color=rgba(221, 221, 221, 0.3)]
6+
* @cssprop [--inline-notification-tip-border-color=#42b983]
7+
* @cssprop [--inline-notification-warning-background-color=rgba(255, 229, 100, 0.2)]
8+
* @cssprop [--inline-notification-warning-border-color=#e7c000]
9+
* @cssprop [--inline-notification-danger-background-color=rgba(192, 0, 0, 0.1)]
10+
* @cssprop [--inline-notification-danger-border-color=#c00]
11+
* @cssprop [--inline-notification-warning-heading-color=#b29400]
12+
* @cssprop [--inline-notification-danger-heading-color=#900]
13+
* @csspart title - the title heading
14+
*/
315
export class InlineNotification extends LitElement {
416
static get properties() {
517
return {
@@ -11,6 +23,7 @@ export class InlineNotification extends LitElement {
1123
constructor() {
1224
super();
1325
this.title = '';
26+
/** @type {'tip'|'warning'|'danger'} */
1427
this.type = 'tip';
1528
}
1629

@@ -64,7 +77,7 @@ export class InlineNotification extends LitElement {
6477

6578
render() {
6679
return html`
67-
<h3>${this.title ? this.title : this.type}</h3>
80+
<h3 part="title">${this.title || this.type}</h3>
6881
<slot></slot>
6982
`;
7083
}

packages/launch/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"./inline-notification/inline-notification.js": "./inline-notification/inline-notification.js"
2323
},
2424
"scripts": {
25+
"analyze": "cem analyze --litelement",
2526
"test": "mocha --timeout 5000 test-node/**/*.test.{js,cjs} test-node/*.test.{js,cjs}",
2627
"test:watch": "onchange 'src/**/*.{js,cjs}' 'test-node/**/*.{js,cjs}' -- npm test"
2728
},
@@ -37,5 +38,6 @@
3738
"dependencies": {
3839
"@rocket/drawer": "^0.1.3",
3940
"@rocket/navigation": "^0.2.1"
40-
}
41+
},
42+
"customElements": "custom-elements.json"
4143
}

packages/search/README.head.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Rocket Search
2+
3+
Add a search for all your static content.
4+
5+
For docs please see our homepage [https://rocket.modern-web.dev/docs/presets/search/](https://rocket.modern-web.dev/docs/presets/search/).

0 commit comments

Comments
 (0)