Merge branch 'main' into users/janechu/add-api-extractor-tooling-react-2

This commit is contained in:
Jane Chu 2022-10-02 04:35:46 -07:00 коммит произвёл GitHub
Родитель c7c5cfa2c4 0415f3bf90
Коммит 48971ca498
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
24 изменённых файлов: 835 добавлений и 1012 удалений

4
.gitignore поставляемый
Просмотреть файл

@ -63,7 +63,7 @@ bin/
obj/
# Ignore the docs folder
docs/*
/docs/*
# Except the docs folder README
!docs/README.md
!/docs/README.md

Просмотреть файл

@ -1,6 +1,6 @@
# Branch guide
This is the branch guide for the FAST Tooling repository. When contributing to this project please follow the standards defined in this guide.
This is the branch guide for the Design to Code repository. When contributing to this project please follow the standards defined in this guide.
## Default

Просмотреть файл

@ -1,4 +1,4 @@
# Contributing to FAST Tooling
# Contributing to Design to Code
Contributions are welcome! You can submit a pull request to fix a bug, implementing a feature, or even correcting simple documentation typos.
@ -6,11 +6,11 @@ Contributions are welcome! You can submit a pull request to fix a bug, implement
### Machine setup
To work with the FAST Tooling [monorepo](https://en.wikipedia.org/wiki/Monorepo) you'll need Git, Node.js@^16.0.0, and npm@^7.0.0 setup on your machine.
To work with the Design to Code [monorepo](https://en.wikipedia.org/wiki/Monorepo) you'll need Git, Node.js@^16.0.0, and npm@^7.0.0 setup on your machine.
FAST Tooling uses Git as its source control system. If you haven't already installed it, you can download it [here](https://git-scm.com/downloads) or if you prefer a GUI-based approach, try [GitHub Desktop](https://desktop.github.com/).
Design to Code uses Git as its source control system. If you haven't already installed it, you can download it [here](https://git-scm.com/downloads) or if you prefer a GUI-based approach, try [GitHub Desktop](https://desktop.github.com/).
Once Git is installed, you'll also need Node.js, which FAST Tooling uses as its JavaScript runtime, enabling its build and test scripts. Node.js instructions and downloads for your preferred OS can be found [here](https://nodejs.org/en/).
Once Git is installed, you'll also need Node.js, which Design to Code uses as its JavaScript runtime, enabling its build and test scripts. Node.js instructions and downloads for your preferred OS can be found [here](https://nodejs.org/en/).
:::important
The above steps are a one-time setup for your machine and do not need to be repeated after the initial configuration.
@ -18,20 +18,20 @@ The above steps are a one-time setup for your machine and do not need to be repe
### Cloning the repository
Now that your machine is setup, you can clone the FAST Tooling repository. Open a terminal and run this command:
Now that your machine is setup, you can clone the Design to Code repository. Open a terminal and run this command:
```shell
git clone https://github.com/microsoft/fast-tooling.git
git clone https://github.com/microsoft/design-to-code.git
```
Cloning via SSH:
```shell
git clone git@github.com:microsoft/fast-tooling.git
git clone git@github.com:microsoft/design-to-code.git
```
### Installing and building
From within the `fast-tooling` folder where you've cloned the repo, install all package dependencies and build all workspaces (local dependencies) with this command:
From within the `design-to-code` folder where you've cloned the repo, install all package dependencies and build all workspaces (local dependencies) with this command:
```bash
npm install
@ -106,7 +106,7 @@ Default VS Code settings for this project are configured as [Workspace settings]
## FAST guidance
The FAST Tooling project follows the contribution policy outlined in the FAST project for their [governance](https://github.com/microsoft/fast/blob/master/CONTRIBUTING.md#governance), [acceptance and consensus seeking process](https://github.com/microsoft/fast/blob/master/CONTRIBUTING.md#acceptance-and-consensus-seeking-process), and [stability policy](https://github.com/microsoft/fast/blob/master/CONTRIBUTING.md#stability-policy).
The Design to Code project follows the contribution policy outlined in the FAST project for their [governance](https://github.com/microsoft/fast/blob/master/CONTRIBUTING.md#governance), [acceptance and consensus seeking process](https://github.com/microsoft/fast/blob/master/CONTRIBUTING.md#acceptance-and-consensus-seeking-process), and [stability policy](https://github.com/microsoft/fast/blob/master/CONTRIBUTING.md#stability-policy).
## Developer's Certificate of Origin 1.1

Просмотреть файл

@ -1,6 +1,6 @@
# FAST Tooling
# Design to Code
This is the FAST Tooling project, containing a set of packages that can be combined to create complex workflows for web applications. The goal of these workflows is to allow users to create and modify their own web based experiences, from individual web components to completed web sites.
This is the Design to Code project, containing a set of packages that can be combined to create complex workflows. The goal of these workflows is to allow users to create and modify their own web based experiences, from individual web components to completed web sites.
This project is not to be confused with its related project [FAST](https://github.com/microsoft/fast), a set of libraries for creating native web components and design systems.

Просмотреть файл

@ -1,6 +1,6 @@
# Introduction
This is the code style guide for the FAST tooling repository. When contributing to this project please follow the standards defined in this guide.
This is the code style guide for the Design to Code repository. When contributing to this project please follow the standards defined in this guide.
## Branches

1364
package-lock.json сгенерированный

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1,5 +1,5 @@
{
"name": "@microsoft/fast-tooling-repository",
"name": "@microsoft/design-to-code-repository",
"description": "A system of development tools, and utilities used à la carte or as a suite to build enterprise-grade websites and applications.",
"version": "0.1.0",
"author": {
@ -16,10 +16,10 @@
],
"repository": {
"type": "git",
"url": "git+https://github.com/microsoft/fast-tooling.git"
"url": "git+https://github.com/microsoft/design-to-code.git"
},
"bugs": {
"url": "https://github.com/microsoft/fast-tooling/issues/new/choose"
"url": "https://github.com/microsoft/design-to-code/issues/new/choose"
},
"scripts": {
"bump": "beachball bump",
@ -45,7 +45,7 @@
"@playwright/test": "^1.16.3",
"@typescript-eslint/eslint-plugin": "^2.23.0",
"@typescript-eslint/parser": "^2.23.0",
"beachball": "^2.16.0",
"beachball": "^2.30.1",
"chalk": "^2.4.2",
"copyfiles": "^2.4.1",
"dotenv": "^6.0.0",

Просмотреть файл

@ -1,6 +1,27 @@
{
"name": "@microsoft/fast-tooling-react",
"entries": [
{
"date": "Wed, 13 Jul 2022 07:07:28 GMT",
"tag": "@microsoft/fast-tooling-react_v2.13.13",
"version": "2.13.13",
"comments": {
"patch": [
{
"author": "7559015+janechu@users.noreply.github.com",
"package": "@microsoft/fast-tooling-react",
"comment": "Deprecate published packages in favor of renamed packages",
"commit": "19c2a49e79e7c38373265f7fdee715efe28de77f"
},
{
"author": "beachball",
"package": "@microsoft/fast-tooling-react",
"comment": "Bump @microsoft/fast-tooling to v0.37.10",
"commit": "19c2a49e79e7c38373265f7fdee715efe28de77f"
}
]
}
},
{
"date": "Wed, 06 Apr 2022 00:54:27 GMT",
"tag": "@microsoft/fast-tooling-react_v2.13.12",

Просмотреть файл

@ -1,9 +1,18 @@
# Change Log - @microsoft/fast-tooling-react
This log was last generated on Wed, 06 Apr 2022 00:54:27 GMT and should not be manually modified.
This log was last generated on Wed, 13 Jul 2022 07:07:28 GMT and should not be manually modified.
<!-- Start content -->
## 2.13.13
Wed, 13 Jul 2022 07:07:28 GMT
### Patches
- Deprecate published packages in favor of renamed packages (7559015+janechu@users.noreply.github.com)
- Bump @microsoft/fast-tooling to v0.37.10
## 2.13.12
Wed, 06 Apr 2022 00:54:27 GMT

Просмотреть файл

@ -1,3 +1,5 @@
**Deprecated**: This package is being deprecated in favor of `@microsoft/design-to-code-react`.
# FAST Tooling React
The tooling available in FAST Tooling React can be used together to create UI for manipulating serializable data and viewing React components.

Просмотреть файл

@ -2,7 +2,7 @@
"name": "@microsoft/fast-tooling-react",
"description": "A React-specific set of components and utilities to assist in creating web UI",
"sideEffects": false,
"version": "2.13.12",
"version": "2.13.13",
"author": {
"name": "Microsoft",
"url": "https://discord.gg/FcSNfg4"
@ -125,7 +125,7 @@
"@microsoft/fast-foundation": "^2.13.1",
"@microsoft/fast-jss-manager-react": "^3.0.0 || ^4.0.0",
"@microsoft/fast-jss-utilities": "^4.8.0",
"@microsoft/fast-tooling": "^0.37.9",
"@microsoft/fast-tooling": "^0.37.10",
"@microsoft/fast-web-utilities": "^4.8.1",
"@skatejs/val": "^0.5.0",
"exenv-es6": "^1.0.0",

Просмотреть файл

@ -1,6 +1,21 @@
{
"name": "@microsoft/fast-tooling",
"entries": [
{
"date": "Wed, 13 Jul 2022 07:07:28 GMT",
"tag": "@microsoft/fast-tooling_v0.37.10",
"version": "0.37.10",
"comments": {
"patch": [
{
"author": "7559015+janechu@users.noreply.github.com",
"package": "@microsoft/fast-tooling",
"comment": "Deprecate published packages in favor of renamed packages",
"commit": "19c2a49e79e7c38373265f7fdee715efe28de77f"
}
]
}
},
{
"date": "Wed, 06 Apr 2022 00:54:27 GMT",
"tag": "@microsoft/fast-tooling_v0.37.9",

Просмотреть файл

@ -1,9 +1,17 @@
# Change Log - @microsoft/fast-tooling
This log was last generated on Wed, 06 Apr 2022 00:54:27 GMT and should not be manually modified.
This log was last generated on Wed, 13 Jul 2022 07:07:28 GMT and should not be manually modified.
<!-- Start content -->
## 0.37.10
Wed, 13 Jul 2022 07:07:28 GMT
### Patches
- Deprecate published packages in favor of renamed packages (7559015+janechu@users.noreply.github.com)
## 0.37.9
Wed, 06 Apr 2022 00:54:27 GMT

Просмотреть файл

@ -1,3 +1,5 @@
**Deprecated**: This package is being deprecated in favor of `@microsoft/design-to-code`.
# FAST Tooling
FAST Tooling is a library agnostic specific set of utilities to assist in creating web UI.

Просмотреть файл

@ -2,7 +2,7 @@
"name": "@microsoft/fast-tooling",
"description": "A set of utilities to assist in creating web UI",
"sideEffects": false,
"version": "0.37.9",
"version": "0.37.10",
"type": "module",
"author": {
"name": "Microsoft",

Просмотреть файл

@ -225,7 +225,7 @@ function convertMarkdownDocumentation(category, template, isVersionDoc) {
html: templateResolver(template)({
htmlWebpackPlugin: {
options: {
content: templateResolver(
index: templateResolver(
fs.readFileSync(categoryTemplate, "utf8")
)({
items,

Просмотреть файл

@ -1,2 +1,65 @@
# Form
TBD
The `Form` is a React component that generates fields based on the JSON Schema, so if a JSON Schema specifies a "type" of "string", a text input will appear.
The component is pluggable and stylable, so if there is a requirement to replace any fields or change the styling to match the rest of your application, this is easy to do.
## Usage
The basic usage only requires the passing of the `MessageSystem`. The component will then register itself and begin sending and recieving data.
```tsx
import { Form } from "@microsoft/fast-tooling-react";
<Form messageSystem={fastMessageSystem} />
```
### Modular Usage
There are two exports for the `Form`, the default `Form` and `ModularForm`. The `ModularForm` is for use with any React component that may share a dependency on `react-dnd` such as the `Navigation` component, or the `Viewer`. It's safe to assume that if you are using more than one React component from the `@microsoft/fast-tooling-react` package you must use the `ModularForm`.
```tsx
import { DndProvider } from "react-dnd";
import HTML5Backend from "react-dnd-html5-backend";
import { ModularForm } from "@microsoft/fast-tooling-react";
<DndProvider backend={HTML5Backend}>
<ModularForm messageSystem={fastMessageSystem} />
</DndProvider>
```
## Styling
The `Form` leverages [CSS variables](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties) and the following are available:
- `--fast-tooling-accent-color`
- `--fast-tooling-l1-color`
- `--fast-tooling-l4-color`
- `--fast-tooling-text-color`
- `--fast-tooling-l3-fill-color`
- `--fast-tooling-error-color`
- `--fast-tooling-floating-color`
## Adding a custom control
There may be occasions where a custom control will serve better than the default form elements provided by the `Form`. For this situation a `StandardControlPlugin` is made available that will provide the surrounding UI for the `Form` but allow the form element or custom control to be created.
```tsx
import { ModularForm, StandardControlPlugin } from "@microsoft/fast-tooling-react";
<Form
messageSystem={fastMessageSystem}
controls={[
new StandardControlPlugin({
id: "foo",
control: (config) => {
return (
<input
value={config.value}
/>
)
}
})
]}
/>
```

Просмотреть файл

@ -1,2 +1,49 @@
# Data Format
TBD
Data must be formatted as JSON, and descriptions of data must follow JSON Schema.
## Data dictionary
The data dictionary is an array of two items, the first being the root item and the second being the dictionary of data. This is done to enable data nesting behavior.
Example:
```ts
import { DataDictionary } from "@microsoft/fast-tooling";
const myDataDictionary: DataDictionary<unknown> = [
"root",
{
root: {
schemaId: "myTextSchema",
data: "Hello world"
}
}
]
```
## Schema dictionary
The schema dictionary is a dictionary of possible JSON schemas that the data can conform to. The `$id` is used as the `key` in the dictionary object.
Example:
```ts
import { SchemaDictionary } from "@microsoft/fast-tooling";
const mySchemaDictionary: SchemaDictionary = {
myTextSchema: {
title: "Text",
type: "text"
},
myNumberSchema: {
title: "Number",
type: "number"
}
}
```
## JSON Schema caveats
For ease of use, keep JSON Schemas as simple as possible. Avoid use of the following keywords which are currently not supported by the `@microsoft/fast-tooling` or `@microsoft/fast-tooling-react` packages:
- `allOf`
- `$ref`

Просмотреть файл

@ -1,7 +1,72 @@
# Message System
FAST tooling components rely on including a secondary script which contains a [web worker](https://developer.mozilla.org/en-US/docs/Web/API/Worker) called the message system.
FAST tooling components rely on including a script which contains a [web worker](https://developer.mozilla.org/en-US/docs/Web/API/Worker) as well as a class to manipulate the data being sent to and from it called the `MessageSystem`.
This worker performs all of the data manipulation and provides a navigational data structure based on data passed.
The worker performs all of the data manipulation as well as a navigational data structure based on data passed. The `MessageSystem` class allow functionality to "register" itself to accept and send data.
TBD
## Getting started
Add the web worker to your project, it is located at `@microsoft/fast-tooling/dist/message-system.min.js`.
To initialize the `MessageSystem`, a config must be passed that includes the data, schemas, and web worker.
Example:
```ts
const fastMessageSystem: MessageSystem = new MessageSystem({
webWorker: fastMessageSystemWorker,
dataDictionary: [
"root",
{
root: {
schemaId: "myTextSchema",
data: "Hello world"
}
}
],
schemaDictionary: {
myTextSchema: {
title: "Text",
type: "text"
},
},
});
```
To understand how the data dictionary and schema dictionary are structured and why, check out the section on [data formats](../data-format).
### Webpack
It is recommended that the `worker-loader` be used in a webpack project. This can look like the following setup:
`webpack.config.js`
```js
module.exports = {
...yourConfig,
module: {
rules: [
{
test: /message\-system\.min\.js/,
use: {
loader: "worker-loader",
},
},
],
},
};
```
`index.ts`
```ts
import FASTMessageSystemWorker from "@microsoft/fast-tooling/dist/message-system.min.js";
import { MessageSystem } from "@microsoft/fast-tooling";
// Activate the worker
const fastMessageSystemWorker = new FASTMessageSystemWorker();
// Create a new MessageSystem instance and pass the MessageSystem web worker to it
const fastMessageSystem: MessageSystem = new MessageSystem({
webWorker: fastMessageSystemWorker,
dataDictionary: dataDictionaryConfig as any,
schemaDictionary,
});
```

Просмотреть файл

@ -1,3 +1,7 @@
# Introduction
Welcome to FAST tooling, an ecosystem of packages built for the purpose of live updating JSON data.
Welcome to Design to Code, an ecosystem of packages built for the purpose of live updating JSON data for the purposes of designing web tech in the browser.
The backbone of this ecosystem is the `MessageSystem`, use this as a starting point. You can then register web components, React components, and other pieces of functionality. The `@microsoft/fast-tooling` and `@microsoft/fast-tooling-react` packages offer a selection of web components, React components, and other integrations with existing libraries that you may find useful.
Consider making your own functionality as well! Get started with setting up the [MessageSystem](../fast-tooling/0.x/message-system/introduction/).

Просмотреть файл

@ -33,11 +33,6 @@ export default {
label: "Introduction",
path: "introduction",
},
{
type: "doc",
label: "Examples",
path: "examples",
},
{
type: "category",
label: "Message System",

138
website/package-lock.json сгенерированный
Просмотреть файл

@ -28,6 +28,64 @@
"node": ">=10.0.0"
}
},
"node_modules/@jridgewell/gen-mapping": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz",
"integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==",
"dev": true,
"dependencies": {
"@jridgewell/set-array": "^1.0.1",
"@jridgewell/sourcemap-codec": "^1.4.10",
"@jridgewell/trace-mapping": "^0.3.9"
},
"engines": {
"node": ">=6.0.0"
}
},
"node_modules/@jridgewell/resolve-uri": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz",
"integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==",
"dev": true,
"engines": {
"node": ">=6.0.0"
}
},
"node_modules/@jridgewell/set-array": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz",
"integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==",
"dev": true,
"engines": {
"node": ">=6.0.0"
}
},
"node_modules/@jridgewell/source-map": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz",
"integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==",
"dev": true,
"dependencies": {
"@jridgewell/gen-mapping": "^0.3.0",
"@jridgewell/trace-mapping": "^0.3.9"
}
},
"node_modules/@jridgewell/sourcemap-codec": {
"version": "1.4.14",
"resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz",
"integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==",
"dev": true
},
"node_modules/@jridgewell/trace-mapping": {
"version": "0.3.14",
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.14.tgz",
"integrity": "sha512-bJWEfQ9lPTvm3SneWwRFVLzrh6nhjwqw7TUFFBEMzwvg7t7PCDenf2lDwqo4NQXzdpgBXyFgDWnQA+2vkruksQ==",
"dev": true,
"dependencies": {
"@jridgewell/resolve-uri": "^3.0.3",
"@jridgewell/sourcemap-codec": "^1.4.10"
}
},
"node_modules/@types/eslint": {
"version": "8.4.1",
"resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.1.tgz",
@ -2055,14 +2113,14 @@
}
},
"node_modules/terser": {
"version": "5.12.0",
"resolved": "https://registry.npmjs.org/terser/-/terser-5.12.0.tgz",
"integrity": "sha512-R3AUhNBGWiFc77HXag+1fXpAxTAFRQTJemlJKjAgD9r8xXTpjNKqIXwHM/o7Rh+O0kUJtS3WQVdBeMKFk5sw9A==",
"version": "5.14.2",
"resolved": "https://registry.npmjs.org/terser/-/terser-5.14.2.tgz",
"integrity": "sha512-oL0rGeM/WFQCUd0y2QrWxYnq7tfSuKBiqTjRPWrRgB46WD/kiwHwF8T23z78H6Q6kGCuuHcPB+KULHRdxvVGQA==",
"dev": true,
"dependencies": {
"@jridgewell/source-map": "^0.3.2",
"acorn": "^8.5.0",
"commander": "^2.20.0",
"source-map": "~0.7.2",
"source-map-support": "~0.5.20"
},
"bin": {
@ -2112,15 +2170,6 @@
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
"dev": true
},
"node_modules/terser/node_modules/source-map": {
"version": "0.7.3",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz",
"integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==",
"dev": true,
"engines": {
"node": ">= 8"
}
},
"node_modules/to-regex-range": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
@ -2443,6 +2492,55 @@
"integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==",
"dev": true
},
"@jridgewell/gen-mapping": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz",
"integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==",
"dev": true,
"requires": {
"@jridgewell/set-array": "^1.0.1",
"@jridgewell/sourcemap-codec": "^1.4.10",
"@jridgewell/trace-mapping": "^0.3.9"
}
},
"@jridgewell/resolve-uri": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz",
"integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==",
"dev": true
},
"@jridgewell/set-array": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz",
"integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==",
"dev": true
},
"@jridgewell/source-map": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz",
"integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==",
"dev": true,
"requires": {
"@jridgewell/gen-mapping": "^0.3.0",
"@jridgewell/trace-mapping": "^0.3.9"
}
},
"@jridgewell/sourcemap-codec": {
"version": "1.4.14",
"resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz",
"integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==",
"dev": true
},
"@jridgewell/trace-mapping": {
"version": "0.3.14",
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.14.tgz",
"integrity": "sha512-bJWEfQ9lPTvm3SneWwRFVLzrh6nhjwqw7TUFFBEMzwvg7t7PCDenf2lDwqo4NQXzdpgBXyFgDWnQA+2vkruksQ==",
"dev": true,
"requires": {
"@jridgewell/resolve-uri": "^3.0.3",
"@jridgewell/sourcemap-codec": "^1.4.10"
}
},
"@types/eslint": {
"version": "8.4.1",
"resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.1.tgz",
@ -4018,14 +4116,14 @@
"dev": true
},
"terser": {
"version": "5.12.0",
"resolved": "https://registry.npmjs.org/terser/-/terser-5.12.0.tgz",
"integrity": "sha512-R3AUhNBGWiFc77HXag+1fXpAxTAFRQTJemlJKjAgD9r8xXTpjNKqIXwHM/o7Rh+O0kUJtS3WQVdBeMKFk5sw9A==",
"version": "5.14.2",
"resolved": "https://registry.npmjs.org/terser/-/terser-5.14.2.tgz",
"integrity": "sha512-oL0rGeM/WFQCUd0y2QrWxYnq7tfSuKBiqTjRPWrRgB46WD/kiwHwF8T23z78H6Q6kGCuuHcPB+KULHRdxvVGQA==",
"dev": true,
"requires": {
"@jridgewell/source-map": "^0.3.2",
"acorn": "^8.5.0",
"commander": "^2.20.0",
"source-map": "~0.7.2",
"source-map-support": "~0.5.20"
},
"dependencies": {
@ -4034,12 +4132,6 @@
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
"dev": true
},
"source-map": {
"version": "0.7.3",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz",
"integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==",
"dev": true
}
}
},

Просмотреть файл

@ -15,10 +15,11 @@
<%= htmlWebpackPlugin.options.isFrontpage ? "" :
htmlWebpackPlugin.options.sidebar %>
<div class="content">
<div class="container">
<%= htmlWebpackPlugin.options.versionInfo ?
htmlWebpackPlugin.options.versionInfo : "" %> <%=
htmlWebpackPlugin.options.content %>
htmlWebpackPlugin.options.versionInfo : "" %>
<div class="content"><%= htmlWebpackPlugin.options.content %></div>
<div class="index"><%= htmlWebpackPlugin.options.index %></div>
</div>
</main>
</div>

Просмотреть файл

@ -12,6 +12,8 @@
--font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell,
Noto Sans, sans-serif, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial,
sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
--font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas,
"Liberation Mono", "Courier New", monospace;
--background-color-layer-1: #18191a;
--background-color-layer-2: #242526;
--background-color-layer-3: hsla(0, 0%, 100%, 0.05);
@ -37,6 +39,9 @@
--category-background-color: var(--background-color-layer-2);
--category-border-radius: 10px;
--table-caption-background-color: var(--background-color-layer-3);
--code-background: #333437;
--code-border-radius: 6px;
--code-block-background: rgb(41, 45, 62);
display: flex;
flex-direction: column;
justify-content: space-between;
@ -46,6 +51,10 @@
font-family: var(--font-family);
}
p {
line-height: 24px;
}
.toolbar {
position: sticky;
top: 0;
@ -87,7 +96,7 @@
width: var(--sidebar-width);
min-width: var(--sidebar-width);
border-right: 1px solid var(--sidebar-border-color);
height: calc(100vh - var(--toolbar-height) - var(--footer-height) - 30px);
min-height: calc(100vh - var(--toolbar-height) - var(--footer-height) - 30px);
overflow: auto;
}
@ -158,7 +167,7 @@
}
main > div {
margin-inline-start: 25px;
padding: 25px;
}
main div a {
@ -170,8 +179,12 @@
padding-inline-end: 20px;
}
.content {
width: 100%;
.container {
max-width: 900px;
}
.content ul {
list-style: inherit;
}
.frontpage {
@ -290,6 +303,20 @@
padding: var(--table-cell-padding);
}
pre code {
display: block;
padding: 16px;
background-color: var(--code-block-background);
}
code {
background-color: var(--code-background);
border: 0.1rem solid rgba(0, 0, 0, 0.1);
border-radius: var(--code-border-radius);
font-family: var(--font-family-monospace);
padding: 2px;
}
@media (max-width: 996px) {
.mobile-control {
display: flex;