mirror of
https://github.com/modernweb-dev/rocket.git
synced 2026-03-21 08:51:18 +00:00
Compare commits
22 Commits
@rocket/el
...
@rocket/bl
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
509a8d9115 | ||
|
|
42418f2c00 | ||
|
|
cadd8588b0 | ||
|
|
aabe011427 | ||
|
|
e1089c5701 | ||
|
|
9f10386eb2 | ||
|
|
0987a41620 | ||
|
|
7301a0f354 | ||
|
|
5ac6aa6693 | ||
|
|
9f1633cccc | ||
|
|
00f4a91550 | ||
|
|
eb62dd9fd5 | ||
|
|
bb07267289 | ||
|
|
738941afdd | ||
|
|
ef086c7aa3 | ||
|
|
3d22fbb72e | ||
|
|
adf0f1d88f | ||
|
|
4145031162 | ||
|
|
ac58953527 | ||
|
|
7dc3e0f9b0 | ||
|
|
305a657ff5 | ||
|
|
8585e2ad66 |
@@ -19,6 +19,11 @@
|
||||
src="https://img.shields.io/badge/twitter-@modern_web_dev-1DA1F3?style=flat-square"
|
||||
alt="Follow @modern_web_dev on Twitter"
|
||||
/></a>
|
||||
<a href="https://open.vscode.dev/modernweb-dev/rocket"
|
||||
><img
|
||||
src="https://open.vscode.dev/badges/open-in-vscode.svg"
|
||||
alt="Open in VS Code"
|
||||
/></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
|
||||
1
docs/.eleventyignore
Normal file
1
docs/.eleventyignore
Normal file
@@ -0,0 +1 @@
|
||||
*.docs.md
|
||||
@@ -1,5 +1,39 @@
|
||||
:root {
|
||||
--markdown-table-row-odd-background-color: #efefef;
|
||||
:not(rocket-navigation):not(:defined) {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
rocket-navigation,
|
||||
header {
|
||||
font-family: 'Montserrat', sans-serif;
|
||||
}
|
||||
|
||||
code-tabs[collection="package-managers"] {
|
||||
--code-tabs-icon-height: 18px;
|
||||
}
|
||||
|
||||
.call-to-action {
|
||||
background: var(--button-one) !important;
|
||||
text-shadow: none !important;
|
||||
border-radius: 5px !important;
|
||||
padding-top: 15px !important;
|
||||
padding-bottom: 15px !important;
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
.call-to-action:hover,
|
||||
.call-to-action:focus,
|
||||
.call-to-action:active {
|
||||
background: var(--button-one-hover) !important;
|
||||
}
|
||||
|
||||
.call-to-action:nth-child(2) {
|
||||
background: var(--button-two) !important;
|
||||
}
|
||||
|
||||
.call-to-action:nth-child(2):hover,
|
||||
.call-to-action:nth-child(2):focus,
|
||||
.call-to-action:nth-child(2):active {
|
||||
background: var(--button-two-hover) !important;
|
||||
}
|
||||
|
||||
body[layout^='layout-home'] .markdown-body .call-to-action:nth-of-type(2) {
|
||||
@@ -15,20 +49,3 @@ body[layout^='layout-home'] .markdown-body .call-to-action:nth-of-type(2) {
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
}
|
||||
|
||||
rocket-navigation {
|
||||
font-family: 'Montserrat', sans-serif;
|
||||
}
|
||||
|
||||
header {
|
||||
font-family: 'Montserrat', sans-serif;
|
||||
}
|
||||
|
||||
code-tabs[collection="package-managers"] {
|
||||
--code-tabs-icon-height: 18px;
|
||||
--code-tabs-justify-tabs: end;
|
||||
}
|
||||
|
||||
:not(rocket-navigation):not(:defined) {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
141
docs/_assets/theme.css
Normal file
141
docs/_assets/theme.css
Normal file
@@ -0,0 +1,141 @@
|
||||
html {
|
||||
--button-one-hover: #436eff;
|
||||
--button-one: #2758ff;
|
||||
--button-two-hover: #444;
|
||||
--button-two: black;
|
||||
--contrast-color-dark: #1d3557;
|
||||
--contrast-color-light: #fff;
|
||||
--footer-background: rgba(0, 0, 0, 0.02);
|
||||
--header-color: white;
|
||||
--markdown-link-color: #2758ff;
|
||||
--markdown-syntax-background-color: #f9f9f9;
|
||||
--markdown-table-row-odd-background-color: #efefef;
|
||||
--owc-active-color: #2758ff;
|
||||
--owc-hover-color: #436eff;
|
||||
--page-background: white;
|
||||
--primary-color-accent: #cee5f6;
|
||||
--primary-color-darker: #1a5285;
|
||||
--primary-color-lighter: #449ad7;
|
||||
--primary-color: rgb(44, 62, 80);
|
||||
--primary-lines-color: #ccc;
|
||||
--primary-text-color: #2c3e50;
|
||||
--primary-text-inverse-color: #eee;
|
||||
--switch-unselected-color: #808080;
|
||||
--switch-selected-color: #42b983;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
html {
|
||||
--header-color: #2f3136;
|
||||
--footer-background: rgba(255, 255, 255, 0.1);
|
||||
--page-background: #36393e;
|
||||
--text-color: #eee;
|
||||
--primary-text-color: #eee;
|
||||
--primary-color: white;
|
||||
--primary-color-lighter: #449ad7;
|
||||
--primary-color-darker: #1a5285;
|
||||
--primary-color-accent: #cee5f6;
|
||||
--contrast-color-light: #fff;
|
||||
--contrast-color-dark: #1d3557;
|
||||
--primary-lines-color: #333;
|
||||
--owc-active-color: #41ffb0;
|
||||
--owc-hover-color: #6dffc2;
|
||||
--button-one: #9b03fe;
|
||||
--button-one-hover: #a724ff;
|
||||
--button-two: black;
|
||||
--button-two-hover: rgb(36, 36, 36);
|
||||
--rocket-search-background-color: #4a4d52;
|
||||
--rocket-search-highlight-color: #41ffb0;
|
||||
--rocket-search-hover-background-color: #6b717a;
|
||||
--rocket-search-fill-color: #fff;
|
||||
--primary-text-inverse-color: #2c3e50;
|
||||
--switch-unselected-color: #808080;
|
||||
--switch-selected-color: #42b983;
|
||||
|
||||
/* Markdown */
|
||||
--markdown-octicon-link: var(--primary-text-color);
|
||||
--markdown-link-color: #41ffb0;
|
||||
--markdown-divider-color: #e1e4e8;
|
||||
--markdown-blockquote-border-color: #dfe2e5;
|
||||
--markdown-blockquote-color: #90aac7;
|
||||
--markdown-kbd-background-color: #fafbfc;
|
||||
--markdown-kbd-border-color: #c6cbd1;
|
||||
--markdown-kbd-border-bottom-color: #959da5;
|
||||
--markdown-kbd-color: #444d56;
|
||||
--markdown-heading-color-6: #6a737d;
|
||||
--markdown-table-background-color: var(--markdown-syntax-background-color);
|
||||
--markdown-table-row-odd-background-color: var(--markdown-kbd-color);
|
||||
--markdown-table-border-color: transparent;
|
||||
--markdown-code-background-color: rgba(27, 31, 35, 0.05);
|
||||
--markdown-pre-background-color: rgb(49, 49, 49);
|
||||
|
||||
/* syntax */
|
||||
--markdown-syntax-color: #f8f8f2;
|
||||
--markdown-syntax-background-color: #2e3440;
|
||||
--markdown-syntax-atrule-color: #88c0d0;
|
||||
--markdown-syntax-attr-name-color: #a3be8c;
|
||||
--markdown-syntax-attr-value-color: #88c0d0;
|
||||
--markdown-syntax-builtin-color: #a3be8c;
|
||||
--markdown-syntax-boolean-color: #81a1c1;
|
||||
--markdown-syntax-class-name-color: #88c0d0;
|
||||
--markdown-syntax-constant-color: #81a1c1;
|
||||
--markdown-syntax-char-color: #a3be8c;
|
||||
--markdown-syntax-deleted-color: #81a1c1;
|
||||
--markdown-syntax-entity-color: #81a1c1;
|
||||
--markdown-syntax-function-color: #88c0d0;
|
||||
--markdown-syntax-inserted-color: #a3be8c;
|
||||
--markdown-syntax-keyword-color: #81a1c1;
|
||||
--markdown-syntax-number-color: #b48ead;
|
||||
--markdown-syntax-operator-color: #81a1c1;
|
||||
--markdown-syntax-property-color: #81a1c1;
|
||||
--markdown-syntax-punctuation-color: #81a1c1;
|
||||
--markdown-syntax-regex-color: #81a1c1;
|
||||
--markdown-syntax-important-color: #81a1c1;
|
||||
--markdown-syntax-selector-color: #a3be8c;
|
||||
--markdown-syntax-symbol-color: #81a1c1;
|
||||
--markdown-syntax-string-color: #a3be8c;
|
||||
--markdown-syntax-tag-color: #81a1c1;
|
||||
--markdown-syntax-url-color: #81a1c1;
|
||||
--markdown-syntax-variable-color: #81a1c1;
|
||||
--markdown-syntax-hotkey-selector-color: #d73a49;
|
||||
--markdown-syntax-keyword-color: #22863a;
|
||||
--markdown-syntax-background-color: rgb(27, 29, 35);
|
||||
--markdown-syntax-atrule-color: rgb(198, 120, 221);
|
||||
--markdown-syntax-attr-name-color: rgb(198, 120, 221);
|
||||
--markdown-syntax-boolean-color: rgb(209, 154, 102);
|
||||
--markdown-syntax-class-name-color: rgb(97, 175, 239);
|
||||
--markdown-syntax-constant-color: rgb(220, 220, 170);
|
||||
--markdown-syntax-entity-color: rgb(220, 220, 170);
|
||||
--markdown-syntax-function-color: rgb(97, 175, 239);
|
||||
--markdown-syntax-inserted-color: rgb(220, 220, 170);
|
||||
--markdown-syntax-keyword-color: rgb(198, 120, 221);
|
||||
--markdown-syntax-number-color: rgb(220, 220, 170);
|
||||
--markdown-syntax-operator-color: rgb(220, 220, 170);
|
||||
--markdown-syntax-property-color: rgb(220, 220, 170);
|
||||
--markdown-syntax-punctuation-color: white;
|
||||
--markdown-syntax-regex-color: rgb(209, 154, 102);
|
||||
--markdown-syntax-selector-color: rgb(86, 156, 214);
|
||||
--markdown-syntax-symbol-color: rgb(220, 220, 170);
|
||||
--markdown-syntax-tag-color: rgb(86, 156, 214);
|
||||
--markdown-syntax-url-color: rgb(220, 220, 170);
|
||||
--markdown-syntax-variable-color: rgb(220, 220, 170);
|
||||
}
|
||||
|
||||
.string {
|
||||
color: rgb(152, 195, 121);
|
||||
}
|
||||
|
||||
.comment {
|
||||
color: #7d7d7d;
|
||||
}
|
||||
|
||||
.language-css {
|
||||
--markdown-syntax-string-color: #81a1c1;
|
||||
}
|
||||
}
|
||||
|
||||
body[layout='home'] .markdown-body .call-to-action:nth-of-type(2) {
|
||||
--primary-color: #222;
|
||||
--primary-color-lighter: #333;
|
||||
--primary-color-darker: #000;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<link rel="stylesheet" href="{{ '/_assets/theme.css' | asset | url }}">
|
||||
@@ -88,8 +88,10 @@ The default preset for regular markdown content is available as `responsive`.
|
||||
|
||||
👉 `rocket.config.js`
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
```js
|
||||
export default {
|
||||
/** @type {import('rocket/cli').RocketCliConfig} */
|
||||
export default ({
|
||||
imagePresets: {
|
||||
responsive: {
|
||||
widths: [300, 820],
|
||||
@@ -97,8 +99,9 @@ export default {
|
||||
sizes: '(min-width: 1024px) 820px, calc(100vw - 20px)',
|
||||
},
|
||||
},
|
||||
};
|
||||
});
|
||||
```
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
## Ignoring Images
|
||||
|
||||
@@ -148,8 +151,10 @@ For this example we want to also ignore `.jpeg` files.
|
||||
|
||||
👉 `rocket.config.js`
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
```js
|
||||
export default {
|
||||
/** @type {import('rocket/cli').RocketCliConfig} */
|
||||
export default ({
|
||||
imagePresets: {
|
||||
responsive: {
|
||||
// ...
|
||||
@@ -157,8 +162,9 @@ export default {
|
||||
src.endsWith('.jpeg') || src.endsWith('svg') || src.includes('rocket-unresponsive.'),
|
||||
},
|
||||
},
|
||||
};
|
||||
});
|
||||
```
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
With that setting we get the following behavior
|
||||
|
||||
@@ -180,8 +186,10 @@ becomes
|
||||
|
||||
You can add your own image preset like so
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
```js
|
||||
export default {
|
||||
/** @type {import('rocket/cli').RocketCliConfig} */
|
||||
export default ({
|
||||
imagePresets: {
|
||||
'my-image-preset': {
|
||||
widths: [30, 60],
|
||||
@@ -189,8 +197,9 @@ export default {
|
||||
sizes: '(min-width: 1024px) 30px, 60px',
|
||||
},
|
||||
},
|
||||
};
|
||||
});
|
||||
```
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
Once that `imagePreset` is defined you can use it by adding it to any `img` tag.
|
||||
|
||||
@@ -232,15 +241,18 @@ If you want to add `webp` (or replace `avif` with it) you can do so by setting t
|
||||
|
||||
👉 `rocket.config.js`
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
```js
|
||||
export default {
|
||||
/** @type {import('rocket/cli').RocketCliConfig} */
|
||||
export default ({
|
||||
imagePresets: {
|
||||
responsive: {
|
||||
formats: ['avif', 'webp', 'jpeg'],
|
||||
},
|
||||
},
|
||||
};
|
||||
});
|
||||
```
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
## Default widths
|
||||
|
||||
@@ -262,16 +274,19 @@ If you want to add more widths you can add them to `widths`.
|
||||
|
||||
👉 `rocket.config.js`
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
```js
|
||||
export default {
|
||||
/** @type {import('rocket/cli').RocketCliConfig} */
|
||||
export default ({
|
||||
imagePresets: {
|
||||
responsive: {
|
||||
widths: [300, 600, 900, 1200, 1640],
|
||||
sizes: '(min-width: 1024px) 820px, calc(100vw - 20px)',
|
||||
},
|
||||
},
|
||||
};
|
||||
});
|
||||
```
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
<inline-notification type="tip">
|
||||
|
||||
|
||||
@@ -4,22 +4,27 @@ The configuration file is `rocket.config.js` or `rocket.config.mjs`.
|
||||
|
||||
The config files consist of the following parts:
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
```js
|
||||
import { rocketLaunch } from '@rocket/launch';
|
||||
|
||||
export default {
|
||||
/** @type {import('rocket/cli').RocketCliConfig} */
|
||||
export default ({
|
||||
presets: [rocketLaunch()],
|
||||
emptyOutputDir: true,
|
||||
pathPrefix: 'subfolder-only-for-build',
|
||||
};
|
||||
});
|
||||
```
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
Rocket is primarily build around plugins for each of its systems.
|
||||
|
||||
New plugins can be added and all default plugins can be adjusted or even removed by using the following functions.
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
```js
|
||||
export default {
|
||||
/** @type {import('rocket/cli').RocketCliConfig} */
|
||||
export default ({
|
||||
// add remark/unified plugin to the Markdown processing (e.g. enable special code blocks)
|
||||
setupUnifiedPlugins: [],
|
||||
|
||||
@@ -40,8 +45,9 @@ export default {
|
||||
|
||||
// add a plugin to the cli (e.g. a new command like "rocket my-command")
|
||||
setupCliPlugins: [],
|
||||
};
|
||||
});
|
||||
```
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
## Adding Rollup Plugins
|
||||
|
||||
@@ -55,19 +61,19 @@ You can accomplish this with Rollup and dev server plugins. Make sure to add bot
|
||||
|
||||
For these cases you can use `setupDevAndBuildPlugins`, which will automatically add the plugin for you to both Rollup and dev-server:
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
```js
|
||||
import json from '@rollup/plugin-json';
|
||||
import { addPlugin } from 'plugins-manager';
|
||||
|
||||
/** @type {import('@rocket/cli').RocketCliOptions} */
|
||||
const config = {
|
||||
export default ({
|
||||
setupDevAndBuildPlugins: [
|
||||
addPlugin({ name: 'json', plugin: json, location: 'top', options: { my: 'settings' } }),
|
||||
],
|
||||
};
|
||||
|
||||
export default config;
|
||||
});
|
||||
```
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
This will add the Rollup plugin `json` with the id `json` at the top of the plugin list of Rollup and the dev server. It needs to be at the top so further plugins down the line can work with JSON imports.
|
||||
For the Dev Server the plugins are automatically wrapped by `@web/dev-server-rollup`. Note that [not all Rollup plugins](https://modern-web.dev/docs/dev-server/plugins/rollup/#compatibility-with-rollup-plugins) will work with the dev-server.
|
||||
@@ -76,25 +82,85 @@ For the Dev Server the plugins are automatically wrapped by `@web/dev-server-rol
|
||||
|
||||
All plugins which are either default or are added via a preset can still be adjusted by using `adjustPluginOptions`.
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
```js
|
||||
import { adjustPluginOptions } from 'plugins-manager';
|
||||
|
||||
/** @type {import('@rocket/cli').RocketCliOptions} */
|
||||
const config = {
|
||||
export default ({
|
||||
setupDevAndBuildPlugins: [adjustPluginOptions('json', { my: 'overwrite settings' })],
|
||||
};
|
||||
|
||||
export default config;
|
||||
});
|
||||
```
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
## Lifecycle
|
||||
|
||||
You can hook into the rocket lifecycle by specifying a function for `before11ty`. This function runs before 11ty calls it's write method. If it is an async function, Rocket will await it's promise.
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
```js
|
||||
export default {
|
||||
/** @type {import('rocket/cli').RocketCliConfig} */
|
||||
export default ({
|
||||
async before11ty() {
|
||||
await copyDataFiles();
|
||||
},
|
||||
};
|
||||
});
|
||||
```
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
## Advanced
|
||||
|
||||
Sometimes you need even more control over specific settings.
|
||||
|
||||
### Rollup
|
||||
|
||||
For example if you wanna add an `acron` plugin to rollup
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
```js
|
||||
import { importAssertions } from 'acorn-import-assertions';
|
||||
|
||||
/** @type {import('rocket/cli').RocketCliConfig} */
|
||||
export default ({
|
||||
rollup: config => ({
|
||||
...config,
|
||||
acornInjectPlugins: [importAssertions],
|
||||
}),
|
||||
});
|
||||
```
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
### Eleventy
|
||||
|
||||
For example to add custom filter you can access the eleventy config directly
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
```js
|
||||
/** @type {import('rocket/cli').RocketCliConfig} */
|
||||
export default ({
|
||||
eleventy: eleventyConfig => {
|
||||
eleventyConfig.addFilter('value', value => `prefix${value}`);
|
||||
},
|
||||
});
|
||||
```
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
You even have access to the full rocketConfig if you for example want to create filters that behave differently during start/build.
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
```js
|
||||
/** @type {import('rocket/cli').RocketCliConfig} */
|
||||
export default ({
|
||||
eleventy: (config, rocketConfig) => {
|
||||
config.addFilter('conditional-resolve', value => {
|
||||
if (rocketConfig.command === 'build') {
|
||||
return `build:${value}`;
|
||||
}
|
||||
if (rocketConfig.command === 'start') {
|
||||
return `start:${value}`;
|
||||
}
|
||||
});
|
||||
},
|
||||
});
|
||||
```
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
@@ -12,11 +12,14 @@ Changing the service worker file name can be quite a hassle so you can adjust ge
|
||||
|
||||
👉 `rocket.config.js`
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
```js
|
||||
export default {
|
||||
/** @type {import('rocket/cli').RocketCliConfig} */
|
||||
export default ({
|
||||
serviceWorkerName: 'my-service-worker-name.js',
|
||||
};
|
||||
});
|
||||
```
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
## Meet the Service Worker
|
||||
|
||||
|
||||
@@ -72,15 +72,18 @@ excludeFromSearch: true
|
||||
|
||||
Once you have that you need to configure it for the story renderer by setting it in your `rocket.config.js`.
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
```js
|
||||
export default {
|
||||
/** @type {import('rocket/cli').RocketCliConfig} */
|
||||
export default ({
|
||||
setupUnifiedPlugins: [
|
||||
adjustPluginOptions('mdjsSetupCode', {
|
||||
simulationSettings: { simulatorUrl: '/simulator/' },
|
||||
}),
|
||||
],
|
||||
};
|
||||
});
|
||||
```
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
<inline-notification type="tip">
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ Enable writing blog posts within your Rocket site.
|
||||
|
||||
## Installation
|
||||
|
||||
<code-tabs collection="package-managers" default-tab="npm">
|
||||
<code-tabs collection="package-managers" default-tab="npm" align="end">
|
||||
|
||||
```bash tab npm
|
||||
npm i @rocket/blog
|
||||
@@ -24,10 +24,13 @@ pnpm add @rocket/blog
|
||||
|
||||
👉 `rocket.config.js`
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
```js
|
||||
import { rocketBlog } from '@rocket/blog';
|
||||
|
||||
export default {
|
||||
/** @type {import('rocket/cli').RocketCliConfig} */
|
||||
export default ({
|
||||
presets: [rocketBlog()],
|
||||
};
|
||||
});
|
||||
```
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
7
docs/docs/presets/launch/custom-elements.md
Normal file
7
docs/docs/presets/launch/custom-elements.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
layout: layout-api
|
||||
package: '@rocket/launch'
|
||||
module: inline-notification/index.js
|
||||
---
|
||||
|
||||
# Presets >> Launch >> Custom Elements || 20
|
||||
4
docs/docs/presets/launch/index.md
Normal file
4
docs/docs/presets/launch/index.md
Normal file
@@ -0,0 +1,4 @@
|
||||
# Presets >> Launch || 20
|
||||
|
||||
- [Preset](./preset/)
|
||||
- [Custom Elements](./custom-elements/)
|
||||
@@ -8,7 +8,7 @@ alerts:
|
||||
content: You **really** shouldn't!
|
||||
---
|
||||
|
||||
# Presets >> Launch || 20
|
||||
# Presets >> Launch >> Preset || 10
|
||||
|
||||
Rocket comes with a preset you will love. Simple, responsive and behaving like native, it sure is going to be a hit among your users.
|
||||
|
||||
@@ -16,7 +16,7 @@ Rocket comes with a preset you will love. Simple, responsive and behaving like n
|
||||
|
||||
Install `@rocket/launch` from the NPM repository using your favourite package manager.
|
||||
|
||||
<code-tabs collection="package-managers" default-tab="npm">
|
||||
<code-tabs collection="package-managers" default-tab="npm" align="end">
|
||||
|
||||
```bash tab npm
|
||||
npm i @rocket/launch
|
||||
@@ -36,13 +36,16 @@ pnpm add @rocket/launch
|
||||
|
||||
👉 `rocket.config.js`
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
```js
|
||||
import { rocketLaunch } from '@rocket/launch';
|
||||
|
||||
export default {
|
||||
/** @type {import('rocket/cli').RocketCliConfig} */
|
||||
export default ({
|
||||
presets: [rocketLaunch()],
|
||||
};
|
||||
});
|
||||
```
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
## Data
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
# Presets >> Search || 30
|
||||
|
||||
Add a search for all your static content.
|
||||
|
||||
## Installation
|
||||
|
||||
<code-tabs collection="package-managers" default-tab="npm">
|
||||
|
||||
```bash tab npm
|
||||
npm i @rocket/search
|
||||
```
|
||||
|
||||
```bash tab yarn
|
||||
yarn add @rocket/search
|
||||
```
|
||||
|
||||
```bash tab pnpm
|
||||
pnpm add @rocket/search
|
||||
```
|
||||
|
||||
</code-tabs>
|
||||
|
||||
## Usage
|
||||
|
||||
👉 `rocket.config.js`
|
||||
|
||||
```js
|
||||
import { rocketSearch } from '@rocket/search';
|
||||
|
||||
export default {
|
||||
presets: [rocketSearch()],
|
||||
};
|
||||
```
|
||||
|
||||
## Styling
|
||||
|
||||
| Property | Default | Description |
|
||||
| ------------------------------------- | --------- | ------------------------------------ |
|
||||
| `--rocket-search-background-color` | `#fff` | Search results background color |
|
||||
| `--rocket-search-input-border-color` | `#dfe1e5` | |
|
||||
| `--rocket-search-input-border-radius` | `24px` | |
|
||||
| `--rocket-search-fill-color` | `#000` | Search Icon Color |
|
||||
| `--rocket-search-highlight-color` | `#6c63ff` | Highlighted search result text color |
|
||||
9
docs/docs/presets/search/custom-elements.md
Normal file
9
docs/docs/presets/search/custom-elements.md
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
layout: layout-api
|
||||
package: '@rocket/search'
|
||||
modules:
|
||||
- src/RocketSearch.js
|
||||
- src/RocketSearchCombobox.js
|
||||
---
|
||||
|
||||
# Presets >> Search >> Custom Elements || 20
|
||||
4
docs/docs/presets/search/index.md
Normal file
4
docs/docs/presets/search/index.md
Normal file
@@ -0,0 +1,4 @@
|
||||
# Presets >> Search || 10
|
||||
|
||||
- [Preset](./preset/)
|
||||
- [Custom Elements](./custom-elements/)
|
||||
36
docs/docs/presets/search/preset.md
Normal file
36
docs/docs/presets/search/preset.md
Normal file
@@ -0,0 +1,36 @@
|
||||
# Presets >> Search >> Preset || 10
|
||||
|
||||
Add a search for all your static content.
|
||||
|
||||
## Installation
|
||||
|
||||
<code-tabs collection="package-managers" default-tab="npm" align="end">
|
||||
|
||||
```bash tab npm
|
||||
npm i @rocket/search
|
||||
```
|
||||
|
||||
```bash tab yarn
|
||||
yarn add @rocket/search
|
||||
```
|
||||
|
||||
```bash tab pnpm
|
||||
pnpm add @rocket/search
|
||||
```
|
||||
|
||||
</code-tabs>
|
||||
|
||||
## Usage
|
||||
|
||||
👉 `rocket.config.js`
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
```js
|
||||
import { rocketSearch } from '@rocket/search';
|
||||
|
||||
/** @type {import('rocket/cli').RocketCliConfig} */
|
||||
export default ({
|
||||
presets: [rocketSearch()],
|
||||
});
|
||||
```
|
||||
<!-- prettier-ignore-end -->
|
||||
@@ -7,12 +7,16 @@ This allows your users to adjust the options before actually applying the plugin
|
||||
|
||||
Many plugin systems require you to either execute a plugin function like in `rollup`.
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
```js
|
||||
import json from '@rollup/plugin-json';
|
||||
export default {
|
||||
|
||||
/** @type {import('rocket/cli').RocketCliConfig} */
|
||||
export default ({
|
||||
plugins: [json({ preferConst: true })],
|
||||
};
|
||||
});
|
||||
```
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
or add it in a special way like in `eleventy`
|
||||
|
||||
|
||||
@@ -22,17 +22,17 @@ The Plugins Manager helps you register and execute your plugins across the vario
|
||||
|
||||
If you want to add a plugin to the Markdown processing you can use `setupUnifiedPlugins`.
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
```js
|
||||
import emoji from 'remark-emoji';
|
||||
import { addPlugin } from 'plugins-manager';
|
||||
|
||||
/** @type {Partial<import('@rocket/cli').RocketCliOptions>} */
|
||||
const config = {
|
||||
export default ({
|
||||
setupUnifiedPlugins: [addPlugin({ location: 'markdown', name: 'emoji', plugin: emoji })],
|
||||
};
|
||||
|
||||
export default config;
|
||||
});
|
||||
```
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
For plugins that should handle the Markdown <abbr title="Abstract Syntax Tree">AST</abbr> you should use `addPlugin({ location: 'markdown', name: 'my-plugin', plugin: MyPlugin})`. <br>
|
||||
While for the rehype AST you should use `addPlugin({ location: 'remark2rehype', name: 'my-plugin', plugin: MyPlugin})`.
|
||||
|
||||
@@ -21,7 +21,7 @@ cd my-project
|
||||
|
||||
Then initialize a package.json file
|
||||
|
||||
<code-tabs collection="package-managers" default-tab="npm">
|
||||
<code-tabs collection="package-managers" default-tab="npm" align="end">
|
||||
|
||||
```bash tab npm
|
||||
npm init -y
|
||||
@@ -39,7 +39,7 @@ pnpm init -y
|
||||
|
||||
### Step 2. Install dependencies
|
||||
|
||||
<code-tabs collection="package-managers" default-tab="npm">
|
||||
<code-tabs collection="package-managers" default-tab="npm" align="end">
|
||||
|
||||
```bash tab npm
|
||||
npm install --save-dev @rocket/cli @rocket/launch
|
||||
@@ -57,7 +57,7 @@ pnpm add -D @rocket/cli @rocket/launch
|
||||
|
||||
### Step 3. Bootstrap the project
|
||||
|
||||
<code-tabs collection="package-managers" default-tab="npm">
|
||||
<code-tabs collection="package-managers" default-tab="npm" align="end">
|
||||
|
||||
```bash tab npm
|
||||
npx rocket bootstrap
|
||||
@@ -92,13 +92,16 @@ If you don't want to use the `module` package type, make sure to rename the gene
|
||||
|
||||
<code-tabs default-tab="rocket.config.js">
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
```js tab rocket.config.js
|
||||
import { rocketLaunch } from '@rocket/launch';
|
||||
|
||||
export default {
|
||||
/** @type {import('rocket/cli').RocketCliConfig} */
|
||||
export default ({
|
||||
presets: [rocketLaunch()],
|
||||
};
|
||||
});
|
||||
```
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
```md tab docs/index.md
|
||||
# Welcome to Your Rocket Site
|
||||
@@ -145,7 +148,7 @@ Please note that the heading - text prefixed with `#` or `##` - is not optional
|
||||
|
||||
Now you can launch your site locally with
|
||||
|
||||
<code-tabs collection="package-managers" default-tab="npm">
|
||||
<code-tabs collection="package-managers" default-tab="npm" align="end">
|
||||
|
||||
```bash tab npm
|
||||
npm start
|
||||
|
||||
@@ -42,11 +42,13 @@ eleventyExcludeFromCollections: true
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||
{% raw %}{% for page in collections.all %}
|
||||
{%- if page.url !== '/404.html' -%}
|
||||
<url>
|
||||
<loc>{{ rocketConfig.absoluteBaseUrl }}{{ page.url | url }}</loc>
|
||||
<lastmod>{{ page.date.toISOString() }}</lastmod>
|
||||
<changefreq>{{ page.data.changeFreq if page.data.changeFreq else "monthly" }}</changefreq>
|
||||
</url>
|
||||
{%- endif -%}
|
||||
{% endfor %}{% endraw %}
|
||||
</urlset>
|
||||
```
|
||||
|
||||
15
package.json
15
package.json
@@ -8,15 +8,16 @@
|
||||
},
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"analyze": "node scripts/workspaces-scripts-bin.mjs analyze",
|
||||
"analyze": "run-s analyze:* format:*",
|
||||
"analyze:analyze": "node scripts/workspaces-scripts-bin.mjs analyze",
|
||||
"build": "npm run build:packages && npm run build:site",
|
||||
"build:packages": "node scripts/workspaces-scripts-bin.mjs build:package",
|
||||
"build:site": "npm run rocket:build",
|
||||
"build:site": "run-s analyze:* rocket:build",
|
||||
"changeset": "changeset",
|
||||
"debug": "web-test-runner --watch --config web-test-runner-chrome.config.mjs",
|
||||
"debug:firefox": "web-test-runner --watch --config web-test-runner-firefox.config.mjs",
|
||||
"debug:webkit": "web-test-runner --watch --config web-test-runner-webkit.config.mjs",
|
||||
"format": "npm run format:eslint && npm run format:prettier",
|
||||
"format": "run-s format:*",
|
||||
"format:eslint": "eslint --ext .ts,.js,.mjs,.cjs . --fix",
|
||||
"format:prettier": "node node_modules/prettier/bin-prettier.js \"**/*.{ts,js,mjs,cjs,md}\" \"**/!(expected)/package.json\" --write --ignore-path .eslintignore",
|
||||
"lint": "run-p lint:*",
|
||||
@@ -32,6 +33,7 @@
|
||||
"setup": "npm run setup:ts-configs && npm run build:packages",
|
||||
"setup:patches": "npx patch-package",
|
||||
"setup:ts-configs": "node scripts/generate-ts-configs.mjs",
|
||||
"prestart": "yarn analyze",
|
||||
"start": "node packages/cli/src/cli.js start",
|
||||
"test": "yarn test:node && yarn test:web",
|
||||
"test:node": "mocha \"packages/*/test-node/**/*.test.{ts,js,mjs,cjs}\" --timeout 5000 --reporter dot --exit",
|
||||
@@ -61,12 +63,12 @@
|
||||
"@web/test-runner": "^0.12.2",
|
||||
"@web/test-runner-commands": "^0.4.0",
|
||||
"@web/test-runner-playwright": "^0.8.0",
|
||||
"cem-plugin-readme": "^0.1.2",
|
||||
"cem-plugin-readme": "^0.1.3",
|
||||
"chai": "^4.2.0",
|
||||
"concurrently": "^5.3.0",
|
||||
"copyfiles": "^2.4.1",
|
||||
"deepmerge": "^4.2.2",
|
||||
"esbuild": "^0.8.31",
|
||||
"esbuild": "^0.12.15",
|
||||
"eslint": "^7.17.0",
|
||||
"eslint-config-prettier": "^7.1.0",
|
||||
"hanbi": "^0.4.1",
|
||||
@@ -81,7 +83,8 @@
|
||||
"puppeteer": "^9.0.0",
|
||||
"remark-emoji": "^2.1.0",
|
||||
"rimraf": "^3.0.2",
|
||||
"rocket-preset-code-tabs": "^0.2.1",
|
||||
"rocket-preset-code-tabs": "^0.2.6",
|
||||
"rocket-preset-custom-elements-manifest": "^0.1.7",
|
||||
"rollup": "^2.36.1",
|
||||
"rollup-plugin-terser": "^7.0.2",
|
||||
"sinon": "^9.2.3",
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
# @rocket/blog
|
||||
|
||||
## 0.3.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- e1089c5: add title to blog page
|
||||
|
||||
## 0.3.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 00f4a91: alignment + spacings for article grids
|
||||
|
||||
## 0.3.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@rocket/blog",
|
||||
"version": "0.3.1",
|
||||
"version": "0.3.3",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
|
||||
@@ -20,6 +20,8 @@ body[layout='layout-blog-details'] #sidebar-nav li.anchor a:hover::before {
|
||||
flex-wrap: wrap;
|
||||
margin: calc(-1 * var(--gap)) 0 0 calc(-1 * var(--gap));
|
||||
width: calc(100% + var(--gap));
|
||||
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.articles article {
|
||||
@@ -32,6 +34,12 @@ body[layout='layout-blog-details'] #sidebar-nav li.anchor a:hover::before {
|
||||
.articles article h2 {
|
||||
margin: 0;
|
||||
border: none;
|
||||
padding-top: 1rem;
|
||||
}
|
||||
|
||||
.articles article .thumbnail {
|
||||
display: block;
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
.articles article .read {
|
||||
@@ -48,7 +56,7 @@ body[layout='layout-blog-details'] #sidebar-nav li.anchor a:hover::before {
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1024px) {
|
||||
body[layout='layout-blog-details'] #sidebar {
|
||||
body[layout='layout-blog-details'] #sidebar {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
{% if title %}
|
||||
<h1>{{title}}</h1>
|
||||
{% endif %}
|
||||
{% if cover_image %}
|
||||
<img src="{{ cover_image | url }}" alt="">
|
||||
{% endif %}
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
{% if post.data.published %}
|
||||
<article>
|
||||
{% if post.data.cover_image %}
|
||||
<a href="{{ post.url | url }}">
|
||||
<img src="{{ post.data.cover_image | url }}" alt="">
|
||||
<a href="{{ post.url | url }}" class="thumbnail" style="background-image: url({{ post.data.cover_image | url }});">
|
||||
</a>
|
||||
{% endif %}
|
||||
<div class="content">
|
||||
|
||||
@@ -1 +1,9 @@
|
||||
<link rel="stylesheet" href="{{ '/_assets/rocket-blog.css' | asset | url }}">
|
||||
{%- if layout == 'layout-blog-overview' -%}
|
||||
<style>
|
||||
.articles article .thumbnail {
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
}
|
||||
</style>
|
||||
{%- endif -%}
|
||||
|
||||
@@ -1,5 +1,37 @@
|
||||
# @rocket/cli
|
||||
|
||||
## 0.9.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 7301a0f: Pass on rocketConfig to the eleventy function to enable conditional configurations/filters
|
||||
- 42418f2: Disable the service worker for local development
|
||||
- 5ac6aa6: Set the encoding of the simulator to utf8 via a html meta tag
|
||||
|
||||
## 0.9.10
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 738941a: In `rocket.config.js` you can now supply a rollup config function.
|
||||
|
||||
```js
|
||||
export default {
|
||||
rollup: config => {
|
||||
// config will be the fully generated config object after all presets have been applied
|
||||
if (config.plugins.includes('...')) {
|
||||
// change some config options
|
||||
}
|
||||
return config;
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
## 0.9.9
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- adf0f1d: use img openEnd to insert responsive image
|
||||
|
||||
## 0.9.8
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@rocket/cli",
|
||||
"version": "0.9.8",
|
||||
"version": "0.9.11",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
@@ -59,7 +59,7 @@
|
||||
"@11ty/eleventy-img": "^0.9.0",
|
||||
"@rocket/building-rollup": "^0.3.1",
|
||||
"@rocket/core": "^0.1.2",
|
||||
"@rocket/eleventy-plugin-mdjs-unified": "^0.5.1",
|
||||
"@rocket/eleventy-plugin-mdjs-unified": "^0.5.2",
|
||||
"@rocket/eleventy-rocket-nav": "^0.3.0",
|
||||
"@rollup/plugin-babel": "^5.2.2",
|
||||
"@rollup/plugin-node-resolve": "^11.0.1",
|
||||
|
||||
@@ -4,4 +4,6 @@
|
||||
window.__rocketServiceWorkerUrl = '{{ rocketServiceWorkerUrl | url }}';
|
||||
</script>
|
||||
|
||||
{% if rocketConfig.command == 'build' %}
|
||||
<script type="module" inject-service-worker="" src="{{ '/_assets/scripts/registerServiceWorker.js' | asset | url }}"></script>
|
||||
{% endif %}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<html theme="light" platform="web" lang="en">
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta charset="utf-8">
|
||||
<style type="text/css">
|
||||
body {
|
||||
margin: 0;
|
||||
|
||||
@@ -54,8 +54,8 @@ async function productionBuild(config) {
|
||||
...config.setupBuildPlugins,
|
||||
],
|
||||
});
|
||||
|
||||
await buildAndWrite(mpaConfig);
|
||||
const finalConfig = typeof config.rollup === 'function' ? config.rollup(mpaConfig) : mpaConfig;
|
||||
await buildAndWrite(finalConfig);
|
||||
|
||||
const serviceWorkerSourcePath = path.resolve('docs/_merged_assets/service-worker.js');
|
||||
if (fs.existsSync(serviceWorkerSourcePath)) {
|
||||
|
||||
@@ -33,7 +33,7 @@ function replaceBetween({ html, start, end, insert = '' }) {
|
||||
const i = start.line;
|
||||
const line = lines[i];
|
||||
const upToChange = line.slice(0, start.character);
|
||||
const afterChange = line.slice(end.character - 4);
|
||||
const afterChange = line.slice(end.character);
|
||||
|
||||
lines[i] = `${upToChange}${insert}${afterChange}`;
|
||||
return lines.join('\n');
|
||||
@@ -103,7 +103,8 @@ function getImages(html, { imagePresets }) {
|
||||
if (ev === SaxEventType.CloseTag) {
|
||||
const data = /** @type {Tag} */ (/** @type {any} */ (_data));
|
||||
if (data.name === 'img') {
|
||||
const { openStart, closeEnd } = data;
|
||||
// Img tag only has open tag.
|
||||
const { openStart, openEnd } = data;
|
||||
|
||||
const attributes = getAttributes(data);
|
||||
const presetName = getAttribute(data, 'rocket-image');
|
||||
@@ -127,7 +128,7 @@ function getImages(html, { imagePresets }) {
|
||||
title,
|
||||
alt,
|
||||
openStart,
|
||||
closeEnd,
|
||||
openEnd,
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -219,7 +220,7 @@ function updateHtml(html, changes) {
|
||||
newHtml = replaceBetween({
|
||||
html: newHtml,
|
||||
start: change.openStart,
|
||||
end: change.closeEnd,
|
||||
end: change.openEnd,
|
||||
insert: change.newHtml,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ module.exports = function (eleventyConfig) {
|
||||
}
|
||||
|
||||
if (config.eleventy) {
|
||||
const returnValue = config.eleventy(eleventyConfig);
|
||||
const returnValue = config.eleventy(eleventyConfig, config);
|
||||
if (returnValue) {
|
||||
const returnString = JSON.stringify(returnValue, null, 2);
|
||||
const msg = [
|
||||
|
||||
@@ -188,4 +188,39 @@ describe('RocketCli e2e', () => {
|
||||
errorMatch: /Found 1 missing reference targets/,
|
||||
});
|
||||
});
|
||||
|
||||
it('can completely take over the rollup config', async () => {
|
||||
cli = await executeBuild('e2e-fixtures/rollup-override/rocket.config.js');
|
||||
|
||||
const indexHtml = await readBuildOutput(cli, 'index.html', {
|
||||
stripToBody: true,
|
||||
formatHtml: true,
|
||||
});
|
||||
expect(indexHtml).to.equal(
|
||||
[
|
||||
'<h1 id="importing-foo">',
|
||||
' <a aria-hidden="true" tabindex="-1" href="#importing-foo"><span class="icon icon-link"></span></a',
|
||||
' >Importing foo',
|
||||
'</h1>',
|
||||
'',
|
||||
'<script type="module" src="./7338509a.js" mdjs-setup=""></script>',
|
||||
].join('\n'),
|
||||
);
|
||||
});
|
||||
|
||||
describe('can adjust the eleventy config while having access to the rocketConfig', () => {
|
||||
it('testing start', async () => {
|
||||
cli = await executeStart('e2e-fixtures/adjust-eleventy-config/rocket.config.js');
|
||||
const indexHtml = await readStartOutput(cli, 'index.html');
|
||||
expect(indexHtml).to.equal('<p><a href="start:/path/to/page/">link</a></p>');
|
||||
});
|
||||
|
||||
it('testing build', async () => {
|
||||
cli = await executeBuild('e2e-fixtures/adjust-eleventy-config/rocket.config.js');
|
||||
const indexBuildHtml = await readBuildOutput(cli, 'index.html', {
|
||||
stripToBody: true,
|
||||
});
|
||||
expect(indexBuildHtml).to.equal('<p><a href="build:/path/to/page/">link</a></p>');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -101,6 +101,52 @@ describe('RocketCli images', () => {
|
||||
'</p>',
|
||||
].join('\n'),
|
||||
);
|
||||
|
||||
const tableHtml = await readStartOutput(cli, 'table/index.html', {
|
||||
formatHtml: true,
|
||||
replaceImageHashes: true,
|
||||
});
|
||||
expect(tableHtml).to.equal(
|
||||
[
|
||||
'<table>',
|
||||
' <thead>',
|
||||
' <tr>',
|
||||
' <th>Image</th>',
|
||||
' </tr>',
|
||||
' </thead>',
|
||||
' <tbody>',
|
||||
' <tr>',
|
||||
' <td>',
|
||||
' <figure>',
|
||||
' <picture>',
|
||||
' <source',
|
||||
' type="image/avif"',
|
||||
' srcset="/images/__HASH__-600.avif 600w, /images/__HASH__-900.avif 900w"',
|
||||
' sizes="100vw"',
|
||||
' />',
|
||||
' <source',
|
||||
' type="image/jpeg"',
|
||||
' srcset="/images/__HASH__-600.jpeg 600w, /images/__HASH__-900.jpeg 900w"',
|
||||
' sizes="100vw"',
|
||||
' />',
|
||||
' <img',
|
||||
' alt="My Image Alternative Text"',
|
||||
' rocket-image="responsive"',
|
||||
' src="/images/__HASH__-600.jpeg"',
|
||||
' width="600"',
|
||||
' height="316"',
|
||||
' loading="lazy"',
|
||||
' decoding="async"',
|
||||
' />',
|
||||
' </picture>',
|
||||
' <figcaption>My Image Description</figcaption>',
|
||||
' </figure>',
|
||||
' </td>',
|
||||
' </tr>',
|
||||
' </tbody>',
|
||||
'</table>',
|
||||
].join('\n'),
|
||||
);
|
||||
});
|
||||
|
||||
it('can configure more patterns to ignore', async () => {
|
||||
|
||||
@@ -19,7 +19,7 @@ describe('RocketCli preset', () => {
|
||||
}
|
||||
});
|
||||
|
||||
it('offers a default layout (with head, header, content, footer, bottom) and raw layout', async () => {
|
||||
it.only('offers a default layout (with head, header, content, footer, bottom) and raw layout', async () => {
|
||||
cli = await executeStart('preset-fixtures/default/rocket.config.js');
|
||||
|
||||
const rawHtml = await readStartOutput(cli, 'raw/index.html');
|
||||
@@ -86,12 +86,6 @@ describe('RocketCli preset', () => {
|
||||
' </div>',
|
||||
'',
|
||||
' <footer id="main-footer"></footer>',
|
||||
'',
|
||||
' <script',
|
||||
' type="module"',
|
||||
' inject-service-worker=""',
|
||||
' src="/_merged_assets/scripts/registerServiceWorker.js"',
|
||||
' ></script>',
|
||||
' </body>',
|
||||
'</html>',
|
||||
].join('\n'),
|
||||
|
||||
@@ -31,7 +31,7 @@ describe('RocketCli e2e', () => {
|
||||
}
|
||||
});
|
||||
|
||||
it('will add a script to inject the service worker', async () => {
|
||||
it.only('will add a script to inject the service worker', async () => {
|
||||
cli = await executeBuild('e2e-fixtures/service-worker/rocket.config.js');
|
||||
const indexHtml = await readStartOutput(cli, 'index.html');
|
||||
const indexInject = getInjectServiceWorker(indexHtml);
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
**/*.njk
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
layout: layout-raw
|
||||
---
|
||||
|
||||
<a href="{{ '/path/to/page/' | conditional-resolve }}">link</a>
|
||||
@@ -0,0 +1,15 @@
|
||||
/** @type {Partial<import("../../../types/main").RocketCliOptions>} */
|
||||
const config = {
|
||||
eleventy: (config, rocketConfig) => {
|
||||
config.addFilter('conditional-resolve', value => {
|
||||
if (rocketConfig.command === 'build') {
|
||||
return `build:${value}`;
|
||||
}
|
||||
if (rocketConfig.command === 'start') {
|
||||
return `start:${value}`;
|
||||
}
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
export default config;
|
||||
7
packages/cli/test-node/e2e-fixtures/images/docs/table.md
Normal file
7
packages/cli/test-node/e2e-fixtures/images/docs/table.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
layout: layout-raw
|
||||
---
|
||||
|
||||
| Image |
|
||||
| --------------------------------------------------------------------------- |
|
||||
|  |
|
||||
@@ -0,0 +1 @@
|
||||
**/*.njk
|
||||
@@ -0,0 +1,11 @@
|
||||
---
|
||||
layout: layout-raw
|
||||
---
|
||||
|
||||
# Importing foo
|
||||
|
||||
```js script
|
||||
import { foo } from './not-foo.js';
|
||||
|
||||
console.log(foo);
|
||||
```
|
||||
@@ -0,0 +1 @@
|
||||
export const notFoo = 'not-foo';
|
||||
@@ -0,0 +1,11 @@
|
||||
// @ts-no-check
|
||||
|
||||
/** @type {Partial<import("../../../types/main").RocketCliOptions>} */
|
||||
const config = {
|
||||
rollup: config => ({
|
||||
...config,
|
||||
shimMissingExports: true,
|
||||
}),
|
||||
};
|
||||
|
||||
export default config;
|
||||
1
packages/cli/types/main.d.ts
vendored
1
packages/cli/types/main.d.ts
vendored
@@ -40,6 +40,7 @@ export interface RocketCliOptions extends Pick<RocketPreset, PresetKeys> {
|
||||
start?: RocketStartConfig;
|
||||
|
||||
// advanced
|
||||
rollup?: (config: any) => void; // TODO: improve
|
||||
devServer?: DevServerConfig;
|
||||
eleventy?: (eleventyConfig: any) => void; // TODO: improve
|
||||
plugins?: RocketPlugin[];
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
# @rocket/launch
|
||||
|
||||
## 0.5.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 0987a41: Fix styling in darkmode
|
||||
|
||||
## 0.5.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 3d22fbb: Prevent styles from applying to lion components that are rendered in light dom
|
||||
|
||||
## 0.5.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -28,16 +28,22 @@ For docs please see our homepage [https://rocket.modern-web.dev/docs/presets/lau
|
||||
|
||||
#### CSS Properties
|
||||
|
||||
| Name | Description |
|
||||
| ---------------------------------------------- | ----------- |
|
||||
| --inline-notification-tip-background-color | |
|
||||
| --inline-notification-tip-border-color | |
|
||||
| --inline-notification-warning-background-color | |
|
||||
| --inline-notification-warning-border-color | |
|
||||
| --inline-notification-danger-background-color | |
|
||||
| --inline-notification-danger-border-color | |
|
||||
| --inline-notification-warning-heading-color | |
|
||||
| --inline-notification-danger-heading-color | |
|
||||
| Name | Default | Description |
|
||||
| ---------------------------------------------- | -------------------------- | ----------- |
|
||||
| --inline-notification-tip-background-color | `rgba(221, 221, 221, 0.3)` | |
|
||||
| --inline-notification-tip-border-color | `#42b983` | |
|
||||
| --inline-notification-warning-background-color | `rgba(255, 229, 100, 0.2)` | |
|
||||
| --inline-notification-warning-border-color | `#e7c000` | |
|
||||
| --inline-notification-danger-background-color | `rgba(192, 0, 0, 0.1)` | |
|
||||
| --inline-notification-danger-border-color | `#c00` | |
|
||||
| --inline-notification-warning-heading-color | `#b29400` | |
|
||||
| --inline-notification-danger-heading-color | `#900` | |
|
||||
|
||||
#### CSS Parts
|
||||
|
||||
| Name | Description |
|
||||
| ----- | ----------------- |
|
||||
| title | the title heading |
|
||||
|
||||
<hr/>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@rocket/launch",
|
||||
"version": "0.5.4",
|
||||
"version": "0.5.6",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
@font-face {
|
||||
font-family: octicons-link;
|
||||
src:
|
||||
url(data:font/woff;charset=utf-8;base64,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)
|
||||
src: url(data:font/woff;charset=utf-8;base64,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)
|
||||
format('woff');
|
||||
}
|
||||
|
||||
@@ -121,7 +120,7 @@
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.markdown-body [type='checkbox'] {
|
||||
.markdown-body input[type='checkbox'] {
|
||||
box-sizing: border-box;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ html {
|
||||
--primary-color-accent: #cee5f6;
|
||||
--primary-text-color: #2c3e50;
|
||||
--primary-lines-color: #ccc;
|
||||
--primary-text-inverse-color: #eee;
|
||||
|
||||
/* Contrast colors */
|
||||
--contrast-color-light: #fff;
|
||||
@@ -19,6 +20,10 @@ html {
|
||||
--primary-font-family: 'Open Sans', sans-serif;
|
||||
--secondary-font-family: 'Montserrat', sans-serif;
|
||||
--monospace-font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', 'Menlo', 'Courier', monospace;
|
||||
|
||||
/* controls */
|
||||
--switch-unselected-color: #808080;
|
||||
--switch-selected-color: #42b983;
|
||||
}
|
||||
|
||||
html.dark {
|
||||
@@ -27,6 +32,7 @@ html.dark {
|
||||
--primary-color-darker: #a22831;
|
||||
--primary-color-accent: #cee5f6;
|
||||
--primary-text-color: #eee;
|
||||
--primary-text-inverse-color: #2c3e50;
|
||||
|
||||
/* Contrast colors */
|
||||
--contrast-color-light: #fff;
|
||||
@@ -39,6 +45,10 @@ html.dark {
|
||||
/* typography */
|
||||
--text-color: white;
|
||||
|
||||
/* controls */
|
||||
--switch-unselected-color: #808080;
|
||||
--switch-selected-color: #42b983;
|
||||
|
||||
/* markdown */
|
||||
--markdown-octicon-link: white;
|
||||
--markdown-syntax-background-color: #a0a0a0;
|
||||
|
||||
@@ -19,7 +19,7 @@ describe('RocketLaunch preset', () => {
|
||||
}
|
||||
});
|
||||
|
||||
it('sets layout-sidebar as default', async () => {
|
||||
it.only('sets layout-sidebar as default', async () => {
|
||||
cli = await executeStart('fixtures/layout-sidebar/rocket.config.js');
|
||||
|
||||
const indexHtml = await readStartOutput(cli, 'page/index.html', {
|
||||
@@ -244,12 +244,6 @@ describe('RocketLaunch preset', () => {
|
||||
' </footer>',
|
||||
'',
|
||||
' <script type="module" src="/_merged_assets/scripts/init-navigation.js"></script>',
|
||||
'',
|
||||
' <script',
|
||||
' type="module"',
|
||||
' inject-service-worker=""',
|
||||
' src="/_merged_assets/scripts/registerServiceWorker.js"',
|
||||
' ></script>',
|
||||
' </body>',
|
||||
'</html>',
|
||||
].join('\n'),
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @mdjs/mdjs-preview
|
||||
|
||||
## 0.5.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 0987a41: - Make [slot="content"] selector more specific
|
||||
- 0987a41: Fix styling in darkmode
|
||||
|
||||
## 0.5.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@mdjs/mdjs-preview",
|
||||
"version": "0.5.1",
|
||||
"version": "0.5.2",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
|
||||
@@ -652,7 +652,7 @@ export class MdJsPreview extends ScopedElementsMixin(LitElement) {
|
||||
|
||||
[part='copy-button']:hover {
|
||||
background-color: var(--primary-color, #3f51b5);
|
||||
color: #fff;
|
||||
color: var(--primary-text-inverse-color, #eee);
|
||||
}
|
||||
|
||||
.switch {
|
||||
@@ -668,7 +668,7 @@ export class MdJsPreview extends ScopedElementsMixin(LitElement) {
|
||||
[part='switch-button'] {
|
||||
display: inline-block;
|
||||
width: 44px;
|
||||
background: #808080;
|
||||
background: var(--switch-unselected-color, #808080);
|
||||
height: 25px;
|
||||
border-radius: 15px;
|
||||
position: relative;
|
||||
@@ -687,7 +687,7 @@ export class MdJsPreview extends ScopedElementsMixin(LitElement) {
|
||||
}
|
||||
|
||||
.switch.selected [part='switch-button'] {
|
||||
background: var(--primary-color, #008000);
|
||||
background: var(--switch-selected-color, #42b983);
|
||||
}
|
||||
|
||||
.switch.selected [part='switch-button']::after {
|
||||
@@ -699,7 +699,7 @@ export class MdJsPreview extends ScopedElementsMixin(LitElement) {
|
||||
margin: -5px 0 10px 0;
|
||||
text-align: right;
|
||||
font-size: 12px;
|
||||
color: #333;
|
||||
color: var(--primary-text-color, #2c3e50);
|
||||
}
|
||||
|
||||
.settings-wrapper {
|
||||
@@ -748,7 +748,7 @@ export class MdJsPreview extends ScopedElementsMixin(LitElement) {
|
||||
|
||||
.simulation-toggle:hover {
|
||||
background-color: var(--primary-color, #3f51b5);
|
||||
color: #fff;
|
||||
color: var(--primary-text-inverse-color, #eee);
|
||||
}
|
||||
|
||||
h3[slot='invoker'] button {
|
||||
@@ -759,6 +759,7 @@ export class MdJsPreview extends ScopedElementsMixin(LitElement) {
|
||||
border: none;
|
||||
border-bottom: 1px solid #bbb;
|
||||
width: 100%;
|
||||
color: var(--primary-text-color, #2c3e50);
|
||||
background: none;
|
||||
text-align: left;
|
||||
font-weight: bold;
|
||||
@@ -780,7 +781,7 @@ export class MdJsPreview extends ScopedElementsMixin(LitElement) {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
[slot='content'] {
|
||||
.options > [slot='content'] {
|
||||
border-bottom: 1px solid #bbb;
|
||||
padding: 10px;
|
||||
}
|
||||
@@ -820,7 +821,7 @@ export class MdJsPreview extends ScopedElementsMixin(LitElement) {
|
||||
|
||||
.segmented-control label.selected span {
|
||||
background: var(--primary-color, #3f51b5);
|
||||
color: #fff;
|
||||
color: var(--primary-text-inverse-color, #eee);
|
||||
}
|
||||
|
||||
.segmented-control label:focus-within span {
|
||||
|
||||
@@ -6,7 +6,7 @@ For docs please see our homepage [https://rocket.modern-web.dev/docs/presets/sea
|
||||
|
||||
## `src/RocketSearch.js`:
|
||||
|
||||
### class: `RocketSearch`
|
||||
### class: `RocketSearch`, `rocket-search`
|
||||
|
||||
#### Superclass
|
||||
|
||||
@@ -22,22 +22,22 @@ For docs please see our homepage [https://rocket.modern-web.dev/docs/presets/sea
|
||||
|
||||
#### Fields
|
||||
|
||||
| Name | Privacy | Type | Default | Description | Inherited From |
|
||||
| -------------- | ------- | ---------------------- | -------------------- | ----------- | -------------- |
|
||||
| scopedElements | | | | | |
|
||||
| combobox | | | | | |
|
||||
| jsonUrl | public | `string` | `''` | | |
|
||||
| search | public | `string` | `''` | | |
|
||||
| maxResults | public | `number` | `10` | | |
|
||||
| noResultsText | public | `string` | `'No results found'` | | |
|
||||
| results | public | `RocketSearchResult[]` | `[]` | | |
|
||||
| miniSearch | | `null` | `null` | | |
|
||||
| Name | Privacy | Type | Default | Description | Inherited From |
|
||||
| -------------- | ------- | ---------------------------- | -------------------- | ----------- | -------------- |
|
||||
| scopedElements | | | | | |
|
||||
| combobox | | `RocketSearchCombobox\|null` | | | |
|
||||
| jsonUrl | public | `string` | `''` | | |
|
||||
| search | public | `string` | `''` | | |
|
||||
| maxResults | public | `number` | `10` | | |
|
||||
| noResultsText | public | `string` | `'No results found'` | | |
|
||||
| results | public | `RocketSearchResult[]` | `[]` | | |
|
||||
| miniSearch | | `MiniSearch\|null` | `null` | | |
|
||||
|
||||
#### Methods
|
||||
|
||||
| Name | Privacy | Description | Parameters | Return | Inherited From |
|
||||
| ----------- | ------- | ----------- | ---------- | ------ | -------------- |
|
||||
| setupSearch | | | | | |
|
||||
| Name | Privacy | Description | Parameters | Return | Inherited From |
|
||||
| ----------- | ------- | ------------------------------------------------------------------------- | ---------- | --------------- | -------------- |
|
||||
| setupSearch | | Fetches the search index at `this.jsonUrl` and sets up the search engine. | | `Promise<void>` | |
|
||||
|
||||
#### Attributes
|
||||
|
||||
@@ -49,6 +49,24 @@ For docs please see our homepage [https://rocket.modern-web.dev/docs/presets/sea
|
||||
| max-results | maxResults | |
|
||||
| noResultsText | noResultsText | |
|
||||
|
||||
#### CSS Properties
|
||||
|
||||
| Name | Default | Description |
|
||||
| ----------------------------------- | --------- | ------------------------------------- |
|
||||
| --rocket-search-background-color | `#fff` | Search results background colour |
|
||||
| --rocket-search-caret-color | `initial` | Search input caret colour |
|
||||
| --rocket-search-input-border-color | `#dfe1e5` | Search input border colour |
|
||||
| --rocket-search-input-border-radius | `24px` | Search input border radius |
|
||||
| --rocket-search-fill-color | `#000` | Search Icon Color |
|
||||
| --rocket-search-highlight-color | `#6c63ff` | Highlighted search result text colour |
|
||||
|
||||
#### CSS Parts
|
||||
|
||||
| Name | Description |
|
||||
| ------------- | -------------------- |
|
||||
| search-option | search result |
|
||||
| empty | empty search results |
|
||||
|
||||
<hr/>
|
||||
|
||||
### Exports
|
||||
@@ -79,11 +97,39 @@ For docs please see our homepage [https://rocket.modern-web.dev/docs/presets/sea
|
||||
|
||||
#### Methods
|
||||
|
||||
| Name | Privacy | Description | Parameters | Return | Inherited From |
|
||||
| ----- | ------- | ----------- | ---------- | ------ | -------------- |
|
||||
| focus | | | | | |
|
||||
|
||||
#### CSS Properties
|
||||
|
||||
| Name | Default | Description |
|
||||
| ------------------------------------------ | --------- | ----------- |
|
||||
| --rocket-search-fill-color | `#000` | |
|
||||
| --rocket-search-background-color | `#fff` | |
|
||||
| --rocket-search-input-overlay-border-color | `#ccc` | |
|
||||
| --rocket-search-input-border-color | `#dfe1e5` | |
|
||||
| --rocket-search-input-border-radius | `24px` | |
|
||||
|
||||
#### Slots
|
||||
|
||||
| Name | Description |
|
||||
| ------- | ----------- |
|
||||
| prefix | |
|
||||
| label | |
|
||||
| listbox | |
|
||||
| input | |
|
||||
|
||||
<details><summary>Private API</summary>
|
||||
|
||||
#### Methods
|
||||
|
||||
| Name | Privacy | Description | Parameters | Return | Inherited From |
|
||||
| --------------------- | ------- | ----------- | ---------- | ------ | -------------- |
|
||||
| \_connectSlotMixin | | | | | |
|
||||
| \_defineOverlayConfig | | | | | |
|
||||
| focus | | | | | |
|
||||
| \_connectSlotMixin | private | | | | |
|
||||
| \_defineOverlayConfig | private | | | | |
|
||||
|
||||
</details>
|
||||
|
||||
<hr/>
|
||||
|
||||
|
||||
@@ -10,6 +10,48 @@
|
||||
"kind": "class",
|
||||
"description": "",
|
||||
"name": "RocketSearch",
|
||||
"cssProperties": [
|
||||
{
|
||||
"description": "Search results background colour",
|
||||
"name": "--rocket-search-background-color",
|
||||
"default": "#fff"
|
||||
},
|
||||
{
|
||||
"description": "Search input caret colour",
|
||||
"name": "--rocket-search-caret-color",
|
||||
"default": "initial"
|
||||
},
|
||||
{
|
||||
"description": "Search input border colour",
|
||||
"name": "--rocket-search-input-border-color",
|
||||
"default": "#dfe1e5"
|
||||
},
|
||||
{
|
||||
"description": "Search input border radius",
|
||||
"name": "--rocket-search-input-border-radius",
|
||||
"default": "24px"
|
||||
},
|
||||
{
|
||||
"description": "Search Icon Color",
|
||||
"name": "--rocket-search-fill-color",
|
||||
"default": "#000"
|
||||
},
|
||||
{
|
||||
"description": "Highlighted search result text colour",
|
||||
"name": "--rocket-search-highlight-color",
|
||||
"default": "#6c63ff"
|
||||
}
|
||||
],
|
||||
"cssParts": [
|
||||
{
|
||||
"description": "search result",
|
||||
"name": "search-option"
|
||||
},
|
||||
{
|
||||
"description": "empty search results",
|
||||
"name": "empty"
|
||||
}
|
||||
],
|
||||
"members": [
|
||||
{
|
||||
"kind": "field",
|
||||
@@ -18,11 +60,20 @@
|
||||
},
|
||||
{
|
||||
"kind": "method",
|
||||
"name": "setupSearch"
|
||||
"name": "setupSearch",
|
||||
"description": "Fetches the search index at `this.jsonUrl` and sets up the search engine.",
|
||||
"return": {
|
||||
"type": {
|
||||
"text": "Promise<void>"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "field",
|
||||
"name": "combobox"
|
||||
"name": "combobox",
|
||||
"type": {
|
||||
"text": "RocketSearchCombobox|null"
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "field",
|
||||
@@ -78,7 +129,7 @@
|
||||
"kind": "field",
|
||||
"name": "miniSearch",
|
||||
"type": {
|
||||
"text": "null"
|
||||
"text": "MiniSearch|null"
|
||||
},
|
||||
"default": "null"
|
||||
}
|
||||
@@ -115,6 +166,7 @@
|
||||
"name": "LitElement",
|
||||
"package": "@lion/core"
|
||||
},
|
||||
"tagName": "rocket-search",
|
||||
"customElement": true
|
||||
}
|
||||
],
|
||||
@@ -137,14 +189,52 @@
|
||||
"kind": "class",
|
||||
"description": "",
|
||||
"name": "RocketSearchCombobox",
|
||||
"cssProperties": [
|
||||
{
|
||||
"name": "--rocket-search-fill-color",
|
||||
"default": "#000"
|
||||
},
|
||||
{
|
||||
"name": "--rocket-search-background-color",
|
||||
"default": "#fff"
|
||||
},
|
||||
{
|
||||
"name": "--rocket-search-input-overlay-border-color",
|
||||
"default": "#ccc"
|
||||
},
|
||||
{
|
||||
"name": "--rocket-search-input-border-color",
|
||||
"default": "#dfe1e5"
|
||||
},
|
||||
{
|
||||
"name": "--rocket-search-input-border-radius",
|
||||
"default": "24px"
|
||||
}
|
||||
],
|
||||
"slots": [
|
||||
{
|
||||
"name": "prefix"
|
||||
},
|
||||
{
|
||||
"name": "label"
|
||||
},
|
||||
{
|
||||
"name": "listbox"
|
||||
},
|
||||
{
|
||||
"name": "input"
|
||||
}
|
||||
],
|
||||
"members": [
|
||||
{
|
||||
"kind": "method",
|
||||
"name": "_connectSlotMixin"
|
||||
"name": "_connectSlotMixin",
|
||||
"privacy": "private"
|
||||
},
|
||||
{
|
||||
"kind": "method",
|
||||
"name": "_defineOverlayConfig"
|
||||
"name": "_defineOverlayConfig",
|
||||
"privacy": "private"
|
||||
},
|
||||
{
|
||||
"kind": "field",
|
||||
|
||||
@@ -31,7 +31,20 @@ function getText({ result, search }) {
|
||||
return highlightSearchTerms({ text: body, search, terms, addEllipsis: true });
|
||||
}
|
||||
|
||||
// @ts-expect-error https://github.com/microsoft/TypeScript/issues/40110
|
||||
// | Property | Default | Description |
|
||||
// | ------------------------------------- | --------- | ------------------------------------ |
|
||||
|
||||
/**
|
||||
* @element rocket-search
|
||||
* @cssprop [--rocket-search-background-color=#fff] - Search results background colour
|
||||
* @cssprop [--rocket-search-caret-color=initial] - Search input caret colour
|
||||
* @cssprop [--rocket-search-input-border-color=#dfe1e5] - Search input border colour
|
||||
* @cssprop [--rocket-search-input-border-radius=24px] - Search input border radius
|
||||
* @cssprop [--rocket-search-fill-color=#000] - Search Icon Color
|
||||
* @cssprop [--rocket-search-highlight-color=#6c63ff] - Highlighted search result text colour
|
||||
* @csspart search-option - search result
|
||||
* @csspart empty - empty search results
|
||||
*/
|
||||
export class RocketSearch extends ScopedElementsMixin(LitElement) {
|
||||
static get properties() {
|
||||
return {
|
||||
@@ -60,9 +73,14 @@ export class RocketSearch extends ScopedElementsMixin(LitElement) {
|
||||
* @type {RocketSearchResult[]}
|
||||
*/
|
||||
this.results = [];
|
||||
/** @type {MiniSearch|null} */
|
||||
this.miniSearch = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches the search index at `this.jsonUrl` and sets up the search engine.
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
async setupSearch() {
|
||||
if (!this.jsonUrl) {
|
||||
throw new Error(
|
||||
@@ -92,8 +110,9 @@ export class RocketSearch extends ScopedElementsMixin(LitElement) {
|
||||
});
|
||||
}
|
||||
|
||||
/** @type {RocketSearchCombobox|null} */
|
||||
get combobox() {
|
||||
return this.shadowRoot.querySelector('rocket-search-combobox');
|
||||
return this.shadowRoot?.querySelector?.('rocket-search-combobox') ?? null;
|
||||
}
|
||||
|
||||
/** @param {import('lit-element').PropertyValues } changedProperties */
|
||||
@@ -112,9 +131,11 @@ export class RocketSearch extends ScopedElementsMixin(LitElement) {
|
||||
<rocket-search-combobox
|
||||
name="combo"
|
||||
label="Search"
|
||||
@input=${ev => {
|
||||
this.search = ev.target.value;
|
||||
}}
|
||||
@input=${
|
||||
/** @param {Event & { target: HTMLInputElement }} ev */ ev => {
|
||||
this.search = ev.target.value;
|
||||
}
|
||||
}
|
||||
@focus=${() => {
|
||||
this.setupSearch();
|
||||
}}
|
||||
@@ -125,6 +146,7 @@ export class RocketSearch extends ScopedElementsMixin(LitElement) {
|
||||
result => html`
|
||||
<rocket-search-option
|
||||
href=${result.id}
|
||||
part="search-option"
|
||||
rel="noopener noreferrer"
|
||||
.title=${getTitle({ result, search: this.search })}
|
||||
.choiceValue=${this.search}
|
||||
@@ -134,7 +156,12 @@ export class RocketSearch extends ScopedElementsMixin(LitElement) {
|
||||
`,
|
||||
)}
|
||||
${this.results.length <= 0 && this.search.length > 0
|
||||
? html` <rocket-search-option .title=${this.noResultsText}></rocket-search-option> `
|
||||
? html`
|
||||
<rocket-search-option
|
||||
part="search-option empty"
|
||||
.title=${this.noResultsText}
|
||||
></rocket-search-option>
|
||||
`
|
||||
: ''}
|
||||
</rocket-search-combobox>
|
||||
`;
|
||||
|
||||
@@ -21,6 +21,18 @@ searchBtnTmpl.innerHTML = `
|
||||
</button>
|
||||
`;
|
||||
|
||||
/**
|
||||
* @cssprop [--rocket-search-fill-color=#000]
|
||||
* @cssprop [--rocket-search-background-color=#fff]
|
||||
* @cssprop [--rocket-search-input-overlay-border-color=#ccc]
|
||||
* @cssprop [--rocket-search-input-border-color=#dfe1e5]
|
||||
* @cssprop [--rocket-search-input-border-radius=24px]
|
||||
* @slot prefix
|
||||
* @slot label
|
||||
* @slot listbox
|
||||
* @slot input
|
||||
* @type {String}
|
||||
*/
|
||||
export class RocketSearchCombobox extends LionCombobox {
|
||||
static get styles() {
|
||||
return [
|
||||
@@ -182,6 +194,7 @@ export class RocketSearchCombobox extends LionCombobox {
|
||||
});
|
||||
}
|
||||
|
||||
/** @private */
|
||||
_connectSlotMixin() {
|
||||
if (!this.__isConnectedSlotMixin) {
|
||||
Object.keys(this.slots).forEach(slotName => {
|
||||
@@ -208,6 +221,7 @@ export class RocketSearchCombobox extends LionCombobox {
|
||||
}
|
||||
}
|
||||
|
||||
/** @private */
|
||||
_defineOverlayConfig() {
|
||||
/** @type {'bottom'} */
|
||||
const placement = 'bottom';
|
||||
|
||||
@@ -4,6 +4,7 @@ import { rocketSearch } from '@rocket/search';
|
||||
import { absoluteBaseUrlNetlify } from '@rocket/core/helpers';
|
||||
import { adjustPluginOptions } from 'plugins-manager';
|
||||
import { codeTabs } from 'rocket-preset-code-tabs';
|
||||
import { customElementsManifest } from 'rocket-preset-custom-elements-manifest';
|
||||
|
||||
/** @type {import('./packages/cli/types/main').RocketCliOptions} */
|
||||
export default {
|
||||
@@ -22,6 +23,7 @@ export default {
|
||||
},
|
||||
},
|
||||
}),
|
||||
customElementsManifest(),
|
||||
],
|
||||
|
||||
setupUnifiedPlugins: [
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/* eslint-disable */
|
||||
import { readdirSync, existsSync, readFileSync } from 'fs';
|
||||
import semver from 'semver';
|
||||
|
||||
const getDirectories = source =>
|
||||
readdirSync(source, { withFileTypes: true })
|
||||
@@ -35,7 +36,12 @@ function compareVersions(versionsA, versionsB) {
|
||||
let output = '';
|
||||
const newVersions = { ...versionsA };
|
||||
Object.keys(versionsB).forEach(dep => {
|
||||
if (versionsA[dep] && versionsB[dep] && versionsA[dep] !== versionsB[dep]) {
|
||||
if (
|
||||
versionsA[dep] &&
|
||||
versionsB[dep] &&
|
||||
versionsA[dep] !== versionsB[dep] &&
|
||||
!semver.satisfies(versionsA[dep], versionsB[dep])
|
||||
) {
|
||||
output += ` - "${dep}" should be "${versionsA[dep]}" but is "${versionsB[dep]}"\n`;
|
||||
}
|
||||
if (!newVersions[dep]) {
|
||||
|
||||
152
yarn.lock
152
yarn.lock
@@ -1094,10 +1094,10 @@
|
||||
globby "^11.0.4"
|
||||
typescript "^4.3.2"
|
||||
|
||||
"@custom-elements-manifest/to-markdown@^0.0.9":
|
||||
version "0.0.9"
|
||||
resolved "https://registry.yarnpkg.com/@custom-elements-manifest/to-markdown/-/to-markdown-0.0.9.tgz#4d84db87db48b397cbfd3318ddea093e179f75ae"
|
||||
integrity sha512-39/GRlSUZMRresuTVSUw56PMTdjrGGpUi8sKll5NZEZq78uJOef8gSKEISpyMPiOmivKoLJAxKA2b0MJP+l0KA==
|
||||
"@custom-elements-manifest/to-markdown@^0.0.12":
|
||||
version "0.0.12"
|
||||
resolved "https://registry.yarnpkg.com/@custom-elements-manifest/to-markdown/-/to-markdown-0.0.12.tgz#9aae0271636a5300c8d95e6cb8b83c0d74d52747"
|
||||
integrity sha512-24RMTw1leMIJuXjtyZXAjYJ3VLRYTSjdNWvYiJ7wKHyLc0Ab4dv27nX9PQvQkxg8huFzweMad5kUkAFp8S9bww==
|
||||
dependencies:
|
||||
mdast-builder "^1.1.1"
|
||||
mdast-util-from-markdown "^1.0.0"
|
||||
@@ -1345,21 +1345,26 @@
|
||||
resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.6.0.tgz#f022195afdfc942e088ee2101285a1d31c7d727f"
|
||||
integrity sha512-cPqjjzuFWNK3BSKLm0abspP0sp/IGOli4p5I5fKFAzdS8fvjdOwDCfZqAaIiXd9lPkOWi3SUUfZof3hEb7J/uw==
|
||||
|
||||
"@pwrs/lit-css@^1.0.0":
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@pwrs/lit-css/-/lit-css-1.0.0.tgz#4355988398166986d15ba8ae38bcc73e247e50d3"
|
||||
integrity sha512-Xhku8/mFegXIlh/LyPhTQ0ioCOS3CUl7suJx++ueE2PmqHNL+gn8I5IvSp3Jdmau0ae+pY2BJjfCNFfvCSqPsA==
|
||||
"@power-elements/json-viewer@2.1.1":
|
||||
version "2.1.1"
|
||||
resolved "https://registry.yarnpkg.com/@power-elements/json-viewer/-/json-viewer-2.1.1.tgz#f65a4c9bffb4aae2c4eaa8acc1c74cc38f0aac82"
|
||||
integrity sha512-uQWqhlc1huWMnYycf5ltgU1hStancWyMt7g8bJ0jCZ3QrOlZmHWUdPt55i4I6L7bDKJLbO1J6oB+O4QWj4Nlew==
|
||||
|
||||
"@pwrs/lit-css@^1.0.1":
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@pwrs/lit-css/-/lit-css-1.0.1.tgz#6aa5168e41bd528cdaa6b62c9eb8a7bad6788976"
|
||||
integrity sha512-xSCPI0Uc0vrgBxBIMhglnjjEftQ61ecCR6xVKnN5OlculOaToP8ggCY6iO3PtFyZDPq33hRL5pWH5Y7w1wv+VA==
|
||||
dependencies:
|
||||
string-to-template-literal "^2.0.0"
|
||||
uglifycss "^0.0.29"
|
||||
|
||||
"@pwrs/mixins@^0.2.0":
|
||||
version "0.2.0"
|
||||
resolved "https://registry.yarnpkg.com/@pwrs/mixins/-/mixins-0.2.0.tgz#3834c1f8f1f51454546bcd32855b0a771e7cb703"
|
||||
integrity sha512-ef6mXLUL8FMJXwVDfxw53MHgLu3ZXSVy1/31ECpYjUF7VKsjFbFPW/xz/kEojO/5pFRpXyy7U17sIDbQJZe26w==
|
||||
"@pwrs/mixins@^0.2.1":
|
||||
version "0.2.1"
|
||||
resolved "https://registry.yarnpkg.com/@pwrs/mixins/-/mixins-0.2.1.tgz#44f65ed393ce2d3a1895222cb7203ac3752515ce"
|
||||
integrity sha512-hgBU6iDQcczFDOvtZAmzX3/XRy3So3+1HnY3FBwH8be3OEiD816FX1yEj41wLPBcsX2YgjtfcloJ9USxGOrYjA==
|
||||
dependencies:
|
||||
"@open-wc/dedupe-mixin" "^1.3.0"
|
||||
"@types/ramda" "^0.27.40"
|
||||
"@types/ramda" "^0.27.44"
|
||||
bind-decorator "^1.0.11"
|
||||
lit "^2.0.0-rc.2"
|
||||
lit-element "^2.5.1"
|
||||
@@ -1705,10 +1710,10 @@
|
||||
resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.5.tgz#434711bdd49eb5ee69d90c1d67c354a9a8ecb18b"
|
||||
integrity sha512-/JHkVHtx/REVG0VVToGRGH2+23hsYLHdyG+GrvoUGlGAd0ErauXDyvHtRI/7H7mzLm+tBCKA7pfcpkQ1lf58iQ==
|
||||
|
||||
"@types/ramda@^0.27.40":
|
||||
version "0.27.43"
|
||||
resolved "https://registry.yarnpkg.com/@types/ramda/-/ramda-0.27.43.tgz#3c0632a82479bccac7455ec77a2b1e43b326fe2f"
|
||||
integrity sha512-AZ1q/rG/aBYszHxeZ9/0rzKyH7ghpkMwZSSZGZbCEX+fleRFPhKpXht/tYpyU65tDeXjkaafKd2Sp+PNB5wmGw==
|
||||
"@types/ramda@^0.27.44":
|
||||
version "0.27.44"
|
||||
resolved "https://registry.yarnpkg.com/@types/ramda/-/ramda-0.27.44.tgz#ba2283d67fcff366f7e68bd5124a0466e467967f"
|
||||
integrity sha512-SlEHKcLG36PlU+rLJwp8p4dpC9Hp/LiH6n0REX2m4iEB15PWe1qKQzgNSZrYKhTHDFvkeEM/F2gcYwfighsEuQ==
|
||||
dependencies:
|
||||
ts-toolbelt "^6.15.1"
|
||||
|
||||
@@ -2766,12 +2771,12 @@ ccount@^2.0.0:
|
||||
resolved "https://registry.yarnpkg.com/ccount/-/ccount-2.0.0.tgz#3d6fb55803832766a24c6f339abc507297eb5d25"
|
||||
integrity sha512-VOR0NWFYX65n9gELQdcpqsie5L5ihBXuZGAgaPEp/U7IOSjnPMEH6geE+2f6lcekaNEfWzAHS45mPvSo5bqsUA==
|
||||
|
||||
cem-plugin-readme@^0.1.2:
|
||||
version "0.1.2"
|
||||
resolved "https://registry.yarnpkg.com/cem-plugin-readme/-/cem-plugin-readme-0.1.2.tgz#65a4d6c8973bb9c42e2a68fb3053a353e5475379"
|
||||
integrity sha512-K28QXc6nG22p+aHzdPnQQi3uM02HLkbERCqDCwLT11mmQMr+WS5sbXwnR4YYUhPc/kUbASUu+OoFLlgmQ+7RgQ==
|
||||
cem-plugin-readme@^0.1.3:
|
||||
version "0.1.3"
|
||||
resolved "https://registry.yarnpkg.com/cem-plugin-readme/-/cem-plugin-readme-0.1.3.tgz#c084415a8af4df73d802b7b395976ed62854e169"
|
||||
integrity sha512-k160SaxSL8we5qhVbu+/RGXctmRIMCVcBwygKh9xDlXIFXypYggUfWpnvJ825VigMRdimn4ZMj2ITc0oqp1IGg==
|
||||
dependencies:
|
||||
"@custom-elements-manifest/to-markdown" "^0.0.9"
|
||||
"@custom-elements-manifest/to-markdown" "^0.0.12"
|
||||
|
||||
center-align@^0.1.1:
|
||||
version "0.1.3"
|
||||
@@ -3723,6 +3728,11 @@ eleventy-plugin-add-web-component-definitions@^2.0.3:
|
||||
parse5 "^5.1.1"
|
||||
unist-util-visit "^2.0.3"
|
||||
|
||||
eleventy-plugin-footnotes@0.9.0:
|
||||
version "0.9.0"
|
||||
resolved "https://registry.yarnpkg.com/eleventy-plugin-footnotes/-/eleventy-plugin-footnotes-0.9.0.tgz#7febf459d0cac929e34219518fb2a2375fe94c98"
|
||||
integrity sha512-y00cfbcUsIFGoL5Xp2rWrmCcM/hz06jhplFZgX3Vo9O4KIncoz+TyhIlAEOljM6IYKEaiffmujgORqgNhSYm4A==
|
||||
|
||||
emitter-mixin@0.0.3:
|
||||
version "0.0.3"
|
||||
resolved "https://registry.yarnpkg.com/emitter-mixin/-/emitter-mixin-0.0.3.tgz#5948cb286f2e48edc3b251a7cfc1f7883396d65c"
|
||||
@@ -3896,23 +3906,18 @@ es-to-primitive@^1.2.1:
|
||||
is-date-object "^1.0.1"
|
||||
is-symbol "^1.0.2"
|
||||
|
||||
esbuild-plugin-lit-css@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/esbuild-plugin-lit-css/-/esbuild-plugin-lit-css-1.0.0.tgz#7c138b2c4c1724ff2a18dfc542ce4396e13e93f8"
|
||||
integrity sha512-Ng5/F6+l0Dj9/Zl0u1pT9meBmE9itI/xVlSvZwHa25+LxCgDPyx/pbSrr78r3MDF3cUDbQDy7VvjIuCUHVK7zQ==
|
||||
esbuild-plugin-lit-css@^1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/esbuild-plugin-lit-css/-/esbuild-plugin-lit-css-1.0.2.tgz#d7bd763cdb8ad1f35a2fc8596ad4857faa5f6c23"
|
||||
integrity sha512-mVTY8GyqIdwXdkYQ9dU88dMRQ0vvL9Ywro2M81+sn5a3MQXhi4HHJ9U+ORyIhlZMsOtHQvI45QRAll67x4XBeA==
|
||||
dependencies:
|
||||
"@pwrs/lit-css" "^1.0.0"
|
||||
"@pwrs/lit-css" "^1.0.1"
|
||||
|
||||
esbuild@^0.12.15:
|
||||
version "0.12.15"
|
||||
resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.12.15.tgz#9d99cf39aeb2188265c5983e983e236829f08af0"
|
||||
integrity sha512-72V4JNd2+48eOVCXx49xoSWHgC3/cCy96e7mbXKY+WOWghN00cCmlGnwVLRhRHorvv0dgCyuMYBZlM2xDM5OQw==
|
||||
|
||||
esbuild@^0.8.31:
|
||||
version "0.8.31"
|
||||
resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.8.31.tgz#c21e7adb3ad283c951a53de7ad64a5ae2df2ed34"
|
||||
integrity sha512-7EIU0VdUxltwivjVezX3HgeNzeIVR1snkrAo57WdUnuBMykdzin5rTrxwCDM6xQqj0RL/HjOEm3wFr2ijHKeaA==
|
||||
|
||||
escalade@^3.1.1:
|
||||
version "3.1.1"
|
||||
resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40"
|
||||
@@ -4402,6 +4407,14 @@ get-func-name@^2.0.0:
|
||||
resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41"
|
||||
integrity sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=
|
||||
|
||||
get-github-url@1.0.4:
|
||||
version "1.0.4"
|
||||
resolved "https://registry.yarnpkg.com/get-github-url/-/get-github-url-1.0.4.tgz#2d9a6233f173139fe9973e3dcf09aee1eec2e13e"
|
||||
integrity sha1-LZpiM/FzE5/plz49zwmu4e7C4T4=
|
||||
dependencies:
|
||||
is-github-url "^1.1.2"
|
||||
parse-github-url "^0.2.1"
|
||||
|
||||
get-intrinsic@^1.0.0:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.0.2.tgz#6820da226e50b24894e08859469dc68361545d49"
|
||||
@@ -4686,6 +4699,14 @@ hast-util-heading-rank@^1.0.0:
|
||||
resolved "https://registry.yarnpkg.com/hast-util-heading-rank/-/hast-util-heading-rank-1.0.1.tgz#28dfd8b0724cfb0da48308e2a794b1d9f24fd80d"
|
||||
integrity sha512-P6Hq7RCky9syMevlrN90QWpqWDXCxwIVOfQR2rK6P4GpY4bqjKEuCzoWSRORZ7vz+VgRpLnXimh+mkwvVFjbyQ==
|
||||
|
||||
hast-util-is-element@2.1.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/hast-util-is-element/-/hast-util-is-element-2.1.0.tgz#ecdc0c00c06f5b4de8ea27b9084cb75d1326a7b1"
|
||||
integrity sha512-tg5yLbnC4TYONeeHIF7n0Jtstp+4J0bcBFn+R6wYoZzeHSIp5sl9ApfqGI2mxKtEXi4DEhTssPli6ppGl5PGqg==
|
||||
dependencies:
|
||||
"@types/hast" "^2.0.0"
|
||||
"@types/unist" "^2.0.0"
|
||||
|
||||
hast-util-is-element@^1.0.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/hast-util-is-element/-/hast-util-is-element-1.1.0.tgz#3b3ed5159a2707c6137b48637fbfe068e175a425"
|
||||
@@ -4798,7 +4819,7 @@ he@1.2.0, he@^1.2.0:
|
||||
resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f"
|
||||
integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==
|
||||
|
||||
hirestime@^6.1.0:
|
||||
hirestime@6.1.0, hirestime@^6.1.0:
|
||||
version "6.1.0"
|
||||
resolved "https://registry.yarnpkg.com/hirestime/-/hirestime-6.1.0.tgz#10bb2041cb9caffbfe7cf12a26ac38c0c9f42ee3"
|
||||
integrity sha512-sCVxYT/2iSUanrRuiUspZaF78crKojzmVz2mI+gjq1/N+7RPCyZu8S0KyBlE4O+Aq/YmtTzJWGxLxByZvCiKPA==
|
||||
@@ -5162,6 +5183,11 @@ is-generator-function@^1.0.7:
|
||||
resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.8.tgz#dfb5c2b120e02b0a8d9d2c6806cd5621aa922f7b"
|
||||
integrity sha512-2Omr/twNtufVZFr1GhxjOMFPAj2sjc/dKaIqBhvo4qciXfJmITGH6ZGd8eZYNHza8t1y0e01AuqRhJwfWp26WQ==
|
||||
|
||||
is-github-url@^1.1.2:
|
||||
version "1.2.2"
|
||||
resolved "https://registry.yarnpkg.com/is-github-url/-/is-github-url-1.2.2.tgz#0734176092c9599a38a72422d121ff3e11d6ff3e"
|
||||
integrity sha1-BzQXYJLJWZo4pyQi0SH/PhHW/z4=
|
||||
|
||||
is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1:
|
||||
version "4.0.1"
|
||||
resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc"
|
||||
@@ -7103,6 +7129,11 @@ parse-filepath@^1.0.2:
|
||||
map-cache "^0.2.0"
|
||||
path-root "^0.1.1"
|
||||
|
||||
parse-github-url@^0.2.1:
|
||||
version "0.2.1"
|
||||
resolved "https://registry.yarnpkg.com/parse-github-url/-/parse-github-url-0.2.1.tgz#e17335025e02c827a14198b614e73ab5b9904be8"
|
||||
integrity sha1-4XM1Al4CyCehQZi2FOc6tbmQS+g=
|
||||
|
||||
parse-json@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0"
|
||||
@@ -8100,23 +8131,38 @@ rimraf@^3.0.2:
|
||||
dependencies:
|
||||
glob "^7.1.3"
|
||||
|
||||
rocket-preset-code-tabs@^0.2.1:
|
||||
version "0.2.1"
|
||||
resolved "https://registry.yarnpkg.com/rocket-preset-code-tabs/-/rocket-preset-code-tabs-0.2.1.tgz#19fbdbf05736c5783187d73fc4a95b1df4e88ca5"
|
||||
integrity sha512-m1E8u70iyCrcUDE7tghGZlTjzal0mhvQ1ESIbz/i1iRr3Y/t103FtDfnndZWSUaNcaXECsf8e1zn6DKk53YrMg==
|
||||
rocket-preset-code-tabs@^0.2.6:
|
||||
version "0.2.6"
|
||||
resolved "https://registry.yarnpkg.com/rocket-preset-code-tabs/-/rocket-preset-code-tabs-0.2.6.tgz#695dc31f2b75184e12b02e8b17d18d37441c9009"
|
||||
integrity sha512-TSvlibssXgTOKVnOa/xTPDUrHfcUcW15FeBFyMvfQRre9bEzA7l1Yv40j8chSlXZ2ysNbkox+Xq9HmyRIYjorQ==
|
||||
dependencies:
|
||||
"@pwrs/mixins" "^0.2.0"
|
||||
"@pwrs/mixins" "^0.2.1"
|
||||
eleventy-plugin-add-web-component-definitions "^2.0.3"
|
||||
esbuild "^0.12.15"
|
||||
esbuild-plugin-lit-css "^1.0.0"
|
||||
esbuild-plugin-lit-css "^1.0.2"
|
||||
hirestime "^6.1.0"
|
||||
lit "^2.0.0-rc.2"
|
||||
rocket-preset-markdown-directives "^0.1.1"
|
||||
rocket-preset-markdown-directives "^0.1.3"
|
||||
|
||||
rocket-preset-markdown-directives@^0.1.1:
|
||||
version "0.1.2"
|
||||
resolved "https://registry.yarnpkg.com/rocket-preset-markdown-directives/-/rocket-preset-markdown-directives-0.1.2.tgz#1d2384327c28c9c3b9ebc7a41b3b6103a6831f56"
|
||||
integrity sha512-XIbvlnYJu/iK0WlQ4XBZdsC7ZiOE8ga0IpQGCbBSb4C3yIbqFV58Wv/sI/Z8j6OVxb7RSCC/arpdfZaf30EQuQ==
|
||||
rocket-preset-custom-elements-manifest@^0.1.7:
|
||||
version "0.1.7"
|
||||
resolved "https://registry.yarnpkg.com/rocket-preset-custom-elements-manifest/-/rocket-preset-custom-elements-manifest-0.1.7.tgz#d5474182bd11cf05207445808ab83cd3a318d596"
|
||||
integrity sha512-p8DFVgxxivEBZgLE3i5bMMeCvMrdTmNH2WzHHmgnhXVDBny0l2Ma1yO+/hE6/p0iQc5+vAUxpTVazVdoD1csDg==
|
||||
dependencies:
|
||||
"@power-elements/json-viewer" "2.1.1"
|
||||
eleventy-plugin-footnotes "0.9.0"
|
||||
esbuild "^0.12.15"
|
||||
esbuild-plugin-lit-css "^1.0.2"
|
||||
get-github-url "1.0.4"
|
||||
hast-util-is-element "2.1.0"
|
||||
hirestime "6.1.0"
|
||||
rocket-preset-markdown-directives "0.1.3"
|
||||
unist-util-visit "3.1.0"
|
||||
|
||||
rocket-preset-markdown-directives@0.1.3, rocket-preset-markdown-directives@^0.1.3:
|
||||
version "0.1.3"
|
||||
resolved "https://registry.yarnpkg.com/rocket-preset-markdown-directives/-/rocket-preset-markdown-directives-0.1.3.tgz#d1b8eb3dab1e6842b56c7d3d2e9e468950c3584b"
|
||||
integrity sha512-N0npyQjJkPgKBeDeQBXK2/61Sb4gRCoG5VQRw7v3M3by3bv1JaFd1+x37SyvtEk6b/XYmP74A+Nfg8obJ1I4EQ==
|
||||
dependencies:
|
||||
markdown-it "12.1.0"
|
||||
markdown-it-prism "2.1.8"
|
||||
@@ -9362,6 +9408,15 @@ unist-util-visit-parents@^4.0.0:
|
||||
"@types/unist" "^2.0.0"
|
||||
unist-util-is "^5.0.0"
|
||||
|
||||
unist-util-visit@3.1.0, unist-util-visit@^3.1.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/unist-util-visit/-/unist-util-visit-3.1.0.tgz#9420d285e1aee938c7d9acbafc8e160186dbaf7b"
|
||||
integrity sha512-Szoh+R/Ll68QWAyQyZZpQzZQm2UPbxibDvaY8Xc9SUtYgPsDzx5AWSk++UUt2hJuow8mvwR+rG+LQLw+KsuAKA==
|
||||
dependencies:
|
||||
"@types/unist" "^2.0.0"
|
||||
unist-util-is "^5.0.0"
|
||||
unist-util-visit-parents "^4.0.0"
|
||||
|
||||
unist-util-visit@^1.1.3:
|
||||
version "1.4.1"
|
||||
resolved "https://registry.yarnpkg.com/unist-util-visit/-/unist-util-visit-1.4.1.tgz#4724aaa8486e6ee6e26d7ff3c8685960d560b1e3"
|
||||
@@ -9378,15 +9433,6 @@ unist-util-visit@^2.0.0, unist-util-visit@^2.0.2, unist-util-visit@^2.0.3:
|
||||
unist-util-is "^4.0.0"
|
||||
unist-util-visit-parents "^3.0.0"
|
||||
|
||||
unist-util-visit@^3.1.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/unist-util-visit/-/unist-util-visit-3.1.0.tgz#9420d285e1aee938c7d9acbafc8e160186dbaf7b"
|
||||
integrity sha512-Szoh+R/Ll68QWAyQyZZpQzZQm2UPbxibDvaY8Xc9SUtYgPsDzx5AWSk++UUt2hJuow8mvwR+rG+LQLw+KsuAKA==
|
||||
dependencies:
|
||||
"@types/unist" "^2.0.0"
|
||||
unist-util-is "^5.0.0"
|
||||
unist-util-visit-parents "^4.0.0"
|
||||
|
||||
universalify@^0.1.0:
|
||||
version "0.1.2"
|
||||
resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66"
|
||||
|
||||
Reference in New Issue
Block a user