diff --git a/.changeset/nasty-lemons-pump.md b/.changeset/nasty-lemons-pump.md
new file mode 100644
index 000000000..46b45ff68
--- /dev/null
+++ b/.changeset/nasty-lemons-pump.md
@@ -0,0 +1,6 @@
+---
+"@react-pdf/pdfkit": patch
+"@react-pdf/image": patch
+---
+
+fix: bump jay-peg dependency to fix CJS module resolution error
diff --git a/.changeset/ninety-glasses-count.md b/.changeset/ninety-glasses-count.md
new file mode 100644
index 000000000..22ead45af
--- /dev/null
+++ b/.changeset/ninety-glasses-count.md
@@ -0,0 +1,5 @@
+---
+'@react-pdf/renderer': minor
+---
+
+Pass \_INTERNAL\_\_LAYOUT\_\_DATA\_ to onRenderCallback in toBuffer
diff --git a/.changeset/seven-bottles-wave.md b/.changeset/seven-bottles-wave.md
new file mode 100644
index 000000000..0ad5aba81
--- /dev/null
+++ b/.changeset/seven-bottles-wave.md
@@ -0,0 +1,5 @@
+---
+"@react-pdf/layout": patch
+---
+
+fix: resolve styles on dynamic elements
diff --git a/.eslintignore b/.eslintignore
index 36d1f5a39..baa26bc8f 100644
--- a/.eslintignore
+++ b/.eslintignore
@@ -1,4 +1,4 @@
-.gitignore
node_modules
lib
-rollup.config.js
+dist
+packages/pdfkit
diff --git a/.eslintrc.js b/.eslintrc.js
deleted file mode 100644
index ba5c358e3..000000000
--- a/.eslintrc.js
+++ /dev/null
@@ -1,43 +0,0 @@
-module.exports = {
- parser: 'babel-eslint',
- env: {
- browser: true,
- es6: true,
- node: true,
- 'jest/globals': true,
- },
- extends: [
- 'plugin:react/recommended',
- 'airbnb',
- 'prettier',
- 'plugin:react/jsx-runtime',
- ],
- globals: {
- URL: false,
- BROWSER: false,
- Atomics: 'readonly',
- SharedArrayBuffer: 'readonly',
- },
- parserOptions: {
- ecmaFeatures: {
- jsx: true,
- },
- ecmaVersion: 2018,
- sourceType: 'module',
- },
- plugins: ['react', 'jest'],
- rules: {
- 'no-continue': 1,
- 'no-cond-assign': 1,
- 'react/prop-types': 0,
- 'prefer-destructuring': 1,
- 'no-use-before-define': 1,
- 'no-underscore-dangle': 0,
- 'prefer-object-spread': 0,
- 'import/no-named-as-default': 0,
- 'react/state-in-constructor': 0,
- 'react/jsx-filename-extension': 0,
- 'react/jsx-props-no-spreading': 1,
- 'react/destructuring-assignment': 0,
- },
-};
diff --git a/.eslintrc.json b/.eslintrc.json
new file mode 100644
index 000000000..da5da0757
--- /dev/null
+++ b/.eslintrc.json
@@ -0,0 +1,65 @@
+{
+ "parser": "@typescript-eslint/parser",
+ "parserOptions": {
+ "ecmaVersion": "latest",
+ "sourceType": "module"
+ },
+ "env": {
+ "browser": true,
+ "es6": true,
+ "node": true
+ },
+ "extends": [
+ "plugin:react/recommended",
+ "airbnb",
+ "prettier",
+ "plugin:react/jsx-runtime"
+ ],
+ "globals": {
+ "URL": false,
+ "BROWSER": false,
+ "Atomics": "readonly",
+ "SharedArrayBuffer": "readonly"
+ },
+ "plugins": ["react"],
+ "rules": {
+ "arrow-body-style": 0,
+ "default-case-last": 0,
+ "default-param-last": 0,
+ "func-names": 0,
+ "import/no-named-as-default": 0,
+ "import/no-unresolved": ["error", { "ignore": ["^yoga-layout"] }],
+ "no-cond-assign": 1,
+ "no-continue": 1,
+ "no-promise-executor-return": 0,
+ "no-underscore-dangle": 0,
+ "no-use-before-define": 1,
+ "prefer-destructuring": 1,
+ "prefer-exponentiation-operator": 1,
+ "prefer-object-spread": 0,
+ "react/destructuring-assignment": 0,
+ "react/function-component-definition": 0,
+ "react/jsx-filename-extension": 0,
+ "react/jsx-props-no-spreading": 0,
+ "react/jsx-no-useless-fragment": 0,
+ "react/prop-types": 0,
+ "react/state-in-constructor": 0
+ },
+ "overrides": [
+ {
+ "files": [
+ "**/*.test.js",
+ "**/*.test.jsx",
+ "**/tests/**/*.js",
+ "**/tests/**/*.jsx",
+ "rollup.config.js",
+ "vitest.config.js",
+ "vitest.*.config.js",
+ "vitest.setup.js"
+ ],
+ "rules": {
+ "import/no-extraneous-dependencies": 0
+ }
+ }
+ ]
+}
diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md
index 7dcc5727e..734fed94b 100644
--- a/.github/CODE_OF_CONDUCT.md
+++ b/.github/CODE_OF_CONDUCT.md
@@ -8,19 +8,19 @@ In the interest of fostering an open and welcoming environment, we as contributo
Examples of behavior that contributes to creating a positive environment include:
-* Using welcoming and inclusive language
-* Being respectful of differing viewpoints and experiences
-* Gracefully accepting constructive criticism
-* Focusing on what is best for the community
-* Showing empathy towards other community members
+- Using welcoming and inclusive language
+- Being respectful of differing viewpoints and experiences
+- Gracefully accepting constructive criticism
+- Focusing on what is best for the community
+- Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
-* The use of sexualized language or imagery and unwelcome sexual attention or advances
-* Trolling, insulting/derogatory comments, and personal or political attacks
-* Public or private harassment
-* Publishing others' private information, such as a physical or electronic address, without explicit permission
-* Other conduct which could reasonably be considered inappropriate in a professional setting
+- The use of sexualized language or imagery and unwelcome sexual attention or advances
+- Trolling, insulting/derogatory comments, and personal or political attacks
+- Public or private harassment
+- Publishing others' private information, such as a physical or electronic address, without explicit permission
+- Other conduct which could reasonably be considered inappropriate in a professional setting
## Our Responsibilities
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
index 05444126a..19fb38715 100644
--- a/.github/CONTRIBUTING.md
+++ b/.github/CONTRIBUTING.md
@@ -5,6 +5,7 @@
First, thank you for considering contributing to react-pdf!
We welcome any type of contribution, not only code. You can help with
+
- **QA**: file bug reports, the more details you can give the better (e.g. screenshots with the console open)
- **Marketing**: writing blog posts, howto's, printing stickers, ...
- **Community**: presenting the project at meetups, organizing a dedicated meetup for the local community, ...
@@ -13,7 +14,7 @@ We welcome any type of contribution, not only code. You can help with
## Your First Contribution
-Working on your first Pull Request? You can learn how from this *free* series, [How to Contribute to an Open Source Project on GitHub](https://app.egghead.io/series/how-to-contribute-to-an-open-source-project-on-github).
+Working on your first Pull Request? You can learn how from this _free_ series, [How to Contribute to an Open Source Project on GitHub](https://app.egghead.io/series/how-to-contribute-to-an-open-source-project-on-github).
## Set up your development environment
@@ -30,12 +31,12 @@ git clone https://github.com/diegomura/react-pdf.git
cd react-pdf
```
-### 2. Install Node 14
+### 2. Install Node 18
If you have `nvm` installed all you have to do is
```sh
-nvm install 14
+nvm install 18
nvm use
```
@@ -100,7 +101,6 @@ yarn link react-dom
-
## Submitting code
Any code change should be submitted as a pull request. The description should explain what the code does and give steps to execute it. The pull request should also contain tests.
@@ -127,12 +127,10 @@ You can also reach us at hello@react-pdf.opencollective.com.
Thank you to all the people who have already contributed to react-pdf!
-
### Backers
Thank you to all our backers! [[Become a backer](https://opencollective.com/react-pdf#backer)]
-
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
index 851e16c3e..ac65a6af9 100644
--- a/.github/FUNDING.yml
+++ b/.github/FUNDING.yml
@@ -1 +1,2 @@
+github: diegomura
open_collective: react-pdf
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index 89d0908b5..d8921c7c8 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -4,7 +4,6 @@ about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
-
---
**Describe the bug**
@@ -12,6 +11,7 @@ A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior including code snippet (if applies):
+
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
@@ -26,9 +26,10 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- - OS: [e.g. MacOS, Windows]
- - Browser [e.g. chrome, safari]
- - React-pdf version [e.g. v1.1.0]
+
+- OS: [e.g. MacOS, Windows]
+- Browser [e.g. chrome, safari]
+- React-pdf version [e.g. v1.1.0]
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
index c2b58c054..f10ed90e4 100644
--- a/.github/ISSUE_TEMPLATE/feature_request.md
+++ b/.github/ISSUE_TEMPLATE/feature_request.md
@@ -4,7 +4,6 @@ about: Suggest an idea for this project
title: ''
labels: new feature
assignees: ''
-
---
**Is your feature request related to a problem? Please describe.**
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index b593c391e..0904e0be5 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -1,9 +1,5 @@
name: CI
-env:
- FORCE_COLOR: 2
- NODE: 14
-
on:
pull_request:
branches:
@@ -13,17 +9,133 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
+env:
+ FORCE_COLOR: 2
+ HUSKY: 0
+ NODE_VERSION: 20
+
jobs:
- check:
+ lint:
+ name: Lint
runs-on: ubuntu-latest
+
steps:
- - uses: actions/checkout@v3
- - uses: actions/setup-node@v3
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Cache Yarn cache
+ uses: actions/cache@v4
+ env:
+ cache-name: yarn-cache
+ with:
+ path: ~/.cache/yarn
+ key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
+ restore-keys: |
+ ${{ runner.os }}-${{ env.cache-name }}-
+
+ - name: Use Node.js
+ uses: actions/setup-node@v4
with:
- node-version: ${{ env.NODE }}
+ node-version: ${{ env.NODE_VERSION }}
+
+ - name: Install dependencies and build
+ run: yarn --frozen-lockfile
+
+ - name: Check size
+ run: yarn lint
+
+ size:
+ name: Check size
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Cache Yarn cache
+ uses: actions/cache@v4
+ env:
+ cache-name: yarn-cache
+ with:
+ path: ~/.cache/yarn
+ key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
+ restore-keys: |
+ ${{ runner.os }}-${{ env.cache-name }}-
+
+ - name: Use Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version: ${{ env.NODE_VERSION }}
+
- name: Install dependencies and build
- run: yarn install
+ run: yarn --frozen-lockfile
+
- name: Check size
run: yarn --cwd packages/renderer run size
+
+ test:
+ name: Run unit tests (Node.js ${{ matrix.node_version }}; React ${{ matrix.react_version }})
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ # We aim to test all maintained LTS versions of Node.js as well as the latest stable version
+ node_version: [18, 20, 21]
+ react_version: [16, 17, 18]
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Cache Yarn cache
+ uses: actions/cache@v4
+ env:
+ cache-name: yarn-cache
+ with:
+ path: ~/.cache/yarn
+ key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
+ restore-keys: |
+ ${{ runner.os }}-${{ env.cache-name }}-
+
+ - name: Use Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version: ${{ matrix.node_version }}
+
+ - name: Install dependencies and build
+ run: yarn --frozen-lockfile
+
- name: Run tests
- run: yarn test
+ run: REACT_VERSION=${{ matrix.react_version }} yarn test
+
+ e2e-node:
+ name: Run E2E tests (Node.js ${{ matrix.node_version }}; ${{ matrix.cjs_or_esm == 'cjs' ? 'CJS' : 'ESM' }})
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ cjs_or_esm: [cjs, esm]
+ node_version: [18, 20, 21]
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Cache Yarn cache
+ uses: actions/cache@v4
+ env:
+ cache-name: yarn-cache
+ with:
+ path: ~/.cache/yarn
+ key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
+ restore-keys: |
+ ${{ runner.os }}-${{ env.cache-name }}-
+
+ - name: Use Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version: ${{ matrix.node_version }}
+
+ - name: Install dependencies and build
+ run: yarn --frozen-lockfile
+
+ - name: Run E2E tests
+ run: yarn --cwd e2e/node-${{ matrix.cjs_or_esm }} run start
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 8f5f2717e..41923896e 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -1,9 +1,5 @@
name: Release
-env:
- FORCE_COLOR: 2
- NODE: 14
-
on:
push:
branches:
@@ -13,38 +9,85 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
+env:
+ FORCE_COLOR: 2
+ HUSKY: 0
+ NODE_VERSION: 20
+
jobs:
+ test:
+ name: Run tests (Node.js ${{ matrix.node_version }}; React ${{ matrix.react_version }})
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ # We aim to test all maintained LTS versions of Node.js as well as the latest stable version
+ node_version: [18, 20, 21]
+ react_version: [16, 17, 18]
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Cache Yarn cache
+ uses: actions/cache@v4
+ env:
+ cache-name: yarn-cache
+ with:
+ path: ~/.cache/yarn
+ key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
+ restore-keys: |
+ ${{ runner.os }}-${{ env.cache-name }}-
+
+ - name: Use Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version: ${{ matrix.node_version }}
+
+ - name: Install dependencies and build
+ run: yarn --frozen-lockfile
+
+ - name: Run tests
+ run: REACT_VERSION=${{ matrix.react_version }} yarn test
+
release:
- # prevents this action from running on forks
+ # Prevents this action from running on forks
if: github.repository_owner == 'diegomura'
- name: Release
+ name: Create Release PR or Publish to npm
+ needs: [test]
runs-on: ubuntu-latest
steps:
- - name: Checkout Repo
- uses: actions/checkout@v3
+ - name: Checkout
+ uses: actions/checkout@v4
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0
- - name: Setup Node.js
- uses: actions/setup-node@v3
+ - name: Cache Yarn cache
+ uses: actions/cache@v4
+ env:
+ cache-name: yarn-cache
with:
- node-version: ${{ env.NODE }}
+ path: ~/.cache/yarn
+ key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
+ restore-keys: |
+ ${{ runner.os }}-${{ env.cache-name }}-
- - name: Install dependencies and build
- run: yarn install
+ - name: Use Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version: ${{ env.NODE_VERSION }}
- - name: Run tests
- run: yarn test
+ - name: Install dependencies and build
+ run: yarn --frozen-lockfile
- - name: Create Release Pull Request or Publish to npm
+ - name: Create Release PR or Publish to npm
uses: changesets/action@v1
with:
- # this expects you to have a script called release which does a build for your packages and calls changeset publish
+ # This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: yarn release
version: yarn version-packages
- commit: "chore: release packages"
- title: "chore: release packages"
+ commit: 'chore: release packages'
+ title: 'chore: release packages'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
diff --git a/.gitignore b/.gitignore
index 938e2a5a3..d660a7570 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,4 @@ coverage
.idea
.DS_Store
.cache
+.parcel-cache
diff --git a/.husky/pre-commit b/.husky/pre-commit
index d2ae35e84..372362317 100755
--- a/.husky/pre-commit
+++ b/.husky/pre-commit
@@ -1,4 +1 @@
-#!/bin/sh
-. "$(dirname "$0")/_/husky.sh"
-
yarn lint-staged
diff --git a/.nvmrc b/.nvmrc
index 8351c1939..3c032078a 100644
--- a/.nvmrc
+++ b/.nvmrc
@@ -1 +1 @@
-14
+18
diff --git a/.prettierignore b/.prettierignore
index 6bb2261c1..2fa6fd605 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -1 +1,3 @@
yoga-layout
+lib
+packages/pdfkit
diff --git a/.prettierrc b/.prettierrc
index 3635a40b9..544138be4 100644
--- a/.prettierrc
+++ b/.prettierrc
@@ -1,4 +1,3 @@
{
- "singleQuote": true,
- "trailingComma": "all"
+ "singleQuote": true
}
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index ae76940a2..000000000
--- a/.travis.yml
+++ /dev/null
@@ -1,32 +0,0 @@
-language: node_js
-
-node_js:
- - '14'
-
-os:
- - linux
-
-addons:
- apt:
- sources: ['ubuntu-toolchain-r-test']
- packages: ['g++-4.9']
-
-cache:
- yarn: true
- directories:
- - node_modules
-
-before_install:
- - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export CXX=g++-4.9 ; fi
- - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export CFLAGS="$CFLAGS -std=c99" ; fi
- - curl -o- -L https://yarnpkg.com/install.sh | bash
- - export PATH=$HOME/.yarn/bin:$PATH
-
-before_script:
- - yarn run bootstrap
-
-install:
- - yarn
-
-script:
- - yarn test
diff --git a/README.md b/README.md
index 7e4f8980d..1b618b9d8 100644
--- a/README.md
+++ b/README.md
@@ -14,7 +14,6 @@
-
@@ -23,6 +22,7 @@
This package is used to _create_ PDFs using React. If you wish to _display_ existing PDFs, you may be looking for [react-pdf](https://github.com/wojtekmaj/react-pdf).
## How to install
+
```sh
yarn add @react-pdf/renderer
```
@@ -37,13 +37,13 @@ import { Document, Page, Text, View, StyleSheet } from '@react-pdf/renderer';
const styles = StyleSheet.create({
page: {
flexDirection: 'row',
- backgroundColor: '#E4E4E4'
+ backgroundColor: '#E4E4E4',
},
section: {
margin: 10,
padding: 10,
- flexGrow: 1
- }
+ flexGrow: 1,
+ },
});
// Create Document Component
@@ -62,6 +62,7 @@ const MyDocument = () => (
```
### `Web.` Render in DOM
+
```jsx
import React from 'react';
import ReactDOM from 'react-dom';
@@ -77,6 +78,7 @@ ReactDOM.render( , document.getElementById('root'));
```
### `Node.` Save in a file
+
```jsx
import React from 'react';
import ReactPDF from '@react-pdf/renderer';
@@ -106,7 +108,6 @@ Thank you to all our backers! [[Become a backer](https://opencollective.com/reac
MIT © [Diego Muracciole](http://github.com/diegomura)
-[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fdiegomura%2Freact-pdf.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fdiegomura%2Freact-pdf?ref=badge_large)
-
---
+
![](https://img.shields.io/npm/dt/@react-pdf/renderer.svg?style=flat)
diff --git a/babel.config.js b/babel.config.js
index 285a04652..673c9482a 100644
--- a/babel.config.js
+++ b/babel.config.js
@@ -1,4 +1,4 @@
-module.exports = {
+export default {
presets: [
[
'@babel/preset-env',
diff --git a/e2e/node-cjs/index.js b/e2e/node-cjs/index.js
new file mode 100644
index 000000000..6fae909d4
--- /dev/null
+++ b/e2e/node-cjs/index.js
@@ -0,0 +1,45 @@
+const fs = require('node:fs/promises');
+const assert = require('node:assert');
+const { test } = require('node:test');
+const { jsx } = require('react/jsx-runtime');
+const { Document, Page, Text, renderToBuffer } = require('@react-pdf/renderer');
+
+const MyDocument = () =>
+ jsx(Document, {
+ children: jsx(Page, {
+ size: 'A4',
+ children: jsx(Text, {
+ children: 'Hello world',
+ }),
+ }),
+ });
+
+function removeMovingParts(buffer) {
+ return Buffer.from(
+ buffer
+ .toString('ascii')
+ .replace(/\(D:[0-9]{14}Z\)/g, '(D:20240101000000Z)')
+ .replace(
+ /\/ID \[.*\]/,
+ '/ID [<00000000000000000000000000000000> <00000000000000000000000000000000>]',
+ ),
+ );
+}
+
+test('rendering a PDF', async () => {
+ const bufferPromise = renderToBuffer(jsx(MyDocument, {}));
+ const referenceBufferPromise = fs.readFile('../reference.pdf');
+
+ const [buffer, referenceBuffer] = await Promise.all([
+ bufferPromise,
+ referenceBufferPromise,
+ ]);
+
+ const bufferAsciiWithIDsRemoved = removeMovingParts(buffer);
+ const referenceBufferAsciiWithIDsRemoved = removeMovingParts(referenceBuffer);
+
+ assert.deepStrictEqual(
+ bufferAsciiWithIDsRemoved,
+ referenceBufferAsciiWithIDsRemoved,
+ );
+});
diff --git a/e2e/node-cjs/package.json b/e2e/node-cjs/package.json
new file mode 100644
index 000000000..54bbda9a7
--- /dev/null
+++ b/e2e/node-cjs/package.json
@@ -0,0 +1,18 @@
+{
+ "name": "@react-pdf/e2e-node-cjs",
+ "version": "2.0.0",
+ "license": "MIT",
+ "private": true,
+ "type": "commonjs",
+ "author": "Diego Muracciole ",
+ "homepage": "https://github.com/diegomura/react-pdf#readme",
+ "repository": "git@github.com:diegomura/react-pdf.git",
+ "scripts": {
+ "dev": "node --watch ./index.js",
+ "start": "node ./index.js"
+ },
+ "dependencies": {
+ "@react-pdf/renderer": "^3.3.7",
+ "react": "^18.2.0"
+ }
+}
diff --git a/e2e/node-esm/index.js b/e2e/node-esm/index.js
new file mode 100644
index 000000000..54c487f83
--- /dev/null
+++ b/e2e/node-esm/index.js
@@ -0,0 +1,45 @@
+import fs from 'node:fs/promises';
+import assert from 'node:assert';
+import { test } from 'node:test';
+import { jsx } from 'react/jsx-runtime';
+import { Document, Page, Text, renderToBuffer } from '@react-pdf/renderer';
+
+const MyDocument = () =>
+ jsx(Document, {
+ children: jsx(Page, {
+ size: 'A4',
+ children: jsx(Text, {
+ children: 'Hello world',
+ }),
+ }),
+ });
+
+function removeMovingParts(buffer) {
+ return Buffer.from(
+ buffer
+ .toString('ascii')
+ .replace(/\(D:[0-9]{14}Z\)/g, '(D:20240101000000Z)')
+ .replace(
+ /\/ID \[.*\]/,
+ '/ID [<00000000000000000000000000000000> <00000000000000000000000000000000>]',
+ ),
+ );
+}
+
+test('rendering a PDF', async () => {
+ const bufferPromise = renderToBuffer(jsx(MyDocument, {}));
+ const referenceBufferPromise = fs.readFile('../reference.pdf');
+
+ const [buffer, referenceBuffer] = await Promise.all([
+ bufferPromise,
+ referenceBufferPromise,
+ ]);
+
+ const bufferAsciiWithIDsRemoved = removeMovingParts(buffer);
+ const referenceBufferAsciiWithIDsRemoved = removeMovingParts(referenceBuffer);
+
+ assert.deepStrictEqual(
+ bufferAsciiWithIDsRemoved,
+ referenceBufferAsciiWithIDsRemoved,
+ );
+});
diff --git a/e2e/node-esm/package.json b/e2e/node-esm/package.json
new file mode 100644
index 000000000..6eae7c649
--- /dev/null
+++ b/e2e/node-esm/package.json
@@ -0,0 +1,18 @@
+{
+ "name": "@react-pdf/e2e-node-esm",
+ "version": "2.0.0",
+ "license": "MIT",
+ "private": true,
+ "type": "module",
+ "author": "Diego Muracciole ",
+ "homepage": "https://github.com/diegomura/react-pdf#readme",
+ "repository": "git@github.com:diegomura/react-pdf.git",
+ "scripts": {
+ "dev": "node --watch ./index.js",
+ "start": "node ./index.js"
+ },
+ "dependencies": {
+ "@react-pdf/renderer": "^3.3.7",
+ "react": "^18.2.0"
+ }
+}
diff --git a/e2e/reference.pdf b/e2e/reference.pdf
new file mode 100644
index 000000000..15ede9f51
Binary files /dev/null and b/e2e/reference.pdf differ
diff --git a/jest.config.js b/jest.config.js
deleted file mode 100644
index 5439cc2d0..000000000
--- a/jest.config.js
+++ /dev/null
@@ -1,15 +0,0 @@
-module.exports = {
- projects: [
- 'packages/fns',
- 'packages/yoga',
- 'packages/font',
- 'packages/image',
- 'packages/render',
- 'packages/layout',
- 'packages/svgkit',
- 'packages/textkit',
- 'packages/renderer',
- 'packages/stylesheet',
- 'packages/primitives',
- ],
-};
diff --git a/lerna.json b/lerna.json
index aa69151e3..7c1c56a78 100644
--- a/lerna.json
+++ b/lerna.json
@@ -1,8 +1,5 @@
{
"version": "independent",
- "packages": [
- "packages/*"
- ],
- "useWorkspaces": true,
+ "packages": ["packages/*", "e2e/*"],
"npmClient": "yarn"
}
diff --git a/package.json b/package.json
index c3b38b5f5..3bbe0cd42 100644
--- a/package.json
+++ b/package.json
@@ -5,19 +5,21 @@
"license": "MIT",
"author": "Diego Muracciole ",
"homepage": "https://github.com/diegomura/react-pdf#readme",
+ "type": "module",
"repository": "git@github.com:diegomura/react-pdf.git",
"workspaces": [
- "packages/*"
+ "packages/*",
+ "e2e/*"
],
"scripts": {
- "prepare": "husky install",
+ "prepare": "husky",
"build": "lerna run build",
"watch": "lerna run watch --parallel",
"bootstrap": "lerna bootstrap",
"prepublish": "lerna run build",
"lint": "eslint packages",
- "test": "jest",
- "examples": "lerna run start --scope @react-pdf/examples",
+ "test": "vitest",
+ "dev": "lerna run dev --scope @react-pdf/examples",
"changeset": "changeset",
"version-packages": "changeset version",
"release": "changeset publish"
@@ -25,7 +27,6 @@
"devDependencies": {
"@babel/cli": "^7.20.7",
"@babel/core": "^7.20.7",
- "@babel/node": "^7.20.7",
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/plugin-proposal-decorators": "^7.20.13",
"@babel/plugin-proposal-optional-chaining": "^7.20.7",
@@ -34,48 +35,52 @@
"@babel/preset-react": "^7.18.6",
"@changesets/changelog-github": "^0.4.8",
"@changesets/cli": "^2.26.0",
- "@rollup/plugin-alias": "^3.1.8",
- "@rollup/plugin-babel": "^5.3.0",
- "@rollup/plugin-commonjs": "^21.0.1",
- "@rollup/plugin-json": "^4.1.0",
- "@rollup/plugin-node-resolve": "^13.0.6",
- "@rollup/plugin-replace": "^3.0.0",
+ "@rollup/plugin-alias": "^5.1.0",
+ "@rollup/plugin-babel": "^6.0.0",
+ "@rollup/plugin-commonjs": "^25.0.0",
+ "@rollup/plugin-json": "^6.1.0",
+ "@rollup/plugin-node-resolve": "^15.2.0",
+ "@rollup/plugin-replace": "^5.0.0",
+ "@rollup/plugin-terser": "^0.4.4",
"@testing-library/react": "^14.0.0",
- "babel-eslint": "^10.0.1",
- "babel-jest": "^29.5.0",
+ "@typescript-eslint/parser": "^6.21.0",
+ "@vitejs/plugin-react": "^4.2.1",
"babel-plugin-add-module-exports": "^1.0.0",
- "canvas": "^2.11.0",
+ "canvas": "^2.11.2",
"chalk": "^2.4.2",
- "eslint": "^6.8.0",
- "eslint-config-airbnb": "^18.1.0",
- "eslint-config-prettier": "^4.0.0",
- "eslint-plugin-import": "^2.20.2",
- "eslint-plugin-jest": "^22.3.0",
- "eslint-plugin-jsx-a11y": "^6.2.3",
- "eslint-plugin-promise": "^4.0.1",
- "eslint-plugin-react": "^7.20.0",
- "eslint-plugin-react-hooks": "^2.5.1",
- "husky": "^7.0.4",
- "jest": "^29.5.0",
- "jest-environment-jsdom": "^29.5.0",
+ "eslint": "^8.56.0",
+ "eslint-config-airbnb": "^19.0.0",
+ "eslint-config-prettier": "^9.0.0",
+ "eslint-plugin-import": "^2.29.0",
+ "eslint-plugin-jsx-a11y": "^6.8.0",
+ "eslint-plugin-promise": "^6.1.0",
+ "eslint-plugin-react": "^7.33.0",
+ "eslint-plugin-react-hooks": "^4.6.0",
+ "husky": "^9.0.0",
"jest-image-snapshot": "^6.1.0",
- "lerna": "^3.21.0",
+ "jsdom": "^23.2.0",
+ "lerna": "^8.0.2",
"lint-staged": "^10.5.4",
- "pdfjs-dist": "3.1.81",
- "prettier": "^1.16.4",
+ "pdfjs-dist": "3.2.146",
+ "prettier": "^3.2.0",
"react": "^18.2.0",
+ "react-16": "npm:react@^16.8.0",
+ "react-17": "npm:react@^17.0.0",
"react-dom": "^18.2.0",
+ "react-dom-16": "npm:react-dom@^16.8.0",
+ "react-dom-17": "npm:react-dom@^17.0.0",
"rimraf": "^2.6.3",
- "rollup": "^2.60.1",
+ "rollup": "^4.9.0",
+ "rollup-plugin-copy": "^3.5.0",
"rollup-plugin-ignore": "^1.0.10",
"rollup-plugin-local-resolve": "^1.0.7",
- "rollup-plugin-polyfill-node": "^0.9.0",
- "rollup-plugin-sourcemaps": "^0.6.3",
- "rollup-plugin-terser": "^7.0.2"
+ "rollup-plugin-polyfill-node": "^0.13.0",
+ "vitest": "^1.2.0",
+ "vitest-fetch-mock": "^0.2.2"
},
"lint-staged": {
- "*.js": [
- "eslint",
+ "*.{js,jsx,ts,tsx}": [
+ "yarn lint",
"prettier --write"
]
},
@@ -84,6 +89,5 @@
"url": "https://opencollective.com/react-pdf",
"logo": "https://opencollective.com/opencollective/logo.txt"
},
- "dependencies": {},
"packageManager": "yarn@1.22.19"
}
diff --git a/packages/examples/.eslintrc.json b/packages/examples/.eslintrc.json
new file mode 100644
index 000000000..acf25ba13
--- /dev/null
+++ b/packages/examples/.eslintrc.json
@@ -0,0 +1,8 @@
+{
+ "extends": ["../../.eslintrc.json", "plugin:react/recommended"],
+ "rules": {
+ "react/prop-types": 0,
+ "jsx-a11y/anchor-is-valid": 0,
+ "react/jsx-one-expression-per-line": 0
+ }
+}
diff --git a/packages/examples/CHANGELOG.md b/packages/examples/CHANGELOG.md
index 614e9c7a8..1d5b3df43 100644
--- a/packages/examples/CHANGELOG.md
+++ b/packages/examples/CHANGELOG.md
@@ -1,5 +1,127 @@
# @react-pdf/examples
+## 3.2.10
+
+### Patch Changes
+
+- Updated dependencies []:
+ - @react-pdf/renderer@3.3.8
+
+## 3.2.9
+
+### Patch Changes
+
+- Updated dependencies [[`f7505ed`](https://github.com/diegomura/react-pdf/commit/f7505ed453a1a0ae960d0e5e4a1d155803861b71)]:
+ - @react-pdf/renderer@3.3.7
+
+## 3.2.8
+
+### Patch Changes
+
+- Updated dependencies []:
+ - @react-pdf/renderer@3.3.6
+
+## 3.2.7
+
+### Patch Changes
+
+- Updated dependencies []:
+ - @react-pdf/renderer@3.3.5
+
+## 3.2.6
+
+### Patch Changes
+
+- Updated dependencies []:
+ - @react-pdf/renderer@3.3.4
+
+## 3.2.5
+
+### Patch Changes
+
+- Updated dependencies [[`b5380a1`](https://github.com/diegomura/react-pdf/commit/b5380a1a0a7397b4111d68ce97b4acb702d34d51)]:
+ - @react-pdf/renderer@3.3.3
+
+## 3.2.4
+
+### Patch Changes
+
+- Updated dependencies []:
+ - @react-pdf/renderer@3.3.2
+
+## 3.2.3
+
+### Patch Changes
+
+- [#2529](https://github.com/diegomura/react-pdf/pull/2529) [`a35b1ba`](https://github.com/diegomura/react-pdf/commit/a35b1ba18d293df51293600d8d56015094d222d8) Thanks [@diegomura](https://github.com/diegomura)! - fix: jpeg exif orientation rendering
+
+- Updated dependencies [[`a35b1ba`](https://github.com/diegomura/react-pdf/commit/a35b1ba18d293df51293600d8d56015094d222d8)]:
+ - @react-pdf/renderer@3.3.1
+
+## 3.2.2
+
+### Patch Changes
+
+- [#2518](https://github.com/diegomura/react-pdf/pull/2518) [`3c62070`](https://github.com/diegomura/react-pdf/commit/3c6207035d2f02109bb2b5ef8804febc5a05b488) Thanks [@wojtekmaj](https://github.com/wojtekmaj)! - Fix invalid prop (style) in Resume example
+
+* [#2521](https://github.com/diegomura/react-pdf/pull/2521) [`214207b`](https://github.com/diegomura/react-pdf/commit/214207b62bc8061a46a7cb220901e193d327effe) Thanks [@wojtekmaj](https://github.com/wojtekmaj)! - Fix invalid display property in objectFit example
+
+- [#2517](https://github.com/diegomura/react-pdf/pull/2517) [`bc0d4f4`](https://github.com/diegomura/react-pdf/commit/bc0d4f42fe5d8b8bd2fb560b753041fbf013ab33) Thanks [@wojtekmaj](https://github.com/wojtekmaj)! - Fix invalid props (xmlns, id) in SVG example
+
+- Updated dependencies [[`64f7bba`](https://github.com/diegomura/react-pdf/commit/64f7bba0d840d17188e50086169c84c415abd8d5), [`e817223`](https://github.com/diegomura/react-pdf/commit/e8172231d07d10ece4ca960641f9ee52c5d4660d), [`cf73180`](https://github.com/diegomura/react-pdf/commit/cf7318069e63170e160a36602359fc8cbc3386c2), [`0f5c43f`](https://github.com/diegomura/react-pdf/commit/0f5c43fa6f3c0b53c067200cc1ac21e651504760), [`66a40b2`](https://github.com/diegomura/react-pdf/commit/66a40b2e41cefe11f1ef8d467ba449a8861adb69)]:
+ - @react-pdf/renderer@3.3.0
+
+## 3.2.1
+
+### Patch Changes
+
+- Updated dependencies []:
+ - @react-pdf/renderer@3.2.1
+
+## 3.2.0
+
+### Minor Changes
+
+- [#2409](https://github.com/diegomura/react-pdf/pull/2409) [`b6a14fd`](https://github.com/diegomura/react-pdf/commit/b6a14fd160fab26a49f798e5294b0e361e67fe37) Thanks [@wojtekmaj](https://github.com/wojtekmaj)! - Add support for native ESM
+
+* [#2496](https://github.com/diegomura/react-pdf/pull/2496) [`c8fe2c8`](https://github.com/diegomura/react-pdf/commit/c8fe2c86639cb8e44f26f78e62fc67379a8e3ceb) Thanks [@diegomura](https://github.com/diegomura)! - fix: copyright and registered symbol rendering
+
+### Patch Changes
+
+- Updated dependencies [[`b6a14fd`](https://github.com/diegomura/react-pdf/commit/b6a14fd160fab26a49f798e5294b0e361e67fe37)]:
+ - @react-pdf/renderer@3.2.0
+
+## 3.1.0
+
+### Minor Changes
+
+- [#2491](https://github.com/diegomura/react-pdf/pull/2491) [`ed8524f`](https://github.com/diegomura/react-pdf/commit/ed8524f867f71fc8407faeb74edc4574e99a1137) Thanks [@diegomura](https://github.com/diegomura)! - feat: add minPresenceAhead example
+
+### Patch Changes
+
+- Updated dependencies []:
+ - @react-pdf/renderer@3.1.17
+
+## 3.0.0
+
+### Major Changes
+
+- [#2487](https://github.com/diegomura/react-pdf/pull/2487) [`3f31046`](https://github.com/diegomura/react-pdf/commit/3f310460dcadb7bd65adeab0309812aa757cde29) Thanks [@diegomura](https://github.com/diegomura)! - add dev script
+
+### Patch Changes
+
+- [#2479](https://github.com/diegomura/react-pdf/pull/2479) [`45b2bd3`](https://github.com/diegomura/react-pdf/commit/45b2bd37037c605727ad5783f2f2a438dc19cac4) Thanks [@diegomura](https://github.com/diegomura)! - fix linting
+
+- Updated dependencies [[`8654d00`](https://github.com/diegomura/react-pdf/commit/8654d003023dd0899cddfc2ea2f5a552e01cf570)]:
+ - @react-pdf/renderer@3.1.16
+
+## 2.0.14
+
+### Patch Changes
+
+- Updated dependencies []:
+ - @react-pdf/renderer@3.1.15
+
## 2.0.13
### Patch Changes
diff --git a/packages/examples/babel.config.js b/packages/examples/babel.config.js
deleted file mode 100644
index 27f83582f..000000000
--- a/packages/examples/babel.config.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = { extends: '../../babel.config.js' };
diff --git a/packages/examples/package.json b/packages/examples/package.json
index 2758e8a4a..65d0c2cf7 100644
--- a/packages/examples/package.json
+++ b/packages/examples/package.json
@@ -1,21 +1,23 @@
{
"name": "@react-pdf/examples",
- "version": "2.0.13",
+ "version": "3.2.10",
"license": "MIT",
"private": true,
"author": "Diego Muracciole ",
"homepage": "https://github.com/diegomura/react-pdf#readme",
"repository": "git@github.com:diegomura/react-pdf.git",
- "main": "lib",
"scripts": {
- "test": "jest"
+ "dev": "vite ./src --open"
},
"dependencies": {
- "@react-pdf/renderer": "^3.1.14",
- "camelcase": "^6.2.0"
+ "@react-pdf/renderer": "^3.3.8"
+ },
+ "devDependencies": {
+ "@vitejs/plugin-react": "^4.2.1",
+ "vite": "^5.0.11"
},
"peerDependencies": {
- "react": "^16.8.6 || ^17.0.0",
- "react-dom": "^16.8.6 || ^17.0.0"
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
+ "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
}
}
diff --git a/packages/examples/public/Cairo-Regular.ttf b/packages/examples/public/Cairo-Regular.ttf
new file mode 100644
index 000000000..d64275177
Binary files /dev/null and b/packages/examples/public/Cairo-Regular.ttf differ
diff --git a/packages/examples/public/NotoSans-Regular.ttf b/packages/examples/public/NotoSans-Regular.ttf
deleted file mode 100644
index ff376d133..000000000
Binary files a/packages/examples/public/NotoSans-Regular.ttf and /dev/null differ
diff --git a/packages/examples/public/Rubik-Regular.ttf b/packages/examples/public/Rubik-Regular.ttf
new file mode 100644
index 000000000..06a67a2da
Binary files /dev/null and b/packages/examples/public/Rubik-Regular.ttf differ
diff --git a/packages/examples/public/chart.svg b/packages/examples/public/chart.svg
deleted file mode 100644
index 029a78b53..000000000
--- a/packages/examples/public/chart.svg
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
- Created with Highcharts 6.2.0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- USD
- USD
-
-
-
-
- EUR
- EUR
-
-
-
-
- CHF
- CHF
-
-
-
-
-
-
-
-
-
-
diff --git a/packages/examples/public/font.ttc b/packages/examples/public/font.ttc
deleted file mode 100644
index 816fee694..000000000
Binary files a/packages/examples/public/font.ttc and /dev/null differ
diff --git a/packages/examples/public/keifont.ttf b/packages/examples/public/keifont.ttf
deleted file mode 100644
index 2d4b3c85b..000000000
Binary files a/packages/examples/public/keifont.ttf and /dev/null differ
diff --git a/packages/examples/public/miller-banner.ttf b/packages/examples/public/miller-banner.ttf
deleted file mode 100644
index 4b0f49aac..000000000
Binary files a/packages/examples/public/miller-banner.ttf and /dev/null differ
diff --git a/packages/examples/public/test.jpg b/packages/examples/public/test.jpg
deleted file mode 100644
index 47da53161..000000000
Binary files a/packages/examples/public/test.jpg and /dev/null differ
diff --git a/packages/examples/public/test2.jpg b/packages/examples/public/test2.jpg
deleted file mode 100644
index d33ecbdd2..000000000
Binary files a/packages/examples/public/test2.jpg and /dev/null differ
diff --git a/packages/examples/src/duplicatedImages/index.jsx b/packages/examples/src/duplicatedImages/index.jsx
new file mode 100644
index 000000000..473f7fdd1
--- /dev/null
+++ b/packages/examples/src/duplicatedImages/index.jsx
@@ -0,0 +1,63 @@
+/* eslint react/prop-types: 0 */
+/* eslint react/jsx-sort-props: 0 */
+
+import React from 'react';
+import { Document, Page, Image, StyleSheet } from '@react-pdf/renderer';
+
+import Quijote1 from '../../public/quijote1.jpg';
+
+const styles = StyleSheet.create({
+ body: {
+ paddingTop: 35,
+ paddingBottom: 65,
+ paddingHorizontal: 35,
+ },
+ image: {
+ marginVertical: 15,
+ marginHorizontal: 0,
+ width: 520,
+ height: 200,
+ backgroundColor: 'red',
+ objectFit: 'fill',
+ objectPositionX: 'center',
+ objectPositionY: 'center',
+ borderWith: 2,
+ padding: 2,
+ borderColor: 'blue',
+ borderStyle: 'solid',
+ },
+ image2: {
+ marginVertical: 15,
+ marginHorizontal: 0,
+ width: 300,
+ backgroundColor: 'green',
+ objectFit: 'fill',
+ objectPositionX: 'center',
+ objectPositionY: 'center',
+ borderWith: 2,
+ padding: 2,
+ borderColor: 'blue',
+ borderStyle: 'solid',
+ },
+});
+
+const MyDoc = () => {
+ return (
+
+
+
+
+
+
+ );
+};
+
+const App = () => {
+ return (
+
+
+
+ );
+};
+
+export default App;
diff --git a/packages/examples/src/ellipsis/index.jsx b/packages/examples/src/ellipsis/index.jsx
new file mode 100644
index 000000000..fc279f38a
--- /dev/null
+++ b/packages/examples/src/ellipsis/index.jsx
@@ -0,0 +1,59 @@
+/* eslint react/prop-types: 0 */
+/* eslint react/jsx-sort-props: 0 */
+
+import React from 'react';
+import {
+ Document,
+ Page,
+ Text,
+ View,
+ StyleSheet,
+ Font,
+} from '@react-pdf/renderer';
+
+import RobotoFont from '../../public/Roboto-Regular.ttf';
+
+const styles = StyleSheet.create({
+ body: {
+ paddingTop: 35,
+ paddingBottom: 65,
+ paddingHorizontal: 35,
+ },
+ text: {
+ fontSize: 15,
+ maxLines: 1,
+ fontColor: '#000000',
+ textOverflow: 'ellipsis',
+ fontFamily: 'Roboto',
+ },
+});
+
+Font.register({
+ family: 'Roboto',
+ fonts: [
+ {
+ src: RobotoFont,
+ fontWeight: 400,
+ },
+ ],
+});
+
+const MyDoc = () => {
+ return (
+
+
+ And here here
+
+
+ );
+};
+
+const App = () => {
+ return (
+
+
+
+ );
+};
+
+export default App;
diff --git a/packages/examples/src/emoji/index.jsx b/packages/examples/src/emoji/index.jsx
new file mode 100644
index 000000000..f24c98ac7
--- /dev/null
+++ b/packages/examples/src/emoji/index.jsx
@@ -0,0 +1,40 @@
+import React from 'react';
+import {
+ Document,
+ Page,
+ View,
+ Text,
+ Font,
+ StyleSheet,
+} from '@react-pdf/renderer';
+
+const styles = StyleSheet.create({
+ container: {
+ height: 700,
+ marginVertical: 70,
+ marginHorizontal: '10%',
+ },
+ text: {
+ fontSize: 100,
+ textAlign: 'center',
+ },
+});
+
+Font.registerEmojiSource({
+ format: 'png',
+ url: 'https://cdnjs.cloudflare.com/ajax/libs/twemoji/14.0.2/72x72/',
+ // url: 'https://cdn.jsdelivr.net/npm/emoji-datasource-apple@15.0.1/img/apple/64/',
+ // withVariationSelectors: true,
+});
+
+const Emoji = () => (
+
+
+
+ 😀💩👻🙈
+
+
+
+);
+
+export default Emoji;
diff --git a/packages/examples/src/fontWeight/index.jsx b/packages/examples/src/fontWeight/index.jsx
new file mode 100644
index 000000000..fd2c62379
--- /dev/null
+++ b/packages/examples/src/fontWeight/index.jsx
@@ -0,0 +1,78 @@
+/* eslint react/prop-types: 0 */
+/* eslint react/jsx-sort-props: 0 */
+
+import React from 'react';
+import { Document, Page, Text, StyleSheet, Font } from '@react-pdf/renderer';
+
+import RobotoFont from '../../public/Roboto-Regular.ttf';
+import RobotoFontMedium from '../../public/Roboto-Medium.ttf';
+import RobotoFontBold from '../../public/Roboto-Bold.ttf';
+import RobotoFontBlack from '../../public/Roboto-Black.ttf';
+
+const styles = StyleSheet.create({
+ body: {
+ paddingTop: 35,
+ paddingBottom: 45,
+ paddingHorizontal: 35,
+ position: 'relative',
+ },
+ regular: {
+ fontFamily: 'Roboto',
+ fontWeight: 400,
+ },
+ medium: {
+ fontFamily: 'Roboto',
+ fontWeight: 500,
+ },
+ bold: {
+ fontWeight: 600,
+ fontFamily: 'Roboto',
+ },
+ black: {
+ fontWeight: 900,
+ fontFamily: 'Roboto',
+ },
+});
+
+Font.register({
+ family: 'Roboto',
+ fonts: [
+ {
+ src: RobotoFont,
+ fontWeight: 400,
+ },
+ {
+ src: RobotoFontMedium,
+ fontWeight: 500,
+ },
+ {
+ src: RobotoFontBold,
+ fontWeight: 700,
+ },
+ {
+ src: RobotoFontBlack,
+ fontWeight: 900,
+ },
+ ],
+});
+
+const MyDoc = () => {
+ return (
+
+ Regular text
+ Medium text
+ Bold text
+ Black text
+
+ );
+};
+
+const App = () => {
+ return (
+
+
+
+ );
+};
+
+export default App;
diff --git a/packages/examples/src/fractals/Fractal.js b/packages/examples/src/fractals/Fractal.jsx
similarity index 94%
rename from packages/examples/src/fractals/Fractal.js
rename to packages/examples/src/fractals/Fractal.jsx
index f18b56942..37d3bd8e8 100644
--- a/packages/examples/src/fractals/Fractal.js
+++ b/packages/examples/src/fractals/Fractal.jsx
@@ -42,7 +42,7 @@ const styles = StyleSheet.create({
},
});
-const toggle = direction => (direction === 'column' ? 'row' : 'column');
+const toggle = (direction) => (direction === 'column' ? 'row' : 'column');
const Fractal = ({ steps, direction = 'column' }) => {
if (steps === 0) {
diff --git a/packages/examples/src/fractals/index.js b/packages/examples/src/fractals/index.jsx
similarity index 66%
rename from packages/examples/src/fractals/index.js
rename to packages/examples/src/fractals/index.jsx
index 3aabcdbad..9c295275a 100644
--- a/packages/examples/src/fractals/index.js
+++ b/packages/examples/src/fractals/index.jsx
@@ -3,13 +3,8 @@ import { Page, Document } from '@react-pdf/renderer';
import Fractal from './Fractal';
-export default () => (
-
+const Fractals = () => (
+
@@ -23,3 +18,5 @@ export default () => (
);
+
+export default Fractals;
diff --git a/packages/examples/src/fractals/output.pdf b/packages/examples/src/fractals/output.pdf
deleted file mode 100644
index d4c6f134b..000000000
Binary files a/packages/examples/src/fractals/output.pdf and /dev/null differ
diff --git a/packages/examples/src/fractals/thumb.png b/packages/examples/src/fractals/thumb.png
deleted file mode 100644
index 18d7b76b7..000000000
Binary files a/packages/examples/src/fractals/thumb.png and /dev/null differ
diff --git a/packages/examples/src/goTo/index.js b/packages/examples/src/goTo/index.jsx
similarity index 60%
rename from packages/examples/src/goTo/index.js
rename to packages/examples/src/goTo/index.jsx
index 095f85905..755ab865b 100644
--- a/packages/examples/src/goTo/index.js
+++ b/packages/examples/src/goTo/index.jsx
@@ -1,10 +1,7 @@
-/* eslint react/prop-types: 0, react/jsx-sort-props: 0 */
-
import React from 'react';
-
import { Page, Document, Link, View, Image } from '@react-pdf/renderer';
-export default () => (
+const GoTo = () => (
Link
@@ -12,10 +9,9 @@ export default () => (
-
+
);
+
+export default GoTo;
diff --git a/packages/examples/src/goTo/output.pdf b/packages/examples/src/goTo/output.pdf
deleted file mode 100644
index d0ba31907..000000000
Binary files a/packages/examples/src/goTo/output.pdf and /dev/null differ
diff --git a/packages/examples/src/index.css b/packages/examples/src/index.css
new file mode 100644
index 000000000..98ebbae39
--- /dev/null
+++ b/packages/examples/src/index.css
@@ -0,0 +1,41 @@
+@font-face {
+ font-family: Cairo;
+ src: url('../public/Cairo-Regular.ttf');
+}
+@font-face {
+ font-family: Rubik;
+ src: url('../public/Rubik-Regular.ttf');
+}
+
+body {
+ margin: 0;
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
+ 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
+ sans-serif;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+}
+
+code {
+ font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
+ monospace;
+}
+
+iframe {
+ width: 100vw;
+ height: 100vh;
+}
+
+.cairo {
+ font-family: Cairo;
+ direction: rtl;
+}
+
+.rubik {
+ font-family: Rubik;
+ /* direction: rtl; */
+}
+
+svg {
+ background-color: white;
+}
diff --git a/packages/examples/src/index.html b/packages/examples/src/index.html
new file mode 100644
index 000000000..512a6ff49
--- /dev/null
+++ b/packages/examples/src/index.html
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+ Vite + React
+
+
+
+
+
+
diff --git a/packages/examples/src/index.js b/packages/examples/src/index.js
deleted file mode 100644
index b7a1b97d1..000000000
--- a/packages/examples/src/index.js
+++ /dev/null
@@ -1,62 +0,0 @@
-import './index.css';
-
-import React, { useState } from 'react';
-import ReactDOM from 'react-dom';
-import { PDFViewer } from '@react-pdf/renderer';
-
-import Svg from './svg';
-import GoTo from './goTo';
-import Text from './text';
-import Knobs from './knobs';
-import Resume from './resume';
-import Fractals from './fractals';
-import PageWrap from './pageWrap';
-
-const MOUNT_ELEMENT = document.getElementById('root');
-
-const EXAMPLES = {
- svg: Svg,
- goTo: GoTo,
- text: Text,
- knobs: Knobs,
- resume: Resume,
- pageWrap: PageWrap,
- fractals: Fractals,
-};
-
-const Viewer = () => {
- const [example, setExample] = useState('pageWrap');
-
- console.log(example);
-
- const handleExampleChange = e => {
- setExample(e.target.dataset.name);
- };
-
- const Document = EXAMPLES[example];
-
- return (
-
-
Examples
-
-
- {Object.keys(EXAMPLES).map(value => (
-
- {value}
-
- ))}
-
-
-
-
-
-
- );
-};
-
-ReactDOM.render( , MOUNT_ELEMENT);
diff --git a/packages/examples/src/index.jsx b/packages/examples/src/index.jsx
new file mode 100644
index 000000000..f0a22de79
--- /dev/null
+++ b/packages/examples/src/index.jsx
@@ -0,0 +1,26 @@
+import React from 'react';
+import { createRoot } from 'react-dom/client';
+
+import { PDFViewer } from '@react-pdf/renderer';
+
+import Document from './pageWrap';
+
+import './index.css';
+
+const DocumentWrapper = () => {
+ return (
+ <>
+
+
+
+ >
+ );
+};
+
+const MOUNT_ELEMENT = document.createElement('div');
+
+document.body.appendChild(MOUNT_ELEMENT);
+
+const root = createRoot(MOUNT_ELEMENT); // createRoot(container!) if you use TypeScript
+
+root.render( );
diff --git a/packages/examples/src/jpgOrientation/images/orientation-1.jpeg b/packages/examples/src/jpgOrientation/images/orientation-1.jpeg
new file mode 100644
index 000000000..015c5f177
Binary files /dev/null and b/packages/examples/src/jpgOrientation/images/orientation-1.jpeg differ
diff --git a/packages/examples/src/jpgOrientation/images/orientation-2.jpeg b/packages/examples/src/jpgOrientation/images/orientation-2.jpeg
new file mode 100644
index 000000000..2e7fb579a
Binary files /dev/null and b/packages/examples/src/jpgOrientation/images/orientation-2.jpeg differ
diff --git a/packages/examples/src/jpgOrientation/images/orientation-3.jpeg b/packages/examples/src/jpgOrientation/images/orientation-3.jpeg
new file mode 100644
index 000000000..74505cfc1
Binary files /dev/null and b/packages/examples/src/jpgOrientation/images/orientation-3.jpeg differ
diff --git a/packages/examples/src/jpgOrientation/images/orientation-4.jpeg b/packages/examples/src/jpgOrientation/images/orientation-4.jpeg
new file mode 100644
index 000000000..ea133fbb0
Binary files /dev/null and b/packages/examples/src/jpgOrientation/images/orientation-4.jpeg differ
diff --git a/packages/examples/src/jpgOrientation/images/orientation-5.jpeg b/packages/examples/src/jpgOrientation/images/orientation-5.jpeg
new file mode 100644
index 000000000..81a8af69b
Binary files /dev/null and b/packages/examples/src/jpgOrientation/images/orientation-5.jpeg differ
diff --git a/packages/examples/src/jpgOrientation/images/orientation-6.jpeg b/packages/examples/src/jpgOrientation/images/orientation-6.jpeg
new file mode 100644
index 000000000..7426aba04
Binary files /dev/null and b/packages/examples/src/jpgOrientation/images/orientation-6.jpeg differ
diff --git a/packages/examples/src/jpgOrientation/images/orientation-7.jpeg b/packages/examples/src/jpgOrientation/images/orientation-7.jpeg
new file mode 100644
index 000000000..a541d95e7
Binary files /dev/null and b/packages/examples/src/jpgOrientation/images/orientation-7.jpeg differ
diff --git a/packages/examples/src/jpgOrientation/images/orientation-8.jpeg b/packages/examples/src/jpgOrientation/images/orientation-8.jpeg
new file mode 100644
index 000000000..3f51d2873
Binary files /dev/null and b/packages/examples/src/jpgOrientation/images/orientation-8.jpeg differ
diff --git a/packages/examples/src/jpgOrientation/index.jsx b/packages/examples/src/jpgOrientation/index.jsx
new file mode 100644
index 000000000..0748c87dd
--- /dev/null
+++ b/packages/examples/src/jpgOrientation/index.jsx
@@ -0,0 +1,30 @@
+import React from 'react';
+import { Document, Page, Image, View } from '@react-pdf/renderer';
+
+import Orientation1 from './images/orientation-1.jpeg';
+import Orientation2 from './images/orientation-2.jpeg';
+import Orientation3 from './images/orientation-3.jpeg';
+import Orientation4 from './images/orientation-4.jpeg';
+import Orientation5 from './images/orientation-5.jpeg';
+import Orientation6 from './images/orientation-6.jpeg';
+import Orientation7 from './images/orientation-7.jpeg';
+import Orientation8 from './images/orientation-8.jpeg';
+
+const Emoji = () => (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+);
+
+export default Emoji;
diff --git a/packages/examples/src/knobs/index.js b/packages/examples/src/knobs/index.jsx
similarity index 92%
rename from packages/examples/src/knobs/index.js
rename to packages/examples/src/knobs/index.jsx
index 75b211105..e9e8120fb 100644
--- a/packages/examples/src/knobs/index.js
+++ b/packages/examples/src/knobs/index.jsx
@@ -39,11 +39,11 @@ const styles = StyleSheet.create({
const Knob = ({ value }) => (
- {value}
+ {value}
);
-const Select = props => (
+const Select = (props) => (
0%
@@ -54,7 +54,7 @@ const Select = props => (
);
-export default () => (
+const Knobs = () => (
@@ -71,3 +71,5 @@ export default () => (
);
+
+export default Knobs;
diff --git a/packages/examples/src/knobs/output.pdf b/packages/examples/src/knobs/output.pdf
deleted file mode 100644
index 85ae3cd87..000000000
Binary files a/packages/examples/src/knobs/output.pdf and /dev/null differ
diff --git a/packages/examples/src/knobs/thumb.png b/packages/examples/src/knobs/thumb.png
deleted file mode 100644
index a32e09b10..000000000
Binary files a/packages/examples/src/knobs/thumb.png and /dev/null differ
diff --git a/packages/examples/src/link/index.jsx b/packages/examples/src/link/index.jsx
new file mode 100644
index 000000000..30eb52346
--- /dev/null
+++ b/packages/examples/src/link/index.jsx
@@ -0,0 +1,27 @@
+import React from 'react';
+import { Document, Page, Link, Text, View } from '@react-pdf/renderer';
+
+const LinkExample = () => (
+
+
+ Some text link
+
+
+ Some stylized text link
+
+
+
+
+ Some stylized text
+ link
+
+
+
+
+
+
+
+
+);
+
+export default LinkExample;
diff --git a/packages/examples/src/mediaQueries/index.js b/packages/examples/src/mediaQueries/index.jsx
similarity index 93%
rename from packages/examples/src/mediaQueries/index.js
rename to packages/examples/src/mediaQueries/index.jsx
index faeae617b..4a99ec6ee 100644
--- a/packages/examples/src/mediaQueries/index.js
+++ b/packages/examples/src/mediaQueries/index.jsx
@@ -28,7 +28,7 @@ const MediaComponent = () => (
);
-export default () => (
+const mediaQueries = () => (
@@ -38,3 +38,5 @@ export default () => (
);
+
+export default mediaQueries;
diff --git a/packages/examples/src/mediaQueries/output.pdf b/packages/examples/src/mediaQueries/output.pdf
deleted file mode 100644
index 357cef8cd..000000000
Binary files a/packages/examples/src/mediaQueries/output.pdf and /dev/null differ
diff --git a/packages/examples/src/mediaQueries/thumb.png b/packages/examples/src/mediaQueries/thumb.png
deleted file mode 100644
index 2b712ae68..000000000
Binary files a/packages/examples/src/mediaQueries/thumb.png and /dev/null differ
diff --git a/packages/examples/src/minPresenceAhead/index.jsx b/packages/examples/src/minPresenceAhead/index.jsx
new file mode 100644
index 000000000..24776e7be
--- /dev/null
+++ b/packages/examples/src/minPresenceAhead/index.jsx
@@ -0,0 +1,46 @@
+import React from 'react';
+import { Document, Page, View, Text } from '@react-pdf/renderer';
+
+const palette = [
+ '#781c81',
+ '#521b80',
+ '#442f8b',
+ '#3f4c9f',
+ '#4069b4',
+ '#4582c1',
+ '#4e96bd',
+ '#5aa6a9',
+ '#68b090',
+ '#7ab878',
+ '#8dbc64',
+ '#a2be56',
+];
+
+const MinPresenceAhead = () => (
+
+
+ {palette.map((color, i) => {
+ const minPresenceAhead = i === 8 ? 82 : 0;
+
+ return (
+
+ Index: {i}
+ MinPresenceAhead: {minPresenceAhead}
+
+ );
+ })}
+
+
+);
+
+export default MinPresenceAhead;
diff --git a/packages/examples/src/multilineText/index.jsx b/packages/examples/src/multilineText/index.jsx
new file mode 100644
index 000000000..0d7267879
--- /dev/null
+++ b/packages/examples/src/multilineText/index.jsx
@@ -0,0 +1,34 @@
+import React from 'react';
+import { Document, Page, View, Text, StyleSheet } from '@react-pdf/renderer';
+
+const styles = StyleSheet.create({
+ body: {
+ margin: 50,
+ },
+ highlight: {
+ backgroundColor: 'tomato',
+ textDecoration: 'line-through underline',
+ },
+});
+
+const Doc = () => (
+
+
+
+
+ Single line text with{' '}
+ inline text highlighted Again
+ Black Text
+
+
+
+ Nested Text with{' '}
+ inline text highlighted in a
+ long, long, long, long, long, long long
+
+
+
+
+);
+
+export default Doc;
diff --git a/packages/examples/src/objectFit/index.jsx b/packages/examples/src/objectFit/index.jsx
new file mode 100644
index 000000000..dbf4de92d
--- /dev/null
+++ b/packages/examples/src/objectFit/index.jsx
@@ -0,0 +1,55 @@
+import React from 'react';
+import {
+ Document,
+ Page,
+ View,
+ Image,
+ Text,
+ StyleSheet,
+} from '@react-pdf/renderer';
+
+const styles = StyleSheet.create({
+ image: {
+ objectFit: 'contain',
+ objectPosition: '0%',
+ width: '100%',
+ height: '100%',
+ },
+ surrounding: {
+ width: '200pt',
+ height: '200pt',
+ border: '1px solid red',
+ backgroundColor: 'tomato',
+ marginBottom: '10',
+ },
+});
+
+const Quixote = () => (
+
+
+
+
+ Object Fit Contain
+
+
+
+ Object Fit: Auto
+
+
+
+ Object Fit: None
+
+
+
+);
+
+export default Quixote;
diff --git a/packages/examples/src/pageWrap/README.md b/packages/examples/src/pageWrap/README.md
deleted file mode 100644
index 74417b5c1..000000000
--- a/packages/examples/src/pageWrap/README.md
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-# react-pdf page wrap example
-
-[Go to live demo](http://react-pdf.diegomura.com/repl?example=page-wrap)
diff --git a/packages/examples/src/pageWrap/index.js b/packages/examples/src/pageWrap/index.jsx
similarity index 93%
rename from packages/examples/src/pageWrap/index.js
rename to packages/examples/src/pageWrap/index.jsx
index ea75690fd..a9cafd370 100644
--- a/packages/examples/src/pageWrap/index.js
+++ b/packages/examples/src/pageWrap/index.jsx
@@ -2,12 +2,20 @@ import React from 'react';
import {
Document,
Font,
- Page,
Text,
+ Page,
Image,
StyleSheet,
} from '@react-pdf/renderer';
+import Quijote1 from '../../public/quijote1.jpg';
+import Quijote2 from '../../public/quijote2.png';
+
+Font.register({
+ family: 'Oswald',
+ src: 'https://fonts.gstatic.com/s/oswald/v13/Y_TKV6o8WovbUd3m_X9aAA.ttf',
+});
+
const styles = StyleSheet.create({
body: {
paddingTop: 35,
@@ -56,33 +64,19 @@ const styles = StyleSheet.create({
},
});
-Font.register({
- family: 'Oswald',
- src: 'https://fonts.gstatic.com/s/oswald/v13/Y_TKV6o8WovbUd3m_X9aAA.ttf',
-});
-
-const Subtitle = ({ children, ...props }) => (
-
- {children}
-
-);
-
-export default () => (
+const Quixote = () => (
-
+
~ Created with react-pdf ~
Don Quijote de la Mancha
Miguel de Cervantes
-
-
+
+
Capítulo I: Que trata de la condición y ejercicio del famoso hidalgo D.
Quijote de la Mancha
-
+
En un lugar de la Mancha, de cuyo nombre no quiero acordarme, no ha
mucho tiempo que vivía un hidalgo de los de lanza en astillero, adarga
@@ -101,7 +95,7 @@ export default () => (
diferencia en los autores que deste caso escriben), aunque por
conjeturas verosímiles se deja entender que se llama Quijana; pero esto
importa poco a nuestro cuento; basta que en la narración dél no se salga
- un punto de la verdad.
+ un punto de la verdad
Es, pues, de saber, que este sobredicho hidalgo, los ratos que estaba
@@ -116,7 +110,10 @@ export default () => (
parecían de perlas; y más cuando llegaba a leer aquellos requiebros y
cartas de desafío, donde en muchas partes hallaba escrito: la razón de
la sinrazón que a mi razón se hace, de tal manera mi razón enflaquece,
- que con razón me quejo.
+ que con razón me quejo de la vuestra fermosura, y también cuando leía:
+ los altos cielos que de vuestra divinidad divinamente con las estrellas
+ se fortifican, y os hacen merecedora del merecimiento que merece la
+ vuestra grandeza.
Con estas y semejantes razones perdía el pobre caballero el juicio, y
@@ -150,14 +147,11 @@ export default () => (
toda aquella máquina de aquellas soñadas invenciones que leía, que para
él no había otra historia más cierta en el mundo.
-
+
Capítulo II: Que trata de la primera salida que de su tierra hizo el
ingenioso Don Quijote
-
-
+
+
Hechas, pues, estas prevenciones, no quiso aguardar más tiempo a poner
en efeto su pensamiento, apretándole a ello la falta que él pensaba que
@@ -180,8 +174,8 @@ export default () => (
hacerse armar caballero del primero que topase, a imitación de otros
muchos que así lo hicieron, según él había leído en los libros que tal
le tenían. En lo de las armas blancas, pensaba limpiarlas de manera, en
- teniendo lugar, que lo fuesen más que un arminio; y con esto se quietó y
- prosiguió su camino, sin llevar otro que aquel que su caballo quería,
+ teniendo lugar, que lo fuesen más que un arminio; y con esto se quietó18
+ y prosiguió su camino, sin llevar otro que aquel que su caballo quería,
creyendo que en aquello consistía la fuerza de las aventuras
@@ -232,16 +226,19 @@ export default () => (
se hallaron cansados y muertos de hambre, y que, mirando a todas partes
por ver si descubriría algún castillo o alguna majada de pastores donde
recogerse y adonde pudiese remediar su mucha hambre y necesidad, vio, no
- lejos del camino por donde iba, una venta, que fue como si viera una
+ lejos del camino por donde iba, una venta,que fue como si viera una
estrella que, no a los portales, sino a los alcázares de su redención le
encaminaba. Diose priesa a caminar, y llegó a ella a tiempo que
anochecía.
+
`${pageNumber} / ${totalPages}`}
- fixed
/>
);
+
+export default Quixote;
diff --git a/packages/examples/src/pageWrap/output.pdf b/packages/examples/src/pageWrap/output.pdf
deleted file mode 100644
index 8a39913f5..000000000
Binary files a/packages/examples/src/pageWrap/output.pdf and /dev/null differ
diff --git a/packages/examples/src/pageWrap/thumb.png b/packages/examples/src/pageWrap/thumb.png
deleted file mode 100644
index 2b712ae68..000000000
Binary files a/packages/examples/src/pageWrap/thumb.png and /dev/null differ
diff --git a/packages/examples/src/resume/Education.js b/packages/examples/src/resume/Education.jsx
similarity index 92%
rename from packages/examples/src/resume/Education.js
rename to packages/examples/src/resume/Education.jsx
index 08bffe3f9..9b64108b5 100644
--- a/packages/examples/src/resume/Education.js
+++ b/packages/examples/src/resume/Education.jsx
@@ -21,7 +21,7 @@ const styles = StyleSheet.create({
},
});
-export default () => (
+const Education = () => (
Education
Jedi Academy
@@ -29,3 +29,5 @@ export default () => (
A long, long time ago
);
+
+export default Education;
diff --git a/packages/examples/src/resume/Experience.js b/packages/examples/src/resume/Experience.jsx
similarity index 94%
rename from packages/examples/src/resume/Experience.js
rename to packages/examples/src/resume/Experience.jsx
index f77649d78..5d2d9112b 100644
--- a/packages/examples/src/resume/Experience.js
+++ b/packages/examples/src/resume/Experience.jsx
@@ -1,5 +1,3 @@
-/* eslint-disable react/no-array-index-key */
-
import React from 'react';
import { Text, View, StyleSheet } from '@react-pdf/renderer';
@@ -23,9 +21,6 @@ const styles = StyleSheet.create({
fontSize: 11,
fontFamily: 'Lato Italic',
},
- detailContainer: {
- flexDirection: 'row',
- },
detailLeftColumn: {
flexDirection: 'column',
marginLeft: 10,
@@ -77,10 +72,8 @@ const ExperienceEntry = ({ company, details, position, date }) => {
- {details.map((detail, i) => (
- -
- {detail}
-
+ {details.map((detail) => (
+ - {detail}
))}
diff --git a/packages/examples/src/resume/Header.js b/packages/examples/src/resume/Header.jsx
similarity index 96%
rename from packages/examples/src/resume/Header.js
rename to packages/examples/src/resume/Header.jsx
index 195e5c615..28b517e06 100644
--- a/packages/examples/src/resume/Header.js
+++ b/packages/examples/src/resume/Header.jsx
@@ -1,5 +1,4 @@
import React from 'react';
-
import { Link, Text, View, StyleSheet } from '@react-pdf/renderer';
const styles = StyleSheet.create({
@@ -40,7 +39,7 @@ const styles = StyleSheet.create({
},
});
-export default () => (
+const Header = () => (
Luke Skywalker
@@ -53,3 +52,5 @@ export default () => (
);
+
+export default Header;
diff --git a/packages/examples/src/resume/List.js b/packages/examples/src/resume/List.jsx
similarity index 100%
rename from packages/examples/src/resume/List.js
rename to packages/examples/src/resume/List.jsx
diff --git a/packages/examples/src/resume/Skills.js b/packages/examples/src/resume/Skills.jsx
similarity index 89%
rename from packages/examples/src/resume/Skills.js
rename to packages/examples/src/resume/Skills.jsx
index 896d9fcc7..134ad5d51 100644
--- a/packages/examples/src/resume/Skills.js
+++ b/packages/examples/src/resume/Skills.jsx
@@ -1,5 +1,3 @@
-/* eslint-disable react/no-array-index-key */
-
import React from 'react';
import { Text, View, StyleSheet } from '@react-pdf/renderer';
@@ -23,8 +21,8 @@ const SkillEntry = ({ name, skills }) => (
{name}
- {skills.map((skill, i) => (
- - {skill}
+ {skills.map((skill) => (
+ - {skill}
))}
diff --git a/packages/examples/src/resume/Title.js b/packages/examples/src/resume/Title.jsx
similarity index 100%
rename from packages/examples/src/resume/Title.js
rename to packages/examples/src/resume/Title.jsx
diff --git a/packages/examples/src/resume/index.js b/packages/examples/src/resume/index.jsx
similarity index 96%
rename from packages/examples/src/resume/index.js
rename to packages/examples/src/resume/index.jsx
index 9173840f3..54614e43a 100644
--- a/packages/examples/src/resume/index.js
+++ b/packages/examples/src/resume/index.jsx
@@ -76,7 +76,7 @@ Font.register({
src: `https://fonts.gstatic.com/s/lato/v16/S6u9w4BMUTPHh6UVSwiPHA.ttf`,
});
-const Resume = props => (
+const Resume = (props) => (
@@ -94,7 +94,7 @@ const Resume = props => (
);
-export default () => (
+const App = () => (
(
);
+
+export default App;
diff --git a/packages/examples/src/resume/output.pdf b/packages/examples/src/resume/output.pdf
deleted file mode 100644
index 7631d55b1..000000000
Binary files a/packages/examples/src/resume/output.pdf and /dev/null differ
diff --git a/packages/examples/src/resume/thumb.png b/packages/examples/src/resume/thumb.png
deleted file mode 100644
index 067f41335..000000000
Binary files a/packages/examples/src/resume/thumb.png and /dev/null differ
diff --git a/packages/examples/src/svg/Heart.js b/packages/examples/src/svg/Heart.jsx
similarity index 61%
rename from packages/examples/src/svg/Heart.js
rename to packages/examples/src/svg/Heart.jsx
index e0bddde35..b0d95e8b1 100644
--- a/packages/examples/src/svg/Heart.js
+++ b/packages/examples/src/svg/Heart.jsx
@@ -3,16 +3,12 @@ import React from 'react';
import { Svg, G, Path } from '@react-pdf/renderer';
const Heart = () => (
-
+
-
+
(
+
+
+
+);
+
+export default Star;
diff --git a/packages/examples/src/svg/Svg1.js b/packages/examples/src/svg/Svg1.jsx
similarity index 100%
rename from packages/examples/src/svg/Svg1.js
rename to packages/examples/src/svg/Svg1.jsx
diff --git a/packages/examples/src/svg/Svg2.js b/packages/examples/src/svg/Svg2.jsx
similarity index 100%
rename from packages/examples/src/svg/Svg2.js
rename to packages/examples/src/svg/Svg2.jsx
diff --git a/packages/examples/src/svg/Svg4.js b/packages/examples/src/svg/Svg4.jsx
similarity index 100%
rename from packages/examples/src/svg/Svg4.js
rename to packages/examples/src/svg/Svg4.jsx
diff --git a/packages/examples/src/svg/index.js b/packages/examples/src/svg/index.js
deleted file mode 100644
index eaa95a3c9..000000000
--- a/packages/examples/src/svg/index.js
+++ /dev/null
@@ -1,72 +0,0 @@
-import React from 'react';
-import ReactPDF, {
- Document,
- Page,
- Font,
- StyleSheet,
-} from '@react-pdf/renderer';
-
-import Svg0 from './svg';
-import Svg1 from './Svg1';
-import Svg2 from './Svg2';
-import Svg4 from './Svg4';
-import Heart from './Heart';
-
-console.log(`React version: ${React.version}`);
-console.log(`React-pdf version: ${ReactPDF.version}`);
-
-Font.registerEmojiSource({
- format: 'png',
- url: 'https://twemoji.maxcdn.com/2/72x72/',
-});
-
-Font.register({
- family: 'Roboto',
- src: '/Roboto-Regular.ttf',
-});
-
-Font.register({
- src: `/Roboto-Bold.ttf`,
- family: 'Roboto',
- fontWeight: 'bold',
-});
-
-Font.register({
- family: 'Noto Sans Tamil',
- src:
- 'https://fonts.gstatic.com/ea/notosanstamil/v3/NotoSansTamil-Regular.ttf',
-});
-
-const styles = StyleSheet.create({
- page: {
- fontSize: 20,
- color: 'black',
- padding: '10',
- },
- image: {
- width: 100,
- borderRadius: 40,
- flexDirection: 'column',
- },
- text: {
- color: '#212121',
- fontFamily: 'Roboto',
- textAlign: 'justify',
- },
-});
-
-const App = () => {
- return (
-
-
-
-
-
-
-
-
-
- );
-};
-
-export default App;
diff --git a/packages/examples/src/svg/index.jsx b/packages/examples/src/svg/index.jsx
new file mode 100644
index 000000000..3ca899955
--- /dev/null
+++ b/packages/examples/src/svg/index.jsx
@@ -0,0 +1,37 @@
+import React from 'react';
+import ReactPDF, { Document, Page, StyleSheet } from '@react-pdf/renderer';
+
+import Svg0 from './svg';
+import Svg1 from './Svg1';
+import Svg2 from './Svg2';
+import Svg4 from './Svg4';
+import Star from './Star';
+import Heart from './Heart';
+
+console.log(`React version: ${React.version}`);
+console.log(`React-pdf version: ${ReactPDF.version}`);
+
+const styles = StyleSheet.create({
+ page: {
+ fontSize: 20,
+ color: 'black',
+ padding: '10',
+ },
+});
+
+const App = () => {
+ return (
+
+
+
+
+
+
+
+
+
+
+ );
+};
+
+export default App;
diff --git a/packages/examples/src/svg/svg.js b/packages/examples/src/svg/svg.jsx
similarity index 100%
rename from packages/examples/src/svg/svg.js
rename to packages/examples/src/svg/svg.jsx
diff --git a/packages/examples/src/svgTransform/index.jsx b/packages/examples/src/svgTransform/index.jsx
new file mode 100644
index 000000000..3dddb8670
--- /dev/null
+++ b/packages/examples/src/svgTransform/index.jsx
@@ -0,0 +1,18 @@
+import React from 'react';
+import { Document, Page, Svg, G, Rect } from '@react-pdf/renderer';
+
+const App = () => {
+ return (
+
+
+
+
+
+
+
+
+
+ );
+};
+
+export default App;
diff --git a/packages/examples/src/text/index.js b/packages/examples/src/text/index.js
deleted file mode 100644
index 9663d2e18..000000000
--- a/packages/examples/src/text/index.js
+++ /dev/null
@@ -1,105 +0,0 @@
-/* eslint-disable jsx-a11y/anchor-is-valid */
-
-import React from 'react';
-import {
- Document,
- Page,
- View,
- Text,
- Link,
- Font,
- StyleSheet,
-} from '@react-pdf/renderer';
-
-const styles = StyleSheet.create({
- title: {
- margin: 20,
- fontSize: 25,
- textAlign: 'center',
- backgroundColor: '#e4e4e4',
- textTransform: 'uppercase',
- fontFamily: 'Oswald',
- },
- body: {
- flexGrow: 1,
- },
- row: {
- flexGrow: 1,
- flexDirection: 'row',
- },
- block: {
- flexGrow: 1,
- },
- text: {
- width: '60%',
- margin: 10,
- fontFamily: 'Oswald',
- textAlign: 'justify',
- },
- fill1: {
- width: '40%',
- backgroundColor: '#e14427',
- },
- fill2: {
- flexGrow: 2,
- backgroundColor: '#e6672d',
- },
- fill3: {
- flexGrow: 2,
- backgroundColor: '#e78632',
- },
- fill4: {
- flexGrow: 2,
- backgroundColor: '#e29e37',
- },
-});
-
-Font.register({
- family: 'Oswald',
- src: 'https://fonts.gstatic.com/s/oswald/v13/Y_TKV6o8WovbUd3m_X9aAA.ttf',
-});
-
-export default () => (
-
-
-
- Lorem Ipsum
-
-
-
-
- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
- eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim
- ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
- aliquip ex ea commodo consequat. Duis aute irure dolor in
- reprehenderit in voluptate velit esse cillum.
-
-
-
-
-
-
- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
- eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim
- ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
- aliquip ex ea commodo consequat. Duis aute irure dolor in
- reprehenderit in voluptate velit esse cillum.
-
-
-
-
- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
- eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim
- ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
- aliquip ex ea commodo consequat. Duis aute irure dolor in
- reprehenderit in voluptate velit esse cillum.
-
-
-
-
-
-
-);
diff --git a/packages/examples/src/text/output.pdf b/packages/examples/src/text/output.pdf
deleted file mode 100644
index 3ed5a3127..000000000
Binary files a/packages/examples/src/text/output.pdf and /dev/null differ
diff --git a/packages/examples/src/text/thumb.png b/packages/examples/src/text/thumb.png
deleted file mode 100644
index 8736ac4ac..000000000
Binary files a/packages/examples/src/text/thumb.png and /dev/null differ
diff --git a/packages/examples/src/transformOrigin/index.jsx b/packages/examples/src/transformOrigin/index.jsx
new file mode 100644
index 000000000..6b3c00217
--- /dev/null
+++ b/packages/examples/src/transformOrigin/index.jsx
@@ -0,0 +1,51 @@
+import React from 'react';
+import { Document, Page, View } from '@react-pdf/renderer';
+
+const Box = ({ origin }) => (
+
+);
+
+const App = () => {
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+};
+
+export default App;
diff --git a/packages/examples/vite.config.js b/packages/examples/vite.config.js
new file mode 100644
index 000000000..2bade817b
--- /dev/null
+++ b/packages/examples/vite.config.js
@@ -0,0 +1,9 @@
+/* eslint-disable import/no-extraneous-dependencies */
+
+import { defineConfig } from 'vite';
+import react from '@vitejs/plugin-react';
+
+// https://vitejs.dev/config/
+export default defineConfig({
+ plugins: [react()],
+});
diff --git a/packages/fns/CHANGELOG.md b/packages/fns/CHANGELOG.md
index 5997ae9a3..e190c7331 100644
--- a/packages/fns/CHANGELOG.md
+++ b/packages/fns/CHANGELOG.md
@@ -1,5 +1,23 @@
# @react-pdf/fns
+## 2.2.1
+
+### Patch Changes
+
+- [#2605](https://github.com/diegomura/react-pdf/pull/2605) [`f7505ed`](https://github.com/diegomura/react-pdf/commit/f7505ed453a1a0ae960d0e5e4a1d155803861b71) Thanks [@wojtekmaj](https://github.com/wojtekmaj)! - fix: fix CJS compatibility
+
+## 2.2.0
+
+### Minor Changes
+
+- [#2600](https://github.com/diegomura/react-pdf/pull/2600) [`8350154`](https://github.com/diegomura/react-pdf/commit/83501541e3a050021e18e112bb472b2dabc142a7) Thanks [@diegomura](https://github.com/diegomura)! - feat: bidi support
+
+## 2.1.0
+
+### Minor Changes
+
+- [#2409](https://github.com/diegomura/react-pdf/pull/2409) [`b6a14fd`](https://github.com/diegomura/react-pdf/commit/b6a14fd160fab26a49f798e5294b0e361e67fe37) Thanks [@wojtekmaj](https://github.com/wojtekmaj)! - Add support for native ESM
+
## 2.0.1
### Patch Changes
diff --git a/packages/fns/README.md b/packages/fns/README.md
index 6e4b12fc7..e4a576744 100644
--- a/packages/fns/README.md
+++ b/packages/fns/README.md
@@ -7,6 +7,7 @@
> React-pdf helper functions
## How to install
+
```sh
yarn add @react-pdf/fns
```
diff --git a/packages/fns/babel.config.js b/packages/fns/babel.config.js
index 27f83582f..02d1cbbdb 100644
--- a/packages/fns/babel.config.js
+++ b/packages/fns/babel.config.js
@@ -1 +1 @@
-module.exports = { extends: '../../babel.config.js' };
+export default { extends: '../../babel.config.js' };
diff --git a/packages/fns/jest.config.js b/packages/fns/jest.config.js
index 1a99b7295..40b1faa8e 100644
--- a/packages/fns/jest.config.js
+++ b/packages/fns/jest.config.js
@@ -1,3 +1,3 @@
-module.exports = {
+export default {
testRegex: 'tests/.*?(test)\\.js$',
};
diff --git a/packages/fns/package.json b/packages/fns/package.json
index 833208fc6..2b733ec7e 100644
--- a/packages/fns/package.json
+++ b/packages/fns/package.json
@@ -1,19 +1,27 @@
{
"name": "@react-pdf/fns",
- "version": "2.0.1",
+ "version": "2.2.1",
"license": "MIT",
"description": "React-pdf helper functions",
"author": "Diego Muracciole ",
"homepage": "https://github.com/diegomura/react-pdf#readme",
- "main": "lib/index.cjs.js",
- "module": "lib/index.es.js",
+ "type": "module",
+ "main": "./lib/index.cjs",
+ "module": "./lib/index.js",
+ "exports": {
+ ".": {
+ "import": "./lib/index.js",
+ "require": "./lib/index.cjs",
+ "default": "./lib/index.js"
+ }
+ },
"repository": {
"type": "git",
"url": "https://github.com/diegomura/react-pdf.git",
"directory": "packages/fns"
},
"scripts": {
- "test": "jest",
+ "test": "vitest",
"build": "rimraf ./lib && rollup -c",
"watch": "rimraf ./lib && rollup -c -w"
},
diff --git a/packages/fns/rollup.config.js b/packages/fns/rollup.config.js
index 2e284f012..d1188600d 100644
--- a/packages/fns/rollup.config.js
+++ b/packages/fns/rollup.config.js
@@ -1,17 +1,17 @@
import babel from '@rollup/plugin-babel';
-import pkg from './package.json';
const cjs = {
exports: 'named',
format: 'cjs',
+ interop: 'compat',
};
const esm = {
format: 'es',
};
-const getCJS = override => Object.assign({}, cjs, override);
-const getESM = override => Object.assign({}, esm, override);
+const getCJS = (override) => Object.assign({}, cjs, override);
+const getESM = (override) => Object.assign({}, esm, override);
const input = 'src/index.js';
@@ -27,10 +27,7 @@ const getPlugins = () => [
const config = {
input,
- output: [
- getESM({ file: 'lib/index.es.js' }),
- getCJS({ file: 'lib/index.cjs.js' }),
- ],
+ output: [getESM({ file: 'lib/index.js' }), getCJS({ file: 'lib/index.cjs' })],
external: getExternal(),
plugins: getPlugins(),
};
diff --git a/packages/fns/src/asyncCompose.js b/packages/fns/src/asyncCompose.js
index d87131239..017d71d7c 100644
--- a/packages/fns/src/asyncCompose.js
+++ b/packages/fns/src/asyncCompose.js
@@ -2,21 +2,31 @@
import reverse from './reverse';
+/**
+ * @typedef {Function} AsyncCompose
+ * @param {any} value
+ * @param {...any} args
+ * @returns {any} result
+ */
+
/**
* Performs right-to-left function composition with async functions support
*
- * @param {...any} functions
+ * @param {...Function} fns functions
+ * @returns {AsyncCompose} composed function
*/
-const asyncCompose = (...fns) => async (value, ...args) => {
- let result = value;
- const reversedFns = reverse(fns);
+const asyncCompose =
+ (...fns) =>
+ async (value, ...args) => {
+ let result = value;
+ const reversedFns = reverse(fns);
- for (let i = 0; i < reversedFns.length; i += 1) {
- const fn = reversedFns[i];
- result = await fn(result, ...args);
- }
+ for (let i = 0; i < reversedFns.length; i += 1) {
+ const fn = reversedFns[i];
+ result = await fn(result, ...args);
+ }
- return result;
-};
+ return result;
+ };
export default asyncCompose;
diff --git a/packages/fns/src/capitalize.js b/packages/fns/src/capitalize.js
index b9b80275b..f440bb248 100644
--- a/packages/fns/src/capitalize.js
+++ b/packages/fns/src/capitalize.js
@@ -1,12 +1,12 @@
/**
* Capitalize first letter of each word
*
- * @param {String} string
- * @returns {String} capitalized string
+ * @param {string} value string
+ * @returns {string} capitalized string
*/
-const capitalize = value => {
+const capitalize = (value) => {
if (!value) return value;
- return value.replace(/(^|\s)\S/g, l => l.toUpperCase());
+ return value.replace(/(^|\s)\S/g, (l) => l.toUpperCase());
};
export default capitalize;
diff --git a/packages/fns/src/castArray.js b/packages/fns/src/castArray.js
index 457126e33..9a405ccfc 100644
--- a/packages/fns/src/castArray.js
+++ b/packages/fns/src/castArray.js
@@ -1,10 +1,11 @@
/**
* Casts value to array
*
- * @param {any} value
- * @returns {Array} casted value
+ * @template T
+ * @param {T|T[]} value value
+ * @returns {T[]} array
*/
-const castArray = value => {
+const castArray = (value) => {
return Array.isArray(value) ? value : [value];
};
diff --git a/packages/fns/src/compose.js b/packages/fns/src/compose.js
index 242957349..b2a801691 100644
--- a/packages/fns/src/compose.js
+++ b/packages/fns/src/compose.js
@@ -2,21 +2,31 @@
import reverse from './reverse';
+/**
+ * @typedef {Function} Compose
+ * @param {any} value
+ * @param {...any} args
+ * @returns {any} result
+ */
+
/**
* Performs right-to-left function composition
*
- * @param {...any} functions
+ * @param {...Function} fns functions
+ * @returns {Compose} composed function
*/
-const compose = (...fns) => (value, ...args) => {
- let result = value;
- const reversedFns = reverse(fns);
+const compose =
+ (...fns) =>
+ (value, ...args) => {
+ let result = value;
+ const reversedFns = reverse(fns);
- for (let i = 0; i < reversedFns.length; i += 1) {
- const fn = reversedFns[i];
- result = fn(result, ...args);
- }
+ for (let i = 0; i < reversedFns.length; i += 1) {
+ const fn = reversedFns[i];
+ result = fn(result, ...args);
+ }
- return result;
-};
+ return result;
+ };
export default compose;
diff --git a/packages/fns/src/dropLast.js b/packages/fns/src/dropLast.js
index eac9c1beb..a0aecc77a 100644
--- a/packages/fns/src/dropLast.js
+++ b/packages/fns/src/dropLast.js
@@ -1,3 +1,3 @@
-const dropLast = array => array.slice(0, array.length - 1);
+const dropLast = (array) => array.slice(0, array.length - 1);
export default dropLast;
diff --git a/packages/fns/src/index.js b/packages/fns/src/index.js
index 717abd1bb..90f295648 100644
--- a/packages/fns/src/index.js
+++ b/packages/fns/src/index.js
@@ -12,5 +12,6 @@ export { default as mapValues } from './mapValues';
export { default as matchPercent } from './matchPercent';
export { default as omit } from './omit';
export { default as pick } from './pick';
+export { default as repeat } from './repeat';
export { default as reverse } from './reverse';
export { default as upperFirst } from './upperFirst';
diff --git a/packages/fns/src/isNil.js b/packages/fns/src/isNil.js
index 6daa90db6..30a79d51f 100644
--- a/packages/fns/src/isNil.js
+++ b/packages/fns/src/isNil.js
@@ -1,3 +1,3 @@
-const isNil = value => value === null || value === undefined;
+const isNil = (value) => value === null || value === undefined;
export default isNil;
diff --git a/packages/fns/src/last.js b/packages/fns/src/last.js
index befe8d1b1..379d20f0d 100644
--- a/packages/fns/src/last.js
+++ b/packages/fns/src/last.js
@@ -1,4 +1,4 @@
-const last = value => {
+const last = (value) => {
return value === '' ? '' : value[value.length - 1];
};
diff --git a/packages/fns/src/matchPercent.js b/packages/fns/src/matchPercent.js
index 23f8913e7..837dfd11d 100644
--- a/packages/fns/src/matchPercent.js
+++ b/packages/fns/src/matchPercent.js
@@ -1,16 +1,20 @@
-const isPercent = value => /((-)?\d+\.?\d*)%/g.exec(value);
+/**
+ * @param {string | number} value
+ * @returns {RegExpExecArray | null} match
+ */
+const isPercent = (value) => /((-)?\d+\.?\d*)%/g.exec(`${value}`);
/**
* Get percentage value of input
*
- * @param {String} value
- * @returns {Object} percent value (if matches)
+ * @param {string | number} value
+ * @returns {{ percent: number, value: number } | null} percent value (if matches)
*/
-const matchPercent = value => {
+const matchPercent = (value) => {
const match = isPercent(value);
if (match) {
- const f = parseFloat(match[1], 10);
+ const f = parseFloat(match[1]);
const percent = f / 100;
return { percent, value: f };
diff --git a/packages/fns/src/omit.js b/packages/fns/src/omit.js
index 82017d15e..0ff2f607f 100644
--- a/packages/fns/src/omit.js
+++ b/packages/fns/src/omit.js
@@ -5,7 +5,7 @@ const omit = (keys, object) => {
const copy = Object.assign({}, object);
- _keys.forEach(key => {
+ _keys.forEach((key) => {
delete copy[key];
});
diff --git a/packages/fns/src/repeat.js b/packages/fns/src/repeat.js
new file mode 100644
index 000000000..a50840c4d
--- /dev/null
+++ b/packages/fns/src/repeat.js
@@ -0,0 +1,9 @@
+const repeat = (list, length = 0) => {
+ const result = new Array(length);
+ for (let i = 0; i < length; i += 1) {
+ result[i] = list;
+ }
+ return result;
+};
+
+export default repeat;
diff --git a/packages/fns/src/reverse.js b/packages/fns/src/reverse.js
index 142c3b2cf..72efc48c7 100644
--- a/packages/fns/src/reverse.js
+++ b/packages/fns/src/reverse.js
@@ -1,3 +1,3 @@
-const reverse = list => Array.prototype.slice.call(list, 0).reverse();
+const reverse = (list) => Array.prototype.slice.call(list, 0).reverse();
export default reverse;
diff --git a/packages/fns/src/upperFirst.js b/packages/fns/src/upperFirst.js
index 04a01d443..43fc775cc 100644
--- a/packages/fns/src/upperFirst.js
+++ b/packages/fns/src/upperFirst.js
@@ -1,10 +1,10 @@
/**
* Capitalize first letter of string
*
- * @param {String} string
- * @returns {String} capitalized string
+ * @param {string} value string
+ * @returns {string} capitalized string
*/
-const upperFirst = value => {
+const upperFirst = (value) => {
if (!value) return value;
return value.charAt(0).toUpperCase() + value.slice(1);
};
diff --git a/packages/fns/tests/adjust.test.js b/packages/fns/tests/adjust.test.js
index 6116b3a77..7cb9f3933 100644
--- a/packages/fns/tests/adjust.test.js
+++ b/packages/fns/tests/adjust.test.js
@@ -1,6 +1,8 @@
+import { describe, expect, test } from 'vitest';
+
import adjust from '../src/adjust';
-const add = v => v + 1;
+const add = (v) => v + 1;
describe('adjust', () => {
test('applies the given function to the value at the given index of the supplied array', () => {
diff --git a/packages/fns/tests/capitalize.test.js b/packages/fns/tests/capitalize.test.js
index e254a8bfe..d2a2b618d 100644
--- a/packages/fns/tests/capitalize.test.js
+++ b/packages/fns/tests/capitalize.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import capitalize from '../src/capitalize';
describe('capitalize', () => {
diff --git a/packages/fns/tests/castArray.test.js b/packages/fns/tests/castArray.test.js
index 1fe5d8625..fdb467c53 100644
--- a/packages/fns/tests/castArray.test.js
+++ b/packages/fns/tests/castArray.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import castArray from '../src/castArray';
describe('castArray', () => {
diff --git a/packages/fns/tests/compose.test.js b/packages/fns/tests/compose.test.js
index 0c178dd60..af0ae4a9f 100644
--- a/packages/fns/tests/compose.test.js
+++ b/packages/fns/tests/compose.test.js
@@ -1,9 +1,11 @@
+import { describe, expect, test } from 'vitest';
+
import compose from '../src/compose';
describe('compose', () => {
test('performs right-to-left function composition', () => {
- const multiply = a => b => a * b;
- const map = fn => collection => collection.map(fn);
+ const multiply = (a) => (b) => a * b;
+ const map = (fn) => (collection) => collection.map(fn);
const f = compose(map, multiply, parseInt);
expect(f('10')([1, 2, 3])).toEqual([10, 20, 30]);
diff --git a/packages/fns/tests/dropLast.test.js b/packages/fns/tests/dropLast.test.js
index 44628b7ce..bd17be5e5 100644
--- a/packages/fns/tests/dropLast.test.js
+++ b/packages/fns/tests/dropLast.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import dropLast from '../src/dropLast';
describe('dropLast', () => {
diff --git a/packages/fns/tests/evolve.test.js b/packages/fns/tests/evolve.test.js
index 2ea89af66..1f2659c13 100644
--- a/packages/fns/tests/evolve.test.js
+++ b/packages/fns/tests/evolve.test.js
@@ -1,6 +1,8 @@
+import { describe, expect, test } from 'vitest';
+
import evolve from '../src/evolve';
-const add = a => b => a + b;
+const add = (a) => (b) => a + b;
describe('evolve', () => {
test('creates a new object by evolving the `object` according to the `transformation` functions', () => {
diff --git a/packages/fns/tests/get.test.js b/packages/fns/tests/get.test.js
index 32321f414..c6ae06bcb 100644
--- a/packages/fns/tests/get.test.js
+++ b/packages/fns/tests/get.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import get from '../src/get';
describe('get', () => {
diff --git a/packages/fns/tests/isNil.test.js b/packages/fns/tests/isNil.test.js
index 2655d6e02..a3d29d07b 100644
--- a/packages/fns/tests/isNil.test.js
+++ b/packages/fns/tests/isNil.test.js
@@ -1,4 +1,5 @@
/* eslint-disable no-void */
+import { describe, expect, test } from 'vitest';
import isNil from '../src/isNil';
diff --git a/packages/fns/tests/last.test.js b/packages/fns/tests/last.test.js
index d9a70f76c..684ceecef 100644
--- a/packages/fns/tests/last.test.js
+++ b/packages/fns/tests/last.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import last from '../src/last';
describe('last', () => {
diff --git a/packages/fns/tests/matchPercent.test.js b/packages/fns/tests/matchPercent.test.js
index faeacdeb7..4b741af3b 100644
--- a/packages/fns/tests/matchPercent.test.js
+++ b/packages/fns/tests/matchPercent.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import matchPercent from '../src/matchPercent';
describe('match percent', () => {
diff --git a/packages/fns/tests/omit.test.js b/packages/fns/tests/omit.test.js
index caf1a4083..80817de0e 100644
--- a/packages/fns/tests/omit.test.js
+++ b/packages/fns/tests/omit.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import omit from '../src/omit';
describe('omit', () => {
diff --git a/packages/fns/tests/pick.test.js b/packages/fns/tests/pick.test.js
index 7d2cb36ec..8edf820b9 100644
--- a/packages/fns/tests/pick.test.js
+++ b/packages/fns/tests/pick.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import pick from '../src/pick';
describe('pick', () => {
diff --git a/packages/fns/tests/repeat.test.js b/packages/fns/tests/repeat.test.js
new file mode 100644
index 000000000..ecb004267
--- /dev/null
+++ b/packages/fns/tests/repeat.test.js
@@ -0,0 +1,17 @@
+import { describe, expect, test } from 'vitest';
+
+import repeat from '../src/repeat';
+
+describe('repeat', () => {
+ test('should repeat property times', () => {
+ expect(repeat('a', 5)).toEqual(['a', 'a', 'a', 'a', 'a']);
+ expect(repeat('b', 0)).toEqual([]);
+ expect(repeat('Lorem', 1)).toEqual(['Lorem']);
+ expect(repeat('Ipsum', 2)).toEqual(['Ipsum', 'Ipsum']);
+ expect(repeat(undefined, 3)).toEqual([undefined, undefined, undefined]);
+ });
+
+ test('should not repeat property', () => {
+ expect(repeat('Lorem')).toEqual([]);
+ });
+});
diff --git a/packages/fns/tests/reverse.test.js b/packages/fns/tests/reverse.test.js
index f34b5eb71..bc7615589 100644
--- a/packages/fns/tests/reverse.test.js
+++ b/packages/fns/tests/reverse.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import reverse from '../src/reverse';
describe('reverse', () => {
diff --git a/packages/fns/tests/upperFirst.test.js b/packages/fns/tests/upperFirst.test.js
index 8be14cfb8..d15c6103f 100644
--- a/packages/fns/tests/upperFirst.test.js
+++ b/packages/fns/tests/upperFirst.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import upperFirst from '../src/upperFirst';
describe('upperFirst', () => {
diff --git a/packages/font/CHANGELOG.md b/packages/font/CHANGELOG.md
index fa63deef6..387304b4c 100644
--- a/packages/font/CHANGELOG.md
+++ b/packages/font/CHANGELOG.md
@@ -1,5 +1,47 @@
# @react-pdf/font
+## 2.4.4
+
+### Patch Changes
+
+- [#2605](https://github.com/diegomura/react-pdf/pull/2605) [`f7505ed`](https://github.com/diegomura/react-pdf/commit/f7505ed453a1a0ae960d0e5e4a1d155803861b71) Thanks [@wojtekmaj](https://github.com/wojtekmaj)! - fix: fix CJS compatibility
+
+## 2.4.3
+
+### Patch Changes
+
+- Updated dependencies [[`9af07fe`](https://github.com/diegomura/react-pdf/commit/9af07feb59c2fe9c1d8960ac95f6fa6e03d16235)]:
+ - @react-pdf/types@2.4.1
+
+## 2.4.2
+
+### Patch Changes
+
+- Updated dependencies [[`fb5273d`](https://github.com/diegomura/react-pdf/commit/fb5273d8d80d919f7b9c214e02d67b79ce23fa19)]:
+ - @react-pdf/types@2.4.0
+
+## 2.4.1
+
+### Patch Changes
+
+- Updated dependencies [[`9e5842b`](https://github.com/diegomura/react-pdf/commit/9e5842bbecca6e249af2c5fc50078bb7ddd5420f)]:
+ - @react-pdf/types@2.3.6
+
+## 2.4.0
+
+### Minor Changes
+
+- [#2409](https://github.com/diegomura/react-pdf/pull/2409) [`b6a14fd`](https://github.com/diegomura/react-pdf/commit/b6a14fd160fab26a49f798e5294b0e361e67fe37) Thanks [@wojtekmaj](https://github.com/wojtekmaj)! - Add support for native ESM
+
+## 2.3.8
+
+### Patch Changes
+
+- [#2467](https://github.com/diegomura/react-pdf/pull/2467) [`1f987cc`](https://github.com/diegomura/react-pdf/commit/1f987cc27c3fd1ef1b6748ebe58a289a78b538d2) Thanks [@JaeSeoKim](https://github.com/JaeSeoKim)! - feat: add withVariationSelectors option to registerEmojiSource [#2466](https://github.com/diegomura/react-pdf/issues/2466)
+
+- Updated dependencies [[`e5c8fde`](https://github.com/diegomura/react-pdf/commit/e5c8fde9379a9a85ecac7e3d6273953e39d65f8d), [`1f987cc`](https://github.com/diegomura/react-pdf/commit/1f987cc27c3fd1ef1b6748ebe58a289a78b538d2), [`4c40b14`](https://github.com/diegomura/react-pdf/commit/4c40b149cfed42f2513e1dd330a92ccc3363c04f)]:
+ - @react-pdf/types@2.3.5
+
## 2.3.7
### Patch Changes
diff --git a/packages/font/babel.config.js b/packages/font/babel.config.js
index 27f83582f..02d1cbbdb 100644
--- a/packages/font/babel.config.js
+++ b/packages/font/babel.config.js
@@ -1 +1 @@
-module.exports = { extends: '../../babel.config.js' };
+export default { extends: '../../babel.config.js' };
diff --git a/packages/font/package.json b/packages/font/package.json
index 5be30e215..692c85559 100644
--- a/packages/font/package.json
+++ b/packages/font/package.json
@@ -1,6 +1,6 @@
{
"name": "@react-pdf/font",
- "version": "2.3.7",
+ "version": "2.4.4",
"license": "MIT",
"description": "Register font and emoji source for react-pdf document",
"author": "Diego Muracciole ",
@@ -10,20 +10,28 @@
"url": "https://github.com/diegomura/react-pdf.git",
"directory": "packages/font"
},
- "main": "./lib/index.cjs.js",
- "module": "./lib/index.es.js",
+ "type": "module",
+ "main": "./lib/index.cjs",
+ "module": "./lib/index.js",
"browser": {
- "./lib/index.es.js": "./lib/index.browser.es.js",
- "./lib/index.cjs.js": "./lib/index.browser.cjs.js"
+ "./lib/index.js": "./lib/index.browser.js",
+ "./lib/index.cjs": "./lib/index.browser.cjs"
+ },
+ "exports": {
+ ".": {
+ "import": "./lib/index.js",
+ "require": "./lib/index.cjs",
+ "default": "./lib/index.js"
+ }
},
"scripts": {
- "test": "jest",
+ "test": "vitest",
"build": "rimraf ./lib && rollup -c",
"watch": "rimraf ./lib && rollup -c -w"
},
"dependencies": {
"@babel/runtime": "^7.20.13",
- "@react-pdf/types": "^2.3.4",
+ "@react-pdf/types": "^2.4.1",
"cross-fetch": "^3.1.5",
"fontkit": "^2.0.2",
"is-url": "^1.2.4"
diff --git a/packages/font/rollup.config.js b/packages/font/rollup.config.js
index 060df2223..8383cd4a8 100644
--- a/packages/font/rollup.config.js
+++ b/packages/font/rollup.config.js
@@ -1,18 +1,19 @@
import babel from '@rollup/plugin-babel';
import replace from '@rollup/plugin-replace';
-import pkg from './package.json';
+import pkg from './package.json' assert { type: 'json' };
const cjs = {
- format: 'cjs',
exports: 'named',
+ format: 'cjs',
+ interop: 'compat',
};
const esm = {
format: 'es',
};
-const getCJS = override => Object.assign({}, cjs, override);
-const getESM = override => Object.assign({}, esm, override);
+const getCJS = (override) => Object.assign({}, cjs, override);
+const getESM = (override) => Object.assign({}, esm, override);
const babelConfig = () => ({
babelrc: true,
@@ -34,10 +35,7 @@ const getPlugins = ({ browser }) => [
const serverConfig = {
input: './src/index.js',
- output: [
- getESM({ file: 'lib/index.es.js' }),
- getCJS({ file: 'lib/index.cjs.js' }),
- ],
+ output: [getESM({ file: 'lib/index.js' }), getCJS({ file: 'lib/index.cjs' })],
external,
plugins: getPlugins({ browser: false }),
};
@@ -45,8 +43,8 @@ const serverConfig = {
const browserConfig = {
input: './src/index.js',
output: [
- getESM({ file: 'lib/index.browser.es.js' }),
- getCJS({ file: 'lib/index.browser.cjs.js' }),
+ getESM({ file: 'lib/index.browser.js' }),
+ getCJS({ file: 'lib/index.browser.cjs' }),
],
external,
plugins: getPlugins({ browser: true }),
diff --git a/packages/font/setupTests.js b/packages/font/setupTests.js
index 3bce79853..b4dfeb127 100644
--- a/packages/font/setupTests.js
+++ b/packages/font/setupTests.js
@@ -1,10 +1,12 @@
/* eslint-disable */
+import { vi } from 'vitest';
+import createFetchMock from 'vitest-fetch-mock';
+
import '../../polyfills';
-global.BROWSER = false;
+const fetchMocker = createFetchMock(vi);
+fetchMocker.enableMocks();
-const customGlobal = global;
-customGlobal.fetch = require('jest-fetch-mock');
-customGlobal.fetchMock = customGlobal.fetch;
+global.BROWSER = false;
-jest.setMock('cross-fetch', fetch);
+vi.mock('cross-fetch', () => ({ default: global.fetch }));
diff --git a/packages/font/src/font.js b/packages/font/src/font.js
index ff5dd14ae..8b998206f 100644
--- a/packages/font/src/font.js
+++ b/packages/font/src/font.js
@@ -28,7 +28,7 @@ const fetchFont = async (src, options) => {
return new Uint8Array(data);
};
-const isDataUrl = dataUrl => {
+const isDataUrl = (dataUrl) => {
const header = dataUrl.split(',')[0];
const hasDataPrefix = header.substring(0, 5) === 'data:';
const hasBase64Prefix = header.split(';')[1] === 'base64';
@@ -36,7 +36,7 @@ const isDataUrl = dataUrl => {
return hasDataPrefix && hasBase64Prefix;
};
-const resolveFontWeight = value => {
+const resolveFontWeight = (value) => {
return typeof value === 'string' ? FONT_WEIGHTS[value] : value;
};
@@ -62,7 +62,7 @@ class FontSource {
const uint8Array = new Uint8Array(
atob(raw)
.split('')
- .map(c => c.charCodeAt(0)),
+ .map((c) => c.charCodeAt(0)),
);
this.data = fontkit.create(uint8Array, postscriptName);
} else if (BROWSER || isUrl(this.src)) {
@@ -102,30 +102,30 @@ class Font {
resolve(descriptor) {
const { fontWeight = 400, fontStyle = 'normal' } = descriptor;
- const styleSources = this.sources.filter(s => s.fontStyle === fontStyle);
+ const styleSources = this.sources.filter((s) => s.fontStyle === fontStyle);
// Weight resolution. https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight#Fallback_weights
- const exactFit = styleSources.find(s => s.fontWeight === fontWeight);
+ const exactFit = styleSources.find((s) => s.fontWeight === fontWeight);
if (exactFit) return exactFit;
let res;
if (fontWeight >= 400 && fontWeight <= 500) {
- const leftOffset = styleSources.filter(s => s.fontWeight <= fontWeight);
- const rightOffset = styleSources.filter(s => s.fontWeight > 500);
+ const leftOffset = styleSources.filter((s) => s.fontWeight <= fontWeight);
+ const rightOffset = styleSources.filter((s) => s.fontWeight > 500);
const fit = styleSources.filter(
- s => s.fontWeight >= fontWeight && s.fontWeight < 500,
+ (s) => s.fontWeight >= fontWeight && s.fontWeight < 500,
);
res = fit[0] || leftOffset[leftOffset.length - 1] || rightOffset[0];
}
const lt = styleSources
- .filter(s => s.fontWeight < fontWeight)
+ .filter((s) => s.fontWeight < fontWeight)
.sort(sortByFontWeight);
const gt = styleSources
- .filter(s => s.fontWeight > fontWeight)
+ .filter((s) => s.fontWeight > fontWeight)
.sort(sortByFontWeight);
if (fontWeight < 400) {
diff --git a/packages/font/src/index.js b/packages/font/src/index.js
index 240d71941..a7dccf92c 100644
--- a/packages/font/src/index.js
+++ b/packages/font/src/index.js
@@ -8,7 +8,7 @@ function FontStore() {
let hyphenationCallback = null;
- this.register = data => {
+ this.register = (data) => {
const { family } = data;
if (!fonts[family]) {
@@ -25,15 +25,20 @@ function FontStore() {
}
};
- this.registerEmojiSource = ({ url, format = 'png', builder }) => {
- emojiSource = { url, format, builder };
+ this.registerEmojiSource = ({
+ url,
+ format = 'png',
+ builder,
+ withVariationSelectors = false,
+ }) => {
+ emojiSource = { url, format, builder, withVariationSelectors };
};
- this.registerHyphenationCallback = callback => {
+ this.registerHyphenationCallback = (callback) => {
hyphenationCallback = callback;
};
- this.getFont = descriptor => {
+ this.getFont = (descriptor) => {
const { fontFamily } = descriptor;
const isStandard = standard.includes(fontFamily);
@@ -48,7 +53,7 @@ function FontStore() {
return fonts[fontFamily].resolve(descriptor);
};
- this.load = async descriptor => {
+ this.load = async (descriptor) => {
const { fontFamily } = descriptor;
const isStandard = standard.includes(fontFamily);
diff --git a/packages/image/CHANGELOG.md b/packages/image/CHANGELOG.md
index ac5dc8fdb..809ba1d84 100644
--- a/packages/image/CHANGELOG.md
+++ b/packages/image/CHANGELOG.md
@@ -1,5 +1,51 @@
# @react-pdf/image
+## 2.3.4
+
+### Patch Changes
+
+- [#2605](https://github.com/diegomura/react-pdf/pull/2605) [`f7505ed`](https://github.com/diegomura/react-pdf/commit/f7505ed453a1a0ae960d0e5e4a1d155803861b71) Thanks [@wojtekmaj](https://github.com/wojtekmaj)! - fix: fix CJS compatibility
+
+- Updated dependencies [[`f7505ed`](https://github.com/diegomura/react-pdf/commit/f7505ed453a1a0ae960d0e5e4a1d155803861b71)]:
+ - @react-pdf/png-js@2.3.1
+
+## 2.3.3
+
+### Patch Changes
+
+- [#2573](https://github.com/diegomura/react-pdf/pull/2573) [`9af07fe`](https://github.com/diegomura/react-pdf/commit/9af07feb59c2fe9c1d8960ac95f6fa6e03d16235) Thanks [@davbrito](https://github.com/davbrito)! - feat: add support for resolving blob images
+
+- [#2600](https://github.com/diegomura/react-pdf/pull/2600) [`8350154`](https://github.com/diegomura/react-pdf/commit/83501541e3a050021e18e112bb472b2dabc142a7) Thanks [@diegomura](https://github.com/diegomura)! - feat: bidi support
+
+## 2.3.2
+
+### Patch Changes
+
+- [`0590324`](https://github.com/diegomura/react-pdf/commit/0590324d7a6d75c0a49520b3f99cfb6594239390) Thanks [@diegomura](https://github.com/diegomura)! - fix: replace jpeg-exif with jay-peg
+
+## 2.3.1
+
+### Patch Changes
+
+- [#2529](https://github.com/diegomura/react-pdf/pull/2529) [`a35b1ba`](https://github.com/diegomura/react-pdf/commit/a35b1ba18d293df51293600d8d56015094d222d8) Thanks [@diegomura](https://github.com/diegomura)! - fix: jpeg exif orientation rendering
+
+## 2.3.0
+
+### Minor Changes
+
+- [#2409](https://github.com/diegomura/react-pdf/pull/2409) [`b6a14fd`](https://github.com/diegomura/react-pdf/commit/b6a14fd160fab26a49f798e5294b0e361e67fe37) Thanks [@wojtekmaj](https://github.com/wojtekmaj)! - Add support for native ESM
+
+### Patch Changes
+
+- Updated dependencies [[`b6a14fd`](https://github.com/diegomura/react-pdf/commit/b6a14fd160fab26a49f798e5294b0e361e67fe37)]:
+ - @react-pdf/png-js@2.3.0
+
+## 2.2.3
+
+### Patch Changes
+
+- [#2479](https://github.com/diegomura/react-pdf/pull/2479) [`45b2bd3`](https://github.com/diegomura/react-pdf/commit/45b2bd37037c605727ad5783f2f2a438dc19cac4) Thanks [@diegomura](https://github.com/diegomura)! - fix linting
+
## 2.2.2
### Patch Changes
diff --git a/packages/image/babel.config.js b/packages/image/babel.config.js
index 27f83582f..02d1cbbdb 100644
--- a/packages/image/babel.config.js
+++ b/packages/image/babel.config.js
@@ -1 +1 @@
-module.exports = { extends: '../../babel.config.js' };
+export default { extends: '../../babel.config.js' };
diff --git a/packages/image/jest.config.js b/packages/image/jest.config.js
deleted file mode 100644
index 62c218029..000000000
--- a/packages/image/jest.config.js
+++ /dev/null
@@ -1,5 +0,0 @@
-module.exports = {
- automock: false,
- testRegex: 'tests/.*?(test)\\.js$',
- setupFiles: ['setupTests.js'],
-};
diff --git a/packages/image/package.json b/packages/image/package.json
index b9d8ddad6..d3158dd0b 100644
--- a/packages/image/package.json
+++ b/packages/image/package.json
@@ -1,15 +1,23 @@
{
"name": "@react-pdf/image",
- "version": "2.2.2",
+ "version": "2.3.4",
"license": "MIT",
"description": "Parses the images in png or jpeg format for react-pdf document",
"author": "Diego Muracciole ",
"homepage": "https://github.com/diegomura/react-pdf#readme",
- "main": "./lib/index.cjs.js",
- "module": "./lib/index.es.js",
+ "type": "module",
+ "main": "./lib/index.cjs",
+ "module": "./lib/index.js",
"browser": {
- "./lib/index.cjs.js": "./lib/index.browser.cjs.js",
- "./lib/index.es.js": "./lib/index.browser.es.js"
+ "./lib/index.cjs": "./lib/index.browser.cjs",
+ "./lib/index.js": "./lib/index.browser.js"
+ },
+ "exports": {
+ ".": {
+ "import": "./lib/index.js",
+ "require": "./lib/index.cjs",
+ "default": "./lib/index.js"
+ }
},
"repository": {
"type": "git",
@@ -17,17 +25,15 @@
"directory": "packages/image"
},
"scripts": {
- "test": "jest",
+ "test": "vitest",
"build": "rimraf ./lib && rollup -c",
"watch": "rimraf ./lib && rollup -c -w"
},
"dependencies": {
"@babel/runtime": "^7.20.13",
- "@react-pdf/png-js": "^2.2.0",
- "cross-fetch": "^3.1.5"
- },
- "devDependencies": {
- "jest-fetch-mock": "^2.1.1"
+ "@react-pdf/png-js": "^2.3.1",
+ "cross-fetch": "^3.1.5",
+ "jay-peg": "^1.0.1"
},
"files": [
"lib"
diff --git a/packages/image/rollup.config.js b/packages/image/rollup.config.js
index 571a97c9c..878073a54 100644
--- a/packages/image/rollup.config.js
+++ b/packages/image/rollup.config.js
@@ -1,20 +1,22 @@
import babel from '@rollup/plugin-babel';
import replace from '@rollup/plugin-replace';
import ignore from 'rollup-plugin-ignore';
-import pkg from './package.json';
import nodePolyfills from 'rollup-plugin-polyfill-node';
+import pkg from './package.json' assert { type: 'json' };
+
const cjs = {
- format: 'cjs',
exports: 'named',
+ format: 'cjs',
+ interop: 'compat',
};
const esm = {
format: 'es',
};
-const getCJS = override => Object.assign({}, cjs, override);
-const getESM = override => Object.assign({}, esm, override);
+const getCJS = (override) => Object.assign({}, cjs, override);
+const getESM = (override) => Object.assign({}, esm, override);
const input = './src/index.js';
@@ -48,10 +50,7 @@ const getPlugins = ({ browser }) => [
const serverConfig = {
input,
- output: [
- getESM({ file: 'lib/index.es.js' }),
- getCJS({ file: 'lib/index.cjs.js' }),
- ],
+ output: [getESM({ file: 'lib/index.js' }), getCJS({ file: 'lib/index.cjs' })],
external: getExternal({ browser: false }),
plugins: getPlugins({ browser: false }),
};
@@ -59,8 +58,8 @@ const serverConfig = {
const browserConfig = {
input,
output: [
- getESM({ file: 'lib/index.browser.es.js' }),
- getCJS({ file: 'lib/index.browser.cjs.js' }),
+ getESM({ file: 'lib/index.browser.js' }),
+ getCJS({ file: 'lib/index.browser.cjs' }),
],
external: getExternal({ browser: true }),
plugins: getPlugins({ browser: true }),
diff --git a/packages/image/setupTests.js b/packages/image/setupTests.js
deleted file mode 100644
index b3d953429..000000000
--- a/packages/image/setupTests.js
+++ /dev/null
@@ -1,9 +0,0 @@
-/* eslint-disable import/no-extraneous-dependencies */
-
-const customGlobal = global;
-customGlobal.fetch = require('jest-fetch-mock');
-
-customGlobal.fetchMock = customGlobal.fetch;
-global.BROWSER = false;
-
-jest.setMock('cross-fetch', fetch);
diff --git a/packages/image/src/cache.js b/packages/image/src/cache.js
index aa25301ed..f083244d9 100644
--- a/packages/image/src/cache.js
+++ b/packages/image/src/cache.js
@@ -3,7 +3,7 @@ const createCache = ({ limit = 100 } = {}) => {
let keys = [];
return {
- get: key => cache[key],
+ get: (key) => cache[key],
set: (key, value) => {
keys.push(key);
if (keys.length > limit) {
diff --git a/packages/image/src/jpeg.js b/packages/image/src/jpeg.js
index e255807b6..9aba41118 100644
--- a/packages/image/src/jpeg.js
+++ b/packages/image/src/jpeg.js
@@ -1,22 +1,4 @@
-// Extracted from https://github.com/devongovett/pdfkit/blob/master/lib/image/jpeg.coffee
-
-const MARKERS = [
- 0xffc0,
- 0xffc1,
- 0xffc2,
- 0xffc3,
- 0xffc5,
- 0xffc6,
- 0xffc7,
- 0xffc8,
- 0xffc9,
- 0xffca,
- 0xffcb,
- 0xffcc,
- 0xffcd,
- 0xffce,
- 0xffcf,
-];
+import _JPEG from 'jay-peg';
class JPEG {
data = null;
@@ -32,52 +14,29 @@ class JPEG {
throw new Error('SOI not found in JPEG');
}
- let marker;
- let pos = 2;
+ const markers = _JPEG.decode(this.data);
+
+ for (let i = 0; i < markers.length; i += 1) {
+ const marker = markers[i];
- while (pos < data.length) {
- marker = data.readUInt16BE(pos);
- pos += 2;
- if (MARKERS.includes(marker)) {
- break;
+ if (marker.name === 'EXIF' && marker.entries.orientation) {
+ this.orientation = marker.entries.orientation;
}
- pos += data.readUInt16BE(pos);
- }
- if (!MARKERS.includes(marker)) {
- throw new Error('Invalid JPEG.');
+ if (marker.name === 'SOF') {
+ this.width ||= marker.width;
+ this.height ||= marker.height;
+ }
}
- pos += 3;
- this.height = data.readUInt16BE(pos);
-
- pos += 2;
- this.width = data.readUInt16BE(pos);
- }
-}
-
-JPEG.isValid = data => {
- if (!data || !Buffer.isBuffer(data) || data.readUInt16BE(0) !== 0xffd8) {
- return false;
- }
-
- let marker;
- let pos = 2;
-
- while (pos < data.length) {
- marker = data.readUInt16BE(pos);
- pos += 2;
- if (MARKERS.includes(marker)) {
- break;
+ if (this.orientation > 4) {
+ [this.width, this.height] = [this.height, this.width];
}
- pos += data.readUInt16BE(pos);
- }
-
- if (!MARKERS.includes(marker)) {
- return false;
}
+}
- return true;
+JPEG.isValid = (data) => {
+ return data && Buffer.isBuffer(data) && data.readUInt16BE(0) === 0xffd8;
};
export default JPEG;
diff --git a/packages/image/src/png.js b/packages/image/src/png.js
index b37bf6d8d..367d88c4c 100644
--- a/packages/image/src/png.js
+++ b/packages/image/src/png.js
@@ -1,6 +1,6 @@
import PNG from '@react-pdf/png-js';
-PNG.isValid = function(data) {
+PNG.isValid = function isValid(data) {
try {
return !!new PNG(data);
} catch (e) {
diff --git a/packages/image/src/resolve.js b/packages/image/src/resolve.js
index 6bee8270b..c5d272ff0 100644
--- a/packages/image/src/resolve.js
+++ b/packages/image/src/resolve.js
@@ -9,14 +9,19 @@ import createCache from './cache';
export const IMAGE_CACHE = createCache({ limit: 30 });
-const getAbsoluteLocalPath = src => {
+const getAbsoluteLocalPath = (src) => {
if (BROWSER) {
throw new Error('Cannot check local paths in client-side environment');
}
- const { protocol, auth, host, port, hostname, path: pathname } = url.parse(
- src,
- );
+ const {
+ protocol,
+ auth,
+ host,
+ port,
+ hostname,
+ path: pathname,
+ } = url.parse(src);
const absolutePath = path.resolve(pathname);
if ((protocol && protocol !== 'file:') || auth || host || port || hostname) {
return undefined;
@@ -24,7 +29,7 @@ const getAbsoluteLocalPath = src => {
return absolutePath;
};
-const fetchLocalFile = src =>
+const fetchLocalFile = (src) =>
new Promise((resolve, reject) => {
try {
if (BROWSER) {
@@ -54,12 +59,12 @@ const fetchRemoteFile = async (uri, options) => {
return buffer.constructor.name === 'Buffer' ? buffer : Buffer.from(buffer);
};
-const isValidFormat = format => {
+const isValidFormat = (format) => {
const lower = format.toLowerCase();
return lower === 'jpg' || lower === 'jpeg' || lower === 'png';
};
-const guessFormat = buffer => {
+const guessFormat = (buffer) => {
let format;
if (JPEG.isValid(buffer)) {
@@ -95,30 +100,53 @@ const resolveBase64Image = ({ uri }) => {
throw new Error(`Base64 image invalid format: ${format}`);
}
- return new Promise(resolve => {
+ return new Promise((resolve) => {
return resolve(getImage(Buffer.from(data, 'base64'), format));
});
};
-const resolveImageFromData = src => {
+const resolveImageFromData = (src) => {
if (src.data && src.format) {
- return new Promise(resolve => resolve(getImage(src.data, src.format)));
+ return new Promise((resolve) => resolve(getImage(src.data, src.format)));
}
throw new Error(`Invalid data given for local file: ${JSON.stringify(src)}`);
};
-const resolveBufferImage = buffer => {
+const resolveBufferImage = (buffer) => {
const format = guessFormat(buffer);
if (format) {
- return new Promise(resolve => resolve(getImage(buffer, format)));
+ return new Promise((resolve) => resolve(getImage(buffer, format)));
}
return Promise.resolve();
};
-const getImageFormat = body => {
+const resolveBlobImage = async (blob) => {
+ const { type } = blob;
+ if (!type || type === 'application/octet-stream') {
+ const arrayBuffer = await blob.arrayBuffer();
+ const buffer = Buffer.from(arrayBuffer);
+ return resolveBufferImage(buffer);
+ }
+
+ if (!type.startsWith('image/')) {
+ throw new Error(`Invalid blob type: ${type}`);
+ }
+
+ const format = type.replace('image/', '');
+
+ if (!isValidFormat(format)) {
+ throw new Error(`Invalid blob type: ${type}`);
+ }
+
+ const buffer = await blob.arrayBuffer();
+
+ return getImage(Buffer.from(buffer), format);
+};
+
+const getImageFormat = (body) => {
const isPng =
body[0] === 137 &&
body[1] === 80 &&
@@ -143,7 +171,7 @@ const getImageFormat = body => {
return extension;
};
-const resolveImageFromUrl = async src => {
+const resolveImageFromUrl = async (src) => {
const { uri, body, headers, method = 'GET', credentials } = src;
const data =
@@ -165,7 +193,9 @@ const resolveImage = (src, { cache = true } = {}) => {
let image;
const cacheKey = src.data ? src.data.toString() : src.uri;
- if (Buffer.isBuffer(src)) {
+ if (typeof Blob !== 'undefined' && src instanceof Blob) {
+ image = resolveBlobImage(src);
+ } else if (Buffer.isBuffer(src)) {
image = resolveBufferImage(src);
} else if (cache && IMAGE_CACHE.get(cacheKey)) {
return IMAGE_CACHE.get(cacheKey);
diff --git a/packages/image/tests/cache.test.js b/packages/image/tests/cache.test.js
index c96c50cf9..16d25133b 100644
--- a/packages/image/tests/cache.test.js
+++ b/packages/image/tests/cache.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import createCache from '../src/cache';
describe('Background', () => {
diff --git a/packages/image/tests/resolve.test.js b/packages/image/tests/resolve.test.js
index 917932833..403498478 100644
--- a/packages/image/tests/resolve.test.js
+++ b/packages/image/tests/resolve.test.js
@@ -1,8 +1,12 @@
+import { beforeEach, describe, expect, test } from 'vitest';
import fs from 'fs';
import path from 'path';
+import url from 'url';
import resolveImage, { IMAGE_CACHE } from '../src/resolve';
+const __dirname = path.dirname(url.fileURLToPath(import.meta.url));
+
const jpgImageUrl = 'https://react-pdf.org/static/images/quijote1.jpg';
const pngImageUrl = 'https://react-pdf.org/static/images/quijote2.png';
const jpgLogalPath = path.join(__dirname, './assets/test.jpg');
@@ -41,7 +45,8 @@ describe('image resolveImage', () => {
expect(fetch.mock.calls[0][1].headers).toEqual(headers);
});
- test('Should fetch remote image using passed body', async () => {
+ // TypeError: Request with GET/HEAD method cannot have body
+ test.skip('Should fetch remote image using passed body', async () => {
fetch.once(localJPGImage);
const body = 'qwerty';
@@ -107,8 +112,7 @@ describe('image resolveImage', () => {
test('Should render a base64 image', async () => {
const image = await resolveImage({
- uri:
- 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z/C/HgAGgwJ/lK3Q6wAAAABJRU5ErkJggg==',
+ uri: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z/C/HgAGgwJ/lK3Q6wAAAABJRU5ErkJggg==',
});
expect(image.data).toBeTruthy();
@@ -158,4 +162,33 @@ describe('image resolveImage', () => {
expect(image1).not.toBe(image2);
});
+
+ test('Should render a blob image', async () => {
+ const blob = new Blob([localJPGImage], { type: 'image/jpeg' });
+ const image = await resolveImage(blob);
+
+ expect(image.data).toBeTruthy();
+ expect(image.width).toBeGreaterThan(0);
+ expect(image.height).toBeGreaterThan(0);
+ });
+
+ test('Should render a blob without type', async () => {
+ const blob = new Blob([localJPGImage]);
+ const image = await resolveImage(blob);
+
+ expect(image.data).toBeTruthy();
+ expect(image.width).toBeGreaterThan(0);
+ expect(image.height).toBeGreaterThan(0);
+ });
+
+ test('Should render a blob image with type application/octet-stream', async () => {
+ const blob = new Blob([localJPGImage], {
+ type: 'application/octet-stream',
+ });
+ const image = await resolveImage(blob);
+
+ expect(image.data).toBeTruthy();
+ expect(image.width).toBeGreaterThan(0);
+ expect(image.height).toBeGreaterThan(0);
+ });
});
diff --git a/packages/image/vitest.config.js b/packages/image/vitest.config.js
new file mode 100644
index 000000000..4c6e2fbd2
--- /dev/null
+++ b/packages/image/vitest.config.js
@@ -0,0 +1,11 @@
+// false positive on import/no-unresolved
+// eslint-disable-next-line import/no-unresolved
+import { defineConfig } from 'vitest/config';
+
+export default defineConfig({
+ test: {
+ setupFiles: ['vitest.setup.js'],
+ include: ['tests/*.{test,spec}.?(c|m)[jt]s?(x)'],
+ watch: false,
+ },
+});
diff --git a/packages/image/vitest.setup.js b/packages/image/vitest.setup.js
new file mode 100644
index 000000000..bd58b0f73
--- /dev/null
+++ b/packages/image/vitest.setup.js
@@ -0,0 +1,10 @@
+/* eslint-disable import/no-extraneous-dependencies */
+import { vi } from 'vitest';
+import createFetchMock from 'vitest-fetch-mock';
+
+const fetchMocker = createFetchMock(vi);
+fetchMocker.enableMocks();
+
+global.BROWSER = false;
+
+vi.mock('cross-fetch', () => ({ default: global.fetch }));
diff --git a/packages/layout/CHANGELOG.md b/packages/layout/CHANGELOG.md
index 0f0cdc948..abbb24604 100644
--- a/packages/layout/CHANGELOG.md
+++ b/packages/layout/CHANGELOG.md
@@ -1,5 +1,147 @@
# @react-pdf/layout
+## 3.11.2
+
+### Patch Changes
+
+- Updated dependencies [[`dc54c13`](https://github.com/diegomura/react-pdf/commit/dc54c13625510482e93f80ed5cc07cf3a6a6d34c)]:
+ - @react-pdf/pdfkit@3.1.6
+
+## 3.11.1
+
+### Patch Changes
+
+- [#2605](https://github.com/diegomura/react-pdf/pull/2605) [`f7505ed`](https://github.com/diegomura/react-pdf/commit/f7505ed453a1a0ae960d0e5e4a1d155803861b71) Thanks [@wojtekmaj](https://github.com/wojtekmaj)! - fix: fix CJS compatibility
+
+- Updated dependencies [[`f7505ed`](https://github.com/diegomura/react-pdf/commit/f7505ed453a1a0ae960d0e5e4a1d155803861b71)]:
+ - @react-pdf/stylesheet@4.2.4
+ - @react-pdf/textkit@4.4.1
+ - @react-pdf/image@2.3.4
+ - @react-pdf/fns@2.2.1
+ - @react-pdf/pdfkit@3.1.5
+
+## 3.11.0
+
+### Minor Changes
+
+- [#2600](https://github.com/diegomura/react-pdf/pull/2600) [`8350154`](https://github.com/diegomura/react-pdf/commit/83501541e3a050021e18e112bb472b2dabc142a7) Thanks [@diegomura](https://github.com/diegomura)! - feat: bidi support
+
+### Patch Changes
+
+- [#2573](https://github.com/diegomura/react-pdf/pull/2573) [`9af07fe`](https://github.com/diegomura/react-pdf/commit/9af07feb59c2fe9c1d8960ac95f6fa6e03d16235) Thanks [@davbrito](https://github.com/davbrito)! - feat: add support for resolving blob images
+
+- Updated dependencies [[`9af07fe`](https://github.com/diegomura/react-pdf/commit/9af07feb59c2fe9c1d8960ac95f6fa6e03d16235), [`8350154`](https://github.com/diegomura/react-pdf/commit/83501541e3a050021e18e112bb472b2dabc142a7)]:
+ - @react-pdf/image@2.3.3
+ - @react-pdf/types@2.4.1
+ - @react-pdf/textkit@4.4.0
+ - @react-pdf/fns@2.2.0
+ - @react-pdf/pdfkit@3.1.4
+ - @react-pdf/stylesheet@4.2.3
+
+## 3.10.4
+
+### Patch Changes
+
+- Updated dependencies [[`0590324`](https://github.com/diegomura/react-pdf/commit/0590324d7a6d75c0a49520b3f99cfb6594239390)]:
+ - @react-pdf/image@2.3.2
+ - @react-pdf/pdfkit@3.1.3
+
+## 3.10.3
+
+### Patch Changes
+
+- Updated dependencies [[`44bd45b`](https://github.com/diegomura/react-pdf/commit/44bd45b1961ca8bae4a2f84cc77db945e5c43419)]:
+ - @react-pdf/pdfkit@3.1.2
+
+## 3.10.2
+
+### Patch Changes
+
+- Updated dependencies [[`fb5273d`](https://github.com/diegomura/react-pdf/commit/fb5273d8d80d919f7b9c214e02d67b79ce23fa19)]:
+ - @react-pdf/types@2.4.0
+ - @react-pdf/stylesheet@4.2.2
+
+## 3.10.1
+
+### Patch Changes
+
+- Updated dependencies [[`36c6ba3`](https://github.com/diegomura/react-pdf/commit/36c6ba30ae73a512f19fe5bc47ac8c304887c0da), [`a35b1ba`](https://github.com/diegomura/react-pdf/commit/a35b1ba18d293df51293600d8d56015094d222d8)]:
+ - @react-pdf/pdfkit@3.1.1
+ - @react-pdf/image@2.3.1
+
+## 3.10.0
+
+### Minor Changes
+
+- [#2505](https://github.com/diegomura/react-pdf/pull/2505) [`0f5c43f`](https://github.com/diegomura/react-pdf/commit/0f5c43fa6f3c0b53c067200cc1ac21e651504760) Thanks [@diegomura](https://github.com/diegomura)! - feat: wasm yoga
+
+### Patch Changes
+
+- Updated dependencies [[`9e5842b`](https://github.com/diegomura/react-pdf/commit/9e5842bbecca6e249af2c5fc50078bb7ddd5420f)]:
+ - @react-pdf/types@2.3.6
+ - @react-pdf/stylesheet@4.2.1
+
+## 3.9.1
+
+### Patch Changes
+
+- Updated dependencies [[`42bbbda`](https://github.com/diegomura/react-pdf/commit/42bbbda48058acd2d36d7a92c812d133608c459e)]:
+ - @react-pdf/primitives@3.1.1
+
+## 3.9.0
+
+### Minor Changes
+
+- [#2409](https://github.com/diegomura/react-pdf/pull/2409) [`b6a14fd`](https://github.com/diegomura/react-pdf/commit/b6a14fd160fab26a49f798e5294b0e361e67fe37) Thanks [@wojtekmaj](https://github.com/wojtekmaj)! - Add support for native ESM
+
+### Patch Changes
+
+- [#2504](https://github.com/diegomura/react-pdf/pull/2504) [`e705d98`](https://github.com/diegomura/react-pdf/commit/e705d9862e3364fde00cbe6cdaf06d492bf58526) Thanks [@diegomura](https://github.com/diegomura)! - feat: nested text inherit background color
+
+* [#2496](https://github.com/diegomura/react-pdf/pull/2496) [`c8fe2c8`](https://github.com/diegomura/react-pdf/commit/c8fe2c86639cb8e44f26f78e62fc67379a8e3ceb) Thanks [@diegomura](https://github.com/diegomura)! - fix: copyright and registered symbol rendering
+
+- [#2502](https://github.com/diegomura/react-pdf/pull/2502) [`96ea576`](https://github.com/diegomura/react-pdf/commit/96ea5764cbe4e6e3869cd0fe6620e5216f94ffc0) Thanks [@DominikMeca](https://github.com/DominikMeca)! - feat: include text preceeding special case emojis, include ™ symbol in excluded emojis
+
+- Updated dependencies [[`6bfe7e8`](https://github.com/diegomura/react-pdf/commit/6bfe7e8a30d96c04a1552800159992705f3605b1), [`b6a14fd`](https://github.com/diegomura/react-pdf/commit/b6a14fd160fab26a49f798e5294b0e361e67fe37)]:
+ - @react-pdf/stylesheet@4.2.0
+ - @react-pdf/primitives@3.1.0
+ - @react-pdf/textkit@4.3.0
+ - @react-pdf/pdfkit@3.1.0
+ - @react-pdf/image@2.3.0
+ - @react-pdf/fns@2.1.0
+
+## 3.8.0
+
+### Minor Changes
+
+- [#2400](https://github.com/diegomura/react-pdf/pull/2400) [`0538bd9`](https://github.com/diegomura/react-pdf/commit/0538bd900e5490a5ef81bcdbd1676fc9f9ae6acb) Thanks [@carlobeltrame](https://github.com/carlobeltrame)! - Rework minPresenceAhead detection and add tests
+
+## 3.7.0
+
+### Minor Changes
+
+- [#2473](https://github.com/diegomura/react-pdf/pull/2473) [`b227e0e`](https://github.com/diegomura/react-pdf/commit/b227e0e303da8bca754910f55f5d27dd18f3a874) Thanks [@mskec](https://github.com/mskec)! - Upgraded yoga to v2 and dropped bundled yoga v1 package
+
+### Patch Changes
+
+- [#2479](https://github.com/diegomura/react-pdf/pull/2479) [`45b2bd3`](https://github.com/diegomura/react-pdf/commit/45b2bd37037c605727ad5783f2f2a438dc19cac4) Thanks [@diegomura](https://github.com/diegomura)! - fix linting
+
+* [#2467](https://github.com/diegomura/react-pdf/pull/2467) [`1f987cc`](https://github.com/diegomura/react-pdf/commit/1f987cc27c3fd1ef1b6748ebe58a289a78b538d2) Thanks [@JaeSeoKim](https://github.com/JaeSeoKim)! - feat: add withVariationSelectors option to registerEmojiSource [#2466](https://github.com/diegomura/react-pdf/issues/2466)
+
+* Updated dependencies [[`e5c8fde`](https://github.com/diegomura/react-pdf/commit/e5c8fde9379a9a85ecac7e3d6273953e39d65f8d), [`45b2bd3`](https://github.com/diegomura/react-pdf/commit/45b2bd37037c605727ad5783f2f2a438dc19cac4), [`b457a0c`](https://github.com/diegomura/react-pdf/commit/b457a0cc1c1352325e6c633af3000a3c9241f7f7), [`1f987cc`](https://github.com/diegomura/react-pdf/commit/1f987cc27c3fd1ef1b6748ebe58a289a78b538d2), [`4c40b14`](https://github.com/diegomura/react-pdf/commit/4c40b149cfed42f2513e1dd330a92ccc3363c04f)]:
+ - @react-pdf/types@2.3.5
+ - @react-pdf/textkit@4.2.1
+ - @react-pdf/pdfkit@3.0.4
+ - @react-pdf/image@2.2.3
+ - @react-pdf/stylesheet@4.1.9
+
+## 3.6.4
+
+### Patch Changes
+
+- Updated dependencies [[`4cfb84d`](https://github.com/diegomura/react-pdf/commit/4cfb84d9f3d2301720b68b4c40a0257b9520c6e1)]:
+ - @react-pdf/pdfkit@3.0.3
+
## 3.6.3
### Patch Changes
diff --git a/packages/layout/babel.config.js b/packages/layout/babel.config.js
index 831adcadc..defa6f8c2 100644
--- a/packages/layout/babel.config.js
+++ b/packages/layout/babel.config.js
@@ -1,3 +1,3 @@
-module.exports = {
+export default {
extends: '../../babel.config.js',
};
diff --git a/packages/layout/jest.config.js b/packages/layout/jest.config.js
index dbccc1991..24cd66a27 100644
--- a/packages/layout/jest.config.js
+++ b/packages/layout/jest.config.js
@@ -1,4 +1,4 @@
-module.exports = {
+export default {
automock: false,
testRegex: 'tests/.*?(test)\\.js$',
};
diff --git a/packages/layout/package.json b/packages/layout/package.json
index 58aa741d1..f73611428 100644
--- a/packages/layout/package.json
+++ b/packages/layout/package.json
@@ -1,38 +1,43 @@
{
"name": "@react-pdf/layout",
- "version": "3.6.3",
+ "version": "3.11.2",
"license": "MIT",
"description": "Resolve overall document component's layout",
"author": "Diego Muracciole ",
"homepage": "https://github.com/diegomura/react-pdf#readme",
- "main": "lib/index.cjs.js",
- "module": "lib/index.es.js",
+ "type": "module",
+ "main": "./lib/index.cjs",
+ "module": "./lib/index.js",
+ "exports": {
+ ".": {
+ "import": "./lib/index.js",
+ "require": "./lib/index.cjs",
+ "default": "./lib/index.js"
+ }
+ },
"repository": {
"type": "git",
"url": "https://github.com/diegomura/react-pdf.git",
"directory": "packages/layout"
},
"scripts": {
- "test": "jest",
+ "test": "vitest",
"build": "rimraf ./lib && rollup -c",
"watch": "rimraf ./lib && rollup -c -w"
},
"dependencies": {
"@babel/runtime": "^7.20.13",
- "@react-pdf/fns": "2.0.1",
- "@react-pdf/image": "^2.2.2",
- "@react-pdf/pdfkit": "^3.0.2",
- "@react-pdf/primitives": "^3.0.0",
- "@react-pdf/stylesheet": "^4.1.8",
- "@react-pdf/textkit": "^4.2.0",
- "@react-pdf/types": "^2.3.4",
- "@react-pdf/yoga": "^4.1.2",
+ "@react-pdf/fns": "2.2.1",
+ "@react-pdf/image": "^2.3.4",
+ "@react-pdf/pdfkit": "^3.1.6",
+ "@react-pdf/primitives": "^3.1.1",
+ "@react-pdf/stylesheet": "^4.2.4",
+ "@react-pdf/textkit": "^4.4.1",
+ "@react-pdf/types": "^2.4.1",
"cross-fetch": "^3.1.5",
- "emoji-regex": "^10.2.1",
- "queue": "^6.0.1"
- },
- "devDependencies": {
- "jest-fetch-mock": "^2.1.1"
+ "emoji-regex": "^10.3.0",
+ "queue": "^6.0.1",
+ "yoga-layout": "^2.0.1"
},
"files": [
"lib"
diff --git a/packages/layout/rollup.config.js b/packages/layout/rollup.config.js
index 88f795e6c..849ee121b 100644
--- a/packages/layout/rollup.config.js
+++ b/packages/layout/rollup.config.js
@@ -1,17 +1,19 @@
import babel from '@rollup/plugin-babel';
-import pkg from './package.json';
+
+import pkg from './package.json' assert { type: 'json' };
const cjs = {
exports: 'named',
format: 'cjs',
+ interop: 'compat',
};
const esm = {
format: 'es',
};
-const getCJS = override => Object.assign({}, cjs, override);
-const getESM = override => Object.assign({}, esm, override);
+const getCJS = (override) => Object.assign({}, cjs, override);
+const getESM = (override) => Object.assign({}, esm, override);
const configBase = {
input: 'src/index.js',
@@ -29,10 +31,7 @@ const configBase = {
};
const config = Object.assign({}, configBase, {
- output: [
- getESM({ file: 'lib/index.es.js' }),
- getCJS({ file: 'lib/index.cjs.js' }),
- ],
+ output: [getESM({ file: 'lib/index.js' }), getCJS({ file: 'lib/index.cjs' })],
});
export default config;
diff --git a/packages/layout/setupTests.js b/packages/layout/setupTests.js
index 3bce79853..b4dfeb127 100644
--- a/packages/layout/setupTests.js
+++ b/packages/layout/setupTests.js
@@ -1,10 +1,12 @@
/* eslint-disable */
+import { vi } from 'vitest';
+import createFetchMock from 'vitest-fetch-mock';
+
import '../../polyfills';
-global.BROWSER = false;
+const fetchMocker = createFetchMock(vi);
+fetchMocker.enableMocks();
-const customGlobal = global;
-customGlobal.fetch = require('jest-fetch-mock');
-customGlobal.fetchMock = customGlobal.fetch;
+global.BROWSER = false;
-jest.setMock('cross-fetch', fetch);
+vi.mock('cross-fetch', () => ({ default: global.fetch }));
diff --git a/packages/layout/src/canvas/measureCanvas.js b/packages/layout/src/canvas/measureCanvas.js
index 8a1828f80..a6a3ab500 100644
--- a/packages/layout/src/canvas/measureCanvas.js
+++ b/packages/layout/src/canvas/measureCanvas.js
@@ -6,7 +6,7 @@ import isHeightAuto from '../page/isHeightAuto';
const SAFETY_HEIGHT = 10;
-const getMax = values => Math.max(-Infinity, ...values);
+const getMax = (values) => Math.max(-Infinity, ...values);
/**
* Helper object to predict canvas size
@@ -88,22 +88,23 @@ const measureCtx = () => {
ctx.linearGradient = nil;
ctx.radialGradient = nil;
- ctx.getWidth = () => getMax(points.map(p => p[0]));
- ctx.getHeight = () => getMax(points.map(p => p[1]));
+ ctx.getWidth = () => getMax(points.map((p) => p[0]));
+ ctx.getHeight = () => getMax(points.map((p) => p[1]));
return ctx;
};
+/**
+ * @typedef {Function} MeasureCanvas
+ * @returns {{ width: number, height: number }} canvas width and height
+ */
+
/**
* Yoga canvas measure function
*
* @param {Object} page
* @param {Object} node
- * @param {Number} width
- * @param {Number} widthMode
- * @param {Number} height
- * @param {Number} heightMode
- * @returns {Object} canvas width and height
+ * @returns {MeasureCanvas} measure canvas
*/
const measureCanvas = (page, node) => () => {
const imageMargin = getMargin(node);
@@ -124,7 +125,7 @@ const measureCanvas = (page, node) => () => {
const width = ctx.getWidth();
const height = Math.min(pageArea, ctx.getHeight());
- return { height, width };
+ return { width, height };
};
export default measureCanvas;
diff --git a/packages/layout/src/image/fetchImage.js b/packages/layout/src/image/fetchImage.js
index 3e19b8d34..53a10d49c 100644
--- a/packages/layout/src/image/fetchImage.js
+++ b/packages/layout/src/image/fetchImage.js
@@ -11,7 +11,7 @@ import resolveSource from './resolveSource';
*
* @param {Object} node
*/
-const fetchImage = async node => {
+const fetchImage = async (node) => {
const src = getSource(node);
const { cache } = node.props;
diff --git a/packages/layout/src/image/getRatio.js b/packages/layout/src/image/getRatio.js
index 8178db7af..f395f7602 100644
--- a/packages/layout/src/image/getRatio.js
+++ b/packages/layout/src/image/getRatio.js
@@ -1,10 +1,10 @@
/**
* Get image ratio
*
- * @param {Object} image node
- * @returns {Number} image ratio
+ * @param {Object} node image node
+ * @returns {number} image ratio
*/
-const getRatio = node => {
+const getRatio = (node) => {
return node.image?.data ? node.image.width / node.image.height : 1;
};
diff --git a/packages/layout/src/image/getSource.js b/packages/layout/src/image/getSource.js
index 0618cba28..6e59f1f8d 100644
--- a/packages/layout/src/image/getSource.js
+++ b/packages/layout/src/image/getSource.js
@@ -1,10 +1,10 @@
/**
* Get image source
*
- * @param {Object} image node
- * @returns {String | Object} image src
+ * @param {Object} node image node
+ * @returns {string | Object} image src
*/
-const getSource = node =>
+const getSource = (node) =>
node.props?.src || node.props?.source || node.props?.href;
export default getSource;
diff --git a/packages/layout/src/image/measureImage.js b/packages/layout/src/image/measureImage.js
index 4a6007d32..3ebf99662 100644
--- a/packages/layout/src/image/measureImage.js
+++ b/packages/layout/src/image/measureImage.js
@@ -1,4 +1,4 @@
-import Yoga from '@react-pdf/yoga';
+import * as Yoga from 'yoga-layout';
import getRatio from './getRatio';
import getMargin from '../node/getMargin';
@@ -7,16 +7,21 @@ import isHeightAuto from '../page/isHeightAuto';
const SAFETY_HEIGHT = 10;
+/**
+ * @typedef {Function} MeasureImage
+ * @param {number} width
+ * @param {number} widthMode
+ * @param {number} height
+ * @param {number} heightMode
+ * @returns {{ width: number, height: number }} image width and height
+ */
+
/**
* Yoga image measure function
*
- * @param {Object} page
- * @param {Object} node
- * @param {Number} width
- * @param {Number} widthMode
- * @param {Number} height
- * @param {Number} heightMode
- * @returns {Object} image width and height
+ * @param {Object} page page
+ * @param {Object} node node
+ * @returns {MeasureImage} measure image
*/
const measureImage = (page, node) => (width, widthMode, height, heightMode) => {
const imageRatio = getRatio(node);
@@ -35,32 +40,32 @@ const measureImage = (page, node) => (width, widthMode, height, heightMode) => {
if (!node.image) return { width: 0, height: 0 };
if (
- widthMode === Yoga.MEASURE_MODE_EXACTLY &&
- heightMode === Yoga.MEASURE_MODE_UNDEFINED
+ widthMode === Yoga.MeasureMode.Exactly &&
+ heightMode === Yoga.MeasureMode.Undefined
) {
const scaledHeight = width / imageRatio;
return { height: Math.min(pageArea, scaledHeight) };
}
if (
- heightMode === Yoga.MEASURE_MODE_EXACTLY &&
- (widthMode === Yoga.MEASURE_MODE_AT_MOST ||
- widthMode === Yoga.MEASURE_MODE_UNDEFINED)
+ heightMode === Yoga.MeasureMode.Exactly &&
+ (widthMode === Yoga.MeasureMode.AtMost ||
+ widthMode === Yoga.MeasureMode.Undefined)
) {
return { width: Math.min(height * imageRatio, width) };
}
if (
- widthMode === Yoga.MEASURE_MODE_EXACTLY &&
- heightMode === Yoga.MEASURE_MODE_AT_MOST
+ widthMode === Yoga.MeasureMode.Exactly &&
+ heightMode === Yoga.MeasureMode.AtMost
) {
const scaledHeight = width / imageRatio;
return { height: Math.min(height, pageArea, scaledHeight) };
}
if (
- widthMode === Yoga.MEASURE_MODE_AT_MOST &&
- heightMode === Yoga.MEASURE_MODE_AT_MOST
+ widthMode === Yoga.MeasureMode.AtMost &&
+ heightMode === Yoga.MeasureMode.AtMost
) {
if (imageRatio > 1) {
return {
diff --git a/packages/layout/src/image/resolveSource.js b/packages/layout/src/image/resolveSource.js
index f8859bcbf..376da1152 100644
--- a/packages/layout/src/image/resolveSource.js
+++ b/packages/layout/src/image/resolveSource.js
@@ -4,9 +4,9 @@
* Also it handles factories and async sources.
*
* @param {string | Object | Function} src
- * @returns {object} resolved src
+ * @returns {Promise} resolved src
*/
-const resolveSource = async src => {
+const resolveSource = async (src) => {
const source = typeof src === 'function' ? await src() : await src;
return typeof source === 'string' ? { uri: source } : source;
};
diff --git a/packages/layout/src/index.js b/packages/layout/src/index.js
index d3d3e4a5d..f4ea01250 100644
--- a/packages/layout/src/index.js
+++ b/packages/layout/src/index.js
@@ -1,6 +1,7 @@
import { asyncCompose } from '@react-pdf/fns';
import resolveSvg from './steps/resolveSvg';
+import resolveYoga from './steps/resolveYoga';
import resolveZIndex from './steps/resolveZIndex';
import resolveAssets from './steps/resolveAssets';
import resolveStyles from './steps/resolveStyles';
@@ -19,6 +20,7 @@ import resolveLinkSubstitution from './steps/resolveLinkSubstitution';
const layout = asyncCompose(
resolveZIndex,
resolveOrigins,
+ resolveAssets,
resolvePagination,
resolveTextLayout,
resolvePercentRadius,
@@ -32,6 +34,7 @@ const layout = asyncCompose(
resolveLinkSubstitution,
resolveBookmarks,
resolvePageSizes,
+ resolveYoga,
);
export default layout;
diff --git a/packages/layout/src/node/createInstances.js b/packages/layout/src/node/createInstances.js
index c221ad379..192608476 100644
--- a/packages/layout/src/node/createInstances.js
+++ b/packages/layout/src/node/createInstances.js
@@ -1,11 +1,11 @@
import { castArray } from '@react-pdf/fns';
import { TextInstance } from '@react-pdf/primitives';
-const isString = value => typeof value === 'string';
+const isString = (value) => typeof value === 'string';
-const isNumber = value => typeof value === 'number';
+const isNumber = (value) => typeof value === 'number';
-const isFragment = value =>
+const isFragment = (value) =>
value && value.type === Symbol.for('react.fragment');
/**
@@ -13,10 +13,10 @@ const isFragment = value =>
*
* Can return multiple instances in the case of arrays or fragments.
*
- * @param {Object} React element
- * @returns {Array} parsed react elements
+ * @param {Object} element React element
+ * @returns {Object[]} parsed React elements
*/
-const createInstances = element => {
+const createInstances = (element) => {
if (!element) return [];
if (isString(element) || isNumber(element)) {
diff --git a/packages/layout/src/node/getBorderWidth.js b/packages/layout/src/node/getBorderWidth.js
index 1901672d1..a31e38946 100644
--- a/packages/layout/src/node/getBorderWidth.js
+++ b/packages/layout/src/node/getBorderWidth.js
@@ -1,4 +1,4 @@
-import Yoga from '@react-pdf/yoga';
+import * as Yoga from 'yoga-layout';
const getComputedBorder = (yogaNode, edge) =>
yogaNode ? yogaNode.getComputedBorder(edge) : 0;
@@ -7,16 +7,16 @@ const getComputedBorder = (yogaNode, edge) =>
* Get Yoga computed border width. Zero otherwise
*
* @param {Object} node
- * @return {Object} border widths
+ * @returns {{ borderTopWidth: number, borderRightWidth: number, borderBottomWidth: number, borderLeftWidth: number }} border widths
*/
-const getBorderWidth = node => {
+const getBorderWidth = (node) => {
const { yogaNode } = node;
return {
- borderTopWidth: getComputedBorder(yogaNode, Yoga.EDGE_TOP),
- borderRightWidth: getComputedBorder(yogaNode, Yoga.EDGE_RIGHT),
- borderBottomWidth: getComputedBorder(yogaNode, Yoga.EDGE_BOTTOM),
- borderLeftWidth: getComputedBorder(yogaNode, Yoga.EDGE_LEFT),
+ borderTopWidth: getComputedBorder(yogaNode, Yoga.Edge.Top),
+ borderRightWidth: getComputedBorder(yogaNode, Yoga.Edge.Right),
+ borderBottomWidth: getComputedBorder(yogaNode, Yoga.Edge.Bottom),
+ borderLeftWidth: getComputedBorder(yogaNode, Yoga.Edge.Left),
};
};
diff --git a/packages/layout/src/node/getDimension.js b/packages/layout/src/node/getDimension.js
index e8f1e433e..d1228abd3 100644
--- a/packages/layout/src/node/getDimension.js
+++ b/packages/layout/src/node/getDimension.js
@@ -7,9 +7,9 @@ const DEFAULT_DIMENSION = {
* Get Yoga computed dimensions. Zero otherwise
*
* @param {Object} node
- * @return {Object} dimensions
+ * @returns {{ width: number, height: number }} dimensions
*/
-const getDimension = node => {
+const getDimension = (node) => {
const { yogaNode } = node;
if (!yogaNode) return DEFAULT_DIMENSION;
diff --git a/packages/layout/src/node/getMargin.js b/packages/layout/src/node/getMargin.js
index 206bbe819..d664acef5 100644
--- a/packages/layout/src/node/getMargin.js
+++ b/packages/layout/src/node/getMargin.js
@@ -1,4 +1,4 @@
-import Yoga from '@react-pdf/yoga';
+import * as Yoga from 'yoga-layout';
const getComputedMargin = (node, edge) => {
const { yogaNode } = node;
@@ -9,13 +9,13 @@ const getComputedMargin = (node, edge) => {
* Get Yoga computed magins. Zero otherwise
*
* @param {Object} node
- * @return {Object} margins
+ * @returns {{ marginTop: number, marginRight: number, marginBottom: number, marginLeft: number }} margins
*/
-const getMargin = node => {
+const getMargin = (node) => {
const { style, box } = node;
const marginTop =
- getComputedMargin(node, Yoga.EDGE_TOP) ||
+ getComputedMargin(node, Yoga.Edge.Top) ||
box?.marginTop ||
style?.marginTop ||
style?.marginVertical ||
@@ -23,7 +23,7 @@ const getMargin = node => {
0;
const marginRight =
- getComputedMargin(node, Yoga.EDGE_RIGHT) ||
+ getComputedMargin(node, Yoga.Edge.Right) ||
box?.marginRight ||
style?.marginRight ||
style?.marginHorizontal ||
@@ -31,7 +31,7 @@ const getMargin = node => {
0;
const marginBottom =
- getComputedMargin(node, Yoga.EDGE_BOTTOM) ||
+ getComputedMargin(node, Yoga.Edge.Bottom) ||
box?.marginBottom ||
style?.marginBottom ||
style?.marginVertical ||
@@ -39,7 +39,7 @@ const getMargin = node => {
0;
const marginLeft =
- getComputedMargin(node, Yoga.EDGE_LEFT) ||
+ getComputedMargin(node, Yoga.Edge.Left) ||
box?.marginLeft ||
style?.marginLeft ||
style?.marginHorizontal ||
diff --git a/packages/layout/src/node/getNodesHeight.js b/packages/layout/src/node/getNodesHeight.js
deleted file mode 100644
index 42c26880f..000000000
--- a/packages/layout/src/node/getNodesHeight.js
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Get many nodes height
- *
- * @param {Array} nodes
- * @return {number} nodes height
- */
-const getNodesHeight = nodes => {
- let max = 0;
- let min = Infinity;
-
- if (!nodes || nodes.length === 0) return 0;
-
- for (let i = 0; i < nodes.length; i += 1) {
- const node = nodes[i];
- min = Math.min(min, node.box.top);
- max = Math.max(max, node.box.top + node.box.height);
- }
-
- return max - min;
-};
-
-export default getNodesHeight;
diff --git a/packages/layout/src/node/getOrigin.js b/packages/layout/src/node/getOrigin.js
index d7fed8b01..8a2ba3989 100644
--- a/packages/layout/src/node/getOrigin.js
+++ b/packages/layout/src/node/getOrigin.js
@@ -1,15 +1,15 @@
import { isNil, matchPercent } from '@react-pdf/fns';
-const getTransformStyle = s => node =>
+const getTransformStyle = (s) => (node) =>
isNil(node.style?.[s]) ? '50%' : node.style?.[s];
/**
* Get node origin
*
* @param {Object} node
- * @returns {Object} node origin
+ * @returns {{ left?: number, top?: number }} node origin
*/
-const getOrigin = node => {
+const getOrigin = (node) => {
if (!node.box) return {};
const { left, top, width, height } = node.box;
diff --git a/packages/layout/src/node/getPadding.js b/packages/layout/src/node/getPadding.js
index 9133ba9ba..f9f732a84 100644
--- a/packages/layout/src/node/getPadding.js
+++ b/packages/layout/src/node/getPadding.js
@@ -1,4 +1,4 @@
-import Yoga from '@react-pdf/yoga';
+import * as Yoga from 'yoga-layout';
const getComputedPadding = (node, edge) => {
const { yogaNode } = node;
@@ -9,13 +9,13 @@ const getComputedPadding = (node, edge) => {
* Get Yoga computed paddings. Zero otherwise
*
* @param {Object} node
- * @return {Object} paddings
+ * @returns {{ paddingTop: number, paddingRight: number, paddingBottom: number, paddingLeft: number }} paddings
*/
-const getPadding = node => {
+const getPadding = (node) => {
const { style, box } = node;
const paddingTop =
- getComputedPadding(node, Yoga.EDGE_TOP) ||
+ getComputedPadding(node, Yoga.Edge.Top) ||
box?.paddingTop ||
style?.paddingTop ||
style?.paddingVertical ||
@@ -23,7 +23,7 @@ const getPadding = node => {
0;
const paddingRight =
- getComputedPadding(node, Yoga.EDGE_RIGHT) ||
+ getComputedPadding(node, Yoga.Edge.Right) ||
box?.paddingRight ||
style?.paddingRight ||
style?.paddingHorizontal ||
@@ -31,7 +31,7 @@ const getPadding = node => {
0;
const paddingBottom =
- getComputedPadding(node, Yoga.EDGE_BOTTOM) ||
+ getComputedPadding(node, Yoga.Edge.Bottom) ||
box?.paddingBottom ||
style?.paddingBottom ||
style?.paddingVertical ||
@@ -39,7 +39,7 @@ const getPadding = node => {
0;
const paddingLeft =
- getComputedPadding(node, Yoga.EDGE_LEFT) ||
+ getComputedPadding(node, Yoga.Edge.Left) ||
box?.paddingLeft ||
style?.paddingLeft ||
style?.paddingHorizontal ||
diff --git a/packages/layout/src/node/getPosition.js b/packages/layout/src/node/getPosition.js
index 92e60f85a..c5cc0f7e5 100644
--- a/packages/layout/src/node/getPosition.js
+++ b/packages/layout/src/node/getPosition.js
@@ -2,9 +2,9 @@
* Get Yoga computed position. Zero otherwise
*
* @param {Object} node
- * @return {Object} position
+ * @returns {{ top: number, right: number, bottom: number, left: number }} position
*/
-const getPosition = node => {
+const getPosition = (node) => {
const { yogaNode } = node;
return {
diff --git a/packages/layout/src/node/getWrap.js b/packages/layout/src/node/getWrap.js
index 5cd18bb7a..fe19cd8fc 100644
--- a/packages/layout/src/node/getWrap.js
+++ b/packages/layout/src/node/getWrap.js
@@ -3,7 +3,7 @@ import { isNil } from '@react-pdf/fns';
const NON_WRAP_TYPES = [P.Svg, P.Note, P.Image, P.Canvas];
-const getWrap = node => {
+const getWrap = (node) => {
if (NON_WRAP_TYPES.includes(node.type)) return false;
return isNil(node.props?.wrap) ? true : node.props.wrap;
diff --git a/packages/layout/src/node/isFixed.js b/packages/layout/src/node/isFixed.js
index 1b0e4641c..98260e469 100644
--- a/packages/layout/src/node/isFixed.js
+++ b/packages/layout/src/node/isFixed.js
@@ -1,3 +1,3 @@
-const isFixed = node => node.props?.fixed === true;
+const isFixed = (node) => node.props?.fixed === true;
export default isFixed;
diff --git a/packages/layout/src/node/removePaddings.js b/packages/layout/src/node/removePaddings.js
index 337e1faf1..3ae997147 100644
--- a/packages/layout/src/node/removePaddings.js
+++ b/packages/layout/src/node/removePaddings.js
@@ -18,7 +18,7 @@ const PADDING_PROPS = [
* @param {Object} node
* @returns {Object} node without padding
*/
-const removePaddings = node => {
+const removePaddings = (node) => {
const style = omit(PADDING_PROPS, node.style || {});
const newNode = Object.assign({}, node, { style });
diff --git a/packages/layout/src/node/setAlign.js b/packages/layout/src/node/setAlign.js
index b4b3e6755..6b3deecd6 100644
--- a/packages/layout/src/node/setAlign.js
+++ b/packages/layout/src/node/setAlign.js
@@ -1,27 +1,37 @@
-import Yoga from '@react-pdf/yoga';
+import * as Yoga from 'yoga-layout';
import { upperFirst } from '@react-pdf/fns';
const ALIGN = {
- 'flex-start': Yoga.ALIGN_FLEX_START,
- center: Yoga.ALIGN_CENTER,
- 'flex-end': Yoga.ALIGN_FLEX_END,
- stretch: Yoga.ALIGN_STRETCH,
- baseline: Yoga.ALIGN_BASELINE,
- 'space-between': Yoga.ALIGN_SPACE_BETWEEN,
- 'space-around': Yoga.ALIGN_SPACE_AROUND,
+ 'flex-start': Yoga.Align.FlexStart,
+ center: Yoga.Align.Center,
+ 'flex-end': Yoga.Align.FlexEnd,
+ stretch: Yoga.Align.Stretch,
+ baseline: Yoga.Align.Baseline,
+ 'space-between': Yoga.Align.SpaceBetween,
+ 'space-around': Yoga.Align.SpaceAround,
};
+/**
+ * @typedef {Function} NodeInstanceWrapper
+ * @param {Object} node node instance
+ * @returns {Object} node instance
+ */
+
+/**
+ * @typedef {Function} AlignSetter
+ * @param {string} value align value
+ * @returns {NodeInstanceWrapper} node instance wrapper
+ */
+
/**
* Set generic align attribute to node's Yoga instance
*
- * @param {String} specific align property
- * @param {String} align value
- * @param {Object} node instance
- * @return {Object} node instance
+ * @param {string} attr specific align property
+ * @returns {AlignSetter} align setter
*/
-const setAlign = attr => value => node => {
+const setAlign = (attr) => (value) => (node) => {
const { yogaNode } = node;
- const defaultValue = attr === 'items' ? Yoga.ALIGN_STRETCH : Yoga.ALIGN_AUTO;
+ const defaultValue = attr === 'items' ? Yoga.Align.Stretch : Yoga.Align.Auto;
if (yogaNode) {
const align = ALIGN[value] || defaultValue;
diff --git a/packages/layout/src/node/setAlignContent.js b/packages/layout/src/node/setAlignContent.js
index 96f446d4e..1bba23e09 100644
--- a/packages/layout/src/node/setAlignContent.js
+++ b/packages/layout/src/node/setAlignContent.js
@@ -3,9 +3,9 @@ import setAlign from './setAlign';
/**
* Set align content attribute to node's Yoga instance
*
- * @param {String} align value
+ * @param {string} align value
* @param {Object} node instance
- * @return {Object} node instance
+ * @returns {Object} node instance
*/
const setAlignContent = setAlign('content');
diff --git a/packages/layout/src/node/setAlignItems.js b/packages/layout/src/node/setAlignItems.js
index b2ede1307..239409524 100644
--- a/packages/layout/src/node/setAlignItems.js
+++ b/packages/layout/src/node/setAlignItems.js
@@ -3,9 +3,9 @@ import setAlign from './setAlign';
/**
* Set align items attribute to node's Yoga instance
*
- * @param {String} align value
+ * @param {string} align value
* @param {Object} node instance
- * @return {Object} node instance
+ * @returns {Object} node instance
*/
const setAlignItems = setAlign('items');
diff --git a/packages/layout/src/node/setAlignSelf.js b/packages/layout/src/node/setAlignSelf.js
index 8138d5cb4..7aba87f63 100644
--- a/packages/layout/src/node/setAlignSelf.js
+++ b/packages/layout/src/node/setAlignSelf.js
@@ -3,9 +3,9 @@ import setAlign from './setAlign';
/**
* Set align self attribute to node's Yoga instance
*
- * @param {String} align value
+ * @param {string} align value
* @param {Object} node instance
- * @return {Object} node instance
+ * @returns {Object} node instance
*/
const setAlignSelf = setAlign('self');
diff --git a/packages/layout/src/node/setAspectRatio.js b/packages/layout/src/node/setAspectRatio.js
index 18ec5d591..36b4d361e 100644
--- a/packages/layout/src/node/setAspectRatio.js
+++ b/packages/layout/src/node/setAspectRatio.js
@@ -1,13 +1,18 @@
import { isNil } from '@react-pdf/fns';
+/**
+ * @typedef {Function} NodeInstanceWrapper
+ * @param {Object} node node instance
+ * @returns {Object} node instance
+ */
+
/**
* Set aspect ratio attribute to node's Yoga instance
*
- * @param {Number} ratio
- * @param {Object} node instance
- * @return {Object} node instance
+ * @param {number} value ratio
+ * @returns {NodeInstanceWrapper} node instance wrapper
*/
-const setAspectRatio = value => node => {
+const setAspectRatio = (value) => (node) => {
const { yogaNode } = node;
if (!isNil(value) && yogaNode) {
diff --git a/packages/layout/src/node/setBorderWidth.js b/packages/layout/src/node/setBorderWidth.js
index ba69c3ccf..a3691a499 100644
--- a/packages/layout/src/node/setBorderWidth.js
+++ b/packages/layout/src/node/setBorderWidth.js
@@ -1,51 +1,56 @@
-import Yoga from '@react-pdf/yoga';
+import * as Yoga from 'yoga-layout';
import setYogaValue from './setYogaValue';
+/**
+ * @typedef {Function} NodeInstanceWrapper
+ * @param {Object} node node instance
+ * @returns {Object} node instance
+ */
+
/**
* Set border top attribute to node's Yoga instance
*
- * @param {Number} border top width
- * @param {Object} node instance
- * @return {Object} node instance
+ * @param {number} border border top width
+ * @param {Object} node node instance
+ * @returns {Object} node instance
*/
-export const setBorderTop = setYogaValue('border', Yoga.EDGE_TOP);
+export const setBorderTop = setYogaValue('border', Yoga.Edge.Top);
/**
* Set border right attribute to node's Yoga instance
*
- * @param {Number} border right width
- * @param {Object} node instance
- * @return {Object} node instance
+ * @param {number} border border right width
+ * @param {Object} node node instance
+ * @returns {Object} node instance
*/
-export const setBorderRight = setYogaValue('border', Yoga.EDGE_RIGHT);
+export const setBorderRight = setYogaValue('border', Yoga.Edge.Right);
/**
* Set border bottom attribute to node's Yoga instance
*
- * @param {Number} border bottom width
- * @param {Object} node instance
- * @return {Object} node instance
+ * @param {number} border border bottom width
+ * @param {Object} node node instance
+ * @returns {Object} node instance
*/
-export const setBorderBottom = setYogaValue('border', Yoga.EDGE_BOTTOM);
+export const setBorderBottom = setYogaValue('border', Yoga.Edge.Bottom);
/**
* Set border left attribute to node's Yoga instance
*
- * @param {Number} border left width
- * @param {Object} node instance
- * @return {Object} node instance
+ * @param {number} border border left width
+ * @param {Object} node node instance
+ * @returns {Object} node instance
*/
-export const setBorderLeft = setYogaValue('border', Yoga.EDGE_LEFT);
+export const setBorderLeft = setYogaValue('border', Yoga.Edge.Left);
/**
* Set all border widths at once
*
- * @param {Number} border width
- * @param {Object} node instance
- * @return {Object} node instance
+ * @param {number | string} width border width
+ * @returns {NodeInstanceWrapper} node instance wrapper
*/
-export const setBorder = width => node => {
+export const setBorder = (width) => (node) => {
setBorderTop(width)(node);
setBorderRight(width)(node);
setBorderBottom(width)(node);
diff --git a/packages/layout/src/node/setDimension.js b/packages/layout/src/node/setDimension.js
index 5b3e962ff..bb8c8b207 100644
--- a/packages/layout/src/node/setDimension.js
+++ b/packages/layout/src/node/setDimension.js
@@ -3,53 +3,53 @@ import setYogaValue from './setYogaValue';
/**
* Set width to node's Yoga instance
*
- * @param {Number} width
+ * @param {number} width
* @param {Object} node instance
- * @return {Object} node instance
+ * @returns {Object} node instance
*/
export const setWidth = setYogaValue('width');
/**
* Set min width to node's Yoga instance
*
- * @param {Number} min width
+ * @param {number} min width
* @param {Object} node instance
- * @return {Object} node instance
+ * @returns {Object} node instance
*/
export const setMinWidth = setYogaValue('minWidth');
/**
* Set max width to node's Yoga instance
*
- * @param {Number} max width
+ * @param {number} max width
* @param {Object} node instance
- * @return {Object} node instance
+ * @returns {Object} node instance
*/
export const setMaxWidth = setYogaValue('maxWidth');
/**
* Set height to node's Yoga instance
*
- * @param {Number} height
+ * @param {number} height
* @param {Object} node instance
- * @return {Object} node instance
+ * @returns {Object} node instance
*/
export const setHeight = setYogaValue('height');
/**
* Set min height to node's Yoga instance
*
- * @param {Number} min height
+ * @param {number} min height
* @param {Object} node instance
- * @return {Object} node instance
+ * @returns {Object} node instance
*/
export const setMinHeight = setYogaValue('minHeight');
/**
* Set max height to node's Yoga instance
*
- * @param {Number} max height
+ * @param {number} max height
* @param {Object} node instance
- * @return {Object} node instance
+ * @returns {Object} node instance
*/
export const setMaxHeight = setYogaValue('maxHeight');
diff --git a/packages/layout/src/node/setDisplay.js b/packages/layout/src/node/setDisplay.js
index 6357d8c67..9d4973d9c 100644
--- a/packages/layout/src/node/setDisplay.js
+++ b/packages/layout/src/node/setDisplay.js
@@ -1,18 +1,23 @@
-import Yoga from '@react-pdf/yoga';
+import * as Yoga from 'yoga-layout';
+
+/**
+ * @typedef {Function} NodeInstanceWrapper
+ * @param {Object} node node instance
+ * @returns {Object} node instance
+ */
/**
* Set display attribute to node's Yoga instance
*
- * @param {String} display
- * @param {Object} node instance
- * @return {Object} node instance
+ * @param {string} value display
+ * @returns {NodeInstanceWrapper} node instance wrapper
*/
-const setDisplay = value => node => {
+const setDisplay = (value) => (node) => {
const { yogaNode } = node;
if (yogaNode) {
yogaNode.setDisplay(
- value === 'none' ? Yoga.DISPLAY_NONE : Yoga.DISPLAY_FLEX,
+ value === 'none' ? Yoga.Display.None : Yoga.Display.Flex,
);
}
diff --git a/packages/layout/src/node/setFlexBasis.js b/packages/layout/src/node/setFlexBasis.js
index b273c351e..e26958ce7 100644
--- a/packages/layout/src/node/setFlexBasis.js
+++ b/packages/layout/src/node/setFlexBasis.js
@@ -3,9 +3,9 @@ import setYogaValue from './setYogaValue';
/**
* Set flex basis attribute to node's Yoga instance
*
- * @param {Number} flex basis value
+ * @param {number} flex basis value
* @param {Object} node instance
- * @return {Object} node instance
+ * @returns {Object} node instance
*/
const setFlexBasis = setYogaValue('flexBasis');
diff --git a/packages/layout/src/node/setFlexDirection.js b/packages/layout/src/node/setFlexDirection.js
index 6cb30d8b3..8ec137a3e 100644
--- a/packages/layout/src/node/setFlexDirection.js
+++ b/packages/layout/src/node/setFlexDirection.js
@@ -1,23 +1,28 @@
-import Yoga from '@react-pdf/yoga';
+import * as Yoga from 'yoga-layout';
const FLEX_DIRECTIONS = {
- row: Yoga.FLEX_DIRECTION_ROW,
- 'row-reverse': Yoga.FLEX_DIRECTION_ROW_REVERSE,
- 'column-reverse': Yoga.FLEX_DIRECTION_COLUMN_REVERSE,
+ row: Yoga.FlexDirection.Row,
+ 'row-reverse': Yoga.FlexDirection.RowReverse,
+ 'column-reverse': Yoga.FlexDirection.ColumnReverse,
};
+/**
+ * @typedef {Function} NodeInstanceWrapper
+ * @param {Object} node node instance
+ * @returns {Object} node instance
+ */
+
/**
* Set flex direction attribute to node's Yoga instance
*
- * @param {String} flex direction value
- * @param {Object} node instance
- * @return {Object} node instance
+ * @param {string} value flex direction value
+ * @returns {NodeInstanceWrapper} node instance wrapper
*/
-const setFlexDirection = value => node => {
+const setFlexDirection = (value) => (node) => {
const { yogaNode } = node;
if (yogaNode) {
- const flexDirection = FLEX_DIRECTIONS[value] || Yoga.FLEX_DIRECTION_COLUMN;
+ const flexDirection = FLEX_DIRECTIONS[value] || Yoga.FlexDirection.Column;
yogaNode.setFlexDirection(flexDirection);
}
diff --git a/packages/layout/src/node/setFlexGrow.js b/packages/layout/src/node/setFlexGrow.js
index 87aa1fc6b..67f080939 100644
--- a/packages/layout/src/node/setFlexGrow.js
+++ b/packages/layout/src/node/setFlexGrow.js
@@ -1,13 +1,18 @@
import setYogaValue from './setYogaValue';
+/**
+ * @typedef {Function} NodeInstanceWrapper
+ * @param {Object} node node instance
+ * @returns {Object} node instance
+ */
+
/**
* Set flex grow attribute to node's Yoga instance
*
- * @param {Number} flex grow value
- * @param {Object} node instance
- * @return {Object} node instance
+ * @param {number} value flex grow value
+ * @returns {NodeInstanceWrapper} node instance wrapper
*/
-const setFlexGrow = value => node => {
+const setFlexGrow = (value) => (node) => {
return setYogaValue('flexGrow')(value || 0)(node);
};
diff --git a/packages/layout/src/node/setFlexShrink.js b/packages/layout/src/node/setFlexShrink.js
index af3d22eed..01d1a9afc 100644
--- a/packages/layout/src/node/setFlexShrink.js
+++ b/packages/layout/src/node/setFlexShrink.js
@@ -1,13 +1,18 @@
import setYogaValue from './setYogaValue';
+/**
+ * @typedef {Function} NodeInstanceWrapper
+ * @param {Object} node node instance
+ * @returns {Object} node instance
+ */
+
/**
* Set flex shrink attribute to node's Yoga instance
*
- * @param {Number} flex shrink value
- * @param {Object} node instance
- * @return {Object} node instance
+ * @param {number} value flex shrink value
+ * @returns {NodeInstanceWrapper} node instance wrapper
*/
-const setFlexShrink = value => node => {
+const setFlexShrink = (value) => (node) => {
return setYogaValue('flexShrink')(value || 1)(node);
};
diff --git a/packages/layout/src/node/setFlexWrap.js b/packages/layout/src/node/setFlexWrap.js
index 07ad03c5a..787666409 100644
--- a/packages/layout/src/node/setFlexWrap.js
+++ b/packages/layout/src/node/setFlexWrap.js
@@ -1,22 +1,27 @@
-import Yoga from '@react-pdf/yoga';
+import * as Yoga from 'yoga-layout';
const FLEX_WRAP = {
- wrap: Yoga.WRAP_WRAP,
- 'wrap-reverse': Yoga.WRAP_WRAP_REVERSE,
+ wrap: Yoga.Wrap.Wrap,
+ 'wrap-reverse': Yoga.Wrap.WrapReverse,
};
+/**
+ * @typedef {Function} NodeInstanceWrapper
+ * @param {Object} node node instance
+ * @returns {Object} node instance
+ */
+
/**
* Set flex wrap attribute to node's Yoga instance
*
- * @param {String} flex wrap value
- * @param {Object} node instance
- * @return {Object} node instance
+ * @param {string} value flex wrap value
+ * @returns {NodeInstanceWrapper} node instance wrapper
*/
-const setFlexWrap = value => node => {
+const setFlexWrap = (value) => (node) => {
const { yogaNode } = node;
if (yogaNode) {
- const flexWrap = FLEX_WRAP[value] || Yoga.WRAP_NO_WRAP;
+ const flexWrap = FLEX_WRAP[value] || Yoga.Wrap.NoWrap;
yogaNode.setFlexWrap(flexWrap);
}
diff --git a/packages/layout/src/node/setGap.js b/packages/layout/src/node/setGap.js
index d40e17608..021333c8b 100644
--- a/packages/layout/src/node/setGap.js
+++ b/packages/layout/src/node/setGap.js
@@ -1,6 +1,19 @@
-import Yoga from '@react-pdf/yoga';
+import * as Yoga from 'yoga-layout';
import { isNil, matchPercent } from '@react-pdf/fns';
+/**
+ * @typedef {Function} NodeInstanceWrapper
+ * @param {Object} node node instance
+ * @returns {Object} node instance
+ */
+
+/**
+ * Check if value is a percentage and throw error if so
+ *
+ * @param {string} attr property
+ * @param {unknown} value
+ * @returns {void}
+ */
const checkPercents = (attr, value) => {
const percent = matchPercent(value);
@@ -12,16 +25,15 @@ const checkPercents = (attr, value) => {
/**
* Set rowGap value to node's Yoga instance
*
- * @param {Number} gap value
- * @param {Object} node instance
- * @return {Object} node instance
+ * @param {number} value gap value
+ * @returns {NodeInstanceWrapper} node instance wrapper
*/
-export const setRowGap = value => node => {
+export const setRowGap = (value) => (node) => {
const { yogaNode } = node;
if (!isNil(value) && yogaNode) {
checkPercents('rowGap', value);
- yogaNode.setGap(Yoga.GUTTER_ROW, value);
+ yogaNode.setGap(Yoga.Gutter.Row, value);
}
return node;
@@ -30,16 +42,15 @@ export const setRowGap = value => node => {
/**
* Set columnGap value to node's Yoga instance
*
- * @param {Number} gap value
- * @param {Object} node instance
- * @return {Object} node instance
+ * @param {number} value gap value
+ * @returns {NodeInstanceWrapper} node instance wrapper
*/
-export const setColumnGap = value => node => {
+export const setColumnGap = (value) => (node) => {
const { yogaNode } = node;
if (!isNil(value) && yogaNode) {
checkPercents('columnGap', value);
- yogaNode.setGap(Yoga.GUTTER_COLUMN, value);
+ yogaNode.setGap(Yoga.Gutter.Column, value);
}
return node;
diff --git a/packages/layout/src/node/setJustifyContent.js b/packages/layout/src/node/setJustifyContent.js
index 2edcfae6d..a1638f65f 100644
--- a/packages/layout/src/node/setJustifyContent.js
+++ b/packages/layout/src/node/setJustifyContent.js
@@ -1,26 +1,31 @@
-import Yoga from '@react-pdf/yoga';
+import * as Yoga from 'yoga-layout';
import { isNil } from '@react-pdf/fns';
const JUSTIFY_CONTENT = {
- center: Yoga.JUSTIFY_CENTER,
- 'flex-end': Yoga.JUSTIFY_FLEX_END,
- 'space-between': Yoga.JUSTIFY_SPACE_BETWEEN,
- 'space-around': Yoga.JUSTIFY_SPACE_AROUND,
- 'space-evenly': Yoga.JUSTIFY_SPACE_EVENLY,
+ center: Yoga.Justify.Center,
+ 'flex-end': Yoga.Justify.FlexEnd,
+ 'space-between': Yoga.Justify.SpaceBetween,
+ 'space-around': Yoga.Justify.SpaceAround,
+ 'space-evenly': Yoga.Justify.SpaceEvenly,
};
+/**
+ * @typedef {Function} NodeInstanceWrapper
+ * @param {Object} node node instance
+ * @returns {Object} node instance
+ */
+
/**
* Set justify content attribute to node's Yoga instance
*
- * @param {String} justify content value
- * @param {Object} node instance
- * @return {Object} node instance
+ * @param {string} value justify content value
+ * @returns {NodeInstanceWrapper} node instance wrapper
*/
-const setJustifyContent = value => node => {
+const setJustifyContent = (value) => (node) => {
const { yogaNode } = node;
if (!isNil(value) && yogaNode) {
- const justifyContent = JUSTIFY_CONTENT[value] || Yoga.JUSTIFY_FLEX_START;
+ const justifyContent = JUSTIFY_CONTENT[value] || Yoga.Justify.FlexStart;
yogaNode.setJustifyContent(justifyContent);
}
diff --git a/packages/layout/src/node/setMargin.js b/packages/layout/src/node/setMargin.js
index 2750d0c65..77ee525c2 100644
--- a/packages/layout/src/node/setMargin.js
+++ b/packages/layout/src/node/setMargin.js
@@ -1,51 +1,56 @@
-import Yoga from '@react-pdf/yoga';
+import * as Yoga from 'yoga-layout';
import setYogaValue from './setYogaValue';
+/**
+ * @typedef {Function} NodeInstanceWrapper
+ * @param {Object} node node instance
+ * @returns {Object} node instance
+ */
+
/**
* Set margin top attribute to node's Yoga instance
*
- * @param {Number} margin top
- * @param {Object} node instance
- * @return {Object} node instance
+ * @param {number} margin margin top
+ * @param {Object} node node instance
+ * @returns {Object} node instance
*/
-export const setMarginTop = setYogaValue('margin', Yoga.EDGE_TOP);
+export const setMarginTop = setYogaValue('margin', Yoga.Edge.Top);
/**
* Set margin right attribute to node's Yoga instance
*
- * @param {Number} margin right
- * @param {Object} node instance
- * @return {Object} node instance
+ * @param {number} margin margin right
+ * @param {Object} node node instance
+ * @returns {Object} node instance
*/
-export const setMarginRight = setYogaValue('margin', Yoga.EDGE_RIGHT);
+export const setMarginRight = setYogaValue('margin', Yoga.Edge.Right);
/**
* Set margin bottom attribute to node's Yoga instance
*
- * @param {Number} margin bottom
- * @param {Object} node instance
- * @return {Object} node instance
+ * @param {number} margin margin bottom
+ * @param {Object} node node instance
+ * @returns {Object} node instance
*/
-export const setMarginBottom = setYogaValue('margin', Yoga.EDGE_BOTTOM);
+export const setMarginBottom = setYogaValue('margin', Yoga.Edge.Bottom);
/**
* Set margin left attribute to node's Yoga instance
*
- * @param {Number} margin left
- * @param {Object} node instance
- * @return {Object} node instance
+ * @param {number} margin margin left
+ * @param {Object} node node instance
+ * @returns {Object} node instance
*/
-export const setMarginLeft = setYogaValue('margin', Yoga.EDGE_LEFT);
+export const setMarginLeft = setYogaValue('margin', Yoga.Edge.Left);
/**
* Set all margins at once
*
- * @param {Number} margin
- * @param {Object} node instance
- * @return {Object} node instance
+ * @param {number | string} margin margin
+ * @returns {NodeInstanceWrapper} node instance wrapper
*/
-export const setMargin = margin => node => {
+export const setMargin = (margin) => (node) => {
setMarginTop(margin)(node);
setMarginRight(margin)(node);
setMarginBottom(margin)(node);
diff --git a/packages/layout/src/node/setOverflow.js b/packages/layout/src/node/setOverflow.js
index d14ab4a10..1f2263d83 100644
--- a/packages/layout/src/node/setOverflow.js
+++ b/packages/layout/src/node/setOverflow.js
@@ -1,23 +1,28 @@
-import Yoga from '@react-pdf/yoga';
+import * as Yoga from 'yoga-layout';
import { isNil } from '@react-pdf/fns';
const OVERFLOW = {
- hidden: Yoga.OVERFLOW_HIDDEN,
- scroll: Yoga.OVERFLOW_SCROLL,
+ hidden: Yoga.Overflow.Hidden,
+ scroll: Yoga.Overflow.Scroll,
};
+/**
+ * @typedef {Function} NodeInstanceWrapper
+ * @param {Object} node node instance
+ * @returns {Object} node instance
+ */
+
/**
* Set overflow attribute to node's Yoga instance
*
- * @param {String} overflow value
- * @param {Object} node instance
- * @return {Object} node instance
+ * @param {string} value overflow value
+ * @returns {NodeInstanceWrapper} node instance wrapper
*/
-const setOverflow = value => node => {
+const setOverflow = (value) => (node) => {
const { yogaNode } = node;
if (!isNil(value) && yogaNode) {
- const overflow = OVERFLOW[value] || Yoga.OVERFLOW_VISIBLE;
+ const overflow = OVERFLOW[value] || Yoga.Overflow.Visible;
yogaNode.setOverflow(overflow);
}
diff --git a/packages/layout/src/node/setPadding.js b/packages/layout/src/node/setPadding.js
index 4858266b2..6979beb77 100644
--- a/packages/layout/src/node/setPadding.js
+++ b/packages/layout/src/node/setPadding.js
@@ -1,51 +1,56 @@
-import Yoga from '@react-pdf/yoga';
+import * as Yoga from 'yoga-layout';
import setYogaValue from './setYogaValue';
+/**
+ * @typedef {Function} NodeInstanceWrapper
+ * @param {Object} node node instance
+ * @returns {Object} node instance
+ */
+
/**
* Set padding top attribute to node's Yoga instance
*
- * @param {Number} padding top
- * @param {Object} node instance
- * @return {Object} node instance
+ * @param {number} padding padding top
+ * @param {Object} node node instance
+ * @returns {Object} node instance
*/
-export const setPaddingTop = setYogaValue('padding', Yoga.EDGE_TOP);
+export const setPaddingTop = setYogaValue('padding', Yoga.Edge.Top);
/**
* Set padding right attribute to node's Yoga instance
*
- * @param {Number} padding right
- * @param {Object} node instance
- * @return {Object} node instance
+ * @param {number} padding padding right
+ * @param {Object} node node instance
+ * @returns {Object} node instance
*/
-export const setPaddingRight = setYogaValue('padding', Yoga.EDGE_RIGHT);
+export const setPaddingRight = setYogaValue('padding', Yoga.Edge.Right);
/**
* Set padding bottom attribute to node's Yoga instance
*
- * @param {Number} padding bottom
- * @param {Object} node instance
- * @return {Object} node instance
+ * @param {number} padding padding bottom
+ * @param {Object} node node instance
+ * @returns {Object} node instance
*/
-export const setPaddingBottom = setYogaValue('padding', Yoga.EDGE_BOTTOM);
+export const setPaddingBottom = setYogaValue('padding', Yoga.Edge.Bottom);
/**
* Set padding left attribute to node's Yoga instance
*
- * @param {Number} padding left
- * @param {Object} node instance
- * @return {Object} node instance
+ * @param {number} padding padding left
+ * @param {Object} node node instance
+ * @returns {Object} node instance
*/
-export const setPaddingLeft = setYogaValue('padding', Yoga.EDGE_LEFT);
+export const setPaddingLeft = setYogaValue('padding', Yoga.Edge.Left);
/**
* Set all paddings at once
*
- * @param {Number} margin
- * @param {Object} node instance
- * @return {Object} node instance
+ * @param {number | string} padding padding
+ * @returns {NodeInstanceWrapper} node instance wrapper
*/
-export const setPadding = padding => node => {
+export const setPadding = (padding) => (node) => {
setPaddingTop(padding)(node);
setPaddingRight(padding)(node);
setPaddingBottom(padding)(node);
diff --git a/packages/layout/src/node/setPosition.js b/packages/layout/src/node/setPosition.js
index c9640a392..ce5dce518 100644
--- a/packages/layout/src/node/setPosition.js
+++ b/packages/layout/src/node/setPosition.js
@@ -1,51 +1,56 @@
-import Yoga from '@react-pdf/yoga';
+import * as Yoga from 'yoga-layout';
import setYogaValue from './setYogaValue';
+/**
+ * @typedef {Function} NodeInstanceWrapper
+ * @param {Object} node node instance
+ * @returns {Object} node instance
+ */
+
/**
* Set position top attribute to node's Yoga instance
*
- * @param {Number} position top
- * @param {Object} node instance
- * @return {Object} node instance
+ * @param {number} position position top
+ * @param {Object} node node instance
+ * @returns {Object} node instance
*/
-export const setPositionTop = setYogaValue('position', Yoga.EDGE_TOP);
+export const setPositionTop = setYogaValue('position', Yoga.Edge.Top);
/**
* Set position right attribute to node's Yoga instance
*
- * @param {Number} position right
- * @param {Object} node instance
- * @return {Object} node instance
+ * @param {number} position position right
+ * @param {Object} node node instance
+ * @returns {Object} node instance
*/
-export const setPositionRight = setYogaValue('position', Yoga.EDGE_RIGHT);
+export const setPositionRight = setYogaValue('position', Yoga.Edge.Right);
/**
* Set position bottom attribute to node's Yoga instance
*
- * @param {Number} position bottom
- * @param {Object} node instance
- * @return {Object} node instance
+ * @param {number} position position bottom
+ * @param {Object} node node instance
+ * @returns {Object} node instance
*/
-export const setPositionBottom = setYogaValue('position', Yoga.EDGE_BOTTOM);
+export const setPositionBottom = setYogaValue('position', Yoga.Edge.Bottom);
/**
* Set position left attribute to node's Yoga instance
*
- * @param {Number} position left
- * @param {Object} node instance
- * @return {Object} node instance
+ * @param {number} position position left
+ * @param {Object} node node instance
+ * @returns {Object} node instance
*/
-export const setPositionLeft = setYogaValue('position', Yoga.EDGE_LEFT);
+export const setPositionLeft = setYogaValue('position', Yoga.Edge.Left);
/**
* Set all positions at once
*
- * @param {Number} position
- * @param {Object} node instance
- * @return {Object} node instance
+ * @param {number | string} position position
+ * @returns {NodeInstanceWrapper} node instance wrapper
*/
-export const setPosition = position => node => {
+export const setPosition = (position) => (node) => {
setPositionTop(position)(node);
setPositionRight(position)(node);
setPositionBottom(position)(node);
diff --git a/packages/layout/src/node/setPositionType.js b/packages/layout/src/node/setPositionType.js
index 4c54ad15c..e41f99a8a 100644
--- a/packages/layout/src/node/setPositionType.js
+++ b/packages/layout/src/node/setPositionType.js
@@ -1,21 +1,26 @@
-import Yoga from '@react-pdf/yoga';
+import * as Yoga from 'yoga-layout';
import { isNil } from '@react-pdf/fns';
+/**
+ * @typedef {Function} NodeInstanceWrapper
+ * @param {Object} node node instance
+ * @returns {Object} node instance
+ */
+
/**
* Set position type attribute to node's Yoga instance
*
- * @param {String} position type
- * @param {Object} node instance
- * @return {Object} node instance
+ * @param {string} value position position type
+ * @returns {NodeInstanceWrapper} node instance wrapper
*/
-const setPositionType = value => node => {
+const setPositionType = (value) => (node) => {
const { yogaNode } = node;
if (!isNil(value) && yogaNode) {
yogaNode.setPositionType(
value === 'absolute'
- ? Yoga.POSITION_TYPE_ABSOLUTE
- : Yoga.POSITION_TYPE_RELATIVE,
+ ? Yoga.PositionType.Absolute
+ : Yoga.PositionType.Relative,
);
}
diff --git a/packages/layout/src/node/setYogaValue.js b/packages/layout/src/node/setYogaValue.js
index cbb842500..538a4663b 100644
--- a/packages/layout/src/node/setYogaValue.js
+++ b/packages/layout/src/node/setYogaValue.js
@@ -1,16 +1,26 @@
/* eslint-disable no-unused-expressions */
import { isNil, upperFirst, matchPercent } from '@react-pdf/fns';
+/**
+ * @typedef {Function} NodeInstanceWrapper
+ * @param {Object} node node instance
+ * @returns {Object} node instance
+ */
+
+/**
+ * @typedef {Function} YogaValueSetter
+ * @param {any} value
+ * @returns {NodeInstanceWrapper} node instance wrapper
+ */
+
/**
* Set generic yoga attribute to node's Yoga instance, handing `auto`, edges and percentage cases
*
- * @param {String} property
- * @param {Number} edge
- * @param {any} value
- * @param {Object} node instance
- * @return {Object} node instance
+ * @param {string} attr property
+ * @param {number} [edge] edge
+ * @returns {YogaValueSetter} node instance wrapper
*/
-const setYogaValue = (attr, edge) => value => node => {
+const setYogaValue = (attr, edge) => (value) => (node) => {
const { yogaNode } = node;
if (!isNil(value) && yogaNode) {
diff --git a/packages/layout/src/node/shouldBreak.js b/packages/layout/src/node/shouldBreak.js
index f667deb72..d74f6d01d 100644
--- a/packages/layout/src/node/shouldBreak.js
+++ b/packages/layout/src/node/shouldBreak.js
@@ -1,46 +1,47 @@
/* eslint-disable no-continue */
import getWrap from './getWrap';
-import getNodesHeight from './getNodesHeight';
-const getBreak = node => node.props?.break || false;
+const getBreak = (node) => node.props?.break || false;
-const getMinPresenceAhead = node => node.props?.minPresenceAhead;
+const getMinPresenceAhead = (node) => node.props?.minPresenceAhead || 0;
-const defaultPresenceAhead = element => height =>
- Math.min(element.box.height, height);
+const getFurthestEnd = (elements) =>
+ Math.max(...elements.map((node) => node.box.top + node.box.height));
-const getPresenceAhead = (elements, height) => {
- let result = 0;
-
- for (let i = 0; i < elements.length; i += 1) {
- const element = elements[i];
-
- if (!element.box) continue;
-
- const isElementInside = height > element.box.top;
- const presenceAhead =
- element.props.presenceAhead || defaultPresenceAhead(element);
-
- if (element && isElementInside) {
- result += presenceAhead(height - element.box.top);
- }
- }
+const getEndOfMinPresenceAhead = (child) => {
+ return (
+ child.box.top +
+ child.box.height +
+ child.box.marginBottom +
+ getMinPresenceAhead(child)
+ );
+};
- return result;
+const getEndOfPresence = (child, futureElements) => {
+ const afterMinPresenceAhead = getEndOfMinPresenceAhead(child);
+ const endOfFurthestFutureElement = getFurthestEnd(
+ futureElements.filter((node) => !node.props?.fixed),
+ );
+ return Math.min(afterMinPresenceAhead, endOfFurthestFutureElement);
};
const shouldBreak = (child, futureElements, height) => {
- const minPresenceAhead = getMinPresenceAhead(child);
- const presenceAhead = getPresenceAhead(futureElements, height);
- const futureHeight = getNodesHeight(futureElements);
+ if (child.props?.fixed) return false;
+
const shouldSplit = height < child.box.top + child.box.height;
- const shouldWrap = getWrap(child);
+ const canWrap = getWrap(child);
+
+ // Calculate the y coordinate where the desired presence of the child ends
+ const endOfPresence = getEndOfPresence(child, futureElements);
+ // If the child is already at the top of the page, breaking won't improve its presence
+ // (as long as react-pdf does not support breaking into differently sized containers)
+ const breakingImprovesPresence = child.box.top > child.box.marginTop;
return (
getBreak(child) ||
- (!shouldWrap && shouldSplit) ||
- (minPresenceAhead < futureHeight && presenceAhead < minPresenceAhead)
+ (shouldSplit && !canWrap) ||
+ (!shouldSplit && endOfPresence > height && breakingImprovesPresence)
);
};
diff --git a/packages/layout/src/node/splitNode.js b/packages/layout/src/node/splitNode.js
index 872728c86..6b5955ac8 100644
--- a/packages/layout/src/node/splitNode.js
+++ b/packages/layout/src/node/splitNode.js
@@ -1,8 +1,8 @@
import { isNil } from '@react-pdf/fns';
-const getTop = node => node.box?.top || 0;
+const getTop = (node) => node.box?.top || 0;
-const hasFixedHeight = node => !isNil(node.style?.height);
+const hasFixedHeight = (node) => !isNil(node.style?.height);
const splitNode = (node, height) => {
if (!node) return [null, null];
diff --git a/packages/layout/src/page/getContentArea.js b/packages/layout/src/page/getContentArea.js
index f713c1d0b..d1e3d5312 100644
--- a/packages/layout/src/page/getContentArea.js
+++ b/packages/layout/src/page/getContentArea.js
@@ -1,6 +1,6 @@
import getPadding from '../node/getPadding';
-const getContentArea = page => {
+const getContentArea = (page) => {
const height = page.style?.height;
const { paddingTop, paddingBottom } = getPadding(page);
diff --git a/packages/layout/src/page/getOrientation.js b/packages/layout/src/page/getOrientation.js
index 28ad34a3c..6cb49b364 100644
--- a/packages/layout/src/page/getOrientation.js
+++ b/packages/layout/src/page/getOrientation.js
@@ -3,10 +3,10 @@ const VALID_ORIENTATIONS = ['portrait', 'landscape'];
/**
* Get page orientation. Defaults to portrait
*
- * @param { Object } page object
- * @returns { String } page orientation
+ * @param {Object} page object
+ * @returns {string} page orientation
*/
-const getOrientation = page => {
+const getOrientation = (page) => {
const value = page.props?.orientation || 'portrait';
return VALID_ORIENTATIONS.includes(value) ? value : 'portrait';
};
diff --git a/packages/layout/src/page/getSize.js b/packages/layout/src/page/getSize.js
index 85405bef0..76ee76aa6 100644
--- a/packages/layout/src/page/getSize.js
+++ b/packages/layout/src/page/getSize.js
@@ -57,25 +57,25 @@ const PAGE_SIZES = {
/**
* Transforms array into size object
*
- * @param {Array} array
- * @returns {Object} size object with width and height
+ * @param {number[]} v array
+ * @returns {{ width: number, height: number }} size object with width and height
*/
-const toSizeObject = v => ({ width: v[0], height: v[1] });
+const toSizeObject = (v) => ({ width: v[0], height: v[1] });
/**
* Flip size object
*
- * @param {Object} size object
- * @returns {Object} flipped size object
+ * @param {{ width: number, height: number }} v size object
+ * @returns {{ width: number, height: number }} flipped size object
*/
-const flipSizeObject = v => ({ width: v.height, height: v.width });
+const flipSizeObject = (v) => ({ width: v.height, height: v.width });
/**
* Adjust page size to passed DPI
*
- * @param {Object} size object
- * @param {number} dpi
- * @returns {Object} adjusted size object
+ * @param {{ width: number, height: number }} v size object
+ * @param {number} dpi DPI
+ * @returns {{ width: number, height: number }} adjusted size object
*/
const adjustDpi = (v, dpi) => ({
width: v.width ? v.width * dpi : v.width,
@@ -85,34 +85,37 @@ const adjustDpi = (v, dpi) => ({
/**
* Returns size object from a given string
*
- * @param {String} page size string
- * @returns {Object} size object with width and height
+ * @param {string} v page size string
+ * @returns {{ width: number, height: number }} size object with width and height
*/
-const getStringSize = v => {
+const getStringSize = (v) => {
return toSizeObject(PAGE_SIZES[v.toUpperCase()]);
};
/**
* Returns size object from a single number
*
- * @param {Number} page size number
- * @returns {Object} size object with width and height
+ * @param {number} n page size number
+ * @returns {{ width: number, height: number }} size object with width and height
*/
-const getNumberSize = n => toSizeObject([n]);
+const getNumberSize = (n) => toSizeObject([n]);
/**
* Return page size in an object { width, height }
*
* @param {Object} page instance
- * @returns {Object} size object with width and height
+ * @returns {{ width: number, height: number }} size object with width and height
*/
-const getSize = page => {
+const getSize = (page) => {
const value = page.props?.size || 'A4';
const dpi = parseFloat(page.props?.dpi || 72);
const type = typeof value;
- let size = value;
+ /**
+ * @type {{ width: number, height: number }}
+ */
+ let size;
if (type === 'string') {
size = getStringSize(value);
@@ -120,6 +123,8 @@ const getSize = page => {
size = toSizeObject(value);
} else if (type === 'number') {
size = getNumberSize(value);
+ } else {
+ size = value;
}
size = adjustDpi(size, dpi / 72);
diff --git a/packages/layout/src/page/getWrapArea.js b/packages/layout/src/page/getWrapArea.js
index 53a112cf8..254582080 100644
--- a/packages/layout/src/page/getWrapArea.js
+++ b/packages/layout/src/page/getWrapArea.js
@@ -1,6 +1,6 @@
import getPadding from '../node/getPadding';
-const getWrapArea = page => {
+const getWrapArea = (page) => {
const { paddingBottom } = getPadding(page);
const height = page.style?.height;
return height - paddingBottom;
diff --git a/packages/layout/src/page/isHeightAuto.js b/packages/layout/src/page/isHeightAuto.js
index 7eb221273..7fdeecbc6 100644
--- a/packages/layout/src/page/isHeightAuto.js
+++ b/packages/layout/src/page/isHeightAuto.js
@@ -4,8 +4,8 @@ import { isNil } from '@react-pdf/fns';
* Checks if page has auto height
*
* @param {Object} page
- * @returns {Boolean} is page height auto
+ * @returns {boolean} is page height auto
*/
-const isHeightAuto = page => isNil(page.box?.height);
+const isHeightAuto = (page) => isNil(page.box?.height);
export default isHeightAuto;
diff --git a/packages/layout/src/page/isLandscape.js b/packages/layout/src/page/isLandscape.js
index ac3f7eeac..ff9f75517 100644
--- a/packages/layout/src/page/isLandscape.js
+++ b/packages/layout/src/page/isLandscape.js
@@ -4,8 +4,8 @@ import getOrientation from './getOrientation';
* Return true if page is landscape
*
* @param {Object} page instance
- * @returns {Boolean} is page landscape
+ * @returns {boolean} is page landscape
*/
-const isLandscape = page => getOrientation(page) === 'landscape';
+const isLandscape = (page) => getOrientation(page) === 'landscape';
export default isLandscape;
diff --git a/packages/layout/src/page/isPortrait.js b/packages/layout/src/page/isPortrait.js
index 87323e210..757213e2d 100644
--- a/packages/layout/src/page/isPortrait.js
+++ b/packages/layout/src/page/isPortrait.js
@@ -4,8 +4,8 @@ import getOrientation from './getOrientation';
* Return true if page is portrait
*
* @param {Object} page instance
- * @returns {Boolean} is page portrait
+ * @returns {boolean} is page portrait
*/
-const isPortrait = page => getOrientation(page) === 'portrait';
+const isPortrait = (page) => getOrientation(page) === 'portrait';
export default isPortrait;
diff --git a/packages/layout/src/steps/resolveAssets.js b/packages/layout/src/steps/resolveAssets.js
index 89a3b3412..dd5ccdf30 100644
--- a/packages/layout/src/steps/resolveAssets.js
+++ b/packages/layout/src/steps/resolveAssets.js
@@ -3,13 +3,14 @@ import * as P from '@react-pdf/primitives';
import fetchEmojis from '../text/emoji';
import fetchImage from '../image/fetchImage';
-const isImage = node => node.type === P.Image;
+const isImage = (node) => node.type === P.Image;
/**
* Get all asset promises that need to be resolved
*
- * @param {Object} root node
- * @returns {Array} asset promises
+ * @param {Object} fontStore font store
+ * @param {Object} node root node
+ * @returns {Promise[]} asset promises
*/
const fetchAssets = (fontStore, node) => {
const promises = [];
@@ -36,7 +37,7 @@ const fetchAssets = (fontStore, node) => {
}
if (n.children) {
- n.children.forEach(childNode => {
+ n.children.forEach((childNode) => {
listToExplore.push(childNode);
});
}
@@ -49,9 +50,9 @@ const fetchAssets = (fontStore, node) => {
* Fetch image, font and emoji assets in parallel.
* Layout process will not be resumed until promise resolves.
*
- * @param {Object} root node
+ * @param {Object} node root node
* @param {Object} fontStore font store
- * @returns {Object} root node
+ * @returns {Promise} root node
*/
const resolveAssets = async (node, fontStore) => {
const promises = fetchAssets(fontStore, node);
diff --git a/packages/layout/src/steps/resolveBookmarks.js b/packages/layout/src/steps/resolveBookmarks.js
index 335fa4e37..90c008c00 100644
--- a/packages/layout/src/steps/resolveBookmarks.js
+++ b/packages/layout/src/steps/resolveBookmarks.js
@@ -2,17 +2,17 @@
/* eslint-disable prefer-const */
/* eslint-disable prefer-destructuring */
-const getBookmarkValue = title => {
+const getBookmarkValue = (title) => {
return typeof title === 'string'
? { title, fit: false, expanded: false }
: title;
};
-const resolveBookmarks = node => {
+const resolveBookmarks = (node) => {
let refs = 0;
const children = (node.children || []).slice(0);
- const listToExplore = children.map(value => ({ value, parent: null }));
+ const listToExplore = children.map((value) => ({ value, parent: null }));
while (listToExplore.length > 0) {
const element = listToExplore.shift();
@@ -30,7 +30,7 @@ const resolveBookmarks = node => {
}
if (child.children) {
- child.children.forEach(childNode => {
+ child.children.forEach((childNode) => {
listToExplore.push({ value: childNode, parent });
});
}
diff --git a/packages/layout/src/steps/resolveDimensions.js b/packages/layout/src/steps/resolveDimensions.js
index 7d2102a4b..f818f6842 100644
--- a/packages/layout/src/steps/resolveDimensions.js
+++ b/packages/layout/src/steps/resolveDimensions.js
@@ -1,4 +1,3 @@
-import Yoga from '@react-pdf/yoga';
import * as P from '@react-pdf/primitives';
import { isNil, compose } from '@react-pdf/fns';
@@ -58,11 +57,7 @@ import measureText from '../text/measureText';
import measureImage from '../image/measureImage';
import measureCanvas from '../canvas/measureCanvas';
-const YOGA_CONFIG = Yoga.Config.create();
-
-YOGA_CONFIG.setPointScaleFactor(0);
-
-const isType = type => node => node.type === type;
+const isType = (type) => (node) => node.type === type;
const isSvg = isType(P.Svg);
const isText = isType(P.Text);
@@ -72,7 +67,7 @@ const isImage = isType(P.Image);
const isCanvas = isType(P.Canvas);
const isTextInstance = isType(P.TextInstance);
-const setNodeHeight = node => {
+const setNodeHeight = (node) => {
const value = isPage(node) ? node.box.height : node.style.height;
return setHeight(value);
};
@@ -83,7 +78,7 @@ const setNodeHeight = node => {
* @param {Object} node
* @returns {Object} node
*/
-const setYogaValues = node => {
+const setYogaValues = (node) => {
compose(
setNodeHeight(node),
setWidth(node.style.width),
@@ -125,14 +120,19 @@ const setYogaValues = node => {
)(node);
};
+/**
+ * @typedef {Function} InsertYogaNodes
+ * @param {Object} child child node
+ * @returns {Object} node
+ */
+
/**
* Inserts child into parent' yoga node
*
- * @param {Object} parent
- * @param {Object} node
- * @param {Object} node
+ * @param {Object} parent parent
+ * @returns {InsertYogaNodes} insert yoga nodes
*/
-const insertYogaNodes = parent => child => {
+const insertYogaNodes = (parent) => (child) => {
parent.insertChild(child.yogaNode, parent.getChildCount());
return child;
};
@@ -159,17 +159,23 @@ const setMeasureFunc = (node, page, fontStore) => {
return node;
};
-const isLayoutElement = node => !isText(node) && !isNote(node) && !isSvg(node);
+const isLayoutElement = (node) =>
+ !isText(node) && !isNote(node) && !isSvg(node);
+
+/**
+ * @typedef {Function} CreateYogaNodes
+ * @param {Object} node
+ * @returns {Object} node with appended yoga node
+ */
/**
* Creates and add yoga node to document tree
* Handles measure function for text and image nodes
*
- * @param {Object} node
- * @returns {Object} node with appended yoga node
+ * @returns {CreateYogaNodes} create yoga nodes
*/
-const createYogaNodes = (page, fontStore) => node => {
- const yogaNode = Yoga.Node.createWithConfig(YOGA_CONFIG);
+const createYogaNodes = (page, fontStore, yoga) => (node) => {
+ const yogaNode = yoga.node.create();
const result = Object.assign({}, node, { yogaNode });
@@ -178,7 +184,7 @@ const createYogaNodes = (page, fontStore) => node => {
if (isLayoutElement(node) && node.children) {
const resolveChild = compose(
insertYogaNodes(yogaNode),
- createYogaNodes(page, fontStore),
+ createYogaNodes(page, fontStore, yoga),
);
result.children = node.children.map(resolveChild);
@@ -192,10 +198,10 @@ const createYogaNodes = (page, fontStore) => node => {
/**
* Performs yoga calculation
*
- * @param {Object} node
- * @returns {Object} node
+ * @param {Object} page page node
+ * @returns {Object} page node
*/
-const calculateLayout = page => {
+const calculateLayout = (page) => {
page.yogaNode.calculateLayout();
return page;
};
@@ -206,7 +212,7 @@ const calculateLayout = page => {
* @param {Object} node
* @returns {Object} node with box data
*/
-const persistDimensions = node => {
+const persistDimensions = (node) => {
if (isTextInstance(node)) return node;
const box = Object.assign(
@@ -232,7 +238,7 @@ const persistDimensions = node => {
* @param {Object} node
* @returns {Object} node without yoga node
*/
-const destroyYogaNodes = node => {
+const destroyYogaNodes = (node) => {
const newNode = Object.assign({}, node);
delete newNode.yogaNode;
@@ -250,7 +256,7 @@ const destroyYogaNodes = node => {
* @param {Object} node
* @returns {Object} node without yoga node
*/
-const freeYogaNodes = node => {
+const freeYogaNodes = (node) => {
if (node.yogaNode) node.yogaNode.freeRecursive();
return node;
};
@@ -263,7 +269,7 @@ const freeYogaNodes = node => {
* @param {Object} page object
* @returns {Object} page object with correct 'box' layout attributes
*/
-export const resolvePageDimensions = (page, fontStore) => {
+export const resolvePageDimensions = (page, fontStore, yoga) => {
if (isNil(page)) return null;
return compose(
@@ -271,20 +277,22 @@ export const resolvePageDimensions = (page, fontStore) => {
freeYogaNodes,
persistDimensions,
calculateLayout,
- createYogaNodes(page, fontStore),
+ createYogaNodes(page, fontStore, yoga),
)(page);
};
/**
* Calculates root object layout using Yoga.
*
- * @param {Object} root object
+ * @param {Object} node root object
+ * @param {Object} fontStore font store
* @returns {Object} root object with correct 'box' layout attributes
*/
const resolveDimensions = (node, fontStore) => {
if (!node.children) return node;
- const resolveChild = child => resolvePageDimensions(child, fontStore);
+ const resolveChild = (child) =>
+ resolvePageDimensions(child, fontStore, node.yoga);
const children = node.children.map(resolveChild);
return Object.assign({}, node, { children });
diff --git a/packages/layout/src/steps/resolveInheritance.js b/packages/layout/src/steps/resolveInheritance.js
index 8eb8c497c..7ee6359ac 100644
--- a/packages/layout/src/steps/resolveInheritance.js
+++ b/packages/layout/src/steps/resolveInheritance.js
@@ -1,7 +1,7 @@
import * as P from '@react-pdf/primitives';
import { pick, compose } from '@react-pdf/fns';
-const INHERITED_PROPERTIES = [
+const BASE_INHERITABLE_PROPERTIES = [
'color',
'fontFamily',
'fontSize',
@@ -17,14 +17,21 @@ const INHERITED_PROPERTIES = [
'wordSpacing',
];
-const isSvg = node => node.type === P.Svg;
+const TEXT_INHERITABLE_PROPERTIES = [
+ ...BASE_INHERITABLE_PROPERTIES,
+ 'backgroundColor',
+];
+
+const isSvg = (node) => node.type === P.Svg;
+
+const isText = (node) => node.type === P.Text;
// Merge style values
const mergeValues = (styleName, value, inheritedValue) => {
switch (styleName) {
case 'textDecoration': {
// merge not none and not false textDecoration values to one rule
- return [inheritedValue, value].filter(v => v && v !== 'none').join(' ');
+ return [inheritedValue, value].filter((v) => v && v !== 'none').join(' ');
}
default:
return value;
@@ -47,13 +54,18 @@ const merge = (inheritedStyles, style) => {
};
/**
- * Merges styles with node
- *
- * @param {Object} style object
+ * @typedef {Function} MergeStyles
* @param {Object} node
* @returns {Object} node with styles merged
*/
-const mergeStyles = inheritedStyles => node => {
+
+/**
+ * Merges styles with node
+ *
+ * @param {Object} inheritedStyles style object
+ * @returns {MergeStyles} merge styles function
+ */
+const mergeStyles = (inheritedStyles) => (node) => {
const style = merge(inheritedStyles, node.style || {});
return Object.assign({}, node, { style });
};
@@ -61,15 +73,20 @@ const mergeStyles = inheritedStyles => node => {
/**
* Inherit style values from the root to the leafs
*
- * @param {Object} document root
+ * @param {Object} node document root
* @returns {Object} document root with inheritance
*
*/
-const resolveInheritance = node => {
+const resolveInheritance = (node) => {
if (isSvg(node)) return node;
+
if (!node.children) return node;
- const inheritStyles = pick(INHERITED_PROPERTIES, node.style || {});
+ const inheritableProperties = isText(node)
+ ? TEXT_INHERITABLE_PROPERTIES
+ : BASE_INHERITABLE_PROPERTIES;
+
+ const inheritStyles = pick(inheritableProperties, node.style || {});
const resolveChild = compose(resolveInheritance, mergeStyles(inheritStyles));
diff --git a/packages/layout/src/steps/resolveLinkSubstitution.js b/packages/layout/src/steps/resolveLinkSubstitution.js
index 01e643c14..617b66bca 100644
--- a/packages/layout/src/steps/resolveLinkSubstitution.js
+++ b/packages/layout/src/steps/resolveLinkSubstitution.js
@@ -1,7 +1,7 @@
import * as P from '@react-pdf/primitives';
import { compose } from '@react-pdf/fns';
-const isType = type => node => node.type === type;
+const isType = (type) => (node) => node.type === type;
const isLink = isType(P.Link);
@@ -13,25 +13,25 @@ const isTextInstance = isType(P.TextInstance);
* Checks if node has render prop
*
* @param {Object} node
- * @returns {Boolean} has render prop?
+ * @returns {boolean} has render prop?
*/
-const hasRenderProp = node => !!node.props?.render;
+const hasRenderProp = (node) => !!node.props?.render;
/**
* Checks if node is text type (Text or TextInstance)
*
* @param {Object} node
- * @returns {Boolean} are all children text instances?
+ * @returns {boolean} are all children text instances?
*/
-const isTextType = node => isText(node) || isTextInstance(node);
+const isTextType = (node) => isText(node) || isTextInstance(node);
/**
* Checks if is tet link that needs to be wrapped in Text
*
* @param {Object} node
- * @returns {Boolean} are all children text instances?
+ * @returns {boolean} are all children text instances?
*/
-const isTextLink = node => {
+const isTextLink = (node) => {
const children = node.children || [];
// Text string inside a Link
@@ -47,9 +47,9 @@ const isTextLink = node => {
* Wraps node children inside Text node
*
* @param {Object} node
- * @returns {Boolean} node with intermediate Text child
+ * @returns {boolean} node with intermediate Text child
*/
-const wrapText = node => {
+const wrapText = (node) => {
const textElement = {
type: P.Text,
props: {},
@@ -61,7 +61,7 @@ const wrapText = node => {
return Object.assign({}, node, { children: [textElement] });
};
-const transformLink = node => {
+const transformLink = (node) => {
if (!isLink(node)) return node;
// If has render prop substitute the instance by a Text, that will
@@ -82,7 +82,7 @@ const transformLink = node => {
* @param {Object} node
* @returns {Object} node with link substitution
*/
-const resolveLinkSubstitution = node => {
+const resolveLinkSubstitution = (node) => {
if (!node.children) return node;
const resolveChild = compose(transformLink, resolveLinkSubstitution);
diff --git a/packages/layout/src/steps/resolveOrigins.js b/packages/layout/src/steps/resolveOrigins.js
index cb8820be6..518a6a095 100644
--- a/packages/layout/src/steps/resolveOrigins.js
+++ b/packages/layout/src/steps/resolveOrigins.js
@@ -6,7 +6,7 @@ import getOrigin from '../node/getOrigin';
* @param {Object} node
* @returns {Object} node with origin attribute
*/
-const resolveNodeOrigin = node => {
+const resolveNodeOrigin = (node) => {
const origin = getOrigin(node);
const newNode = Object.assign({}, node, { origin });
@@ -21,11 +21,11 @@ const resolveNodeOrigin = node => {
/**
* Resolve document origins
*
- * @param {Object} document root
- * @returns {Object} documrnt root
+ * @param {Object} root document root
+ * @returns {Object} document root
*/
-const resolveOrigin = root => {
+const resolveOrigin = (root) => {
if (!root.children) return root;
const children = root.children.map(resolveNodeOrigin);
diff --git a/packages/layout/src/steps/resolvePagePaddings.js b/packages/layout/src/steps/resolvePagePaddings.js
index cd38c3554..1881ce9a1 100644
--- a/packages/layout/src/steps/resolvePagePaddings.js
+++ b/packages/layout/src/steps/resolvePagePaddings.js
@@ -1,25 +1,35 @@
import { evolve, matchPercent } from '@react-pdf/fns';
-/*
+/**
+ * @typedef {Function} ResolvePageHorizontalPadding
+ * @param {string} value padding value
+ * @returns {Object} translated padding value
+ */
+
+/**
* Translates page percentage horizontal paddings in fixed ones
*
- * @param {Object} page container
- * @param {String} padding value
- * @returns {Object} translated padding value
+ * @param {Object} container page container
+ * @returns {ResolvePageHorizontalPadding} resolve page horizontal padding
*/
-const resolvePageHorizontalPadding = container => value => {
+const resolvePageHorizontalPadding = (container) => (value) => {
const match = matchPercent(value);
return match ? match.percent * container.width : value;
};
+/**
+ * @typedef {Function} ResolvePageVerticalPadding
+ * @param {string} padding value
+ * @returns {Object} translated padding value
+ */
+
/**
* Translates page percentage vertical paddings in fixed ones
*
- * @param {Object} page container
- * @param {String} padding value
- * @returns {Object} translated padding value
+ * @param {Object} container page container
+ * @returns {ResolvePageVerticalPadding} resolve page vertical padding
*/
-const resolvePageVerticalPadding = container => value => {
+const resolvePageVerticalPadding = (container) => (value) => {
const match = matchPercent(value);
return match ? match.percent * container.height : value;
};
@@ -30,7 +40,7 @@ const resolvePageVerticalPadding = container => value => {
* @param {Object} page
* @returns {Object} page with fixed paddings
*/
-const resolvePagePaddings = page => {
+const resolvePagePaddings = (page) => {
const container = page.style;
const style = evolve(
@@ -51,10 +61,10 @@ const resolvePagePaddings = page => {
* This has to be computed from pages calculated size and not by Yoga
* because at this point we didn't performed pagination yet.
*
- * @param {Object} document root
+ * @param {Object} root document root
* @returns {Object} document root with translated page paddings
*/
-const resolvePagesPaddings = root => {
+const resolvePagesPaddings = (root) => {
if (!root.children) return root;
const children = root.children.map(resolvePagePaddings);
diff --git a/packages/layout/src/steps/resolvePageSizes.js b/packages/layout/src/steps/resolvePageSizes.js
index d24aa4522..b6867c975 100644
--- a/packages/layout/src/steps/resolvePageSizes.js
+++ b/packages/layout/src/steps/resolvePageSizes.js
@@ -7,7 +7,7 @@ import getPageSize from '../page/getSize';
* @param {Object} page
* @returns {Object} page with resolved size in style attribute
*/
-export const resolvePageSize = page => {
+export const resolvePageSize = (page) => {
const size = getPageSize(page);
const style = flatten(page.style || {});
@@ -17,10 +17,10 @@ export const resolvePageSize = page => {
/**
* Resolves page sizes
*
- * @param {Object} document root
+ * @param {Object} root document root
* @returns {Object} document root with resolved page sizes
*/
-const resolvePageSizes = root => {
+const resolvePageSizes = (root) => {
if (!root.children) return root;
const children = root.children.map(resolvePageSize);
diff --git a/packages/layout/src/steps/resolvePagination.js b/packages/layout/src/steps/resolvePagination.js
index 905a742f3..4e3c28dd7 100644
--- a/packages/layout/src/steps/resolvePagination.js
+++ b/packages/layout/src/steps/resolvePagination.js
@@ -1,3 +1,4 @@
+/* eslint-disable no-use-before-define */
/* eslint-disable no-continue */
/* eslint-disable prefer-destructuring */
@@ -15,28 +16,30 @@ import shouldNodeBreak from '../node/shouldBreak';
import resolveTextLayout from './resolveTextLayout';
import resolveInheritance from './resolveInheritance';
import { resolvePageDimensions } from './resolveDimensions';
+import { resolvePageStyles } from './resolveStyles';
-const isText = node => node.type === P.Text;
+const isText = (node) => node.type === P.Text;
// Prevent splitting elements by low decimal numbers
-const SAFTY_THRESHOLD = 0.001;
+const SAFETY_THRESHOLD = 0.001;
const assingChildren = (children, node) =>
Object.assign({}, node, { children });
-const getTop = node => node.box?.top || 0;
+const getTop = (node) => node.box?.top || 0;
-const allFixed = nodes => nodes.every(isFixed);
+const allFixed = (nodes) => nodes.every(isFixed);
-const isDynamic = node => !isNil(node.props?.render);
+const isDynamic = (node) => !isNil(node.props?.render);
const relayoutPage = compose(
resolveTextLayout,
- resolveInheritance,
resolvePageDimensions,
+ resolveInheritance,
+ resolvePageStyles,
);
-const warnUnavailableSpace = node => {
+const warnUnavailableSpace = (node) => {
console.warn(
`Node of type ${node.type} can't wrap between pages and it's bigger than available page height`,
);
@@ -55,7 +58,7 @@ const splitNodes = (height, contentArea, nodes) => {
const nodeHeight = child.box.height;
const isOutside = height <= nodeTop;
const shouldBreak = shouldNodeBreak(child, futureNodes, height);
- const shouldSplit = height + SAFTY_THRESHOLD < nodeTop + nodeHeight;
+ const shouldSplit = height + SAFETY_THRESHOLD < nodeTop + nodeHeight;
const canWrap = canNodeWrap(child);
const fitsInsidePage = nodeHeight <= contentArea;
@@ -142,7 +145,7 @@ const splitView = (node, height, contentArea) => {
const split = (node, height, contentArea) =>
isText(node) ? splitText(node, height) : splitView(node, height, contentArea);
-const shouldResolveDynamicNodes = node => {
+const shouldResolveDynamicNodes = (node) => {
const children = node.children || [];
return isDynamic(node) || children.some(shouldResolveDynamicNodes);
};
@@ -156,10 +159,10 @@ const resolveDynamicNodes = (props, node) => {
const res = node.props.render(props);
return createInstances(res)
.filter(Boolean)
- .map(n => resolveDynamicNodes(props, n));
+ .map((n) => resolveDynamicNodes(props, n));
}
- return children.map(c => resolveDynamicNodes(props, c));
+ return children.map((c) => resolveDynamicNodes(props, c));
};
// We reset dynamic text box so it can be computed again later on
@@ -172,19 +175,19 @@ const resolveDynamicNodes = (props, node) => {
return Object.assign({}, node, { box, lines, children });
};
-const resolveDynamicPage = (props, page, fontStore) => {
+const resolveDynamicPage = (props, page, fontStore, yoga) => {
if (shouldResolveDynamicNodes(page)) {
const resolvedPage = resolveDynamicNodes(props, page);
- return relayoutPage(resolvedPage, fontStore);
+ return relayoutPage(resolvedPage, fontStore, yoga);
}
return page;
};
-const splitPage = (page, pageNumber, fontStore) => {
+const splitPage = (page, pageNumber, fontStore, yoga) => {
const wrapArea = getWrapArea(page);
const contentArea = getContentArea(page);
- const dynamicPage = resolveDynamicPage({ pageNumber }, page, fontStore);
+ const dynamicPage = resolveDynamicPage({ pageNumber }, page, fontStore, yoga);
const height = page.style.height;
const [currentChilds, nextChilds] = splitNodes(
@@ -193,7 +196,7 @@ const splitPage = (page, pageNumber, fontStore) => {
dynamicPage.children,
);
- const relayout = node => relayoutPage(node, fontStore);
+ const relayout = (node) => relayoutPage(node, fontStore, yoga);
const currentBox = { ...page.box, height };
const currentPage = relayout(
@@ -217,7 +220,7 @@ const splitPage = (page, pageNumber, fontStore) => {
return [currentPage, nextPage];
};
-const resolvePageIndices = (fontStore, page, pageNumber, pages) => {
+const resolvePageIndices = (fontStore, yoga, page, pageNumber, pages) => {
const totalPages = pages.length;
const props = {
@@ -227,10 +230,10 @@ const resolvePageIndices = (fontStore, page, pageNumber, pages) => {
subPageTotalPages: page.subPageTotalPages,
};
- return resolveDynamicPage(props, page, fontStore);
+ return resolveDynamicPage(props, page, fontStore, yoga);
};
-const assocSubPageData = subpages => {
+const assocSubPageData = (subpages) => {
return subpages.map((page, i) => ({
...page,
subPageNumber: i,
@@ -238,22 +241,22 @@ const assocSubPageData = subpages => {
}));
};
-const dissocSubPageData = page => {
+const dissocSubPageData = (page) => {
return omit(['subPageNumber', 'subPageTotalPages'], page);
};
-const paginate = (page, pageNumber, fontStore, currentPageCallBack) => {
+const paginate = (page, pageNumber, fontStore, yoga,currentPageCallBack) => {
if (!page) return [];
if (page.props?.wrap === false) return [page];
- let splittedPage = splitPage(page, pageNumber, fontStore);
+ let splittedPage = splitPage(page, pageNumber, fontStore, yoga);
const pages = [splittedPage[0]];
let nextPage = splittedPage[1];
let pageCount = 1;
while (nextPage !== null) {
- splittedPage = splitPage(nextPage, pageNumber + pages.length, fontStore);
+ splittedPage = splitPage(nextPage, pageNumber + pages.length, fontStore,yoga);
pageCount++;
pages.push(splittedPage[0]);
@@ -271,7 +274,7 @@ const paginate = (page, pageNumber, fontStore, currentPageCallBack) => {
* Performs pagination. This is the step responsible of breaking the whole document
* into pages following pagiation rules, such as `fixed`, `break` and dynamic nodes.
*
- * @param {Object} node
+ * @param {Object} doc node
* @param {Object} fontStore font store
* @param {Function} currentPageCallBack Callback to track progress
* @returns {Object} layout node
@@ -282,7 +285,7 @@ const resolvePagination = (doc, fontStore, currentPageCallBack) => {
for (let i = 0; i < doc.children.length; i += 1) {
const page = doc.children[i];
- let subpages = paginate(page, pageNumber, fontStore, currentPageCallBack);
+ let subpages = paginate(page, pageNumber, fontStore, doc.yoga, currentPageCallBack);
subpages = assocSubPageData(subpages);
pageNumber += subpages.length;
@@ -290,7 +293,7 @@ const resolvePagination = (doc, fontStore, currentPageCallBack) => {
}
pages = pages.map((...args) =>
- dissocSubPageData(resolvePageIndices(fontStore, ...args)),
+ dissocSubPageData(resolvePageIndices(fontStore, doc.yoga, ...args)),
);
return assingChildren(pages, doc);
diff --git a/packages/layout/src/steps/resolvePercentHeight.js b/packages/layout/src/steps/resolvePercentHeight.js
index 134092ce6..5d79daa1b 100644
--- a/packages/layout/src/steps/resolvePercentHeight.js
+++ b/packages/layout/src/steps/resolvePercentHeight.js
@@ -3,8 +3,8 @@ import { isNil, matchPercent } from '@react-pdf/fns';
/**
* Transform percent height into fixed
*
- * @param {String | number} height
- * @return {number} height
+ * @param {number} height
+ * @returns {number} height
*/
const transformHeight = (pageArea, height) => {
const match = matchPercent(height);
@@ -15,9 +15,9 @@ const transformHeight = (pageArea, height) => {
* Get page area (height minus paddings)
*
* @param {Object} page
- * @return {number} page area
+ * @returns {number} page area
*/
-const getPageArea = page => {
+const getPageArea = (page) => {
const pageHeight = page.style.height;
const pagePaddingTop = page.style?.paddingTop || 0;
const pagePaddingBottom = page.style?.paddingBottom || 0;
@@ -30,7 +30,7 @@ const getPageArea = page => {
*
* @param {Object} page
* @param {Object} node
- * @return {Object} transformed node
+ * @returns {Object} transformed node
*/
const resolveNodePercentHeight = (page, node) => {
if (isNil(page.style?.height)) return node;
@@ -47,12 +47,12 @@ const resolveNodePercentHeight = (page, node) => {
* Transform page immediate children with percent height to fixed
*
* @param {Object} page
- * @return {Object} transformed page
+ * @returns {Object} transformed page
*/
-const resolvePagePercentHeight = page => {
+const resolvePagePercentHeight = (page) => {
if (!page.children) return page;
- const resolveChild = child => resolveNodePercentHeight(page, child);
+ const resolveChild = (child) => resolveNodePercentHeight(page, child);
const children = page.children.map(resolveChild);
return Object.assign({}, page, { children });
@@ -62,10 +62,10 @@ const resolvePagePercentHeight = page => {
* Transform all page immediate children with percent height to fixed.
* This is needed for computing correct dimensions on pre-pagination layout.
*
- * @param {Object} document root
- * @return {Object} transformed document root
+ * @param {Object} root document root
+ * @returns {Object} transformed document root
*/
-const resolvePercentHeight = root => {
+const resolvePercentHeight = (root) => {
if (!root.children) return root;
const children = root.children.map(resolvePagePercentHeight);
diff --git a/packages/layout/src/steps/resolvePercentRadius.js b/packages/layout/src/steps/resolvePercentRadius.js
index 02e5af938..ba38b0e8c 100644
--- a/packages/layout/src/steps/resolvePercentRadius.js
+++ b/packages/layout/src/steps/resolvePercentRadius.js
@@ -1,12 +1,17 @@
import { evolve, matchPercent } from '@react-pdf/fns';
+/**
+ * @typedef {Function} ResolveRadius
+ * @param {string | number} value border radius value
+ * @returns {number} resolved radius value
+ */
+
/**
*
- * @param {Object} container width and height
- * @param {String | Number} value border radius value
- * @returns {Number} fixed border radius value
+ * @param {{ width: number, height: number }} container width and height
+ * @returns {ResolveRadius} resolve radius function
*/
-const resolveRadius = container => value => {
+const resolveRadius = (container) => (value) => {
if (!value) return undefined;
const match = matchPercent(value);
@@ -22,7 +27,7 @@ const resolveRadius = container => value => {
* @param {Object} node
* @returns {Object} node
*/
-const resolvePercentRadius = node => {
+const resolvePercentRadius = (node) => {
const style = evolve(
{
borderTopLeftRadius: resolveRadius(node.box),
diff --git a/packages/layout/src/steps/resolveStyles.js b/packages/layout/src/steps/resolveStyles.js
index 46b23a877..1c24b3c8d 100644
--- a/packages/layout/src/steps/resolveStyles.js
+++ b/packages/layout/src/steps/resolveStyles.js
@@ -1,7 +1,7 @@
import * as P from '@react-pdf/primitives';
import stylesheet from '@react-pdf/stylesheet';
-const isLink = node => node.type === P.Link;
+const isLink = (node) => node.type === P.Link;
const DEFAULT_LINK_STYLES = {
color: 'blue',
@@ -12,7 +12,7 @@ const DEFAULT_LINK_STYLES = {
* Computes styles using stylesheet
*
* @param {Object} container
- * @param {Object} document node
+ * @param {Object} node document node
* @returns {Object} computed styles
*/
const computeStyle = (container, node) => {
@@ -27,14 +27,19 @@ const computeStyle = (container, node) => {
return stylesheet(container, baseStyle);
};
+/**
+ * @typedef {Function} ResolveNodeStyles
+ * @param {Object} node document node
+ * @returns {Object} node (and subnodes) with resolved styles
+ */
+
/**
* Resolves node styles
*
* @param {Object} container
- * @param {Object} document node
- * @returns {Object} node (and subnodes) with resolved styles
+ * @returns {ResolveNodeStyles} resolve node styles
*/
-const resolveNodeStyles = container => node => {
+const resolveNodeStyles = (container) => (node) => {
const style = computeStyle(container, node);
if (!node.children) return Object.assign({}, node, { style });
@@ -47,10 +52,10 @@ const resolveNodeStyles = container => node => {
/**
* Resolves page styles
*
- * @param {Object} document page
+ * @param {Object} page document page
* @returns {Object} document page with resolved styles
*/
-const resolvePageStyles = page => {
+export const resolvePageStyles = (page) => {
const dpi = page.props?.dpi || 72;
const width = page.box?.width || page.style.width;
const height = page.box?.height || page.style.height;
@@ -63,10 +68,10 @@ const resolvePageStyles = page => {
/**
* Resolves document styles
*
- * @param {Object} document root
+ * @param {Object} root document root
* @returns {Object} document root with resolved styles
*/
-const resolveStyles = root => {
+const resolveStyles = (root) => {
if (!root.children) return root;
const children = root.children.map(resolvePageStyles);
diff --git a/packages/layout/src/steps/resolveSvg.js b/packages/layout/src/steps/resolveSvg.js
index f41dcbab6..073a63c48 100644
--- a/packages/layout/src/steps/resolveSvg.js
+++ b/packages/layout/src/steps/resolveSvg.js
@@ -31,7 +31,7 @@ const STYLE_PROPS = [
const VERTICAL_PROPS = ['y', 'y1', 'y2', 'height', 'cy', 'ry'];
const HORIZONTAL_PROPS = ['x', 'x1', 'x2', 'width', 'cx', 'rx'];
-const isType = type => node => node.type === type;
+const isType = (type) => (node) => node.type === type;
const isSvg = isType(P.Svg);
@@ -39,7 +39,7 @@ const isText = isType(P.Text);
const isTextInstance = isType(P.TextInstance);
-const transformPercent = container => props =>
+const transformPercent = (container) => (props) =>
mapValues(props, (value, key) => {
const match = matchPercent(value);
@@ -54,12 +54,12 @@ const transformPercent = container => props =>
return value;
});
-const parsePercent = value => {
+const parsePercent = (value) => {
const match = matchPercent(value);
return match ? match.percent : parseFloat(value);
};
-const parseProps = container => node => {
+const parseProps = (container) => (node) => {
let props = transformPercent(container)(node.props);
props = evolve(
@@ -91,21 +91,21 @@ const parseProps = container => node => {
return Object.assign({}, node, { props });
};
-const mergeStyles = node => {
+const mergeStyles = (node) => {
const style = node.style || {};
const props = Object.assign({}, style, node.props);
return Object.assign({}, node, { props });
};
-const removeNoneValues = node => {
- const removeNone = value => (value === 'none' ? null : value);
+const removeNoneValues = (node) => {
+ const removeNone = (value) => (value === 'none' ? null : value);
const props = mapValues(node.props, removeNone);
return Object.assign({}, node, { props });
};
-const pickStyleProps = node => {
+const pickStyleProps = (node) => {
const props = node.props || {};
const styleProps = pick(STYLE_PROPS, props);
const style = Object.assign({}, styleProps, node.style || {});
@@ -113,7 +113,7 @@ const pickStyleProps = node => {
return Object.assign({}, node, { style });
};
-const parseSvgProps = node => {
+const parseSvgProps = (node) => {
const props = evolve(
{
width: parseFloat,
@@ -127,17 +127,17 @@ const parseSvgProps = node => {
return Object.assign({}, node, { props });
};
-const wrapBetweenTspan = node => ({
+const wrapBetweenTspan = (node) => ({
type: P.Tspan,
props: {},
children: [node],
});
-const addMissingTspan = node => {
+const addMissingTspan = (node) => {
if (!isText(node)) return node;
if (!node.children) return node;
- const resolveChild = child =>
+ const resolveChild = (child) =>
isTextInstance(child) ? wrapBetweenTspan(child) : child;
const children = node.children.map(resolveChild);
@@ -145,7 +145,7 @@ const addMissingTspan = node => {
return Object.assign({}, node, { children });
};
-const parseText = fontStore => node => {
+const parseText = (fontStore) => (node) => {
if (isText(node)) return layoutText(fontStore, node);
if (!node.children) return node;
@@ -155,7 +155,7 @@ const parseText = fontStore => node => {
return Object.assign({}, node, { children });
};
-const resolveSvgNode = container =>
+const resolveSvgNode = (container) =>
compose(
parseProps(container),
addMissingTspan,
@@ -163,7 +163,7 @@ const resolveSvgNode = container =>
mergeStyles,
);
-const resolveChildren = container => node => {
+const resolveChildren = (container) => (node) => {
if (!node.children) return node;
const resolveChild = compose(
@@ -192,14 +192,14 @@ const resolveSvgRoot = (node, fontStore) => {
/**
* Pre-process SVG nodes so they can be rendered in the next steps
*
- * @param {Object} root node
+ * @param {Object} node root node
* @param {Object} fontStore font store
* @returns {Object} root node
*/
const resolveSvg = (node, fontStore) => {
if (!node.children) return node;
- const resolveChild = child => resolveSvg(child, fontStore);
+ const resolveChild = (child) => resolveSvg(child, fontStore);
const root = isSvg(node) ? resolveSvgRoot(node, fontStore) : node;
const children = root.children.map(resolveChild);
diff --git a/packages/layout/src/steps/resolveTextLayout.js b/packages/layout/src/steps/resolveTextLayout.js
index bbd452819..8b73d1cba 100644
--- a/packages/layout/src/steps/resolveTextLayout.js
+++ b/packages/layout/src/steps/resolveTextLayout.js
@@ -2,15 +2,15 @@ import * as P from '@react-pdf/primitives';
import layoutText from '../text/layoutText';
-const isType = type => node => node.type === type;
+const isType = (type) => (node) => node.type === type;
const isSvg = isType(P.Svg);
const isText = isType(P.Text);
-const shouldIterate = node => !isSvg(node) && !isText(node);
+const shouldIterate = (node) => !isSvg(node) && !isText(node);
-const shouldLayoutText = node => isText(node) && !node.lines;
+const shouldLayoutText = (node) => isText(node) && !node.lines;
/**
* Performs text layout on text node if wasn't calculated before.
@@ -34,7 +34,7 @@ const resolveTextLayout = (node, fontStore) => {
if (shouldIterate(node)) {
if (!node.children) return node;
- const mapChild = child => resolveTextLayout(child, fontStore);
+ const mapChild = (child) => resolveTextLayout(child, fontStore);
const children = node.children.map(mapChild);
diff --git a/packages/layout/src/steps/resolveYoga.js b/packages/layout/src/steps/resolveYoga.js
new file mode 100644
index 000000000..245fd81a0
--- /dev/null
+++ b/packages/layout/src/steps/resolveYoga.js
@@ -0,0 +1,9 @@
+import { loadYoga } from '../yoga/index';
+
+const resolveYoga = async (root) => {
+ const yoga = await loadYoga();
+
+ return Object.assign({}, root, { yoga });
+};
+
+export default resolveYoga;
diff --git a/packages/layout/src/steps/resolveZIndex.js b/packages/layout/src/steps/resolveZIndex.js
index 92400f3ea..c6b84c2c3 100644
--- a/packages/layout/src/steps/resolveZIndex.js
+++ b/packages/layout/src/steps/resolveZIndex.js
@@ -1,8 +1,8 @@
import * as P from '@react-pdf/primitives';
-const getZIndex = node => node.style.zIndex;
+const getZIndex = (node) => node.style.zIndex;
-const shouldSort = node => node.type !== P.Document && node.type !== P.Svg;
+const shouldSort = (node) => node.type !== P.Document && node.type !== P.Svg;
const sortZIndex = (a, b) => {
const za = getZIndex(a);
@@ -21,7 +21,7 @@ const sortZIndex = (a, b) => {
* @param {Object} node
* @returns {Object} node
*/
-const resolveZIndex = node => {
+const resolveZIndex = (node) => {
if (!node.children) return node;
const sortedChildren = shouldSort(node)
diff --git a/packages/layout/src/svg/getContainer.js b/packages/layout/src/svg/getContainer.js
index 998c7c002..39c2ad690 100644
--- a/packages/layout/src/svg/getContainer.js
+++ b/packages/layout/src/svg/getContainer.js
@@ -1,6 +1,6 @@
import parseViewBox from './parseViewbox';
-const getContainer = node => {
+const getContainer = (node) => {
const viewbox = parseViewBox(node.props.viewBox);
if (viewbox) {
diff --git a/packages/layout/src/svg/getDefs.js b/packages/layout/src/svg/getDefs.js
index 7a55e5baa..0a3690e7a 100644
--- a/packages/layout/src/svg/getDefs.js
+++ b/packages/layout/src/svg/getDefs.js
@@ -1,8 +1,8 @@
import * as P from '@react-pdf/primitives';
-const isDefs = node => node.type === P.Defs;
+const isDefs = (node) => node.type === P.Defs;
-const getDefs = node => {
+const getDefs = (node) => {
const children = node.children || [];
const defs = children.find(isDefs) || {};
const values = defs.children || [];
diff --git a/packages/layout/src/svg/inheritProps.js b/packages/layout/src/svg/inheritProps.js
index 8ae35f318..65aa7ada5 100644
--- a/packages/layout/src/svg/inheritProps.js
+++ b/packages/layout/src/svg/inheritProps.js
@@ -30,17 +30,17 @@ const SVG_INHERITED_PROPS = [
'wordSpacing',
];
-const getInheritProps = node => {
+const getInheritProps = (node) => {
const props = node.props || {};
return pick(SVG_INHERITED_PROPS, props);
};
-const inheritProps = node => {
+const inheritProps = (node) => {
if (!node.children) return node;
const inheritedProps = getInheritProps(node);
- const children = node.children.map(child => {
+ const children = node.children.map((child) => {
const props = Object.assign({}, inheritedProps, child.props || {});
const newChild = Object.assign({}, child, { props });
return inheritProps(newChild);
diff --git a/packages/layout/src/svg/layoutText.js b/packages/layout/src/svg/layoutText.js
index aabf49549..e29347561 100644
--- a/packages/layout/src/svg/layoutText.js
+++ b/packages/layout/src/svg/layoutText.js
@@ -1,5 +1,6 @@
import * as P from '@react-pdf/primitives';
import layoutEngine, {
+ bidi,
linebreaker,
justification,
scriptItemizer,
@@ -11,9 +12,10 @@ import fromFragments from '../text/fromFragments';
import transformText from '../text/transformText';
import fontSubstitution from '../text/fontSubstitution';
-const isTextInstance = node => node.type === P.TextInstance;
+const isTextInstance = (node) => node.type === P.TextInstance;
const engines = {
+ bidi,
linebreaker,
justification,
textDecoration,
@@ -90,7 +92,7 @@ const AlmostInfinity = 999999999999;
const shrinkWhitespaceFactor = { before: -0.5, after: -0.5 };
-const layoutTspan = fontStore => node => {
+const layoutTspan = (fontStore) => (node) => {
const attributedString = getAttributedString(fontStore, node);
const x = node.props?.x || 0;
diff --git a/packages/layout/src/svg/measureSvg.js b/packages/layout/src/svg/measureSvg.js
index 2fa397570..0c2098ac0 100644
--- a/packages/layout/src/svg/measureSvg.js
+++ b/packages/layout/src/svg/measureSvg.js
@@ -1,41 +1,42 @@
-import Yoga from '@react-pdf/yoga';
+import * as Yoga from 'yoga-layout';
-const getAspectRatio = viewbox => {
+const getAspectRatio = (viewbox) => {
if (!viewbox) return null;
return (viewbox.maxX - viewbox.minX) / (viewbox.maxY - viewbox.minY);
};
+/**
+ * @typedef {Function} MeasureSvg
+ * @param {number} width
+ * @param {number} widthMode
+ * @param {number} height
+ * @param {number} heightMode
+ * @returns {{ width: number, height: number }} svg width and height
+ */
+
/**
* Yoga svg measure function
*
* @param {Object} page
* @param {Object} node
- * @param {Number} width
- * @param {Number} widthMode
- * @param {Number} height
- * @param {Number} heightMode
- * @returns {Object} canvas width and height
+ * @returns {MeasureSvg} measure svg
*/
-const measureCanvas = (page, node) => (
- width,
- widthMode,
- height,
- heightMode,
-) => {
- const aspectRatio = getAspectRatio(node.props.viewBox) || 1;
+const measureCanvas =
+ (page, node) => (width, widthMode, height, heightMode) => {
+ const aspectRatio = getAspectRatio(node.props.viewBox) || 1;
- if (
- widthMode === Yoga.MEASURE_MODE_EXACTLY ||
- widthMode === Yoga.MEASURE_MODE_AT_MOST
- ) {
- return { width, height: width / aspectRatio };
- }
+ if (
+ widthMode === Yoga.MeasureMode.Exactly ||
+ widthMode === Yoga.MeasureMode.AtMost
+ ) {
+ return { width, height: width / aspectRatio };
+ }
- if (heightMode === Yoga.MEASURE_MODE_EXACTLY) {
- return { width: height * aspectRatio };
- }
+ if (heightMode === Yoga.MeasureMode.Exactly) {
+ return { width: height * aspectRatio };
+ }
- return {};
-};
+ return {};
+ };
export default measureCanvas;
diff --git a/packages/layout/src/svg/parseAspectRatio.js b/packages/layout/src/svg/parseAspectRatio.js
index 6e1a0f607..12a5e3261 100644
--- a/packages/layout/src/svg/parseAspectRatio.js
+++ b/packages/layout/src/svg/parseAspectRatio.js
@@ -1,4 +1,4 @@
-const parseAspectRatio = value => {
+const parseAspectRatio = (value) => {
const match = value
.replace(/[\s\r\t\n]+/gm, ' ')
.replace(/^defer\s/, '')
diff --git a/packages/layout/src/svg/parseViewbox.js b/packages/layout/src/svg/parseViewbox.js
index 9033ded43..610149126 100644
--- a/packages/layout/src/svg/parseViewbox.js
+++ b/packages/layout/src/svg/parseViewbox.js
@@ -1,4 +1,4 @@
-const parseViewbox = value => {
+const parseViewbox = (value) => {
if (!value) return null;
const values = value.split(/[,\s]+/).map(parseFloat);
if (values.length !== 4) return null;
diff --git a/packages/layout/src/svg/replaceDefs.js b/packages/layout/src/svg/replaceDefs.js
index b6240e7a4..fbaa3732d 100644
--- a/packages/layout/src/svg/replaceDefs.js
+++ b/packages/layout/src/svg/replaceDefs.js
@@ -2,9 +2,9 @@ import * as P from '@react-pdf/primitives';
import getDefs from './getDefs';
-const isNotDefs = node => node.type !== P.Defs;
+const isNotDefs = (node) => node.type !== P.Defs;
-const detachDefs = node => {
+const detachDefs = (node) => {
if (!node.children) return node;
const children = node.children.filter(isNotDefs);
@@ -24,7 +24,7 @@ const replaceDef = (defs, value) => {
return defs[match[1]];
};
-const parseNodeDefs = defs => node => {
+const parseNodeDefs = (defs) => (node) => {
const fill = replaceDef(defs, node.props?.fill);
const clipPath = replaceDef(defs, node.props?.clipPath);
const props = Object.assign({}, node.props, { fill, clipPath });
@@ -35,7 +35,7 @@ const parseNodeDefs = defs => node => {
return Object.assign({}, node, { props, children });
};
-const parseDefs = root => {
+const parseDefs = (root) => {
if (!root.children) return root;
const defs = getDefs(root);
@@ -44,7 +44,7 @@ const parseDefs = root => {
return Object.assign({}, root, { children });
};
-const replaceDefs = node => {
+const replaceDefs = (node) => {
return detachDefs(parseDefs(node));
};
diff --git a/packages/layout/src/text/emoji.js b/packages/layout/src/text/emoji.js
index 083777157..5f5d77eb4 100644
--- a/packages/layout/src/text/emoji.js
+++ b/packages/layout/src/text/emoji.js
@@ -6,17 +6,19 @@ import resolveImage from '@react-pdf/image';
const emojis = {};
const regex = emojiRegex();
-const reflect = promise => (...args) =>
- promise(...args).then(
- v => v,
- e => e,
- );
+const reflect =
+ (promise) =>
+ (...args) =>
+ promise(...args).then(
+ (v) => v,
+ (e) => e,
+ );
// Returns a function to be able to mock resolveImage.
const makeFetchEmojiImage = () => reflect(resolveImage);
/**
- * When an emoji as no color, it might still have 2 parts,
+ * When an emoji as no variations, it might still have 2 parts,
* the canonical emoji and an empty string.
* ex.
* (no color) Array.from('❤️') => ["❤", "️"]
@@ -25,21 +27,21 @@ const makeFetchEmojiImage = () => reflect(resolveImage);
* The empty string needs to be removed otherwise the generated
* url will be incorect.
*/
-const _removeNoColor = x => x !== '️';
+const _removeVariationSelectors = (x) => x !== '️';
-const getCodePoints = string =>
+const getCodePoints = (string, withVariationSelectors) =>
Array.from(string)
- .filter(_removeNoColor)
- .map(char => char.codePointAt(0).toString(16))
+ .filter(withVariationSelectors ? () => true : _removeVariationSelectors)
+ .map((char) => char.codePointAt(0).toString(16))
.join('-');
const buildEmojiUrl = (emoji, source) => {
- const { url, format, builder } = source;
+ const { url, format, builder, withVariationSelectors } = source;
if (typeof builder === 'function') {
- return builder(getCodePoints(emoji));
+ return builder(getCodePoints(emoji, withVariationSelectors));
}
- return `${url}${getCodePoints(emoji)}.${format}`;
+ return `${url}${getCodePoints(emoji, withVariationSelectors)}.${format}`;
};
export const fetchEmojis = (string, source) => {
@@ -47,7 +49,7 @@ export const fetchEmojis = (string, source) => {
const promises = [];
- Array.from(string.matchAll(regex)).forEach(match => {
+ Array.from(string.matchAll(regex)).forEach((match) => {
const emoji = match[0];
if (!emojis[emoji] || emojis[emoji].loading) {
@@ -56,7 +58,7 @@ export const fetchEmojis = (string, source) => {
emojis[emoji] = { loading: true };
const fetchEmojiImage = makeFetchEmojiImage();
promises.push(
- fetchEmojiImage({ uri: emojiUrl }).then(image => {
+ fetchEmojiImage({ uri: emojiUrl }).then((image) => {
emojis[emoji].loading = false;
emojis[emoji].data = image.data;
}),
@@ -67,7 +69,9 @@ export const fetchEmojis = (string, source) => {
return promises;
};
-export const embedEmojis = fragments => {
+const specialCases = ['©️', '®', '™']; // Do not treat these as emojis if emoji not present
+
+export const embedEmojis = (fragments) => {
const result = [];
for (let i = 0; i < fragments.length; i += 1) {
@@ -75,9 +79,11 @@ export const embedEmojis = fragments => {
let lastIndex = 0;
- Array.from(fragment.string.matchAll(regex)).forEach(match => {
+ Array.from(fragment.string.matchAll(regex)).forEach((match) => {
const { index } = match;
const emoji = match[0];
+ const isSpecialCase = specialCases.includes(emoji);
+
const emojiSize = fragment.attributes.fontSize;
const chunk = fragment.string.slice(lastIndex, index + match[0].length);
@@ -96,6 +102,8 @@ export const embedEmojis = fragments => {
},
},
});
+ } else if (isSpecialCase) {
+ result.push({ string: chunk, attributes: fragment.attributes });
} else {
// If no emoji data, we just replace the emoji with a nodef char
result.push({
diff --git a/packages/layout/src/text/fontSubstitution.js b/packages/layout/src/text/fontSubstitution.js
index fb9ef8c74..58a4f9825 100644
--- a/packages/layout/src/text/fontSubstitution.js
+++ b/packages/layout/src/text/fontSubstitution.js
@@ -6,9 +6,9 @@ const fontCache = {};
const IGNORED_CODE_POINTS = [173];
-const getFontSize = node => node.attributes.fontSize || 12;
+const getFontSize = (node) => node.attributes.fontSize || 12;
-const getOrCreateFont = name => {
+const getOrCreateFont = (name) => {
if (fontCache[name]) return fontCache[name];
const font = new StandardFont(name);
@@ -25,77 +25,79 @@ const shouldFallbackToFont = (codePoint, font) =>
!font.hasGlyphForCodePoint(codePoint) &&
getFallbackFont().hasGlyphForCodePoint(codePoint));
-const fontSubstitution = () => ({ string, runs }) => {
- let lastFont = null;
- let lastFontSize = null;
- let lastIndex = 0;
- let index = 0;
+const fontSubstitution =
+ () =>
+ ({ string, runs }) => {
+ let lastFont = null;
+ let lastFontSize = null;
+ let lastIndex = 0;
+ let index = 0;
- const res = [];
+ const res = [];
- for (let i = 0; i < runs.length; i += 1) {
- const run = runs[i];
+ for (let i = 0; i < runs.length; i += 1) {
+ const run = runs[i];
- const defaultFont =
- typeof run.attributes.font === 'string'
- ? getOrCreateFont(run.attributes.font)
- : run.attributes.font;
+ const defaultFont =
+ typeof run.attributes.font === 'string'
+ ? getOrCreateFont(run.attributes.font)
+ : run.attributes.font;
- if (string.length === 0) {
- res.push({ start: 0, end: 0, attributes: { font: defaultFont } });
- break;
- }
+ if (string.length === 0) {
+ res.push({ start: 0, end: 0, attributes: { font: defaultFont } });
+ break;
+ }
- const chars = string.slice(run.start, run.end);
-
- for (let j = 0; j < chars.length; j += 1) {
- const char = chars[j];
- const codePoint = char.codePointAt();
- const shouldFallback = shouldFallbackToFont(codePoint, defaultFont);
- // If the default font does not have a glyph and the fallback font does, we use it
- const font = shouldFallback ? getFallbackFont() : defaultFont;
- const fontSize = getFontSize(run);
-
- // If anything that would impact res has changed, update it
- if (
- font !== lastFont ||
- fontSize !== lastFontSize ||
- font.unitsPerEm !== lastFont.unitsPerEm
- ) {
- if (lastFont) {
- res.push({
- start: lastIndex,
- end: index,
- attributes: {
- font: lastFont,
- scale: lastFontSize / lastFont.unitsPerEm,
- },
- });
+ const chars = string.slice(run.start, run.end);
+
+ for (let j = 0; j < chars.length; j += 1) {
+ const char = chars[j];
+ const codePoint = char.codePointAt();
+ const shouldFallback = shouldFallbackToFont(codePoint, defaultFont);
+ // If the default font does not have a glyph and the fallback font does, we use it
+ const font = shouldFallback ? getFallbackFont() : defaultFont;
+ const fontSize = getFontSize(run);
+
+ // If anything that would impact res has changed, update it
+ if (
+ font !== lastFont ||
+ fontSize !== lastFontSize ||
+ font.unitsPerEm !== lastFont.unitsPerEm
+ ) {
+ if (lastFont) {
+ res.push({
+ start: lastIndex,
+ end: index,
+ attributes: {
+ font: lastFont,
+ scale: lastFontSize / lastFont.unitsPerEm,
+ },
+ });
+ }
+
+ lastFont = font;
+ lastFontSize = fontSize;
+ lastIndex = index;
}
- lastFont = font;
- lastFontSize = fontSize;
- lastIndex = index;
+ index += char.length;
}
+ }
- index += char.length;
+ if (lastIndex < string.length) {
+ const fontSize = getFontSize(last(runs));
+
+ res.push({
+ start: lastIndex,
+ end: string.length,
+ attributes: {
+ font: lastFont,
+ scale: fontSize / lastFont.unitsPerEm,
+ },
+ });
}
- }
-
- if (lastIndex < string.length) {
- const fontSize = getFontSize(last(runs));
-
- res.push({
- start: lastIndex,
- end: string.length,
- attributes: {
- font: lastFont,
- scale: fontSize / lastFont.unitsPerEm,
- },
- });
- }
-
- return { string, runs: res };
-};
+
+ return { string, runs: res };
+ };
export default fontSubstitution;
diff --git a/packages/layout/src/text/fromFragments.js b/packages/layout/src/text/fromFragments.js
index cca715ebe..501819928 100644
--- a/packages/layout/src/text/fromFragments.js
+++ b/packages/layout/src/text/fromFragments.js
@@ -1,15 +1,15 @@
/**
* Create attributed string from text fragments
*
- * @param {Array} fragments
- * @return {Object} attributed string
+ * @param {Object[]} fragments fragments
+ * @returns {Object} attributed string
*/
-const fromFragments = fragments => {
+const fromFragments = (fragments) => {
let offset = 0;
let string = '';
const runs = [];
- fragments.forEach(fragment => {
+ fragments.forEach((fragment) => {
string += fragment.string;
runs.push({
diff --git a/packages/layout/src/text/getAttributedString.js b/packages/layout/src/text/getAttributedString.js
index 1a9858949..1a7625553 100644
--- a/packages/layout/src/text/getAttributedString.js
+++ b/packages/layout/src/text/getAttributedString.js
@@ -7,16 +7,18 @@ import transformText from './transformText';
const PREPROCESSORS = [ignoreChars, embedEmojis];
-const isImage = node => node.type === P.Image;
+const isImage = (node) => node.type === P.Image;
-const isTextInstance = node => node.type === P.TextInstance;
+const isTextInstance = (node) => node.type === P.TextInstance;
/**
* Get textkit fragments of given node object
*
- * @param {Object} font store
+ * @param {Object} fontStore font store
* @param {Object} instance node
- * @returns {Array} text fragments
+ * @param {string} [parentLink] parent link
+ * @param {number} [level] fragment level
+ * @returns {Object[]} text fragments
*/
const getFragments = (fontStore, instance, parentLink, level = 0) => {
if (!instance) return [{ string: '' }];
@@ -25,11 +27,12 @@ const getFragments = (fontStore, instance, parentLink, level = 0) => {
const {
color = 'black',
+ direction = 'ltr',
fontFamily = 'Helvetica',
fontWeight,
fontStyle,
fontSize = 18,
- textAlign = 'left',
+ textAlign,
lineHeight,
textDecoration,
textDecorationColor,
@@ -53,8 +56,9 @@ const getFragments = (fontStore, instance, parentLink, level = 0) => {
color,
opacity,
fontSize,
+ direction,
+ verticalAlign,
backgroundColor,
- align: textAlign,
indent: textIndent,
characterSpacing: letterSpacing,
strikeStyle: textDecorationStyle,
@@ -71,7 +75,7 @@ const getFragments = (fontStore, instance, parentLink, level = 0) => {
underlineColor: textDecorationColor || color,
link: parentLink || instance.props?.src || instance.props?.href,
lineHeight: lineHeight ? lineHeight * fontSize : null,
- verticalAlign,
+ align: textAlign || (direction === 'rtl' ? 'right' : 'left'),
};
for (let i = 0; i < instance.children.length; i += 1) {
@@ -112,7 +116,7 @@ const getFragments = (fontStore, instance, parentLink, level = 0) => {
/**
* Get textkit attributed string from text node
*
- * @param {Object} font store
+ * @param {Object} fontStore font store
* @param {Object} instance node
* @returns {Object} attributed string
*/
diff --git a/packages/layout/src/text/heightAtLineIndex.js b/packages/layout/src/text/heightAtLineIndex.js
index 0c7c8fb99..e57f4c803 100644
--- a/packages/layout/src/text/heightAtLineIndex.js
+++ b/packages/layout/src/text/heightAtLineIndex.js
@@ -2,7 +2,7 @@
* Get height for given text line index
*
* @param {Object} node
- * @param {Number} index
+ * @param {number} index
*/
const heightAtLineIndex = (node, index) => {
let counter = 0;
diff --git a/packages/layout/src/text/ignoreChars.js b/packages/layout/src/text/ignoreChars.js
index 5b86ef33c..95d5985c9 100644
--- a/packages/layout/src/text/ignoreChars.js
+++ b/packages/layout/src/text/ignoreChars.js
@@ -3,16 +3,20 @@ const IGNORABLE_CODEPOINTS = [
8233, // PARAGRAPH_SEPARATOR
];
-const buildSubsetForFont = font =>
+const buildSubsetForFont = (font) =>
IGNORABLE_CODEPOINTS.reduce((acc, codePoint) => {
- if (font && font.hasGlyphForCodePoint && font.hasGlyphForCodePoint(codePoint)) {
+ if (
+ font &&
+ font.hasGlyphForCodePoint &&
+ font.hasGlyphForCodePoint(codePoint)
+ ) {
return acc;
}
return [...acc, String.fromCharCode(codePoint)];
}, []);
-const ignoreChars = fragments =>
- fragments.map(fragment => {
+const ignoreChars = (fragments) =>
+ fragments.map((fragment) => {
const charSubset = buildSubsetForFont(fragment.attributes.font);
const subsetRegex = new RegExp(charSubset.join('|'));
diff --git a/packages/layout/src/text/layoutText.js b/packages/layout/src/text/layoutText.js
index 35a822183..e3af13f99 100644
--- a/packages/layout/src/text/layoutText.js
+++ b/packages/layout/src/text/layoutText.js
@@ -1,4 +1,5 @@
import layoutEngine, {
+ bidi,
linebreaker,
justification,
scriptItemizer,
@@ -10,6 +11,7 @@ import fontSubstitution from './fontSubstitution';
import getAttributedString from './getAttributedString';
const engines = {
+ bidi,
linebreaker,
justification,
textDecoration,
@@ -20,15 +22,15 @@ const engines = {
const engine = layoutEngine(engines);
-const getMaxLines = node => node.style?.maxLines;
+const getMaxLines = (node) => node.style?.maxLines;
-const getTextOverflow = node => node.style?.textOverflow;
+const getTextOverflow = (node) => node.style?.textOverflow;
/**
* Get layout container for specific text node
*
- * @param {Number} width
- * @param {Number} height
+ * @param {number} width
+ * @param {number} height
* @param {Object} node
* @returns {Object} layout container
*/
@@ -64,11 +66,11 @@ const getLayoutOptions = (fontStore, node) => ({
/**
* Get text lines for given node
*
- * @param {Object} node
- * @param {Number} container width
- * @param {Number} container height
- * @param {Number} fontStore font store
- * @returns {Array} layout lines
+ * @param {Object} node node
+ * @param {number} width container width
+ * @param {number} height container height
+ * @param {number} fontStore font store
+ * @returns {Object[]} layout lines
*/
const layoutText = (node, width, height, fontStore) => {
const attributedString = getAttributedString(fontStore, node);
diff --git a/packages/layout/src/text/lineIndexAtHeight.js b/packages/layout/src/text/lineIndexAtHeight.js
index e77ed2843..b49dd9d2b 100644
--- a/packages/layout/src/text/lineIndexAtHeight.js
+++ b/packages/layout/src/text/lineIndexAtHeight.js
@@ -2,7 +2,7 @@
* Get line index at given height
*
* @param {Object} node
- * @param {Number} height
+ * @param {number} height
*/
const lineIndexAtHeight = (node, height) => {
let y = 0;
diff --git a/packages/layout/src/text/linesHeight.js b/packages/layout/src/text/linesHeight.js
index 3159b8b32..057660b4c 100644
--- a/packages/layout/src/text/linesHeight.js
+++ b/packages/layout/src/text/linesHeight.js
@@ -2,9 +2,9 @@
* Get lines height (if any)
*
* @param {Object} node
- * @returns {Number} lines height
+ * @returns {number} lines height
*/
-const linesHeight = node => {
+const linesHeight = (node) => {
if (!node.lines) return -1;
return node.lines.reduce((acc, line) => acc + line.box.height, 0);
};
diff --git a/packages/layout/src/text/linesWidth.js b/packages/layout/src/text/linesWidth.js
index 775b352fa..86f154f7d 100644
--- a/packages/layout/src/text/linesWidth.js
+++ b/packages/layout/src/text/linesWidth.js
@@ -2,12 +2,12 @@
* Get lines width (if any)
*
* @param {Object} node
- * @returns {Number} lines width
+ * @returns {number} lines width
*/
-const linesWidth = node => {
+const linesWidth = (node) => {
if (!node.lines) return 0;
- return Math.max(0, ...node.lines.map(line => line.xAdvance));
+ return Math.max(0, ...node.lines.map((line) => line.xAdvance));
};
export default linesWidth;
diff --git a/packages/layout/src/text/measureText.js b/packages/layout/src/text/measureText.js
index a1efe3bec..94733e78b 100644
--- a/packages/layout/src/text/measureText.js
+++ b/packages/layout/src/text/measureText.js
@@ -1,6 +1,6 @@
/* eslint-disable no-param-reassign */
-import Yoga from '@react-pdf/yoga';
+import * as Yoga from 'yoga-layout';
import layoutText from './layoutText';
import linesWidth from './linesWidth';
@@ -8,25 +8,30 @@ import linesHeight from './linesHeight';
const ALIGNMENT_FACTORS = { center: 0.5, right: 1 };
+/**
+ * @typedef {Function} MeasureText
+ * @param {number} width
+ * @param {number} widthMode
+ * @param {number} height
+ * @returns {{ width: number, height: number }} text width and height
+ */
+
/**
* Yoga text measure function
*
* @param {Object} page
* @param {Object} node
- * @param {Number} width
- * @param {Number} widthMode
- * @param {Number} height
- * @param {Number} heightMode
- * @returns {Object} text width and height
+ * @param {Object} fontStore
+ * @returns {MeasureText} measure text function
*/
const measureText = (page, node, fontStore) => (width, widthMode, height) => {
- if (widthMode === Yoga.MEASURE_MODE_EXACTLY) {
+ if (widthMode === Yoga.MeasureMode.Exactly) {
if (!node.lines) node.lines = layoutText(node, width, height, fontStore);
return { height: linesHeight(node) };
}
- if (widthMode === Yoga.MEASURE_MODE_AT_MOST) {
+ if (widthMode === Yoga.MeasureMode.AtMost) {
const alignFactor = ALIGNMENT_FACTORS[node.style?.textAlign] || 0;
if (!node.lines) {
diff --git a/packages/layout/src/text/transformText.js b/packages/layout/src/text/transformText.js
index 1044a1255..fc25c8f96 100644
--- a/packages/layout/src/text/transformText.js
+++ b/packages/layout/src/text/transformText.js
@@ -3,9 +3,9 @@ import { capitalize, upperFirst } from '@react-pdf/fns';
/**
* Apply transformation to text string
*
- * @param {String} text
- * @param {String} transformation type
- * @returns {String} transformed text
+ * @param {string} text
+ * @param {string} transformation type
+ * @returns {string} transformed text
*/
const transformText = (text, transformation) => {
switch (transformation) {
diff --git a/packages/layout/src/yoga/index.js b/packages/layout/src/yoga/index.js
new file mode 100644
index 000000000..6cea83b69
--- /dev/null
+++ b/packages/layout/src/yoga/index.js
@@ -0,0 +1,14 @@
+/* eslint-disable import/prefer-default-export */
+
+import * as Yoga from 'yoga-layout';
+
+export const loadYoga = async () => {
+ const instance = await Yoga.loadYoga();
+ const config = instance.Config.create();
+
+ config.setPointScaleFactor(0);
+
+ const node = { create: () => instance.Node.createWithConfig(config) };
+
+ return { node };
+};
diff --git a/packages/layout/tests/image/getSource.test.js b/packages/layout/tests/image/getSource.test.js
index 4d5e3fad1..db87e2e87 100644
--- a/packages/layout/tests/image/getSource.test.js
+++ b/packages/layout/tests/image/getSource.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import getSource from '../../src/image/getSource';
const VALUE = 'gotcha';
diff --git a/packages/layout/tests/image/resolveSource.test.js b/packages/layout/tests/image/resolveSource.test.js
index f9849deb2..69e60898d 100644
--- a/packages/layout/tests/image/resolveSource.test.js
+++ b/packages/layout/tests/image/resolveSource.test.js
@@ -1,9 +1,12 @@
+import { describe, expect, it } from 'vitest';
+
import resolveSource from '../../src/image/resolveSource';
const SOURCE_URL = 'gotcha';
const SOURCE_URL_OBJECT = { uri: 'gotcha', method: 'GET' };
const SOURCE_BUFFER = Buffer.from('gotcha');
const SOURCE_DATA_BUFFER = { data: Buffer.from('gotcha'), format: 'png' };
+const SOURCE_BLOB = new Blob([SOURCE_BUFFER], { type: 'image/png' });
describe('image resolveSource', () => {
describe('source', () => {
@@ -24,6 +27,10 @@ describe('image resolveSource', () => {
SOURCE_DATA_BUFFER,
);
});
+
+ it('resolves blob', () => {
+ expect(resolveSource(SOURCE_BLOB)).resolves.toBe(SOURCE_BLOB);
+ });
});
describe('async', () => {
@@ -50,6 +57,12 @@ describe('image resolveSource', () => {
SOURCE_DATA_BUFFER,
);
});
+
+ it('resolves blob', () => {
+ expect(resolveSource(Promise.resolve(SOURCE_BLOB))).resolves.toBe(
+ SOURCE_BLOB,
+ );
+ });
});
describe('factory', () => {
@@ -78,6 +91,10 @@ describe('image resolveSource', () => {
it('resolves undefined', () => {
expect(resolveSource(() => undefined)).resolves.toBe(undefined);
});
+
+ it('resolves blob', () => {
+ expect(resolveSource(() => SOURCE_BLOB)).resolves.toBe(SOURCE_BLOB);
+ });
});
describe('async factory', () => {
@@ -108,5 +125,9 @@ describe('image resolveSource', () => {
it('resolves undefined', () => {
expect(resolveSource(async () => undefined)).resolves.toBe(undefined);
});
+
+ it('resolves blob', () => {
+ expect(resolveSource(async () => SOURCE_BLOB)).resolves.toBe(SOURCE_BLOB);
+ });
});
});
diff --git a/packages/layout/tests/node/getBorderWidth.test.js b/packages/layout/tests/node/getBorderWidth.test.js
index cdeaa2185..de618f3af 100644
--- a/packages/layout/tests/node/getBorderWidth.test.js
+++ b/packages/layout/tests/node/getBorderWidth.test.js
@@ -1,11 +1,13 @@
-import Yoga from '@react-pdf/yoga';
+import { describe, expect, test } from 'vitest';
+
+import * as Yoga from 'yoga-layout';
import getBorderWidth from '../../src/node/getBorderWidth';
-const getComputedBorder = value => {
- if (value === Yoga.EDGE_TOP) return 1;
- if (value === Yoga.EDGE_RIGHT) return 2;
- if (value === Yoga.EDGE_BOTTOM) return 3;
+const getComputedBorder = (value) => {
+ if (value === Yoga.Edge.Top) return 1;
+ if (value === Yoga.Edge.Right) return 2;
+ if (value === Yoga.Edge.Bottom) return 3;
return 4;
};
diff --git a/packages/layout/tests/node/getDimension.test.js b/packages/layout/tests/node/getDimension.test.js
index d3f568ae4..0d98d3890 100644
--- a/packages/layout/tests/node/getDimension.test.js
+++ b/packages/layout/tests/node/getDimension.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import getDimension from '../../src/node/getDimension';
const getComputedWidth = () => 10;
diff --git a/packages/layout/tests/node/getMargin.test.js b/packages/layout/tests/node/getMargin.test.js
index fafa42dd7..d22c51aef 100644
--- a/packages/layout/tests/node/getMargin.test.js
+++ b/packages/layout/tests/node/getMargin.test.js
@@ -1,11 +1,13 @@
-import Yoga from '@react-pdf/yoga';
+import { describe, expect, test } from 'vitest';
+
+import * as Yoga from 'yoga-layout';
import getMargin from '../../src/node/getMargin';
-const getComputedMargin = value => {
- if (value === Yoga.EDGE_TOP) return 1;
- if (value === Yoga.EDGE_RIGHT) return 2;
- if (value === Yoga.EDGE_BOTTOM) return 3;
+const getComputedMargin = (value) => {
+ if (value === Yoga.Edge.Top) return 1;
+ if (value === Yoga.Edge.Right) return 2;
+ if (value === Yoga.Edge.Bottom) return 3;
return 4;
};
diff --git a/packages/layout/tests/node/getOrigin.test.js b/packages/layout/tests/node/getOrigin.test.js
index 0bfefa2ea..ac6b8bfe6 100644
--- a/packages/layout/tests/node/getOrigin.test.js
+++ b/packages/layout/tests/node/getOrigin.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import getOrigin from '../../src/node/getOrigin';
describe('node getOrigin', () => {
diff --git a/packages/layout/tests/node/getPadding.test.js b/packages/layout/tests/node/getPadding.test.js
index 96b84ae97..a3fc4efcc 100644
--- a/packages/layout/tests/node/getPadding.test.js
+++ b/packages/layout/tests/node/getPadding.test.js
@@ -1,11 +1,13 @@
-import Yoga from '@react-pdf/yoga';
+import { describe, expect, test } from 'vitest';
+
+import * as Yoga from 'yoga-layout';
import getPadding from '../../src/node/getPadding';
-const getComputedPadding = value => {
- if (value === Yoga.EDGE_TOP) return 1;
- if (value === Yoga.EDGE_RIGHT) return 2;
- if (value === Yoga.EDGE_BOTTOM) return 3;
+const getComputedPadding = (value) => {
+ if (value === Yoga.Edge.Top) return 1;
+ if (value === Yoga.Edge.Right) return 2;
+ if (value === Yoga.Edge.Bottom) return 3;
return 4;
};
diff --git a/packages/layout/tests/node/getPosition.test.js b/packages/layout/tests/node/getPosition.test.js
index 4b38dcb52..a6db89b3a 100644
--- a/packages/layout/tests/node/getPosition.test.js
+++ b/packages/layout/tests/node/getPosition.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import getPosition from '../../src/node/getPosition';
const getComputedTop = () => 10;
diff --git a/packages/layout/tests/node/removePaddings.test.js b/packages/layout/tests/node/removePaddings.test.js
index 53691a60e..724078753 100644
--- a/packages/layout/tests/node/removePaddings.test.js
+++ b/packages/layout/tests/node/removePaddings.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import removePaddings from '../../src/node/removePaddings';
describe('node removePaddings', () => {
diff --git a/packages/layout/tests/node/setAlignContent.test.js b/packages/layout/tests/node/setAlignContent.test.js
index b8d23d761..88f551f27 100644
--- a/packages/layout/tests/node/setAlignContent.test.js
+++ b/packages/layout/tests/node/setAlignContent.test.js
@@ -1,9 +1,11 @@
-import Yoga from '@react-pdf/yoga';
+import { beforeEach, describe, expect, test, vi } from 'vitest';
+
+import * as Yoga from 'yoga-layout';
import setAlignContent from '../../src/node/setAlignContent';
describe('node setAlignContent', () => {
- const mock = jest.fn();
+ const mock = vi.fn();
const node = { yogaNode: { setAlignContent: mock } };
beforeEach(() => {
@@ -21,7 +23,7 @@ describe('node setAlignContent', () => {
const result = setAlignContent(null)(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.ALIGN_AUTO);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Align.Auto);
expect(result).toBe(node);
});
@@ -29,7 +31,7 @@ describe('node setAlignContent', () => {
const result = setAlignContent('flex-start')(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.ALIGN_FLEX_START);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Align.FlexStart);
expect(result).toBe(node);
});
@@ -37,7 +39,7 @@ describe('node setAlignContent', () => {
const result = setAlignContent('center')(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.ALIGN_CENTER);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Align.Center);
expect(result).toBe(node);
});
@@ -45,7 +47,7 @@ describe('node setAlignContent', () => {
const result = setAlignContent('flex-end')(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.ALIGN_FLEX_END);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Align.FlexEnd);
expect(result).toBe(node);
});
@@ -53,7 +55,7 @@ describe('node setAlignContent', () => {
const result = setAlignContent('stretch')(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.ALIGN_STRETCH);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Align.Stretch);
expect(result).toBe(node);
});
@@ -61,7 +63,7 @@ describe('node setAlignContent', () => {
const result = setAlignContent('baseline')(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.ALIGN_BASELINE);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Align.Baseline);
expect(result).toBe(node);
});
@@ -69,7 +71,7 @@ describe('node setAlignContent', () => {
const result = setAlignContent('space-between')(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.ALIGN_SPACE_BETWEEN);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Align.SpaceBetween);
expect(result).toBe(node);
});
@@ -77,7 +79,7 @@ describe('node setAlignContent', () => {
const result = setAlignContent('space-around')(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.ALIGN_SPACE_AROUND);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Align.SpaceAround);
expect(result).toBe(node);
});
});
diff --git a/packages/layout/tests/node/setAlignItems.test.js b/packages/layout/tests/node/setAlignItems.test.js
index 89d46f87b..774330c6b 100644
--- a/packages/layout/tests/node/setAlignItems.test.js
+++ b/packages/layout/tests/node/setAlignItems.test.js
@@ -1,9 +1,11 @@
-import Yoga from '@react-pdf/yoga';
+import { beforeEach, describe, expect, test, vi } from 'vitest';
+
+import * as Yoga from 'yoga-layout';
import setAlignItems from '../../src/node/setAlignItems';
describe('node setAlignItems', () => {
- const mock = jest.fn();
+ const mock = vi.fn();
const node = { yogaNode: { setAlignItems: mock } };
beforeEach(() => {
@@ -21,7 +23,7 @@ describe('node setAlignItems', () => {
const result = setAlignItems(null)(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.ALIGN_STRETCH);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Align.Stretch);
expect(result).toBe(node);
});
@@ -29,7 +31,7 @@ describe('node setAlignItems', () => {
const result = setAlignItems('flex-start')(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.ALIGN_FLEX_START);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Align.FlexStart);
expect(result).toBe(node);
});
@@ -37,7 +39,7 @@ describe('node setAlignItems', () => {
const result = setAlignItems('center')(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.ALIGN_CENTER);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Align.Center);
expect(result).toBe(node);
});
@@ -45,7 +47,7 @@ describe('node setAlignItems', () => {
const result = setAlignItems('flex-end')(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.ALIGN_FLEX_END);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Align.FlexEnd);
expect(result).toBe(node);
});
@@ -53,7 +55,7 @@ describe('node setAlignItems', () => {
const result = setAlignItems('stretch')(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.ALIGN_STRETCH);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Align.Stretch);
expect(result).toBe(node);
});
@@ -61,7 +63,7 @@ describe('node setAlignItems', () => {
const result = setAlignItems('baseline')(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.ALIGN_BASELINE);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Align.Baseline);
expect(result).toBe(node);
});
@@ -69,7 +71,7 @@ describe('node setAlignItems', () => {
const result = setAlignItems('space-between')(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.ALIGN_SPACE_BETWEEN);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Align.SpaceBetween);
expect(result).toBe(node);
});
@@ -77,7 +79,7 @@ describe('node setAlignItems', () => {
const result = setAlignItems('space-around')(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.ALIGN_SPACE_AROUND);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Align.SpaceAround);
expect(result).toBe(node);
});
});
diff --git a/packages/layout/tests/node/setAlignSelf.test.js b/packages/layout/tests/node/setAlignSelf.test.js
index 4b54efff6..a6aa90370 100644
--- a/packages/layout/tests/node/setAlignSelf.test.js
+++ b/packages/layout/tests/node/setAlignSelf.test.js
@@ -1,9 +1,11 @@
-import Yoga from '@react-pdf/yoga';
+import { beforeEach, describe, expect, test, vi } from 'vitest';
+
+import * as Yoga from 'yoga-layout';
import setAlignSelf from '../../src/node/setAlignSelf';
describe('node setAlignSelf', () => {
- const mock = jest.fn();
+ const mock = vi.fn();
const node = { yogaNode: { setAlignSelf: mock } };
beforeEach(() => {
@@ -21,7 +23,7 @@ describe('node setAlignSelf', () => {
const result = setAlignSelf(null)(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.ALIGN_AUTO);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Align.Auto);
expect(result).toBe(node);
});
@@ -29,7 +31,7 @@ describe('node setAlignSelf', () => {
const result = setAlignSelf('flex-start')(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.ALIGN_FLEX_START);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Align.FlexStart);
expect(result).toBe(node);
});
@@ -37,7 +39,7 @@ describe('node setAlignSelf', () => {
const result = setAlignSelf('center')(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.ALIGN_CENTER);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Align.Center);
expect(result).toBe(node);
});
@@ -45,7 +47,7 @@ describe('node setAlignSelf', () => {
const result = setAlignSelf('flex-end')(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.ALIGN_FLEX_END);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Align.FlexEnd);
expect(result).toBe(node);
});
@@ -53,7 +55,7 @@ describe('node setAlignSelf', () => {
const result = setAlignSelf('stretch')(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.ALIGN_STRETCH);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Align.Stretch);
expect(result).toBe(node);
});
@@ -61,7 +63,7 @@ describe('node setAlignSelf', () => {
const result = setAlignSelf('baseline')(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.ALIGN_BASELINE);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Align.Baseline);
expect(result).toBe(node);
});
@@ -69,7 +71,7 @@ describe('node setAlignSelf', () => {
const result = setAlignSelf('space-between')(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.ALIGN_SPACE_BETWEEN);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Align.SpaceBetween);
expect(result).toBe(node);
});
@@ -77,7 +79,7 @@ describe('node setAlignSelf', () => {
const result = setAlignSelf('space-around')(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.ALIGN_SPACE_AROUND);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Align.SpaceAround);
expect(result).toBe(node);
});
});
diff --git a/packages/layout/tests/node/setAspectRatio.test.js b/packages/layout/tests/node/setAspectRatio.test.js
index c1b0a3352..40d9f6626 100644
--- a/packages/layout/tests/node/setAspectRatio.test.js
+++ b/packages/layout/tests/node/setAspectRatio.test.js
@@ -1,7 +1,8 @@
+import { beforeEach, describe, expect, test, vi } from 'vitest';
import setAspectRatio from '../../src/node/setAspectRatio';
describe('node setAspectRatio', () => {
- const mock = jest.fn();
+ const mock = vi.fn();
const node = { yogaNode: { setAspectRatio: mock } };
beforeEach(() => {
diff --git a/packages/layout/tests/node/setBorderWidth.test.js b/packages/layout/tests/node/setBorderWidth.test.js
index f5a10c066..1fefe2e11 100644
--- a/packages/layout/tests/node/setBorderWidth.test.js
+++ b/packages/layout/tests/node/setBorderWidth.test.js
@@ -1,4 +1,6 @@
-import Yoga from '@react-pdf/yoga';
+import { beforeEach, describe, expect, test, vi } from 'vitest';
+
+import * as Yoga from 'yoga-layout';
import setBorder, {
setBorderTop,
@@ -8,7 +10,7 @@ import setBorder, {
} from '../../src/node/setBorderWidth';
describe('node setBorderWidth', () => {
- const mock = jest.fn();
+ const mock = vi.fn();
const node = { yogaNode: { setBorder: mock } };
beforeEach(() => {
@@ -27,7 +29,7 @@ describe('node setBorderWidth', () => {
const result = setBorderTop(50)(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.EDGE_TOP);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Edge.Top);
expect(mock.mock.calls[0][1]).toBe(50);
expect(result).toBe(node);
});
@@ -49,7 +51,7 @@ describe('node setBorderWidth', () => {
const result = setBorderRight(50)(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.EDGE_RIGHT);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Edge.Right);
expect(mock.mock.calls[0][1]).toBe(50);
expect(result).toBe(node);
});
@@ -71,7 +73,7 @@ describe('node setBorderWidth', () => {
const result = setBorderBottom(50)(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.EDGE_BOTTOM);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Edge.Bottom);
expect(mock.mock.calls[0][1]).toBe(50);
expect(result).toBe(node);
});
@@ -93,7 +95,7 @@ describe('node setBorderWidth', () => {
const result = setBorderLeft(50)(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.EDGE_LEFT);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Edge.Left);
expect(mock.mock.calls[0][1]).toBe(50);
expect(result).toBe(node);
});
@@ -115,10 +117,10 @@ describe('node setBorderWidth', () => {
const result = setBorder(50)(node);
expect(mock.mock.calls).toHaveLength(4);
- expect(mock.mock.calls[0]).toEqual([Yoga.EDGE_TOP, 50]);
- expect(mock.mock.calls[1]).toEqual([Yoga.EDGE_RIGHT, 50]);
- expect(mock.mock.calls[2]).toEqual([Yoga.EDGE_BOTTOM, 50]);
- expect(mock.mock.calls[3]).toEqual([Yoga.EDGE_LEFT, 50]);
+ expect(mock.mock.calls[0]).toEqual([Yoga.Edge.Top, 50]);
+ expect(mock.mock.calls[1]).toEqual([Yoga.Edge.Right, 50]);
+ expect(mock.mock.calls[2]).toEqual([Yoga.Edge.Bottom, 50]);
+ expect(mock.mock.calls[3]).toEqual([Yoga.Edge.Left, 50]);
expect(result).toBe(node);
});
diff --git a/packages/layout/tests/node/setDimension.test.js b/packages/layout/tests/node/setDimension.test.js
index 28463aff9..4e4c2e239 100644
--- a/packages/layout/tests/node/setDimension.test.js
+++ b/packages/layout/tests/node/setDimension.test.js
@@ -1,3 +1,4 @@
+import { beforeEach, describe, expect, test, vi } from 'vitest';
import {
setWidth,
setMinWidth,
@@ -8,14 +9,14 @@ import {
} from '../../src/node/setDimension';
describe('node setDimension', () => {
- const mockSetWidth = jest.fn();
- const mockSetWidthPercent = jest.fn();
- const mockSetMinWidth = jest.fn();
- const mockSetMaxWidth = jest.fn();
- const mockSetHeight = jest.fn();
- const mockSetHeightPercent = jest.fn();
- const mockSetMinHeight = jest.fn();
- const mockSetMaxHeight = jest.fn();
+ const mockSetWidth = vi.fn();
+ const mockSetWidthPercent = vi.fn();
+ const mockSetMinWidth = vi.fn();
+ const mockSetMaxWidth = vi.fn();
+ const mockSetHeight = vi.fn();
+ const mockSetHeightPercent = vi.fn();
+ const mockSetMinHeight = vi.fn();
+ const mockSetMaxHeight = vi.fn();
const node = {
yogaNode: {
diff --git a/packages/layout/tests/node/setDisplay.test.js b/packages/layout/tests/node/setDisplay.test.js
index 9cd36fb24..809a6edfb 100644
--- a/packages/layout/tests/node/setDisplay.test.js
+++ b/packages/layout/tests/node/setDisplay.test.js
@@ -1,9 +1,11 @@
-import Yoga from '@react-pdf/yoga';
+import { beforeEach, describe, expect, test, vi } from 'vitest';
+
+import * as Yoga from 'yoga-layout';
import setDisplay from '../../src/node/setDisplay';
describe('node setDisplay', () => {
- const mock = jest.fn();
+ const mock = vi.fn();
const node = { yogaNode: { setDisplay: mock } };
beforeEach(() => {
@@ -21,7 +23,7 @@ describe('node setDisplay', () => {
const result = setDisplay(null)(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.DISPLAY_FLEX);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Display.Flex);
expect(result).toBe(node);
});
@@ -29,7 +31,7 @@ describe('node setDisplay', () => {
const result = setDisplay('flex')(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.DISPLAY_FLEX);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Display.Flex);
expect(result).toBe(node);
});
@@ -37,7 +39,7 @@ describe('node setDisplay', () => {
const result = setDisplay('none')(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.DISPLAY_NONE);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Display.None);
expect(result).toBe(node);
});
});
diff --git a/packages/layout/tests/node/setFlexBasis.test.js b/packages/layout/tests/node/setFlexBasis.test.js
index 39803d896..c24c215c5 100644
--- a/packages/layout/tests/node/setFlexBasis.test.js
+++ b/packages/layout/tests/node/setFlexBasis.test.js
@@ -1,7 +1,8 @@
+import { beforeEach, describe, expect, test, vi } from 'vitest';
import setFlexBasis from '../../src/node/setFlexBasis';
describe('node setFlexBasis', () => {
- const mock = jest.fn();
+ const mock = vi.fn();
const node = { yogaNode: { setFlexBasis: mock } };
beforeEach(() => {
diff --git a/packages/layout/tests/node/setFlexDirection.test.js b/packages/layout/tests/node/setFlexDirection.test.js
index 54e5a453a..e6b84ecd6 100644
--- a/packages/layout/tests/node/setFlexDirection.test.js
+++ b/packages/layout/tests/node/setFlexDirection.test.js
@@ -1,9 +1,11 @@
-import Yoga from '@react-pdf/yoga';
+import { beforeEach, describe, expect, test, vi } from 'vitest';
+
+import * as Yoga from 'yoga-layout';
import setFlexDirection from '../../src/node/setFlexDirection';
describe('node setFlexDirection', () => {
- const mock = jest.fn();
+ const mock = vi.fn();
const node = { yogaNode: { setFlexDirection: mock } };
beforeEach(() => {
@@ -21,7 +23,7 @@ describe('node setFlexDirection', () => {
const result = setFlexDirection(null)(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.FLEX_DIRECTION_COLUMN);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.FlexDirection.Column);
expect(result).toBe(node);
});
@@ -29,7 +31,7 @@ describe('node setFlexDirection', () => {
const result = setFlexDirection('column')(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.FLEX_DIRECTION_COLUMN);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.FlexDirection.Column);
expect(result).toBe(node);
});
@@ -37,7 +39,7 @@ describe('node setFlexDirection', () => {
const result = setFlexDirection('row')(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.FLEX_DIRECTION_ROW);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.FlexDirection.Row);
expect(result).toBe(node);
});
@@ -45,7 +47,7 @@ describe('node setFlexDirection', () => {
const result = setFlexDirection('row-reverse')(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.FLEX_DIRECTION_ROW_REVERSE);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.FlexDirection.RowReverse);
expect(result).toBe(node);
});
@@ -53,7 +55,7 @@ describe('node setFlexDirection', () => {
const result = setFlexDirection('column-reverse')(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.FLEX_DIRECTION_COLUMN_REVERSE);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.FlexDirection.ColumnReverse);
expect(result).toBe(node);
});
});
diff --git a/packages/layout/tests/node/setFlexGrow.test.js b/packages/layout/tests/node/setFlexGrow.test.js
index 6da4b82bc..f88fc5840 100644
--- a/packages/layout/tests/node/setFlexGrow.test.js
+++ b/packages/layout/tests/node/setFlexGrow.test.js
@@ -1,7 +1,8 @@
+import { beforeEach, describe, expect, test, vi } from 'vitest';
import setFlexGrow from '../../src/node/setFlexGrow';
describe('node setFlexGrow', () => {
- const mock = jest.fn();
+ const mock = vi.fn();
const node = { yogaNode: { setFlexGrow: mock } };
beforeEach(() => {
diff --git a/packages/layout/tests/node/setFlexShrink.test.js b/packages/layout/tests/node/setFlexShrink.test.js
index 456c3df04..03a910d21 100644
--- a/packages/layout/tests/node/setFlexShrink.test.js
+++ b/packages/layout/tests/node/setFlexShrink.test.js
@@ -1,7 +1,8 @@
+import { beforeEach, describe, expect, test, vi } from 'vitest';
import setFlexShrink from '../../src/node/setFlexShrink';
describe('node setFlexShrink', () => {
- const mock = jest.fn();
+ const mock = vi.fn();
const node = { yogaNode: { setFlexShrink: mock } };
beforeEach(() => {
diff --git a/packages/layout/tests/node/setFlexWrap.test.js b/packages/layout/tests/node/setFlexWrap.test.js
index 53013f4f4..c8d298ef4 100644
--- a/packages/layout/tests/node/setFlexWrap.test.js
+++ b/packages/layout/tests/node/setFlexWrap.test.js
@@ -1,9 +1,11 @@
-import Yoga from '@react-pdf/yoga';
+import { beforeEach, describe, expect, test, vi } from 'vitest';
+
+import * as Yoga from 'yoga-layout';
import setFlexWrap from '../../src/node/setFlexWrap';
describe('node setFlexWrap', () => {
- const mock = jest.fn();
+ const mock = vi.fn();
const node = { yogaNode: { setFlexWrap: mock } };
beforeEach(() => {
@@ -21,7 +23,7 @@ describe('node setFlexWrap', () => {
const result = setFlexWrap(null)(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.WRAP_NO_WRAP);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Wrap.NoWrap);
expect(result).toBe(node);
});
@@ -29,7 +31,7 @@ describe('node setFlexWrap', () => {
const result = setFlexWrap('no-wrap')(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.WRAP_NO_WRAP);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Wrap.NoWrap);
expect(result).toBe(node);
});
@@ -37,7 +39,7 @@ describe('node setFlexWrap', () => {
const result = setFlexWrap('wrap')(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.WRAP_WRAP);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Wrap.Wrap);
expect(result).toBe(node);
});
@@ -45,7 +47,7 @@ describe('node setFlexWrap', () => {
const result = setFlexWrap('wrap-reverse')(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.WRAP_WRAP_REVERSE);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Wrap.WrapReverse);
expect(result).toBe(node);
});
});
diff --git a/packages/layout/tests/node/setJustifyContent.test.js b/packages/layout/tests/node/setJustifyContent.test.js
index f7bdaabe5..489152c78 100644
--- a/packages/layout/tests/node/setJustifyContent.test.js
+++ b/packages/layout/tests/node/setJustifyContent.test.js
@@ -1,9 +1,11 @@
-import Yoga from '@react-pdf/yoga';
+import { beforeEach, describe, expect, test, vi } from 'vitest';
+
+import * as Yoga from 'yoga-layout';
import setJustifyContent from '../../src/node/setJustifyContent';
describe('node setJustifyContent', () => {
- const mock = jest.fn();
+ const mock = vi.fn();
const node = { yogaNode: { setJustifyContent: mock } };
beforeEach(() => {
@@ -21,7 +23,7 @@ describe('node setJustifyContent', () => {
const result = setJustifyContent('center')(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.JUSTIFY_CENTER);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Justify.Center);
expect(result).toBe(node);
});
@@ -29,7 +31,7 @@ describe('node setJustifyContent', () => {
const result = setJustifyContent('flex-end')(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.JUSTIFY_FLEX_END);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Justify.FlexEnd);
expect(result).toBe(node);
});
@@ -37,7 +39,7 @@ describe('node setJustifyContent', () => {
const result = setJustifyContent('flex-start')(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.JUSTIFY_FLEX_START);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Justify.FlexStart);
expect(result).toBe(node);
});
@@ -45,7 +47,7 @@ describe('node setJustifyContent', () => {
const result = setJustifyContent('space-between')(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.JUSTIFY_SPACE_BETWEEN);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Justify.SpaceBetween);
expect(result).toBe(node);
});
@@ -53,7 +55,7 @@ describe('node setJustifyContent', () => {
const result = setJustifyContent('space-around')(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.JUSTIFY_SPACE_AROUND);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Justify.SpaceAround);
expect(result).toBe(node);
});
@@ -61,7 +63,7 @@ describe('node setJustifyContent', () => {
const result = setJustifyContent('space-evenly')(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.JUSTIFY_SPACE_EVENLY);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Justify.SpaceEvenly);
expect(result).toBe(node);
});
});
diff --git a/packages/layout/tests/node/setMargin.test.js b/packages/layout/tests/node/setMargin.test.js
index 9b8d69be7..4f5c492b1 100644
--- a/packages/layout/tests/node/setMargin.test.js
+++ b/packages/layout/tests/node/setMargin.test.js
@@ -1,4 +1,6 @@
-import Yoga from '@react-pdf/yoga';
+import { beforeEach, describe, expect, test, vi } from 'vitest';
+
+import * as Yoga from 'yoga-layout';
import setMargin, {
setMarginTop,
@@ -8,9 +10,9 @@ import setMargin, {
} from '../../src/node/setMargin';
describe('node setMargin', () => {
- const mock = jest.fn();
- const mockAuto = jest.fn();
- const mockPercent = jest.fn();
+ const mock = vi.fn();
+ const mockAuto = vi.fn();
+ const mockPercent = vi.fn();
const node = {
yogaNode: {
@@ -38,7 +40,7 @@ describe('node setMargin', () => {
const result = setMarginTop('auto')(node);
expect(mockAuto.mock.calls).toHaveLength(1);
- expect(mockAuto.mock.calls[0][0]).toBe(Yoga.EDGE_TOP);
+ expect(mockAuto.mock.calls[0][0]).toBe(Yoga.Edge.Top);
expect(result).toBe(node);
});
@@ -46,7 +48,7 @@ describe('node setMargin', () => {
const result = setMarginTop(50)(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.EDGE_TOP);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Edge.Top);
expect(mock.mock.calls[0][1]).toBe(50);
expect(result).toBe(node);
});
@@ -55,7 +57,7 @@ describe('node setMargin', () => {
const result = setMarginTop('50%')(node);
expect(mockPercent.mock.calls).toHaveLength(1);
- expect(mockPercent.mock.calls[0][0]).toBe(Yoga.EDGE_TOP);
+ expect(mockPercent.mock.calls[0][0]).toBe(Yoga.Edge.Top);
expect(mockPercent.mock.calls[0][1]).toBe(50);
expect(result).toBe(node);
});
@@ -73,7 +75,7 @@ describe('node setMargin', () => {
const result = setMarginRight('auto')(node);
expect(mockAuto.mock.calls).toHaveLength(1);
- expect(mockAuto.mock.calls[0][0]).toBe(Yoga.EDGE_RIGHT);
+ expect(mockAuto.mock.calls[0][0]).toBe(Yoga.Edge.Right);
expect(result).toBe(node);
});
@@ -81,7 +83,7 @@ describe('node setMargin', () => {
const result = setMarginRight(50)(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.EDGE_RIGHT);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Edge.Right);
expect(mock.mock.calls[0][1]).toBe(50);
expect(result).toBe(node);
});
@@ -90,7 +92,7 @@ describe('node setMargin', () => {
const result = setMarginRight('50%')(node);
expect(mockPercent.mock.calls).toHaveLength(1);
- expect(mockPercent.mock.calls[0][0]).toBe(Yoga.EDGE_RIGHT);
+ expect(mockPercent.mock.calls[0][0]).toBe(Yoga.Edge.Right);
expect(mockPercent.mock.calls[0][1]).toBe(50);
expect(result).toBe(node);
});
@@ -108,7 +110,7 @@ describe('node setMargin', () => {
const result = setMarginBottom('auto')(node);
expect(mockAuto.mock.calls).toHaveLength(1);
- expect(mockAuto.mock.calls[0][0]).toBe(Yoga.EDGE_BOTTOM);
+ expect(mockAuto.mock.calls[0][0]).toBe(Yoga.Edge.Bottom);
expect(result).toBe(node);
});
@@ -116,7 +118,7 @@ describe('node setMargin', () => {
const result = setMarginBottom(50)(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.EDGE_BOTTOM);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Edge.Bottom);
expect(mock.mock.calls[0][1]).toBe(50);
expect(result).toBe(node);
});
@@ -125,7 +127,7 @@ describe('node setMargin', () => {
const result = setMarginBottom('50%')(node);
expect(mockPercent.mock.calls).toHaveLength(1);
- expect(mockPercent.mock.calls[0][0]).toBe(Yoga.EDGE_BOTTOM);
+ expect(mockPercent.mock.calls[0][0]).toBe(Yoga.Edge.Bottom);
expect(mockPercent.mock.calls[0][1]).toBe(50);
expect(result).toBe(node);
});
@@ -143,7 +145,7 @@ describe('node setMargin', () => {
const result = setMarginLeft('auto')(node);
expect(mockAuto.mock.calls).toHaveLength(1);
- expect(mockAuto.mock.calls[0][0]).toBe(Yoga.EDGE_LEFT);
+ expect(mockAuto.mock.calls[0][0]).toBe(Yoga.Edge.Left);
expect(result).toBe(node);
});
@@ -151,7 +153,7 @@ describe('node setMargin', () => {
const result = setMarginLeft(50)(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.EDGE_LEFT);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Edge.Left);
expect(mock.mock.calls[0][1]).toBe(50);
expect(result).toBe(node);
});
@@ -160,7 +162,7 @@ describe('node setMargin', () => {
const result = setMarginLeft('50%')(node);
expect(mockPercent.mock.calls).toHaveLength(1);
- expect(mockPercent.mock.calls[0][0]).toBe(Yoga.EDGE_LEFT);
+ expect(mockPercent.mock.calls[0][0]).toBe(Yoga.Edge.Left);
expect(mockPercent.mock.calls[0][1]).toBe(50);
expect(result).toBe(node);
});
@@ -178,10 +180,10 @@ describe('node setMargin', () => {
const result = setMargin('auto')(node);
expect(mockAuto.mock.calls).toHaveLength(4);
- expect(mockAuto.mock.calls[0][0]).toBe(Yoga.EDGE_TOP);
- expect(mockAuto.mock.calls[1][0]).toBe(Yoga.EDGE_RIGHT);
- expect(mockAuto.mock.calls[2][0]).toBe(Yoga.EDGE_BOTTOM);
- expect(mockAuto.mock.calls[3][0]).toBe(Yoga.EDGE_LEFT);
+ expect(mockAuto.mock.calls[0][0]).toBe(Yoga.Edge.Top);
+ expect(mockAuto.mock.calls[1][0]).toBe(Yoga.Edge.Right);
+ expect(mockAuto.mock.calls[2][0]).toBe(Yoga.Edge.Bottom);
+ expect(mockAuto.mock.calls[3][0]).toBe(Yoga.Edge.Left);
expect(result).toBe(node);
});
@@ -189,10 +191,10 @@ describe('node setMargin', () => {
const result = setMargin(50)(node);
expect(mock.mock.calls).toHaveLength(4);
- expect(mock.mock.calls[0]).toEqual([Yoga.EDGE_TOP, 50]);
- expect(mock.mock.calls[1]).toEqual([Yoga.EDGE_RIGHT, 50]);
- expect(mock.mock.calls[2]).toEqual([Yoga.EDGE_BOTTOM, 50]);
- expect(mock.mock.calls[3]).toEqual([Yoga.EDGE_LEFT, 50]);
+ expect(mock.mock.calls[0]).toEqual([Yoga.Edge.Top, 50]);
+ expect(mock.mock.calls[1]).toEqual([Yoga.Edge.Right, 50]);
+ expect(mock.mock.calls[2]).toEqual([Yoga.Edge.Bottom, 50]);
+ expect(mock.mock.calls[3]).toEqual([Yoga.Edge.Left, 50]);
expect(result).toBe(node);
});
@@ -200,10 +202,10 @@ describe('node setMargin', () => {
const result = setMargin('50%')(node);
expect(mockPercent.mock.calls).toHaveLength(4);
- expect(mockPercent.mock.calls[0]).toEqual([Yoga.EDGE_TOP, 50]);
- expect(mockPercent.mock.calls[1]).toEqual([Yoga.EDGE_RIGHT, 50]);
- expect(mockPercent.mock.calls[2]).toEqual([Yoga.EDGE_BOTTOM, 50]);
- expect(mockPercent.mock.calls[3]).toEqual([Yoga.EDGE_LEFT, 50]);
+ expect(mockPercent.mock.calls[0]).toEqual([Yoga.Edge.Top, 50]);
+ expect(mockPercent.mock.calls[1]).toEqual([Yoga.Edge.Right, 50]);
+ expect(mockPercent.mock.calls[2]).toEqual([Yoga.Edge.Bottom, 50]);
+ expect(mockPercent.mock.calls[3]).toEqual([Yoga.Edge.Left, 50]);
expect(result).toBe(node);
});
});
diff --git a/packages/layout/tests/node/setOverflow.test.js b/packages/layout/tests/node/setOverflow.test.js
index 2cbb3ac7c..fed121431 100644
--- a/packages/layout/tests/node/setOverflow.test.js
+++ b/packages/layout/tests/node/setOverflow.test.js
@@ -1,9 +1,11 @@
-import Yoga from '@react-pdf/yoga';
+import { beforeEach, describe, expect, test, vi } from 'vitest';
+
+import * as Yoga from 'yoga-layout';
import setOverflow from '../../src/node/setOverflow';
describe('node setOverflow', () => {
- const mock = jest.fn();
+ const mock = vi.fn();
const node = { yogaNode: { setOverflow: mock } };
beforeEach(() => {
@@ -21,7 +23,7 @@ describe('node setOverflow', () => {
const result = setOverflow('visible')(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.OVERFLOW_VISIBLE);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Overflow.Visible);
expect(result).toBe(node);
});
@@ -29,7 +31,7 @@ describe('node setOverflow', () => {
const result = setOverflow('scroll')(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.OVERFLOW_SCROLL);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Overflow.Scroll);
expect(result).toBe(node);
});
@@ -37,7 +39,7 @@ describe('node setOverflow', () => {
const result = setOverflow('hidden')(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.OVERFLOW_HIDDEN);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Overflow.Hidden);
expect(result).toBe(node);
});
});
diff --git a/packages/layout/tests/node/setPadding.test.js b/packages/layout/tests/node/setPadding.test.js
index 904820f0c..67345f1aa 100644
--- a/packages/layout/tests/node/setPadding.test.js
+++ b/packages/layout/tests/node/setPadding.test.js
@@ -1,4 +1,6 @@
-import Yoga from '@react-pdf/yoga';
+import { beforeEach, describe, expect, test, vi } from 'vitest';
+
+import * as Yoga from 'yoga-layout';
import setPadding, {
setPaddingTop,
@@ -8,8 +10,8 @@ import setPadding, {
} from '../../src/node/setPadding';
describe('node setPadding', () => {
- const mock = jest.fn();
- const mockPercent = jest.fn();
+ const mock = vi.fn();
+ const mockPercent = vi.fn();
const node = {
yogaNode: { setPadding: mock, setPaddingPercent: mockPercent },
@@ -32,7 +34,7 @@ describe('node setPadding', () => {
const result = setPaddingTop(50)(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.EDGE_TOP);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Edge.Top);
expect(mock.mock.calls[0][1]).toBe(50);
expect(result).toBe(node);
});
@@ -41,7 +43,7 @@ describe('node setPadding', () => {
const result = setPaddingTop('50%')(node);
expect(mockPercent.mock.calls).toHaveLength(1);
- expect(mockPercent.mock.calls[0][0]).toBe(Yoga.EDGE_TOP);
+ expect(mockPercent.mock.calls[0][0]).toBe(Yoga.Edge.Top);
expect(mockPercent.mock.calls[0][1]).toBe(50);
expect(result).toBe(node);
});
@@ -59,7 +61,7 @@ describe('node setPadding', () => {
const result = setPaddingRight(50)(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.EDGE_RIGHT);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Edge.Right);
expect(mock.mock.calls[0][1]).toBe(50);
expect(result).toBe(node);
});
@@ -68,7 +70,7 @@ describe('node setPadding', () => {
const result = setPaddingRight('50%')(node);
expect(mockPercent.mock.calls).toHaveLength(1);
- expect(mockPercent.mock.calls[0][0]).toBe(Yoga.EDGE_RIGHT);
+ expect(mockPercent.mock.calls[0][0]).toBe(Yoga.Edge.Right);
expect(mockPercent.mock.calls[0][1]).toBe(50);
expect(result).toBe(node);
});
@@ -86,7 +88,7 @@ describe('node setPadding', () => {
const result = setPaddingBottom(50)(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.EDGE_BOTTOM);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Edge.Bottom);
expect(mock.mock.calls[0][1]).toBe(50);
expect(result).toBe(node);
});
@@ -95,7 +97,7 @@ describe('node setPadding', () => {
const result = setPaddingBottom('50%')(node);
expect(mockPercent.mock.calls).toHaveLength(1);
- expect(mockPercent.mock.calls[0][0]).toBe(Yoga.EDGE_BOTTOM);
+ expect(mockPercent.mock.calls[0][0]).toBe(Yoga.Edge.Bottom);
expect(mockPercent.mock.calls[0][1]).toBe(50);
expect(result).toBe(node);
});
@@ -113,7 +115,7 @@ describe('node setPadding', () => {
const result = setPaddingLeft(50)(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.EDGE_LEFT);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Edge.Left);
expect(mock.mock.calls[0][1]).toBe(50);
expect(result).toBe(node);
});
@@ -122,7 +124,7 @@ describe('node setPadding', () => {
const result = setPaddingLeft('50%')(node);
expect(mockPercent.mock.calls).toHaveLength(1);
- expect(mockPercent.mock.calls[0][0]).toBe(Yoga.EDGE_LEFT);
+ expect(mockPercent.mock.calls[0][0]).toBe(Yoga.Edge.Left);
expect(mockPercent.mock.calls[0][1]).toBe(50);
expect(result).toBe(node);
});
@@ -140,10 +142,10 @@ describe('node setPadding', () => {
const result = setPadding(50)(node);
expect(mock.mock.calls).toHaveLength(4);
- expect(mock.mock.calls[0]).toEqual([Yoga.EDGE_TOP, 50]);
- expect(mock.mock.calls[1]).toEqual([Yoga.EDGE_RIGHT, 50]);
- expect(mock.mock.calls[2]).toEqual([Yoga.EDGE_BOTTOM, 50]);
- expect(mock.mock.calls[3]).toEqual([Yoga.EDGE_LEFT, 50]);
+ expect(mock.mock.calls[0]).toEqual([Yoga.Edge.Top, 50]);
+ expect(mock.mock.calls[1]).toEqual([Yoga.Edge.Right, 50]);
+ expect(mock.mock.calls[2]).toEqual([Yoga.Edge.Bottom, 50]);
+ expect(mock.mock.calls[3]).toEqual([Yoga.Edge.Left, 50]);
expect(result).toBe(node);
});
@@ -151,10 +153,10 @@ describe('node setPadding', () => {
const result = setPadding('50%')(node);
expect(mockPercent.mock.calls).toHaveLength(4);
- expect(mockPercent.mock.calls[0]).toEqual([Yoga.EDGE_TOP, 50]);
- expect(mockPercent.mock.calls[1]).toEqual([Yoga.EDGE_RIGHT, 50]);
- expect(mockPercent.mock.calls[2]).toEqual([Yoga.EDGE_BOTTOM, 50]);
- expect(mockPercent.mock.calls[3]).toEqual([Yoga.EDGE_LEFT, 50]);
+ expect(mockPercent.mock.calls[0]).toEqual([Yoga.Edge.Top, 50]);
+ expect(mockPercent.mock.calls[1]).toEqual([Yoga.Edge.Right, 50]);
+ expect(mockPercent.mock.calls[2]).toEqual([Yoga.Edge.Bottom, 50]);
+ expect(mockPercent.mock.calls[3]).toEqual([Yoga.Edge.Left, 50]);
expect(result).toBe(node);
});
});
diff --git a/packages/layout/tests/node/setPosition.test.js b/packages/layout/tests/node/setPosition.test.js
index 3fb2998cc..57fe1e1c8 100644
--- a/packages/layout/tests/node/setPosition.test.js
+++ b/packages/layout/tests/node/setPosition.test.js
@@ -1,4 +1,6 @@
-import Yoga from '@react-pdf/yoga';
+import { beforeEach, describe, expect, test, vi } from 'vitest';
+
+import * as Yoga from 'yoga-layout';
import setPosition, {
setPositionTop,
@@ -8,8 +10,8 @@ import setPosition, {
} from '../../src/node/setPosition';
describe('node setPosition', () => {
- const mock = jest.fn();
- const mockPercent = jest.fn();
+ const mock = vi.fn();
+ const mockPercent = vi.fn();
const node = {
yogaNode: { setPosition: mock, setPositionPercent: mockPercent },
@@ -32,7 +34,7 @@ describe('node setPosition', () => {
const result = setPositionTop(50)(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.EDGE_TOP);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Edge.Top);
expect(mock.mock.calls[0][1]).toBe(50);
expect(result).toBe(node);
});
@@ -41,7 +43,7 @@ describe('node setPosition', () => {
const result = setPositionTop('50%')(node);
expect(mockPercent.mock.calls).toHaveLength(1);
- expect(mockPercent.mock.calls[0][0]).toBe(Yoga.EDGE_TOP);
+ expect(mockPercent.mock.calls[0][0]).toBe(Yoga.Edge.Top);
expect(mockPercent.mock.calls[0][1]).toBe(50);
expect(result).toBe(node);
});
@@ -59,7 +61,7 @@ describe('node setPosition', () => {
const result = setPositionRight(50)(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.EDGE_RIGHT);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Edge.Right);
expect(mock.mock.calls[0][1]).toBe(50);
expect(result).toBe(node);
});
@@ -68,7 +70,7 @@ describe('node setPosition', () => {
const result = setPositionRight('50%')(node);
expect(mockPercent.mock.calls).toHaveLength(1);
- expect(mockPercent.mock.calls[0][0]).toBe(Yoga.EDGE_RIGHT);
+ expect(mockPercent.mock.calls[0][0]).toBe(Yoga.Edge.Right);
expect(mockPercent.mock.calls[0][1]).toBe(50);
expect(result).toBe(node);
});
@@ -86,7 +88,7 @@ describe('node setPosition', () => {
const result = setPositionBottom(50)(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.EDGE_BOTTOM);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Edge.Bottom);
expect(mock.mock.calls[0][1]).toBe(50);
expect(result).toBe(node);
});
@@ -95,7 +97,7 @@ describe('node setPosition', () => {
const result = setPositionBottom('50%')(node);
expect(mockPercent.mock.calls).toHaveLength(1);
- expect(mockPercent.mock.calls[0][0]).toBe(Yoga.EDGE_BOTTOM);
+ expect(mockPercent.mock.calls[0][0]).toBe(Yoga.Edge.Bottom);
expect(mockPercent.mock.calls[0][1]).toBe(50);
expect(result).toBe(node);
});
@@ -113,7 +115,7 @@ describe('node setPosition', () => {
const result = setPositionLeft(50)(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.EDGE_LEFT);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.Edge.Left);
expect(mock.mock.calls[0][1]).toBe(50);
expect(result).toBe(node);
});
@@ -122,7 +124,7 @@ describe('node setPosition', () => {
const result = setPositionLeft('50%')(node);
expect(mockPercent.mock.calls).toHaveLength(1);
- expect(mockPercent.mock.calls[0][0]).toBe(Yoga.EDGE_LEFT);
+ expect(mockPercent.mock.calls[0][0]).toBe(Yoga.Edge.Left);
expect(mockPercent.mock.calls[0][1]).toBe(50);
expect(result).toBe(node);
});
@@ -140,10 +142,10 @@ describe('node setPosition', () => {
const result = setPosition(50)(node);
expect(mock.mock.calls).toHaveLength(4);
- expect(mock.mock.calls[0]).toEqual([Yoga.EDGE_TOP, 50]);
- expect(mock.mock.calls[1]).toEqual([Yoga.EDGE_RIGHT, 50]);
- expect(mock.mock.calls[2]).toEqual([Yoga.EDGE_BOTTOM, 50]);
- expect(mock.mock.calls[3]).toEqual([Yoga.EDGE_LEFT, 50]);
+ expect(mock.mock.calls[0]).toEqual([Yoga.Edge.Top, 50]);
+ expect(mock.mock.calls[1]).toEqual([Yoga.Edge.Right, 50]);
+ expect(mock.mock.calls[2]).toEqual([Yoga.Edge.Bottom, 50]);
+ expect(mock.mock.calls[3]).toEqual([Yoga.Edge.Left, 50]);
expect(result).toBe(node);
});
@@ -151,10 +153,10 @@ describe('node setPosition', () => {
const result = setPosition('50%')(node);
expect(mockPercent.mock.calls).toHaveLength(4);
- expect(mockPercent.mock.calls[0]).toEqual([Yoga.EDGE_TOP, 50]);
- expect(mockPercent.mock.calls[1]).toEqual([Yoga.EDGE_RIGHT, 50]);
- expect(mockPercent.mock.calls[2]).toEqual([Yoga.EDGE_BOTTOM, 50]);
- expect(mockPercent.mock.calls[3]).toEqual([Yoga.EDGE_LEFT, 50]);
+ expect(mockPercent.mock.calls[0]).toEqual([Yoga.Edge.Top, 50]);
+ expect(mockPercent.mock.calls[1]).toEqual([Yoga.Edge.Right, 50]);
+ expect(mockPercent.mock.calls[2]).toEqual([Yoga.Edge.Bottom, 50]);
+ expect(mockPercent.mock.calls[3]).toEqual([Yoga.Edge.Left, 50]);
expect(result).toBe(node);
});
});
diff --git a/packages/layout/tests/node/setPositionType.test.js b/packages/layout/tests/node/setPositionType.test.js
index a3fdd9d63..135fa0088 100644
--- a/packages/layout/tests/node/setPositionType.test.js
+++ b/packages/layout/tests/node/setPositionType.test.js
@@ -1,9 +1,11 @@
-import Yoga from '@react-pdf/yoga';
+import { beforeEach, describe, expect, test, vi } from 'vitest';
+
+import * as Yoga from 'yoga-layout';
import setPositionType from '../../src/node/setPositionType';
describe('node setPositionType', () => {
- const mock = jest.fn();
+ const mock = vi.fn();
const node = { yogaNode: { setPositionType: mock } };
beforeEach(() => {
@@ -21,7 +23,7 @@ describe('node setPositionType', () => {
const result = setPositionType('relative')(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.POSITION_TYPE_RELATIVE);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.PositionType.Relative);
expect(result).toBe(node);
});
@@ -29,7 +31,7 @@ describe('node setPositionType', () => {
const result = setPositionType('absolute')(node);
expect(mock.mock.calls).toHaveLength(1);
- expect(mock.mock.calls[0][0]).toBe(Yoga.POSITION_TYPE_ABSOLUTE);
+ expect(mock.mock.calls[0][0]).toBe(Yoga.PositionType.Absolute);
expect(result).toBe(node);
});
});
diff --git a/packages/layout/tests/node/shouldBreak.test.js b/packages/layout/tests/node/shouldBreak.test.js
new file mode 100644
index 000000000..d0df84f77
--- /dev/null
+++ b/packages/layout/tests/node/shouldBreak.test.js
@@ -0,0 +1,435 @@
+import { describe, expect, test } from 'vitest';
+
+import * as P from '@react-pdf/primitives';
+import shouldBreak from '../../src/node/shouldBreak';
+
+describe('node shouldBreak', () => {
+ test('should not break when the child has enough space on the page', () => {
+ const result = shouldBreak(
+ {
+ box: { top: 50, height: 400 },
+ },
+ [],
+ 1000,
+ );
+
+ expect(result).toEqual(false);
+ });
+
+ test('should break when the child has enough space on the page', () => {
+ const result = shouldBreak(
+ {
+ box: { top: 50, height: 400 },
+ props: { break: true },
+ },
+ [],
+ 1000,
+ );
+
+ expect(result).toEqual(true);
+ });
+
+ test('should not break when the child can be wrapped', () => {
+ const result = shouldBreak(
+ {
+ box: { top: 50, height: 1400 },
+ props: { wrap: true },
+ },
+ [],
+ 1000,
+ );
+
+ expect(result).toEqual(false);
+ });
+
+ test('should break when the child is an unwrappable node', () => {
+ const result = shouldBreak(
+ {
+ type: P.Image,
+ box: { top: 50, height: 1400 },
+ props: { wrap: true },
+ },
+ [],
+ 1000,
+ );
+
+ expect(result).toEqual(true);
+ });
+
+ test('should break when the child has wrapping disabled', () => {
+ const result = shouldBreak(
+ {
+ box: { top: 50, height: 1400 },
+ props: { wrap: false },
+ },
+ [],
+ 1000,
+ );
+
+ expect(result).toEqual(true);
+ });
+
+ test('should break when minPresenceAhead is large enough and there are overflowing siblings after the child', () => {
+ const result = shouldBreak(
+ {
+ box: { top: 500, height: 400, marginTop: 0, marginBottom: 0 },
+ props: { minPresenceAhead: 400 },
+ },
+ [{ box: { top: 900, height: 200, marginTop: 0, marginBottom: 0 } }],
+ 1000,
+ );
+
+ expect(result).toEqual(true);
+ });
+
+ test('should break when minPresenceAhead is large enough and there are overflowing siblings due to margins after the child', () => {
+ const result = shouldBreak(
+ {
+ box: { top: 500, height: 400, marginTop: 0, marginBottom: 0 },
+ props: { minPresenceAhead: 400 },
+ },
+ [{ box: { top: 1100, height: 0, marginTop: 200, marginBottom: 0 } }],
+ 1000,
+ );
+
+ expect(result).toEqual(true);
+ });
+
+ test('should not break when minPresenceAhead is not past the page end', () => {
+ const result = shouldBreak(
+ {
+ box: { top: 500, height: 400, marginTop: 0, marginBottom: 0 },
+ props: { minPresenceAhead: 100 },
+ },
+ [{ box: { top: 900, height: 200, marginTop: 0, marginBottom: 0 } }],
+ 1000,
+ );
+
+ expect(result).toEqual(false);
+ });
+
+ test('should not break when the siblings after the child do not overflow past the page end', () => {
+ const result = shouldBreak(
+ {
+ box: { top: 500, height: 400, marginTop: 0, marginBottom: 0 },
+ props: { minPresenceAhead: 400 },
+ },
+ [{ box: { top: 900, height: 100, marginTop: 0, marginBottom: 0 } }],
+ 1000,
+ );
+
+ expect(result).toEqual(false);
+ });
+
+ test('should not break when the siblings after the child do not overflow past the page end, with margins', () => {
+ const result = shouldBreak(
+ {
+ box: { top: 500, height: 400, marginTop: 0, marginBottom: 0 },
+ props: { minPresenceAhead: 400 },
+ },
+ [{ box: { top: 1000, height: 0, marginTop: 100, marginBottom: 0 } }],
+ 1000,
+ );
+
+ expect(result).toEqual(false);
+ });
+
+ test("should not break when only the last sibling's bottom margin overflows past the page end", () => {
+ const result = shouldBreak(
+ {
+ box: { top: 500, height: 400, marginTop: 0, marginBottom: 0 },
+ props: { minPresenceAhead: 400 },
+ },
+ [{ box: { top: 900, height: 100, marginTop: 0, marginBottom: 100 } }],
+ 1000,
+ );
+
+ expect(result).toEqual(false);
+ });
+
+ test('should not break due to minPresenceAhead when breaking does not improve presence, to avoid infinite loops', () => {
+ const result = shouldBreak(
+ {
+ box: { top: 500, height: 400, marginTop: 500, marginBottom: 0 },
+ props: { minPresenceAhead: 400 },
+ },
+ [{ box: { top: 900, height: 200, marginTop: 0, marginBottom: 0 } }],
+ 1000,
+ );
+
+ expect(result).toEqual(false);
+ });
+
+ test('should never break fixed child', () => {
+ const result = shouldBreak(
+ {
+ box: { top: 500, height: 400, marginTop: 0, marginBottom: 0 },
+ props: { minPresenceAhead: 400, fixed: true },
+ },
+ [{ box: { top: 900, height: 200, marginTop: 0, marginBottom: 0 } }],
+ 1000,
+ );
+
+ expect(result).toEqual(false);
+ });
+
+ test('should ignore fixed elements after child', () => {
+ const result = shouldBreak(
+ {
+ box: { top: 500, height: 400, marginTop: 0, marginBottom: 0 },
+ props: { minPresenceAhead: 400, fixed: true },
+ },
+ [
+ {
+ box: { top: 900, height: 200, marginTop: 0, marginBottom: 0 },
+ props: { fixed: true },
+ },
+ ],
+ 1000,
+ );
+
+ expect(result).toEqual(false);
+ });
+
+ test('should work with trivial minimal reproduction example', () => {
+ const result = shouldBreak(
+ {
+ type: 'VIEW',
+ box: {
+ top: 30,
+ height: 0,
+ marginTop: 0,
+ marginBottom: 0,
+ },
+ props: { minPresenceAhead: 100 },
+ },
+ [
+ {
+ type: 'VIEW',
+ box: {
+ top: 30,
+ height: 70,
+ marginTop: 0,
+ marginBottom: 0,
+ },
+ },
+ {
+ type: 'VIEW',
+ box: {
+ top: 130,
+ height: 0,
+ marginTop: 30,
+ marginBottom: 0,
+ },
+ },
+ ],
+ 811.89,
+ );
+
+ expect(result).toEqual(false);
+ });
+
+ test('should work with minimal infinite loop reproduction example', () => {
+ const result = shouldBreak(
+ {
+ type: 'VIEW',
+ box: {
+ top: 30,
+ height: 0,
+ marginTop: 0,
+ marginBottom: 0,
+ },
+ props: { minPresenceAhead: 100 },
+ },
+ [
+ {
+ type: 'VIEW',
+ box: {
+ top: 30,
+ height: 71,
+ marginTop: 0,
+ marginBottom: 0,
+ },
+ },
+ {
+ type: 'VIEW',
+ box: {
+ top: 131,
+ height: 0,
+ marginTop: 30,
+ marginBottom: 0,
+ },
+ },
+ ],
+ 811.89,
+ );
+
+ expect(result).toEqual(false);
+ });
+
+ test('should work with reproduction from #2303', () => {
+ const result = shouldBreak(
+ {
+ type: 'TEXT',
+ box: {
+ paddingTop: 0,
+ paddingRight: 0,
+ paddingBottom: 0,
+ paddingLeft: 0,
+ marginTop: 12,
+ marginRight: 12,
+ marginBottom: 12,
+ marginLeft: 12,
+ borderTopWidth: 0,
+ borderRightWidth: 0,
+ borderBottomWidth: 0,
+ borderLeftWidth: 0,
+ top: 541.7999877929688,
+ right: 12,
+ bottom: 12,
+ left: 72,
+ width: 451.280029296875,
+ height: 250.8800048828125,
+ },
+ style: {
+ marginTop: 12,
+ marginRight: 12,
+ marginBottom: 12,
+ marginLeft: 12,
+ fontSize: 14,
+ textAlign: 'justify',
+ fontFamily: 'Times-Roman',
+ },
+ props: {
+ minPresenceAhead: 4,
+ },
+ children: [
+ {
+ type: 'TEXT_INSTANCE',
+ value:
+ 'En un lugar de la Mancha, de cuyo nombre no quiero acordarme, no ha mucho tiempo que vivía un hidalgo de los de lanza en astillero, adarga antigua, rocín flaco y galgo corredor. Una olla de algo más vaca que carnero, salpicón las más noches, duelos y quebrantos los sábados, lentejas los viernes, algún palomino de añadidura los domingos, consumían las tres partes de su hacienda. El resto della concluían sayo de velarte, calzas de velludo para las fiestas con sus pantuflos de lo mismo, los días de entre semana se honraba con su vellori de lo más fino. Tenía en su casa una ama que pasaba de los cuarenta, y una sobrina que no llegaba a los veinte, y un mozo de campo y plaza, que así ensillaba el rocín como tomaba la podadera. Frisaba la edad de nuestro hidalgo con los cincuenta años, era de complexión recia, seco de carnes, enjuto de rostro; gran madrugador y amigo de la caza. Quieren decir que tenía el sobrenombre de Quijada o Quesada (que en esto hay alguna diferencia en los autores que deste caso escriben), aunque por conjeturas verosímiles se deja entender que se llama Quijana; pero esto importa poco a nuestro cuento; basta que en la narración dél no se salga un punto de la verdad',
+ style: {
+ fontFamily: 'Times-Roman',
+ fontSize: 14,
+ textAlign: 'justify',
+ },
+ },
+ ],
+ },
+ [
+ {
+ type: 'TEXT',
+ box: {
+ paddingTop: 0,
+ paddingRight: 0,
+ paddingBottom: 0,
+ paddingLeft: 0,
+ marginTop: 550,
+ marginRight: 0,
+ marginBottom: 0,
+ marginLeft: 0,
+ borderTopWidth: 0,
+ borderRightWidth: 0,
+ borderBottomWidth: 0,
+ borderLeftWidth: 0,
+ top: 1354.679931640625,
+ right: 0,
+ bottom: 0,
+ left: 60,
+ width: 475.280029296875,
+ height: 19.799999237060547,
+ },
+ style: {
+ marginTop: 550,
+ },
+ props: {},
+ children: [
+ {
+ type: 'TEXT_INSTANCE',
+ value: 'Orphans example. Try changing prop value',
+ style: {},
+ },
+ ],
+ },
+ {
+ type: 'TEXT',
+ box: {
+ paddingTop: 0,
+ paddingRight: 0,
+ paddingBottom: 0,
+ paddingLeft: 0,
+ marginTop: 12,
+ marginRight: 12,
+ marginBottom: 12,
+ marginLeft: 12,
+ borderTopWidth: 0,
+ borderRightWidth: 0,
+ borderBottomWidth: 0,
+ borderLeftWidth: 0,
+ top: 1386.47998046875,
+ right: 12,
+ bottom: 12,
+ left: 72,
+ width: 451.280029296875,
+ height: 250.8800048828125,
+ },
+ style: {
+ marginTop: 12,
+ marginRight: 12,
+ marginBottom: 12,
+ marginLeft: 12,
+ fontSize: 14,
+ textAlign: 'justify',
+ fontFamily: 'Times-Roman',
+ },
+ props: {
+ orphans: 4,
+ },
+ children: [
+ {
+ type: 'TEXT_INSTANCE',
+ value:
+ 'En un lugar de la Mancha, de cuyo nombre no quiero acordarme, no ha mucho tiempo que vivía un hidalgo de los de lanza en astillero, adarga antigua, rocín flaco y galgo corredor. Una olla de algo más vaca que carnero, salpicón las más noches, duelos y quebrantos los sábados, lentejas los viernes, algún palomino de añadidura los domingos, consumían las tres partes de su hacienda. El resto della concluían sayo de velarte, calzas de velludo para las fiestas con sus pantuflos de lo mismo, los días de entre semana se honraba con su vellori de lo más fino. Tenía en su casa una ama que pasaba de los cuarenta, y una sobrina que no llegaba a los veinte, y un mozo de campo y plaza, que así ensillaba el rocín como tomaba la podadera. Frisaba la edad de nuestro hidalgo con los cincuenta años, era de complexión recia, seco de carnes, enjuto de rostro; gran madrugador y amigo de la caza. Quieren decir que tenía el sobrenombre de Quijada o Quesada (que en esto hay alguna diferencia en los autores que deste caso escriben), aunque por conjeturas verosímiles se deja entender que se llama Quijana; pero esto importa poco a nuestro cuento; basta que en la narración dél no se salga un punto de la verdad',
+ style: {
+ fontFamily: 'Times-Roman',
+ fontSize: 14,
+ textAlign: 'justify',
+ },
+ },
+ ],
+ },
+ ],
+ 781.89,
+ );
+
+ expect(result).toEqual(false);
+ });
+
+ test('should not break when the child can wrap', () => {
+ const result = shouldBreak(
+ {
+ type: 'TEXT',
+ box: {
+ top: 425.23779296875,
+ height: 419.439453125,
+ marginTop: 12,
+ marginBottom: 12,
+ },
+ },
+ [
+ {
+ type: 'TEXT',
+ box: {
+ top: 868.67724609375,
+ height: 247.8505859375,
+ marginTop: 12,
+ marginBottom: 12,
+ },
+ },
+ ],
+ 776.89,
+ );
+
+ expect(result).toEqual(false);
+ });
+});
diff --git a/packages/layout/tests/page/getOrientation.test.js b/packages/layout/tests/page/getOrientation.test.js
index 7ee79142d..d8c5c7841 100644
--- a/packages/layout/tests/page/getOrientation.test.js
+++ b/packages/layout/tests/page/getOrientation.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import getOrientation from '../../src/page/getOrientation';
describe('page getOrientation', () => {
diff --git a/packages/layout/tests/page/getSize.test.js b/packages/layout/tests/page/getSize.test.js
index e2aeb7fb9..f03edef92 100644
--- a/packages/layout/tests/page/getSize.test.js
+++ b/packages/layout/tests/page/getSize.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import getSize from '../../src/page/getSize';
describe('page getSize', () => {
diff --git a/packages/layout/tests/page/isHeightAuto.test.js b/packages/layout/tests/page/isHeightAuto.test.js
index dbd7d5dfc..f128240e5 100644
--- a/packages/layout/tests/page/isHeightAuto.test.js
+++ b/packages/layout/tests/page/isHeightAuto.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import isHeightAuto from '../../src/page/isHeightAuto';
describe('page isHeightAuto', () => {
diff --git a/packages/layout/tests/page/isLandscape.test.js b/packages/layout/tests/page/isLandscape.test.js
index 33b501302..5620fc068 100644
--- a/packages/layout/tests/page/isLandscape.test.js
+++ b/packages/layout/tests/page/isLandscape.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import isLandscape from '../../src/page/isLandscape';
describe('page isLandscape', () => {
diff --git a/packages/layout/tests/page/isPortrait.test.js b/packages/layout/tests/page/isPortrait.test.js
index 70681a8a6..c2a86d4f6 100644
--- a/packages/layout/tests/page/isPortrait.test.js
+++ b/packages/layout/tests/page/isPortrait.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import isPortrait from '../../src/page/isPortrait';
describe('page isPortrait', () => {
diff --git a/packages/layout/tests/steps/__snapshots__/resolveLinkSubstitution.test.js.snap b/packages/layout/tests/steps/__snapshots__/resolveLinkSubstitution.test.js.snap
index c440a8d9b..4eda990f7 100644
--- a/packages/layout/tests/steps/__snapshots__/resolveLinkSubstitution.test.js.snap
+++ b/packages/layout/tests/steps/__snapshots__/resolveLinkSubstitution.test.js.snap
@@ -1,6 +1,6 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
+// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
-exports[`layout resolveStyles should leave link with text children as it is 1`] = `
+exports[`layout resolveStyles > should leave link with text children as it is 1`] = `
{
"children": [
{
@@ -24,7 +24,7 @@ exports[`layout resolveStyles should leave link with text children as it is 1`]
}
`;
-exports[`layout resolveStyles should replace link with only many text instances as children 1`] = `
+exports[`layout resolveStyles > should replace link with only many text instances as children 1`] = `
{
"children": [
{
@@ -65,7 +65,7 @@ exports[`layout resolveStyles should replace link with only many text instances
}
`;
-exports[`layout resolveStyles should replace link with only one text instance as children 1`] = `
+exports[`layout resolveStyles > should replace link with only one text instance as children 1`] = `
{
"children": [
{
@@ -97,7 +97,7 @@ exports[`layout resolveStyles should replace link with only one text instance as
}
`;
-exports[`layout resolveStyles should replace link with render prop 1`] = `
+exports[`layout resolveStyles > should replace link with render prop 1`] = `
{
"children": [
{
diff --git a/packages/layout/tests/steps/__snapshots__/resolveOrigins.test.js.snap b/packages/layout/tests/steps/__snapshots__/resolveOrigins.test.js.snap
index 2fe5f3cb3..34d73fd51 100644
--- a/packages/layout/tests/steps/__snapshots__/resolveOrigins.test.js.snap
+++ b/packages/layout/tests/steps/__snapshots__/resolveOrigins.test.js.snap
@@ -1,6 +1,6 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
+// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
-exports[`layout resolveOrigins should not resolve for node without box 1`] = `
+exports[`layout resolveOrigins > should not resolve for node without box 1`] = `
{
"children": [
{
@@ -20,7 +20,7 @@ exports[`layout resolveOrigins should not resolve for node without box 1`] = `
}
`;
-exports[`layout resolveOrigins should resolve centered origin by default 1`] = `
+exports[`layout resolveOrigins > should resolve centered origin by default 1`] = `
{
"children": [
{
@@ -42,7 +42,7 @@ exports[`layout resolveOrigins should resolve centered origin by default 1`] = `
}
`;
-exports[`layout resolveOrigins should resolve origin adjusted by fixed values 1`] = `
+exports[`layout resolveOrigins > should resolve origin adjusted by fixed values 1`] = `
{
"children": [
{
@@ -67,7 +67,7 @@ exports[`layout resolveOrigins should resolve origin adjusted by fixed values 1`
}
`;
-exports[`layout resolveOrigins should resolve origin adjusted by percent values 1`] = `
+exports[`layout resolveOrigins > should resolve origin adjusted by percent values 1`] = `
{
"children": [
{
@@ -92,7 +92,7 @@ exports[`layout resolveOrigins should resolve origin adjusted by percent values
}
`;
-exports[`layout resolveOrigins should resolve origins for nested elements 1`] = `
+exports[`layout resolveOrigins > should resolve origins for nested elements 1`] = `
{
"children": [
{
diff --git a/packages/layout/tests/steps/__snapshots__/resolvePagePaddings.test.js.snap b/packages/layout/tests/steps/__snapshots__/resolvePagePaddings.test.js.snap
index 81bdd68af..f9871568a 100644
--- a/packages/layout/tests/steps/__snapshots__/resolvePagePaddings.test.js.snap
+++ b/packages/layout/tests/steps/__snapshots__/resolvePagePaddings.test.js.snap
@@ -1,6 +1,6 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
+// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
-exports[`layout resolvePagePaddings Should keep other styles untouched 1`] = `
+exports[`layout resolvePagePaddings > Should keep other styles untouched 1`] = `
{
"children": [
{
@@ -14,7 +14,7 @@ exports[`layout resolvePagePaddings Should keep other styles untouched 1`] = `
}
`;
-exports[`layout resolvePagePaddings Should leave numeric paddingBottom as it is 1`] = `
+exports[`layout resolvePagePaddings > Should leave numeric paddingBottom as it is 1`] = `
{
"children": [
{
@@ -28,7 +28,7 @@ exports[`layout resolvePagePaddings Should leave numeric paddingBottom as it is
}
`;
-exports[`layout resolvePagePaddings Should leave numeric paddingLeft as it is 1`] = `
+exports[`layout resolvePagePaddings > Should leave numeric paddingLeft as it is 1`] = `
{
"children": [
{
@@ -42,7 +42,7 @@ exports[`layout resolvePagePaddings Should leave numeric paddingLeft as it is 1`
}
`;
-exports[`layout resolvePagePaddings Should leave numeric paddingRight as it is 1`] = `
+exports[`layout resolvePagePaddings > Should leave numeric paddingRight as it is 1`] = `
{
"children": [
{
@@ -56,7 +56,7 @@ exports[`layout resolvePagePaddings Should leave numeric paddingRight as it is 1
}
`;
-exports[`layout resolvePagePaddings Should leave numeric paddingTop as it is 1`] = `
+exports[`layout resolvePagePaddings > Should leave numeric paddingTop as it is 1`] = `
{
"children": [
{
@@ -70,7 +70,7 @@ exports[`layout resolvePagePaddings Should leave numeric paddingTop as it is 1`]
}
`;
-exports[`layout resolvePagePaddings Should resolve percent paddingBottom 1`] = `
+exports[`layout resolvePagePaddings > Should resolve percent paddingBottom 1`] = `
{
"children": [
{
@@ -86,7 +86,7 @@ exports[`layout resolvePagePaddings Should resolve percent paddingBottom 1`] = `
}
`;
-exports[`layout resolvePagePaddings Should resolve percent paddingLeft 1`] = `
+exports[`layout resolvePagePaddings > Should resolve percent paddingLeft 1`] = `
{
"children": [
{
@@ -102,7 +102,7 @@ exports[`layout resolvePagePaddings Should resolve percent paddingLeft 1`] = `
}
`;
-exports[`layout resolvePagePaddings Should resolve percent paddingRight 1`] = `
+exports[`layout resolvePagePaddings > Should resolve percent paddingRight 1`] = `
{
"children": [
{
@@ -118,7 +118,7 @@ exports[`layout resolvePagePaddings Should resolve percent paddingRight 1`] = `
}
`;
-exports[`layout resolvePagePaddings Should resolve percent paddingTop 1`] = `
+exports[`layout resolvePagePaddings > Should resolve percent paddingTop 1`] = `
{
"children": [
{
@@ -134,7 +134,7 @@ exports[`layout resolvePagePaddings Should resolve percent paddingTop 1`] = `
}
`;
-exports[`layout resolvePagePaddings Should resolve several pages 1`] = `
+exports[`layout resolvePagePaddings > Should resolve several pages 1`] = `
{
"children": [
{
diff --git a/packages/layout/tests/steps/__snapshots__/resolvePercentHeight.test.js.snap b/packages/layout/tests/steps/__snapshots__/resolvePercentHeight.test.js.snap
index c1270ce24..ff2b3b444 100644
--- a/packages/layout/tests/steps/__snapshots__/resolvePercentHeight.test.js.snap
+++ b/packages/layout/tests/steps/__snapshots__/resolvePercentHeight.test.js.snap
@@ -1,13 +1,13 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
+// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
-exports[`layout resolvePercentHeight Should keep empty document untouched 1`] = `
+exports[`layout resolvePercentHeight > Should keep empty document untouched 1`] = `
{
"children": [],
"type": "DOCUMENT",
}
`;
-exports[`layout resolvePercentHeight Should keep empty page untouched 1`] = `
+exports[`layout resolvePercentHeight > Should keep empty page untouched 1`] = `
{
"children": [
{
@@ -18,7 +18,7 @@ exports[`layout resolvePercentHeight Should keep empty page untouched 1`] = `
}
`;
-exports[`layout resolvePercentHeight Should not resolve children if page dont have height 1`] = `
+exports[`layout resolvePercentHeight > Should not resolve children if page dont have height 1`] = `
{
"children": [
{
@@ -38,7 +38,7 @@ exports[`layout resolvePercentHeight Should not resolve children if page dont ha
}
`;
-exports[`layout resolvePercentHeight Should resolve children percent dimensions if page have height 1`] = `
+exports[`layout resolvePercentHeight > Should resolve children percent dimensions if page have height 1`] = `
{
"children": [
{
diff --git a/packages/layout/tests/steps/__snapshots__/resolveStyles.test.js.snap b/packages/layout/tests/steps/__snapshots__/resolveStyles.test.js.snap
index 6092b2f40..3c46fc75b 100644
--- a/packages/layout/tests/steps/__snapshots__/resolveStyles.test.js.snap
+++ b/packages/layout/tests/steps/__snapshots__/resolveStyles.test.js.snap
@@ -1,6 +1,6 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
+// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
-exports[`layout resolveStyles Should overide default link styles 1`] = `
+exports[`layout resolveStyles > Should overide default link styles 1`] = `
{
"children": [
{
@@ -25,7 +25,7 @@ exports[`layout resolveStyles Should overide default link styles 1`] = `
}
`;
-exports[`layout resolveStyles Should overide default link styles with array 1`] = `
+exports[`layout resolveStyles > Should overide default link styles with array 1`] = `
{
"children": [
{
@@ -50,7 +50,7 @@ exports[`layout resolveStyles Should overide default link styles with array 1`]
}
`;
-exports[`layout resolveStyles Should resolve default link styles 1`] = `
+exports[`layout resolveStyles > Should resolve default link styles 1`] = `
{
"children": [
{
@@ -75,7 +75,7 @@ exports[`layout resolveStyles Should resolve default link styles 1`] = `
}
`;
-exports[`layout resolveStyles Should resolve nested node styles 1`] = `
+exports[`layout resolveStyles > Should resolve nested node styles 1`] = `
{
"children": [
{
@@ -115,7 +115,7 @@ exports[`layout resolveStyles Should resolve nested node styles 1`] = `
}
`;
-exports[`layout resolveStyles Should resolve nested node styles array 1`] = `
+exports[`layout resolveStyles > Should resolve nested node styles array 1`] = `
{
"children": [
{
@@ -155,7 +155,7 @@ exports[`layout resolveStyles Should resolve nested node styles array 1`] = `
}
`;
-exports[`layout resolveStyles Should resolve nested node styles media queries 1`] = `
+exports[`layout resolveStyles > Should resolve nested node styles media queries 1`] = `
{
"children": [
{
@@ -185,7 +185,7 @@ exports[`layout resolveStyles Should resolve nested node styles media queries 1`
}
`;
-exports[`layout resolveStyles Should resolve nested node styles media queries with page style 1`] = `
+exports[`layout resolveStyles > Should resolve nested node styles media queries with page style 1`] = `
{
"children": [
{
@@ -214,7 +214,7 @@ exports[`layout resolveStyles Should resolve nested node styles media queries wi
}
`;
-exports[`layout resolveStyles Should resolve page styles 1`] = `
+exports[`layout resolveStyles > Should resolve page styles 1`] = `
{
"children": [
{
@@ -244,7 +244,7 @@ exports[`layout resolveStyles Should resolve page styles 1`] = `
}
`;
-exports[`layout resolveStyles Should resolve page styles array 1`] = `
+exports[`layout resolveStyles > Should resolve page styles array 1`] = `
{
"children": [
{
@@ -274,7 +274,7 @@ exports[`layout resolveStyles Should resolve page styles array 1`] = `
}
`;
-exports[`layout resolveStyles Should resolve several pages styles 1`] = `
+exports[`layout resolveStyles > Should resolve several pages styles 1`] = `
{
"children": [
{
diff --git a/packages/layout/tests/steps/resolveBookmarks.test.js b/packages/layout/tests/steps/resolveBookmarks.test.js
index 4f7002c4e..085b73563 100644
--- a/packages/layout/tests/steps/resolveBookmarks.test.js
+++ b/packages/layout/tests/steps/resolveBookmarks.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import resolveBookmarks from '../../src/steps/resolveBookmarks';
describe('layout resolveBookmarks', () => {
diff --git a/packages/layout/tests/steps/resolveInhritance.test.js b/packages/layout/tests/steps/resolveInhritance.test.js
index 44f0006fd..802996241 100644
--- a/packages/layout/tests/steps/resolveInhritance.test.js
+++ b/packages/layout/tests/steps/resolveInhritance.test.js
@@ -1,7 +1,9 @@
+import { describe, expect, test } from 'vitest';
+
import resolveInheritance from '../../src/steps/resolveInheritance';
describe('layout resolveInheritance', () => {
- const shouldInherit = prop => () => {
+ const shouldInherit = (prop) => () => {
const root = {
type: 'DOCUMENT',
children: [
@@ -111,6 +113,32 @@ describe('layout resolveInheritance', () => {
);
});
+ test('Should inherit background color for text childs', () => {
+ const root = {
+ type: 'DOCUMENT',
+ children: [
+ {
+ type: 'PAGE',
+ style: {},
+ children: [
+ {
+ type: 'TEXT',
+ style: { backgroundColor: 'red' },
+ children: [{ type: 'TEXT' }],
+ },
+ ],
+ },
+ ],
+ };
+
+ const result = resolveInheritance(root);
+ const text1 = result.children[0].children[0];
+ const text2 = text1.children[0];
+
+ expect(text1.style).toHaveProperty('backgroundColor', 'red');
+ expect(text2.style).toHaveProperty('backgroundColor', 'red');
+ });
+
test('Should inherit color value', shouldInherit('color'));
test('Should inherit fontFamily value', shouldInherit('fontFamily'));
test('Should inherit fontSize value', shouldInherit('fontSize'));
diff --git a/packages/layout/tests/steps/resolveLinkSubstitution.test.js b/packages/layout/tests/steps/resolveLinkSubstitution.test.js
index 2b82b570f..c2546dc86 100644
--- a/packages/layout/tests/steps/resolveLinkSubstitution.test.js
+++ b/packages/layout/tests/steps/resolveLinkSubstitution.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import resolveLinkSubstitution from '../../src/steps/resolveLinkSubstitution';
describe('layout resolveStyles', () => {
diff --git a/packages/layout/tests/steps/resolveOrigins.test.js b/packages/layout/tests/steps/resolveOrigins.test.js
index 9db77247f..6f771df0f 100644
--- a/packages/layout/tests/steps/resolveOrigins.test.js
+++ b/packages/layout/tests/steps/resolveOrigins.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import resolveOrigins from '../../src/steps/resolveOrigins';
describe('layout resolveOrigins', () => {
diff --git a/packages/layout/tests/steps/resolvePagePaddings.test.js b/packages/layout/tests/steps/resolvePagePaddings.test.js
index 4a2e6b583..d2ec04fd0 100644
--- a/packages/layout/tests/steps/resolvePagePaddings.test.js
+++ b/packages/layout/tests/steps/resolvePagePaddings.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import resolvePagePaddings from '../../src/steps/resolvePagePaddings';
describe('layout resolvePagePaddings', () => {
diff --git a/packages/layout/tests/steps/resolvePageSizes.test.js b/packages/layout/tests/steps/resolvePageSizes.test.js
index 3906c3ab7..16e640e17 100644
--- a/packages/layout/tests/steps/resolvePageSizes.test.js
+++ b/packages/layout/tests/steps/resolvePageSizes.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import resolvePageSizes from '../../src/steps/resolvePageSizes';
describe('layout resolvePageSizes', () => {
diff --git a/packages/layout/tests/steps/resolvePagination.test.js b/packages/layout/tests/steps/resolvePagination.test.js
index 8f76e178c..f84ba7215 100644
--- a/packages/layout/tests/steps/resolvePagination.test.js
+++ b/packages/layout/tests/steps/resolvePagination.test.js
@@ -1,13 +1,20 @@
+import { describe, expect, test } from 'vitest';
+
+import { loadYoga } from '../../src/yoga';
+
import resolvePagination from '../../src/steps/resolvePagination';
import resolveDimensions from '../../src/steps/resolveDimensions';
// dimensions is required by pagination step and them are calculated here
-const calcLayout = node => resolvePagination(resolveDimensions(node));
+const calcLayout = (node) => resolvePagination(resolveDimensions(node));
describe('pagination step', () => {
- test('should stretch absolute block to full page size', () => {
+ test('should stretch absolute block to full page size', async () => {
+ const yoga = await loadYoga();
+
const root = {
type: 'DOCUMENT',
+ yoga,
children: [
{
type: 'PAGE',
@@ -55,9 +62,12 @@ describe('pagination step', () => {
expect(view.box.height).toBe(100);
});
- test('should force new height for split nodes', () => {
+ test('should force new height for split nodes', async () => {
+ const yoga = await loadYoga();
+
const root = {
type: 'DOCUMENT',
+ yoga,
children: [
{
type: 'PAGE',
@@ -102,9 +112,12 @@ describe('pagination step', () => {
expect(view2.box.height).not.toBe(60);
});
- test('should force new height for split nodes with fixed height', () => {
+ test('should force new height for split nodes with fixed height', async () => {
+ const yoga = await loadYoga();
+
const root = {
type: 'DOCUMENT',
+ yoga,
children: [
{
type: 'PAGE',
@@ -138,9 +151,12 @@ describe('pagination step', () => {
expect(view3.box.height).toBe(10);
});
- test('should not wrap page with false wrap prop', () => {
+ test('should not wrap page with false wrap prop', async () => {
+ const yoga = await loadYoga();
+
const root = {
type: 'DOCUMENT',
+ yoga,
children: [
{
type: 'PAGE',
@@ -170,9 +186,12 @@ describe('pagination step', () => {
expect(layout.children.length).toBe(1);
});
- test('should break on a container whose children can not fit on a page', () => {
+ test('should break on a container whose children can not fit on a page', async () => {
+ const yoga = await loadYoga();
+
const root = {
type: 'DOCUMENT',
+ yoga,
children: [
{
type: 'PAGE',
@@ -220,7 +239,6 @@ describe('pagination step', () => {
};
const layout = calcLayout(root);
- console.log(layout.children[0].children);
const page1 = layout.children[0];
const page2 = layout.children[1];
diff --git a/packages/layout/tests/steps/resolvePercentHeight.test.js b/packages/layout/tests/steps/resolvePercentHeight.test.js
index dbf7415e7..8aae0569f 100644
--- a/packages/layout/tests/steps/resolvePercentHeight.test.js
+++ b/packages/layout/tests/steps/resolvePercentHeight.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import resolvePercentHeight from '../../src/steps/resolvePercentHeight';
describe('layout resolvePercentHeight', () => {
diff --git a/packages/layout/tests/steps/resolveStyles.test.js b/packages/layout/tests/steps/resolveStyles.test.js
index 0b6e83273..0b06f50d8 100644
--- a/packages/layout/tests/steps/resolveStyles.test.js
+++ b/packages/layout/tests/steps/resolveStyles.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import resolveStyles from '../../src/steps/resolveStyles';
describe('layout resolveStyles', () => {
diff --git a/packages/layout/tests/steps/resolveTextLayout.test.js b/packages/layout/tests/steps/resolveTextLayout.test.js
index 380ff6d80..2cd567c7f 100644
--- a/packages/layout/tests/steps/resolveTextLayout.test.js
+++ b/packages/layout/tests/steps/resolveTextLayout.test.js
@@ -1,8 +1,13 @@
+import { describe, expect, test } from 'vitest';
+
+import { loadYoga } from '../../src/yoga';
+
import resolveTextLayout from '../../src/steps/resolveTextLayout';
import resolveDimensions from '../../src/steps/resolveDimensions';
-const getRoot = (text = 'hello world', styles = {}) => ({
+const getRoot = async (text = 'hello world', styles = {}) => ({
type: 'DOCUMENT',
+ yoga: await loadYoga(),
children: [
{
type: 'PAGE',
@@ -30,17 +35,17 @@ const getRoot = (text = 'hello world', styles = {}) => ({
});
describe('text layout step', () => {
- const getText = root => root.children[0].children[0];
+ const getText = (root) => root.children[0].children[0];
- test('should calculate lines for text while resolve dimensions', () => {
- const root = getRoot('text text text');
+ test('should calculate lines for text while resolve dimensions', async () => {
+ const root = await getRoot('text text text');
const dimensions = resolveDimensions(root);
expect(getText(dimensions).lines).toBeDefined();
});
- test('should calculate lines for text width defined height', () => {
- const root = getRoot('text text text', { height: 50 });
+ test('should calculate lines for text width defined height', async () => {
+ const root = await getRoot('text text text', { height: 50 });
const dimensions = resolveDimensions(root);
expect(getText(dimensions).lines).not.toBeDefined();
@@ -50,8 +55,8 @@ describe('text layout step', () => {
expect(getText(textLayout).lines).toBeDefined();
});
- test('should calculate lines for empty text', () => {
- const root = getRoot('');
+ test('should calculate lines for empty text', async () => {
+ const root = await getRoot('');
const dimensions = resolveDimensions(root);
expect(getText(dimensions).lines).toBeDefined();
diff --git a/packages/layout/tests/text/fromFragments.test.js b/packages/layout/tests/text/fromFragments.test.js
index 7e4d88b74..20138480f 100644
--- a/packages/layout/tests/text/fromFragments.test.js
+++ b/packages/layout/tests/text/fromFragments.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import fromFragments from '../../src/text/fromFragments';
describe('attributeString fromFragments operator', () => {
diff --git a/packages/layout/tests/text/heightAtLineIndex.test.js b/packages/layout/tests/text/heightAtLineIndex.test.js
index 423e156bf..237824945 100644
--- a/packages/layout/tests/text/heightAtLineIndex.test.js
+++ b/packages/layout/tests/text/heightAtLineIndex.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import heightAtLineIndex from '../../src/text/heightAtLineIndex';
const TEST_LINE = { box: { height: 25 } };
diff --git a/packages/layout/tests/text/layoutText.test.js b/packages/layout/tests/text/layoutText.test.js
index 1fdeecc64..6aa4044c3 100644
--- a/packages/layout/tests/text/layoutText.test.js
+++ b/packages/layout/tests/text/layoutText.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test, vi } from 'vitest';
+
import * as P from '@react-pdf/primitives';
import layoutText from '../../src/text/layoutText';
@@ -62,7 +64,7 @@ describe('text layoutText', () => {
const node = createTextNode(TEXT, { textAlign: 'justify' });
const lines = layoutText(node, containerWidth, 100, null);
- const positions = lines[0].runs[0].positions;
+ const { positions } = lines[0].runs[0];
const spaceWidth = positions[positions.length - 1].xAdvance;
// First line justified. Last line aligned to the left
@@ -80,7 +82,7 @@ describe('text layoutText', () => {
test('should allow hyphenation callback to be overriden', async () => {
const text = 'reallylongtext';
const hyphens = ['really', 'long', 'text'];
- const hyphenationCallback = jest.fn().mockReturnValue(hyphens);
+ const hyphenationCallback = vi.fn().mockReturnValue(hyphens);
const node = createTextNode(text, {}, { hyphenationCallback });
const lines = layoutText(node, 50, 100, null);
diff --git a/packages/layout/tests/text/lineIndexAtHeight.test.js b/packages/layout/tests/text/lineIndexAtHeight.test.js
index 086fcc2e2..a5c7b0a43 100644
--- a/packages/layout/tests/text/lineIndexAtHeight.test.js
+++ b/packages/layout/tests/text/lineIndexAtHeight.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import lineIndexAtHeight from '../../src/text/lineIndexAtHeight';
const TEST_LINE = { box: { height: 25 } };
diff --git a/packages/layout/yoga.js b/packages/layout/yoga.js
new file mode 100644
index 000000000..04ec637a4
--- /dev/null
+++ b/packages/layout/yoga.js
@@ -0,0 +1,7 @@
+import yogaModule from 'yoga-layout/sync';
+
+// yoga-layout sets default export using non-standard __esModule property, so we need to
+// make an additional check in case it's used in a bundler that does not support it.
+const Yoga = 'default' in yogaModule ? yogaModule.default : yogaModule;
+
+export default Yoga;
diff --git a/packages/pdfkit/.eslintrc.js b/packages/pdfkit/.eslintrc.js
deleted file mode 100644
index 7157fdfed..000000000
--- a/packages/pdfkit/.eslintrc.js
+++ /dev/null
@@ -1,43 +0,0 @@
-module.exports = {
- extends: ['../../.eslintrc.js'],
- rules: {
- yoda: 0,
- radix: 0,
- 'no-var': 1,
- 'one-var': 1,
- camelcase: 0,
- 'no-shadow': 0,
- 'no-bitwise': 0,
- 'no-plusplus': 0,
- 'vars-on-top': 0,
- 'no-continue': 0,
- 'prefer-const': 0,
- 'default-case': 0,
- 'dot-notation': 1,
- 'guard-for-in': 0,
- 'no-undef-init': 1,
- 'no-unused-vars': 1,
- 'no-else-return': 1,
- 'no-path-concat': 0,
- 'import/no-cycle': 0,
- 'no-multi-assign': 0,
- 'no-new-wrappers': 0,
- 'prefer-template': 0,
- 'no-throw-literal': 0,
- 'no-return-assign': 0,
- 'no-useless-escape': 1,
- 'no-nested-ternary': 0,
- 'consistent-return': 0,
- 'no-param-reassign': 0,
- 'prefer-rest-params': 0,
- 'prefer-object-spread': 0,
- 'prefer-destructuring': 0,
- 'max-classes-per-file': 0,
- 'no-restricted-syntax': 0,
- 'no-use-before-define': 1,
- 'no-buffer-constructor': 1,
- 'class-methods-use-this': 0,
- 'import/no-mutable-exports': 0,
- 'lines-between-class-members': 0
- }
-};
diff --git a/packages/pdfkit/.eslintrc.json b/packages/pdfkit/.eslintrc.json
new file mode 100644
index 000000000..23ae02be5
--- /dev/null
+++ b/packages/pdfkit/.eslintrc.json
@@ -0,0 +1,43 @@
+{
+ "extends": ["../../.eslintrc.json"],
+ "rules": {
+ "yoda": 0,
+ "radix": 0,
+ "no-var": 1,
+ "one-var": 1,
+ "camelcase": 0,
+ "no-shadow": 0,
+ "no-bitwise": 0,
+ "no-plusplus": 0,
+ "vars-on-top": 0,
+ "no-continue": 0,
+ "prefer-const": 0,
+ "default-case": 0,
+ "dot-notation": 1,
+ "guard-for-in": 0,
+ "no-undef-init": 1,
+ "no-unused-vars": 1,
+ "no-else-return": 1,
+ "no-path-concat": 0,
+ "import/no-cycle": 0,
+ "no-multi-assign": 0,
+ "no-new-wrappers": 0,
+ "prefer-template": 0,
+ "no-throw-literal": 0,
+ "no-return-assign": 0,
+ "no-useless-escape": 1,
+ "no-nested-ternary": 0,
+ "consistent-return": 0,
+ "no-param-reassign": 0,
+ "prefer-rest-params": 0,
+ "prefer-object-spread": 0,
+ "prefer-destructuring": 0,
+ "max-classes-per-file": 0,
+ "no-restricted-syntax": 0,
+ "no-use-before-define": 1,
+ "no-buffer-constructor": 1,
+ "class-methods-use-this": 0,
+ "import/no-mutable-exports": 0,
+ "lines-between-class-members": 0
+ }
+}
diff --git a/packages/pdfkit/.prettierrc b/packages/pdfkit/.prettierrc
index f62e834cd..32ebab4e5 100644
--- a/packages/pdfkit/.prettierrc
+++ b/packages/pdfkit/.prettierrc
@@ -1,4 +1,4 @@
{
- "singleQuote": true,
- "trailingComma": "none"
+ "singleQuote": true,
+ "trailingComma": "none"
}
diff --git a/packages/pdfkit/CHANGELOG.md b/packages/pdfkit/CHANGELOG.md
index 972fdcddd..b82807c83 100644
--- a/packages/pdfkit/CHANGELOG.md
+++ b/packages/pdfkit/CHANGELOG.md
@@ -1,5 +1,69 @@
# @react-pdf/pdfkit
+## 3.1.6
+
+### Patch Changes
+
+- [#2610](https://github.com/diegomura/react-pdf/pull/2610) [`dc54c13`](https://github.com/diegomura/react-pdf/commit/dc54c13625510482e93f80ed5cc07cf3a6a6d34c) Thanks [@wojtekmaj](https://github.com/wojtekmaj)! - fix: fix CJS compatibility
+
+## 3.1.5
+
+### Patch Changes
+
+- Updated dependencies [[`f7505ed`](https://github.com/diegomura/react-pdf/commit/f7505ed453a1a0ae960d0e5e4a1d155803861b71)]:
+ - @react-pdf/png-js@2.3.1
+
+## 3.1.4
+
+### Patch Changes
+
+- [#2600](https://github.com/diegomura/react-pdf/pull/2600) [`8350154`](https://github.com/diegomura/react-pdf/commit/83501541e3a050021e18e112bb472b2dabc142a7) Thanks [@diegomura](https://github.com/diegomura)! - feat: bidi support
+
+## 3.1.3
+
+### Patch Changes
+
+- [`0590324`](https://github.com/diegomura/react-pdf/commit/0590324d7a6d75c0a49520b3f99cfb6594239390) Thanks [@diegomura](https://github.com/diegomura)! - fix: replace jpeg-exif with jay-peg
+
+## 3.1.2
+
+### Patch Changes
+
+- [#2549](https://github.com/diegomura/react-pdf/pull/2549) [`44bd45b`](https://github.com/diegomura/react-pdf/commit/44bd45b1961ca8bae4a2f84cc77db945e5c43419) Thanks [@carlobeltrame](https://github.com/carlobeltrame)! - Fix named destinations (id attribute with string value)
+
+## 3.1.1
+
+### Patch Changes
+
+- [#2532](https://github.com/diegomura/react-pdf/pull/2532) [`36c6ba3`](https://github.com/diegomura/react-pdf/commit/36c6ba30ae73a512f19fe5bc47ac8c304887c0da) Thanks [@diegomura](https://github.com/diegomura)! - refactor: converge pdfkit
+
+* [#2529](https://github.com/diegomura/react-pdf/pull/2529) [`a35b1ba`](https://github.com/diegomura/react-pdf/commit/a35b1ba18d293df51293600d8d56015094d222d8) Thanks [@diegomura](https://github.com/diegomura)! - fix: jpeg exif orientation rendering
+
+## 3.1.0
+
+### Minor Changes
+
+- [#2409](https://github.com/diegomura/react-pdf/pull/2409) [`b6a14fd`](https://github.com/diegomura/react-pdf/commit/b6a14fd160fab26a49f798e5294b0e361e67fe37) Thanks [@wojtekmaj](https://github.com/wojtekmaj)! - Add support for native ESM
+
+### Patch Changes
+
+- Updated dependencies [[`b6a14fd`](https://github.com/diegomura/react-pdf/commit/b6a14fd160fab26a49f798e5294b0e361e67fe37)]:
+ - @react-pdf/png-js@2.3.0
+
+## 3.0.4
+
+### Patch Changes
+
+- [#2479](https://github.com/diegomura/react-pdf/pull/2479) [`45b2bd3`](https://github.com/diegomura/react-pdf/commit/45b2bd37037c605727ad5783f2f2a438dc19cac4) Thanks [@diegomura](https://github.com/diegomura)! - fix linting
+
+* [#2488](https://github.com/diegomura/react-pdf/pull/2488) [`b457a0c`](https://github.com/diegomura/react-pdf/commit/b457a0cc1c1352325e6c633af3000a3c9241f7f7) Thanks [@diegomura](https://github.com/diegomura)! - fix: copy-paste for registered font
+
+## 3.0.3
+
+### Patch Changes
+
+- [#2450](https://github.com/diegomura/react-pdf/pull/2450) [`4cfb84d`](https://github.com/diegomura/react-pdf/commit/4cfb84d9f3d2301720b68b4c40a0257b9520c6e1) Thanks [@strazto](https://github.com/strazto)! - build: update crypto-js from 4.0.0 -> 4.2.0 (CVE-2023-46233)
+
## 3.0.2
### Patch Changes
diff --git a/packages/pdfkit/README.md b/packages/pdfkit/README.md
index ef2a9a4ff..0627d5f88 100644
--- a/packages/pdfkit/README.md
+++ b/packages/pdfkit/README.md
@@ -26,43 +26,43 @@ You can also try out an interactive in-browser demo of PDFKit [here](http://pdfk
## Installation
-Installation uses the [npm](http://npmjs.org/) package manager. Just type the following command after installing npm.
+Installation uses the [npm](http://npmjs.org/) package manager. Just type the following command after installing npm.
npm install @react-pdf/pdfkit
## Features
-* Vector graphics
- * HTML5 canvas-like API
- * Path operations
- * SVG path parser for easy path creation
- * Transformations
- * Linear and radial gradients
-* Text
- * Line wrapping
- * Text alignments
- * Bulleted lists
-* Font embedding
- * Supports TrueType (.ttf), OpenType (.otf), WOFF, WOFF2, TrueType Collections (.ttc), and Datafork TrueType (.dfont) fonts
- * Font subsetting
- * See [fontkit](http://github.com/devongovett/fontkit) for more details on advanced glyph layout support.
-* Image embedding
- * Supports JPEG and PNG files (including indexed PNGs, and PNGs with transparency)
-* Annotations
- * Links
- * Notes
- * Highlights
- * Underlines
- * etc.
+- Vector graphics
+ - HTML5 canvas-like API
+ - Path operations
+ - SVG path parser for easy path creation
+ - Transformations
+ - Linear and radial gradients
+- Text
+ - Line wrapping
+ - Text alignments
+ - Bulleted lists
+- Font embedding
+ - Supports TrueType (.ttf), OpenType (.otf), WOFF, WOFF2, TrueType Collections (.ttc), and Datafork TrueType (.dfont) fonts
+ - Font subsetting
+ - See [fontkit](http://github.com/devongovett/fontkit) for more details on advanced glyph layout support.
+- Image embedding
+ - Supports JPEG and PNG files (including indexed PNGs, and PNGs with transparency)
+- Annotations
+ - Links
+ - Notes
+ - Highlights
+ - Underlines
+ - etc.
## Coming soon!
-* Patterns fills
-* Outlines
-* PDF Security
-* Higher level APIs for creating tables and laying out content
-* More performance optimizations
-* Even more awesomeness, perhaps written by you! Please fork this repository and send me pull requests.
+- Patterns fills
+- Outlines
+- PDF Security
+- Higher level APIs for creating tables and laying out content
+- More performance optimizations
+- Even more awesomeness, perhaps written by you! Please fork this repository and send me pull requests.
## Documentation
diff --git a/packages/pdfkit/babel.config.js b/packages/pdfkit/babel.config.js
index 27f83582f..02d1cbbdb 100644
--- a/packages/pdfkit/babel.config.js
+++ b/packages/pdfkit/babel.config.js
@@ -1 +1 @@
-module.exports = { extends: '../../babel.config.js' };
+export default { extends: '../../babel.config.js' };
diff --git a/packages/pdfkit/package.json b/packages/pdfkit/package.json
index ed49e2f7d..34aa1bd82 100644
--- a/packages/pdfkit/package.json
+++ b/packages/pdfkit/package.json
@@ -1,19 +1,27 @@
{
"name": "@react-pdf/pdfkit",
- "version": "3.0.2",
+ "version": "3.1.6",
"license": "MIT",
"description": "A PDF generation library for Node.js",
- "main": "./lib/pdfkit.cjs.js",
- "module": "./lib/pdfkit.es.js",
+ "type": "module",
+ "main": "./lib/pdfkit.cjs",
+ "module": "./lib/pdfkit.js",
+ "browser": {
+ "./lib/pdfkit.js": "./lib/pdfkit.browser.js",
+ "./lib/pdfkit.cjs": "./lib/pdfkit.browser.cjs"
+ },
+ "exports": {
+ ".": {
+ "import": "./lib/pdfkit.js",
+ "require": "./lib/pdfkit.cjs",
+ "default": "./lib/pdfkit.js"
+ }
+ },
"repository": {
"type": "git",
"url": "https://github.com/diegomura/react-pdf.git",
"directory": "packages/pdfkit"
},
- "browser": {
- "./lib/pdfkit.es.js": "./lib/pdfkit.browser.es.js",
- "./lib/pdfkit.cjs.js": "./lib/pdfkit.browser.cjs.js"
- },
"author": {
"name": "Devon Govett",
"email": "devongovett@gmail.com",
@@ -21,7 +29,7 @@
},
"scripts": {
"clear": "rimraf ./lib ./src/font/data/*.json",
- "parse:afm": "babel-node ./src/font/data/compressData.js",
+ "parse:afm": "node ./src/font/data/compressData.js",
"build": "npm run clear && npm run parse:afm && rollup -c ",
"watch": "npm run clear && npm run parse:afm && rollup -c -w"
},
@@ -30,10 +38,11 @@
],
"dependencies": {
"@babel/runtime": "^7.20.13",
- "@react-pdf/png-js": "^2.2.0",
+ "@react-pdf/png-js": "^2.3.1",
"browserify-zlib": "^0.2.0",
- "crypto-js": "^4.0.0",
+ "crypto-js": "^4.2.0",
"fontkit": "^2.0.2",
+ "jay-peg": "^1.0.1",
"vite-compatible-readable-stream": "^3.6.1"
},
"devDependencies": {
diff --git a/packages/pdfkit/rollup.config.js b/packages/pdfkit/rollup.config.js
index d95868bf7..99689e820 100644
--- a/packages/pdfkit/rollup.config.js
+++ b/packages/pdfkit/rollup.config.js
@@ -2,24 +2,26 @@ import babel from '@rollup/plugin-babel';
import json from '@rollup/plugin-json';
import replace from '@rollup/plugin-replace';
import nodeResolve from '@rollup/plugin-node-resolve';
-import { terser } from 'rollup-plugin-terser';
+import terser from '@rollup/plugin-terser';
import ignore from 'rollup-plugin-ignore';
import alias from '@rollup/plugin-alias';
import nodePolyfills from 'rollup-plugin-polyfill-node';
import commonjs from '@rollup/plugin-commonjs';
-import pkg from './package.json';
+
+import pkg from './package.json' assert { type: 'json' };
const cjs = {
exports: 'named',
- format: 'cjs'
+ format: 'cjs',
+ interop: 'compat'
};
const esm = {
format: 'es'
};
-const getCJS = override => Object.assign({}, cjs, override);
-const getESM = override => Object.assign({}, esm, override);
+const getCJS = (override) => Object.assign({}, cjs, override);
+const getESM = (override) => Object.assign({}, esm, override);
const input = 'src/index.js';
@@ -31,7 +33,7 @@ const babelConfig = () => ({
const getExternal = ({ browser }) => [
...Object.keys(pkg.dependencies).filter(
- dep =>
+ (dep) =>
!browser ||
!['vite-compatible-readable-stream', 'browserify-zlib'].includes(dep)
),
@@ -48,6 +50,15 @@ const getPlugins = ({ browser, minify = false }) => [
ignore(['fs']),
alias({
entries: [
+ // See https://github.com/browserify/browserify-zlib/pull/45
+ {
+ find: 'pako/lib/zlib/zstream',
+ replacement: 'pako/lib/zlib/zstream.js'
+ },
+ {
+ find: 'pako/lib/zlib/constants',
+ replacement: 'pako/lib/zlib/constants.js'
+ },
{ find: 'stream', replacement: 'vite-compatible-readable-stream' },
{ find: 'zlib', replacement: 'browserify-zlib' }
]
@@ -72,8 +83,8 @@ const getPlugins = ({ browser, minify = false }) => [
const serverConfig = {
input,
output: [
- getESM({ file: 'lib/pdfkit.es.js' }),
- getCJS({ file: 'lib/pdfkit.cjs.js' })
+ getESM({ file: 'lib/pdfkit.js' }),
+ getCJS({ file: 'lib/pdfkit.cjs' })
],
external: getExternal({ browser: false }),
plugins: getPlugins({ browser: false })
@@ -82,8 +93,8 @@ const serverConfig = {
const serverProdConfig = {
input,
output: [
- getESM({ file: 'lib/pdfkit.es.min.js' }),
- getCJS({ file: 'lib/pdfkit.cjs.min.js' })
+ getESM({ file: 'lib/pdfkit.min.js' }),
+ getCJS({ file: 'lib/pdfkit.min.cjs' })
],
external: getExternal({ browser: false }),
plugins: getPlugins({ browser: false, minify: true })
@@ -92,8 +103,8 @@ const serverProdConfig = {
const browserConfig = {
input,
output: [
- getESM({ file: 'lib/pdfkit.browser.es.js' }),
- getCJS({ file: 'lib/pdfkit.browser.cjs.js' })
+ getESM({ file: 'lib/pdfkit.browser.js' }),
+ getCJS({ file: 'lib/pdfkit.browser.cjs' })
],
external: getExternal({ browser: true }),
plugins: getPlugins({ browser: true })
@@ -102,8 +113,8 @@ const browserConfig = {
const browserProdConfig = Object.assign({}, browserConfig, {
input,
output: [
- getESM({ file: 'lib/pdfkit.browser.es.min.js' }),
- getCJS({ file: 'lib/pdfkit.browser.cjs.min.js' })
+ getESM({ file: 'lib/pdfkit.browser.min.js' }),
+ getCJS({ file: 'lib/pdfkit.browser.min.cjs' })
],
external: getExternal({ browser: true }),
plugins: getPlugins({ browser: true, minify: true })
diff --git a/packages/pdfkit/src/abstract_reference.js b/packages/pdfkit/src/abstract_reference.js
new file mode 100644
index 000000000..8f2e23aae
--- /dev/null
+++ b/packages/pdfkit/src/abstract_reference.js
@@ -0,0 +1,11 @@
+/*
+PDFAbstractReference - abstract class for PDF reference
+*/
+
+class PDFAbstractReference {
+ toString() {
+ throw new Error('Must be implemented by subclasses');
+ }
+}
+
+export default PDFAbstractReference;
diff --git a/packages/pdfkit/src/data.js b/packages/pdfkit/src/data.js
index e19d6e657..21f7b0ef5 100644
--- a/packages/pdfkit/src/data.js
+++ b/packages/pdfkit/src/data.js
@@ -1,7 +1,7 @@
class Data {
constructor(data = []) {
- this.pos = 0;
this.data = data;
+ this.pos = 0;
this.length = this.data.length;
}
@@ -42,12 +42,11 @@ class Data {
readInt32() {
const int = this.readUInt32();
-
if (int >= 0x80000000) {
return int - 0x100000000;
+ } else {
+ return int;
}
-
- return int;
}
writeInt32(val) {
@@ -72,8 +71,9 @@ class Data {
const int = this.readUInt16();
if (int >= 0x8000) {
return int - 0x10000;
+ } else {
+ return int;
}
- return int;
}
writeInt16(val) {
@@ -187,7 +187,7 @@ class Data {
}
write(bytes) {
- return bytes.map(byte => this.writeByte(byte));
+ return bytes.map((byte) => this.writeByte(byte));
}
}
diff --git a/packages/pdfkit/src/document.js b/packages/pdfkit/src/document.js
index 472d8169d..2333d0f67 100644
--- a/packages/pdfkit/src/document.js
+++ b/packages/pdfkit/src/document.js
@@ -11,8 +11,10 @@ import TextMixin from './mixins/text';
import ImagesMixin from './mixins/images';
import AnnotationsMixin from './mixins/annotations';
import OutlineMixin from './mixins/outline';
+import MarkingsMixin from './mixins/markings';
import AcroFormMixin from './mixins/acroform';
import AttachmentsMixin from './mixins/attachments';
+import MetadataMixin from './mixins/metadata';
import capitalize from './utils/capitalize';
class PDFDocument extends stream.Readable {
@@ -323,13 +325,41 @@ class PDFDocument extends stream.Readable {
toString() {
return '[object PDFDocument]';
}
+
+ initColor() {}
+
+ initVector() {}
+
+ initFonts() {}
+
+ initText() {}
+
+ initImages() {}
+
+ initOutline() {}
+
+ /**
+ * @param {number} m11
+ * @param {number} m12
+ * @param {number} m21
+ * @param {number} m22
+ * @param {number} dx
+ * @param {number} dy
+ */
+ // eslint-disable-next-line no-unused-vars
+ transform(m11, m12, m21, m22, dx, dy) {}
+
+ endOutline() {}
+
+ endAcroForm() {}
}
-const mixin = methods => {
+const mixin = (methods) => {
Object.assign(PDFDocument.prototype, methods);
};
// Load mixins
+mixin(MetadataMixin);
mixin(ColorMixin);
mixin(VectorMixin);
mixin(FontsMixin);
@@ -337,7 +367,7 @@ mixin(TextMixin);
mixin(ImagesMixin);
mixin(AnnotationsMixin);
mixin(OutlineMixin);
-// mixin(MarkingsMixin);
+mixin(MarkingsMixin);
mixin(AcroFormMixin);
mixin(AttachmentsMixin);
diff --git a/packages/pdfkit/src/font/afm.js b/packages/pdfkit/src/font/afm.js
index 25b3a4bf2..4ee38038d 100644
--- a/packages/pdfkit/src/font/afm.js
+++ b/packages/pdfkit/src/font/afm.js
@@ -1,5 +1,10 @@
+/* eslint-disable no-var */
+/* eslint-disable no-cond-assign */
+
import fs from 'fs';
-import range from '../utils/range';
+// This file is ran directly with Node - needs to have .js extension
+// eslint-disable-next-line import/extensions
+import range from '../utils/range.js';
const WIN_ANSI_MAP = {
402: 131,
@@ -183,9 +188,11 @@ class AFMFont {
}
this.charWidths = range(0, 255, true).map(
- i => this.glyphWidths[characters[i]]
+ (i) => this.glyphWidths[characters[i]]
+ );
+ this.bbox = Array.from(this.attributes.FontBBox.split(/\s+/)).map(
+ (e) => +e
);
- this.bbox = Array.from(this.attributes.FontBBox.split(/\s+/)).map(e => +e);
this.ascender = +(this.attributes.Ascender || 0);
this.descender = +(this.attributes.Descender || 0);
this.xHeight = +(this.attributes.XHeight || 0);
diff --git a/packages/pdfkit/src/font/data/compressData.js b/packages/pdfkit/src/font/data/compressData.js
index c9f5f2b8f..17cef7666 100644
--- a/packages/pdfkit/src/font/data/compressData.js
+++ b/packages/pdfkit/src/font/data/compressData.js
@@ -1,12 +1,17 @@
import fs from 'fs';
+import url from 'url';
import { basename, extname } from 'path';
-import { parse } from '../afm';
+// This file is ran directly with Node - needs to have .js extension
+// eslint-disable-next-line import/extensions
+import { parse } from '../afm.js';
+
+const __dirname = url.fileURLToPath(new URL('.', import.meta.url));
const generateJsonFiles = () => {
const files = fs.readdirSync(__dirname);
- const afmFiles = files.filter(file => file.match(/.afm$/));
+ const afmFiles = files.filter((file) => file.match(/.afm$/));
- afmFiles.forEach(file => {
+ afmFiles.forEach((file) => {
const fontName = basename(file).replace(extname(file), '');
const data = fs.readFileSync(__dirname + '/' + file, 'utf8');
const parsed = parse(data);
@@ -21,7 +26,7 @@ const generateJsonFiles = () => {
// Order is designed to produce the smaller size possible
const COMPRESS_ORDER = ['Helvetica', 'Times', 'Courier'];
-const readJson = file => {
+const readJson = (file) => {
const data = fs.readFileSync(__dirname + '/' + file, 'utf8');
return JSON.parse(data);
};
@@ -33,7 +38,7 @@ const sortFiles = (a, b) => {
return indexA - indexB;
};
-const fillWithZeros = array => {
+const fillWithZeros = (array) => {
const res = [];
for (let i = 0; i < array.length; i++) {
@@ -49,30 +54,30 @@ const compressJsonFiles = () => {
const kernPairs = {};
const files = fs.readdirSync(__dirname);
- const jsonFiles = files.filter(file => file.match(/.json$/));
+ const jsonFiles = files.filter((file) => file.match(/.json$/));
const filesContent = jsonFiles.map(readJson);
const sortedFiles = filesContent.sort(sortFiles);
sortedFiles.forEach((content, index) => {
attributes.push(content.attributes);
- Object.keys(content.glyphWidths).forEach(key => {
+ Object.keys(content.glyphWidths).forEach((key) => {
if (!glyphWidths[key]) glyphWidths[key] = [];
glyphWidths[key][index] = content.glyphWidths[key];
});
- Object.keys(content.kernPairs).forEach(key => {
+ Object.keys(content.kernPairs).forEach((key) => {
if (!kernPairs[key]) kernPairs[key] = [];
kernPairs[key][index] = content.kernPairs[key];
});
});
// Cheaper to store nulls as 0s
- Object.keys(glyphWidths).forEach(key => {
+ Object.keys(glyphWidths).forEach((key) => {
glyphWidths[key] = fillWithZeros(glyphWidths[key]);
});
- Object.keys(kernPairs).forEach(key => {
+ Object.keys(kernPairs).forEach((key) => {
kernPairs[key] = fillWithZeros(kernPairs[key]);
});
diff --git a/packages/pdfkit/src/font/data/expandData.js b/packages/pdfkit/src/font/data/expandData.js
index 6efee4554..cca7ef7b2 100644
--- a/packages/pdfkit/src/font/data/expandData.js
+++ b/packages/pdfkit/src/font/data/expandData.js
@@ -1,18 +1,18 @@
-const initFont = font => {
+const initFont = (font) => {
return [font.FontName, { attributes: font, glyphWidths: {}, kernPairs: {} }];
};
-const expandData = data => {
+const expandData = (data) => {
const { attributes, glyphWidths, kernPairs } = data;
const fonts = attributes.map(initFont);
- Object.keys(glyphWidths).forEach(key => {
+ Object.keys(glyphWidths).forEach((key) => {
glyphWidths[key].forEach((value, index) => {
if (value) fonts[index][1].glyphWidths[key] = value;
});
});
- Object.keys(kernPairs).forEach(key => {
+ Object.keys(kernPairs).forEach((key) => {
kernPairs[key].forEach((value, index) => {
if (value) fonts[index][1].kernPairs[key] = value;
});
diff --git a/packages/pdfkit/src/font/embedded.js b/packages/pdfkit/src/font/embedded.js
index e1355bfbd..1e34ec200 100644
--- a/packages/pdfkit/src/font/embedded.js
+++ b/packages/pdfkit/src/font/embedded.js
@@ -1,14 +1,12 @@
-import PDFObject from '../object';
-
-const toHex = function(...codePoints) {
- const codes = Array.from(codePoints).map(code =>
+const toHex = function (...codePoints) {
+ const codes = Array.from(codePoints).map((code) =>
`0000${code.toString(16)}`.slice(-4)
);
return codes.join('');
};
-const createEmbeddedFont = PDFFont =>
+const createEmbeddedFont = (PDFFont) =>
class EmbeddedFont extends PDFFont {
constructor(document, font, id) {
super();
@@ -33,7 +31,8 @@ const createEmbeddedFont = PDFFont =>
}
layoutRun(text, features) {
- const run = this.font.layout(text, features);
+ // passing LTR To force fontkit to not reverse the string
+ const run = this.font.layout(text, features, undefined, undefined, 'ltr');
// Normalize position values
for (let i = 0; i < run.positions.length; i++) {
@@ -77,7 +76,7 @@ const createEmbeddedFont = PDFFont =>
let last = 0;
let index = 0;
while (index <= text.length) {
- var needle;
+ let needle;
if (
(index === text.length && last < index) ||
((needle = text.charAt(index)), [' ', '\t'].includes(needle))
@@ -111,9 +110,7 @@ const createEmbeddedFont = PDFFont =>
this.widths[gid] = glyph.advanceWidth * this.scale;
}
if (this.unicode[gid] == null) {
- this.unicode[gid] = this.font._cmapProcessor.codePointsForGlyph(
- glyph.id
- );
+ this.unicode[gid] = glyph.codePoints;
}
}
@@ -131,9 +128,7 @@ const createEmbeddedFont = PDFFont =>
this.widths[gid] = glyph.advanceWidth * this.scale;
}
if (this.unicode[gid] == null) {
- this.unicode[gid] = this.font._cmapProcessor.codePointsForGlyph(
- glyph.id
- );
+ this.unicode[gid] = glyph.codePoints;
}
}
@@ -177,7 +172,7 @@ const createEmbeddedFont = PDFFont =>
// generate a random tag (6 uppercase letters. 65 is the char code for 'A')
const tag = [0, 1, 2, 3, 4, 5]
- .map(i => String.fromCharCode(Math.random() * 26 + 65))
+ .map(() => String.fromCharCode(Math.random() * 26 + 65))
.join('');
const name = tag + '+' + this.font.postscriptName;
@@ -208,9 +203,9 @@ const createEmbeddedFont = PDFFont =>
descriptor.end();
- const descendantFont = this.document.ref({
+ const descendantFontData = {
Type: 'Font',
- Subtype: isCFF ? 'CIDFontType0' : 'CIDFontType2',
+ Subtype: 'CIDFontType0',
BaseFont: name,
CIDSystemInfo: {
Registry: new String('Adobe'),
@@ -219,7 +214,14 @@ const createEmbeddedFont = PDFFont =>
},
FontDescriptor: descriptor,
W: [0, this.widths]
- });
+ };
+
+ if (!isCFF) {
+ descendantFontData.Subtype = 'CIDFontType2';
+ descendantFontData.CIDToGIDMap = 'Identity';
+ }
+
+ const descendantFont = this.document.ref(descendantFontData);
descendantFont.end();
@@ -240,45 +242,45 @@ const createEmbeddedFont = PDFFont =>
// unicode characters represented by each glyph.
toUnicodeCmap() {
const cmap = this.document.ref();
+ let entries = [];
+ let unicodeMap =
+ '/CIDInit /ProcSet findresource begin\n12 dict begin\nbegincmap\n/CIDSystemInfo <<\n /Registry (Adobe)\n /Ordering (UCS)\n /Supplement 0\n>> def\n/CMapName /Adobe-Identity-UCS def\n/CMapType 2 def\n1 begincodespacerange\n<0000>\nendcodespacerange';
- const entries = [];
- for (let codePoints of Array.from(this.unicode)) {
+ for (let [index, codePoints] of this.unicode.entries()) {
const encoded = [];
- for (let value of Array.from(codePoints)) {
+ if (entries.length >= 100) {
+ unicodeMap +=
+ '\n' +
+ entries.length +
+ ' beginbfchar\n' +
+ entries.join('\n') +
+ '\nendbfchar';
+ entries = [];
+ }
+ // encode codePoints to utf16
+ for (let value of codePoints) {
if (value > 0xffff) {
value -= 0x10000;
encoded.push(toHex(((value >>> 10) & 0x3ff) | 0xd800));
value = 0xdc00 | (value & 0x3ff);
}
-
encoded.push(toHex(value));
-
- entries.push(`<${encoded.join(' ')}>`);
}
- }
- cmap.end(`\
- /CIDInit /ProcSet findresource begin
- 12 dict begin
- begincmap
- /CIDSystemInfo <<
- /Registry (Adobe)
- /Ordering (UCS)
- /Supplement 0
- >> def
- /CMapName /Adobe-Identity-UCS def
- /CMapType 2 def
- 1 begincodespacerange
- <0000>
- endcodespacerange
- 1 beginbfrange
- <0000> <${toHex(entries.length - 1)}> [${entries.join(' ')}]
- endbfrange
- endcmap
- CMapName currentdict /CMap defineresource pop
- end
- end\
- `);
+ // eslint-disable-next-line no-useless-concat
+ entries.push('<' + toHex(index) + '>' + '<' + encoded.join(' ') + '>');
+ }
+ if (entries.length) {
+ unicodeMap +=
+ '\n' +
+ entries.length +
+ ' beginbfchar\n' +
+ entries.join('\n') +
+ '\nendbfchar\n';
+ }
+ unicodeMap +=
+ 'endcmap\nCMapName currentdict /CMap defineresource pop\nend\nend';
+ cmap.end(unicodeMap);
return cmap;
}
diff --git a/packages/pdfkit/src/font/standard.js b/packages/pdfkit/src/font/standard.js
index b369adf3a..0fa88baf5 100644
--- a/packages/pdfkit/src/font/standard.js
+++ b/packages/pdfkit/src/font/standard.js
@@ -4,7 +4,7 @@ import expandData from './data/expandData';
const STANDARD_FONTS = expandData(data);
-const createStandardFont = PDFFont =>
+const createStandardFont = (PDFFont) =>
class StandardFont extends PDFFont {
constructor(document, name, id) {
super();
diff --git a/packages/pdfkit/src/gradient.js b/packages/pdfkit/src/gradient.js
index f7e62deeb..78dbd659a 100644
--- a/packages/pdfkit/src/gradient.js
+++ b/packages/pdfkit/src/gradient.js
@@ -74,7 +74,7 @@ class PDFGradient {
Domain: [0, 1],
C0: this.stops[i + 0][1],
C1: this.stops[i + 1][1],
- N: 1,
+ N: 1
});
stops.push(fn);
@@ -90,7 +90,7 @@ class PDFGradient {
Domain: [0, 1],
Functions: stops,
Bounds: bounds,
- Encode: encode,
+ Encode: encode
});
fn.end();
@@ -105,12 +105,12 @@ class PDFGradient {
Type: 'Pattern',
PatternType: 2,
Shading: shader,
- Matrix: this.matrix.map(number),
+ Matrix: this.matrix.map(number)
});
pattern.end();
- if (this.stops.some(stop => stop[2] < 1)) {
+ if (this.stops.some((stop) => stop[2] < 1)) {
let grad = this.opacityGradient();
grad._colorSpace = 'DeviceGray';
@@ -130,14 +130,14 @@ class PDFGradient {
Group: {
Type: 'Group',
S: 'Transparency',
- CS: 'DeviceGray',
+ CS: 'DeviceGray'
},
Resources: {
ProcSet: ['PDF', 'Text', 'ImageB', 'ImageC', 'ImageI'],
Pattern: {
- Sh1: grad,
- },
- },
+ Sh1: grad
+ }
+ }
});
form.write('/Pattern cs /Sh1 scn');
@@ -148,8 +148,8 @@ class PDFGradient {
SMask: {
Type: 'Mask',
S: 'Luminosity',
- G: form,
- },
+ G: form
+ }
});
gstate.end();
@@ -165,12 +165,12 @@ class PDFGradient {
Resources: {
ProcSet: ['PDF', 'Text', 'ImageB', 'ImageC', 'ImageI'],
Pattern: {
- Sh1: pattern,
+ Sh1: pattern
},
ExtGState: {
- Gs1: gstate,
- },
- },
+ Gs1: gstate
+ }
+ }
});
opacityPattern.write('/Gs1 gs /Pattern cs /Sh1 scn');
@@ -184,7 +184,7 @@ class PDFGradient {
return pattern;
}
- apply(op) {
+ apply(stroke) {
// apply gradient transform to existing document ctm
const [m0, m1, m2, m3, m4, m5] = this.doc._ctm;
const [m11, m12, m21, m22, dx, dy] = this.transform;
@@ -194,12 +194,14 @@ class PDFGradient {
m0 * m21 + m2 * m22,
m1 * m21 + m3 * m22,
m0 * dx + m2 * dy + m4,
- m1 * dx + m3 * dy + m5,
+ m1 * dx + m3 * dy + m5
];
if (!this.embedded || m.join(' ') !== this.matrix.join(' ')) {
this.embed(m);
}
+ this.doc._setColorSpace('Pattern', stroke);
+ const op = stroke ? 'SCN' : 'scn';
return this.doc.addContent(`/${this.id} ${op}`);
}
}
@@ -219,7 +221,7 @@ class PDFLinearGradient extends PDFGradient {
ColorSpace: this._colorSpace,
Coords: [this.x1, this.y1, this.x2, this.y2],
Function: fn,
- Extend: [true, true],
+ Extend: [true, true]
});
}
@@ -246,7 +248,7 @@ class PDFRadialGradient extends PDFGradient {
ColorSpace: this._colorSpace,
Coords: [this.x1, this.y1, this.r1, this.x2, this.y2, this.r2],
Function: fn,
- Extend: [true, true],
+ Extend: [true, true]
});
}
@@ -258,7 +260,7 @@ class PDFRadialGradient extends PDFGradient {
this.r1,
this.x2,
this.y2,
- this.r2,
+ this.r2
);
}
}
diff --git a/packages/pdfkit/src/image.js b/packages/pdfkit/src/image.js
index b79d49d35..416664d29 100644
--- a/packages/pdfkit/src/image.js
+++ b/packages/pdfkit/src/image.js
@@ -1,3 +1,8 @@
+/*
+PDFImage - embeds images in PDF documents
+By Devon Govett
+*/
+
import fs from 'fs';
import JPEG from './image/jpeg';
import PNG from './image/png';
@@ -10,24 +15,24 @@ class PDFImage {
} else if (src instanceof ArrayBuffer) {
data = Buffer.from(new Uint8Array(src));
} else {
- let match = /^data:.+;base64,(.*)$/.exec(src);
- if (match) {
+ let match;
+ if ((match = /^data:.+?;base64,(.*)$/.exec(src))) {
data = Buffer.from(match[1], 'base64');
- } else if (!BROWSER) {
+ } else {
data = fs.readFileSync(src);
- if (!data) return;
+ if (!data) {
+ return;
+ }
}
}
if (data[0] === 0xff && data[1] === 0xd8) {
return new JPEG(data, label);
- }
-
- if (data[0] === 0x89 && data.toString('ascii', 1, 4) === 'PNG') {
+ } else if (data[0] === 0x89 && data.toString('ascii', 1, 4) === 'PNG') {
return new PNG(data, label);
+ } else {
+ throw new Error('Unknown image format.');
}
-
- throw new Error('Unknown image format.');
}
}
diff --git a/packages/pdfkit/src/image/jpeg.js b/packages/pdfkit/src/image/jpeg.js
index 9a969b942..742dbcb5b 100644
--- a/packages/pdfkit/src/image/jpeg.js
+++ b/packages/pdfkit/src/image/jpeg.js
@@ -1,64 +1,36 @@
-let MARKERS = [
- 0xffc0,
- 0xffc1,
- 0xffc2,
- 0xffc3,
- 0xffc5,
- 0xffc6,
- 0xffc7,
- 0xffc8,
- 0xffc9,
- 0xffca,
- 0xffcb,
- 0xffcc,
- 0xffcd,
- 0xffce,
- 0xffcf
-];
+import _JPEG from 'jay-peg';
+
+const COLOR_SPACE_MAP = {
+ 1: 'DeviceGray',
+ 3: 'DeviceRGB',
+ 4: 'DeviceCMYK'
+};
class JPEG {
constructor(data, label) {
- let marker;
this.data = data;
this.label = label;
+ this.orientation = 1;
if (this.data.readUInt16BE(0) !== 0xffd8) {
throw 'SOI not found in JPEG';
}
- let pos = 2;
- while (pos < this.data.length) {
- marker = this.data.readUInt16BE(pos);
- pos += 2;
- if (Array.from(MARKERS).includes(marker)) {
- break;
- }
- pos += this.data.readUInt16BE(pos);
- }
+ const markers = _JPEG.decode(this.data);
- if (!Array.from(MARKERS).includes(marker)) {
- throw 'Invalid JPEG.';
- }
- pos += 2;
+ for (let i = 0; i < markers.length; i += 1) {
+ const marker = markers[i];
- this.bits = this.data[pos++];
- this.height = this.data.readUInt16BE(pos);
- pos += 2;
-
- this.width = this.data.readUInt16BE(pos);
- pos += 2;
+ if (marker.name === 'EXIF' && marker.entries.orientation) {
+ this.orientation = marker.entries.orientation;
+ }
- const channels = this.data[pos++];
- this.colorSpace = (() => {
- switch (channels) {
- case 1:
- return 'DeviceGray';
- case 3:
- return 'DeviceRGB';
- case 4:
- return 'DeviceCMYK';
+ if (marker.name === 'SOF') {
+ this.width ||= marker.width;
+ this.height ||= marker.height;
+ this.colorSpace ||= COLOR_SPACE_MAP[marker.numberOfComponents];
}
- })();
+ }
this.obj = null;
}
@@ -88,7 +60,7 @@ class JPEG {
this.obj.end(this.data);
// free memory
- this.data = null;
+ return (this.data = null);
}
}
diff --git a/packages/pdfkit/src/image/png.js b/packages/pdfkit/src/image/png.js
index a232b2a04..88bef390d 100644
--- a/packages/pdfkit/src/image/png.js
+++ b/packages/pdfkit/src/image/png.js
@@ -15,10 +15,11 @@ class PNGImage {
let dataDecoded = false;
this.document = document;
+ if (this.obj) {
+ return;
+ }
- if (this.obj) return;
-
- const { hasAlphaChannel } = this.image;
+ const hasAlphaChannel = this.image.hasAlphaChannel;
const isInterlaced = this.image.interlaceMethod === 1;
this.obj = this.document.ref({
@@ -38,19 +39,19 @@ class PNGImage {
Columns: this.width
});
- this.obj.data['DecodeParms'] = params;
+ this.obj.data.DecodeParms = params;
params.end();
}
if (this.image.palette.length === 0) {
- this.obj.data['ColorSpace'] = this.image.colorSpace;
+ this.obj.data.ColorSpace = this.image.colorSpace;
} else {
// embed the color palette in the PDF as an object stream
const palette = this.document.ref();
palette.end(Buffer.from(this.image.palette));
// build the color space array for the image
- this.obj.data['ColorSpace'] = [
+ this.obj.data.ColorSpace = [
'Indexed',
'DeviceRGB',
this.image.palette.length / 3 - 1,
@@ -64,7 +65,7 @@ class PNGImage {
// Use Color Key Masking (spec section 4.8.5)
// An array with N elements, where N is two times the number of color components.
const val = this.image.transparency.grayscale;
- this.obj.data['Mask'] = [val, val];
+ this.obj.data.Mask = [val, val];
} else if (this.image.transparency.rgb) {
// Use Color Key Masking (spec section 4.8.5)
// An array with N elements, where N is two times the number of color components.
@@ -74,7 +75,7 @@ class PNGImage {
mask.push(x, x);
}
- this.obj.data['Mask'] = mask;
+ this.obj.data.Mask = mask;
} else if (this.image.transparency.indexed) {
// Create a transparency SMask for the image based on the data
// in the PLTE and tRNS sections. See below for details on SMasks.
@@ -109,7 +110,7 @@ class PNGImage {
});
sMask.end(this.alphaChannel);
- this.obj.data['SMask'] = sMask;
+ this.obj.data.SMask = sMask;
}
// add the actual image data
@@ -117,14 +118,13 @@ class PNGImage {
// free memory
this.image = null;
- this.imgData = null;
+ return (this.imgData = null);
}
splitAlphaChannel() {
- return this.image.decodePixels(pixels => {
+ return this.image.decodePixels((pixels) => {
let a;
let p;
-
const colorCount = this.image.colors;
const pixelCount = this.width * this.height;
const imgData = Buffer.alloc(pixelCount * colorCount);
@@ -144,7 +144,6 @@ class PNGImage {
}
this.imgData = zlib.deflateSync(imgData);
-
this.alphaChannel = zlib.deflateSync(alphaChannel);
return this.finalize();
});
@@ -152,7 +151,7 @@ class PNGImage {
loadIndexedAlphaChannel() {
const transparency = this.image.transparency.indexed;
- return this.image.decodePixels(pixels => {
+ return this.image.decodePixels((pixels) => {
const alphaChannel = Buffer.alloc(this.width * this.height);
let i = 0;
@@ -161,13 +160,12 @@ class PNGImage {
}
this.alphaChannel = zlib.deflateSync(alphaChannel);
-
return this.finalize();
});
}
decodeData() {
- this.image.decodePixels(pixels => {
+ this.image.decodePixels((pixels) => {
this.imgData = zlib.deflateSync(pixels);
this.finalize();
});
diff --git a/packages/pdfkit/src/metadata.js b/packages/pdfkit/src/metadata.js
new file mode 100644
index 000000000..ae218029c
--- /dev/null
+++ b/packages/pdfkit/src/metadata.js
@@ -0,0 +1,37 @@
+class PDFMetadata {
+ constructor() {
+ this._metadata = `
+
+
+
+ `;
+ }
+
+ _closeTags() {
+ this._metadata = this._metadata.concat(`
+
+
+
+ `);
+ }
+
+ append(xml, newline = true) {
+ this._metadata = this._metadata.concat(xml);
+ if (newline) this._metadata = this._metadata.concat('\n');
+ }
+
+ getXML() {
+ return this._metadata;
+ }
+
+ getLength() {
+ return this._metadata.length;
+ }
+
+ end() {
+ this._closeTags();
+ this._metadata = this._metadata.trim();
+ }
+}
+
+export default PDFMetadata;
diff --git a/packages/pdfkit/src/mixins/acroform.js b/packages/pdfkit/src/mixins/acroform.js
index f2ce118b0..38ea4dbc5 100644
--- a/packages/pdfkit/src/mixins/acroform.js
+++ b/packages/pdfkit/src/mixins/acroform.js
@@ -81,10 +81,10 @@ export default {
throw new Error('No fonts specified for PDF form');
}
let fontDict = this._root.data.AcroForm.data.DR.Font;
- Object.keys(this._acroform.fonts).forEach(name => {
+ Object.keys(this._acroform.fonts).forEach((name) => {
fontDict[name] = this._acroform.fonts[name];
});
- this._root.data.AcroForm.data.Fields.forEach(fieldRef => {
+ this._root.data.AcroForm.data.Fields.forEach((fieldRef) => {
this._endChild(fieldRef);
});
this._root.data.AcroForm.end();
@@ -94,7 +94,7 @@ export default {
_endChild(ref) {
if (Array.isArray(ref.data.Kids)) {
- ref.data.Kids.forEach(childRef => {
+ ref.data.Kids.forEach((childRef) => {
this._endChild(childRef);
});
ref.end();
@@ -297,7 +297,7 @@ export default {
_resolveFlags(options) {
let result = 0;
- Object.keys(options).forEach(key => {
+ Object.keys(options).forEach((key) => {
if (FIELD_FLAGS[key]) {
result |= FIELD_FLAGS[key];
delete options[key];
@@ -365,13 +365,13 @@ export default {
options.Opt = select;
}
- Object.keys(VALUE_MAP).forEach(key => {
+ Object.keys(VALUE_MAP).forEach((key) => {
if (options[key] !== undefined) {
options[VALUE_MAP[key]] = options[key];
delete options[key];
}
});
- ['V', 'DV'].forEach(key => {
+ ['V', 'DV'].forEach((key) => {
if (typeof options[key] === 'string') {
options[key] = new String(options[key]);
}
diff --git a/packages/pdfkit/src/mixins/annotations.js b/packages/pdfkit/src/mixins/annotations.js
index 725c3b00c..1b667e21e 100644
--- a/packages/pdfkit/src/mixins/annotations.js
+++ b/packages/pdfkit/src/mixins/annotations.js
@@ -35,15 +35,9 @@ export default {
options.Subtype = 'Text';
options.Contents = new String(contents);
options.Name = 'Comment';
-
if (options.color == null) {
options.color = [243, 223, 92];
}
-
- options.Border = [0, 0, options.borderWidth || 0];
-
- delete options.borderWidth;
-
return this.annotate(x, y, w, h, options);
},
@@ -99,6 +93,42 @@ export default {
return this._markup(x, y, w, h, options);
},
+ underline(x, y, w, h, options = {}) {
+ options.Subtype = 'Underline';
+ return this._markup(x, y, w, h, options);
+ },
+
+ strike(x, y, w, h, options = {}) {
+ options.Subtype = 'StrikeOut';
+ return this._markup(x, y, w, h, options);
+ },
+
+ lineAnnotation(x1, y1, x2, y2, options = {}) {
+ options.Subtype = 'Line';
+ options.Contents = new String();
+ options.L = [x1, this.page.height - y1, x2, this.page.height - y2];
+ return this.annotate(x1, y1, x2, y2, options);
+ },
+
+ rectAnnotation(x, y, w, h, options = {}) {
+ options.Subtype = 'Square';
+ options.Contents = new String();
+ return this.annotate(x, y, w, h, options);
+ },
+
+ ellipseAnnotation(x, y, w, h, options = {}) {
+ options.Subtype = 'Circle';
+ options.Contents = new String();
+ return this.annotate(x, y, w, h, options);
+ },
+
+ textAnnotation(x, y, w, h, text, options = {}) {
+ options.Subtype = 'FreeText';
+ options.Contents = new String(text);
+ options.DA = new String();
+ return this.annotate(x, y, w, h, options);
+ },
+
fileAnnotation(x, y, w, h, file = {}, options = {}) {
// create hidden file
const filespec = this.file(file.src, Object.assign({ hidden: true }, file));
diff --git a/packages/pdfkit/src/mixins/attachments.js b/packages/pdfkit/src/mixins/attachments.js
index 133c00d17..cf7c8ef59 100644
--- a/packages/pdfkit/src/mixins/attachments.js
+++ b/packages/pdfkit/src/mixins/attachments.js
@@ -1,6 +1,10 @@
import fs from 'fs';
-import * as CryptoJS from 'crypto-js/core';
-import MD5 from 'crypto-js/md5';
+// This file is ran directly with Node - needs to have .js extension
+// eslint-disable-next-line import/extensions
+import * as CryptoJS from 'crypto-js/core.js';
+// This file is ran directly with Node - needs to have .js extension
+// eslint-disable-next-line import/extensions
+import MD5 from 'crypto-js/md5.js';
export default {
/**
diff --git a/packages/pdfkit/src/mixins/color.js b/packages/pdfkit/src/mixins/color.js
index 776108918..d952b18e0 100644
--- a/packages/pdfkit/src/mixins/color.js
+++ b/packages/pdfkit/src/mixins/color.js
@@ -1,27 +1,25 @@
import Gradient from '../gradient';
+import pattern from '../pattern';
const { PDFGradient, PDFLinearGradient, PDFRadialGradient } = Gradient;
+const { PDFTilingPattern } = pattern;
export default {
initColor() {
// The opacity dictionaries
this._opacityRegistry = {};
this._opacityCount = 0;
+ this._patternCount = 0;
return (this._gradCount = 0);
},
_normalizeColor(color) {
- if (color instanceof PDFGradient) {
- return color;
- }
-
- let part;
if (typeof color === 'string') {
if (color.charAt(0) === '#') {
if (color.length === 4) {
color = color.replace(
/#([0-9A-F])([0-9A-F])([0-9A-F])/i,
- '#$1$1$2$2$3$3',
+ '#$1$1$2$2$3$3'
);
}
const hex = parseInt(color.slice(1), 16);
@@ -34,25 +32,11 @@ export default {
if (Array.isArray(color)) {
// RGB
if (color.length === 3) {
- color = (() => {
- const result = [];
- for (part of Array.from(color)) {
- result.push(part / 255);
- }
- return result;
- })();
-
+ color = color.map((part) => part / 255);
// CMYK
} else if (color.length === 4) {
- color = (() => {
- const result1 = [];
- for (part of Array.from(color)) {
- result1.push(part / 100);
- }
- return result1;
- })();
+ color = color.map((part) => part / 100);
}
-
return color;
}
@@ -60,23 +44,30 @@ export default {
},
_setColor(color, stroke) {
+ if (color instanceof PDFGradient) {
+ color.apply(stroke);
+ return true;
+ // see if tiling pattern, decode & apply it it
+ } else if (Array.isArray(color) && color[0] instanceof PDFTilingPattern) {
+ color[0].apply(stroke, color[1]);
+ return true;
+ }
+ // any other case should be a normal color and not a pattern
+ return this._setColorCore(color, stroke);
+ },
+
+ _setColorCore(color, stroke) {
color = this._normalizeColor(color);
if (!color) {
return false;
}
const op = stroke ? 'SCN' : 'scn';
+ const space = this._getColorSpace(color);
+ this._setColorSpace(space, stroke);
- if (color instanceof PDFGradient) {
- this._setColorSpace('Pattern', stroke);
- color.apply(op);
- } else {
- const space = color.length === 4 ? 'DeviceCMYK' : 'DeviceRGB';
- this._setColorSpace(space, stroke);
-
- color = color.join(' ');
- this.addContent(`${color} ${op}`);
- }
+ color = color.join(' ');
+ this.addContent(`${color} ${op}`);
return true;
},
@@ -86,6 +77,10 @@ export default {
return this.addContent(`/${space} ${op}`);
},
+ _getColorSpace(color) {
+ return color.length === 4 ? 'DeviceCMYK' : 'DeviceRGB';
+ },
+
fillColor(color, opacity) {
const set = this._setColor(color, false);
if (set) {
@@ -136,7 +131,7 @@ export default {
const key = `${fillOpacity}_${strokeOpacity}`;
if (this._opacityRegistry[key]) {
- [dictionary, name] = Array.from(this._opacityRegistry[key]);
+ [dictionary, name] = this._opacityRegistry[key];
} else {
dictionary = { Type: 'ExtGState' };
@@ -165,6 +160,10 @@ export default {
radialGradient(x1, y1, r1, x2, y2, r2) {
return new PDFRadialGradient(this, x1, y1, r1, x2, y2, r2);
},
+
+ pattern(bbox, xStep, yStep, stream) {
+ return new PDFTilingPattern(this, bbox, xStep, yStep, stream);
+ }
};
var namedColors = {
@@ -314,5 +313,5 @@ var namedColors = {
white: [255, 255, 255],
whitesmoke: [245, 245, 245],
yellow: [255, 255, 0],
- yellowgreen: [154, 205, 50],
+ yellowgreen: [154, 205, 50]
};
diff --git a/packages/pdfkit/src/mixins/fonts.js b/packages/pdfkit/src/mixins/fonts.js
index e7490eb24..d46cb9d58 100644
--- a/packages/pdfkit/src/mixins/fonts.js
+++ b/packages/pdfkit/src/mixins/fonts.js
@@ -17,7 +17,8 @@ export default {
},
font(src, family, size) {
- let cacheKey, font;
+ let cacheKey;
+ let font;
if (typeof family === 'number') {
size = family;
family = null;
@@ -82,9 +83,9 @@ export default {
registerFont(name, src, family) {
this._registeredFonts[name] = {
src,
- family,
+ family
};
return this;
- },
+ }
};
diff --git a/packages/pdfkit/src/mixins/images.js b/packages/pdfkit/src/mixins/images.js
index 657f260c4..f136eb2b0 100644
--- a/packages/pdfkit/src/mixins/images.js
+++ b/packages/pdfkit/src/mixins/images.js
@@ -3,7 +3,7 @@ import PDFImage from '../image';
export default {
initImages() {
this._imageRegistry = {};
- this._imageCount = 0;
+ return (this._imageCount = 0);
},
embedImage(src) {
@@ -32,42 +32,71 @@ export default {
let bh;
let bp;
let bw;
+ let image;
let ip;
let left;
let left1;
-
+ let rotateAngle;
+ let originX;
+ let originY;
if (typeof x === 'object') {
options = x;
x = null;
}
- const image = src instanceof PDFImage ? src : this.embedImage(src);
+ // Ignore orientation based on document options or image options
+ const ignoreOrientation =
+ options.ignoreOrientation ||
+ (options.ignoreOrientation !== false && this.options.ignoreOrientation);
x = (left = x != null ? x : options.x) != null ? left : this.x;
y = (left1 = y != null ? y : options.y) != null ? left1 : this.y;
+ if (typeof src === 'string') {
+ image = this._imageRegistry[src];
+ }
+
+ if (!image) {
+ if (src.width && src.height) {
+ image = src;
+ } else {
+ image = this.openImage(src);
+ }
+ }
+
+ if (!image.obj) {
+ image.embed(this);
+ }
+
if (this.page.xobjects[image.label] == null) {
this.page.xobjects[image.label] = image.obj;
}
- let w = options.width || image.width;
- let h = options.height || image.height;
+ let { width, height } = image;
+
+ // If EXIF orientation calls for it, swap width and height
+ if (!ignoreOrientation && image.orientation > 4) {
+ [width, height] = [height, width];
+ }
+
+ let w = options.width || width;
+ let h = options.height || height;
if (options.width && !options.height) {
- const wp = w / image.width;
- w = image.width * wp;
- h = image.height * wp;
+ const wp = w / width;
+ w = width * wp;
+ h = height * wp;
} else if (options.height && !options.width) {
- const hp = h / image.height;
- w = image.width * hp;
- h = image.height * hp;
+ const hp = h / height;
+ w = width * hp;
+ h = height * hp;
} else if (options.scale) {
- w = image.width * options.scale;
- h = image.height * options.scale;
+ w = width * options.scale;
+ h = height * options.scale;
} else if (options.fit) {
- [bw, bh] = Array.from(options.fit);
+ [bw, bh] = options.fit;
bp = bw / bh;
- ip = image.width / image.height;
+ ip = width / height;
if (ip > bp) {
w = bw;
h = bw / ip;
@@ -75,6 +104,116 @@ export default {
h = bh;
w = bh * ip;
}
+ } else if (options.cover) {
+ [bw, bh] = options.cover;
+ bp = bw / bh;
+ ip = width / height;
+ if (ip > bp) {
+ h = bh;
+ w = bh * ip;
+ } else {
+ w = bw;
+ h = bw / ip;
+ }
+ }
+
+ if (options.fit || options.cover) {
+ if (options.align === 'center') {
+ x = x + bw / 2 - w / 2;
+ } else if (options.align === 'right') {
+ x = x + bw - w;
+ }
+
+ if (options.valign === 'center') {
+ y = y + bh / 2 - h / 2;
+ } else if (options.valign === 'bottom') {
+ y = y + bh - h;
+ }
+ }
+
+ if (!ignoreOrientation) {
+ switch (image.orientation) {
+ // No orientation (need to flip image, though, because of the default transform matrix on the document)
+ default:
+ case 1:
+ h = -h;
+ y -= h;
+
+ rotateAngle = 0;
+ break;
+ // Flip Horizontal
+ case 2:
+ w = -w;
+ h = -h;
+ x -= w;
+ y -= h;
+
+ rotateAngle = 0;
+ break;
+ // Rotate 180 degrees
+ case 3:
+ originX = x;
+ originY = y;
+
+ h = -h;
+ x -= w;
+
+ rotateAngle = 180;
+ break;
+ // Flip vertical
+ case 4:
+ // Do nothing, image will be flipped
+
+ break;
+ // Flip horizontally and rotate 270 degrees CW
+ case 5:
+ originX = x;
+ originY = y;
+
+ [w, h] = [h, w];
+ y -= h;
+
+ rotateAngle = 90;
+ break;
+ // Rotate 90 degrees CW
+ case 6:
+ originX = x;
+ originY = y;
+
+ [w, h] = [h, w];
+ h = -h;
+
+ rotateAngle = 90;
+ break;
+ // Flip horizontally and rotate 90 degrees CW
+ case 7:
+ originX = x;
+ originY = y;
+
+ [w, h] = [h, w];
+ h = -h;
+ w = -w;
+ x -= w;
+
+ rotateAngle = 90;
+ break;
+ // Rotate 270 degrees CW
+ case 8:
+ originX = x;
+ originY = y;
+
+ [w, h] = [h, w];
+ h = -h;
+ x -= w;
+ y -= h;
+
+ rotateAngle = -90;
+ break;
+ }
+ } else {
+ h = -h;
+ y -= h;
+ rotateAngle = 0;
}
// Set the current y position to below the image if it is in the document flow
@@ -83,7 +222,14 @@ export default {
}
this.save();
- this.transform(w, 0, 0, -h, x, y + h);
+
+ if (rotateAngle) {
+ this.rotate(rotateAngle, {
+ origin: [originX, originY]
+ });
+ }
+
+ this.transform(w, 0, 0, h, x, y);
this.addContent(`/${image.label} Do`);
this.restore();
diff --git a/packages/pdfkit/src/mixins/markings.js b/packages/pdfkit/src/mixins/markings.js
new file mode 100644
index 000000000..29df0a5c8
--- /dev/null
+++ b/packages/pdfkit/src/mixins/markings.js
@@ -0,0 +1,186 @@
+/*
+Markings mixin - support marked content sequences in content streams
+By Ben Schmidt
+*/
+
+import PDFStructureElement from '../structure_element';
+import PDFStructureContent from '../structure_content';
+import PDFNumberTree from '../number_tree';
+import PDFObject from '../object';
+
+export default {
+ initMarkings(options) {
+ this.structChildren = [];
+
+ if (options.tagged) {
+ this.getMarkInfoDictionary().data.Marked = true;
+ this.getStructTreeRoot();
+ }
+ },
+
+ markContent(tag, options = null) {
+ if (tag === 'Artifact' || (options && options.mcid)) {
+ let toClose = 0;
+ this.page.markings.forEach((marking) => {
+ if (toClose || marking.structContent || marking.tag === 'Artifact') {
+ toClose++;
+ }
+ });
+ while (toClose--) {
+ this.endMarkedContent();
+ }
+ }
+
+ if (!options) {
+ this.page.markings.push({ tag });
+ this.addContent(`/${tag} BMC`);
+ return this;
+ }
+
+ this.page.markings.push({ tag, options });
+
+ const dictionary = {};
+
+ if (typeof options.mcid !== 'undefined') {
+ dictionary.MCID = options.mcid;
+ }
+ if (tag === 'Artifact') {
+ if (typeof options.type === 'string') {
+ dictionary.Type = options.type;
+ }
+ if (Array.isArray(options.bbox)) {
+ dictionary.BBox = [
+ options.bbox[0],
+ this.page.height - options.bbox[3],
+ options.bbox[2],
+ this.page.height - options.bbox[1]
+ ];
+ }
+ if (
+ Array.isArray(options.attached) &&
+ options.attached.every((val) => typeof val === 'string')
+ ) {
+ dictionary.Attached = options.attached;
+ }
+ }
+ if (tag === 'Span') {
+ if (options.lang) {
+ dictionary.Lang = new String(options.lang);
+ }
+ if (options.alt) {
+ dictionary.Alt = new String(options.alt);
+ }
+ if (options.expanded) {
+ dictionary.E = new String(options.expanded);
+ }
+ if (options.actual) {
+ dictionary.ActualText = new String(options.actual);
+ }
+ }
+
+ this.addContent(`/${tag} ${PDFObject.convert(dictionary)} BDC`);
+ return this;
+ },
+
+ markStructureContent(tag, options = {}) {
+ const pageStructParents = this.getStructParentTree().get(
+ this.page.structParentTreeKey
+ );
+ const mcid = pageStructParents.length;
+ pageStructParents.push(null);
+
+ this.markContent(tag, { ...options, mcid });
+
+ const structContent = new PDFStructureContent(this.page.dictionary, mcid);
+ this.page.markings.slice(-1)[0].structContent = structContent;
+ return structContent;
+ },
+
+ endMarkedContent() {
+ this.page.markings.pop();
+ this.addContent('EMC');
+ return this;
+ },
+
+ struct(type, options = {}, children = null) {
+ return new PDFStructureElement(this, type, options, children);
+ },
+
+ addStructure(structElem) {
+ const structTreeRoot = this.getStructTreeRoot();
+ structElem.setParent(structTreeRoot);
+ structElem.setAttached();
+ this.structChildren.push(structElem);
+ if (!structTreeRoot.data.K) {
+ structTreeRoot.data.K = [];
+ }
+ structTreeRoot.data.K.push(structElem.dictionary);
+ return this;
+ },
+
+ initPageMarkings(pageMarkings) {
+ pageMarkings.forEach((marking) => {
+ if (marking.structContent) {
+ const structContent = marking.structContent;
+ const newStructContent = this.markStructureContent(
+ marking.tag,
+ marking.options
+ );
+ structContent.push(newStructContent);
+ this.page.markings.slice(-1)[0].structContent = structContent;
+ } else {
+ this.markContent(marking.tag, marking.options);
+ }
+ });
+ },
+
+ endPageMarkings(page) {
+ const pageMarkings = page.markings;
+ pageMarkings.forEach(() => page.write('EMC'));
+ page.markings = [];
+ return pageMarkings;
+ },
+
+ getMarkInfoDictionary() {
+ if (!this._root.data.MarkInfo) {
+ this._root.data.MarkInfo = this.ref({});
+ }
+ return this._root.data.MarkInfo;
+ },
+
+ getStructTreeRoot() {
+ if (!this._root.data.StructTreeRoot) {
+ this._root.data.StructTreeRoot = this.ref({
+ Type: 'StructTreeRoot',
+ ParentTree: new PDFNumberTree(),
+ ParentTreeNextKey: 0
+ });
+ }
+ return this._root.data.StructTreeRoot;
+ },
+
+ getStructParentTree() {
+ return this.getStructTreeRoot().data.ParentTree;
+ },
+
+ createStructParentTreeNextKey() {
+ // initialise the MarkInfo dictionary
+ this.getMarkInfoDictionary();
+
+ const structTreeRoot = this.getStructTreeRoot();
+ const key = structTreeRoot.data.ParentTreeNextKey++;
+ structTreeRoot.data.ParentTree.add(key, []);
+ return key;
+ },
+
+ endMarkings() {
+ const structTreeRoot = this._root.data.StructTreeRoot;
+ if (structTreeRoot) {
+ structTreeRoot.end();
+ this.structChildren.forEach((structElem) => structElem.end());
+ }
+ if (this._root.data.MarkInfo) {
+ this._root.data.MarkInfo.end();
+ }
+ }
+};
diff --git a/packages/pdfkit/src/mixins/metadata.js b/packages/pdfkit/src/mixins/metadata.js
new file mode 100644
index 000000000..2af6876f6
--- /dev/null
+++ b/packages/pdfkit/src/mixins/metadata.js
@@ -0,0 +1,101 @@
+import PDFMetadata from '../metadata';
+
+export default {
+ initMetadata() {
+ this.metadata = new PDFMetadata();
+ },
+
+ appendXML(xml, newline = true) {
+ this.metadata.append(xml, newline);
+ },
+
+ _addInfo() {
+ this.appendXML(`
+
+ ${this.info.CreationDate.toISOString().split('.')[0] + 'Z'}
+ ${this.info.Creator}
+
+ `);
+
+ if (this.info.Title || this.info.Author || this.info.Subject) {
+ this.appendXML(`
+
+ `);
+
+ if (this.info.Title) {
+ this.appendXML(`
+
+
+ ${this.info.Title}
+
+
+ `);
+ }
+
+ if (this.info.Author) {
+ this.appendXML(`
+
+
+ ${this.info.Author}
+
+
+ `);
+ }
+
+ if (this.info.Subject) {
+ this.appendXML(`
+
+
+ ${this.info.Subject}
+
+
+ `);
+ }
+
+ this.appendXML(`
+
+ `);
+ }
+
+ this.appendXML(
+ `
+
+ ${this.info.Creator} `,
+ false
+ );
+
+ if (this.info.Keywords) {
+ this.appendXML(
+ `
+ ${this.info.Keywords} `,
+ false
+ );
+ }
+
+ this.appendXML(`
+
+ `);
+ },
+
+ endMetadata() {
+ this._addInfo();
+
+ this.metadata.end();
+
+ /*
+ Metadata was introduced in PDF 1.4, so adding it to 1.3
+ will likely only take up more space.
+ */
+ if (this.version != 1.3) {
+ this.metadataRef = this.ref({
+ length: this.metadata.getLength(),
+ Type: 'Metadata',
+ Subtype: 'XML'
+ });
+ this.metadataRef.compress = false;
+ this.metadataRef.write(Buffer.from(this.metadata.getXML(), 'utf-8'));
+ this.metadataRef.end();
+ this._root.data.Metadata = this.metadataRef;
+ }
+ }
+};
diff --git a/packages/pdfkit/src/mixins/outline.js b/packages/pdfkit/src/mixins/outline.js
index 1473d9049..1da603e40 100644
--- a/packages/pdfkit/src/mixins/outline.js
+++ b/packages/pdfkit/src/mixins/outline.js
@@ -2,14 +2,14 @@ import PDFOutline from '../outline';
export default {
initOutline() {
- this.outline = new PDFOutline(this, null, null, null);
+ return (this.outline = new PDFOutline(this, null, null, null));
},
endOutline() {
this.outline.endOutline();
if (this.outline.children.length > 0) {
this._root.data.Outlines = this.outline.dictionary;
- this._root.data.PageMode = this._root.data.PageMode || 'UseOutlines';
+ return (this._root.data.PageMode = 'UseOutlines');
}
}
};
diff --git a/packages/pdfkit/src/mixins/text.js b/packages/pdfkit/src/mixins/text.js
index 4def10dd6..c04a501da 100644
--- a/packages/pdfkit/src/mixins/text.js
+++ b/packages/pdfkit/src/mixins/text.js
@@ -58,7 +58,10 @@ export default {
x = null;
}
- // clone options object
+ // shallow clone options object
+ /**
+ * @type {Object}
+ */
const result = Object.assign({}, options);
// extend options with previous values for continued text
@@ -152,7 +155,7 @@ export default {
}
// Adds a segment of text to the TJ command buffer
- const addSegment = cur => {
+ const addSegment = (cur) => {
if (last < cur) {
const hex = encoded.slice(last, cur).join('');
const advance =
@@ -164,7 +167,7 @@ export default {
};
// Flushes the current TJ commands to the output stream
- const flush = i => {
+ const flush = (i) => {
addSegment(i);
if (commands.length > 0) {
diff --git a/packages/pdfkit/src/mixins/vector.js b/packages/pdfkit/src/mixins/vector.js
index e36d959bc..5f58bbb16 100644
--- a/packages/pdfkit/src/mixins/vector.js
+++ b/packages/pdfkit/src/mixins/vector.js
@@ -61,35 +61,23 @@ export default {
return this.addContent(`${number(m)} M`);
},
- dash(length, options) {
- let phase;
-
- if (options == null) {
- options = {};
- }
-
- if (length == null) {
- return this;
+ dash(length, options = {}) {
+ const originalLength = length;
+ if (!Array.isArray(length)) {
+ length = [length, options.space || length];
}
- if (Array.isArray(length)) {
- length = Array.from(length)
- .map(v => PDFObject.number(v))
- .join(' ');
-
- phase = options.phase || 0;
-
- return this.addContent(`[${length}] ${PDFObject.number(phase)} d`);
+ const valid = length.every((x) => Number.isFinite(x) && x > 0);
+ if (!valid) {
+ throw new Error(
+ `dash(${JSON.stringify(originalLength)}, ${JSON.stringify(
+ options
+ )}) invalid, lengths must be numeric and greater than zero`
+ );
}
- const space = options.space != null ? options.space : length;
- phase = options.phase || 0;
-
- return this.addContent(
- `[${PDFObject.number(length)} ${PDFObject.number(
- space
- )}] ${PDFObject.number(phase)} d`
- );
+ length = length.map(number).join(' ');
+ return this.addContent(`[${length}] ${number(options.phase || 0)} d`);
},
undash() {
@@ -205,11 +193,7 @@ export default {
// calculate and render segments
this.moveTo(ax, ay);
- for (
- let segIdx = 0, end = numSegs, asc = 0 <= end;
- asc ? segIdx < end : segIdx > end;
- asc ? segIdx++ : segIdx--
- ) {
+ for (let segIdx = 0; segIdx < numSegs; segIdx++) {
// starting control point
const cp1x = ax + deltaCx;
const cp1y = ay + deltaCy;
@@ -237,9 +221,9 @@ export default {
},
polygon(...points) {
- this.moveTo(...Array.from(points.shift() || []));
- for (let point of Array.from(points)) {
- this.lineTo(...Array.from(point || []));
+ this.moveTo(...(points.shift() || []));
+ for (let point of points) {
+ this.lineTo(...(point || []));
}
return this.closePath();
},
@@ -305,8 +289,19 @@ export default {
transform(m11, m12, m21, m22, dx, dy) {
// keep track of the current transformation matrix
+ if (
+ m11 === 1 &&
+ m12 === 0 &&
+ m21 === 0 &&
+ m22 === 1 &&
+ dx === 0 &&
+ dy === 0
+ ) {
+ // Ignore identity transforms
+ return this;
+ }
const m = this._ctm;
- const [m0, m1, m2, m3, m4, m5] = Array.from(m);
+ const [m0, m1, m2, m3, m4, m5] = m;
m[0] = m0 * m11 + m2 * m12;
m[1] = m1 * m11 + m3 * m12;
m[2] = m0 * m21 + m2 * m22;
@@ -314,9 +309,7 @@ export default {
m[4] = m0 * dx + m2 * dy + m4;
m[5] = m1 * dx + m3 * dy + m5;
- const values = [m11, m12, m21, m22, dx, dy]
- .map(v => PDFObject.number(v))
- .join(' ');
+ const values = [m11, m12, m21, m22, dx, dy].map((v) => number(v)).join(' ');
return this.addContent(`${values} cm`);
},
@@ -325,15 +318,14 @@ export default {
},
rotate(angle, options = {}) {
+ let y;
const rad = (angle * Math.PI) / 180;
const cos = Math.cos(rad);
const sin = Math.sin(rad);
-
- let x = 0;
- let y = 0;
+ let x = (y = 0);
if (options.origin != null) {
- [x, y] = Array.from(options.origin);
+ [x, y] = options.origin;
const x1 = x * cos - y * sin;
const y1 = x * sin + y * cos;
x -= x1;
@@ -344,6 +336,7 @@ export default {
},
scale(xFactor, yFactor, options = {}) {
+ let y;
if (yFactor == null) {
yFactor = xFactor;
}
@@ -352,35 +345,13 @@ export default {
yFactor = xFactor;
}
- let x = 0;
- let y = 0;
-
+ let x = (y = 0);
if (options.origin != null) {
- [x, y] = Array.from(options.origin);
+ [x, y] = options.origin;
x -= xFactor * x;
y -= yFactor * y;
}
return this.transform(xFactor, 0, 0, yFactor, x, y);
- },
-
- skew(xAngle = 0, yAngle = 0, options) {
- const radx = (xAngle * Math.PI) / 180;
- const rady = (yAngle * Math.PI) / 180;
- const tanx = Math.tan(radx);
- const tany = Math.tan(rady);
-
- let x = 0;
- let y = 0;
-
- if (options.origin != null) {
- [x, y] = Array.from(options.origin);
- const x1 = x + tanx * y;
- const y1 = y + tany * x;
- x -= x1;
- y -= y1;
- }
-
- return this.transform(1, tany, tanx, 1, x, y);
}
};
diff --git a/packages/pdfkit/src/object.js b/packages/pdfkit/src/object.js
index 895edba70..b142c3218 100644
--- a/packages/pdfkit/src/object.js
+++ b/packages/pdfkit/src/object.js
@@ -16,7 +16,7 @@ const escapable = {
const pad = (str, length) => (Array(length + 1).join('0') + str).slice(-length);
// Convert little endian UTF-16 to big endian
-const swapBytes = function(buff) {
+const swapBytes = function (buff) {
const l = buff.length;
if (l & 0x01) {
throw new Error('Buffer length must be even');
@@ -58,7 +58,7 @@ class PDFObject {
}
// Escape characters as required by the spec
- string = string.replace(escapableRe, c => escapable[c]);
+ string = string.replace(escapableRe, (c) => escapable[c]);
return `(${string})`;
@@ -87,7 +87,7 @@ class PDFObject {
if (Array.isArray(object)) {
const items = Array.from(object)
- .map(e => PDFObject.convert(e))
+ .map((e) => PDFObject.convert(e))
.join(' ');
return `[${items}]`;
}
diff --git a/packages/pdfkit/src/outline.js b/packages/pdfkit/src/outline.js
index a38098421..8dc709d21 100644
--- a/packages/pdfkit/src/outline.js
+++ b/packages/pdfkit/src/outline.js
@@ -1,55 +1,31 @@
-const DEFAULT_OPTIONS = {
- top: 0,
- left: 0,
- zoom: 0,
- fit: false,
- pageNumber: null,
- expanded: false
-};
-
class PDFOutline {
- constructor(document, parent, title, dest, options = DEFAULT_OPTIONS) {
+ constructor(document, parent, title, dest, options = { expanded: false }) {
this.document = document;
this.options = options;
this.outlineData = {};
if (dest !== null) {
- const destWidth = dest.data.MediaBox[2];
- const destHeight = dest.data.MediaBox[3];
- const top = destHeight - (options.top || 0);
- const left = destWidth - (options.left || 0);
- const zoom = options.zoom || 0;
-
- this.outlineData.Dest = options.fit
- ? [dest, 'Fit']
- : [dest, 'XYZ', left, top, zoom];
+ this.outlineData['Dest'] = [dest.dictionary, 'Fit'];
}
if (parent !== null) {
- this.outlineData.Parent = parent;
+ this.outlineData['Parent'] = parent;
}
if (title !== null) {
- this.outlineData.Title = new String(title);
+ this.outlineData['Title'] = new String(title);
}
this.dictionary = this.document.ref(this.outlineData);
this.children = [];
}
- addItem(title, options = DEFAULT_OPTIONS) {
- const pages = this.document._root.data.Pages.data.Kids;
-
- const dest =
- options.pageNumber !== null
- ? pages[options.pageNumber]
- : this.document.page.dictionary;
-
+ addItem(title, options = { expanded: false }) {
const result = new PDFOutline(
this.document,
this.dictionary,
title,
- dest,
+ this.document.page,
options
);
this.children.push(result);
@@ -63,8 +39,8 @@ class PDFOutline {
this.outlineData.Count = this.children.length;
}
- const first = this.children[0];
- const last = this.children[this.children.length - 1];
+ const first = this.children[0],
+ last = this.children[this.children.length - 1];
this.outlineData.First = first.dictionary;
this.outlineData.Last = last.dictionary;
diff --git a/packages/pdfkit/src/page.js b/packages/pdfkit/src/page.js
index 8f7352164..1fea01235 100644
--- a/packages/pdfkit/src/page.js
+++ b/packages/pdfkit/src/page.js
@@ -1,8 +1,13 @@
+/*
+PDFPage - represents a single page in the PDF document
+By Devon Govett
+*/
+
const DEFAULT_MARGINS = {
- top: 0,
- left: 0,
- bottom: 0,
- right: 0
+ top: 72,
+ left: 72,
+ bottom: 72,
+ right: 72
};
const SIZES = {
@@ -64,7 +69,20 @@ class PDFPage {
this.size = options.size || 'letter';
this.layout = options.layout || 'portrait';
this.userUnit = options.userUnit || 1.0;
- this.margins = DEFAULT_MARGINS;
+
+ // process margins
+ if (typeof options.margin === 'number') {
+ this.margins = {
+ top: options.margin,
+ left: options.margin,
+ bottom: options.margin,
+ right: options.margin
+ };
+
+ // default to 1 inch margins
+ } else {
+ this.margins = options.margins || DEFAULT_MARGINS;
+ }
// calculate page dimensions
const dimensions = Array.isArray(this.size)
@@ -89,6 +107,8 @@ class PDFPage {
Resources: this.resources,
UserUnit: this.userUnit
});
+
+ this.markings = [];
}
// Lazily create these objects
@@ -130,7 +150,7 @@ class PDFPage {
}
maxY() {
- return this.height;
+ return this.height - this.margins.bottom;
}
write(chunk) {
diff --git a/packages/pdfkit/src/path.js b/packages/pdfkit/src/path.js
index 464a685b4..c92751274 100644
--- a/packages/pdfkit/src/path.js
+++ b/packages/pdfkit/src/path.js
@@ -1,11 +1,26 @@
/* eslint-disable no-lonely-if */
-let cx, cy, px, py, sx, sy;
+let cx;
+let cy;
+let px;
+let py;
+let sx;
+let sy;
cx = cy = px = py = sx = sy = 0;
// parseDataPath copy pasted from svgo
// https://github.com/svg/svgo/blob/e4918ccdd1a2b5831defe0f00c1286744b479448/lib/path.js
+/**
+ * @typedef {'M' | 'm' | 'Z' | 'z' | 'L' | 'l' | 'H' | 'h' | 'V' | 'v' | 'C' | 'c' | 'S' | 's' | 'Q' | 'q' | 'T' | 't' | 'A' | 'a'} PathDataCommand
+ */
+
+/**
+ * @typedef {Object} PathDataItem
+ * @property {PathDataCommand} command
+ * @property {number[]} args
+ */
+
const argsCountPerCommand = {
M: 2,
m: 2,
@@ -32,27 +47,27 @@ const argsCountPerCommand = {
/**
* @type {(c: string) => c is PathDataCommand}
*/
-const isCommand = c => {
+const isCommand = (c) => {
return c in argsCountPerCommand;
};
/**
* @type {(c: string) => boolean}
*/
-const isWsp = c => {
+const isWsp = (c) => {
const codePoint = c.codePointAt(0);
return (
- (codePoint === 0x20 ||
+ codePoint === 0x20 ||
codePoint === 0x9 ||
codePoint === 0xd ||
- codePoint === 0xa)
+ codePoint === 0xa
);
};
/**
* @type {(c: string) => boolean}
*/
-const isDigit = c => {
+const isDigit = (c) => {
const codePoint = c.codePointAt(0);
if (codePoint == null) {
return false;
@@ -125,16 +140,15 @@ const readNumber = (string, cursor) => {
const number = Number.parseFloat(value);
if (Number.isNaN(number)) {
return [cursor, null];
- } else {
- // step back to delegate iteration to parent loop
- return [i - 1, number];
}
+ // step back to delegate iteration to parent loop
+ return [i - 1, number];
};
/**
* @type {(string: string) => Array}
*/
-const parsePathData = string => {
+const parsePathData = (string) => {
/**
* @type {Array}
*/
@@ -238,7 +252,7 @@ const parsePathData = string => {
return pathData;
};
-const apply = function(commands, doc) {
+const apply = function (commands, doc) {
// current point, control point, and subpath starting point
cx = cy = px = py = sx = sy = 0;
@@ -437,7 +451,7 @@ const runners = {
}
};
-const solveArc = function(doc, x, y, coords) {
+const solveArc = function (doc, x, y, coords) {
const [rx, ry, rot, large, sweep, ex, ey] = coords;
const segs = arcToSegments(ex, ey, rx, ry, large, sweep, rot, x, y);
@@ -448,7 +462,7 @@ const solveArc = function(doc, x, y, coords) {
};
// from Inkscape svgtopdf, thanks!
-const arcToSegments = function(x, y, rx, ry, large, sweep, rotateX, ox, oy) {
+const arcToSegments = function (x, y, rx, ry, large, sweep, rotateX, ox, oy) {
const th = rotateX * (Math.PI / 180);
const sin_th = Math.sin(th);
const cos_th = Math.cos(th);
@@ -507,7 +521,7 @@ const arcToSegments = function(x, y, rx, ry, large, sweep, rotateX, ox, oy) {
return result;
};
-const segmentToBezier = function(cx, cy, th0, th1, rx, ry, sin_th, cos_th) {
+const segmentToBezier = function (cx, cy, th0, th1, rx, ry, sin_th, cos_th) {
const a00 = cos_th * rx;
const a01 = -sin_th * ry;
const a10 = sin_th * rx;
diff --git a/packages/pdfkit/src/pattern.js b/packages/pdfkit/src/pattern.js
new file mode 100644
index 000000000..a7329f6b0
--- /dev/null
+++ b/packages/pdfkit/src/pattern.js
@@ -0,0 +1,101 @@
+/*
+PDF tiling pattern support. Uncolored only.
+ */
+
+const underlyingColorSpaces = ['DeviceCMYK', 'DeviceRGB'];
+
+class PDFTilingPattern {
+ constructor(doc, bBox, xStep, yStep, stream) {
+ this.doc = doc;
+ this.bBox = bBox;
+ this.xStep = xStep;
+ this.yStep = yStep;
+ this.stream = stream;
+ }
+
+ createPattern() {
+ // no resources needed for our current usage
+ // required entry
+ const resources = this.doc.ref();
+ resources.end();
+ // apply default transform matrix (flipped in the default doc._ctm)
+ // see document.js & gradient.js
+ const [m0, m1, m2, m3, m4, m5] = this.doc._ctm;
+ const [m11, m12, m21, m22, dx, dy] = [1, 0, 0, 1, 0, 0];
+ const m = [
+ m0 * m11 + m2 * m12,
+ m1 * m11 + m3 * m12,
+ m0 * m21 + m2 * m22,
+ m1 * m21 + m3 * m22,
+ m0 * dx + m2 * dy + m4,
+ m1 * dx + m3 * dy + m5
+ ];
+ const pattern = this.doc.ref({
+ Type: 'Pattern',
+ PatternType: 1, // tiling
+ PaintType: 2, // 1-colored, 2-uncolored
+ TilingType: 2, // 2-no distortion
+ BBox: this.bBox,
+ XStep: this.xStep,
+ YStep: this.yStep,
+ Matrix: m.map((v) => +v.toFixed(5)),
+ Resources: resources
+ });
+ pattern.end(this.stream);
+ return pattern;
+ }
+
+ embedPatternColorSpaces() {
+ // map each pattern to an underlying color space
+ // and embed on each page
+ underlyingColorSpaces.forEach((csName) => {
+ const csId = this.getPatternColorSpaceId(csName);
+
+ if (this.doc.page.colorSpaces[csId]) return;
+ const cs = this.doc.ref(['Pattern', csName]);
+ cs.end();
+ this.doc.page.colorSpaces[csId] = cs;
+ });
+ }
+
+ getPatternColorSpaceId(underlyingColorspace) {
+ return `CsP${underlyingColorspace}`;
+ }
+
+ embed() {
+ if (!this.id) {
+ this.doc._patternCount = this.doc._patternCount + 1;
+ this.id = 'P' + this.doc._patternCount;
+ this.pattern = this.createPattern();
+ }
+
+ // patterns are embedded in each page
+ if (!this.doc.page.patterns[this.id]) {
+ this.doc.page.patterns[this.id] = this.pattern;
+ }
+ }
+
+ apply(stroke, patternColor) {
+ // do any embedding/creating that might be needed
+ this.embedPatternColorSpaces();
+ this.embed();
+
+ const normalizedColor = this.doc._normalizeColor(patternColor);
+ if (!normalizedColor)
+ throw Error(`invalid pattern color. (value: ${patternColor})`);
+
+ // select one of the pattern color spaces
+ const csId = this.getPatternColorSpaceId(
+ this.doc._getColorSpace(normalizedColor)
+ );
+ this.doc._setColorSpace(csId, stroke);
+
+ // stroke/fill using the pattern and color (in the above underlying color space)
+ const op = stroke ? 'SCN' : 'scn';
+ return this.doc.addContent(
+ `${normalizedColor.join(' ')} /${this.id} ${op}`
+ );
+ }
+}
+
+export default { PDFTilingPattern };
diff --git a/packages/pdfkit/src/reference.js b/packages/pdfkit/src/reference.js
index 7b6080dbb..b5b4533d4 100644
--- a/packages/pdfkit/src/reference.js
+++ b/packages/pdfkit/src/reference.js
@@ -25,7 +25,7 @@ class PDFReference extends stream.Writable {
this.data.Filter = 'FlateDecode';
this.deflate = zlib.createDeflate();
- this.deflate.on('data', chunk => {
+ this.deflate.on('data', (chunk) => {
this.chunks.push(chunk);
return (this.data.Length += chunk.length);
});
diff --git a/packages/pdfkit/src/security.js b/packages/pdfkit/src/security.js
index d73ca31bd..957520f4c 100644
--- a/packages/pdfkit/src/security.js
+++ b/packages/pdfkit/src/security.js
@@ -5,9 +5,11 @@
By Yang Liu
*/
-import MD5 from 'crypto-js/md5';
+// This file is ran directly with Node - needs to have .js extension
+// eslint-disable-next-line import/extensions
+import MD5 from 'crypto-js/md5.js';
-const wordArrayToBuffer = wordArray => {
+const wordArrayToBuffer = (wordArray) => {
const byteArray = [];
for (let i = 0; i < wordArray.sigBytes; i++) {
diff --git a/packages/pdfkit/src/structure_content.js b/packages/pdfkit/src/structure_content.js
new file mode 100644
index 000000000..250ebff27
--- /dev/null
+++ b/packages/pdfkit/src/structure_content.js
@@ -0,0 +1,16 @@
+/*
+PDFStructureContent - a reference to a marked structure content
+By Ben Schmidt
+*/
+
+class PDFStructureContent {
+ constructor(pageRef, mcid) {
+ this.refs = [{ pageRef, mcid }];
+ }
+
+ push(structContent) {
+ structContent.refs.forEach((ref) => this.refs.push(ref));
+ }
+}
+
+export default PDFStructureContent;
diff --git a/packages/pdfkit/src/structure_element.js b/packages/pdfkit/src/structure_element.js
new file mode 100644
index 000000000..cebbdbdc2
--- /dev/null
+++ b/packages/pdfkit/src/structure_element.js
@@ -0,0 +1,215 @@
+/*
+PDFStructureElement - represents an element in the PDF logical structure tree
+By Ben Schmidt
+*/
+
+import PDFStructureContent from './structure_content';
+
+class PDFStructureElement {
+ constructor(document, type, options = {}, children = null) {
+ this.document = document;
+
+ this._attached = false;
+ this._ended = false;
+ this._flushed = false;
+ this.dictionary = document.ref({
+ // Type: "StructElem",
+ S: type
+ });
+
+ const data = this.dictionary.data;
+
+ if (Array.isArray(options) || this._isValidChild(options)) {
+ children = options;
+ options = {};
+ }
+
+ if (typeof options.title !== 'undefined') {
+ data.T = new String(options.title);
+ }
+ if (typeof options.lang !== 'undefined') {
+ data.Lang = new String(options.lang);
+ }
+ if (typeof options.alt !== 'undefined') {
+ data.Alt = new String(options.alt);
+ }
+ if (typeof options.expanded !== 'undefined') {
+ data.E = new String(options.expanded);
+ }
+ if (typeof options.actual !== 'undefined') {
+ data.ActualText = new String(options.actual);
+ }
+
+ this._children = [];
+
+ if (children) {
+ if (!Array.isArray(children)) {
+ children = [children];
+ }
+ children.forEach((child) => this.add(child));
+ this.end();
+ }
+ }
+
+ add(child) {
+ if (this._ended) {
+ throw new Error(`Cannot add child to already-ended structure element`);
+ }
+
+ if (!this._isValidChild(child)) {
+ throw new Error(`Invalid structure element child`);
+ }
+
+ if (child instanceof PDFStructureElement) {
+ child.setParent(this.dictionary);
+ if (this._attached) {
+ child.setAttached();
+ }
+ }
+
+ if (child instanceof PDFStructureContent) {
+ this._addContentToParentTree(child);
+ }
+
+ if (typeof child === 'function' && this._attached) {
+ // _contentForClosure() adds the content to the parent tree
+ child = this._contentForClosure(child);
+ }
+
+ this._children.push(child);
+
+ return this;
+ }
+
+ _addContentToParentTree(content) {
+ content.refs.forEach(({ pageRef, mcid }) => {
+ const pageStructParents = this.document
+ .getStructParentTree()
+ .get(pageRef.data.StructParents);
+ pageStructParents[mcid] = this.dictionary;
+ });
+ }
+
+ setParent(parentRef) {
+ if (this.dictionary.data.P) {
+ throw new Error(`Structure element added to more than one parent`);
+ }
+
+ this.dictionary.data.P = parentRef;
+
+ this._flush();
+ }
+
+ setAttached() {
+ if (this._attached) {
+ return;
+ }
+
+ this._children.forEach((child, index) => {
+ if (child instanceof PDFStructureElement) {
+ child.setAttached();
+ }
+ if (typeof child === 'function') {
+ this._children[index] = this._contentForClosure(child);
+ }
+ });
+
+ this._attached = true;
+
+ this._flush();
+ }
+
+ end() {
+ if (this._ended) {
+ return;
+ }
+
+ this._children
+ .filter((child) => child instanceof PDFStructureElement)
+ .forEach((child) => child.end());
+
+ this._ended = true;
+
+ this._flush();
+ }
+
+ _isValidChild(child) {
+ return (
+ child instanceof PDFStructureElement ||
+ child instanceof PDFStructureContent ||
+ typeof child === 'function'
+ );
+ }
+
+ _contentForClosure(closure) {
+ const content = this.document.markStructureContent(this.dictionary.data.S);
+ closure();
+ this.document.endMarkedContent();
+
+ this._addContentToParentTree(content);
+
+ return content;
+ }
+
+ _isFlushable() {
+ if (!this.dictionary.data.P || !this._ended) {
+ return false;
+ }
+
+ return this._children.every((child) => {
+ if (typeof child === 'function') {
+ return false;
+ }
+ if (child instanceof PDFStructureElement) {
+ return child._isFlushable();
+ }
+ return true;
+ });
+ }
+
+ _flush() {
+ if (this._flushed || !this._isFlushable()) {
+ return;
+ }
+
+ this.dictionary.data.K = [];
+
+ this._children.forEach((child) => this._flushChild(child));
+
+ this.dictionary.end();
+
+ // free memory used by children; the dictionary itself may still be
+ // referenced by a parent structure element or root, but we can
+ // at least trim the tree here
+ this._children = [];
+ this.dictionary.data.K = null;
+
+ this._flushed = true;
+ }
+
+ _flushChild(child) {
+ if (child instanceof PDFStructureElement) {
+ this.dictionary.data.K.push(child.dictionary);
+ }
+
+ if (child instanceof PDFStructureContent) {
+ child.refs.forEach(({ pageRef, mcid }) => {
+ if (!this.dictionary.data.Pg) {
+ this.dictionary.data.Pg = pageRef;
+ }
+
+ if (this.dictionary.data.Pg === pageRef) {
+ this.dictionary.data.K.push(mcid);
+ } else {
+ this.dictionary.data.K.push({
+ Type: 'MCR',
+ Pg: pageRef,
+ MCID: mcid
+ });
+ }
+ });
+ }
+ }
+}
+
+export default PDFStructureElement;
diff --git a/packages/pdfkit/src/tree.js b/packages/pdfkit/src/tree.js
index e64aa68f7..c84675b35 100644
--- a/packages/pdfkit/src/tree.js
+++ b/packages/pdfkit/src/tree.js
@@ -27,19 +27,13 @@ class PDFTree {
const out = ['<<'];
if (this.limits && sortedKeys.length > 1) {
- const first = sortedKeys[0];
- const last = sortedKeys[sortedKeys.length - 1];
-
+ const first = sortedKeys[0],
+ last = sortedKeys[sortedKeys.length - 1];
out.push(
- ` /Limits ${PDFObject.convert([
- this._dataForKey(first),
- this._dataForKey(last)
- ])}`
+ ` /Limits ${PDFObject.convert([this._dataForKey(first), this._dataForKey(last)])}`
);
}
-
out.push(` /${this._keysName()} [`);
-
for (let key of sortedKeys) {
out.push(
` ${PDFObject.convert(this._dataForKey(key))} ${PDFObject.convert(
@@ -47,13 +41,12 @@ class PDFTree {
)}`
);
}
-
out.push(']');
out.push('>>');
return out.join('\n');
}
- _compareKeys() {
+ _compareKeys(/*a, b*/) {
throw new Error('Must be implemented by subclasses');
}
@@ -61,7 +54,7 @@ class PDFTree {
throw new Error('Must be implemented by subclasses');
}
- _dataForKey() {
+ _dataForKey(/*k*/) {
throw new Error('Must be implemented by subclasses');
}
}
diff --git a/packages/pdfkit/src/utils/capitalize.js b/packages/pdfkit/src/utils/capitalize.js
index 5ec193f23..7172d9041 100644
--- a/packages/pdfkit/src/utils/capitalize.js
+++ b/packages/pdfkit/src/utils/capitalize.js
@@ -1,3 +1,3 @@
-const capitalize = v => v[0].toUpperCase() + v.slice(1);
+const capitalize = (v) => v[0].toUpperCase() + v.slice(1);
export default capitalize;
diff --git a/packages/png-js/.eslintrc.js b/packages/png-js/.eslintrc.js
deleted file mode 100644
index 62e8226a9..000000000
--- a/packages/png-js/.eslintrc.js
+++ /dev/null
@@ -1,22 +0,0 @@
-module.exports = {
- extends: ['../../.eslintrc.js'],
- rules: {
- yoda: 0,
- 'no-var': 0,
- 'func-names': 0,
- 'no-bitwise': 0,
- 'no-plusplus': 0,
- 'vars-on-top': 0,
- 'no-loop-func': 0,
- 'default-case': 0,
- 'prefer-spread': 0,
- 'no-cond-assign': 0,
- 'no-multi-assign': 0,
- 'no-param-reassign': 0,
- 'no-nested-ternary': 0,
- 'consistent-return': 0,
- 'prefer-destructuring': 0,
- 'no-buffer-constructor': 1,
- 'no-constant-condition': 0,
- },
-};
diff --git a/packages/png-js/.eslintrc.json b/packages/png-js/.eslintrc.json
new file mode 100644
index 000000000..aab3c80bd
--- /dev/null
+++ b/packages/png-js/.eslintrc.json
@@ -0,0 +1,22 @@
+{
+ "extends": ["../../.eslintrc.json"],
+ "rules": {
+ "yoda": 0,
+ "no-var": 0,
+ "func-names": 0,
+ "no-bitwise": 0,
+ "no-plusplus": 0,
+ "vars-on-top": 0,
+ "no-loop-func": 0,
+ "default-case": 0,
+ "prefer-spread": 0,
+ "no-cond-assign": 0,
+ "no-multi-assign": 0,
+ "no-param-reassign": 0,
+ "no-nested-ternary": 0,
+ "consistent-return": 0,
+ "prefer-destructuring": 0,
+ "no-buffer-constructor": 1,
+ "no-constant-condition": 0
+ }
+}
diff --git a/packages/png-js/CHANGELOG.md b/packages/png-js/CHANGELOG.md
index 4c9d51954..6a2e32c1b 100644
--- a/packages/png-js/CHANGELOG.md
+++ b/packages/png-js/CHANGELOG.md
@@ -1,5 +1,17 @@
# @react-pdf/png-js
+## 2.3.1
+
+### Patch Changes
+
+- [#2605](https://github.com/diegomura/react-pdf/pull/2605) [`f7505ed`](https://github.com/diegomura/react-pdf/commit/f7505ed453a1a0ae960d0e5e4a1d155803861b71) Thanks [@wojtekmaj](https://github.com/wojtekmaj)! - fix: fix CJS compatibility
+
+## 2.3.0
+
+### Minor Changes
+
+- [#2409](https://github.com/diegomura/react-pdf/pull/2409) [`b6a14fd`](https://github.com/diegomura/react-pdf/commit/b6a14fd160fab26a49f798e5294b0e361e67fe37) Thanks [@wojtekmaj](https://github.com/wojtekmaj)! - Add support for native ESM
+
## 2.2.0
### Minor Changes
diff --git a/packages/png-js/README.md b/packages/png-js/README.md
index 1779c2ed5..6f38329dc 100644
--- a/packages/png-js/README.md
+++ b/packages/png-js/README.md
@@ -16,6 +16,7 @@ This project is a fork of [png.js](https://github.com/foliojs/png.js) by @devong
- Build node and browser specific bundles
- Uses rollup for build
+
## Browser Usage
Simply include png.js and zlib.js on your HTML page, create a canvas element, and call PNG.load to load an image.
@@ -43,7 +44,7 @@ Require the module and decode a PNG
// pixels is a 1d array (in rgba order) of decoded pixel data
});
-You can also call `PNG.load` if you want to load the PNG (but not decode the pixels) synchronously. If you already
-have the PNG data in a buffer, simply use `new PNG(buffer)`. In both of these cases, you need to call `png.decode`
-yourself which passes your callback the decoded pixels as a buffer. If you already have a buffer you want the pixels
+You can also call `PNG.load` if you want to load the PNG (but not decode the pixels) synchronously. If you already
+have the PNG data in a buffer, simply use `new PNG(buffer)`. In both of these cases, you need to call `png.decode`
+yourself which passes your callback the decoded pixels as a buffer. If you already have a buffer you want the pixels
copied to, call `copyToImageData` with your buffer and the decoded pixels as returned from `decodePixels`.
diff --git a/packages/png-js/babel.config.js b/packages/png-js/babel.config.js
index 27f83582f..02d1cbbdb 100644
--- a/packages/png-js/babel.config.js
+++ b/packages/png-js/babel.config.js
@@ -1 +1 @@
-module.exports = { extends: '../../babel.config.js' };
+export default { extends: '../../babel.config.js' };
diff --git a/packages/png-js/package.json b/packages/png-js/package.json
index 79939b2e0..11d4cf6d9 100644
--- a/packages/png-js/package.json
+++ b/packages/png-js/package.json
@@ -1,13 +1,21 @@
{
"name": "@react-pdf/png-js",
"description": "A PNG decoder in JS",
- "version": "2.2.0",
+ "version": "2.3.1",
"license": "MIT",
- "main": "./lib/png-js.cjs.js",
- "module": "./lib/png-js.es.js",
+ "type": "module",
+ "main": "./lib/png-js.cjs",
+ "module": "./lib/png-js.js",
"browser": {
- "./lib/png-js.es.js": "./lib/png-js.browser.es.js",
- "./lib/png-js.cjs.js": "./lib/png-js.browser.cjs.js"
+ "./lib/png-js.js": "./lib/png-js.browser.js",
+ "./lib/png-js.cjs": "./lib/png-js.browser.cjs"
+ },
+ "exports": {
+ ".": {
+ "import": "./lib/png-js.js",
+ "require": "./lib/png-js.cjs",
+ "default": "./lib/png-js.js"
+ }
},
"repository": {
"type": "git",
diff --git a/packages/png-js/rollup.config.js b/packages/png-js/rollup.config.js
index 8249a14d8..97c4f5153 100644
--- a/packages/png-js/rollup.config.js
+++ b/packages/png-js/rollup.config.js
@@ -4,20 +4,22 @@ import ignore from 'rollup-plugin-ignore';
import alias from '@rollup/plugin-alias';
import nodePolyfills from 'rollup-plugin-polyfill-node';
import nodeResolve from '@rollup/plugin-node-resolve';
-import pkg from './package.json';
import commonjs from '@rollup/plugin-commonjs';
+import pkg from './package.json' assert { type: 'json' };
+
const cjs = {
exports: 'named',
format: 'cjs',
+ interop: 'compat',
};
const esm = {
format: 'es',
};
-const getCJS = override => Object.assign({}, cjs, override);
-const getESM = override => Object.assign({}, esm, override);
+const getCJS = (override) => Object.assign({}, cjs, override);
+const getESM = (override) => Object.assign({}, esm, override);
const input = 'src/index.js';
@@ -27,12 +29,14 @@ const babelConfig = () => ({
exclude: 'node_modules/**',
});
-const getExternal = ({ browser }) => [
- ...(browser ? [] : ['fs']),
- ...Object.keys(pkg.dependencies).filter(
- dep => !browser || 'browserify-zlib' !== dep,
- ),
-];
+const getExternal = ({ browser }) =>
+ browser
+ ? [
+ ...Object.keys(pkg.dependencies).filter(
+ (dep) => dep !== 'browserify-zlib',
+ ),
+ ]
+ : ['fs', ...Object.keys(pkg.dependencies)];
const getPlugins = ({ browser }) => [
...(browser
@@ -60,8 +64,8 @@ const getPlugins = ({ browser }) => [
const serverConfig = {
input,
output: [
- getESM({ file: 'lib/png-js.es.js' }),
- getCJS({ file: 'lib/png-js.cjs.js' }),
+ getESM({ file: 'lib/png-js.js' }),
+ getCJS({ file: 'lib/png-js.cjs' }),
],
external: getExternal({ browser: false }),
plugins: getPlugins({ browser: false }),
@@ -70,8 +74,8 @@ const serverConfig = {
const browserConfig = {
input,
output: [
- getESM({ file: 'lib/png-js.browser.es.js' }),
- getCJS({ file: 'lib/png-js.browser.cjs.js' }),
+ getESM({ file: 'lib/png-js.browser.js' }),
+ getCJS({ file: 'lib/png-js.browser.cjs' }),
],
external: getExternal({ browser: true }),
plugins: getPlugins({ browser: true }),
diff --git a/packages/png-js/src/index.js b/packages/png-js/src/index.js
index d6e19d19c..c58270dd4 100644
--- a/packages/png-js/src/index.js
+++ b/packages/png-js/src/index.js
@@ -6,9 +6,9 @@ class PNG {
if (BROWSER) {
throw new Error('PNG.decode not available in browser build');
} else {
- return fs.readFile(path, function(err, file) {
+ return fs.readFile(path, (err, file) => {
const png = new PNG(file);
- return png.decode(pixels => fn(pixels));
+ return png.decode((pixels) => fn(pixels));
});
}
}
@@ -387,7 +387,7 @@ class PNG {
decode(fn) {
const ret = Buffer.alloc(this.width * this.height * 4);
- return this.decodePixels(pixels => {
+ return this.decodePixels((pixels) => {
this.copyToImageData(ret, pixels);
return fn(ret);
});
diff --git a/packages/primitives/CHANGELOG.md b/packages/primitives/CHANGELOG.md
index d4130f69c..ea1932d16 100644
--- a/packages/primitives/CHANGELOG.md
+++ b/packages/primitives/CHANGELOG.md
@@ -1,5 +1,17 @@
# @react-pdf/primitives
+## 3.1.1
+
+### Patch Changes
+
+- [#2510](https://github.com/diegomura/react-pdf/pull/2510) [`42bbbda`](https://github.com/diegomura/react-pdf/commit/42bbbda48058acd2d36d7a92c812d133608c459e) Thanks [@wojtekmaj](https://github.com/wojtekmaj)! - Fix require @react-pdf/primitives from CJS
+
+## 3.1.0
+
+### Minor Changes
+
+- [#2409](https://github.com/diegomura/react-pdf/pull/2409) [`b6a14fd`](https://github.com/diegomura/react-pdf/commit/b6a14fd160fab26a49f798e5294b0e361e67fe37) Thanks [@wojtekmaj](https://github.com/wojtekmaj)! - Add support for native ESM
+
## 3.0.1
### Patch Changes
diff --git a/packages/primitives/babel.config.js b/packages/primitives/babel.config.js
index 27f83582f..02d1cbbdb 100644
--- a/packages/primitives/babel.config.js
+++ b/packages/primitives/babel.config.js
@@ -1 +1 @@
-module.exports = { extends: '../../babel.config.js' };
+export default { extends: '../../babel.config.js' };
diff --git a/packages/primitives/jest.config.js b/packages/primitives/jest.config.js
index 1a99b7295..40b1faa8e 100644
--- a/packages/primitives/jest.config.js
+++ b/packages/primitives/jest.config.js
@@ -1,3 +1,3 @@
-module.exports = {
+export default {
testRegex: 'tests/.*?(test)\\.js$',
};
diff --git a/packages/primitives/package.json b/packages/primitives/package.json
index 5edf4f0da..b2c95a773 100644
--- a/packages/primitives/package.json
+++ b/packages/primitives/package.json
@@ -1,20 +1,28 @@
{
"name": "@react-pdf/primitives",
- "version": "3.0.1",
+ "version": "3.1.1",
"license": "MIT",
"description": "Define uninitialized elements",
"author": "Diego Muracciole ",
"homepage": "https://github.com/diegomura/react-pdf#readme",
- "main": "./lib/index.js",
+ "type": "module",
+ "main": "./lib/index.cjs",
"module": "./src/index.js",
+ "exports": {
+ ".": {
+ "import": "./src/index.js",
+ "require": "./lib/index.cjs",
+ "default": "./src/index.js"
+ }
+ },
"repository": {
"type": "git",
"url": "https://github.com/diegomura/react-pdf.git",
"directory": "packages/primitives"
},
"scripts": {
- "build": "babel src --out-dir lib",
- "test": "jest"
+ "build": "babel src --out-dir lib && mv lib/index.js lib/index.cjs",
+ "test": "vitest"
},
"files": [
"lib",
diff --git a/packages/primitives/tests/index.test.js b/packages/primitives/tests/index.test.js
index 3d88b90a2..bd772d521 100644
--- a/packages/primitives/tests/index.test.js
+++ b/packages/primitives/tests/index.test.js
@@ -1,4 +1,6 @@
-const primitives = require('../src');
+import { describe, expect, test } from 'vitest';
+
+import * as primitives from '../src';
describe('primitives', () => {
test('should export group', () => {
diff --git a/packages/render/CHANGELOG.md b/packages/render/CHANGELOG.md
index 729242fa1..648fc8c42 100644
--- a/packages/render/CHANGELOG.md
+++ b/packages/render/CHANGELOG.md
@@ -1,5 +1,82 @@
# @react-pdf/render
+## 3.4.3
+
+### Patch Changes
+
+- [#2605](https://github.com/diegomura/react-pdf/pull/2605) [`f7505ed`](https://github.com/diegomura/react-pdf/commit/f7505ed453a1a0ae960d0e5e4a1d155803861b71) Thanks [@wojtekmaj](https://github.com/wojtekmaj)! - fix: fix CJS compatibility
+
+- Updated dependencies [[`f7505ed`](https://github.com/diegomura/react-pdf/commit/f7505ed453a1a0ae960d0e5e4a1d155803861b71)]:
+ - @react-pdf/textkit@4.4.1
+ - @react-pdf/fns@2.2.1
+
+## 3.4.2
+
+### Patch Changes
+
+- Updated dependencies [[`9af07fe`](https://github.com/diegomura/react-pdf/commit/9af07feb59c2fe9c1d8960ac95f6fa6e03d16235), [`8350154`](https://github.com/diegomura/react-pdf/commit/83501541e3a050021e18e112bb472b2dabc142a7)]:
+ - @react-pdf/types@2.4.1
+ - @react-pdf/textkit@4.4.0
+ - @react-pdf/fns@2.2.0
+
+## 3.4.1
+
+### Patch Changes
+
+- [#2544](https://github.com/diegomura/react-pdf/pull/2544) [`b5380a1`](https://github.com/diegomura/react-pdf/commit/b5380a1a0a7397b4111d68ce97b4acb702d34d51) Thanks [@satelllte](https://github.com/satelllte)! - fix: creationDate and modificationDate types
+
+## 3.4.0
+
+### Minor Changes
+
+- [#2539](https://github.com/diegomura/react-pdf/pull/2539) [`fb5273d`](https://github.com/diegomura/react-pdf/commit/fb5273d8d80d919f7b9c214e02d67b79ce23fa19) Thanks [@diegomura](https://github.com/diegomura)! - feat: add creation and modification dates
+
+### Patch Changes
+
+- [#2538](https://github.com/diegomura/react-pdf/pull/2538) [`cfd050c`](https://github.com/diegomura/react-pdf/commit/cfd050c3ae0980f78c4a466565852d81c8254e19) Thanks [@wojtekmaj](https://github.com/wojtekmaj)! - Fix strokeDasharray crash
+
+- Updated dependencies [[`fb5273d`](https://github.com/diegomura/react-pdf/commit/fb5273d8d80d919f7b9c214e02d67b79ce23fa19)]:
+ - @react-pdf/types@2.4.0
+
+## 3.3.2
+
+### Patch Changes
+
+- Updated dependencies [[`9e5842b`](https://github.com/diegomura/react-pdf/commit/9e5842bbecca6e249af2c5fc50078bb7ddd5420f)]:
+ - @react-pdf/types@2.3.6
+
+## 3.3.1
+
+### Patch Changes
+
+- Updated dependencies [[`42bbbda`](https://github.com/diegomura/react-pdf/commit/42bbbda48058acd2d36d7a92c812d133608c459e)]:
+ - @react-pdf/primitives@3.1.1
+
+## 3.3.0
+
+### Minor Changes
+
+- [#2409](https://github.com/diegomura/react-pdf/pull/2409) [`b6a14fd`](https://github.com/diegomura/react-pdf/commit/b6a14fd160fab26a49f798e5294b0e361e67fe37) Thanks [@wojtekmaj](https://github.com/wojtekmaj)! - Add support for native ESM
+
+### Patch Changes
+
+- [#2498](https://github.com/diegomura/react-pdf/pull/2498) [`6bfe7e8`](https://github.com/diegomura/react-pdf/commit/6bfe7e8a30d96c04a1552800159992705f3605b1) Thanks [@diegomura](https://github.com/diegomura)! - fix: color parse error
+
+- Updated dependencies [[`b6a14fd`](https://github.com/diegomura/react-pdf/commit/b6a14fd160fab26a49f798e5294b0e361e67fe37)]:
+ - @react-pdf/primitives@3.1.0
+ - @react-pdf/textkit@4.3.0
+ - @react-pdf/fns@2.1.0
+
+## 3.2.8
+
+### Patch Changes
+
+- [#2363](https://github.com/diegomura/react-pdf/pull/2363) [`8654d00`](https://github.com/diegomura/react-pdf/commit/8654d003023dd0899cddfc2ea2f5a552e01cf570) Thanks [@azmy60](https://github.com/azmy60)! - fix: SVGPresentationAttributes types
+
+- Updated dependencies [[`e5c8fde`](https://github.com/diegomura/react-pdf/commit/e5c8fde9379a9a85ecac7e3d6273953e39d65f8d), [`45b2bd3`](https://github.com/diegomura/react-pdf/commit/45b2bd37037c605727ad5783f2f2a438dc19cac4), [`1f987cc`](https://github.com/diegomura/react-pdf/commit/1f987cc27c3fd1ef1b6748ebe58a289a78b538d2), [`4c40b14`](https://github.com/diegomura/react-pdf/commit/4c40b149cfed42f2513e1dd330a92ccc3363c04f)]:
+ - @react-pdf/types@2.3.5
+ - @react-pdf/textkit@4.2.1
+
## 3.2.7
### Patch Changes
diff --git a/packages/render/README.md b/packages/render/README.md
index f0c156828..017668208 100644
--- a/packages/render/README.md
+++ b/packages/render/README.md
@@ -7,6 +7,7 @@
> React-pdf render engine
## How to install
+
```sh
yarn add @react-pdf/render
```
@@ -61,8 +62,8 @@ render.default(ctx, doc);
This library exports a `render` function that takes two arguments:
-- *ctx*: This is the target context where the document is going to be rendered. React-pdf currently uses a [pdfkit](https://github.com/react-pdf/pdfkit) document as context, but it can target any other type of structure as long as it signature matches pdfkit API. In the future this will enable rendering documents into muliple formats in addition to PDF.
-- *node*: Document root node. A node is a nested structure that defines a single element in a document. They are defined by it's `type` and arguments.
+- _ctx_: This is the target context where the document is going to be rendered. React-pdf currently uses a [pdfkit](https://github.com/react-pdf/pdfkit) document as context, but it can target any other type of structure as long as it signature matches pdfkit API. In the future this will enable rendering documents into muliple formats in addition to PDF.
+- _node_: Document root node. A node is a nested structure that defines a single element in a document. They are defined by it's `type` and arguments.
## Node structure
diff --git a/packages/render/babel.config.js b/packages/render/babel.config.js
index 27f83582f..02d1cbbdb 100644
--- a/packages/render/babel.config.js
+++ b/packages/render/babel.config.js
@@ -1 +1 @@
-module.exports = { extends: '../../babel.config.js' };
+export default { extends: '../../babel.config.js' };
diff --git a/packages/render/jest.config.js b/packages/render/jest.config.js
index 1a99b7295..40b1faa8e 100644
--- a/packages/render/jest.config.js
+++ b/packages/render/jest.config.js
@@ -1,3 +1,3 @@
-module.exports = {
+export default {
testRegex: 'tests/.*?(test)\\.js$',
};
diff --git a/packages/render/package.json b/packages/render/package.json
index cf904dd58..0b18f8cfb 100644
--- a/packages/render/package.json
+++ b/packages/render/package.json
@@ -1,30 +1,38 @@
{
"name": "@react-pdf/render",
- "version": "3.2.7",
+ "version": "3.4.3",
"license": "MIT",
"description": "A render engine for Node and the browser",
"author": "Diego Muracciole ",
"homepage": "https://github.com/diegomura/react-pdf#readme",
- "main": "lib/index.cjs.js",
- "module": "lib/index.es.js",
+ "type": "module",
+ "main": "./lib/index.cjs",
+ "module": "./lib/index.js",
+ "exports": {
+ ".": {
+ "import": "./lib/index.js",
+ "require": "./lib/index.cjs",
+ "default": "./lib/index.js"
+ }
+ },
"repository": {
"type": "git",
"url": "https://github.com/diegomura/react-pdf.git",
"directory": "packages/render"
},
"scripts": {
- "test": "jest",
+ "test": "vitest",
"build": "rimraf ./lib && rollup -c",
"watch": "rimraf ./lib && rollup -c -w"
},
"dependencies": {
"@babel/runtime": "^7.20.13",
- "@react-pdf/fns": "2.0.1",
- "@react-pdf/primitives": "^3.0.0",
- "@react-pdf/textkit": "^4.2.0",
- "@react-pdf/types": "^2.3.4",
+ "@react-pdf/fns": "2.2.1",
+ "@react-pdf/primitives": "^3.1.1",
+ "@react-pdf/textkit": "^4.4.1",
+ "@react-pdf/types": "^2.4.1",
"abs-svg-path": "^0.1.1",
- "color-string": "^1.5.3",
+ "color-string": "^1.9.1",
"normalize-svg-path": "^1.1.0",
"parse-svg-path": "^0.1.2",
"svg-arc-to-cubic-bezier": "^3.2.0"
diff --git a/packages/render/rollup.config.js b/packages/render/rollup.config.js
index 7f5613d46..5721534f1 100644
--- a/packages/render/rollup.config.js
+++ b/packages/render/rollup.config.js
@@ -1,19 +1,20 @@
import json from '@rollup/plugin-json';
import babel from '@rollup/plugin-babel';
-import pkg from './package.json';
+import pkg from './package.json' assert { type: 'json' };
const cjs = {
exports: 'named',
format: 'cjs',
+ interop: 'compat',
};
const esm = {
format: 'es',
};
-const getCJS = override => Object.assign({}, cjs, override);
-const getESM = override => Object.assign({}, esm, override);
+const getCJS = (override) => Object.assign({}, cjs, override);
+const getESM = (override) => Object.assign({}, esm, override);
const configBase = {
input: 'src/index.js',
@@ -32,10 +33,7 @@ const configBase = {
};
const config = Object.assign({}, configBase, {
- output: [
- getESM({ file: 'lib/index.es.js' }),
- getCJS({ file: 'lib/index.cjs.js' }),
- ],
+ output: [getESM({ file: 'lib/index.js' }), getCJS({ file: 'lib/index.cjs' })],
});
export default config;
diff --git a/packages/render/src/index.js b/packages/render/src/index.js
index 398ad09b1..21d8a6e28 100644
--- a/packages/render/src/index.js
+++ b/packages/render/src/index.js
@@ -8,7 +8,7 @@ const render = (ctx, doc) => {
addMetadata(ctx, doc);
- pages.forEach(page => renderNode(ctx, page, options));
+ pages.forEach((page) => renderNode(ctx, page, options));
addBookmarks(ctx, doc);
diff --git a/packages/render/src/operations/addBookmarks.js b/packages/render/src/operations/addBookmarks.js
index a6aaba897..2731d6896 100644
--- a/packages/render/src/operations/addBookmarks.js
+++ b/packages/render/src/operations/addBookmarks.js
@@ -22,7 +22,7 @@ const addNodeBookmark = (ctx, node, pageNumber, registry) => {
if (!node.children) return;
- node.children.forEach(child =>
+ node.children.forEach((child) =>
addNodeBookmark(ctx, child, pageNumber, registry),
);
};
diff --git a/packages/render/src/operations/addMetadata.js b/packages/render/src/operations/addMetadata.js
index 27a1c0534..877d94639 100644
--- a/packages/render/src/operations/addMetadata.js
+++ b/packages/render/src/operations/addMetadata.js
@@ -1,6 +1,6 @@
/* eslint-disable no-param-reassign */
-const setPDFMetadata = target => (key, value) => {
+const setPDFMetadata = (target) => (key, value) => {
if (value) target.info[key] = value;
};
@@ -20,6 +20,8 @@ const addMetadata = (ctx, doc) => {
const keywords = props.keywords || null;
const creator = props.creator ?? 'react-pdf';
const producer = props.producer ?? 'react-pdf';
+ const creationDate = props.creationDate || new Date();
+ const modificationDate = props.modificationDate || null;
setProp('Title', title);
setProp('Author', author);
@@ -27,6 +29,8 @@ const addMetadata = (ctx, doc) => {
setProp('Keywords', keywords);
setProp('Creator', creator);
setProp('Producer', producer);
+ setProp('CreationDate', creationDate);
+ setProp('ModificationDate', modificationDate);
};
export default addMetadata;
diff --git a/packages/render/src/operations/setLink.js b/packages/render/src/operations/setLink.js
index 8c323ef06..c8d97365c 100644
--- a/packages/render/src/operations/setLink.js
+++ b/packages/render/src/operations/setLink.js
@@ -1,4 +1,4 @@
-const isSrcId = value => /^#.+/.test(value);
+const isSrcId = (value) => /^#.+/.test(value);
const setLink = (ctx, node) => {
const props = node.props || {};
diff --git a/packages/render/src/operations/transform.js b/packages/render/src/operations/transform.js
index 2ac227616..b39010289 100644
--- a/packages/render/src/operations/transform.js
+++ b/packages/render/src/operations/transform.js
@@ -43,7 +43,7 @@ const applyTransformations = (ctx, node) => {
const origin = [node.origin.left, node.origin.top];
const operations = node.style?.transform || node.props?.transform || [];
- operations.forEach(operation => {
+ operations.forEach((operation) => {
applySingleTransformation(ctx, operation, origin);
});
};
diff --git a/packages/render/src/primitives/renderBorders.js b/packages/render/src/primitives/renderBorders.js
index 7f0d75aa5..267925332 100644
--- a/packages/render/src/primitives/renderBorders.js
+++ b/packages/render/src/primitives/renderBorders.js
@@ -594,7 +594,7 @@ const fillBorderLeft = (ctx, layout, style, rbl, rtl) => {
ctx.undash();
};
-const shouldRenderBorders = node =>
+const shouldRenderBorders = (node) =>
node.box &&
(node.box.borderTopWidth ||
node.box.borderRightWidth ||
diff --git a/packages/render/src/primitives/renderCanvas.js b/packages/render/src/primitives/renderCanvas.js
index 64fe10180..599910bb7 100644
--- a/packages/render/src/primitives/renderCanvas.js
+++ b/packages/render/src/primitives/renderCanvas.js
@@ -35,7 +35,7 @@ const availableMethods = [
'radialGradient',
];
-const painter = ctx => {
+const painter = (ctx) => {
const p = availableMethods.reduce(
(acc, prop) => ({
...acc,
diff --git a/packages/render/src/primitives/renderDebug.js b/packages/render/src/primitives/renderDebug.js
index 175b7ff2f..3fe5a0e4d 100644
--- a/packages/render/src/primitives/renderDebug.js
+++ b/packages/render/src/primitives/renderDebug.js
@@ -91,7 +91,7 @@ const debugPadding = (ctx, node) => {
.fill();
};
-const getMargin = box => {
+const getMargin = (box) => {
const marginLeft = box.marginLeft === 'auto' ? 0 : box.marginLeft;
const marginTop = box.marginTop === 'auto' ? 0 : box.marginTop;
const marginRight = box.marginRight === 'auto' ? 0 : box.marginRight;
diff --git a/packages/render/src/primitives/renderNode.js b/packages/render/src/primitives/renderNode.js
index c9ab7e48a..12abdb332 100644
--- a/packages/render/src/primitives/renderNode.js
+++ b/packages/render/src/primitives/renderNode.js
@@ -13,7 +13,7 @@ import clipNode from '../operations/clipNode';
import transform from '../operations/transform';
import setDestination from '../operations/setDestination';
-const isRecursiveNode = node => node.type !== P.Text && node.type !== P.Svg;
+const isRecursiveNode = (node) => node.type !== P.Text && node.type !== P.Svg;
const renderChildren = (ctx, node, options) => {
ctx.save();
@@ -23,7 +23,7 @@ const renderChildren = (ctx, node, options) => {
}
const children = node.children || [];
- const renderChild = child => renderNode(ctx, child, options);
+ const renderChild = (child) => renderNode(ctx, child, options);
children.forEach(renderChild);
diff --git a/packages/render/src/primitives/renderPolyline.js b/packages/render/src/primitives/renderPolyline.js
index 959cc74b5..c2499e9f0 100644
--- a/packages/render/src/primitives/renderPolyline.js
+++ b/packages/render/src/primitives/renderPolyline.js
@@ -3,7 +3,7 @@ import parsePoints from '../svg/parsePoints';
export const drawPolyline = (ctx, points) => {
if (points.length > 0) {
ctx.moveTo(points[0][0], points[0][1]);
- points.slice(1).forEach(p => ctx.lineTo(p[0], p[1]));
+ points.slice(1).forEach((p) => ctx.lineTo(p[0], p[1]));
}
};
diff --git a/packages/render/src/primitives/renderSvg.js b/packages/render/src/primitives/renderSvg.js
index b35647394..4f169410f 100644
--- a/packages/render/src/primitives/renderSvg.js
+++ b/packages/render/src/primitives/renderSvg.js
@@ -53,13 +53,13 @@ const setLineCap = (ctx, node) => {
const setLineDash = (ctx, node) => {
const value = node.props?.strokeDasharray || null;
- if (value) ctx.dash(value.split(','));
+ if (value) ctx.dash(value.split(',').map(Number));
};
-const hasLinearGradientFill = node =>
+const hasLinearGradientFill = (node) =>
node.props?.fill?.type === P.LinearGradient;
-const hasRadialGradientFill = node =>
+const hasRadialGradientFill = (node) =>
node.props?.fill?.type === P.RadialGradient;
// Math simplified from https://github.com/devongovett/svgkit/blob/master/src/elements/SVGGradient.js#L104
@@ -84,7 +84,7 @@ const setLinearGradientFill = (ctx, node) => {
const grad = ctx.linearGradient(gx1, gy1, gx2, gy2);
- gradient.children.forEach(stop => {
+ gradient.children.forEach((stop) => {
grad.stop(stop.props.offset, stop.props.stopColor, stop.props.stopOpacity);
});
@@ -115,7 +115,7 @@ const setRadialGradientFill = (ctx, node) => {
const grad = ctx.radialGradient(gfx, gfy, 0, gcx, gcy, gr);
- gradient.children.forEach(stop => {
+ gradient.children.forEach((stop) => {
grad.stop(stop.props.offset, stop.props.stopColor, stop.props.stopOpacity);
});
@@ -199,7 +199,7 @@ const clipPath = (ctx, node) => {
if (value) {
const children = value.children || [];
- children.forEach(child => renderNode(ctx, child));
+ children.forEach((child) => renderNode(ctx, child));
ctx.clip();
}
};
@@ -207,7 +207,7 @@ const clipPath = (ctx, node) => {
const drawChildren = (ctx, node) => {
const children = node.children || [];
- children.forEach(child => {
+ children.forEach((child) => {
ctx.save();
clipPath(ctx, child);
diff --git a/packages/render/src/primitives/renderSvgText.js b/packages/render/src/primitives/renderSvgText.js
index f4da66f8c..63420a30b 100644
--- a/packages/render/src/primitives/renderSvgText.js
+++ b/packages/render/src/primitives/renderSvgText.js
@@ -91,13 +91,13 @@ const renderSpan = (ctx, line, textAnchor, dominantBaseline) => {
ctx.translate(xTranslate, yTranslate);
- line.runs.forEach(run => renderRun(ctx, run));
+ line.runs.forEach((run) => renderRun(ctx, run));
ctx.restore();
};
const renderSvgText = (ctx, node) => {
- node.children.forEach(span =>
+ node.children.forEach((span) =>
renderSpan(
ctx,
span.lines[0],
diff --git a/packages/render/src/primitives/renderText.js b/packages/render/src/primitives/renderText.js
index 0f3e8c7f0..ca696972c 100644
--- a/packages/render/src/primitives/renderText.js
+++ b/packages/render/src/primitives/renderText.js
@@ -6,7 +6,7 @@ import parseColor from '../utils/parseColor';
const DEST_REGEXP = /^#.+/;
-const isSrcId = src => src.match(DEST_REGEXP);
+const isSrcId = (src) => src.match(DEST_REGEXP);
const renderAttachment = (ctx, attachment) => {
const { xOffset = 0, yOffset = 0, width, height, image } = attachment;
@@ -209,7 +209,7 @@ const renderLine = (ctx, line, options) => {
};
const renderBlock = (ctx, block, options) => {
- block.forEach(line => {
+ block.forEach((line) => {
renderLine(ctx, line, options);
});
};
@@ -225,7 +225,7 @@ const renderText = (ctx, node) => {
ctx.save();
ctx.translate(left + paddingLeft - offsetX, top + paddingTop - initialY);
- blocks.forEach(block => {
+ blocks.forEach((block) => {
renderBlock(ctx, block, {});
});
diff --git a/packages/render/src/svg/getBoundingBox.js b/packages/render/src/svg/getBoundingBox.js
index 2aeb16f28..821d794c2 100644
--- a/packages/render/src/svg/getBoundingBox.js
+++ b/packages/render/src/svg/getBoundingBox.js
@@ -6,7 +6,7 @@ import normalizePath from 'normalize-svg-path';
import parsePoints from './parsePoints';
// From https://github.com/dy/svg-path-bounds/blob/master/index.js
-const getPathBoundingBox = node => {
+const getPathBoundingBox = (node) => {
const path = normalizePath(absPath(parsePath(node.props?.d || '')));
if (!path.length) return [0, 0, 0, 0];
@@ -27,7 +27,7 @@ const getPathBoundingBox = node => {
return bounds;
};
-const getCircleBoundingBox = node => {
+const getCircleBoundingBox = (node) => {
const r = node.props?.r || 0;
const cx = node.props?.cx || 0;
const cy = node.props?.cy || 0;
@@ -35,7 +35,7 @@ const getCircleBoundingBox = node => {
return [cx - r, cy - r, cx + r, cy + r];
};
-const getEllipseBoundingBox = node => {
+const getEllipseBoundingBox = (node) => {
const cx = node.props?.cx || 0;
const cy = node.props?.cy || 0;
const rx = node.props?.rx || 0;
@@ -44,7 +44,7 @@ const getEllipseBoundingBox = node => {
return [cx - rx, cy - ry, cx + rx, cy + ry];
};
-const getLineBoundingBox = node => {
+const getLineBoundingBox = (node) => {
const x1 = node.props?.x1 || 0;
const y1 = node.props?.y1 || 0;
const x2 = node.props?.x2 || 0;
@@ -58,7 +58,7 @@ const getLineBoundingBox = node => {
];
};
-const getRectBoundingBox = node => {
+const getRectBoundingBox = (node) => {
const x = node.props?.x || 0;
const y = node.props?.y || 0;
const width = node.props?.width || 0;
@@ -67,14 +67,14 @@ const getRectBoundingBox = node => {
return [x, y, x + width, y + height];
};
-const max = values => Math.max(-Infinity, ...values);
-const min = values => Math.min(Infinity, ...values);
+const max = (values) => Math.max(-Infinity, ...values);
+const min = (values) => Math.min(Infinity, ...values);
-const getPolylineBoundingBox = node => {
+const getPolylineBoundingBox = (node) => {
const points = parsePoints(node.props?.points || []);
- const xValues = points.map(p => p[0]);
- const yValues = points.map(p => p[1]);
+ const xValues = points.map((p) => p[0]);
+ const yValues = points.map((p) => p[1]);
return [min(xValues), min(yValues), max(xValues), max(yValues)];
};
@@ -89,7 +89,7 @@ const boundingBoxFns = {
[P.Polyline]: getPolylineBoundingBox,
};
-const getBoundingBox = node => {
+const getBoundingBox = (node) => {
const boundingBoxFn = boundingBoxFns[node.type];
return boundingBoxFn ? boundingBoxFn(node) : [0, 0, 0, 0];
};
diff --git a/packages/render/src/svg/parsePoints.js b/packages/render/src/svg/parsePoints.js
index 369480115..ef529a640 100644
--- a/packages/render/src/svg/parsePoints.js
+++ b/packages/render/src/svg/parsePoints.js
@@ -1,4 +1,11 @@
-const pairs = values => {
+/**
+ * Create pairs from array
+ *
+ * @template T
+ * @param {T[]} values array
+ * @returns {T[][]} pairs
+ */
+const pairs = (values) => {
const result = [];
for (let i = 0; i < values.length; i += 2) {
@@ -11,10 +18,10 @@ const pairs = values => {
/**
* Parse svg-like points into number arrays
*
- * @param {String} points string ex. "20,30 50,60"
- * @return {Array} points array ex. [[20, 30], [50, 60]]
+ * @param {string} points string ex. "20,30 50,60"
+ * @returns {number[][]} points array ex. [[20, 30], [50, 60]]
*/
-const parsePoints = points => {
+const parsePoints = (points) => {
let values = (points || '')
.trim()
.replace(/,/g, ' ')
@@ -25,9 +32,9 @@ const parsePoints = points => {
values = values.slice(0, -1);
}
- values = values.map(parseFloat);
+ const mappedValues = values.map(parseFloat);
- return pairs(values);
+ return pairs(mappedValues);
};
export default parsePoints;
diff --git a/packages/render/src/utils/parseColor.js b/packages/render/src/utils/parseColor.js
index 581e95d10..20aa5d834 100644
--- a/packages/render/src/utils/parseColor.js
+++ b/packages/render/src/utils/parseColor.js
@@ -1,7 +1,12 @@
import colorString from 'color-string';
-const parseColor = hex => {
+const black = { value: [0, 0, 0], opacity: 1 };
+
+const parseColor = (hex) => {
const parsed = colorString.get(hex);
+
+ if (!parsed) return black;
+
const value = colorString.to.hex(parsed.value.slice(0, 3));
const opacity = parsed.value[3];
diff --git a/packages/render/src/utils/resolveObjectFit.js b/packages/render/src/utils/resolveObjectFit.js
index b1ce0b587..e952c529d 100644
--- a/packages/render/src/utils/resolveObjectFit.js
+++ b/packages/render/src/utils/resolveObjectFit.js
@@ -1,6 +1,6 @@
import { matchPercent } from '@react-pdf/fns';
-const isNumeric = n => {
+const isNumeric = (n) => {
return !Number.isNaN(parseFloat(n)) && Number.isFinite(n);
};
diff --git a/packages/render/tests/ctx.js b/packages/render/tests/ctx.js
index 461373587..daf5e2598 100644
--- a/packages/render/tests/ctx.js
+++ b/packages/render/tests/ctx.js
@@ -1,51 +1,53 @@
+import { vi } from 'vitest';
+
const createCTX = () => {
const instance = {};
instance.info = {};
- instance.end = jest.fn().mockReturnValue(instance);
- instance.rect = jest.fn().mockReturnValue(instance);
- instance.save = jest.fn().mockReturnValue(instance);
- instance.fill = jest.fn().mockReturnValue(instance);
- instance.image = jest.fn().mockReturnValue(instance);
- instance.restore = jest.fn().mockReturnValue(instance);
- instance.addPage = jest.fn().mockReturnValue(instance);
- instance.fillColor = jest.fn().mockReturnValue(instance);
- instance.fillOpacity = jest.fn().mockReturnValue(instance);
- instance.roundedRect = jest.fn().mockReturnValue(instance);
- instance.registerFont = jest.fn().mockReturnValue(instance);
- instance.lineWidth = jest.fn().mockReturnValue(instance);
- instance.moveTo = jest.fn().mockReturnValue(instance);
- instance.quadraticCurveTo = jest.fn().mockReturnValue(instance);
- instance.lineTo = jest.fn().mockReturnValue(instance);
- instance.strokeColor = jest.fn().mockReturnValue(instance);
- instance.strokeOpacity = jest.fn().mockReturnValue(instance);
- instance.stroke = jest.fn().mockReturnValue(instance);
- instance.dash = jest.fn().mockReturnValue(instance);
- instance.note = jest.fn().mockReturnValue(instance);
- instance.rotate = jest.fn().mockReturnValue(instance);
- instance.scale = jest.fn().mockReturnValue(instance);
- instance.translate = jest.fn().mockReturnValue(instance);
- instance.link = jest.fn().mockReturnValue(instance);
- instance.goTo = jest.fn().mockReturnValue(instance);
- instance.addNamedDestination = jest.fn().mockReturnValue(instance);
- instance.clip = jest.fn().mockReturnValue(instance);
- instance.bezierCurveTo = jest.fn().mockReturnValue(instance);
- instance.closePath = jest.fn().mockReturnValue(instance);
- instance.undash = jest.fn().mockReturnValue(instance);
- instance.moveTo = jest.fn().mockReturnValue(instance);
- instance.path = jest.fn().mockReturnValue(instance);
- instance.radialGradient = jest.fn().mockReturnValue(instance);
- instance.linearGradient = jest.fn().mockReturnValue(instance);
- instance.miterLimit = jest.fn().mockReturnValue(instance);
- instance.fontSize = jest.fn().mockReturnValue(instance);
- instance.lineJoin = jest.fn().mockReturnValue(instance);
- instance.polygon = jest.fn().mockReturnValue(instance);
- instance.circle = jest.fn().mockReturnValue(instance);
- instance.ellipse = jest.fn().mockReturnValue(instance);
- instance.opacity = jest.fn().mockReturnValue(instance);
- instance.lineCap = jest.fn().mockReturnValue(instance);
- instance.text = jest.fn().mockReturnValue(instance);
- instance.font = jest.fn().mockReturnValue(instance);
+ instance.end = vi.fn().mockReturnValue(instance);
+ instance.rect = vi.fn().mockReturnValue(instance);
+ instance.save = vi.fn().mockReturnValue(instance);
+ instance.fill = vi.fn().mockReturnValue(instance);
+ instance.image = vi.fn().mockReturnValue(instance);
+ instance.restore = vi.fn().mockReturnValue(instance);
+ instance.addPage = vi.fn().mockReturnValue(instance);
+ instance.fillColor = vi.fn().mockReturnValue(instance);
+ instance.fillOpacity = vi.fn().mockReturnValue(instance);
+ instance.roundedRect = vi.fn().mockReturnValue(instance);
+ instance.registerFont = vi.fn().mockReturnValue(instance);
+ instance.lineWidth = vi.fn().mockReturnValue(instance);
+ instance.moveTo = vi.fn().mockReturnValue(instance);
+ instance.quadraticCurveTo = vi.fn().mockReturnValue(instance);
+ instance.lineTo = vi.fn().mockReturnValue(instance);
+ instance.strokeColor = vi.fn().mockReturnValue(instance);
+ instance.strokeOpacity = vi.fn().mockReturnValue(instance);
+ instance.stroke = vi.fn().mockReturnValue(instance);
+ instance.dash = vi.fn().mockReturnValue(instance);
+ instance.note = vi.fn().mockReturnValue(instance);
+ instance.rotate = vi.fn().mockReturnValue(instance);
+ instance.scale = vi.fn().mockReturnValue(instance);
+ instance.translate = vi.fn().mockReturnValue(instance);
+ instance.link = vi.fn().mockReturnValue(instance);
+ instance.goTo = vi.fn().mockReturnValue(instance);
+ instance.addNamedDestination = vi.fn().mockReturnValue(instance);
+ instance.clip = vi.fn().mockReturnValue(instance);
+ instance.bezierCurveTo = vi.fn().mockReturnValue(instance);
+ instance.closePath = vi.fn().mockReturnValue(instance);
+ instance.undash = vi.fn().mockReturnValue(instance);
+ instance.moveTo = vi.fn().mockReturnValue(instance);
+ instance.path = vi.fn().mockReturnValue(instance);
+ instance.radialGradient = vi.fn().mockReturnValue(instance);
+ instance.linearGradient = vi.fn().mockReturnValue(instance);
+ instance.miterLimit = vi.fn().mockReturnValue(instance);
+ instance.fontSize = vi.fn().mockReturnValue(instance);
+ instance.lineJoin = vi.fn().mockReturnValue(instance);
+ instance.polygon = vi.fn().mockReturnValue(instance);
+ instance.circle = vi.fn().mockReturnValue(instance);
+ instance.ellipse = vi.fn().mockReturnValue(instance);
+ instance.opacity = vi.fn().mockReturnValue(instance);
+ instance.lineCap = vi.fn().mockReturnValue(instance);
+ instance.text = vi.fn().mockReturnValue(instance);
+ instance.font = vi.fn().mockReturnValue(instance);
return instance;
};
diff --git a/packages/render/tests/operations/addMetadata.test.js b/packages/render/tests/operations/addMetadata.test.js
index da41e8f25..f701de676 100644
--- a/packages/render/tests/operations/addMetadata.test.js
+++ b/packages/render/tests/operations/addMetadata.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import * as P from '@react-pdf/primitives';
import createCTX from '../ctx';
@@ -111,4 +113,31 @@ describe('operations addMetadata', () => {
expect(ctx.info.Producer).toBe('test');
});
+
+ test('should add creationDate metadata if provided', () => {
+ const ctx = createCTX();
+ const doc = { type: P.Document, props: { creationDate: 'test' } };
+
+ addMetadata(ctx, doc);
+
+ expect(ctx.info.CreationDate).toBe('test');
+ });
+
+ test('should not add modificationDate metadata if none provided', () => {
+ const ctx = createCTX();
+ const doc = { type: P.Document };
+
+ addMetadata(ctx, doc);
+
+ expect(ctx.info.ModificationDate).toBeUndefined();
+ });
+
+ test('should add modificationDate metadata if provided', () => {
+ const ctx = createCTX();
+ const doc = { type: P.Document, props: { modificationDate: 'test' } };
+
+ addMetadata(ctx, doc);
+
+ expect(ctx.info.ModificationDate).toBe('test');
+ });
});
diff --git a/packages/render/tests/operations/setDestination.test.js b/packages/render/tests/operations/setDestination.test.js
index 8196d6fdb..e23cff217 100644
--- a/packages/render/tests/operations/setDestination.test.js
+++ b/packages/render/tests/operations/setDestination.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import * as P from '@react-pdf/primitives';
import createCTX from '../ctx';
diff --git a/packages/render/tests/primitives/renderBackground.test.js b/packages/render/tests/primitives/renderBackground.test.js
index c06967e28..57b17170f 100644
--- a/packages/render/tests/primitives/renderBackground.test.js
+++ b/packages/render/tests/primitives/renderBackground.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import * as P from '@react-pdf/primitives';
import createCTX from '../ctx';
diff --git a/packages/render/tests/primitives/renderCanvas.test.js b/packages/render/tests/primitives/renderCanvas.test.js
index be6e017fd..e6eac9c02 100644
--- a/packages/render/tests/primitives/renderCanvas.test.js
+++ b/packages/render/tests/primitives/renderCanvas.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import * as P from '@react-pdf/primitives';
import createCTX from '../ctx';
@@ -18,7 +20,7 @@ describe('primitive renderCanvas', () => {
test('should call paint method with ctx', () => {
const ctx = createCTX();
const box = { top: 20, left: 40, width: 140, height: 200 };
- const paint = p => expect(p).toBeTruthy();
+ const paint = (p) => expect(p).toBeTruthy();
const node = { type: P.Canvas, box, props: { paint } };
renderCanvas(ctx, node);
@@ -27,7 +29,7 @@ describe('primitive renderCanvas', () => {
test('should remove dangerous methods from passed ctx', () => {
const ctx = createCTX();
const box = { top: 20, left: 40, width: 140, height: 200 };
- const paint = p => expect(p.registerFont).toBeFalsy();
+ const paint = (p) => expect(p.registerFont).toBeFalsy();
const node = { type: P.Canvas, box, props: { paint } };
renderCanvas(ctx, node);
diff --git a/packages/render/tests/primitives/renderCircle.test.js b/packages/render/tests/primitives/renderCircle.test.js
index 7d89dca15..20a14b506 100644
--- a/packages/render/tests/primitives/renderCircle.test.js
+++ b/packages/render/tests/primitives/renderCircle.test.js
@@ -1,9 +1,11 @@
+import { describe, expect, test } from 'vitest';
+
import * as P from '@react-pdf/primitives';
import createCTX from '../ctx';
import renderCircle from '../../src/primitives/renderCircle';
-const round = num => Math.round(num * 100) / 100;
+const round = (num) => Math.round(num * 100) / 100;
describe('primitive renderCircle', () => {
test('should render circle correctly', () => {
@@ -13,7 +15,7 @@ describe('primitive renderCircle', () => {
renderCircle(ctx, node);
- const bezierCalls = ctx.bezierCurveTo.mock.calls.map(c => c.map(round));
+ const bezierCalls = ctx.bezierCurveTo.mock.calls.map((c) => c.map(round));
expect(bezierCalls).toHaveLength(4);
expect(ctx.moveTo.mock.calls).toEqual([[30, 80]]);
diff --git a/packages/render/tests/primitives/renderEllipse.test.js b/packages/render/tests/primitives/renderEllipse.test.js
index 97f0966cc..39d3f75ab 100644
--- a/packages/render/tests/primitives/renderEllipse.test.js
+++ b/packages/render/tests/primitives/renderEllipse.test.js
@@ -1,9 +1,11 @@
+import { describe, expect, test } from 'vitest';
+
import * as P from '@react-pdf/primitives';
import createCTX from '../ctx';
import renderEllipse from '../../src/primitives/renderEllipse';
-const round = num => Math.round(num * 100) / 100;
+const round = (num) => Math.round(num * 100) / 100;
describe('primitive renderEllipse', () => {
test('should render ellipse correctly', () => {
@@ -13,7 +15,7 @@ describe('primitive renderEllipse', () => {
renderEllipse(ctx, node);
- const bezierCalls = ctx.bezierCurveTo.mock.calls.map(c => c.map(round));
+ const bezierCalls = ctx.bezierCurveTo.mock.calls.map((c) => c.map(round));
expect(bezierCalls).toHaveLength(4);
expect(ctx.moveTo.mock.calls).toEqual([[30, 80]]);
diff --git a/packages/render/tests/svg/getBoundingBox.test.js b/packages/render/tests/svg/getBoundingBox.test.js
index f45569c98..35c1025d2 100644
--- a/packages/render/tests/svg/getBoundingBox.test.js
+++ b/packages/render/tests/svg/getBoundingBox.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import getBoundingBox from '../../src/svg/getBoundingBox';
describe('path getBoundingBox', () => {
diff --git a/packages/render/tests/svg/parsePoints.test.js b/packages/render/tests/svg/parsePoints.test.js
index 3371b64e5..69befb0c2 100644
--- a/packages/render/tests/svg/parsePoints.test.js
+++ b/packages/render/tests/svg/parsePoints.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import parsePoints from '../../src/svg/parsePoints';
describe('svg parsePoints', () => {
diff --git a/packages/render/tests/utils/objectFit.test.js b/packages/render/tests/utils/objectFit.test.js
index f7469f9e3..7be5d74cf 100644
--- a/packages/render/tests/utils/objectFit.test.js
+++ b/packages/render/tests/utils/objectFit.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import resolveObjectFit from '../../src/utils/resolveObjectFit';
describe('object-fit', () => {
diff --git a/packages/render/tests/utils/parseColor.test.js b/packages/render/tests/utils/parseColor.test.js
index 8f53261a6..83cdde19f 100644
--- a/packages/render/tests/utils/parseColor.test.js
+++ b/packages/render/tests/utils/parseColor.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import parseColor from '../../src/utils/parseColor';
describe('parse color util', () => {
diff --git a/packages/renderer/.size-limit.js b/packages/renderer/.size-limit.cjs
similarity index 72%
rename from packages/renderer/.size-limit.js
rename to packages/renderer/.size-limit.cjs
index 0900727bf..d12102729 100644
--- a/packages/renderer/.size-limit.js
+++ b/packages/renderer/.size-limit.cjs
@@ -2,11 +2,14 @@ const webpack = require('webpack');
module.exports = [
{
- path: 'lib/react-pdf.browser.es.js',
+ path: 'lib/react-pdf.browser.js',
limit: '550 kB',
- modifyWebpackConfig: config => {
+ modifyWebpackConfig: (config) => {
config.resolve = {
+ fallback: {
+ fs: false,
+ },
alias: {
// TODO: ignore iconv-lite on default because it contains exotic encodings like `win1251`, that isn't used in pdf
'iconv-lite': false,
diff --git a/packages/renderer/CHANGELOG.md b/packages/renderer/CHANGELOG.md
index 596138165..ca5242ceb 100644
--- a/packages/renderer/CHANGELOG.md
+++ b/packages/renderer/CHANGELOG.md
@@ -1,5 +1,155 @@
# @react-pdf/renderer
+## 3.3.8
+
+### Patch Changes
+
+- Updated dependencies [[`dc54c13`](https://github.com/diegomura/react-pdf/commit/dc54c13625510482e93f80ed5cc07cf3a6a6d34c)]:
+ - @react-pdf/pdfkit@3.1.6
+ - @react-pdf/layout@3.11.2
+
+## 3.3.7
+
+### Patch Changes
+
+- [#2605](https://github.com/diegomura/react-pdf/pull/2605) [`f7505ed`](https://github.com/diegomura/react-pdf/commit/f7505ed453a1a0ae960d0e5e4a1d155803861b71) Thanks [@wojtekmaj](https://github.com/wojtekmaj)! - fix: fix CJS compatibility
+
+- Updated dependencies [[`f7505ed`](https://github.com/diegomura/react-pdf/commit/f7505ed453a1a0ae960d0e5e4a1d155803861b71)]:
+ - @react-pdf/layout@3.11.1
+ - @react-pdf/render@3.4.3
+ - @react-pdf/font@2.4.4
+ - @react-pdf/pdfkit@3.1.5
+
+## 3.3.6
+
+### Patch Changes
+
+- Updated dependencies [[`9af07fe`](https://github.com/diegomura/react-pdf/commit/9af07feb59c2fe9c1d8960ac95f6fa6e03d16235), [`8350154`](https://github.com/diegomura/react-pdf/commit/83501541e3a050021e18e112bb472b2dabc142a7)]:
+ - @react-pdf/layout@3.11.0
+ - @react-pdf/types@2.4.1
+ - @react-pdf/pdfkit@3.1.4
+ - @react-pdf/font@2.4.3
+ - @react-pdf/render@3.4.2
+
+## 3.3.5
+
+### Patch Changes
+
+- Updated dependencies [[`0590324`](https://github.com/diegomura/react-pdf/commit/0590324d7a6d75c0a49520b3f99cfb6594239390)]:
+ - @react-pdf/pdfkit@3.1.3
+ - @react-pdf/layout@3.10.4
+
+## 3.3.4
+
+### Patch Changes
+
+- Updated dependencies [[`44bd45b`](https://github.com/diegomura/react-pdf/commit/44bd45b1961ca8bae4a2f84cc77db945e5c43419)]:
+ - @react-pdf/pdfkit@3.1.2
+ - @react-pdf/layout@3.10.3
+
+## 3.3.3
+
+### Patch Changes
+
+- [#2544](https://github.com/diegomura/react-pdf/pull/2544) [`b5380a1`](https://github.com/diegomura/react-pdf/commit/b5380a1a0a7397b4111d68ce97b4acb702d34d51) Thanks [@satelllte](https://github.com/satelllte)! - fix: creationDate and modificationDate types
+
+- Updated dependencies [[`b5380a1`](https://github.com/diegomura/react-pdf/commit/b5380a1a0a7397b4111d68ce97b4acb702d34d51)]:
+ - @react-pdf/render@3.4.1
+
+## 3.3.2
+
+### Patch Changes
+
+- Updated dependencies [[`fb5273d`](https://github.com/diegomura/react-pdf/commit/fb5273d8d80d919f7b9c214e02d67b79ce23fa19), [`cfd050c`](https://github.com/diegomura/react-pdf/commit/cfd050c3ae0980f78c4a466565852d81c8254e19)]:
+ - @react-pdf/render@3.4.0
+ - @react-pdf/types@2.4.0
+ - @react-pdf/font@2.4.2
+ - @react-pdf/layout@3.10.2
+
+## 3.3.1
+
+### Patch Changes
+
+- [#2529](https://github.com/diegomura/react-pdf/pull/2529) [`a35b1ba`](https://github.com/diegomura/react-pdf/commit/a35b1ba18d293df51293600d8d56015094d222d8) Thanks [@diegomura](https://github.com/diegomura)! - fix: jpeg exif orientation rendering
+
+- Updated dependencies [[`36c6ba3`](https://github.com/diegomura/react-pdf/commit/36c6ba30ae73a512f19fe5bc47ac8c304887c0da), [`a35b1ba`](https://github.com/diegomura/react-pdf/commit/a35b1ba18d293df51293600d8d56015094d222d8)]:
+ - @react-pdf/pdfkit@3.1.1
+ - @react-pdf/layout@3.10.1
+
+## 3.3.0
+
+### Minor Changes
+
+- [#2505](https://github.com/diegomura/react-pdf/pull/2505) [`0f5c43f`](https://github.com/diegomura/react-pdf/commit/0f5c43fa6f3c0b53c067200cc1ac21e651504760) Thanks [@diegomura](https://github.com/diegomura)! - feat: wasm yoga
+
+### Patch Changes
+
+- [#2515](https://github.com/diegomura/react-pdf/pull/2515) [`64f7bba`](https://github.com/diegomura/react-pdf/commit/64f7bba0d840d17188e50086169c84c415abd8d5) Thanks [@wojtekmaj](https://github.com/wojtekmaj)! - Allow in TypeScript
+
+* [#2522](https://github.com/diegomura/react-pdf/pull/2522) [`e817223`](https://github.com/diegomura/react-pdf/commit/e8172231d07d10ece4ca960641f9ee52c5d4660d) Thanks [@wojtekmaj](https://github.com/wojtekmaj)! - Make options in usePDF optional in TypeScript
+
+- [#2519](https://github.com/diegomura/react-pdf/pull/2519) [`cf73180`](https://github.com/diegomura/react-pdf/commit/cf7318069e63170e160a36602359fc8cbc3386c2) Thanks [@wojtekmaj](https://github.com/wojtekmaj)! - Fix props unnecessarily required in LinearGradient and RadialGradient in TypeScript
+
+* [#2516](https://github.com/diegomura/react-pdf/pull/2516) [`66a40b2`](https://github.com/diegomura/react-pdf/commit/66a40b2e41cefe11f1ef8d467ba449a8861adb69) Thanks [@wojtekmaj](https://github.com/wojtekmaj)! - Allow in TypeScript
+
+* Updated dependencies [[`9e5842b`](https://github.com/diegomura/react-pdf/commit/9e5842bbecca6e249af2c5fc50078bb7ddd5420f), [`0f5c43f`](https://github.com/diegomura/react-pdf/commit/0f5c43fa6f3c0b53c067200cc1ac21e651504760)]:
+ - @react-pdf/types@2.3.6
+ - @react-pdf/layout@3.10.0
+ - @react-pdf/font@2.4.1
+ - @react-pdf/render@3.3.2
+
+## 3.2.1
+
+### Patch Changes
+
+- Updated dependencies [[`42bbbda`](https://github.com/diegomura/react-pdf/commit/42bbbda48058acd2d36d7a92c812d133608c459e)]:
+ - @react-pdf/primitives@3.1.1
+ - @react-pdf/layout@3.9.1
+ - @react-pdf/render@3.3.1
+
+## 3.2.0
+
+### Minor Changes
+
+- [#2409](https://github.com/diegomura/react-pdf/pull/2409) [`b6a14fd`](https://github.com/diegomura/react-pdf/commit/b6a14fd160fab26a49f798e5294b0e361e67fe37) Thanks [@wojtekmaj](https://github.com/wojtekmaj)! - Add support for native ESM
+
+### Patch Changes
+
+- Updated dependencies [[`e705d98`](https://github.com/diegomura/react-pdf/commit/e705d9862e3364fde00cbe6cdaf06d492bf58526), [`6bfe7e8`](https://github.com/diegomura/react-pdf/commit/6bfe7e8a30d96c04a1552800159992705f3605b1), [`b6a14fd`](https://github.com/diegomura/react-pdf/commit/b6a14fd160fab26a49f798e5294b0e361e67fe37), [`c8fe2c8`](https://github.com/diegomura/react-pdf/commit/c8fe2c86639cb8e44f26f78e62fc67379a8e3ceb), [`96ea576`](https://github.com/diegomura/react-pdf/commit/96ea5764cbe4e6e3869cd0fe6620e5216f94ffc0)]:
+ - @react-pdf/layout@3.9.0
+ - @react-pdf/render@3.3.0
+ - @react-pdf/primitives@3.1.0
+ - @react-pdf/pdfkit@3.1.0
+ - @react-pdf/font@2.4.0
+
+## 3.1.17
+
+### Patch Changes
+
+- Updated dependencies [[`0538bd9`](https://github.com/diegomura/react-pdf/commit/0538bd900e5490a5ef81bcdbd1676fc9f9ae6acb)]:
+ - @react-pdf/layout@3.8.0
+
+## 3.1.16
+
+### Patch Changes
+
+- [#2363](https://github.com/diegomura/react-pdf/pull/2363) [`8654d00`](https://github.com/diegomura/react-pdf/commit/8654d003023dd0899cddfc2ea2f5a552e01cf570) Thanks [@azmy60](https://github.com/azmy60)! - fix: SVGPresentationAttributes types
+
+- Updated dependencies [[`b227e0e`](https://github.com/diegomura/react-pdf/commit/b227e0e303da8bca754910f55f5d27dd18f3a874), [`e5c8fde`](https://github.com/diegomura/react-pdf/commit/e5c8fde9379a9a85ecac7e3d6273953e39d65f8d), [`45b2bd3`](https://github.com/diegomura/react-pdf/commit/45b2bd37037c605727ad5783f2f2a438dc19cac4), [`8654d00`](https://github.com/diegomura/react-pdf/commit/8654d003023dd0899cddfc2ea2f5a552e01cf570), [`b457a0c`](https://github.com/diegomura/react-pdf/commit/b457a0cc1c1352325e6c633af3000a3c9241f7f7), [`1f987cc`](https://github.com/diegomura/react-pdf/commit/1f987cc27c3fd1ef1b6748ebe58a289a78b538d2), [`4c40b14`](https://github.com/diegomura/react-pdf/commit/4c40b149cfed42f2513e1dd330a92ccc3363c04f)]:
+ - @react-pdf/layout@3.7.0
+ - @react-pdf/types@2.3.5
+ - @react-pdf/pdfkit@3.0.4
+ - @react-pdf/render@3.2.8
+ - @react-pdf/font@2.3.8
+
+## 3.1.15
+
+### Patch Changes
+
+- Updated dependencies [[`4cfb84d`](https://github.com/diegomura/react-pdf/commit/4cfb84d9f3d2301720b68b4c40a0257b9520c6e1)]:
+ - @react-pdf/pdfkit@3.0.3
+ - @react-pdf/layout@3.6.4
+
## 3.1.14
### Patch Changes
diff --git a/packages/renderer/README.md b/packages/renderer/README.md
index 46b461ef5..7534eb40d 100644
--- a/packages/renderer/README.md
+++ b/packages/renderer/README.md
@@ -17,11 +17,11 @@
-
## How to install
+
```sh
yarn add @react-pdf/renderer
```
@@ -35,13 +35,13 @@ import { Document, Page, Text, View, StyleSheet } from '@react-pdf/renderer';
const styles = StyleSheet.create({
page: {
flexDirection: 'row',
- backgroundColor: '#E4E4E4'
+ backgroundColor: '#E4E4E4',
},
section: {
margin: 10,
padding: 10,
- flexGrow: 1
- }
+ flexGrow: 1,
+ },
});
// Create Document Component
@@ -60,6 +60,7 @@ const MyDocument = () => (
```
### `Web.` Render in DOM
+
```jsx
import ReactDOM from 'react-dom';
import { PDFViewer } from '@react-pdf/renderer';
@@ -74,6 +75,7 @@ ReactDOM.render( , document.getElementById('root'));
```
### `Node.` Save in a file
+
```jsx
import ReactPDF from '@react-pdf/renderer';
@@ -81,6 +83,7 @@ ReactPDF.render( , `${__dirname}/example.pdf`);
```
## Examples
+
For each example, try opening `output.pdf` to see the result.
@@ -155,4 +158,5 @@ MIT © [Diego Muracciole](http://github.com/diegomura)
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Ftaylorudell%2Freact-pdf.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Ftaylorudell%2Freact-pdf?ref=badge_large)
---
+
![](https://img.shields.io/npm/dt/@react-pdf/renderer.svg?style=flat)
diff --git a/packages/renderer/babel.config.js b/packages/renderer/babel.config.js
index 27f83582f..02d1cbbdb 100644
--- a/packages/renderer/babel.config.js
+++ b/packages/renderer/babel.config.js
@@ -1 +1 @@
-module.exports = { extends: '../../babel.config.js' };
+export default { extends: '../../babel.config.js' };
diff --git a/packages/renderer/index.d.ts b/packages/renderer/index.d.ts
index 377428dde..df4054e1c 100644
--- a/packages/renderer/index.d.ts
+++ b/packages/renderer/index.d.ts
@@ -13,6 +13,12 @@ import {
PageMode,
} from '@react-pdf/types';
+declare class ReactPDF {
+ static default: typeof ReactPDF;
+}
+
+export = ReactPDF;
+
declare namespace ReactPDF {
interface Styles {
[key: string]: Style;
@@ -30,6 +36,8 @@ declare namespace ReactPDF {
keywords?: string;
producer?: string;
language?: string;
+ creationDate?: Date;
+ modificationDate?: Date;
pdfVersion?: PDFVersion;
pageMode?: PageMode;
pageLayout?: PageLayout;
@@ -206,7 +214,8 @@ declare namespace ReactPDF {
* @see https://react-pdf.org/advanced#debugging
*/
debug?: boolean;
- src: string;
+ href?: string;
+ src?: string;
}
/**
@@ -236,7 +245,7 @@ declare namespace ReactPDF {
class Canvas extends React.Component {}
- interface SVGProps extends NodeProps {
+ interface SVGProps extends NodeProps, SVGPresentationAttributes {
/**
* Enables debug mode on page bounding box.
* @see https://react-pdf.org/advanced#debugging
@@ -355,7 +364,9 @@ declare namespace ReactPDF {
*/
class Tspan extends React.Component> {}
- interface GProps extends SVGPresentationAttributes {}
+ interface GProps extends SVGPresentationAttributes {
+ style?: Style;
+ }
/**
* The SVG element is a container used to group other SVG elements.
@@ -395,10 +406,10 @@ declare namespace ReactPDF {
interface LinearGradientProps {
id: string;
- x1: string | number;
- x2: string | number;
- y1: string | number;
- y2: string | number;
+ x1?: string | number;
+ x2?: string | number;
+ y1?: string | number;
+ y2?: string | number;
}
/**
@@ -410,11 +421,11 @@ declare namespace ReactPDF {
interface RadialGradientProps {
id: string;
- cx: string | number;
- cy: string | number;
- fr: string | number;
- fx: string | number;
- fy: string | number;
+ cx?: string | number;
+ cy?: string | number;
+ fr?: string | number;
+ fx?: string | number;
+ fy?: string | number;
}
/**
@@ -460,15 +471,18 @@ declare namespace ReactPDF {
*/
class PDFViewer extends React.Component {}
- interface PDFDownloadLinkProps {
- document: React.ReactElement;
+ interface PDFDownloadLinkProps
+ extends Omit, 'href'> {
+ /** PDF filename. Alias for anchor tag `download` attribute. */
fileName?: string;
- style?: Style | Style[];
- className?: string;
+ document: React.ReactElement;
children?:
| React.ReactNode
| ((params: BlobProviderParams) => React.ReactNode);
- onClick?: Function;
+ onClick?(
+ event: React.MouseEvent,
+ instance: UsePDFInstance,
+ ): void;
}
/**
@@ -492,7 +506,10 @@ declare namespace ReactPDF {
function usePDF(options: {
currentPageCallBack? : ( value:Number ) => void;
document?: React.ReactElement;
- }): [UsePDFInstance, (newDocument: React.ReactElement) => void];
+ }): [
+ UsePDFInstance,
+ (newDocument: React.ReactElement) => void,
+ ];
const Font: FontStore;
@@ -504,16 +521,17 @@ declare namespace ReactPDF {
const PDFRenderer: any;
- const pdf: (
- initialValue?: React.ReactElement,
- ) => {
+ const pdf: (initialValue?: React.ReactElement) => {
container: any;
isDirty: () => boolean;
toString: () => string;
toBlob: () => Promise;
toBuffer: () => Promise;
on: (event: 'change', callback: () => void) => void;
- updateContainer: (document: React.ReactElement, callback?: () => void) => void;
+ updateContainer: (
+ document: React.ReactElement,
+ callback?: () => void,
+ ) => void;
removeListener: (event: 'change', callback: () => void) => void;
};
diff --git a/packages/renderer/jest.config.js b/packages/renderer/jest.config.js
deleted file mode 100644
index ba8842205..000000000
--- a/packages/renderer/jest.config.js
+++ /dev/null
@@ -1,8 +0,0 @@
-module.exports = {
- testRegex: 'tests/.*?(test)\\.js$',
- setupFilesAfterEnv: ['/setup.jest.js'],
- transformIgnorePatterns: [
- '/node_modules/',
- '/tests/environment/jsdom.js',
- ],
-};
diff --git a/packages/renderer/package.json b/packages/renderer/package.json
index 758d34cc2..eee5fd301 100644
--- a/packages/renderer/package.json
+++ b/packages/renderer/package.json
@@ -1,37 +1,44 @@
{
"name": "@react-pdf/renderer",
- "version": "3.1.14",
+ "version": "3.3.8",
"license": "MIT",
"description": "Create PDF files on the browser and server",
- "types": "index.d.ts",
"author": "Diego Muracciole ",
"homepage": "https://github.com/diegomura/react-pdf#readme",
- "main": "./lib/react-pdf.cjs.js",
- "module": "./lib/react-pdf.es.js",
+ "type": "module",
+ "main": "./lib/react-pdf.cjs",
+ "module": "./lib/react-pdf.js",
+ "browser": {
+ "./lib/react-pdf.js": "./lib/react-pdf.browser.js",
+ "./lib/react-pdf.cjs": "./lib/react-pdf.browser.cjs"
+ },
+ "exports": {
+ ".": {
+ "import": "./lib/react-pdf.js",
+ "require": "./lib/react-pdf.cjs",
+ "default": "./lib/react-pdf.js"
+ }
+ },
"repository": {
"type": "git",
"url": "https://github.com/diegomura/react-pdf.git",
"directory": "packages/renderer"
},
- "browser": {
- "./lib/react-pdf.es.js": "./lib/react-pdf.browser.es.js",
- "./lib/react-pdf.cjs.js": "./lib/react-pdf.browser.cjs.js"
- },
"scripts": {
"build": "rimraf ./lib && rollup -c",
"watch": "rimraf ./lib && rollup -c -w",
"size": "size-limit",
"lint": "eslint src",
- "test": "jest"
+ "test": "vitest && vitest --config vitest.browser.config.js"
},
"dependencies": {
"@babel/runtime": "^7.20.13",
- "@react-pdf/font": "^2.3.7",
- "@react-pdf/layout": "^3.6.3",
- "@react-pdf/pdfkit": "^3.0.2",
- "@react-pdf/primitives": "^3.0.0",
- "@react-pdf/render": "^3.2.7",
- "@react-pdf/types": "^2.3.4",
+ "@react-pdf/font": "^2.4.4",
+ "@react-pdf/layout": "^3.11.2",
+ "@react-pdf/pdfkit": "^3.1.6",
+ "@react-pdf/primitives": "^3.1.1",
+ "@react-pdf/render": "^3.4.3",
+ "@react-pdf/types": "^2.4.1",
"events": "^3.3.0",
"object-assign": "^4.1.1",
"prop-types": "^15.6.2",
@@ -39,13 +46,12 @@
"scheduler": "^0.17.0"
},
"peerDependencies": {
- "react": "^16.8.6 || ^17.0.0 || ^18.0.0"
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0"
},
"lint-staged": {
"*.js": [
- "yarn run lint",
- "prettier --write",
- "git add"
+ "yarn lint",
+ "prettier --write"
]
},
"files": [
@@ -57,19 +63,14 @@
"url": "https://opencollective.com/react-pdf",
"logo": "https://opencollective.com/opencollective/logo.txt"
},
- "husky": {
- "hooks": {
- "pre-commit": "git add . && lint-staged"
- }
- },
"devDependencies": {
- "@size-limit/preset-big-lib": "^7.0.5",
+ "@size-limit/preset-big-lib": "^11.0.1",
"assert": "^2.0.0",
"browserify-zlib": "^0.2.0",
"buffer": "^6.0.3",
"process": "^0.11.10",
"react-reconciler": "0.23.0",
- "size-limit": "^7.0.5",
+ "size-limit": "^11.0.1",
"util": "^0.12.4"
}
}
diff --git a/packages/renderer/rollup.config.js b/packages/renderer/rollup.config.js
index 26daf54e4..bb8abbfc1 100644
--- a/packages/renderer/rollup.config.js
+++ b/packages/renderer/rollup.config.js
@@ -4,15 +4,16 @@ import nodeResolve from '@rollup/plugin-node-resolve';
import replace from '@rollup/plugin-replace';
import alias from '@rollup/plugin-alias';
import ignore from 'rollup-plugin-ignore';
-import { terser } from 'rollup-plugin-terser';
-import sourceMaps from 'rollup-plugin-sourcemaps';
+import terser from '@rollup/plugin-terser';
import commonjs from '@rollup/plugin-commonjs';
+import copy from 'rollup-plugin-copy';
-import pkg from './package.json';
+import pkg from './package.json' assert { type: 'json' };
const cjs = {
- format: 'cjs',
exports: 'named',
+ format: 'cjs',
+ interop: 'compat',
sourcemap: true,
};
@@ -21,8 +22,8 @@ const esm = {
sourcemap: true,
};
-const getCJS = override => Object.assign({}, cjs, override);
-const getESM = override => Object.assign({}, esm, override);
+const getCJS = (override) => Object.assign({}, cjs, override);
+const getESM = (override) => Object.assign({}, esm, override);
const nodeInput = './src/node/index.js';
const domInput = './src/dom/index.js';
@@ -38,13 +39,14 @@ const getExternal = ({ browser }) => [
/@babel\/runtime/,
'react/jsx-runtime',
...(browser ? [] : ['fs', 'path', 'url']),
- ...Object.keys(pkg.dependencies).filter(name => name !== 'react-reconciler'),
+ ...Object.keys(pkg.dependencies).filter(
+ (name) => name !== 'react-reconciler',
+ ),
...Object.keys(pkg.peerDependencies),
];
-const getPlugins = ({ browser, minify = false }) => [
+const getPlugins = ({ browser, declarationDests, minify = false }) => [
json(),
- sourceMaps(),
...(browser ? [ignore(['fs', 'path', 'url'])] : []),
alias({
entries: {
@@ -63,47 +65,73 @@ const getPlugins = ({ browser, minify = false }) => [
BROWSER: JSON.stringify(browser),
},
}),
+ copy({
+ targets: declarationDests.map((destPath) => {
+ const [dest, rename] = destPath.split('/');
+ return { src: 'index.d.ts', dest, rename };
+ }),
+ }),
...(minify ? [terser()] : []),
];
const serverConfig = {
input: nodeInput,
output: [
- getESM({ file: 'lib/react-pdf.es.js' }),
- getCJS({ file: 'lib/react-pdf.cjs.js' }),
+ getESM({ file: 'lib/react-pdf.js' }),
+ getCJS({ file: 'lib/react-pdf.cjs' }),
],
external: getExternal({ browser: false }),
- plugins: getPlugins({ browser: false }),
+ plugins: getPlugins({
+ browser: false,
+ declarationDests: ['lib/react-pdf.d.ts', 'lib/react-pdf.d.cts'],
+ }),
};
const serverProdConfig = {
input: nodeInput,
output: [
- getESM({ file: 'lib/react-pdf.es.min.js', sourcemap: false }),
- getCJS({ file: 'lib/react-pdf.cjs.min.js', sourcemap: false }),
+ getESM({ file: 'lib/react-pdf.min.js', sourcemap: false }),
+ getCJS({ file: 'lib/react-pdf.min.cjs', sourcemap: false }),
],
external: getExternal({ browser: false }),
- plugins: getPlugins({ browser: false, minify: true }),
+ plugins: getPlugins({
+ browser: false,
+ declarationDests: ['lib/react-pdf.min.d.ts', 'lib/react-pdf.min.d.cts'],
+ minify: true,
+ }),
};
const browserConfig = {
input: domInput,
output: [
- getESM({ file: 'lib/react-pdf.browser.es.js' }),
- getCJS({ file: 'lib/react-pdf.browser.cjs.js' }),
+ getESM({ file: 'lib/react-pdf.browser.js' }),
+ getCJS({ file: 'lib/react-pdf.browser.cjs' }),
],
external: getExternal({ browser: true }),
- plugins: getPlugins({ browser: true }),
+ plugins: getPlugins({
+ browser: true,
+ declarationDests: [
+ 'lib/react-pdf.browser.d.ts',
+ 'lib/react-pdf.browser.d.cts',
+ ],
+ }),
};
const browserProdConfig = {
input: domInput,
output: [
- getESM({ file: 'lib/react-pdf.browser.es.min.js', sourcemap: false }),
- getCJS({ file: 'lib/react-pdf.browser.cjs.min.js', sourcemap: false }),
+ getESM({ file: 'lib/react-pdf.browser.min.js', sourcemap: false }),
+ getCJS({ file: 'lib/react-pdf.browser.min.cjs', sourcemap: false }),
],
external: getExternal({ browser: true }),
- plugins: getPlugins({ browser: true, minify: true }),
+ plugins: getPlugins({
+ browser: true,
+ declarationDests: [
+ 'lib/react-pdf.browser.min.d.ts',
+ 'lib/react-pdf.browser.min.d.cts',
+ ],
+ minify: true,
+ }),
};
export default [
diff --git a/packages/renderer/setup.jest.js b/packages/renderer/setup.jest.js
deleted file mode 100644
index 2ba8418ab..000000000
--- a/packages/renderer/setup.jest.js
+++ /dev/null
@@ -1,10 +0,0 @@
-/* eslint-disable import/no-extraneous-dependencies */
-const { configureToMatchImageSnapshot } = require('jest-image-snapshot');
-
-// setup image matcher
-const toMatchImageSnapshot = configureToMatchImageSnapshot({
- customSnapshotsDir: `${__dirname}/tests/snapshots`,
- customDiffDir: `${__dirname}/tests/diffs`,
-});
-
-expect.extend({ toMatchImageSnapshot });
diff --git a/packages/renderer/src/dom/PDFDownloadLink.js b/packages/renderer/src/dom/PDFDownloadLink.js
index 3f20e5111..66cdcff3f 100644
--- a/packages/renderer/src/dom/PDFDownloadLink.js
+++ b/packages/renderer/src/dom/PDFDownloadLink.js
@@ -5,12 +5,12 @@ import { useEffect } from 'react';
import usePDF from './usePDF';
export const PDFDownloadLink = ({
- style,
- children,
- className,
- document: doc,
fileName = 'document.pdf',
+ document: doc,
+ children,
onClick,
+ href: _filteredOutHref,
+ ...rest
}) => {
const [instance, updateInstance] = usePDF();
@@ -28,19 +28,13 @@ export const PDFDownloadLink = ({
}
};
- const handleClick = event => {
+ const handleClick = (event) => {
handleDownloadIE();
if (typeof onClick === 'function') onClick(event, instance);
};
return (
-
+
{typeof children === 'function' ? children(instance) : children}
);
diff --git a/packages/renderer/src/dom/index.js b/packages/renderer/src/dom/index.js
index 1b9bd591a..9ee1902cd 100644
--- a/packages/renderer/src/dom/index.js
+++ b/packages/renderer/src/dom/index.js
@@ -6,7 +6,7 @@ import BlobProvider from './BlobProvider';
import PDFDownloadLink from './PDFDownloadLink';
import { pdf, version, Font, StyleSheet } from '../index';
-const throwEnvironmentError = name => {
+const throwEnvironmentError = (name) => {
throw new Error(
`${name} is a Node specific API. You're either using this method in a browser, or your bundler is not loading react-pdf from the appropriate web build.`,
);
diff --git a/packages/renderer/src/dom/usePDF.js b/packages/renderer/src/dom/usePDF.js
index 0d467ff82..fd7a5e1e7 100644
--- a/packages/renderer/src/dom/usePDF.js
+++ b/packages/renderer/src/dom/usePDF.js
@@ -20,19 +20,19 @@ export const usePDF = ({ document, currentPageCallBack } = {}) => {
const renderQueue = queue({ autostart: true, concurrency: 1 });
const queueDocumentRender = () => {
- setState(prev => ({ ...prev, loading: true }));
+ setState((prev) => ({ ...prev, loading: true }));
renderQueue.splice(0, renderQueue.length, () =>
state.error ? Promise.resolve() : pdfInstance.current.toBlob(),
);
};
- const onRenderFailed = error => {
+ const onRenderFailed = (error) => {
console.error(error);
- setState(prev => ({ ...prev, loading: false, error }));
+ setState((prev) => ({ ...prev, loading: false, error }));
};
- const onRenderSuccessful = blob => {
+ const onRenderSuccessful = (blob) => {
setState({
blob,
error: null,
@@ -65,7 +65,7 @@ export const usePDF = ({ document, currentPageCallBack } = {}) => {
};
}, [state.url]);
- const update = useCallback(newDoc => {
+ const update = useCallback((newDoc) => {
pdfInstance.current.updateContainer(newDoc);
}, []);
diff --git a/packages/renderer/src/index.js b/packages/renderer/src/index.js
index be0ee41f7..0b6c7d9a2 100644
--- a/packages/renderer/src/index.js
+++ b/packages/renderer/src/index.js
@@ -4,7 +4,9 @@ import PDFDocument from '@react-pdf/pdfkit';
import layoutDocument from '@react-pdf/layout';
import createRenderer from './renderer';
-import { version } from '../package.json';
+import packageJson from '../package.json';
+
+const { version } = packageJson;
const fontStore = new FontStore();
@@ -58,13 +60,11 @@ const pdf = (initialValue,currentPageCallBack) => {
const toBlob = async () => {
const chunks = [];
- const {
- layout: _INTERNAL__LAYOUT__DATA_,
- fileStream: instance,
- } = await render();
+ const { layout: _INTERNAL__LAYOUT__DATA_, fileStream: instance } =
+ await render();
return new Promise((resolve, reject) => {
- instance.on('data', chunk => {
+ instance.on('data', (chunk) => {
chunks.push(
chunk instanceof Uint8Array ? chunk : new Uint8Array(chunk),
);
@@ -84,8 +84,13 @@ const pdf = (initialValue,currentPageCallBack) => {
// TODO: rename this method to `toStream` in next major release, because it return stream not a buffer
const toBuffer = async () => {
- callOnRender();
- return (await render()).fileStream;
+ const {
+ layout: _INTERNAL__LAYOUT__DATA_,
+ fileStream,
+ } = await render();
+ callOnRender({_INTERNAL__LAYOUT__DATA_});
+
+ return fileStream;
};
/*
@@ -106,7 +111,7 @@ const pdf = (initialValue,currentPageCallBack) => {
return new Promise((resolve, reject) => {
try {
- instance.on('data', buffer => {
+ instance.on('data', (buffer) => {
result += buffer;
});
@@ -145,7 +150,7 @@ const pdf = (initialValue,currentPageCallBack) => {
const Font = fontStore;
const StyleSheet = {
- create: s => s,
+ create: (s) => s,
};
export { version, Font, StyleSheet, pdf, createRenderer };
diff --git a/packages/renderer/src/node/index.js b/packages/renderer/src/node/index.js
index b12aa3acb..07cd7f90d 100644
--- a/packages/renderer/src/node/index.js
+++ b/packages/renderer/src/node/index.js
@@ -3,7 +3,7 @@ import * as primitives from '@react-pdf/primitives';
import { renderToFile, renderToStream, renderToString } from './renderTo';
import { pdf, version, Font, StyleSheet } from '../index';
-const throwEnvironmentError = name => {
+const throwEnvironmentError = (name) => {
throw new Error(
`${name} is a web specific API. You're either using this component on Node, or your bundler is not loading react-pdf from the appropriate web build.`,
);
diff --git a/packages/renderer/src/node/renderTo.js b/packages/renderer/src/node/renderTo.js
index 738e2ac4f..201c8789e 100644
--- a/packages/renderer/src/node/renderTo.js
+++ b/packages/renderer/src/node/renderTo.js
@@ -3,12 +3,21 @@ import { Buffer } from 'buffer';
import { pdf } from '../index';
-export const renderToStream = async element => {
+/**
+ * @param {React.ReactElement} element
+ * @returns {Promise}
+ */
+export const renderToStream = async (element) => {
const instance = pdf(element);
const stream = await instance.toBuffer();
return stream;
};
+/**
+ * @param {React.ReactElement} element
+ * @param {string} filePath
+ * @param {Function} [callback]
+ */
export const renderToFile = async (element, filePath, callback) => {
const output = await renderToStream(element);
const stream = fs.createWriteStream(filePath);
@@ -24,23 +33,27 @@ export const renderToFile = async (element, filePath, callback) => {
});
};
-export const renderToBuffer = element =>
+/**
+ * @param {React.ReactElement} element
+ * @returns {Promise}
+ */
+export const renderToBuffer = (element) =>
renderToStream(element).then(
- stream =>
+ (stream) =>
new Promise((resolve, reject) => {
const chunks = [];
- stream.on('data', chunk => chunks.push(chunk));
+ stream.on('data', (chunk) => chunks.push(chunk));
stream.on('end', () => resolve(Buffer.concat(chunks)));
- stream.on('error', error => reject(error));
+ stream.on('error', (error) => reject(error));
}),
);
-export const renderToString = element => {
+export const renderToString = (element) => {
if (process.env.NODE_ENV === 'development') {
console.warn(
'`renderToString` is deprecated and will be removed in next major release, use `renderToBuffer` instead',
);
}
- return renderToBuffer(element).then(buffer => buffer.toString());
+ return renderToBuffer(element).then((buffer) => buffer.toString());
};
diff --git a/packages/renderer/src/utils/propsEqual.js b/packages/renderer/src/utils/propsEqual.js
index 265b95cd6..093777945 100644
--- a/packages/renderer/src/utils/propsEqual.js
+++ b/packages/renderer/src/utils/propsEqual.js
@@ -3,9 +3,9 @@
/**
* Checks if two sets of props are equal (recursively)
*
- * @param {Object} props A
- * @param {Object} props B
- * @returns {Boolean} props equals?
+ * @param {Object} a props A
+ * @param {Object} b props B
+ * @returns {boolean} props equals?
*
*/
const propsEqual = (a, b) => {
diff --git a/packages/renderer/tests/components.test.js b/packages/renderer/tests/components.test.jsx
similarity index 88%
rename from packages/renderer/tests/components.test.js
rename to packages/renderer/tests/components.test.jsx
index 35883748b..9c6ce65c9 100644
--- a/packages/renderer/tests/components.test.js
+++ b/packages/renderer/tests/components.test.jsx
@@ -1,8 +1,5 @@
-/**
- * @jest-environment ./tests/environment/jsdom.js
- */
-
-/* eslint-disable import/no-extraneous-dependencies */
+// Note that this file is ran using a separate Vitest configuration
+import { describe, expect, it, vi } from 'vitest';
import { render, waitFor, screen } from '@testing-library/react';
import {
BlobProvider,
@@ -11,7 +8,7 @@ import {
Document,
Page,
Text,
-} from '../src/dom';
+} from '@react-pdf/renderer';
const TestDocument = ({ title = 'Default' }) => (
@@ -23,7 +20,7 @@ const TestDocument = ({ title = 'Default' }) => (
describe('BlobProvider', () => {
it('works', async () => {
- const renderFunction = jest.fn();
+ const renderFunction = vi.fn();
render(
}>{renderFunction},
@@ -44,7 +41,7 @@ describe('BlobProvider', () => {
describe('BlobProvider', () => {
it('works', async () => {
- const renderFunction = jest.fn();
+ const renderFunction = vi.fn();
render(
}>{renderFunction},
diff --git a/packages/renderer/tests/debug.test.js b/packages/renderer/tests/debug.test.jsx
similarity index 92%
rename from packages/renderer/tests/debug.test.js
rename to packages/renderer/tests/debug.test.jsx
index 511ea6c8f..44beda731 100644
--- a/packages/renderer/tests/debug.test.js
+++ b/packages/renderer/tests/debug.test.jsx
@@ -1,4 +1,6 @@
-import { Document, Page, View, Text, Font } from '..';
+import { describe, expect, test } from 'vitest';
+
+import { Document, Page, View, Text, Font } from '@react-pdf/renderer';
import renderToImage from './renderComponent';
// pdf.js does not render default fonts in node and I use Open Sans (:
diff --git a/packages/renderer/tests/dom.test.js b/packages/renderer/tests/dom.test.jsx
similarity index 73%
rename from packages/renderer/tests/dom.test.js
rename to packages/renderer/tests/dom.test.jsx
index 117b04817..d329c66a7 100644
--- a/packages/renderer/tests/dom.test.js
+++ b/packages/renderer/tests/dom.test.jsx
@@ -1,6 +1,6 @@
-/* eslint-disable import/no-named-as-default-member */
+import { describe, expect, test } from 'vitest';
-import ReactPDF from '../src/dom';
+import ReactPDF from '@react-pdf/renderer';
describe('dom', () => {
test('should export font store', () => {
@@ -16,14 +16,17 @@ describe('dom', () => {
});
test('should throw error when trying to use renderToString', () => {
+ // @ts-expect-error - intentionally invalid call
expect(() => ReactPDF.renderToString()).toThrow();
});
test('should throw error when trying to use renderToStream', () => {
+ // @ts-expect-error - intentionally invalid call
expect(() => ReactPDF.renderToStream()).toThrow();
});
test('should throw error when trying to use renderToFile', () => {
+ // @ts-expect-error - intentionally invalid call
expect(() => ReactPDF.renderToFile()).toThrow();
});
});
diff --git a/packages/renderer/tests/emoji.test.js b/packages/renderer/tests/emoji.test.jsx
similarity index 86%
rename from packages/renderer/tests/emoji.test.js
rename to packages/renderer/tests/emoji.test.jsx
index 333747b06..405f30685 100644
--- a/packages/renderer/tests/emoji.test.js
+++ b/packages/renderer/tests/emoji.test.jsx
@@ -1,10 +1,12 @@
+import { describe, expect, test } from 'vitest';
+
+import { Document, Page, Text, Font } from '@react-pdf/renderer';
import renderToImage from './renderComponent';
-import { Document, Page, Text, Font } from '..';
describe('emoji', () => {
test('should support builder function', async () => {
Font.registerEmojiSource({
- builder: code =>
+ builder: (code) =>
`https://cdn.jsdelivr.net/gh/shuding/fluentui-emoji-unicode/assets/${code.toLowerCase()}_3d.png`,
});
diff --git a/packages/renderer/tests/environment/jsdom.js b/packages/renderer/tests/environment/jsdom.js
index 7be5492c4..3a21c8a30 100644
--- a/packages/renderer/tests/environment/jsdom.js
+++ b/packages/renderer/tests/environment/jsdom.js
@@ -1,28 +1,45 @@
-/* eslint-disable import/no-extraneous-dependencies */
-const Environment = require('jest-environment-jsdom').default;
-const { TextEncoder, TextDecoder } = require('util');
-
-class CustomEnvironment extends Environment {
- async setup() {
- await super.setup();
-
- if (typeof this.global.TextEncoder === 'undefined') {
- this.global.TextEncoder = TextEncoder;
- this.global.TextDecoder = TextDecoder;
- }
-
- if (typeof this.global.TextDecoder === 'undefined') {
- this.global.TextDecoder = TextDecoder;
- }
-
- if (typeof this.global.URL.createObjectURL === 'undefined') {
- this.global.URL.createObjectURL = blob => `[Blob - ${blob.size}]`;
- }
-
- if (typeof this.global.URL.revokeObjectURL === 'undefined') {
- this.global.URL.revokeObjectURL = () => undefined;
- }
+// false positive on import/no-unresolved
+// eslint-disable-next-line import/no-unresolved
+import { builtinEnvironments } from 'vitest/environments';
+
+function patchGlobals() {
+ if (typeof global.TextEncoder === 'undefined') {
+ global.TextEncoder = TextEncoder;
+ global.TextDecoder = TextDecoder;
+ }
+
+ if (typeof global.TextDecoder === 'undefined') {
+ global.TextDecoder = TextDecoder;
+ }
+
+ if (typeof global.URL.createObjectURL === 'undefined') {
+ global.URL.createObjectURL = (blob) => `[Blob - ${blob.size}]`;
+ }
+
+ if (typeof global.URL.revokeObjectURL === 'undefined') {
+ global.URL.revokeObjectURL = () => undefined;
}
}
-module.exports = CustomEnvironment;
+export default {
+ name: 'jsdom',
+ transformMode: 'web',
+ async setupVM({ jsdom = {} }) {
+ const superSetup = builtinEnvironments.jsdom.setupVM;
+
+ const result = await superSetup({ jsdom });
+
+ patchGlobals();
+
+ return result;
+ },
+ async setup(global, { jsdom = {} }) {
+ const superSetup = builtinEnvironments.jsdom.setup;
+
+ const result = await superSetup(global, { jsdom });
+
+ patchGlobals();
+
+ return result;
+ },
+};
diff --git a/packages/renderer/tests/flex.test.js b/packages/renderer/tests/flex.test.jsx
similarity index 94%
rename from packages/renderer/tests/flex.test.js
rename to packages/renderer/tests/flex.test.jsx
index a487b8900..2e52d1515 100644
--- a/packages/renderer/tests/flex.test.js
+++ b/packages/renderer/tests/flex.test.jsx
@@ -1,8 +1,10 @@
/* eslint-disable react/no-array-index-key */
-import { Document, Page, View } from '..';
+import { describe, expect, test } from 'vitest';
+
+import { Document, Page, View } from '@react-pdf/renderer';
import renderToImage from './renderComponent';
-const mount = async children => {
+const mount = async (children) => {
const image = await renderToImage(
diff --git a/packages/renderer/tests/gap.test.js b/packages/renderer/tests/gap.test.jsx
similarity index 92%
rename from packages/renderer/tests/gap.test.js
rename to packages/renderer/tests/gap.test.jsx
index 07315fed4..1a5ed0bdc 100644
--- a/packages/renderer/tests/gap.test.js
+++ b/packages/renderer/tests/gap.test.jsx
@@ -1,8 +1,10 @@
/* eslint-disable react/no-array-index-key */
-import { Document, Page, View } from '..';
+import { describe, expect, test } from 'vitest';
+
+import { Document, Page, View } from '@react-pdf/renderer';
import renderToImage from './renderComponent';
-const mount = async children => {
+const mount = async (children) => {
const image = await renderToImage(
{children}
diff --git a/packages/renderer/tests/images.test.jsx b/packages/renderer/tests/images.test.jsx
new file mode 100644
index 000000000..5cc8bd302
--- /dev/null
+++ b/packages/renderer/tests/images.test.jsx
@@ -0,0 +1,46 @@
+import { describe, expect, test } from 'vitest';
+import fs from 'fs';
+import url from 'url';
+import path from 'path';
+import { Document, Page, View, Image } from '@react-pdf/renderer';
+import renderToImage from './renderComponent';
+
+const __dirname = path.dirname(url.fileURLToPath(import.meta.url));
+
+const Orientation1 = fs.readFileSync(`${__dirname}/images/orientation-1.jpeg`);
+const Orientation2 = fs.readFileSync(`${__dirname}/images/orientation-2.jpeg`);
+const Orientation3 = fs.readFileSync(`${__dirname}/images/orientation-3.jpeg`);
+const Orientation4 = fs.readFileSync(`${__dirname}/images/orientation-4.jpeg`);
+const Orientation5 = fs.readFileSync(`${__dirname}/images/orientation-5.jpeg`);
+const Orientation6 = fs.readFileSync(`${__dirname}/images/orientation-6.jpeg`);
+const Orientation7 = fs.readFileSync(`${__dirname}/images/orientation-7.jpeg`);
+const Orientation8 = fs.readFileSync(`${__dirname}/images/orientation-8.jpeg`);
+
+const mount = async (children) => {
+ const image = await renderToImage(
+
+ {children}
+ ,
+ );
+
+ return image;
+};
+
+describe('Image', () => {
+ test('should render jpgs with different exif orientations', async () => {
+ const image = await mount(
+
+
+
+
+
+
+
+
+
+ ,
+ );
+
+ expect(image).toMatchImageSnapshot();
+ });
+});
diff --git a/packages/renderer/tests/images/orientation-1.jpeg b/packages/renderer/tests/images/orientation-1.jpeg
new file mode 100644
index 000000000..015c5f177
Binary files /dev/null and b/packages/renderer/tests/images/orientation-1.jpeg differ
diff --git a/packages/renderer/tests/images/orientation-2.jpeg b/packages/renderer/tests/images/orientation-2.jpeg
new file mode 100644
index 000000000..2e7fb579a
Binary files /dev/null and b/packages/renderer/tests/images/orientation-2.jpeg differ
diff --git a/packages/renderer/tests/images/orientation-3.jpeg b/packages/renderer/tests/images/orientation-3.jpeg
new file mode 100644
index 000000000..74505cfc1
Binary files /dev/null and b/packages/renderer/tests/images/orientation-3.jpeg differ
diff --git a/packages/renderer/tests/images/orientation-4.jpeg b/packages/renderer/tests/images/orientation-4.jpeg
new file mode 100644
index 000000000..ea133fbb0
Binary files /dev/null and b/packages/renderer/tests/images/orientation-4.jpeg differ
diff --git a/packages/renderer/tests/images/orientation-5.jpeg b/packages/renderer/tests/images/orientation-5.jpeg
new file mode 100644
index 000000000..81a8af69b
Binary files /dev/null and b/packages/renderer/tests/images/orientation-5.jpeg differ
diff --git a/packages/renderer/tests/images/orientation-6.jpeg b/packages/renderer/tests/images/orientation-6.jpeg
new file mode 100644
index 000000000..7426aba04
Binary files /dev/null and b/packages/renderer/tests/images/orientation-6.jpeg differ
diff --git a/packages/renderer/tests/images/orientation-7.jpeg b/packages/renderer/tests/images/orientation-7.jpeg
new file mode 100644
index 000000000..a541d95e7
Binary files /dev/null and b/packages/renderer/tests/images/orientation-7.jpeg differ
diff --git a/packages/renderer/tests/images/orientation-8.jpeg b/packages/renderer/tests/images/orientation-8.jpeg
new file mode 100644
index 000000000..3f51d2873
Binary files /dev/null and b/packages/renderer/tests/images/orientation-8.jpeg differ
diff --git a/packages/renderer/tests/link.test.js b/packages/renderer/tests/link.test.jsx
similarity index 87%
rename from packages/renderer/tests/link.test.js
rename to packages/renderer/tests/link.test.jsx
index 0acdf4e04..44946d538 100644
--- a/packages/renderer/tests/link.test.js
+++ b/packages/renderer/tests/link.test.jsx
@@ -1,4 +1,6 @@
-import { Document, Page, Link, Font, Text } from '..';
+import { describe, expect, test } from 'vitest';
+
+import { Document, Page, Link, Font, Text } from '@react-pdf/renderer';
import renderToImage from './renderComponent';
// pdf.js does not render default fonts in node and I use Open Sans (:
@@ -7,7 +9,7 @@ Font.register({
src: 'https://fonts.gstatic.com/s/opensans/v17/mem8YaGs126MiZpBA-UFVZ0e.ttf',
});
-const mount = async children => {
+const mount = async (children) => {
const image = await renderToImage(
{children}
diff --git a/packages/renderer/tests/namedDestinations.test.jsx b/packages/renderer/tests/namedDestinations.test.jsx
new file mode 100644
index 000000000..09e1d32d2
--- /dev/null
+++ b/packages/renderer/tests/namedDestinations.test.jsx
@@ -0,0 +1,36 @@
+import { describe, expect, test } from 'vitest';
+
+import { Document, Font, Link, Page, Text, View } from '@react-pdf/renderer';
+import renderToImage from './renderComponent';
+
+Font.register({
+ family: 'Lato',
+ src: 'https://fonts.gstatic.com/s/lato/v16/S6uyw4BMUTPHjx4wWw.ttf',
+});
+
+const Doc = () => (
+
+
+
+
+ Click me to get to the named destination
+
+
+
+ Here is the named destination
+
+
+
+);
+
+describe('named destinations', () => {
+ test('should visually match snapshot', async () => {
+ const image = await renderToImage( );
+
+ expect(image).toMatchImageSnapshot();
+ });
+});
diff --git a/packages/renderer/tests/node.test.js b/packages/renderer/tests/node.test.jsx
similarity index 88%
rename from packages/renderer/tests/node.test.js
rename to packages/renderer/tests/node.test.jsx
index e9e2f286d..9cbd26eb5 100644
--- a/packages/renderer/tests/node.test.js
+++ b/packages/renderer/tests/node.test.jsx
@@ -1,10 +1,18 @@
/* eslint-disable import/no-named-as-default-member */
+import { describe, expect, test, vi } from 'vitest';
import fs from 'fs';
+import path from 'path';
+import url from 'url';
import ReactPDF from '../src/node';
const { Document, Page, View } = ReactPDF;
+const __dirname = path.dirname(url.fileURLToPath(import.meta.url));
+
+/**
+ * @param {Object} props
+ */
const TestDocument = ({ onRender }) => {
return (
@@ -24,7 +32,7 @@ describe('node', () => {
});
test('should render to string call render callback', async () => {
- const mock = jest.fn();
+ const mock = vi.fn();
await ReactPDF.renderToString( );
@@ -39,7 +47,7 @@ describe('node', () => {
});
test('should render to stream call render callback', async () => {
- const mock = jest.fn();
+ const mock = vi.fn();
await ReactPDF.renderToStream( );
@@ -47,12 +55,12 @@ describe('node', () => {
});
test('should render to file', async () => {
- const path = `${__dirname}/test.pdf`;
- await ReactPDF.renderToFile( , path);
+ const pdfPath = `${__dirname}/test.pdf`;
+ await ReactPDF.renderToFile( , pdfPath);
- expect(fs.existsSync(path)).toBeTruthy();
+ expect(fs.existsSync(pdfPath)).toBeTruthy();
- fs.unlinkSync(path);
+ fs.unlinkSync(pdfPath);
});
test('should export font store', () => {
@@ -84,7 +92,7 @@ describe('node', () => {
});
test('should render a fragment', async () => {
- const mock = jest.fn();
+ const mock = vi.fn();
const doc = (
@@ -105,7 +113,7 @@ describe('node', () => {
});
test('should render a fragment in render', async () => {
- const renderMock = jest.fn().mockReturnValue(
+ const renderMock = vi.fn().mockReturnValue(
<>
@@ -126,7 +134,7 @@ describe('node', () => {
});
test('should render a child array', async () => {
- const mock = jest.fn();
+ const mock = vi.fn();
const children = [
{
,
];
- const renderMock = jest.fn().mockReturnValue(children);
+ const renderMock = vi.fn().mockReturnValue(children);
const doc = (
@@ -181,7 +189,7 @@ describe('node', () => {
/>
);
- const renderMock = jest.fn().mockReturnValue(renderNode);
+ const renderMock = vi.fn().mockReturnValue(renderNode);
const doc = (
diff --git a/packages/renderer/tests/orphanTexts.test.js b/packages/renderer/tests/orphanTexts.test.jsx
similarity index 93%
rename from packages/renderer/tests/orphanTexts.test.js
rename to packages/renderer/tests/orphanTexts.test.jsx
index d48d2212c..58ee6a773 100644
--- a/packages/renderer/tests/orphanTexts.test.js
+++ b/packages/renderer/tests/orphanTexts.test.jsx
@@ -1,10 +1,11 @@
-/* eslint-disable react/jsx-curly-brace-presence */
+import { describe, expect, test } from 'vitest';
+
import { Text, Document, Page } from '@react-pdf/primitives';
import renderToImage from './renderComponent';
const emptyString = '';
-const mount = async children => {
+const mount = async (children) => {
const image = await renderToImage(
{children}
diff --git a/packages/renderer/tests/pageWrap.test.js b/packages/renderer/tests/pageWrap.test.jsx
similarity index 98%
rename from packages/renderer/tests/pageWrap.test.js
rename to packages/renderer/tests/pageWrap.test.jsx
index b4c9d620a..b10f5b902 100644
--- a/packages/renderer/tests/pageWrap.test.js
+++ b/packages/renderer/tests/pageWrap.test.jsx
@@ -1,6 +1,14 @@
-/* eslint-disable react/no-array-index-key */
+import { describe, expect, test } from 'vitest';
+
+import {
+ Document,
+ Font,
+ Page,
+ Text,
+ Image,
+ StyleSheet,
+} from '@react-pdf/renderer';
import renderToImage from './renderComponent';
-import { Document, Font, Page, Text, Image, StyleSheet } from '..';
const styles = StyleSheet.create({
body: {
diff --git a/packages/renderer/tests/propsEqual.test.js b/packages/renderer/tests/propsEqual.test.js
index f724b3bfa..80ad27399 100644
--- a/packages/renderer/tests/propsEqual.test.js
+++ b/packages/renderer/tests/propsEqual.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import propsEqual from '../src/utils/propsEqual';
describe('propsEqual', () => {
diff --git a/packages/renderer/tests/renderComponent.js b/packages/renderer/tests/renderComponent.js
index 0ddeeb552..d28bed78f 100644
--- a/packages/renderer/tests/renderComponent.js
+++ b/packages/renderer/tests/renderComponent.js
@@ -1,10 +1,9 @@
-/* eslint-disable import/no-extraneous-dependencies */
/* eslint-disable no-param-reassign */
import Canvas from 'canvas';
-import * as pdfjs from 'pdfjs-dist/legacy/build/pdf';
+import pdfjs from 'pdfjs-dist/legacy/build/pdf';
-import { renderToBuffer } from '..';
+import { renderToBuffer } from '@react-pdf/renderer';
/**
* copy-pasted code from
@@ -54,7 +53,7 @@ async function getCanvas(pagePromise) {
}
const GAP = 10;
-const composeCanvases = canvases => {
+const composeCanvases = (canvases) => {
const [maxWidth, maxHeight] = canvases.reduce(
([width, height], canvas) => [
Math.max(width, canvas.width),
@@ -90,9 +89,9 @@ const composeCanvases = canvases => {
* @param {number} length — size of array
* @returns {number[]} array
*/
-const range = length => Array.from({ length }, (_, index) => index);
+const range = (length) => Array.from({ length }, (_, index) => index);
-const renderComponent = async element => {
+const renderComponent = async (element) => {
const source = await renderToBuffer(element);
const document = await pdfjs.getDocument({
@@ -100,7 +99,7 @@ const renderComponent = async element => {
verbosity: 0,
}).promise;
- const pages = range(document.numPages).map(pageIndex =>
+ const pages = range(document.numPages).map((pageIndex) =>
document.getPage(pageIndex + 1),
);
@@ -108,7 +107,7 @@ const renderComponent = async element => {
return (await getCanvas(pages[0])).toBuffer();
}
- const canvases = await Promise.all(pages.map(page => getCanvas(page)));
+ const canvases = await Promise.all(pages.map((page) => getCanvas(page)));
const pageSnapshots = composeCanvases(canvases);
return pageSnapshots.toBuffer();
diff --git a/packages/renderer/tests/resume.test.js b/packages/renderer/tests/resume.test.jsx
similarity index 97%
rename from packages/renderer/tests/resume.test.js
rename to packages/renderer/tests/resume.test.jsx
index 1a32b5d4c..e9c714766 100644
--- a/packages/renderer/tests/resume.test.js
+++ b/packages/renderer/tests/resume.test.jsx
@@ -1,6 +1,17 @@
/* eslint-disable react/no-array-index-key */
+import { describe, expect, test } from 'vitest';
+
+import {
+ Link,
+ Text,
+ Font,
+ Page,
+ View,
+ Image,
+ Document,
+ StyleSheet,
+} from '@react-pdf/renderer';
import renderToImage from './renderComponent';
-import { Link, Text, Font, Page, View, Image, Document, StyleSheet } from '..';
const headerStyles = StyleSheet.create({
container: {
@@ -175,9 +186,6 @@ const expStyles = StyleSheet.create({
fontSize: 11,
fontFamily: 'Lato Italic',
},
- detailContainer: {
- flexDirection: 'row',
- },
detailLeftColumn: {
flexDirection: 'column',
marginLeft: 10,
@@ -230,9 +238,7 @@ const ExperienceEntry = ({ company, details, position, date }) => {
{details.map((detail, i) => (
- -
- {detail}
-
+ - {detail}
))}
@@ -359,7 +365,7 @@ Font.register({
src: 'https://fonts.gstatic.com/s/lato/v16/S6u9w4BMUTPHh6UVSwiPHA.ttf',
});
-const Resume = props => (
+const Resume = (props) => (
diff --git a/packages/renderer/tests/snapshots/debug-test-js-debug-should-show-origin-pointer-1-snap.png b/packages/renderer/tests/snapshots/debug-test-jsx-tests-debug-test-jsx-debug-should-show-origin-pointer-1-snap.png
similarity index 100%
rename from packages/renderer/tests/snapshots/debug-test-js-debug-should-show-origin-pointer-1-snap.png
rename to packages/renderer/tests/snapshots/debug-test-jsx-tests-debug-test-jsx-debug-should-show-origin-pointer-1-snap.png
diff --git a/packages/renderer/tests/snapshots/debug-test-js-debug-should-show-paddings-and-margins-1-snap.png b/packages/renderer/tests/snapshots/debug-test-jsx-tests-debug-test-jsx-debug-should-show-paddings-and-margins-1-snap.png
similarity index 100%
rename from packages/renderer/tests/snapshots/debug-test-js-debug-should-show-paddings-and-margins-1-snap.png
rename to packages/renderer/tests/snapshots/debug-test-jsx-tests-debug-test-jsx-debug-should-show-paddings-and-margins-1-snap.png
diff --git a/packages/renderer/tests/snapshots/debug-test-js-debug-should-show-size-of-text-component-1-snap.png b/packages/renderer/tests/snapshots/debug-test-jsx-tests-debug-test-jsx-debug-should-show-size-of-text-component-1-snap.png
similarity index 100%
rename from packages/renderer/tests/snapshots/debug-test-js-debug-should-show-size-of-text-component-1-snap.png
rename to packages/renderer/tests/snapshots/debug-test-jsx-tests-debug-test-jsx-debug-should-show-size-of-text-component-1-snap.png
diff --git a/packages/renderer/tests/snapshots/emoji-test-js-emoji-should-support-builder-function-1-snap.png b/packages/renderer/tests/snapshots/emoji-test-jsx-tests-emoji-test-jsx-emoji-should-support-builder-function-1-snap.png
similarity index 100%
rename from packages/renderer/tests/snapshots/emoji-test-js-emoji-should-support-builder-function-1-snap.png
rename to packages/renderer/tests/snapshots/emoji-test-jsx-tests-emoji-test-jsx-emoji-should-support-builder-function-1-snap.png
diff --git a/packages/renderer/tests/snapshots/emoji-test-js-emoji-should-support-unicode-13-0-emoji-1-snap.png b/packages/renderer/tests/snapshots/emoji-test-jsx-tests-emoji-test-jsx-emoji-should-support-unicode-13-0-emoji-1-snap.png
similarity index 100%
rename from packages/renderer/tests/snapshots/emoji-test-js-emoji-should-support-unicode-13-0-emoji-1-snap.png
rename to packages/renderer/tests/snapshots/emoji-test-jsx-tests-emoji-test-jsx-emoji-should-support-unicode-13-0-emoji-1-snap.png
diff --git a/packages/renderer/tests/snapshots/flex-test-js-flex-shorthand-should-do-not-grow-on-default-1-snap.png b/packages/renderer/tests/snapshots/flex-test-jsx-tests-flex-test-jsx-flex-shorthand-should-do-not-grow-on-default-1-snap.png
similarity index 100%
rename from packages/renderer/tests/snapshots/flex-test-js-flex-shorthand-should-do-not-grow-on-default-1-snap.png
rename to packages/renderer/tests/snapshots/flex-test-jsx-tests-flex-test-jsx-flex-shorthand-should-do-not-grow-on-default-1-snap.png
diff --git a/packages/renderer/tests/snapshots/flex-test-js-flex-shorthand-should-shrink-on-default-1-snap.png b/packages/renderer/tests/snapshots/flex-test-jsx-tests-flex-test-jsx-flex-shorthand-should-shrink-on-default-1-snap.png
similarity index 100%
rename from packages/renderer/tests/snapshots/flex-test-js-flex-shorthand-should-shrink-on-default-1-snap.png
rename to packages/renderer/tests/snapshots/flex-test-jsx-tests-flex-test-jsx-flex-shorthand-should-shrink-on-default-1-snap.png
diff --git a/packages/renderer/tests/snapshots/flex-test-js-flex-shorthand-should-support-auto-1-snap.png b/packages/renderer/tests/snapshots/flex-test-jsx-tests-flex-test-jsx-flex-shorthand-should-support-auto-1-snap.png
similarity index 100%
rename from packages/renderer/tests/snapshots/flex-test-js-flex-shorthand-should-support-auto-1-snap.png
rename to packages/renderer/tests/snapshots/flex-test-jsx-tests-flex-test-jsx-flex-shorthand-should-support-auto-1-snap.png
diff --git a/packages/renderer/tests/snapshots/flex-test-js-flex-shorthand-should-support-flex-basis-auto-1-snap.png b/packages/renderer/tests/snapshots/flex-test-jsx-tests-flex-test-jsx-flex-shorthand-should-support-flex-basis-auto-1-snap.png
similarity index 100%
rename from packages/renderer/tests/snapshots/flex-test-js-flex-shorthand-should-support-flex-basis-auto-1-snap.png
rename to packages/renderer/tests/snapshots/flex-test-jsx-tests-flex-test-jsx-flex-shorthand-should-support-flex-basis-auto-1-snap.png
diff --git a/packages/renderer/tests/snapshots/gap-test-js-flex-should-support-gap-1-snap.png b/packages/renderer/tests/snapshots/gap-test-jsx-tests-gap-test-jsx-flex-should-support-gap-1-snap.png
similarity index 100%
rename from packages/renderer/tests/snapshots/gap-test-js-flex-should-support-gap-1-snap.png
rename to packages/renderer/tests/snapshots/gap-test-jsx-tests-gap-test-jsx-flex-should-support-gap-1-snap.png
diff --git a/packages/renderer/tests/snapshots/gap-test-js-flex-should-support-row-gap-and-column-gap-1-snap.png b/packages/renderer/tests/snapshots/gap-test-jsx-tests-gap-test-jsx-flex-should-support-row-gap-and-column-gap-1-snap.png
similarity index 100%
rename from packages/renderer/tests/snapshots/gap-test-js-flex-should-support-row-gap-and-column-gap-1-snap.png
rename to packages/renderer/tests/snapshots/gap-test-jsx-tests-gap-test-jsx-flex-should-support-row-gap-and-column-gap-1-snap.png
diff --git a/packages/renderer/tests/snapshots/images-test-js-image-should-render-jpgs-with-different-exif-orientations-1-snap.png b/packages/renderer/tests/snapshots/images-test-js-image-should-render-jpgs-with-different-exif-orientations-1-snap.png
new file mode 100644
index 000000000..2226d7205
Binary files /dev/null and b/packages/renderer/tests/snapshots/images-test-js-image-should-render-jpgs-with-different-exif-orientations-1-snap.png differ
diff --git a/packages/renderer/tests/snapshots/images-test-jsx-tests-images-test-jsx-image-should-render-jpgs-with-different-exif-orientations-1-snap.png b/packages/renderer/tests/snapshots/images-test-jsx-tests-images-test-jsx-image-should-render-jpgs-with-different-exif-orientations-1-snap.png
new file mode 100644
index 000000000..2226d7205
Binary files /dev/null and b/packages/renderer/tests/snapshots/images-test-jsx-tests-images-test-jsx-image-should-render-jpgs-with-different-exif-orientations-1-snap.png differ
diff --git a/packages/renderer/tests/snapshots/link-test-js-link-should-render-text-1-snap.png b/packages/renderer/tests/snapshots/link-test-jsx-tests-link-test-jsx-link-should-render-text-1-snap.png
similarity index 100%
rename from packages/renderer/tests/snapshots/link-test-js-link-should-render-text-1-snap.png
rename to packages/renderer/tests/snapshots/link-test-jsx-tests-link-test-jsx-link-should-render-text-1-snap.png
diff --git a/packages/renderer/tests/snapshots/link-test-js-link-should-render-text-component-1-snap.png b/packages/renderer/tests/snapshots/link-test-jsx-tests-link-test-jsx-link-should-render-text-component-1-snap.png
similarity index 100%
rename from packages/renderer/tests/snapshots/link-test-js-link-should-render-text-component-1-snap.png
rename to packages/renderer/tests/snapshots/link-test-jsx-tests-link-test-jsx-link-should-render-text-component-1-snap.png
diff --git a/packages/renderer/tests/snapshots/named-destinations-test-jsx-tests-named-destinations-test-jsx-named-destinations-should-visually-match-snapshot-1-snap.png b/packages/renderer/tests/snapshots/named-destinations-test-jsx-tests-named-destinations-test-jsx-named-destinations-should-visually-match-snapshot-1-snap.png
new file mode 100644
index 000000000..0dec4a8ae
Binary files /dev/null and b/packages/renderer/tests/snapshots/named-destinations-test-jsx-tests-named-destinations-test-jsx-named-destinations-should-visually-match-snapshot-1-snap.png differ
diff --git a/packages/renderer/tests/snapshots/orphan-texts-test-js-renderer-boolean-1-snap.png b/packages/renderer/tests/snapshots/orphan-texts-test-jsx-tests-orphan-texts-test-jsx-renderer-boolean-1-snap.png
similarity index 100%
rename from packages/renderer/tests/snapshots/orphan-texts-test-js-renderer-boolean-1-snap.png
rename to packages/renderer/tests/snapshots/orphan-texts-test-jsx-tests-orphan-texts-test-jsx-renderer-boolean-1-snap.png
diff --git a/packages/renderer/tests/snapshots/orphan-texts-test-js-renderer-empty-string-1-snap.png b/packages/renderer/tests/snapshots/orphan-texts-test-jsx-tests-orphan-texts-test-jsx-renderer-empty-string-1-snap.png
similarity index 100%
rename from packages/renderer/tests/snapshots/orphan-texts-test-js-renderer-empty-string-1-snap.png
rename to packages/renderer/tests/snapshots/orphan-texts-test-jsx-tests-orphan-texts-test-jsx-renderer-empty-string-1-snap.png
diff --git a/packages/renderer/tests/snapshots/orphan-texts-test-js-renderer-empty-text-element-1-snap.png b/packages/renderer/tests/snapshots/orphan-texts-test-jsx-tests-orphan-texts-test-jsx-renderer-empty-text-element-1-snap.png
similarity index 100%
rename from packages/renderer/tests/snapshots/orphan-texts-test-js-renderer-empty-text-element-1-snap.png
rename to packages/renderer/tests/snapshots/orphan-texts-test-jsx-tests-orphan-texts-test-jsx-renderer-empty-text-element-1-snap.png
diff --git a/packages/renderer/tests/snapshots/orphan-texts-test-js-renderer-numbers-1-snap.png b/packages/renderer/tests/snapshots/orphan-texts-test-jsx-tests-orphan-texts-test-jsx-renderer-numbers-1-snap.png
similarity index 100%
rename from packages/renderer/tests/snapshots/orphan-texts-test-js-renderer-numbers-1-snap.png
rename to packages/renderer/tests/snapshots/orphan-texts-test-jsx-tests-orphan-texts-test-jsx-renderer-numbers-1-snap.png
diff --git a/packages/renderer/tests/snapshots/orphan-texts-test-js-renderer-string-1-snap.png b/packages/renderer/tests/snapshots/orphan-texts-test-jsx-tests-orphan-texts-test-jsx-renderer-string-1-snap.png
similarity index 100%
rename from packages/renderer/tests/snapshots/orphan-texts-test-js-renderer-string-1-snap.png
rename to packages/renderer/tests/snapshots/orphan-texts-test-jsx-tests-orphan-texts-test-jsx-renderer-string-1-snap.png
diff --git a/packages/renderer/tests/snapshots/orphan-texts-test-js-renderer-zero-1-snap.png b/packages/renderer/tests/snapshots/orphan-texts-test-jsx-tests-orphan-texts-test-jsx-renderer-zero-1-snap.png
similarity index 100%
rename from packages/renderer/tests/snapshots/orphan-texts-test-js-renderer-zero-1-snap.png
rename to packages/renderer/tests/snapshots/orphan-texts-test-jsx-tests-orphan-texts-test-jsx-renderer-zero-1-snap.png
diff --git a/packages/renderer/tests/snapshots/page-wrap-test-js-page-wrap-should-match-snapshot-1-snap.png b/packages/renderer/tests/snapshots/page-wrap-test-jsx-tests-page-wrap-test-jsx-page-wrap-should-match-snapshot-1-snap.png
similarity index 100%
rename from packages/renderer/tests/snapshots/page-wrap-test-js-page-wrap-should-match-snapshot-1-snap.png
rename to packages/renderer/tests/snapshots/page-wrap-test-jsx-tests-page-wrap-test-jsx-page-wrap-should-match-snapshot-1-snap.png
diff --git a/packages/renderer/tests/snapshots/resume-test-js-resume-should-match-snapshot-1-snap.png b/packages/renderer/tests/snapshots/resume-test-jsx-tests-resume-test-jsx-resume-should-match-snapshot-1-snap.png
similarity index 100%
rename from packages/renderer/tests/snapshots/resume-test-js-resume-should-match-snapshot-1-snap.png
rename to packages/renderer/tests/snapshots/resume-test-jsx-tests-resume-test-jsx-resume-should-match-snapshot-1-snap.png
diff --git a/packages/renderer/tests/snapshots/resume-test-js-resume-should-match-snapshot-2-snap.png b/packages/renderer/tests/snapshots/resume-test-jsx-tests-resume-test-jsx-resume-should-match-snapshot-2-snap.png
similarity index 100%
rename from packages/renderer/tests/snapshots/resume-test-js-resume-should-match-snapshot-2-snap.png
rename to packages/renderer/tests/snapshots/resume-test-jsx-tests-resume-test-jsx-resume-should-match-snapshot-2-snap.png
diff --git a/packages/renderer/tests/snapshots/resume-test-js-resume-should-match-snapshot-3-snap.png b/packages/renderer/tests/snapshots/resume-test-jsx-tests-resume-test-jsx-resume-should-match-snapshot-3-snap.png
similarity index 100%
rename from packages/renderer/tests/snapshots/resume-test-js-resume-should-match-snapshot-3-snap.png
rename to packages/renderer/tests/snapshots/resume-test-jsx-tests-resume-test-jsx-resume-should-match-snapshot-3-snap.png
diff --git a/packages/renderer/tests/snapshots/svg-test-js-svg-should-render-chart-1-snap.png b/packages/renderer/tests/snapshots/svg-test-jsx-tests-svg-test-jsx-svg-should-render-chart-1-snap.png
similarity index 100%
rename from packages/renderer/tests/snapshots/svg-test-js-svg-should-render-chart-1-snap.png
rename to packages/renderer/tests/snapshots/svg-test-jsx-tests-svg-test-jsx-svg-should-render-chart-1-snap.png
diff --git a/packages/renderer/tests/snapshots/svg-test-js-svg-should-render-chart-2-1-snap.png b/packages/renderer/tests/snapshots/svg-test-jsx-tests-svg-test-jsx-svg-should-render-chart-2-1-snap.png
similarity index 100%
rename from packages/renderer/tests/snapshots/svg-test-js-svg-should-render-chart-2-1-snap.png
rename to packages/renderer/tests/snapshots/svg-test-jsx-tests-svg-test-jsx-svg-should-render-chart-2-1-snap.png
diff --git a/packages/renderer/tests/snapshots/svg-test-jsx-tests-svg-test-jsx-svg-should-render-dasharrays-1-snap.png b/packages/renderer/tests/snapshots/svg-test-jsx-tests-svg-test-jsx-svg-should-render-dasharrays-1-snap.png
new file mode 100644
index 000000000..080eebd49
Binary files /dev/null and b/packages/renderer/tests/snapshots/svg-test-jsx-tests-svg-test-jsx-svg-should-render-dasharrays-1-snap.png differ
diff --git a/packages/renderer/tests/snapshots/svg-test-js-svg-should-render-svg-4-1-snap.png b/packages/renderer/tests/snapshots/svg-test-jsx-tests-svg-test-jsx-svg-should-render-gradients-1-snap.png
similarity index 100%
rename from packages/renderer/tests/snapshots/svg-test-js-svg-should-render-svg-4-1-snap.png
rename to packages/renderer/tests/snapshots/svg-test-jsx-tests-svg-test-jsx-svg-should-render-gradients-1-snap.png
diff --git a/packages/renderer/tests/snapshots/svg-test-js-svg-should-render-tiger-1-snap.png b/packages/renderer/tests/snapshots/svg-test-jsx-tests-svg-test-jsx-svg-should-render-tiger-1-snap.png
similarity index 100%
rename from packages/renderer/tests/snapshots/svg-test-js-svg-should-render-tiger-1-snap.png
rename to packages/renderer/tests/snapshots/svg-test-jsx-tests-svg-test-jsx-svg-should-render-tiger-1-snap.png
diff --git a/packages/renderer/tests/snapshots/svg-test-js-svg-should-render-tspan-component-1-snap.png b/packages/renderer/tests/snapshots/svg-test-jsx-tests-svg-test-jsx-svg-should-render-tspan-component-1-snap.png
similarity index 100%
rename from packages/renderer/tests/snapshots/svg-test-js-svg-should-render-tspan-component-1-snap.png
rename to packages/renderer/tests/snapshots/svg-test-jsx-tests-svg-test-jsx-svg-should-render-tspan-component-1-snap.png
diff --git a/packages/renderer/tests/snapshots/text-test-js-text-should-match-snapshot-1-snap.png b/packages/renderer/tests/snapshots/text-test-jsx-tests-text-test-jsx-text-should-match-snapshot-1-snap.png
similarity index 100%
rename from packages/renderer/tests/snapshots/text-test-js-text-should-match-snapshot-1-snap.png
rename to packages/renderer/tests/snapshots/text-test-jsx-tests-text-test-jsx-text-should-match-snapshot-1-snap.png
diff --git a/packages/renderer/tests/snapshots/text-test-js-text-should-support-vertical-align-super-and-sub-1-snap.png b/packages/renderer/tests/snapshots/text-test-jsx-tests-text-test-jsx-text-should-support-vertical-align-super-and-sub-1-snap.png
similarity index 100%
rename from packages/renderer/tests/snapshots/text-test-js-text-should-support-vertical-align-super-and-sub-1-snap.png
rename to packages/renderer/tests/snapshots/text-test-jsx-tests-text-test-jsx-text-should-support-vertical-align-super-and-sub-1-snap.png
diff --git a/packages/renderer/tests/snapshots/transform-test-js-transform-should-rotate-1-snap.png b/packages/renderer/tests/snapshots/transform-test-jsx-tests-transform-test-jsx-transform-should-rotate-1-snap.png
similarity index 100%
rename from packages/renderer/tests/snapshots/transform-test-js-transform-should-rotate-1-snap.png
rename to packages/renderer/tests/snapshots/transform-test-jsx-tests-transform-test-jsx-transform-should-rotate-1-snap.png
diff --git a/packages/renderer/tests/snapshots/transform-test-js-transform-should-scale-on-x-axis-1-snap.png b/packages/renderer/tests/snapshots/transform-test-jsx-tests-transform-test-jsx-transform-should-scale-on-x-axis-1-snap.png
similarity index 100%
rename from packages/renderer/tests/snapshots/transform-test-js-transform-should-scale-on-x-axis-1-snap.png
rename to packages/renderer/tests/snapshots/transform-test-jsx-tests-transform-test-jsx-transform-should-scale-on-x-axis-1-snap.png
diff --git a/packages/renderer/tests/snapshots/transform-test-js-transform-should-scale-on-y-axis-1-snap.png b/packages/renderer/tests/snapshots/transform-test-jsx-tests-transform-test-jsx-transform-should-scale-on-y-axis-1-snap.png
similarity index 100%
rename from packages/renderer/tests/snapshots/transform-test-js-transform-should-scale-on-y-axis-1-snap.png
rename to packages/renderer/tests/snapshots/transform-test-jsx-tests-transform-test-jsx-transform-should-scale-on-y-axis-1-snap.png
diff --git a/packages/renderer/tests/snapshots/transform-test-js-transform-should-scale-with-one-arg-1-snap.png b/packages/renderer/tests/snapshots/transform-test-jsx-tests-transform-test-jsx-transform-should-scale-with-one-arg-1-snap.png
similarity index 100%
rename from packages/renderer/tests/snapshots/transform-test-js-transform-should-scale-with-one-arg-1-snap.png
rename to packages/renderer/tests/snapshots/transform-test-jsx-tests-transform-test-jsx-transform-should-scale-with-one-arg-1-snap.png
diff --git a/packages/renderer/tests/snapshots/transform-test-js-transform-should-scale-with-two-args-1-snap.png b/packages/renderer/tests/snapshots/transform-test-jsx-tests-transform-test-jsx-transform-should-scale-with-two-args-1-snap.png
similarity index 100%
rename from packages/renderer/tests/snapshots/transform-test-js-transform-should-scale-with-two-args-1-snap.png
rename to packages/renderer/tests/snapshots/transform-test-jsx-tests-transform-test-jsx-transform-should-scale-with-two-args-1-snap.png
diff --git a/packages/renderer/tests/snapshots/transform-test-js-transform-should-translate-on-both-axis-1-snap.png b/packages/renderer/tests/snapshots/transform-test-jsx-tests-transform-test-jsx-transform-should-translate-on-both-axis-1-snap.png
similarity index 100%
rename from packages/renderer/tests/snapshots/transform-test-js-transform-should-translate-on-both-axis-1-snap.png
rename to packages/renderer/tests/snapshots/transform-test-jsx-tests-transform-test-jsx-transform-should-translate-on-both-axis-1-snap.png
diff --git a/packages/renderer/tests/snapshots/transform-test-js-transform-should-translate-on-x-axis-1-snap.png b/packages/renderer/tests/snapshots/transform-test-jsx-tests-transform-test-jsx-transform-should-translate-on-x-axis-1-snap.png
similarity index 100%
rename from packages/renderer/tests/snapshots/transform-test-js-transform-should-translate-on-x-axis-1-snap.png
rename to packages/renderer/tests/snapshots/transform-test-jsx-tests-transform-test-jsx-transform-should-translate-on-x-axis-1-snap.png
diff --git a/packages/renderer/tests/snapshots/transform-test-js-transform-should-translate-on-y-axis-1-snap.png b/packages/renderer/tests/snapshots/transform-test-jsx-tests-transform-test-jsx-transform-should-translate-on-y-axis-1-snap.png
similarity index 100%
rename from packages/renderer/tests/snapshots/transform-test-js-transform-should-translate-on-y-axis-1-snap.png
rename to packages/renderer/tests/snapshots/transform-test-jsx-tests-transform-test-jsx-transform-should-translate-on-y-axis-1-snap.png
diff --git a/packages/renderer/tests/snapshots/transform-test-js-transform-should-translate-to-zero-px-1-snap.png b/packages/renderer/tests/snapshots/transform-test-jsx-tests-transform-test-jsx-transform-should-translate-to-zero-px-1-snap.png
similarity index 100%
rename from packages/renderer/tests/snapshots/transform-test-js-transform-should-translate-to-zero-px-1-snap.png
rename to packages/renderer/tests/snapshots/transform-test-jsx-tests-transform-test-jsx-transform-should-translate-to-zero-px-1-snap.png
diff --git a/packages/renderer/tests/svg.test.js b/packages/renderer/tests/svg.test.jsx
similarity index 78%
rename from packages/renderer/tests/svg.test.js
rename to packages/renderer/tests/svg.test.jsx
index 317746de8..464f10d73 100644
--- a/packages/renderer/tests/svg.test.js
+++ b/packages/renderer/tests/svg.test.jsx
@@ -1,7 +1,9 @@
/* eslint-disable react/jsx-one-expression-per-line */
-import { Document, Page, Svg, Font, Text, Tspan } from '..';
+import { describe, expect, test } from 'vitest';
+
+import { Document, Page, Svg, Font, Text, Tspan } from '@react-pdf/renderer';
import renderToImage from './renderComponent';
-import { Tiger, Chart, Chart2, Gradients } from './svgs';
+import { Tiger, Chart, Chart2, Gradients, Dasharrays } from './svgs';
// pdf.js does not render default fonts in node and I use Open Sans (:
Font.register({
@@ -67,7 +69,8 @@ describe('Svg', () => {
expect(image).toMatchImageSnapshot();
});
- test('should render Svg4', async () => {
+
+ test('should render Gradients', async () => {
const image = await renderToImage(
@@ -78,4 +81,16 @@ describe('Svg', () => {
expect(image).toMatchImageSnapshot();
});
+
+ test('should render Dasharrays', async () => {
+ const image = await renderToImage(
+
+
+
+
+ ,
+ );
+
+ expect(image).toMatchImageSnapshot();
+ });
});
diff --git a/packages/renderer/tests/svgs.js b/packages/renderer/tests/svgs.jsx
similarity index 99%
rename from packages/renderer/tests/svgs.js
rename to packages/renderer/tests/svgs.jsx
index 847c5d6f4..259a9977a 100644
--- a/packages/renderer/tests/svgs.js
+++ b/packages/renderer/tests/svgs.jsx
@@ -12,7 +12,8 @@ import {
LinearGradient,
RadialGradient,
Stop,
-} from '..';
+ Line,
+} from '@react-pdf/renderer';
export const Tiger = () => (
@@ -811,3 +812,25 @@ export const Gradients = () => (
);
+
+export const Dasharrays = () => (
+
+
+
+
+);
diff --git a/packages/renderer/tests/text.test.js b/packages/renderer/tests/text.test.jsx
similarity index 95%
rename from packages/renderer/tests/text.test.js
rename to packages/renderer/tests/text.test.jsx
index a38cd07e7..74ea95ed3 100644
--- a/packages/renderer/tests/text.test.js
+++ b/packages/renderer/tests/text.test.jsx
@@ -1,7 +1,17 @@
/* eslint-disable react/jsx-one-expression-per-line */
/* eslint-disable react/no-array-index-key */
+import { describe, expect, test } from 'vitest';
+
+import {
+ Document,
+ Page,
+ View,
+ Text,
+ Link,
+ Font,
+ StyleSheet,
+} from '@react-pdf/renderer';
import renderToImage from './renderComponent';
-import { Document, Page, View, Text, Link, Font, StyleSheet } from '..';
const styles = StyleSheet.create({
title: {
diff --git a/packages/renderer/tests/transform.test.js b/packages/renderer/tests/transform.test.jsx
similarity index 95%
rename from packages/renderer/tests/transform.test.js
rename to packages/renderer/tests/transform.test.jsx
index 1253c0223..f6a700975 100644
--- a/packages/renderer/tests/transform.test.js
+++ b/packages/renderer/tests/transform.test.jsx
@@ -1,4 +1,6 @@
-import { Document, Page, View } from '..';
+import { describe, expect, test } from 'vitest';
+
+import { Document, Page, View } from '@react-pdf/renderer';
import renderToImage from './renderComponent';
const TestDocument = ({ transform, width = 20, height = 20 }) => {
diff --git a/packages/renderer/tests/usePDF.test.js b/packages/renderer/tests/usePDF.test.jsx
similarity index 89%
rename from packages/renderer/tests/usePDF.test.js
rename to packages/renderer/tests/usePDF.test.jsx
index 47da78ea8..fc4c2293d 100644
--- a/packages/renderer/tests/usePDF.test.js
+++ b/packages/renderer/tests/usePDF.test.jsx
@@ -1,10 +1,8 @@
-/**
- * @jest-environment ./tests/environment/jsdom.js
- */
+// Note that this file is ran using a separate Vitest configuration
+import { expect, it } from 'vitest';
-/* eslint-disable import/no-extraneous-dependencies */
import { renderHook, waitFor, act } from '@testing-library/react';
-import { usePDF, Document, Page, Text } from '../src/dom';
+import { usePDF, Document, Page, Text } from '@react-pdf/renderer';
const TestDocument = ({ title = 'Default' }) => (
diff --git a/packages/renderer/vitest.browser.config.js b/packages/renderer/vitest.browser.config.js
new file mode 100644
index 000000000..0e0d6a7dd
--- /dev/null
+++ b/packages/renderer/vitest.browser.config.js
@@ -0,0 +1,35 @@
+// false positive on import/no-unresolved
+// eslint-disable-next-line import/no-unresolved
+import { defineConfig } from 'vitest/config';
+import react from '@vitejs/plugin-react';
+
+export default defineConfig({
+ plugins: [react()],
+ resolve: {
+ alias:
+ process.env.REACT_VERSION && process.env.REACT_VERSION !== '18'
+ ? [
+ {
+ find: 'react/jsx-dev-runtime',
+ replacement: `react-${process.env.REACT_VERSION}/jsx-dev-runtime`,
+ },
+ {
+ find: 'react',
+ replacement: `react-${process.env.REACT_VERSION}`,
+ },
+ {
+ find: 'react-dom',
+ replacement: `react-dom-${process.env.REACT_VERSION}`,
+ },
+ ]
+ : undefined,
+ conditions: ['browser'],
+ mainFields: ['browser'],
+ },
+ test: {
+ environment: './tests/environment/jsdom.js',
+ setupFiles: ['vitest.setup.js'],
+ include: ['tests/{components,dom,usePDF}.test.*'],
+ watch: false,
+ },
+});
diff --git a/packages/renderer/vitest.config.js b/packages/renderer/vitest.config.js
new file mode 100644
index 000000000..a84ecea33
--- /dev/null
+++ b/packages/renderer/vitest.config.js
@@ -0,0 +1,35 @@
+// false positive on import/no-unresolved
+// eslint-disable-next-line import/no-unresolved
+import { defineConfig, defaultExclude } from 'vitest/config';
+import react from '@vitejs/plugin-react';
+
+export default defineConfig({
+ plugins: [react()],
+ resolve: {
+ alias:
+ process.env.REACT_VERSION && process.env.REACT_VERSION !== '18'
+ ? [
+ {
+ find: 'react/jsx-dev-runtime',
+ replacement: `react-${process.env.REACT_VERSION}/jsx-dev-runtime`,
+ },
+ {
+ find: 'react',
+ replacement: `react-${process.env.REACT_VERSION}`,
+ },
+ {
+ find: 'react-dom',
+ replacement: `react-dom-${process.env.REACT_VERSION}`,
+ },
+ ]
+ : undefined,
+ },
+ test: {
+ // Necessary to avoid "Module did not self-register" error with canvas.node
+ pool: 'forks',
+ setupFiles: ['vitest.setup.js'],
+ include: ['tests/*.{test,spec}.?(c|m)[jt]s?(x)'],
+ exclude: [...defaultExclude, 'tests/{components,dom,usePDF}.test.*'],
+ watch: false,
+ },
+});
diff --git a/packages/renderer/vitest.setup.js b/packages/renderer/vitest.setup.js
new file mode 100644
index 000000000..da9fc4b00
--- /dev/null
+++ b/packages/renderer/vitest.setup.js
@@ -0,0 +1,17 @@
+import { expect } from 'vitest';
+import path from 'path';
+import url from 'url';
+import { configureToMatchImageSnapshot } from 'jest-image-snapshot';
+import React from 'react';
+import ReactDOM from 'react-dom';
+
+console.log(`Using React ${React.version} + ReactDOM ${ReactDOM.version}`);
+
+const __dirname = path.dirname(url.fileURLToPath(import.meta.url));
+
+const toMatchImageSnapshot = configureToMatchImageSnapshot({
+ customSnapshotsDir: `${__dirname}/tests/snapshots`,
+ customDiffDir: `${__dirname}/tests/diffs`,
+});
+
+expect.extend({ toMatchImageSnapshot });
diff --git a/packages/stylesheet/CHANGELOG.md b/packages/stylesheet/CHANGELOG.md
index 4e486d0dc..25d3c7a0c 100644
--- a/packages/stylesheet/CHANGELOG.md
+++ b/packages/stylesheet/CHANGELOG.md
@@ -1,5 +1,56 @@
# @react-pdf/stylesheet
+## 4.2.4
+
+### Patch Changes
+
+- [#2605](https://github.com/diegomura/react-pdf/pull/2605) [`f7505ed`](https://github.com/diegomura/react-pdf/commit/f7505ed453a1a0ae960d0e5e4a1d155803861b71) Thanks [@wojtekmaj](https://github.com/wojtekmaj)! - fix: fix CJS compatibility
+
+- Updated dependencies [[`f7505ed`](https://github.com/diegomura/react-pdf/commit/f7505ed453a1a0ae960d0e5e4a1d155803861b71)]:
+ - @react-pdf/fns@2.2.1
+
+## 4.2.3
+
+### Patch Changes
+
+- Updated dependencies [[`9af07fe`](https://github.com/diegomura/react-pdf/commit/9af07feb59c2fe9c1d8960ac95f6fa6e03d16235), [`8350154`](https://github.com/diegomura/react-pdf/commit/83501541e3a050021e18e112bb472b2dabc142a7)]:
+ - @react-pdf/types@2.4.1
+ - @react-pdf/fns@2.2.0
+
+## 4.2.2
+
+### Patch Changes
+
+- Updated dependencies [[`fb5273d`](https://github.com/diegomura/react-pdf/commit/fb5273d8d80d919f7b9c214e02d67b79ce23fa19)]:
+ - @react-pdf/types@2.4.0
+
+## 4.2.1
+
+### Patch Changes
+
+- Updated dependencies [[`9e5842b`](https://github.com/diegomura/react-pdf/commit/9e5842bbecca6e249af2c5fc50078bb7ddd5420f)]:
+ - @react-pdf/types@2.3.6
+
+## 4.2.0
+
+### Minor Changes
+
+- [#2409](https://github.com/diegomura/react-pdf/pull/2409) [`b6a14fd`](https://github.com/diegomura/react-pdf/commit/b6a14fd160fab26a49f798e5294b0e361e67fe37) Thanks [@wojtekmaj](https://github.com/wojtekmaj)! - Add support for native ESM
+
+### Patch Changes
+
+- [#2498](https://github.com/diegomura/react-pdf/pull/2498) [`6bfe7e8`](https://github.com/diegomura/react-pdf/commit/6bfe7e8a30d96c04a1552800159992705f3605b1) Thanks [@diegomura](https://github.com/diegomura)! - fix: color parse error
+
+- Updated dependencies [[`b6a14fd`](https://github.com/diegomura/react-pdf/commit/b6a14fd160fab26a49f798e5294b0e361e67fe37)]:
+ - @react-pdf/fns@2.1.0
+
+## 4.1.9
+
+### Patch Changes
+
+- Updated dependencies [[`e5c8fde`](https://github.com/diegomura/react-pdf/commit/e5c8fde9379a9a85ecac7e3d6273953e39d65f8d), [`1f987cc`](https://github.com/diegomura/react-pdf/commit/1f987cc27c3fd1ef1b6748ebe58a289a78b538d2), [`4c40b14`](https://github.com/diegomura/react-pdf/commit/4c40b149cfed42f2513e1dd330a92ccc3363c04f)]:
+ - @react-pdf/types@2.3.5
+
## 4.1.8
### Patch Changes
diff --git a/packages/stylesheet/babel.config.js b/packages/stylesheet/babel.config.js
index 27f83582f..02d1cbbdb 100644
--- a/packages/stylesheet/babel.config.js
+++ b/packages/stylesheet/babel.config.js
@@ -1 +1 @@
-module.exports = { extends: '../../babel.config.js' };
+export default { extends: '../../babel.config.js' };
diff --git a/packages/stylesheet/jest.config.js b/packages/stylesheet/jest.config.js
index 1a99b7295..40b1faa8e 100644
--- a/packages/stylesheet/jest.config.js
+++ b/packages/stylesheet/jest.config.js
@@ -1,3 +1,3 @@
-module.exports = {
+export default {
testRegex: 'tests/.*?(test)\\.js$',
};
diff --git a/packages/stylesheet/package.json b/packages/stylesheet/package.json
index 5c67d1129..70f3c4163 100644
--- a/packages/stylesheet/package.json
+++ b/packages/stylesheet/package.json
@@ -1,27 +1,35 @@
{
"name": "@react-pdf/stylesheet",
- "version": "4.1.8",
+ "version": "4.2.4",
"license": "MIT",
"description": "A styles engine for Node and the browser",
"author": "Diego Muracciole ",
"homepage": "https://github.com/diegomura/react-pdf#readme",
- "main": "lib/index.cjs.js",
- "module": "lib/index.es.js",
+ "type": "module",
+ "main": "./lib/index.cjs",
+ "module": "./lib/index.js",
+ "exports": {
+ ".": {
+ "import": "./lib/index.js",
+ "require": "./lib/index.cjs",
+ "default": "./lib/index.js"
+ }
+ },
"repository": {
"type": "git",
"url": "https://github.com/diegomura/react-pdf.git",
"directory": "packages/stylesheet"
},
"scripts": {
- "test": "jest",
+ "test": "vitest",
"build": "rimraf ./lib && rollup -c",
"watch": "rimraf ./lib && rollup -c -w"
},
"dependencies": {
"@babel/runtime": "^7.20.13",
- "@react-pdf/fns": "2.0.1",
- "@react-pdf/types": "^2.3.4",
- "color-string": "^1.5.3",
+ "@react-pdf/fns": "2.2.1",
+ "@react-pdf/types": "^2.4.1",
+ "color-string": "^1.9.1",
"hsl-to-hex": "^1.0.0",
"media-engine": "^1.0.3",
"postcss-value-parser": "^4.1.0"
diff --git a/packages/stylesheet/rollup.config.js b/packages/stylesheet/rollup.config.js
index 6a28aba35..18084bac0 100644
--- a/packages/stylesheet/rollup.config.js
+++ b/packages/stylesheet/rollup.config.js
@@ -1,19 +1,20 @@
import localResolve from 'rollup-plugin-local-resolve';
import babel from '@rollup/plugin-babel';
-import pkg from './package.json';
+import pkg from './package.json' assert { type: 'json' };
const cjs = {
exports: 'named',
format: 'cjs',
+ interop: 'compat',
};
const esm = {
format: 'es',
};
-const getCJS = override => Object.assign({}, cjs, override);
-const getESM = override => Object.assign({}, esm, override);
+const getCJS = (override) => Object.assign({}, cjs, override);
+const getESM = (override) => Object.assign({}, esm, override);
const input = 'src/index.js';
@@ -34,10 +35,7 @@ const getPlugins = () => [
const config = {
input,
- output: [
- getESM({ file: 'lib/index.es.js' }),
- getCJS({ file: 'lib/index.cjs.js' }),
- ],
+ output: [getESM({ file: 'lib/index.js' }), getCJS({ file: 'lib/index.cjs' })],
external: getExternal(),
plugins: getPlugins(),
};
diff --git a/packages/stylesheet/src/expand/borders.js b/packages/stylesheet/src/expand/borders.js
index 726d609ee..da3c531d7 100644
--- a/packages/stylesheet/src/expand/borders.js
+++ b/packages/stylesheet/src/expand/borders.js
@@ -1,6 +1,8 @@
-const BORDER_SHORTHAND_REGEX = /(-?\d+(\.\d+)?(px|in|mm|cm|pt|vw|vh|px)?)\s(\S+)\s(.+)/;
+const BORDER_SHORTHAND_REGEX =
+ /(-?\d+(\.\d+)?(px|in|mm|cm|pt|vw|vh|px)?)\s(\S+)\s(.+)/;
-const matchBorderShorthand = value => value.match(BORDER_SHORTHAND_REGEX) || [];
+const matchBorderShorthand = (value) =>
+ value.match(BORDER_SHORTHAND_REGEX) || [];
const expandBorders = (key, value) => {
const match = matchBorderShorthand(`${value}`);
diff --git a/packages/stylesheet/src/expand/boxModel.js b/packages/stylesheet/src/expand/boxModel.js
index 373d8cca7..4439d4079 100644
--- a/packages/stylesheet/src/expand/boxModel.js
+++ b/packages/stylesheet/src/expand/boxModel.js
@@ -1,6 +1,10 @@
/* eslint-disable no-plusplus */
-import parse from 'postcss-value-parser/lib/parse';
-import parseUnit from 'postcss-value-parser/lib/unit';
+// This file is ran directly with Node - needs to have .js extension
+// eslint-disable-next-line import/extensions
+import parse from 'postcss-value-parser/lib/parse.js';
+// This file is ran directly with Node - needs to have .js extension
+// eslint-disable-next-line import/extensions
+import parseUnit from 'postcss-value-parser/lib/unit.js';
const BOX_MODEL_UNITS = 'px,in,mm,cm,pt,%,vw,vh';
@@ -14,68 +18,72 @@ const logError = (style, value) => {
`);
};
-const expandBoxModel = ({
- expandsTo,
- maxValues = 1,
- autoSupported = false,
-} = {}) => (model, value) => {
- const nodes = parse(`${value}`);
-
- const parts = [];
-
- for (let i = 0; i < nodes.length; i++) {
- const node = nodes[i];
-
- // value contains `calc`, `url` or other css function
- // `,`, `/` or strings that unsupported by margin and padding
- if (
- node.type === 'function' ||
- node.type === 'string' ||
- node.type === 'div'
- ) {
- logError(model, value);
-
- return {};
- }
-
- if (node.type === 'word') {
- if (node.value === 'auto' && autoSupported) {
- parts.push(node.value);
- } else {
- const result = parseUnit(node.value);
+/**
+ * @param {Object} options
+ * @param {Function} [options.expandsTo]
+ * @param {number} [options.maxValues]
+ * @param {boolean} [options.autoSupported]
+ */
+const expandBoxModel =
+ ({ expandsTo, maxValues = 1, autoSupported = false } = {}) =>
+ (model, value) => {
+ const nodes = parse(`${value}`);
+
+ const parts = [];
+
+ for (let i = 0; i < nodes.length; i++) {
+ const node = nodes[i];
+
+ // value contains `calc`, `url` or other css function
+ // `,`, `/` or strings that unsupported by margin and padding
+ if (
+ node.type === 'function' ||
+ node.type === 'string' ||
+ node.type === 'div'
+ ) {
+ logError(model, value);
+
+ return {};
+ }
- // when unit isn't specified this condition is true
- if (result && BOX_MODEL_UNITS.includes(result.unit)) {
+ if (node.type === 'word') {
+ if (node.value === 'auto' && autoSupported) {
parts.push(node.value);
} else {
- logError(model, value);
+ const result = parseUnit(node.value);
- return {};
+ // when unit isn't specified this condition is true
+ if (result && BOX_MODEL_UNITS.includes(result.unit)) {
+ parts.push(node.value);
+ } else {
+ logError(model, value);
+
+ return {};
+ }
}
}
}
- }
- // checks that we have enough parsed values
- if (parts.length > maxValues) {
- logError(model, value);
+ // checks that we have enough parsed values
+ if (parts.length > maxValues) {
+ logError(model, value);
- return {};
- }
+ return {};
+ }
- const first = parts[0];
+ const first = parts[0];
- if (expandsTo) {
- const second = parts[1] || parts[0];
- const third = parts[2] || parts[0];
- const fourth = parts[3] || parts[1] || parts[0];
+ if (expandsTo) {
+ const second = parts[1] || parts[0];
+ const third = parts[2] || parts[0];
+ const fourth = parts[3] || parts[1] || parts[0];
- return expandsTo({ first, second, third, fourth });
- }
+ return expandsTo({ first, second, third, fourth });
+ }
- return {
- [model]: first,
+ return {
+ [model]: first,
+ };
};
-};
export default expandBoxModel;
diff --git a/packages/stylesheet/src/expand/flex.js b/packages/stylesheet/src/expand/flex.js
index edc4873f0..b80693ef5 100644
--- a/packages/stylesheet/src/expand/flex.js
+++ b/packages/stylesheet/src/expand/flex.js
@@ -2,9 +2,15 @@
// TODO: change flex defaults to [0, 1, 'auto'] as in spec in next major release
const flexDefaults = [1, 1, 0];
+/**
+ * @type {(number | 'auto')[]}
+ */
const flexAuto = [1, 1, 'auto'];
const expandFlex = (key, value) => {
+ /**
+ * @type {(number | 'auto')[]}
+ */
let defaults = flexDefaults;
let matches = [];
if (value === 'auto') {
diff --git a/packages/stylesheet/src/expand/index.js b/packages/stylesheet/src/expand/index.js
index 5d61c848f..fc056ab00 100644
--- a/packages/stylesheet/src/expand/index.js
+++ b/packages/stylesheet/src/expand/index.js
@@ -49,9 +49,9 @@ const shorthands = {
/**
* Transforms style key-value
*
- * @param {String} key style key
- * @param {String} value style value
- * @returns {String | Number} transformed style values
+ * @param {string} key style key
+ * @param {string} value style value
+ * @returns {string | Number} transformed style values
*/
const expandStyle = (key, value) => {
return shorthands[key] ? shorthands[key](key, value) : { [key]: value };
@@ -60,10 +60,10 @@ const expandStyle = (key, value) => {
/**
* Expand the shorthand properties.
*
- * @param { Object } style object
- * @returns { Object } expanded style object
+ * @param {Object} style object
+ * @returns {Object} expanded style object
*/
-const expand = style => {
+const expand = (style) => {
if (!style) return style;
const propsArray = Object.keys(style);
diff --git a/packages/stylesheet/src/expand/transformOrigin.js b/packages/stylesheet/src/expand/transformOrigin.js
index 5d0a859c4..795145c3c 100644
--- a/packages/stylesheet/src/expand/transformOrigin.js
+++ b/packages/stylesheet/src/expand/transformOrigin.js
@@ -6,7 +6,7 @@ const sortTransformOriginPair = (a, b) => {
return 0;
};
-const getTransformOriginPair = values => {
+const getTransformOriginPair = (values) => {
if (!values || values.length === 0) return ['center', 'center'];
const pair = values.length === 1 ? [values[0], 'center'] : values;
diff --git a/packages/stylesheet/src/flatten/index.js b/packages/stylesheet/src/flatten/index.js
index d70071d88..2889adf67 100644
--- a/packages/stylesheet/src/flatten/index.js
+++ b/packages/stylesheet/src/flatten/index.js
@@ -3,22 +3,23 @@ import { compose, castArray } from '@react-pdf/fns';
/**
* Remove nil values from array
*
- * @param {Array} array
- * @returns {Array} array without nils
+ * @template T
+ * @param {(T | null | undefined)[]} array
+ * @returns {T[]} array without nils
*/
-const compact = array => array.filter(Boolean);
+const compact = (array) => array.filter(Boolean);
/**
* Merges style objects array
*
- * @param {Array} style objects array
+ * @param {Object[]} styles style objects array
* @returns {Object} merged style object
*/
-const mergeStyles = styles =>
+const mergeStyles = (styles) =>
styles.reduce((acc, style) => {
const s = Array.isArray(style) ? flatten(style) : style;
- Object.keys(s).forEach(key => {
+ Object.keys(s).forEach((key) => {
if (s[key] !== null && s[key] !== undefined) {
acc[key] = s[key];
}
@@ -30,8 +31,8 @@ const mergeStyles = styles =>
/**
* Flattens an array of style objects, into one aggregated style object.
*
- * @param {Array} style objects array
- * @returns {Object} flatted style object
+ * @param {Object[]} styles style objects array
+ * @returns {Object} flattened style object
*/
const flatten = compose(mergeStyles, compact, castArray);
diff --git a/packages/stylesheet/src/index.js b/packages/stylesheet/src/index.js
index 4292a83a3..e65a81b05 100644
--- a/packages/stylesheet/src/index.js
+++ b/packages/stylesheet/src/index.js
@@ -12,7 +12,7 @@ import resolveMediaQueries from './mediaQueries';
* @returns {Object} resolved style object
*/
const resolveStyles = (container, style) => {
- const computeMediaQueries = value => resolveMediaQueries(container, value);
+ const computeMediaQueries = (value) => resolveMediaQueries(container, value);
return compose(
transformStyles(container),
diff --git a/packages/stylesheet/src/transform/colors.js b/packages/stylesheet/src/transform/colors.js
index bd437c35b..51c05db7c 100644
--- a/packages/stylesheet/src/transform/colors.js
+++ b/packages/stylesheet/src/transform/colors.js
@@ -1,16 +1,16 @@
import hlsToHex from 'hsl-to-hex';
import colorString from 'color-string';
-const isRgb = value => /rgba?/g.test(value);
-const isHsl = value => /hsla?/g.test(value);
+const isRgb = (value) => /rgba?/g.test(value);
+const isHsl = (value) => /hsla?/g.test(value);
/**
* Transform rgb color to hexa
*
- * @param {String} styles value
+ * @param {string} value styles value
* @returns {Object} transformed value
*/
-const parseRgb = value => {
+const parseRgb = (value) => {
const rgb = colorString.get.rgb(value);
return colorString.to.hex(rgb);
};
@@ -18,10 +18,10 @@ const parseRgb = value => {
/**
* Transform Hsl color to hexa
*
- * @param {String} styles value
+ * @param {string} value styles value
* @returns {Object} transformed value
*/
-const parseHsl = value => {
+const parseHsl = (value) => {
const hsl = colorString.get.hsl(value).map(Math.round);
const hex = hlsToHex(...hsl);
@@ -31,10 +31,10 @@ const parseHsl = value => {
/**
* Transform given color to hexa
*
- * @param {String} styles value
+ * @param {string} value styles value
* @returns {Object} transformed value
*/
-const transformColor = value => {
+const transformColor = (value) => {
if (isRgb(value)) return parseRgb(value);
if (isHsl(value)) return parseHsl(value);
diff --git a/packages/stylesheet/src/transform/fontWeight.js b/packages/stylesheet/src/transform/fontWeight.js
index 28b08b103..cf30c5bf9 100644
--- a/packages/stylesheet/src/transform/fontWeight.js
+++ b/packages/stylesheet/src/transform/fontWeight.js
@@ -15,7 +15,7 @@ const FONT_WEIGHTS = {
black: 900,
};
-const processFontWeight = value => {
+const processFontWeight = (value) => {
if (!value) return FONT_WEIGHTS.normal;
if (typeof value === 'number') return value;
diff --git a/packages/stylesheet/src/transform/index.js b/packages/stylesheet/src/transform/index.js
index 9091a1ec4..972d3eb34 100644
--- a/packages/stylesheet/src/transform/index.js
+++ b/packages/stylesheet/src/transform/index.js
@@ -21,13 +21,19 @@ const transformStyle = (key, value, container) => {
return transformColor(transformUnits(container, castFloat(result)));
};
+/**
+ * @typedef {Function} Transform
+ * @param {Object} style styles object
+ * @returns {Object} transformed styles
+ */
+
/**
* Transform styles values
*
- * @param {Object} styles object
- * @returns {Object} transformed styles
+ * @param {Object} container
+ * @returns {Transform} transform function
*/
-const transform = container => style => {
+const transform = (container) => (style) => {
if (!style) return style;
const propsArray = Object.keys(style);
diff --git a/packages/stylesheet/src/transform/objectPosition.js b/packages/stylesheet/src/transform/objectPosition.js
index 5e9757ba6..5ba76a4d8 100644
--- a/packages/stylesheet/src/transform/objectPosition.js
+++ b/packages/stylesheet/src/transform/objectPosition.js
@@ -1,7 +1,7 @@
import castFloat from '../utils/castFloat';
import offsetKeyword from '../utils/offsetKeyword';
-const transformObjectPosition = value =>
+const transformObjectPosition = (value) =>
offsetKeyword(value) || castFloat(value);
export default transformObjectPosition;
diff --git a/packages/stylesheet/src/transform/transform.js b/packages/stylesheet/src/transform/transform.js
index 8ed1625e2..996ac3bcc 100644
--- a/packages/stylesheet/src/transform/transform.js
+++ b/packages/stylesheet/src/transform/transform.js
@@ -1,4 +1,4 @@
-const parse = transformString => {
+const parse = (transformString) => {
const transforms = transformString.trim().split(/\) |\)/);
// Handle "initial", "inherit", "unset".
@@ -14,7 +14,7 @@ const parse = transformString => {
if (transform) {
const [name, rawValue] = transform.split('(');
const splitChar = rawValue.indexOf(',') >= 0 ? ',' : ' ';
- const value = rawValue.split(splitChar).map(val => val.trim());
+ const value = rawValue.split(splitChar).map((val) => val.trim());
parsed.push({ operation: name, value });
}
}
@@ -22,7 +22,7 @@ const parse = transformString => {
return parsed;
};
-const parseAngle = value => {
+const parseAngle = (value) => {
const unitsRegexp = /(-?\d*\.?\d*)(\w*)?/i;
const [, angle, unit] = unitsRegexp.exec(value);
const number = Number.parseFloat(angle);
@@ -33,7 +33,7 @@ const parseAngle = value => {
const normalizeTransformOperation = ({ operation, value }) => {
switch (operation) {
case 'scale': {
- const [scaleX, scaleY = scaleX] = value.map(num =>
+ const [scaleX, scaleY = scaleX] = value.map((num) =>
Number.parseFloat(num),
);
return { operation: 'scale', value: [scaleX, scaleY] };
@@ -53,7 +53,7 @@ const normalizeTransformOperation = ({ operation, value }) => {
case 'translate': {
return {
operation: 'translate',
- value: value.map(num => Number.parseFloat(num)),
+ value: value.map((num) => Number.parseFloat(num)),
};
}
@@ -81,16 +81,16 @@ const normalizeTransformOperation = ({ operation, value }) => {
}
default: {
- return { operation, value: value.map(num => Number.parseFloat(num)) };
+ return { operation, value: value.map((num) => Number.parseFloat(num)) };
}
}
};
-const normalize = operations => {
- return operations.map(operation => normalizeTransformOperation(operation));
+const normalize = (operations) => {
+ return operations.map((operation) => normalizeTransformOperation(operation));
};
-const processTransform = value => {
+const processTransform = (value) => {
if (typeof value !== 'string') return value;
return normalize(parse(value));
diff --git a/packages/stylesheet/src/transform/transformOrigin.js b/packages/stylesheet/src/transform/transformOrigin.js
index 639b9e980..8e1f4751e 100644
--- a/packages/stylesheet/src/transform/transformOrigin.js
+++ b/packages/stylesheet/src/transform/transformOrigin.js
@@ -1,7 +1,7 @@
import castFloat from '../utils/castFloat';
import offsetKeyword from '../utils/offsetKeyword';
-const transformTransformOrigin = value =>
+const transformTransformOrigin = (value) =>
offsetKeyword(value) || castFloat(value);
export default transformTransformOrigin;
diff --git a/packages/stylesheet/src/transform/units.js b/packages/stylesheet/src/transform/units.js
index bc235a332..c4f18fe96 100644
--- a/packages/stylesheet/src/transform/units.js
+++ b/packages/stylesheet/src/transform/units.js
@@ -1,14 +1,14 @@
/**
* Parses scalar value in value and unit pairs
*
- * @param {String} scalar value
+ * @param {string} value scalar value
* @returns {Object} parsed value
*/
-const parseValue = value => {
+const parseValue = (value) => {
const match = /^(-?\d*\.?\d+)(in|mm|cm|pt|vh|vw|px)?$/g.exec(value);
return match
- ? { value: parseFloat(match[1], 10), unit: match[2] || 'pt' }
+ ? { value: parseFloat(match[1]), unit: match[2] || 'pt' }
: { value, unit: undefined };
};
@@ -16,7 +16,7 @@ const parseValue = value => {
* Transform given scalar value
*
* @param {Object} container
- * @param {String} styles value
+ * @param {string} value styles value
* @returns {Object} transformed value
*/
const transformUnit = (container, value) => {
diff --git a/packages/stylesheet/src/utils/castFloat.js b/packages/stylesheet/src/utils/castFloat.js
index 992b9f494..3f7c5a824 100644
--- a/packages/stylesheet/src/utils/castFloat.js
+++ b/packages/stylesheet/src/utils/castFloat.js
@@ -1,9 +1,9 @@
-const matchNumber = value =>
+const matchNumber = (value) =>
typeof value === 'string' && /^-?\d*\.?\d*$/.test(value);
-const castFloat = value => {
+const castFloat = (value) => {
if (typeof value !== 'string') return value;
- if (matchNumber(value)) return parseFloat(value, 10);
+ if (matchNumber(value)) return parseFloat(value);
return value;
};
diff --git a/packages/stylesheet/src/utils/offsetKeyword.js b/packages/stylesheet/src/utils/offsetKeyword.js
index a598c4190..9e8e6d0e7 100644
--- a/packages/stylesheet/src/utils/offsetKeyword.js
+++ b/packages/stylesheet/src/utils/offsetKeyword.js
@@ -1,4 +1,4 @@
-const offsetKeyword = value => {
+const offsetKeyword = (value) => {
switch (value) {
case 'top':
case 'left':
diff --git a/packages/stylesheet/tests/expand.test.js b/packages/stylesheet/tests/expand.test.js
index cb575aad0..31eeaa36b 100644
--- a/packages/stylesheet/tests/expand.test.js
+++ b/packages/stylesheet/tests/expand.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import expandStyles from '../src/expand';
describe('stylesheet expand', () => {
@@ -20,11 +22,11 @@ describe('stylesheet expand', () => {
{ marginBottom: '1 2 3' },
{ marginHorizontal: '1 2 3' },
{ margin: '1 2 3 4 5' },
- { margin: () => console.log('function') },
+ { margin: () => {} },
];
const expanded = {};
- margins.forEach(style => {
+ margins.forEach((style) => {
expect(expandStyles(style)).toEqual(expanded);
});
});
@@ -157,11 +159,11 @@ describe('stylesheet expand', () => {
{ paddingBottom: '1 2 3' },
{ paddingHorizontal: '1 2 3' },
{ padding: '1 2 3 4 5' },
- { padding: () => console.log('function') },
+ { padding: () => {} },
];
const expanded = {};
- paddings.forEach(style => {
+ paddings.forEach((style) => {
expect(expandStyles(style)).toEqual(expanded);
});
});
diff --git a/packages/stylesheet/tests/flatten.test.js b/packages/stylesheet/tests/flatten.test.js
index 9badb91ce..2d33fbe72 100644
--- a/packages/stylesheet/tests/flatten.test.js
+++ b/packages/stylesheet/tests/flatten.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import flatten from '../src/flatten';
describe('stylesheet flatten', () => {
diff --git a/packages/stylesheet/tests/mediaQueries.test.js b/packages/stylesheet/tests/mediaQueries.test.js
index e210513a7..b445e5dfb 100644
--- a/packages/stylesheet/tests/mediaQueries.test.js
+++ b/packages/stylesheet/tests/mediaQueries.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import resolveMediaQueries from '../src/mediaQueries';
describe('media queries', () => {
diff --git a/packages/stylesheet/tests/resolve.test.js b/packages/stylesheet/tests/resolve.test.js
index d2cfaed5b..ee978975c 100644
--- a/packages/stylesheet/tests/resolve.test.js
+++ b/packages/stylesheet/tests/resolve.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import resolve from '../src/index';
describe('stylesheet resolve', () => {
@@ -19,7 +21,7 @@ describe('stylesheet resolve', () => {
const style = {};
const result = resolve({}, style);
- expect(result).toEqual({}, {});
+ expect(result).toEqual({});
});
test('should return identity for single style object', () => {
diff --git a/packages/stylesheet/tests/transform.test.js b/packages/stylesheet/tests/transform.test.js
index ea7ecff35..4190b8201 100644
--- a/packages/stylesheet/tests/transform.test.js
+++ b/packages/stylesheet/tests/transform.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import _transformStyles from '../src/transform';
const CONTAINER = { width: 200, height: 400 };
diff --git a/packages/svgkit/CHANGELOG.md b/packages/svgkit/CHANGELOG.md
index 87e16f7fa..15fe0fac9 100644
--- a/packages/svgkit/CHANGELOG.md
+++ b/packages/svgkit/CHANGELOG.md
@@ -1,5 +1,72 @@
# @react-pdf/svgkit
+## 2.3.6
+
+### Patch Changes
+
+- Updated dependencies [[`dc54c13`](https://github.com/diegomura/react-pdf/commit/dc54c13625510482e93f80ed5cc07cf3a6a6d34c)]:
+ - @react-pdf/pdfkit@3.1.6
+
+## 2.3.5
+
+### Patch Changes
+
+- Updated dependencies []:
+ - @react-pdf/pdfkit@3.1.5
+
+## 2.3.4
+
+### Patch Changes
+
+- Updated dependencies [[`8350154`](https://github.com/diegomura/react-pdf/commit/83501541e3a050021e18e112bb472b2dabc142a7)]:
+ - @react-pdf/pdfkit@3.1.4
+
+## 2.3.3
+
+### Patch Changes
+
+- Updated dependencies [[`0590324`](https://github.com/diegomura/react-pdf/commit/0590324d7a6d75c0a49520b3f99cfb6594239390)]:
+ - @react-pdf/pdfkit@3.1.3
+
+## 2.3.2
+
+### Patch Changes
+
+- Updated dependencies [[`44bd45b`](https://github.com/diegomura/react-pdf/commit/44bd45b1961ca8bae4a2f84cc77db945e5c43419)]:
+ - @react-pdf/pdfkit@3.1.2
+
+## 2.3.1
+
+### Patch Changes
+
+- Updated dependencies [[`36c6ba3`](https://github.com/diegomura/react-pdf/commit/36c6ba30ae73a512f19fe5bc47ac8c304887c0da), [`a35b1ba`](https://github.com/diegomura/react-pdf/commit/a35b1ba18d293df51293600d8d56015094d222d8)]:
+ - @react-pdf/pdfkit@3.1.1
+
+## 2.3.0
+
+### Minor Changes
+
+- [#2409](https://github.com/diegomura/react-pdf/pull/2409) [`b6a14fd`](https://github.com/diegomura/react-pdf/commit/b6a14fd160fab26a49f798e5294b0e361e67fe37) Thanks [@wojtekmaj](https://github.com/wojtekmaj)! - Add support for native ESM
+
+### Patch Changes
+
+- Updated dependencies [[`b6a14fd`](https://github.com/diegomura/react-pdf/commit/b6a14fd160fab26a49f798e5294b0e361e67fe37)]:
+ - @react-pdf/pdfkit@3.1.0
+
+## 2.2.4
+
+### Patch Changes
+
+- Updated dependencies [[`45b2bd3`](https://github.com/diegomura/react-pdf/commit/45b2bd37037c605727ad5783f2f2a438dc19cac4), [`b457a0c`](https://github.com/diegomura/react-pdf/commit/b457a0cc1c1352325e6c633af3000a3c9241f7f7)]:
+ - @react-pdf/pdfkit@3.0.4
+
+## 2.2.3
+
+### Patch Changes
+
+- Updated dependencies [[`4cfb84d`](https://github.com/diegomura/react-pdf/commit/4cfb84d9f3d2301720b68b4c40a0257b9520c6e1)]:
+ - @react-pdf/pdfkit@3.0.3
+
## 2.2.2
### Patch Changes
diff --git a/packages/svgkit/babel.config.js b/packages/svgkit/babel.config.js
index 27f83582f..02d1cbbdb 100644
--- a/packages/svgkit/babel.config.js
+++ b/packages/svgkit/babel.config.js
@@ -1 +1 @@
-module.exports = { extends: '../../babel.config.js' };
+export default { extends: '../../babel.config.js' };
diff --git a/packages/svgkit/package.json b/packages/svgkit/package.json
index a8ee52ffd..023fa8bbd 100644
--- a/packages/svgkit/package.json
+++ b/packages/svgkit/package.json
@@ -1,8 +1,9 @@
{
"name": "@react-pdf/svgkit",
"license": "MIT",
- "version": "2.2.2",
+ "version": "2.3.6",
"description": "A SVG generation library for Node.js and browser",
+ "type": "module",
"main": "./lib/index.js",
"repository": {
"type": "git",
@@ -13,7 +14,7 @@
"Diego Muracciole "
],
"scripts": {
- "test": "jest",
+ "test": "vitest",
"build": "rimraf ./lib && babel src --out-dir lib",
"watch": "rimraf ./lib && babel src --out-dir lib --watch"
},
@@ -22,6 +23,6 @@
],
"dependencies": {
"@babel/runtime": "^7.20.13",
- "@react-pdf/pdfkit": "^3.0.2"
+ "@react-pdf/pdfkit": "^3.1.6"
}
}
diff --git a/packages/svgkit/src/document/index.js b/packages/svgkit/src/document/index.js
index 6f7bce28f..a6d0e15a9 100644
--- a/packages/svgkit/src/document/index.js
+++ b/packages/svgkit/src/document/index.js
@@ -9,10 +9,22 @@ import serialize from './serialize';
import { LinearGradient, RadialGradient } from '../gradient';
class SVGDocument {
+ /**
+ * @param {{ font?: Object }} [options]
+ */
constructor({ font } = {}) {
this.info = {};
+ /**
+ * @type {Object[]}
+ */
this.pages = [];
+ /**
+ * @type {Object}
+ */
this.currentPage = null;
+ /**
+ * @type {Object}
+ */
this.defaultFont = font;
}
@@ -268,7 +280,7 @@ class SVGDocument {
}
end() {
- this.serialized = this.pages.map(page => serialize(page.root)).join('');
+ this.serialized = this.pages.map((page) => serialize(page.root)).join('');
}
}
diff --git a/packages/svgkit/src/document/serialize.js b/packages/svgkit/src/document/serialize.js
index b965d3470..b74df6a37 100644
--- a/packages/svgkit/src/document/serialize.js
+++ b/packages/svgkit/src/document/serialize.js
@@ -1,12 +1,12 @@
-const serializeAttributes = attributes => {
- const res = Object.keys(attributes).map(key => {
+const serializeAttributes = (attributes) => {
+ const res = Object.keys(attributes).map((key) => {
return `${key}="${attributes[key]}"`;
});
return res.join(' ');
};
-const serializeXML = element => {
+const serializeXML = (element) => {
let res = '';
if (typeof element === 'string') {
@@ -14,7 +14,7 @@ const serializeXML = element => {
} else {
res += `<${element.type} ${serializeAttributes(element.attributes)}>`;
- element.children.forEach(child => {
+ element.children.forEach((child) => {
res += serializeXML(child);
});
diff --git a/packages/svgkit/src/gradient/index.js b/packages/svgkit/src/gradient/index.js
index 1829e202c..d8bd0b1d5 100644
--- a/packages/svgkit/src/gradient/index.js
+++ b/packages/svgkit/src/gradient/index.js
@@ -19,7 +19,8 @@ export class Gradient {
if (color.indexOf('rgba') !== -1) {
// Separate alpha value, since webkit can't handle it
- const regex = /rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi;
+ const regex =
+ /rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi;
const matches = regex.exec(color);
stop.color = `rgb(${matches[1]},{${matches[2]}},${matches[3]})`;
diff --git a/packages/svgkit/src/page/index.js b/packages/svgkit/src/page/index.js
index 600af8e1f..6c4bff368 100644
--- a/packages/svgkit/src/page/index.js
+++ b/packages/svgkit/src/page/index.js
@@ -76,9 +76,18 @@ class SVGPage {
const state = this.stack.pop();
this.applyStyleState(state);
}
+
+ // eslint-disable-next-line class-methods-use-this
+ setDefaultStyles() {}
+
+ // eslint-disable-next-line class-methods-use-this, no-unused-vars
+ applyStyleState(state) {}
+
+ // eslint-disable-next-line class-methods-use-this
+ getStyleState() {}
}
-const mixin = methods => {
+const mixin = (methods) => {
return (() => {
const result = [];
for (const name in methods) {
diff --git a/packages/svgkit/src/page/vector.js b/packages/svgkit/src/page/vector.js
index 9ed74c3f1..db85ba3df 100644
--- a/packages/svgkit/src/page/vector.js
+++ b/packages/svgkit/src/page/vector.js
@@ -96,7 +96,7 @@ export default {
const element = createElement(gradient.type, gradient.attributes);
- gradient.stops.forEach(stop => {
+ gradient.stops.forEach((stop) => {
const stopChild = createElement('stop');
stopChild.setAttribute('offset', stop.offset);
diff --git a/packages/svgkit/src/utils/getPageSize.js b/packages/svgkit/src/utils/getPageSize.js
index d373091ee..6b387771b 100644
--- a/packages/svgkit/src/utils/getPageSize.js
+++ b/packages/svgkit/src/utils/getPageSize.js
@@ -55,53 +55,59 @@ const PAGE_SIZES = {
/**
* Transforms array into size object
*
- * @param {Array} array
- * @returns {Object} size object with width and height
+ * @param {number[]} v array
+ * @returns {{ width: number, height: number }} size object with width and height
*/
-const toSizeObject = v => ({ width: v[0], height: v[1] });
+const toSizeObject = (v) => ({ width: v[0], height: v[1] });
/**
* Flip size object
*
- * @param {Object} size object
- * @returns {Object} flipped size object
+ * @param {{ width: number, height: number }} v size object
+ * @returns {{ width: number, height: number }} flipped size object
*/
-const flipSizeObject = v => ({ width: v.height, height: v.width });
+const flipSizeObject = (v) => ({ width: v.height, height: v.width });
/**
* Returns size object from a given string
*
- * @param {String} page size string
- * @returns {Object} size object with width and height
+ * @param {string} v page size string
+ * @returns {{ width: number, height: number }} size object with width and height
*/
-const getStringSize = v => {
+const getStringSize = (v) => {
return toSizeObject(PAGE_SIZES[v.toUpperCase()]);
};
/**
* Returns size object from a single number
*
- * @param {Number} page size number
- * @returns {Object} size object with width and height
+ * @param {number} n page size number
+ * @returns {{ width: number, height: number }} size object with width and height
*/
-const getNumberSize = n => toSizeObject([n]);
+const getNumberSize = (n) => toSizeObject([n]);
/**
- * // TODO: Move this to separate pacjage to reuse with layout
+ * // TODO: Move this to separate package to reuse with layout
* Return page size in an object { width, height }
*
- * @param {Object} page instance
- * @returns {Object} size object with width and height
+ * @param {string | number[] | number | { width: number, height: number }} value page instance
+ * @param {string} orientation page orientation
+ * @returns {{ width: number, height: number }} size object with width and height
*/
const getSize = (value, orientation) => {
- let size = value;
+ /**
+ * @type {{ width: number, height: number }}
+ */
+ let size;
- if (typeof size === 'string') {
+ if (typeof value === 'string') {
size = getStringSize(value);
} else if (Array.isArray(value)) {
size = toSizeObject(value);
- } else if (typeof size === 'number') {
+ } else if (typeof value === 'number') {
size = getNumberSize(value);
+ } else {
+ size = value;
}
return orientation === 'landscape' ? flipSizeObject(size) : size;
diff --git a/packages/textkit/CHANGELOG.md b/packages/textkit/CHANGELOG.md
index 51d6e367f..4f0a3d4d0 100644
--- a/packages/textkit/CHANGELOG.md
+++ b/packages/textkit/CHANGELOG.md
@@ -1,5 +1,42 @@
# @react-pdf/textkit
+## 4.4.1
+
+### Patch Changes
+
+- [#2605](https://github.com/diegomura/react-pdf/pull/2605) [`f7505ed`](https://github.com/diegomura/react-pdf/commit/f7505ed453a1a0ae960d0e5e4a1d155803861b71) Thanks [@wojtekmaj](https://github.com/wojtekmaj)! - fix: fix CJS compatibility
+
+- Updated dependencies [[`f7505ed`](https://github.com/diegomura/react-pdf/commit/f7505ed453a1a0ae960d0e5e4a1d155803861b71)]:
+ - @react-pdf/fns@2.2.1
+
+## 4.4.0
+
+### Minor Changes
+
+- [#2600](https://github.com/diegomura/react-pdf/pull/2600) [`8350154`](https://github.com/diegomura/react-pdf/commit/83501541e3a050021e18e112bb472b2dabc142a7) Thanks [@diegomura](https://github.com/diegomura)! - feat: bidi support
+
+### Patch Changes
+
+- Updated dependencies [[`8350154`](https://github.com/diegomura/react-pdf/commit/83501541e3a050021e18e112bb472b2dabc142a7)]:
+ - @react-pdf/fns@2.2.0
+
+## 4.3.0
+
+### Minor Changes
+
+- [#2409](https://github.com/diegomura/react-pdf/pull/2409) [`b6a14fd`](https://github.com/diegomura/react-pdf/commit/b6a14fd160fab26a49f798e5294b0e361e67fe37) Thanks [@wojtekmaj](https://github.com/wojtekmaj)! - Add support for native ESM
+
+### Patch Changes
+
+- Updated dependencies [[`b6a14fd`](https://github.com/diegomura/react-pdf/commit/b6a14fd160fab26a49f798e5294b0e361e67fe37)]:
+ - @react-pdf/fns@2.1.0
+
+## 4.2.1
+
+### Patch Changes
+
+- [#2479](https://github.com/diegomura/react-pdf/pull/2479) [`45b2bd3`](https://github.com/diegomura/react-pdf/commit/45b2bd37037c605727ad5783f2f2a438dc19cac4) Thanks [@diegomura](https://github.com/diegomura)! - fix linting
+
## 4.2.0
### Minor Changes
diff --git a/packages/textkit/babel.config.js b/packages/textkit/babel.config.js
index 831adcadc..defa6f8c2 100644
--- a/packages/textkit/babel.config.js
+++ b/packages/textkit/babel.config.js
@@ -1,3 +1,3 @@
-module.exports = {
+export default {
extends: '../../babel.config.js',
};
diff --git a/packages/textkit/package.json b/packages/textkit/package.json
index 9bab92819..28d69e0f6 100644
--- a/packages/textkit/package.json
+++ b/packages/textkit/package.json
@@ -1,10 +1,18 @@
{
"name": "@react-pdf/textkit",
"license": "MIT",
- "version": "4.2.0",
+ "version": "4.4.1",
"description": "An advanced text layout framework",
- "main": "./lib/textkit.cjs.js",
- "module": "./lib/textkit.es.js",
+ "type": "module",
+ "main": "./lib/textkit.cjs",
+ "module": "./lib/textkit.js",
+ "exports": {
+ ".": {
+ "import": "./lib/textkit.js",
+ "require": "./lib/textkit.cjs",
+ "default": "./lib/textkit.js"
+ }
+ },
"repository": {
"type": "git",
"url": "https://github.com/diegomura/react-pdf.git",
@@ -15,7 +23,7 @@
"Diego Muracciole "
],
"scripts": {
- "test": "jest",
+ "test": "vitest",
"build": "rimraf ./lib && rollup -c",
"watch": "rimraf ./lib && rollup -c -w"
},
@@ -24,7 +32,8 @@
],
"dependencies": {
"@babel/runtime": "^7.20.13",
- "@react-pdf/fns": "2.0.1",
+ "@react-pdf/fns": "2.2.1",
+ "bidi-js": "^1.0.2",
"hyphen": "^1.6.4",
"unicode-properties": "^1.4.1"
}
diff --git a/packages/textkit/rollup.config.js b/packages/textkit/rollup.config.js
index d3cc8fa55..f2ec1c05b 100644
--- a/packages/textkit/rollup.config.js
+++ b/packages/textkit/rollup.config.js
@@ -1,19 +1,20 @@
import babel from '@rollup/plugin-babel';
import localResolve from 'rollup-plugin-local-resolve';
-import pkg from './package.json';
+import pkg from './package.json' assert { type: 'json' };
const cjs = {
- format: 'cjs',
exports: 'named',
+ format: 'cjs',
+ interop: 'compat',
};
const esm = {
format: 'es',
};
-const getCJS = override => Object.assign({}, cjs, override);
-const getESM = override => Object.assign({}, esm, override);
+const getCJS = (override) => Object.assign({}, cjs, override);
+const getESM = (override) => Object.assign({}, esm, override);
const babelConfig = () => ({
babelrc: true,
@@ -23,15 +24,19 @@ const babelConfig = () => ({
const input = './src/index.js';
-const getExternal = () => [...Object.keys(pkg.dependencies), /@babel\/runtime/];
+const getExternal = () => [
+ ...Object.keys(pkg.dependencies),
+ /@babel\/runtime/,
+ /hyphen/,
+];
const getPlugins = () => [localResolve(), babel(babelConfig())];
const config = {
input,
output: [
- getESM({ file: 'lib/textkit.es.js' }),
- getCJS({ file: 'lib/textkit.cjs.js' }),
+ getESM({ file: 'lib/textkit.js' }),
+ getCJS({ file: 'lib/textkit.cjs' }),
],
external: getExternal(),
plugins: getPlugins(),
diff --git a/packages/textkit/src/attributedString/advanceWidth.js b/packages/textkit/src/attributedString/advanceWidth.js
index 4f4075bc9..fb402a46e 100644
--- a/packages/textkit/src/attributedString/advanceWidth.js
+++ b/packages/textkit/src/attributedString/advanceWidth.js
@@ -1,14 +1,18 @@
import runAdvanceWidth from '../run/advanceWidth';
+/**
+ * @typedef {import('../types.js').AttributedString} AttributedString
+ */
+
/**
* Returns attributed string advancewidth
*
- * @param {Object} attributed string
- * @return {number} advance width
+ * @param {AttributedString} attributedString attributed string
+ * @returns {number} advance width
*/
-const advanceWidth = attributeString => {
+const advanceWidth = (attributedString) => {
const reducer = (acc, run) => acc + runAdvanceWidth(run);
- return attributeString.runs.reduce(reducer, 0);
+ return attributedString.runs.reduce(reducer, 0);
};
export default advanceWidth;
diff --git a/packages/textkit/src/attributedString/advanceWidthBetween.js b/packages/textkit/src/attributedString/advanceWidthBetween.js
index a44ca9edc..610e9cf76 100644
--- a/packages/textkit/src/attributedString/advanceWidthBetween.js
+++ b/packages/textkit/src/attributedString/advanceWidthBetween.js
@@ -1,15 +1,19 @@
import filterRuns from '../run/filter';
import runAdvanceWidthBetween from '../run/advanceWidthBetween';
+/**
+ * @typedef {import('../types.js').AttributedString} AttributedString
+ */
+
/**
* Advance width between start and end
* Does not consider ligature splitting for the moment.
* Check performance impact on supporting this
*
- * @param {number} start offset
- * @param {number} end offset
- * @param {Object} attributedString
- * @return {number} advance width
+ * @param {number} start offset
+ * @param {number} end offset
+ * @param {AttributedString} attributedString
+ * @returns {number} advance width
*/
const advanceWidthBetween = (start, end, attributedString) => {
const runs = filterRuns(start, end, attributedString.runs);
diff --git a/packages/textkit/src/attributedString/append.js b/packages/textkit/src/attributedString/append.js
index 99203f282..36ea784bc 100644
--- a/packages/textkit/src/attributedString/append.js
+++ b/packages/textkit/src/attributedString/append.js
@@ -4,12 +4,17 @@ import emptyRun from '../run/empty';
import appendToRun from '../run/append';
import stringFromCodePoints from '../utils/stringFromCodePoints';
+/**
+ * @typedef {import('../types.js').AttributedString} AttributedString
+ * @typedef {import('../types.js').Glyph} Glyph
+ */
+
/**
* Append glyph into last run of attributed string
*
- * @param {Object} glyph
- * @param {Object} attributed string
- * @return {Object} attributed string with new glyph
+ * @param {Glyph} glyph glyph
+ * @param {AttributedString} attributedString attributed string
+ * @returns {AttributedString} attributed string with new glyph
*/
const append = (glyph, attributedString) => {
const codePoints = glyph?.codePoints || [];
diff --git a/packages/textkit/src/attributedString/ascent.js b/packages/textkit/src/attributedString/ascent.js
index bdf444a0d..d961850ee 100644
--- a/packages/textkit/src/attributedString/ascent.js
+++ b/packages/textkit/src/attributedString/ascent.js
@@ -1,14 +1,18 @@
import runAscent from '../run/ascent';
+/**
+ * @typedef {import('../types.js').AttributedString} AttributedString
+ */
+
/**
* Returns attributed string ascent
*
- * @param {Object} attributed string
- * @return {number} ascent
+ * @param {AttributedString} attributedString attributed string
+ * @returns {number} ascent
*/
-const ascent = attributeString => {
+const ascent = (attributedString) => {
const reducer = (acc, run) => Math.max(acc, runAscent(run));
- return attributeString.runs.reduce(reducer, 0);
+ return attributedString.runs.reduce(reducer, 0);
};
export default ascent;
diff --git a/packages/textkit/src/attributedString/copy.js b/packages/textkit/src/attributedString/copy.js
deleted file mode 100644
index d2c587eb6..000000000
--- a/packages/textkit/src/attributedString/copy.js
+++ /dev/null
@@ -1,14 +0,0 @@
-import copyRun from '../run/copy';
-
-/**
- * Deep clone attributed string
- *
- * @param {Object} attributed string
- * @return {Object} cloned attributed string
- */
-const copy = attributeString => {
- const runs = attributeString.runs.map(copyRun);
- return Object.assign({}, attributeString, { runs });
-};
-
-export default copy;
diff --git a/packages/textkit/src/attributedString/descent.js b/packages/textkit/src/attributedString/descent.js
index bc7c254f1..12aefbdbc 100644
--- a/packages/textkit/src/attributedString/descent.js
+++ b/packages/textkit/src/attributedString/descent.js
@@ -1,14 +1,18 @@
import runDescent from '../run/descent';
+/**
+ * @typedef {import('../types.js').AttributedString} AttributedString
+ */
+
/**
* Returns attributed string descent
*
- * @param {Object} attributed string
- * @return {number} descent
+ * @param {AttributedString} attributedString attributed string
+ * @returns {number} descent
*/
-const descent = attributeString => {
+const descent = (attributedString) => {
const reducer = (acc, run) => Math.min(acc, runDescent(run));
- return attributeString.runs.reduce(reducer, 0);
+ return attributedString.runs.reduce(reducer, 0);
};
export default descent;
diff --git a/packages/textkit/src/attributedString/dropLast.js b/packages/textkit/src/attributedString/dropLast.js
index a94beab7f..b5840bb7a 100644
--- a/packages/textkit/src/attributedString/dropLast.js
+++ b/packages/textkit/src/attributedString/dropLast.js
@@ -2,17 +2,21 @@ import { adjust, dropLast as arrayDropLast } from '@react-pdf/fns';
import runDropLast from '../run/dropLast';
+/**
+ * @typedef {import('../types.js').AttributedString} AttributedString
+ */
+
/**
* Drop last glyph
*
- * @param {Object} attributed string
- * @return {Object} attributed string with new glyph
+ * @param {AttributedString} attributedString attributed string
+ * @returns {AttributedString} attributed string with new glyph
*/
-const dropLast = attributeString => {
- const string = arrayDropLast(attributeString.string);
- const runs = adjust(-1, runDropLast, attributeString.runs);
+const dropLast = (attributedString) => {
+ const string = arrayDropLast(attributedString.string);
+ const runs = adjust(-1, runDropLast, attributedString.runs);
- return Object.assign({}, attributeString, { string, runs });
+ return Object.assign({}, attributedString, { string, runs });
};
export default dropLast;
diff --git a/packages/textkit/src/attributedString/empty.js b/packages/textkit/src/attributedString/empty.js
index cc48b1a48..b903326e9 100644
--- a/packages/textkit/src/attributedString/empty.js
+++ b/packages/textkit/src/attributedString/empty.js
@@ -1,7 +1,7 @@
/**
* Returns empty attributed string
*
- * @return {Object} empty attributed string
+ * @returns {Object} empty attributed string
*/
const empty = () => ({ string: '', runs: [] });
diff --git a/packages/textkit/src/attributedString/end.js b/packages/textkit/src/attributedString/end.js
index d02d571fc..607d1e157 100644
--- a/packages/textkit/src/attributedString/end.js
+++ b/packages/textkit/src/attributedString/end.js
@@ -1,12 +1,16 @@
import { last } from '@react-pdf/fns';
+/**
+ * @typedef {import('../types.js').AttributedString} AttributedString
+ */
+
/**
* Get attributed string end value
*
- * @param {Object} attributed string
- * @return {number} end
+ * @param {AttributedString} attributedString attributed string
+ * @returns {number} end
*/
-const end = attributedString => {
+const end = (attributedString) => {
const { runs } = attributedString;
return runs.length === 0 ? 0 : last(runs).end;
};
diff --git a/packages/textkit/src/attributedString/fromFragments.js b/packages/textkit/src/attributedString/fromFragments.js
index cca715ebe..73b9391ca 100644
--- a/packages/textkit/src/attributedString/fromFragments.js
+++ b/packages/textkit/src/attributedString/fromFragments.js
@@ -1,18 +1,24 @@
+/**
+ * @typedef {import('../types.js').AttributedString} AttributedString
+ * @typedef {import('../types.js').Fragment} Fragment
+ */
+
/**
* Create attributed string from text fragments
*
- * @param {Array} fragments
- * @return {Object} attributed string
+ * @param {Fragment[]} fragments fragments
+ * @returns {AttributedString} attributed string
*/
-const fromFragments = fragments => {
+const fromFragments = (fragments) => {
let offset = 0;
let string = '';
const runs = [];
- fragments.forEach(fragment => {
+ fragments.forEach((fragment) => {
string += fragment.string;
runs.push({
+ ...fragment,
start: offset,
end: offset + fragment.string.length,
attributes: fragment.attributes || {},
diff --git a/packages/textkit/src/attributedString/glyphWidthAt.js b/packages/textkit/src/attributedString/glyphWidthAt.js
index c8777de8d..b04ebe67b 100644
--- a/packages/textkit/src/attributedString/glyphWidthAt.js
+++ b/packages/textkit/src/attributedString/glyphWidthAt.js
@@ -1,12 +1,16 @@
import runAt from './runAt';
import glyphIndexAt from '../run/glyphIndexAt';
+/**
+ * @typedef {import('../types.js').AttributedString} AttributedString
+ */
+
/**
* Get glyph width at string index
*
- * @param {number} string index
- * @param {Object} attributed string
- * @return {number} glyph width
+ * @param {number} index string index
+ * @param {AttributedString} string attributed string
+ * @returns {number} glyph width
*/
const glyphWidthAt = (index, string) => {
const run = runAt(index, string);
diff --git a/packages/textkit/src/attributedString/height.js b/packages/textkit/src/attributedString/height.js
index 6e7a86684..21b02e672 100644
--- a/packages/textkit/src/attributedString/height.js
+++ b/packages/textkit/src/attributedString/height.js
@@ -1,14 +1,18 @@
import runHeight from '../run/height';
+/**
+ * @typedef {import('../types.js').AttributedString} AttributedString
+ */
+
/**
* Returns attributed string height
*
- * @param {Object} attributed string
- * @return {number} height
+ * @param {AttributedString} attributedString attributed string
+ * @returns {number} height
*/
-const height = attributeString => {
+const height = (attributedString) => {
const reducer = (acc, run) => Math.max(acc, runHeight(run));
- return attributeString.runs.reduce(reducer, 0);
+ return attributedString.runs.reduce(reducer, 0);
};
export default height;
diff --git a/packages/textkit/src/attributedString/indexAtOffset.js b/packages/textkit/src/attributedString/indexAtOffset.js
index 2c394c255..e3bda9db9 100644
--- a/packages/textkit/src/attributedString/indexAtOffset.js
+++ b/packages/textkit/src/attributedString/indexAtOffset.js
@@ -2,12 +2,16 @@ import runLength from '../run/length';
import runAdvanceWidth from '../run/advanceWidth';
import runIndexAtOffset from '../run/indexAtOffset';
+/**
+ * @typedef {import('../types.js').AttributedString} AttributedString
+ */
+
/**
* Get string index at offset
*
- * @param {Object} attributed string
- * @param {number} offset
- * @return {number} string index at offset N
+ * @param {number} offset offset
+ * @param {AttributedString} string attributed string
+ * @returns {number} string index at offset N
*/
const indexAtOffset = (offset, string) => {
let index = 0;
diff --git a/packages/textkit/src/attributedString/insertGlyph.js b/packages/textkit/src/attributedString/insertGlyph.js
index 43537a7f4..221925667 100644
--- a/packages/textkit/src/attributedString/insertGlyph.js
+++ b/packages/textkit/src/attributedString/insertGlyph.js
@@ -4,13 +4,18 @@ import insert from '../run/insert';
import runIndexAt from './runIndexAt';
import stringFromCodePoints from '../utils/stringFromCodePoints';
+/**
+ * @typedef {import('../types.js').AttributedString} AttributedString
+ * @typedef {import('../types.js').Glyph} Glyph
+ */
+
/**
* Insert glyph into attributed string
*
- * @param {number} index
- * @param {Object} glyph
- * @param {Object} attributed string
- * @return {Object} attributed string with new glyph
+ * @param {number} index index
+ * @param {Glyph} glyph glyph
+ * @param {AttributedString} attributedString attributed string
+ * @returns {AttributedString} attributed string with new glyph
*/
const insertGlyph = (index, glyph, attributedString) => {
const runIndex = runIndexAt(index, attributedString);
diff --git a/packages/textkit/src/attributedString/leadingOffset.js b/packages/textkit/src/attributedString/leadingOffset.js
index 44b7bdb97..92d4243b3 100644
--- a/packages/textkit/src/attributedString/leadingOffset.js
+++ b/packages/textkit/src/attributedString/leadingOffset.js
@@ -1,12 +1,16 @@
import runLeadingOffset from '../run/leadingOffset';
+/**
+ * @typedef {import('../types.js').AttributedString} AttributedString
+ */
+
/**
* Get attributed string leading white space offset
*
- * @param {Object} attributed string
- * @return {number} leading white space offset
+ * @param {AttributedString} attributedString attributed string
+ * @returns {number} leading white space offset
*/
-const leadingOffset = attributedString => {
+const leadingOffset = (attributedString) => {
const runs = attributedString.runs || [];
return runLeadingOffset(runs[0]);
diff --git a/packages/textkit/src/attributedString/length.js b/packages/textkit/src/attributedString/length.js
index 6074a317c..e328b1ac5 100644
--- a/packages/textkit/src/attributedString/length.js
+++ b/packages/textkit/src/attributedString/length.js
@@ -1,13 +1,17 @@
import start from './start';
import end from './end';
+/**
+ * @typedef {import('../types.js').AttributedString} AttributedString
+ */
+
/**
* Get attributed string length
*
- * @param {Object} glyph string
- * @return {number} end
+ * @param {AttributedString} attributedString attributed string
+ * @returns {number} end
*/
-const length = attributedString => {
+const length = (attributedString) => {
return end(attributedString) - start(attributedString);
};
diff --git a/packages/textkit/src/attributedString/prepend.js b/packages/textkit/src/attributedString/prepend.js
index bc3305770..f5bca8d56 100644
--- a/packages/textkit/src/attributedString/prepend.js
+++ b/packages/textkit/src/attributedString/prepend.js
@@ -3,12 +3,17 @@ import emptyRun from '../run/empty';
import prependToRun from '../run/prepend';
import stringFromCodePoints from '../utils/stringFromCodePoints';
+/**
+ * @typedef {import('../types.js').AttributedString} AttributedString
+ * @typedef {import('../types.js').Glyph} Glyph
+ */
+
/**
* prepend glyph into last run of attributed string
*
- * @param {Object} glyph
- * @param {Object} attributed string
- * @return {Object} attributed string with new glyph
+ * @param {Glyph} glyph
+ * @param {AttributedString} attributedString attributed string
+ * @returns {AttributedString} attributed string with new glyph
*/
const prepend = (glyph, attributedString) => {
const codePoints = glyph?.codePoints || [];
@@ -16,7 +21,9 @@ const prepend = (glyph, attributedString) => {
const offset = codePoints.length;
const firstRun = attributedString.runs[0] || emptyRun();
- const lastRuns = attributedString.runs.slice(1).map(run => add(offset, run));
+ const lastRuns = attributedString.runs
+ .slice(1)
+ .map((run) => add(offset, run));
const runs = [prependToRun(glyph, firstRun)].concat(lastRuns);
return Object.assign({}, attributedString, { runs, string });
diff --git a/packages/textkit/src/attributedString/runAt.js b/packages/textkit/src/attributedString/runAt.js
index 57670e9ee..db3d0475e 100644
--- a/packages/textkit/src/attributedString/runAt.js
+++ b/packages/textkit/src/attributedString/runAt.js
@@ -1,11 +1,16 @@
import runIndexAt from './runIndexAt';
+/**
+ * @typedef {import('../types.js').AttributedString} AttributedString
+ * @typedef {import('../types.js').Run} Run
+ */
+
/**
* Get run at char index
*
- * @param {number} char index
- * @param {Object} attributedString
- * @return {Object} run
+ * @param {number} n char index
+ * @param {AttributedString} attributedString attributed string
+ * @returns {Run} run
*/
const runAt = (n, attributedString) => {
const runIndex = runIndexAt(n, attributedString);
diff --git a/packages/textkit/src/attributedString/runIndexAt.js b/packages/textkit/src/attributedString/runIndexAt.js
index 1a8adfa10..1049deeb0 100644
--- a/packages/textkit/src/attributedString/runIndexAt.js
+++ b/packages/textkit/src/attributedString/runIndexAt.js
@@ -1,11 +1,15 @@
import runIndexAtInternal from '../run/runIndexAt';
+/**
+ * @typedef {import('../types.js').AttributedString} AttributedString
+ */
+
/**
* Get run index at char index
*
- * @param {number} char index
- * @param {Object} attributedString
- * @return {number} run index
+ * @param {number} n char index
+ * @param {AttributedString} string attributed string
+ * @returns {number} run index
*/
const runIndexAt = (n, string) => {
return runIndexAtInternal(n, string.runs);
diff --git a/packages/textkit/src/attributedString/slice.js b/packages/textkit/src/attributedString/slice.js
index 518e4ea7a..268ce0e15 100644
--- a/packages/textkit/src/attributedString/slice.js
+++ b/packages/textkit/src/attributedString/slice.js
@@ -2,17 +2,22 @@ import sliceRun from '../run/slice';
import filterRuns from '../run/filter';
import subtractRun from '../run/subtract';
+/**
+ * @typedef {import('../types.js').AttributedString} AttributedString
+ * @typedef {import('../types.js').Run} Run
+ */
+
/**
* Slice array of runs
*
- * @param {number} start offset
- * @param {number} end offset
- * @param {Array} runs
- * @return {Array} sliced runs
+ * @param {number} start offset
+ * @param {number} end offset
+ * @param {Run[]} runs
+ * @returns {Run[]} sliced runs
*/
const sliceRuns = (start, end, runs) => {
- const sliceFirstRun = a => sliceRun(start - a.start, end - a.start, a);
- const sliceLastRun = a => sliceRun(0, end - a.start, a);
+ const sliceFirstRun = (a) => sliceRun(start - a.start, end - a.start, a);
+ const sliceLastRun = (a) => sliceRun(0, end - a.start, a);
return runs.map((run, i) => {
let result = run;
@@ -30,10 +35,10 @@ const sliceRuns = (start, end, runs) => {
/**
* Slice attributed string between two indices
*
- * @param {number} start offset
- * @param {number} end offset
- * @param {Object} attributedString
- * @return {Object} attributedString
+ * @param {number} start offset
+ * @param {number} end offset
+ * @param {AttributedString} attributedString attributed string
+ * @returns {AttributedString} attributed string
*/
const slice = (start, end, attributedString) => {
if (attributedString.string.length === 0) return attributedString;
diff --git a/packages/textkit/src/attributedString/sliceAtOffset.js b/packages/textkit/src/attributedString/sliceAtOffset.js
index f35362e15..42ad56e92 100644
--- a/packages/textkit/src/attributedString/sliceAtOffset.js
+++ b/packages/textkit/src/attributedString/sliceAtOffset.js
@@ -1,12 +1,16 @@
import slice from './slice';
import indexAtOffset from './indexAtOffset';
+/**
+ * @typedef {import('../types.js').AttributedString} AttributedString
+ */
+
/**
* Slice attributed string at given offset
*
- * @param {number} offset
- * @param {Object} attributedString
- * @return {Object} attributedString
+ * @param {number} offset offset
+ * @param {AttributedString} string attributed string
+ * @returns {AttributedString} attributed string
*/
const sliceAtOffset = (offset, string) => {
const index = indexAtOffset(offset, string);
diff --git a/packages/textkit/src/attributedString/start.js b/packages/textkit/src/attributedString/start.js
index 927441d3b..6ac8eb2d5 100644
--- a/packages/textkit/src/attributedString/start.js
+++ b/packages/textkit/src/attributedString/start.js
@@ -1,10 +1,14 @@
+/**
+ * @typedef {import('../types.js').AttributedString} AttributedString
+ */
+
/**
* Get attributed string start value
*
- * @param {Object} attributed string
- * @return {number} start
+ * @param {AttributedString} attributedString attributed string
+ * @returns {number} start
*/
-const start = attributedString => {
+const start = (attributedString) => {
const { runs } = attributedString;
return runs.length === 0 ? 0 : runs[0].start;
};
diff --git a/packages/textkit/src/attributedString/trailingOffset.js b/packages/textkit/src/attributedString/trailingOffset.js
index 2f55d6bb0..21ff7d1ac 100644
--- a/packages/textkit/src/attributedString/trailingOffset.js
+++ b/packages/textkit/src/attributedString/trailingOffset.js
@@ -2,13 +2,17 @@ import { last } from '@react-pdf/fns';
import runTrailingOffset from '../run/trailingOffset';
+/**
+ * @typedef {import('../types.js').AttributedString} AttributedString
+ */
+
/**
* Get attributed string trailing white space offset
*
- * @param {Object} attributed string
- * @return {number} trailing white space offset
+ * @param {AttributedString} attributedString attributed string
+ * @returns {number} trailing white space offset
*/
-const trailingOffset = attributedString => {
+const trailingOffset = (attributedString) => {
const runs = attributedString.runs || [];
return runTrailingOffset(last(runs));
diff --git a/packages/textkit/src/attributedString/trim.js b/packages/textkit/src/attributedString/trim.js
index b000c5b69..84e47b80e 100644
--- a/packages/textkit/src/attributedString/trim.js
+++ b/packages/textkit/src/attributedString/trim.js
@@ -1,8 +1,22 @@
import slice from './slice';
-const findCharIndex = string => string.search(/\S/g);
+/**
+ * @typedef {import('../types.js').AttributedString} AttributedString
+ */
+
+/**
+ * @param {string} string
+ * @returns {number} index
+ */
+const findCharIndex = (string) => {
+ return string.search(/\S/g);
+};
-const findLastCharIndex = string => {
+/**
+ * @param {string} string
+ * @returns {number} index
+ */
+const findLastCharIndex = (string) => {
const match = string.match(/\S/g);
return match ? string.lastIndexOf(match[match.length - 1]) : -1;
};
@@ -10,10 +24,10 @@ const findLastCharIndex = string => {
/**
* Removes (strips) whitespace from both ends of the attributted string.
*
- * @param {Object} attributedString
- * @return {Object} attributedString
+ * @param {AttributedString} attributedString attributed string
+ * @returns {AttributedString} attributed string
*/
-const trim = attributedString => {
+const trim = (attributedString) => {
const start = findCharIndex(attributedString.string);
const end = findLastCharIndex(attributedString.string);
diff --git a/packages/textkit/src/block/height.js b/packages/textkit/src/block/height.js
index 8937f7a4d..9c99d3b4f 100644
--- a/packages/textkit/src/block/height.js
+++ b/packages/textkit/src/block/height.js
@@ -1,10 +1,10 @@
/**
* Get paragraph block height
*
- * @param {Object} paragraph block
- * @return {number} paragraph block height
+ * @param {Object} paragraph block
+ * @returns {number} paragraph block height
*/
-const height = paragraph => {
+const height = (paragraph) => {
return paragraph.reduce((acc, block) => acc + block.box.height, 0);
};
diff --git a/packages/textkit/src/block/sliceAtHeight.js b/packages/textkit/src/block/sliceAtHeight.js
index e231897d3..786be6472 100644
--- a/packages/textkit/src/block/sliceAtHeight.js
+++ b/packages/textkit/src/block/sliceAtHeight.js
@@ -1,9 +1,9 @@
/**
* Slice block at given height
*
- * @param {number} height
- * @param {Object} paragraph block
- * @return {number} sliced paragraph block
+ * @param {number} height height
+ * @param {Object} block paragraph block
+ * @returns {number[]} sliced paragraph block
*/
const sliceAtHeight = (height, block) => {
const newBlock = [];
diff --git a/packages/textkit/src/block/truncate.js b/packages/textkit/src/block/truncate.js
index 02bc67590..ecac3c64d 100644
--- a/packages/textkit/src/block/truncate.js
+++ b/packages/textkit/src/block/truncate.js
@@ -9,10 +9,10 @@ const ELLIPSIS_STRING = String.fromCharCode(ELLIPSIS_UNICODE);
/**
* Get ellipsis codepoint. This may be different in standard and embedded fonts
*
- * @param {number} font
- * @return {Object} ellipsis codepoint
+ * @param {Object} font
+ * @returns {Object} ellipsis codepoint
*/
-const getEllipsisCodePoint = font => {
+const getEllipsisCodePoint = (font) => {
if (!font.encode) return ELLIPSIS_UNICODE;
const [codePoints] = font.encode(ELLIPSIS_STRING);
@@ -23,11 +23,10 @@ const getEllipsisCodePoint = font => {
/**
* Trucante block with ellipsis
*
- * @param {number} lines quantity
- * @param {Object} paragraph block
- * @return {Object} sliced paragraph block
+ * @param {Object} block paragraph block
+ * @returns {Object} sliced paragraph block
*/
-const truncate = block => {
+const truncate = (block) => {
const runs = last(block)?.runs || [];
const font = last(runs)?.attributes?.font;
diff --git a/packages/textkit/src/engines/bidi/index.js b/packages/textkit/src/engines/bidi/index.js
new file mode 100644
index 000000000..d0b7429c8
--- /dev/null
+++ b/packages/textkit/src/engines/bidi/index.js
@@ -0,0 +1,51 @@
+import bidiFactory from 'bidi-js';
+
+const bidi = bidiFactory();
+
+/**
+ * @param {Object} layout options
+ * @param {Object} attributed string
+ * @return {Object} attributed string
+ */
+const bidiEngine = () => (attributedString) => {
+ const { string } = attributedString;
+ const direction = attributedString.runs[0]?.attributes.direction;
+
+ const { levels } = bidi.getEmbeddingLevels(string, direction);
+
+ let lastLevel = null;
+ let lastIndex = 0;
+ let index = 0;
+ const res = [];
+
+ for (let i = 0; i < levels.length; i += 1) {
+ const level = levels[i];
+
+ if (level !== lastLevel) {
+ if (lastLevel !== null) {
+ res.push({
+ start: lastIndex,
+ end: index,
+ attributes: { bidiLevel: lastLevel },
+ });
+ }
+
+ lastIndex = index;
+ lastLevel = level;
+ }
+
+ index += 1;
+ }
+
+ if (lastIndex < string.length) {
+ res.push({
+ start: lastIndex,
+ end: string.length,
+ attributes: { bidiLevel: lastLevel },
+ });
+ }
+
+ return { string, runs: res };
+};
+
+export default bidiEngine;
diff --git a/packages/textkit/src/engines/fontSubstitution/index.js b/packages/textkit/src/engines/fontSubstitution/index.js
index 1ebd863ae..3fbf3ac9c 100644
--- a/packages/textkit/src/engines/fontSubstitution/index.js
+++ b/packages/textkit/src/engines/fontSubstitution/index.js
@@ -4,72 +4,85 @@ import { last } from '@react-pdf/fns';
import empty from '../../attributedString/empty';
-const getFontSize = value => value.attributes.fontSize || 12;
+/**
+ * @typedef {import('../../types.js').AttributedString} AttributedString
+ * @typedef {import('../../types.js').Run} Run
+ */
+
+/**
+ * @param {Run} run run
+ * @returns {number}
+ */
+const getFontSize = (run) => {
+ return run.attributes.fontSize || 12;
+};
/**
* Resolve font runs in an AttributedString, grouping equal
* runs and performing font substitution where necessary.
- *
- * @param {Object} layout options
- * @param {Object} attributed string
- * @return {Object} attributed string
*/
-const fontSubstitution = () => attributedString => {
- const { string, runs } = attributedString;
-
- let lastFont = null;
- let lastIndex = 0;
- let index = 0;
- const res = [];
-
- if (!string) return empty();
-
- for (const run of runs) {
- const fontSize = getFontSize(run);
- const defaultFont = run.attributes.font;
-
- if (string.length === 0) {
- res.push({ start: 0, end: 0, attributes: { font: defaultFont } });
- break;
- }
+const fontSubstitution = () => {
+ /**
+ * @param {AttributedString} attributedString attributed string
+ * @returns {AttributedString} attributed string
+ */
+ return (attributedString) => {
+ const { string, runs } = attributedString;
+
+ let lastFont = null;
+ let lastIndex = 0;
+ let index = 0;
+ const res = [];
+
+ if (!string) return empty();
+
+ for (const run of runs) {
+ const fontSize = getFontSize(run);
+ const defaultFont = run.attributes.font;
+
+ if (string.length === 0) {
+ res.push({ start: 0, end: 0, attributes: { font: defaultFont } });
+ break;
+ }
- for (const char of string.slice(run.start, run.end)) {
- const font = defaultFont;
-
- if (font !== lastFont) {
- if (lastFont) {
- res.push({
- start: lastIndex,
- end: index,
- attributes: {
- font: lastFont,
- scale: lastFont ? fontSize / lastFont.unitsPerEm : 0,
- },
- });
+ for (const char of string.slice(run.start, run.end)) {
+ const font = defaultFont;
+
+ if (font !== lastFont) {
+ if (lastFont) {
+ res.push({
+ start: lastIndex,
+ end: index,
+ attributes: {
+ font: lastFont,
+ scale: lastFont ? fontSize / lastFont.unitsPerEm : 0,
+ },
+ });
+ }
+
+ lastFont = font;
+ lastIndex = index;
}
- lastFont = font;
- lastIndex = index;
+ index += char.length;
}
+ }
- index += char.length;
+ if (lastIndex < string.length) {
+ const fontSize = getFontSize(last(runs));
+
+ res.push({
+ start: lastIndex,
+ end: string.length,
+ attributes: {
+ font: lastFont,
+ scale: lastFont ? fontSize / lastFont.unitsPerEm : 0,
+ },
+ });
}
- }
-
- if (lastIndex < string.length) {
- const fontSize = getFontSize(last(runs));
-
- res.push({
- start: lastIndex,
- end: string.length,
- attributes: {
- font: lastFont,
- scale: lastFont ? fontSize / lastFont.unitsPerEm : 0,
- },
- });
- }
-
- return { string, runs: res };
+
+ return { string, runs: res };
+ };
};
export default fontSubstitution;
diff --git a/packages/textkit/src/engines/justification/getFactors.js b/packages/textkit/src/engines/justification/getFactors.js
index f24f45505..e503cc4a5 100644
--- a/packages/textkit/src/engines/justification/getFactors.js
+++ b/packages/textkit/src/engines/justification/getFactors.js
@@ -49,7 +49,7 @@ const getWhitespaceFactor = (direction, options) => {
: Object.assign({}, SHRINK_WHITESPACE_FACTOR, shrinkWhitespaceFactor);
};
-const factor = (direction, options) => glyphs => {
+const factor = (direction, options) => (glyphs) => {
const charFactor = getCharFactor(direction, options);
const whitespaceFactor = getWhitespaceFactor(direction, options);
diff --git a/packages/textkit/src/engines/justification/index.js b/packages/textkit/src/engines/justification/index.js
index 33164f78b..66a0d2058 100644
--- a/packages/textkit/src/engines/justification/index.js
+++ b/packages/textkit/src/engines/justification/index.js
@@ -9,7 +9,7 @@ import advanceWidth from '../../attributedString/advanceWidth';
/**
* Adjust run positions by given distances
*
- * @param {Array} distances
+ * @param {number[]} distances
* @param {Object} line
* @returns {Object} line
*/
@@ -29,21 +29,25 @@ const justifyLine = (distances, line) => {
* justification. This implementation is based on a description of Apple's
* justification algorithm from a PDF in the Apple Font Tools package.
*
- * //TODO: Make it immutable
+ * // TODO: Make it immutable
*
- * @param {Object} layout options
- * @param {Object} line
- * @returns {Object} line
+ * @param {Object} options layout options
*/
-const justification = options => line => {
- const gap = line.box.width - advanceWidth(line);
+const justification = (options) => {
+ /**
+ * @param {Object} line
+ * @returns {Object} line
+ */
+ return (line) => {
+ const gap = line.box.width - advanceWidth(line);
- if (gap === 0) return; // Exact fit
+ if (gap === 0) return; // Exact fit
- const factors = getFactors(gap, line, options);
- const distances = getDistances(gap, factors);
+ const factors = getFactors(gap, line, options);
+ const distances = getDistances(gap, factors);
- return justifyLine(distances, line);
+ return justifyLine(distances, line);
+ };
};
export default justification;
diff --git a/packages/textkit/src/engines/linebreaker/bestFit.js b/packages/textkit/src/engines/linebreaker/bestFit.js
index 9f5e2277d..1bc0e600f 100644
--- a/packages/textkit/src/engines/linebreaker/bestFit.js
+++ b/packages/textkit/src/engines/linebreaker/bestFit.js
@@ -1,6 +1,12 @@
/* eslint-disable no-plusplus */
const INFINITY = 10000;
+/**
+ * @param {Object[]} subnodes
+ * @param {number[]} widths
+ * @param {number} lineNumber
+ * @returns {number}
+ */
const getNextBreakpoint = (subnodes, widths, lineNumber) => {
let position = null;
let minimumBadness = Infinity;
@@ -8,7 +14,7 @@ const getNextBreakpoint = (subnodes, widths, lineNumber) => {
const sum = { width: 0, stretch: 0, shrink: 0 };
const lineLength = widths[Math.min(lineNumber, widths.length - 1)];
- const calculateRatio = node => {
+ const calculateRatio = (node) => {
if (sum.width < lineLength) {
return sum.stretch - node.stretch > 0
? (lineLength - sum.width) / sum.stretch
@@ -66,6 +72,10 @@ const getNextBreakpoint = (subnodes, widths, lineNumber) => {
return sum.width - sum.shrink > lineLength ? position : null;
};
+/**
+ * @param {Object[]} nodes
+ * @param {number[]} widths
+ */
const applyBestFit = (nodes, widths) => {
let count = 0;
let lineNumber = 0;
diff --git a/packages/textkit/src/engines/linebreaker/index.js b/packages/textkit/src/engines/linebreaker/index.js
index 6f1d67b75..33405a947 100644
--- a/packages/textkit/src/engines/linebreaker/index.js
+++ b/packages/textkit/src/engines/linebreaker/index.js
@@ -4,6 +4,11 @@ import slice from '../../attributedString/slice';
import insertGlyph from '../../attributedString/insertGlyph';
import advanceWidthBetween from '../../attributedString/advanceWidthBetween';
+/**
+ * @typedef {import('../../types.js').AttributedString} AttributedString
+ * @typedef {import('../../types.js').Attributes} Attributes
+ */
+
const HYPHEN = 0x002d;
const TOLERANCE_STEPS = 5;
const TOLERANCE_LIMIT = 50;
@@ -17,10 +22,10 @@ const opts = {
/**
* Slice attributed string to many lines
*
- * @param {Object} attributed string
- * @param {Array} nodes
- * @param {Array} breaks
- * @return {Array} attributed strings
+ * @param {AttributedString} string attributed string
+ * @param {Object[]} nodes
+ * @param {Object[]} breaks
+ * @returns {AttributedString[]} attributed strings
*/
const breakLines = (string, nodes, breaks) => {
let start = 0;
@@ -57,10 +62,10 @@ const breakLines = (string, nodes, breaks) => {
/**
* Return Knuth & Plass nodes based on line and previously calculated syllables
*
- * @param {Object} attributed string
- * @param {Object} attributed string
- * @param {Object} layout options
- * @return {Array} attributed strings
+ * @param {AttributedString} attributedString attributed string
+ * @param {Object} args attributed string args
+ * @param {Object} options layout options
+ * @returns {Object[]} attributed strings
*/
const getNodes = (attributedString, { align }, options) => {
let start = 0;
@@ -105,40 +110,50 @@ const getNodes = (attributedString, { align }, options) => {
return result;
};
-const getStyles = attributedString =>
- attributedString.runs?.[0]?.attributes || {};
+/**
+ * @param {AttributedString} attributedString attributed string
+ * @returns {Attributes} styles
+ */
+const getStyles = (attributedString) => {
+ return attributedString.runs?.[0]?.attributes || {};
+};
/**
* Performs Knuth & Plass line breaking algorithm
* Fallbacks to best fit algorithm if latter not successful
*
- * @param {Object} layout options
- * @param {Object} attributed string
- * @param {Object} attributed string
- * @return {Array} attributed strings
+ * @param {Object} options layout options
*/
-const linebreaker = options => (attributedString, availableWidths) => {
- let tolerance = options.tolerance || 4;
-
- const style = getStyles(attributedString);
- const nodes = getNodes(attributedString, style, options);
-
- let breaks = linebreak(nodes, availableWidths, { tolerance });
-
- // Try again with a higher tolerance if the line breaking failed.
- while (breaks.length === 0 && tolerance < TOLERANCE_LIMIT) {
- tolerance += TOLERANCE_STEPS;
- breaks = linebreak(nodes, availableWidths, { tolerance });
- }
+const linebreaker = (options) => {
+ /**
+ * @param {AttributedString} attributedString attributed string
+ * @param {number[]} availableWidths available widths
+ * @returns {AttributedString[]} attributed strings
+ */
+ return (attributedString, availableWidths) => {
+ let tolerance = options.tolerance || 4;
+
+ const style = getStyles(attributedString);
+ const nodes = getNodes(attributedString, style, options);
+
+ /** @type {Object[]} */
+ let breaks = linebreak(nodes, availableWidths, { tolerance });
+
+ // Try again with a higher tolerance if the line breaking failed.
+ while (breaks.length === 0 && tolerance < TOLERANCE_LIMIT) {
+ tolerance += TOLERANCE_STEPS;
+ breaks = linebreak(nodes, availableWidths, { tolerance });
+ }
- if (
- breaks.length === 0 ||
- (breaks.length === 1 && breaks[0].position === 0)
- ) {
- breaks = bestFit(nodes, availableWidths);
- }
+ if (
+ breaks.length === 0 ||
+ (breaks.length === 1 && breaks[0].position === 0)
+ ) {
+ breaks = bestFit(nodes, availableWidths);
+ }
- return breakLines(attributedString, nodes, breaks.slice(1));
+ return breakLines(attributedString, nodes, breaks.slice(1));
+ };
};
export default linebreaker;
diff --git a/packages/textkit/src/engines/linebreaker/linebreak.js b/packages/textkit/src/engines/linebreaker/linebreak.js
index f6b0edfd7..0fd064aa8 100644
--- a/packages/textkit/src/engines/linebreaker/linebreak.js
+++ b/packages/textkit/src/engines/linebreaker/linebreak.js
@@ -2,6 +2,9 @@
import LinkedList from './linkedList';
/**
+ * @param {Object[]} nodes
+ * @param {number[]} lines
+ * @param {Object} settings
* @preserve Knuth and Plass line breaking algorithm in JavaScript
*
* Licensed under the new BSD License.
@@ -131,12 +134,18 @@ const linebreak = (nodes, lines, settings) => {
let next = null;
let ratio = 0;
let demerits = 0;
+ /**
+ * @type {Object[]}
+ */
let candidates = [];
let badness;
let currentLine = 0;
let tmpSum;
let currentClass = 0;
let fitnessClass;
+ /**
+ * @type {Object}
+ */
let candidate;
let newNode;
@@ -314,7 +323,7 @@ const linebreak = (nodes, lines, settings) => {
if (activeNodes.size() !== 0) {
// Find the best active node (the one with the least total demerits.)
- activeNodes.forEach(node => {
+ activeNodes.forEach((node) => {
if (node.data.demerits < tmp.data.demerits) {
tmp = node;
}
diff --git a/packages/textkit/src/engines/linebreaker/linkedList.js b/packages/textkit/src/engines/linebreaker/linkedList.js
index c069d4828..f1ca27a35 100644
--- a/packages/textkit/src/engines/linebreaker/linkedList.js
+++ b/packages/textkit/src/engines/linebreaker/linkedList.js
@@ -19,6 +19,7 @@ class LinkedList {
this.head = null;
this.tail = null;
this.listSize = 0;
+ this.listLength = 0;
}
isLinked(node) {
diff --git a/packages/textkit/src/engines/scriptItemizer/index.js b/packages/textkit/src/engines/scriptItemizer/index.js
index b7575dde8..4b20a6cef 100644
--- a/packages/textkit/src/engines/scriptItemizer/index.js
+++ b/packages/textkit/src/engines/scriptItemizer/index.js
@@ -5,53 +5,59 @@ import empty from '../../attributedString/empty';
const ignoredScripts = ['Common', 'Inherited', 'Unknown'];
/**
- * Resolves unicode script in runs, grouping equal runs together
- *
- * @param {Object} layout options
- * @param {Object} attributed string
- * @return {Object} attributed string
+ * @typedef {import('../../types.js').AttributedString} AttributedString
*/
-const scriptItemizer = () => attributedString => {
- const { string } = attributedString;
-
- let lastScript = 'Unknown';
- let lastIndex = 0;
- let index = 0;
- const res = [];
-
- if (!string) return empty();
-
- for (let i = 0; i < string.length; i += 1) {
- const char = string[i];
-
- const codePoint = char.codePointAt();
- const script = unicode.getScript(codePoint);
- if (script !== lastScript && !ignoredScripts.includes(script)) {
- if (lastScript !== 'Unknown') {
- res.push({
- start: lastIndex,
- end: index,
- attributes: { script: lastScript },
- });
+/**
+ * Resolves unicode script in runs, grouping equal runs together
+ */
+const scriptItemizer = () => {
+ /**
+ * @param {AttributedString} attributedString attributed string
+ * @returns {AttributedString} attributed string
+ */
+ return (attributedString) => {
+ const { string } = attributedString;
+
+ let lastScript = 'Unknown';
+ let lastIndex = 0;
+ let index = 0;
+ const res = [];
+
+ if (!string) return empty();
+
+ for (let i = 0; i < string.length; i += 1) {
+ const char = string[i];
+
+ const codePoint = char.codePointAt();
+ const script = unicode.getScript(codePoint);
+
+ if (script !== lastScript && !ignoredScripts.includes(script)) {
+ if (lastScript !== 'Unknown') {
+ res.push({
+ start: lastIndex,
+ end: index,
+ attributes: { script: lastScript },
+ });
+ }
+
+ lastIndex = index;
+ lastScript = script;
}
- lastIndex = index;
- lastScript = script;
+ index += char.length;
}
- index += char.length;
- }
-
- if (lastIndex < string.length) {
- res.push({
- start: lastIndex,
- end: string.length,
- attributes: { script: lastScript },
- });
- }
+ if (lastIndex < string.length) {
+ res.push({
+ start: lastIndex,
+ end: string.length,
+ attributes: { script: lastScript },
+ });
+ }
- return { string, runs: res };
+ return { string, runs: res };
+ };
};
export default scriptItemizer;
diff --git a/packages/textkit/src/engines/textDecoration/index.js b/packages/textkit/src/engines/textDecoration/index.js
index 78ff6c449..75489745e 100644
--- a/packages/textkit/src/engines/textDecoration/index.js
+++ b/packages/textkit/src/engines/textDecoration/index.js
@@ -13,7 +13,7 @@ const BASE_FONT_SIZE = 12;
* DecorationLines for a line fragment, including underlines
* and strikes.
*/
-const textDecoration = () => lineFragment => {
+const textDecoration = () => (lineFragment) => {
let x = lineFragment.overflowLeft || 0;
const overflowRight = lineFragment.overflowRight || 0;
const maxX = advanceWidth(lineFragment) - overflowRight;
diff --git a/packages/textkit/src/engines/wordHyphenation/index.js b/packages/textkit/src/engines/wordHyphenation/index.js
index 4fa45e6b1..93a1321d6 100644
--- a/packages/textkit/src/engines/wordHyphenation/index.js
+++ b/packages/textkit/src/engines/wordHyphenation/index.js
@@ -1,27 +1,46 @@
import hyphen from 'hyphen';
-import pattern from 'hyphen/patterns/en-us';
+// This file is ran directly with Node - needs to have .js extension
+// eslint-disable-next-line import/extensions
+import pattern from 'hyphen/patterns/en-us.js';
import { isNil } from '@react-pdf/fns';
const SOFT_HYPHEN = '\u00ad';
const hyphenator = hyphen(pattern);
-const splitHyphen = word => word.split(SOFT_HYPHEN);
+
+/**
+ * @param {string} word
+ * @returns {string[]} word parts
+ */
+const splitHyphen = (word) => {
+ return word.split(SOFT_HYPHEN);
+};
const cache = {};
-const getParts = word => {
+/**
+ * @param {string} word
+ * @returns {string[]} word parts
+ */
+const getParts = (word) => {
const base = word.includes(SOFT_HYPHEN) ? word : hyphenator(word);
return splitHyphen(base);
};
-const wordHyphenation = () => word => {
- const cacheKey = `_${word}`;
+const wordHyphenation = () => {
+ /**
+ * @param {string} word word
+ * @returns {string[]} word parts
+ */
+ return (word) => {
+ const cacheKey = `_${word}`;
- if (isNil(word)) return [];
- if (cache[cacheKey]) return cache[cacheKey];
+ if (isNil(word)) return [];
+ if (cache[cacheKey]) return cache[cacheKey];
- cache[cacheKey] = getParts(word);
+ cache[cacheKey] = getParts(word);
- return cache[cacheKey];
+ return cache[cacheKey];
+ };
};
export default wordHyphenation;
diff --git a/packages/textkit/src/glyph/fromCodePoint.js b/packages/textkit/src/glyph/fromCodePoint.js
index 66389ef4a..bed883efb 100644
--- a/packages/textkit/src/glyph/fromCodePoint.js
+++ b/packages/textkit/src/glyph/fromCodePoint.js
@@ -1,11 +1,17 @@
+/**
+ * @typedef {import('../types.js').Font} Font
+ * @typedef {import('../types.js').Glyph} Glyph
+ */
+
/**
* Get glyph for a given code point
*
- * @param {number} codePoint
- * @param {Object} font
- * @return {Object} glyph
+ * @param {number} [value] codePoint
+ * @param {Font} [font] font
+ * @returns {Glyph} glyph
* */
-const fromCodePoint = (value, font) =>
- font && value ? font.glyphForCodePoint(value) : null;
+const fromCodePoint = (value, font) => {
+ return font && value ? font.glyphForCodePoint(value) : null;
+};
export default fromCodePoint;
diff --git a/packages/textkit/src/glyph/isWhiteSpace.js b/packages/textkit/src/glyph/isWhiteSpace.js
index 0d601679f..a599e49a4 100644
--- a/packages/textkit/src/glyph/isWhiteSpace.js
+++ b/packages/textkit/src/glyph/isWhiteSpace.js
@@ -1,12 +1,16 @@
+/**
+ * @typedef {import('../types.js').Glyph} Glyph
+ */
+
const WHITE_SPACES_CODE = 32;
/**
* Check if glyph is white space
*
- * @param {Object} glyph
- * @return {Boolean} is white space
+ * @param {Glyph} [glyph] glyph
+ * @returns {boolean} whether glyph is white space
* */
-const isWhiteSpace = glyph => {
+const isWhiteSpace = (glyph) => {
const codePoints = glyph?.codePoints || [];
return codePoints.includes(WHITE_SPACES_CODE);
};
diff --git a/packages/textkit/src/glyph/slice.js b/packages/textkit/src/glyph/slice.js
index 220c60403..2bd853cf9 100644
--- a/packages/textkit/src/glyph/slice.js
+++ b/packages/textkit/src/glyph/slice.js
@@ -1,12 +1,17 @@
+/**
+ * @typedef {import('../types.js').Font} Font
+ * @typedef {import('../types.js').Glyph} Glyph
+ */
+
/**
* Slice glyph between codePoints range
* Util for breaking ligatures
*
- * @param {number} start code point index
- * @param {number} end code point index
- * @param {Object} font to generate new glyph
- * @param {Object} glyph to be sliced
- * @return {Array} sliced glyph parts
+ * @param {number} start start code point index
+ * @param {number} end end code point index
+ * @param {Font} font font to generate new glyph
+ * @param {Glyph} glyph glyph to be sliced
+ * @returns {Glyph[]} sliced glyph parts
*/
const slice = (start, end, font, glyph) => {
if (!glyph) return [];
@@ -15,7 +20,11 @@ const slice = (start, end, font, glyph) => {
const codePoints = glyph.codePoints.slice(start, end);
const string = String.fromCodePoint(...codePoints);
- return font ? font.layout(string).glyphs : [glyph];
+
+ // passing LTR To force fontkit to not reverse the string
+ return font
+ ? font.layout(string, undefined, undefined, undefined, 'ltr').glyphs
+ : [glyph];
};
export default slice;
diff --git a/packages/textkit/src/index.js b/packages/textkit/src/index.js
index 08593be16..8e2b6c184 100644
--- a/packages/textkit/src/index.js
+++ b/packages/textkit/src/index.js
@@ -1,4 +1,5 @@
import layoutEngine from './layout';
+import bidi from './engines/bidi';
import linebreaker from './engines/linebreaker';
import justification from './engines/justification';
import textDecoration from './engines/textDecoration';
@@ -7,6 +8,7 @@ import wordHyphenation from './engines/wordHyphenation';
import fontSubstitution from './engines/fontSubstitution';
export {
+ bidi,
linebreaker,
justification,
textDecoration,
diff --git a/packages/textkit/src/indices/append.js b/packages/textkit/src/indices/append.js
index 04d114c53..a87dd7108 100644
--- a/packages/textkit/src/indices/append.js
+++ b/packages/textkit/src/indices/append.js
@@ -5,9 +5,9 @@ import { isNil, last } from '@react-pdf/fns';
*
* Ex. appendIndices(3, [0, 1, 2, 2]) => [0, 1, 2, 2, 3, 3, 3]
*
- * @param {number} length
- * @param {Array} glyph indices
- * @return {Array} extended glyph indices
+ * @param {number} length length
+ * @param {number[]} indices glyph indices
+ * @returns {number[]} extended glyph indices
*/
const appendIndices = (length, indices) => {
const lastIndex = last(indices);
diff --git a/packages/textkit/src/indices/normalize.js b/packages/textkit/src/indices/normalize.js
index 3b0baa639..892509920 100644
--- a/packages/textkit/src/indices/normalize.js
+++ b/packages/textkit/src/indices/normalize.js
@@ -1,12 +1,12 @@
/**
* Returns new array starting with zero, and keeping same relation between consecutive values
*
- * @param {Array[number]} list
- * @return {boolean} normalized array
+ * @param {number[]} array list
+ * @returns {number[]} normalized array
*/
-const normalize = array => {
+const normalize = (array) => {
const head = array[0];
- return array.map(value => value - head);
+ return array.map((value) => value - head);
};
export default normalize;
diff --git a/packages/textkit/src/indices/prepend.js b/packages/textkit/src/indices/prepend.js
index fbe189e30..a0cd7a3aa 100644
--- a/packages/textkit/src/indices/prepend.js
+++ b/packages/textkit/src/indices/prepend.js
@@ -3,15 +3,15 @@
*
* Ex. prepend(3, [0, 1, 2, 2]) => [0, 0, 0, 1, 2, 3, 3]
*
- * @param {number} length
- * @param {Array} glyph indices
- * @return {Array} extended glyph indices
+ * @param {number} length length
+ * @param {number[]} indices glyph indices
+ * @returns {number[]} extended glyph indices
*/
const prepend = (length, indices) => {
if (length === 0) return indices;
const newIndices = Array(length).fill(0);
- const lastIndices = indices.map(value => value + 1);
+ const lastIndices = indices.map((value) => value + 1);
return newIndices.concat(lastIndices);
};
diff --git a/packages/textkit/src/indices/resolve.js b/packages/textkit/src/indices/resolve.js
index 87e2244be..81ac3a6f0 100644
--- a/packages/textkit/src/indices/resolve.js
+++ b/packages/textkit/src/indices/resolve.js
@@ -1,10 +1,14 @@
-const DUMMY_CODEPOINT = 123
+/**
+ * @typedef {import('../types.js').Glyph} Glyph
+ */
+
+const DUMMY_CODEPOINT = 123;
/**
* Resolve string indices based on glyphs code points
*
- * @param {Array} glyphs
- * @return {Array} glyph indices
+ * @param {Glyph[]} glyphs
+ * @returns {number[]} glyph indices
*/
const resolve = (glyphs = []) => {
return glyphs.reduce((acc, glyph) => {
@@ -15,7 +19,7 @@ const resolve = (glyphs = []) => {
const last = acc[acc.length - 1];
const next = codePoints.map(() => last + 1);
- return [...acc, ...next]
+ return [...acc, ...next];
}, []);
};
diff --git a/packages/textkit/src/layout/applyDefaultStyles.js b/packages/textkit/src/layout/applyDefaultStyles.js
index b253e447d..ef86ae220 100644
--- a/packages/textkit/src/layout/applyDefaultStyles.js
+++ b/packages/textkit/src/layout/applyDefaultStyles.js
@@ -1,67 +1,80 @@
-const applyAttributes = a => ({
- align: a.align || 'left',
- alignLastLine:
- a.alignLastLine || (a.align === 'justify' ? 'left' : a.align || 'left'),
- attachment: a.attachment || null,
- backgroundColor: a.backgroundColor || null,
- bidiLevel: a.bidiLevel || null,
- bullet: a.bullet || null,
- characterSpacing: a.characterSpacing || 0,
- color: a.color || 'black',
- features: a.features || [],
- fill: a.fill !== false,
- font: a.font || null,
- fontSize: a.fontSize || 12,
- hangingPunctuation: a.hangingPunctuation || false,
- hyphenationFactor: a.hyphenationFactor || 0,
- indent: a.indent || 0,
- justificationFactor: a.justificationFactor || 1,
- lineHeight: a.lineHeight || null,
- lineSpacing: a.lineSpacing || 0,
- link: a.link || null,
- marginLeft: a.marginLeft || a.margin || 0,
- marginRight: a.marginRight || a.margin || 0,
- opacity: a.opacity,
- paddingTop: a.paddingTop || a.padding || 0,
- paragraphSpacing: a.paragraphSpacing || 0,
- underline: a.underline || false,
- underlineColor: a.underlineColor || a.color || 'black',
- underlineStyle: a.underlineStyle || 'solid',
- script: a.script || null,
- shrinkFactor: a.shrinkFactor || 0,
- strike: a.strike || false,
- strikeColor: a.strikeColor || a.color || 'black',
- strikeStyle: a.strikeStyle || 'solid',
- stroke: a.stroke || false,
- verticalAlign: a.verticalAlign || null,
- wordSpacing: a.wordSpacing || 0,
- yOffset: a.yOffset || 0,
-});
+/**
+ * @typedef {import('../types.js').AttributedString} AttributedString
+ * @typedef {import('../types.js').Attributes} Attributes
+ * @typedef {import('../types.js').Run} Run
+ */
+
+/**
+ * @param {Attributes} a attributes
+ * @returns {Attributes} attributes with defaults
+ */
+const applyAttributes = (a) => {
+ return {
+ align: a.align || (a.direction === 'rtl' ? 'right' : 'left'),
+ alignLastLine:
+ a.alignLastLine || (a.align === 'justify' ? 'left' : a.align || 'left'),
+ attachment: a.attachment || null,
+ backgroundColor: a.backgroundColor || null,
+ bullet: a.bullet || null,
+ characterSpacing: a.characterSpacing || 0,
+ color: a.color || 'black',
+ direction: a.direction || 'ltr',
+ features: a.features || [],
+ fill: a.fill !== false,
+ font: a.font || null,
+ fontSize: a.fontSize || 12,
+ hangingPunctuation: a.hangingPunctuation || false,
+ hyphenationFactor: a.hyphenationFactor || 0,
+ indent: a.indent || 0,
+ justificationFactor: a.justificationFactor || 1,
+ lineHeight: a.lineHeight || null,
+ lineSpacing: a.lineSpacing || 0,
+ link: a.link || null,
+ marginLeft: a.marginLeft || a.margin || 0,
+ marginRight: a.marginRight || a.margin || 0,
+ opacity: a.opacity,
+ paddingTop: a.paddingTop || a.padding || 0,
+ paragraphSpacing: a.paragraphSpacing || 0,
+ script: a.script || null,
+ shrinkFactor: a.shrinkFactor || 0,
+ strike: a.strike || false,
+ strikeColor: a.strikeColor || a.color || 'black',
+ strikeStyle: a.strikeStyle || 'solid',
+ stroke: a.stroke || false,
+ underline: a.underline || false,
+ underlineColor: a.underlineColor || a.color || 'black',
+ underlineStyle: a.underlineStyle || 'solid',
+ verticalAlign: a.verticalAlign || null,
+ wordSpacing: a.wordSpacing || 0,
+ yOffset: a.yOffset || 0,
+ };
+};
/**
* Apply default style to run
*
- * @param {Object} run
- * @return {Object} run with styles
+ * @param {Run} run run
+ * @returns {Run} run with styles
*/
-const applyRunStyles = run => {
+const applyRunStyles = (run) => {
const attributes = applyAttributes(run.attributes);
return Object.assign({}, run, { attributes });
};
/**
* Apply default attributes for an attributed string
- *
- * @param {Object} engines
- * @param {Object} layout options
- * @param {Object} attributed string
- * @return {Object} attributed string
*/
-const applyDefaultStyles = () => attributedString => {
- const string = attributedString.string || '';
- const runs = (attributedString.runs || []).map(applyRunStyles);
+const applyDefaultStyles = () => {
+ /**
+ * @param {AttributedString} attributedString attributed string
+ * @returns {AttributedString} attributed string
+ */
+ return (attributedString) => {
+ const string = attributedString.string || '';
+ const runs = (attributedString.runs || []).map(applyRunStyles);
- return { string, runs };
+ return { string, runs };
+ };
};
export default applyDefaultStyles;
diff --git a/packages/textkit/src/layout/bidiMirroring.js b/packages/textkit/src/layout/bidiMirroring.js
new file mode 100644
index 000000000..839b8c9ae
--- /dev/null
+++ b/packages/textkit/src/layout/bidiMirroring.js
@@ -0,0 +1,38 @@
+import bidiFactory from 'bidi-js';
+import { repeat } from '@react-pdf/fns';
+
+const bidi = bidiFactory();
+
+const getBidiLevels = (runs) => {
+ return runs.reduce((acc, run) => {
+ const length = run.end - run.start;
+ const levels = repeat(run.attributes.bidiLevel, length);
+ return acc.concat(levels);
+ }, []);
+};
+
+/**
+ * Perform bidi mirroring
+ */
+const mirrorString = () => {
+ /**
+ * @param {AttributedString} attributedString attributed string
+ * @returns {AttributedString} attributed string
+ */
+ return (attributedString) => {
+ const levels = getBidiLevels(attributedString.runs);
+
+ let updatedString = '';
+ attributedString.string.split('').forEach((char, index) => {
+ const isRTL = levels[index] % 2 === 1;
+ const mirroredChar = isRTL
+ ? bidi.getMirroredCharacter(attributedString.string.charAt(index))
+ : null;
+ updatedString += mirroredChar || char;
+ });
+
+ return { ...attributedString, string: updatedString, levels };
+ };
+};
+
+export default mirrorString;
diff --git a/packages/textkit/src/layout/bidiReordering.js b/packages/textkit/src/layout/bidiReordering.js
new file mode 100644
index 000000000..1d8d2ba2b
--- /dev/null
+++ b/packages/textkit/src/layout/bidiReordering.js
@@ -0,0 +1,119 @@
+import bidiFactory from 'bidi-js';
+import { repeat } from '@react-pdf/fns';
+
+import stringLength from '../attributedString/length';
+
+const bidi = bidiFactory();
+
+const getBidiLevels = (runs) => {
+ return runs.reduce((acc, run) => {
+ const length = run.end - run.start;
+ const levels = repeat(run.attributes.bidiLevel, length);
+ return acc.concat(levels);
+ }, []);
+};
+
+const getReorderedIndices = (string, segments) => {
+ // Fill an array with indices
+ const indices = [];
+ for (let i = 0; i < string.length; i += 1) {
+ indices[i] = i;
+ }
+ // Reverse each segment in order
+ segments.forEach(([start, end]) => {
+ const slice = indices.slice(start, end + 1);
+ for (let i = slice.length - 1; i >= 0; i -= 1) {
+ indices[end - i] = slice[i];
+ }
+ });
+
+ return indices;
+};
+
+const getItemAtIndex = (runs, objectName, index) => {
+ for (let i = 0; i < runs.length; i += 1) {
+ const run = runs[i];
+ const updatedIndex = run.glyphIndices[index - run.start];
+ if (index >= run.start && index < run.end) {
+ return run[objectName][updatedIndex];
+ }
+ }
+
+ throw new Error(`index ${index} out of range`);
+};
+
+const reorderLine = (attributedString) => {
+ const levels = getBidiLevels(attributedString.runs);
+ const direction = attributedString.runs[0]?.attributes.direction;
+ const level = direction === 'rtl' ? 1 : 0;
+ const end = stringLength(attributedString) - 1;
+ const paragraphs = [{ start: 0, end, level }];
+ const embeddingLevels = { paragraphs, levels };
+
+ const segments = bidi.getReorderSegments(
+ attributedString.string,
+ embeddingLevels,
+ );
+
+ // No need for bidi reordering
+ if (segments.length === 0) return attributedString;
+
+ const indices = getReorderedIndices(attributedString.string, segments);
+
+ const updatedString = bidi.getReorderedString(
+ attributedString.string,
+ embeddingLevels,
+ );
+
+ const updatedRuns = attributedString.runs.map((run) => {
+ const selectedIndices = indices.slice(run.start, run.end);
+ const updatedGlyphs = [];
+ const updatedPositions = [];
+
+ const addedGlyphs = new Set();
+
+ for (let i = 0; i < selectedIndices.length; i += 1) {
+ const index = selectedIndices[i];
+
+ const glyph = getItemAtIndex(attributedString.runs, 'glyphs', index);
+
+ if (addedGlyphs.has(glyph.id)) continue;
+
+ updatedGlyphs.push(glyph);
+ updatedPositions.push(
+ getItemAtIndex(attributedString.runs, 'positions', index),
+ );
+
+ if (glyph.isLigature) {
+ addedGlyphs.add(glyph.id);
+ }
+ }
+
+ return {
+ ...run,
+ glyphs: updatedGlyphs,
+ positions: updatedPositions,
+ };
+ });
+
+ return {
+ ...attributedString,
+ runs: updatedRuns,
+ string: updatedString,
+ };
+};
+
+const reorderParagraph = (lines) => lines.map(reorderLine);
+
+/**
+ * Perform bidi reordering
+ */
+const bidiReordering = () => {
+ /**
+ * @param {Object[]} paragraphs line blocks
+ * @returns {Object[]} paragraphs
+ */
+ return (paragraphs) => paragraphs.map(reorderParagraph);
+};
+
+export default bidiReordering;
diff --git a/packages/textkit/src/layout/finalizeFragments.js b/packages/textkit/src/layout/finalizeFragments.js
index 462107128..dbfba800f 100644
--- a/packages/textkit/src/layout/finalizeFragments.js
+++ b/packages/textkit/src/layout/finalizeFragments.js
@@ -14,28 +14,28 @@ const ALIGNMENT_FACTORS = { center: 0.5, right: 1 };
/**
* Remove new line char at the end of line if present
*
- * @param {Object} line
- * @return {Object} line
+ * @param {Object} line
+ * @returns {Object} line
*/
-const removeNewLine = line => {
+const removeNewLine = (line) => {
return last(line.string) === '\n' ? dropLast(line) : line;
};
-const getOverflowLeft = line => {
+const getOverflowLeft = (line) => {
return leadingOffset(line) + (line.overflowLeft || 0);
};
-const getOverflowRight = line => {
+const getOverflowRight = (line) => {
return trailingOffset(line) + (line.overflowRight || 0);
};
/**
* Ignore whitespace at the start and end of a line for alignment
*
- * @param {Object} line
- * @return {Object} line
+ * @param {Object} line
+ * @returns {Object} line
*/
-const adjustOverflow = line => {
+const adjustOverflow = (line) => {
const overflowLeft = getOverflowLeft(line);
const overflowRight = getOverflowRight(line);
@@ -49,32 +49,36 @@ const adjustOverflow = line => {
/**
* Performs line justification by calling appropiate engine
*
- * @param {Object} engines
- * @param {Object} layout options
- * @param {string} text align
- * @param {Object} line
- * @return {Object} line
+ * @param {Object} engines engines
+ * @param {Object} options layout options
+ * @param {string} align text align
*/
-const justifyLine = (engines, options, align) => line => {
- const lineWidth = advanceWidth(line);
- const alignFactor = ALIGNMENT_FACTORS[align] || 0;
- const remainingWidth = Math.max(0, line.box.width - lineWidth);
- const shouldJustify = align === 'justify' || lineWidth > line.box.width;
-
- const x = line.box.x + remainingWidth * alignFactor;
- const box = Object.assign({}, line.box, { x });
- const newLine = Object.assign({}, line, { box });
-
- return shouldJustify ? engines.justification(options)(newLine) : newLine;
+const justifyLine = (engines, options, align) => {
+ /**
+ * @param {Object} line lint
+ * @returns {Object} line
+ */
+ return (line) => {
+ const lineWidth = advanceWidth(line);
+ const alignFactor = ALIGNMENT_FACTORS[align] || 0;
+ const remainingWidth = Math.max(0, line.box.width - lineWidth);
+ const shouldJustify = align === 'justify' || lineWidth > line.box.width;
+
+ const x = line.box.x + remainingWidth * alignFactor;
+ const box = Object.assign({}, line.box, { x });
+ const newLine = Object.assign({}, line, { box });
+
+ return shouldJustify ? engines.justification(options)(newLine) : newLine;
+ };
};
-const finalizeLine = line => {
+const finalizeLine = (line) => {
let lineAscent = 0;
let lineDescent = 0;
let lineHeight = 0;
let lineXAdvance = 0;
- const runs = line.runs.map(run => {
+ const runs = line.runs.map((run) => {
const height = runHeight(run);
const ascent = runAscent(run);
const descent = runDescent(run);
@@ -101,39 +105,47 @@ const finalizeLine = line => {
* Finalize line by performing line justification
* and text decoration (using appropiate engines)
*
- * @param {Object} engines
- * @param {Object} layout options
- * @param {Object} line
- * @param {number} line index
- * @param {Array} total lines
- * @return {Object} line
+ * @param {Object} engines engines
+ * @param {Object} options layout options
*/
-const finalizeBlock = (engines = {}, options) => (line, i, lines) => {
- const isLastFragment = i === lines.length - 1;
- const style = line.runs?.[0]?.attributes || {};
- const align = isLastFragment ? style.alignLastLine : style.align;
-
- return compose(
- finalizeLine,
- engines.textDecoration(options),
- justifyLine(engines, options, align),
- adjustOverflow,
- removeNewLine,
- )(line);
+const finalizeBlock = (engines = {}, options) => {
+ /**
+ * @param {Object} line lint
+ * @param {number} i line index
+ * @param {Object[]} lines total lines
+ * @returns {Object} line
+ */
+ return (line, i, lines) => {
+ const isLastFragment = i === lines.length - 1;
+ const style = line.runs?.[0]?.attributes || {};
+ const align = isLastFragment ? style.alignLastLine : style.align;
+
+ return compose(
+ finalizeLine,
+ engines.textDecoration(options),
+ justifyLine(engines, options, align),
+ adjustOverflow,
+ removeNewLine,
+ )(line);
+ };
};
/**
* Finalize line block by performing line justification
* and text decoration (using appropiate engines)
*
- * @param {Object} engines
- * @param {Object} layout options
- * @param {Array} line blocks
- * @return {Array} line blocks
+ * @param {Object} engines engines
+ * @param {Object} options layout options
*/
-const finalizeFragments = (engines, options) => blocks => {
- const blockFinalizer = finalizeBlock(engines, options);
- return blocks.map(block => block.map(blockFinalizer));
+const finalizeFragments = (engines, options) => {
+ /**
+ * @param {Object[]} blocks line blocks
+ * @returns {Object[]} blocks
+ */
+ return (blocks) => {
+ const blockFinalizer = finalizeBlock(engines, options);
+ return blocks.map((block) => block.map(blockFinalizer));
+ };
};
export default finalizeFragments;
diff --git a/packages/textkit/src/layout/generateGlyphs.js b/packages/textkit/src/layout/generateGlyphs.js
index 995b4869c..cefe273cf 100644
--- a/packages/textkit/src/layout/generateGlyphs.js
+++ b/packages/textkit/src/layout/generateGlyphs.js
@@ -1,14 +1,26 @@
import scale from '../run/scale';
import resolveGlyphIndices from '../indices/resolve';
-const getCharacterSpacing = run => run.attributes?.characterSpacing || 0;
+/**
+ * @typedef {import('../types.js').AttributedString} AttributedString
+ * @typedef {import('../types.js').Position} Position
+ * @typedef {import('../types.js').Run} Run
+ */
+
+/**
+ * @param {Run} run
+ * @returns {number}
+ */
+const getCharacterSpacing = (run) => {
+ return run.attributes?.characterSpacing || 0;
+};
/**
* Scale run positions
*
- * @param {Object} run
- * @param {Array} positions
- * @return {Array} scaled positions
+ * @param {Run} run
+ * @param {Position[]} positions
+ * @returns {Position[]} scaled positions
*/
const scalePositions = (run, positions) => {
const runScale = scale(run);
@@ -30,40 +42,54 @@ const scalePositions = (run, positions) => {
/**
* Create glyph run
*
- * @param {String} string
- * @param {Object} run
- * @return {Object} glyph run
+ * @param {string} string string
*/
-const layoutRun = string => run => {
- const { start, end, attributes = {} } = run;
- const { font } = attributes;
+const layoutRun = (string) => {
+ /**
+ * @param {Run} run run
+ * @returns {Run} glyph run
+ */
+ return (run) => {
+ const { start, end, attributes = {} } = run;
+ const { font } = attributes;
+
+ if (!font) return { ...run, glyphs: [], glyphIndices: [], positions: [] };
+
+ const runString = string.slice(start, end);
- if (!font) return { ...run, glyphs: [], glyphIndices: [], positions: [] };
+ // passing LTR To force fontkit to not reverse the string
+ const glyphRun = font.layout(
+ runString,
+ undefined,
+ undefined,
+ undefined,
+ 'ltr',
+ );
- const runString = string.slice(start, end);
- const glyphRun = font.layout(runString);
- const positions = scalePositions(run, glyphRun.positions);
- const glyphIndices = resolveGlyphIndices(glyphRun.glyphs);
+ const positions = scalePositions(run, glyphRun.positions);
+ const glyphIndices = resolveGlyphIndices(glyphRun.glyphs);
- return {
- ...run,
- positions,
- glyphIndices,
- glyphs: glyphRun.glyphs,
+ return {
+ ...run,
+ positions,
+ glyphIndices,
+ glyphs: glyphRun.glyphs,
+ };
};
};
/**
* Generate glyphs for single attributed string
- *
- * @param {Object} layout engines
- * @param {Object} layout options
- * @param {Array} attributed strings
- * @return {Array} attributed string with glyphs
*/
-const generateGlyphs = () => attributedString => {
- const runs = attributedString.runs.map(layoutRun(attributedString.string));
- return Object.assign({}, attributedString, { runs });
+const generateGlyphs = () => {
+ /**
+ * @param {AttributedString} attributedString attributed string
+ * @returns {AttributedString} attributed string with glyphs
+ */
+ return (attributedString) => {
+ const runs = attributedString.runs.map(layoutRun(attributedString.string));
+ return Object.assign({}, attributedString, { runs });
+ };
};
export default generateGlyphs;
diff --git a/packages/textkit/src/layout/generateLineRects.js b/packages/textkit/src/layout/generateLineRects.js
index 4e389b298..a1d1d7cb3 100644
--- a/packages/textkit/src/layout/generateLineRects.js
+++ b/packages/textkit/src/layout/generateLineRects.js
@@ -12,7 +12,7 @@ const getLineFragment = (lineRect, excludeRect) => {
const a = Object.assign({}, lineRect, { width: eStart - lStart });
const b = Object.assign({}, lineRect, { x: eEnd, width: lEnd - eEnd });
- return [a, b].filter(r => r.width > 0);
+ return [a, b].filter((r) => r.width > 0);
};
const getLineFragments = (rect, excludeRects) => {
@@ -36,7 +36,7 @@ const generateLineRects = (container, height) => {
if (!excludeRects) return [rect];
const lineRects = [];
- const maxY = Math.max(...excludeRects.map(r => r.y + r.height));
+ const maxY = Math.max(...excludeRects.map((r) => r.y + r.height));
let currentRect = rect;
diff --git a/packages/textkit/src/layout/index.js b/packages/textkit/src/layout/index.js
index 534917bca..4203ecc1b 100644
--- a/packages/textkit/src/layout/index.js
+++ b/packages/textkit/src/layout/index.js
@@ -2,6 +2,7 @@ import { compose } from '@react-pdf/fns';
import wrapWords from './wrapWords';
import typesetter from './typesetter';
+import bidiReordering from './bidiReordering';
import generateGlyphs from './generateGlyphs';
import resolveYOffset from './resolveYOffset';
import preprocessRuns from './preprocessRuns';
@@ -10,6 +11,12 @@ import finalizeFragments from './finalizeFragments';
import resolveAttachments from './resolveAttachments';
import applyDefaultStyles from './applyDefaultStyles';
import verticalAlignment from './verticalAlign';
+import bidiMirroring from './bidiMirroring';
+
+/**
+ * @typedef {import('../types.js').AttributedString} AttributedString
+ * @typedef {import('../types.js').Rect} Rect
+ */
/**
* A LayoutEngine is the main object that performs text layout.
@@ -18,31 +25,37 @@ import verticalAlignment from './verticalAlign';
* various layout tasks. These objects can be overridden to customize
* layout behavior.
*
- * @param {Object} engines
- * @param {Object} attributed string
- * @param {Object} container rect
- * @param {Object} layout options
- * @return {Array} paragraph blocks
+ * @param {Object} engines engines
*/
-const layoutEngine = engines => (attributedString, container, options = {}) => {
- const processParagraph = compose(
- resolveYOffset(engines, options),
- resolveAttachments(engines, options),
- generateGlyphs(engines, options),
- verticalAlignment(options),
- wrapWords(engines, options),
- );
+const layoutEngine = (engines) => {
+ /**
+ * @param {AttributedString} attributedString attributed string
+ * @param {Rect} container container rect
+ * @param {Object} options layout options
+ * @returns {Object[]} paragraph blocks
+ */
+ return (attributedString, container, options = {}) => {
+ const processParagraph = compose(
+ resolveYOffset(),
+ resolveAttachments(),
+ verticalAlignment(),
+ wrapWords(engines, options),
+ generateGlyphs(),
+ bidiMirroring(),
+ preprocessRuns(engines, options),
+ );
- const processParagraphs = paragraphs => paragraphs.map(processParagraph);
+ const processParagraphs = (paragraphs) => paragraphs.map(processParagraph);
- return compose(
- finalizeFragments(engines, options),
- typesetter(engines, options, container),
- processParagraphs,
- splitParagraphs(engines, options),
- preprocessRuns(engines, options),
- applyDefaultStyles(engines, options),
- )(attributedString);
+ return compose(
+ finalizeFragments(engines, options),
+ bidiReordering(),
+ typesetter(engines, options, container),
+ processParagraphs,
+ splitParagraphs(),
+ applyDefaultStyles(),
+ )(attributedString);
+ };
};
export default layoutEngine;
diff --git a/packages/textkit/src/layout/layoutParagraph.js b/packages/textkit/src/layout/layoutParagraph.js
index 2c53265c8..fec2ffcc0 100644
--- a/packages/textkit/src/layout/layoutParagraph.js
+++ b/packages/textkit/src/layout/layoutParagraph.js
@@ -4,18 +4,23 @@ import generateLineRects from './generateLineRects';
const ATTACHMENT_CODE = '\ufffc'; // 65532
+/**
+ * @typedef {import('../types.js').AttributedString} AttributedString
+ * @typedef {import('../types.js').Rect} Rect
+ */
+
/**
* Remove attachment attribute if no char present
*
- * @param {Object} attributed string
- * @return {Object} attributed string
+ * @param {AttributedString} attributedString attributed string
+ * @returns {AttributedString} attributed string
*/
-const purgeAttachments = attributedString => {
+const purgeAttachments = (attributedString) => {
const shouldPurge = !attributedString.string.includes(ATTACHMENT_CODE);
if (!shouldPurge) return attributedString;
- const runs = attributedString.runs.map(run => omit('attachment', run));
+ const runs = attributedString.runs.map((run) => omit('attachment', run));
return Object.assign({}, attributedString, { runs });
};
@@ -23,9 +28,10 @@ const purgeAttachments = attributedString => {
/**
* Layout paragraphs inside rectangle
*
- * @param {Object} rect
- * @param {Array} attributed strings
- * @return {Object} layout blocks
+ * @param {Object} rects rect
+ * @param {Object[]} lines attributed strings
+ * @param {number} indent
+ * @returns {Object} layout blocks
*/
const layoutLines = (rects, lines, indent) => {
let rect = rects.shift();
@@ -61,23 +67,27 @@ const layoutLines = (rects, lines, indent) => {
/**
* Performs line breaking and layout
*
- * @param {Object} engines
- * @param {Object} layout options
- * @param {Object} rect
- * @param {Object} attributed string
- * @return {Object} layout block
+ * @param {Object} engines engines
+ * @param {Object} options layout options
*/
-const layoutParagraph = (engines, options) => (container, paragraph) => {
- const height = stringHeight(paragraph);
- const indent = paragraph.runs?.[0]?.attributes?.indent || 0;
- const rects = generateLineRects(container, height);
-
- const availableWidths = rects.map(r => r.width);
- availableWidths[0] -= indent;
-
- const lines = engines.linebreaker(options)(paragraph, availableWidths);
-
- return layoutLines(rects, lines, indent);
+const layoutParagraph = (engines, options) => {
+ /**
+ * @param {Rect} container rect
+ * @param {Object} paragraph attributed string
+ * @returns {Object} layout block
+ */
+ return (container, paragraph) => {
+ const height = stringHeight(paragraph);
+ const indent = paragraph.runs?.[0]?.attributes?.indent || 0;
+ const rects = generateLineRects(container, height);
+
+ const availableWidths = rects.map((r) => r.width);
+ availableWidths[0] -= indent;
+
+ const lines = engines.linebreaker(options)(paragraph, availableWidths);
+
+ return layoutLines(rects, lines, indent);
+ };
};
export default layoutParagraph;
diff --git a/packages/textkit/src/layout/preprocessRuns.js b/packages/textkit/src/layout/preprocessRuns.js
index 263e6a135..97f7414d8 100644
--- a/packages/textkit/src/layout/preprocessRuns.js
+++ b/packages/textkit/src/layout/preprocessRuns.js
@@ -4,32 +4,50 @@ import omit from '../run/omit';
import flatten from '../run/flatten';
import empty from '../attributedString/empty';
-const omitFont = attributedString => {
- const runs = attributedString.runs.map(run => omit('font', run));
+/**
+ * @typedef {import('../types.js').AttributedString} AttributedString
+ */
+
+/**
+ *
+ * @param {AttributedString} attributedString
+ * @returns {AttributedString} attributed string without font
+ */
+const omitFont = (attributedString) => {
+ const runs = attributedString.runs.map((run) => omit('font', run));
return Object.assign({}, attributedString, { runs });
};
/**
* Performs font substitution and script itemization on attributed string
*
- * @param {Object} engines
- * @param {Object} layout options
- * @param {Object} attributed string
- * @return {Object} processed attributed string
+ * @param {Object} engines engines
+ * @param {Object} options layout options
*/
-const preprocessRuns = (engines, options) => attributedString => {
- if (isNil(attributedString)) return empty();
-
- const { string } = attributedString;
- const { fontSubstitution, scriptItemizer } = engines;
-
- const { runs: omittedFontRuns } = omitFont(attributedString);
- const { runs: substitutedRuns } = fontSubstitution(options)(attributedString);
- const { runs: itemizationRuns } = scriptItemizer(options)(attributedString);
-
- const runs = substitutedRuns.concat(itemizationRuns).concat(omittedFontRuns);
-
- return { string, runs: flatten(runs) };
+const preprocessRuns = (engines, options) => {
+ /**
+ * @param {AttributedString} attributedString attributed string
+ * @returns {AttributedString} processed attributed string
+ */
+ return (attributedString) => {
+ if (isNil(attributedString)) return empty();
+
+ const { string } = attributedString;
+ const { fontSubstitution, scriptItemizer, bidi } = engines;
+
+ const { runs: omittedFontRuns } = omitFont(attributedString);
+ const { runs: itemizationRuns } = scriptItemizer(options)(attributedString);
+ const { runs: substitutedRuns } =
+ fontSubstitution(options)(attributedString);
+ const { runs: bidiRuns } = bidi(options)(attributedString);
+
+ const runs = bidiRuns
+ .concat(substitutedRuns)
+ .concat(itemizationRuns)
+ .concat(omittedFontRuns);
+
+ return { string, runs: flatten(runs) };
+ };
};
export default preprocessRuns;
diff --git a/packages/textkit/src/layout/resolveAttachments.js b/packages/textkit/src/layout/resolveAttachments.js
index 823d78033..24e87e1ac 100644
--- a/packages/textkit/src/layout/resolveAttachments.js
+++ b/packages/textkit/src/layout/resolveAttachments.js
@@ -1,14 +1,18 @@
+/**
+ * @typedef {import('../types.js').AttributedString} AttributedString
+ */
+
const ATTACHMENT_CODE = 0xfffc; // 65532
-const isReplaceGlyph = glyph => glyph.codePoints.includes(ATTACHMENT_CODE);
+const isReplaceGlyph = (glyph) => glyph.codePoints.includes(ATTACHMENT_CODE);
/**
* Resolve attachments of run
*
- * @param {Object} run
- * @return {Object} run
+ * @param {Object} run
+ * @returns {Object} run
*/
-const resolveRunAttachments = run => {
+const resolveRunAttachments = (run) => {
if (!run.positions) return run;
const glyphs = run.glyphs || [];
@@ -29,15 +33,16 @@ const resolveRunAttachments = run => {
/**
* Resolve attachments for multiple paragraphs
- *
- * @param {Object} layout engines
- * @param {Object} layout options
- * @param {Array} attributed strings (paragraphs)
- * @return {Array} attributed strings (paragraphs)
*/
-const resolveAttachments = () => attributedString => {
- const runs = attributedString.runs.map(resolveRunAttachments);
- return Object.assign({}, attributedString, { runs });
+const resolveAttachments = () => {
+ /**
+ * @param {AttributedString} attributedString attributed string
+ * @returns {AttributedString} attributed string
+ */
+ return (attributedString) => {
+ const runs = attributedString.runs.map(resolveRunAttachments);
+ return Object.assign({}, attributedString, { runs });
+ };
};
export default resolveAttachments;
diff --git a/packages/textkit/src/layout/resolveYOffset.js b/packages/textkit/src/layout/resolveYOffset.js
index 068e1d966..132e08a79 100644
--- a/packages/textkit/src/layout/resolveYOffset.js
+++ b/packages/textkit/src/layout/resolveYOffset.js
@@ -1,30 +1,36 @@
+/**
+ * @typedef {import('../types.js').AttributedString} AttributedString
+ * @typedef {import('../types.js').Run} Run
+ */
+
/**
* Resolves yOffset for run
*
- * @param {Object} run
- * @return {Object} run
+ * @param {Run} run run
+ * @returns {Run} run
*/
-const resolveRunYOffset = run => {
+const resolveRunYOffset = (run) => {
if (!run.positions) return run;
const unitsPerEm = run.attributes?.font?.unitsPerEm || 0;
const yOffset = (run.attributes?.yOffset || 0) * unitsPerEm;
- const positions = run.positions.map(p => Object.assign({}, p, { yOffset }));
+ const positions = run.positions.map((p) => Object.assign({}, p, { yOffset }));
return Object.assign({}, run, { positions });
};
/**
* Resolves yOffset for multiple paragraphs
- *
- * @param {Object} layout engines
- * @param {Object} layout options
- * @param {Array} attributed strings (paragraphs)
- * @return {Array} attributed strings (paragraphs)
*/
-const resolveYOffset = () => attributedString => {
- const runs = attributedString.runs.map(resolveRunYOffset);
- return Object.assign({}, attributedString, { runs });
+const resolveYOffset = () => {
+ /**
+ * @param {AttributedString} attributedString attributed string
+ * @returns {AttributedString} attributed string
+ */
+ return (attributedString) => {
+ const runs = attributedString.runs.map(resolveRunYOffset);
+ return Object.assign({}, attributedString, { runs });
+ };
};
export default resolveYOffset;
diff --git a/packages/textkit/src/layout/splitParagraphs.js b/packages/textkit/src/layout/splitParagraphs.js
index 314013e3b..1d690a040 100644
--- a/packages/textkit/src/layout/splitParagraphs.js
+++ b/packages/textkit/src/layout/splitParagraphs.js
@@ -1,33 +1,38 @@
import length from '../attributedString/length';
import slice from '../attributedString/slice';
+/**
+ * @typedef {import('../types.js').AttributedString} AttributedString
+ */
+
/**
* Breaks attributed string into paragraphs
- *
- * @param {Object} engines
- * @param {Object} layout options
- * @param {Object} attributed string
- * @return {Array} attributed string array
*/
-const splitParagraphs = () => attributedString => {
- const res = [];
+const splitParagraphs = () => {
+ /**
+ * @param {AttributedString} attributedString attributed string
+ * @returns {AttributedString[]} attributed string array
+ */
+ return (attributedString) => {
+ const res = [];
- let start = 0;
- let breakPoint = attributedString.string.indexOf('\n') + 1;
+ let start = 0;
+ let breakPoint = attributedString.string.indexOf('\n') + 1;
- while (breakPoint > 0) {
- res.push(slice(start, breakPoint, attributedString));
- start = breakPoint;
- breakPoint = attributedString.string.indexOf('\n', breakPoint) + 1;
- }
+ while (breakPoint > 0) {
+ res.push(slice(start, breakPoint, attributedString));
+ start = breakPoint;
+ breakPoint = attributedString.string.indexOf('\n', breakPoint) + 1;
+ }
- if (start === 0) {
- res.push(attributedString);
- } else if (start < attributedString.string.length) {
- res.push(slice(start, length(attributedString), attributedString));
- }
+ if (start === 0) {
+ res.push(attributedString);
+ } else if (start < attributedString.string.length) {
+ res.push(slice(start, length(attributedString), attributedString));
+ }
- return res;
+ return res;
+ };
};
export default splitParagraphs;
diff --git a/packages/textkit/src/layout/typesetter.js b/packages/textkit/src/layout/typesetter.js
index 0a6069e0f..053936ed8 100644
--- a/packages/textkit/src/layout/typesetter.js
+++ b/packages/textkit/src/layout/typesetter.js
@@ -7,50 +7,59 @@ import truncateBlock from '../block/truncate';
import layoutParagraph from './layoutParagraph';
import sliceBlockAtHeight from '../block/sliceAtHeight';
+/**
+ * @typedef {import('../types.js').AttributedString} AttributedString
+ * @typedef {import('../types.js').Rect} Rect
+ */
+
/**
* Layout paragraphs inside container until it does not
* fit anymore, performing line wrapping in the process.
*
- * @param {Object} engines
- * @param {Object} layout options
- * @param {Object} container rect
- * @param {Object} attributed strings (paragraphs)
- * @return {Array} paragraph blocks
+ * @param {Object} engines engines
+ * @param {Object} options layout options
+ * @param {Rect} container container rect
*/
-const typesetter = (engines, options, container) => attributedStrings => {
- const blocks = [];
- const paragraphs = [...attributedStrings];
- const layoutBlock = layoutParagraph(engines, options);
- const maxLines = isNil(container.maxLines) ? Infinity : container.maxLines;
- const truncateEllipsis = container.truncateMode === 'ellipsis';
-
- let linesCount = maxLines;
- let paragraphRect = copyRect(container);
- let nextParagraph = paragraphs.shift();
-
- while (linesCount > 0 && nextParagraph) {
- const block = layoutBlock(paragraphRect, nextParagraph);
- const slicedBlock = block.slice(0, linesCount);
- const linesHeight = blockHeight(slicedBlock);
-
- const shouldTruncate =
- truncateEllipsis && block.length !== slicedBlock.length;
-
- linesCount -= slicedBlock.length;
-
- if (paragraphRect.height >= linesHeight) {
- blocks.push(shouldTruncate ? truncateBlock(slicedBlock) : slicedBlock);
- paragraphRect = cropRect(linesHeight, paragraphRect);
- nextParagraph = paragraphs.shift();
- } else {
- blocks.push(
- truncateBlock(sliceBlockAtHeight(paragraphRect.height, slicedBlock)),
- );
- break;
+const typesetter = (engines, options, container) => {
+ /**
+ * @param {AttributedString} attributedStrings attributed strings (paragraphs)
+ * @returns {Object[]} paragraph blocks
+ */
+ return (attributedStrings) => {
+ const blocks = [];
+ const paragraphs = [...attributedStrings];
+ const layoutBlock = layoutParagraph(engines, options);
+ const maxLines = isNil(container.maxLines) ? Infinity : container.maxLines;
+ const truncateEllipsis = container.truncateMode === 'ellipsis';
+
+ let linesCount = maxLines;
+ let paragraphRect = copyRect(container);
+ let nextParagraph = paragraphs.shift();
+
+ while (linesCount > 0 && nextParagraph) {
+ const block = layoutBlock(paragraphRect, nextParagraph);
+ const slicedBlock = block.slice(0, linesCount);
+ const linesHeight = blockHeight(slicedBlock);
+
+ const shouldTruncate =
+ truncateEllipsis && block.length !== slicedBlock.length;
+
+ linesCount -= slicedBlock.length;
+
+ if (paragraphRect.height >= linesHeight) {
+ blocks.push(shouldTruncate ? truncateBlock(slicedBlock) : slicedBlock);
+ paragraphRect = cropRect(linesHeight, paragraphRect);
+ nextParagraph = paragraphs.shift();
+ } else {
+ blocks.push(
+ truncateBlock(sliceBlockAtHeight(paragraphRect.height, slicedBlock)),
+ );
+ break;
+ }
}
- }
- return blocks;
+ return blocks;
+ };
};
export default typesetter;
diff --git a/packages/textkit/src/layout/verticalAlign.js b/packages/textkit/src/layout/verticalAlign.js
index dc0c2dc3e..ee7a2ea44 100644
--- a/packages/textkit/src/layout/verticalAlign.js
+++ b/packages/textkit/src/layout/verticalAlign.js
@@ -1,24 +1,30 @@
/* eslint-disable no-restricted-syntax */
+/**
+ * @typedef {import('../types.js').AttributedString} AttributedString
+ */
+
/**
* Apply scaling and yOffset for verticalAlign 'sub' and 'super'.
- *
- * @param {Object} layout options
- * @param {Object} attributed string
- * @return {Object} attributed string
*/
-const verticalAlignment = () => attributedString => {
- attributedString.runs.forEach(run => {
- const { attributes } = run;
- const { verticalAlign } = attributes;
+const verticalAlignment = () => {
+ /**
+ * @param {AttributedString} attributedString attributed string
+ * @returns {AttributedString} attributed string
+ */
+ return (attributedString) => {
+ attributedString.runs.forEach((run) => {
+ const { attributes } = run;
+ const { verticalAlign } = attributes;
- if (verticalAlign === 'sub') {
- attributes.yOffset = -0.2;
- } else if (verticalAlign === 'super') {
- attributes.yOffset = 0.4;
- }
- });
- return attributedString;
+ if (verticalAlign === 'sub') {
+ attributes.yOffset = -0.2;
+ } else if (verticalAlign === 'super') {
+ attributes.yOffset = 0.4;
+ }
+ });
+ return attributedString;
+ };
};
export default verticalAlignment;
diff --git a/packages/textkit/src/layout/wrapWords.js b/packages/textkit/src/layout/wrapWords.js
index 12b8a4c43..19c13122f 100644
--- a/packages/textkit/src/layout/wrapWords.js
+++ b/packages/textkit/src/layout/wrapWords.js
@@ -1,51 +1,59 @@
import fromFragments from '../attributedString/fromFragments';
+/**
+ * @typedef {import('../types.js').AttributedString} AttributedString
+ */
+
/**
* Default word hyphenation engine used when no one provided.
* Does not perform word hyphenation at all
*
- * @param {String} word
- * @return {Array} same word
+ * @param {string} word
+ * @returns {[string]} same word
*/
-const defaultHyphenationEngine = word => [word];
+const defaultHyphenationEngine = (word) => [word];
/**
* Wrap words of attribute string
*
- * @param {Object} layout engines
- * @param {Object} layout options
- * @param {Object} attributed string
- * @return {Object} attributed string including syllables
+ * @param {Object} engines layout engines
+ * @param {Object} options layout options
*/
-const wrapWords = (engines = {}, options = {}) => attributedString => {
- const syllables = [];
- const fragments = [];
-
- const hyphenateWord =
- options.hyphenationCallback ||
- engines.wordHyphenation?.(options) ||
- defaultHyphenationEngine;
-
- for (let i = 0; i < attributedString.runs.length; i += 1) {
- let string = '';
- const run = attributedString.runs[i];
- const words = attributedString.string
- .slice(run.start, run.end)
- .split(/([ ]+)/g)
- .filter(Boolean);
-
- for (let j = 0; j < words.length; j += 1) {
- const word = words[j];
- const parts = hyphenateWord(word);
-
- syllables.push(...parts);
- string += parts.join('');
+const wrapWords = (engines = {}, options = {}) => {
+ /**
+ * @param {AttributedString} attributedString attributed string
+ * @returns {AttributedString} attributed string including syllables
+ */
+ return (attributedString) => {
+ const syllables = [];
+ const fragments = [];
+
+ const hyphenateWord =
+ options.hyphenationCallback ||
+ engines.wordHyphenation?.(options) ||
+ defaultHyphenationEngine;
+
+ for (let i = 0; i < attributedString.runs.length; i += 1) {
+ let string = '';
+ const run = attributedString.runs[i];
+ const words = attributedString.string
+ .slice(run.start, run.end)
+ .split(/([ ]+)/g)
+ .filter(Boolean);
+
+ for (let j = 0; j < words.length; j += 1) {
+ const word = words[j];
+ const parts = hyphenateWord(word);
+
+ syllables.push(...parts);
+ string += parts.join('');
+ }
+
+ fragments.push({ ...run, string });
}
- fragments.push({ string, attributes: run.attributes });
- }
-
- return { ...fromFragments(fragments), syllables };
+ return { ...fromFragments(fragments), syllables };
+ };
};
export default wrapWords;
diff --git a/packages/textkit/src/positions/advanceWidth.js b/packages/textkit/src/positions/advanceWidth.js
index 94721b98c..2272d14b1 100644
--- a/packages/textkit/src/positions/advanceWidth.js
+++ b/packages/textkit/src/positions/advanceWidth.js
@@ -1,10 +1,14 @@
+/**
+ * @typedef {import('../types.js').Position} Position
+ */
+
/**
* Return positions advance width
*
- * @param {Object} positions
- * @return {number} advance width
+ * @param {Position[]} positions positions
+ * @returns {number} advance width
*/
-const advanceWidth = positions => {
+const advanceWidth = (positions) => {
return positions.reduce((acc, pos) => acc + (pos.xAdvance || 0), 0);
};
diff --git a/packages/textkit/src/rect/area.js b/packages/textkit/src/rect/area.js
index 517e3edc3..cedf4e85e 100644
--- a/packages/textkit/src/rect/area.js
+++ b/packages/textkit/src/rect/area.js
@@ -1,10 +1,14 @@
+/**
+ * @typedef {import('../types.js').Rect} Rect
+ */
+
/**
* Returns rect area
*
- * @param {Object} rect
- * @return {number} rect area
+ * @param {Rect} [rect] rect
+ * @returns {number} rect area
*/
-const area = rect => {
+const area = (rect) => {
return rect ? rect.height * rect.width : 0;
};
diff --git a/packages/textkit/src/rect/bottomLeft.js b/packages/textkit/src/rect/bottomLeft.js
index 2f9a1ec31..31bc307b3 100644
--- a/packages/textkit/src/rect/bottomLeft.js
+++ b/packages/textkit/src/rect/bottomLeft.js
@@ -1,14 +1,18 @@
import maxY from './maxY';
+/**
+ * @typedef {import('../types.js').Rect} Rect
+ */
+
const ZERO = { x: 0, y: 0 };
/**
* Returns rect bottom left point
*
- * @param {Object} rect
- * @return {number} bottom left point
+ * @param {Rect} [rect] rect
+ * @returns {{ x: number, y: number }} bottom left point
*/
-const bottomLeft = rect => {
+const bottomLeft = (rect) => {
return rect ? { x: rect.x || 0, y: maxY(rect) } : ZERO;
};
diff --git a/packages/textkit/src/rect/bottomRight.js b/packages/textkit/src/rect/bottomRight.js
index b86761f7e..33943ab7a 100644
--- a/packages/textkit/src/rect/bottomRight.js
+++ b/packages/textkit/src/rect/bottomRight.js
@@ -1,12 +1,16 @@
import maxX from './maxX';
import maxY from './maxY';
+/**
+ * @typedef {import('../types.js').Rect} Rect
+ */
+
/**
* Returns rect bottom right point
*
- * @param {Object} rect
- * @return {number} bottom right point
+ * @param {Rect} rect rect
+ * @returns {{ x:number, y:number }} bottom right point
*/
-const bottomRight = rect => ({ x: maxX(rect), y: maxY(rect) });
+const bottomRight = (rect) => ({ x: maxX(rect), y: maxY(rect) });
export default bottomRight;
diff --git a/packages/textkit/src/rect/copy.js b/packages/textkit/src/rect/copy.js
index 4dc7d3998..4266c74a4 100644
--- a/packages/textkit/src/rect/copy.js
+++ b/packages/textkit/src/rect/copy.js
@@ -1,9 +1,15 @@
+/**
+ * @typedef {import('../types.js').Rect} Rect
+ */
+
/**
* Clone rect
*
- * @param {Object} rect
- * @return {Object} cloned rect
+ * @param {Rect} rect rect
+ * @returns {Rect} cloned rect
*/
-const copy = rect => Object.assign({}, rect);
+const copy = (rect) => {
+ return Object.assign({}, rect);
+};
export default copy;
diff --git a/packages/textkit/src/rect/crop.js b/packages/textkit/src/rect/crop.js
index 9e37f8743..57e1130cc 100644
--- a/packages/textkit/src/rect/crop.js
+++ b/packages/textkit/src/rect/crop.js
@@ -1,10 +1,15 @@
import partition from './partition';
+/**
+ * @typedef {import('../types.js').Rect} Rect
+ */
+
/**
* Crop upper section of rect
*
- * @param {Object} rect
- * @return {Object} cropped rect
+ * @param {number} height height
+ * @param {Rect} rect rect
+ * @returns {Rect} cropped rect
*/
const crop = (height, rect) => {
const [, result] = partition(rect, height);
diff --git a/packages/textkit/src/rect/empty.js b/packages/textkit/src/rect/empty.js
index b859073c8..ce80a3fba 100644
--- a/packages/textkit/src/rect/empty.js
+++ b/packages/textkit/src/rect/empty.js
@@ -1,13 +1,19 @@
+/**
+ * @typedef {import('../types.js').Rect} Rect
+ */
+
/**
* Returns empty rect
*
- * @return {Object} empty rect
+ * @returns {Rect} empty rect
*/
-const empty = () => ({
- x: 0,
- y: 0,
- width: 0,
- height: 0,
-});
+const empty = () => {
+ return {
+ x: 0,
+ y: 0,
+ width: 0,
+ height: 0,
+ };
+};
export default empty;
diff --git a/packages/textkit/src/rect/equals.js b/packages/textkit/src/rect/equals.js
index 4ababb684..67cf83ca8 100644
--- a/packages/textkit/src/rect/equals.js
+++ b/packages/textkit/src/rect/equals.js
@@ -1,9 +1,13 @@
+/**
+ * @typedef {import('../types.js').Rect} Rect
+ */
+
/**
* Check if two rect are equal
*
- * @param {Object} rect A
- * @param {Object} rect B
- * @return {Boolean} rects are equal
+ * @param {Object} a rect A
+ * @param {Object} b rect B
+ * @returns {boolean} whether rects are equal
*
*/
const equals = (a, b) => {
diff --git a/packages/textkit/src/rect/intersects.js b/packages/textkit/src/rect/intersects.js
index a796ce51c..67083381a 100644
--- a/packages/textkit/src/rect/intersects.js
+++ b/packages/textkit/src/rect/intersects.js
@@ -1,9 +1,13 @@
+/**
+ * @typedef {import('../types.js').Rect} Rect
+ */
+
/**
* Checks if two rects intersect each other
*
- * @param {Rect} a
- * @param {Rect} b
- * @returns {Boolean} rects intersects
+ * @param {Rect} a rect A
+ * @param {Rect} b rect B
+ * @returns {boolean} whether rects intersect
*/
const intersects = (a, b) => {
const x = Math.max(a.x, b.x);
diff --git a/packages/textkit/src/rect/maxX.js b/packages/textkit/src/rect/maxX.js
index 473b26507..379af3fe5 100644
--- a/packages/textkit/src/rect/maxX.js
+++ b/packages/textkit/src/rect/maxX.js
@@ -1,10 +1,14 @@
+/**
+ * @typedef {import('../types.js').Rect} Rect
+ */
+
/**
* Returns max rect X coordinate
*
- * @param {Object} rect
- * @return {number} x coordinate
+ * @param {Rect} [rect] rect
+ * @returns {number} x coordinate
*/
-const maxX = rect => {
+const maxX = (rect) => {
return rect ? rect.x + rect.width : 0;
};
diff --git a/packages/textkit/src/rect/maxY.js b/packages/textkit/src/rect/maxY.js
index 5c6952717..dc53b1d11 100644
--- a/packages/textkit/src/rect/maxY.js
+++ b/packages/textkit/src/rect/maxY.js
@@ -1,10 +1,14 @@
+/**
+ * @typedef {import('../types.js').Rect} Rect
+ */
+
/**
* Returns max rect Y coordinate
*
- * @param {Object} rect
- * @return {number} y coordinate
+ * @param {Rect} [rect] rect
+ * @returns {number} y coordinate
*/
-const maxY = rect => {
+const maxY = (rect) => {
return rect ? rect.y + rect.height : 0;
};
diff --git a/packages/textkit/src/rect/partition.js b/packages/textkit/src/rect/partition.js
index 4d5926bf6..817cd9f10 100644
--- a/packages/textkit/src/rect/partition.js
+++ b/packages/textkit/src/rect/partition.js
@@ -1,3 +1,13 @@
+/**
+ * @typedef {import('../types.js').Rect} Rect
+ */
+
+/**
+ *
+ * @param {Rect} rect rect
+ * @param {number} height height
+ * @returns {[Rect, Rect]} partitioned rects
+ */
const partition = (rect, height) => {
const a = Object.assign({}, rect, { height });
diff --git a/packages/textkit/src/run/add.js b/packages/textkit/src/run/add.js
index cd1885497..b052408c7 100644
--- a/packages/textkit/src/run/add.js
+++ b/packages/textkit/src/run/add.js
@@ -1,9 +1,13 @@
+/**
+ * @typedef {import('../types.js').Run} Run
+ */
+
/**
* Add scalar to run
*
- * @param {number} scalar
- * @param {Object} run
- * @return {Object} added run
+ * @param {number} n scalar
+ * @param {Run} run run
+ * @returns {Run} added run
*/
const add = (n, run) => {
const start = run.start + n;
diff --git a/packages/textkit/src/run/advanceWidth.js b/packages/textkit/src/run/advanceWidth.js
index 24d9deddf..9d6e3f823 100644
--- a/packages/textkit/src/run/advanceWidth.js
+++ b/packages/textkit/src/run/advanceWidth.js
@@ -1,12 +1,16 @@
import positionsAdvanceWidth from '../positions/advanceWidth';
+/**
+ * @typedef {import('../types.js').Run} Run
+ */
+
/**
* Return run advance width
*
- * @param {Object} run
- * @return {number} advance width
+ * @param {Run} run run
+ * @returns {number} advance width
*/
-const advanceWidth = run => {
+const advanceWidth = (run) => {
return positionsAdvanceWidth(run.positions || []);
};
diff --git a/packages/textkit/src/run/advanceWidthBetween.js b/packages/textkit/src/run/advanceWidthBetween.js
index db380b999..36c07a1d3 100644
--- a/packages/textkit/src/run/advanceWidthBetween.js
+++ b/packages/textkit/src/run/advanceWidthBetween.js
@@ -1,13 +1,17 @@
import glyphIndexAt from './glyphIndexAt';
import positionsAdvanceWidth from '../positions/advanceWidth';
+/**
+ * @typedef {import('../types.js').Run} Run
+ */
+
/**
* Advance width between two string indices
*
- * @param {number} start glyph index
- * @param {number} end glyph index
- * @param {Object} run
- * @return {Object} advanced width run
+ * @param {number} start glyph index
+ * @param {number} end glyph index
+ * @param {Run} run run
+ * @returns {number} advanced width run
*/
const advanceWidthBetween = (start, end, run) => {
const runStart = run.start || 0;
diff --git a/packages/textkit/src/run/append.js b/packages/textkit/src/run/append.js
index 4e013284d..a7242b520 100644
--- a/packages/textkit/src/run/append.js
+++ b/packages/textkit/src/run/append.js
@@ -4,12 +4,17 @@ import isNumber from '../utils/isNumber';
import appendIndices from '../indices/append';
import glyphFromCodePoint from '../glyph/fromCodePoint';
+/**
+ * @typedef {import('../types.js').Glyph} Glyph
+ * @typedef {import('../types.js').Run} Run
+ */
+
/**
* Append glyph to run
*
- * @param {Object} glyph
- * @param {Object} run
- * @return {Object} run with glyph
+ * @param {Glyph} glyph glyph
+ * @param {Run} run run
+ * @returns {Run} run with glyph
*/
const appendGlyph = (glyph, run) => {
const glyphLength = glyph.codePoints?.length || 0;
@@ -30,9 +35,9 @@ const appendGlyph = (glyph, run) => {
/**
* Append glyph or code point to run
*
- * @param {Object | number} glyph | codePoint
- * @param {Object} run
- * @return {Object} run with glyph
+ * @param {Glyph | number | undefined} value glyph or codePoint
+ * @param {Run} run run
+ * @returns {Run} run with glyph
*/
const append = (value, run) => {
if (!value) return run;
diff --git a/packages/textkit/src/run/ascent.js b/packages/textkit/src/run/ascent.js
index 9c929cc0e..83d562b21 100644
--- a/packages/textkit/src/run/ascent.js
+++ b/packages/textkit/src/run/ascent.js
@@ -1,12 +1,16 @@
import scale from './scale';
+/**
+ * @typedef {import('../types.js').Run} Run
+ */
+
/**
* Get run ascent
*
- * @param {Object} run
- * @return {boolean} ascent
+ * @param {Run} run run
+ * @returns {number} ascent
*/
-const ascent = run => {
+const ascent = (run) => {
const attachmentHeight = run.attributes?.attachment?.height || 0;
const fontAscent = run.attributes?.font?.ascent || 0;
diff --git a/packages/textkit/src/run/concat.js b/packages/textkit/src/run/concat.js
index 4595f1ea2..2ad6334d4 100644
--- a/packages/textkit/src/run/concat.js
+++ b/packages/textkit/src/run/concat.js
@@ -3,12 +3,16 @@ import { last } from '@react-pdf/fns';
import length from './length';
import normalizeIndices from '../indices/normalize';
+/**
+ * @typedef {import('../types.js').Run} Run
+ */
+
/**
* Concats two runs into one
*
- * @param {Object} first run
- * @param {Object} second run
- * @return {Object} concatenated run
+ * @param {Run} runA first run
+ * @param {Run} runB second run
+ * @returns {Run} concatenated run
*/
const concat = (runA, runB) => {
const end = runA.end + length(runB);
@@ -19,7 +23,9 @@ const concat = (runA, runB) => {
const runAIndices = runA.glyphIndices || [];
const runALastIndex = last(runAIndices) || 0;
- const runBIndices = (runB.glyphIndices || []).map(i => i + runALastIndex + 1);
+ const runBIndices = (runB.glyphIndices || []).map(
+ (i) => i + runALastIndex + 1,
+ );
const glyphIndices = normalizeIndices(runAIndices.concat(runBIndices));
return Object.assign({}, runA, {
diff --git a/packages/textkit/src/run/descent.js b/packages/textkit/src/run/descent.js
index 3b1709d50..6f219bf10 100644
--- a/packages/textkit/src/run/descent.js
+++ b/packages/textkit/src/run/descent.js
@@ -1,12 +1,16 @@
import scale from './scale';
+/**
+ * @typedef {import('../types.js').Run} Run
+ */
+
/**
* Get run descent
*
- * @param {Object} run
- * @return {number} descent
+ * @param {Run} run run
+ * @returns {number} descent
*/
-const descent = run => {
+const descent = (run) => {
const fontDescent = run.attributes?.font?.descent || 0;
return scale(run) * fontDescent;
diff --git a/packages/textkit/src/run/dropLast.js b/packages/textkit/src/run/dropLast.js
index 6821c9847..0106a2f41 100644
--- a/packages/textkit/src/run/dropLast.js
+++ b/packages/textkit/src/run/dropLast.js
@@ -1,11 +1,17 @@
import slice from './slice';
+/**
+ * @typedef {import('../types.js').Run} Run
+ */
+
/**
* Drop last char of run
*
- * @param {Object} run
- * @return {boolean} run without last char
+ * @param {Run} run run
+ * @returns {Run} run without last char
*/
-const dropLast = run => slice(0, run.end - run.start - 1, run);
+const dropLast = (run) => {
+ return slice(0, run.end - run.start - 1, run);
+};
export default dropLast;
diff --git a/packages/textkit/src/run/empty.js b/packages/textkit/src/run/empty.js
index d2c74b8c5..535a6fd32 100644
--- a/packages/textkit/src/run/empty.js
+++ b/packages/textkit/src/run/empty.js
@@ -1,15 +1,21 @@
+/**
+ * @typedef {import('../types.js').Run} Run
+ */
+
/**
* Returns empty run
*
- * @return {Object} empty run
+ * @returns {Run} empty run
*/
-const empty = () => ({
- start: 0,
- end: 0,
- glyphIndices: [],
- glyphs: [],
- positions: [],
- attributes: {},
-});
+const empty = () => {
+ return {
+ start: 0,
+ end: 0,
+ glyphIndices: [],
+ glyphs: [],
+ positions: [],
+ attributes: {},
+ };
+};
export default empty;
diff --git a/packages/textkit/src/run/filter.js b/packages/textkit/src/run/filter.js
index 68b71e134..d9ac11b5e 100644
--- a/packages/textkit/src/run/filter.js
+++ b/packages/textkit/src/run/filter.js
@@ -1,12 +1,16 @@
import runIndexAt from './runIndexAt';
+/**
+ * @typedef {import('../types.js').Run} Run
+ */
+
/**
* Filter runs contained between start and end
*
- * @param {number} start
- * @param {number} end
- * @param {Array} runs
- * @return {boolean} filtered runs
+ * @param {number} start
+ * @param {number} end
+ * @param {Run[]} runs
+ * @returns {Run[]} filtered runs
*/
const filter = (start, end, runs) => {
const startIndex = runIndexAt(start, runs);
diff --git a/packages/textkit/src/run/flatten.js b/packages/textkit/src/run/flatten.js
index c34f874e3..089e0ef3b 100644
--- a/packages/textkit/src/run/flatten.js
+++ b/packages/textkit/src/run/flatten.js
@@ -1,9 +1,26 @@
import sort from './sort';
import isEmpty from './isEmpty';
-const sortPoints = (a, b) => a[1] - b[1] || a[3] - b[3];
+/**
+ * @typedef {import('../types.js').Point} Point
+ * @typedef {import('../types.js').Run} Run
+ */
+
+/**
+ * Sort points in ascending order
+ * @param {Point} a first point
+ * @param {Point} b second point
+ * @returns {number} sort order
+ */
+const sortPoints = (a, b) => {
+ return a[1] - b[1] || a[3] - b[3];
+};
-const generatePoints = runs => {
+/**
+ * @param {Run[]} runs
+ * @returns {Point[]} points
+ */
+const generatePoints = (runs) => {
const result = runs.reduce((acc, run, i) => {
return acc.concat([
['start', run.start, run.attributes, i],
@@ -14,27 +31,44 @@ const generatePoints = runs => {
return result.sort(sortPoints);
};
-const mergeRuns = runs =>
- runs.reduce((acc, run) => {
+/**
+ * @param {Run[]} runs
+ * @returns {Run} merged runs
+ */
+const mergeRuns = (runs) => {
+ return runs.reduce((acc, run) => {
const attributes = Object.assign({}, acc.attributes, run.attributes);
return Object.assign({}, run, { attributes });
}, {});
+};
-const groupEmptyRuns = runs => {
+/**
+ * @param {Run[]} runs
+ * @returns {Run[][]} grouped runs
+ */
+const groupEmptyRuns = (runs) => {
const groups = runs.reduce((acc, run) => {
if (!acc[run.start]) acc[run.start] = [];
acc[run.start].push(run);
return acc;
- }, {});
+ }, []);
return Object.values(groups);
};
-const flattenEmptyRuns = runs => {
+/**
+ * @param {Run[]} runs
+ * @returns {Run[]} flattened runs
+ */
+const flattenEmptyRuns = (runs) => {
return groupEmptyRuns(runs).map(mergeRuns);
};
-const flattenRegularRuns = runs => {
+/**
+ * @param {Run[]} runs
+ * @returns {Run[]} flattened runs
+ */
+const flattenRegularRuns = (runs) => {
const res = [];
const points = generatePoints(runs);
@@ -74,12 +108,12 @@ const flattenRegularRuns = runs => {
/**
* Flatten many runs
*
- * @param {Array} runs
- * @return {Array} flatten runs
+ * @param {Run[]} runs
+ * @returns {Run[]} flattened runs
*/
const flatten = (runs = []) => {
- const emptyRuns = flattenEmptyRuns(runs.filter(run => isEmpty(run)));
- const regularRuns = flattenRegularRuns(runs.filter(run => !isEmpty(run)));
+ const emptyRuns = flattenEmptyRuns(runs.filter((run) => isEmpty(run)));
+ const regularRuns = flattenRegularRuns(runs.filter((run) => !isEmpty(run)));
return sort(emptyRuns.concat(regularRuns));
};
diff --git a/packages/textkit/src/run/getFont.js b/packages/textkit/src/run/getFont.js
index 182043e76..35c6d2679 100644
--- a/packages/textkit/src/run/getFont.js
+++ b/packages/textkit/src/run/getFont.js
@@ -1,9 +1,16 @@
+/**
+ * @typedef {import('../types.js').Font} Font
+ * @typedef {import('../types.js').Run} Run
+ */
+
/**
* Get run font
*
- * @param {Object} run
- * @return {Object} font
+ * @param {Run} run run
+ * @returns {Font | null} font
*/
-const getFont = run => run.attributes?.font || null;
+const getFont = (run) => {
+ return run.attributes?.font || null;
+};
export default getFont;
diff --git a/packages/textkit/src/run/glyphIndexAt.js b/packages/textkit/src/run/glyphIndexAt.js
index ca7367d61..c5774b317 100644
--- a/packages/textkit/src/run/glyphIndexAt.js
+++ b/packages/textkit/src/run/glyphIndexAt.js
@@ -1,12 +1,16 @@
import { isNil } from '@react-pdf/fns';
+/**
+ * @typedef {import('../types.js').Run} Run
+ */
+
/**
* Return glyph index at string index, if glyph indices present.
* Otherwise return string index
*
- * @param {number} string index
- * @param {Object} run
- * @return {number} glyph index
+ * @param {number} index index
+ * @param {Run} run run
+ * @returns {number} glyph index
*/
const glyphIndexAt = (index, run) => {
const result = run?.glyphIndices?.[index];
diff --git a/packages/textkit/src/run/height.js b/packages/textkit/src/run/height.js
index ec8e44705..74139793c 100644
--- a/packages/textkit/src/run/height.js
+++ b/packages/textkit/src/run/height.js
@@ -2,13 +2,17 @@ import ascent from './ascent';
import descent from './descent';
import lineGap from './lineGap';
+/**
+ * @typedef {import('../types.js').Run} Run
+ */
+
/**
* Get run height
*
- * @param {Object} run
- * @return {number} height
+ * @param {Run} run run
+ * @returns {number} height
*/
-const height = run => {
+const height = (run) => {
const lineHeight = run.attributes?.lineHeight;
return lineHeight || lineGap(run) + ascent(run) - descent(run);
};
diff --git a/packages/textkit/src/run/indexAtOffset.js b/packages/textkit/src/run/indexAtOffset.js
index 75aaf137e..deeabd1c7 100644
--- a/packages/textkit/src/run/indexAtOffset.js
+++ b/packages/textkit/src/run/indexAtOffset.js
@@ -1,9 +1,13 @@
+/**
+ * @typedef {import('../types.js').Run} Run
+ */
+
/**
* Get string index at offset
*
- * @param {Object} run
- * @param {number} offset
- * @return {number} string index at offset N
+ * @param {number} offset offset
+ * @param {Run} run run
+ * @returns {number} string index at offset N
*/
const indexAtOffset = (offset, run) => {
let counter = 0;
diff --git a/packages/textkit/src/run/insert.js b/packages/textkit/src/run/insert.js
index 99ab98038..e99524f53 100644
--- a/packages/textkit/src/run/insert.js
+++ b/packages/textkit/src/run/insert.js
@@ -5,13 +5,18 @@ import getFont from './getFont';
import isNumber from '../utils/isNumber';
import glyphFromCodePoint from '../glyph/fromCodePoint';
+/**
+ * @typedef {import('../types.js').Glyph} Glyph
+ * @typedef {import('../types.js').Run} Run
+ */
+
/**
* Insert glyph to run in the given index
*
- * @param {number} string index
- * @param {Object} glyph
- * @param {Object} run
- * @return {Object} run with glyph
+ * @param {number} index index
+ * @param {Glyph} glyph glyph
+ * @param {Run} run run
+ * @returns {Run} run with glyph
*/
const insertGlyph = (index, glyph, run) => {
if (!glyph) return run;
@@ -26,10 +31,10 @@ const insertGlyph = (index, glyph, run) => {
/**
* Insert either glyph or code point to run in the given index
*
- * @param {number} string index
- * @param {Object | number} glyph | codePoint
- * @param {Object} run
- * @return {Object} run with glyph
+ * @param {number} index index
+ * @param {Glyph | number} value glyph or codePoint
+ * @param {Run} run run
+ * @returns {Run} run with glyph
*/
const insert = (index, value, run) => {
const font = getFont(run);
diff --git a/packages/textkit/src/run/isEmpty.js b/packages/textkit/src/run/isEmpty.js
index d0e248176..cc797c189 100644
--- a/packages/textkit/src/run/isEmpty.js
+++ b/packages/textkit/src/run/isEmpty.js
@@ -1,10 +1,14 @@
+/**
+ * @typedef {import('../types.js').Run} Run
+ */
+
/**
* Is run empty (start === end)
*
- * @param {Object} run
- * @return {Object} is run empty
+ * @param {Run} run run
+ * @returns {boolean} is run empty
*/
-const isEmpty = run => {
+const isEmpty = (run) => {
return run.start === run.end;
};
diff --git a/packages/textkit/src/run/leadingOffset.js b/packages/textkit/src/run/leadingOffset.js
index 0ba78c13a..4f5884bae 100644
--- a/packages/textkit/src/run/leadingOffset.js
+++ b/packages/textkit/src/run/leadingOffset.js
@@ -1,15 +1,20 @@
import isWhiteSpace from '../glyph/isWhiteSpace';
+/**
+ * @typedef {import('../types.js').Position} Position
+ * @typedef {import('../types.js').Run} Run
+ */
+
/**
* Get white space leading positions
*
- * @param {Object} run
- * @return {Array} white space leading positions
+ * @param {Run} run run
+ * @returns {Position[]} white space leading positions
*/
-const leadingPositions = run => {
+const leadingPositions = (run) => {
const glyphs = run.glyphs || [];
const positions = run.positions || [];
- const leadingWhitespaces = glyphs.findIndex(g => !isWhiteSpace(g));
+ const leadingWhitespaces = glyphs.findIndex((g) => !isWhiteSpace(g));
return positions.slice(0, leadingWhitespaces);
};
@@ -17,10 +22,10 @@ const leadingPositions = run => {
/**
* Get run leading white space offset
*
- * @param {Object} run
- * @return {number} leading white space offset
+ * @param {Run} run run
+ * @returns {number} leading white space offset
*/
-const leadingOffset = run => {
+const leadingOffset = (run) => {
const positions = leadingPositions(run);
return positions.reduce((acc, pos) => acc + (pos.xAdvance || 0), 0);
diff --git a/packages/textkit/src/run/length.js b/packages/textkit/src/run/length.js
index e5efc0e68..c57f835b3 100644
--- a/packages/textkit/src/run/length.js
+++ b/packages/textkit/src/run/length.js
@@ -1,10 +1,14 @@
+/**
+ * @typedef {import('../types.js').Run} Run
+ */
+
/**
* Get run length
*
- * @param {Object} run
- * @return {number} length
+ * @param {Run} run run
+ * @returns {number} length
*/
-const length = run => {
+const length = (run) => {
return run.end - run.start;
};
diff --git a/packages/textkit/src/run/lineGap.js b/packages/textkit/src/run/lineGap.js
index 96a51d604..234ea19db 100644
--- a/packages/textkit/src/run/lineGap.js
+++ b/packages/textkit/src/run/lineGap.js
@@ -1,12 +1,16 @@
import scale from './scale';
+/**
+ * @typedef {import('../types.js').Run} Run
+ */
+
/**
* Get run lineGap
*
- * @param {Object} run
- * @return {number} lineGap
+ * @param {Object} run run
+ * @returns {number} lineGap
*/
-const lineGap = run => {
+const lineGap = (run) => {
return (run.attributes?.font?.lineGap || 0) * scale(run);
};
diff --git a/packages/textkit/src/run/offset.js b/packages/textkit/src/run/offset.js
index 2e18773f4..05e94dda7 100644
--- a/packages/textkit/src/run/offset.js
+++ b/packages/textkit/src/run/offset.js
@@ -1,3 +1,7 @@
+/**
+ * @typedef {import('../types.js').Run} Run
+ */
+
/**
* Get ligature offset by index
*
@@ -7,9 +11,9 @@
* glyphIndices: 0 1 2 2 2 3
* offset: 0 0 0 1 2 0
*
- * @param {number} index
- * @param {Object} run
- * @return {number} ligature offset
+ * @param {number} index
+ * @param {Run} run run
+ * @returns {number} ligature offset
*/
const offset = (index, run) => {
if (!run) return 0;
@@ -17,7 +21,7 @@ const offset = (index, run) => {
const glyphIndices = run.glyphIndices || [];
const value = glyphIndices[index];
- return glyphIndices.slice(0, index).filter(i => i === value).length;
+ return glyphIndices.slice(0, index).filter((i) => i === value).length;
};
export default offset;
diff --git a/packages/textkit/src/run/omit.js b/packages/textkit/src/run/omit.js
index 3e00371e5..a61949d34 100644
--- a/packages/textkit/src/run/omit.js
+++ b/packages/textkit/src/run/omit.js
@@ -1,8 +1,14 @@
+/**
+ * @typedef {import('../types.js').Attributes} Attributes
+ * @typedef {import('../types.js').Run} Run
+ */
+
/**
* Omit attribute from run
*
- * @param {Object} run
- * @return {Object} run without ommited attribute
+ * @param {keyof Attributes} value attribute value
+ * @param {Run} run run
+ * @returns {Run} run without ommited attribute
*/
const omit = (value, run) => {
const attributes = Object.assign({}, run.attributes);
diff --git a/packages/textkit/src/run/prepend.js b/packages/textkit/src/run/prepend.js
index 9ed4cb825..83ef16314 100644
--- a/packages/textkit/src/run/prepend.js
+++ b/packages/textkit/src/run/prepend.js
@@ -4,12 +4,18 @@ import isNumber from '../utils/isNumber';
import prependIndices from '../indices/prepend';
import glyphFromCodePoint from '../glyph/fromCodePoint';
+/**
+ * @typedef {import('../types.js').Glyph} Glyph
+ * @typedef {import('../types.js').Position} Position
+ * @typedef {import('../types.js').Run} Run
+ */
+
/**
* Prepend glyph to run
*
- * @param {Object} glyph
- * @param {Object} run
- * @return {Object} run with glyph
+ * @param {Glyph} glyph glyph
+ * @param {Run} run run
+ * @returns {Run} run with glyph
*/
const prependGlyph = (glyph, run) => {
const runScale = scale(run);
@@ -18,9 +24,10 @@ const prependGlyph = (glyph, run) => {
const end = run.end + glyphLength;
const glyphIndices = prependIndices(glyphLength, run.glyphIndices);
const glyphs = [glyph].concat(run.glyphs);
- const positions = [{ xAdvance: glyph.advanceWidth * runScale }].concat(
- run.positions,
- );
+
+ const positions = /** @type {Position[]} */ ([
+ { xAdvance: glyph.advanceWidth * runScale },
+ ]).concat(run.positions);
return Object.assign({}, run, { end, glyphs, glyphIndices, positions });
};
@@ -28,9 +35,9 @@ const prependGlyph = (glyph, run) => {
/**
* Prepend glyph or code point on run
*
- * @param {Object | number} glyph | codePoint
- * @param {Object} run
- * @return {Object} run with glyph
+ * @param {Glyph | number} value glyph or codePoint
+ * @param {Run} run run
+ * @returns {Run} run with glyph
*/
const prepend = (value, run) => {
if (!value) return run;
diff --git a/packages/textkit/src/run/runIndexAt.js b/packages/textkit/src/run/runIndexAt.js
index 852581e24..d04b1f30e 100644
--- a/packages/textkit/src/run/runIndexAt.js
+++ b/packages/textkit/src/run/runIndexAt.js
@@ -1,14 +1,18 @@
+/**
+ * @typedef {import('../types.js').Run} Run
+ */
+
/**
* Get run index that contains passed index
*
- * @param {number} char index
- * @param {Array} runs array
- * @return {Array} run index
+ * @param {number} n index
+ * @param {Run[]} runs runs
+ * @returns {number} run index
*/
const runIndexAt = (n, runs) => {
if (!runs) return -1;
- return runs.findIndex(run => run.start <= n && n < run.end);
+ return runs.findIndex((run) => run.start <= n && n < run.end);
};
export default runIndexAt;
diff --git a/packages/textkit/src/run/scale.js b/packages/textkit/src/run/scale.js
index 172907722..a7b0dc001 100644
--- a/packages/textkit/src/run/scale.js
+++ b/packages/textkit/src/run/scale.js
@@ -1,10 +1,14 @@
+/**
+ * @typedef {import('../types.js').Run} Run
+ */
+
/**
* Calculate run scale
*
- * @param {Object} run
- * @return {number} scale
+ * @param {Run} run run
+ * @returns {number} scale
*/
-const calculateScale = run => {
+const calculateScale = (run) => {
const attributes = run.attributes || {};
const fontSize = attributes.fontSize || 12;
const unitsPerEm = attributes.font?.unitsPerEm;
@@ -15,10 +19,10 @@ const calculateScale = run => {
/**
* Get run scale
*
- * @param {Object} run
- * @return {number} scale
+ * @param {Object} run
+ * @returns {number} scale
*/
-const scale = run => {
+const scale = (run) => {
return run.attributes?.scale || calculateScale(run);
};
diff --git a/packages/textkit/src/run/slice.js b/packages/textkit/src/run/slice.js
index ee79063b0..251dea78c 100644
--- a/packages/textkit/src/run/slice.js
+++ b/packages/textkit/src/run/slice.js
@@ -5,13 +5,17 @@ import sliceGlyph from '../glyph/slice';
import glyphIndexAt from './glyphIndexAt';
import normalizeIndices from '../indices/normalize';
+/**
+ * @typedef {import('../types.js').Run} Run
+ */
+
/**
* Slice run between glyph indices range
*
- * @param {number} start glyph index
- * @param {number} end glyph index
- * @param {Object} run
- * @return {Object} sliced run
+ * @param {number} start glyph index
+ * @param {number} end glyph index
+ * @param {Run} run run
+ * @returns {Run} sliced run
*/
const slice = (start, end, run) => {
const runScale = scale(run);
@@ -39,7 +43,7 @@ const slice = (start, end, run) => {
const glyphs = (run.glyphs || []).slice(sliceStart, endIndex);
// Compute new positions
- const glyphPosition = g => ({ xAdvance: g.advanceWidth * runScale });
+ const glyphPosition = (g) => ({ xAdvance: g.advanceWidth * runScale });
const startPositions = startGlyphs.map(glyphPosition);
const positions = (run.positions || []).slice(sliceStart, endIndex);
const endPositions = endGlyphs.map(glyphPosition);
diff --git a/packages/textkit/src/run/sort.js b/packages/textkit/src/run/sort.js
index 6acbe8392..c53bdd261 100644
--- a/packages/textkit/src/run/sort.js
+++ b/packages/textkit/src/run/sort.js
@@ -1,9 +1,15 @@
+/**
+ * @typedef {import('../types.js').Run} Run
+ */
+
/**
* Sort runs in ascending order
*
- * @param {Array} runs
- * @return {Array} sorted runs
+ * @param {Run[]} runs
+ * @returns {Run[]} sorted runs
*/
-const sort = runs => runs.sort((a, b) => a.start - b.start || a.end - b.end);
+const sort = (runs) => {
+ return runs.sort((a, b) => a.start - b.start || a.end - b.end);
+};
export default sort;
diff --git a/packages/textkit/src/run/subtract.js b/packages/textkit/src/run/subtract.js
index e7dad0f57..accc8e5e5 100644
--- a/packages/textkit/src/run/subtract.js
+++ b/packages/textkit/src/run/subtract.js
@@ -1,9 +1,13 @@
+/**
+ * @typedef {import('../types.js').Run} Run
+ */
+
/**
* Subtract scalar to run
*
- * @param {number} scalar
- * @param {Object} run
- * @return {Object} subtracted run
+ * @param {number} n scalar
+ * @param {Run} run run
+ * @returns {Object} subtracted run
*/
const subtract = (n, run) => {
const start = run.start - n;
diff --git a/packages/textkit/src/run/trailingOffset.js b/packages/textkit/src/run/trailingOffset.js
index 7dc45e0b8..0027f9d44 100644
--- a/packages/textkit/src/run/trailingOffset.js
+++ b/packages/textkit/src/run/trailingOffset.js
@@ -1,17 +1,29 @@
import isWhiteSpace from '../glyph/isWhiteSpace';
-const reverse = array => [...array].reverse();
+/**
+ * @typedef {import('../types.js').Position} Position
+ * @typedef {import('../types.js').Run} Run
+ */
+
+/**
+ * @template T
+ * @param {T[]} array
+ * @returns {T[]} reversed array
+ */
+const reverse = (array) => {
+ return [...array].reverse();
+};
/**
* Get white space trailing positions
*
- * @param {Object} run
- * @return {Array} white space trailing positions
+ * @param {Run} run run
+ * @returns {Position[]} white space trailing positions
*/
-const trailingPositions = run => {
+const trailingPositions = (run) => {
const glyphs = reverse(run.glyphs || []);
const positions = reverse(run.positions || []);
- const leadingWhitespaces = glyphs.findIndex(g => !isWhiteSpace(g));
+ const leadingWhitespaces = glyphs.findIndex((g) => !isWhiteSpace(g));
return positions.slice(0, leadingWhitespaces);
};
@@ -19,10 +31,10 @@ const trailingPositions = run => {
/**
* Get run trailing white space offset
*
- * @param {Object} run
- * @return {number} trailing white space offset
+ * @param {Run} run run
+ * @returns {number} trailing white space offset
*/
-const trailingOffset = run => {
+const trailingOffset = (run) => {
const positions = trailingPositions(run);
return positions.reduce((acc, pos) => acc + (pos.xAdvance || 0), 0);
diff --git a/packages/textkit/src/types.js b/packages/textkit/src/types.js
new file mode 100644
index 000000000..d26444d7d
--- /dev/null
+++ b/packages/textkit/src/types.js
@@ -0,0 +1,113 @@
+/**
+ * @typedef {Object} AttributedString
+ * @property {string} [string]
+ * @property {string[]} [syllables]
+ * @property {Run[]} [runs]
+ */
+
+/**
+ * @typedef {Object} Attachment
+ * @property {number} [x]
+ * @property {number} [y]
+ * @property {number} [width]
+ * @property {number} [height]
+ */
+
+/**
+ * @typedef {Object} Attributes
+ * @property {string} [align]
+ * @property {string} [alignLastLine]
+ * @property {Attachment} [attachment]
+ * @property {string} [backgroundColor]
+ * @property {unknown} [bidiLevel]
+ * @property {unknown} [bullet]
+ * @property {number} [characterSpacing]
+ * @property {string} [color]
+ * @property {unknown[]} [features]
+ * @property {boolean} [fill]
+ * @property {Font | string} [font]
+ * @property {number} [fontSize]
+ * @property {boolean} [hangingPunctuation]
+ * @property {number} [hyphenationFactor]
+ * @property {number} [indent]
+ * @property {number} [justificationFactor]
+ * @property {number} [lineHeight]
+ * @property {number} [lineSpacing]
+ * @property {unknown} [link]
+ * @property {number} [margin]
+ * @property {number} [marginLeft]
+ * @property {number} [marginRight]
+ * @property {number} [opacity]
+ * @property {number} [padding]
+ * @property {number} [paddingTop]
+ * @property {number} [paragraphSpacing]
+ * @property {number} [scale]
+ * @property {unknown} [script]
+ * @property {number} [shrinkFactor]
+ * @property {boolean} [strike]
+ * @property {string} [strikeColor]
+ * @property {string} [strikeStyle]
+ * @property {boolean} [stroke]
+ * @property {boolean} [underline]
+ * @property {string} [underlineColor]
+ * @property {string} [underlineStyle]
+ * @property {string} [verticalAlign]
+ * @property {number} [wordSpacing]
+ * @property {number} [yOffset]
+ */
+
+/**
+ * @typedef {Object} Fragment
+ * @property {string} string
+ * @property {Attributes} [attributes]
+ */
+
+/**
+ * @typedef {Object} Glyph
+ * @property {number} [id]
+ * @property {number} [advanceWidth]
+ * @property {number[]} [codePoints]
+ */
+
+/**
+ * @typedef {Object} Font
+ * @property {number} [ascent]
+ * @property {number} [descent]
+ * @property {number} [height]
+ * @property {number} [unitsPerEm]
+ * @property {Function} [glyphForCodePoint]
+ * @property {Function} [layout]
+ */
+
+/**
+ * @typedef {['start' | 'end', number, Attributes, number]} Point
+ */
+
+/**
+ * @typedef {Object} Position
+ * @property {number} [xAdvance]
+ * @property {number} [yAdvance]
+ * @property {number} [xOffset]
+ * @property {number} [yOffset]
+ * @property {number} [advanceWidth]
+ */
+
+/**
+ * @typedef {Object} Rect
+ * @property {number} x
+ * @property {number} y
+ * @property {number} width
+ * @property {number} height
+ */
+
+/**
+ * @typedef {Object} Run
+ * @property {number} [start]
+ * @property {number} [end]
+ * @property {number[]} [glyphIndices]
+ * @property {Glyph[]} [glyphs]
+ * @property {Position[]} [positions]
+ * @property {Attributes} [attributes]
+ */
+
+module.exports = {};
diff --git a/packages/textkit/src/utils/isNumber.js b/packages/textkit/src/utils/isNumber.js
index 47b5cc725..f0f295502 100644
--- a/packages/textkit/src/utils/isNumber.js
+++ b/packages/textkit/src/utils/isNumber.js
@@ -1,3 +1,12 @@
-const isNumber = value => typeof value === 'number';
+/**
+ * Check if value is a number
+ *
+ * @template {unknown} T
+ * @param {T} value Value to check
+ * @returns {value is number} Whether value is a number
+ */
+const isNumber = (value) => {
+ return typeof value === 'number';
+};
export default isNumber;
diff --git a/packages/textkit/src/utils/stringFromCodePoints.js b/packages/textkit/src/utils/stringFromCodePoints.js
index 577db7182..88557fd82 100644
--- a/packages/textkit/src/utils/stringFromCodePoints.js
+++ b/packages/textkit/src/utils/stringFromCodePoints.js
@@ -1,9 +1,11 @@
/**
* Get string from array of code points
*
- * @param {Array} code points
- * @return {String} string
+ * @param {number[]} codePoints points
+ * @returns {string} string
*/
-const stringFromCodePoints = codePoints => String.fromCodePoint(...codePoints);
+const stringFromCodePoints = (codePoints) => {
+ return String.fromCodePoint(...(codePoints || []));
+};
export default stringFromCodePoints;
diff --git a/packages/textkit/tests/attributedString/advanceWidth.test.js b/packages/textkit/tests/attributedString/advanceWidth.test.js
index 67c644f81..091b038bf 100644
--- a/packages/textkit/tests/attributedString/advanceWidth.test.js
+++ b/packages/textkit/tests/attributedString/advanceWidth.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import empty from '../../src/attributedString/empty';
import advanceWidth from '../../src/attributedString/advanceWidth';
diff --git a/packages/textkit/tests/attributedString/advanceWidthBetween.test.js b/packages/textkit/tests/attributedString/advanceWidthBetween.test.js
index f8f35f6b2..0abfa4d54 100644
--- a/packages/textkit/tests/attributedString/advanceWidthBetween.test.js
+++ b/packages/textkit/tests/attributedString/advanceWidthBetween.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import empty from '../../src/attributedString/empty';
import advanceWidthBetween from '../../src/attributedString/advanceWidthBetween';
diff --git a/packages/textkit/tests/attributedString/append.test.js b/packages/textkit/tests/attributedString/append.test.js
index 16d9564b8..78e749a24 100644
--- a/packages/textkit/tests/attributedString/append.test.js
+++ b/packages/textkit/tests/attributedString/append.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import font from '../internal/font';
import pluck from '../internal/pluck';
import empty from '../../src/attributedString/empty';
@@ -82,20 +84,10 @@ describe('attributeString append operator', () => {
expect(result.runs[0]).toHaveProperty('end', 6);
expect(result.runs[0].glyphIndices).toEqual([0, 1, 2, 3, 4, 5]);
expect(pluck('id', result.runs[0].glyphs)).toEqual([
- 76,
- 111,
- 114,
- 101,
- 109,
- 76,
+ 76, 111, 114, 101, 109, 76,
]);
expect(pluck('xAdvance', result.runs[0].positions)).toEqual([
- 5,
- 6,
- 7,
- 8,
- 9,
- 10,
+ 5, 6, 7, 8, 9, 10,
]);
});
@@ -182,20 +174,10 @@ describe('attributeString append operator', () => {
expect(result.runs[0]).toHaveProperty('end', 7);
expect(result.runs[0].glyphIndices).toEqual([0, 1, 2, 3, 4, 5, 5]);
expect(pluck('id', result.runs[0].glyphs)).toEqual([
- 76,
- 111,
- 114,
- 101,
- 109,
- 64257,
+ 76, 111, 114, 101, 109, 64257,
]);
expect(pluck('xAdvance', result.runs[0].positions)).toEqual([
- 5,
- 6,
- 7,
- 8,
- 9,
- 10,
+ 5, 6, 7, 8, 9, 10,
]);
});
diff --git a/packages/textkit/tests/attributedString/ascent.test.js b/packages/textkit/tests/attributedString/ascent.test.js
index 0684244d6..0e1b9f8db 100644
--- a/packages/textkit/tests/attributedString/ascent.test.js
+++ b/packages/textkit/tests/attributedString/ascent.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import empty from '../../src/attributedString/empty';
import ascent from '../../src/attributedString/ascent';
diff --git a/packages/textkit/tests/attributedString/descent.test.js b/packages/textkit/tests/attributedString/descent.test.js
index 7ddb5663a..7a0ad387d 100644
--- a/packages/textkit/tests/attributedString/descent.test.js
+++ b/packages/textkit/tests/attributedString/descent.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import empty from '../../src/attributedString/empty';
import descent from '../../src/attributedString/descent';
diff --git a/packages/textkit/tests/attributedString/dropLast.test.js b/packages/textkit/tests/attributedString/dropLast.test.js
index f19c7585f..d5aa1269e 100644
--- a/packages/textkit/tests/attributedString/dropLast.test.js
+++ b/packages/textkit/tests/attributedString/dropLast.test.js
@@ -1,24 +1,26 @@
+import { describe, expect, test } from 'vitest';
+
import pluck from '../internal/pluck';
import dropLast from '../../src/attributedString/dropLast';
describe('attributeString dropLast operator', () => {
test('should dropLast with one run', () => {
- const runs = [{ start: 0, end: 11, attributes: { attr: 1 } }];
+ const runs = [{ start: 0, end: 11, attributes: { font: {} } }];
const string = { string: 'Lorem ipsum', runs };
const result = dropLast(string);
expect(result.string).toBe('Lorem ipsu');
expect(result.runs[0]).toHaveProperty('start', 0);
expect(result.runs[0]).toHaveProperty('end', 10);
- expect(result.runs[0]).toHaveProperty('attributes', { attr: 1 });
+ expect(result.runs[0]).toHaveProperty('attributes', { font: {} });
});
test('should dropLast with two runs', () => {
const string = {
string: 'Lorem ipsum',
runs: [
- { start: 0, end: 6, attributes: { attr: 1 } },
- { start: 6, end: 11, attributes: { attr: 2 } },
+ { start: 0, end: 6, attributes: { font: {} } },
+ { start: 6, end: 11, attributes: { fontSize: 16 } },
],
};
const splittedString = dropLast(string);
@@ -26,17 +28,19 @@ describe('attributeString dropLast operator', () => {
expect(splittedString.string).toBe('Lorem ipsu');
expect(splittedString.runs[0]).toHaveProperty('start', 0);
expect(splittedString.runs[0]).toHaveProperty('end', 6);
- expect(splittedString.runs[0]).toHaveProperty('attributes', { attr: 1 });
+ expect(splittedString.runs[0]).toHaveProperty('attributes', { font: {} });
expect(splittedString.runs[1]).toHaveProperty('start', 6);
expect(splittedString.runs[1]).toHaveProperty('end', 10);
- expect(splittedString.runs[1]).toHaveProperty('attributes', { attr: 2 });
+ expect(splittedString.runs[1]).toHaveProperty('attributes', {
+ fontSize: 16,
+ });
});
test('should slice with several runs', () => {
const runs = [
- { start: 0, end: 3, attributes: { attr: 1 } },
- { start: 3, end: 6, attributes: { attr: 2 } },
- { start: 6, end: 11, attributes: { attr: 3 } },
+ { start: 0, end: 3, attributes: { font: {} } },
+ { start: 3, end: 6, attributes: { fontSize: 16 } },
+ { start: 6, end: 11, attributes: { fontSize: 20 } },
];
const string = { string: 'Lorem ipsum', runs };
const splittedString = dropLast(string);
@@ -44,13 +48,17 @@ describe('attributeString dropLast operator', () => {
expect(splittedString.string).toBe('Lorem ipsu');
expect(splittedString.runs[0]).toHaveProperty('start', 0);
expect(splittedString.runs[0]).toHaveProperty('end', 3);
- expect(splittedString.runs[0]).toHaveProperty('attributes', { attr: 1 });
+ expect(splittedString.runs[0]).toHaveProperty('attributes', { font: {} });
expect(splittedString.runs[1]).toHaveProperty('start', 3);
expect(splittedString.runs[1]).toHaveProperty('end', 6);
- expect(splittedString.runs[1]).toHaveProperty('attributes', { attr: 2 });
+ expect(splittedString.runs[1]).toHaveProperty('attributes', {
+ fontSize: 16,
+ });
expect(splittedString.runs[2]).toHaveProperty('start', 6);
expect(splittedString.runs[2]).toHaveProperty('end', 10);
- expect(splittedString.runs[2]).toHaveProperty('attributes', { attr: 3 });
+ expect(splittedString.runs[2]).toHaveProperty('attributes', {
+ fontSize: 20,
+ });
});
test('should dropLast glyphs with one run', () => {
diff --git a/packages/textkit/tests/attributedString/empty.test.js b/packages/textkit/tests/attributedString/empty.test.js
index 0e16ba90a..94d77a698 100644
--- a/packages/textkit/tests/attributedString/empty.test.js
+++ b/packages/textkit/tests/attributedString/empty.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import empty from '../../src/attributedString/empty';
describe('attributeString empty operator', () => {
diff --git a/packages/textkit/tests/attributedString/end.test.js b/packages/textkit/tests/attributedString/end.test.js
index ea4cd235b..383e0b8d3 100644
--- a/packages/textkit/tests/attributedString/end.test.js
+++ b/packages/textkit/tests/attributedString/end.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import empty from '../../src/attributedString/empty';
import end from '../../src/attributedString/end';
diff --git a/packages/textkit/tests/attributedString/fromFragments.test.js b/packages/textkit/tests/attributedString/fromFragments.test.js
index fa8fbc335..32aacf9ee 100644
--- a/packages/textkit/tests/attributedString/fromFragments.test.js
+++ b/packages/textkit/tests/attributedString/fromFragments.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import fromFragments from '../../src/attributedString/fromFragments';
describe('attributeString fromFragments operator', () => {
@@ -31,11 +33,13 @@ describe('attributeString fromFragments operator', () => {
test('should preserve fragment attributes', () => {
const attributedString = fromFragments([
- { string: 'Hey', attributes: { attr: 1 } },
- { string: ' ho', attributes: { attr: 2 } },
+ { string: 'Hey', attributes: { font: {} } },
+ { string: ' ho', attributes: { fontSize: 16 } },
]);
- expect(attributedString.runs[0]).toHaveProperty('attributes', { attr: 1 });
- expect(attributedString.runs[1]).toHaveProperty('attributes', { attr: 2 });
+ expect(attributedString.runs[0]).toHaveProperty('attributes', { font: {} });
+ expect(attributedString.runs[1]).toHaveProperty('attributes', {
+ fontSize: 16,
+ });
});
});
diff --git a/packages/textkit/tests/attributedString/height.test.js b/packages/textkit/tests/attributedString/height.test.js
index 8398d860f..7958b040d 100644
--- a/packages/textkit/tests/attributedString/height.test.js
+++ b/packages/textkit/tests/attributedString/height.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import empty from '../../src/attributedString/empty';
import height from '../../src/attributedString/height';
diff --git a/packages/textkit/tests/attributedString/indexAtOffset.test.js b/packages/textkit/tests/attributedString/indexAtOffset.test.js
index 82fda5aa2..787455ef8 100644
--- a/packages/textkit/tests/attributedString/indexAtOffset.test.js
+++ b/packages/textkit/tests/attributedString/indexAtOffset.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import indexAtOffset from '../../src/attributedString/indexAtOffset';
describe('attributeString indexAtOffset operator', () => {
diff --git a/packages/textkit/tests/attributedString/insertGlyph.test.js b/packages/textkit/tests/attributedString/insertGlyph.test.js
index ac4dcba75..eecc6175a 100644
--- a/packages/textkit/tests/attributedString/insertGlyph.test.js
+++ b/packages/textkit/tests/attributedString/insertGlyph.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import pluck from '../internal/pluck';
import insertGlyph from '../../src/attributedString/insertGlyph';
@@ -28,12 +30,7 @@ describe('attributeString insertGlyph operator', () => {
expect(result.runs[0]).toHaveProperty('start', 0);
expect(result.runs[0]).toHaveProperty('end', 6);
expect(pluck('id', result.runs[0].glyphs)).toEqual([
- 105,
- 76,
- 111,
- 114,
- 101,
- 109,
+ 105, 76, 111, 114, 101, 109,
]);
});
@@ -63,12 +60,7 @@ describe('attributeString insertGlyph operator', () => {
expect(result.runs[0]).toHaveProperty('start', 0);
expect(result.runs[0]).toHaveProperty('end', 6);
expect(pluck('id', result.runs[0].glyphs)).toEqual([
- 76,
- 111,
- 114,
- 101,
- 109,
- 105,
+ 76, 111, 114, 101, 109, 105,
]);
});
@@ -98,12 +90,7 @@ describe('attributeString insertGlyph operator', () => {
expect(result.runs[0]).toHaveProperty('start', 0);
expect(result.runs[0]).toHaveProperty('end', 6);
expect(pluck('id', result.runs[0].glyphs)).toEqual([
- 76,
- 111,
- 114,
- 105,
- 101,
- 109,
+ 76, 111, 114, 105, 101, 109,
]);
});
@@ -133,12 +120,7 @@ describe('attributeString insertGlyph operator', () => {
expect(result.runs[0]).toHaveProperty('start', 0);
expect(result.runs[0]).toHaveProperty('end', 7);
expect(pluck('id', result.runs[0].glyphs)).toEqual([
- 64257,
- 76,
- 111,
- 114,
- 101,
- 109,
+ 64257, 76, 111, 114, 101, 109,
]);
});
@@ -168,12 +150,7 @@ describe('attributeString insertGlyph operator', () => {
expect(result.runs[0]).toHaveProperty('start', 0);
expect(result.runs[0]).toHaveProperty('end', 7);
expect(pluck('id', result.runs[0].glyphs)).toEqual([
- 76,
- 111,
- 114,
- 101,
- 109,
- 64257,
+ 76, 111, 114, 101, 109, 64257,
]);
});
@@ -203,12 +180,7 @@ describe('attributeString insertGlyph operator', () => {
expect(result.runs[0]).toHaveProperty('start', 0);
expect(result.runs[0]).toHaveProperty('end', 7);
expect(pluck('id', result.runs[0].glyphs)).toEqual([
- 76,
- 111,
- 114,
- 64257,
- 101,
- 109,
+ 76, 111, 114, 64257, 101, 109,
]);
});
@@ -238,12 +210,7 @@ describe('attributeString insertGlyph operator', () => {
expect(result.runs[0]).toHaveProperty('start', 0);
expect(result.runs[0]).toHaveProperty('end', 7);
expect(pluck('id', result.runs[0].glyphs)).toEqual([
- 105,
- 76,
- 111,
- 64257,
- 101,
- 109,
+ 105, 76, 111, 64257, 101, 109,
]);
});
@@ -273,12 +240,7 @@ describe('attributeString insertGlyph operator', () => {
expect(result.runs[0]).toHaveProperty('start', 0);
expect(result.runs[0]).toHaveProperty('end', 7);
expect(pluck('id', result.runs[0].glyphs)).toEqual([
- 76,
- 111,
- 64257,
- 101,
- 109,
- 105,
+ 76, 111, 64257, 101, 109, 105,
]);
});
@@ -308,12 +270,7 @@ describe('attributeString insertGlyph operator', () => {
expect(result.runs[0]).toHaveProperty('start', 0);
expect(result.runs[0]).toHaveProperty('end', 7);
expect(pluck('id', result.runs[0].glyphs)).toEqual([
- 76,
- 111,
- 64257,
- 105,
- 101,
- 109,
+ 76, 111, 64257, 105, 101, 109,
]);
});
diff --git a/packages/textkit/tests/attributedString/leadingOffset.test.js b/packages/textkit/tests/attributedString/leadingOffset.test.js
index 42b7a2a84..543f26718 100644
--- a/packages/textkit/tests/attributedString/leadingOffset.test.js
+++ b/packages/textkit/tests/attributedString/leadingOffset.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import leadingOffset from '../../src/attributedString/leadingOffset';
describe('attributeString leadingOffset operator', () => {
diff --git a/packages/textkit/tests/attributedString/length.test.js b/packages/textkit/tests/attributedString/length.test.js
index d007864aa..da3a0aa45 100644
--- a/packages/textkit/tests/attributedString/length.test.js
+++ b/packages/textkit/tests/attributedString/length.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import empty from '../../src/attributedString/empty';
import length from '../../src/attributedString/length';
diff --git a/packages/textkit/tests/attributedString/prepend.test.js b/packages/textkit/tests/attributedString/prepend.test.js
index 05db7a37c..0cba9c07c 100644
--- a/packages/textkit/tests/attributedString/prepend.test.js
+++ b/packages/textkit/tests/attributedString/prepend.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import font from '../internal/font';
import pluck from '../internal/pluck';
import empty from '../../src/attributedString/empty';
@@ -81,20 +83,10 @@ describe('attributeString prepend operator', () => {
expect(result.runs[0]).toHaveProperty('end', 6);
expect(result.runs[0].glyphIndices).toEqual([0, 1, 2, 3, 4, 5]);
expect(pluck('id', result.runs[0].glyphs)).toEqual([
- 76,
- 76,
- 111,
- 114,
- 101,
- 109,
+ 76, 76, 111, 114, 101, 109,
]);
expect(pluck('xAdvance', result.runs[0].positions)).toEqual([
- 10,
- 5,
- 6,
- 7,
- 8,
- 9,
+ 10, 5, 6, 7, 8, 9,
]);
});
@@ -181,20 +173,10 @@ describe('attributeString prepend operator', () => {
expect(result.runs[0]).toHaveProperty('end', 7);
expect(result.runs[0].glyphIndices).toEqual([0, 0, 1, 2, 3, 4, 5]);
expect(pluck('id', result.runs[0].glyphs)).toEqual([
- 64257,
- 76,
- 111,
- 114,
- 101,
- 109,
+ 64257, 76, 111, 114, 101, 109,
]);
expect(pluck('xAdvance', result.runs[0].positions)).toEqual([
- 10,
- 5,
- 6,
- 7,
- 8,
- 9,
+ 10, 5, 6, 7, 8, 9,
]);
});
diff --git a/packages/textkit/tests/attributedString/runAt.test.js b/packages/textkit/tests/attributedString/runAt.test.js
index b68b1f0be..8883f7e21 100644
--- a/packages/textkit/tests/attributedString/runAt.test.js
+++ b/packages/textkit/tests/attributedString/runAt.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import runAt from '../../src/attributedString/runAt';
const string = {
diff --git a/packages/textkit/tests/attributedString/runIndexAt.test.js b/packages/textkit/tests/attributedString/runIndexAt.test.js
index e74d91373..72fe28bff 100644
--- a/packages/textkit/tests/attributedString/runIndexAt.test.js
+++ b/packages/textkit/tests/attributedString/runIndexAt.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import runIndexAt from '../../src/attributedString/runIndexAt';
const string = {
diff --git a/packages/textkit/tests/attributedString/slice.test.js b/packages/textkit/tests/attributedString/slice.test.js
index a2cfb642f..2a7262c20 100644
--- a/packages/textkit/tests/attributedString/slice.test.js
+++ b/packages/textkit/tests/attributedString/slice.test.js
@@ -1,23 +1,25 @@
+import { describe, expect, test } from 'vitest';
+
import font from '../internal/font';
import pluck from '../internal/pluck';
import slice from '../../src/attributedString/slice';
const testString = 'Lorem ipsum';
const testRuns = [
- { start: 0, end: 6, attributes: { attr: 1 } },
- { start: 6, end: 11, attributes: { attr: 2 } },
+ { start: 0, end: 6, attributes: { font: {} } },
+ { start: 6, end: 11, attributes: { fontSize: 16 } },
];
describe('attributeString slice operator', () => {
test('should slice with one run', () => {
- const runs = [{ start: 0, end: 11, attributes: { attr: 1 } }];
+ const runs = [{ start: 0, end: 11, attributes: { font: {} } }];
const string = { string: testString, runs };
const sliced = slice(2, 8, string);
expect(sliced.string).toBe('rem ip');
expect(sliced.runs[0]).toHaveProperty('start', 0);
expect(sliced.runs[0]).toHaveProperty('end', 6);
- expect(sliced.runs[0]).toHaveProperty('attributes', { attr: 1 });
+ expect(sliced.runs[0]).toHaveProperty('attributes', { font: {} });
});
test('should slice with two runs', () => {
@@ -27,17 +29,19 @@ describe('attributeString slice operator', () => {
expect(splittedString.string).toBe('rem ip');
expect(splittedString.runs[0]).toHaveProperty('start', 0);
expect(splittedString.runs[0]).toHaveProperty('end', 4);
- expect(splittedString.runs[0]).toHaveProperty('attributes', { attr: 1 });
+ expect(splittedString.runs[0]).toHaveProperty('attributes', { font: {} });
expect(splittedString.runs[1]).toHaveProperty('start', 4);
expect(splittedString.runs[1]).toHaveProperty('end', 6);
- expect(splittedString.runs[1]).toHaveProperty('attributes', { attr: 2 });
+ expect(splittedString.runs[1]).toHaveProperty('attributes', {
+ fontSize: 16,
+ });
});
test('should slice with several runs', () => {
const runs = [
- { start: 0, end: 3, attributes: { attr: 1 } },
- { start: 3, end: 6, attributes: { attr: 2 } },
- { start: 6, end: 11, attributes: { attr: 3 } },
+ { start: 0, end: 3, attributes: { font: {} } },
+ { start: 3, end: 6, attributes: { fontSize: 16 } },
+ { start: 6, end: 11, attributes: { fontSize: 20 } },
];
const string = { string: testString, runs };
const splittedString = slice(2, 8, string);
@@ -45,13 +49,17 @@ describe('attributeString slice operator', () => {
expect(splittedString.string).toBe('rem ip');
expect(splittedString.runs[0]).toHaveProperty('start', 0);
expect(splittedString.runs[0]).toHaveProperty('end', 1);
- expect(splittedString.runs[0]).toHaveProperty('attributes', { attr: 1 });
+ expect(splittedString.runs[0]).toHaveProperty('attributes', { font: {} });
expect(splittedString.runs[1]).toHaveProperty('start', 1);
expect(splittedString.runs[1]).toHaveProperty('end', 4);
- expect(splittedString.runs[1]).toHaveProperty('attributes', { attr: 2 });
+ expect(splittedString.runs[1]).toHaveProperty('attributes', {
+ fontSize: 16,
+ });
expect(splittedString.runs[2]).toHaveProperty('start', 4);
expect(splittedString.runs[2]).toHaveProperty('end', 6);
- expect(splittedString.runs[2]).toHaveProperty('attributes', { attr: 3 });
+ expect(splittedString.runs[2]).toHaveProperty('attributes', {
+ fontSize: 20,
+ });
});
test('should ignore unnecesary leading runs when slice', () => {
@@ -62,7 +70,9 @@ describe('attributeString slice operator', () => {
expect(splittedString.string).toBe('ipsum');
expect(splittedString.runs[0]).toHaveProperty('start', 0);
expect(splittedString.runs[0]).toHaveProperty('end', 5);
- expect(splittedString.runs[0]).toHaveProperty('attributes', { attr: 2 });
+ expect(splittedString.runs[0]).toHaveProperty('attributes', {
+ fontSize: 16,
+ });
});
test('should ignore unnecesary trailing runs when slice', () => {
@@ -73,7 +83,7 @@ describe('attributeString slice operator', () => {
expect(splittedString.string).toBe('orem ');
expect(splittedString.runs[0]).toHaveProperty('start', 0);
expect(splittedString.runs[0]).toHaveProperty('end', 5);
- expect(splittedString.runs[0]).toHaveProperty('attributes', { attr: 1 });
+ expect(splittedString.runs[0]).toHaveProperty('attributes', { font: {} });
});
test('should slice glyphs when one run', () => {
diff --git a/packages/textkit/tests/attributedString/sliceAtOffset.test.js b/packages/textkit/tests/attributedString/sliceAtOffset.test.js
index 5c0490b67..91244720d 100644
--- a/packages/textkit/tests/attributedString/sliceAtOffset.test.js
+++ b/packages/textkit/tests/attributedString/sliceAtOffset.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import pluck from '../internal/pluck';
import sliceAtOffset from '../../src/attributedString/sliceAtOffset';
diff --git a/packages/textkit/tests/attributedString/start.test.js b/packages/textkit/tests/attributedString/start.test.js
index 583cc052e..6db57bcb7 100644
--- a/packages/textkit/tests/attributedString/start.test.js
+++ b/packages/textkit/tests/attributedString/start.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import empty from '../../src/attributedString/empty';
import start from '../../src/attributedString/start';
diff --git a/packages/textkit/tests/attributedString/trailingOffset.test.js b/packages/textkit/tests/attributedString/trailingOffset.test.js
index 5ce3f5cc8..0a861fcc4 100644
--- a/packages/textkit/tests/attributedString/trailingOffset.test.js
+++ b/packages/textkit/tests/attributedString/trailingOffset.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import trailingOffset from '../../src/attributedString/trailingOffset';
describe('attributeString trailingOffset operator', () => {
diff --git a/packages/textkit/tests/attributedString/trim.test.js b/packages/textkit/tests/attributedString/trim.test.js
index 7ee6b3bbc..206b84afd 100644
--- a/packages/textkit/tests/attributedString/trim.test.js
+++ b/packages/textkit/tests/attributedString/trim.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import trim from '../../src/attributedString/trim';
// const runs = [{ start: 0, end }]
diff --git a/packages/textkit/tests/engines/bidi.test.js b/packages/textkit/tests/engines/bidi.test.js
new file mode 100644
index 000000000..e7fb0c2ee
--- /dev/null
+++ b/packages/textkit/tests/engines/bidi.test.js
@@ -0,0 +1,52 @@
+import { describe, expect, test } from 'vitest';
+
+import bidi from '../../src/engines/bidi';
+
+const bidiInstance = bidi({});
+
+describe('Bidi', () => {
+ test('should return string with correct bidi level for ltr', () => {
+ const result = bidiInstance({
+ string: 'English عربي English עִברִית فارسی 1234 English عربي ١٢٣٤٥',
+ runs: [
+ {
+ attributes: {
+ direction: 'ltr',
+ },
+ },
+ ],
+ });
+ expect(result.runs.length).toBe(8);
+ expect(result.runs[0].attributes.bidiLevel).toBe(0);
+ expect(result.runs[1].attributes.bidiLevel).toBe(1);
+ expect(result.runs[2].attributes.bidiLevel).toBe(0);
+ expect(result.runs[3].attributes.bidiLevel).toBe(1);
+ expect(result.runs[4].attributes.bidiLevel).toBe(2);
+ expect(result.runs[5].attributes.bidiLevel).toBe(0);
+ expect(result.runs[6].attributes.bidiLevel).toBe(1);
+ expect(result.runs[7].attributes.bidiLevel).toBe(2);
+ });
+
+ test('should return string with correct bidi level for rtl', () => {
+ const result = bidiInstance({
+ string: 'English عربي English עִברִית فارسی 1234 English عربي ١٢٣٤٥',
+ runs: [
+ {
+ attributes: {
+ direction: 'rtl',
+ },
+ },
+ ],
+ });
+ expect(result.runs.length).toBe(9);
+ expect(result.runs[0].attributes.bidiLevel).toBe(2);
+ expect(result.runs[1].attributes.bidiLevel).toBe(1);
+ expect(result.runs[2].attributes.bidiLevel).toBe(2);
+ expect(result.runs[3].attributes.bidiLevel).toBe(1);
+ expect(result.runs[4].attributes.bidiLevel).toBe(2);
+ expect(result.runs[5].attributes.bidiLevel).toBe(1);
+ expect(result.runs[6].attributes.bidiLevel).toBe(2);
+ expect(result.runs[7].attributes.bidiLevel).toBe(1);
+ expect(result.runs[8].attributes.bidiLevel).toBe(2);
+ });
+});
diff --git a/packages/textkit/tests/engines/fontSubstitution.test.js b/packages/textkit/tests/engines/fontSubstitution.test.js
index 3bc6507a7..c51b20fbc 100644
--- a/packages/textkit/tests/engines/fontSubstitution.test.js
+++ b/packages/textkit/tests/engines/fontSubstitution.test.js
@@ -1,7 +1,9 @@
+import { describe, expect, test } from 'vitest';
+
import empty from '../../src/attributedString/empty';
import fontSubstitution from '../../src/engines/fontSubstitution';
-const instance = fontSubstitution({});
+const instance = fontSubstitution();
describe('FontSubstitution', () => {
test('should return empty array if no runs passed', () => {
diff --git a/packages/textkit/tests/engines/linebreaker/bestFit.test.js b/packages/textkit/tests/engines/linebreaker/bestFit.test.js
index 0300e1430..ccb4e7fd2 100644
--- a/packages/textkit/tests/engines/linebreaker/bestFit.test.js
+++ b/packages/textkit/tests/engines/linebreaker/bestFit.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import applyBestFit from '../../../src/engines/linebreaker/bestFit';
const width = 50;
diff --git a/packages/textkit/tests/engines/scriptItemizer.test.js b/packages/textkit/tests/engines/scriptItemizer.test.js
index 8d058b522..6a0c11b47 100644
--- a/packages/textkit/tests/engines/scriptItemizer.test.js
+++ b/packages/textkit/tests/engines/scriptItemizer.test.js
@@ -1,6 +1,8 @@
+import { describe, expect, test } from 'vitest';
+
import scriptItemizer from '../../src/engines/scriptItemizer';
-const instance = scriptItemizer({});
+const instance = scriptItemizer();
describe('scriptItemizer', () => {
test('should return empty array for empty string', () => {
diff --git a/packages/textkit/tests/engines/wordHyphenation.test.js b/packages/textkit/tests/engines/wordHyphenation.test.js
index 7f72c789e..18783602e 100644
--- a/packages/textkit/tests/engines/wordHyphenation.test.js
+++ b/packages/textkit/tests/engines/wordHyphenation.test.js
@@ -1,8 +1,6 @@
-import hyphen from 'hyphen';
+import { beforeEach, describe, expect, test, vi } from 'vitest';
-jest.mock('hyphen');
-
-const hyphenator = jest.fn(v => {
+const hyphenator = vi.fn((v) => {
if (v === '') return '';
if (v === 'something') return 'some\u00adthing';
if (v === 'neumonia') return 'neu\u00admo\u00adnia';
@@ -11,11 +9,12 @@ const hyphenator = jest.fn(v => {
return v;
});
-hyphen.mockReturnValue(hyphenator);
+vi.mock('hyphen', () => ({ default: () => hyphenator }));
-const wordHyphenation = require('../../src/engines/wordHyphenation').default;
+const wordHyphenation = (await import('../../src/engines/wordHyphenation'))
+ .default;
-const instance = wordHyphenation({});
+const instance = wordHyphenation();
describe('wordHyphenation', () => {
beforeEach(() => {
diff --git a/packages/textkit/tests/glyph/fromCodePoint.test.js b/packages/textkit/tests/glyph/fromCodePoint.test.js
index 39d118565..8bea30a90 100644
--- a/packages/textkit/tests/glyph/fromCodePoint.test.js
+++ b/packages/textkit/tests/glyph/fromCodePoint.test.js
@@ -1,7 +1,8 @@
+import { beforeEach, describe, expect, test, vi } from 'vitest';
import fromCodePoint from '../../src/glyph/fromCodePoint';
const font = {
- glyphForCodePoint: jest.fn(x => ({
+ glyphForCodePoint: vi.fn((x) => ({
id: x,
codePoints: [x],
advancedWidth: 5,
diff --git a/packages/textkit/tests/glyph/isWhiteSpace.test.js b/packages/textkit/tests/glyph/isWhiteSpace.test.js
index 143e59e85..391f491f9 100644
--- a/packages/textkit/tests/glyph/isWhiteSpace.test.js
+++ b/packages/textkit/tests/glyph/isWhiteSpace.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import isWhiteSpace from '../../src/glyph/isWhiteSpace';
describe('glyph isWhiteSpace operator', () => {
diff --git a/packages/textkit/tests/glyph/slice.test.js b/packages/textkit/tests/glyph/slice.test.js
index ec6938e2f..4791cbb4e 100644
--- a/packages/textkit/tests/glyph/slice.test.js
+++ b/packages/textkit/tests/glyph/slice.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import slice from '../../src/glyph/slice';
import font from '../internal/font';
diff --git a/packages/textkit/tests/indices/append.test.js b/packages/textkit/tests/indices/append.test.js
index a33490e7f..1ed4b492b 100644
--- a/packages/textkit/tests/indices/append.test.js
+++ b/packages/textkit/tests/indices/append.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import append from '../../src/indices/append';
describe('indices append operator', () => {
diff --git a/packages/textkit/tests/indices/normalize.test.js b/packages/textkit/tests/indices/normalize.test.js
index 56f256b20..b2508447a 100644
--- a/packages/textkit/tests/indices/normalize.test.js
+++ b/packages/textkit/tests/indices/normalize.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import normalizeArray from '../../src/indices/normalize';
describe('indices normalizeArray operator', () => {
diff --git a/packages/textkit/tests/indices/prepend.test.js b/packages/textkit/tests/indices/prepend.test.js
index 635c803b0..a13f4543f 100644
--- a/packages/textkit/tests/indices/prepend.test.js
+++ b/packages/textkit/tests/indices/prepend.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import prepend from '../../src/indices/prepend';
describe('indices prepend operator', () => {
diff --git a/packages/textkit/tests/indices/resolve.test.js b/packages/textkit/tests/indices/resolve.test.js
index 73f212949..5708e812c 100644
--- a/packages/textkit/tests/indices/resolve.test.js
+++ b/packages/textkit/tests/indices/resolve.test.js
@@ -1,11 +1,13 @@
+import { describe, expect, test } from 'vitest';
+
import resolve from '../../src/indices/resolve';
-const singleGlyph = { codePoints: ['codePoint'] };
+const singleGlyph = { codePoints: [0] };
-const ligatureGlyph = { codePoints: ['codePoint', 'otherCodePoint'] };
+const ligatureGlyph = { codePoints: [0, 1] };
const longerLigatureGlyph = {
- codePoints: ['codePoint', 'otherCodePoint', 'anotherCodePoint'],
+ codePoints: [0, 1, 2],
};
describe('indices resolve operator', () => {
diff --git a/packages/textkit/tests/internal/bidiEngine.js b/packages/textkit/tests/internal/bidiEngine.js
new file mode 100644
index 000000000..c299c314f
--- /dev/null
+++ b/packages/textkit/tests/internal/bidiEngine.js
@@ -0,0 +1,28 @@
+import { vi } from 'vitest';
+
+/**
+ * Test the bidi engine based on the string 'Lorem'
+ * Returns emp if no runs present, or arbitrary bidi levels otherwise
+ *
+ * * L o r e m
+ * |---- Level 1 ------|-- Level 2 -|
+ *
+ * @param {Object} attributed string
+ * @return {Object} attributed string
+ */
+
+export const bidiEngineImpl = vi.fn((string) => {
+ const runs =
+ string.runs.length === 0
+ ? []
+ : [
+ { start: 0, end: 3, attributes: { bidiLevel: 0 } },
+ { start: 3, end: 5, attributes: { bidiLevel: 1 } },
+ ];
+
+ return Object.assign({}, string, { runs });
+});
+
+const bidiEngine = vi.fn(() => bidiEngineImpl);
+
+export default bidiEngine;
diff --git a/packages/textkit/tests/internal/font.js b/packages/textkit/tests/internal/font.js
index 521eecc68..d72b67423 100644
--- a/packages/textkit/tests/internal/font.js
+++ b/packages/textkit/tests/internal/font.js
@@ -6,18 +6,18 @@ const longLigature = {
advanceWidth: 10,
};
-const glyphForCodePoint = v => {
+const glyphForCodePoint = (v) => {
if (v === 64257) return shortLigature;
if (v === 64259) return longLigature;
return { id: v, codePoints: [v], advanceWidth: 8 };
};
-const glyphFromChar = v => glyphForCodePoint(v.codePointAt(0));
+const glyphFromChar = (v) => glyphForCodePoint(v.codePointAt(0));
-const layoutGlyphs = v => {
+const layoutGlyphs = (v) => {
const splits = v.split(/(ffi|fi|.)/g);
- const result = splits.map(s => {
+ const result = splits.map((s) => {
if (s === 'fi') return [shortLigature];
if (s === 'ffi') return [longLigature];
@@ -27,8 +27,8 @@ const layoutGlyphs = v => {
return result.flat();
};
-const layoutPositions = positions => {
- return positions.map(pos => ({
+const layoutPositions = (positions) => {
+ return positions.map((pos) => ({
xAdvance: pos.advanceWidth || 0,
yAdvance: 0,
xOffset: 0,
@@ -36,7 +36,7 @@ const layoutPositions = positions => {
}));
};
-const layoutStringIndices = glyphs => {
+const layoutStringIndices = (glyphs) => {
let counter = 0;
const stringIndices = [];
@@ -49,7 +49,7 @@ const layoutStringIndices = glyphs => {
return stringIndices;
};
-const layout = string => {
+const layout = (string) => {
const glyphs = layoutGlyphs(string);
const positions = layoutPositions(glyphs);
const stringIndices = layoutStringIndices(glyphs);
diff --git a/packages/textkit/tests/internal/fontSubstitutionEngine.js b/packages/textkit/tests/internal/fontSubstitutionEngine.js
index ea24d88df..f84db0af9 100644
--- a/packages/textkit/tests/internal/fontSubstitutionEngine.js
+++ b/packages/textkit/tests/internal/fontSubstitutionEngine.js
@@ -1,3 +1,5 @@
+import { vi } from 'vitest';
+
/**
* Test font substitution based on the string 'Lorem'
* Returns empry if no runs present, or arbitrary font substitution otherwise
@@ -5,10 +7,10 @@
* L o r e m
* |- Courier -|-- Helvetica --|
*
- * @param {Object} attributed string
- * @return {Object} attributed string
+ * @param {Object} attributed string
+ * @returns {Object} attributed string
*/
-export const fontSubstitutionImpl = jest.fn(string => {
+export const fontSubstitutionImpl = vi.fn((string) => {
const runs =
string.runs.length === 0
? []
@@ -20,6 +22,6 @@ export const fontSubstitutionImpl = jest.fn(string => {
return Object.assign({}, string, { runs });
});
-const fontSubstitutionEngine = jest.fn(() => fontSubstitutionImpl);
+const fontSubstitutionEngine = vi.fn(() => fontSubstitutionImpl);
export default fontSubstitutionEngine;
diff --git a/packages/textkit/tests/internal/pluck.js b/packages/textkit/tests/internal/pluck.js
index c2e4ac77d..06144704f 100644
--- a/packages/textkit/tests/internal/pluck.js
+++ b/packages/textkit/tests/internal/pluck.js
@@ -1,3 +1,3 @@
-const pluck = (key, array) => array.map(v => v[key]);
+const pluck = (key, array) => array.map((v) => v[key]);
export default pluck;
diff --git a/packages/textkit/tests/internal/scriptItemizer.js b/packages/textkit/tests/internal/scriptItemizer.js
index ca633e85c..c4a4d63a0 100644
--- a/packages/textkit/tests/internal/scriptItemizer.js
+++ b/packages/textkit/tests/internal/scriptItemizer.js
@@ -1,3 +1,5 @@
+import { vi } from 'vitest';
+
/**
* Test script itemizer based on the string 'Lorem'
* Returns empty if no runs present, or arbitrary script itemization otherwise
@@ -5,10 +7,10 @@
* L o r e m
* |---- Latin ----|- Non-latin-|
*
- * @param {Object} attributed string
- * @return {Object} attributed string
+ * @param {Object} attributed string
+ * @returns {Object} attributed string
*/
-export const scriptItemizerImpl = jest.fn(string => {
+export const scriptItemizerImpl = vi.fn((string) => {
const runs =
string.runs.length === 0
? []
@@ -20,6 +22,6 @@ export const scriptItemizerImpl = jest.fn(string => {
return Object.assign({}, string, { runs });
});
-const scriptItemizer = jest.fn(() => scriptItemizerImpl);
+const scriptItemizer = vi.fn(() => scriptItemizerImpl);
export default scriptItemizer;
diff --git a/packages/textkit/tests/layout/applyDefaultStyles.test.js b/packages/textkit/tests/layout/applyDefaultStyles.test.js
index 3f565c89f..00823c7a6 100644
--- a/packages/textkit/tests/layout/applyDefaultStyles.test.js
+++ b/packages/textkit/tests/layout/applyDefaultStyles.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import applyDefaultStyles from '../../src/layout/applyDefaultStyles';
const applyDefaultStylesInstance = applyDefaultStyles();
@@ -105,7 +107,7 @@ describe('applyDefaultStyles', () => {
});
// Default overrides
- Object.keys(DEFAULTS).forEach(key => {
+ Object.keys(DEFAULTS).forEach((key) => {
test(
`should apply default ${key} to passed run`,
shouldDefault(key, DEFAULTS[key]),
@@ -113,7 +115,7 @@ describe('applyDefaultStyles', () => {
});
// Overrides
- Object.keys(OVERRIDES).forEach(key => {
+ Object.keys(OVERRIDES).forEach((key) => {
test(
`should apply ${key} to passed run`,
shouldOverride(key, DEFAULTS[key]),
diff --git a/packages/textkit/tests/layout/bidiMirroring.test.js b/packages/textkit/tests/layout/bidiMirroring.test.js
new file mode 100644
index 000000000..064b7e3eb
--- /dev/null
+++ b/packages/textkit/tests/layout/bidiMirroring.test.js
@@ -0,0 +1,84 @@
+import { describe, test, expect } from 'vitest';
+
+import bidiMirroring from '../../src/layout/bidiMirroring';
+
+const bidiMirrorInstance = bidiMirroring();
+
+const swapElements = (arr, firstIndex, lastIndex) => {
+ const tmp = arr;
+ [tmp[firstIndex], tmp[lastIndex]] = [tmp[lastIndex], tmp[firstIndex]];
+ return tmp;
+};
+
+const initializeToIndex = (size) => {
+ const arr = new Array(size);
+ for (let i = 0; i < size; i += 1) {
+ arr[i] = i;
+ }
+ return arr;
+};
+
+describe('bidiMirroring', () => {
+ test('should mirror characters correctly', () => {
+ const word = '(Lorem)';
+ const attributedString = {
+ string: word,
+ runs: [
+ {
+ attributes: {
+ direction: 'rtl',
+ bidiLevel: 1,
+ },
+ start: 0,
+ end: 7,
+ glyphs: initializeToIndex(word.length),
+ positions: initializeToIndex(word.length),
+ glyphIndices: initializeToIndex(word.length),
+ },
+ ],
+ };
+ const result = bidiMirrorInstance(attributedString);
+
+ expect(result.string).toBe(')Lorem(');
+ const expectedGlyphs = swapElements(
+ attributedString.runs[0].glyphs,
+ 0,
+ attributedString.runs[0].glyphs.length - 1,
+ );
+ const expectedPositions = swapElements(
+ attributedString.runs[0].positions,
+ 0,
+ attributedString.runs[0].positions.length - 1,
+ );
+
+ expect(result.runs[0].glyphs).toEqual(expectedGlyphs);
+ expect(result.runs[0].positions).toEqual(expectedPositions);
+ });
+
+ test('should not mirror any characters', () => {
+ const word = '(Lorem)';
+ const attributedString = {
+ string: word,
+ runs: [
+ {
+ attributes: {
+ direction: 'rtl',
+ bidiLevel: 0,
+ },
+ start: 0,
+ end: 7,
+ glyphs: initializeToIndex(word.length),
+ positions: initializeToIndex(word.length),
+ glyphIndices: initializeToIndex(word.length),
+ },
+ ],
+ };
+ const result = bidiMirrorInstance(attributedString);
+
+ expect(result.string).toBe(word);
+ expect(result.runs[0].glyphs).toEqual(attributedString.runs[0].glyphs);
+ expect(result.runs[0].positions).toEqual(
+ attributedString.runs[0].positions,
+ );
+ });
+});
diff --git a/packages/textkit/tests/layout/bidiReordering.test.js b/packages/textkit/tests/layout/bidiReordering.test.js
new file mode 100644
index 000000000..f4463f435
--- /dev/null
+++ b/packages/textkit/tests/layout/bidiReordering.test.js
@@ -0,0 +1,139 @@
+import { describe, test, expect } from 'vitest';
+
+import bidiReordering from '../../src/layout/bidiReordering';
+
+const bidiReorderingInstance = bidiReordering();
+
+const initializeToIndex = (size) => {
+ const arr = new Array(size);
+ for (let i = 0; i < size; i += 1) {
+ arr[i] = i;
+ }
+ return arr;
+};
+
+describe('bidiReordering', () => {
+ test('should return reversed string', () => {
+ const word = 'Lorem';
+ const wordReversed = word.split('').reverse().join('');
+ const string = {
+ string: word,
+ runs: [
+ {
+ attributes: {
+ direction: 'rtl',
+ bidiLevel: 1,
+ },
+ start: 0,
+ end: 5,
+ glyphs: initializeToIndex(5),
+ positions: initializeToIndex(5),
+ glyphIndices: initializeToIndex(5),
+ },
+ ],
+ };
+ const result = bidiReorderingInstance([[string]]);
+ expect(result[0][0].string).toBe(wordReversed);
+ expect(result[0][0].runs[0].glyphs).toEqual(
+ string.runs[0].glyphs.reverse(),
+ );
+ expect(result[0][0].runs[0].positions).toEqual(
+ string.runs[0].positions.reverse(),
+ );
+ });
+
+ test('should return normal string for direction ltr', () => {
+ const word = 'Lorem';
+ const string = {
+ string: word,
+ runs: [
+ {
+ attributes: {
+ direction: 'ltr',
+ bidiLevel: 0,
+ },
+ start: 0,
+ end: 5,
+ glyphs: initializeToIndex(word.length),
+ positions: initializeToIndex(word.length),
+ glyphIndices: initializeToIndex(word.length),
+ },
+ ],
+ };
+ const result = bidiReorderingInstance([[string]]);
+ expect(result[0][0].string).toBe(word);
+ expect(result[0][0].runs[0].glyphs).toEqual(string.runs[0].glyphs);
+ expect(result[0][0].runs[0].positions).toEqual(string.runs[0].positions);
+ });
+
+ test('should return part of the string reversed', () => {
+ const string = {
+ string: 'Lorem ipsum',
+ runs: [
+ {
+ attributes: {
+ direction: 'ltr',
+ bidiLevel: 0,
+ },
+ start: 0,
+ end: 6,
+ glyphs: initializeToIndex(6),
+ positions: initializeToIndex(6),
+ glyphIndices: initializeToIndex(6),
+ },
+ {
+ attributes: {
+ direction: 'rtl',
+ bidiLevel: 1,
+ },
+ start: 6,
+ end: 11,
+ glyphs: initializeToIndex(5),
+ positions: initializeToIndex(5),
+ glyphIndices: initializeToIndex(5),
+ },
+ ],
+ };
+ const result = bidiReorderingInstance([[string]]);
+
+ expect(result[0][0].string).toBe('Lorem muspi');
+ expect(result[0][0].runs[0].glyphs).toEqual(string.runs[0].glyphs);
+ expect(result[0][0].runs[0].positions).toEqual(string.runs[0].positions);
+
+ expect(result[0][0].runs[1].glyphs).toEqual(
+ string.runs[1].glyphs.reverse(),
+ );
+ expect(result[0][0].runs[1].positions).toEqual(
+ string.runs[1].positions.reverse(),
+ );
+ });
+
+ test('should return string reversed not repeating ligatures characters', () => {
+ const string = {
+ string: 'Lore',
+ runs: [
+ {
+ attributes: {
+ direction: 'rtl',
+ bidiLevel: 1,
+ },
+ start: 0,
+ end: 4,
+ glyphs: [
+ { id: 0, isLigature: true },
+ { id: 0, isLigature: true },
+ { id: 0, isLigature: true },
+ { id: 0, isLigature: true },
+ ],
+ positions: [0, 0, 0, 0],
+ glyphIndices: initializeToIndex(4),
+ },
+ ],
+ };
+
+ const result = bidiReorderingInstance([[string]]);
+
+ expect(result[0][0].string).toBe('eroL');
+ expect(result[0][0].runs[0].positions).toEqual([0]);
+ });
+});
diff --git a/packages/textkit/tests/layout/generateGlyphs.test.js b/packages/textkit/tests/layout/generateGlyphs.test.js
index a31c35800..2ec2e56d9 100644
--- a/packages/textkit/tests/layout/generateGlyphs.test.js
+++ b/packages/textkit/tests/layout/generateGlyphs.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import font from '../internal/font';
import pluck from '../internal/pluck';
import generateGlyphs from '../../src/layout/generateGlyphs';
@@ -41,18 +43,10 @@ describe('generateGlyphs', () => {
expect(result.runs[0]).toHaveProperty('end', 5);
expect(result.runs[0].glyphIndices).toEqual([0, 1, 2, 3, 4]);
expect(pluck('id', result.runs[0].glyphs)).toEqual([
- 76,
- 111,
- 114,
- 101,
- 109,
+ 76, 111, 114, 101, 109,
]);
expect(pluck('xAdvance', result.runs[0].positions)).toEqual([
- 8,
- 8,
- 8,
- 8,
- 8,
+ 8, 8, 8, 8, 8,
]);
});
@@ -125,22 +119,10 @@ describe('generateGlyphs', () => {
expect(result.runs[0]).toHaveProperty('end', 10);
expect(result.runs[0].glyphIndices).toEqual([0, 1, 2, 2, 3, 4, 4, 4, 5, 6]);
expect(pluck('id', result.runs[0].glyphs)).toEqual([
- 76,
- 111,
- 64257,
- 109,
- 64259,
- 100,
- 111,
+ 76, 111, 64257, 109, 64259, 100, 111,
]);
expect(pluck('xAdvance', result.runs[0].positions)).toEqual([
- 8,
- 8,
- 10,
- 8,
- 10,
- 8,
- 8,
+ 8, 8, 10, 8, 10, 8, 8,
]);
});
diff --git a/packages/textkit/tests/layout/layoutParagraph.test.js b/packages/textkit/tests/layout/layoutParagraph.test.js
index 67cd5af0a..a37e45ffe 100644
--- a/packages/textkit/tests/layout/layoutParagraph.test.js
+++ b/packages/textkit/tests/layout/layoutParagraph.test.js
@@ -1,9 +1,11 @@
+import { describe, test } from 'vitest';
+
import layoutParagraph from '../../src/layout/layoutParagraph';
describe('layoutParagraph', () => {
test('should keep overflowing text in the last rect', () => {
// eslint-disable-next-line no-unused-vars
- const linebreaker = _options => (attributedString, _availableWidths) => {
+ const linebreaker = (_options) => (attributedString, _availableWidths) => {
return [attributedString];
};
const layouter = layoutParagraph({ linebreaker });
diff --git a/packages/textkit/tests/layout/preprocessRuns.test.js b/packages/textkit/tests/layout/preprocessRuns.test.js
index 184157528..ca5ba2fd2 100644
--- a/packages/textkit/tests/layout/preprocessRuns.test.js
+++ b/packages/textkit/tests/layout/preprocessRuns.test.js
@@ -1,16 +1,19 @@
+import { beforeEach, describe, expect, test } from 'vitest';
import empty from '../../src/attributedString/empty';
import preprocessRuns from '../../src/layout/preprocessRuns';
import scriptItemizer, { scriptItemizerImpl } from '../internal/scriptItemizer';
+import bidi, { bidiEngineImpl } from '../internal/bidiEngine';
import fontSubstitution, {
fontSubstitutionImpl,
} from '../internal/fontSubstitutionEngine';
-const preprocessor = preprocessRuns({ scriptItemizer, fontSubstitution });
+const preprocessor = preprocessRuns({ bidi, scriptItemizer, fontSubstitution });
describe('preprocessRuns', () => {
beforeEach(() => {
scriptItemizerImpl.mockClear();
fontSubstitutionImpl.mockClear();
+ bidiEngineImpl.mockClear();
});
test('should call both engines with attributed string', () => {
@@ -22,6 +25,8 @@ describe('preprocessRuns', () => {
expect(scriptItemizerImpl.mock.calls[0][0]).toBe(param);
expect(fontSubstitutionImpl.mock.calls).toHaveLength(1);
expect(fontSubstitutionImpl.mock.calls[0][0]).toBe(param);
+ expect(bidiEngineImpl.mock.calls).toHaveLength(1);
+ expect(bidiEngineImpl.mock.calls[0][0]).toBe(param);
});
test('should return empty value for null param', () => {
@@ -52,17 +57,20 @@ describe('preprocessRuns', () => {
expect(string.runs[0].attributes).toHaveProperty('color', 'red');
expect(string.runs[0].attributes).toHaveProperty('script', 'Latin');
expect(string.runs[0].attributes).toHaveProperty('font', 'Courier');
+ expect(string.runs[0].attributes).toHaveProperty('bidiLevel', 0);
expect(string.runs[1]).toHaveProperty('start', 2);
expect(string.runs[1]).toHaveProperty('end', 3);
expect(string.runs[1].attributes).toHaveProperty('color', 'red');
expect(string.runs[1].attributes).toHaveProperty('script', 'Latin');
expect(string.runs[1].attributes).toHaveProperty('font', 'Helvetica');
+ expect(string.runs[1].attributes).toHaveProperty('bidiLevel', 0);
expect(string.runs[2]).toHaveProperty('start', 3);
expect(string.runs[2]).toHaveProperty('end', 5);
expect(string.runs[2].attributes).toHaveProperty('color', 'red');
expect(string.runs[2].attributes).toHaveProperty('script', 'Non-latin');
expect(string.runs[2].attributes).toHaveProperty('font', 'Helvetica');
+ expect(string.runs[2].attributes).toHaveProperty('bidiLevel', 1);
});
});
diff --git a/packages/textkit/tests/layout/resolveAttachments.test.js b/packages/textkit/tests/layout/resolveAttachments.test.js
index b6843c098..bf14515b8 100644
--- a/packages/textkit/tests/layout/resolveAttachments.test.js
+++ b/packages/textkit/tests/layout/resolveAttachments.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import pluck from '../internal/pluck';
import resolveAttachments from '../../src/layout/resolveAttachments';
@@ -57,7 +59,7 @@ describe('resolveAttachments', () => {
{ xAdvance: 4 }, // m
],
glyphIndices: [0, 1, 2, 3, 4],
- attributes: { something: 'blah' },
+ attributes: { font: {} },
},
],
};
@@ -161,18 +163,10 @@ describe('resolveAttachments', () => {
expect(string.runs[0].glyphIndices).toEqual([0, 1, 2, 3, 4]);
expect(pluck('id', string.runs[0].glyphs)).toEqual([
- 76,
- 111,
- 65532,
- 101,
- 109,
+ 76, 111, 65532, 101, 109,
]);
expect(pluck('xAdvance', string.runs[0].positions)).toEqual([
- 8,
- 7,
- 6,
- 5,
- 4,
+ 8, 7, 6, 5, 4,
]);
});
@@ -206,18 +200,10 @@ describe('resolveAttachments', () => {
expect(result.runs[0].glyphIndices).toEqual([0, 1, 2, 3, 4]);
expect(pluck('id', result.runs[0].glyphs)).toEqual([
- 76,
- 111,
- 65532,
- 101,
- 109,
+ 76, 111, 65532, 101, 109,
]);
expect(pluck('xAdvance', result.runs[0].positions)).toEqual([
- 8,
- 7,
- 20,
- 5,
- 4,
+ 8, 7, 20, 5, 4,
]);
});
@@ -249,10 +235,7 @@ describe('resolveAttachments', () => {
expect(result.runs[0].glyphIndices).toEqual([0, 0, 1, 2, 3]);
expect(pluck('id', result.runs[0].glyphs)).toEqual([
- 64257,
- 65532,
- 101,
- 109,
+ 64257, 65532, 101, 109,
]);
expect(pluck('xAdvance', result.runs[0].positions)).toEqual([10, 20, 5, 4]);
});
diff --git a/packages/textkit/tests/layout/resolveYOffset.test.js b/packages/textkit/tests/layout/resolveYOffset.test.js
index d192313e6..7a144ff9c 100644
--- a/packages/textkit/tests/layout/resolveYOffset.test.js
+++ b/packages/textkit/tests/layout/resolveYOffset.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import font from '../internal/font';
import pluck from '../internal/pluck';
import resolveYOffset from '../../src/layout/resolveYOffset';
@@ -58,7 +60,7 @@ describe('resolveYOffset', () => {
{ xAdvance: 4, yOffset: 0 }, // m
],
glyphIndices: [0, 1, 2, 3, 4],
- attributes: { something: 'blah' },
+ attributes: { font: {} },
},
],
};
@@ -156,18 +158,10 @@ describe('resolveYOffset', () => {
expect(string.runs[0].glyphIndices).toEqual([0, 1, 2, 3, 4]);
expect(pluck('id', string.runs[0].glyphs)).toEqual([
- 76,
- 111,
- 114,
- 101,
- 109,
+ 76, 111, 114, 101, 109,
]);
expect(pluck('xAdvance', string.runs[0].positions)).toEqual([
- 8,
- 7,
- 6,
- 5,
- 4,
+ 8, 7, 6, 5, 4,
]);
});
@@ -201,25 +195,13 @@ describe('resolveYOffset', () => {
expect(result.runs[0].glyphIndices).toEqual([0, 1, 2, 3, 4]);
expect(pluck('id', result.runs[0].glyphs)).toEqual([
- 76,
- 111,
- 114,
- 101,
- 109,
+ 76, 111, 114, 101, 109,
]);
expect(pluck('xAdvance', result.runs[0].positions)).toEqual([
- 8,
- 7,
- 6,
- 5,
- 4,
+ 8, 7, 6, 5, 4,
]);
expect(pluck('yOffset', result.runs[0].positions)).toEqual([
- 40,
- 40,
- 40,
- 40,
- 40,
+ 40, 40, 40, 40, 40,
]); // yOffset * font.unitsPerEm
});
});
diff --git a/packages/textkit/tests/layout/splitParagraphs.test.js b/packages/textkit/tests/layout/splitParagraphs.test.js
index deaeb915d..445bdf9df 100644
--- a/packages/textkit/tests/layout/splitParagraphs.test.js
+++ b/packages/textkit/tests/layout/splitParagraphs.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import splitParagraphs from '../../src/layout/splitParagraphs';
import fromFragments from '../../src/attributedString/fromFragments';
diff --git a/packages/textkit/tests/layout/verticalAlign.test.js b/packages/textkit/tests/layout/verticalAlign.test.js
index 22e3090a9..41449d316 100644
--- a/packages/textkit/tests/layout/verticalAlign.test.js
+++ b/packages/textkit/tests/layout/verticalAlign.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import verticalAlignment from '../../src/layout/verticalAlign';
describe('verticalAlign', () => {
diff --git a/packages/textkit/tests/layout/wrapWords.test.js b/packages/textkit/tests/layout/wrapWords.test.js
index e905aaa1d..c020783df 100644
--- a/packages/textkit/tests/layout/wrapWords.test.js
+++ b/packages/textkit/tests/layout/wrapWords.test.js
@@ -1,12 +1,13 @@
+import { beforeEach, describe, expect, test, vi } from 'vitest';
import wrapWords from '../../src/layout/wrapWords';
const emptyInstance = wrapWords({}, {});
-const wordHyphenationEngine = jest.fn(x => [x]);
+const wordHyphenationEngine = vi.fn((x) => [x]);
const defaultInstance = wrapWords(
{ wordHyphenation: () => wordHyphenationEngine },
{},
);
-const mutateWordHyphenationEngine = jest.fn(x => (x === ' ' ? [x] : [`${x}o`]));
+const mutateWordHyphenationEngine = vi.fn((x) => (x === ' ' ? [x] : [`${x}o`]));
const mutateInstance = wrapWords(
{ wordHyphenation: () => mutateWordHyphenationEngine },
{},
diff --git a/packages/textkit/tests/rect/area.test.js b/packages/textkit/tests/rect/area.test.js
index 89727a351..fa25b90fe 100644
--- a/packages/textkit/tests/rect/area.test.js
+++ b/packages/textkit/tests/rect/area.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import empty from '../../src/rect/empty';
import area from '../../src/rect/area';
diff --git a/packages/textkit/tests/rect/bottomLeft.test.js b/packages/textkit/tests/rect/bottomLeft.test.js
index d5f2e90fc..f99f60fd2 100644
--- a/packages/textkit/tests/rect/bottomLeft.test.js
+++ b/packages/textkit/tests/rect/bottomLeft.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import empty from '../../src/rect/empty';
import bottomLeft from '../../src/rect/bottomLeft';
diff --git a/packages/textkit/tests/rect/bottomRight.test.js b/packages/textkit/tests/rect/bottomRight.test.js
index 03bba9f19..cb487b353 100644
--- a/packages/textkit/tests/rect/bottomRight.test.js
+++ b/packages/textkit/tests/rect/bottomRight.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import empty from '../../src/rect/empty';
import bottomRight from '../../src/rect/bottomRight';
diff --git a/packages/textkit/tests/rect/copy.test.js b/packages/textkit/tests/rect/copy.test.js
index 5ab168149..380a49f13 100644
--- a/packages/textkit/tests/rect/copy.test.js
+++ b/packages/textkit/tests/rect/copy.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import copy from '../../src/rect/copy';
describe('rect copy operator', () => {
diff --git a/packages/textkit/tests/rect/empty.test.js b/packages/textkit/tests/rect/empty.test.js
index ffa275468..325bb7323 100644
--- a/packages/textkit/tests/rect/empty.test.js
+++ b/packages/textkit/tests/rect/empty.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import empty from '../../src/rect/empty';
describe('rect empty operator', () => {
diff --git a/packages/textkit/tests/rect/equals.test.js b/packages/textkit/tests/rect/equals.test.js
index f5ae8ebd6..a8c5455a1 100644
--- a/packages/textkit/tests/rect/equals.test.js
+++ b/packages/textkit/tests/rect/equals.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import equals from '../../src/rect/equals';
describe('rect equals operator', () => {
diff --git a/packages/textkit/tests/rect/intersects.test.js b/packages/textkit/tests/rect/intersects.test.js
index 9210ca004..f55bef4b4 100644
--- a/packages/textkit/tests/rect/intersects.test.js
+++ b/packages/textkit/tests/rect/intersects.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import intersects from '../../src/rect/intersects';
describe('rect intersects operator', () => {
diff --git a/packages/textkit/tests/rect/maxX.test.js b/packages/textkit/tests/rect/maxX.test.js
index 275e19218..80da22948 100644
--- a/packages/textkit/tests/rect/maxX.test.js
+++ b/packages/textkit/tests/rect/maxX.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import empty from '../../src/rect/empty';
import maxX from '../../src/rect/maxX';
diff --git a/packages/textkit/tests/rect/maxY.test.js b/packages/textkit/tests/rect/maxY.test.js
index a90257db7..2c1c82aa3 100644
--- a/packages/textkit/tests/rect/maxY.test.js
+++ b/packages/textkit/tests/rect/maxY.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import empty from '../../src/rect/empty';
import maxY from '../../src/rect/maxY';
diff --git a/packages/textkit/tests/rect/partition.test.js b/packages/textkit/tests/rect/partition.test.js
index f4963bcfd..08676edf0 100644
--- a/packages/textkit/tests/rect/partition.test.js
+++ b/packages/textkit/tests/rect/partition.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import partition from '../../src/rect/partition';
describe('rect partition operator', () => {
diff --git a/packages/textkit/tests/run/add.test.js b/packages/textkit/tests/run/add.test.js
index 364612773..7f7c8b338 100644
--- a/packages/textkit/tests/run/add.test.js
+++ b/packages/textkit/tests/run/add.test.js
@@ -1,8 +1,10 @@
+import { describe, expect, test } from 'vitest';
+
import add from '../../src/run/add';
describe('run add operator', () => {
test('should return equal run if 0', () => {
- const attributes = { something: 'blah' };
+ const attributes = { font: {} };
const run = { start: 5, end: 15, attributes };
const added = add(0, run);
@@ -13,7 +15,7 @@ describe('run add operator', () => {
});
test('should return added run', () => {
- const attributes = { something: 'blah' };
+ const attributes = { font: {} };
const run = { start: 5, end: 15, attributes };
const added = add(5, run);
diff --git a/packages/textkit/tests/run/advanceWidth.test.js b/packages/textkit/tests/run/advanceWidth.test.js
index 3356fbcea..2bbe07d50 100644
--- a/packages/textkit/tests/run/advanceWidth.test.js
+++ b/packages/textkit/tests/run/advanceWidth.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import advanceWidth from '../../src/run/advanceWidth';
describe('run advanceWidth operator', () => {
@@ -29,6 +31,7 @@ describe('run advanceWidth operator', () => {
];
const run = { start: 5, end: 15, attributes: {}, positions };
+ // @ts-expect-error - intentionally invalid argument
expect(advanceWidth(run)).toBe(30);
});
});
diff --git a/packages/textkit/tests/run/advanceWidthBetween.test.js b/packages/textkit/tests/run/advanceWidthBetween.test.js
index e98d7fe04..cfd9e7206 100644
--- a/packages/textkit/tests/run/advanceWidthBetween.test.js
+++ b/packages/textkit/tests/run/advanceWidthBetween.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import advanceWidthBetween from '../../src/run/advanceWidthBetween';
describe('run advanceWidthBetween operator', () => {
diff --git a/packages/textkit/tests/run/append.test.js b/packages/textkit/tests/run/append.test.js
index 6582aedd3..1a4ef4bec 100644
--- a/packages/textkit/tests/run/append.test.js
+++ b/packages/textkit/tests/run/append.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import font from '../internal/font';
import pluck from '../internal/pluck';
import append from '../../src/run/append';
diff --git a/packages/textkit/tests/run/ascent.test.js b/packages/textkit/tests/run/ascent.test.js
index 5a5b5a940..953bc334d 100644
--- a/packages/textkit/tests/run/ascent.test.js
+++ b/packages/textkit/tests/run/ascent.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import ascent from '../../src/run/ascent';
describe('run ascent operator', () => {
diff --git a/packages/textkit/tests/run/concat.test.js b/packages/textkit/tests/run/concat.test.js
index 233687a58..466b1c723 100644
--- a/packages/textkit/tests/run/concat.test.js
+++ b/packages/textkit/tests/run/concat.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import pluck from '../internal/pluck';
import concat from '../../src/run/concat';
@@ -16,19 +18,19 @@ describe('run concat operator', () => {
const runA = {
start: 0,
end: 3,
- attributes: { hey: 'ho' },
+ attributes: { font: {} },
};
const runB = {
start: 3,
end: 5,
- attributes: { lets: 'go' },
+ attributes: { fontSize: 16 },
};
const result = concat(runA, runB);
expect(result).toHaveProperty('start', 0);
expect(result).toHaveProperty('end', 5);
- expect(result).toHaveProperty('attributes', { hey: 'ho', lets: 'go' });
+ expect(result).toHaveProperty('attributes', { font: {}, fontSize: 16 });
});
test('should concat runs glyphs', () => {
diff --git a/packages/textkit/tests/run/descent.test.js b/packages/textkit/tests/run/descent.test.js
index b06919a60..3a555183c 100644
--- a/packages/textkit/tests/run/descent.test.js
+++ b/packages/textkit/tests/run/descent.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import descent from '../../src/run/descent';
describe('run descent operator', () => {
diff --git a/packages/textkit/tests/run/dropLast.test.js b/packages/textkit/tests/run/dropLast.test.js
index 519263d12..064f7ebad 100644
--- a/packages/textkit/tests/run/dropLast.test.js
+++ b/packages/textkit/tests/run/dropLast.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import pluck from '../internal/pluck';
import dropLast from '../../src/run/dropLast';
diff --git a/packages/textkit/tests/run/empty.test.js b/packages/textkit/tests/run/empty.test.js
index 24c9c6325..ff21ed472 100644
--- a/packages/textkit/tests/run/empty.test.js
+++ b/packages/textkit/tests/run/empty.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import empty from '../../src/run/empty';
describe('run empty operator', () => {
diff --git a/packages/textkit/tests/run/filter.test.js b/packages/textkit/tests/run/filter.test.js
index d841c2fe2..9c7a80516 100644
--- a/packages/textkit/tests/run/filter.test.js
+++ b/packages/textkit/tests/run/filter.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import filter from '../../src/run/filter';
describe('run filter operator', () => {
@@ -8,7 +10,7 @@ describe('run filter operator', () => {
});
test('should filter only one run', () => {
- const attributes = { something: 'blah' };
+ const attributes = { font: {} };
const runs = [{ start: 0, end: 15, attributes }];
const filtered = filter(2, 15, runs);
diff --git a/packages/textkit/tests/run/flatten.test.js b/packages/textkit/tests/run/flatten.test.js
index c350b098c..75846459d 100644
--- a/packages/textkit/tests/run/flatten.test.js
+++ b/packages/textkit/tests/run/flatten.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import flatten from '../../src/run/flatten';
describe('run flatten operator', () => {
diff --git a/packages/textkit/tests/run/getFont.test.js b/packages/textkit/tests/run/getFont.test.js
index 31e867f84..daef3bc26 100644
--- a/packages/textkit/tests/run/getFont.test.js
+++ b/packages/textkit/tests/run/getFont.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import font from '../internal/font';
import getFont from '../../src/run/getFont';
diff --git a/packages/textkit/tests/run/glyphIndexAt.test.js b/packages/textkit/tests/run/glyphIndexAt.test.js
index 2b02b6b06..eec44ac4e 100644
--- a/packages/textkit/tests/run/glyphIndexAt.test.js
+++ b/packages/textkit/tests/run/glyphIndexAt.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import glyphIndexAt from '../../src/run/glyphIndexAt';
describe('run glyphIndexAt operator', () => {
diff --git a/packages/textkit/tests/run/height.test.js b/packages/textkit/tests/run/height.test.js
index 373b9f3ec..6bd8a93be 100644
--- a/packages/textkit/tests/run/height.test.js
+++ b/packages/textkit/tests/run/height.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import height from '../../src/run/height';
describe('run height operator', () => {
diff --git a/packages/textkit/tests/run/indexAtOffset.test.js b/packages/textkit/tests/run/indexAtOffset.test.js
index dd6edb07b..0cbc23c93 100644
--- a/packages/textkit/tests/run/indexAtOffset.test.js
+++ b/packages/textkit/tests/run/indexAtOffset.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import indexAtOffset from '../../src/run/indexAtOffset';
describe('run indexAtOffset operator', () => {
@@ -26,7 +28,7 @@ describe('run indexAtOffset operator', () => {
],
};
- expect(indexAtOffset(run, 5)).toBe(0);
+ expect(indexAtOffset(5, run)).toBe(0);
});
test('should return 0 if glyphs empty', () => {
@@ -43,7 +45,7 @@ describe('run indexAtOffset operator', () => {
],
};
- expect(indexAtOffset(run, 5)).toBe(0);
+ expect(indexAtOffset(5, run)).toBe(0);
});
test('should return correct index', () => {
diff --git a/packages/textkit/tests/run/insert.test.js b/packages/textkit/tests/run/insert.test.js
index 3f437e624..d555d1d27 100644
--- a/packages/textkit/tests/run/insert.test.js
+++ b/packages/textkit/tests/run/insert.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import font from '../internal/font';
import pluck from '../internal/pluck';
import insert from '../../src/run/insert';
diff --git a/packages/textkit/tests/run/isEmpty.test.js b/packages/textkit/tests/run/isEmpty.test.js
index f4402b2d8..d1875df4f 100644
--- a/packages/textkit/tests/run/isEmpty.test.js
+++ b/packages/textkit/tests/run/isEmpty.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import isEmpty from '../../src/run/isEmpty';
describe('run isEmpty operator', () => {
diff --git a/packages/textkit/tests/run/leadingOffset.test.js b/packages/textkit/tests/run/leadingOffset.test.js
index ce5fa5940..e7ec29ef5 100644
--- a/packages/textkit/tests/run/leadingOffset.test.js
+++ b/packages/textkit/tests/run/leadingOffset.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import empty from '../../src/run/empty';
import leadingOffset from '../../src/run/leadingOffset';
diff --git a/packages/textkit/tests/run/length.test.js b/packages/textkit/tests/run/length.test.js
index 451489e68..a158bd179 100644
--- a/packages/textkit/tests/run/length.test.js
+++ b/packages/textkit/tests/run/length.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import length from '../../src/run/length';
describe('run length operator', () => {
diff --git a/packages/textkit/tests/run/lineGap.test.js b/packages/textkit/tests/run/lineGap.test.js
index 2c2b2412f..37579035c 100644
--- a/packages/textkit/tests/run/lineGap.test.js
+++ b/packages/textkit/tests/run/lineGap.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import lineGap from '../../src/run/lineGap';
describe('run lineGap operator', () => {
diff --git a/packages/textkit/tests/run/offset.test.js b/packages/textkit/tests/run/offset.test.js
index d90239a04..450397517 100644
--- a/packages/textkit/tests/run/offset.test.js
+++ b/packages/textkit/tests/run/offset.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import offset from '../../src/run/offset';
describe('run offset operator', () => {
diff --git a/packages/textkit/tests/run/omit.test.js b/packages/textkit/tests/run/omit.test.js
index 7adbe6e40..215b47579 100644
--- a/packages/textkit/tests/run/omit.test.js
+++ b/packages/textkit/tests/run/omit.test.js
@@ -1,35 +1,37 @@
+import { describe, expect, test } from 'vitest';
+
import omit from '../../src/run/omit';
describe('run omit operator', () => {
test('should omit passed attribute', () => {
- const run = { start: 5, end: 15, attributes: { something: 'blah' } };
- const ommited = omit('something', run);
+ const run = { start: 5, end: 15, attributes: { font: {} } };
+ const ommited = omit('font', run);
expect(ommited).toHaveProperty('start', 5);
expect(ommited).toHaveProperty('end', 15);
- expect(ommited.attributes.something).toBeFalsy();
+ expect(ommited.attributes).not.toHaveProperty('font');
});
test('should not omit other attribute', () => {
- const run = { start: 5, end: 15, attributes: { something: 'blah' } };
- const ommited = omit('somethingElse', run);
+ const run = { start: 5, end: 15, attributes: { font: {} } };
+ const ommited = omit('fontSize', run);
expect(ommited).toHaveProperty('start', 5);
expect(ommited).toHaveProperty('end', 15);
- expect(ommited.attributes).toHaveProperty('something', 'blah');
+ expect(ommited.attributes).toHaveProperty('font', {});
});
test('should preserve other attributes', () => {
const run = {
start: 5,
end: 15,
- attributes: { something: 'blah', somethingElse: 'bloh' },
+ attributes: { font: {}, fontSize: 16 },
};
- const ommited = omit('something', run);
+ const ommited = omit('font', run);
expect(ommited).toHaveProperty('start', 5);
expect(ommited).toHaveProperty('end', 15);
- expect(ommited.attributes.something).toBeFalsy();
- expect(ommited.attributes).toHaveProperty('somethingElse', 'bloh');
+ expect(ommited.attributes).not.toHaveProperty('font');
+ expect(ommited.attributes).toHaveProperty('fontSize', 16);
});
});
diff --git a/packages/textkit/tests/run/prepend.test.js b/packages/textkit/tests/run/prepend.test.js
index 0f674745b..fe4866689 100644
--- a/packages/textkit/tests/run/prepend.test.js
+++ b/packages/textkit/tests/run/prepend.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import font from '../internal/font';
import pluck from '../internal/pluck';
import prepend from '../../src/run/prepend';
diff --git a/packages/textkit/tests/run/runIndexAt.test.js b/packages/textkit/tests/run/runIndexAt.test.js
index 143e80706..3745dced7 100644
--- a/packages/textkit/tests/run/runIndexAt.test.js
+++ b/packages/textkit/tests/run/runIndexAt.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import runIndexAt from '../../src/run/runIndexAt';
const runs = [
diff --git a/packages/textkit/tests/run/scale.test.js b/packages/textkit/tests/run/scale.test.js
index 13738aeea..9b39cf7a8 100644
--- a/packages/textkit/tests/run/scale.test.js
+++ b/packages/textkit/tests/run/scale.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import scale from '../../src/run/scale';
describe('run scale operator', () => {
diff --git a/packages/textkit/tests/run/slice.test.js b/packages/textkit/tests/run/slice.test.js
index cc4e6c2d7..f51bea3e6 100644
--- a/packages/textkit/tests/run/slice.test.js
+++ b/packages/textkit/tests/run/slice.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import font from '../internal/font';
import pluck from '../internal/pluck';
import slice from '../../src/run/slice';
@@ -5,7 +7,7 @@ import slice from '../../src/run/slice';
describe('run slice operator', () => {
describe('slice start and end', () => {
test('should slice containing range', () => {
- const attributes = { something: 'blah' };
+ const attributes = { font: {} };
const run = { start: 0, end: 10, attributes };
const sliced = slice(2, 5, run);
@@ -15,7 +17,7 @@ describe('run slice operator', () => {
});
test('should slice exact range', () => {
- const attributes = { something: 'blah' };
+ const attributes = { font: {} };
const run = { start: 0, end: 10, attributes };
const sliced = slice(0, 10, run);
@@ -25,7 +27,7 @@ describe('run slice operator', () => {
});
test('should slice exceeding range', () => {
- const attributes = { something: 'blah' };
+ const attributes = { font: {} };
const run = { start: 0, end: 10, attributes };
const sliced = slice(2, 20, run);
@@ -35,7 +37,7 @@ describe('run slice operator', () => {
});
test('should slice containing range when start not zero', () => {
- const attributes = { something: 'blah' };
+ const attributes = { font: {} };
const run = { start: 5, end: 15, attributes };
const sliced = slice(2, 5, run);
@@ -45,7 +47,7 @@ describe('run slice operator', () => {
});
test('should slice exact range when start not zero', () => {
- const attributes = { something: 'blah' };
+ const attributes = { font: {} };
const run = { start: 5, end: 15, attributes };
const sliced = slice(0, 10, run);
@@ -55,7 +57,7 @@ describe('run slice operator', () => {
});
test('should slice exceeding range when start not zero', () => {
- const attributes = { something: 'blah' };
+ const attributes = { font: {} };
const run = { start: 5, end: 15, attributes };
const sliced = slice(8, 13, run);
diff --git a/packages/textkit/tests/run/sort.test.js b/packages/textkit/tests/run/sort.test.js
index 5dab9acaf..87fa7822f 100644
--- a/packages/textkit/tests/run/sort.test.js
+++ b/packages/textkit/tests/run/sort.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import sort from '../../src/run/sort';
describe('run sort operator', () => {
diff --git a/packages/textkit/tests/run/subtract.test.js b/packages/textkit/tests/run/subtract.test.js
index a27b76b08..727ff1872 100644
--- a/packages/textkit/tests/run/subtract.test.js
+++ b/packages/textkit/tests/run/subtract.test.js
@@ -1,8 +1,10 @@
+import { describe, expect, test } from 'vitest';
+
import subtract from '../../src/run/subtract';
describe('run subtract operator', () => {
test('should return equal run if 0', () => {
- const attributes = { something: 'blah' };
+ const attributes = { font: {} };
const run = { start: 5, end: 15, attributes };
const subtracted = subtract(0, run);
@@ -13,7 +15,7 @@ describe('run subtract operator', () => {
});
test('should return subtracted run', () => {
- const attributes = { something: 'blah' };
+ const attributes = { font: {} };
const run = { start: 5, end: 15, attributes };
const subtracted = subtract(5, run);
diff --git a/packages/textkit/tests/run/trailingOffset.test.js b/packages/textkit/tests/run/trailingOffset.test.js
index aa147c5cf..5aa63ae6a 100644
--- a/packages/textkit/tests/run/trailingOffset.test.js
+++ b/packages/textkit/tests/run/trailingOffset.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import empty from '../../src/run/empty';
import trailingOffset from '../../src/run/trailingOffset';
diff --git a/packages/textkit/tests/utils/isNumber.test.js b/packages/textkit/tests/utils/isNumber.test.js
index a7dfcb7cf..28bcc07eb 100644
--- a/packages/textkit/tests/utils/isNumber.test.js
+++ b/packages/textkit/tests/utils/isNumber.test.js
@@ -1,3 +1,5 @@
+import { describe, expect, test } from 'vitest';
+
import isNumber from '../../src/utils/isNumber';
describe('utils isNumber operator', () => {
diff --git a/packages/textkit/tests/utils/stringFromCodePoints.test.js b/packages/textkit/tests/utils/stringFromCodePoints.test.js
index b42c41fe6..346d1e10c 100644
--- a/packages/textkit/tests/utils/stringFromCodePoints.test.js
+++ b/packages/textkit/tests/utils/stringFromCodePoints.test.js
@@ -1,3 +1,4 @@
+import { describe, expect, test } from 'vitest';
import stringFromCodePoints from '../../src/utils/stringFromCodePoints';
describe('utils stringFromCodePoints operator', () => {
diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md
index 730c9a108..5c49bb931 100644
--- a/packages/types/CHANGELOG.md
+++ b/packages/types/CHANGELOG.md
@@ -1,5 +1,33 @@
# @react-pdf/types
+## 2.4.1
+
+### Patch Changes
+
+- [#2573](https://github.com/diegomura/react-pdf/pull/2573) [`9af07fe`](https://github.com/diegomura/react-pdf/commit/9af07feb59c2fe9c1d8960ac95f6fa6e03d16235) Thanks [@davbrito](https://github.com/davbrito)! - feat: add support for resolving blob images
+
+## 2.4.0
+
+### Minor Changes
+
+- [#2539](https://github.com/diegomura/react-pdf/pull/2539) [`fb5273d`](https://github.com/diegomura/react-pdf/commit/fb5273d8d80d919f7b9c214e02d67b79ce23fa19) Thanks [@diegomura](https://github.com/diegomura)! - feat: add creation and modification dates
+
+## 2.3.6
+
+### Patch Changes
+
+- [#2525](https://github.com/diegomura/react-pdf/pull/2525) [`9e5842b`](https://github.com/diegomura/react-pdf/commit/9e5842bbecca6e249af2c5fc50078bb7ddd5420f) Thanks [@wojtekmaj](https://github.com/wojtekmaj)! - Fix rowGap and columnGap style properties not accepting strings
+
+## 2.3.5
+
+### Patch Changes
+
+- [#2453](https://github.com/diegomura/react-pdf/pull/2453) [`e5c8fde`](https://github.com/diegomura/react-pdf/commit/e5c8fde9379a9a85ecac7e3d6273953e39d65f8d) Thanks [@chuckspencer-aiq](https://github.com/chuckspencer-aiq)! - fix: add clipPath to typing for SVGPresentationAttributes
+
+* [#2467](https://github.com/diegomura/react-pdf/pull/2467) [`1f987cc`](https://github.com/diegomura/react-pdf/commit/1f987cc27c3fd1ef1b6748ebe58a289a78b538d2) Thanks [@JaeSeoKim](https://github.com/JaeSeoKim)! - feat: add withVariationSelectors option to registerEmojiSource [#2466](https://github.com/diegomura/react-pdf/issues/2466)
+
+- [#2416](https://github.com/diegomura/react-pdf/pull/2416) [`4c40b14`](https://github.com/diegomura/react-pdf/commit/4c40b149cfed42f2513e1dd330a92ccc3363c04f) Thanks [@TheMikeyRoss](https://github.com/TheMikeyRoss)! - Updated svg.d.ts to include strokeLinejoin
+
## 2.3.4
### Patch Changes
diff --git a/packages/types/context.d.ts b/packages/types/context.d.ts
index 30bb18392..f52bd2ba4 100644
--- a/packages/types/context.d.ts
+++ b/packages/types/context.d.ts
@@ -1,20 +1,19 @@
-
-// instance.registerFont = jest.fn().mockReturnValue(instance);
-// instance.note = jest.fn().mockReturnValue(instance);
-// instance.rotate = jest.fn().mockReturnValue(instance);
-// instance.scale = jest.fn().mockReturnValue(instance);
-// instance.translate = jest.fn().mockReturnValue(instance);
-// instance.link = jest.fn().mockReturnValue(instance);
-// instance.goTo = jest.fn().mockReturnValue(instance);
-// instance.addNamedDestination = jest.fn().mockReturnValue(instance);
-// instance.clip = jest.fn().mockReturnValue(instance);
-// instance.closePath = jest.fn().mockReturnValue(instance);
-// instance.path = jest.fn().mockReturnValue(instance);
-// instance.radialGradient = jest.fn().mockReturnValue(instance);
-// instance.linearGradient = jest.fn().mockReturnValue(instance);
-// instance.fontSize = jest.fn().mockReturnValue(instance);
-// instance.text = jest.fn().mockReturnValue(instance);
-// instance.font = jest.fn().mockReturnValue(instance);
+// instance.registerFont = vi.fn().mockReturnValue(instance);
+// instance.note = vi.fn().mockReturnValue(instance);
+// instance.rotate = vi.fn().mockReturnValue(instance);
+// instance.scale = vi.fn().mockReturnValue(instance);
+// instance.translate = vi.fn().mockReturnValue(instance);
+// instance.link = vi.fn().mockReturnValue(instance);
+// instance.goTo = vi.fn().mockReturnValue(instance);
+// instance.addNamedDestination = vi.fn().mockReturnValue(instance);
+// instance.clip = vi.fn().mockReturnValue(instance);
+// instance.closePath = vi.fn().mockReturnValue(instance);
+// instance.path = vi.fn().mockReturnValue(instance);
+// instance.radialGradient = vi.fn().mockReturnValue(instance);
+// instance.linearGradient = vi.fn().mockReturnValue(instance);
+// instance.fontSize = vi.fn().mockReturnValue(instance);
+// instance.text = vi.fn().mockReturnValue(instance);
+// instance.font = vi.fn().mockReturnValue(instance);
interface DocumentInfo {
Producer?: string;
@@ -66,5 +65,12 @@ export interface Context {
quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): this;
image(src: any, x?: number, y?: number, options?: ImageOption): Context;
roundedRect(x: number, y: number, w: number, h: number, r?: number): this;
- bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): this;
+ bezierCurveTo(
+ cp1x: number,
+ cp1y: number,
+ cp2x: number,
+ cp2y: number,
+ x: number,
+ y: number,
+ ): this;
}
diff --git a/packages/types/font.d.ts b/packages/types/font.d.ts
index 7339fbb02..e04d1ccb8 100644
--- a/packages/types/font.d.ts
+++ b/packages/types/font.d.ts
@@ -49,10 +49,12 @@ interface RegisteredFont {
interface EmojiSourceUrl {
url: string;
format?: string;
+ withVariationSelectors?: boolean;
}
interface EmojiSourceBuilder {
builder: (code: string) => string;
+ withVariationSelectors?: boolean;
}
type EmojiSource = EmojiSourceUrl | EmojiSourceBuilder;
diff --git a/packages/types/image.d.ts b/packages/types/image.d.ts
index cad93eb8c..3843d5824 100644
--- a/packages/types/image.d.ts
+++ b/packages/types/image.d.ts
@@ -1,24 +1,37 @@
type HTTPMethod = 'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
-type SourceURL = string
+type SourceURL = string;
-type SourceBuffer = Buffer
+type SourceBuffer = Buffer;
-type SourceDataBuffer = { data: Buffer; format: 'png' | 'jpg' }
+type SourceBlob = Blob;
-type SourceURLObject = { uri: string; method: HTTPMethod; body: any; headers: any; credentials?: 'omit' | 'same-origin' | 'include' }
+type SourceDataBuffer = { data: Buffer; format: 'png' | 'jpg' };
+
+type SourceURLObject = {
+ uri: string;
+ method: HTTPMethod;
+ body: any;
+ headers: any;
+ credentials?: 'omit' | 'same-origin' | 'include';
+};
type Source =
| SourceURL
| SourceBuffer
+ | SourceBlob
| SourceDataBuffer
| SourceURLObject
- | undefined
+ | undefined;
-type SourceFactory = () => Source
+type SourceFactory = () => Source;
-type SourceAsync = Promise
+type SourceAsync = Promise;
-type SourceAsyncFactory = () => Promise
+type SourceAsyncFactory = () => Promise;
-export type SourceObject = Source | SourceFactory | SourceAsync | SourceAsyncFactory
+export type SourceObject =
+ | Source
+ | SourceFactory
+ | SourceAsync
+ | SourceAsyncFactory;
diff --git a/packages/types/node.d.ts b/packages/types/node.d.ts
index b141cf90f..d0ab9b85a 100644
--- a/packages/types/node.d.ts
+++ b/packages/types/node.d.ts
@@ -61,6 +61,8 @@ interface DocumentProps {
keywords?: string;
creator?: string;
producer?: string;
+ creationDate?: Date;
+ modificationDate?: Date;
pageLayout?: PageLayout;
pageMode?: PageMode;
}
diff --git a/packages/types/package.json b/packages/types/package.json
index e3065cbf2..d2f20b11c 100644
--- a/packages/types/package.json
+++ b/packages/types/package.json
@@ -1,6 +1,6 @@
{
"name": "@react-pdf/types",
- "version": "2.3.4",
+ "version": "2.4.1",
"license": "MIT",
"description": "React-pdf TypeScript definitions",
"author": "Diego Muracciole ",
diff --git a/packages/types/page.d.ts b/packages/types/page.d.ts
index 0a65f9286..d68afe30e 100644
--- a/packages/types/page.d.ts
+++ b/packages/types/page.d.ts
@@ -51,8 +51,7 @@ type StandardPageSize =
| 'LEGAL'
| 'LETTER'
| 'TABLOID'
- | 'ID1'
- ;
+ | 'ID1';
type StaticSize = number | string;
diff --git a/packages/types/style.d.ts b/packages/types/style.d.ts
index 2d39f2581..167feabdf 100644
--- a/packages/types/style.d.ts
+++ b/packages/types/style.d.ts
@@ -1,9 +1,21 @@
export interface Style {
// Flexbox
- alignContent?: 'flex-start' | 'flex-end' | 'center' | 'stretch' | 'space-between' | 'space-around';
+ alignContent?:
+ | 'flex-start'
+ | 'flex-end'
+ | 'center'
+ | 'stretch'
+ | 'space-between'
+ | 'space-around';
alignItems?: 'flex-start' | 'flex-end' | 'center' | 'stretch' | 'baseline';
- alignSelf?: 'auto' | 'flex-start' | 'flex-end' | 'center' | 'baseline' | 'stretch';
+ alignSelf?:
+ | 'auto'
+ | 'flex-start'
+ | 'flex-end'
+ | 'center'
+ | 'baseline'
+ | 'stretch';
flex?: number | string;
flexDirection?: 'row' | 'row-reverse' | 'column' | 'column-reverse';
flexWrap?: 'nowrap' | 'wrap' | 'wrap-reverse';
@@ -11,10 +23,16 @@ export interface Style {
flexGrow?: number;
flexShrink?: number;
flexBasis?: number | string;
- justifyContent?: 'flex-start' | 'flex-end' | 'center' | 'space-around' | 'space-between' | 'space-evenly';
+ justifyContent?:
+ | 'flex-start'
+ | 'flex-end'
+ | 'center'
+ | 'space-around'
+ | 'space-between'
+ | 'space-evenly';
gap?: number | string;
- rowGap?: number;
- columnGap?: number;
+ rowGap?: number | string;
+ columnGap?: number | string;
// Layout
@@ -48,14 +66,34 @@ export interface Style {
fontSize?: number | string;
fontFamily?: string;
fontStyle?: string | 'normal';
- fontWeight?: number | 'thin' | 'hairline' | 'ultralight' | 'extralight' | 'light' | 'normal' | 'medium' | 'semibold' | 'demibold' | 'bold' | 'ultrabold' | 'extrabold' | 'heavy' | 'black';
+ fontWeight?:
+ | number
+ | 'thin'
+ | 'hairline'
+ | 'ultralight'
+ | 'extralight'
+ | 'light'
+ | 'normal'
+ | 'medium'
+ | 'semibold'
+ | 'demibold'
+ | 'bold'
+ | 'ultrabold'
+ | 'extrabold'
+ | 'heavy'
+ | 'black';
letterSpacing?: number | string;
lineHeight?: number | string;
maxLines?: number; // ?
textAlign?: 'left' | 'right' | 'center' | 'justify'; // ?
- textDecoration?: 'line-through' | 'underline' | 'none' | 'line-through underline' | 'underline line-through';
+ textDecoration?:
+ | 'line-through'
+ | 'underline'
+ | 'none'
+ | 'line-through underline'
+ | 'underline line-through';
textDecorationColor?: string;
- textDecorationStyle?: "dashed" | "dotted" | "solid" | string; // ?
+ textDecorationStyle?: 'dashed' | 'dotted' | 'solid' | string; // ?
textIndent?: any; // ?
textOverflow?: 'ellipsis';
textTransform?: 'capitalize' | 'lowercase' | 'uppercase';
@@ -97,26 +135,26 @@ export interface Style {
border?: number | string;
borderWidth?: number | string;
borderColor?: string;
- borderStyle?: "dashed" | "dotted" | "solid";
+ borderStyle?: 'dashed' | 'dotted' | 'solid';
borderTop?: number | string;
borderTopColor?: string;
- borderTopStyle?: "dashed" | "dotted" | "solid"; // ?
+ borderTopStyle?: 'dashed' | 'dotted' | 'solid'; // ?
borderTopWidth?: number | string;
borderRight?: number | string;
borderRightColor?: string;
- borderRightStyle?: "dashed" | "dotted" | "solid"; // ?
+ borderRightStyle?: 'dashed' | 'dotted' | 'solid'; // ?
borderRightWidth?: number | string;
borderBottom?: number | string;
borderBottomColor?: string;
- borderBottomStyle?: "dashed" | "dotted" | "solid"; // ?
+ borderBottomStyle?: 'dashed' | 'dotted' | 'solid'; // ?
borderBottomWidth?: number | string;
borderLeft?: number | string;
borderLeftColor?: string;
- borderLeftStyle?: "dashed" | "dotted" | "solid"; // ?
+ borderLeftStyle?: 'dashed' | 'dotted' | 'solid'; // ?
borderLeftWidth?: number | string;
borderTopLeftRadius?: number | string;
borderTopRightRadius?: number | string;
borderBottomRightRadius?: number | string;
borderBottomLeftRadius?: number | string;
- borderRadius?: number | string
+ borderRadius?: number | string;
}
diff --git a/packages/types/svg.d.ts b/packages/types/svg.d.ts
index a7e732200..7d5cfe495 100644
--- a/packages/types/svg.d.ts
+++ b/packages/types/svg.d.ts
@@ -11,7 +11,9 @@ export interface SVGPresentationAttributes {
strokeOpacity?: string | number;
textAnchor?: 'start' | 'middle' | 'end';
strokeLineCap?: 'butt' | 'round' | 'square';
+ strokeLinejoin?: 'butt' | 'round' | 'square';
visibility?: 'visible' | 'hidden' | 'collapse';
+ clipPath?: string;
dominantBaseline?:
| 'auto'
| 'middle'
diff --git a/packages/yoga/.gitignore b/packages/yoga/.gitignore
deleted file mode 100644
index 1521c8b76..000000000
--- a/packages/yoga/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-dist
diff --git a/packages/yoga/CHANGELOG.md b/packages/yoga/CHANGELOG.md
deleted file mode 100644
index 868e07906..000000000
--- a/packages/yoga/CHANGELOG.md
+++ /dev/null
@@ -1,43 +0,0 @@
-# @react-pdf/yoga
-
-## 4.1.2
-
-### Patch Changes
-
-- [#2224](https://github.com/diegomura/react-pdf/pull/2224) [`c5b21fc`](https://github.com/diegomura/react-pdf/commit/c5b21fc97b704b3616522b897847a9d3c9dc0052) Thanks [@jeetiss](https://github.com/jeetiss)! - update yoga
-
-## 4.1.1
-
-### Patch Changes
-
-- [#2205](https://github.com/diegomura/react-pdf/pull/2205) [`9a5e0be`](https://github.com/diegomura/react-pdf/commit/9a5e0befb89756db07ce053192a136df9d4ba905) Thanks [@jeetiss](https://github.com/jeetiss)! - update babel
-
-## 4.1.0
-
-### Minor Changes
-
-- [#2186](https://github.com/diegomura/react-pdf/pull/2186) [`72435bd`](https://github.com/diegomura/react-pdf/commit/72435bd81afdada5b811a1d82af0c873cfb62fa0) Thanks [@jeetiss](https://github.com/jeetiss)! - update yoga-layout to support flexBasis auto
-
-## 4.0.1
-
-### Patch Changes
-
-- [#2168](https://github.com/diegomura/react-pdf/pull/2168) [`a45355a`](https://github.com/diegomura/react-pdf/commit/a45355afa4568fc01020e520af56eaa1e48dd85b) Thanks [@jeetiss](https://github.com/jeetiss)! - transpile modern js
-
-## 4.0.0
-
-### Major Changes
-
-- [#2105](https://github.com/diegomura/react-pdf/pull/2105) [`a14ca9e`](https://github.com/diegomura/react-pdf/commit/a14ca9e62c9edc37f239558f8dbae29212b0da4d) Thanks [@jeetiss](https://github.com/jeetiss)! - migrate from yoga-layout-prebuilt to yoga-wasm-web
-
-## 3.0.0
-
-### Major Changes
-
-- [#1891](https://github.com/diegomura/react-pdf/pull/1891) [`a5a933c`](https://github.com/diegomura/react-pdf/commit/a5a933c9733e4c77338ef76a2b3545b84a646a81) Thanks [@carlobeltrame](https://github.com/carlobeltrame)! - feat: compatibility with modern web bundlers and browsers
-
-## 2.0.4
-
-### Patch Changes
-
-- [#1581](https://github.com/diegomura/react-pdf/pull/1581) [`04449ab`](https://github.com/diegomura/react-pdf/commit/04449ab352db0cca2155024dd3e8c690e42193ca) Thanks [@jeetiss](https://github.com/jeetiss)! - added changelog with changesets
diff --git a/packages/yoga/README.md b/packages/yoga/README.md
deleted file mode 100644
index 6b25ce45a..000000000
--- a/packages/yoga/README.md
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
-# @react-pdf/yoga
-
-> Prebuilt [yoga-layout](https://github.com/facebook/yoga)
-
-## Acknowledges
-
-This package ship [yoga-wasm-web/asm](https://github.com/shuding/yoga-wasm-web) with commonjs entry
-
-## Install
-
-```
-$ npm install @react-pdf/yoga
-```
-
-## Usage
-
-```js
-import Yoga from '@react-pdf/yoga';
-// Same as if imported from yoga-layout
-```
diff --git a/packages/yoga/babel.config.js b/packages/yoga/babel.config.js
deleted file mode 100644
index 27f83582f..000000000
--- a/packages/yoga/babel.config.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = { extends: '../../babel.config.js' };
diff --git a/packages/yoga/index.d.ts b/packages/yoga/index.d.ts
deleted file mode 100644
index 1222e3562..000000000
--- a/packages/yoga/index.d.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import { Yoga } from 'yoga-wasm-web';
-
-export default Yoga;
diff --git a/packages/yoga/index.js b/packages/yoga/index.js
deleted file mode 100644
index 6d7068936..000000000
--- a/packages/yoga/index.js
+++ /dev/null
@@ -1,4 +0,0 @@
-// eslint-disable-next-line import/no-unresolved
-import initYoga from 'yoga-wasm-web/asm';
-
-export default initYoga();
diff --git a/packages/yoga/package.json b/packages/yoga/package.json
deleted file mode 100644
index 1c1ad25e5..000000000
--- a/packages/yoga/package.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "name": "@react-pdf/yoga",
- "version": "4.1.2",
- "description": "Prebuilt yoga-layout package",
- "license": "MIT",
- "author": "Diego Muracciole ",
- "homepage": "https://github.com/diegomura/react-pdf#readme",
- "main": "dist/index.js",
- "module": "dist/index.esm.js",
- "types": "index.d.ts",
- "repository": {
- "type": "git",
- "url": "https://github.com/diegomura/react-pdf.git",
- "directory": "packages/yoga"
- },
- "scripts": {
- "test": "jest",
- "build": "rollup -c"
- },
- "files": [
- "dist",
- "index.d.ts"
- ],
- "dependencies": {
- "@babel/runtime": "^7.20.13"
- },
- "devDependencies": {
- "yoga-wasm-web": "~0.3.2"
- }
-}
diff --git a/packages/yoga/rollup.config.js b/packages/yoga/rollup.config.js
deleted file mode 100644
index 12df6851b..000000000
--- a/packages/yoga/rollup.config.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import commonjs from '@rollup/plugin-commonjs';
-import nodeResolve from '@rollup/plugin-node-resolve';
-import babel from '@rollup/plugin-babel';
-
-const babelConfig = () => ({
- babelrc: true,
- babelHelpers: 'runtime',
-});
-
-export default {
- input: 'index.js',
- output: [
- {
- file: 'dist/index.js',
- exports: 'auto',
- format: 'cjs',
- },
- {
- file: 'dist/index.esm.js',
- format: 'esm',
- },
- ],
- plugins: [commonjs(), nodeResolve(), babel(babelConfig())],
- external: [/@babel\/runtime/],
-};
diff --git a/packages/yoga/tests/absolutePosition.test.js b/packages/yoga/tests/absolutePosition.test.js
deleted file mode 100644
index 37336aa0e..000000000
--- a/packages/yoga/tests/absolutePosition.test.js
+++ /dev/null
@@ -1,942 +0,0 @@
-const Yoga = require('..');
-
-describe('Absloute position', () => {
- test('absolute layout width height start to', () => {
- const root = Yoga.Node.create();
-
- root.setWidth(100);
- root.setHeight(100);
-
- const child = Yoga.Node.create();
-
- child.setPositionType(Yoga.POSITION_TYPE_ABSOLUTE);
- child.setPosition(Yoga.EDGE_START, 10);
- child.setPosition(Yoga.EDGE_TOP, 10);
- child.setWidth(10);
- child.setHeight(10);
-
- root.insertChild(child, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toEqual(0);
- expect(root.getComputedLayout().top).toEqual(0);
- expect(root.getComputedLayout().width).toEqual(100);
- expect(root.getComputedLayout().height).toEqual(100);
-
- expect(child.getComputedLayout().left).toEqual(10);
- expect(child.getComputedLayout().top).toEqual(10);
- expect(child.getComputedLayout().width).toEqual(10);
- expect(child.getComputedLayout().height).toEqual(10);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toEqual(0);
- expect(root.getComputedLayout().top).toEqual(0);
- expect(root.getComputedLayout().width).toEqual(100);
- expect(root.getComputedLayout().height).toEqual(100);
-
- expect(child.getComputedLayout().left).toEqual(80);
- expect(child.getComputedLayout().top).toEqual(10);
- expect(child.getComputedLayout().width).toEqual(10);
- expect(child.getComputedLayout().height).toEqual(10);
- });
-
- test('absolute layout width height end bottom', () => {
- const root = Yoga.Node.create();
-
- root.setWidth(100);
- root.setHeight(100);
-
- const child = Yoga.Node.create();
-
- child.setPositionType(Yoga.POSITION_TYPE_ABSOLUTE);
- child.setPosition(Yoga.EDGE_END, 10);
- child.setPosition(Yoga.EDGE_BOTTOM, 10);
- child.setWidth(10);
- child.setHeight(10);
-
- root.insertChild(child, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toEqual(0);
- expect(root.getComputedLayout().top).toEqual(0);
- expect(root.getComputedLayout().width).toEqual(100);
- expect(root.getComputedLayout().height).toEqual(100);
-
- expect(child.getComputedLayout().left).toEqual(80);
- expect(child.getComputedLayout().top).toEqual(80);
- expect(child.getComputedLayout().width).toEqual(10);
- expect(child.getComputedLayout().height).toEqual(10);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toEqual(0);
- expect(root.getComputedLayout().top).toEqual(0);
- expect(root.getComputedLayout().width).toEqual(100);
- expect(root.getComputedLayout().height).toEqual(100);
-
- expect(child.getComputedLayout().left).toEqual(10);
- expect(child.getComputedLayout().top).toEqual(80);
- expect(child.getComputedLayout().width).toEqual(10);
- expect(child.getComputedLayout().height).toEqual(10);
- });
-
- test('absolute layout start top end bottom', () => {
- const root = Yoga.Node.create();
-
- root.setWidth(100);
- root.setHeight(100);
-
- const child = Yoga.Node.create();
-
- child.setPositionType(Yoga.POSITION_TYPE_ABSOLUTE);
- child.setPosition(Yoga.EDGE_START, 10);
- child.setPosition(Yoga.EDGE_TOP, 10);
- child.setPosition(Yoga.EDGE_END, 10);
- child.setPosition(Yoga.EDGE_BOTTOM, 10);
- root.insertChild(child, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toEqual(0);
- expect(root.getComputedLayout().top).toEqual(0);
- expect(root.getComputedLayout().width).toEqual(100);
- expect(root.getComputedLayout().height).toEqual(100);
-
- expect(child.getComputedLayout().left).toEqual(10);
- expect(child.getComputedLayout().top).toEqual(10);
- expect(child.getComputedLayout().width).toEqual(80);
- expect(child.getComputedLayout().height).toEqual(80);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toEqual(0);
- expect(root.getComputedLayout().top).toEqual(0);
- expect(root.getComputedLayout().width).toEqual(100);
- expect(root.getComputedLayout().height).toEqual(100);
-
- expect(child.getComputedLayout().left).toEqual(10);
- expect(child.getComputedLayout().top).toEqual(10);
- expect(child.getComputedLayout().width).toEqual(80);
- expect(child.getComputedLayout().height).toEqual(80);
- });
-
- test('absolute layout width height start top end bottom', () => {
- const root = Yoga.Node.create();
-
- root.setWidth(100);
- root.setHeight(100);
-
- const child = Yoga.Node.create();
-
- child.setPositionType(Yoga.POSITION_TYPE_ABSOLUTE);
- child.setPosition(Yoga.EDGE_START, 10);
- child.setPosition(Yoga.EDGE_TOP, 10);
- child.setPosition(Yoga.EDGE_END, 10);
- child.setPosition(Yoga.EDGE_BOTTOM, 10);
- child.setWidth(10);
- child.setHeight(10);
- root.insertChild(child, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toEqual(0);
- expect(root.getComputedLayout().top).toEqual(0);
- expect(root.getComputedLayout().width).toEqual(100);
- expect(root.getComputedLayout().height).toEqual(100);
-
- expect(child.getComputedLayout().left).toEqual(10);
- expect(child.getComputedLayout().top).toEqual(10);
- expect(child.getComputedLayout().width).toEqual(10);
- expect(child.getComputedLayout().height).toEqual(10);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toEqual(0);
- expect(root.getComputedLayout().top).toEqual(0);
- expect(root.getComputedLayout().width).toEqual(100);
- expect(root.getComputedLayout().height).toEqual(100);
-
- expect(child.getComputedLayout().left).toEqual(80);
- expect(child.getComputedLayout().top).toEqual(10);
- expect(child.getComputedLayout().width).toEqual(10);
- expect(child.getComputedLayout().height).toEqual(10);
- });
-
- test('do not clamp height of absolute node to height of its overflow hidden parent', () => {
- const root = Yoga.Node.create();
-
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setOverflow(Yoga.OVERFLOW_HIDDEN);
- root.setWidth(50);
- root.setHeight(50);
-
- const child = Yoga.Node.create();
-
- child.setPositionType(Yoga.POSITION_TYPE_ABSOLUTE);
- child.setPosition(Yoga.EDGE_START, 0);
- child.setPosition(Yoga.EDGE_TOP, 0);
- root.insertChild(child, 0);
-
- const childChild = Yoga.Node.create();
- childChild.setWidth(100);
- childChild.setHeight(100);
- child.insertChild(childChild, 0);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toEqual(0);
- expect(root.getComputedLayout().top).toEqual(0);
- expect(root.getComputedLayout().width).toEqual(50);
- expect(root.getComputedLayout().height).toEqual(50);
-
- expect(child.getComputedLayout().left).toEqual(0);
- expect(child.getComputedLayout().top).toEqual(0);
- expect(child.getComputedLayout().width).toEqual(100);
- expect(child.getComputedLayout().height).toEqual(100);
-
- expect(childChild.getComputedLayout().left).toEqual(0);
- expect(childChild.getComputedLayout().top).toEqual(0);
- expect(childChild.getComputedLayout().width).toEqual(100);
- expect(childChild.getComputedLayout().height).toEqual(100);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toEqual(0);
- expect(root.getComputedLayout().top).toEqual(0);
- expect(root.getComputedLayout().width).toEqual(50);
- expect(root.getComputedLayout().height).toEqual(50);
-
- expect(child.getComputedLayout().left).toEqual(-50);
- expect(child.getComputedLayout().top).toEqual(0);
- expect(child.getComputedLayout().width).toEqual(100);
- expect(child.getComputedLayout().height).toEqual(100);
-
- expect(childChild.getComputedLayout().left).toEqual(0);
- expect(childChild.getComputedLayout().top).toEqual(0);
- expect(childChild.getComputedLayout().width).toEqual(100);
- expect(childChild.getComputedLayout().height).toEqual(100);
- });
-
- test('absolute layout within border', () => {
- const root = Yoga.Node.create();
-
- root.setMargin(Yoga.EDGE_LEFT, 10);
- root.setMargin(Yoga.EDGE_TOP, 10);
- root.setMargin(Yoga.EDGE_RIGHT, 10);
- root.setMargin(Yoga.EDGE_BOTTOM, 10);
- root.setPadding(Yoga.EDGE_LEFT, 10);
- root.setPadding(Yoga.EDGE_TOP, 10);
- root.setPadding(Yoga.EDGE_RIGHT, 10);
- root.setPadding(Yoga.EDGE_BOTTOM, 10);
- root.setBorder(Yoga.EDGE_LEFT, 10);
- root.setBorder(Yoga.EDGE_TOP, 10);
- root.setBorder(Yoga.EDGE_RIGHT, 10);
- root.setBorder(Yoga.EDGE_BOTTOM, 10);
- root.setWidth(100);
- root.setHeight(100);
-
- const child = Yoga.Node.create();
-
- child.setPositionType(Yoga.POSITION_TYPE_ABSOLUTE);
- child.setPosition(Yoga.EDGE_LEFT, 0);
- child.setPosition(Yoga.EDGE_TOP, 0);
- child.setWidth(50);
- child.setHeight(50);
- root.insertChild(child, 0);
-
- const child2 = Yoga.Node.create();
- child2.setPositionType(Yoga.POSITION_TYPE_ABSOLUTE);
- child2.setPosition(Yoga.EDGE_RIGHT, 0);
- child2.setPosition(Yoga.EDGE_BOTTOM, 0);
- child2.setWidth(50);
- child2.setHeight(50);
- root.insertChild(child2, 1);
-
- const child3 = Yoga.Node.create();
- child3.setPositionType(Yoga.POSITION_TYPE_ABSOLUTE);
- child3.setPosition(Yoga.EDGE_LEFT, 0);
- child3.setPosition(Yoga.EDGE_TOP, 0);
- child3.setMargin(Yoga.EDGE_LEFT, 10);
- child3.setMargin(Yoga.EDGE_TOP, 10);
- child3.setMargin(Yoga.EDGE_RIGHT, 10);
- child3.setMargin(Yoga.EDGE_BOTTOM, 10);
- child3.setWidth(50);
- child3.setHeight(50);
- root.insertChild(child3, 2);
-
- const child4 = Yoga.Node.create();
- child4.setPositionType(Yoga.POSITION_TYPE_ABSOLUTE);
- child4.setPosition(Yoga.EDGE_RIGHT, 0);
- child4.setPosition(Yoga.EDGE_BOTTOM, 0);
- child4.setMargin(Yoga.EDGE_LEFT, 10);
- child4.setMargin(Yoga.EDGE_TOP, 10);
- child4.setMargin(Yoga.EDGE_RIGHT, 10);
- child4.setMargin(Yoga.EDGE_BOTTOM, 10);
- child4.setWidth(50);
- child4.setHeight(50);
- root.insertChild(child4, 3);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toEqual(10);
- expect(root.getComputedLayout().top).toEqual(10);
- expect(root.getComputedLayout().width).toEqual(100);
- expect(root.getComputedLayout().height).toEqual(100);
-
- expect(child.getComputedLayout().left).toEqual(10);
- expect(child.getComputedLayout().top).toEqual(10);
- expect(child.getComputedLayout().width).toEqual(50);
- expect(child.getComputedLayout().height).toEqual(50);
-
- expect(child2.getComputedLayout().left).toEqual(40);
- expect(child2.getComputedLayout().top).toEqual(40);
- expect(child2.getComputedLayout().width).toEqual(50);
- expect(child2.getComputedLayout().height).toEqual(50);
-
- expect(child3.getComputedLayout().left).toEqual(20);
- expect(child3.getComputedLayout().top).toEqual(20);
- expect(child3.getComputedLayout().width).toEqual(50);
- expect(child3.getComputedLayout().height).toEqual(50);
-
- expect(child4.getComputedLayout().left).toEqual(30);
- expect(child4.getComputedLayout().top).toEqual(30);
- expect(child4.getComputedLayout().width).toEqual(50);
- expect(child4.getComputedLayout().height).toEqual(50);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toEqual(10);
- expect(root.getComputedLayout().top).toEqual(10);
- expect(root.getComputedLayout().width).toEqual(100);
- expect(root.getComputedLayout().height).toEqual(100);
-
- expect(child.getComputedLayout().left).toEqual(10);
- expect(child.getComputedLayout().top).toEqual(10);
- expect(child.getComputedLayout().width).toEqual(50);
- expect(child.getComputedLayout().height).toEqual(50);
-
- expect(child2.getComputedLayout().left).toEqual(40);
- expect(child2.getComputedLayout().top).toEqual(40);
- expect(child2.getComputedLayout().width).toEqual(50);
- expect(child2.getComputedLayout().height).toEqual(50);
-
- expect(child3.getComputedLayout().left).toEqual(20);
- expect(child3.getComputedLayout().top).toEqual(20);
- expect(child3.getComputedLayout().width).toEqual(50);
- expect(child3.getComputedLayout().height).toEqual(50);
-
- expect(child4.getComputedLayout().left).toEqual(30);
- expect(child4.getComputedLayout().top).toEqual(30);
- expect(child4.getComputedLayout().width).toEqual(50);
- expect(child4.getComputedLayout().height).toEqual(50);
- });
-
- test('absolute layout align items and justify content center', () => {
- const root = Yoga.Node.create();
-
- root.setJustifyContent(Yoga.JUSTIFY_CENTER);
- root.setAlignItems(Yoga.ALIGN_CENTER);
- root.setFlexGrow(1);
- root.setWidth(110);
- root.setHeight(100);
-
- const child = Yoga.Node.create();
-
- child.setPositionType(Yoga.POSITION_TYPE_ABSOLUTE);
- child.setWidth(60);
- child.setHeight(40);
- root.insertChild(child, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toEqual(0);
- expect(root.getComputedLayout().top).toEqual(0);
- expect(root.getComputedLayout().width).toEqual(110);
- expect(root.getComputedLayout().height).toEqual(100);
-
- expect(child.getComputedLayout().left).toEqual(25);
- expect(child.getComputedLayout().top).toEqual(30);
- expect(child.getComputedLayout().width).toEqual(60);
- expect(child.getComputedLayout().height).toEqual(40);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toEqual(0);
- expect(root.getComputedLayout().top).toEqual(0);
- expect(root.getComputedLayout().width).toEqual(110);
- expect(root.getComputedLayout().height).toEqual(100);
-
- expect(child.getComputedLayout().left).toEqual(25);
- expect(child.getComputedLayout().top).toEqual(30);
- expect(child.getComputedLayout().width).toEqual(60);
- expect(child.getComputedLayout().height).toEqual(40);
- });
-
- test('absolute layout align items and justify content flex end', () => {
- const root = Yoga.Node.create();
-
- root.setJustifyContent(Yoga.JUSTIFY_FLEX_END);
- root.setAlignItems(Yoga.ALIGN_FLEX_END);
- root.setFlexGrow(1);
- root.setWidth(110);
- root.setHeight(100);
-
- const child = Yoga.Node.create();
-
- child.setPositionType(Yoga.POSITION_TYPE_ABSOLUTE);
- child.setWidth(60);
- child.setHeight(40);
- root.insertChild(child, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toEqual(0);
- expect(root.getComputedLayout().top).toEqual(0);
- expect(root.getComputedLayout().width).toEqual(110);
- expect(root.getComputedLayout().height).toEqual(100);
-
- expect(child.getComputedLayout().left).toEqual(50);
- expect(child.getComputedLayout().top).toEqual(60);
- expect(child.getComputedLayout().width).toEqual(60);
- expect(child.getComputedLayout().height).toEqual(40);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toEqual(0);
- expect(root.getComputedLayout().top).toEqual(0);
- expect(root.getComputedLayout().width).toEqual(110);
- expect(root.getComputedLayout().height).toEqual(100);
-
- expect(child.getComputedLayout().left).toEqual(0);
- expect(child.getComputedLayout().top).toEqual(60);
- expect(child.getComputedLayout().width).toEqual(60);
- expect(child.getComputedLayout().height).toEqual(40);
- });
-
- test('absolute layout justify content center', () => {
- const root = Yoga.Node.create();
-
- root.setJustifyContent(Yoga.JUSTIFY_CENTER);
- root.setFlexGrow(1);
- root.setWidth(110);
- root.setHeight(100);
-
- const child = Yoga.Node.create();
-
- child.setPositionType(Yoga.POSITION_TYPE_ABSOLUTE);
- child.setWidth(60);
- child.setHeight(40);
- root.insertChild(child, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toEqual(0);
- expect(root.getComputedLayout().top).toEqual(0);
- expect(root.getComputedLayout().width).toEqual(110);
- expect(root.getComputedLayout().height).toEqual(100);
-
- expect(child.getComputedLayout().left).toEqual(0);
- expect(child.getComputedLayout().top).toEqual(30);
- expect(child.getComputedLayout().width).toEqual(60);
- expect(child.getComputedLayout().height).toEqual(40);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toEqual(0);
- expect(root.getComputedLayout().top).toEqual(0);
- expect(root.getComputedLayout().width).toEqual(110);
- expect(root.getComputedLayout().height).toEqual(100);
-
- expect(child.getComputedLayout().left).toEqual(50);
- expect(child.getComputedLayout().top).toEqual(30);
- expect(child.getComputedLayout().width).toEqual(60);
- expect(child.getComputedLayout().height).toEqual(40);
- });
-
- test('absolute layout align items center', () => {
- const root = Yoga.Node.create();
-
- root.setAlignItems(Yoga.ALIGN_CENTER);
- root.setFlexGrow(1);
- root.setWidth(110);
- root.setHeight(100);
-
- const child = Yoga.Node.create();
-
- child.setPositionType(Yoga.POSITION_TYPE_ABSOLUTE);
- child.setWidth(60);
- child.setHeight(40);
- root.insertChild(child, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toEqual(0);
- expect(root.getComputedLayout().top).toEqual(0);
- expect(root.getComputedLayout().width).toEqual(110);
- expect(root.getComputedLayout().height).toEqual(100);
-
- expect(child.getComputedLayout().left).toEqual(25);
- expect(child.getComputedLayout().top).toEqual(0);
- expect(child.getComputedLayout().width).toEqual(60);
- expect(child.getComputedLayout().height).toEqual(40);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toEqual(0);
- expect(root.getComputedLayout().top).toEqual(0);
- expect(root.getComputedLayout().width).toEqual(110);
- expect(root.getComputedLayout().height).toEqual(100);
-
- expect(child.getComputedLayout().left).toEqual(25);
- expect(child.getComputedLayout().top).toEqual(0);
- expect(child.getComputedLayout().width).toEqual(60);
- expect(child.getComputedLayout().height).toEqual(40);
- });
-
- test('absolute layout align items center on child only', () => {
- const root = Yoga.Node.create();
-
- root.setFlexGrow(1);
- root.setWidth(110);
- root.setHeight(100);
-
- const child = Yoga.Node.create();
-
- child.setAlignSelf(Yoga.ALIGN_CENTER);
- child.setPositionType(Yoga.POSITION_TYPE_ABSOLUTE);
- child.setWidth(60);
- child.setHeight(40);
- root.insertChild(child, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toEqual(0);
- expect(root.getComputedLayout().top).toEqual(0);
- expect(root.getComputedLayout().width).toEqual(110);
- expect(root.getComputedLayout().height).toEqual(100);
-
- expect(child.getComputedLayout().left).toEqual(25);
- expect(child.getComputedLayout().top).toEqual(0);
- expect(child.getComputedLayout().width).toEqual(60);
- expect(child.getComputedLayout().height).toEqual(40);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toEqual(0);
- expect(root.getComputedLayout().top).toEqual(0);
- expect(root.getComputedLayout().width).toEqual(110);
- expect(root.getComputedLayout().height).toEqual(100);
-
- expect(child.getComputedLayout().left).toEqual(25);
- expect(child.getComputedLayout().top).toEqual(0);
- expect(child.getComputedLayout().width).toEqual(60);
- expect(child.getComputedLayout().height).toEqual(40);
- });
-
- test('absolute layout align items and justify content center and top position', () => {
- const root = Yoga.Node.create();
-
- root.setJustifyContent(Yoga.JUSTIFY_CENTER);
- root.setAlignItems(Yoga.ALIGN_CENTER);
- root.setFlexGrow(1);
- root.setWidth(110);
- root.setHeight(100);
-
- const child = Yoga.Node.create();
-
- child.setPositionType(Yoga.POSITION_TYPE_ABSOLUTE);
- child.setPosition(Yoga.EDGE_TOP, 10);
- child.setWidth(60);
- child.setHeight(40);
- root.insertChild(child, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toEqual(0);
- expect(root.getComputedLayout().top).toEqual(0);
- expect(root.getComputedLayout().width).toEqual(110);
- expect(root.getComputedLayout().height).toEqual(100);
-
- expect(child.getComputedLayout().left).toEqual(25);
- expect(child.getComputedLayout().top).toEqual(10);
- expect(child.getComputedLayout().width).toEqual(60);
- expect(child.getComputedLayout().height).toEqual(40);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toEqual(0);
- expect(root.getComputedLayout().top).toEqual(0);
- expect(root.getComputedLayout().width).toEqual(110);
- expect(root.getComputedLayout().height).toEqual(100);
-
- expect(child.getComputedLayout().left).toEqual(25);
- expect(child.getComputedLayout().top).toEqual(10);
- expect(child.getComputedLayout().width).toEqual(60);
- expect(child.getComputedLayout().height).toEqual(40);
- });
-
- test('absolute layout align items and justify content center and bottom position', () => {
- const root = Yoga.Node.create();
-
- root.setJustifyContent(Yoga.JUSTIFY_CENTER);
- root.setAlignItems(Yoga.ALIGN_CENTER);
- root.setFlexGrow(1);
- root.setWidth(110);
- root.setHeight(100);
-
- const child = Yoga.Node.create();
-
- child.setPositionType(Yoga.POSITION_TYPE_ABSOLUTE);
- child.setPosition(Yoga.EDGE_BOTTOM, 10);
- child.setWidth(60);
- child.setHeight(40);
- root.insertChild(child, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toEqual(0);
- expect(root.getComputedLayout().top).toEqual(0);
- expect(root.getComputedLayout().width).toEqual(110);
- expect(root.getComputedLayout().height).toEqual(100);
-
- expect(child.getComputedLayout().left).toEqual(25);
- expect(child.getComputedLayout().top).toEqual(50);
- expect(child.getComputedLayout().width).toEqual(60);
- expect(child.getComputedLayout().height).toEqual(40);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toEqual(0);
- expect(root.getComputedLayout().top).toEqual(0);
- expect(root.getComputedLayout().width).toEqual(110);
- expect(root.getComputedLayout().height).toEqual(100);
-
- expect(child.getComputedLayout().left).toEqual(25);
- expect(child.getComputedLayout().top).toEqual(50);
- expect(child.getComputedLayout().width).toEqual(60);
- expect(child.getComputedLayout().height).toEqual(40);
- });
-
- test('absolute layout align items and justify content center and left position', () => {
- const root = Yoga.Node.create();
-
- root.setJustifyContent(Yoga.JUSTIFY_CENTER);
- root.setAlignItems(Yoga.ALIGN_CENTER);
- root.setFlexGrow(1);
- root.setWidth(110);
- root.setHeight(100);
-
- const child = Yoga.Node.create();
-
- child.setPositionType(Yoga.POSITION_TYPE_ABSOLUTE);
- child.setPosition(Yoga.EDGE_LEFT, 5);
- child.setWidth(60);
- child.setHeight(40);
- root.insertChild(child, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toEqual(0);
- expect(root.getComputedLayout().top).toEqual(0);
- expect(root.getComputedLayout().width).toEqual(110);
- expect(root.getComputedLayout().height).toEqual(100);
-
- expect(child.getComputedLayout().left).toEqual(5);
- expect(child.getComputedLayout().top).toEqual(30);
- expect(child.getComputedLayout().width).toEqual(60);
- expect(child.getComputedLayout().height).toEqual(40);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toEqual(0);
- expect(root.getComputedLayout().top).toEqual(0);
- expect(root.getComputedLayout().width).toEqual(110);
- expect(root.getComputedLayout().height).toEqual(100);
-
- expect(child.getComputedLayout().left).toEqual(5);
- expect(child.getComputedLayout().top).toEqual(30);
- expect(child.getComputedLayout().width).toEqual(60);
- expect(child.getComputedLayout().height).toEqual(40);
- });
-
- test('absolute layout align items and justify content center and right position', () => {
- const root = Yoga.Node.create();
-
- root.setJustifyContent(Yoga.JUSTIFY_CENTER);
- root.setAlignItems(Yoga.ALIGN_CENTER);
- root.setFlexGrow(1);
- root.setWidth(110);
- root.setHeight(100);
-
- const child = Yoga.Node.create();
-
- child.setPositionType(Yoga.POSITION_TYPE_ABSOLUTE);
- child.setPosition(Yoga.EDGE_RIGHT, 5);
- child.setWidth(60);
- child.setHeight(40);
- root.insertChild(child, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toEqual(0);
- expect(root.getComputedLayout().top).toEqual(0);
- expect(root.getComputedLayout().width).toEqual(110);
- expect(root.getComputedLayout().height).toEqual(100);
-
- expect(child.getComputedLayout().left).toEqual(45);
- expect(child.getComputedLayout().top).toEqual(30);
- expect(child.getComputedLayout().width).toEqual(60);
- expect(child.getComputedLayout().height).toEqual(40);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toEqual(0);
- expect(root.getComputedLayout().top).toEqual(0);
- expect(root.getComputedLayout().width).toEqual(110);
- expect(root.getComputedLayout().height).toEqual(100);
-
- expect(child.getComputedLayout().left).toEqual(45);
- expect(child.getComputedLayout().top).toEqual(30);
- expect(child.getComputedLayout().width).toEqual(60);
- expect(child.getComputedLayout().height).toEqual(40);
- });
-
- test('position root with rtl should position withoutdirection', () => {
- const root = Yoga.Node.create();
-
- root.setPosition(Yoga.EDGE_LEFT, 72);
- root.setWidth(52);
- root.setHeight(52);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toEqual(72);
- expect(root.getComputedLayout().top).toEqual(0);
- expect(root.getComputedLayout().width).toEqual(52);
- expect(root.getComputedLayout().height).toEqual(52);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toEqual(72);
- expect(root.getComputedLayout().top).toEqual(0);
- expect(root.getComputedLayout().width).toEqual(52);
- expect(root.getComputedLayout().height).toEqual(52);
- });
-
- test('absolute layout percentage bottom based on parent height', () => {
- const root = Yoga.Node.create();
-
- root.setWidth(100);
- root.setHeight(200);
-
- const child = Yoga.Node.create();
-
- child.setPositionType(Yoga.POSITION_TYPE_ABSOLUTE);
- child.setPositionPercent(Yoga.EDGE_TOP, 50);
- child.setWidth(10);
- child.setHeight(10);
- root.insertChild(child, 0);
-
- const child2 = Yoga.Node.create();
- child2.setPositionType(Yoga.POSITION_TYPE_ABSOLUTE);
- child2.setPositionPercent(Yoga.EDGE_BOTTOM, 50);
- child2.setWidth(10);
- child2.setHeight(10);
- root.insertChild(child2, 1);
-
- const child3 = Yoga.Node.create();
- child3.setPositionType(Yoga.POSITION_TYPE_ABSOLUTE);
- child3.setPositionPercent(Yoga.EDGE_TOP, 10);
- child3.setPositionPercent(Yoga.EDGE_BOTTOM, 10);
- child3.setWidth(10);
- root.insertChild(child3, 2);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toEqual(0);
- expect(root.getComputedLayout().top).toEqual(0);
- expect(root.getComputedLayout().width).toEqual(100);
- expect(root.getComputedLayout().height).toEqual(200);
-
- expect(child.getComputedLayout().left).toEqual(0);
- expect(child.getComputedLayout().top).toEqual(100);
- expect(child.getComputedLayout().width).toEqual(10);
- expect(child.getComputedLayout().height).toEqual(10);
-
- expect(child2.getComputedLayout().left).toEqual(0);
- expect(child2.getComputedLayout().top).toEqual(90);
- expect(child2.getComputedLayout().width).toEqual(10);
- expect(child2.getComputedLayout().height).toEqual(10);
-
- expect(child3.getComputedLayout().left).toEqual(0);
- expect(child3.getComputedLayout().top).toEqual(20);
- expect(child3.getComputedLayout().width).toEqual(10);
- expect(child3.getComputedLayout().height).toEqual(160);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toEqual(0);
- expect(root.getComputedLayout().top).toEqual(0);
- expect(root.getComputedLayout().width).toEqual(100);
- expect(root.getComputedLayout().height).toEqual(200);
-
- expect(child.getComputedLayout().left).toEqual(90);
- expect(child.getComputedLayout().top).toEqual(100);
- expect(child.getComputedLayout().width).toEqual(10);
- expect(child.getComputedLayout().height).toEqual(10);
-
- expect(child2.getComputedLayout().left).toEqual(90);
- expect(child2.getComputedLayout().top).toEqual(90);
- expect(child2.getComputedLayout().width).toEqual(10);
- expect(child2.getComputedLayout().height).toEqual(10);
-
- expect(child3.getComputedLayout().left).toEqual(90);
- expect(child3.getComputedLayout().top).toEqual(20);
- expect(child3.getComputedLayout().width).toEqual(10);
- expect(child3.getComputedLayout().height).toEqual(160);
- });
-
- test('absolute layout in wrap reverse column container', () => {
- const root = Yoga.Node.create();
-
- root.setFlexWrap(Yoga.WRAP_WRAP_REVERSE);
- root.setWidth(100);
- root.setHeight(100);
-
- const child = Yoga.Node.create();
-
- child.setPositionType(Yoga.POSITION_TYPE_ABSOLUTE);
- child.setWidth(20);
- child.setHeight(20);
- root.insertChild(child, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toEqual(0);
- expect(root.getComputedLayout().top).toEqual(0);
- expect(root.getComputedLayout().width).toEqual(100);
- expect(root.getComputedLayout().height).toEqual(100);
-
- expect(child.getComputedLayout().left).toEqual(80);
- expect(child.getComputedLayout().top).toEqual(0);
- expect(child.getComputedLayout().width).toEqual(20);
- expect(child.getComputedLayout().height).toEqual(20);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toEqual(0);
- expect(root.getComputedLayout().top).toEqual(0);
- expect(root.getComputedLayout().width).toEqual(100);
- expect(root.getComputedLayout().height).toEqual(100);
-
- expect(child.getComputedLayout().left).toEqual(0);
- expect(child.getComputedLayout().top).toEqual(0);
- expect(child.getComputedLayout().width).toEqual(20);
- expect(child.getComputedLayout().height).toEqual(20);
- });
-
- test('absolute layout in wrap reverse row container', () => {
- const root = Yoga.Node.create();
-
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setFlexWrap(Yoga.WRAP_WRAP_REVERSE);
- root.setWidth(100);
- root.setHeight(100);
-
- const child = Yoga.Node.create();
-
- child.setPositionType(Yoga.POSITION_TYPE_ABSOLUTE);
- child.setWidth(20);
- child.setHeight(20);
- root.insertChild(child, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toEqual(0);
- expect(root.getComputedLayout().top).toEqual(0);
- expect(root.getComputedLayout().width).toEqual(100);
- expect(root.getComputedLayout().height).toEqual(100);
-
- expect(child.getComputedLayout().left).toEqual(0);
- expect(child.getComputedLayout().top).toEqual(80);
- expect(child.getComputedLayout().width).toEqual(20);
- expect(child.getComputedLayout().height).toEqual(20);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toEqual(0);
- expect(root.getComputedLayout().top).toEqual(0);
- expect(root.getComputedLayout().width).toEqual(100);
- expect(root.getComputedLayout().height).toEqual(100);
-
- expect(child.getComputedLayout().left).toEqual(80);
- expect(child.getComputedLayout().top).toEqual(80);
- expect(child.getComputedLayout().width).toEqual(20);
- expect(child.getComputedLayout().height).toEqual(20);
- });
-
- test('absolute layout in wrap reverse column container flex end', () => {
- const root = Yoga.Node.create();
-
- root.setFlexWrap(Yoga.WRAP_WRAP_REVERSE);
- root.setWidth(100);
- root.setHeight(100);
-
- const child = Yoga.Node.create();
-
- child.setAlignSelf(Yoga.ALIGN_FLEX_END);
- child.setPositionType(Yoga.POSITION_TYPE_ABSOLUTE);
- child.setWidth(20);
- child.setHeight(20);
- root.insertChild(child, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toEqual(0);
- expect(root.getComputedLayout().top).toEqual(0);
- expect(root.getComputedLayout().width).toEqual(100);
- expect(root.getComputedLayout().height).toEqual(100);
-
- expect(child.getComputedLayout().left).toEqual(0);
- expect(child.getComputedLayout().top).toEqual(0);
- expect(child.getComputedLayout().width).toEqual(20);
- expect(child.getComputedLayout().height).toEqual(20);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toEqual(0);
- expect(root.getComputedLayout().top).toEqual(0);
- expect(root.getComputedLayout().width).toEqual(100);
- expect(root.getComputedLayout().height).toEqual(100);
-
- expect(child.getComputedLayout().left).toEqual(80);
- expect(child.getComputedLayout().top).toEqual(0);
- expect(child.getComputedLayout().width).toEqual(20);
- expect(child.getComputedLayout().height).toEqual(20);
- });
-
- test('absolute layout in wrap reverse row container flex end', () => {
- const root = Yoga.Node.create();
-
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setFlexWrap(Yoga.WRAP_WRAP_REVERSE);
- root.setWidth(100);
- root.setHeight(100);
-
- const child = Yoga.Node.create();
-
- child.setAlignSelf(Yoga.ALIGN_FLEX_END);
- child.setPositionType(Yoga.POSITION_TYPE_ABSOLUTE);
- child.setWidth(20);
- child.setHeight(20);
- root.insertChild(child, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toEqual(0);
- expect(root.getComputedLayout().top).toEqual(0);
- expect(root.getComputedLayout().width).toEqual(100);
- expect(root.getComputedLayout().height).toEqual(100);
-
- expect(child.getComputedLayout().left).toEqual(0);
- expect(child.getComputedLayout().top).toEqual(0);
- expect(child.getComputedLayout().width).toEqual(20);
- expect(child.getComputedLayout().height).toEqual(20);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toEqual(0);
- expect(root.getComputedLayout().top).toEqual(0);
- expect(root.getComputedLayout().width).toEqual(100);
- expect(root.getComputedLayout().height).toEqual(100);
-
- expect(child.getComputedLayout().left).toEqual(80);
- expect(child.getComputedLayout().top).toEqual(0);
- expect(child.getComputedLayout().width).toEqual(20);
- expect(child.getComputedLayout().height).toEqual(20);
- });
-});
diff --git a/packages/yoga/tests/alignContent.test.js b/packages/yoga/tests/alignContent.test.js
deleted file mode 100644
index c1aee0d37..000000000
--- a/packages/yoga/tests/alignContent.test.js
+++ /dev/null
@@ -1,1770 +0,0 @@
-const Yoga = require('..');
-
-describe('Align content', () => {
- test('align content flex start', () => {
- const root = Yoga.Node.create();
-
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setFlexWrap(Yoga.WRAP_WRAP);
- root.setWidth(130);
- root.setHeight(100);
-
- const child0 = Yoga.Node.create();
- child0.setWidth(50);
- child0.setHeight(10);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(50);
- child1.setHeight(10);
- root.insertChild(child1, 1);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(50);
- child2.setHeight(10);
- root.insertChild(child2, 2);
-
- const child3 = Yoga.Node.create();
- child3.setWidth(50);
- child3.setHeight(10);
- root.insertChild(child3, 3);
-
- const child4 = Yoga.Node.create();
- child4.setWidth(50);
- child4.setHeight(10);
- root.insertChild(child4, 4);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(130);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(10);
-
- expect(child1.getComputedLayout().left).toBe(50);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(10);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(10);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(10);
-
- expect(child3.getComputedLayout().left).toBe(50);
- expect(child3.getComputedLayout().top).toBe(10);
- expect(child3.getComputedLayout().width).toBe(50);
- expect(child3.getComputedLayout().height).toBe(10);
-
- expect(child4.getComputedLayout().left).toBe(0);
- expect(child4.getComputedLayout().top).toBe(20);
- expect(child4.getComputedLayout().width).toBe(50);
- expect(child4.getComputedLayout().height).toBe(10);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(130);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(80);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(10);
-
- expect(child1.getComputedLayout().left).toBe(30);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(10);
-
- expect(child2.getComputedLayout().left).toBe(80);
- expect(child2.getComputedLayout().top).toBe(10);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(10);
-
- expect(child3.getComputedLayout().left).toBe(30);
- expect(child3.getComputedLayout().top).toBe(10);
- expect(child3.getComputedLayout().width).toBe(50);
- expect(child3.getComputedLayout().height).toBe(10);
-
- expect(child4.getComputedLayout().left).toBe(80);
- expect(child4.getComputedLayout().top).toBe(20);
- expect(child4.getComputedLayout().width).toBe(50);
- expect(child4.getComputedLayout().height).toBe(10);
- });
-
- test('align content flex start without height on children', () => {
- const root = Yoga.Node.create();
- root.setFlexWrap(Yoga.WRAP_WRAP);
- root.setWidth(100);
- root.setHeight(100);
-
- const child0 = Yoga.Node.create();
- child0.setWidth(50);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(50);
- child1.setHeight(10);
- root.insertChild(child1, 1);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(50);
- root.insertChild(child2, 2);
-
- const child3 = Yoga.Node.create();
- child3.setWidth(50);
- child3.setHeight(10);
- root.insertChild(child3, 3);
-
- const child4 = Yoga.Node.create();
- child4.setWidth(50);
- root.insertChild(child4, 4);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(0);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(10);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(10);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(0);
-
- expect(child3.getComputedLayout().left).toBe(0);
- expect(child3.getComputedLayout().top).toBe(10);
- expect(child3.getComputedLayout().width).toBe(50);
- expect(child3.getComputedLayout().height).toBe(10);
-
- expect(child4.getComputedLayout().left).toBe(0);
- expect(child4.getComputedLayout().top).toBe(20);
- expect(child4.getComputedLayout().width).toBe(50);
- expect(child4.getComputedLayout().height).toBe(0);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(50);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(0);
-
- expect(child1.getComputedLayout().left).toBe(50);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(10);
-
- expect(child2.getComputedLayout().left).toBe(50);
- expect(child2.getComputedLayout().top).toBe(10);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(0);
-
- expect(child3.getComputedLayout().left).toBe(50);
- expect(child3.getComputedLayout().top).toBe(10);
- expect(child3.getComputedLayout().width).toBe(50);
- expect(child3.getComputedLayout().height).toBe(10);
-
- expect(child4.getComputedLayout().left).toBe(50);
- expect(child4.getComputedLayout().top).toBe(20);
- expect(child4.getComputedLayout().width).toBe(50);
- expect(child4.getComputedLayout().height).toBe(0);
- });
-
- test('align content flex start with flex', () => {
- const root = Yoga.Node.create();
- root.setFlexWrap(Yoga.WRAP_WRAP);
- root.setWidth(100);
- root.setHeight(120);
-
- const child0 = Yoga.Node.create();
- child0.setFlexGrow(1);
- child0.setFlexBasisPercent(0);
- child0.setWidth(50);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setFlexGrow(1);
- child1.setFlexBasisPercent(0);
- child1.setWidth(50);
- child1.setHeight(10);
- root.insertChild(child1, 1);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(50);
- root.insertChild(child2, 2);
-
- const child3 = Yoga.Node.create();
- child3.setFlexGrow(1);
- child3.setFlexShrink(1);
- child3.setFlexBasisPercent(0);
- child3.setWidth(50);
- root.insertChild(child3, 3);
-
- const child4 = Yoga.Node.create();
- child4.setWidth(50);
- root.insertChild(child4, 4);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(120);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(40);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(40);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(40);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(80);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(0);
-
- expect(child3.getComputedLayout().left).toBe(0);
- expect(child3.getComputedLayout().top).toBe(80);
- expect(child3.getComputedLayout().width).toBe(50);
- expect(child3.getComputedLayout().height).toBe(40);
-
- expect(child4.getComputedLayout().left).toBe(0);
- expect(child4.getComputedLayout().top).toBe(120);
- expect(child4.getComputedLayout().width).toBe(50);
- expect(child4.getComputedLayout().height).toBe(0);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(120);
-
- expect(child0.getComputedLayout().left).toBe(50);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(40);
-
- expect(child1.getComputedLayout().left).toBe(50);
- expect(child1.getComputedLayout().top).toBe(40);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(40);
-
- expect(child2.getComputedLayout().left).toBe(50);
- expect(child2.getComputedLayout().top).toBe(80);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(0);
-
- expect(child3.getComputedLayout().left).toBe(50);
- expect(child3.getComputedLayout().top).toBe(80);
- expect(child3.getComputedLayout().width).toBe(50);
- expect(child3.getComputedLayout().height).toBe(40);
-
- expect(child4.getComputedLayout().left).toBe(50);
- expect(child4.getComputedLayout().top).toBe(120);
- expect(child4.getComputedLayout().width).toBe(50);
- expect(child4.getComputedLayout().height).toBe(0);
- });
-
- test('align content flex end', () => {
- const root = Yoga.Node.create();
- root.setAlignContent(Yoga.ALIGN_FLEX_END);
- root.setFlexWrap(Yoga.WRAP_WRAP);
- root.setWidth(100);
- root.setHeight(100);
-
- const child0 = Yoga.Node.create();
- child0.setWidth(50);
- child0.setHeight(10);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(50);
- child1.setHeight(10);
- root.insertChild(child1, 1);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(50);
- child2.setHeight(10);
- root.insertChild(child2, 2);
-
- const child3 = Yoga.Node.create();
- child3.setWidth(50);
- child3.setHeight(10);
- root.insertChild(child3, 3);
-
- const child4 = Yoga.Node.create();
- child4.setWidth(50);
- child4.setHeight(10);
- root.insertChild(child4, 4);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(50);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(10);
-
- expect(child1.getComputedLayout().left).toBe(50);
- expect(child1.getComputedLayout().top).toBe(10);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(10);
-
- expect(child2.getComputedLayout().left).toBe(50);
- expect(child2.getComputedLayout().top).toBe(20);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(10);
-
- expect(child3.getComputedLayout().left).toBe(50);
- expect(child3.getComputedLayout().top).toBe(30);
- expect(child3.getComputedLayout().width).toBe(50);
- expect(child3.getComputedLayout().height).toBe(10);
-
- expect(child4.getComputedLayout().left).toBe(50);
- expect(child4.getComputedLayout().top).toBe(40);
- expect(child4.getComputedLayout().width).toBe(50);
- expect(child4.getComputedLayout().height).toBe(10);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(10);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(10);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(10);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(20);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(10);
-
- expect(child3.getComputedLayout().left).toBe(0);
- expect(child3.getComputedLayout().top).toBe(30);
- expect(child3.getComputedLayout().width).toBe(50);
- expect(child3.getComputedLayout().height).toBe(10);
-
- expect(child4.getComputedLayout().left).toBe(0);
- expect(child4.getComputedLayout().top).toBe(40);
- expect(child4.getComputedLayout().width).toBe(50);
- expect(child4.getComputedLayout().height).toBe(10);
- });
-
- test('align content stretch', () => {
- const root = Yoga.Node.create();
- root.setAlignContent(Yoga.ALIGN_STRETCH);
- root.setFlexWrap(Yoga.WRAP_WRAP);
- root.setWidth(150);
- root.setHeight(100);
-
- const child0 = Yoga.Node.create();
- child0.setWidth(50);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(50);
- root.insertChild(child1, 1);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(50);
- root.insertChild(child2, 2);
-
- const child3 = Yoga.Node.create();
- child3.setWidth(50);
- root.insertChild(child3, 3);
-
- const child4 = Yoga.Node.create();
- child4.setWidth(50);
- root.insertChild(child4, 4);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(150);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(0);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(0);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(0);
-
- expect(child3.getComputedLayout().left).toBe(0);
- expect(child3.getComputedLayout().top).toBe(0);
- expect(child3.getComputedLayout().width).toBe(50);
- expect(child3.getComputedLayout().height).toBe(0);
-
- expect(child4.getComputedLayout().left).toBe(0);
- expect(child4.getComputedLayout().top).toBe(0);
- expect(child4.getComputedLayout().width).toBe(50);
- expect(child4.getComputedLayout().height).toBe(0);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(150);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(100);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(0);
-
- expect(child1.getComputedLayout().left).toBe(100);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(0);
-
- expect(child2.getComputedLayout().left).toBe(100);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(0);
-
- expect(child3.getComputedLayout().left).toBe(100);
- expect(child3.getComputedLayout().top).toBe(0);
- expect(child3.getComputedLayout().width).toBe(50);
- expect(child3.getComputedLayout().height).toBe(0);
-
- expect(child4.getComputedLayout().left).toBe(100);
- expect(child4.getComputedLayout().top).toBe(0);
- expect(child4.getComputedLayout().width).toBe(50);
- expect(child4.getComputedLayout().height).toBe(0);
- });
-
- test('align content spacebetween', () => {
- const root = Yoga.Node.create();
-
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setAlignContent(Yoga.ALIGN_SPACE_BETWEEN);
- root.setFlexWrap(Yoga.WRAP_WRAP);
- root.setWidth(130);
- root.setHeight(100);
-
- const child0 = Yoga.Node.create();
- child0.setWidth(50);
- child0.setHeight(10);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(50);
- child1.setHeight(10);
- root.insertChild(child1, 1);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(50);
- child2.setHeight(10);
- root.insertChild(child2, 2);
-
- const child3 = Yoga.Node.create();
- child3.setWidth(50);
- child3.setHeight(10);
- root.insertChild(child3, 3);
-
- const child4 = Yoga.Node.create();
- child4.setWidth(50);
- child4.setHeight(10);
- root.insertChild(child4, 4);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(130);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(10);
-
- expect(child1.getComputedLayout().left).toBe(50);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(10);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(45);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(10);
-
- expect(child3.getComputedLayout().left).toBe(50);
- expect(child3.getComputedLayout().top).toBe(45);
- expect(child3.getComputedLayout().width).toBe(50);
- expect(child3.getComputedLayout().height).toBe(10);
-
- expect(child4.getComputedLayout().left).toBe(0);
- expect(child4.getComputedLayout().top).toBe(90);
- expect(child4.getComputedLayout().width).toBe(50);
- expect(child4.getComputedLayout().height).toBe(10);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(130);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(80);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(10);
-
- expect(child1.getComputedLayout().left).toBe(30);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(10);
-
- expect(child2.getComputedLayout().left).toBe(80);
- expect(child2.getComputedLayout().top).toBe(45);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(10);
-
- expect(child3.getComputedLayout().left).toBe(30);
- expect(child3.getComputedLayout().top).toBe(45);
- expect(child3.getComputedLayout().width).toBe(50);
- expect(child3.getComputedLayout().height).toBe(10);
-
- expect(child4.getComputedLayout().left).toBe(80);
- expect(child4.getComputedLayout().top).toBe(90);
- expect(child4.getComputedLayout().width).toBe(50);
- expect(child4.getComputedLayout().height).toBe(10);
- });
-
- test('align content spacearound', () => {
- const root = Yoga.Node.create();
-
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setAlignContent(Yoga.ALIGN_SPACE_AROUND);
- root.setFlexWrap(Yoga.WRAP_WRAP);
- root.setWidth(140);
- root.setHeight(120);
-
- const child0 = Yoga.Node.create();
- child0.setWidth(50);
- child0.setHeight(10);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(50);
- child1.setHeight(10);
- root.insertChild(child1, 1);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(50);
- child2.setHeight(10);
- root.insertChild(child2, 2);
-
- const child3 = Yoga.Node.create();
- child3.setWidth(50);
- child3.setHeight(10);
- root.insertChild(child3, 3);
-
- const child4 = Yoga.Node.create();
- child4.setWidth(50);
- child4.setHeight(10);
- root.insertChild(child4, 4);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(140);
- expect(root.getComputedLayout().height).toBe(120);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(15);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(10);
-
- expect(child1.getComputedLayout().left).toBe(50);
- expect(child1.getComputedLayout().top).toBe(15);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(10);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(55);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(10);
-
- expect(child3.getComputedLayout().left).toBe(50);
- expect(child3.getComputedLayout().top).toBe(55);
- expect(child3.getComputedLayout().width).toBe(50);
- expect(child3.getComputedLayout().height).toBe(10);
-
- expect(child4.getComputedLayout().left).toBe(0);
- expect(child4.getComputedLayout().top).toBe(95);
- expect(child4.getComputedLayout().width).toBe(50);
- expect(child4.getComputedLayout().height).toBe(10);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(140);
- expect(root.getComputedLayout().height).toBe(120);
-
- expect(child0.getComputedLayout().left).toBe(90);
- expect(child0.getComputedLayout().top).toBe(15);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(10);
-
- expect(child1.getComputedLayout().left).toBe(40);
- expect(child1.getComputedLayout().top).toBe(15);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(10);
-
- expect(child2.getComputedLayout().left).toBe(90);
- expect(child2.getComputedLayout().top).toBe(55);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(10);
-
- expect(child3.getComputedLayout().left).toBe(40);
- expect(child3.getComputedLayout().top).toBe(55);
- expect(child3.getComputedLayout().width).toBe(50);
- expect(child3.getComputedLayout().height).toBe(10);
-
- expect(child4.getComputedLayout().left).toBe(90);
- expect(child4.getComputedLayout().top).toBe(95);
- expect(child4.getComputedLayout().width).toBe(50);
- expect(child4.getComputedLayout().height).toBe(10);
- });
-
- test('align content stretch row', () => {
- const root = Yoga.Node.create();
-
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setAlignContent(Yoga.ALIGN_STRETCH);
- root.setFlexWrap(Yoga.WRAP_WRAP);
- root.setWidth(150);
- root.setHeight(100);
-
- const child0 = Yoga.Node.create();
- child0.setWidth(50);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(50);
- root.insertChild(child1, 1);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(50);
- root.insertChild(child2, 2);
-
- const child3 = Yoga.Node.create();
- child3.setWidth(50);
- root.insertChild(child3, 3);
-
- const child4 = Yoga.Node.create();
- child4.setWidth(50);
- root.insertChild(child4, 4);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(150);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(50);
-
- expect(child1.getComputedLayout().left).toBe(50);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
-
- expect(child2.getComputedLayout().left).toBe(100);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(50);
-
- expect(child3.getComputedLayout().left).toBe(0);
- expect(child3.getComputedLayout().top).toBe(50);
- expect(child3.getComputedLayout().width).toBe(50);
- expect(child3.getComputedLayout().height).toBe(50);
-
- expect(child4.getComputedLayout().left).toBe(50);
- expect(child4.getComputedLayout().top).toBe(50);
- expect(child4.getComputedLayout().width).toBe(50);
- expect(child4.getComputedLayout().height).toBe(50);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(150);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(100);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(50);
-
- expect(child1.getComputedLayout().left).toBe(50);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(50);
-
- expect(child3.getComputedLayout().left).toBe(100);
- expect(child3.getComputedLayout().top).toBe(50);
- expect(child3.getComputedLayout().width).toBe(50);
- expect(child3.getComputedLayout().height).toBe(50);
-
- expect(child4.getComputedLayout().left).toBe(50);
- expect(child4.getComputedLayout().top).toBe(50);
- expect(child4.getComputedLayout().width).toBe(50);
- expect(child4.getComputedLayout().height).toBe(50);
- });
-
- test('align content stretch row with children', () => {
- const root = Yoga.Node.create();
-
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setAlignContent(Yoga.ALIGN_STRETCH);
- root.setFlexWrap(Yoga.WRAP_WRAP);
- root.setWidth(150);
- root.setHeight(100);
-
- const child0 = Yoga.Node.create();
- child0.setWidth(50);
- root.insertChild(child0, 0);
-
- const child00 = Yoga.Node.create();
- child00.setFlexGrow(1);
- child00.setFlexShrink(1);
- child00.setFlexBasisPercent(0);
- child0.insertChild(child00, 0);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(50);
- root.insertChild(child1, 1);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(50);
- root.insertChild(child2, 2);
-
- const child3 = Yoga.Node.create();
- child3.setWidth(50);
- root.insertChild(child3, 3);
-
- const child4 = Yoga.Node.create();
- child4.setWidth(50);
- root.insertChild(child4, 4);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(150);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(50);
-
- expect(child00.getComputedLayout().left).toBe(0);
- expect(child00.getComputedLayout().top).toBe(0);
- expect(child00.getComputedLayout().width).toBe(50);
- expect(child00.getComputedLayout().height).toBe(50);
-
- expect(child1.getComputedLayout().left).toBe(50);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
-
- expect(child2.getComputedLayout().left).toBe(100);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(50);
-
- expect(child3.getComputedLayout().left).toBe(0);
- expect(child3.getComputedLayout().top).toBe(50);
- expect(child3.getComputedLayout().width).toBe(50);
- expect(child3.getComputedLayout().height).toBe(50);
-
- expect(child4.getComputedLayout().left).toBe(50);
- expect(child4.getComputedLayout().top).toBe(50);
- expect(child4.getComputedLayout().width).toBe(50);
- expect(child4.getComputedLayout().height).toBe(50);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(150);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(100);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(50);
-
- expect(child00.getComputedLayout().left).toBe(0);
- expect(child00.getComputedLayout().top).toBe(0);
- expect(child00.getComputedLayout().width).toBe(50);
- expect(child00.getComputedLayout().height).toBe(50);
-
- expect(child1.getComputedLayout().left).toBe(50);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(50);
-
- expect(child3.getComputedLayout().left).toBe(100);
- expect(child3.getComputedLayout().top).toBe(50);
- expect(child3.getComputedLayout().width).toBe(50);
- expect(child3.getComputedLayout().height).toBe(50);
-
- expect(child4.getComputedLayout().left).toBe(50);
- expect(child4.getComputedLayout().top).toBe(50);
- expect(child4.getComputedLayout().width).toBe(50);
- expect(child4.getComputedLayout().height).toBe(50);
- });
-
- test('align content stretch row with flex', () => {
- const root = Yoga.Node.create();
-
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setAlignContent(Yoga.ALIGN_STRETCH);
- root.setFlexWrap(Yoga.WRAP_WRAP);
- root.setWidth(150);
- root.setHeight(100);
-
- const child0 = Yoga.Node.create();
- child0.setWidth(50);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setFlexGrow(1);
- child1.setFlexShrink(1);
- child1.setFlexBasisPercent(0);
- child1.setWidth(50);
- root.insertChild(child1, 1);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(50);
- root.insertChild(child2, 2);
-
- const child3 = Yoga.Node.create();
- child3.setFlexGrow(1);
- child3.setFlexShrink(1);
- child3.setFlexBasisPercent(0);
- child3.setWidth(50);
- root.insertChild(child3, 3);
-
- const child4 = Yoga.Node.create();
- child4.setWidth(50);
- root.insertChild(child4, 4);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(150);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(50);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(0);
- expect(child1.getComputedLayout().height).toBe(100);
-
- expect(child2.getComputedLayout().left).toBe(50);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(100);
-
- expect(child3.getComputedLayout().left).toBe(100);
- expect(child3.getComputedLayout().top).toBe(0);
- expect(child3.getComputedLayout().width).toBe(0);
- expect(child3.getComputedLayout().height).toBe(100);
-
- expect(child4.getComputedLayout().left).toBe(100);
- expect(child4.getComputedLayout().top).toBe(0);
- expect(child4.getComputedLayout().width).toBe(50);
- expect(child4.getComputedLayout().height).toBe(100);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(150);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(100);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(100);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(0);
- expect(child1.getComputedLayout().height).toBe(100);
-
- expect(child2.getComputedLayout().left).toBe(50);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(100);
-
- expect(child3.getComputedLayout().left).toBe(50);
- expect(child3.getComputedLayout().top).toBe(0);
- expect(child3.getComputedLayout().width).toBe(0);
- expect(child3.getComputedLayout().height).toBe(100);
-
- expect(child4.getComputedLayout().left).toBe(0);
- expect(child4.getComputedLayout().top).toBe(0);
- expect(child4.getComputedLayout().width).toBe(50);
- expect(child4.getComputedLayout().height).toBe(100);
- });
-
- test('align content stretch row with flex no shrink', () => {
- const root = Yoga.Node.create();
-
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setAlignContent(Yoga.ALIGN_STRETCH);
- root.setFlexWrap(Yoga.WRAP_WRAP);
- root.setWidth(150);
- root.setHeight(100);
-
- const child0 = Yoga.Node.create();
- child0.setWidth(50);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setFlexGrow(1);
- child1.setFlexShrink(1);
- child1.setFlexBasisPercent(0);
- child1.setWidth(50);
- root.insertChild(child1, 1);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(50);
- root.insertChild(child2, 2);
-
- const child3 = Yoga.Node.create();
- child3.setFlexGrow(1);
- child3.setFlexBasisPercent(0);
- child3.setWidth(50);
- root.insertChild(child3, 3);
-
- const child4 = Yoga.Node.create();
- child4.setWidth(50);
- root.insertChild(child4, 4);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(150);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(50);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(0);
- expect(child1.getComputedLayout().height).toBe(100);
-
- expect(child2.getComputedLayout().left).toBe(50);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(100);
-
- expect(child3.getComputedLayout().left).toBe(100);
- expect(child3.getComputedLayout().top).toBe(0);
- expect(child3.getComputedLayout().width).toBe(0);
- expect(child3.getComputedLayout().height).toBe(100);
-
- expect(child4.getComputedLayout().left).toBe(100);
- expect(child4.getComputedLayout().top).toBe(0);
- expect(child4.getComputedLayout().width).toBe(50);
- expect(child4.getComputedLayout().height).toBe(100);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(150);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(100);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(100);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(0);
- expect(child1.getComputedLayout().height).toBe(100);
-
- expect(child2.getComputedLayout().left).toBe(50);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(100);
-
- expect(child3.getComputedLayout().left).toBe(50);
- expect(child3.getComputedLayout().top).toBe(0);
- expect(child3.getComputedLayout().width).toBe(0);
- expect(child3.getComputedLayout().height).toBe(100);
-
- expect(child4.getComputedLayout().left).toBe(0);
- expect(child4.getComputedLayout().top).toBe(0);
- expect(child4.getComputedLayout().width).toBe(50);
- expect(child4.getComputedLayout().height).toBe(100);
- });
-
- test('align content stretch row with margin', () => {
- const root = Yoga.Node.create();
-
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setAlignContent(Yoga.ALIGN_STRETCH);
- root.setFlexWrap(Yoga.WRAP_WRAP);
- root.setWidth(150);
- root.setHeight(100);
-
- const child0 = Yoga.Node.create();
- child0.setWidth(50);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setMargin(Yoga.EDGE_LEFT, 10);
- child1.setMargin(Yoga.EDGE_TOP, 10);
- child1.setMargin(Yoga.EDGE_RIGHT, 10);
- child1.setMargin(Yoga.EDGE_BOTTOM, 10);
- child1.setWidth(50);
- root.insertChild(child1, 1);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(50);
- root.insertChild(child2, 2);
-
- const child3 = Yoga.Node.create();
- child3.setMargin(Yoga.EDGE_LEFT, 10);
- child3.setMargin(Yoga.EDGE_TOP, 10);
- child3.setMargin(Yoga.EDGE_RIGHT, 10);
- child3.setMargin(Yoga.EDGE_BOTTOM, 10);
- child3.setWidth(50);
- root.insertChild(child3, 3);
-
- const child4 = Yoga.Node.create();
- child4.setWidth(50);
- root.insertChild(child4, 4);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(150);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(40);
-
- expect(child1.getComputedLayout().left).toBe(60);
- expect(child1.getComputedLayout().top).toBe(10);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(20);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(40);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(40);
-
- expect(child3.getComputedLayout().left).toBe(60);
- expect(child3.getComputedLayout().top).toBe(50);
- expect(child3.getComputedLayout().width).toBe(50);
- expect(child3.getComputedLayout().height).toBe(20);
-
- expect(child4.getComputedLayout().left).toBe(0);
- expect(child4.getComputedLayout().top).toBe(80);
- expect(child4.getComputedLayout().width).toBe(50);
- expect(child4.getComputedLayout().height).toBe(20);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(150);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(100);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(40);
-
- expect(child1.getComputedLayout().left).toBe(40);
- expect(child1.getComputedLayout().top).toBe(10);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(20);
-
- expect(child2.getComputedLayout().left).toBe(100);
- expect(child2.getComputedLayout().top).toBe(40);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(40);
-
- expect(child3.getComputedLayout().left).toBe(40);
- expect(child3.getComputedLayout().top).toBe(50);
- expect(child3.getComputedLayout().width).toBe(50);
- expect(child3.getComputedLayout().height).toBe(20);
-
- expect(child4.getComputedLayout().left).toBe(100);
- expect(child4.getComputedLayout().top).toBe(80);
- expect(child4.getComputedLayout().width).toBe(50);
- expect(child4.getComputedLayout().height).toBe(20);
- });
-
- test('align content stretch row with padding', () => {
- const root = Yoga.Node.create();
-
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setAlignContent(Yoga.ALIGN_STRETCH);
- root.setFlexWrap(Yoga.WRAP_WRAP);
- root.setWidth(150);
- root.setHeight(100);
-
- const child0 = Yoga.Node.create();
- child0.setWidth(50);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setPadding(Yoga.EDGE_LEFT, 10);
- child1.setPadding(Yoga.EDGE_TOP, 10);
- child1.setPadding(Yoga.EDGE_RIGHT, 10);
- child1.setPadding(Yoga.EDGE_BOTTOM, 10);
- child1.setWidth(50);
- root.insertChild(child1, 1);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(50);
- root.insertChild(child2, 2);
-
- const child3 = Yoga.Node.create();
- child3.setPadding(Yoga.EDGE_LEFT, 10);
- child3.setPadding(Yoga.EDGE_TOP, 10);
- child3.setPadding(Yoga.EDGE_RIGHT, 10);
- child3.setPadding(Yoga.EDGE_BOTTOM, 10);
- child3.setWidth(50);
- root.insertChild(child3, 3);
-
- const child4 = Yoga.Node.create();
- child4.setWidth(50);
- root.insertChild(child4, 4);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(150);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(50);
-
- expect(child1.getComputedLayout().left).toBe(50);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
-
- expect(child2.getComputedLayout().left).toBe(100);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(50);
-
- expect(child3.getComputedLayout().left).toBe(0);
- expect(child3.getComputedLayout().top).toBe(50);
- expect(child3.getComputedLayout().width).toBe(50);
- expect(child3.getComputedLayout().height).toBe(50);
-
- expect(child4.getComputedLayout().left).toBe(50);
- expect(child4.getComputedLayout().top).toBe(50);
- expect(child4.getComputedLayout().width).toBe(50);
- expect(child4.getComputedLayout().height).toBe(50);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(150);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(100);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(50);
-
- expect(child1.getComputedLayout().left).toBe(50);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(50);
-
- expect(child3.getComputedLayout().left).toBe(100);
- expect(child3.getComputedLayout().top).toBe(50);
- expect(child3.getComputedLayout().width).toBe(50);
- expect(child3.getComputedLayout().height).toBe(50);
-
- expect(child4.getComputedLayout().left).toBe(50);
- expect(child4.getComputedLayout().top).toBe(50);
- expect(child4.getComputedLayout().width).toBe(50);
- expect(child4.getComputedLayout().height).toBe(50);
- });
-
- test('align content stretch row with single row', () => {
- const root = Yoga.Node.create();
-
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setAlignContent(Yoga.ALIGN_STRETCH);
- root.setFlexWrap(Yoga.WRAP_WRAP);
- root.setWidth(150);
- root.setHeight(100);
-
- const child0 = Yoga.Node.create();
- child0.setWidth(50);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(50);
- root.insertChild(child1, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(150);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(50);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(100);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(150);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(100);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(50);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(100);
- });
-
- test('align content stretch row with fixed height', () => {
- const root = Yoga.Node.create();
-
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setAlignContent(Yoga.ALIGN_STRETCH);
- root.setFlexWrap(Yoga.WRAP_WRAP);
- root.setWidth(150);
- root.setHeight(100);
-
- const child0 = Yoga.Node.create();
- child0.setWidth(50);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(50);
- child1.setHeight(60);
- root.insertChild(child1, 1);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(50);
- root.insertChild(child2, 2);
-
- const child3 = Yoga.Node.create();
- child3.setWidth(50);
- root.insertChild(child3, 3);
-
- const child4 = Yoga.Node.create();
- child4.setWidth(50);
- root.insertChild(child4, 4);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(150);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(80);
-
- expect(child1.getComputedLayout().left).toBe(50);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(60);
-
- expect(child2.getComputedLayout().left).toBe(100);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(80);
-
- expect(child3.getComputedLayout().left).toBe(0);
- expect(child3.getComputedLayout().top).toBe(80);
- expect(child3.getComputedLayout().width).toBe(50);
- expect(child3.getComputedLayout().height).toBe(20);
-
- expect(child4.getComputedLayout().left).toBe(50);
- expect(child4.getComputedLayout().top).toBe(80);
- expect(child4.getComputedLayout().width).toBe(50);
- expect(child4.getComputedLayout().height).toBe(20);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(150);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(100);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(80);
-
- expect(child1.getComputedLayout().left).toBe(50);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(60);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(80);
-
- expect(child3.getComputedLayout().left).toBe(100);
- expect(child3.getComputedLayout().top).toBe(80);
- expect(child3.getComputedLayout().width).toBe(50);
- expect(child3.getComputedLayout().height).toBe(20);
-
- expect(child4.getComputedLayout().left).toBe(50);
- expect(child4.getComputedLayout().top).toBe(80);
- expect(child4.getComputedLayout().width).toBe(50);
- expect(child4.getComputedLayout().height).toBe(20);
- });
-
- test('align content stretch row with max height', () => {
- const root = Yoga.Node.create();
-
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setAlignContent(Yoga.ALIGN_STRETCH);
- root.setFlexWrap(Yoga.WRAP_WRAP);
- root.setWidth(150);
- root.setHeight(100);
-
- const child0 = Yoga.Node.create();
- child0.setWidth(50);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(50);
- child1.setMaxHeight(20);
- root.insertChild(child1, 1);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(50);
- root.insertChild(child2, 2);
-
- const child3 = Yoga.Node.create();
- child3.setWidth(50);
- root.insertChild(child3, 3);
-
- const child4 = Yoga.Node.create();
- child4.setWidth(50);
- root.insertChild(child4, 4);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(150);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(50);
-
- expect(child1.getComputedLayout().left).toBe(50);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(20);
-
- expect(child2.getComputedLayout().left).toBe(100);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(50);
-
- expect(child3.getComputedLayout().left).toBe(0);
- expect(child3.getComputedLayout().top).toBe(50);
- expect(child3.getComputedLayout().width).toBe(50);
- expect(child3.getComputedLayout().height).toBe(50);
-
- expect(child4.getComputedLayout().left).toBe(50);
- expect(child4.getComputedLayout().top).toBe(50);
- expect(child4.getComputedLayout().width).toBe(50);
- expect(child4.getComputedLayout().height).toBe(50);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(150);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(100);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(50);
-
- expect(child1.getComputedLayout().left).toBe(50);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(20);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(50);
-
- expect(child3.getComputedLayout().left).toBe(100);
- expect(child3.getComputedLayout().top).toBe(50);
- expect(child3.getComputedLayout().width).toBe(50);
- expect(child3.getComputedLayout().height).toBe(50);
-
- expect(child4.getComputedLayout().left).toBe(50);
- expect(child4.getComputedLayout().top).toBe(50);
- expect(child4.getComputedLayout().width).toBe(50);
- expect(child4.getComputedLayout().height).toBe(50);
- });
-
- test('align content stretch row with min height', () => {
- const root = Yoga.Node.create();
-
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setAlignContent(Yoga.ALIGN_STRETCH);
- root.setFlexWrap(Yoga.WRAP_WRAP);
- root.setWidth(150);
- root.setHeight(100);
-
- const child0 = Yoga.Node.create();
- child0.setWidth(50);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(50);
- child1.setMinHeight(80);
- root.insertChild(child1, 1);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(50);
- root.insertChild(child2, 2);
-
- const child3 = Yoga.Node.create();
- child3.setWidth(50);
- root.insertChild(child3, 3);
-
- const child4 = Yoga.Node.create();
- child4.setWidth(50);
- root.insertChild(child4, 4);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(150);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(90);
-
- expect(child1.getComputedLayout().left).toBe(50);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(90);
-
- expect(child2.getComputedLayout().left).toBe(100);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(90);
-
- expect(child3.getComputedLayout().left).toBe(0);
- expect(child3.getComputedLayout().top).toBe(90);
- expect(child3.getComputedLayout().width).toBe(50);
- expect(child3.getComputedLayout().height).toBe(10);
-
- expect(child4.getComputedLayout().left).toBe(50);
- expect(child4.getComputedLayout().top).toBe(90);
- expect(child4.getComputedLayout().width).toBe(50);
- expect(child4.getComputedLayout().height).toBe(10);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(150);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(100);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(90);
-
- expect(child1.getComputedLayout().left).toBe(50);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(90);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(90);
-
- expect(child3.getComputedLayout().left).toBe(100);
- expect(child3.getComputedLayout().top).toBe(90);
- expect(child3.getComputedLayout().width).toBe(50);
- expect(child3.getComputedLayout().height).toBe(10);
-
- expect(child4.getComputedLayout().left).toBe(50);
- expect(child4.getComputedLayout().top).toBe(90);
- expect(child4.getComputedLayout().width).toBe(50);
- expect(child4.getComputedLayout().height).toBe(10);
- });
-
- test('align content stretch column', () => {
- const root = Yoga.Node.create();
- root.setAlignContent(Yoga.ALIGN_STRETCH);
- root.setFlexWrap(Yoga.WRAP_WRAP);
- root.setWidth(100);
- root.setHeight(150);
-
- const child0 = Yoga.Node.create();
- child0.setHeight(50);
- root.insertChild(child0, 0);
-
- const child00 = Yoga.Node.create();
- child00.setFlexGrow(1);
- child00.setFlexShrink(1);
- child00.setFlexBasisPercent(0);
- child0.insertChild(child00, 0);
-
- const child1 = Yoga.Node.create();
- child1.setFlexGrow(1);
- child1.setFlexShrink(1);
- child1.setFlexBasisPercent(0);
- child1.setHeight(50);
- root.insertChild(child1, 1);
-
- const child2 = Yoga.Node.create();
- child2.setHeight(50);
- root.insertChild(child2, 2);
-
- const child3 = Yoga.Node.create();
- child3.setHeight(50);
- root.insertChild(child3, 3);
-
- const child4 = Yoga.Node.create();
- child4.setHeight(50);
- root.insertChild(child4, 4);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(150);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(50);
-
- expect(child00.getComputedLayout().left).toBe(0);
- expect(child00.getComputedLayout().top).toBe(0);
- expect(child00.getComputedLayout().width).toBe(50);
- expect(child00.getComputedLayout().height).toBe(50);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(50);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(0);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(50);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(50);
-
- expect(child3.getComputedLayout().left).toBe(0);
- expect(child3.getComputedLayout().top).toBe(100);
- expect(child3.getComputedLayout().width).toBe(50);
- expect(child3.getComputedLayout().height).toBe(50);
-
- expect(child4.getComputedLayout().left).toBe(50);
- expect(child4.getComputedLayout().top).toBe(0);
- expect(child4.getComputedLayout().width).toBe(50);
- expect(child4.getComputedLayout().height).toBe(50);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(150);
-
- expect(child0.getComputedLayout().left).toBe(50);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(50);
-
- expect(child00.getComputedLayout().left).toBe(0);
- expect(child00.getComputedLayout().top).toBe(0);
- expect(child00.getComputedLayout().width).toBe(50);
- expect(child00.getComputedLayout().height).toBe(50);
-
- expect(child1.getComputedLayout().left).toBe(50);
- expect(child1.getComputedLayout().top).toBe(50);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(0);
-
- expect(child2.getComputedLayout().left).toBe(50);
- expect(child2.getComputedLayout().top).toBe(50);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(50);
-
- expect(child3.getComputedLayout().left).toBe(50);
- expect(child3.getComputedLayout().top).toBe(100);
- expect(child3.getComputedLayout().width).toBe(50);
- expect(child3.getComputedLayout().height).toBe(50);
-
- expect(child4.getComputedLayout().left).toBe(0);
- expect(child4.getComputedLayout().top).toBe(0);
- expect(child4.getComputedLayout().width).toBe(50);
- expect(child4.getComputedLayout().height).toBe(50);
- });
-
- test('align content stretch is not overriding align items', () => {
- const root = Yoga.Node.create();
- root.setAlignContent(Yoga.ALIGN_STRETCH);
-
- const child0 = Yoga.Node.create();
- child0.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- child0.setAlignContent(Yoga.ALIGN_STRETCH);
- child0.setAlignItems(Yoga.ALIGN_CENTER);
- child0.setWidth(100);
- child0.setHeight(100);
- root.insertChild(child0, 0);
-
- const child00 = Yoga.Node.create();
- child00.setAlignContent(Yoga.ALIGN_STRETCH);
- child00.setWidth(10);
- child00.setHeight(10);
- child0.insertChild(child00, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(100);
- expect(child0.getComputedLayout().height).toBe(100);
-
- expect(child00.getComputedLayout().left).toBe(0);
- expect(child00.getComputedLayout().top).toBe(45);
- expect(child00.getComputedLayout().width).toBe(10);
- expect(child00.getComputedLayout().height).toBe(10);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(100);
- expect(child0.getComputedLayout().height).toBe(100);
-
- expect(child00.getComputedLayout().left).toBe(90);
- expect(child00.getComputedLayout().top).toBe(45);
- expect(child00.getComputedLayout().width).toBe(10);
- expect(child00.getComputedLayout().height).toBe(10);
- });
-});
diff --git a/packages/yoga/tests/alignItems.test.js b/packages/yoga/tests/alignItems.test.js
deleted file mode 100644
index a0f224611..000000000
--- a/packages/yoga/tests/alignItems.test.js
+++ /dev/null
@@ -1,2010 +0,0 @@
-const Yoga = require('..');
-
-describe('Align items', () => {
- test('align items stretch', () => {
- const root = Yoga.Node.create();
-
- root.setWidth(100);
- root.setHeight(100);
-
- const child1 = Yoga.Node.create();
- child1.setHeight(10);
- root.insertChild(child1, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(100);
- expect(child1.getComputedLayout().height).toBe(10);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(100);
- expect(child1.getComputedLayout().height).toBe(10);
- });
-
- test('align items center', () => {
- const root = Yoga.Node.create();
-
- root.setAlignItems(Yoga.ALIGN_CENTER);
- root.setWidth(100);
- root.setHeight(100);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(10);
- child1.setHeight(10);
- root.insertChild(child1, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(45);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(10);
- expect(child1.getComputedLayout().height).toBe(10);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(45);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(10);
- expect(child1.getComputedLayout().height).toBe(10);
- });
-
- test('align items flex start', () => {
- const root = Yoga.Node.create();
-
- root.setAlignItems(Yoga.ALIGN_FLEX_START);
- root.setWidth(100);
- root.setHeight(100);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(10);
- child1.setHeight(10);
- root.insertChild(child1, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(10);
- expect(child1.getComputedLayout().height).toBe(10);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(90);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(10);
- expect(child1.getComputedLayout().height).toBe(10);
- });
-
- test('align items flex end', () => {
- const root = Yoga.Node.create();
-
- root.setAlignItems(Yoga.ALIGN_FLEX_END);
- root.setWidth(100);
- root.setHeight(100);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(10);
- child1.setHeight(10);
- root.insertChild(child1, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(90);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(10);
- expect(child1.getComputedLayout().height).toBe(10);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(10);
- expect(child1.getComputedLayout().height).toBe(10);
- });
-
- test('align baseline', () => {
- const root = Yoga.Node.create();
-
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setAlignItems(Yoga.ALIGN_BASELINE);
- root.setWidth(100);
- root.setHeight(100);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(50);
- child1.setHeight(50);
- root.insertChild(child1, 0);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(50);
- child2.setHeight(20);
- root.insertChild(child2, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
-
- expect(child2.getComputedLayout().left).toBe(50);
- expect(child2.getComputedLayout().top).toBe(30);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(20);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(50);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(30);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(20);
- });
-
- test('align baseline child', () => {
- const root = Yoga.Node.create();
-
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setAlignItems(Yoga.ALIGN_BASELINE);
- root.setWidth(100);
- root.setHeight(100);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(50);
- child1.setHeight(50);
- root.insertChild(child1, 0);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(50);
- child2.setHeight(20);
- root.insertChild(child2, 1);
-
- const child3 = Yoga.Node.create();
- child3.setWidth(50);
- child3.setHeight(10);
- child2.insertChild(child3, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
-
- expect(child2.getComputedLayout().left).toBe(50);
- expect(child2.getComputedLayout().top).toBe(40);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(20);
-
- expect(child3.getComputedLayout().left).toBe(0);
- expect(child3.getComputedLayout().top).toBe(0);
- expect(child3.getComputedLayout().width).toBe(50);
- expect(child3.getComputedLayout().height).toBe(10);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(50);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(40);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(20);
-
- expect(child3.getComputedLayout().left).toBe(0);
- expect(child3.getComputedLayout().top).toBe(0);
- expect(child3.getComputedLayout().width).toBe(50);
- expect(child3.getComputedLayout().height).toBe(10);
- });
-
- test('align baseline child multiline', () => {
- const root = Yoga.Node.create();
-
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setAlignItems(Yoga.ALIGN_BASELINE);
- root.setWidth(100);
- root.setHeight(100);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(50);
- child1.setHeight(60);
- root.insertChild(child1, 0);
-
- const child2 = Yoga.Node.create();
- child2.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- child2.setFlexWrap(Yoga.WRAP_WRAP);
- child2.setWidth(50);
- child2.setHeight(25);
- root.insertChild(child2, 1);
-
- const child3 = Yoga.Node.create();
- child3.setWidth(25);
- child3.setHeight(20);
- child2.insertChild(child3, 0);
-
- const child4 = Yoga.Node.create();
- child4.setWidth(25);
- child4.setHeight(10);
- child2.insertChild(child4, 1);
-
- const child5 = Yoga.Node.create();
- child5.setWidth(25);
- child5.setHeight(20);
- child2.insertChild(child5, 2);
-
- const child6 = Yoga.Node.create();
- child6.setWidth(25);
- child6.setHeight(10);
- child2.insertChild(child6, 3);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(60);
-
- expect(child2.getComputedLayout().left).toBe(50);
- expect(child2.getComputedLayout().top).toBe(40);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(25);
-
- expect(child3.getComputedLayout().left).toBe(0);
- expect(child3.getComputedLayout().top).toBe(0);
- expect(child3.getComputedLayout().width).toBe(25);
- expect(child3.getComputedLayout().height).toBe(20);
-
- expect(child4.getComputedLayout().left).toBe(25);
- expect(child4.getComputedLayout().top).toBe(0);
- expect(child4.getComputedLayout().width).toBe(25);
- expect(child4.getComputedLayout().height).toBe(10);
-
- expect(child5.getComputedLayout().left).toBe(0);
- expect(child5.getComputedLayout().top).toBe(20);
- expect(child5.getComputedLayout().width).toBe(25);
- expect(child5.getComputedLayout().height).toBe(20);
-
- expect(child6.getComputedLayout().left).toBe(25);
- expect(child6.getComputedLayout().top).toBe(20);
- expect(child6.getComputedLayout().width).toBe(25);
- expect(child6.getComputedLayout().height).toBe(10);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(50);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(60);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(40);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(25);
-
- expect(child3.getComputedLayout().left).toBe(25);
- expect(child3.getComputedLayout().top).toBe(0);
- expect(child3.getComputedLayout().width).toBe(25);
- expect(child3.getComputedLayout().height).toBe(20);
-
- expect(child4.getComputedLayout().left).toBe(0);
- expect(child4.getComputedLayout().top).toBe(0);
- expect(child4.getComputedLayout().width).toBe(25);
- expect(child4.getComputedLayout().height).toBe(10);
-
- expect(child5.getComputedLayout().left).toBe(25);
- expect(child5.getComputedLayout().top).toBe(20);
- expect(child5.getComputedLayout().width).toBe(25);
- expect(child5.getComputedLayout().height).toBe(20);
-
- expect(child6.getComputedLayout().left).toBe(0);
- expect(child6.getComputedLayout().top).toBe(20);
- expect(child6.getComputedLayout().width).toBe(25);
- expect(child6.getComputedLayout().height).toBe(10);
- });
-
- test('align baseline child multiline override', () => {
- const root = Yoga.Node.create();
-
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setAlignItems(Yoga.ALIGN_BASELINE);
- root.setWidth(100);
- root.setHeight(100);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(50);
- child1.setHeight(60);
- root.insertChild(child1, 0);
-
- const child2 = Yoga.Node.create();
- child2.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- child2.setFlexWrap(Yoga.WRAP_WRAP);
- child2.setWidth(50);
- child2.setHeight(25);
- root.insertChild(child2, 1);
-
- const child3 = Yoga.Node.create();
- child3.setWidth(25);
- child3.setHeight(20);
- child2.insertChild(child3, 0);
-
- const child4 = Yoga.Node.create();
- child4.setAlignSelf(Yoga.ALIGN_BASELINE);
- child4.setWidth(25);
- child4.setHeight(10);
- child2.insertChild(child4, 1);
-
- const child5 = Yoga.Node.create();
- child5.setWidth(25);
- child5.setHeight(20);
- child2.insertChild(child5, 2);
-
- const child6 = Yoga.Node.create();
- child6.setAlignSelf(Yoga.ALIGN_BASELINE);
- child6.setWidth(25);
- child6.setHeight(10);
- child2.insertChild(child6, 3);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(60);
-
- expect(child2.getComputedLayout().left).toBe(50);
- expect(child2.getComputedLayout().top).toBe(50);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(25);
-
- expect(child3.getComputedLayout().left).toBe(0);
- expect(child3.getComputedLayout().top).toBe(0);
- expect(child3.getComputedLayout().width).toBe(25);
- expect(child3.getComputedLayout().height).toBe(20);
-
- expect(child4.getComputedLayout().left).toBe(25);
- expect(child4.getComputedLayout().top).toBe(0);
- expect(child4.getComputedLayout().width).toBe(25);
- expect(child4.getComputedLayout().height).toBe(10);
-
- expect(child5.getComputedLayout().left).toBe(0);
- expect(child5.getComputedLayout().top).toBe(20);
- expect(child5.getComputedLayout().width).toBe(25);
- expect(child5.getComputedLayout().height).toBe(20);
-
- expect(child6.getComputedLayout().left).toBe(25);
- expect(child6.getComputedLayout().top).toBe(20);
- expect(child6.getComputedLayout().width).toBe(25);
- expect(child6.getComputedLayout().height).toBe(10);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(50);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(60);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(50);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(25);
-
- expect(child3.getComputedLayout().left).toBe(25);
- expect(child3.getComputedLayout().top).toBe(0);
- expect(child3.getComputedLayout().width).toBe(25);
- expect(child3.getComputedLayout().height).toBe(20);
-
- expect(child4.getComputedLayout().left).toBe(0);
- expect(child4.getComputedLayout().top).toBe(0);
- expect(child4.getComputedLayout().width).toBe(25);
- expect(child4.getComputedLayout().height).toBe(10);
-
- expect(child5.getComputedLayout().left).toBe(25);
- expect(child5.getComputedLayout().top).toBe(20);
- expect(child5.getComputedLayout().width).toBe(25);
- expect(child5.getComputedLayout().height).toBe(20);
-
- expect(child6.getComputedLayout().left).toBe(0);
- expect(child6.getComputedLayout().top).toBe(20);
- expect(child6.getComputedLayout().width).toBe(25);
- expect(child6.getComputedLayout().height).toBe(10);
- });
-
- test('align baseline child multiline no override on secondline', () => {
- const root = Yoga.Node.create();
-
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setAlignItems(Yoga.ALIGN_BASELINE);
- root.setWidth(100);
- root.setHeight(100);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(50);
- child1.setHeight(60);
- root.insertChild(child1, 0);
-
- const child2 = Yoga.Node.create();
- child2.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- child2.setFlexWrap(Yoga.WRAP_WRAP);
- child2.setWidth(50);
- child2.setHeight(25);
- root.insertChild(child2, 1);
-
- const child3 = Yoga.Node.create();
- child3.setWidth(25);
- child3.setHeight(20);
- child2.insertChild(child3, 0);
-
- const child4 = Yoga.Node.create();
- child4.setWidth(25);
- child4.setHeight(10);
- child2.insertChild(child4, 1);
-
- const child5 = Yoga.Node.create();
- child5.setWidth(25);
- child5.setHeight(20);
- child2.insertChild(child5, 2);
-
- const child6 = Yoga.Node.create();
- child6.setAlignSelf(Yoga.ALIGN_BASELINE);
- child6.setWidth(25);
- child6.setHeight(10);
- child2.insertChild(child6, 3);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(60);
-
- expect(child2.getComputedLayout().left).toBe(50);
- expect(child2.getComputedLayout().top).toBe(40);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(25);
-
- expect(child3.getComputedLayout().left).toBe(0);
- expect(child3.getComputedLayout().top).toBe(0);
- expect(child3.getComputedLayout().width).toBe(25);
- expect(child3.getComputedLayout().height).toBe(20);
-
- expect(child4.getComputedLayout().left).toBe(25);
- expect(child4.getComputedLayout().top).toBe(0);
- expect(child4.getComputedLayout().width).toBe(25);
- expect(child4.getComputedLayout().height).toBe(10);
-
- expect(child5.getComputedLayout().left).toBe(0);
- expect(child5.getComputedLayout().top).toBe(20);
- expect(child5.getComputedLayout().width).toBe(25);
- expect(child5.getComputedLayout().height).toBe(20);
-
- expect(child6.getComputedLayout().left).toBe(25);
- expect(child6.getComputedLayout().top).toBe(20);
- expect(child6.getComputedLayout().width).toBe(25);
- expect(child6.getComputedLayout().height).toBe(10);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(50);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(60);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(40);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(25);
-
- expect(child3.getComputedLayout().left).toBe(25);
- expect(child3.getComputedLayout().top).toBe(0);
- expect(child3.getComputedLayout().width).toBe(25);
- expect(child3.getComputedLayout().height).toBe(20);
-
- expect(child4.getComputedLayout().left).toBe(0);
- expect(child4.getComputedLayout().top).toBe(0);
- expect(child4.getComputedLayout().width).toBe(25);
- expect(child4.getComputedLayout().height).toBe(10);
-
- expect(child5.getComputedLayout().left).toBe(25);
- expect(child5.getComputedLayout().top).toBe(20);
- expect(child5.getComputedLayout().width).toBe(25);
- expect(child5.getComputedLayout().height).toBe(20);
-
- expect(child6.getComputedLayout().left).toBe(0);
- expect(child6.getComputedLayout().top).toBe(20);
- expect(child6.getComputedLayout().width).toBe(25);
- expect(child6.getComputedLayout().height).toBe(10);
- });
-
- test('align baseline child top', () => {
- const root = Yoga.Node.create();
-
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setAlignItems(Yoga.ALIGN_BASELINE);
- root.setWidth(100);
- root.setHeight(100);
-
- const child1 = Yoga.Node.create();
- child1.setPosition(Yoga.EDGE_TOP, 10);
- child1.setWidth(50);
- child1.setHeight(50);
- root.insertChild(child1, 0);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(50);
- child2.setHeight(20);
- root.insertChild(child2, 1);
-
- const child3 = Yoga.Node.create();
- child3.setWidth(50);
- child3.setHeight(10);
- child2.insertChild(child3, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(10);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
-
- expect(child2.getComputedLayout().left).toBe(50);
- expect(child2.getComputedLayout().top).toBe(40);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(20);
-
- expect(child3.getComputedLayout().left).toBe(0);
- expect(child3.getComputedLayout().top).toBe(0);
- expect(child3.getComputedLayout().width).toBe(50);
- expect(child3.getComputedLayout().height).toBe(10);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(50);
- expect(child1.getComputedLayout().top).toBe(10);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(40);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(20);
-
- expect(child3.getComputedLayout().left).toBe(0);
- expect(child3.getComputedLayout().top).toBe(0);
- expect(child3.getComputedLayout().width).toBe(50);
- expect(child3.getComputedLayout().height).toBe(10);
- });
-
- test('align baseline child top2', () => {
- const root = Yoga.Node.create();
-
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setAlignItems(Yoga.ALIGN_BASELINE);
- root.setWidth(100);
- root.setHeight(100);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(50);
- child1.setHeight(50);
- root.insertChild(child1, 0);
-
- const child2 = Yoga.Node.create();
- child2.setPosition(Yoga.EDGE_TOP, 5);
- child2.setWidth(50);
- child2.setHeight(20);
- root.insertChild(child2, 1);
-
- const child3 = Yoga.Node.create();
- child3.setWidth(50);
- child3.setHeight(10);
- child2.insertChild(child3, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
-
- expect(child2.getComputedLayout().left).toBe(50);
- expect(child2.getComputedLayout().top).toBe(45);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(20);
-
- expect(child3.getComputedLayout().left).toBe(0);
- expect(child3.getComputedLayout().top).toBe(0);
- expect(child3.getComputedLayout().width).toBe(50);
- expect(child3.getComputedLayout().height).toBe(10);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(50);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(45);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(20);
-
- expect(child3.getComputedLayout().left).toBe(0);
- expect(child3.getComputedLayout().top).toBe(0);
- expect(child3.getComputedLayout().width).toBe(50);
- expect(child3.getComputedLayout().height).toBe(10);
- });
-
- test('align baseline double nested child', () => {
- const root = Yoga.Node.create();
-
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setAlignItems(Yoga.ALIGN_BASELINE);
- root.setWidth(100);
- root.setHeight(100);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(50);
- child1.setHeight(50);
- root.insertChild(child1, 0);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(50);
- child2.setHeight(20);
- child1.insertChild(child2, 0);
-
- const child3 = Yoga.Node.create();
- child3.setWidth(50);
- child3.setHeight(20);
- root.insertChild(child3, 1);
-
- const child4 = Yoga.Node.create();
- child4.setWidth(50);
- child4.setHeight(15);
- child3.insertChild(child4, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(20);
-
- expect(child3.getComputedLayout().left).toBe(50);
- expect(child3.getComputedLayout().top).toBe(5);
- expect(child3.getComputedLayout().width).toBe(50);
- expect(child3.getComputedLayout().height).toBe(20);
-
- expect(child4.getComputedLayout().left).toBe(0);
- expect(child4.getComputedLayout().top).toBe(0);
- expect(child4.getComputedLayout().width).toBe(50);
- expect(child4.getComputedLayout().height).toBe(15);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(50);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(20);
-
- expect(child3.getComputedLayout().left).toBe(0);
- expect(child3.getComputedLayout().top).toBe(5);
- expect(child3.getComputedLayout().width).toBe(50);
- expect(child3.getComputedLayout().height).toBe(20);
-
- expect(child4.getComputedLayout().left).toBe(0);
- expect(child4.getComputedLayout().top).toBe(0);
- expect(child4.getComputedLayout().width).toBe(50);
- expect(child4.getComputedLayout().height).toBe(15);
- });
-
- test('align baseline column', () => {
- const root = Yoga.Node.create();
-
- root.setAlignItems(Yoga.ALIGN_BASELINE);
- root.setWidth(100);
- root.setHeight(100);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(50);
- child1.setHeight(50);
- root.insertChild(child1, 0);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(50);
- child2.setHeight(20);
- root.insertChild(child2, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(50);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(20);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(50);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
-
- expect(child2.getComputedLayout().left).toBe(50);
- expect(child2.getComputedLayout().top).toBe(50);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(20);
- });
-
- test('align_baseline_child_margin', () => {
- const root = Yoga.Node.create();
-
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setAlignItems(Yoga.ALIGN_BASELINE);
- root.setWidth(100);
- root.setHeight(100);
-
- const child1 = Yoga.Node.create();
- child1.setMargin(Yoga.EDGE_LEFT, 5);
- child1.setMargin(Yoga.EDGE_TOP, 5);
- child1.setMargin(Yoga.EDGE_RIGHT, 5);
- child1.setMargin(Yoga.EDGE_BOTTOM, 5);
- child1.setWidth(50);
- child1.setHeight(50);
- root.insertChild(child1, 0);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(50);
- child2.setHeight(20);
- root.insertChild(child2, 1);
-
- const child3 = Yoga.Node.create();
- child3.setMargin(Yoga.EDGE_LEFT, 1);
- child3.setMargin(Yoga.EDGE_TOP, 1);
- child3.setMargin(Yoga.EDGE_RIGHT, 1);
- child3.setMargin(Yoga.EDGE_BOTTOM, 1);
- child3.setWidth(50);
- child3.setHeight(10);
- child2.insertChild(child3, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(5);
- expect(child1.getComputedLayout().top).toBe(5);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
-
- expect(child2.getComputedLayout().left).toBe(60);
- expect(child2.getComputedLayout().top).toBe(44);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(20);
-
- expect(child3.getComputedLayout().left).toBe(1);
- expect(child3.getComputedLayout().top).toBe(1);
- expect(child3.getComputedLayout().width).toBe(50);
- expect(child3.getComputedLayout().height).toBe(10);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(45);
- expect(child1.getComputedLayout().top).toBe(5);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
-
- expect(child2.getComputedLayout().left).toBe(-10);
- expect(child2.getComputedLayout().top).toBe(44);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(20);
-
- expect(child3.getComputedLayout().left).toBe(-1);
- expect(child3.getComputedLayout().top).toBe(1);
- expect(child3.getComputedLayout().width).toBe(50);
- expect(child3.getComputedLayout().height).toBe(10);
- });
-
- test('align baseline child padding', () => {
- const root = Yoga.Node.create();
-
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setAlignItems(Yoga.ALIGN_BASELINE);
- root.setPadding(Yoga.EDGE_LEFT, 5);
- root.setPadding(Yoga.EDGE_TOP, 5);
- root.setPadding(Yoga.EDGE_RIGHT, 5);
- root.setPadding(Yoga.EDGE_BOTTOM, 5);
- root.setWidth(100);
- root.setHeight(100);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(50);
- child1.setHeight(50);
- root.insertChild(child1, 0);
-
- const child2 = Yoga.Node.create();
- child2.setPadding(Yoga.EDGE_LEFT, 5);
- child2.setPadding(Yoga.EDGE_TOP, 5);
- child2.setPadding(Yoga.EDGE_RIGHT, 5);
- child2.setPadding(Yoga.EDGE_BOTTOM, 5);
- child2.setWidth(50);
- child2.setHeight(20);
- root.insertChild(child2, 1);
-
- const child3 = Yoga.Node.create();
- child3.setWidth(50);
- child3.setHeight(10);
- child2.insertChild(child3, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(5);
- expect(child1.getComputedLayout().top).toBe(5);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
-
- expect(child2.getComputedLayout().left).toBe(55);
- expect(child2.getComputedLayout().top).toBe(40);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(20);
-
- expect(child3.getComputedLayout().left).toBe(5);
- expect(child3.getComputedLayout().top).toBe(5);
- expect(child3.getComputedLayout().width).toBe(50);
- expect(child3.getComputedLayout().height).toBe(10);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(45);
- expect(child1.getComputedLayout().top).toBe(5);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
-
- expect(child2.getComputedLayout().left).toBe(-5);
- expect(child2.getComputedLayout().top).toBe(40);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(20);
-
- expect(child3.getComputedLayout().left).toBe(-5);
- expect(child3.getComputedLayout().top).toBe(5);
- expect(child3.getComputedLayout().width).toBe(50);
- expect(child3.getComputedLayout().height).toBe(10);
- });
-
- test('align baseline multiline', () => {
- const root = Yoga.Node.create();
-
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setAlignItems(Yoga.ALIGN_BASELINE);
- root.setFlexWrap(Yoga.WRAP_WRAP);
- root.setWidth(100);
- root.setHeight(100);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(50);
- child1.setHeight(50);
- root.insertChild(child1, 0);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(50);
- child2.setHeight(20);
- root.insertChild(child2, 1);
-
- const child3 = Yoga.Node.create();
- child3.setWidth(50);
- child3.setHeight(10);
- child2.insertChild(child3, 0);
-
- const child4 = Yoga.Node.create();
- child4.setWidth(50);
- child4.setHeight(20);
- root.insertChild(child4, 2);
-
- const child5 = Yoga.Node.create();
- child5.setWidth(50);
- child5.setHeight(10);
- child4.insertChild(child5, 0);
-
- const child6 = Yoga.Node.create();
- child6.setWidth(50);
- child6.setHeight(50);
- root.insertChild(child6, 3);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
-
- expect(child2.getComputedLayout().left).toBe(50);
- expect(child2.getComputedLayout().top).toBe(40);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(20);
-
- expect(child3.getComputedLayout().left).toBe(0);
- expect(child3.getComputedLayout().top).toBe(0);
- expect(child3.getComputedLayout().width).toBe(50);
- expect(child3.getComputedLayout().height).toBe(10);
-
- expect(child4.getComputedLayout().left).toBe(0);
- expect(child4.getComputedLayout().top).toBe(100);
- expect(child4.getComputedLayout().width).toBe(50);
- expect(child4.getComputedLayout().height).toBe(20);
-
- expect(child5.getComputedLayout().left).toBe(0);
- expect(child5.getComputedLayout().top).toBe(0);
- expect(child5.getComputedLayout().width).toBe(50);
- expect(child5.getComputedLayout().height).toBe(10);
-
- expect(child6.getComputedLayout().left).toBe(50);
- expect(child6.getComputedLayout().top).toBe(60);
- expect(child6.getComputedLayout().width).toBe(50);
- expect(child6.getComputedLayout().height).toBe(50);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(50);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(40);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(20);
-
- expect(child3.getComputedLayout().left).toBe(0);
- expect(child3.getComputedLayout().top).toBe(0);
- expect(child3.getComputedLayout().width).toBe(50);
- expect(child3.getComputedLayout().height).toBe(10);
-
- expect(child4.getComputedLayout().left).toBe(50);
- expect(child4.getComputedLayout().top).toBe(100);
- expect(child4.getComputedLayout().width).toBe(50);
- expect(child4.getComputedLayout().height).toBe(20);
-
- expect(child5.getComputedLayout().left).toBe(0);
- expect(child5.getComputedLayout().top).toBe(0);
- expect(child5.getComputedLayout().width).toBe(50);
- expect(child5.getComputedLayout().height).toBe(10);
-
- expect(child6.getComputedLayout().left).toBe(0);
- expect(child6.getComputedLayout().top).toBe(60);
- expect(child6.getComputedLayout().width).toBe(50);
- expect(child6.getComputedLayout().height).toBe(50);
- });
-
- test('align baseline multiline column', () => {
- const root = Yoga.Node.create();
-
- root.setAlignItems(Yoga.ALIGN_BASELINE);
- root.setFlexWrap(Yoga.WRAP_WRAP);
- root.setWidth(100);
- root.setHeight(100);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(50);
- child1.setHeight(50);
- root.insertChild(child1, 0);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(30);
- child2.setHeight(50);
- root.insertChild(child2, 1);
-
- const child3 = Yoga.Node.create();
- child3.setWidth(20);
- child3.setHeight(20);
- child2.insertChild(child3, 0);
-
- const child4 = Yoga.Node.create();
- child4.setWidth(40);
- child4.setHeight(70);
- root.insertChild(child4, 2);
-
- const child5 = Yoga.Node.create();
- child5.setWidth(10);
- child5.setHeight(10);
- child4.insertChild(child5, 0);
-
- const child6 = Yoga.Node.create();
- child6.setWidth(50);
- child6.setHeight(20);
- root.insertChild(child6, 3);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(50);
- expect(child2.getComputedLayout().width).toBe(30);
- expect(child2.getComputedLayout().height).toBe(50);
-
- expect(child3.getComputedLayout().left).toBe(0);
- expect(child3.getComputedLayout().top).toBe(0);
- expect(child3.getComputedLayout().width).toBe(20);
- expect(child3.getComputedLayout().height).toBe(20);
-
- expect(child4.getComputedLayout().left).toBe(50);
- expect(child4.getComputedLayout().top).toBe(0);
- expect(child4.getComputedLayout().width).toBe(40);
- expect(child4.getComputedLayout().height).toBe(70);
-
- expect(child5.getComputedLayout().left).toBe(0);
- expect(child5.getComputedLayout().top).toBe(0);
- expect(child5.getComputedLayout().width).toBe(10);
- expect(child5.getComputedLayout().height).toBe(10);
-
- expect(child6.getComputedLayout().left).toBe(50);
- expect(child6.getComputedLayout().top).toBe(70);
- expect(child6.getComputedLayout().width).toBe(50);
- expect(child6.getComputedLayout().height).toBe(20);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(50);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
-
- expect(child2.getComputedLayout().left).toBe(70);
- expect(child2.getComputedLayout().top).toBe(50);
- expect(child2.getComputedLayout().width).toBe(30);
- expect(child2.getComputedLayout().height).toBe(50);
-
- expect(child3.getComputedLayout().left).toBe(10);
- expect(child3.getComputedLayout().top).toBe(0);
- expect(child3.getComputedLayout().width).toBe(20);
- expect(child3.getComputedLayout().height).toBe(20);
-
- expect(child4.getComputedLayout().left).toBe(10);
- expect(child4.getComputedLayout().top).toBe(0);
- expect(child4.getComputedLayout().width).toBe(40);
- expect(child4.getComputedLayout().height).toBe(70);
-
- expect(child5.getComputedLayout().left).toBe(30);
- expect(child5.getComputedLayout().top).toBe(0);
- expect(child5.getComputedLayout().width).toBe(10);
- expect(child5.getComputedLayout().height).toBe(10);
-
- expect(child6.getComputedLayout().left).toBe(0);
- expect(child6.getComputedLayout().top).toBe(70);
- expect(child6.getComputedLayout().width).toBe(50);
- expect(child6.getComputedLayout().height).toBe(20);
- });
-
- test('align baseline multiline column2', () => {
- const root = Yoga.Node.create();
-
- root.setAlignItems(Yoga.ALIGN_BASELINE);
- root.setFlexWrap(Yoga.WRAP_WRAP);
- root.setWidth(100);
- root.setHeight(100);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(50);
- child1.setHeight(50);
- root.insertChild(child1, 0);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(30);
- child2.setHeight(50);
- root.insertChild(child2, 1);
-
- const child3 = Yoga.Node.create();
- child3.setWidth(20);
- child3.setHeight(20);
- child2.insertChild(child3, 0);
-
- const child4 = Yoga.Node.create();
- child4.setWidth(40);
- child4.setHeight(70);
- root.insertChild(child4, 2);
-
- const child5 = Yoga.Node.create();
- child5.setWidth(10);
- child5.setHeight(10);
- child4.insertChild(child5, 0);
-
- const child6 = Yoga.Node.create();
- child6.setWidth(50);
- child6.setHeight(20);
- root.insertChild(child6, 3);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(50);
- expect(child2.getComputedLayout().width).toBe(30);
- expect(child2.getComputedLayout().height).toBe(50);
-
- expect(child3.getComputedLayout().left).toBe(0);
- expect(child3.getComputedLayout().top).toBe(0);
- expect(child3.getComputedLayout().width).toBe(20);
- expect(child3.getComputedLayout().height).toBe(20);
-
- expect(child4.getComputedLayout().left).toBe(50);
- expect(child4.getComputedLayout().top).toBe(0);
- expect(child4.getComputedLayout().width).toBe(40);
- expect(child4.getComputedLayout().height).toBe(70);
-
- expect(child5.getComputedLayout().left).toBe(0);
- expect(child5.getComputedLayout().top).toBe(0);
- expect(child5.getComputedLayout().width).toBe(10);
- expect(child5.getComputedLayout().height).toBe(10);
-
- expect(child6.getComputedLayout().left).toBe(50);
- expect(child6.getComputedLayout().top).toBe(70);
- expect(child6.getComputedLayout().width).toBe(50);
- expect(child6.getComputedLayout().height).toBe(20);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(50);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
-
- expect(child2.getComputedLayout().left).toBe(70);
- expect(child2.getComputedLayout().top).toBe(50);
- expect(child2.getComputedLayout().width).toBe(30);
- expect(child2.getComputedLayout().height).toBe(50);
-
- expect(child3.getComputedLayout().left).toBe(10);
- expect(child3.getComputedLayout().top).toBe(0);
- expect(child3.getComputedLayout().width).toBe(20);
- expect(child3.getComputedLayout().height).toBe(20);
-
- expect(child4.getComputedLayout().left).toBe(10);
- expect(child4.getComputedLayout().top).toBe(0);
- expect(child4.getComputedLayout().width).toBe(40);
- expect(child4.getComputedLayout().height).toBe(70);
-
- expect(child5.getComputedLayout().left).toBe(30);
- expect(child5.getComputedLayout().top).toBe(0);
- expect(child5.getComputedLayout().width).toBe(10);
- expect(child5.getComputedLayout().height).toBe(10);
-
- expect(child6.getComputedLayout().left).toBe(0);
- expect(child6.getComputedLayout().top).toBe(70);
- expect(child6.getComputedLayout().width).toBe(50);
- expect(child6.getComputedLayout().height).toBe(20);
- });
-
- test('align baseline multiline row and column', () => {
- const root = Yoga.Node.create();
-
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setAlignItems(Yoga.ALIGN_BASELINE);
- root.setFlexWrap(Yoga.WRAP_WRAP);
- root.setWidth(100);
- root.setHeight(100);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(50);
- child1.setHeight(50);
- root.insertChild(child1, 0);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(50);
- child2.setHeight(50);
- root.insertChild(child2, 1);
-
- const child3 = Yoga.Node.create();
- child3.setWidth(50);
- child3.setHeight(10);
- child2.insertChild(child3, 0);
-
- const child4 = Yoga.Node.create();
- child4.setWidth(50);
- child4.setHeight(20);
- root.insertChild(child4, 2);
-
- const child5 = Yoga.Node.create();
- child5.setWidth(50);
- child5.setHeight(10);
- child4.insertChild(child5, 0);
-
- const child6 = Yoga.Node.create();
- child6.setWidth(50);
- child6.setHeight(20);
- root.insertChild(child6, 3);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
-
- expect(child2.getComputedLayout().left).toBe(50);
- expect(child2.getComputedLayout().top).toBe(40);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(50);
-
- expect(child3.getComputedLayout().left).toBe(0);
- expect(child3.getComputedLayout().top).toBe(0);
- expect(child3.getComputedLayout().width).toBe(50);
- expect(child3.getComputedLayout().height).toBe(10);
-
- expect(child4.getComputedLayout().left).toBe(0);
- expect(child4.getComputedLayout().top).toBe(100);
- expect(child4.getComputedLayout().width).toBe(50);
- expect(child4.getComputedLayout().height).toBe(20);
-
- expect(child5.getComputedLayout().left).toBe(0);
- expect(child5.getComputedLayout().top).toBe(0);
- expect(child5.getComputedLayout().width).toBe(50);
- expect(child5.getComputedLayout().height).toBe(10);
-
- expect(child6.getComputedLayout().left).toBe(50);
- expect(child6.getComputedLayout().top).toBe(90);
- expect(child6.getComputedLayout().width).toBe(50);
- expect(child6.getComputedLayout().height).toBe(20);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(50);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(40);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(50);
-
- expect(child3.getComputedLayout().left).toBe(0);
- expect(child3.getComputedLayout().top).toBe(0);
- expect(child3.getComputedLayout().width).toBe(50);
- expect(child3.getComputedLayout().height).toBe(10);
-
- expect(child4.getComputedLayout().left).toBe(50);
- expect(child4.getComputedLayout().top).toBe(100);
- expect(child4.getComputedLayout().width).toBe(50);
- expect(child4.getComputedLayout().height).toBe(20);
-
- expect(child5.getComputedLayout().left).toBe(0);
- expect(child5.getComputedLayout().top).toBe(0);
- expect(child5.getComputedLayout().width).toBe(50);
- expect(child5.getComputedLayout().height).toBe(10);
-
- expect(child6.getComputedLayout().left).toBe(0);
- expect(child6.getComputedLayout().top).toBe(90);
- expect(child6.getComputedLayout().width).toBe(50);
- expect(child6.getComputedLayout().height).toBe(20);
- });
-
- test('align items center child with margin bigger than parent', () => {
- const root = Yoga.Node.create();
-
- root.setJustifyContent(Yoga.JUSTIFY_CENTER);
- root.setAlignItems(Yoga.ALIGN_CENTER);
- root.setWidth(52);
- root.setHeight(52);
-
- const child1 = Yoga.Node.create();
- child1.setAlignItems(Yoga.ALIGN_CENTER);
- root.insertChild(child1, 0);
-
- const child2 = Yoga.Node.create();
- child2.setMargin(Yoga.EDGE_LEFT, 10);
- child2.setMargin(Yoga.EDGE_RIGHT, 10);
- child2.setWidth(52);
- child2.setHeight(52);
- child1.insertChild(child2, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(52);
- expect(root.getComputedLayout().height).toBe(52);
-
- expect(child1.getComputedLayout().left).toBe(-10);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(72);
- expect(child1.getComputedLayout().height).toBe(52);
-
- expect(child2.getComputedLayout().left).toBe(10);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(52);
- expect(child2.getComputedLayout().height).toBe(52);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(52);
- expect(root.getComputedLayout().height).toBe(52);
-
- expect(child1.getComputedLayout().left).toBe(-10);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(72);
- expect(child1.getComputedLayout().height).toBe(52);
-
- expect(child2.getComputedLayout().left).toBe(10);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(52);
- expect(child2.getComputedLayout().height).toBe(52);
- });
-
- test('align items flex end child with margin bigger than parent', () => {
- const root = Yoga.Node.create();
-
- root.setJustifyContent(Yoga.JUSTIFY_CENTER);
- root.setAlignItems(Yoga.ALIGN_CENTER);
- root.setWidth(52);
- root.setHeight(52);
-
- const child1 = Yoga.Node.create();
- child1.setAlignItems(Yoga.ALIGN_FLEX_END);
- root.insertChild(child1, 0);
-
- const child2 = Yoga.Node.create();
- child2.setMargin(Yoga.EDGE_LEFT, 10);
- child2.setMargin(Yoga.EDGE_RIGHT, 10);
- child2.setWidth(52);
- child2.setHeight(52);
- child1.insertChild(child2, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(52);
- expect(root.getComputedLayout().height).toBe(52);
-
- expect(child1.getComputedLayout().left).toBe(-10);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(72);
- expect(child1.getComputedLayout().height).toBe(52);
-
- expect(child2.getComputedLayout().left).toBe(10);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(52);
- expect(child2.getComputedLayout().height).toBe(52);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(52);
- expect(root.getComputedLayout().height).toBe(52);
-
- expect(child1.getComputedLayout().left).toBe(-10);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(72);
- expect(child1.getComputedLayout().height).toBe(52);
-
- expect(child2.getComputedLayout().left).toBe(10);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(52);
- expect(child2.getComputedLayout().height).toBe(52);
- });
-
- test('align items center child without margin bigger than parent', () => {
- const root = Yoga.Node.create();
-
- root.setJustifyContent(Yoga.JUSTIFY_CENTER);
- root.setAlignItems(Yoga.ALIGN_CENTER);
- root.setWidth(52);
- root.setHeight(52);
-
- const child1 = Yoga.Node.create();
- child1.setAlignItems(Yoga.ALIGN_CENTER);
- root.insertChild(child1, 0);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(72);
- child2.setHeight(72);
- child1.insertChild(child2, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(52);
- expect(root.getComputedLayout().height).toBe(52);
-
- expect(child1.getComputedLayout().left).toBe(-10);
- expect(child1.getComputedLayout().top).toBe(-10);
- expect(child1.getComputedLayout().width).toBe(72);
- expect(child1.getComputedLayout().height).toBe(72);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(72);
- expect(child2.getComputedLayout().height).toBe(72);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(52);
- expect(root.getComputedLayout().height).toBe(52);
-
- expect(child1.getComputedLayout().left).toBe(-10);
- expect(child1.getComputedLayout().top).toBe(-10);
- expect(child1.getComputedLayout().width).toBe(72);
- expect(child1.getComputedLayout().height).toBe(72);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(72);
- expect(child2.getComputedLayout().height).toBe(72);
- });
-
- test('align items flex end child without margin bigger than parent', () => {
- const root = Yoga.Node.create();
-
- root.setJustifyContent(Yoga.JUSTIFY_CENTER);
- root.setAlignItems(Yoga.ALIGN_CENTER);
- root.setWidth(52);
- root.setHeight(52);
-
- const child1 = Yoga.Node.create();
- child1.setAlignItems(Yoga.ALIGN_FLEX_END);
- root.insertChild(child1, 0);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(72);
- child2.setHeight(72);
- child1.insertChild(child2, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(52);
- expect(root.getComputedLayout().height).toBe(52);
-
- expect(child1.getComputedLayout().left).toBe(-10);
- expect(child1.getComputedLayout().top).toBe(-10);
- expect(child1.getComputedLayout().width).toBe(72);
- expect(child1.getComputedLayout().height).toBe(72);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(72);
- expect(child2.getComputedLayout().height).toBe(72);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(52);
- expect(root.getComputedLayout().height).toBe(52);
-
- expect(child1.getComputedLayout().left).toBe(-10);
- expect(child1.getComputedLayout().top).toBe(-10);
- expect(child1.getComputedLayout().width).toBe(72);
- expect(child1.getComputedLayout().height).toBe(72);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(72);
- expect(child2.getComputedLayout().height).toBe(72);
- });
-
- test('align center should size based on content', () => {
- const root = Yoga.Node.create();
-
- root.setAlignItems(Yoga.ALIGN_CENTER);
- root.setMargin(Yoga.EDGE_TOP, 20);
- root.setWidth(100);
- root.setHeight(100);
-
- const child1 = Yoga.Node.create();
- child1.setJustifyContent(Yoga.JUSTIFY_CENTER);
- child1.setFlexShrink(1);
- root.insertChild(child1, 0);
-
- const child2 = Yoga.Node.create();
- child2.setFlexGrow(1);
- child2.setFlexShrink(1);
- child1.insertChild(child2, 0);
-
- const child3 = Yoga.Node.create();
- child3.setWidth(20);
- child3.setHeight(20);
- child2.insertChild(child3, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(20);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(40);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(20);
- expect(child1.getComputedLayout().height).toBe(20);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(20);
- expect(child2.getComputedLayout().height).toBe(20);
-
- expect(child3.getComputedLayout().left).toBe(0);
- expect(child3.getComputedLayout().top).toBe(0);
- expect(child3.getComputedLayout().width).toBe(20);
- expect(child3.getComputedLayout().height).toBe(20);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(20);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(40);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(20);
- expect(child1.getComputedLayout().height).toBe(20);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(20);
- expect(child2.getComputedLayout().height).toBe(20);
-
- expect(child3.getComputedLayout().left).toBe(0);
- expect(child3.getComputedLayout().top).toBe(0);
- expect(child3.getComputedLayout().width).toBe(20);
- expect(child3.getComputedLayout().height).toBe(20);
- });
-
- test('align strech should size based on parent', () => {
- const root = Yoga.Node.create();
-
- root.setMargin(Yoga.EDGE_TOP, 20);
- root.setWidth(100);
- root.setHeight(100);
-
- const child1 = Yoga.Node.create();
- child1.setJustifyContent(Yoga.JUSTIFY_CENTER);
- child1.setFlexShrink(1);
- root.insertChild(child1, 0);
-
- const child2 = Yoga.Node.create();
- child2.setFlexGrow(1);
- child2.setFlexShrink(1);
- child1.insertChild(child2, 0);
-
- const child3 = Yoga.Node.create();
- child3.setWidth(20);
- child3.setHeight(20);
- child2.insertChild(child3, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(20);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(100);
- expect(child1.getComputedLayout().height).toBe(20);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(100);
- expect(child2.getComputedLayout().height).toBe(20);
-
- expect(child3.getComputedLayout().left).toBe(0);
- expect(child3.getComputedLayout().top).toBe(0);
- expect(child3.getComputedLayout().width).toBe(20);
- expect(child3.getComputedLayout().height).toBe(20);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(20);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(100);
- expect(child1.getComputedLayout().height).toBe(20);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(100);
- expect(child2.getComputedLayout().height).toBe(20);
-
- expect(child3.getComputedLayout().left).toBe(80);
- expect(child3.getComputedLayout().top).toBe(0);
- expect(child3.getComputedLayout().width).toBe(20);
- expect(child3.getComputedLayout().height).toBe(20);
- });
-
- test('align flex start with shrinking children', () => {
- const root = Yoga.Node.create();
-
- root.setWidth(500);
- root.setHeight(500);
-
- const child1 = Yoga.Node.create();
- child1.setAlignItems(Yoga.ALIGN_FLEX_START);
- root.insertChild(child1, 0);
-
- const child2 = Yoga.Node.create();
- child2.setFlexGrow(1);
- child2.setFlexShrink(1);
- child1.insertChild(child2, 0);
-
- const child3 = Yoga.Node.create();
- child3.setFlexGrow(1);
- child3.setFlexShrink(1);
- child2.insertChild(child3, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(500);
- expect(root.getComputedLayout().height).toBe(500);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(500);
- expect(child1.getComputedLayout().height).toBe(0);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(0);
- expect(child2.getComputedLayout().height).toBe(0);
-
- expect(child3.getComputedLayout().left).toBe(0);
- expect(child3.getComputedLayout().top).toBe(0);
- expect(child3.getComputedLayout().width).toBe(0);
- expect(child3.getComputedLayout().height).toBe(0);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(500);
- expect(root.getComputedLayout().height).toBe(500);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(500);
- expect(child1.getComputedLayout().height).toBe(0);
-
- expect(child2.getComputedLayout().left).toBe(500);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(0);
- expect(child2.getComputedLayout().height).toBe(0);
-
- expect(child3.getComputedLayout().left).toBe(0);
- expect(child3.getComputedLayout().top).toBe(0);
- expect(child3.getComputedLayout().width).toBe(0);
- expect(child3.getComputedLayout().height).toBe(0);
- });
-
- test('align flex start with stretching children', () => {
- const root = Yoga.Node.create();
-
- root.setWidth(500);
- root.setHeight(500);
-
- const child1 = Yoga.Node.create();
- root.insertChild(child1, 0);
-
- const child2 = Yoga.Node.create();
- child2.setFlexGrow(1);
- child2.setFlexShrink(1);
- child1.insertChild(child2, 0);
-
- const child3 = Yoga.Node.create();
- child3.setFlexGrow(1);
- child3.setFlexShrink(1);
- child2.insertChild(child3, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(500);
- expect(root.getComputedLayout().height).toBe(500);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(500);
- expect(child1.getComputedLayout().height).toBe(0);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(500);
- expect(child2.getComputedLayout().height).toBe(0);
-
- expect(child3.getComputedLayout().left).toBe(0);
- expect(child3.getComputedLayout().top).toBe(0);
- expect(child3.getComputedLayout().width).toBe(500);
- expect(child3.getComputedLayout().height).toBe(0);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(500);
- expect(root.getComputedLayout().height).toBe(500);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(500);
- expect(child1.getComputedLayout().height).toBe(0);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(500);
- expect(child2.getComputedLayout().height).toBe(0);
-
- expect(child3.getComputedLayout().left).toBe(0);
- expect(child3.getComputedLayout().top).toBe(0);
- expect(child3.getComputedLayout().width).toBe(500);
- expect(child3.getComputedLayout().height).toBe(0);
- });
-
- test('align flex start with shrinking children with stretch', () => {
- const root = Yoga.Node.create();
-
- root.setWidth(500);
- root.setHeight(500);
-
- const child1 = Yoga.Node.create();
- child1.setAlignItems(Yoga.ALIGN_FLEX_START);
- root.insertChild(child1, 0);
-
- const child2 = Yoga.Node.create();
- child2.setFlexGrow(1);
- child2.setFlexShrink(1);
- child1.insertChild(child2, 0);
-
- const child3 = Yoga.Node.create();
- child3.setFlexGrow(1);
- child3.setFlexShrink(1);
- child2.insertChild(child3, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(500);
- expect(root.getComputedLayout().height).toBe(500);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(500);
- expect(child1.getComputedLayout().height).toBe(0);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(0);
- expect(child2.getComputedLayout().height).toBe(0);
-
- expect(child3.getComputedLayout().left).toBe(0);
- expect(child3.getComputedLayout().top).toBe(0);
- expect(child3.getComputedLayout().width).toBe(0);
- expect(child3.getComputedLayout().height).toBe(0);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(500);
- expect(root.getComputedLayout().height).toBe(500);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(500);
- expect(child1.getComputedLayout().height).toBe(0);
-
- expect(child2.getComputedLayout().left).toBe(500);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(0);
- expect(child2.getComputedLayout().height).toBe(0);
-
- expect(child3.getComputedLayout().left).toBe(0);
- expect(child3.getComputedLayout().top).toBe(0);
- expect(child3.getComputedLayout().width).toBe(0);
- expect(child3.getComputedLayout().height).toBe(0);
- });
-});
diff --git a/packages/yoga/tests/alignSelf.test.js b/packages/yoga/tests/alignSelf.test.js
deleted file mode 100644
index 3fe551647..000000000
--- a/packages/yoga/tests/alignSelf.test.js
+++ /dev/null
@@ -1,216 +0,0 @@
-const Yoga = require('..');
-
-describe('Align self', () => {
- test('align_self_center', () => {
- const root = Yoga.Node.create();
-
- root.setWidth(100);
- root.setHeight(100);
-
- const child = Yoga.Node.create();
- child.setAlignSelf(Yoga.ALIGN_CENTER);
- child.setWidth(10);
- child.setHeight(10);
- root.insertChild(child, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child.getComputedLayout().left).toBe(45);
- expect(child.getComputedLayout().top).toBe(0);
- expect(child.getComputedLayout().width).toBe(10);
- expect(child.getComputedLayout().height).toBe(10);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child.getComputedLayout().left).toBe(45);
- expect(child.getComputedLayout().top).toBe(0);
- expect(child.getComputedLayout().width).toBe(10);
- expect(child.getComputedLayout().height).toBe(10);
- });
-
- test('align_self_flex_end', () => {
- const root = Yoga.Node.create();
-
- root.setWidth(100);
- root.setHeight(100);
-
- const child = Yoga.Node.create();
- child.setAlignSelf(Yoga.ALIGN_FLEX_END);
- child.setWidth(10);
- child.setHeight(10);
- root.insertChild(child, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child.getComputedLayout().left).toBe(90);
- expect(child.getComputedLayout().top).toBe(0);
- expect(child.getComputedLayout().width).toBe(10);
- expect(child.getComputedLayout().height).toBe(10);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child.getComputedLayout().left).toBe(0);
- expect(child.getComputedLayout().top).toBe(0);
- expect(child.getComputedLayout().width).toBe(10);
- expect(child.getComputedLayout().height).toBe(10);
- });
-
- test('align_self_flex_start', () => {
- const root = Yoga.Node.create();
-
- root.setWidth(100);
- root.setHeight(100);
-
- const child = Yoga.Node.create();
- child.setAlignSelf(Yoga.ALIGN_FLEX_START);
- child.setWidth(10);
- child.setHeight(10);
- root.insertChild(child, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child.getComputedLayout().left).toBe(0);
- expect(child.getComputedLayout().top).toBe(0);
- expect(child.getComputedLayout().width).toBe(10);
- expect(child.getComputedLayout().height).toBe(10);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child.getComputedLayout().left).toBe(90);
- expect(child.getComputedLayout().top).toBe(0);
- expect(child.getComputedLayout().width).toBe(10);
- expect(child.getComputedLayout().height).toBe(10);
- });
-
- test('align_self_flex_end_override_flex_start', () => {
- const root = Yoga.Node.create();
-
- root.setAlignItems(Yoga.ALIGN_FLEX_START);
- root.setWidth(100);
- root.setHeight(100);
-
- const child = Yoga.Node.create();
- child.setAlignSelf(Yoga.ALIGN_FLEX_END);
- child.setWidth(10);
- child.setHeight(10);
- root.insertChild(child, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child.getComputedLayout().left).toBe(90);
- expect(child.getComputedLayout().top).toBe(0);
- expect(child.getComputedLayout().width).toBe(10);
- expect(child.getComputedLayout().height).toBe(10);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child.getComputedLayout().left).toBe(0);
- expect(child.getComputedLayout().top).toBe(0);
- expect(child.getComputedLayout().width).toBe(10);
- expect(child.getComputedLayout().height).toBe(10);
- });
-
- test('align_self_baseline', () => {
- const root = Yoga.Node.create();
-
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setWidth(100);
- root.setHeight(100);
-
- const child = Yoga.Node.create();
- child.setAlignSelf(Yoga.ALIGN_BASELINE);
- child.setWidth(50);
- child.setHeight(50);
- root.insertChild(child, 0);
-
- const child2 = Yoga.Node.create();
- child2.setAlignSelf(Yoga.ALIGN_BASELINE);
- child2.setWidth(50);
- child2.setHeight(20);
- root.insertChild(child2, 1);
-
- const child3 = Yoga.Node.create();
- child3.setWidth(50);
- child3.setHeight(10);
- child2.insertChild(child3, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child.getComputedLayout().left).toBe(0);
- expect(child.getComputedLayout().top).toBe(0);
- expect(child.getComputedLayout().width).toBe(50);
- expect(child.getComputedLayout().height).toBe(50);
-
- expect(child2.getComputedLayout().left).toBe(50);
- expect(child2.getComputedLayout().top).toBe(40);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(20);
-
- expect(child3.getComputedLayout().left).toBe(0);
- expect(child3.getComputedLayout().top).toBe(0);
- expect(child3.getComputedLayout().width).toBe(50);
- expect(child3.getComputedLayout().height).toBe(10);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child.getComputedLayout().left).toBe(50);
- expect(child.getComputedLayout().top).toBe(0);
- expect(child.getComputedLayout().width).toBe(50);
- expect(child.getComputedLayout().height).toBe(50);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(40);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(20);
-
- expect(child3.getComputedLayout().left).toBe(0);
- expect(child3.getComputedLayout().top).toBe(0);
- expect(child3.getComputedLayout().width).toBe(50);
- expect(child3.getComputedLayout().height).toBe(10);
- });
-});
diff --git a/packages/yoga/tests/aspectRatio.test.js b/packages/yoga/tests/aspectRatio.test.js
deleted file mode 100644
index 7c258a61e..000000000
--- a/packages/yoga/tests/aspectRatio.test.js
+++ /dev/null
@@ -1,731 +0,0 @@
-const Yoga = require('..');
-
-describe('Aspect ratio', () => {
- const measure = (node, width, widthMode, height, heightMode) => {
- return {
- width: widthMode === Yoga.MEASURE_MODE_EXACTLY ? width : 50,
- height: heightMode === Yoga.MEASURE_MODE_EXACTLY ? height : 50,
- };
- };
-
- test('aspect_ratio_cross_defined', () => {
- const root = Yoga.Node.create();
-
- root.setAlignItems(Yoga.ALIGN_FLEX_START);
- root.setWidth(100);
- root.setHeight(100);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(50);
- child1.setAspectRatio(1);
-
- root.insertChild(child1, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
- });
-
- test('aspect_ratio_main_defined', () => {
- const root = Yoga.Node.create();
-
- root.setAlignItems(Yoga.ALIGN_FLEX_START);
- root.setWidth(100);
- root.setHeight(100);
-
- const child1 = Yoga.Node.create();
- child1.setHeight(50);
- child1.setAspectRatio(1);
- root.insertChild(child1, 0);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
- });
-
- test('aspect_ratio_both_dimensions_defined_row', () => {
- const root = Yoga.Node.create();
-
- root.setAlignItems(Yoga.ALIGN_FLEX_START);
- root.setWidth(100);
- root.setHeight(100);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(100);
- child1.setHeight(50);
- child1.setAspectRatio(1);
- root.insertChild(child1, 0);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
- });
-
- test('aspect_ratio_both_dimensions_defined_column', () => {
- const root = Yoga.Node.create();
-
- root.setAlignItems(Yoga.ALIGN_FLEX_START);
- root.setWidth(100);
- root.setHeight(100);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(100);
- child1.setHeight(50);
- child1.setAspectRatio(1);
- root.insertChild(child1, 0);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
- });
-
- test('aspect_ratio_align_stretch', () => {
- const root = Yoga.Node.create();
-
- root.setWidth(100);
- root.setHeight(100);
-
- const child1 = Yoga.Node.create();
- child1.setAspectRatio(1);
- root.insertChild(child1, 0);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(100);
- expect(child1.getComputedLayout().height).toBe(100);
- });
-
- test('aspect_ratio_flex_grow', () => {
- const root = Yoga.Node.create();
-
- root.setAlignItems(Yoga.ALIGN_FLEX_START);
- root.setWidth(100);
- root.setHeight(100);
-
- const child1 = Yoga.Node.create();
- child1.setHeight(50);
- child1.setFlexGrow(1);
- child1.setAspectRatio(1);
- root.insertChild(child1, 0);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(100);
- expect(child1.getComputedLayout().height).toBe(100);
- });
-
- test('aspect_ratio_flex_shrink', () => {
- const root = Yoga.Node.create();
-
- root.setAlignItems(Yoga.ALIGN_FLEX_START);
- root.setWidth(100);
- root.setHeight(100);
-
- const child1 = Yoga.Node.create();
- child1.setHeight(150);
- child1.setFlexShrink(1);
- child1.setAspectRatio(1);
- root.insertChild(child1, 0);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(100);
- expect(child1.getComputedLayout().height).toBe(100);
- });
-
- test('aspect_ratio_flex_shrink_2', () => {
- const root = Yoga.Node.create();
-
- root.setWidth(100);
- root.setHeight(100);
-
- const child1 = Yoga.Node.create();
- child1.setHeightPercent(100);
- child1.setFlexShrink(1);
- child1.setAspectRatio(1);
- root.insertChild(child1, 0);
-
- const child2 = Yoga.Node.create();
- child2.setHeightPercent(100);
- child2.setFlexShrink(1);
- child2.setAspectRatio(1);
- root.insertChild(child2, 1);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(50);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(50);
- });
-
- test('aspect_ratio_basis', () => {
- const root = Yoga.Node.create();
-
- root.setAlignItems(Yoga.ALIGN_FLEX_START);
- root.setWidth(100);
- root.setHeight(100);
-
- const child1 = Yoga.Node.create();
- child1.setFlexBasis(50);
- child1.setAspectRatio(1);
- root.insertChild(child1, 0);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
- });
-
- test('aspect_ratio_absolute_layout_width_defined', () => {
- const root = Yoga.Node.create();
-
- root.setWidth(100);
- root.setHeight(100);
-
- const child1 = Yoga.Node.create();
- child1.setPositionType(Yoga.POSITION_TYPE_ABSOLUTE);
- child1.setPosition(Yoga.EDGE_LEFT, 0);
- child1.setPosition(Yoga.EDGE_TOP, 0);
- child1.setWidth(50);
- child1.setAspectRatio(1);
- root.insertChild(child1, 0);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
- });
-
- test('aspect_ratio_absolute_layout_height_defined', () => {
- const root = Yoga.Node.create();
-
- root.setWidth(100);
- root.setHeight(100);
-
- const child1 = Yoga.Node.create();
- child1.setPositionType(Yoga.POSITION_TYPE_ABSOLUTE);
- child1.setPosition(Yoga.EDGE_LEFT, 0);
- child1.setPosition(Yoga.EDGE_TOP, 0);
- child1.setHeight(50);
- child1.setAspectRatio(1);
- root.insertChild(child1, 0);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
- });
-
- test('aspect_ratio_with_max_cross_defined', () => {
- const root = Yoga.Node.create();
-
- root.setAlignItems(Yoga.ALIGN_FLEX_START);
- root.setWidth(100);
- root.setHeight(100);
-
- const child1 = Yoga.Node.create();
- child1.setHeight(50);
- child1.setMaxWidth(40);
- child1.setAspectRatio(1);
- root.insertChild(child1, 0);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(40);
- expect(child1.getComputedLayout().height).toBe(50);
- });
-
- test('aspect_ratio_with_max_main_defined', () => {
- const root = Yoga.Node.create();
-
- root.setAlignItems(Yoga.ALIGN_FLEX_START);
- root.setWidth(100);
- root.setHeight(100);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(50);
- child1.setMaxHeight(40);
- child1.setAspectRatio(1);
- root.insertChild(child1, 0);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(40);
- expect(child1.getComputedLayout().height).toBe(40);
- });
-
- test('aspect_ratio_with_min_cross_defined', () => {
- const root = Yoga.Node.create();
-
- root.setAlignItems(Yoga.ALIGN_FLEX_START);
- root.setWidth(100);
- root.setHeight(100);
-
- const child1 = Yoga.Node.create();
- child1.setHeight(30);
- child1.setMinWidth(40);
- child1.setAspectRatio(1);
- root.insertChild(child1, 0);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(40);
- expect(child1.getComputedLayout().height).toBe(30);
- });
-
- test('aspect_ratio_with_min_main_defined', () => {
- const root = Yoga.Node.create();
-
- root.setAlignItems(Yoga.ALIGN_FLEX_START);
- root.setWidth(100);
- root.setHeight(100);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(30);
- child1.setMinHeight(40);
- child1.setAspectRatio(1);
- root.insertChild(child1, 0);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(40);
- expect(child1.getComputedLayout().height).toBe(40);
- });
-
- test('aspect_ratio_double_cross', () => {
- const root = Yoga.Node.create();
-
- root.setAlignItems(Yoga.ALIGN_FLEX_START);
- root.setWidth(100);
- root.setHeight(100);
-
- const child1 = Yoga.Node.create();
- child1.setHeight(50);
- child1.setAspectRatio(2);
- root.insertChild(child1, 0);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(100);
- expect(child1.getComputedLayout().height).toBe(50);
- });
-
- test('aspect_ratio_half_cross', () => {
- const root = Yoga.Node.create();
-
- root.setAlignItems(Yoga.ALIGN_FLEX_START);
- root.setWidth(100);
- root.setHeight(100);
-
- const child1 = Yoga.Node.create();
- child1.setHeight(100);
- child1.setAspectRatio(0.5);
- root.insertChild(child1, 0);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(100);
- });
-
- test('aspect_ratio_double_main', () => {
- const root = Yoga.Node.create();
-
- root.setAlignItems(Yoga.ALIGN_FLEX_START);
- root.setWidth(100);
- root.setHeight(100);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(50);
- child1.setAspectRatio(0.5);
- root.insertChild(child1, 0);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(100);
- });
-
- test('aspect_ratio_half_main', () => {
- const root = Yoga.Node.create();
-
- root.setAlignItems(Yoga.ALIGN_FLEX_START);
- root.setWidth(100);
- root.setHeight(100);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(100);
- child1.setAspectRatio(2);
- root.insertChild(child1, 0);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(100);
- expect(child1.getComputedLayout().height).toBe(50);
- });
-
- test('aspect_ratio_with_measure_func', () => {
- const root = Yoga.Node.create();
-
- root.setAlignItems(Yoga.ALIGN_FLEX_START);
- root.setWidth(100);
- root.setHeight(100);
-
- const child1 = Yoga.Node.create();
- child1.setMeasureFunc(measure);
- child1.setAspectRatio(1);
- root.insertChild(child1, 0);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
- });
-
- test('aspect_ratio_width_height_flex_grow_row', () => {
- const root = Yoga.Node.create();
-
- root.setAlignItems(Yoga.ALIGN_FLEX_START);
- root.setWidth(100);
- root.setHeight(200);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(50);
- child1.setHeight(50);
- child1.setFlexGrow(1);
- child1.setAspectRatio(1);
- root.insertChild(child1, 0);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(200);
- expect(child1.getComputedLayout().height).toBe(200);
- });
-
- test('aspect_ratio_width_height_flex_grow_column', () => {
- const root = Yoga.Node.create();
-
- root.setAlignItems(Yoga.ALIGN_FLEX_START);
- root.setWidth(200);
- root.setHeight(100);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(50);
- child1.setHeight(50);
- child1.setFlexGrow(1);
- child1.setAspectRatio(1);
- root.insertChild(child1, 0);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(100);
- expect(child1.getComputedLayout().height).toBe(100);
- });
-
- test('aspect_ratio_height_as_flex_basis', () => {
- const root = Yoga.Node.create();
-
- root.setAlignItems(Yoga.ALIGN_FLEX_START);
- root.setWidth(200);
- root.setHeight(200);
-
- const child1 = Yoga.Node.create();
- child1.setHeight(50);
- child1.setFlexGrow(1);
- child1.setAspectRatio(1);
- root.insertChild(child1, 0);
-
- const child2 = Yoga.Node.create();
- child2.setHeight(100);
- child2.setFlexGrow(1);
- child2.setAspectRatio(1);
- root.insertChild(child2, 1);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(75);
- expect(child1.getComputedLayout().height).toBe(75);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(75);
- expect(child2.getComputedLayout().width).toBe(125);
- expect(child2.getComputedLayout().height).toBe(125);
- });
-
- test('aspect_ratio_width_as_flex_basis', () => {
- const root = Yoga.Node.create();
-
- root.setAlignItems(Yoga.ALIGN_FLEX_START);
- root.setWidth(200);
- root.setHeight(200);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(50);
- child1.setFlexGrow(1);
- child1.setAspectRatio(1);
- root.insertChild(child1, 0);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(100);
- child2.setFlexGrow(1);
- child2.setAspectRatio(1);
- root.insertChild(child2, 1);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(75);
- expect(child1.getComputedLayout().height).toBe(75);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(75);
- expect(child2.getComputedLayout().width).toBe(125);
- expect(child2.getComputedLayout().height).toBe(125);
- });
-
- test('aspect_ratio_overrides_flex_grow_row', () => {
- const root = Yoga.Node.create();
-
- root.setAlignItems(Yoga.ALIGN_FLEX_START);
- root.setWidth(100);
- root.setHeight(100);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(50);
- child1.setFlexGrow(1);
- child1.setAspectRatio(0.5);
- root.insertChild(child1, 0);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(100);
- });
-
- test('aspect_ratio_overrides_flex_grow_column', () => {
- const root = Yoga.Node.create();
-
- root.setAlignItems(Yoga.ALIGN_FLEX_START);
- root.setWidth(100);
- root.setHeight(100);
-
- const child1 = Yoga.Node.create();
- child1.setHeight(50);
- child1.setFlexGrow(1);
- child1.setAspectRatio(2);
- root.insertChild(child1, 0);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(200);
- expect(child1.getComputedLayout().height).toBe(100);
- });
-
- test('aspect_ratio_left_right_absolute', () => {
- const root = Yoga.Node.create();
-
- root.setWidth(100);
- root.setHeight(100);
-
- const child1 = Yoga.Node.create();
- child1.setPositionType(Yoga.POSITION_TYPE_ABSOLUTE);
- child1.setPosition(Yoga.EDGE_LEFT, 10);
- child1.setPosition(Yoga.EDGE_TOP, 10);
- child1.setPosition(Yoga.EDGE_RIGHT, 10);
- child1.setAspectRatio(1);
- root.insertChild(child1, 0);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(child1.getComputedLayout().left).toBe(10);
- expect(child1.getComputedLayout().top).toBe(10);
- expect(child1.getComputedLayout().width).toBe(80);
- expect(child1.getComputedLayout().height).toBe(80);
- });
-
- test('aspect_ratio_top_bottom_absolute', () => {
- const root = Yoga.Node.create();
-
- root.setWidth(100);
- root.setHeight(100);
-
- const child1 = Yoga.Node.create();
- child1.setPositionType(Yoga.POSITION_TYPE_ABSOLUTE);
- child1.setPosition(Yoga.EDGE_LEFT, 10);
- child1.setPosition(Yoga.EDGE_TOP, 10);
- child1.setPosition(Yoga.EDGE_BOTTOM, 10);
- child1.setAspectRatio(1);
- root.insertChild(child1, 0);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(child1.getComputedLayout().left).toBe(10);
- expect(child1.getComputedLayout().top).toBe(10);
- expect(child1.getComputedLayout().width).toBe(80);
- expect(child1.getComputedLayout().height).toBe(80);
- });
-
- test('aspect_ratio_width_overrides_align_stretch_row', () => {
- const root = Yoga.Node.create();
-
- root.setWidth(100);
- root.setHeight(100);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(50);
- child1.setAspectRatio(1);
- root.insertChild(child1, 0);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
- });
-
- test('aspect_ratio_height_overrides_align_stretch_column', () => {
- const root = Yoga.Node.create();
-
- root.setWidth(100);
- root.setHeight(100);
-
- const child1 = Yoga.Node.create();
- child1.setHeight(50);
- child1.setAspectRatio(1);
- root.insertChild(child1, 0);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
- });
-
- test('aspect_ratio_allow_child_overflow_parent_size', () => {
- const root = Yoga.Node.create();
-
- root.setAlignItems(Yoga.ALIGN_FLEX_START);
- root.setWidth(100);
-
- const child1 = Yoga.Node.create();
- child1.setHeight(50);
- child1.setAspectRatio(4);
- root.insertChild(child1, 0);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(50);
-
- expect(child1.getComputedLayout().width).toBe(200);
- expect(child1.getComputedLayout().height).toBe(50);
- });
-
- test('aspect_ratio_defined_main_with_margin', () => {
- const root = Yoga.Node.create();
-
- root.setAlignItems(Yoga.ALIGN_CENTER);
- root.setJustifyContent(Yoga.JUSTIFY_CENTER);
- root.setWidth(100);
- root.setHeight(100);
-
- const child1 = Yoga.Node.create();
- child1.setHeight(50);
- child1.setAspectRatio(1);
- child1.setMargin(Yoga.EDGE_LEFT, 10);
- child1.setMargin(Yoga.EDGE_RIGHT, 10);
- root.insertChild(child1, 0);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
- });
-
- test('aspect_ratio_defined_cross_with_margin', () => {
- const root = Yoga.Node.create();
-
- root.setAlignItems(Yoga.ALIGN_CENTER);
- root.setJustifyContent(Yoga.JUSTIFY_CENTER);
- root.setWidth(100);
- root.setHeight(100);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(50);
- child1.setAspectRatio(1);
- child1.setMargin(Yoga.EDGE_LEFT, 10);
- child1.setMargin(Yoga.EDGE_RIGHT, 10);
- root.insertChild(child1, 0);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
- });
-});
diff --git a/packages/yoga/tests/border.test.js b/packages/yoga/tests/border.test.js
deleted file mode 100644
index 675fa68c6..000000000
--- a/packages/yoga/tests/border.test.js
+++ /dev/null
@@ -1,317 +0,0 @@
-const Yoga = require('..');
-
-describe('Borders', () => {
- let yogaNode;
- let flexboxNode;
-
- beforeEach(() => {
- yogaNode = Yoga.Node.createDefault();
- flexboxNode = Yoga.Node.createDefault();
- });
-
- test('should have same top border by default', () => {
- expect(yogaNode.getBorder(Yoga.EDGE_TOP)).toEqual(
- flexboxNode.getBorder(Yoga.EDGE_TOP),
- );
- });
-
- test('should have same left border by default', () => {
- expect(yogaNode.getBorder(Yoga.EDGE_LEFT)).toEqual(
- flexboxNode.getBorder(Yoga.EDGE_LEFT),
- );
- });
-
- test('should have same bottom border by default', () => {
- expect(yogaNode.getBorder(Yoga.EDGE_BOTTOM)).toEqual(
- flexboxNode.getBorder(Yoga.EDGE_BOTTOM),
- );
- });
-
- test('should have same right border by default', () => {
- expect(yogaNode.getBorder(Yoga.EDGE_RIGHT)).toEqual(
- flexboxNode.getBorder(Yoga.EDGE_RIGHT),
- );
- });
-
- test('should have same vertical border by default', () => {
- expect(yogaNode.getBorder(Yoga.EDGE_VERTICAL)).toEqual(
- flexboxNode.getBorder(Yoga.EDGE_VERTICAL),
- );
- });
-
- test('should have same horizontal border by default', () => {
- expect(yogaNode.getBorder(Yoga.EDGE_HORIZONTAL)).toEqual(
- flexboxNode.getBorder(Yoga.EDGE_HORIZONTAL),
- );
- });
-
- test('should have same start border by default', () => {
- expect(yogaNode.getBorder(Yoga.EDGE_START)).toEqual(
- flexboxNode.getBorder(Yoga.EDGE_START),
- );
- });
-
- test('should have same end border by default', () => {
- expect(yogaNode.getBorder(Yoga.EDGE_END)).toEqual(
- flexboxNode.getBorder(Yoga.EDGE_END),
- );
- });
-
- test('should have same all border by default', () => {
- expect(yogaNode.getBorder(Yoga.EDGE_ALL)).toEqual(
- flexboxNode.getBorder(Yoga.EDGE_ALL),
- );
- });
-
- test('should set top border', () => {
- yogaNode.setBorder(Yoga.EDGE_TOP, 5);
- flexboxNode.setBorder(Yoga.EDGE_TOP, 5);
-
- expect(yogaNode.getBorder(Yoga.EDGE_TOP)).toEqual(
- flexboxNode.getBorder(Yoga.EDGE_TOP),
- );
- });
-
- test('should set left border', () => {
- yogaNode.setBorder(Yoga.EDGE_LEFT, 5);
- flexboxNode.setBorder(Yoga.EDGE_LEFT, 5);
-
- expect(yogaNode.getBorder(Yoga.EDGE_LEFT)).toEqual(
- flexboxNode.getBorder(Yoga.EDGE_LEFT),
- );
- });
-
- test('should set bottom border', () => {
- yogaNode.setBorder(Yoga.EDGE_BOTTOM, 5);
- flexboxNode.setBorder(Yoga.EDGE_BOTTOM, 5);
-
- expect(yogaNode.getBorder(Yoga.EDGE_BOTTOM)).toEqual(
- flexboxNode.getBorder(Yoga.EDGE_BOTTOM),
- );
- });
-
- test('should set right border', () => {
- yogaNode.setBorder(Yoga.EDGE_RIGHT, 5);
- flexboxNode.setBorder(Yoga.EDGE_RIGHT, 5);
-
- expect(yogaNode.getBorder(Yoga.EDGE_RIGHT)).toEqual(
- flexboxNode.getBorder(Yoga.EDGE_RIGHT),
- );
- });
-
- test('should set vertical border', () => {
- yogaNode.setBorder(Yoga.EDGE_VERTICAL, 5);
- flexboxNode.setBorder(Yoga.EDGE_VERTICAL, 5);
-
- expect(yogaNode.getBorder(Yoga.EDGE_VERTICAL)).toEqual(
- flexboxNode.getBorder(Yoga.EDGE_VERTICAL),
- );
- });
-
- test('should set horizontal border', () => {
- yogaNode.setBorder(Yoga.EDGE_HORIZONTAL, 5);
- flexboxNode.setBorder(Yoga.EDGE_HORIZONTAL, 5);
-
- expect(yogaNode.getBorder(Yoga.EDGE_HORIZONTAL)).toEqual(
- flexboxNode.getBorder(Yoga.EDGE_HORIZONTAL),
- );
- });
-
- test('should set start border', () => {
- yogaNode.setBorder(Yoga.EDGE_START, 5);
- flexboxNode.setBorder(Yoga.EDGE_START, 5);
-
- expect(yogaNode.getBorder(Yoga.EDGE_START)).toEqual(
- flexboxNode.getBorder(Yoga.EDGE_START),
- );
- });
-
- test('should set end border', () => {
- yogaNode.setBorder(Yoga.EDGE_END, 5);
- flexboxNode.setBorder(Yoga.EDGE_END, 5);
-
- expect(yogaNode.getBorder(Yoga.EDGE_END)).toEqual(
- flexboxNode.getBorder(Yoga.EDGE_END),
- );
- });
-
- test('should set all border', () => {
- yogaNode.setBorder(Yoga.EDGE_ALL, 5);
- flexboxNode.setBorder(Yoga.EDGE_ALL, 5);
-
- expect(yogaNode.getBorder(Yoga.EDGE_ALL)).toEqual(
- flexboxNode.getBorder(Yoga.EDGE_ALL),
- );
- });
-
- test('border_no_size', () => {
- const root = Yoga.Node.create();
- root.setBorder(Yoga.EDGE_LEFT, 10);
- root.setBorder(Yoga.EDGE_TOP, 10);
- root.setBorder(Yoga.EDGE_RIGHT, 10);
- root.setBorder(Yoga.EDGE_BOTTOM, 10);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(20);
- expect(root.getComputedLayout().height).toBe(20);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(20);
- expect(root.getComputedLayout().height).toBe(20);
- });
-
- test('border_container_match_child', () => {
- const root = Yoga.Node.create();
- root.setBorder(Yoga.EDGE_LEFT, 10);
- root.setBorder(Yoga.EDGE_TOP, 10);
- root.setBorder(Yoga.EDGE_RIGHT, 10);
- root.setBorder(Yoga.EDGE_BOTTOM, 10);
-
- const child = Yoga.Node.create();
- child.setWidth(10);
- child.setHeight(10);
- root.insertChild(child, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(30);
- expect(root.getComputedLayout().height).toBe(30);
-
- expect(child.getComputedLayout().left).toBe(10);
- expect(child.getComputedLayout().top).toBe(10);
- expect(child.getComputedLayout().width).toBe(10);
- expect(child.getComputedLayout().height).toBe(10);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(30);
- expect(root.getComputedLayout().height).toBe(30);
-
- expect(child.getComputedLayout().left).toBe(10);
- expect(child.getComputedLayout().top).toBe(10);
- expect(child.getComputedLayout().width).toBe(10);
- expect(child.getComputedLayout().height).toBe(10);
- });
-
- test('border_flex_child', () => {
- const root = Yoga.Node.create();
- root.setBorder(Yoga.EDGE_LEFT, 10);
- root.setBorder(Yoga.EDGE_TOP, 10);
- root.setBorder(Yoga.EDGE_RIGHT, 10);
- root.setBorder(Yoga.EDGE_BOTTOM, 10);
- root.setWidth(100);
- root.setHeight(100);
-
- const child = Yoga.Node.create();
- child.setFlexGrow(1);
- child.setWidth(10);
- root.insertChild(child, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child.getComputedLayout().left).toBe(10);
- expect(child.getComputedLayout().top).toBe(10);
- expect(child.getComputedLayout().width).toBe(10);
- expect(child.getComputedLayout().height).toBe(80);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child.getComputedLayout().left).toBe(80);
- expect(child.getComputedLayout().top).toBe(10);
- expect(child.getComputedLayout().width).toBe(10);
- expect(child.getComputedLayout().height).toBe(80);
- });
-
- test('border_stretch_child', () => {
- const root = Yoga.Node.create();
- root.setBorder(Yoga.EDGE_LEFT, 10);
- root.setBorder(Yoga.EDGE_TOP, 10);
- root.setBorder(Yoga.EDGE_RIGHT, 10);
- root.setBorder(Yoga.EDGE_BOTTOM, 10);
- root.setWidth(100);
- root.setHeight(100);
-
- const child = Yoga.Node.create();
- child.setHeight(10);
- root.insertChild(child, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child.getComputedLayout().left).toBe(10);
- expect(child.getComputedLayout().top).toBe(10);
- expect(child.getComputedLayout().width).toBe(80);
- expect(child.getComputedLayout().height).toBe(10);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child.getComputedLayout().left).toBe(10);
- expect(child.getComputedLayout().top).toBe(10);
- expect(child.getComputedLayout().width).toBe(80);
- expect(child.getComputedLayout().height).toBe(10);
- });
-
- test('border_center_child', () => {
- const root = Yoga.Node.create();
- root.setJustifyContent(Yoga.JUSTIFY_CENTER);
- root.setAlignItems(Yoga.ALIGN_CENTER);
- root.setBorder(Yoga.EDGE_START, 10);
- root.setBorder(Yoga.EDGE_END, 20);
- root.setBorder(Yoga.EDGE_BOTTOM, 20);
- root.setWidth(100);
- root.setHeight(100);
-
- const child = Yoga.Node.create();
- child.setWidth(10);
- child.setHeight(10);
- root.insertChild(child, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child.getComputedLayout().left).toBe(40);
- expect(child.getComputedLayout().top).toBe(35);
- expect(child.getComputedLayout().width).toBe(10);
- expect(child.getComputedLayout().height).toBe(10);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child.getComputedLayout().left).toBe(50);
- expect(child.getComputedLayout().top).toBe(35);
- expect(child.getComputedLayout().width).toBe(10);
- expect(child.getComputedLayout().height).toBe(10);
- });
-});
diff --git a/packages/yoga/tests/computedMargin.test.js b/packages/yoga/tests/computedMargin.test.js
deleted file mode 100644
index cc5f20e5e..000000000
--- a/packages/yoga/tests/computedMargin.test.js
+++ /dev/null
@@ -1,20 +0,0 @@
-const Yoga = require('..');
-
-describe('Computed margin', () => {
- test('computed layout margin', () => {
- const root = Yoga.Node.create();
- root.setWidth(100);
- root.setHeight(100);
- root.setMarginPercent(Yoga.EDGE_START, 10);
-
- root.calculateLayout(100, 100, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedMargin(Yoga.EDGE_LEFT)).toBe(10);
- expect(root.getComputedMargin(Yoga.EDGE_RIGHT)).toBe(0);
-
- root.calculateLayout(100, 100, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedMargin(Yoga.EDGE_LEFT)).toBe(0);
- expect(root.getComputedMargin(Yoga.EDGE_RIGHT)).toBe(10);
- });
-});
diff --git a/packages/yoga/tests/computedPadding.test.js b/packages/yoga/tests/computedPadding.test.js
deleted file mode 100644
index 04ae353ab..000000000
--- a/packages/yoga/tests/computedPadding.test.js
+++ /dev/null
@@ -1,20 +0,0 @@
-const Yoga = require('..');
-
-describe('Computed padding', () => {
- test('computed layout padding', () => {
- const root = Yoga.Node.create();
- root.setWidth(100);
- root.setHeight(100);
- root.setPaddingPercent(Yoga.EDGE_START, 10);
-
- root.calculateLayout(100, 100, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedPadding(Yoga.EDGE_LEFT)).toBe(10);
- expect(root.getComputedPadding(Yoga.EDGE_RIGHT)).toBe(0);
-
- root.calculateLayout(100, 100, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedPadding(Yoga.EDGE_LEFT)).toBe(0);
- expect(root.getComputedPadding(Yoga.EDGE_RIGHT)).toBe(10);
- });
-});
diff --git a/packages/yoga/tests/defaultValues.test.js b/packages/yoga/tests/defaultValues.test.js
deleted file mode 100644
index 64fc39b3b..000000000
--- a/packages/yoga/tests/defaultValues.test.js
+++ /dev/null
@@ -1,106 +0,0 @@
-const Yoga = require('..');
-
-describe('Default values', () => {
- test('assert default values', () => {
- const root = Yoga.Node.create();
-
- expect(root.getChildCount()).toBe(0);
- expect(root.getChild(1)).toBe(null);
-
- expect(root.getFlexDirection()).toBe(Yoga.FLEX_DIRECTION_COLUMN);
- expect(root.getJustifyContent()).toBe(Yoga.JUSTIFY_FLEX_START);
- expect(root.getAlignContent()).toBe(Yoga.ALIGN_FLEX_START);
- expect(root.getAlignItems()).toBe(Yoga.ALIGN_STRETCH);
- expect(root.getAlignSelf()).toBe(Yoga.ALIGN_AUTO);
- expect(root.getPositionType()).toBe(Yoga.POSITION_TYPE_STATIC);
- expect(root.getFlexWrap()).toBe(Yoga.WRAP_NO_WRAP);
- expect(root.getOverflow()).toBe(Yoga.OVERFLOW_VISIBLE);
- expect(root.getFlexGrow()).toBe(0);
- expect(root.getFlexShrink()).toBe(0);
- expect(root.getFlexBasis().unit).toBe(Yoga.UNIT_AUTO);
-
- expect(root.getPosition(Yoga.EDGE_LEFT).unit).toBe(
- Yoga.UNIT_UNDEFINED,
- );
- expect(root.getPosition(Yoga.EDGE_TOP).unit).toBe(
- Yoga.UNIT_UNDEFINED,
- );
- expect(root.getPosition(Yoga.EDGE_RIGHT).unit).toBe(
- Yoga.UNIT_UNDEFINED,
- );
- expect(root.getPosition(Yoga.EDGE_BOTTOM).unit).toBe(
- Yoga.UNIT_UNDEFINED,
- );
- expect(root.getPosition(Yoga.EDGE_START).unit).toBe(
- Yoga.UNIT_UNDEFINED,
- );
- expect(root.getPosition(Yoga.EDGE_END).unit).toBe(
- Yoga.UNIT_UNDEFINED,
- );
-
- expect(root.getMargin(Yoga.EDGE_LEFT).unit).toBe(Yoga.UNIT_UNDEFINED);
- expect(root.getMargin(Yoga.EDGE_TOP).unit).toBe(Yoga.UNIT_UNDEFINED);
- expect(root.getMargin(Yoga.EDGE_RIGHT).unit).toBe(
- Yoga.UNIT_UNDEFINED,
- );
- expect(root.getMargin(Yoga.EDGE_BOTTOM).unit).toBe(
- Yoga.UNIT_UNDEFINED,
- );
- expect(root.getMargin(Yoga.EDGE_START).unit).toBe(
- Yoga.UNIT_UNDEFINED,
- );
- expect(root.getMargin(Yoga.EDGE_END).unit).toBe(Yoga.UNIT_UNDEFINED);
-
- expect(root.getPadding(Yoga.EDGE_LEFT).unit).toBe(
- Yoga.UNIT_UNDEFINED,
- );
- expect(root.getPadding(Yoga.EDGE_TOP).unit).toBe(Yoga.UNIT_UNDEFINED);
- expect(root.getPadding(Yoga.EDGE_RIGHT).unit).toBe(
- Yoga.UNIT_UNDEFINED,
- );
- expect(root.getPadding(Yoga.EDGE_BOTTOM).unit).toBe(
- Yoga.UNIT_UNDEFINED,
- );
- expect(root.getPadding(Yoga.EDGE_START).unit).toBe(
- Yoga.UNIT_UNDEFINED,
- );
- expect(root.getPadding(Yoga.EDGE_END).unit).toBe(Yoga.UNIT_UNDEFINED);
-
- expect(root.getBorder(Yoga.EDGE_LEFT)).toBeFalsy();
- expect(root.getBorder(Yoga.EDGE_TOP)).toBeFalsy();
- expect(root.getBorder(Yoga.EDGE_RIGHT)).toBeFalsy();
- expect(root.getBorder(Yoga.EDGE_BOTTOM)).toBeFalsy();
- expect(root.getBorder(Yoga.EDGE_START)).toBeFalsy();
- expect(root.getBorder(Yoga.EDGE_END)).toBeFalsy();
-
- expect(root.getWidth().unit).toBe(Yoga.UNIT_AUTO);
- expect(root.getHeight().unit).toBe(Yoga.UNIT_AUTO);
- expect(root.getMinWidth().unit).toBe(Yoga.UNIT_UNDEFINED);
- expect(root.getMinHeight().unit).toBe(Yoga.UNIT_UNDEFINED);
- expect(root.getMaxWidth().unit).toBe(Yoga.UNIT_UNDEFINED);
- expect(root.getMaxHeight().unit).toBe(Yoga.UNIT_UNDEFINED);
-
- expect(root.getComputedLeft()).toBe(0);
- expect(root.getComputedTop()).toBe(0);
- expect(root.getComputedRight()).toBe(0);
- expect(root.getComputedBottom()).toBe(0);
-
- expect(root.getComputedMargin(Yoga.EDGE_LEFT)).toBe(0);
- expect(root.getComputedMargin(Yoga.EDGE_TOP)).toBe(0);
- expect(root.getComputedMargin(Yoga.EDGE_RIGHT)).toBe(0);
- expect(root.getComputedMargin(Yoga.EDGE_BOTTOM)).toBe(0);
-
- expect(root.getComputedPadding(Yoga.EDGE_LEFT)).toBe(0);
- expect(root.getComputedPadding(Yoga.EDGE_TOP)).toBe(0);
- expect(root.getComputedPadding(Yoga.EDGE_RIGHT)).toBe(0);
- expect(root.getComputedPadding(Yoga.EDGE_BOTTOM)).toBe(0);
-
- expect(root.getComputedBorder(Yoga.EDGE_LEFT)).toBe(0);
- expect(root.getComputedBorder(Yoga.EDGE_TOP)).toBe(0);
- expect(root.getComputedBorder(Yoga.EDGE_RIGHT)).toBe(0);
- expect(root.getComputedBorder(Yoga.EDGE_BOTTOM)).toBe(0);
-
- expect(root.getComputedWidth()).toBeFalsy();
- expect(root.getComputedHeight()).toBeFalsy();
- });
-});
diff --git a/packages/yoga/tests/dimention.test.js b/packages/yoga/tests/dimention.test.js
deleted file mode 100644
index 209417e91..000000000
--- a/packages/yoga/tests/dimention.test.js
+++ /dev/null
@@ -1,245 +0,0 @@
-const Yoga = require('..');
-
-describe('Dimensions', () => {
- let yogaNode;
- let flexboxNode;
-
- beforeEach(() => {
- yogaNode = Yoga.Node.createDefault();
- flexboxNode = Yoga.Node.createDefault();
-
- // Set inital width
- yogaNode.setWidth(100);
- flexboxNode.setWidth(100);
-
- // Set inital height
- yogaNode.setHeight(100);
- flexboxNode.setHeight(100);
-
- // Set inital maxWidth
- yogaNode.setMaxWidth(100);
- flexboxNode.setMaxWidth(100);
-
- // Set inital maxHeight
- yogaNode.setMaxHeight(100);
- flexboxNode.setMaxHeight(100);
-
- // Set inital minWidth
- yogaNode.setMinWidth(100);
- flexboxNode.setMinWidth(100);
-
- // Set inital minHeight
- yogaNode.setMinHeight(100);
- flexboxNode.setMinHeight(100);
- });
-
- test('should have same width by default', () => {
- yogaNode = Yoga.Node.createDefault();
- flexboxNode = Yoga.Node.createDefault();
-
- expect(yogaNode.getWidth()).toEqual(flexboxNode.getWidth());
- });
-
- test('should have same height by default', () => {
- yogaNode = Yoga.Node.createDefault();
- flexboxNode = Yoga.Node.createDefault();
-
- expect(yogaNode.getHeight()).toEqual(flexboxNode.getHeight());
- });
-
- test('should have same maxWidth by default', () => {
- yogaNode = Yoga.Node.createDefault();
- flexboxNode = Yoga.Node.createDefault();
-
- expect(yogaNode.getMaxWidth()).toEqual(flexboxNode.getMaxWidth());
- });
-
- test('should have same maxHeight by default', () => {
- yogaNode = Yoga.Node.createDefault();
- flexboxNode = Yoga.Node.createDefault();
-
- expect(yogaNode.getMaxHeight()).toEqual(flexboxNode.getMaxHeight());
- });
-
- test('should setWidth', () => {
- yogaNode.setWidth(200);
- flexboxNode.setWidth(200);
-
- expect(yogaNode.getWidth()).toEqual(flexboxNode.getWidth());
- });
-
- test('should setWidthAuto', () => {
- yogaNode.setWidthAuto();
- flexboxNode.setWidthAuto();
-
- expect(yogaNode.getWidth()).toEqual(flexboxNode.getWidth());
- });
-
- test('should setWidthPercent', () => {
- yogaNode.setWidthPercent(50);
- flexboxNode.setWidthPercent(50);
-
- expect(yogaNode.getWidth()).toEqual(flexboxNode.getWidth());
- });
-
- test('should setHeight', () => {
- yogaNode.setHeight(200);
- flexboxNode.setHeight(200);
-
- expect(yogaNode.getHeight()).toEqual(flexboxNode.getHeight());
- });
-
- test('should setHeightAuto', () => {
- yogaNode.setHeightAuto();
- flexboxNode.setHeightAuto();
-
- expect(yogaNode.getHeight()).toEqual(flexboxNode.getHeight());
- });
-
- test('should setHeightPercent', () => {
- yogaNode.setHeightPercent(50);
- flexboxNode.setHeightPercent(50);
-
- expect(yogaNode.getHeight()).toEqual(flexboxNode.getHeight());
- });
-
- test('should setMaxWidth', () => {
- yogaNode.setMaxWidth(200);
- flexboxNode.setMaxWidth(200);
-
- expect(yogaNode.getMaxWidth()).toEqual(flexboxNode.getMaxWidth());
- });
-
- test('should setMaxWidthPercent', () => {
- yogaNode.setMaxWidthPercent(200);
- flexboxNode.setMaxWidthPercent(200);
-
- expect(yogaNode.getMaxWidth()).toEqual(flexboxNode.getMaxWidth());
- });
-
- test('should setMaxHeight', () => {
- yogaNode.setMaxHeight(200);
- flexboxNode.setMaxHeight(200);
-
- expect(yogaNode.getMaxHeight()).toEqual(flexboxNode.getMaxHeight());
- });
-
- test('should setMaxHeightPercent', () => {
- yogaNode.setMaxHeightPercent(200);
- flexboxNode.setMaxHeightPercent(200);
-
- expect(yogaNode.getMaxHeight()).toEqual(flexboxNode.getMaxHeight());
- });
-
- test('should setMinWidth', () => {
- yogaNode.setMinWidth(200);
- flexboxNode.setMinWidth(200);
-
- expect(yogaNode.getMinWidth()).toEqual(flexboxNode.getMinWidth());
- });
-
- test('should setMinWidthPercent', () => {
- yogaNode.setMinWidthPercent(200);
- flexboxNode.setMinWidthPercent(200);
-
- expect(yogaNode.getMinWidth()).toEqual(flexboxNode.getMinWidth());
- });
-
- test('should setMinHeight', () => {
- yogaNode.setMinHeight(200);
- flexboxNode.setMinHeight(200);
-
- expect(yogaNode.getMinHeight()).toEqual(flexboxNode.getMinHeight());
- });
-
- test('should setMinHeightPercent', () => {
- yogaNode.setMinHeightPercent(200);
- flexboxNode.setMinHeightPercent(200);
-
- expect(yogaNode.getMinHeight()).toEqual(flexboxNode.getMinHeight());
- });
-
- test('should setAspectRatio', () => {
- yogaNode.setAspectRatio(200);
- flexboxNode.setAspectRatio(200);
-
- expect(yogaNode.getAspectRatio()).toEqual(flexboxNode.getAspectRatio());
- });
-
- test('wrap child', () => {
- const root = Yoga.Node.create();
-
- const child = Yoga.Node.create();
- child.setWidth(100);
- child.setHeight(100);
- root.insertChild(child, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child.getComputedLayout().left).toBe(0);
- expect(child.getComputedLayout().top).toBe(0);
- expect(child.getComputedLayout().width).toBe(100);
- expect(child.getComputedLayout().height).toBe(100);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child.getComputedLayout().left).toBe(0);
- expect(child.getComputedLayout().top).toBe(0);
- expect(child.getComputedLayout().width).toBe(100);
- expect(child.getComputedLayout().height).toBe(100);
- });
-
- test('wrap grandchild', () => {
- const root = Yoga.Node.create();
-
- const child = Yoga.Node.create();
- root.insertChild(child, 0);
-
- const grandchild = Yoga.Node.create();
- grandchild.setWidth(100);
- grandchild.setHeight(100);
- child.insertChild(grandchild, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child.getComputedLayout().left).toBe(0);
- expect(child.getComputedLayout().top).toBe(0);
- expect(child.getComputedLayout().width).toBe(100);
- expect(child.getComputedLayout().height).toBe(100);
-
- expect(grandchild.getComputedLayout().left).toBe(0);
- expect(grandchild.getComputedLayout().top).toBe(0);
- expect(grandchild.getComputedLayout().width).toBe(100);
- expect(grandchild.getComputedLayout().height).toBe(100);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child.getComputedLayout().left).toBe(0);
- expect(child.getComputedLayout().top).toBe(0);
- expect(child.getComputedLayout().width).toBe(100);
- expect(child.getComputedLayout().height).toBe(100);
-
- expect(grandchild.getComputedLayout().left).toBe(0);
- expect(grandchild.getComputedLayout().top).toBe(0);
- expect(grandchild.getComputedLayout().width).toBe(100);
- expect(grandchild.getComputedLayout().height).toBe(100);
- });
-});
diff --git a/packages/yoga/tests/display.test.js b/packages/yoga/tests/display.test.js
deleted file mode 100644
index e1f7b5f12..000000000
--- a/packages/yoga/tests/display.test.js
+++ /dev/null
@@ -1,294 +0,0 @@
-const Yoga = require('..');
-
-describe('Display', () => {
- test('display_none', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setWidth(100);
- root.setHeight(100);
-
- const child0 = Yoga.Node.create();
- child0.setFlexGrow(1);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setFlexGrow(1);
- child1.setDisplay(Yoga.DISPLAY_NONE);
- root.insertChild(child1, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(100);
- expect(child0.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(0);
- expect(child1.getComputedLayout().height).toBe(0);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(100);
- expect(child0.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(0);
- expect(child1.getComputedLayout().height).toBe(0);
- });
-
- test('display_none_fixed_size', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setWidth(100);
- root.setHeight(100);
-
- const child0 = Yoga.Node.create();
- child0.setFlexGrow(1);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(20);
- child1.setHeight(20);
- child1.setDisplay(Yoga.DISPLAY_NONE);
- root.insertChild(child1, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(100);
- expect(child0.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(0);
- expect(child1.getComputedLayout().height).toBe(0);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(100);
- expect(child0.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(0);
- expect(child1.getComputedLayout().height).toBe(0);
- });
-
- test('display_none_with_margin', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setWidth(100);
- root.setHeight(100);
-
- const child0 = Yoga.Node.create();
- child0.setMargin(Yoga.EDGE_LEFT, 10);
- child0.setMargin(Yoga.EDGE_TOP, 10);
- child0.setMargin(Yoga.EDGE_RIGHT, 10);
- child0.setMargin(Yoga.EDGE_BOTTOM, 10);
- child0.setWidth(20);
- child0.setHeight(20);
- child0.setDisplay(Yoga.DISPLAY_NONE);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setFlexGrow(1);
- root.insertChild(child1, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(0);
- expect(child0.getComputedLayout().height).toBe(0);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(100);
- expect(child1.getComputedLayout().height).toBe(100);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(0);
- expect(child0.getComputedLayout().height).toBe(0);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(100);
- expect(child1.getComputedLayout().height).toBe(100);
- });
-
- test('display_none_with_child', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setWidth(100);
- root.setHeight(100);
-
- const child0 = Yoga.Node.create();
- child0.setFlexGrow(1);
- child0.setFlexShrink(1);
- child0.setFlexBasisPercent(0);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setFlexGrow(1);
- child1.setFlexShrink(1);
- child1.setFlexBasisPercent(0);
- child1.setDisplay(Yoga.DISPLAY_NONE);
- root.insertChild(child1, 1);
-
- const child2 = Yoga.Node.create();
- child2.setFlexGrow(1);
- child2.setFlexShrink(1);
- child2.setFlexBasisPercent(0);
- child2.setWidth(20);
- child2.setMinWidth(0);
- child2.setMinHeight(0);
- child1.insertChild(child2, 0);
-
- const child3 = Yoga.Node.create();
- child3.setFlexGrow(1);
- child3.setFlexShrink(1);
- child3.setFlexBasisPercent(0);
- root.insertChild(child3, 2);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(0);
- expect(child1.getComputedLayout().height).toBe(0);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(0);
- expect(child2.getComputedLayout().height).toBe(0);
-
- expect(child3.getComputedLayout().left).toBe(50);
- expect(child3.getComputedLayout().top).toBe(0);
- expect(child3.getComputedLayout().width).toBe(50);
- expect(child3.getComputedLayout().height).toBe(100);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(50);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(0);
- expect(child1.getComputedLayout().height).toBe(0);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(0);
- expect(child2.getComputedLayout().height).toBe(0);
-
- expect(child3.getComputedLayout().left).toBe(0);
- expect(child3.getComputedLayout().top).toBe(0);
- expect(child3.getComputedLayout().width).toBe(50);
- expect(child3.getComputedLayout().height).toBe(100);
- });
-
- test('display_none_with_position', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setWidth(100);
- root.setHeight(100);
-
- const child0 = Yoga.Node.create();
- child0.setFlexGrow(1);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setFlexGrow(1);
- child1.setPosition(Yoga.EDGE_TOP, 10);
- child1.setDisplay(Yoga.DISPLAY_NONE);
- root.insertChild(child1, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(100);
- expect(child0.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(0);
- expect(child1.getComputedLayout().height).toBe(0);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(100);
- expect(child0.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(0);
- expect(child1.getComputedLayout().height).toBe(0);
- });
-});
diff --git a/packages/yoga/tests/edge.test.js b/packages/yoga/tests/edge.test.js
deleted file mode 100644
index f1ba56ee5..000000000
--- a/packages/yoga/tests/edge.test.js
+++ /dev/null
@@ -1,141 +0,0 @@
-const Yoga = require('..');
-
-describe('Edge', () => {
- test('start_overrides', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setWidth(100);
- root.setHeight(100);
-
- const child0 = Yoga.Node.create();
- child0.setFlexGrow(1);
- child0.setMargin(Yoga.EDGE_START, 10);
- child0.setMargin(Yoga.EDGE_LEFT, 20);
- child0.setMargin(Yoga.EDGE_RIGHT, 20);
- root.insertChild(child0, 0);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
- expect(child0.getComputedLayout().left).toBe(10);
- expect(child0.getComputedLayout().right).toBe(20);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
- expect(child0.getComputedLayout().left).toBe(20);
- expect(child0.getComputedLayout().right).toBe(10);
- });
-
- test('end_overrides', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setWidth(100);
- root.setHeight(100);
-
- const child0 = Yoga.Node.create();
- child0.setFlexGrow(1);
- child0.setMargin(Yoga.EDGE_END, 10);
- child0.setMargin(Yoga.EDGE_LEFT, 20);
- child0.setMargin(Yoga.EDGE_RIGHT, 20);
- root.insertChild(child0, 0);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
- expect(child0.getComputedLayout().left).toBe(20);
- expect(child0.getComputedLayout().right).toBe(10);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
- expect(child0.getComputedLayout().left).toBe(10);
- expect(child0.getComputedLayout().right).toBe(20);
- });
-
- test('horizontal_overridden', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setWidth(100);
- root.setHeight(100);
-
- const child0 = Yoga.Node.create();
- child0.setFlexGrow(1);
- child0.setMargin(Yoga.EDGE_HORIZONTAL, 10);
- child0.setMargin(Yoga.EDGE_LEFT, 20);
- root.insertChild(child0, 0);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
- expect(child0.getComputedLayout().left).toBe(20);
- expect(child0.getComputedLayout().right).toBe(10);
- });
-
- test('vertical_overridden', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setWidth(100);
- root.setHeight(100);
-
- const child0 = Yoga.Node.create();
- child0.setFlexGrow(1);
- child0.setMargin(Yoga.EDGE_VERTICAL, 10);
- child0.setMargin(Yoga.EDGE_TOP, 20);
- root.insertChild(child0, 0);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
- expect(child0.getComputedLayout().top).toBe(20);
- expect(child0.getComputedLayout().bottom).toBe(10);
- });
-
- test('horizontal_overrides_all', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setWidth(100);
- root.setHeight(100);
-
- const child0 = Yoga.Node.create();
- child0.setFlexGrow(1);
- child0.setMargin(Yoga.EDGE_HORIZONTAL, 10);
- child0.setMargin(Yoga.EDGE_ALL, 20);
- root.insertChild(child0, 0);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
- expect(child0.getComputedLayout().left).toBe(10);
- expect(child0.getComputedLayout().top).toBe(20);
- expect(child0.getComputedLayout().right).toBe(10);
- expect(child0.getComputedLayout().bottom).toBe(20);
- });
-
- test('vertical_overrides_all', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setWidth(100);
- root.setHeight(100);
-
- const child0 = Yoga.Node.create();
- child0.setFlexGrow(1);
- child0.setMargin(Yoga.EDGE_VERTICAL, 10);
- child0.setMargin(Yoga.EDGE_ALL, 20);
- root.insertChild(child0, 0);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
- expect(child0.getComputedLayout().left).toBe(20);
- expect(child0.getComputedLayout().top).toBe(10);
- expect(child0.getComputedLayout().right).toBe(20);
- expect(child0.getComputedLayout().bottom).toBe(10);
- });
-
- test('all_overridden', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setWidth(100);
- root.setHeight(100);
-
- const child0 = Yoga.Node.create();
- child0.setFlexGrow(1);
- child0.setMargin(Yoga.EDGE_LEFT, 10);
- child0.setMargin(Yoga.EDGE_TOP, 10);
- child0.setMargin(Yoga.EDGE_RIGHT, 10);
- child0.setMargin(Yoga.EDGE_BOTTOM, 10);
- child0.setMargin(Yoga.EDGE_ALL, 20);
- root.insertChild(child0, 0);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
- expect(child0.getComputedLayout().left).toBe(10);
- expect(child0.getComputedLayout().top).toBe(10);
- expect(child0.getComputedLayout().right).toBe(10);
- expect(child0.getComputedLayout().bottom).toBe(10);
- });
-});
diff --git a/packages/yoga/tests/flexDirection.test.js b/packages/yoga/tests/flexDirection.test.js
deleted file mode 100644
index 72ad7f08d..000000000
--- a/packages/yoga/tests/flexDirection.test.js
+++ /dev/null
@@ -1,371 +0,0 @@
-const Yoga = require('..');
-
-describe('Flex direction', () => {
- test('flex_direction_column_no_height', () => {
- const root = Yoga.Node.create();
- root.setWidth(100);
-
- const child0 = Yoga.Node.create();
- child0.setHeight(10);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setHeight(10);
- root.insertChild(child1, 1);
-
- const child2 = Yoga.Node.create();
- child2.setHeight(10);
- root.insertChild(child2, 2);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(30);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(100);
- expect(child0.getComputedLayout().height).toBe(10);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(10);
- expect(child1.getComputedLayout().width).toBe(100);
- expect(child1.getComputedLayout().height).toBe(10);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(20);
- expect(child2.getComputedLayout().width).toBe(100);
- expect(child2.getComputedLayout().height).toBe(10);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(30);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(100);
- expect(child0.getComputedLayout().height).toBe(10);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(10);
- expect(child1.getComputedLayout().width).toBe(100);
- expect(child1.getComputedLayout().height).toBe(10);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(20);
- expect(child2.getComputedLayout().width).toBe(100);
- expect(child2.getComputedLayout().height).toBe(10);
- });
-
- test('flex_direction_row_no_width', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setHeight(100);
-
- const child0 = Yoga.Node.create();
- child0.setWidth(10);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(10);
- root.insertChild(child1, 1);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(10);
- root.insertChild(child2, 2);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(30);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(10);
- expect(child0.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(10);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(10);
- expect(child1.getComputedLayout().height).toBe(100);
-
- expect(child2.getComputedLayout().left).toBe(20);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(10);
- expect(child2.getComputedLayout().height).toBe(100);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(30);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(20);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(10);
- expect(child0.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(10);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(10);
- expect(child1.getComputedLayout().height).toBe(100);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(10);
- expect(child2.getComputedLayout().height).toBe(100);
- });
-
- test('flex_direction_column', () => {
- const root = Yoga.Node.create();
- root.setWidth(100);
- root.setHeight(100);
-
- const child0 = Yoga.Node.create();
- child0.setHeight(10);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setHeight(10);
- root.insertChild(child1, 1);
-
- const child2 = Yoga.Node.create();
- child2.setHeight(10);
- root.insertChild(child2, 2);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(100);
- expect(child0.getComputedLayout().height).toBe(10);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(10);
- expect(child1.getComputedLayout().width).toBe(100);
- expect(child1.getComputedLayout().height).toBe(10);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(20);
- expect(child2.getComputedLayout().width).toBe(100);
- expect(child2.getComputedLayout().height).toBe(10);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(100);
- expect(child0.getComputedLayout().height).toBe(10);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(10);
- expect(child1.getComputedLayout().width).toBe(100);
- expect(child1.getComputedLayout().height).toBe(10);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(20);
- expect(child2.getComputedLayout().width).toBe(100);
- expect(child2.getComputedLayout().height).toBe(10);
- });
-
- test('flex_direction_row', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setWidth(100);
- root.setHeight(100);
-
- const child0 = Yoga.Node.create();
- child0.setWidth(10);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(10);
- root.insertChild(child1, 1);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(10);
- root.insertChild(child2, 2);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(10);
- expect(child0.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(10);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(10);
- expect(child1.getComputedLayout().height).toBe(100);
-
- expect(child2.getComputedLayout().left).toBe(20);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(10);
- expect(child2.getComputedLayout().height).toBe(100);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(90);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(10);
- expect(child0.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(80);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(10);
- expect(child1.getComputedLayout().height).toBe(100);
-
- expect(child2.getComputedLayout().left).toBe(70);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(10);
- expect(child2.getComputedLayout().height).toBe(100);
- });
-
- test('flex_direction_column_reverse', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_COLUMN_REVERSE);
- root.setWidth(100);
- root.setHeight(100);
-
- const child0 = Yoga.Node.create();
- child0.setHeight(10);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setHeight(10);
- root.insertChild(child1, 1);
-
- const child2 = Yoga.Node.create();
- child2.setHeight(10);
- root.insertChild(child2, 2);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(90);
- expect(child0.getComputedLayout().width).toBe(100);
- expect(child0.getComputedLayout().height).toBe(10);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(80);
- expect(child1.getComputedLayout().width).toBe(100);
- expect(child1.getComputedLayout().height).toBe(10);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(70);
- expect(child2.getComputedLayout().width).toBe(100);
- expect(child2.getComputedLayout().height).toBe(10);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(90);
- expect(child0.getComputedLayout().width).toBe(100);
- expect(child0.getComputedLayout().height).toBe(10);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(80);
- expect(child1.getComputedLayout().width).toBe(100);
- expect(child1.getComputedLayout().height).toBe(10);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(70);
- expect(child2.getComputedLayout().width).toBe(100);
- expect(child2.getComputedLayout().height).toBe(10);
- });
-
- test('flex_direction_row_reverse', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW_REVERSE);
- root.setWidth(100);
- root.setHeight(100);
-
- const child0 = Yoga.Node.create();
- child0.setWidth(10);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(10);
- root.insertChild(child1, 1);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(10);
- root.insertChild(child2, 2);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(90);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(10);
- expect(child0.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(80);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(10);
- expect(child1.getComputedLayout().height).toBe(100);
-
- expect(child2.getComputedLayout().left).toBe(70);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(10);
- expect(child2.getComputedLayout().height).toBe(100);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(10);
- expect(child0.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(10);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(10);
- expect(child1.getComputedLayout().height).toBe(100);
-
- expect(child2.getComputedLayout().left).toBe(20);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(10);
- expect(child2.getComputedLayout().height).toBe(100);
- });
-});
diff --git a/packages/yoga/tests/flexSpec.test.js b/packages/yoga/tests/flexSpec.test.js
deleted file mode 100644
index 5c023dfc5..000000000
--- a/packages/yoga/tests/flexSpec.test.js
+++ /dev/null
@@ -1,435 +0,0 @@
-const Yoga = require('..');
-
-describe('Flex', () => {
- test('flex_basis_flex_grow_column', () => {
- const root = Yoga.Node.create();
- root.setWidth(100);
- root.setHeight(100);
-
- const child0 = Yoga.Node.create();
- child0.setFlexGrow(1);
- child0.setFlexBasis(50);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setFlexGrow(1);
- root.insertChild(child1, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(100);
- expect(child0.getComputedLayout().height).toBe(75);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(75);
- expect(child1.getComputedLayout().width).toBe(100);
- expect(child1.getComputedLayout().height).toBe(25);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(100);
- expect(child0.getComputedLayout().height).toBe(75);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(75);
- expect(child1.getComputedLayout().width).toBe(100);
- expect(child1.getComputedLayout().height).toBe(25);
- });
-
- test('flex_basis_flex_grow_row', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setWidth(100);
- root.setHeight(100);
-
- const child0 = Yoga.Node.create();
- child0.setFlexGrow(1);
- child0.setFlexBasis(50);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setFlexGrow(1);
- root.insertChild(child1, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(75);
- expect(child0.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(75);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(25);
- expect(child1.getComputedLayout().height).toBe(100);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(25);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(75);
- expect(child0.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(25);
- expect(child1.getComputedLayout().height).toBe(100);
- });
-
- test('flex_basis_flex_shrink_column', () => {
- const root = Yoga.Node.create();
- root.setWidth(100);
- root.setHeight(100);
-
- const child0 = Yoga.Node.create();
- child0.setFlexShrink(1);
- child0.setFlexBasis(100);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setFlexBasis(50);
- root.insertChild(child1, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(100);
- expect(child0.getComputedLayout().height).toBe(50);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(50);
- expect(child1.getComputedLayout().width).toBe(100);
- expect(child1.getComputedLayout().height).toBe(50);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(100);
- expect(child0.getComputedLayout().height).toBe(50);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(50);
- expect(child1.getComputedLayout().width).toBe(100);
- expect(child1.getComputedLayout().height).toBe(50);
- });
-
- test('flex_basis_flex_shrink_row', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setWidth(100);
- root.setHeight(100);
-
- const child0 = Yoga.Node.create();
- child0.setFlexShrink(1);
- child0.setFlexBasis(100);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setFlexBasis(50);
- root.insertChild(child1, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(50);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(100);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(50);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(100);
- });
-
- test('flex_shrink_to_zero', () => {
- const root = Yoga.Node.create();
- root.setHeight(75);
-
- const child0 = Yoga.Node.create();
- child0.setWidth(50);
- child0.setHeight(50);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setFlexShrink(1);
- child1.setWidth(50);
- child1.setHeight(50);
- root.insertChild(child1, 1);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(50);
- child2.setHeight(50);
- root.insertChild(child2, 2);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(50);
- expect(root.getComputedLayout().height).toBe(75);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(50);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(50);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(0);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(50);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(50);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(50);
- expect(root.getComputedLayout().height).toBe(75);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(50);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(50);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(0);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(50);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(50);
- });
-
- test('flex_basis_overrides_main_size', () => {
- const root = Yoga.Node.create();
- root.setWidth(100);
- root.setHeight(100);
-
- const child0 = Yoga.Node.create();
- child0.setFlexGrow(1);
- child0.setFlexBasis(50);
- child0.setHeight(20);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setFlexGrow(1);
- child1.setHeight(10);
- root.insertChild(child1, 1);
-
- const child2 = Yoga.Node.create();
- child2.setFlexGrow(1);
- child2.setHeight(10);
- root.insertChild(child2, 2);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(100);
- expect(child0.getComputedLayout().height).toBe(60);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(60);
- expect(child1.getComputedLayout().width).toBe(100);
- expect(child1.getComputedLayout().height).toBe(20);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(80);
- expect(child2.getComputedLayout().width).toBe(100);
- expect(child2.getComputedLayout().height).toBe(20);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(100);
- expect(child0.getComputedLayout().height).toBe(60);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(60);
- expect(child1.getComputedLayout().width).toBe(100);
- expect(child1.getComputedLayout().height).toBe(20);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(80);
- expect(child2.getComputedLayout().width).toBe(100);
- expect(child2.getComputedLayout().height).toBe(20);
- });
-
- test('flex_grow_shrink_at_most', () => {
- const root = Yoga.Node.create();
- root.setWidth(100);
- root.setHeight(100);
-
- const child0 = Yoga.Node.create();
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setFlexGrow(1);
- child1.setFlexShrink(1);
- child0.insertChild(child1, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(100);
- expect(child0.getComputedLayout().height).toBe(0);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(100);
- expect(child1.getComputedLayout().height).toBe(0);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(100);
- expect(child0.getComputedLayout().height).toBe(0);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(100);
- expect(child1.getComputedLayout().height).toBe(0);
- });
-
- test('flex_grow_less_than_factor_one', () => {
- const root = Yoga.Node.create();
- root.setWidth(200);
- root.setHeight(500);
-
- const child0 = Yoga.Node.create();
- child0.setFlexGrow(0.2);
- child0.setFlexBasis(40);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setFlexGrow(0.2);
- root.insertChild(child1, 1);
-
- const child2 = Yoga.Node.create();
- child2.setFlexGrow(0.4);
- root.insertChild(child2, 2);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(500);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(200);
- expect(child0.getComputedLayout().height).toBe(132);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(132);
- expect(child1.getComputedLayout().width).toBe(200);
- expect(child1.getComputedLayout().height).toBe(92);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(224);
- expect(child2.getComputedLayout().width).toBe(200);
- expect(child2.getComputedLayout().height).toBe(184);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(500);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(200);
- expect(child0.getComputedLayout().height).toBe(132);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(132);
- expect(child1.getComputedLayout().width).toBe(200);
- expect(child1.getComputedLayout().height).toBe(92);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(224);
- expect(child2.getComputedLayout().width).toBe(200);
- expect(child2.getComputedLayout().height).toBe(184);
- });
-});
diff --git a/packages/yoga/tests/flexWrap.test.js b/packages/yoga/tests/flexWrap.test.js
deleted file mode 100644
index 1dccb619e..000000000
--- a/packages/yoga/tests/flexWrap.test.js
+++ /dev/null
@@ -1,1607 +0,0 @@
-const Yoga = require('..');
-
-describe('Flex wrap', () => {
- test('wrap_column', () => {
- const root = Yoga.Node.create();
- root.setFlexWrap(Yoga.WRAP_WRAP);
- root.setHeight(100);
-
- const child0 = Yoga.Node.create();
- child0.setWidth(30);
- child0.setHeight(30);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(30);
- child1.setHeight(30);
- root.insertChild(child1, 1);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(30);
- child2.setHeight(30);
- root.insertChild(child2, 2);
-
- const child3 = Yoga.Node.create();
- child3.setWidth(30);
- child3.setHeight(30);
- root.insertChild(child3, 3);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(60);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(30);
- expect(child0.getComputedLayout().height).toBe(30);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(30);
- expect(child1.getComputedLayout().width).toBe(30);
- expect(child1.getComputedLayout().height).toBe(30);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(60);
- expect(child2.getComputedLayout().width).toBe(30);
- expect(child2.getComputedLayout().height).toBe(30);
-
- expect(child3.getComputedLayout().left).toBe(30);
- expect(child3.getComputedLayout().top).toBe(0);
- expect(child3.getComputedLayout().width).toBe(30);
- expect(child3.getComputedLayout().height).toBe(30);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(60);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(30);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(30);
- expect(child0.getComputedLayout().height).toBe(30);
-
- expect(child1.getComputedLayout().left).toBe(30);
- expect(child1.getComputedLayout().top).toBe(30);
- expect(child1.getComputedLayout().width).toBe(30);
- expect(child1.getComputedLayout().height).toBe(30);
-
- expect(child2.getComputedLayout().left).toBe(30);
- expect(child2.getComputedLayout().top).toBe(60);
- expect(child2.getComputedLayout().width).toBe(30);
- expect(child2.getComputedLayout().height).toBe(30);
-
- expect(child3.getComputedLayout().left).toBe(0);
- expect(child3.getComputedLayout().top).toBe(0);
- expect(child3.getComputedLayout().width).toBe(30);
- expect(child3.getComputedLayout().height).toBe(30);
- });
-
- test('wrap_row', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setFlexWrap(Yoga.WRAP_WRAP);
- root.setWidth(100);
-
- const child0 = Yoga.Node.create();
- child0.setWidth(30);
- child0.setHeight(30);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(30);
- child1.setHeight(30);
- root.insertChild(child1, 1);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(30);
- child2.setHeight(30);
- root.insertChild(child2, 2);
-
- const child3 = Yoga.Node.create();
- child3.setWidth(30);
- child3.setHeight(30);
- root.insertChild(child3, 3);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(60);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(30);
- expect(child0.getComputedLayout().height).toBe(30);
-
- expect(child1.getComputedLayout().left).toBe(30);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(30);
- expect(child1.getComputedLayout().height).toBe(30);
-
- expect(child2.getComputedLayout().left).toBe(60);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(30);
- expect(child2.getComputedLayout().height).toBe(30);
-
- expect(child3.getComputedLayout().left).toBe(0);
- expect(child3.getComputedLayout().top).toBe(30);
- expect(child3.getComputedLayout().width).toBe(30);
- expect(child3.getComputedLayout().height).toBe(30);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(60);
-
- expect(child0.getComputedLayout().left).toBe(70);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(30);
- expect(child0.getComputedLayout().height).toBe(30);
-
- expect(child1.getComputedLayout().left).toBe(40);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(30);
- expect(child1.getComputedLayout().height).toBe(30);
-
- expect(child2.getComputedLayout().left).toBe(10);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(30);
- expect(child2.getComputedLayout().height).toBe(30);
-
- expect(child3.getComputedLayout().left).toBe(70);
- expect(child3.getComputedLayout().top).toBe(30);
- expect(child3.getComputedLayout().width).toBe(30);
- expect(child3.getComputedLayout().height).toBe(30);
- });
-
- test('wrap_row_align_items_flex_end', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setAlignItems(Yoga.ALIGN_FLEX_END);
- root.setFlexWrap(Yoga.WRAP_WRAP);
- root.setWidth(100);
-
- const child0 = Yoga.Node.create();
- child0.setWidth(30);
- child0.setHeight(10);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(30);
- child1.setHeight(20);
- root.insertChild(child1, 1);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(30);
- child2.setHeight(30);
- root.insertChild(child2, 2);
-
- const child3 = Yoga.Node.create();
- child3.setWidth(30);
- child3.setHeight(30);
- root.insertChild(child3, 3);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(60);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(20);
- expect(child0.getComputedLayout().width).toBe(30);
- expect(child0.getComputedLayout().height).toBe(10);
-
- expect(child1.getComputedLayout().left).toBe(30);
- expect(child1.getComputedLayout().top).toBe(10);
- expect(child1.getComputedLayout().width).toBe(30);
- expect(child1.getComputedLayout().height).toBe(20);
-
- expect(child2.getComputedLayout().left).toBe(60);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(30);
- expect(child2.getComputedLayout().height).toBe(30);
-
- expect(child3.getComputedLayout().left).toBe(0);
- expect(child3.getComputedLayout().top).toBe(30);
- expect(child3.getComputedLayout().width).toBe(30);
- expect(child3.getComputedLayout().height).toBe(30);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(60);
-
- expect(child0.getComputedLayout().left).toBe(70);
- expect(child0.getComputedLayout().top).toBe(20);
- expect(child0.getComputedLayout().width).toBe(30);
- expect(child0.getComputedLayout().height).toBe(10);
-
- expect(child1.getComputedLayout().left).toBe(40);
- expect(child1.getComputedLayout().top).toBe(10);
- expect(child1.getComputedLayout().width).toBe(30);
- expect(child1.getComputedLayout().height).toBe(20);
-
- expect(child2.getComputedLayout().left).toBe(10);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(30);
- expect(child2.getComputedLayout().height).toBe(30);
-
- expect(child3.getComputedLayout().left).toBe(70);
- expect(child3.getComputedLayout().top).toBe(30);
- expect(child3.getComputedLayout().width).toBe(30);
- expect(child3.getComputedLayout().height).toBe(30);
- });
-
- test('wrap_row_align_items_center', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setAlignItems(Yoga.ALIGN_CENTER);
- root.setFlexWrap(Yoga.WRAP_WRAP);
- root.setWidth(100);
-
- const child0 = Yoga.Node.create();
- child0.setWidth(30);
- child0.setHeight(10);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(30);
- child1.setHeight(20);
- root.insertChild(child1, 1);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(30);
- child2.setHeight(30);
- root.insertChild(child2, 2);
-
- const child3 = Yoga.Node.create();
- child3.setWidth(30);
- child3.setHeight(30);
- root.insertChild(child3, 3);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(60);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(10);
- expect(child0.getComputedLayout().width).toBe(30);
- expect(child0.getComputedLayout().height).toBe(10);
-
- expect(child1.getComputedLayout().left).toBe(30);
- expect(child1.getComputedLayout().top).toBe(5);
- expect(child1.getComputedLayout().width).toBe(30);
- expect(child1.getComputedLayout().height).toBe(20);
-
- expect(child2.getComputedLayout().left).toBe(60);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(30);
- expect(child2.getComputedLayout().height).toBe(30);
-
- expect(child3.getComputedLayout().left).toBe(0);
- expect(child3.getComputedLayout().top).toBe(30);
- expect(child3.getComputedLayout().width).toBe(30);
- expect(child3.getComputedLayout().height).toBe(30);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(60);
-
- expect(child0.getComputedLayout().left).toBe(70);
- expect(child0.getComputedLayout().top).toBe(10);
- expect(child0.getComputedLayout().width).toBe(30);
- expect(child0.getComputedLayout().height).toBe(10);
-
- expect(child1.getComputedLayout().left).toBe(40);
- expect(child1.getComputedLayout().top).toBe(5);
- expect(child1.getComputedLayout().width).toBe(30);
- expect(child1.getComputedLayout().height).toBe(20);
-
- expect(child2.getComputedLayout().left).toBe(10);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(30);
- expect(child2.getComputedLayout().height).toBe(30);
-
- expect(child3.getComputedLayout().left).toBe(70);
- expect(child3.getComputedLayout().top).toBe(30);
- expect(child3.getComputedLayout().width).toBe(30);
- expect(child3.getComputedLayout().height).toBe(30);
- });
-
- test('flex_wrap_children_with_min_main_overriding_flex_basis', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setFlexWrap(Yoga.WRAP_WRAP);
- root.setWidth(100);
-
- const child0 = Yoga.Node.create();
- child0.setFlexBasis(50);
- child0.setMinWidth(55);
- child0.setHeight(50);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setFlexBasis(50);
- child1.setMinWidth(55);
- child1.setHeight(50);
- root.insertChild(child1, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(55);
- expect(child0.getComputedLayout().height).toBe(50);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(50);
- expect(child1.getComputedLayout().width).toBe(55);
- expect(child1.getComputedLayout().height).toBe(50);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(45);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(55);
- expect(child0.getComputedLayout().height).toBe(50);
-
- expect(child1.getComputedLayout().left).toBe(45);
- expect(child1.getComputedLayout().top).toBe(50);
- expect(child1.getComputedLayout().width).toBe(55);
- expect(child1.getComputedLayout().height).toBe(50);
- });
-
- test('flex_wrap_wrap_to_child_height', () => {
- const root = Yoga.Node.create();
-
- const child0 = Yoga.Node.create();
- child0.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- child0.setAlignItems(Yoga.ALIGN_FLEX_START);
- child0.setFlexWrap(Yoga.WRAP_WRAP);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(100);
- child0.insertChild(child1, 0);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(100);
- child2.setHeight(100);
- child1.insertChild(child2, 0);
-
- const child3 = Yoga.Node.create();
- child3.setWidth(100);
- child3.setHeight(100);
- root.insertChild(child3, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(100);
- expect(child0.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(100);
- expect(child1.getComputedLayout().height).toBe(100);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(100);
- expect(child2.getComputedLayout().height).toBe(100);
-
- expect(child3.getComputedLayout().left).toBe(0);
- expect(child3.getComputedLayout().top).toBe(100);
- expect(child3.getComputedLayout().width).toBe(100);
- expect(child3.getComputedLayout().height).toBe(100);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(100);
- expect(child0.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(100);
- expect(child1.getComputedLayout().height).toBe(100);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(100);
- expect(child2.getComputedLayout().height).toBe(100);
-
- expect(child3.getComputedLayout().left).toBe(0);
- expect(child3.getComputedLayout().top).toBe(100);
- expect(child3.getComputedLayout().width).toBe(100);
- expect(child3.getComputedLayout().height).toBe(100);
- });
-
- test('flex_wrap_align_stretch_fits_one_row', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setFlexWrap(Yoga.WRAP_WRAP);
- root.setWidth(150);
- root.setHeight(100);
-
- const child0 = Yoga.Node.create();
- child0.setWidth(50);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(50);
- root.insertChild(child1, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(150);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(0);
-
- expect(child1.getComputedLayout().left).toBe(50);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(0);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(150);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(100);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(0);
-
- expect(child1.getComputedLayout().left).toBe(50);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(0);
- });
-
- test('wrap_reverse_row_align_content_flex_start', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setFlexWrap(Yoga.WRAP_WRAP_REVERSE);
- root.setWidth(100);
-
- const child0 = Yoga.Node.create();
- child0.setWidth(30);
- child0.setHeight(10);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(30);
- child1.setHeight(20);
- root.insertChild(child1, 1);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(30);
- child2.setHeight(30);
- root.insertChild(child2, 2);
-
- const child3 = Yoga.Node.create();
- child3.setWidth(30);
- child3.setHeight(40);
- root.insertChild(child3, 3);
-
- const child4 = Yoga.Node.create();
- child4.setWidth(30);
- child4.setHeight(50);
- root.insertChild(child4, 4);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(80);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(70);
- expect(child0.getComputedLayout().width).toBe(30);
- expect(child0.getComputedLayout().height).toBe(10);
-
- expect(child1.getComputedLayout().left).toBe(30);
- expect(child1.getComputedLayout().top).toBe(60);
- expect(child1.getComputedLayout().width).toBe(30);
- expect(child1.getComputedLayout().height).toBe(20);
-
- expect(child2.getComputedLayout().left).toBe(60);
- expect(child2.getComputedLayout().top).toBe(50);
- expect(child2.getComputedLayout().width).toBe(30);
- expect(child2.getComputedLayout().height).toBe(30);
-
- expect(child3.getComputedLayout().left).toBe(0);
- expect(child3.getComputedLayout().top).toBe(10);
- expect(child3.getComputedLayout().width).toBe(30);
- expect(child3.getComputedLayout().height).toBe(40);
-
- expect(child4.getComputedLayout().left).toBe(30);
- expect(child4.getComputedLayout().top).toBe(0);
- expect(child4.getComputedLayout().width).toBe(30);
- expect(child4.getComputedLayout().height).toBe(50);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(80);
-
- expect(child0.getComputedLayout().left).toBe(70);
- expect(child0.getComputedLayout().top).toBe(70);
- expect(child0.getComputedLayout().width).toBe(30);
- expect(child0.getComputedLayout().height).toBe(10);
-
- expect(child1.getComputedLayout().left).toBe(40);
- expect(child1.getComputedLayout().top).toBe(60);
- expect(child1.getComputedLayout().width).toBe(30);
- expect(child1.getComputedLayout().height).toBe(20);
-
- expect(child2.getComputedLayout().left).toBe(10);
- expect(child2.getComputedLayout().top).toBe(50);
- expect(child2.getComputedLayout().width).toBe(30);
- expect(child2.getComputedLayout().height).toBe(30);
-
- expect(child3.getComputedLayout().left).toBe(70);
- expect(child3.getComputedLayout().top).toBe(10);
- expect(child3.getComputedLayout().width).toBe(30);
- expect(child3.getComputedLayout().height).toBe(40);
-
- expect(child4.getComputedLayout().left).toBe(40);
- expect(child4.getComputedLayout().top).toBe(0);
- expect(child4.getComputedLayout().width).toBe(30);
- expect(child4.getComputedLayout().height).toBe(50);
- });
-
- test('wrap_reverse_row_align_content_center', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setAlignContent(Yoga.ALIGN_CENTER);
- root.setFlexWrap(Yoga.WRAP_WRAP_REVERSE);
- root.setWidth(100);
-
- const child0 = Yoga.Node.create();
- child0.setWidth(30);
- child0.setHeight(10);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(30);
- child1.setHeight(20);
- root.insertChild(child1, 1);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(30);
- child2.setHeight(30);
- root.insertChild(child2, 2);
-
- const child3 = Yoga.Node.create();
- child3.setWidth(30);
- child3.setHeight(40);
- root.insertChild(child3, 3);
-
- const child4 = Yoga.Node.create();
- child4.setWidth(30);
- child4.setHeight(50);
- root.insertChild(child4, 4);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(80);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(70);
- expect(child0.getComputedLayout().width).toBe(30);
- expect(child0.getComputedLayout().height).toBe(10);
-
- expect(child1.getComputedLayout().left).toBe(30);
- expect(child1.getComputedLayout().top).toBe(60);
- expect(child1.getComputedLayout().width).toBe(30);
- expect(child1.getComputedLayout().height).toBe(20);
-
- expect(child2.getComputedLayout().left).toBe(60);
- expect(child2.getComputedLayout().top).toBe(50);
- expect(child2.getComputedLayout().width).toBe(30);
- expect(child2.getComputedLayout().height).toBe(30);
-
- expect(child3.getComputedLayout().left).toBe(0);
- expect(child3.getComputedLayout().top).toBe(10);
- expect(child3.getComputedLayout().width).toBe(30);
- expect(child3.getComputedLayout().height).toBe(40);
-
- expect(child4.getComputedLayout().left).toBe(30);
- expect(child4.getComputedLayout().top).toBe(0);
- expect(child4.getComputedLayout().width).toBe(30);
- expect(child4.getComputedLayout().height).toBe(50);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(80);
-
- expect(child0.getComputedLayout().left).toBe(70);
- expect(child0.getComputedLayout().top).toBe(70);
- expect(child0.getComputedLayout().width).toBe(30);
- expect(child0.getComputedLayout().height).toBe(10);
-
- expect(child1.getComputedLayout().left).toBe(40);
- expect(child1.getComputedLayout().top).toBe(60);
- expect(child1.getComputedLayout().width).toBe(30);
- expect(child1.getComputedLayout().height).toBe(20);
-
- expect(child2.getComputedLayout().left).toBe(10);
- expect(child2.getComputedLayout().top).toBe(50);
- expect(child2.getComputedLayout().width).toBe(30);
- expect(child2.getComputedLayout().height).toBe(30);
-
- expect(child3.getComputedLayout().left).toBe(70);
- expect(child3.getComputedLayout().top).toBe(10);
- expect(child3.getComputedLayout().width).toBe(30);
- expect(child3.getComputedLayout().height).toBe(40);
-
- expect(child4.getComputedLayout().left).toBe(40);
- expect(child4.getComputedLayout().top).toBe(0);
- expect(child4.getComputedLayout().width).toBe(30);
- expect(child4.getComputedLayout().height).toBe(50);
- });
-
- test('wrap_reverse_row_single_line_different_size', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setFlexWrap(Yoga.WRAP_WRAP_REVERSE);
- root.setWidth(300);
-
- const child0 = Yoga.Node.create();
- child0.setWidth(30);
- child0.setHeight(10);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(30);
- child1.setHeight(20);
- root.insertChild(child1, 1);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(30);
- child2.setHeight(30);
- root.insertChild(child2, 2);
-
- const child3 = Yoga.Node.create();
- child3.setWidth(30);
- child3.setHeight(40);
- root.insertChild(child3, 3);
-
- const child4 = Yoga.Node.create();
- child4.setWidth(30);
- child4.setHeight(50);
- root.insertChild(child4, 4);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(300);
- expect(root.getComputedLayout().height).toBe(50);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(40);
- expect(child0.getComputedLayout().width).toBe(30);
- expect(child0.getComputedLayout().height).toBe(10);
-
- expect(child1.getComputedLayout().left).toBe(30);
- expect(child1.getComputedLayout().top).toBe(30);
- expect(child1.getComputedLayout().width).toBe(30);
- expect(child1.getComputedLayout().height).toBe(20);
-
- expect(child2.getComputedLayout().left).toBe(60);
- expect(child2.getComputedLayout().top).toBe(20);
- expect(child2.getComputedLayout().width).toBe(30);
- expect(child2.getComputedLayout().height).toBe(30);
-
- expect(child3.getComputedLayout().left).toBe(90);
- expect(child3.getComputedLayout().top).toBe(10);
- expect(child3.getComputedLayout().width).toBe(30);
- expect(child3.getComputedLayout().height).toBe(40);
-
- expect(child4.getComputedLayout().left).toBe(120);
- expect(child4.getComputedLayout().top).toBe(0);
- expect(child4.getComputedLayout().width).toBe(30);
- expect(child4.getComputedLayout().height).toBe(50);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(300);
- expect(root.getComputedLayout().height).toBe(50);
-
- expect(child0.getComputedLayout().left).toBe(270);
- expect(child0.getComputedLayout().top).toBe(40);
- expect(child0.getComputedLayout().width).toBe(30);
- expect(child0.getComputedLayout().height).toBe(10);
-
- expect(child1.getComputedLayout().left).toBe(240);
- expect(child1.getComputedLayout().top).toBe(30);
- expect(child1.getComputedLayout().width).toBe(30);
- expect(child1.getComputedLayout().height).toBe(20);
-
- expect(child2.getComputedLayout().left).toBe(210);
- expect(child2.getComputedLayout().top).toBe(20);
- expect(child2.getComputedLayout().width).toBe(30);
- expect(child2.getComputedLayout().height).toBe(30);
-
- expect(child3.getComputedLayout().left).toBe(180);
- expect(child3.getComputedLayout().top).toBe(10);
- expect(child3.getComputedLayout().width).toBe(30);
- expect(child3.getComputedLayout().height).toBe(40);
-
- expect(child4.getComputedLayout().left).toBe(150);
- expect(child4.getComputedLayout().top).toBe(0);
- expect(child4.getComputedLayout().width).toBe(30);
- expect(child4.getComputedLayout().height).toBe(50);
- });
-
- test('wrap_reverse_row_align_content_stretch', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setAlignContent(Yoga.ALIGN_STRETCH);
- root.setFlexWrap(Yoga.WRAP_WRAP_REVERSE);
- root.setWidth(100);
-
- const child0 = Yoga.Node.create();
- child0.setWidth(30);
- child0.setHeight(10);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(30);
- child1.setHeight(20);
- root.insertChild(child1, 1);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(30);
- child2.setHeight(30);
- root.insertChild(child2, 2);
-
- const child3 = Yoga.Node.create();
- child3.setWidth(30);
- child3.setHeight(40);
- root.insertChild(child3, 3);
-
- const child4 = Yoga.Node.create();
- child4.setWidth(30);
- child4.setHeight(50);
- root.insertChild(child4, 4);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(80);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(70);
- expect(child0.getComputedLayout().width).toBe(30);
- expect(child0.getComputedLayout().height).toBe(10);
-
- expect(child1.getComputedLayout().left).toBe(30);
- expect(child1.getComputedLayout().top).toBe(60);
- expect(child1.getComputedLayout().width).toBe(30);
- expect(child1.getComputedLayout().height).toBe(20);
-
- expect(child2.getComputedLayout().left).toBe(60);
- expect(child2.getComputedLayout().top).toBe(50);
- expect(child2.getComputedLayout().width).toBe(30);
- expect(child2.getComputedLayout().height).toBe(30);
-
- expect(child3.getComputedLayout().left).toBe(0);
- expect(child3.getComputedLayout().top).toBe(10);
- expect(child3.getComputedLayout().width).toBe(30);
- expect(child3.getComputedLayout().height).toBe(40);
-
- expect(child4.getComputedLayout().left).toBe(30);
- expect(child4.getComputedLayout().top).toBe(0);
- expect(child4.getComputedLayout().width).toBe(30);
- expect(child4.getComputedLayout().height).toBe(50);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(80);
-
- expect(child0.getComputedLayout().left).toBe(70);
- expect(child0.getComputedLayout().top).toBe(70);
- expect(child0.getComputedLayout().width).toBe(30);
- expect(child0.getComputedLayout().height).toBe(10);
-
- expect(child1.getComputedLayout().left).toBe(40);
- expect(child1.getComputedLayout().top).toBe(60);
- expect(child1.getComputedLayout().width).toBe(30);
- expect(child1.getComputedLayout().height).toBe(20);
-
- expect(child2.getComputedLayout().left).toBe(10);
- expect(child2.getComputedLayout().top).toBe(50);
- expect(child2.getComputedLayout().width).toBe(30);
- expect(child2.getComputedLayout().height).toBe(30);
-
- expect(child3.getComputedLayout().left).toBe(70);
- expect(child3.getComputedLayout().top).toBe(10);
- expect(child3.getComputedLayout().width).toBe(30);
- expect(child3.getComputedLayout().height).toBe(40);
-
- expect(child4.getComputedLayout().left).toBe(40);
- expect(child4.getComputedLayout().top).toBe(0);
- expect(child4.getComputedLayout().width).toBe(30);
- expect(child4.getComputedLayout().height).toBe(50);
- });
-
- test('wrap_reverse_row_align_content_space_around', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setAlignContent(Yoga.ALIGN_SPACE_AROUND);
- root.setFlexWrap(Yoga.WRAP_WRAP_REVERSE);
- root.setWidth(100);
-
- const child0 = Yoga.Node.create();
- child0.setWidth(30);
- child0.setHeight(10);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(30);
- child1.setHeight(20);
- root.insertChild(child1, 1);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(30);
- child2.setHeight(30);
- root.insertChild(child2, 2);
-
- const child3 = Yoga.Node.create();
- child3.setWidth(30);
- child3.setHeight(40);
- root.insertChild(child3, 3);
-
- const child4 = Yoga.Node.create();
- child4.setWidth(30);
- child4.setHeight(50);
- root.insertChild(child4, 4);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(80);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(70);
- expect(child0.getComputedLayout().width).toBe(30);
- expect(child0.getComputedLayout().height).toBe(10);
-
- expect(child1.getComputedLayout().left).toBe(30);
- expect(child1.getComputedLayout().top).toBe(60);
- expect(child1.getComputedLayout().width).toBe(30);
- expect(child1.getComputedLayout().height).toBe(20);
-
- expect(child2.getComputedLayout().left).toBe(60);
- expect(child2.getComputedLayout().top).toBe(50);
- expect(child2.getComputedLayout().width).toBe(30);
- expect(child2.getComputedLayout().height).toBe(30);
-
- expect(child3.getComputedLayout().left).toBe(0);
- expect(child3.getComputedLayout().top).toBe(10);
- expect(child3.getComputedLayout().width).toBe(30);
- expect(child3.getComputedLayout().height).toBe(40);
-
- expect(child4.getComputedLayout().left).toBe(30);
- expect(child4.getComputedLayout().top).toBe(0);
- expect(child4.getComputedLayout().width).toBe(30);
- expect(child4.getComputedLayout().height).toBe(50);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(80);
-
- expect(child0.getComputedLayout().left).toBe(70);
- expect(child0.getComputedLayout().top).toBe(70);
- expect(child0.getComputedLayout().width).toBe(30);
- expect(child0.getComputedLayout().height).toBe(10);
-
- expect(child1.getComputedLayout().left).toBe(40);
- expect(child1.getComputedLayout().top).toBe(60);
- expect(child1.getComputedLayout().width).toBe(30);
- expect(child1.getComputedLayout().height).toBe(20);
-
- expect(child2.getComputedLayout().left).toBe(10);
- expect(child2.getComputedLayout().top).toBe(50);
- expect(child2.getComputedLayout().width).toBe(30);
- expect(child2.getComputedLayout().height).toBe(30);
-
- expect(child3.getComputedLayout().left).toBe(70);
- expect(child3.getComputedLayout().top).toBe(10);
- expect(child3.getComputedLayout().width).toBe(30);
- expect(child3.getComputedLayout().height).toBe(40);
-
- expect(child4.getComputedLayout().left).toBe(40);
- expect(child4.getComputedLayout().top).toBe(0);
- expect(child4.getComputedLayout().width).toBe(30);
- expect(child4.getComputedLayout().height).toBe(50);
- });
-
- test('wrap_reverse_column_fixed_size', () => {
- const root = Yoga.Node.create();
- root.setAlignItems(Yoga.ALIGN_CENTER);
- root.setFlexWrap(Yoga.WRAP_WRAP_REVERSE);
- root.setWidth(200);
- root.setHeight(100);
-
- const child0 = Yoga.Node.create();
- child0.setWidth(30);
- child0.setHeight(10);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(30);
- child1.setHeight(20);
- root.insertChild(child1, 1);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(30);
- child2.setHeight(30);
- root.insertChild(child2, 2);
-
- const child3 = Yoga.Node.create();
- child3.setWidth(30);
- child3.setHeight(40);
- root.insertChild(child3, 3);
-
- const child4 = Yoga.Node.create();
- child4.setWidth(30);
- child4.setHeight(50);
- root.insertChild(child4, 4);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(170);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(30);
- expect(child0.getComputedLayout().height).toBe(10);
-
- expect(child1.getComputedLayout().left).toBe(170);
- expect(child1.getComputedLayout().top).toBe(10);
- expect(child1.getComputedLayout().width).toBe(30);
- expect(child1.getComputedLayout().height).toBe(20);
-
- expect(child2.getComputedLayout().left).toBe(170);
- expect(child2.getComputedLayout().top).toBe(30);
- expect(child2.getComputedLayout().width).toBe(30);
- expect(child2.getComputedLayout().height).toBe(30);
-
- expect(child3.getComputedLayout().left).toBe(170);
- expect(child3.getComputedLayout().top).toBe(60);
- expect(child3.getComputedLayout().width).toBe(30);
- expect(child3.getComputedLayout().height).toBe(40);
-
- expect(child4.getComputedLayout().left).toBe(140);
- expect(child4.getComputedLayout().top).toBe(0);
- expect(child4.getComputedLayout().width).toBe(30);
- expect(child4.getComputedLayout().height).toBe(50);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(30);
- expect(child0.getComputedLayout().height).toBe(10);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(10);
- expect(child1.getComputedLayout().width).toBe(30);
- expect(child1.getComputedLayout().height).toBe(20);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(30);
- expect(child2.getComputedLayout().width).toBe(30);
- expect(child2.getComputedLayout().height).toBe(30);
-
- expect(child3.getComputedLayout().left).toBe(0);
- expect(child3.getComputedLayout().top).toBe(60);
- expect(child3.getComputedLayout().width).toBe(30);
- expect(child3.getComputedLayout().height).toBe(40);
-
- expect(child4.getComputedLayout().left).toBe(30);
- expect(child4.getComputedLayout().top).toBe(0);
- expect(child4.getComputedLayout().width).toBe(30);
- expect(child4.getComputedLayout().height).toBe(50);
- });
-
- test('wrapped_row_within_align_items_center', () => {
- const root = Yoga.Node.create();
- root.setAlignItems(Yoga.ALIGN_CENTER);
- root.setWidth(200);
- root.setHeight(200);
-
- const child0 = Yoga.Node.create();
- child0.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- child0.setFlexWrap(Yoga.WRAP_WRAP);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(150);
- child1.setHeight(80);
- child0.insertChild(child1, 0);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(80);
- child2.setHeight(80);
- child0.insertChild(child2, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(200);
- expect(child0.getComputedLayout().height).toBe(160);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(150);
- expect(child1.getComputedLayout().height).toBe(80);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(80);
- expect(child2.getComputedLayout().width).toBe(80);
- expect(child2.getComputedLayout().height).toBe(80);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(200);
- expect(child0.getComputedLayout().height).toBe(160);
-
- expect(child1.getComputedLayout().left).toBe(50);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(150);
- expect(child1.getComputedLayout().height).toBe(80);
-
- expect(child2.getComputedLayout().left).toBe(120);
- expect(child2.getComputedLayout().top).toBe(80);
- expect(child2.getComputedLayout().width).toBe(80);
- expect(child2.getComputedLayout().height).toBe(80);
- });
-
- test('wrapped_row_within_align_items_flex_start', () => {
- const root = Yoga.Node.create();
- root.setAlignItems(Yoga.ALIGN_FLEX_START);
- root.setWidth(200);
- root.setHeight(200);
-
- const child0 = Yoga.Node.create();
- child0.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- child0.setFlexWrap(Yoga.WRAP_WRAP);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(150);
- child1.setHeight(80);
- child0.insertChild(child1, 0);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(80);
- child2.setHeight(80);
- child0.insertChild(child2, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(200);
- expect(child0.getComputedLayout().height).toBe(160);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(150);
- expect(child1.getComputedLayout().height).toBe(80);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(80);
- expect(child2.getComputedLayout().width).toBe(80);
- expect(child2.getComputedLayout().height).toBe(80);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(200);
- expect(child0.getComputedLayout().height).toBe(160);
-
- expect(child1.getComputedLayout().left).toBe(50);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(150);
- expect(child1.getComputedLayout().height).toBe(80);
-
- expect(child2.getComputedLayout().left).toBe(120);
- expect(child2.getComputedLayout().top).toBe(80);
- expect(child2.getComputedLayout().width).toBe(80);
- expect(child2.getComputedLayout().height).toBe(80);
- });
-
- test('wrapped_row_within_align_items_flex_end', () => {
- const root = Yoga.Node.create();
- root.setAlignItems(Yoga.ALIGN_FLEX_END);
- root.setWidth(200);
- root.setHeight(200);
-
- const child0 = Yoga.Node.create();
- child0.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- child0.setFlexWrap(Yoga.WRAP_WRAP);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(150);
- child1.setHeight(80);
- child0.insertChild(child1, 0);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(80);
- child2.setHeight(80);
- child0.insertChild(child2, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(200);
- expect(child0.getComputedLayout().height).toBe(160);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(150);
- expect(child1.getComputedLayout().height).toBe(80);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(80);
- expect(child2.getComputedLayout().width).toBe(80);
- expect(child2.getComputedLayout().height).toBe(80);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(200);
- expect(child0.getComputedLayout().height).toBe(160);
-
- expect(child1.getComputedLayout().left).toBe(50);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(150);
- expect(child1.getComputedLayout().height).toBe(80);
-
- expect(child2.getComputedLayout().left).toBe(120);
- expect(child2.getComputedLayout().top).toBe(80);
- expect(child2.getComputedLayout().width).toBe(80);
- expect(child2.getComputedLayout().height).toBe(80);
- });
-
- test('wrapped_column_max_height', () => {
- const root = Yoga.Node.create();
- root.setJustifyContent(Yoga.JUSTIFY_CENTER);
- root.setAlignContent(Yoga.ALIGN_CENTER);
- root.setAlignItems(Yoga.ALIGN_CENTER);
- root.setFlexWrap(Yoga.WRAP_WRAP);
- root.setWidth(700);
- root.setHeight(500);
-
- const child0 = Yoga.Node.create();
- child0.setWidth(100);
- child0.setHeight(500);
- child0.setMaxHeight(200);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setMargin(Yoga.EDGE_LEFT, 20);
- child1.setMargin(Yoga.EDGE_TOP, 20);
- child1.setMargin(Yoga.EDGE_RIGHT, 20);
- child1.setMargin(Yoga.EDGE_BOTTOM, 20);
- child1.setWidth(200);
- child1.setHeight(200);
- root.insertChild(child1, 1);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(100);
- child2.setHeight(100);
- root.insertChild(child2, 2);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(700);
- expect(root.getComputedLayout().height).toBe(500);
-
- expect(child0.getComputedLayout().left).toBe(250);
- expect(child0.getComputedLayout().top).toBe(30);
- expect(child0.getComputedLayout().width).toBe(100);
- expect(child0.getComputedLayout().height).toBe(200);
-
- expect(child1.getComputedLayout().left).toBe(200);
- expect(child1.getComputedLayout().top).toBe(250);
- expect(child1.getComputedLayout().width).toBe(200);
- expect(child1.getComputedLayout().height).toBe(200);
-
- expect(child2.getComputedLayout().left).toBe(420);
- expect(child2.getComputedLayout().top).toBe(200);
- expect(child2.getComputedLayout().width).toBe(100);
- expect(child2.getComputedLayout().height).toBe(100);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(700);
- expect(root.getComputedLayout().height).toBe(500);
-
- expect(child0.getComputedLayout().left).toBe(350);
- expect(child0.getComputedLayout().top).toBe(30);
- expect(child0.getComputedLayout().width).toBe(100);
- expect(child0.getComputedLayout().height).toBe(200);
-
- expect(child1.getComputedLayout().left).toBe(300);
- expect(child1.getComputedLayout().top).toBe(250);
- expect(child1.getComputedLayout().width).toBe(200);
- expect(child1.getComputedLayout().height).toBe(200);
-
- expect(child2.getComputedLayout().left).toBe(180);
- expect(child2.getComputedLayout().top).toBe(200);
- expect(child2.getComputedLayout().width).toBe(100);
- expect(child2.getComputedLayout().height).toBe(100);
- });
-
- test('wrapped_column_max_height_flex', () => {
- const root = Yoga.Node.create();
- root.setJustifyContent(Yoga.JUSTIFY_CENTER);
- root.setAlignContent(Yoga.ALIGN_CENTER);
- root.setAlignItems(Yoga.ALIGN_CENTER);
- root.setFlexWrap(Yoga.WRAP_WRAP);
- root.setWidth(700);
- root.setHeight(500);
-
- const child0 = Yoga.Node.create();
- child0.setFlexGrow(1);
- child0.setFlexShrink(1);
- child0.setFlexBasisPercent(0);
- child0.setWidth(100);
- child0.setHeight(500);
- child0.setMaxHeight(200);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setFlexGrow(1);
- child1.setFlexShrink(1);
- child1.setFlexBasisPercent(0);
- child1.setMargin(Yoga.EDGE_LEFT, 20);
- child1.setMargin(Yoga.EDGE_TOP, 20);
- child1.setMargin(Yoga.EDGE_RIGHT, 20);
- child1.setMargin(Yoga.EDGE_BOTTOM, 20);
- child1.setWidth(200);
- child1.setHeight(200);
- root.insertChild(child1, 1);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(100);
- child2.setHeight(100);
- root.insertChild(child2, 2);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(700);
- expect(root.getComputedLayout().height).toBe(500);
-
- expect(child0.getComputedLayout().left).toBe(300);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(100);
- expect(child0.getComputedLayout().height).toBe(180);
-
- expect(child1.getComputedLayout().left).toBe(250);
- expect(child1.getComputedLayout().top).toBe(200);
- expect(child1.getComputedLayout().width).toBe(200);
- expect(child1.getComputedLayout().height).toBe(180);
-
- expect(child2.getComputedLayout().left).toBe(300);
- expect(child2.getComputedLayout().top).toBe(400);
- expect(child2.getComputedLayout().width).toBe(100);
- expect(child2.getComputedLayout().height).toBe(100);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(700);
- expect(root.getComputedLayout().height).toBe(500);
-
- expect(child0.getComputedLayout().left).toBe(300);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(100);
- expect(child0.getComputedLayout().height).toBe(180);
-
- expect(child1.getComputedLayout().left).toBe(250);
- expect(child1.getComputedLayout().top).toBe(200);
- expect(child1.getComputedLayout().width).toBe(200);
- expect(child1.getComputedLayout().height).toBe(180);
-
- expect(child2.getComputedLayout().left).toBe(300);
- expect(child2.getComputedLayout().top).toBe(400);
- expect(child2.getComputedLayout().width).toBe(100);
- expect(child2.getComputedLayout().height).toBe(100);
- });
-
- test('wrap_nodes_with_content_sizing_overflowing_margin', () => {
- const root = Yoga.Node.create();
- root.setWidth(500);
- root.setHeight(500);
-
- const child0 = Yoga.Node.create();
- child0.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- child0.setFlexWrap(Yoga.WRAP_WRAP);
- child0.setWidth(85);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child0.insertChild(child1, 0);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(40);
- child2.setHeight(40);
- child1.insertChild(child2, 0);
-
- const child3 = Yoga.Node.create();
- child3.setMargin(Yoga.EDGE_RIGHT, 10);
- child0.insertChild(child3, 1);
-
- const child4 = Yoga.Node.create();
- child4.setWidth(40);
- child4.setHeight(40);
- child3.insertChild(child4, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(500);
- expect(root.getComputedLayout().height).toBe(500);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(85);
- expect(child0.getComputedLayout().height).toBe(80);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(40);
- expect(child1.getComputedLayout().height).toBe(40);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(40);
- expect(child2.getComputedLayout().height).toBe(40);
-
- expect(child3.getComputedLayout().left).toBe(0);
- expect(child3.getComputedLayout().top).toBe(40);
- expect(child3.getComputedLayout().width).toBe(40);
- expect(child3.getComputedLayout().height).toBe(40);
-
- expect(child4.getComputedLayout().left).toBe(0);
- expect(child4.getComputedLayout().top).toBe(0);
- expect(child4.getComputedLayout().width).toBe(40);
- expect(child4.getComputedLayout().height).toBe(40);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(500);
- expect(root.getComputedLayout().height).toBe(500);
-
- expect(child0.getComputedLayout().left).toBe(415);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(85);
- expect(child0.getComputedLayout().height).toBe(80);
-
- expect(child1.getComputedLayout().left).toBe(45);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(40);
- expect(child1.getComputedLayout().height).toBe(40);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(40);
- expect(child2.getComputedLayout().height).toBe(40);
-
- expect(child3.getComputedLayout().left).toBe(35);
- expect(child3.getComputedLayout().top).toBe(40);
- expect(child3.getComputedLayout().width).toBe(40);
- expect(child3.getComputedLayout().height).toBe(40);
-
- expect(child4.getComputedLayout().left).toBe(0);
- expect(child4.getComputedLayout().top).toBe(0);
- expect(child4.getComputedLayout().width).toBe(40);
- expect(child4.getComputedLayout().height).toBe(40);
- });
-
- test('wrap_nodes_with_content_sizing_margin_cross', () => {
- const root = Yoga.Node.create();
- root.setWidth(500);
- root.setHeight(500);
-
- const child0 = Yoga.Node.create();
- child0.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- child0.setFlexWrap(Yoga.WRAP_WRAP);
- child0.setWidth(70);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child0.insertChild(child1, 0);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(40);
- child2.setHeight(40);
- child1.insertChild(child2, 0);
-
- const child3 = Yoga.Node.create();
- child3.setMargin(Yoga.EDGE_TOP, 10);
- child0.insertChild(child3, 1);
-
- const child4 = Yoga.Node.create();
- child4.setWidth(40);
- child4.setHeight(40);
- child3.insertChild(child4, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(500);
- expect(root.getComputedLayout().height).toBe(500);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(70);
- expect(child0.getComputedLayout().height).toBe(90);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(40);
- expect(child1.getComputedLayout().height).toBe(40);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(40);
- expect(child2.getComputedLayout().height).toBe(40);
-
- expect(child3.getComputedLayout().left).toBe(0);
- expect(child3.getComputedLayout().top).toBe(50);
- expect(child3.getComputedLayout().width).toBe(40);
- expect(child3.getComputedLayout().height).toBe(40);
-
- expect(child4.getComputedLayout().left).toBe(0);
- expect(child4.getComputedLayout().top).toBe(0);
- expect(child4.getComputedLayout().width).toBe(40);
- expect(child4.getComputedLayout().height).toBe(40);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(500);
- expect(root.getComputedLayout().height).toBe(500);
-
- expect(child0.getComputedLayout().left).toBe(430);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(70);
- expect(child0.getComputedLayout().height).toBe(90);
-
- expect(child1.getComputedLayout().left).toBe(30);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(40);
- expect(child1.getComputedLayout().height).toBe(40);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(40);
- expect(child2.getComputedLayout().height).toBe(40);
-
- expect(child3.getComputedLayout().left).toBe(30);
- expect(child3.getComputedLayout().top).toBe(50);
- expect(child3.getComputedLayout().width).toBe(40);
- expect(child3.getComputedLayout().height).toBe(40);
-
- expect(child4.getComputedLayout().left).toBe(0);
- expect(child4.getComputedLayout().top).toBe(0);
- expect(child4.getComputedLayout().width).toBe(40);
- expect(child4.getComputedLayout().height).toBe(40);
- });
-});
diff --git a/packages/yoga/tests/flexbox.test.js b/packages/yoga/tests/flexbox.test.js
deleted file mode 100644
index 67a22f8d3..000000000
--- a/packages/yoga/tests/flexbox.test.js
+++ /dev/null
@@ -1,143 +0,0 @@
-const Yoga = require('..');
-
-describe('Flexbox', () => {
- let yogaNode;
- let flexboxNode;
-
- beforeEach(() => {
- yogaNode = Yoga.Node.createDefault();
- flexboxNode = Yoga.Node.createDefault();
- });
-
- test('Should have the same flexDirection by default', () => {
- expect(yogaNode.getFlexDirection()).toEqual(flexboxNode.getFlexDirection());
- });
-
- test('Should have the same justifyContent by default', () => {
- expect(yogaNode.getJustifyContent()).toEqual(
- flexboxNode.getJustifyContent(),
- );
- });
-
- test('Should have the same alignContent by default', () => {
- expect(yogaNode.getAlignContent()).toEqual(flexboxNode.getAlignContent());
- });
-
- test('Should have the same alignItems by default', () => {
- expect(yogaNode.getAlignItems()).toEqual(flexboxNode.getAlignItems());
- });
-
- test('Should have the same alignSelf by default', () => {
- expect(yogaNode.getAlignSelf()).toEqual(flexboxNode.getAlignSelf());
- });
-
- test('Should have the same flexWrap by default', () => {
- expect(yogaNode.getFlexWrap()).toEqual(flexboxNode.getFlexWrap());
- });
-
- test('Should have the same display by default', () => {
- expect(yogaNode.getDisplay()).toEqual(flexboxNode.getDisplay());
- });
-
- test('Should have the same flexGrow by default', () => {
- expect(yogaNode.getFlexGrow()).toEqual(flexboxNode.getFlexGrow());
- });
-
- test('Should have the same flexShrink by default', () => {
- expect(yogaNode.getFlexShrink()).toEqual(flexboxNode.getFlexShrink());
- });
-
- test('Should have the same flexBasis by default', () => {
- expect(yogaNode.getFlexBasis()).toEqual(flexboxNode.getFlexBasis());
- });
-
- test('Should setFlexDirection', () => {
- yogaNode.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- flexboxNode.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
-
- expect(yogaNode.getFlexDirection()).toEqual(flexboxNode.getFlexDirection());
- });
-
- test('Should setJustifyContent', () => {
- yogaNode.setJustifyContent(Yoga.JUSTIFY_FLEX_END);
- flexboxNode.setJustifyContent(Yoga.JUSTIFY_FLEX_END);
-
- expect(yogaNode.getJustifyContent()).toEqual(
- flexboxNode.getJustifyContent(),
- );
- });
-
- test('Should setAlignContent', () => {
- yogaNode.setAlignContent(Yoga.ALIGN_CENTER);
- flexboxNode.setAlignContent(Yoga.ALIGN_CENTER);
-
- expect(yogaNode.getAlignContent()).toEqual(flexboxNode.getAlignContent());
- });
-
- test('Should setAlignItems', () => {
- yogaNode.setAlignItems(Yoga.ALIGN_CENTER);
- flexboxNode.setAlignItems(Yoga.ALIGN_CENTER);
-
- expect(yogaNode.getAlignItems()).toEqual(flexboxNode.getAlignItems());
- });
-
- test('Should setAlignSelf', () => {
- yogaNode.setAlignSelf(Yoga.ALIGN_CENTER);
- flexboxNode.setAlignSelf(Yoga.ALIGN_CENTER);
-
- expect(yogaNode.getAlignSelf()).toEqual(flexboxNode.getAlignSelf());
- });
-
- test('Should setFlexWrap', () => {
- yogaNode.setFlexWrap(Yoga.WRAP_WRAP_REVERSE);
- flexboxNode.setFlexWrap(Yoga.WRAP_WRAP_REVERSE);
-
- expect(yogaNode.getFlexWrap()).toEqual(flexboxNode.getFlexWrap());
- });
-
- test('Should setDisplay', () => {
- yogaNode.setDisplay(Yoga.DISPLAY_NONE);
- flexboxNode.setDisplay(Yoga.DISPLAY_NONE);
-
- expect(yogaNode.getDisplay()).toEqual(flexboxNode.getDisplay());
- });
-
- test('Should setFlexGrow', () => {
- yogaNode.setFlexGrow(1);
- flexboxNode.setFlexGrow(1);
-
- expect(yogaNode.getFlexGrow()).toEqual(flexboxNode.getFlexGrow());
- });
-
- test('Should setFlexShrink', () => {
- yogaNode.setFlexShrink(1);
- flexboxNode.setFlexShrink(1);
-
- expect(yogaNode.getFlexShrink()).toEqual(flexboxNode.getFlexShrink());
- });
-
- test('Should setFlexBasis', () => {
- yogaNode.setFlexBasis(1);
- flexboxNode.setFlexBasis(1);
-
- expect(yogaNode.getFlexBasis()).toEqual(flexboxNode.getFlexBasis());
- });
-
- test('Should setFlexBasisPercent', () => {
- yogaNode.setFlexBasisPercent(1);
- flexboxNode.setFlexBasisPercent(1);
-
- expect(yogaNode.getFlexBasis()).toEqual(flexboxNode.getFlexBasis());
- });
-
- test('Should setFlex', () => {
- yogaNode.setFlex(1);
- flexboxNode.setFlex(1);
-
- expect(yogaNode.getFlexDirection()).toEqual(flexboxNode.getFlexDirection());
- expect(yogaNode.getFlexWrap()).toEqual(flexboxNode.getFlexWrap());
- expect(yogaNode.getFlexGrow()).toEqual(flexboxNode.getFlexGrow());
- expect(yogaNode.getFlexShrink()).toEqual(flexboxNode.getFlexShrink());
- expect(yogaNode.getFlexBasis()).toEqual(flexboxNode.getFlexBasis());
- });
-});
diff --git a/packages/yoga/tests/index.test.js b/packages/yoga/tests/index.test.js
deleted file mode 100644
index 2de358b8b..000000000
--- a/packages/yoga/tests/index.test.js
+++ /dev/null
@@ -1,53 +0,0 @@
-const Yoga = require('..');
-
-describe('yoga-layout', () => {
- test('layout works', () => {
- const config = Yoga.Config.create();
-
- const root = Yoga.Node.create(config);
- root.setWidth(100);
- root.setHeight(100);
-
- const firstChild = Yoga.Node.create(config);
- firstChild.setFlexGrow(1);
- firstChild.setFlexBasis(50);
- root.insertChild(firstChild, 0);
-
- const secondChild = Yoga.Node.create(config);
- secondChild.setFlexGrow(1);
- root.insertChild(secondChild, 1);
- root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLeft()).toBe(0);
- expect(root.getComputedTop()).toBe(0);
- expect(root.getComputedWidth()).toBe(100);
- expect(root.getComputedHeight()).toBe(100);
-
- expect(firstChild.getComputedLeft()).toBe(0);
- expect(firstChild.getComputedTop()).toBe(0);
- expect(firstChild.getComputedWidth()).toBe(100);
- expect(firstChild.getComputedHeight()).toBe(75);
-
- expect(secondChild.getComputedLeft()).toBe(0);
- expect(secondChild.getComputedTop()).toBe(75);
- expect(secondChild.getComputedWidth()).toBe(100);
- expect(secondChild.getComputedHeight()).toBe(25);
-
- root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLeft()).toBe(0);
- expect(root.getComputedTop()).toBe(0);
- expect(root.getComputedWidth()).toBe(100);
- expect(root.getComputedHeight()).toBe(100);
-
- expect(firstChild.getComputedLeft()).toBe(0);
- expect(firstChild.getComputedTop()).toBe(0);
- expect(firstChild.getComputedWidth()).toBe(100);
- expect(firstChild.getComputedHeight()).toBe(75);
-
- expect(secondChild.getComputedLeft()).toBe(0);
- expect(secondChild.getComputedTop()).toBe(75);
- expect(secondChild.getComputedWidth()).toBe(100);
- expect(secondChild.getComputedHeight()).toBe(25);
- });
-});
diff --git a/packages/yoga/tests/infiniteHeight.test.js b/packages/yoga/tests/infiniteHeight.test.js
deleted file mode 100644
index 8954e902e..000000000
--- a/packages/yoga/tests/infiniteHeight.test.js
+++ /dev/null
@@ -1,38 +0,0 @@
-const Yoga = require('..');
-
-describe('Infinite height', () => {
- test('percent_absolute_position_infinite_height', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setWidth(300);
-
- const child0 = Yoga.Node.create();
- child0.setWidth(300);
- child0.setHeight(300);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setPositionType(Yoga.POSITION_TYPE_ABSOLUTE);
- child1.setPositionPercent(Yoga.EDGE_LEFT, 20);
- child1.setPositionPercent(Yoga.EDGE_TOP, 20);
- child1.setWidthPercent(20);
- child1.setHeightPercent(20);
- root.insertChild(child1, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(300);
- expect(root.getComputedLayout().height).toBe(300);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(300);
- expect(child0.getComputedLayout().height).toBe(300);
-
- expect(child1.getComputedLayout().left).toBe(60);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(60);
- expect(child1.getComputedLayout().height).toBe(0);
- });
-});
diff --git a/packages/yoga/tests/justifyContent.test.js b/packages/yoga/tests/justifyContent.test.js
deleted file mode 100644
index 44ac0f53d..000000000
--- a/packages/yoga/tests/justifyContent.test.js
+++ /dev/null
@@ -1,895 +0,0 @@
-const Yoga = require('..');
-
-describe('Justify content', () => {
- test('justify_content_row_flex_start', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setWidth(102);
- root.setHeight(102);
-
- const child0 = Yoga.Node.create();
- child0.setWidth(10);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(10);
- root.insertChild(child1, 1);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(10);
- root.insertChild(child2, 2);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(102);
- expect(root.getComputedLayout().height).toBe(102);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(10);
- expect(child0.getComputedLayout().height).toBe(102);
-
- expect(child1.getComputedLayout().left).toBe(10);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(10);
- expect(child1.getComputedLayout().height).toBe(102);
-
- expect(child2.getComputedLayout().left).toBe(20);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(10);
- expect(child2.getComputedLayout().height).toBe(102);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(102);
- expect(root.getComputedLayout().height).toBe(102);
-
- expect(child0.getComputedLayout().left).toBe(92);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(10);
- expect(child0.getComputedLayout().height).toBe(102);
-
- expect(child1.getComputedLayout().left).toBe(82);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(10);
- expect(child1.getComputedLayout().height).toBe(102);
-
- expect(child2.getComputedLayout().left).toBe(72);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(10);
- expect(child2.getComputedLayout().height).toBe(102);
- });
-
- test('justify_content_row_flex_end', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setJustifyContent(Yoga.JUSTIFY_FLEX_END);
- root.setWidth(102);
- root.setHeight(102);
-
- const child0 = Yoga.Node.create();
- child0.setWidth(10);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(10);
- root.insertChild(child1, 1);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(10);
- root.insertChild(child2, 2);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(102);
- expect(root.getComputedLayout().height).toBe(102);
-
- expect(child0.getComputedLayout().left).toBe(72);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(10);
- expect(child0.getComputedLayout().height).toBe(102);
-
- expect(child1.getComputedLayout().left).toBe(82);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(10);
- expect(child1.getComputedLayout().height).toBe(102);
-
- expect(child2.getComputedLayout().left).toBe(92);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(10);
- expect(child2.getComputedLayout().height).toBe(102);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(102);
- expect(root.getComputedLayout().height).toBe(102);
-
- expect(child0.getComputedLayout().left).toBe(20);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(10);
- expect(child0.getComputedLayout().height).toBe(102);
-
- expect(child1.getComputedLayout().left).toBe(10);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(10);
- expect(child1.getComputedLayout().height).toBe(102);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(10);
- expect(child2.getComputedLayout().height).toBe(102);
- });
-
- test('justify_content_row_center', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setJustifyContent(Yoga.JUSTIFY_CENTER);
- root.setWidth(102);
- root.setHeight(102);
-
- const child0 = Yoga.Node.create();
- child0.setWidth(10);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(10);
- root.insertChild(child1, 1);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(10);
- root.insertChild(child2, 2);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(102);
- expect(root.getComputedLayout().height).toBe(102);
-
- expect(child0.getComputedLayout().left).toBe(36);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(10);
- expect(child0.getComputedLayout().height).toBe(102);
-
- expect(child1.getComputedLayout().left).toBe(46);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(10);
- expect(child1.getComputedLayout().height).toBe(102);
-
- expect(child2.getComputedLayout().left).toBe(56);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(10);
- expect(child2.getComputedLayout().height).toBe(102);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(102);
- expect(root.getComputedLayout().height).toBe(102);
-
- expect(child0.getComputedLayout().left).toBe(56);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(10);
- expect(child0.getComputedLayout().height).toBe(102);
-
- expect(child1.getComputedLayout().left).toBe(46);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(10);
- expect(child1.getComputedLayout().height).toBe(102);
-
- expect(child2.getComputedLayout().left).toBe(36);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(10);
- expect(child2.getComputedLayout().height).toBe(102);
- });
-
- test('justify_content_row_space_between', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setJustifyContent(Yoga.JUSTIFY_SPACE_BETWEEN);
- root.setWidth(102);
- root.setHeight(102);
-
- const child0 = Yoga.Node.create();
- child0.setWidth(10);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(10);
- root.insertChild(child1, 1);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(10);
- root.insertChild(child2, 2);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(102);
- expect(root.getComputedLayout().height).toBe(102);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(10);
- expect(child0.getComputedLayout().height).toBe(102);
-
- expect(child1.getComputedLayout().left).toBe(46);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(10);
- expect(child1.getComputedLayout().height).toBe(102);
-
- expect(child2.getComputedLayout().left).toBe(92);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(10);
- expect(child2.getComputedLayout().height).toBe(102);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(102);
- expect(root.getComputedLayout().height).toBe(102);
-
- expect(child0.getComputedLayout().left).toBe(92);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(10);
- expect(child0.getComputedLayout().height).toBe(102);
-
- expect(child1.getComputedLayout().left).toBe(46);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(10);
- expect(child1.getComputedLayout().height).toBe(102);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(10);
- expect(child2.getComputedLayout().height).toBe(102);
- });
-
- test('justify_content_row_space_around', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setJustifyContent(Yoga.JUSTIFY_SPACE_AROUND);
- root.setWidth(102);
- root.setHeight(102);
-
- const child0 = Yoga.Node.create();
- child0.setWidth(10);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(10);
- root.insertChild(child1, 1);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(10);
- root.insertChild(child2, 2);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(102);
- expect(root.getComputedLayout().height).toBe(102);
-
- expect(child0.getComputedLayout().left).toBe(12);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(10);
- expect(child0.getComputedLayout().height).toBe(102);
-
- expect(child1.getComputedLayout().left).toBe(46);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(10);
- expect(child1.getComputedLayout().height).toBe(102);
-
- expect(child2.getComputedLayout().left).toBe(80);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(10);
- expect(child2.getComputedLayout().height).toBe(102);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(102);
- expect(root.getComputedLayout().height).toBe(102);
-
- expect(child0.getComputedLayout().left).toBe(80);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(10);
- expect(child0.getComputedLayout().height).toBe(102);
-
- expect(child1.getComputedLayout().left).toBe(46);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(10);
- expect(child1.getComputedLayout().height).toBe(102);
-
- expect(child2.getComputedLayout().left).toBe(12);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(10);
- expect(child2.getComputedLayout().height).toBe(102);
- });
-
- test('justify_content_column_flex_start', () => {
- const root = Yoga.Node.create();
- root.setWidth(102);
- root.setHeight(102);
-
- const child0 = Yoga.Node.create();
- child0.setHeight(10);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setHeight(10);
- root.insertChild(child1, 1);
-
- const child2 = Yoga.Node.create();
- child2.setHeight(10);
- root.insertChild(child2, 2);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(102);
- expect(root.getComputedLayout().height).toBe(102);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(102);
- expect(child0.getComputedLayout().height).toBe(10);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(10);
- expect(child1.getComputedLayout().width).toBe(102);
- expect(child1.getComputedLayout().height).toBe(10);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(20);
- expect(child2.getComputedLayout().width).toBe(102);
- expect(child2.getComputedLayout().height).toBe(10);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(102);
- expect(root.getComputedLayout().height).toBe(102);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(102);
- expect(child0.getComputedLayout().height).toBe(10);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(10);
- expect(child1.getComputedLayout().width).toBe(102);
- expect(child1.getComputedLayout().height).toBe(10);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(20);
- expect(child2.getComputedLayout().width).toBe(102);
- expect(child2.getComputedLayout().height).toBe(10);
- });
-
- test('justify_content_column_flex_end', () => {
- const root = Yoga.Node.create();
- root.setJustifyContent(Yoga.JUSTIFY_FLEX_END);
- root.setWidth(102);
- root.setHeight(102);
-
- const child0 = Yoga.Node.create();
- child0.setHeight(10);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setHeight(10);
- root.insertChild(child1, 1);
-
- const child2 = Yoga.Node.create();
- child2.setHeight(10);
- root.insertChild(child2, 2);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(102);
- expect(root.getComputedLayout().height).toBe(102);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(72);
- expect(child0.getComputedLayout().width).toBe(102);
- expect(child0.getComputedLayout().height).toBe(10);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(82);
- expect(child1.getComputedLayout().width).toBe(102);
- expect(child1.getComputedLayout().height).toBe(10);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(92);
- expect(child2.getComputedLayout().width).toBe(102);
- expect(child2.getComputedLayout().height).toBe(10);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(102);
- expect(root.getComputedLayout().height).toBe(102);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(72);
- expect(child0.getComputedLayout().width).toBe(102);
- expect(child0.getComputedLayout().height).toBe(10);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(82);
- expect(child1.getComputedLayout().width).toBe(102);
- expect(child1.getComputedLayout().height).toBe(10);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(92);
- expect(child2.getComputedLayout().width).toBe(102);
- expect(child2.getComputedLayout().height).toBe(10);
- });
-
- test('justify_content_column_center', () => {
- const root = Yoga.Node.create();
- root.setJustifyContent(Yoga.JUSTIFY_CENTER);
- root.setWidth(102);
- root.setHeight(102);
-
- const child0 = Yoga.Node.create();
- child0.setHeight(10);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setHeight(10);
- root.insertChild(child1, 1);
-
- const child2 = Yoga.Node.create();
- child2.setHeight(10);
- root.insertChild(child2, 2);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(102);
- expect(root.getComputedLayout().height).toBe(102);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(36);
- expect(child0.getComputedLayout().width).toBe(102);
- expect(child0.getComputedLayout().height).toBe(10);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(46);
- expect(child1.getComputedLayout().width).toBe(102);
- expect(child1.getComputedLayout().height).toBe(10);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(56);
- expect(child2.getComputedLayout().width).toBe(102);
- expect(child2.getComputedLayout().height).toBe(10);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(102);
- expect(root.getComputedLayout().height).toBe(102);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(36);
- expect(child0.getComputedLayout().width).toBe(102);
- expect(child0.getComputedLayout().height).toBe(10);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(46);
- expect(child1.getComputedLayout().width).toBe(102);
- expect(child1.getComputedLayout().height).toBe(10);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(56);
- expect(child2.getComputedLayout().width).toBe(102);
- expect(child2.getComputedLayout().height).toBe(10);
- });
-
- test('justify_content_column_space_between', () => {
- const root = Yoga.Node.create();
- root.setJustifyContent(Yoga.JUSTIFY_SPACE_BETWEEN);
- root.setWidth(102);
- root.setHeight(102);
-
- const child0 = Yoga.Node.create();
- child0.setHeight(10);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setHeight(10);
- root.insertChild(child1, 1);
-
- const child2 = Yoga.Node.create();
- child2.setHeight(10);
- root.insertChild(child2, 2);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(102);
- expect(root.getComputedLayout().height).toBe(102);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(102);
- expect(child0.getComputedLayout().height).toBe(10);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(46);
- expect(child1.getComputedLayout().width).toBe(102);
- expect(child1.getComputedLayout().height).toBe(10);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(92);
- expect(child2.getComputedLayout().width).toBe(102);
- expect(child2.getComputedLayout().height).toBe(10);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(102);
- expect(root.getComputedLayout().height).toBe(102);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(102);
- expect(child0.getComputedLayout().height).toBe(10);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(46);
- expect(child1.getComputedLayout().width).toBe(102);
- expect(child1.getComputedLayout().height).toBe(10);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(92);
- expect(child2.getComputedLayout().width).toBe(102);
- expect(child2.getComputedLayout().height).toBe(10);
- });
-
- test('justify_content_column_space_around', () => {
- const root = Yoga.Node.create();
- root.setJustifyContent(Yoga.JUSTIFY_SPACE_AROUND);
- root.setWidth(102);
- root.setHeight(102);
-
- const child0 = Yoga.Node.create();
- child0.setHeight(10);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setHeight(10);
- root.insertChild(child1, 1);
-
- const child2 = Yoga.Node.create();
- child2.setHeight(10);
- root.insertChild(child2, 2);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(102);
- expect(root.getComputedLayout().height).toBe(102);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(12);
- expect(child0.getComputedLayout().width).toBe(102);
- expect(child0.getComputedLayout().height).toBe(10);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(46);
- expect(child1.getComputedLayout().width).toBe(102);
- expect(child1.getComputedLayout().height).toBe(10);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(80);
- expect(child2.getComputedLayout().width).toBe(102);
- expect(child2.getComputedLayout().height).toBe(10);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(102);
- expect(root.getComputedLayout().height).toBe(102);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(12);
- expect(child0.getComputedLayout().width).toBe(102);
- expect(child0.getComputedLayout().height).toBe(10);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(46);
- expect(child1.getComputedLayout().width).toBe(102);
- expect(child1.getComputedLayout().height).toBe(10);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(80);
- expect(child2.getComputedLayout().width).toBe(102);
- expect(child2.getComputedLayout().height).toBe(10);
- });
-
- test('justify_content_row_min_width_and_margin', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setJustifyContent(Yoga.JUSTIFY_CENTER);
- root.setMargin(Yoga.EDGE_LEFT, 100);
- root.setMinWidth(50);
-
- const child0 = Yoga.Node.create();
- child0.setWidth(20);
- child0.setHeight(20);
- root.insertChild(child0, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(100);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(50);
- expect(root.getComputedLayout().height).toBe(20);
-
- expect(child0.getComputedLayout().left).toBe(15);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(20);
- expect(child0.getComputedLayout().height).toBe(20);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(100);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(50);
- expect(root.getComputedLayout().height).toBe(20);
-
- expect(child0.getComputedLayout().left).toBe(15);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(20);
- expect(child0.getComputedLayout().height).toBe(20);
- });
-
- test('justify_content_row_max_width_and_margin', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setJustifyContent(Yoga.JUSTIFY_CENTER);
- root.setMargin(Yoga.EDGE_LEFT, 100);
- root.setWidth(100);
- root.setMaxWidth(80);
-
- const child0 = Yoga.Node.create();
- child0.setWidth(20);
- child0.setHeight(20);
- root.insertChild(child0, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(100);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(80);
- expect(root.getComputedLayout().height).toBe(20);
-
- expect(child0.getComputedLayout().left).toBe(30);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(20);
- expect(child0.getComputedLayout().height).toBe(20);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(100);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(80);
- expect(root.getComputedLayout().height).toBe(20);
-
- expect(child0.getComputedLayout().left).toBe(30);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(20);
- expect(child0.getComputedLayout().height).toBe(20);
- });
-
- test('justify_content_column_min_height_and_margin', () => {
- const root = Yoga.Node.create();
- root.setJustifyContent(Yoga.JUSTIFY_CENTER);
- root.setMargin(Yoga.EDGE_TOP, 100);
- root.setMinHeight(50);
-
- const child0 = Yoga.Node.create();
- child0.setWidth(20);
- child0.setHeight(20);
- root.insertChild(child0, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(100);
- expect(root.getComputedLayout().width).toBe(20);
- expect(root.getComputedLayout().height).toBe(50);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(15);
- expect(child0.getComputedLayout().width).toBe(20);
- expect(child0.getComputedLayout().height).toBe(20);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(100);
- expect(root.getComputedLayout().width).toBe(20);
- expect(root.getComputedLayout().height).toBe(50);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(15);
- expect(child0.getComputedLayout().width).toBe(20);
- expect(child0.getComputedLayout().height).toBe(20);
- });
-
- test('justify_content_colunn_max_height_and_margin', () => {
- const root = Yoga.Node.create();
- root.setJustifyContent(Yoga.JUSTIFY_CENTER);
- root.setMargin(Yoga.EDGE_TOP, 100);
- root.setHeight(100);
- root.setMaxHeight(80);
-
- const child0 = Yoga.Node.create();
- child0.setWidth(20);
- child0.setHeight(20);
- root.insertChild(child0, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(100);
- expect(root.getComputedLayout().width).toBe(20);
- expect(root.getComputedLayout().height).toBe(80);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(30);
- expect(child0.getComputedLayout().width).toBe(20);
- expect(child0.getComputedLayout().height).toBe(20);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(100);
- expect(root.getComputedLayout().width).toBe(20);
- expect(root.getComputedLayout().height).toBe(80);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(30);
- expect(child0.getComputedLayout().width).toBe(20);
- expect(child0.getComputedLayout().height).toBe(20);
- });
-
- test('justify_content_column_space_evenly', () => {
- const root = Yoga.Node.create();
- root.setJustifyContent(Yoga.JUSTIFY_SPACE_EVENLY);
- root.setWidth(102);
- root.setHeight(102);
-
- const child0 = Yoga.Node.create();
- child0.setHeight(10);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setHeight(10);
- root.insertChild(child1, 1);
-
- const child2 = Yoga.Node.create();
- child2.setHeight(10);
- root.insertChild(child2, 2);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(102);
- expect(root.getComputedLayout().height).toBe(102);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(18);
- expect(child0.getComputedLayout().width).toBe(102);
- expect(child0.getComputedLayout().height).toBe(10);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(46);
- expect(child1.getComputedLayout().width).toBe(102);
- expect(child1.getComputedLayout().height).toBe(10);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(74);
- expect(child2.getComputedLayout().width).toBe(102);
- expect(child2.getComputedLayout().height).toBe(10);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(102);
- expect(root.getComputedLayout().height).toBe(102);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(18);
- expect(child0.getComputedLayout().width).toBe(102);
- expect(child0.getComputedLayout().height).toBe(10);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(46);
- expect(child1.getComputedLayout().width).toBe(102);
- expect(child1.getComputedLayout().height).toBe(10);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(74);
- expect(child2.getComputedLayout().width).toBe(102);
- expect(child2.getComputedLayout().height).toBe(10);
- });
-
- test('justify_content_row_space_evenly', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setJustifyContent(Yoga.JUSTIFY_SPACE_EVENLY);
- root.setWidth(102);
- root.setHeight(102);
-
- const child0 = Yoga.Node.create();
- child0.setHeight(10);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setHeight(10);
- root.insertChild(child1, 1);
-
- const child2 = Yoga.Node.create();
- child2.setHeight(10);
- root.insertChild(child2, 2);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(102);
- expect(root.getComputedLayout().height).toBe(102);
-
- expect(child0.getComputedLayout().left).toBe(26);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(0);
- expect(child0.getComputedLayout().height).toBe(10);
-
- expect(child1.getComputedLayout().left).toBe(51);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(0);
- expect(child1.getComputedLayout().height).toBe(10);
-
- expect(child2.getComputedLayout().left).toBe(77);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(0);
- expect(child2.getComputedLayout().height).toBe(10);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(102);
- expect(root.getComputedLayout().height).toBe(102);
-
- expect(child0.getComputedLayout().left).toBe(77);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(0);
- expect(child0.getComputedLayout().height).toBe(10);
-
- expect(child1.getComputedLayout().left).toBe(51);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(0);
- expect(child1.getComputedLayout().height).toBe(10);
-
- expect(child2.getComputedLayout().left).toBe(26);
- expect(child2.getComputedLayout().top).toBe(0);
- expect(child2.getComputedLayout().width).toBe(0);
- expect(child2.getComputedLayout().height).toBe(10);
- });
-});
diff --git a/packages/yoga/tests/margin.test.js b/packages/yoga/tests/margin.test.js
deleted file mode 100644
index 021f0fdf3..000000000
--- a/packages/yoga/tests/margin.test.js
+++ /dev/null
@@ -1,1741 +0,0 @@
-const Yoga = require('..');
-
-describe('Margins', () => {
- let yogaNode;
- let flexboxNode;
-
- beforeEach(() => {
- yogaNode = Yoga.Node.createDefault();
- flexboxNode = Yoga.Node.createDefault();
- });
-
- test('should have same top margin by default', () => {
- expect(yogaNode.getMargin(Yoga.EDGE_TOP)).toEqual(
- flexboxNode.getMargin(Yoga.EDGE_TOP),
- );
- });
-
- test('should have same left margin by default', () => {
- expect(yogaNode.getMargin(Yoga.EDGE_LEFT)).toEqual(
- flexboxNode.getMargin(Yoga.EDGE_LEFT),
- );
- });
-
- test('should have same bottom margin by default', () => {
- expect(yogaNode.getMargin(Yoga.EDGE_BOTTOM)).toEqual(
- flexboxNode.getMargin(Yoga.EDGE_BOTTOM),
- );
- });
-
- test('should have same right margin by default', () => {
- expect(yogaNode.getMargin(Yoga.EDGE_RIGHT)).toEqual(
- flexboxNode.getMargin(Yoga.EDGE_RIGHT),
- );
- });
-
- test('should have same vertical margin by default', () => {
- expect(yogaNode.getMargin(Yoga.EDGE_VERTICAL)).toEqual(
- flexboxNode.getMargin(Yoga.EDGE_VERTICAL),
- );
- });
-
- test('should have same horizontal margin by default', () => {
- expect(yogaNode.getMargin(Yoga.EDGE_HORIZONTAL)).toEqual(
- flexboxNode.getMargin(Yoga.EDGE_HORIZONTAL),
- );
- });
-
- test('should have same start margin by default', () => {
- expect(yogaNode.getMargin(Yoga.EDGE_START)).toEqual(
- flexboxNode.getMargin(Yoga.EDGE_START),
- );
- });
-
- test('should have same end margin by default', () => {
- expect(yogaNode.getMargin(Yoga.EDGE_END)).toEqual(
- flexboxNode.getMargin(Yoga.EDGE_END),
- );
- });
-
- test('should have same all margin by default', () => {
- expect(yogaNode.getMargin(Yoga.EDGE_ALL)).toEqual(
- flexboxNode.getMargin(Yoga.EDGE_ALL),
- );
- });
-
- test('should set top margin', () => {
- yogaNode.setMargin(Yoga.EDGE_TOP, 5);
- flexboxNode.setMargin(Yoga.EDGE_TOP, 5);
-
- expect(yogaNode.getMargin(Yoga.EDGE_TOP)).toEqual(
- flexboxNode.getMargin(Yoga.EDGE_TOP),
- );
- });
-
- test('should set left margin', () => {
- yogaNode.setMargin(Yoga.EDGE_LEFT, 5);
- flexboxNode.setMargin(Yoga.EDGE_LEFT, 5);
-
- expect(yogaNode.getMargin(Yoga.EDGE_LEFT)).toEqual(
- flexboxNode.getMargin(Yoga.EDGE_LEFT),
- );
- });
-
- test('should set bottom margin', () => {
- yogaNode.setMargin(Yoga.EDGE_BOTTOM, 5);
- flexboxNode.setMargin(Yoga.EDGE_BOTTOM, 5);
-
- expect(yogaNode.getMargin(Yoga.EDGE_BOTTOM)).toEqual(
- flexboxNode.getMargin(Yoga.EDGE_BOTTOM),
- );
- });
-
- test('should set right margin', () => {
- yogaNode.setMargin(Yoga.EDGE_RIGHT, 5);
- flexboxNode.setMargin(Yoga.EDGE_RIGHT, 5);
-
- expect(yogaNode.getMargin(Yoga.EDGE_RIGHT)).toEqual(
- flexboxNode.getMargin(Yoga.EDGE_RIGHT),
- );
- });
-
- test('should set vertical margin', () => {
- yogaNode.setMargin(Yoga.EDGE_VERTICAL, 5);
- flexboxNode.setMargin(Yoga.EDGE_VERTICAL, 5);
-
- expect(yogaNode.getMargin(Yoga.EDGE_VERTICAL)).toEqual(
- flexboxNode.getMargin(Yoga.EDGE_VERTICAL),
- );
- });
-
- test('should set horizontal margin', () => {
- yogaNode.setMargin(Yoga.EDGE_HORIZONTAL, 5);
- flexboxNode.setMargin(Yoga.EDGE_HORIZONTAL, 5);
-
- expect(yogaNode.getMargin(Yoga.EDGE_HORIZONTAL)).toEqual(
- flexboxNode.getMargin(Yoga.EDGE_HORIZONTAL),
- );
- });
-
- test('should set start margin', () => {
- yogaNode.setMargin(Yoga.EDGE_START, 5);
- flexboxNode.setMargin(Yoga.EDGE_START, 5);
-
- expect(yogaNode.getMargin(Yoga.EDGE_START)).toEqual(
- flexboxNode.getMargin(Yoga.EDGE_START),
- );
- });
-
- test('should set end margin', () => {
- yogaNode.setMargin(Yoga.EDGE_END, 5);
- flexboxNode.setMargin(Yoga.EDGE_END, 5);
-
- expect(yogaNode.getMargin(Yoga.EDGE_END)).toEqual(
- flexboxNode.getMargin(Yoga.EDGE_END),
- );
- });
-
- test('should set all margin', () => {
- yogaNode.setMargin(Yoga.EDGE_ALL, 5);
- flexboxNode.setMargin(Yoga.EDGE_ALL, 5);
-
- expect(yogaNode.getMargin(Yoga.EDGE_ALL)).toEqual(
- flexboxNode.getMargin(Yoga.EDGE_ALL),
- );
- });
-
- test('should set margin auto', () => {
- yogaNode.setMarginAuto(Yoga.EDGE_ALL);
- flexboxNode.setMarginAuto(Yoga.EDGE_ALL);
-
- expect(yogaNode.getMargin(Yoga.EDGE_ALL)).toEqual(
- flexboxNode.getMargin(Yoga.EDGE_ALL),
- );
- });
-
- test('should set top percent margin', () => {
- yogaNode.setMarginPercent(Yoga.EDGE_TOP, 5);
- flexboxNode.setMarginPercent(Yoga.EDGE_TOP, 5);
-
- expect(yogaNode.getMargin(Yoga.EDGE_TOP)).toEqual(
- flexboxNode.getMargin(Yoga.EDGE_TOP),
- );
- });
-
- test('should set left percent margin', () => {
- yogaNode.setMarginPercent(Yoga.EDGE_LEFT, 5);
- flexboxNode.setMarginPercent(Yoga.EDGE_LEFT, 5);
-
- expect(yogaNode.getMargin(Yoga.EDGE_LEFT)).toEqual(
- flexboxNode.getMargin(Yoga.EDGE_LEFT),
- );
- });
-
- test('should set bottom percent margin', () => {
- yogaNode.setMarginPercent(Yoga.EDGE_BOTTOM, 5);
- flexboxNode.setMarginPercent(Yoga.EDGE_BOTTOM, 5);
-
- expect(yogaNode.getMargin(Yoga.EDGE_BOTTOM)).toEqual(
- flexboxNode.getMargin(Yoga.EDGE_BOTTOM),
- );
- });
-
- test('should set right percent margin', () => {
- yogaNode.setMarginPercent(Yoga.EDGE_RIGHT, 5);
- flexboxNode.setMarginPercent(Yoga.EDGE_RIGHT, 5);
-
- expect(yogaNode.getMargin(Yoga.EDGE_RIGHT)).toEqual(
- flexboxNode.getMargin(Yoga.EDGE_RIGHT),
- );
- });
-
- test('should set vertical percent margin', () => {
- yogaNode.setMarginPercent(Yoga.EDGE_VERTICAL, 5);
- flexboxNode.setMarginPercent(Yoga.EDGE_VERTICAL, 5);
-
- expect(yogaNode.getMargin(Yoga.EDGE_VERTICAL)).toEqual(
- flexboxNode.getMargin(Yoga.EDGE_VERTICAL),
- );
- });
-
- test('should set horizontal percent margin', () => {
- yogaNode.setMarginPercent(Yoga.EDGE_HORIZONTAL, 5);
- flexboxNode.setMarginPercent(Yoga.EDGE_HORIZONTAL, 5);
-
- expect(yogaNode.getMargin(Yoga.EDGE_HORIZONTAL)).toEqual(
- flexboxNode.getMargin(Yoga.EDGE_HORIZONTAL),
- );
- });
-
- test('should set start percent margin', () => {
- yogaNode.setMarginPercent(Yoga.EDGE_START, 5);
- flexboxNode.setMarginPercent(Yoga.EDGE_START, 5);
-
- expect(yogaNode.getMargin(Yoga.EDGE_START)).toEqual(
- flexboxNode.getMargin(Yoga.EDGE_START),
- );
-
- const root = Yoga.Node.create();
- root.setWidth(100);
- root.setHeight(100);
- root.setMarginPercent(Yoga.EDGE_START, 10);
- root.calculateLayout(100, 100, Yoga.DIRECTION_LTR);
- });
-
- test('should set end percent margin', () => {
- yogaNode.setMarginPercent(Yoga.EDGE_END, 5);
- flexboxNode.setMarginPercent(Yoga.EDGE_END, 5);
-
- expect(yogaNode.getMargin(Yoga.EDGE_END)).toEqual(
- flexboxNode.getMargin(Yoga.EDGE_END),
- );
- });
-
- test('margin_start', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setWidth(100);
- root.setHeight(100);
-
- const child0 = Yoga.Node.create();
- child0.setMargin(Yoga.EDGE_START, 10);
- child0.setWidth(10);
- root.insertChild(child0, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(10);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(10);
- expect(child0.getComputedLayout().height).toBe(100);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(80);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(10);
- expect(child0.getComputedLayout().height).toBe(100);
- });
-
- test('margin_top', () => {
- const root = Yoga.Node.create();
- root.setWidth(100);
- root.setHeight(100);
-
- const child0 = Yoga.Node.create();
- child0.setMargin(Yoga.EDGE_TOP, 10);
- child0.setHeight(10);
- root.insertChild(child0, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(10);
- expect(child0.getComputedLayout().width).toBe(100);
- expect(child0.getComputedLayout().height).toBe(10);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(10);
- expect(child0.getComputedLayout().width).toBe(100);
- expect(child0.getComputedLayout().height).toBe(10);
- });
-
- test('margin_end', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setJustifyContent(Yoga.JUSTIFY_FLEX_END);
- root.setWidth(100);
- root.setHeight(100);
-
- const child0 = Yoga.Node.create();
- child0.setMargin(Yoga.EDGE_END, 10);
- child0.setWidth(10);
- root.insertChild(child0, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(80);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(10);
- expect(child0.getComputedLayout().height).toBe(100);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(10);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(10);
- expect(child0.getComputedLayout().height).toBe(100);
- });
-
- test('margin_bottom', () => {
- const root = Yoga.Node.create();
- root.setJustifyContent(Yoga.JUSTIFY_FLEX_END);
- root.setWidth(100);
- root.setHeight(100);
-
- const child0 = Yoga.Node.create();
- child0.setMargin(Yoga.EDGE_BOTTOM, 10);
- child0.setHeight(10);
- root.insertChild(child0, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(80);
- expect(child0.getComputedLayout().width).toBe(100);
- expect(child0.getComputedLayout().height).toBe(10);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(80);
- expect(child0.getComputedLayout().width).toBe(100);
- expect(child0.getComputedLayout().height).toBe(10);
- });
-
- test('margin_and_flex_row', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setWidth(100);
- root.setHeight(100);
-
- const child0 = Yoga.Node.create();
- child0.setFlexGrow(1);
- child0.setMargin(Yoga.EDGE_START, 10);
- child0.setMargin(Yoga.EDGE_END, 10);
- root.insertChild(child0, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(10);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(80);
- expect(child0.getComputedLayout().height).toBe(100);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(10);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(80);
- expect(child0.getComputedLayout().height).toBe(100);
- });
-
- test('margin_and_flex_column', () => {
- const root = Yoga.Node.create();
- root.setWidth(100);
- root.setHeight(100);
-
- const child0 = Yoga.Node.create();
- child0.setFlexGrow(1);
- child0.setMargin(Yoga.EDGE_TOP, 10);
- child0.setMargin(Yoga.EDGE_BOTTOM, 10);
- root.insertChild(child0, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(10);
- expect(child0.getComputedLayout().width).toBe(100);
- expect(child0.getComputedLayout().height).toBe(80);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(10);
- expect(child0.getComputedLayout().width).toBe(100);
- expect(child0.getComputedLayout().height).toBe(80);
- });
-
- test('margin_and_stretch_row', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setWidth(100);
- root.setHeight(100);
-
- const child0 = Yoga.Node.create();
- child0.setFlexGrow(1);
- child0.setMargin(Yoga.EDGE_TOP, 10);
- child0.setMargin(Yoga.EDGE_BOTTOM, 10);
- root.insertChild(child0, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(10);
- expect(child0.getComputedLayout().width).toBe(100);
- expect(child0.getComputedLayout().height).toBe(80);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(10);
- expect(child0.getComputedLayout().width).toBe(100);
- expect(child0.getComputedLayout().height).toBe(80);
- });
-
- test('margin_and_stretch_column', () => {
- const root = Yoga.Node.create();
- root.setWidth(100);
- root.setHeight(100);
-
- const child0 = Yoga.Node.create();
- child0.setFlexGrow(1);
- child0.setMargin(Yoga.EDGE_START, 10);
- child0.setMargin(Yoga.EDGE_END, 10);
- root.insertChild(child0, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(10);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(80);
- expect(child0.getComputedLayout().height).toBe(100);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(10);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(80);
- expect(child0.getComputedLayout().height).toBe(100);
- });
-
- test('margin_with_sibling_row', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setWidth(100);
- root.setHeight(100);
-
- const child0 = Yoga.Node.create();
- child0.setFlexGrow(1);
- child0.setMargin(Yoga.EDGE_END, 10);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setFlexGrow(1);
- root.insertChild(child1, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(45);
- expect(child0.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(55);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(45);
- expect(child1.getComputedLayout().height).toBe(100);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(55);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(45);
- expect(child0.getComputedLayout().height).toBe(100);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(45);
- expect(child1.getComputedLayout().height).toBe(100);
- });
-
- test('margin_with_sibling_column', () => {
- const root = Yoga.Node.create();
- root.setWidth(100);
- root.setHeight(100);
-
- const child0 = Yoga.Node.create();
- child0.setFlexGrow(1);
- child0.setMargin(Yoga.EDGE_BOTTOM, 10);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setFlexGrow(1);
- root.insertChild(child1, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(100);
- expect(child0.getComputedLayout().height).toBe(45);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(55);
- expect(child1.getComputedLayout().width).toBe(100);
- expect(child1.getComputedLayout().height).toBe(45);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(100);
- expect(child0.getComputedLayout().height).toBe(45);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(55);
- expect(child1.getComputedLayout().width).toBe(100);
- expect(child1.getComputedLayout().height).toBe(45);
- });
-
- test('margin_auto_bottom', () => {
- const root = Yoga.Node.create();
- root.setAlignItems(Yoga.ALIGN_CENTER);
- root.setWidth(200);
- root.setHeight(200);
-
- const child0 = Yoga.Node.create();
- child0.setMarginAuto(Yoga.EDGE_BOTTOM);
- child0.setWidth(50);
- child0.setHeight(50);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(50);
- child1.setHeight(50);
- root.insertChild(child1, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(child0.getComputedLayout().left).toBe(75);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(50);
-
- expect(child1.getComputedLayout().left).toBe(75);
- expect(child1.getComputedLayout().top).toBe(150);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(child0.getComputedLayout().left).toBe(75);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(50);
-
- expect(child1.getComputedLayout().left).toBe(75);
- expect(child1.getComputedLayout().top).toBe(150);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
- });
-
- test('margin_auto_top', () => {
- const root = Yoga.Node.create();
- root.setAlignItems(Yoga.ALIGN_CENTER);
- root.setWidth(200);
- root.setHeight(200);
-
- const child0 = Yoga.Node.create();
- child0.setMarginAuto(Yoga.EDGE_TOP);
- child0.setWidth(50);
- child0.setHeight(50);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(50);
- child1.setHeight(50);
- root.insertChild(child1, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(child0.getComputedLayout().left).toBe(75);
- expect(child0.getComputedLayout().top).toBe(100);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(50);
-
- expect(child1.getComputedLayout().left).toBe(75);
- expect(child1.getComputedLayout().top).toBe(150);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(child0.getComputedLayout().left).toBe(75);
- expect(child0.getComputedLayout().top).toBe(100);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(50);
-
- expect(child1.getComputedLayout().left).toBe(75);
- expect(child1.getComputedLayout().top).toBe(150);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
- });
-
- test('margin_auto_bottom_and_top', () => {
- const root = Yoga.Node.create();
- root.setAlignItems(Yoga.ALIGN_CENTER);
- root.setWidth(200);
- root.setHeight(200);
-
- const child0 = Yoga.Node.create();
- child0.setMarginAuto(Yoga.EDGE_TOP);
- child0.setMarginAuto(Yoga.EDGE_BOTTOM);
- child0.setWidth(50);
- child0.setHeight(50);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(50);
- child1.setHeight(50);
- root.insertChild(child1, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(child0.getComputedLayout().left).toBe(75);
- expect(child0.getComputedLayout().top).toBe(50);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(50);
-
- expect(child1.getComputedLayout().left).toBe(75);
- expect(child1.getComputedLayout().top).toBe(150);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(child0.getComputedLayout().left).toBe(75);
- expect(child0.getComputedLayout().top).toBe(50);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(50);
-
- expect(child1.getComputedLayout().left).toBe(75);
- expect(child1.getComputedLayout().top).toBe(150);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
- });
-
- test('margin_auto_bottom_and_top_justify_center', () => {
- const root = Yoga.Node.create();
- root.setJustifyContent(Yoga.JUSTIFY_CENTER);
- root.setWidth(200);
- root.setHeight(200);
-
- const child0 = Yoga.Node.create();
- child0.setMarginAuto(Yoga.EDGE_TOP);
- child0.setMarginAuto(Yoga.EDGE_BOTTOM);
- child0.setWidth(50);
- child0.setHeight(50);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(50);
- child1.setHeight(50);
- root.insertChild(child1, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(50);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(50);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(150);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(child0.getComputedLayout().left).toBe(150);
- expect(child0.getComputedLayout().top).toBe(50);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(50);
-
- expect(child1.getComputedLayout().left).toBe(150);
- expect(child1.getComputedLayout().top).toBe(150);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
- });
-
- test('margin_auto_mutiple_children_column', () => {
- const root = Yoga.Node.create();
- root.setAlignItems(Yoga.ALIGN_CENTER);
- root.setWidth(200);
- root.setHeight(200);
-
- const child0 = Yoga.Node.create();
- child0.setMarginAuto(Yoga.EDGE_TOP);
- child0.setWidth(50);
- child0.setHeight(50);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setMarginAuto(Yoga.EDGE_TOP);
- child1.setWidth(50);
- child1.setHeight(50);
- root.insertChild(child1, 1);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(50);
- child2.setHeight(50);
- root.insertChild(child2, 2);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(child0.getComputedLayout().left).toBe(75);
- expect(child0.getComputedLayout().top).toBe(25);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(50);
-
- expect(child1.getComputedLayout().left).toBe(75);
- expect(child1.getComputedLayout().top).toBe(100);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
-
- expect(child2.getComputedLayout().left).toBe(75);
- expect(child2.getComputedLayout().top).toBe(150);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(50);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(child0.getComputedLayout().left).toBe(75);
- expect(child0.getComputedLayout().top).toBe(25);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(50);
-
- expect(child1.getComputedLayout().left).toBe(75);
- expect(child1.getComputedLayout().top).toBe(100);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
-
- expect(child2.getComputedLayout().left).toBe(75);
- expect(child2.getComputedLayout().top).toBe(150);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(50);
- });
-
- test('margin_auto_mutiple_children_row', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setAlignItems(Yoga.ALIGN_CENTER);
- root.setWidth(200);
- root.setHeight(200);
-
- const child0 = Yoga.Node.create();
- child0.setMarginAuto(Yoga.EDGE_RIGHT);
- child0.setWidth(50);
- child0.setHeight(50);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setMarginAuto(Yoga.EDGE_RIGHT);
- child1.setWidth(50);
- child1.setHeight(50);
- root.insertChild(child1, 1);
-
- const child2 = Yoga.Node.create();
- child2.setWidth(50);
- child2.setHeight(50);
- root.insertChild(child2, 2);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(75);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(50);
-
- expect(child1.getComputedLayout().left).toBe(75);
- expect(child1.getComputedLayout().top).toBe(75);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
-
- expect(child2.getComputedLayout().left).toBe(150);
- expect(child2.getComputedLayout().top).toBe(75);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(50);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(child0.getComputedLayout().left).toBe(125);
- expect(child0.getComputedLayout().top).toBe(75);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(50);
-
- expect(child1.getComputedLayout().left).toBe(50);
- expect(child1.getComputedLayout().top).toBe(75);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
-
- expect(child2.getComputedLayout().left).toBe(0);
- expect(child2.getComputedLayout().top).toBe(75);
- expect(child2.getComputedLayout().width).toBe(50);
- expect(child2.getComputedLayout().height).toBe(50);
- });
-
- test('margin_auto_left_and_right_column', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setAlignItems(Yoga.ALIGN_CENTER);
- root.setWidth(200);
- root.setHeight(200);
-
- const child0 = Yoga.Node.create();
- child0.setMarginAuto(Yoga.EDGE_LEFT);
- child0.setMarginAuto(Yoga.EDGE_RIGHT);
- child0.setWidth(50);
- child0.setHeight(50);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(50);
- child1.setHeight(50);
- root.insertChild(child1, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(child0.getComputedLayout().left).toBe(50);
- expect(child0.getComputedLayout().top).toBe(75);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(50);
-
- expect(child1.getComputedLayout().left).toBe(150);
- expect(child1.getComputedLayout().top).toBe(75);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(child0.getComputedLayout().left).toBe(100);
- expect(child0.getComputedLayout().top).toBe(75);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(50);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(75);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
- });
-
- test('margin_auto_left_and_right', () => {
- const root = Yoga.Node.create();
- root.setWidth(200);
- root.setHeight(200);
-
- const child0 = Yoga.Node.create();
- child0.setMarginAuto(Yoga.EDGE_LEFT);
- child0.setMarginAuto(Yoga.EDGE_RIGHT);
- child0.setWidth(50);
- child0.setHeight(50);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(50);
- child1.setHeight(50);
- root.insertChild(child1, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(child0.getComputedLayout().left).toBe(75);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(50);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(50);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(child0.getComputedLayout().left).toBe(75);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(50);
-
- expect(child1.getComputedLayout().left).toBe(150);
- expect(child1.getComputedLayout().top).toBe(50);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
- });
-
- test('margin_auto_start_and_end_column', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setAlignItems(Yoga.ALIGN_CENTER);
- root.setWidth(200);
- root.setHeight(200);
-
- const child0 = Yoga.Node.create();
- child0.setMarginAuto(Yoga.EDGE_START);
- child0.setMarginAuto(Yoga.EDGE_END);
- child0.setWidth(50);
- child0.setHeight(50);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(50);
- child1.setHeight(50);
- root.insertChild(child1, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(child0.getComputedLayout().left).toBe(50);
- expect(child0.getComputedLayout().top).toBe(75);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(50);
-
- expect(child1.getComputedLayout().left).toBe(150);
- expect(child1.getComputedLayout().top).toBe(75);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(child0.getComputedLayout().left).toBe(100);
- expect(child0.getComputedLayout().top).toBe(75);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(50);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(75);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
- });
-
- test('margin_auto_start_and_end', () => {
- const root = Yoga.Node.create();
- root.setWidth(200);
- root.setHeight(200);
-
- const child0 = Yoga.Node.create();
- child0.setMarginAuto(Yoga.EDGE_START);
- child0.setMarginAuto(Yoga.EDGE_END);
- child0.setWidth(50);
- child0.setHeight(50);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(50);
- child1.setHeight(50);
- root.insertChild(child1, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(child0.getComputedLayout().left).toBe(75);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(50);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(50);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(child0.getComputedLayout().left).toBe(75);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(50);
-
- expect(child1.getComputedLayout().left).toBe(150);
- expect(child1.getComputedLayout().top).toBe(50);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
- });
-
- test('margin_auto_left_and_right_column_and_center', () => {
- const root = Yoga.Node.create();
- root.setAlignItems(Yoga.ALIGN_CENTER);
- root.setWidth(200);
- root.setHeight(200);
-
- const child0 = Yoga.Node.create();
- child0.setMarginAuto(Yoga.EDGE_LEFT);
- child0.setMarginAuto(Yoga.EDGE_RIGHT);
- child0.setWidth(50);
- child0.setHeight(50);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(50);
- child1.setHeight(50);
- root.insertChild(child1, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(child0.getComputedLayout().left).toBe(75);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(50);
-
- expect(child1.getComputedLayout().left).toBe(75);
- expect(child1.getComputedLayout().top).toBe(50);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(child0.getComputedLayout().left).toBe(75);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(50);
-
- expect(child1.getComputedLayout().left).toBe(75);
- expect(child1.getComputedLayout().top).toBe(50);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
- });
-
- test('margin_auto_left', () => {
- const root = Yoga.Node.create();
- root.setAlignItems(Yoga.ALIGN_CENTER);
- root.setWidth(200);
- root.setHeight(200);
-
- const child0 = Yoga.Node.create();
- child0.setMarginAuto(Yoga.EDGE_LEFT);
- child0.setWidth(50);
- child0.setHeight(50);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(50);
- child1.setHeight(50);
- root.insertChild(child1, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(child0.getComputedLayout().left).toBe(150);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(50);
-
- expect(child1.getComputedLayout().left).toBe(75);
- expect(child1.getComputedLayout().top).toBe(50);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(child0.getComputedLayout().left).toBe(150);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(50);
-
- expect(child1.getComputedLayout().left).toBe(75);
- expect(child1.getComputedLayout().top).toBe(50);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
- });
-
- test('margin_auto_right', () => {
- const root = Yoga.Node.create();
- root.setAlignItems(Yoga.ALIGN_CENTER);
- root.setWidth(200);
- root.setHeight(200);
-
- const child0 = Yoga.Node.create();
- child0.setMarginAuto(Yoga.EDGE_RIGHT);
- child0.setWidth(50);
- child0.setHeight(50);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(50);
- child1.setHeight(50);
- root.insertChild(child1, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(50);
-
- expect(child1.getComputedLayout().left).toBe(75);
- expect(child1.getComputedLayout().top).toBe(50);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(50);
-
- expect(child1.getComputedLayout().left).toBe(75);
- expect(child1.getComputedLayout().top).toBe(50);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
- });
-
- test('margin_auto_left_and_right_strech', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setWidth(200);
- root.setHeight(200);
-
- const child0 = Yoga.Node.create();
- child0.setMarginAuto(Yoga.EDGE_LEFT);
- child0.setMarginAuto(Yoga.EDGE_RIGHT);
- child0.setWidth(50);
- child0.setHeight(50);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(50);
- child1.setHeight(50);
- root.insertChild(child1, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(child0.getComputedLayout().left).toBe(50);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(50);
-
- expect(child1.getComputedLayout().left).toBe(150);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(child0.getComputedLayout().left).toBe(100);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(50);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(0);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
- });
-
- test('margin_auto_top_and_bottom_strech', () => {
- const root = Yoga.Node.create();
- root.setWidth(200);
- root.setHeight(200);
-
- const child0 = Yoga.Node.create();
- child0.setMarginAuto(Yoga.EDGE_TOP);
- child0.setMarginAuto(Yoga.EDGE_BOTTOM);
- child0.setWidth(50);
- child0.setHeight(50);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(50);
- child1.setHeight(50);
- root.insertChild(child1, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(50);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(50);
-
- expect(child1.getComputedLayout().left).toBe(0);
- expect(child1.getComputedLayout().top).toBe(150);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(child0.getComputedLayout().left).toBe(150);
- expect(child0.getComputedLayout().top).toBe(50);
- expect(child0.getComputedLayout().width).toBe(50);
- expect(child0.getComputedLayout().height).toBe(50);
-
- expect(child1.getComputedLayout().left).toBe(150);
- expect(child1.getComputedLayout().top).toBe(150);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
- });
-
- test('margin_should_not_be_part_of_max_height', () => {
- const root = Yoga.Node.create();
- root.setWidth(250);
- root.setHeight(250);
-
- const child0 = Yoga.Node.create();
- child0.setMargin(Yoga.EDGE_TOP, 20);
- child0.setWidth(100);
- child0.setHeight(100);
- child0.setMaxHeight(100);
- root.insertChild(child0, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(250);
- expect(root.getComputedLayout().height).toBe(250);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(20);
- expect(child0.getComputedLayout().width).toBe(100);
- expect(child0.getComputedLayout().height).toBe(100);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(250);
- expect(root.getComputedLayout().height).toBe(250);
-
- expect(child0.getComputedLayout().left).toBe(150);
- expect(child0.getComputedLayout().top).toBe(20);
- expect(child0.getComputedLayout().width).toBe(100);
- expect(child0.getComputedLayout().height).toBe(100);
- });
-
- test('margin_should_not_be_part_of_max_width', () => {
- const root = Yoga.Node.create();
- root.setWidth(250);
- root.setHeight(250);
-
- const child0 = Yoga.Node.create();
- child0.setMargin(Yoga.EDGE_LEFT, 20);
- child0.setWidth(100);
- child0.setMaxWidth(100);
- child0.setHeight(100);
- root.insertChild(child0, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(250);
- expect(root.getComputedLayout().height).toBe(250);
-
- expect(child0.getComputedLayout().left).toBe(20);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(100);
- expect(child0.getComputedLayout().height).toBe(100);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(250);
- expect(root.getComputedLayout().height).toBe(250);
-
- expect(child0.getComputedLayout().left).toBe(150);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(100);
- expect(child0.getComputedLayout().height).toBe(100);
- });
-
- test('margin_auto_left_right_child_bigger_than_parent', () => {
- const root = Yoga.Node.create();
- root.setJustifyContent(Yoga.JUSTIFY_CENTER);
- root.setWidth(52);
- root.setHeight(52);
-
- const child0 = Yoga.Node.create();
- child0.setMarginAuto(Yoga.EDGE_LEFT);
- child0.setMarginAuto(Yoga.EDGE_RIGHT);
- child0.setWidth(72);
- child0.setHeight(72);
- root.insertChild(child0, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(52);
- expect(root.getComputedLayout().height).toBe(52);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(-10);
- expect(child0.getComputedLayout().width).toBe(72);
- expect(child0.getComputedLayout().height).toBe(72);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(52);
- expect(root.getComputedLayout().height).toBe(52);
-
- expect(child0.getComputedLayout().left).toBe(-20);
- expect(child0.getComputedLayout().top).toBe(-10);
- expect(child0.getComputedLayout().width).toBe(72);
- expect(child0.getComputedLayout().height).toBe(72);
- });
-
- test('margin_auto_left_child_bigger_than_parent', () => {
- const root = Yoga.Node.create();
- root.setJustifyContent(Yoga.JUSTIFY_CENTER);
- root.setWidth(52);
- root.setHeight(52);
-
- const child0 = Yoga.Node.create();
- child0.setMarginAuto(Yoga.EDGE_LEFT);
- child0.setWidth(72);
- child0.setHeight(72);
- root.insertChild(child0, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(52);
- expect(root.getComputedLayout().height).toBe(52);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(-10);
- expect(child0.getComputedLayout().width).toBe(72);
- expect(child0.getComputedLayout().height).toBe(72);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(52);
- expect(root.getComputedLayout().height).toBe(52);
-
- expect(child0.getComputedLayout().left).toBe(-20);
- expect(child0.getComputedLayout().top).toBe(-10);
- expect(child0.getComputedLayout().width).toBe(72);
- expect(child0.getComputedLayout().height).toBe(72);
- });
-
- test('margin_fix_left_auto_right_child_bigger_than_parent', () => {
- const root = Yoga.Node.create();
- root.setJustifyContent(Yoga.JUSTIFY_CENTER);
- root.setWidth(52);
- root.setHeight(52);
-
- const child0 = Yoga.Node.create();
- child0.setMargin(Yoga.EDGE_LEFT, 10);
- child0.setMarginAuto(Yoga.EDGE_RIGHT);
- child0.setWidth(72);
- child0.setHeight(72);
- root.insertChild(child0, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(52);
- expect(root.getComputedLayout().height).toBe(52);
-
- expect(child0.getComputedLayout().left).toBe(10);
- expect(child0.getComputedLayout().top).toBe(-10);
- expect(child0.getComputedLayout().width).toBe(72);
- expect(child0.getComputedLayout().height).toBe(72);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(52);
- expect(root.getComputedLayout().height).toBe(52);
-
- expect(child0.getComputedLayout().left).toBe(-20);
- expect(child0.getComputedLayout().top).toBe(-10);
- expect(child0.getComputedLayout().width).toBe(72);
- expect(child0.getComputedLayout().height).toBe(72);
- });
-
- test('margin_auto_left_fix_right_child_bigger_than_parent', () => {
- const root = Yoga.Node.create();
- root.setJustifyContent(Yoga.JUSTIFY_CENTER);
- root.setWidth(52);
- root.setHeight(52);
-
- const child0 = Yoga.Node.create();
- child0.setMarginAuto(Yoga.EDGE_LEFT);
- child0.setMargin(Yoga.EDGE_RIGHT, 10);
- child0.setWidth(72);
- child0.setHeight(72);
- root.insertChild(child0, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(52);
- expect(root.getComputedLayout().height).toBe(52);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(-10);
- expect(child0.getComputedLayout().width).toBe(72);
- expect(child0.getComputedLayout().height).toBe(72);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(52);
- expect(root.getComputedLayout().height).toBe(52);
-
- expect(child0.getComputedLayout().left).toBe(-30);
- expect(child0.getComputedLayout().top).toBe(-10);
- expect(child0.getComputedLayout().width).toBe(72);
- expect(child0.getComputedLayout().height).toBe(72);
- });
-
- test('margin_auto_top_stretching_child', () => {
- const root = Yoga.Node.create();
- root.setAlignItems(Yoga.ALIGN_CENTER);
- root.setWidth(200);
- root.setHeight(200);
-
- const child0 = Yoga.Node.create();
- child0.setFlexGrow(1);
- child0.setFlexShrink(1);
- child0.setFlexBasisPercent(0);
- child0.setMarginAuto(Yoga.EDGE_TOP);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(50);
- child1.setHeight(50);
- root.insertChild(child1, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(child0.getComputedLayout().left).toBe(100);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(0);
- expect(child0.getComputedLayout().height).toBe(150);
-
- expect(child1.getComputedLayout().left).toBe(75);
- expect(child1.getComputedLayout().top).toBe(150);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(child0.getComputedLayout().left).toBe(100);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(0);
- expect(child0.getComputedLayout().height).toBe(150);
-
- expect(child1.getComputedLayout().left).toBe(75);
- expect(child1.getComputedLayout().top).toBe(150);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
- });
-
- test('margin_auto_left_stretching_child', () => {
- const root = Yoga.Node.create();
- root.setAlignItems(Yoga.ALIGN_CENTER);
- root.setWidth(200);
- root.setHeight(200);
-
- const child0 = Yoga.Node.create();
- child0.setFlexGrow(1);
- child0.setFlexShrink(1);
- child0.setFlexBasisPercent(0);
- child0.setMarginAuto(Yoga.EDGE_LEFT);
- root.insertChild(child0, 0);
-
- const child1 = Yoga.Node.create();
- child1.setWidth(50);
- child1.setHeight(50);
- root.insertChild(child1, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(child0.getComputedLayout().left).toBe(200);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(0);
- expect(child0.getComputedLayout().height).toBe(150);
-
- expect(child1.getComputedLayout().left).toBe(75);
- expect(child1.getComputedLayout().top).toBe(150);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(child0.getComputedLayout().left).toBe(200);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(0);
- expect(child0.getComputedLayout().height).toBe(150);
-
- expect(child1.getComputedLayout().left).toBe(75);
- expect(child1.getComputedLayout().top).toBe(150);
- expect(child1.getComputedLayout().width).toBe(50);
- expect(child1.getComputedLayout().height).toBe(50);
- });
-});
diff --git a/packages/yoga/tests/minMaxDimension.test.js b/packages/yoga/tests/minMaxDimension.test.js
deleted file mode 100644
index e02c9eba9..000000000
--- a/packages/yoga/tests/minMaxDimension.test.js
+++ /dev/null
@@ -1,1133 +0,0 @@
-const Yoga = require('..');
-
-describe("Min max dimensions", () => {
- test('max_width', () => {
- const root = Yoga.Node.create();
- root.setWidth(100);
- root.setHeight(100);
-
- const root_child0 = Yoga.Node.create();
- root_child0.setMaxWidth(50);
- root_child0.setHeight(10);
- root.insertChild(root_child0, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(root_child0.getComputedLayout().left).toBe(0);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(50);
- expect(root_child0.getComputedLayout().height).toBe(10);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(root_child0.getComputedLayout().left).toBe(50);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(50);
- expect(root_child0.getComputedLayout().height).toBe(10);
- });
-
- test('max_height', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setWidth(100);
- root.setHeight(100);
-
- const root_child0 = Yoga.Node.create();
- root_child0.setWidth(10);
- root_child0.setMaxHeight(50);
- root.insertChild(root_child0, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(root_child0.getComputedLayout().left).toBe(0);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(10);
- expect(root_child0.getComputedLayout().height).toBe(50);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(root_child0.getComputedLayout().left).toBe(90);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(10);
- expect(root_child0.getComputedLayout().height).toBe(50);
- });
-
- test('min_height', () => {
- const root = Yoga.Node.create();
- root.setWidth(100);
- root.setHeight(100);
-
- const root_child0 = Yoga.Node.create();
- root_child0.setFlexGrow(1);
- root_child0.setMinHeight(60);
- root.insertChild(root_child0, 0);
-
- const root_child1 = Yoga.Node.create();
- root_child1.setFlexGrow(1);
- root.insertChild(root_child1, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(root_child0.getComputedLayout().left).toBe(0);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(100);
- expect(root_child0.getComputedLayout().height).toBe(80);
-
- expect(root_child1.getComputedLayout().left).toBe(0);
- expect(root_child1.getComputedLayout().top).toBe(80);
- expect(root_child1.getComputedLayout().width).toBe(100);
- expect(root_child1.getComputedLayout().height).toBe(20);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(root_child0.getComputedLayout().left).toBe(0);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(100);
- expect(root_child0.getComputedLayout().height).toBe(80);
-
- expect(root_child1.getComputedLayout().left).toBe(0);
- expect(root_child1.getComputedLayout().top).toBe(80);
- expect(root_child1.getComputedLayout().width).toBe(100);
- expect(root_child1.getComputedLayout().height).toBe(20);
- });
-
- test('min_width', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setWidth(100);
- root.setHeight(100);
-
- const root_child0 = Yoga.Node.create();
- root_child0.setFlexGrow(1);
- root_child0.setMinWidth(60);
- root.insertChild(root_child0, 0);
-
- const root_child1 = Yoga.Node.create();
- root_child1.setFlexGrow(1);
- root.insertChild(root_child1, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(root_child0.getComputedLayout().left).toBe(0);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(80);
- expect(root_child0.getComputedLayout().height).toBe(100);
-
- expect(root_child1.getComputedLayout().left).toBe(80);
- expect(root_child1.getComputedLayout().top).toBe(0);
- expect(root_child1.getComputedLayout().width).toBe(20);
- expect(root_child1.getComputedLayout().height).toBe(100);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(root_child0.getComputedLayout().left).toBe(20);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(80);
- expect(root_child0.getComputedLayout().height).toBe(100);
-
- expect(root_child1.getComputedLayout().left).toBe(0);
- expect(root_child1.getComputedLayout().top).toBe(0);
- expect(root_child1.getComputedLayout().width).toBe(20);
- expect(root_child1.getComputedLayout().height).toBe(100);
- });
-
- test('justify_content_min_max', () => {
- const root = Yoga.Node.create();
- root.setJustifyContent(Yoga.JUSTIFY_CENTER);
- root.setWidth(100);
- root.setMinHeight(100);
- root.setMaxHeight(200);
-
- const root_child0 = Yoga.Node.create();
- root_child0.setWidth(60);
- root_child0.setHeight(60);
- root.insertChild(root_child0, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(root_child0.getComputedLayout().left).toBe(0);
- expect(root_child0.getComputedLayout().top).toBe(20);
- expect(root_child0.getComputedLayout().width).toBe(60);
- expect(root_child0.getComputedLayout().height).toBe(60);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(root_child0.getComputedLayout().left).toBe(40);
- expect(root_child0.getComputedLayout().top).toBe(20);
- expect(root_child0.getComputedLayout().width).toBe(60);
- expect(root_child0.getComputedLayout().height).toBe(60);
- });
-
- test('align_items_min_max', () => {
- const root = Yoga.Node.create();
- root.setAlignItems(Yoga.ALIGN_CENTER);
- root.setMinWidth(100);
- root.setMaxWidth(200);
- root.setHeight(100);
-
- const root_child0 = Yoga.Node.create();
- root_child0.setWidth(60);
- root_child0.setHeight(60);
- root.insertChild(root_child0, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(root_child0.getComputedLayout().left).toBe(20);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(60);
- expect(root_child0.getComputedLayout().height).toBe(60);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(root_child0.getComputedLayout().left).toBe(20);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(60);
- expect(root_child0.getComputedLayout().height).toBe(60);
- });
-
- test('justify_content_overflow_min_max', () => {
- const root = Yoga.Node.create();
- root.setJustifyContent(Yoga.JUSTIFY_CENTER);
- root.setMinHeight(100);
- root.setMaxHeight(110);
-
- const root_child0 = Yoga.Node.create();
- root_child0.setWidth(50);
- root_child0.setHeight(50);
- root.insertChild(root_child0, 0);
-
- const root_child1 = Yoga.Node.create();
- root_child1.setWidth(50);
- root_child1.setHeight(50);
- root.insertChild(root_child1, 1);
-
- const root_child2 = Yoga.Node.create();
- root_child2.setWidth(50);
- root_child2.setHeight(50);
- root.insertChild(root_child2, 2);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(50);
- expect(root.getComputedLayout().height).toBe(110);
-
- expect(root_child0.getComputedLayout().left).toBe(0);
- expect(root_child0.getComputedLayout().top).toBe(-20);
- expect(root_child0.getComputedLayout().width).toBe(50);
- expect(root_child0.getComputedLayout().height).toBe(50);
-
- expect(root_child1.getComputedLayout().left).toBe(0);
- expect(root_child1.getComputedLayout().top).toBe(30);
- expect(root_child1.getComputedLayout().width).toBe(50);
- expect(root_child1.getComputedLayout().height).toBe(50);
-
- expect(root_child2.getComputedLayout().left).toBe(0);
- expect(root_child2.getComputedLayout().top).toBe(80);
- expect(root_child2.getComputedLayout().width).toBe(50);
- expect(root_child2.getComputedLayout().height).toBe(50);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(50);
- expect(root.getComputedLayout().height).toBe(110);
-
- expect(root_child0.getComputedLayout().left).toBe(0);
- expect(root_child0.getComputedLayout().top).toBe(-20);
- expect(root_child0.getComputedLayout().width).toBe(50);
- expect(root_child0.getComputedLayout().height).toBe(50);
-
- expect(root_child1.getComputedLayout().left).toBe(0);
- expect(root_child1.getComputedLayout().top).toBe(30);
- expect(root_child1.getComputedLayout().width).toBe(50);
- expect(root_child1.getComputedLayout().height).toBe(50);
-
- expect(root_child2.getComputedLayout().left).toBe(0);
- expect(root_child2.getComputedLayout().top).toBe(80);
- expect(root_child2.getComputedLayout().width).toBe(50);
- expect(root_child2.getComputedLayout().height).toBe(50);
- });
-
- test('flex_grow_to_min', () => {
- const root = Yoga.Node.create();
- root.setWidth(100);
- root.setMinHeight(100);
- root.setMaxHeight(500);
-
- const root_child0 = Yoga.Node.create();
- root_child0.setFlexGrow(1);
- root_child0.setFlexShrink(1);
- root.insertChild(root_child0, 0);
-
- const root_child1 = Yoga.Node.create();
- root_child1.setHeight(50);
- root.insertChild(root_child1, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(root_child0.getComputedLayout().left).toBe(0);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(100);
- expect(root_child0.getComputedLayout().height).toBe(50);
-
- expect(root_child1.getComputedLayout().left).toBe(0);
- expect(root_child1.getComputedLayout().top).toBe(50);
- expect(root_child1.getComputedLayout().width).toBe(100);
- expect(root_child1.getComputedLayout().height).toBe(50);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(root_child0.getComputedLayout().left).toBe(0);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(100);
- expect(root_child0.getComputedLayout().height).toBe(50);
-
- expect(root_child1.getComputedLayout().left).toBe(0);
- expect(root_child1.getComputedLayout().top).toBe(50);
- expect(root_child1.getComputedLayout().width).toBe(100);
- expect(root_child1.getComputedLayout().height).toBe(50);
- });
-
- test('flex_grow_in_at_most_container', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setAlignItems(Yoga.ALIGN_FLEX_START);
- root.setWidth(100);
- root.setHeight(100);
-
- const root_child0 = Yoga.Node.create();
- root_child0.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.insertChild(root_child0, 0);
-
- const root_child0_child0 = Yoga.Node.create();
- root_child0_child0.setFlexGrow(1);
- root_child0_child0.setFlexBasis(0);
- root_child0.insertChild(root_child0_child0, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(root_child0.getComputedLayout().left).toBe(0);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(0);
- expect(root_child0.getComputedLayout().height).toBe(0);
-
- expect(root_child0_child0.getComputedLayout().left).toBe(0);
- expect(root_child0_child0.getComputedLayout().top).toBe(0);
- expect(root_child0_child0.getComputedLayout().width).toBe(0);
- expect(root_child0_child0.getComputedLayout().height).toBe(0);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(root_child0.getComputedLayout().left).toBe(100);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(0);
- expect(root_child0.getComputedLayout().height).toBe(0);
-
- expect(root_child0_child0.getComputedLayout().left).toBe(0);
- expect(root_child0_child0.getComputedLayout().top).toBe(0);
- expect(root_child0_child0.getComputedLayout().width).toBe(0);
- expect(root_child0_child0.getComputedLayout().height).toBe(0);
- });
-
- test('flex_grow_child', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
-
- const root_child0 = Yoga.Node.create();
- root_child0.setFlexGrow(1);
- root_child0.setFlexBasis(0);
- root_child0.setHeight(100);
- root.insertChild(root_child0, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(0);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(root_child0.getComputedLayout().left).toBe(0);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(0);
- expect(root_child0.getComputedLayout().height).toBe(100);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(0);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(root_child0.getComputedLayout().left).toBe(0);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(0);
- expect(root_child0.getComputedLayout().height).toBe(100);
- });
-
- test('flex_grow_within_constrained_min_max_column', () => {
- const root = Yoga.Node.create();
- root.setMinHeight(100);
- root.setMaxHeight(200);
-
- const root_child0 = Yoga.Node.create();
- root_child0.setFlexGrow(1);
- root.insertChild(root_child0, 0);
-
- const root_child1 = Yoga.Node.create();
- root_child1.setHeight(50);
- root.insertChild(root_child1, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(0);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(root_child0.getComputedLayout().left).toBe(0);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(0);
- expect(root_child0.getComputedLayout().height).toBe(50);
-
- expect(root_child1.getComputedLayout().left).toBe(0);
- expect(root_child1.getComputedLayout().top).toBe(50);
- expect(root_child1.getComputedLayout().width).toBe(0);
- expect(root_child1.getComputedLayout().height).toBe(50);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(0);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(root_child0.getComputedLayout().left).toBe(0);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(0);
- expect(root_child0.getComputedLayout().height).toBe(50);
-
- expect(root_child1.getComputedLayout().left).toBe(0);
- expect(root_child1.getComputedLayout().top).toBe(50);
- expect(root_child1.getComputedLayout().width).toBe(0);
- expect(root_child1.getComputedLayout().height).toBe(50);
- });
-
- test('flex_grow_within_max_width', () => {
- const root = Yoga.Node.create();
- root.setWidth(200);
- root.setHeight(100);
-
- const root_child0 = Yoga.Node.create();
- root_child0.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root_child0.setMaxWidth(100);
- root.insertChild(root_child0, 0);
-
- const root_child0_child0 = Yoga.Node.create();
- root_child0_child0.setFlexGrow(1);
- root_child0_child0.setHeight(20);
- root_child0.insertChild(root_child0_child0, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(root_child0.getComputedLayout().left).toBe(0);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(100);
- expect(root_child0.getComputedLayout().height).toBe(20);
-
- expect(root_child0_child0.getComputedLayout().left).toBe(0);
- expect(root_child0_child0.getComputedLayout().top).toBe(0);
- expect(root_child0_child0.getComputedLayout().width).toBe(100);
- expect(root_child0_child0.getComputedLayout().height).toBe(20);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(root_child0.getComputedLayout().left).toBe(100);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(100);
- expect(root_child0.getComputedLayout().height).toBe(20);
-
- expect(root_child0_child0.getComputedLayout().left).toBe(0);
- expect(root_child0_child0.getComputedLayout().top).toBe(0);
- expect(root_child0_child0.getComputedLayout().width).toBe(100);
- expect(root_child0_child0.getComputedLayout().height).toBe(20);
- });
-
- test('flex_grow_within_constrained_max_width', () => {
- const root = Yoga.Node.create();
- root.setWidth(200);
- root.setHeight(100);
-
- const root_child0 = Yoga.Node.create();
- root_child0.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root_child0.setMaxWidth(300);
- root.insertChild(root_child0, 0);
-
- const root_child0_child0 = Yoga.Node.create();
- root_child0_child0.setFlexGrow(1);
- root_child0_child0.setHeight(20);
- root_child0.insertChild(root_child0_child0, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(root_child0.getComputedLayout().left).toBe(0);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(200);
- expect(root_child0.getComputedLayout().height).toBe(20);
-
- expect(root_child0_child0.getComputedLayout().left).toBe(0);
- expect(root_child0_child0.getComputedLayout().top).toBe(0);
- expect(root_child0_child0.getComputedLayout().width).toBe(200);
- expect(root_child0_child0.getComputedLayout().height).toBe(20);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(root_child0.getComputedLayout().left).toBe(0);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(200);
- expect(root_child0.getComputedLayout().height).toBe(20);
-
- expect(root_child0_child0.getComputedLayout().left).toBe(0);
- expect(root_child0_child0.getComputedLayout().top).toBe(0);
- expect(root_child0_child0.getComputedLayout().width).toBe(200);
- expect(root_child0_child0.getComputedLayout().height).toBe(20);
- });
-
- test('flex_root_ignored', () => {
- const root = Yoga.Node.create();
- root.setFlexGrow(1);
- root.setWidth(100);
- root.setMinHeight(100);
- root.setMaxHeight(500);
-
- const root_child0 = Yoga.Node.create();
- root_child0.setFlexGrow(1);
- root_child0.setFlexBasis(200);
- root.insertChild(root_child0, 0);
-
- const root_child1 = Yoga.Node.create();
- root_child1.setHeight(100);
- root.insertChild(root_child1, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(300);
-
- expect(root_child0.getComputedLayout().left).toBe(0);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(100);
- expect(root_child0.getComputedLayout().height).toBe(200);
-
- expect(root_child1.getComputedLayout().left).toBe(0);
- expect(root_child1.getComputedLayout().top).toBe(200);
- expect(root_child1.getComputedLayout().width).toBe(100);
- expect(root_child1.getComputedLayout().height).toBe(100);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(300);
-
- expect(root_child0.getComputedLayout().left).toBe(0);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(100);
- expect(root_child0.getComputedLayout().height).toBe(200);
-
- expect(root_child1.getComputedLayout().left).toBe(0);
- expect(root_child1.getComputedLayout().top).toBe(200);
- expect(root_child1.getComputedLayout().width).toBe(100);
- expect(root_child1.getComputedLayout().height).toBe(100);
- });
-
- test('flex_grow_root_minimized', () => {
- const root = Yoga.Node.create();
- root.setWidth(100);
- root.setMinHeight(100);
- root.setMaxHeight(500);
-
- const root_child0 = Yoga.Node.create();
- root_child0.setFlexGrow(1);
- root_child0.setMinHeight(100);
- root_child0.setMaxHeight(500);
- root.insertChild(root_child0, 0);
-
- const root_child0_child0 = Yoga.Node.create();
- root_child0_child0.setFlexGrow(1);
- root_child0_child0.setFlexBasis(200);
- root_child0.insertChild(root_child0_child0, 0);
-
- const root_child0_child1 = Yoga.Node.create();
- root_child0_child1.setHeight(100);
- root_child0.insertChild(root_child0_child1, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(300);
-
- expect(root_child0.getComputedLayout().left).toBe(0);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(100);
- expect(root_child0.getComputedLayout().height).toBe(300);
-
- expect(root_child0_child0.getComputedLayout().left).toBe(0);
- expect(root_child0_child0.getComputedLayout().top).toBe(0);
- expect(root_child0_child0.getComputedLayout().width).toBe(100);
- expect(root_child0_child0.getComputedLayout().height).toBe(200);
-
- expect(root_child0_child1.getComputedLayout().left).toBe(0);
- expect(root_child0_child1.getComputedLayout().top).toBe(200);
- expect(root_child0_child1.getComputedLayout().width).toBe(100);
- expect(root_child0_child1.getComputedLayout().height).toBe(100);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(300);
-
- expect(root_child0.getComputedLayout().left).toBe(0);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(100);
- expect(root_child0.getComputedLayout().height).toBe(300);
-
- expect(root_child0_child0.getComputedLayout().left).toBe(0);
- expect(root_child0_child0.getComputedLayout().top).toBe(0);
- expect(root_child0_child0.getComputedLayout().width).toBe(100);
- expect(root_child0_child0.getComputedLayout().height).toBe(200);
-
- expect(root_child0_child1.getComputedLayout().left).toBe(0);
- expect(root_child0_child1.getComputedLayout().top).toBe(200);
- expect(root_child0_child1.getComputedLayout().width).toBe(100);
- expect(root_child0_child1.getComputedLayout().height).toBe(100);
- });
-
- test('flex_grow_height_maximized', () => {
- const root = Yoga.Node.create();
- root.setWidth(100);
- root.setHeight(500);
-
- const root_child0 = Yoga.Node.create();
- root_child0.setFlexGrow(1);
- root_child0.setMinHeight(100);
- root_child0.setMaxHeight(500);
- root.insertChild(root_child0, 0);
-
- const root_child0_child0 = Yoga.Node.create();
- root_child0_child0.setFlexGrow(1);
- root_child0_child0.setFlexBasis(200);
- root_child0.insertChild(root_child0_child0, 0);
-
- const root_child0_child1 = Yoga.Node.create();
- root_child0_child1.setHeight(100);
- root_child0.insertChild(root_child0_child1, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(500);
-
- expect(root_child0.getComputedLayout().left).toBe(0);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(100);
- expect(root_child0.getComputedLayout().height).toBe(500);
-
- expect(root_child0_child0.getComputedLayout().left).toBe(0);
- expect(root_child0_child0.getComputedLayout().top).toBe(0);
- expect(root_child0_child0.getComputedLayout().width).toBe(100);
- expect(root_child0_child0.getComputedLayout().height).toBe(400);
-
- expect(root_child0_child1.getComputedLayout().left).toBe(0);
- expect(root_child0_child1.getComputedLayout().top).toBe(400);
- expect(root_child0_child1.getComputedLayout().width).toBe(100);
- expect(root_child0_child1.getComputedLayout().height).toBe(100);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(500);
-
- expect(root_child0.getComputedLayout().left).toBe(0);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(100);
- expect(root_child0.getComputedLayout().height).toBe(500);
-
- expect(root_child0_child0.getComputedLayout().left).toBe(0);
- expect(root_child0_child0.getComputedLayout().top).toBe(0);
- expect(root_child0_child0.getComputedLayout().width).toBe(100);
- expect(root_child0_child0.getComputedLayout().height).toBe(400);
-
- expect(root_child0_child1.getComputedLayout().left).toBe(0);
- expect(root_child0_child1.getComputedLayout().top).toBe(400);
- expect(root_child0_child1.getComputedLayout().width).toBe(100);
- expect(root_child0_child1.getComputedLayout().height).toBe(100);
- });
-
- test('flex_grow_within_constrained_min_row', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setMinWidth(100);
- root.setHeight(100);
-
- const root_child0 = Yoga.Node.create();
- root_child0.setFlexGrow(1);
- root.insertChild(root_child0, 0);
-
- const root_child1 = Yoga.Node.create();
- root_child1.setWidth(50);
- root.insertChild(root_child1, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(root_child0.getComputedLayout().left).toBe(0);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(50);
- expect(root_child0.getComputedLayout().height).toBe(100);
-
- expect(root_child1.getComputedLayout().left).toBe(50);
- expect(root_child1.getComputedLayout().top).toBe(0);
- expect(root_child1.getComputedLayout().width).toBe(50);
- expect(root_child1.getComputedLayout().height).toBe(100);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(root_child0.getComputedLayout().left).toBe(50);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(50);
- expect(root_child0.getComputedLayout().height).toBe(100);
-
- expect(root_child1.getComputedLayout().left).toBe(0);
- expect(root_child1.getComputedLayout().top).toBe(0);
- expect(root_child1.getComputedLayout().width).toBe(50);
- expect(root_child1.getComputedLayout().height).toBe(100);
- });
-
- test('flex_grow_within_constrained_min_column', () => {
- const root = Yoga.Node.create();
- root.setMinHeight(100);
-
- const root_child0 = Yoga.Node.create();
- root_child0.setFlexGrow(1);
- root.insertChild(root_child0, 0);
-
- const root_child1 = Yoga.Node.create();
- root_child1.setHeight(50);
- root.insertChild(root_child1, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(0);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(root_child0.getComputedLayout().left).toBe(0);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(0);
- expect(root_child0.getComputedLayout().height).toBe(50);
-
- expect(root_child1.getComputedLayout().left).toBe(0);
- expect(root_child1.getComputedLayout().top).toBe(50);
- expect(root_child1.getComputedLayout().width).toBe(0);
- expect(root_child1.getComputedLayout().height).toBe(50);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(0);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(root_child0.getComputedLayout().left).toBe(0);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(0);
- expect(root_child0.getComputedLayout().height).toBe(50);
-
- expect(root_child1.getComputedLayout().left).toBe(0);
- expect(root_child1.getComputedLayout().top).toBe(50);
- expect(root_child1.getComputedLayout().width).toBe(0);
- expect(root_child1.getComputedLayout().height).toBe(50);
- });
-
- test('flex_grow_within_constrained_max_row', () => {
- const root = Yoga.Node.create();
- root.setWidth(200);
-
- const root_child0 = Yoga.Node.create();
- root_child0.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root_child0.setMaxWidth(100);
- root_child0.setHeight(100);
- root.insertChild(root_child0, 0);
-
- const root_child0_child0 = Yoga.Node.create();
- root_child0_child0.setFlexShrink(1);
- root_child0_child0.setFlexBasis(100);
- root_child0.insertChild(root_child0_child0, 0);
-
- const root_child0_child1 = Yoga.Node.create();
- root_child0_child1.setWidth(50);
- root_child0.insertChild(root_child0_child1, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(root_child0.getComputedLayout().left).toBe(0);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(100);
- expect(root_child0.getComputedLayout().height).toBe(100);
-
- expect(root_child0_child0.getComputedLayout().left).toBe(0);
- expect(root_child0_child0.getComputedLayout().top).toBe(0);
- expect(root_child0_child0.getComputedLayout().width).toBe(50);
- expect(root_child0_child0.getComputedLayout().height).toBe(100);
-
- expect(root_child0_child1.getComputedLayout().left).toBe(50);
- expect(root_child0_child1.getComputedLayout().top).toBe(0);
- expect(root_child0_child1.getComputedLayout().width).toBe(50);
- expect(root_child0_child1.getComputedLayout().height).toBe(100);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(root_child0.getComputedLayout().left).toBe(100);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(100);
- expect(root_child0.getComputedLayout().height).toBe(100);
-
- expect(root_child0_child0.getComputedLayout().left).toBe(50);
- expect(root_child0_child0.getComputedLayout().top).toBe(0);
- expect(root_child0_child0.getComputedLayout().width).toBe(50);
- expect(root_child0_child0.getComputedLayout().height).toBe(100);
-
- expect(root_child0_child1.getComputedLayout().left).toBe(0);
- expect(root_child0_child1.getComputedLayout().top).toBe(0);
- expect(root_child0_child1.getComputedLayout().width).toBe(50);
- expect(root_child0_child1.getComputedLayout().height).toBe(100);
- });
-
- test('flex_grow_within_constrained_max_column', () => {
- const root = Yoga.Node.create();
- root.setWidth(100);
- root.setMaxHeight(100);
-
- const root_child0 = Yoga.Node.create();
- root_child0.setFlexShrink(1);
- root_child0.setFlexBasis(100);
- root.insertChild(root_child0, 0);
-
- const root_child1 = Yoga.Node.create();
- root_child1.setHeight(50);
- root.insertChild(root_child1, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(root_child0.getComputedLayout().left).toBe(0);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(100);
- expect(root_child0.getComputedLayout().height).toBe(50);
-
- expect(root_child1.getComputedLayout().left).toBe(0);
- expect(root_child1.getComputedLayout().top).toBe(50);
- expect(root_child1.getComputedLayout().width).toBe(100);
- expect(root_child1.getComputedLayout().height).toBe(50);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(root_child0.getComputedLayout().left).toBe(0);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(100);
- expect(root_child0.getComputedLayout().height).toBe(50);
-
- expect(root_child1.getComputedLayout().left).toBe(0);
- expect(root_child1.getComputedLayout().top).toBe(50);
- expect(root_child1.getComputedLayout().width).toBe(100);
- expect(root_child1.getComputedLayout().height).toBe(50);
- });
-
- test('child_min_max_width_flexing', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setWidth(120);
- root.setHeight(50);
-
- const root_child0 = Yoga.Node.create();
- root_child0.setFlexGrow(1);
- root_child0.setFlexBasis(0);
- root_child0.setMinWidth(60);
- root.insertChild(root_child0, 0);
-
- const root_child1 = Yoga.Node.create();
- root_child1.setFlexGrow(1);
- root_child1.setFlexBasisPercent(50);
- root_child1.setMaxWidth(20);
- root.insertChild(root_child1, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(120);
- expect(root.getComputedLayout().height).toBe(50);
-
- expect(root_child0.getComputedLayout().left).toBe(0);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(100);
- expect(root_child0.getComputedLayout().height).toBe(50);
-
- expect(root_child1.getComputedLayout().left).toBe(100);
- expect(root_child1.getComputedLayout().top).toBe(0);
- expect(root_child1.getComputedLayout().width).toBe(20);
- expect(root_child1.getComputedLayout().height).toBe(50);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(120);
- expect(root.getComputedLayout().height).toBe(50);
-
- expect(root_child0.getComputedLayout().left).toBe(20);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(100);
- expect(root_child0.getComputedLayout().height).toBe(50);
-
- expect(root_child1.getComputedLayout().left).toBe(0);
- expect(root_child1.getComputedLayout().top).toBe(0);
- expect(root_child1.getComputedLayout().width).toBe(20);
- expect(root_child1.getComputedLayout().height).toBe(50);
- });
-
- test('min_width_overrides_width', () => {
- const root = Yoga.Node.create();
- root.setWidth(50);
- root.setMinWidth(100);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(0);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(0);
- });
-
- test('max_width_overrides_width', () => {
- const root = Yoga.Node.create();
- root.setWidth(200);
- root.setMaxWidth(100);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(0);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(0);
- });
-
- test('min_height_overrides_height', () => {
- const root = Yoga.Node.create();
- root.setHeight(50);
- root.setMinHeight(100);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(0);
- expect(root.getComputedLayout().height).toBe(100);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(0);
- expect(root.getComputedLayout().height).toBe(100);
- });
-
- test('max_height_overrides_height', () => {
- const root = Yoga.Node.create();
- root.setHeight(200);
- root.setMaxHeight(100);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(0);
- expect(root.getComputedLayout().height).toBe(100);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(0);
- expect(root.getComputedLayout().height).toBe(100);
- });
-
- test('min_max_percent_no_width_height', () => {
- const root = Yoga.Node.create();
- root.setAlignItems(Yoga.ALIGN_FLEX_START);
- root.setWidth(100);
- root.setHeight(100);
-
- const root_child0 = Yoga.Node.create();
- root_child0.setMinWidthPercent(10);
- root_child0.setMaxWidthPercent(10);
- root_child0.setMinHeightPercent(10);
- root_child0.setMaxHeightPercent(10);
- root.insertChild(root_child0, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(root_child0.getComputedLayout().left).toBe(0);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(10);
- expect(root_child0.getComputedLayout().height).toBe(10);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(root_child0.getComputedLayout().left).toBe(90);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(10);
- expect(root_child0.getComputedLayout().height).toBe(10);
- });
-});
diff --git a/packages/yoga/tests/misc.test.js b/packages/yoga/tests/misc.test.js
deleted file mode 100644
index 350c4319a..000000000
--- a/packages/yoga/tests/misc.test.js
+++ /dev/null
@@ -1,54 +0,0 @@
-const Yoga = require('..');
-
-describe('Misc', () => {
- let yogaNode;
- let flexboxNode;
-
- beforeEach(() => {
- yogaNode = Yoga.Node.createDefault();
- flexboxNode = Yoga.Node.createDefault();
- });
-
- test('should have same display by default', () => {
- expect(yogaNode.getDisplay()).toEqual(flexboxNode.getDisplay());
- });
-
- test('should have same overflow by default', () => {
- expect(yogaNode.getOverflow()).toEqual(flexboxNode.getOverflow());
- });
-
- test('should set display flex', () => {
- yogaNode.setDisplay(Yoga.DISPLAY_FLEX);
- flexboxNode.setDisplay(Yoga.DISPLAY_FLEX);
-
- expect(yogaNode.getDisplay()).toEqual(flexboxNode.getDisplay());
- });
-
- test('should set display none', () => {
- yogaNode.setDisplay(Yoga.DISPLAY_NONE);
- flexboxNode.setDisplay(Yoga.DISPLAY_NONE);
-
- expect(yogaNode.getDisplay()).toEqual(flexboxNode.getDisplay());
- });
-
- test('should set overflow visible', () => {
- yogaNode.setOverflow(Yoga.OVERFLOW_VISIBLE);
- flexboxNode.setOverflow(Yoga.OVERFLOW_VISIBLE);
-
- expect(yogaNode.getOverflow()).toEqual(flexboxNode.getOverflow());
- });
-
- test('should set overflow hidden', () => {
- yogaNode.setOverflow(Yoga.OVERFLOW_HIDDEN);
- flexboxNode.setOverflow(Yoga.OVERFLOW_HIDDEN);
-
- expect(yogaNode.getOverflow()).toEqual(flexboxNode.getOverflow());
- });
-
- test('should set overflow scroll', () => {
- yogaNode.setOverflow(Yoga.OVERFLOW_SCROLL);
- flexboxNode.setOverflow(Yoga.OVERFLOW_SCROLL);
-
- expect(yogaNode.getOverflow()).toEqual(flexboxNode.getOverflow());
- });
-});
diff --git a/packages/yoga/tests/nodeChild.test.js b/packages/yoga/tests/nodeChild.test.js
deleted file mode 100644
index 259de5fc0..000000000
--- a/packages/yoga/tests/nodeChild.test.js
+++ /dev/null
@@ -1,26 +0,0 @@
-const Yoga = require('..');
-
-describe('Node child', () => {
- test('reset_layout_when_child_removed', () => {
- const root = Yoga.Node.create();
-
- const child0 = Yoga.Node.create();
- child0.setWidth(100);
- child0.setHeight(100);
- root.insertChild(child0, 0);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBe(100);
- expect(child0.getComputedLayout().height).toBe(100);
-
- root.removeChild(child0);
-
- expect(child0.getComputedLayout().left).toBe(0);
- expect(child0.getComputedLayout().top).toBe(0);
- expect(child0.getComputedLayout().width).toBeFalsy();
- expect(child0.getComputedLayout().height).toBeFalsy();
- });
-});
diff --git a/packages/yoga/tests/padding.test.js b/packages/yoga/tests/padding.test.js
deleted file mode 100644
index 0d6a056c7..000000000
--- a/packages/yoga/tests/padding.test.js
+++ /dev/null
@@ -1,429 +0,0 @@
-const Yoga = require('..');
-
-describe('Paddings', () => {
- let yogaNode;
- let flexboxNode;
-
- beforeEach(() => {
- yogaNode = Yoga.Node.createDefault();
- flexboxNode = Yoga.Node.createDefault();
- });
-
- test('should have same top padding by default', () => {
- expect(yogaNode.getPadding(Yoga.EDGE_TOP)).toEqual(
- flexboxNode.getPadding(Yoga.EDGE_TOP),
- );
- });
-
- test('should have same left padding by default', () => {
- expect(yogaNode.getPadding(Yoga.EDGE_LEFT)).toEqual(
- flexboxNode.getPadding(Yoga.EDGE_LEFT),
- );
- });
-
- test('should have same bottom padding by default', () => {
- expect(yogaNode.getPadding(Yoga.EDGE_BOTTOM)).toEqual(
- flexboxNode.getPadding(Yoga.EDGE_BOTTOM),
- );
- });
-
- test('should have same right padding by default', () => {
- expect(yogaNode.getPadding(Yoga.EDGE_RIGHT)).toEqual(
- flexboxNode.getPadding(Yoga.EDGE_RIGHT),
- );
- });
-
- test('should have same vertical padding by default', () => {
- expect(yogaNode.getPadding(Yoga.EDGE_VERTICAL)).toEqual(
- flexboxNode.getPadding(Yoga.EDGE_VERTICAL),
- );
- });
-
- test('should have same horizontal padding by default', () => {
- expect(yogaNode.getPadding(Yoga.EDGE_HORIZONTAL)).toEqual(
- flexboxNode.getPadding(Yoga.EDGE_HORIZONTAL),
- );
- });
-
- test('should have same start padding by default', () => {
- expect(yogaNode.getPadding(Yoga.EDGE_START)).toEqual(
- flexboxNode.getPadding(Yoga.EDGE_START),
- );
- });
-
- test('should have same end padding by default', () => {
- expect(yogaNode.getPadding(Yoga.EDGE_END)).toEqual(
- flexboxNode.getPadding(Yoga.EDGE_END),
- );
- });
-
- test('should have same all padding by default', () => {
- expect(yogaNode.getPadding(Yoga.EDGE_ALL)).toEqual(
- flexboxNode.getPadding(Yoga.EDGE_ALL),
- );
- });
-
- test('should set top padding', () => {
- yogaNode.setPadding(Yoga.EDGE_TOP, 5);
- flexboxNode.setPadding(Yoga.EDGE_TOP, 5);
-
- expect(yogaNode.getPadding(Yoga.EDGE_TOP)).toEqual(
- flexboxNode.getPadding(Yoga.EDGE_TOP),
- );
- });
-
- test('should set left padding', () => {
- yogaNode.setPadding(Yoga.EDGE_LEFT, 5);
- flexboxNode.setPadding(Yoga.EDGE_LEFT, 5);
-
- expect(yogaNode.getPadding(Yoga.EDGE_LEFT)).toEqual(
- flexboxNode.getPadding(Yoga.EDGE_LEFT),
- );
- });
-
- test('should set bottom padding', () => {
- yogaNode.setPadding(Yoga.EDGE_BOTTOM, 5);
- flexboxNode.setPadding(Yoga.EDGE_BOTTOM, 5);
-
- expect(yogaNode.getPadding(Yoga.EDGE_BOTTOM)).toEqual(
- flexboxNode.getPadding(Yoga.EDGE_BOTTOM),
- );
- });
-
- test('should set right padding', () => {
- yogaNode.setPadding(Yoga.EDGE_RIGHT, 5);
- flexboxNode.setPadding(Yoga.EDGE_RIGHT, 5);
-
- expect(yogaNode.getPadding(Yoga.EDGE_RIGHT)).toEqual(
- flexboxNode.getPadding(Yoga.EDGE_RIGHT),
- );
- });
-
- test('should set vertical padding', () => {
- yogaNode.setPadding(Yoga.EDGE_VERTICAL, 5);
- flexboxNode.setPadding(Yoga.EDGE_VERTICAL, 5);
-
- expect(yogaNode.getPadding(Yoga.EDGE_VERTICAL)).toEqual(
- flexboxNode.getPadding(Yoga.EDGE_VERTICAL),
- );
- });
-
- test('should set horizontal padding', () => {
- yogaNode.setPadding(Yoga.EDGE_HORIZONTAL, 5);
- flexboxNode.setPadding(Yoga.EDGE_HORIZONTAL, 5);
-
- expect(yogaNode.getPadding(Yoga.EDGE_HORIZONTAL)).toEqual(
- flexboxNode.getPadding(Yoga.EDGE_HORIZONTAL),
- );
- });
-
- test('should set start padding', () => {
- yogaNode.setPadding(Yoga.EDGE_START, 5);
- flexboxNode.setPadding(Yoga.EDGE_START, 5);
-
- expect(yogaNode.getPadding(Yoga.EDGE_START)).toEqual(
- flexboxNode.getPadding(Yoga.EDGE_START),
- );
- });
-
- test('should set end padding', () => {
- yogaNode.setPadding(Yoga.EDGE_END, 5);
- flexboxNode.setPadding(Yoga.EDGE_END, 5);
-
- expect(yogaNode.getPadding(Yoga.EDGE_END)).toEqual(
- flexboxNode.getPadding(Yoga.EDGE_END),
- );
- });
-
- test('should set all padding', () => {
- yogaNode.setPadding(Yoga.EDGE_ALL, 5);
- flexboxNode.setPadding(Yoga.EDGE_ALL, 5);
-
- expect(yogaNode.getPadding(Yoga.EDGE_ALL)).toEqual(
- flexboxNode.getPadding(Yoga.EDGE_ALL),
- );
- });
-
- test('should set top percent padding', () => {
- yogaNode.setPaddingPercent(Yoga.EDGE_TOP, 5);
- flexboxNode.setPaddingPercent(Yoga.EDGE_TOP, 5);
-
- expect(yogaNode.getPadding(Yoga.EDGE_TOP)).toEqual(
- flexboxNode.getPadding(Yoga.EDGE_TOP),
- );
- });
-
- test('should set left percent padding', () => {
- yogaNode.setPaddingPercent(Yoga.EDGE_LEFT, 5);
- flexboxNode.setPaddingPercent(Yoga.EDGE_LEFT, 5);
-
- expect(yogaNode.getPadding(Yoga.EDGE_LEFT)).toEqual(
- flexboxNode.getPadding(Yoga.EDGE_LEFT),
- );
- });
-
- test('should set bottom percent padding', () => {
- yogaNode.setPaddingPercent(Yoga.EDGE_BOTTOM, 5);
- flexboxNode.setPaddingPercent(Yoga.EDGE_BOTTOM, 5);
-
- expect(yogaNode.getPadding(Yoga.EDGE_BOTTOM)).toEqual(
- flexboxNode.getPadding(Yoga.EDGE_BOTTOM),
- );
- });
-
- test('should set right percent padding', () => {
- yogaNode.setPaddingPercent(Yoga.EDGE_RIGHT, 5);
- flexboxNode.setPaddingPercent(Yoga.EDGE_RIGHT, 5);
-
- expect(yogaNode.getPadding(Yoga.EDGE_RIGHT)).toEqual(
- flexboxNode.getPadding(Yoga.EDGE_RIGHT),
- );
- });
-
- test('should set vertical percent padding', () => {
- yogaNode.setPaddingPercent(Yoga.EDGE_VERTICAL, 5);
- flexboxNode.setPaddingPercent(Yoga.EDGE_VERTICAL, 5);
-
- expect(yogaNode.getPadding(Yoga.EDGE_VERTICAL)).toEqual(
- flexboxNode.getPadding(Yoga.EDGE_VERTICAL),
- );
- });
-
- test('should set horizontal percent padding', () => {
- yogaNode.setPaddingPercent(Yoga.EDGE_HORIZONTAL, 5);
- flexboxNode.setPaddingPercent(Yoga.EDGE_HORIZONTAL, 5);
-
- expect(yogaNode.getPadding(Yoga.EDGE_HORIZONTAL)).toEqual(
- flexboxNode.getPadding(Yoga.EDGE_HORIZONTAL),
- );
- });
-
- test('should set start percent padding', () => {
- yogaNode.setPaddingPercent(Yoga.EDGE_START, 5);
- flexboxNode.setPaddingPercent(Yoga.EDGE_START, 5);
-
- expect(yogaNode.getPadding(Yoga.EDGE_START)).toEqual(
- flexboxNode.getPadding(Yoga.EDGE_START),
- );
- });
-
- test('should set end percent padding', () => {
- yogaNode.setPaddingPercent(Yoga.EDGE_END, 5);
- flexboxNode.setPaddingPercent(Yoga.EDGE_END, 5);
-
- expect(yogaNode.getPadding(Yoga.EDGE_END)).toEqual(
- flexboxNode.getPadding(Yoga.EDGE_END),
- );
- });
-
- test('padding_no_size', () => {
- const root = Yoga.Node.create()
- root.setPadding(Yoga.EDGE_LEFT, 10);
- root.setPadding(Yoga.EDGE_TOP, 10);
- root.setPadding(Yoga.EDGE_RIGHT, 10);
- root.setPadding(Yoga.EDGE_BOTTOM, 10);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(20);
- expect(root.getComputedLayout().height).toBe(20);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(20);
- expect(root.getComputedLayout().height).toBe(20);
- });
-
- test('padding_container_match_child', () => {
- const root = Yoga.Node.create()
- root.setPadding(Yoga.EDGE_LEFT, 10);
- root.setPadding(Yoga.EDGE_TOP, 10);
- root.setPadding(Yoga.EDGE_RIGHT, 10);
- root.setPadding(Yoga.EDGE_BOTTOM, 10);
-
- const rootChild0 = Yoga.Node.create()
- rootChild0.setWidth(10);
- rootChild0.setHeight(10);
- root.insertChild(rootChild0, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(30);
- expect(root.getComputedLayout().height).toBe(30);
-
- expect(rootChild0.getComputedLayout().left).toBe(10);
- expect(rootChild0.getComputedLayout().top).toBe(10);
- expect(rootChild0.getComputedLayout().width).toBe(10);
- expect(rootChild0.getComputedLayout().height).toBe(10);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(30);
- expect(root.getComputedLayout().height).toBe(30);
-
- expect(rootChild0.getComputedLayout().left).toBe(10);
- expect(rootChild0.getComputedLayout().top).toBe(10);
- expect(rootChild0.getComputedLayout().width).toBe(10);
- expect(rootChild0.getComputedLayout().height).toBe(10);
- });
-
- test('padding_flex_child', () => {
- const root = Yoga.Node.create()
- root.setPadding(Yoga.EDGE_LEFT, 10);
- root.setPadding(Yoga.EDGE_TOP, 10);
- root.setPadding(Yoga.EDGE_RIGHT, 10);
- root.setPadding(Yoga.EDGE_BOTTOM, 10);
- root.setWidth(100);
- root.setHeight(100);
-
- const rootChild0 = Yoga.Node.create()
- rootChild0.setFlexGrow(1);
- rootChild0.setWidth(10);
- root.insertChild(rootChild0, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(rootChild0.getComputedLayout().left).toBe(10);
- expect(rootChild0.getComputedLayout().top).toBe(10);
- expect(rootChild0.getComputedLayout().width).toBe(10);
- expect(rootChild0.getComputedLayout().height).toBe(80);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(rootChild0.getComputedLayout().left).toBe(80);
- expect(rootChild0.getComputedLayout().top).toBe(10);
- expect(rootChild0.getComputedLayout().width).toBe(10);
- expect(rootChild0.getComputedLayout().height).toBe(80);
- });
-
- test('padding_stretch_child', () => {
- const root = Yoga.Node.create()
- root.setPadding(Yoga.EDGE_LEFT, 10);
- root.setPadding(Yoga.EDGE_TOP, 10);
- root.setPadding(Yoga.EDGE_RIGHT, 10);
- root.setPadding(Yoga.EDGE_BOTTOM, 10);
- root.setWidth(100);
- root.setHeight(100);
-
- const rootChild0 = Yoga.Node.create()
- rootChild0.setHeight(10);
- root.insertChild(rootChild0, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(rootChild0.getComputedLayout().left).toBe(10);
- expect(rootChild0.getComputedLayout().top).toBe(10);
- expect(rootChild0.getComputedLayout().width).toBe(80);
- expect(rootChild0.getComputedLayout().height).toBe(10);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(rootChild0.getComputedLayout().left).toBe(10);
- expect(rootChild0.getComputedLayout().top).toBe(10);
- expect(rootChild0.getComputedLayout().width).toBe(80);
- expect(rootChild0.getComputedLayout().height).toBe(10);
- });
-
- test('padding_center_child', () => {
- const root = Yoga.Node.create()
- root.setJustifyContent(Yoga.JUSTIFY_CENTER);
- root.setAlignItems(Yoga.ALIGN_CENTER);
- root.setPadding(Yoga.EDGE_START, 10);
- root.setPadding(Yoga.EDGE_END, 20);
- root.setPadding(Yoga.EDGE_BOTTOM, 20);
- root.setWidth(100);
- root.setHeight(100);
-
- const rootChild0 = Yoga.Node.create()
- rootChild0.setWidth(10);
- rootChild0.setHeight(10);
- root.insertChild(rootChild0, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(rootChild0.getComputedLayout().left).toBe(40);
- expect(rootChild0.getComputedLayout().top).toBe(35);
- expect(rootChild0.getComputedLayout().width).toBe(10);
- expect(rootChild0.getComputedLayout().height).toBe(10);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(100);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(rootChild0.getComputedLayout().left).toBe(50);
- expect(rootChild0.getComputedLayout().top).toBe(35);
- expect(rootChild0.getComputedLayout().width).toBe(10);
- expect(rootChild0.getComputedLayout().height).toBe(10);
- });
-
- test('child_with_padding_align_end', () => {
- const root = Yoga.Node.create()
- root.setJustifyContent(Yoga.JUSTIFY_FLEX_END);
- root.setAlignItems(Yoga.ALIGN_FLEX_END);
- root.setWidth(200);
- root.setHeight(200);
-
- const rootChild0 = Yoga.Node.create()
- rootChild0.setPadding(Yoga.EDGE_LEFT, 20);
- rootChild0.setPadding(Yoga.EDGE_TOP, 20);
- rootChild0.setPadding(Yoga.EDGE_RIGHT, 20);
- rootChild0.setPadding(Yoga.EDGE_BOTTOM, 20);
- rootChild0.setWidth(100);
- rootChild0.setHeight(100);
- root.insertChild(rootChild0, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(rootChild0.getComputedLayout().left).toBe(100);
- expect(rootChild0.getComputedLayout().top).toBe(100);
- expect(rootChild0.getComputedLayout().width).toBe(100);
- expect(rootChild0.getComputedLayout().height).toBe(100);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(rootChild0.getComputedLayout().left).toBe(0);
- expect(rootChild0.getComputedLayout().top).toBe(100);
- expect(rootChild0.getComputedLayout().width).toBe(100);
- expect(rootChild0.getComputedLayout().height).toBe(100);
- });
-});
diff --git a/packages/yoga/tests/percentage.test.js b/packages/yoga/tests/percentage.test.js
deleted file mode 100644
index 9acd42bdf..000000000
--- a/packages/yoga/tests/percentage.test.js
+++ /dev/null
@@ -1,1066 +0,0 @@
-const Yoga = require('..');
-
-describe('Percentage', () => {
- test('percentage_width_height', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setWidth(200);
- root.setHeight(200);
-
- const root_child0 = Yoga.Node.create();
- root_child0.setWidthPercent(30);
- root_child0.setHeightPercent(30);
- root.insertChild(root_child0, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(root_child0.getComputedLayout().left).toBe(0);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(60);
- expect(root_child0.getComputedLayout().height).toBe(60);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(root_child0.getComputedLayout().left).toBe(140);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(60);
- expect(root_child0.getComputedLayout().height).toBe(60);
- });
-
- test('percentage_position_left_top', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setWidth(400);
- root.setHeight(400);
-
- const root_child0 = Yoga.Node.create();
- root_child0.setPositionPercent(Yoga.EDGE_LEFT, 10);
- root_child0.setPositionPercent(Yoga.EDGE_TOP, 20);
- root_child0.setWidthPercent(45);
- root_child0.setHeightPercent(55);
- root.insertChild(root_child0, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(400);
- expect(root.getComputedLayout().height).toBe(400);
-
- expect(root_child0.getComputedLayout().left).toBe(40);
- expect(root_child0.getComputedLayout().top).toBe(80);
- expect(root_child0.getComputedLayout().width).toBe(180);
- expect(root_child0.getComputedLayout().height).toBe(220);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(400);
- expect(root.getComputedLayout().height).toBe(400);
-
- expect(root_child0.getComputedLayout().left).toBe(260);
- expect(root_child0.getComputedLayout().top).toBe(80);
- expect(root_child0.getComputedLayout().width).toBe(180);
- expect(root_child0.getComputedLayout().height).toBe(220);
- });
-
- test('percentage_position_bottom_right', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setWidth(500);
- root.setHeight(500);
-
- const root_child0 = Yoga.Node.create();
- root_child0.setPositionPercent(Yoga.EDGE_RIGHT, 20);
- root_child0.setPositionPercent(Yoga.EDGE_BOTTOM, 10);
- root_child0.setWidthPercent(55);
- root_child0.setHeightPercent(15);
- root.insertChild(root_child0, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(500);
- expect(root.getComputedLayout().height).toBe(500);
-
- expect( root_child0.getComputedLayout().left).toBe(-100);
- expect( root_child0.getComputedLayout().top).toBe(-50);
- expect(root_child0.getComputedLayout().width).toBe(275);
- expect(root_child0.getComputedLayout().height).toBe(75);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(500);
- expect(root.getComputedLayout().height).toBe(500);
-
- expect(root_child0.getComputedLayout().left).toBe(125);
- expect( root_child0.getComputedLayout().top).toBe(-50);
- expect(root_child0.getComputedLayout().width).toBe(275);
- expect(root_child0.getComputedLayout().height).toBe(75);
- });
-
- test('percentage_flex_basis', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setWidth(200);
- root.setHeight(200);
-
- const root_child0 = Yoga.Node.create();
- root_child0.setFlexGrow(1);
- root_child0.setFlexBasisPercent(50);
- root.insertChild(root_child0, 0);
-
- const root_child1 = Yoga.Node.create();
- root_child1.setFlexGrow(1);
- root_child1.setFlexBasisPercent(25);
- root.insertChild(root_child1, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(root_child0.getComputedLayout().left).toBe(0);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(125);
- expect(root_child0.getComputedLayout().height).toBe(200);
-
- expect(root_child1.getComputedLayout().left).toBe(125);
- expect(root_child1.getComputedLayout().top).toBe(0);
- expect(root_child1.getComputedLayout().width).toBe(75);
- expect(root_child1.getComputedLayout().height).toBe(200);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(root_child0.getComputedLayout().left).toBe(75);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(125);
- expect(root_child0.getComputedLayout().height).toBe(200);
-
- expect(root_child1.getComputedLayout().left).toBe(0);
- expect(root_child1.getComputedLayout().top).toBe(0);
- expect(root_child1.getComputedLayout().width).toBe(75);
- expect(root_child1.getComputedLayout().height).toBe(200);
- });
-
- test('percentage_flex_basis_cross', () => {
- const root = Yoga.Node.create();
- root.setWidth(200);
- root.setHeight(200);
-
- const root_child0 = Yoga.Node.create();
- root_child0.setFlexGrow(1);
- root_child0.setFlexBasisPercent(50);
- root.insertChild(root_child0, 0);
-
- const root_child1 = Yoga.Node.create();
- root_child1.setFlexGrow(1);
- root_child1.setFlexBasisPercent(25);
- root.insertChild(root_child1, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(root_child0.getComputedLayout().left).toBe(0);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(200);
- expect(root_child0.getComputedLayout().height).toBe(125);
-
- expect(root_child1.getComputedLayout().left).toBe(0);
- expect(root_child1.getComputedLayout().top).toBe(125);
- expect(root_child1.getComputedLayout().width).toBe(200);
- expect(root_child1.getComputedLayout().height).toBe(75);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(root_child0.getComputedLayout().left).toBe(0);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(200);
- expect(root_child0.getComputedLayout().height).toBe(125);
-
- expect(root_child1.getComputedLayout().left).toBe(0);
- expect(root_child1.getComputedLayout().top).toBe(125);
- expect(root_child1.getComputedLayout().width).toBe(200);
- expect(root_child1.getComputedLayout().height).toBe(75);
- });
-
- test('percentage_flex_basis_cross_min_height', () => {
- const root = Yoga.Node.create();
- root.setWidth(200);
- root.setHeight(200);
-
- const root_child0 = Yoga.Node.create();
- root_child0.setFlexGrow(1);
- root_child0.setMinHeightPercent(60);
- root.insertChild(root_child0, 0);
-
- const root_child1 = Yoga.Node.create();
- root_child1.setFlexGrow(2);
- root_child1.setMinHeightPercent(10);
- root.insertChild(root_child1, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(root_child0.getComputedLayout().left).toBe(0);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(200);
- expect(root_child0.getComputedLayout().height).toBe(140);
-
- expect(root_child1.getComputedLayout().left).toBe(0);
- expect(root_child1.getComputedLayout().top).toBe(140);
- expect(root_child1.getComputedLayout().width).toBe(200);
- expect(root_child1.getComputedLayout().height).toBe(60);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(root_child0.getComputedLayout().left).toBe(0);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(200);
- expect(root_child0.getComputedLayout().height).toBe(140);
-
- expect(root_child1.getComputedLayout().left).toBe(0);
- expect(root_child1.getComputedLayout().top).toBe(140);
- expect(root_child1.getComputedLayout().width).toBe(200);
- expect(root_child1.getComputedLayout().height).toBe(60);
- });
-
- test('percentage_flex_basis_main_max_height', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setWidth(200);
- root.setHeight(200);
-
- const root_child0 = Yoga.Node.create();
- root_child0.setFlexGrow(1);
- root_child0.setFlexBasisPercent(10);
- root_child0.setMaxHeightPercent(60);
- root.insertChild(root_child0, 0);
-
- const root_child1 = Yoga.Node.create();
- root_child1.setFlexGrow(4);
- root_child1.setFlexBasisPercent(10);
- root_child1.setMaxHeightPercent(20);
- root.insertChild(root_child1, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(root_child0.getComputedLayout().left).toBe(0);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(52);
- expect(root_child0.getComputedLayout().height).toBe(120);
-
- expect(root_child1.getComputedLayout().left).toBe(52);
- expect(root_child1.getComputedLayout().top).toBe(0);
- expect(root_child1.getComputedLayout().width).toBe(148);
- expect(root_child1.getComputedLayout().height).toBe(40);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(root_child0.getComputedLayout().left).toBe(148);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(52);
- expect(root_child0.getComputedLayout().height).toBe(120);
-
- expect(root_child1.getComputedLayout().left).toBe(0);
- expect(root_child1.getComputedLayout().top).toBe(0);
- expect(root_child1.getComputedLayout().width).toBe(148);
- expect(root_child1.getComputedLayout().height).toBe(40);
- });
-
- test('percentage_flex_basis_cross_max_height', () => {
- const root = Yoga.Node.create();
- root.setWidth(200);
- root.setHeight(200);
-
- const root_child0 = Yoga.Node.create();
- root_child0.setFlexGrow(1);
- root_child0.setFlexBasisPercent(10);
- root_child0.setMaxHeightPercent(60);
- root.insertChild(root_child0, 0);
-
- const root_child1 = Yoga.Node.create();
- root_child1.setFlexGrow(4);
- root_child1.setFlexBasisPercent(10);
- root_child1.setMaxHeightPercent(20);
- root.insertChild(root_child1, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(root_child0.getComputedLayout().left).toBe(0);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(200);
- expect(root_child0.getComputedLayout().height).toBe(120);
-
- expect(root_child1.getComputedLayout().left).toBe(0);
- expect(root_child1.getComputedLayout().top).toBe(120);
- expect(root_child1.getComputedLayout().width).toBe(200);
- expect(root_child1.getComputedLayout().height).toBe(40);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(root_child0.getComputedLayout().left).toBe(0);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(200);
- expect(root_child0.getComputedLayout().height).toBe(120);
-
- expect(root_child1.getComputedLayout().left).toBe(0);
- expect(root_child1.getComputedLayout().top).toBe(120);
- expect(root_child1.getComputedLayout().width).toBe(200);
- expect(root_child1.getComputedLayout().height).toBe(40);
- });
-
- test('percentage_flex_basis_main_max_width', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setWidth(200);
- root.setHeight(200);
-
- const root_child0 = Yoga.Node.create();
- root_child0.setFlexGrow(1);
- root_child0.setFlexBasisPercent(15);
- root_child0.setMaxWidthPercent(60);
- root.insertChild(root_child0, 0);
-
- const root_child1 = Yoga.Node.create();
- root_child1.setFlexGrow(4);
- root_child1.setFlexBasisPercent(10);
- root_child1.setMaxWidthPercent(20);
- root.insertChild(root_child1, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(root_child0.getComputedLayout().left).toBe(0);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(120);
- expect(root_child0.getComputedLayout().height).toBe(200);
-
- expect(root_child1.getComputedLayout().left).toBe(120);
- expect(root_child1.getComputedLayout().top).toBe(0);
- expect(root_child1.getComputedLayout().width).toBe(40);
- expect(root_child1.getComputedLayout().height).toBe(200);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(root_child0.getComputedLayout().left).toBe(80);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(120);
- expect(root_child0.getComputedLayout().height).toBe(200);
-
- expect(root_child1.getComputedLayout().left).toBe(40);
- expect(root_child1.getComputedLayout().top).toBe(0);
- expect(root_child1.getComputedLayout().width).toBe(40);
- expect(root_child1.getComputedLayout().height).toBe(200);
- });
-
- test('percentage_flex_basis_cross_max_width', () => {
- const root = Yoga.Node.create();
- root.setWidth(200);
- root.setHeight(200);
-
- const root_child0 = Yoga.Node.create();
- root_child0.setFlexGrow(1);
- root_child0.setFlexBasisPercent(10);
- root_child0.setMaxWidthPercent(60);
- root.insertChild(root_child0, 0);
-
- const root_child1 = Yoga.Node.create();
- root_child1.setFlexGrow(4);
- root_child1.setFlexBasisPercent(15);
- root_child1.setMaxWidthPercent(20);
- root.insertChild(root_child1, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(root_child0.getComputedLayout().left).toBe(0);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(120);
- expect(root_child0.getComputedLayout().height).toBe(50);
-
- expect(root_child1.getComputedLayout().left).toBe(0);
- expect(root_child1.getComputedLayout().top).toBe(50);
- expect(root_child1.getComputedLayout().width).toBe(40);
- expect(root_child1.getComputedLayout().height).toBe(150);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(root_child0.getComputedLayout().left).toBe(80);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(120);
- expect(root_child0.getComputedLayout().height).toBe(50);
-
- expect(root_child1.getComputedLayout().left).toBe(160);
- expect(root_child1.getComputedLayout().top).toBe(50);
- expect(root_child1.getComputedLayout().width).toBe(40);
- expect(root_child1.getComputedLayout().height).toBe(150);
- });
-
- test('percentage_flex_basis_main_min_width', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setWidth(200);
- root.setHeight(200);
-
- const root_child0 = Yoga.Node.create();
- root_child0.setFlexGrow(1);
- root_child0.setFlexBasisPercent(15);
- root_child0.setMinWidthPercent(60);
- root.insertChild(root_child0, 0);
-
- const root_child1 = Yoga.Node.create();
- root_child1.setFlexGrow(4);
- root_child1.setFlexBasisPercent(10);
- root_child1.setMinWidthPercent(20);
- root.insertChild(root_child1, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(root_child0.getComputedLayout().left).toBe(0);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(120);
- expect(root_child0.getComputedLayout().height).toBe(200);
-
- expect(root_child1.getComputedLayout().left).toBe(120);
- expect(root_child1.getComputedLayout().top).toBe(0);
- expect(root_child1.getComputedLayout().width).toBe(80);
- expect(root_child1.getComputedLayout().height).toBe(200);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(root_child0.getComputedLayout().left).toBe(80);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(120);
- expect(root_child0.getComputedLayout().height).toBe(200);
-
- expect(root_child1.getComputedLayout().left).toBe(0);
- expect(root_child1.getComputedLayout().top).toBe(0);
- expect(root_child1.getComputedLayout().width).toBe(80);
- expect(root_child1.getComputedLayout().height).toBe(200);
- });
-
- test('percentage_flex_basis_cross_min_width', () => {
- const root = Yoga.Node.create();
- root.setWidth(200);
- root.setHeight(200);
-
- const root_child0 = Yoga.Node.create();
- root_child0.setFlexGrow(1);
- root_child0.setFlexBasisPercent(10);
- root_child0.setMinWidthPercent(60);
- root.insertChild(root_child0, 0);
-
- const root_child1 = Yoga.Node.create();
- root_child1.setFlexGrow(4);
- root_child1.setFlexBasisPercent(15);
- root_child1.setMinWidthPercent(20);
- root.insertChild(root_child1, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(root_child0.getComputedLayout().left).toBe(0);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(200);
- expect(root_child0.getComputedLayout().height).toBe(50);
-
- expect(root_child1.getComputedLayout().left).toBe(0);
- expect(root_child1.getComputedLayout().top).toBe(50);
- expect(root_child1.getComputedLayout().width).toBe(200);
- expect(root_child1.getComputedLayout().height).toBe(150);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(root_child0.getComputedLayout().left).toBe(0);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(200);
- expect(root_child0.getComputedLayout().height).toBe(50);
-
- expect(root_child1.getComputedLayout().left).toBe(0);
- expect(root_child1.getComputedLayout().top).toBe(50);
- expect(root_child1.getComputedLayout().width).toBe(200);
- expect(root_child1.getComputedLayout().height).toBe(150);
- });
-
- test('percentage_multiple_nested_with_padding_margin_and_percentage_values', () => {
- const root = Yoga.Node.create();
- root.setWidth(200);
- root.setHeight(200);
-
- const root_child0 = Yoga.Node.create();
- root_child0.setFlexGrow(1);
- root_child0.setFlexBasisPercent(10);
- root_child0.setMargin(Yoga.EDGE_LEFT, 5);
- root_child0.setMargin(Yoga.EDGE_TOP, 5);
- root_child0.setMargin(Yoga.EDGE_RIGHT, 5);
- root_child0.setMargin(Yoga.EDGE_BOTTOM, 5);
- root_child0.setPadding(Yoga.EDGE_LEFT, 3);
- root_child0.setPadding(Yoga.EDGE_TOP, 3);
- root_child0.setPadding(Yoga.EDGE_RIGHT, 3);
- root_child0.setPadding(Yoga.EDGE_BOTTOM, 3);
- root_child0.setMinWidthPercent(60);
- root.insertChild(root_child0, 0);
-
- const root_child0_child0 = Yoga.Node.create();
- root_child0_child0.setMargin(Yoga.EDGE_LEFT, 5);
- root_child0_child0.setMargin(Yoga.EDGE_TOP, 5);
- root_child0_child0.setMargin(Yoga.EDGE_RIGHT, 5);
- root_child0_child0.setMargin(Yoga.EDGE_BOTTOM, 5);
- root_child0_child0.setPaddingPercent(Yoga.EDGE_LEFT, 3);
- root_child0_child0.setPaddingPercent(Yoga.EDGE_TOP, 3);
- root_child0_child0.setPaddingPercent(Yoga.EDGE_RIGHT, 3);
- root_child0_child0.setPaddingPercent(Yoga.EDGE_BOTTOM, 3);
- root_child0_child0.setWidthPercent(50);
- root_child0.insertChild(root_child0_child0, 0);
-
- const root_child0_child0_child0 = Yoga.Node.create();
- root_child0_child0_child0.setMarginPercent(Yoga.EDGE_LEFT, 5);
- root_child0_child0_child0.setMarginPercent(Yoga.EDGE_TOP, 5);
- root_child0_child0_child0.setMarginPercent(Yoga.EDGE_RIGHT, 5);
- root_child0_child0_child0.setMarginPercent(Yoga.EDGE_BOTTOM, 5);
- root_child0_child0_child0.setPadding(Yoga.EDGE_LEFT, 3);
- root_child0_child0_child0.setPadding(Yoga.EDGE_TOP, 3);
- root_child0_child0_child0.setPadding(Yoga.EDGE_RIGHT, 3);
- root_child0_child0_child0.setPadding(Yoga.EDGE_BOTTOM, 3);
- root_child0_child0_child0.setWidthPercent(45);
- root_child0_child0.insertChild(root_child0_child0_child0, 0);
-
- const root_child1 = Yoga.Node.create();
- root_child1.setFlexGrow(4);
- root_child1.setFlexBasisPercent(15);
- root_child1.setMinWidthPercent(20);
- root.insertChild(root_child1, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(root_child0.getComputedLayout().left).toBe(5);
- expect(root_child0.getComputedLayout().top).toBe(5);
- expect(root_child0.getComputedLayout().width).toBe(190);
- expect(root_child0.getComputedLayout().height).toBe(48);
-
- expect(root_child0_child0.getComputedLayout().left).toBe(8);
- expect(root_child0_child0.getComputedLayout().top).toBe(8);
- expect(root_child0_child0.getComputedLayout().width).toBe(92);
- expect(root_child0_child0.getComputedLayout().height).toBe(25);
-
- expect(root_child0_child0_child0.getComputedLayout().left).toBe(10);
- expect(root_child0_child0_child0.getComputedLayout().top).toBe(10);
- expect(root_child0_child0_child0.getComputedLayout().width).toBe(36);
- expect(root_child0_child0_child0.getComputedLayout().height).toBe(6);
-
- expect(root_child1.getComputedLayout().left).toBe(0);
- expect(root_child1.getComputedLayout().top).toBe(58);
- expect(root_child1.getComputedLayout().width).toBe(200);
- expect(root_child1.getComputedLayout().height).toBe(142);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(root_child0.getComputedLayout().left).toBe(5);
- expect(root_child0.getComputedLayout().top).toBe(5);
- expect(root_child0.getComputedLayout().width).toBe(190);
- expect(root_child0.getComputedLayout().height).toBe(48);
-
- expect(root_child0_child0.getComputedLayout().left).toBe(90);
- expect(root_child0_child0.getComputedLayout().top).toBe(8);
- expect(root_child0_child0.getComputedLayout().width).toBe(92);
- expect(root_child0_child0.getComputedLayout().height).toBe(25);
-
- expect(root_child0_child0_child0.getComputedLayout().left).toBe(46);
- expect(root_child0_child0_child0.getComputedLayout().top).toBe(10);
- expect(root_child0_child0_child0.getComputedLayout().width).toBe(36);
- expect(root_child0_child0_child0.getComputedLayout().height).toBe(6);
-
- expect(root_child1.getComputedLayout().left).toBe(0);
- expect(root_child1.getComputedLayout().top).toBe(58);
- expect(root_child1.getComputedLayout().width).toBe(200);
- expect(root_child1.getComputedLayout().height).toBe(142);
- });
-
- test('percentage_margin_should_calculate_based_only_on_width', () => {
- const root = Yoga.Node.create();
- root.setWidth(200);
- root.setHeight(100);
-
- const root_child0 = Yoga.Node.create();
- root_child0.setFlexGrow(1);
- root_child0.setMarginPercent(Yoga.EDGE_LEFT, 10);
- root_child0.setMarginPercent(Yoga.EDGE_TOP, 10);
- root_child0.setMarginPercent(Yoga.EDGE_RIGHT, 10);
- root_child0.setMarginPercent(Yoga.EDGE_BOTTOM, 10);
- root.insertChild(root_child0, 0);
-
- const root_child0_child0 = Yoga.Node.create();
- root_child0_child0.setWidth(10);
- root_child0_child0.setHeight(10);
- root_child0.insertChild(root_child0_child0, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(root_child0.getComputedLayout().left).toBe(20);
- expect(root_child0.getComputedLayout().top).toBe(20);
- expect(root_child0.getComputedLayout().width).toBe(160);
- expect(root_child0.getComputedLayout().height).toBe(60);
-
- expect(root_child0_child0.getComputedLayout().left).toBe(0);
- expect(root_child0_child0.getComputedLayout().top).toBe(0);
- expect(root_child0_child0.getComputedLayout().width).toBe(10);
- expect(root_child0_child0.getComputedLayout().height).toBe(10);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(root_child0.getComputedLayout().left).toBe(20);
- expect(root_child0.getComputedLayout().top).toBe(20);
- expect(root_child0.getComputedLayout().width).toBe(160);
- expect(root_child0.getComputedLayout().height).toBe(60);
-
- expect(root_child0_child0.getComputedLayout().left).toBe(150);
- expect(root_child0_child0.getComputedLayout().top).toBe(0);
- expect(root_child0_child0.getComputedLayout().width).toBe(10);
- expect(root_child0_child0.getComputedLayout().height).toBe(10);
- });
-
- test('percentage_padding_should_calculate_based_only_on_width', () => {
- const root = Yoga.Node.create();
- root.setWidth(200);
- root.setHeight(100);
-
- const root_child0 = Yoga.Node.create();
- root_child0.setFlexGrow(1);
- root_child0.setPaddingPercent(Yoga.EDGE_LEFT, 10);
- root_child0.setPaddingPercent(Yoga.EDGE_TOP, 10);
- root_child0.setPaddingPercent(Yoga.EDGE_RIGHT, 10);
- root_child0.setPaddingPercent(Yoga.EDGE_BOTTOM, 10);
- root.insertChild(root_child0, 0);
-
- const root_child0_child0 = Yoga.Node.create();
- root_child0_child0.setWidth(10);
- root_child0_child0.setHeight(10);
- root_child0.insertChild(root_child0_child0, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(root_child0.getComputedLayout().left).toBe(0);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(200);
- expect(root_child0.getComputedLayout().height).toBe(100);
-
- expect(root_child0_child0.getComputedLayout().left).toBe(20);
- expect(root_child0_child0.getComputedLayout().top).toBe(20);
- expect(root_child0_child0.getComputedLayout().width).toBe(10);
- expect(root_child0_child0.getComputedLayout().height).toBe(10);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(root_child0.getComputedLayout().left).toBe(0);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(200);
- expect(root_child0.getComputedLayout().height).toBe(100);
-
- expect(root_child0_child0.getComputedLayout().left).toBe(170);
- expect(root_child0_child0.getComputedLayout().top).toBe(20);
- expect(root_child0_child0.getComputedLayout().width).toBe(10);
- expect(root_child0_child0.getComputedLayout().height).toBe(10);
- });
-
- test('percentage_absolute_position', () => {
- const root = Yoga.Node.create();
- root.setWidth(200);
- root.setHeight(100);
-
- const root_child0 = Yoga.Node.create();
- root_child0.setPositionType(Yoga.POSITION_TYPE_ABSOLUTE);
- root_child0.setPositionPercent(Yoga.EDGE_LEFT, 30);
- root_child0.setPositionPercent(Yoga.EDGE_TOP, 10);
- root_child0.setWidth(10);
- root_child0.setHeight(10);
- root.insertChild(root_child0, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(root_child0.getComputedLayout().left).toBe(60);
- expect(root_child0.getComputedLayout().top).toBe(10);
- expect(root_child0.getComputedLayout().width).toBe(10);
- expect(root_child0.getComputedLayout().height).toBe(10);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(root_child0.getComputedLayout().left).toBe(60);
- expect(root_child0.getComputedLayout().top).toBe(10);
- expect(root_child0.getComputedLayout().width).toBe(10);
- expect(root_child0.getComputedLayout().height).toBe(10);
- });
-
- test('percentage_width_height_undefined_parent_size', () => {
- const root = Yoga.Node.create();
-
- const root_child0 = Yoga.Node.create();
- root_child0.setWidthPercent(50);
- root_child0.setHeightPercent(50);
- root.insertChild(root_child0, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(0);
- expect(root.getComputedLayout().height).toBe(0);
-
- expect(root_child0.getComputedLayout().left).toBe(0);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(0);
- expect(root_child0.getComputedLayout().height).toBe(0);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(0);
- expect(root.getComputedLayout().height).toBe(0);
-
- expect(root_child0.getComputedLayout().left).toBe(0);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(0);
- expect(root_child0.getComputedLayout().height).toBe(0);
- });
-
- test('percent_within_flex_grow', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setWidth(350);
- root.setHeight(100);
-
- const root_child0 = Yoga.Node.create();
- root_child0.setWidth(100);
- root.insertChild(root_child0, 0);
-
- const root_child1 = Yoga.Node.create();
- root_child1.setFlexGrow(1);
- root.insertChild(root_child1, 1);
-
- const root_child1_child0 = Yoga.Node.create();
- root_child1_child0.setWidthPercent(100);
- root_child1.insertChild(root_child1_child0, 0);
-
- const root_child2 = Yoga.Node.create();
- root_child2.setWidth(100);
- root.insertChild(root_child2, 2);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(350);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(root_child0.getComputedLayout().left).toBe(0);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(100);
- expect(root_child0.getComputedLayout().height).toBe(100);
-
- expect(root_child1.getComputedLayout().left).toBe(100);
- expect(root_child1.getComputedLayout().top).toBe(0);
- expect(root_child1.getComputedLayout().width).toBe(150);
- expect(root_child1.getComputedLayout().height).toBe(100);
-
- expect(root_child1_child0.getComputedLayout().left).toBe(0);
- expect(root_child1_child0.getComputedLayout().top).toBe(0);
- expect(root_child1_child0.getComputedLayout().width).toBe(150);
- expect(root_child1_child0.getComputedLayout().height).toBe(0);
-
- expect(root_child2.getComputedLayout().left).toBe(250);
- expect(root_child2.getComputedLayout().top).toBe(0);
- expect(root_child2.getComputedLayout().width).toBe(100);
- expect(root_child2.getComputedLayout().height).toBe(100);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(350);
- expect(root.getComputedLayout().height).toBe(100);
-
- expect(root_child0.getComputedLayout().left).toBe(250);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(100);
- expect(root_child0.getComputedLayout().height).toBe(100);
-
- expect(root_child1.getComputedLayout().left).toBe(100);
- expect(root_child1.getComputedLayout().top).toBe(0);
- expect(root_child1.getComputedLayout().width).toBe(150);
- expect(root_child1.getComputedLayout().height).toBe(100);
-
- expect(root_child1_child0.getComputedLayout().left).toBe(0);
- expect(root_child1_child0.getComputedLayout().top).toBe(0);
- expect(root_child1_child0.getComputedLayout().width).toBe(150);
- expect(root_child1_child0.getComputedLayout().height).toBe(0);
-
- expect(root_child2.getComputedLayout().left).toBe(0);
- expect(root_child2.getComputedLayout().top).toBe(0);
- expect(root_child2.getComputedLayout().width).toBe(100);
- expect(root_child2.getComputedLayout().height).toBe(100);
- });
-
- test('percentage_container_in_wrapping_container', () => {
- const root = Yoga.Node.create();
- root.setJustifyContent(Yoga.JUSTIFY_CENTER);
- root.setAlignItems(Yoga.ALIGN_CENTER);
- root.setWidth(200);
- root.setHeight(200);
-
- const root_child0 = Yoga.Node.create();
- root.insertChild(root_child0, 0);
-
- const root_child0_child0 = Yoga.Node.create();
- root_child0_child0.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root_child0_child0.setJustifyContent(Yoga.JUSTIFY_CENTER);
- root_child0_child0.setWidthPercent(100);
- root_child0.insertChild(root_child0_child0, 0);
-
- const root_child0_child0_child0 = Yoga.Node.create();
- root_child0_child0_child0.setWidth(50);
- root_child0_child0_child0.setHeight(50);
- root_child0_child0.insertChild(root_child0_child0_child0, 0);
-
- const root_child0_child0_child1 = Yoga.Node.create();
- root_child0_child0_child1.setWidth(50);
- root_child0_child0_child1.setHeight(50);
- root_child0_child0.insertChild(root_child0_child0_child1, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(root_child0.getComputedLayout().left).toBe(50);
- expect(root_child0.getComputedLayout().top).toBe(75);
- expect(root_child0.getComputedLayout().width).toBe(100);
- expect(root_child0.getComputedLayout().height).toBe(50);
-
- expect(root_child0_child0.getComputedLayout().left).toBe(0);
- expect(root_child0_child0.getComputedLayout().top).toBe(0);
- expect(root_child0_child0.getComputedLayout().width).toBe(100);
- expect(root_child0_child0.getComputedLayout().height).toBe(50);
-
- expect(root_child0_child0_child0.getComputedLayout().left).toBe(0);
- expect(root_child0_child0_child0.getComputedLayout().top).toBe(0);
- expect(root_child0_child0_child0.getComputedLayout().width).toBe(50);
- expect(root_child0_child0_child0.getComputedLayout().height).toBe(50);
-
- expect(root_child0_child0_child1.getComputedLayout().left).toBe(50);
- expect(root_child0_child0_child1.getComputedLayout().top).toBe(0);
- expect(root_child0_child0_child1.getComputedLayout().width).toBe(50);
- expect(root_child0_child0_child1.getComputedLayout().height).toBe(50);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(200);
- expect(root.getComputedLayout().height).toBe(200);
-
- expect(root_child0.getComputedLayout().left).toBe(50);
- expect(root_child0.getComputedLayout().top).toBe(75);
- expect(root_child0.getComputedLayout().width).toBe(100);
- expect(root_child0.getComputedLayout().height).toBe(50);
-
- expect(root_child0_child0.getComputedLayout().left).toBe(0);
- expect(root_child0_child0.getComputedLayout().top).toBe(0);
- expect(root_child0_child0.getComputedLayout().width).toBe(100);
- expect(root_child0_child0.getComputedLayout().height).toBe(50);
-
- expect(root_child0_child0_child0.getComputedLayout().left).toBe(50);
- expect(root_child0_child0_child0.getComputedLayout().top).toBe(0);
- expect(root_child0_child0_child0.getComputedLayout().width).toBe(50);
- expect(root_child0_child0_child0.getComputedLayout().height).toBe(50);
-
- expect(root_child0_child0_child1.getComputedLayout().left).toBe(0);
- expect(root_child0_child0_child1.getComputedLayout().top).toBe(0);
- expect(root_child0_child0_child1.getComputedLayout().width).toBe(50);
- expect(root_child0_child0_child1.getComputedLayout().height).toBe(50);
- });
-
- test('percent_absolute_position', () => {
- const root = Yoga.Node.create();
- root.setWidth(60);
- root.setHeight(50);
-
- const root_child0 = Yoga.Node.create();
- root_child0.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root_child0.setPositionType(Yoga.POSITION_TYPE_ABSOLUTE);
- root_child0.setPositionPercent(Yoga.EDGE_LEFT, 50);
- root_child0.setWidthPercent(100);
- root_child0.setHeight(50);
- root.insertChild(root_child0, 0);
-
- const root_child0_child0 = Yoga.Node.create();
- root_child0_child0.setWidthPercent(100);
- root_child0.insertChild(root_child0_child0, 0);
-
- const root_child0_child1 = Yoga.Node.create();
- root_child0_child1.setWidthPercent(100);
- root_child0.insertChild(root_child0_child1, 1);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(60);
- expect(root.getComputedLayout().height).toBe(50);
-
- expect(root_child0.getComputedLayout().left).toBe(30);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(60);
- expect(root_child0.getComputedLayout().height).toBe(50);
-
- expect(root_child0_child0.getComputedLayout().left).toBe(0);
- expect(root_child0_child0.getComputedLayout().top).toBe(0);
- expect(root_child0_child0.getComputedLayout().width).toBe(60);
- expect(root_child0_child0.getComputedLayout().height).toBe(50);
-
- expect(root_child0_child1.getComputedLayout().left).toBe(60);
- expect(root_child0_child1.getComputedLayout().top).toBe(0);
- expect(root_child0_child1.getComputedLayout().width).toBe(60);
- expect(root_child0_child1.getComputedLayout().height).toBe(50);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLayout().left).toBe(0);
- expect(root.getComputedLayout().top).toBe(0);
- expect(root.getComputedLayout().width).toBe(60);
- expect(root.getComputedLayout().height).toBe(50);
-
- expect(root_child0.getComputedLayout().left).toBe(30);
- expect(root_child0.getComputedLayout().top).toBe(0);
- expect(root_child0.getComputedLayout().width).toBe(60);
- expect(root_child0.getComputedLayout().height).toBe(50);
-
- expect(root_child0_child0.getComputedLayout().left).toBe(0);
- expect(root_child0_child0.getComputedLayout().top).toBe(0);
- expect(root_child0_child0.getComputedLayout().width).toBe(60);
- expect(root_child0_child0.getComputedLayout().height).toBe(50);
-
- expect(root_child0_child1.getComputedLayout().left).toBe(-60);
- expect(root_child0_child1.getComputedLayout().top).toBe(0);
- expect(root_child0_child1.getComputedLayout().width).toBe(60);
- expect(root_child0_child1.getComputedLayout().height).toBe(50);
- });
-});
diff --git a/packages/yoga/tests/position.test.js b/packages/yoga/tests/position.test.js
deleted file mode 100644
index 2b7865575..000000000
--- a/packages/yoga/tests/position.test.js
+++ /dev/null
@@ -1,232 +0,0 @@
-const Yoga = require('..');
-
-describe('Position', () => {
- let yogaNode;
- let flexboxNode;
-
- beforeEach(() => {
- yogaNode = Yoga.Node.createDefault();
- flexboxNode = Yoga.Node.createDefault();
- });
-
- test('should have same top position by default', () => {
- expect(yogaNode.getPosition(Yoga.EDGE_TOP)).toEqual(
- flexboxNode.getPosition(Yoga.EDGE_TOP),
- );
- });
-
- test('should have same left position by default', () => {
- expect(yogaNode.getPosition(Yoga.EDGE_LEFT)).toEqual(
- flexboxNode.getPosition(Yoga.EDGE_LEFT),
- );
- });
-
- test('should have same bottom position by default', () => {
- expect(yogaNode.getPosition(Yoga.EDGE_BOTTOM)).toEqual(
- flexboxNode.getPosition(Yoga.EDGE_BOTTOM),
- );
- });
-
- test('should have same right position by default', () => {
- expect(yogaNode.getPosition(Yoga.EDGE_RIGHT)).toEqual(
- flexboxNode.getPosition(Yoga.EDGE_RIGHT),
- );
- });
-
- test('should have same vertical position by default', () => {
- expect(yogaNode.getPosition(Yoga.EDGE_VERTICAL)).toEqual(
- flexboxNode.getPosition(Yoga.EDGE_VERTICAL),
- );
- });
-
- test('should have same horizontal position by default', () => {
- expect(yogaNode.getPosition(Yoga.EDGE_HORIZONTAL)).toEqual(
- flexboxNode.getPosition(Yoga.EDGE_HORIZONTAL),
- );
- });
-
- test('should have same start position by default', () => {
- expect(yogaNode.getPosition(Yoga.EDGE_START)).toEqual(
- flexboxNode.getPosition(Yoga.EDGE_START),
- );
- });
-
- test('should have same end position by default', () => {
- expect(yogaNode.getPosition(Yoga.EDGE_END)).toEqual(
- flexboxNode.getPosition(Yoga.EDGE_END),
- );
- });
-
- test('should have same all position by default', () => {
- expect(yogaNode.getPosition(Yoga.EDGE_ALL)).toEqual(
- flexboxNode.getPosition(Yoga.EDGE_ALL),
- );
- });
-
- test('should set top position', () => {
- yogaNode.setPosition(Yoga.EDGE_TOP, 5);
- flexboxNode.setPosition(Yoga.EDGE_TOP, 5);
-
- expect(yogaNode.getPosition(Yoga.EDGE_TOP)).toEqual(
- flexboxNode.getPosition(Yoga.EDGE_TOP),
- );
- });
-
- test('should set left position', () => {
- yogaNode.setPosition(Yoga.EDGE_LEFT, 5);
- flexboxNode.setPosition(Yoga.EDGE_LEFT, 5);
-
- expect(yogaNode.getPosition(Yoga.EDGE_LEFT)).toEqual(
- flexboxNode.getPosition(Yoga.EDGE_LEFT),
- );
- });
-
- test('should set bottom position', () => {
- yogaNode.setPosition(Yoga.EDGE_BOTTOM, 5);
- flexboxNode.setPosition(Yoga.EDGE_BOTTOM, 5);
-
- expect(yogaNode.getPosition(Yoga.EDGE_BOTTOM)).toEqual(
- flexboxNode.getPosition(Yoga.EDGE_BOTTOM),
- );
- });
-
- test('should set right position', () => {
- yogaNode.setPosition(Yoga.EDGE_RIGHT, 5);
- flexboxNode.setPosition(Yoga.EDGE_RIGHT, 5);
-
- expect(yogaNode.getPosition(Yoga.EDGE_RIGHT)).toEqual(
- flexboxNode.getPosition(Yoga.EDGE_RIGHT),
- );
- });
-
- test('should set vertical position', () => {
- yogaNode.setPosition(Yoga.EDGE_VERTICAL, 5);
- flexboxNode.setPosition(Yoga.EDGE_VERTICAL, 5);
-
- expect(yogaNode.getPosition(Yoga.EDGE_VERTICAL)).toEqual(
- flexboxNode.getPosition(Yoga.EDGE_VERTICAL),
- );
- });
-
- test('should set horizontal position', () => {
- yogaNode.setPosition(Yoga.EDGE_HORIZONTAL, 5);
- flexboxNode.setPosition(Yoga.EDGE_HORIZONTAL, 5);
-
- expect(yogaNode.getPosition(Yoga.EDGE_HORIZONTAL)).toEqual(
- flexboxNode.getPosition(Yoga.EDGE_HORIZONTAL),
- );
- });
-
- test('should set start position', () => {
- yogaNode.setPosition(Yoga.EDGE_START, 5);
- flexboxNode.setPosition(Yoga.EDGE_START, 5);
-
- expect(yogaNode.getPosition(Yoga.EDGE_START)).toEqual(
- flexboxNode.getPosition(Yoga.EDGE_START),
- );
- });
-
- test('should set end position', () => {
- yogaNode.setPosition(Yoga.EDGE_END, 5);
- flexboxNode.setPosition(Yoga.EDGE_END, 5);
-
- expect(yogaNode.getPosition(Yoga.EDGE_END)).toEqual(
- flexboxNode.getPosition(Yoga.EDGE_END),
- );
- });
-
- test('should set all position', () => {
- yogaNode.setPosition(Yoga.EDGE_ALL, 5);
- flexboxNode.setPosition(Yoga.EDGE_ALL, 5);
-
- expect(yogaNode.getPosition(Yoga.EDGE_ALL)).toEqual(
- flexboxNode.getPosition(Yoga.EDGE_ALL),
- );
- });
-
- test('should set top percent position', () => {
- yogaNode.setPositionPercent(Yoga.EDGE_TOP, 5);
- flexboxNode.setPositionPercent(Yoga.EDGE_TOP, 5);
-
- expect(yogaNode.getPosition(Yoga.EDGE_TOP)).toEqual(
- flexboxNode.getPosition(Yoga.EDGE_TOP),
- );
- });
-
- test('should set left percent position', () => {
- yogaNode.setPositionPercent(Yoga.EDGE_LEFT, 5);
- flexboxNode.setPositionPercent(Yoga.EDGE_LEFT, 5);
-
- expect(yogaNode.getPosition(Yoga.EDGE_LEFT)).toEqual(
- flexboxNode.getPosition(Yoga.EDGE_LEFT),
- );
- });
-
- test('should set bottom percent position', () => {
- yogaNode.setPositionPercent(Yoga.EDGE_BOTTOM, 5);
- flexboxNode.setPositionPercent(Yoga.EDGE_BOTTOM, 5);
-
- expect(yogaNode.getPosition(Yoga.EDGE_BOTTOM)).toEqual(
- flexboxNode.getPosition(Yoga.EDGE_BOTTOM),
- );
- });
-
- test('should set right percent position', () => {
- yogaNode.setPositionPercent(Yoga.EDGE_RIGHT, 5);
- flexboxNode.setPositionPercent(Yoga.EDGE_RIGHT, 5);
-
- expect(yogaNode.getPosition(Yoga.EDGE_RIGHT)).toEqual(
- flexboxNode.getPosition(Yoga.EDGE_RIGHT),
- );
- });
-
- test('should set vertical percent position', () => {
- yogaNode.setPositionPercent(Yoga.EDGE_VERTICAL, 5);
- flexboxNode.setPositionPercent(Yoga.EDGE_VERTICAL, 5);
-
- expect(yogaNode.getPosition(Yoga.EDGE_VERTICAL)).toEqual(
- flexboxNode.getPosition(Yoga.EDGE_VERTICAL),
- );
- });
-
- test('should set horizontal percent position', () => {
- yogaNode.setPositionPercent(Yoga.EDGE_HORIZONTAL, 5);
- flexboxNode.setPositionPercent(Yoga.EDGE_HORIZONTAL, 5);
-
- expect(yogaNode.getPosition(Yoga.EDGE_HORIZONTAL)).toEqual(
- flexboxNode.getPosition(Yoga.EDGE_HORIZONTAL),
- );
- });
-
- test('should set start percent position', () => {
- yogaNode.setPositionPercent(Yoga.EDGE_START, 5);
- flexboxNode.setPositionPercent(Yoga.EDGE_START, 5);
-
- expect(yogaNode.getPosition(Yoga.EDGE_START)).toEqual(
- flexboxNode.getPosition(Yoga.EDGE_START),
- );
- });
-
- test('should set end percent position', () => {
- yogaNode.setPositionPercent(Yoga.EDGE_END, 5);
- flexboxNode.setPositionPercent(Yoga.EDGE_END, 5);
-
- expect(yogaNode.getPosition(Yoga.EDGE_END)).toEqual(
- flexboxNode.getPosition(Yoga.EDGE_END),
- );
- });
-
- test('should set position type relative', () => {
- yogaNode.setPositionType(Yoga.POSITION_TYPE_RELATIVE);
- flexboxNode.setPositionType(Yoga.POSITION_TYPE_RELATIVE);
-
- expect(yogaNode.getPositionType()).toEqual(flexboxNode.getPositionType());
- });
-
- test('should set position type absolute', () => {
- yogaNode.setPositionType(Yoga.POSITION_TYPE_ABSOLUTE);
- flexboxNode.setPositionType(Yoga.POSITION_TYPE_ABSOLUTE);
-
- expect(yogaNode.getPositionType()).toEqual(flexboxNode.getPositionType());
- });
-});
diff --git a/packages/yoga/tests/rounding.test.js b/packages/yoga/tests/rounding.test.js
deleted file mode 100644
index 3cb74e074..000000000
--- a/packages/yoga/tests/rounding.test.js
+++ /dev/null
@@ -1,991 +0,0 @@
-const Yoga = require('..');
-
-describe('Rounding', () => {
- test('rounding_flex_basis_flex_grow_row_width_of_100', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setWidth(100);
- root.setHeight(100);
-
- const root_child0 = Yoga.Node.create();
- root_child0.setFlexGrow(1);
- root.insertChild(root_child0, 0);
-
- const root_child1 = Yoga.Node.create();
- root_child1.setFlexGrow(1);
- root.insertChild(root_child1, 1);
-
- const root_child2 = Yoga.Node.create();
- root_child2.setFlexGrow(1);
- root.insertChild(root_child2, 2);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLeft()).toBe(0);
- expect(root.getComputedTop()).toBe(0);
- expect(root.getComputedWidth()).toBe(100);
- expect(root.getComputedHeight()).toBe(100);
-
- expect(root_child0.getComputedLeft()).toBe(0);
- expect(root_child0.getComputedTop()).toBe(0);
- expect(root_child0.getComputedWidth()).toBe(33);
- expect(root_child0.getComputedHeight()).toBe(100);
-
- expect(root_child1.getComputedLeft()).toBe(33);
- expect(root_child1.getComputedTop()).toBe(0);
- expect(root_child1.getComputedWidth()).toBe(34);
- expect(root_child1.getComputedHeight()).toBe(100);
-
- expect(root_child2.getComputedLeft()).toBe(67);
- expect(root_child2.getComputedTop()).toBe(0);
- expect(root_child2.getComputedWidth()).toBe(33);
- expect(root_child2.getComputedHeight()).toBe(100);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLeft()).toBe(0);
- expect(root.getComputedTop()).toBe(0);
- expect(root.getComputedWidth()).toBe(100);
- expect(root.getComputedHeight()).toBe(100);
-
- expect(root_child0.getComputedLeft()).toBe(67);
- expect(root_child0.getComputedTop()).toBe(0);
- expect(root_child0.getComputedWidth()).toBe(33);
- expect(root_child0.getComputedHeight()).toBe(100);
-
- expect(root_child1.getComputedLeft()).toBe(33);
- expect(root_child1.getComputedTop()).toBe(0);
- expect(root_child1.getComputedWidth()).toBe(34);
- expect(root_child1.getComputedHeight()).toBe(100);
-
- expect(root_child2.getComputedLeft()).toBe(0);
- expect(root_child2.getComputedTop()).toBe(0);
- expect(root_child2.getComputedWidth()).toBe(33);
- expect(root_child2.getComputedHeight()).toBe(100);
- });
-
- test('rounding_flex_basis_flex_grow_row_prime_number_width', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setWidth(113);
- root.setHeight(100);
-
- const root_child0 = Yoga.Node.create();
- root_child0.setFlexGrow(1);
- root.insertChild(root_child0, 0);
-
- const root_child1 = Yoga.Node.create();
- root_child1.setFlexGrow(1);
- root.insertChild(root_child1, 1);
-
- const root_child2 = Yoga.Node.create();
- root_child2.setFlexGrow(1);
- root.insertChild(root_child2, 2);
-
- const root_child3 = Yoga.Node.create();
- root_child3.setFlexGrow(1);
- root.insertChild(root_child3, 3);
-
- const root_child4 = Yoga.Node.create();
- root_child4.setFlexGrow(1);
- root.insertChild(root_child4, 4);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLeft()).toBe(0);
- expect(root.getComputedTop()).toBe(0);
- expect(root.getComputedWidth()).toBe(113);
- expect(root.getComputedHeight()).toBe(100);
-
- expect(root_child0.getComputedLeft()).toBe(0);
- expect(root_child0.getComputedTop()).toBe(0);
- expect(root_child0.getComputedWidth()).toBe(23);
- expect(root_child0.getComputedHeight()).toBe(100);
-
- expect(root_child1.getComputedLeft()).toBe(23);
- expect(root_child1.getComputedTop()).toBe(0);
- expect(root_child1.getComputedWidth()).toBe(22);
- expect(root_child1.getComputedHeight()).toBe(100);
-
- expect(root_child2.getComputedLeft()).toBe(45);
- expect(root_child2.getComputedTop()).toBe(0);
- expect(root_child2.getComputedWidth()).toBe(23);
- expect(root_child2.getComputedHeight()).toBe(100);
-
- expect(root_child3.getComputedLeft()).toBe(68);
- expect(root_child3.getComputedTop()).toBe(0);
- expect(root_child3.getComputedWidth()).toBe(22);
- expect(root_child3.getComputedHeight()).toBe(100);
-
- expect(root_child4.getComputedLeft()).toBe(90);
- expect(root_child4.getComputedTop()).toBe(0);
- expect(root_child4.getComputedWidth()).toBe(23);
- expect(root_child4.getComputedHeight()).toBe(100);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLeft()).toBe(0);
- expect(root.getComputedTop()).toBe(0);
- expect(root.getComputedWidth()).toBe(113);
- expect(root.getComputedHeight()).toBe(100);
-
- expect(root_child0.getComputedLeft()).toBe(90);
- expect(root_child0.getComputedTop()).toBe(0);
- expect(root_child0.getComputedWidth()).toBe(23);
- expect(root_child0.getComputedHeight()).toBe(100);
-
- expect(root_child1.getComputedLeft()).toBe(68);
- expect(root_child1.getComputedTop()).toBe(0);
- expect(root_child1.getComputedWidth()).toBe(22);
- expect(root_child1.getComputedHeight()).toBe(100);
-
- expect(root_child2.getComputedLeft()).toBe(45);
- expect(root_child2.getComputedTop()).toBe(0);
- expect(root_child2.getComputedWidth()).toBe(23);
- expect(root_child2.getComputedHeight()).toBe(100);
-
- expect(root_child3.getComputedLeft()).toBe(23);
- expect(root_child3.getComputedTop()).toBe(0);
- expect(root_child3.getComputedWidth()).toBe(22);
- expect(root_child3.getComputedHeight()).toBe(100);
-
- expect(root_child4.getComputedLeft()).toBe(0);
- expect(root_child4.getComputedTop()).toBe(0);
- expect(root_child4.getComputedWidth()).toBe(23);
- expect(root_child4.getComputedHeight()).toBe(100);
- });
-
- test('rounding_flex_basis_flex_shrink_row', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setWidth(101);
- root.setHeight(100);
-
- const root_child0 = Yoga.Node.create();
- root_child0.setFlexShrink(1);
- root_child0.setFlexBasis(100);
- root.insertChild(root_child0, 0);
-
- const root_child1 = Yoga.Node.create();
- root_child1.setFlexBasis(25);
- root.insertChild(root_child1, 1);
-
- const root_child2 = Yoga.Node.create();
- root_child2.setFlexBasis(25);
- root.insertChild(root_child2, 2);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLeft()).toBe(0);
- expect(root.getComputedTop()).toBe(0);
- expect(root.getComputedWidth()).toBe(101);
- expect(root.getComputedHeight()).toBe(100);
-
- expect(root_child0.getComputedLeft()).toBe(0);
- expect(root_child0.getComputedTop()).toBe(0);
- expect(root_child0.getComputedWidth()).toBe(51);
- expect(root_child0.getComputedHeight()).toBe(100);
-
- expect(root_child1.getComputedLeft()).toBe(51);
- expect(root_child1.getComputedTop()).toBe(0);
- expect(root_child1.getComputedWidth()).toBe(25);
- expect(root_child1.getComputedHeight()).toBe(100);
-
- expect(root_child2.getComputedLeft()).toBe(76);
- expect(root_child2.getComputedTop()).toBe(0);
- expect(root_child2.getComputedWidth()).toBe(25);
- expect(root_child2.getComputedHeight()).toBe(100);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLeft()).toBe(0);
- expect(root.getComputedTop()).toBe(0);
- expect(root.getComputedWidth()).toBe(101);
- expect(root.getComputedHeight()).toBe(100);
-
- expect(root_child0.getComputedLeft()).toBe(50);
- expect(root_child0.getComputedTop()).toBe(0);
- expect(root_child0.getComputedWidth()).toBe(51);
- expect(root_child0.getComputedHeight()).toBe(100);
-
- expect(root_child1.getComputedLeft()).toBe(25);
- expect(root_child1.getComputedTop()).toBe(0);
- expect(root_child1.getComputedWidth()).toBe(25);
- expect(root_child1.getComputedHeight()).toBe(100);
-
- expect(root_child2.getComputedLeft()).toBe(0);
- expect(root_child2.getComputedTop()).toBe(0);
- expect(root_child2.getComputedWidth()).toBe(25);
- expect(root_child2.getComputedHeight()).toBe(100);
- });
-
- test('rounding_flex_basis_overrides_main_size', () => {
- const root = Yoga.Node.create();
- root.setWidth(100);
- root.setHeight(113);
-
- const root_child0 = Yoga.Node.create();
- root_child0.setFlexGrow(1);
- root_child0.setFlexBasis(50);
- root_child0.setHeight(20);
- root.insertChild(root_child0, 0);
-
- const root_child1 = Yoga.Node.create();
- root_child1.setFlexGrow(1);
- root_child1.setHeight(10);
- root.insertChild(root_child1, 1);
-
- const root_child2 = Yoga.Node.create();
- root_child2.setFlexGrow(1);
- root_child2.setHeight(10);
- root.insertChild(root_child2, 2);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLeft()).toBe(0);
- expect(root.getComputedTop()).toBe(0);
- expect(root.getComputedWidth()).toBe(100);
- expect(root.getComputedHeight()).toBe(113);
-
- expect(root_child0.getComputedLeft()).toBe(0);
- expect(root_child0.getComputedTop()).toBe(0);
- expect(root_child0.getComputedWidth()).toBe(100);
- expect(root_child0.getComputedHeight()).toBe(64);
-
- expect(root_child1.getComputedLeft()).toBe(0);
- expect(root_child1.getComputedTop()).toBe(64);
- expect(root_child1.getComputedWidth()).toBe(100);
- expect(root_child1.getComputedHeight()).toBe(25);
-
- expect(root_child2.getComputedLeft()).toBe(0);
- expect(root_child2.getComputedTop()).toBe(89);
- expect(root_child2.getComputedWidth()).toBe(100);
- expect(root_child2.getComputedHeight()).toBe(24);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLeft()).toBe(0);
- expect(root.getComputedTop()).toBe(0);
- expect(root.getComputedWidth()).toBe(100);
- expect(root.getComputedHeight()).toBe(113);
-
- expect(root_child0.getComputedLeft()).toBe(0);
- expect(root_child0.getComputedTop()).toBe(0);
- expect(root_child0.getComputedWidth()).toBe(100);
- expect(root_child0.getComputedHeight()).toBe(64);
-
- expect(root_child1.getComputedLeft()).toBe(0);
- expect(root_child1.getComputedTop()).toBe(64);
- expect(root_child1.getComputedWidth()).toBe(100);
- expect(root_child1.getComputedHeight()).toBe(25);
-
- expect(root_child2.getComputedLeft()).toBe(0);
- expect(root_child2.getComputedTop()).toBe(89);
- expect(root_child2.getComputedWidth()).toBe(100);
- expect(root_child2.getComputedHeight()).toBe(24);
- });
-
- test('rounding_total_fractial', () => {
- const root = Yoga.Node.create();
- root.setWidth(87.4);
- root.setHeight(113.4);
-
- const root_child0 = Yoga.Node.create();
- root_child0.setFlexGrow(0.7);
- root_child0.setFlexBasis(50.3);
- root_child0.setHeight(20.3);
- root.insertChild(root_child0, 0);
-
- const root_child1 = Yoga.Node.create();
- root_child1.setFlexGrow(1.6);
- root_child1.setHeight(10);
- root.insertChild(root_child1, 1);
-
- const root_child2 = Yoga.Node.create();
- root_child2.setFlexGrow(1.1);
- root_child2.setHeight(10.7);
- root.insertChild(root_child2, 2);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLeft()).toBe(0);
- expect(root.getComputedTop()).toBe(0);
- expect(root.getComputedWidth()).toBe(87);
- expect(root.getComputedHeight()).toBe(113);
-
- expect(root_child0.getComputedLeft()).toBe(0);
- expect(root_child0.getComputedTop()).toBe(0);
- expect(root_child0.getComputedWidth()).toBe(87);
- expect(root_child0.getComputedHeight()).toBe(59);
-
- expect(root_child1.getComputedLeft()).toBe(0);
- expect(root_child1.getComputedTop()).toBe(59);
- expect(root_child1.getComputedWidth()).toBe(87);
- expect(root_child1.getComputedHeight()).toBe(30);
-
- expect(root_child2.getComputedLeft()).toBe(0);
- expect(root_child2.getComputedTop()).toBe(89);
- expect(root_child2.getComputedWidth()).toBe(87);
- expect(root_child2.getComputedHeight()).toBe(24);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLeft()).toBe(0);
- expect(root.getComputedTop()).toBe(0);
- expect(root.getComputedWidth()).toBe(87);
- expect(root.getComputedHeight()).toBe(113);
-
- expect(root_child0.getComputedLeft()).toBe(0);
- expect(root_child0.getComputedTop()).toBe(0);
- expect(root_child0.getComputedWidth()).toBe(87);
- expect(root_child0.getComputedHeight()).toBe(59);
-
- expect(root_child1.getComputedLeft()).toBe(0);
- expect(root_child1.getComputedTop()).toBe(59);
- expect(root_child1.getComputedWidth()).toBe(87);
- expect(root_child1.getComputedHeight()).toBe(30);
-
- expect(root_child2.getComputedLeft()).toBe(0);
- expect(root_child2.getComputedTop()).toBe(89);
- expect(root_child2.getComputedWidth()).toBe(87);
- expect(root_child2.getComputedHeight()).toBe(24);
- });
-
- test('rounding_total_fractial_nested', () => {
- const root = Yoga.Node.create();
- root.setWidth(87.4);
- root.setHeight(113.4);
-
- const root_child0 = Yoga.Node.create();
- root_child0.setFlexGrow(0.7);
- root_child0.setFlexBasis(50.3);
- root_child0.setHeight(20.3);
- root.insertChild(root_child0, 0);
-
- const root_child0_child0 = Yoga.Node.create();
- root_child0_child0.setFlexGrow(1);
- root_child0_child0.setFlexBasis(0.3);
- root_child0_child0.setPosition(Yoga.EDGE_BOTTOM, 13.3);
- root_child0_child0.setHeight(9.9);
- root_child0.insertChild(root_child0_child0, 0);
-
- const root_child0_child1 = Yoga.Node.create();
- root_child0_child1.setFlexGrow(4);
- root_child0_child1.setFlexBasis(0.3);
- root_child0_child1.setPosition(Yoga.EDGE_TOP, 13.3);
- root_child0_child1.setHeight(1.1);
- root_child0.insertChild(root_child0_child1, 1);
-
- const root_child1 = Yoga.Node.create();
- root_child1.setFlexGrow(1.6);
- root_child1.setHeight(10);
- root.insertChild(root_child1, 1);
-
- const root_child2 = Yoga.Node.create();
- root_child2.setFlexGrow(1.1);
- root_child2.setHeight(10.7);
- root.insertChild(root_child2, 2);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLeft()).toBe(0);
- expect(root.getComputedTop()).toBe(0);
- expect(root.getComputedWidth()).toBe(87);
- expect(root.getComputedHeight()).toBe(113);
-
- expect(root_child0.getComputedLeft()).toBe(0);
- expect(root_child0.getComputedTop()).toBe(0);
- expect(root_child0.getComputedWidth()).toBe(87);
- expect(root_child0.getComputedHeight()).toBe(59);
-
- expect(root_child0_child0.getComputedLeft()).toBe(0);
- expect(root_child0_child0.getComputedTop()).toBe(-13);
- expect(root_child0_child0.getComputedWidth()).toBe(87);
- expect(root_child0_child0.getComputedHeight()).toBe(12);
-
- expect(root_child0_child1.getComputedLeft()).toBe(0);
- expect(root_child0_child1.getComputedTop()).toBe(25);
- expect(root_child0_child1.getComputedWidth()).toBe(87);
- expect(root_child0_child1.getComputedHeight()).toBe(47);
-
- expect(root_child1.getComputedLeft()).toBe(0);
- expect(root_child1.getComputedTop()).toBe(59);
- expect(root_child1.getComputedWidth()).toBe(87);
- expect(root_child1.getComputedHeight()).toBe(30);
-
- expect(root_child2.getComputedLeft()).toBe(0);
- expect(root_child2.getComputedTop()).toBe(89);
- expect(root_child2.getComputedWidth()).toBe(87);
- expect(root_child2.getComputedHeight()).toBe(24);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLeft()).toBe(0);
- expect(root.getComputedTop()).toBe(0);
- expect(root.getComputedWidth()).toBe(87);
- expect(root.getComputedHeight()).toBe(113);
-
- expect(root_child0.getComputedLeft()).toBe(0);
- expect(root_child0.getComputedTop()).toBe(0);
- expect(root_child0.getComputedWidth()).toBe(87);
- expect(root_child0.getComputedHeight()).toBe(59);
-
- expect(root_child0_child0.getComputedLeft()).toBe(0);
- expect(root_child0_child0.getComputedTop()).toBe(-13);
- expect(root_child0_child0.getComputedWidth()).toBe(87);
- expect(root_child0_child0.getComputedHeight()).toBe(12);
-
- expect(root_child0_child1.getComputedLeft()).toBe(0);
- expect(root_child0_child1.getComputedTop()).toBe(25);
- expect(root_child0_child1.getComputedWidth()).toBe(87);
- expect(root_child0_child1.getComputedHeight()).toBe(47);
-
- expect(root_child1.getComputedLeft()).toBe(0);
- expect(root_child1.getComputedTop()).toBe(59);
- expect(root_child1.getComputedWidth()).toBe(87);
- expect(root_child1.getComputedHeight()).toBe(30);
-
- expect(root_child2.getComputedLeft()).toBe(0);
- expect(root_child2.getComputedTop()).toBe(89);
- expect(root_child2.getComputedWidth()).toBe(87);
- expect(root_child2.getComputedHeight()).toBe(24);
- });
-
- test('rounding_fractial_input_1', () => {
- const root = Yoga.Node.create();
- root.setWidth(100);
- root.setHeight(113.4);
-
- const root_child0 = Yoga.Node.create();
- root_child0.setFlexGrow(1);
- root_child0.setFlexBasis(50);
- root_child0.setHeight(20);
- root.insertChild(root_child0, 0);
-
- const root_child1 = Yoga.Node.create();
- root_child1.setFlexGrow(1);
- root_child1.setHeight(10);
- root.insertChild(root_child1, 1);
-
- const root_child2 = Yoga.Node.create();
- root_child2.setFlexGrow(1);
- root_child2.setHeight(10);
- root.insertChild(root_child2, 2);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLeft()).toBe(0);
- expect(root.getComputedTop()).toBe(0);
- expect(root.getComputedWidth()).toBe(100);
- expect(root.getComputedHeight()).toBe(113);
-
- expect(root_child0.getComputedLeft()).toBe(0);
- expect(root_child0.getComputedTop()).toBe(0);
- expect(root_child0.getComputedWidth()).toBe(100);
- expect(root_child0.getComputedHeight()).toBe(64);
-
- expect(root_child1.getComputedLeft()).toBe(0);
- expect(root_child1.getComputedTop()).toBe(64);
- expect(root_child1.getComputedWidth()).toBe(100);
- expect(root_child1.getComputedHeight()).toBe(25);
-
- expect(root_child2.getComputedLeft()).toBe(0);
- expect(root_child2.getComputedTop()).toBe(89);
- expect(root_child2.getComputedWidth()).toBe(100);
- expect(root_child2.getComputedHeight()).toBe(24);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLeft()).toBe(0);
- expect(root.getComputedTop()).toBe(0);
- expect(root.getComputedWidth()).toBe(100);
- expect(root.getComputedHeight()).toBe(113);
-
- expect(root_child0.getComputedLeft()).toBe(0);
- expect(root_child0.getComputedTop()).toBe(0);
- expect(root_child0.getComputedWidth()).toBe(100);
- expect(root_child0.getComputedHeight()).toBe(64);
-
- expect(root_child1.getComputedLeft()).toBe(0);
- expect(root_child1.getComputedTop()).toBe(64);
- expect(root_child1.getComputedWidth()).toBe(100);
- expect(root_child1.getComputedHeight()).toBe(25);
-
- expect(root_child2.getComputedLeft()).toBe(0);
- expect(root_child2.getComputedTop()).toBe(89);
- expect(root_child2.getComputedWidth()).toBe(100);
- expect(root_child2.getComputedHeight()).toBe(24);
- });
-
- test('rounding_fractial_input_2', () => {
- const root = Yoga.Node.create();
- root.setWidth(100);
- root.setHeight(113.6);
-
- const root_child0 = Yoga.Node.create();
- root_child0.setFlexGrow(1);
- root_child0.setFlexBasis(50);
- root_child0.setHeight(20);
- root.insertChild(root_child0, 0);
-
- const root_child1 = Yoga.Node.create();
- root_child1.setFlexGrow(1);
- root_child1.setHeight(10);
- root.insertChild(root_child1, 1);
-
- const root_child2 = Yoga.Node.create();
- root_child2.setFlexGrow(1);
- root_child2.setHeight(10);
- root.insertChild(root_child2, 2);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLeft()).toBe(0);
- expect(root.getComputedTop()).toBe(0);
- expect(root.getComputedWidth()).toBe(100);
- expect(root.getComputedHeight()).toBe(114);
-
- expect(root_child0.getComputedLeft()).toBe(0);
- expect(root_child0.getComputedTop()).toBe(0);
- expect(root_child0.getComputedWidth()).toBe(100);
- expect(root_child0.getComputedHeight()).toBe(65);
-
- expect(root_child1.getComputedLeft()).toBe(0);
- expect(root_child1.getComputedTop()).toBe(65);
- expect(root_child1.getComputedWidth()).toBe(100);
- expect(root_child1.getComputedHeight()).toBe(24);
-
- expect(root_child2.getComputedLeft()).toBe(0);
- expect(root_child2.getComputedTop()).toBe(89);
- expect(root_child2.getComputedWidth()).toBe(100);
- expect(root_child2.getComputedHeight()).toBe(25);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLeft()).toBe(0);
- expect(root.getComputedTop()).toBe(0);
- expect(root.getComputedWidth()).toBe(100);
- expect(root.getComputedHeight()).toBe(114);
-
- expect(root_child0.getComputedLeft()).toBe(0);
- expect(root_child0.getComputedTop()).toBe(0);
- expect(root_child0.getComputedWidth()).toBe(100);
- expect(root_child0.getComputedHeight()).toBe(65);
-
- expect(root_child1.getComputedLeft()).toBe(0);
- expect(root_child1.getComputedTop()).toBe(65);
- expect(root_child1.getComputedWidth()).toBe(100);
- expect(root_child1.getComputedHeight()).toBe(24);
-
- expect(root_child2.getComputedLeft()).toBe(0);
- expect(root_child2.getComputedTop()).toBe(89);
- expect(root_child2.getComputedWidth()).toBe(100);
- expect(root_child2.getComputedHeight()).toBe(25);
- });
-
- test('rounding_fractial_input_3', () => {
- const root = Yoga.Node.create();
- root.setPosition(Yoga.EDGE_TOP, 0.3);
- root.setWidth(100);
- root.setHeight(113.4);
-
- const root_child0 = Yoga.Node.create();
- root_child0.setFlexGrow(1);
- root_child0.setFlexBasis(50);
- root_child0.setHeight(20);
- root.insertChild(root_child0, 0);
-
- const root_child1 = Yoga.Node.create();
- root_child1.setFlexGrow(1);
- root_child1.setHeight(10);
- root.insertChild(root_child1, 1);
-
- const root_child2 = Yoga.Node.create();
- root_child2.setFlexGrow(1);
- root_child2.setHeight(10);
- root.insertChild(root_child2, 2);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLeft()).toBe(0);
- expect(root.getComputedTop()).toBe(0);
- expect(root.getComputedWidth()).toBe(100);
- expect(root.getComputedHeight()).toBe(114);
-
- expect(root_child0.getComputedLeft()).toBe(0);
- expect(root_child0.getComputedTop()).toBe(0);
- expect(root_child0.getComputedWidth()).toBe(100);
- expect(root_child0.getComputedHeight()).toBe(65);
-
- expect(root_child1.getComputedLeft()).toBe(0);
- expect(root_child1.getComputedTop()).toBe(64);
- expect(root_child1.getComputedWidth()).toBe(100);
- expect(root_child1.getComputedHeight()).toBe(24);
-
- expect(root_child2.getComputedLeft()).toBe(0);
- expect(root_child2.getComputedTop()).toBe(89);
- expect(root_child2.getComputedWidth()).toBe(100);
- expect(root_child2.getComputedHeight()).toBe(25);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLeft()).toBe(0);
- expect(root.getComputedTop()).toBe(0);
- expect(root.getComputedWidth()).toBe(100);
- expect(root.getComputedHeight()).toBe(114);
-
- expect(root_child0.getComputedLeft()).toBe(0);
- expect(root_child0.getComputedTop()).toBe(0);
- expect(root_child0.getComputedWidth()).toBe(100);
- expect(root_child0.getComputedHeight()).toBe(65);
-
- expect(root_child1.getComputedLeft()).toBe(0);
- expect(root_child1.getComputedTop()).toBe(64);
- expect(root_child1.getComputedWidth()).toBe(100);
- expect(root_child1.getComputedHeight()).toBe(24);
-
- expect(root_child2.getComputedLeft()).toBe(0);
- expect(root_child2.getComputedTop()).toBe(89);
- expect(root_child2.getComputedWidth()).toBe(100);
- expect(root_child2.getComputedHeight()).toBe(25);
- });
-
- test('rounding_fractial_input_4', () => {
- const root = Yoga.Node.create();
- root.setPosition(Yoga.EDGE_TOP, 0.7);
- root.setWidth(100);
- root.setHeight(113.4);
-
- const root_child0 = Yoga.Node.create();
- root_child0.setFlexGrow(1);
- root_child0.setFlexBasis(50);
- root_child0.setHeight(20);
- root.insertChild(root_child0, 0);
-
- const root_child1 = Yoga.Node.create();
- root_child1.setFlexGrow(1);
- root_child1.setHeight(10);
- root.insertChild(root_child1, 1);
-
- const root_child2 = Yoga.Node.create();
- root_child2.setFlexGrow(1);
- root_child2.setHeight(10);
- root.insertChild(root_child2, 2);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLeft()).toBe(0);
- expect(root.getComputedTop()).toBe(1);
- expect(root.getComputedWidth()).toBe(100);
- expect(root.getComputedHeight()).toBe(113);
-
- expect(root_child0.getComputedLeft()).toBe(0);
- expect(root_child0.getComputedTop()).toBe(0);
- expect(root_child0.getComputedWidth()).toBe(100);
- expect(root_child0.getComputedHeight()).toBe(64);
-
- expect(root_child1.getComputedLeft()).toBe(0);
- expect(root_child1.getComputedTop()).toBe(64);
- expect(root_child1.getComputedWidth()).toBe(100);
- expect(root_child1.getComputedHeight()).toBe(25);
-
- expect(root_child2.getComputedLeft()).toBe(0);
- expect(root_child2.getComputedTop()).toBe(89);
- expect(root_child2.getComputedWidth()).toBe(100);
- expect(root_child2.getComputedHeight()).toBe(24);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLeft()).toBe(0);
- expect(root.getComputedTop()).toBe(1);
- expect(root.getComputedWidth()).toBe(100);
- expect(root.getComputedHeight()).toBe(113);
-
- expect(root_child0.getComputedLeft()).toBe(0);
- expect(root_child0.getComputedTop()).toBe(0);
- expect(root_child0.getComputedWidth()).toBe(100);
- expect(root_child0.getComputedHeight()).toBe(64);
-
- expect(root_child1.getComputedLeft()).toBe(0);
- expect(root_child1.getComputedTop()).toBe(64);
- expect(root_child1.getComputedWidth()).toBe(100);
- expect(root_child1.getComputedHeight()).toBe(25);
-
- expect(root_child2.getComputedLeft()).toBe(0);
- expect(root_child2.getComputedTop()).toBe(89);
- expect(root_child2.getComputedWidth()).toBe(100);
- expect(root_child2.getComputedHeight()).toBe(24);
- });
-
- test('rounding_inner_node_controversy_horizontal', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setWidth(320);
-
- const root_child0 = Yoga.Node.create();
- root_child0.setFlexGrow(1);
- root_child0.setHeight(10);
- root.insertChild(root_child0, 0);
-
- const root_child1 = Yoga.Node.create();
- root_child1.setFlexGrow(1);
- root_child1.setHeight(10);
- root.insertChild(root_child1, 1);
-
- const root_child1_child0 = Yoga.Node.create();
- root_child1_child0.setFlexGrow(1);
- root_child1_child0.setHeight(10);
- root_child1.insertChild(root_child1_child0, 0);
-
- const root_child2 = Yoga.Node.create();
- root_child2.setFlexGrow(1);
- root_child2.setHeight(10);
- root.insertChild(root_child2, 2);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLeft()).toBe(0);
- expect(root.getComputedTop()).toBe(0);
- expect(root.getComputedWidth()).toBe(320);
- expect(root.getComputedHeight()).toBe(10);
-
- expect(root_child0.getComputedLeft()).toBe(0);
- expect(root_child0.getComputedTop()).toBe(0);
- expect(root_child0.getComputedWidth()).toBe(107);
- expect(root_child0.getComputedHeight()).toBe(10);
-
- expect(root_child1.getComputedLeft()).toBe(107);
- expect(root_child1.getComputedTop()).toBe(0);
- expect(root_child1.getComputedWidth()).toBe(106);
- expect(root_child1.getComputedHeight()).toBe(10);
-
- expect(root_child1_child0.getComputedLeft()).toBe(0);
- expect(root_child1_child0.getComputedTop()).toBe(0);
- expect(root_child1_child0.getComputedWidth()).toBe(106);
- expect(root_child1_child0.getComputedHeight()).toBe(10);
-
- expect(root_child2.getComputedLeft()).toBe(213);
- expect(root_child2.getComputedTop()).toBe(0);
- expect(root_child2.getComputedWidth()).toBe(107);
- expect(root_child2.getComputedHeight()).toBe(10);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLeft()).toBe(0);
- expect(root.getComputedTop()).toBe(0);
- expect(root.getComputedWidth()).toBe(320);
- expect(root.getComputedHeight()).toBe(10);
-
- expect(root_child0.getComputedLeft()).toBe(213);
- expect(root_child0.getComputedTop()).toBe(0);
- expect(root_child0.getComputedWidth()).toBe(107);
- expect(root_child0.getComputedHeight()).toBe(10);
-
- expect(root_child1.getComputedLeft()).toBe(107);
- expect(root_child1.getComputedTop()).toBe(0);
- expect(root_child1.getComputedWidth()).toBe(106);
- expect(root_child1.getComputedHeight()).toBe(10);
-
- expect(root_child1_child0.getComputedLeft()).toBe(0);
- expect(root_child1_child0.getComputedTop()).toBe(0);
- expect(root_child1_child0.getComputedWidth()).toBe(106);
- expect(root_child1_child0.getComputedHeight()).toBe(10);
-
- expect(root_child2.getComputedLeft()).toBe(0);
- expect(root_child2.getComputedTop()).toBe(0);
- expect(root_child2.getComputedWidth()).toBe(107);
- expect(root_child2.getComputedHeight()).toBe(10);
- });
-
- test('rounding_inner_node_controversy_vertical', () => {
- const root = Yoga.Node.create();
- root.setHeight(320);
-
- const root_child0 = Yoga.Node.create();
- root_child0.setFlexGrow(1);
- root_child0.setWidth(10);
- root.insertChild(root_child0, 0);
-
- const root_child1 = Yoga.Node.create();
- root_child1.setFlexGrow(1);
- root_child1.setWidth(10);
- root.insertChild(root_child1, 1);
-
- const root_child1_child0 = Yoga.Node.create();
- root_child1_child0.setFlexGrow(1);
- root_child1_child0.setWidth(10);
- root_child1.insertChild(root_child1_child0, 0);
-
- const root_child2 = Yoga.Node.create();
- root_child2.setFlexGrow(1);
- root_child2.setWidth(10);
- root.insertChild(root_child2, 2);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLeft()).toBe(0);
- expect(root.getComputedTop()).toBe(0);
- expect(root.getComputedWidth()).toBe(10);
- expect(root.getComputedHeight()).toBe(320);
-
- expect(root_child0.getComputedLeft()).toBe(0);
- expect(root_child0.getComputedTop()).toBe(0);
- expect(root_child0.getComputedWidth()).toBe(10);
- expect(root_child0.getComputedHeight()).toBe(107);
-
- expect(root_child1.getComputedLeft()).toBe(0);
- expect(root_child1.getComputedTop()).toBe(107);
- expect(root_child1.getComputedWidth()).toBe(10);
- expect(root_child1.getComputedHeight()).toBe(106);
-
- expect(root_child1_child0.getComputedLeft()).toBe(0);
- expect(root_child1_child0.getComputedTop()).toBe(0);
- expect(root_child1_child0.getComputedWidth()).toBe(10);
- expect(root_child1_child0.getComputedHeight()).toBe(106);
-
- expect(root_child2.getComputedLeft()).toBe(0);
- expect(root_child2.getComputedTop()).toBe(213);
- expect(root_child2.getComputedWidth()).toBe(10);
- expect(root_child2.getComputedHeight()).toBe(107);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLeft()).toBe(0);
- expect(root.getComputedTop()).toBe(0);
- expect(root.getComputedWidth()).toBe(10);
- expect(root.getComputedHeight()).toBe(320);
-
- expect(root_child0.getComputedLeft()).toBe(0);
- expect(root_child0.getComputedTop()).toBe(0);
- expect(root_child0.getComputedWidth()).toBe(10);
- expect(root_child0.getComputedHeight()).toBe(107);
-
- expect(root_child1.getComputedLeft()).toBe(0);
- expect(root_child1.getComputedTop()).toBe(107);
- expect(root_child1.getComputedWidth()).toBe(10);
- expect(root_child1.getComputedHeight()).toBe(106);
-
- expect(root_child1_child0.getComputedLeft()).toBe(0);
- expect(root_child1_child0.getComputedTop()).toBe(0);
- expect(root_child1_child0.getComputedWidth()).toBe(10);
- expect(root_child1_child0.getComputedHeight()).toBe(106);
-
- expect(root_child2.getComputedLeft()).toBe(0);
- expect(root_child2.getComputedTop()).toBe(213);
- expect(root_child2.getComputedWidth()).toBe(10);
- expect(root_child2.getComputedHeight()).toBe(107);
- });
-
- test('rounding_inner_node_controversy_combined', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setWidth(640);
- root.setHeight(320);
-
- const root_child0 = Yoga.Node.create();
- root_child0.setFlexGrow(1);
- root_child0.setHeightPercent(100);
- root.insertChild(root_child0, 0);
-
- const root_child1 = Yoga.Node.create();
- root_child1.setFlexGrow(1);
- root_child1.setHeightPercent(100);
- root.insertChild(root_child1, 1);
-
- const root_child1_child0 = Yoga.Node.create();
- root_child1_child0.setFlexGrow(1);
- root_child1_child0.setWidthPercent(100);
- root_child1.insertChild(root_child1_child0, 0);
-
- const root_child1_child1 = Yoga.Node.create();
- root_child1_child1.setFlexGrow(1);
- root_child1_child1.setWidthPercent(100);
- root_child1.insertChild(root_child1_child1, 1);
-
- const root_child1_child1_child0 = Yoga.Node.create();
- root_child1_child1_child0.setFlexGrow(1);
- root_child1_child1_child0.setWidthPercent(100);
- root_child1_child1.insertChild(root_child1_child1_child0, 0);
-
- const root_child1_child2 = Yoga.Node.create();
- root_child1_child2.setFlexGrow(1);
- root_child1_child2.setWidthPercent(100);
- root_child1.insertChild(root_child1_child2, 2);
-
- const root_child2 = Yoga.Node.create();
- root_child2.setFlexGrow(1);
- root_child2.setHeightPercent(100);
- root.insertChild(root_child2, 2);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLeft()).toBe(0);
- expect(root.getComputedTop()).toBe(0);
- expect(root.getComputedWidth()).toBe(640);
- expect(root.getComputedHeight()).toBe(320);
-
- expect(root_child0.getComputedLeft()).toBe(0);
- expect(root_child0.getComputedTop()).toBe(0);
- expect(root_child0.getComputedWidth()).toBe(213);
- expect(root_child0.getComputedHeight()).toBe(320);
-
- expect(root_child1.getComputedLeft()).toBe(213);
- expect(root_child1.getComputedTop()).toBe(0);
- expect(root_child1.getComputedWidth()).toBe(214);
- expect(root_child1.getComputedHeight()).toBe(320);
-
- expect(root_child1_child0.getComputedLeft()).toBe(0);
- expect(root_child1_child0.getComputedTop()).toBe(0);
- expect(root_child1_child0.getComputedWidth()).toBe(214);
- expect(root_child1_child0.getComputedHeight()).toBe(107);
-
- expect(root_child1_child1.getComputedLeft()).toBe(0);
- expect(root_child1_child1.getComputedTop()).toBe(107);
- expect(root_child1_child1.getComputedWidth()).toBe(214);
- expect(root_child1_child1.getComputedHeight()).toBe(106);
-
- expect(root_child1_child1_child0.getComputedLeft()).toBe(0);
- expect(root_child1_child1_child0.getComputedTop()).toBe(0);
- expect(root_child1_child1_child0.getComputedWidth()).toBe(214);
- expect(root_child1_child1_child0.getComputedHeight()).toBe(106);
-
- expect(root_child1_child2.getComputedLeft()).toBe(0);
- expect(root_child1_child2.getComputedTop()).toBe(213);
- expect(root_child1_child2.getComputedWidth()).toBe(214);
- expect(root_child1_child2.getComputedHeight()).toBe(107);
-
- expect(root_child2.getComputedLeft()).toBe(427);
- expect(root_child2.getComputedTop()).toBe(0);
- expect(root_child2.getComputedWidth()).toBe(213);
- expect(root_child2.getComputedHeight()).toBe(320);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLeft()).toBe(0);
- expect(root.getComputedTop()).toBe(0);
- expect(root.getComputedWidth()).toBe(640);
- expect(root.getComputedHeight()).toBe(320);
-
- expect(root_child0.getComputedLeft()).toBe(427);
- expect(root_child0.getComputedTop()).toBe(0);
- expect(root_child0.getComputedWidth()).toBe(213);
- expect(root_child0.getComputedHeight()).toBe(320);
-
- expect(root_child1.getComputedLeft()).toBe(213);
- expect(root_child1.getComputedTop()).toBe(0);
- expect(root_child1.getComputedWidth()).toBe(214);
- expect(root_child1.getComputedHeight()).toBe(320);
-
- expect(root_child1_child0.getComputedLeft()).toBe(0);
- expect(root_child1_child0.getComputedTop()).toBe(0);
- expect(root_child1_child0.getComputedWidth()).toBe(214);
- expect(root_child1_child0.getComputedHeight()).toBe(107);
-
- expect(root_child1_child1.getComputedLeft()).toBe(0);
- expect(root_child1_child1.getComputedTop()).toBe(107);
- expect(root_child1_child1.getComputedWidth()).toBe(214);
- expect(root_child1_child1.getComputedHeight()).toBe(106);
-
- expect(root_child1_child1_child0.getComputedLeft()).toBe(0);
- expect(root_child1_child1_child0.getComputedTop()).toBe(0);
- expect(root_child1_child1_child0.getComputedWidth()).toBe(214);
- expect(root_child1_child1_child0.getComputedHeight()).toBe(106);
-
- expect(root_child1_child2.getComputedLeft()).toBe(0);
- expect(root_child1_child2.getComputedTop()).toBe(213);
- expect(root_child1_child2.getComputedWidth()).toBe(214);
- expect(root_child1_child2.getComputedHeight()).toBe(107);
-
- expect(root_child2.getComputedLeft()).toBe(0);
- expect(root_child2.getComputedTop()).toBe(0);
- expect(root_child2.getComputedWidth()).toBe(213);
- expect(root_child2.getComputedHeight()).toBe(320);
- });
-});
diff --git a/packages/yoga/tests/sizeOverflow.test.js b/packages/yoga/tests/sizeOverflow.test.js
deleted file mode 100644
index 79de2d9d4..000000000
--- a/packages/yoga/tests/sizeOverflow.test.js
+++ /dev/null
@@ -1,147 +0,0 @@
-const Yoga = require('..');
-
-describe('Size overflow', () => {
- test('nested_overflowing_child', () => {
- const root = Yoga.Node.create();
- root.setWidth(100);
- root.setHeight(100);
-
- const root_child0 = Yoga.Node.create();
- root.insertChild(root_child0, 0);
-
- const root_child0_child0 = Yoga.Node.create();
- root_child0_child0.setWidth(200);
- root_child0_child0.setHeight(200);
- root_child0.insertChild(root_child0_child0, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLeft()).toBe(0);
- expect(root.getComputedTop()).toBe(0);
- expect(root.getComputedWidth()).toBe(100);
- expect(root.getComputedHeight()).toBe(100);
-
- expect(root_child0.getComputedLeft()).toBe(0);
- expect(root_child0.getComputedTop()).toBe(0);
- expect(root_child0.getComputedWidth()).toBe(100);
- expect(root_child0.getComputedHeight()).toBe(200);
-
- expect(root_child0_child0.getComputedLeft()).toBe(0);
- expect(root_child0_child0.getComputedTop()).toBe(0);
- expect(root_child0_child0.getComputedWidth()).toBe(200);
- expect(root_child0_child0.getComputedHeight()).toBe(200);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLeft()).toBe(0);
- expect(root.getComputedTop()).toBe(0);
- expect(root.getComputedWidth()).toBe(100);
- expect(root.getComputedHeight()).toBe(100);
-
- expect(root_child0.getComputedLeft()).toBe(0);
- expect(root_child0.getComputedTop()).toBe(0);
- expect(root_child0.getComputedWidth()).toBe(100);
- expect(root_child0.getComputedHeight()).toBe(200);
-
- expect(root_child0_child0.getComputedLeft()).toBe(-100);
- expect(root_child0_child0.getComputedTop()).toBe(0);
- expect(root_child0_child0.getComputedWidth()).toBe(200);
- expect(root_child0_child0.getComputedHeight()).toBe(200);
- });
-
- test('nested_overflowing_child_in_constraint_parent', () => {
- const root = Yoga.Node.create();
- root.setWidth(100);
- root.setHeight(100);
-
- const root_child0 = Yoga.Node.create();
- root_child0.setWidth(100);
- root_child0.setHeight(100);
- root.insertChild(root_child0, 0);
-
- const root_child0_child0 = Yoga.Node.create();
- root_child0_child0.setWidth(200);
- root_child0_child0.setHeight(200);
- root_child0.insertChild(root_child0_child0, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLeft()).toBe(0);
- expect(root.getComputedTop()).toBe(0);
- expect(root.getComputedWidth()).toBe(100);
- expect(root.getComputedHeight()).toBe(100);
-
- expect(root_child0.getComputedLeft()).toBe(0);
- expect(root_child0.getComputedTop()).toBe(0);
- expect(root_child0.getComputedWidth()).toBe(100);
- expect(root_child0.getComputedHeight()).toBe(100);
-
- expect(root_child0_child0.getComputedLeft()).toBe(0);
- expect(root_child0_child0.getComputedTop()).toBe(0);
- expect(root_child0_child0.getComputedWidth()).toBe(200);
- expect(root_child0_child0.getComputedHeight()).toBe(200);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLeft()).toBe(0);
- expect(root.getComputedTop()).toBe(0);
- expect(root.getComputedWidth()).toBe(100);
- expect(root.getComputedHeight()).toBe(100);
-
- expect(root_child0.getComputedLeft()).toBe(0);
- expect(root_child0.getComputedTop()).toBe(0);
- expect(root_child0.getComputedWidth()).toBe(100);
- expect(root_child0.getComputedHeight()).toBe(100);
-
- expect(root_child0_child0.getComputedLeft()).toBe(-100);
- expect(root_child0_child0.getComputedTop()).toBe(0);
- expect(root_child0_child0.getComputedWidth()).toBe(200);
- expect(root_child0_child0.getComputedHeight()).toBe(200);
- });
-
- test('parent_wrap_child_size_overflowing_parent', () => {
- const root = Yoga.Node.create();
- root.setWidth(100);
- root.setHeight(100);
-
- const root_child0 = Yoga.Node.create();
- root_child0.setWidth(100);
- root.insertChild(root_child0, 0);
-
- const root_child0_child0 = Yoga.Node.create();
- root_child0_child0.setWidth(100);
- root_child0_child0.setHeight(200);
- root_child0.insertChild(root_child0_child0, 0);
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
-
- expect(root.getComputedLeft()).toBe(0);
- expect(root.getComputedTop()).toBe(0);
- expect(root.getComputedWidth()).toBe(100);
- expect(root.getComputedHeight()).toBe(100);
-
- expect(root_child0.getComputedLeft()).toBe(0);
- expect(root_child0.getComputedTop()).toBe(0);
- expect(root_child0.getComputedWidth()).toBe(100);
- expect(root_child0.getComputedHeight()).toBe(200);
-
- expect(root_child0_child0.getComputedLeft()).toBe(0);
- expect(root_child0_child0.getComputedTop()).toBe(0);
- expect(root_child0_child0.getComputedWidth()).toBe(100);
- expect(root_child0_child0.getComputedHeight()).toBe(200);
-
- root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
-
- expect(root.getComputedLeft()).toBe(0);
- expect(root.getComputedTop()).toBe(0);
- expect(root.getComputedWidth()).toBe(100);
- expect(root.getComputedHeight()).toBe(100);
-
- expect(root_child0.getComputedLeft()).toBe(0);
- expect(root_child0.getComputedTop()).toBe(0);
- expect(root_child0.getComputedWidth()).toBe(100);
- expect(root_child0.getComputedHeight()).toBe(200);
-
- expect(root_child0_child0.getComputedLeft()).toBe(0);
- expect(root_child0_child0.getComputedTop()).toBe(0);
- expect(root_child0_child0.getComputedWidth()).toBe(100);
- expect(root_child0_child0.getComputedHeight()).toBe(200);
- });
-});
diff --git a/packages/yoga/tests/zeroOutLayoutRecursivly.test.js b/packages/yoga/tests/zeroOutLayoutRecursivly.test.js
deleted file mode 100644
index c794a8a16..000000000
--- a/packages/yoga/tests/zeroOutLayoutRecursivly.test.js
+++ /dev/null
@@ -1,29 +0,0 @@
-const Yoga = require('..');
-
-describe('Zero out layout recursivly', () => {
- test('zero_out_layout', () => {
- const root = Yoga.Node.create();
- root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
- root.setWidth(200);
- root.setHeight(200);
-
- const child = Yoga.Node.create();
- root.insertChild(child, 0);
- child.setWidth(100);
- child.setHeight(100);
- child.setMargin(Yoga.EDGE_TOP, 10);
- child.setPadding(Yoga.EDGE_TOP, 10);
-
- root.calculateLayout(100, 100, Yoga.DIRECTION_LTR);
-
- expect(child.getComputedMargin(Yoga.EDGE_TOP)).toBe(10);
- expect(child.getComputedPadding(Yoga.EDGE_TOP)).toBe(10);
-
- child.setDisplay(Yoga.DISPLAY_NONE);
-
- root.calculateLayout(100, 100, Yoga.DIRECTION_LTR);
-
- expect(child.getComputedMargin(Yoga.EDGE_TOP)).toBe(0);
- expect(child.getComputedPadding(Yoga.EDGE_TOP)).toBe(0);
- });
-});
diff --git a/vitest.config.js b/vitest.config.js
new file mode 100644
index 000000000..697f81658
--- /dev/null
+++ b/vitest.config.js
@@ -0,0 +1,16 @@
+// false positive on import/no-unresolved
+// eslint-disable-next-line import/no-unresolved
+import { defineConfig } from 'vitest/config';
+import react from '@vitejs/plugin-react';
+
+export default defineConfig({
+ plugins: [react()],
+ test: {
+ watch: false,
+ poolOptions: {
+ threads: {
+ isolate: false,
+ },
+ },
+ },
+});
diff --git a/vitest.workspace.js b/vitest.workspace.js
new file mode 100644
index 000000000..36e23f545
--- /dev/null
+++ b/vitest.workspace.js
@@ -0,0 +1,13 @@
+export default [
+ 'packages/fns',
+ 'packages/font',
+ 'packages/image',
+ 'packages/render',
+ 'packages/layout',
+ 'packages/svgkit',
+ 'packages/textkit',
+ 'packages/renderer/vitest.config.js',
+ 'packages/renderer/vitest.browser.config.js',
+ 'packages/stylesheet',
+ 'packages/primitives',
+];
diff --git a/yarn.lock b/yarn.lock
index e248faecb..58b6ff166 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2,6 +2,11 @@
# yarn lockfile v1
+"@aashutoshrathi/word-wrap@^1.2.3":
+ version "1.2.6"
+ resolved "https://registry.yarnpkg.com/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz#bd9154aec9983f77b3a034ecaa015c2e4201f6cf"
+ integrity sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==
+
"@ampproject/remapping@^2.2.0":
version "2.2.1"
resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.1.tgz#99e8e11851128b8702cd57c33684f1d0f260b630"
@@ -10,6 +15,15 @@
"@jridgewell/gen-mapping" "^0.3.0"
"@jridgewell/trace-mapping" "^0.3.9"
+"@asamuzakjp/dom-selector@^2.0.1":
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/@asamuzakjp/dom-selector/-/dom-selector-2.0.2.tgz#160f601d9a465bbdf641410afdc527f37325506e"
+ integrity sha512-x1KXOatwofR6ZAYzXRBL5wrdV0vwNxlTCK9NCuLqAzQYARqGcvFwiJA6A1ERuh+dgeA4Dxm3JBYictIes+SqUQ==
+ dependencies:
+ bidi-js "^1.0.3"
+ css-tree "^2.3.1"
+ is-potential-custom-element-name "^1.0.1"
+
"@babel/cli@^7.20.7":
version "7.20.7"
resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.20.7.tgz#8fc12e85c744a1a617680eacb488fab1fcd35b7c"
@@ -26,45 +40,46 @@
"@nicolo-ribaudo/chokidar-2" "2.1.8-no-fsevents.3"
chokidar "^3.4.0"
-"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.21.4":
- version "7.21.4"
- resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.21.4.tgz#d0fa9e4413aca81f2b23b9442797bda1826edb39"
- integrity sha512-LYvhNKfwWSPpocw8GI7gpK2nq3HSDuEPC/uSYaALSJu9xjsalaaYFOq0Pwt5KmVqwEbZlDu81aLXwBOmD/Fv9g==
+"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.22.13", "@babel/code-frame@^7.23.5":
+ version "7.23.5"
+ resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.23.5.tgz#9009b69a8c602293476ad598ff53e4562e15c244"
+ integrity sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==
dependencies:
- "@babel/highlight" "^7.18.6"
+ "@babel/highlight" "^7.23.4"
+ chalk "^2.4.2"
-"@babel/compat-data@^7.17.7", "@babel/compat-data@^7.20.1", "@babel/compat-data@^7.20.5", "@babel/compat-data@^7.22.0":
- version "7.22.3"
- resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.22.3.tgz#cd502a6a0b6e37d7ad72ce7e71a7160a3ae36f7e"
- integrity sha512-aNtko9OPOwVESUFp3MZfD8Uzxl7JzSeJpd7npIoxCasU37PFbAQRpKglkaKwlHOyeJdrREpo8TW8ldrkYWwvIQ==
+"@babel/compat-data@^7.17.7", "@babel/compat-data@^7.20.1", "@babel/compat-data@^7.20.5", "@babel/compat-data@^7.23.5":
+ version "7.23.5"
+ resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.23.5.tgz#ffb878728bb6bdcb6f4510aa51b1be9afb8cfd98"
+ integrity sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw==
-"@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.20.7":
- version "7.22.1"
- resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.22.1.tgz#5de51c5206f4c6f5533562838337a603c1033cfd"
- integrity sha512-Hkqu7J4ynysSXxmAahpN1jjRwVJ+NdpraFLIWflgjpVob3KNyK3/tIUc7Q7szed8WMp0JNa7Qtd1E9Oo22F9gA==
+"@babel/core@^7.20.7", "@babel/core@^7.23.5":
+ version "7.23.7"
+ resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.23.7.tgz#4d8016e06a14b5f92530a13ed0561730b5c6483f"
+ integrity sha512-+UpDgowcmqe36d4NwqvKsyPMlOLNGMsfMmQ5WGCu+siCe3t3dfe9njrzGfdN4qq+bcNUt0+Vw6haRxBOycs4dw==
dependencies:
"@ampproject/remapping" "^2.2.0"
- "@babel/code-frame" "^7.21.4"
- "@babel/generator" "^7.22.0"
- "@babel/helper-compilation-targets" "^7.22.1"
- "@babel/helper-module-transforms" "^7.22.1"
- "@babel/helpers" "^7.22.0"
- "@babel/parser" "^7.22.0"
- "@babel/template" "^7.21.9"
- "@babel/traverse" "^7.22.1"
- "@babel/types" "^7.22.0"
- convert-source-map "^1.7.0"
+ "@babel/code-frame" "^7.23.5"
+ "@babel/generator" "^7.23.6"
+ "@babel/helper-compilation-targets" "^7.23.6"
+ "@babel/helper-module-transforms" "^7.23.3"
+ "@babel/helpers" "^7.23.7"
+ "@babel/parser" "^7.23.6"
+ "@babel/template" "^7.22.15"
+ "@babel/traverse" "^7.23.7"
+ "@babel/types" "^7.23.6"
+ convert-source-map "^2.0.0"
debug "^4.1.0"
gensync "^1.0.0-beta.2"
- json5 "^2.2.2"
- semver "^6.3.0"
+ json5 "^2.2.3"
+ semver "^6.3.1"
-"@babel/generator@^7.22.0", "@babel/generator@^7.22.3", "@babel/generator@^7.7.2":
- version "7.22.3"
- resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.22.3.tgz#0ff675d2edb93d7596c5f6728b52615cfc0df01e"
- integrity sha512-C17MW4wlk//ES/CJDL51kPNwl+qiBQyN7b9SKyVp11BLGFeSPoVaHrv+MNt8jwQFhQWowW88z1eeBx3pFz9v8A==
+"@babel/generator@^7.23.6":
+ version "7.23.6"
+ resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.23.6.tgz#9e1fca4811c77a10580d17d26b57b036133f3c2e"
+ integrity sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw==
dependencies:
- "@babel/types" "^7.22.3"
+ "@babel/types" "^7.23.6"
"@jridgewell/gen-mapping" "^0.3.2"
"@jridgewell/trace-mapping" "^0.3.17"
jsesc "^2.5.1"
@@ -84,16 +99,16 @@
"@babel/helper-explode-assignable-expression" "^7.18.6"
"@babel/types" "^7.18.9"
-"@babel/helper-compilation-targets@^7.17.7", "@babel/helper-compilation-targets@^7.18.9", "@babel/helper-compilation-targets@^7.20.0", "@babel/helper-compilation-targets@^7.20.7", "@babel/helper-compilation-targets@^7.22.1":
- version "7.22.1"
- resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.1.tgz#bfcd6b7321ffebe33290d68550e2c9d7eb7c7a58"
- integrity sha512-Rqx13UM3yVB5q0D/KwQ8+SPfX/+Rnsy1Lw1k/UwOC4KC6qrzIQoY3lYnBu5EHKBlEHHcj0M0W8ltPSkD8rqfsQ==
+"@babel/helper-compilation-targets@^7.17.7", "@babel/helper-compilation-targets@^7.18.9", "@babel/helper-compilation-targets@^7.20.0", "@babel/helper-compilation-targets@^7.20.7", "@babel/helper-compilation-targets@^7.23.6":
+ version "7.23.6"
+ resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.23.6.tgz#4d79069b16cbcf1461289eccfbbd81501ae39991"
+ integrity sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==
dependencies:
- "@babel/compat-data" "^7.22.0"
- "@babel/helper-validator-option" "^7.21.0"
- browserslist "^4.21.3"
+ "@babel/compat-data" "^7.23.5"
+ "@babel/helper-validator-option" "^7.23.5"
+ browserslist "^4.22.2"
lru-cache "^5.1.1"
- semver "^6.3.0"
+ semver "^6.3.1"
"@babel/helper-create-class-features-plugin@^7.18.6", "@babel/helper-create-class-features-plugin@^7.20.12", "@babel/helper-create-class-features-plugin@^7.20.5", "@babel/helper-create-class-features-plugin@^7.20.7":
version "7.20.12"
@@ -129,10 +144,10 @@
resolve "^1.14.2"
semver "^6.1.2"
-"@babel/helper-environment-visitor@^7.18.9", "@babel/helper-environment-visitor@^7.22.1":
- version "7.22.1"
- resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.1.tgz#ac3a56dbada59ed969d712cf527bd8271fe3eba8"
- integrity sha512-Z2tgopurB/kTbidvzeBrc2To3PUP/9i5MUe+fU6QJCQDyPwSH2oRapkLw3KGECDYSjhQZCNxEvNvZlLw8JjGwA==
+"@babel/helper-environment-visitor@^7.18.9", "@babel/helper-environment-visitor@^7.22.20":
+ version "7.22.20"
+ resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz#96159db61d34a29dba454c959f5ae4a649ba9167"
+ integrity sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==
"@babel/helper-explode-assignable-expression@^7.18.6":
version "7.18.6"
@@ -141,20 +156,20 @@
dependencies:
"@babel/types" "^7.18.6"
-"@babel/helper-function-name@^7.18.9", "@babel/helper-function-name@^7.19.0", "@babel/helper-function-name@^7.21.0":
- version "7.21.0"
- resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.21.0.tgz#d552829b10ea9f120969304023cd0645fa00b1b4"
- integrity sha512-HfK1aMRanKHpxemaY2gqBmL04iAPOPRj7DxtNbiDOrJK+gdwkiNRVpCpUJYbUT+aZyemKN8brqTOxzCaG6ExRg==
+"@babel/helper-function-name@^7.18.9", "@babel/helper-function-name@^7.19.0", "@babel/helper-function-name@^7.23.0":
+ version "7.23.0"
+ resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz#1f9a3cdbd5b2698a670c30d2735f9af95ed52759"
+ integrity sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==
dependencies:
- "@babel/template" "^7.20.7"
- "@babel/types" "^7.21.0"
+ "@babel/template" "^7.22.15"
+ "@babel/types" "^7.23.0"
-"@babel/helper-hoist-variables@^7.18.6":
- version "7.18.6"
- resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz#d4d2c8fb4baeaa5c68b99cc8245c56554f926678"
- integrity sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==
+"@babel/helper-hoist-variables@^7.18.6", "@babel/helper-hoist-variables@^7.22.5":
+ version "7.22.5"
+ resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz#c01a007dac05c085914e8fb652b339db50d823bb"
+ integrity sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==
dependencies:
- "@babel/types" "^7.18.6"
+ "@babel/types" "^7.22.5"
"@babel/helper-member-expression-to-functions@^7.20.7":
version "7.20.7"
@@ -163,26 +178,23 @@
dependencies:
"@babel/types" "^7.20.7"
-"@babel/helper-module-imports@^7.10.4", "@babel/helper-module-imports@^7.18.6", "@babel/helper-module-imports@^7.21.4":
- version "7.21.4"
- resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.21.4.tgz#ac88b2f76093637489e718a90cec6cf8a9b029af"
- integrity sha512-orajc5T2PsRYUN3ZryCEFeMDYwyw09c/pZeaQEZPH0MpKzSvn3e0uXsDBu3k03VI+9DBiRo+l22BfKTpKwa/Wg==
+"@babel/helper-module-imports@^7.18.6", "@babel/helper-module-imports@^7.22.15":
+ version "7.22.15"
+ resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz#16146307acdc40cc00c3b2c647713076464bdbf0"
+ integrity sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==
dependencies:
- "@babel/types" "^7.21.4"
+ "@babel/types" "^7.22.15"
-"@babel/helper-module-transforms@^7.18.6", "@babel/helper-module-transforms@^7.20.11", "@babel/helper-module-transforms@^7.22.1":
- version "7.22.1"
- resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.22.1.tgz#e0cad47fedcf3cae83c11021696376e2d5a50c63"
- integrity sha512-dxAe9E7ySDGbQdCVOY/4+UcD8M9ZFqZcZhSPsPacvCG4M+9lwtDDQfI2EoaSvmf7W/8yCBkGU0m7Pvt1ru3UZw==
+"@babel/helper-module-transforms@^7.18.6", "@babel/helper-module-transforms@^7.20.11", "@babel/helper-module-transforms@^7.23.3":
+ version "7.23.3"
+ resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.23.3.tgz#d7d12c3c5d30af5b3c0fcab2a6d5217773e2d0f1"
+ integrity sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==
dependencies:
- "@babel/helper-environment-visitor" "^7.22.1"
- "@babel/helper-module-imports" "^7.21.4"
- "@babel/helper-simple-access" "^7.21.5"
- "@babel/helper-split-export-declaration" "^7.18.6"
- "@babel/helper-validator-identifier" "^7.19.1"
- "@babel/template" "^7.21.9"
- "@babel/traverse" "^7.22.1"
- "@babel/types" "^7.22.0"
+ "@babel/helper-environment-visitor" "^7.22.20"
+ "@babel/helper-module-imports" "^7.22.15"
+ "@babel/helper-simple-access" "^7.22.5"
+ "@babel/helper-split-export-declaration" "^7.22.6"
+ "@babel/helper-validator-identifier" "^7.22.20"
"@babel/helper-optimise-call-expression@^7.18.6":
version "7.18.6"
@@ -191,10 +203,10 @@
dependencies:
"@babel/types" "^7.18.6"
-"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.16.7", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.18.9", "@babel/helper-plugin-utils@^7.19.0", "@babel/helper-plugin-utils@^7.20.2", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3":
- version "7.20.2"
- resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.20.2.tgz#d1b9000752b18d0877cff85a5c376ce5c3121629"
- integrity sha512-8RvlJG2mj4huQ4pZ+rU9lqKi9ZKiRmuvGuM2HlWmkmgOhbs6zEAw6IEiJ5cQqGbDzGZOhwuOQNtZMi/ENLjZoQ==
+"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.16.7", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.18.9", "@babel/helper-plugin-utils@^7.19.0", "@babel/helper-plugin-utils@^7.20.2", "@babel/helper-plugin-utils@^7.22.5", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3":
+ version "7.22.5"
+ resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz#dd7ee3735e8a313b9f7b05a773d892e88e6d7295"
+ integrity sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==
"@babel/helper-remap-async-to-generator@^7.18.9":
version "7.18.9"
@@ -218,12 +230,12 @@
"@babel/traverse" "^7.20.7"
"@babel/types" "^7.20.7"
-"@babel/helper-simple-access@^7.20.2", "@babel/helper-simple-access@^7.21.5":
- version "7.21.5"
- resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.21.5.tgz#d697a7971a5c39eac32c7e63c0921c06c8a249ee"
- integrity sha512-ENPDAMC1wAjR0uaCUwliBdiSl1KBJAVnMTzXqi64c2MG8MPR6ii4qf7bSXDqSFbr4W6W028/rf5ivoHop5/mkg==
+"@babel/helper-simple-access@^7.20.2", "@babel/helper-simple-access@^7.22.5":
+ version "7.22.5"
+ resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz#4938357dc7d782b80ed6dbb03a0fba3d22b1d5de"
+ integrity sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==
dependencies:
- "@babel/types" "^7.21.5"
+ "@babel/types" "^7.22.5"
"@babel/helper-skip-transparent-expression-wrappers@^7.20.0":
version "7.20.0"
@@ -232,27 +244,27 @@
dependencies:
"@babel/types" "^7.20.0"
-"@babel/helper-split-export-declaration@^7.18.6":
- version "7.18.6"
- resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz#7367949bc75b20c6d5a5d4a97bba2824ae8ef075"
- integrity sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==
+"@babel/helper-split-export-declaration@^7.18.6", "@babel/helper-split-export-declaration@^7.22.6":
+ version "7.22.6"
+ resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz#322c61b7310c0997fe4c323955667f18fcefb91c"
+ integrity sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==
dependencies:
- "@babel/types" "^7.18.6"
+ "@babel/types" "^7.22.5"
-"@babel/helper-string-parser@^7.21.5":
- version "7.21.5"
- resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.21.5.tgz#2b3eea65443c6bdc31c22d037c65f6d323b6b2bd"
- integrity sha512-5pTUx3hAJaZIdW99sJ6ZUUgWq/Y+Hja7TowEnLNMm1VivRgZQL3vpBY3qUACVsvw+yQU6+YgfBVmcbLaZtrA1w==
+"@babel/helper-string-parser@^7.23.4":
+ version "7.23.4"
+ resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz#9478c707febcbbe1ddb38a3d91a2e054ae622d83"
+ integrity sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==
-"@babel/helper-validator-identifier@^7.18.6", "@babel/helper-validator-identifier@^7.19.1":
- version "7.19.1"
- resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz#7eea834cf32901ffdc1a7ee555e2f9c27e249ca2"
- integrity sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==
+"@babel/helper-validator-identifier@^7.19.1", "@babel/helper-validator-identifier@^7.22.20":
+ version "7.22.20"
+ resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz#c4ae002c61d2879e724581d96665583dbc1dc0e0"
+ integrity sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==
-"@babel/helper-validator-option@^7.18.6", "@babel/helper-validator-option@^7.21.0":
- version "7.21.0"
- resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.21.0.tgz#8224c7e13ace4bafdc4004da2cf064ef42673180"
- integrity sha512-rmL/B8/f0mKS2baE9ZpyTcTavvEuWhTTW8amjzXNvYG4AwBsqTLikfXsEofsJEfKHf+HQVQbFOHy6o+4cnC/fQ==
+"@babel/helper-validator-option@^7.18.6", "@babel/helper-validator-option@^7.23.5":
+ version "7.23.5"
+ resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz#907a3fbd4523426285365d1206c423c4c5520307"
+ integrity sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==
"@babel/helper-wrap-function@^7.18.9":
version "7.20.5"
@@ -264,40 +276,28 @@
"@babel/traverse" "^7.20.5"
"@babel/types" "^7.20.5"
-"@babel/helpers@^7.22.0":
- version "7.22.3"
- resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.22.3.tgz#53b74351da9684ea2f694bf0877998da26dd830e"
- integrity sha512-jBJ7jWblbgr7r6wYZHMdIqKc73ycaTcCaWRq4/2LpuPHcx7xMlZvpGQkOYc9HeSjn6rcx15CPlgVcBtZ4WZJ2w==
+"@babel/helpers@^7.23.7":
+ version "7.23.8"
+ resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.23.8.tgz#fc6b2d65b16847fd50adddbd4232c76378959e34"
+ integrity sha512-KDqYz4PiOWvDFrdHLPhKtCThtIcKVy6avWD2oG4GEvyQ+XDZwHD4YQd+H2vNMnq2rkdxsDkU82T+Vk8U/WXHRQ==
dependencies:
- "@babel/template" "^7.21.9"
- "@babel/traverse" "^7.22.1"
- "@babel/types" "^7.22.3"
+ "@babel/template" "^7.22.15"
+ "@babel/traverse" "^7.23.7"
+ "@babel/types" "^7.23.6"
-"@babel/highlight@^7.18.6":
- version "7.18.6"
- resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.18.6.tgz#81158601e93e2563795adcbfbdf5d64be3f2ecdf"
- integrity sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==
+"@babel/highlight@^7.23.4":
+ version "7.23.4"
+ resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.23.4.tgz#edaadf4d8232e1a961432db785091207ead0621b"
+ integrity sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==
dependencies:
- "@babel/helper-validator-identifier" "^7.18.6"
- chalk "^2.0.0"
+ "@babel/helper-validator-identifier" "^7.22.20"
+ chalk "^2.4.2"
js-tokens "^4.0.0"
-"@babel/node@^7.20.7":
- version "7.20.7"
- resolved "https://registry.yarnpkg.com/@babel/node/-/node-7.20.7.tgz#609be7f841893e24931b7910263babfde84040a9"
- integrity sha512-AQt3gVcP+fpFuoFn4FmIW/+5JovvEoA9og4Y1LrRw0pv3jkl4tujZMMy3X/3ugjLrEy3k1aNywo3JIl3g+jVXQ==
- dependencies:
- "@babel/register" "^7.18.9"
- commander "^4.0.1"
- core-js "^3.26.0"
- node-environment-flags "^1.0.5"
- regenerator-runtime "^0.13.11"
- v8flags "^3.1.1"
-
-"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.21.9", "@babel/parser@^7.22.0", "@babel/parser@^7.22.4", "@babel/parser@^7.7.0":
- version "7.22.4"
- resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.22.4.tgz#a770e98fd785c231af9d93f6459d36770993fb32"
- integrity sha512-VLLsx06XkEYqBtE5YGPwfSGwfrjnyPP5oiGty3S8pQLFDFLaS8VwWSIxkTXpcvr5zeYLE6+MBNl2npl/YnfofA==
+"@babel/parser@^7.1.0", "@babel/parser@^7.20.7", "@babel/parser@^7.22.15", "@babel/parser@^7.23.6":
+ version "7.23.6"
+ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.6.tgz#ba1c9e512bda72a47e285ae42aff9d2a635a9e3b"
+ integrity sha512-Z2uID7YJ7oNvAI20O9X0bblw7Qqs8Q2hFy0R9tAfnfLkp5MW0UH9eUvnDSnFwKZ0AvgS1ucqR4KzvVHgnke1VQ==
"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.18.6":
version "7.18.6"
@@ -462,14 +462,7 @@
dependencies:
"@babel/helper-plugin-utils" "^7.8.0"
-"@babel/plugin-syntax-bigint@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz#4c9a6f669f5d0cdf1b90a1671e9a146be5300cea"
- integrity sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==
- dependencies:
- "@babel/helper-plugin-utils" "^7.8.0"
-
-"@babel/plugin-syntax-class-properties@^7.12.13", "@babel/plugin-syntax-class-properties@^7.8.3":
+"@babel/plugin-syntax-class-properties@^7.12.13":
version "7.12.13"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz#b5c987274c4a3a82b89714796931a6b53544ae10"
integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==
@@ -511,13 +504,6 @@
dependencies:
"@babel/helper-plugin-utils" "^7.19.0"
-"@babel/plugin-syntax-import-meta@^7.8.3":
- version "7.10.4"
- resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz#ee601348c370fa334d2207be158777496521fd51"
- integrity sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==
- dependencies:
- "@babel/helper-plugin-utils" "^7.10.4"
-
"@babel/plugin-syntax-json-strings@^7.8.3":
version "7.8.3"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz#01ca21b668cd8218c9e640cb6dd88c5412b2c96a"
@@ -525,14 +511,14 @@
dependencies:
"@babel/helper-plugin-utils" "^7.8.0"
-"@babel/plugin-syntax-jsx@^7.18.6", "@babel/plugin-syntax-jsx@^7.7.2":
+"@babel/plugin-syntax-jsx@^7.18.6":
version "7.21.4"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.21.4.tgz#f264ed7bf40ffc9ec239edabc17a50c4f5b6fea2"
integrity sha512-5hewiLct5OKyh6PLKEYaFclcqtIgCb6bmELouxjF6up5q3Sov7rOayW4RwhbaBL0dit8rA80GNfY+UuDp2mBbQ==
dependencies:
"@babel/helper-plugin-utils" "^7.20.2"
-"@babel/plugin-syntax-logical-assignment-operators@^7.10.4", "@babel/plugin-syntax-logical-assignment-operators@^7.8.3":
+"@babel/plugin-syntax-logical-assignment-operators@^7.10.4":
version "7.10.4"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699"
integrity sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==
@@ -546,7 +532,7 @@
dependencies:
"@babel/helper-plugin-utils" "^7.8.0"
-"@babel/plugin-syntax-numeric-separator@^7.10.4", "@babel/plugin-syntax-numeric-separator@^7.8.3":
+"@babel/plugin-syntax-numeric-separator@^7.10.4":
version "7.10.4"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz#b9b070b3e33570cd9fd07ba7fa91c0dd37b9af97"
integrity sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==
@@ -581,20 +567,13 @@
dependencies:
"@babel/helper-plugin-utils" "^7.14.5"
-"@babel/plugin-syntax-top-level-await@^7.14.5", "@babel/plugin-syntax-top-level-await@^7.8.3":
+"@babel/plugin-syntax-top-level-await@^7.14.5":
version "7.14.5"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz#c1cfdadc35a646240001f06138247b741c34d94c"
integrity sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==
dependencies:
"@babel/helper-plugin-utils" "^7.14.5"
-"@babel/plugin-syntax-typescript@^7.7.2":
- version "7.21.4"
- resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.21.4.tgz#2751948e9b7c6d771a8efa59340c15d4a2891ff8"
- integrity sha512-xz0D39NvhQn4t4RNsHmDnnsaQizIlUkdtYvLs8La1BlfjQ6JEwxkJGeqJMW2tAXx+q6H+WFuUTXNdYVpEya0YA==
- dependencies:
- "@babel/helper-plugin-utils" "^7.20.2"
-
"@babel/plugin-transform-arrow-functions@^7.18.6":
version "7.20.7"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.20.7.tgz#bea332b0e8b2dab3dafe55a163d8227531ab0551"
@@ -787,12 +766,20 @@
dependencies:
"@babel/helper-plugin-utils" "^7.18.6"
-"@babel/plugin-transform-react-jsx-development@^7.18.6":
- version "7.18.6"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.18.6.tgz#dbe5c972811e49c7405b630e4d0d2e1380c0ddc5"
- integrity sha512-SA6HEjwYFKF7WDjWcMcMGUimmw/nhNRDWxr+KaLSCrkD/LMDBvWRmHAYgE1HDeF8KUuI8OAu+RT6EOtKxSW2qA==
+"@babel/plugin-transform-react-jsx-development@^7.18.6", "@babel/plugin-transform-react-jsx-self@^7.23.3":
+ name "@babel/plugin-transform-react-jsx-development"
+ version "7.23.3"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.23.3.tgz#ed3e7dadde046cce761a8e3cf003a13d1a7972d9"
+ integrity sha512-qXRvbeKDSfwnlJnanVRp0SfuWE5DQhwQr5xtLBzp56Wabyo+4CMosF6Kfp+eOD/4FYpql64XVJ2W0pVLlJZxOQ==
dependencies:
- "@babel/plugin-transform-react-jsx" "^7.18.6"
+ "@babel/helper-plugin-utils" "^7.22.5"
+
+"@babel/plugin-transform-react-jsx-source@^7.23.3":
+ version "7.23.3"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.23.3.tgz#03527006bdc8775247a78643c51d4e715fe39a3e"
+ integrity sha512-91RS0MDnAWDNvGC6Wio5XYkyWI39FMFO+JK9+4AlgaTH+yWwVTsw7/sn6LK0lH7c5F+TFkpv/3LfCJ1Ydwof/g==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.22.5"
"@babel/plugin-transform-react-jsx@^7.18.6":
version "7.20.13"
@@ -995,76 +982,52 @@
"@babel/plugin-transform-react-jsx-development" "^7.18.6"
"@babel/plugin-transform-react-pure-annotations" "^7.18.6"
-"@babel/register@^7.18.9":
- version "7.18.9"
- resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.18.9.tgz#1888b24bc28d5cc41c412feb015e9ff6b96e439c"
- integrity sha512-ZlbnXDcNYHMR25ITwwNKT88JiaukkdVj/nG7r3wnuXkOTHc60Uy05PwMCPre0hSkY68E6zK3xz+vUJSP2jWmcw==
- dependencies:
- clone-deep "^4.0.1"
- find-cache-dir "^2.0.0"
- make-dir "^2.1.0"
- pirates "^4.0.5"
- source-map-support "^0.5.16"
-
"@babel/regjsgen@^0.8.0":
version "0.8.0"
resolved "https://registry.yarnpkg.com/@babel/regjsgen/-/regjsgen-0.8.0.tgz#f0ba69b075e1f05fb2825b7fad991e7adbb18310"
integrity sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==
-"@babel/runtime-corejs3@^7.10.2":
- version "7.13.10"
- resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.13.10.tgz#14c3f4c85de22ba88e8e86685d13e8861a82fe86"
- integrity sha512-x/XYVQ1h684pp1mJwOV4CyvqZXqbc8CMsMGUnAbuc82ZCdv1U63w5RSUzgDSXQHG5Rps/kiksH6g2D5BuaKyXg==
- dependencies:
- core-js-pure "^3.0.0"
- regenerator-runtime "^0.13.4"
-
-"@babel/runtime@^7.10.2", "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.5", "@babel/runtime@^7.20.1", "@babel/runtime@^7.20.13", "@babel/runtime@^7.5.5", "@babel/runtime@^7.8.4":
- version "7.22.3"
- resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.22.3.tgz#0a7fce51d43adbf0f7b517a71f4c3aaca92ebcbb"
- integrity sha512-XsDuspWKLUsxwCp6r7EhsExHtYfbe5oAGQ19kqngTdCPUoPQzOPdUbD/pB9PJiwb2ptYKQDjSJT3R6dC+EPqfQ==
- dependencies:
- regenerator-runtime "^0.13.11"
-
-"@babel/template@^7.18.10", "@babel/template@^7.20.7", "@babel/template@^7.21.9", "@babel/template@^7.3.3":
- version "7.21.9"
- resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.21.9.tgz#bf8dad2859130ae46088a99c1f265394877446fb"
- integrity sha512-MK0X5k8NKOuWRamiEfc3KEJiHMTkGZNUjzMipqCGDDc6ijRl/B7RGSKVGncu4Ro/HdyzzY6cmoXuKI2Gffk7vQ==
- dependencies:
- "@babel/code-frame" "^7.21.4"
- "@babel/parser" "^7.21.9"
- "@babel/types" "^7.21.5"
-
-"@babel/traverse@^7.20.5", "@babel/traverse@^7.20.7", "@babel/traverse@^7.22.1", "@babel/traverse@^7.7.0", "@babel/traverse@^7.7.2":
- version "7.22.4"
- resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.22.4.tgz#c3cf96c5c290bd13b55e29d025274057727664c0"
- integrity sha512-Tn1pDsjIcI+JcLKq1AVlZEr4226gpuAQTsLMorsYg9tuS/kG7nuwwJ4AB8jfQuEgb/COBwR/DqJxmoiYFu5/rQ==
- dependencies:
- "@babel/code-frame" "^7.21.4"
- "@babel/generator" "^7.22.3"
- "@babel/helper-environment-visitor" "^7.22.1"
- "@babel/helper-function-name" "^7.21.0"
- "@babel/helper-hoist-variables" "^7.18.6"
- "@babel/helper-split-export-declaration" "^7.18.6"
- "@babel/parser" "^7.22.4"
- "@babel/types" "^7.22.4"
- debug "^4.1.0"
+"@babel/runtime@^7.12.5", "@babel/runtime@^7.20.1", "@babel/runtime@^7.20.13", "@babel/runtime@^7.23.2", "@babel/runtime@^7.5.5", "@babel/runtime@^7.8.4":
+ version "7.23.9"
+ resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.9.tgz#47791a15e4603bb5f905bc0753801cf21d6345f7"
+ integrity sha512-0CX6F+BI2s9dkUqr08KFrAIZgNFj75rdBU/DjCyYLIaV/quFjkk6T+EJ2LkZHyZTbEV4L5p97mNkUsHl2wLFAw==
+ dependencies:
+ regenerator-runtime "^0.14.0"
+
+"@babel/template@^7.18.10", "@babel/template@^7.20.7", "@babel/template@^7.22.15":
+ version "7.22.15"
+ resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.22.15.tgz#09576efc3830f0430f4548ef971dde1350ef2f38"
+ integrity sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==
+ dependencies:
+ "@babel/code-frame" "^7.22.13"
+ "@babel/parser" "^7.22.15"
+ "@babel/types" "^7.22.15"
+
+"@babel/traverse@^7.20.5", "@babel/traverse@^7.20.7", "@babel/traverse@^7.23.7":
+ version "7.23.7"
+ resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.23.7.tgz#9a7bf285c928cb99b5ead19c3b1ce5b310c9c305"
+ integrity sha512-tY3mM8rH9jM0YHFGyfC0/xf+SB5eKUu7HPj7/k3fpi9dAlsMc5YbQvDi0Sh2QTPXqMhyaAtzAr807TIyfQrmyg==
+ dependencies:
+ "@babel/code-frame" "^7.23.5"
+ "@babel/generator" "^7.23.6"
+ "@babel/helper-environment-visitor" "^7.22.20"
+ "@babel/helper-function-name" "^7.23.0"
+ "@babel/helper-hoist-variables" "^7.22.5"
+ "@babel/helper-split-export-declaration" "^7.22.6"
+ "@babel/parser" "^7.23.6"
+ "@babel/types" "^7.23.6"
+ debug "^4.3.1"
globals "^11.1.0"
-"@babel/types@^7.0.0", "@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.20.0", "@babel/types@^7.20.2", "@babel/types@^7.20.5", "@babel/types@^7.20.7", "@babel/types@^7.21.0", "@babel/types@^7.21.4", "@babel/types@^7.21.5", "@babel/types@^7.22.0", "@babel/types@^7.22.3", "@babel/types@^7.22.4", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4", "@babel/types@^7.7.0":
- version "7.22.4"
- resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.22.4.tgz#56a2653ae7e7591365dabf20b76295410684c071"
- integrity sha512-Tx9x3UBHTTsMSW85WB2kphxYQVvrZ/t1FxD88IpSgIjiUJlCm9z+xWIDwyo1vffTwSqteqyznB8ZE9vYYk16zA==
+"@babel/types@^7.0.0", "@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.20.0", "@babel/types@^7.20.2", "@babel/types@^7.20.5", "@babel/types@^7.20.7", "@babel/types@^7.22.15", "@babel/types@^7.22.5", "@babel/types@^7.23.0", "@babel/types@^7.23.6", "@babel/types@^7.3.0", "@babel/types@^7.4.4":
+ version "7.23.6"
+ resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.23.6.tgz#be33fdb151e1f5a56877d704492c240fc71c7ccd"
+ integrity sha512-+uarb83brBzPKN38NX1MkB6vb6+mwvR6amUulqAE7ccQw1pEl+bCia9TbdG1lsnFP7lZySvUn37CHyXQdfTwzg==
dependencies:
- "@babel/helper-string-parser" "^7.21.5"
- "@babel/helper-validator-identifier" "^7.19.1"
+ "@babel/helper-string-parser" "^7.23.4"
+ "@babel/helper-validator-identifier" "^7.22.20"
to-fast-properties "^2.0.0"
-"@bcoe/v8-coverage@^0.2.3":
- version "0.2.3"
- resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
- integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
-
"@changesets/apply-release-plan@^6.1.3":
version "6.1.3"
resolved "https://registry.yarnpkg.com/@changesets/apply-release-plan/-/apply-release-plan-6.1.3.tgz#3bcc0bd57ba00d50d20df7d0141f1a9b2134eaf7"
@@ -1282,287 +1245,195 @@
human-id "^1.0.2"
prettier "^2.7.1"
-"@evocateur/libnpmaccess@^3.1.2":
- version "3.1.2"
- resolved "https://registry.yarnpkg.com/@evocateur/libnpmaccess/-/libnpmaccess-3.1.2.tgz#ecf7f6ce6b004e9f942b098d92200be4a4b1c845"
- integrity sha512-KSCAHwNWro0CF2ukxufCitT9K5LjL/KuMmNzSu8wuwN2rjyKHD8+cmOsiybK+W5hdnwc5M1SmRlVCaMHQo+3rg==
- dependencies:
- "@evocateur/npm-registry-fetch" "^4.0.0"
- aproba "^2.0.0"
- figgy-pudding "^3.5.1"
- get-stream "^4.0.0"
- npm-package-arg "^6.1.0"
-
-"@evocateur/libnpmpublish@^1.2.2":
- version "1.2.2"
- resolved "https://registry.yarnpkg.com/@evocateur/libnpmpublish/-/libnpmpublish-1.2.2.tgz#55df09d2dca136afba9c88c759ca272198db9f1a"
- integrity sha512-MJrrk9ct1FeY9zRlyeoyMieBjGDG9ihyyD9/Ft6MMrTxql9NyoEx2hw9casTIP4CdqEVu+3nQ2nXxoJ8RCXyFg==
- dependencies:
- "@evocateur/npm-registry-fetch" "^4.0.0"
- aproba "^2.0.0"
- figgy-pudding "^3.5.1"
- get-stream "^4.0.0"
- lodash.clonedeep "^4.5.0"
- normalize-package-data "^2.4.0"
- npm-package-arg "^6.1.0"
- semver "^5.5.1"
- ssri "^6.0.1"
-
-"@evocateur/npm-registry-fetch@^4.0.0":
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/@evocateur/npm-registry-fetch/-/npm-registry-fetch-4.0.0.tgz#8c4c38766d8d32d3200fcb0a83f064b57365ed66"
- integrity sha512-k1WGfKRQyhJpIr+P17O5vLIo2ko1PFLKwoetatdduUSt/aQ4J2sJrJwwatdI5Z3SiYk/mRH9S3JpdmMFd/IK4g==
- dependencies:
- JSONStream "^1.3.4"
- bluebird "^3.5.1"
- figgy-pudding "^3.4.1"
- lru-cache "^5.1.1"
- make-fetch-happen "^5.0.0"
- npm-package-arg "^6.1.0"
- safe-buffer "^5.1.2"
-
-"@evocateur/pacote@^9.6.3":
- version "9.6.5"
- resolved "https://registry.yarnpkg.com/@evocateur/pacote/-/pacote-9.6.5.tgz#33de32ba210b6f17c20ebab4d497efc6755f4ae5"
- integrity sha512-EI552lf0aG2nOV8NnZpTxNo2PcXKPmDbF9K8eCBFQdIZwHNGN/mi815fxtmUMa2wTa1yndotICIDt/V0vpEx2w==
- dependencies:
- "@evocateur/npm-registry-fetch" "^4.0.0"
- bluebird "^3.5.3"
- cacache "^12.0.3"
- chownr "^1.1.2"
- figgy-pudding "^3.5.1"
- get-stream "^4.1.0"
- glob "^7.1.4"
- infer-owner "^1.0.4"
- lru-cache "^5.1.1"
- make-fetch-happen "^5.0.0"
- minimatch "^3.0.4"
- minipass "^2.3.5"
- mississippi "^3.0.0"
- mkdirp "^0.5.1"
- normalize-package-data "^2.5.0"
- npm-package-arg "^6.1.0"
- npm-packlist "^1.4.4"
- npm-pick-manifest "^3.0.0"
- osenv "^0.1.5"
- promise-inflight "^1.0.1"
- promise-retry "^1.1.1"
- protoduck "^5.0.1"
- rimraf "^2.6.3"
- safe-buffer "^5.2.0"
- semver "^5.7.0"
- ssri "^6.0.1"
- tar "^4.4.10"
- unique-filename "^1.1.1"
- which "^1.3.1"
-
-"@istanbuljs/load-nyc-config@^1.0.0":
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced"
- integrity sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==
- dependencies:
- camelcase "^5.3.1"
- find-up "^4.1.0"
- get-package-type "^0.1.0"
- js-yaml "^3.13.1"
- resolve-from "^5.0.0"
-
-"@istanbuljs/schema@^0.1.2":
- version "0.1.3"
- resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98"
- integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==
-
-"@jest/console@^29.5.0":
- version "29.5.0"
- resolved "https://registry.yarnpkg.com/@jest/console/-/console-29.5.0.tgz#593a6c5c0d3f75689835f1b3b4688c4f8544cb57"
- integrity sha512-NEpkObxPwyw/XxZVLPmAGKE89IQRp4puc6IQRPru6JKd1M3fW9v1xM1AnzIJE65hbCkzQAdnL8P47e9hzhiYLQ==
- dependencies:
- "@jest/types" "^29.5.0"
- "@types/node" "*"
- chalk "^4.0.0"
- jest-message-util "^29.5.0"
- jest-util "^29.5.0"
- slash "^3.0.0"
-
-"@jest/core@^29.5.0":
- version "29.5.0"
- resolved "https://registry.yarnpkg.com/@jest/core/-/core-29.5.0.tgz#76674b96904484e8214614d17261cc491e5f1f03"
- integrity sha512-28UzQc7ulUrOQw1IsN/kv1QES3q2kkbl/wGslyhAclqZ/8cMdB5M68BffkIdSJgKBUt50d3hbwJ92XESlE7LiQ==
- dependencies:
- "@jest/console" "^29.5.0"
- "@jest/reporters" "^29.5.0"
- "@jest/test-result" "^29.5.0"
- "@jest/transform" "^29.5.0"
- "@jest/types" "^29.5.0"
- "@types/node" "*"
- ansi-escapes "^4.2.1"
- chalk "^4.0.0"
- ci-info "^3.2.0"
- exit "^0.1.2"
- graceful-fs "^4.2.9"
- jest-changed-files "^29.5.0"
- jest-config "^29.5.0"
- jest-haste-map "^29.5.0"
- jest-message-util "^29.5.0"
- jest-regex-util "^29.4.3"
- jest-resolve "^29.5.0"
- jest-resolve-dependencies "^29.5.0"
- jest-runner "^29.5.0"
- jest-runtime "^29.5.0"
- jest-snapshot "^29.5.0"
- jest-util "^29.5.0"
- jest-validate "^29.5.0"
- jest-watcher "^29.5.0"
- micromatch "^4.0.4"
- pretty-format "^29.5.0"
- slash "^3.0.0"
- strip-ansi "^6.0.0"
-
-"@jest/environment@^29.5.0":
- version "29.5.0"
- resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-29.5.0.tgz#9152d56317c1fdb1af389c46640ba74ef0bb4c65"
- integrity sha512-5FXw2+wD29YU1d4I2htpRX7jYnAyTRjP2CsXQdo9SAM8g3ifxWPSV0HnClSn71xwctr0U3oZIIH+dtbfmnbXVQ==
+"@esbuild/aix-ppc64@0.19.11":
+ version "0.19.11"
+ resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.19.11.tgz#2acd20be6d4f0458bc8c784103495ff24f13b1d3"
+ integrity sha512-FnzU0LyE3ySQk7UntJO4+qIiQgI7KoODnZg5xzXIrFJlKd2P2gwHsHY4927xj9y5PJmJSzULiUCWmv7iWnNa7g==
+
+"@esbuild/android-arm64@0.19.11":
+ version "0.19.11"
+ resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.19.11.tgz#b45d000017385c9051a4f03e17078abb935be220"
+ integrity sha512-aiu7K/5JnLj//KOnOfEZ0D90obUkRzDMyqd/wNAUQ34m4YUPVhRZpnqKV9uqDGxT7cToSDnIHsGooyIczu9T+Q==
+
+"@esbuild/android-arm@0.19.11":
+ version "0.19.11"
+ resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.19.11.tgz#f46f55414e1c3614ac682b29977792131238164c"
+ integrity sha512-5OVapq0ClabvKvQ58Bws8+wkLCV+Rxg7tUVbo9xu034Nm536QTII4YzhaFriQ7rMrorfnFKUsArD2lqKbFY4vw==
+
+"@esbuild/android-x64@0.19.11":
+ version "0.19.11"
+ resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.19.11.tgz#bfc01e91740b82011ef503c48f548950824922b2"
+ integrity sha512-eccxjlfGw43WYoY9QgB82SgGgDbibcqyDTlk3l3C0jOVHKxrjdc9CTwDUQd0vkvYg5um0OH+GpxYvp39r+IPOg==
+
+"@esbuild/darwin-arm64@0.19.11":
+ version "0.19.11"
+ resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.19.11.tgz#533fb7f5a08c37121d82c66198263dcc1bed29bf"
+ integrity sha512-ETp87DRWuSt9KdDVkqSoKoLFHYTrkyz2+65fj9nfXsaV3bMhTCjtQfw3y+um88vGRKRiF7erPrh/ZuIdLUIVxQ==
+
+"@esbuild/darwin-x64@0.19.11":
+ version "0.19.11"
+ resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.19.11.tgz#62f3819eff7e4ddc656b7c6815a31cf9a1e7d98e"
+ integrity sha512-fkFUiS6IUK9WYUO/+22omwetaSNl5/A8giXvQlcinLIjVkxwTLSktbF5f/kJMftM2MJp9+fXqZ5ezS7+SALp4g==
+
+"@esbuild/freebsd-arm64@0.19.11":
+ version "0.19.11"
+ resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.11.tgz#d478b4195aa3ca44160272dab85ef8baf4175b4a"
+ integrity sha512-lhoSp5K6bxKRNdXUtHoNc5HhbXVCS8V0iZmDvyWvYq9S5WSfTIHU2UGjcGt7UeS6iEYp9eeymIl5mJBn0yiuxA==
+
+"@esbuild/freebsd-x64@0.19.11":
+ version "0.19.11"
+ resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.19.11.tgz#7bdcc1917409178257ca6a1a27fe06e797ec18a2"
+ integrity sha512-JkUqn44AffGXitVI6/AbQdoYAq0TEullFdqcMY/PCUZ36xJ9ZJRtQabzMA+Vi7r78+25ZIBosLTOKnUXBSi1Kw==
+
+"@esbuild/linux-arm64@0.19.11":
+ version "0.19.11"
+ resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.19.11.tgz#58ad4ff11685fcc735d7ff4ca759ab18fcfe4545"
+ integrity sha512-LneLg3ypEeveBSMuoa0kwMpCGmpu8XQUh+mL8XXwoYZ6Be2qBnVtcDI5azSvh7vioMDhoJFZzp9GWp9IWpYoUg==
+
+"@esbuild/linux-arm@0.19.11":
+ version "0.19.11"
+ resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.19.11.tgz#ce82246d873b5534d34de1e5c1b33026f35e60e3"
+ integrity sha512-3CRkr9+vCV2XJbjwgzjPtO8T0SZUmRZla+UL1jw+XqHZPkPgZiyWvbDvl9rqAN8Zl7qJF0O/9ycMtjU67HN9/Q==
+
+"@esbuild/linux-ia32@0.19.11":
+ version "0.19.11"
+ resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.19.11.tgz#cbae1f313209affc74b80f4390c4c35c6ab83fa4"
+ integrity sha512-caHy++CsD8Bgq2V5CodbJjFPEiDPq8JJmBdeyZ8GWVQMjRD0sU548nNdwPNvKjVpamYYVL40AORekgfIubwHoA==
+
+"@esbuild/linux-loong64@0.19.11":
+ version "0.19.11"
+ resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.19.11.tgz#5f32aead1c3ec8f4cccdb7ed08b166224d4e9121"
+ integrity sha512-ppZSSLVpPrwHccvC6nQVZaSHlFsvCQyjnvirnVjbKSHuE5N24Yl8F3UwYUUR1UEPaFObGD2tSvVKbvR+uT1Nrg==
+
+"@esbuild/linux-mips64el@0.19.11":
+ version "0.19.11"
+ resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.19.11.tgz#38eecf1cbb8c36a616261de858b3c10d03419af9"
+ integrity sha512-B5x9j0OgjG+v1dF2DkH34lr+7Gmv0kzX6/V0afF41FkPMMqaQ77pH7CrhWeR22aEeHKaeZVtZ6yFwlxOKPVFyg==
+
+"@esbuild/linux-ppc64@0.19.11":
+ version "0.19.11"
+ resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.19.11.tgz#9c5725a94e6ec15b93195e5a6afb821628afd912"
+ integrity sha512-MHrZYLeCG8vXblMetWyttkdVRjQlQUb/oMgBNurVEnhj4YWOr4G5lmBfZjHYQHHN0g6yDmCAQRR8MUHldvvRDA==
+
+"@esbuild/linux-riscv64@0.19.11":
+ version "0.19.11"
+ resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.19.11.tgz#2dc4486d474a2a62bbe5870522a9a600e2acb916"
+ integrity sha512-f3DY++t94uVg141dozDu4CCUkYW+09rWtaWfnb3bqe4w5NqmZd6nPVBm+qbz7WaHZCoqXqHz5p6CM6qv3qnSSQ==
+
+"@esbuild/linux-s390x@0.19.11":
+ version "0.19.11"
+ resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.19.11.tgz#4ad8567df48f7dd4c71ec5b1753b6f37561a65a8"
+ integrity sha512-A5xdUoyWJHMMlcSMcPGVLzYzpcY8QP1RtYzX5/bS4dvjBGVxdhuiYyFwp7z74ocV7WDc0n1harxmpq2ePOjI0Q==
+
+"@esbuild/linux-x64@0.19.11":
+ version "0.19.11"
+ resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.19.11.tgz#b7390c4d5184f203ebe7ddaedf073df82a658766"
+ integrity sha512-grbyMlVCvJSfxFQUndw5mCtWs5LO1gUlwP4CDi4iJBbVpZcqLVT29FxgGuBJGSzyOxotFG4LoO5X+M1350zmPA==
+
+"@esbuild/netbsd-x64@0.19.11":
+ version "0.19.11"
+ resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.19.11.tgz#d633c09492a1721377f3bccedb2d821b911e813d"
+ integrity sha512-13jvrQZJc3P230OhU8xgwUnDeuC/9egsjTkXN49b3GcS5BKvJqZn86aGM8W9pd14Kd+u7HuFBMVtrNGhh6fHEQ==
+
+"@esbuild/openbsd-x64@0.19.11":
+ version "0.19.11"
+ resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.19.11.tgz#17388c76e2f01125bf831a68c03a7ffccb65d1a2"
+ integrity sha512-ysyOGZuTp6SNKPE11INDUeFVVQFrhcNDVUgSQVDzqsqX38DjhPEPATpid04LCoUr2WXhQTEZ8ct/EgJCUDpyNw==
+
+"@esbuild/sunos-x64@0.19.11":
+ version "0.19.11"
+ resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.19.11.tgz#e320636f00bb9f4fdf3a80e548cb743370d41767"
+ integrity sha512-Hf+Sad9nVwvtxy4DXCZQqLpgmRTQqyFyhT3bZ4F2XlJCjxGmRFF0Shwn9rzhOYRB61w9VMXUkxlBy56dk9JJiQ==
+
+"@esbuild/win32-arm64@0.19.11":
+ version "0.19.11"
+ resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.19.11.tgz#c778b45a496e90b6fc373e2a2bb072f1441fe0ee"
+ integrity sha512-0P58Sbi0LctOMOQbpEOvOL44Ne0sqbS0XWHMvvrg6NE5jQ1xguCSSw9jQeUk2lfrXYsKDdOe6K+oZiwKPilYPQ==
+
+"@esbuild/win32-ia32@0.19.11":
+ version "0.19.11"
+ resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.19.11.tgz#481a65fee2e5cce74ec44823e6b09ecedcc5194c"
+ integrity sha512-6YOrWS+sDJDmshdBIQU+Uoyh7pQKrdykdefC1avn76ss5c+RN6gut3LZA4E2cH5xUEp5/cA0+YxRaVtRAb0xBg==
+
+"@esbuild/win32-x64@0.19.11":
+ version "0.19.11"
+ resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.19.11.tgz#a5d300008960bb39677c46bf16f53ec70d8dee04"
+ integrity sha512-vfkhltrjCAb603XaFhqhAF4LGDi2M4OrCRrFusyQ+iTLQ/o60QQXxc9cZC/FFpihBI9N1Grn6SMKVJ4KP7Fuiw==
+
+"@eslint-community/eslint-utils@^4.2.0":
+ version "4.4.0"
+ resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59"
+ integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==
dependencies:
- "@jest/fake-timers" "^29.5.0"
- "@jest/types" "^29.5.0"
- "@types/node" "*"
- jest-mock "^29.5.0"
+ eslint-visitor-keys "^3.3.0"
-"@jest/expect-utils@^29.5.0":
- version "29.5.0"
- resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-29.5.0.tgz#f74fad6b6e20f924582dc8ecbf2cb800fe43a036"
- integrity sha512-fmKzsidoXQT2KwnrwE0SQq3uj8Z763vzR8LnLBwC2qYWEFpjX8daRsk6rHUM1QvNlEW/UJXNXm59ztmJJWs2Mg==
- dependencies:
- jest-get-type "^29.4.3"
+"@eslint-community/regexpp@^4.6.1":
+ version "4.10.0"
+ resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.10.0.tgz#548f6de556857c8bb73bbee70c35dc82a2e74d63"
+ integrity sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==
-"@jest/expect@^29.5.0":
- version "29.5.0"
- resolved "https://registry.yarnpkg.com/@jest/expect/-/expect-29.5.0.tgz#80952f5316b23c483fbca4363ce822af79c38fba"
- integrity sha512-PueDR2HGihN3ciUNGr4uelropW7rqUfTiOn+8u0leg/42UhblPxHkfoh0Ruu3I9Y1962P3u2DY4+h7GVTSVU6g==
+"@eslint/eslintrc@^2.1.4":
+ version "2.1.4"
+ resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.4.tgz#388a269f0f25c1b6adc317b5a2c55714894c70ad"
+ integrity sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==
dependencies:
- expect "^29.5.0"
- jest-snapshot "^29.5.0"
+ ajv "^6.12.4"
+ debug "^4.3.2"
+ espree "^9.6.0"
+ globals "^13.19.0"
+ ignore "^5.2.0"
+ import-fresh "^3.2.1"
+ js-yaml "^4.1.0"
+ minimatch "^3.1.2"
+ strip-json-comments "^3.1.1"
-"@jest/fake-timers@^29.5.0":
- version "29.5.0"
- resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-29.5.0.tgz#d4d09ec3286b3d90c60bdcd66ed28d35f1b4dc2c"
- integrity sha512-9ARvuAAQcBwDAqOnglWq2zwNIRUDtk/SCkp/ToGEhFv5r86K21l+VEs0qNTaXtyiY0lEePl3kylijSYJQqdbDg==
- dependencies:
- "@jest/types" "^29.5.0"
- "@sinonjs/fake-timers" "^10.0.2"
- "@types/node" "*"
- jest-message-util "^29.5.0"
- jest-mock "^29.5.0"
- jest-util "^29.5.0"
-
-"@jest/globals@^29.5.0":
- version "29.5.0"
- resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-29.5.0.tgz#6166c0bfc374c58268677539d0c181f9c1833298"
- integrity sha512-S02y0qMWGihdzNbUiqSAiKSpSozSuHX5UYc7QbnHP+D9Lyw8DgGGCinrN9uSuHPeKgSSzvPom2q1nAtBvUsvPQ==
- dependencies:
- "@jest/environment" "^29.5.0"
- "@jest/expect" "^29.5.0"
- "@jest/types" "^29.5.0"
- jest-mock "^29.5.0"
-
-"@jest/reporters@^29.5.0":
- version "29.5.0"
- resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-29.5.0.tgz#985dfd91290cd78ddae4914ba7921bcbabe8ac9b"
- integrity sha512-D05STXqj/M8bP9hQNSICtPqz97u7ffGzZu+9XLucXhkOFBqKcXe04JLZOgIekOxdb73MAoBUFnqvf7MCpKk5OA==
- dependencies:
- "@bcoe/v8-coverage" "^0.2.3"
- "@jest/console" "^29.5.0"
- "@jest/test-result" "^29.5.0"
- "@jest/transform" "^29.5.0"
- "@jest/types" "^29.5.0"
- "@jridgewell/trace-mapping" "^0.3.15"
- "@types/node" "*"
- chalk "^4.0.0"
- collect-v8-coverage "^1.0.0"
- exit "^0.1.2"
- glob "^7.1.3"
- graceful-fs "^4.2.9"
- istanbul-lib-coverage "^3.0.0"
- istanbul-lib-instrument "^5.1.0"
- istanbul-lib-report "^3.0.0"
- istanbul-lib-source-maps "^4.0.0"
- istanbul-reports "^3.1.3"
- jest-message-util "^29.5.0"
- jest-util "^29.5.0"
- jest-worker "^29.5.0"
- slash "^3.0.0"
- string-length "^4.0.1"
- strip-ansi "^6.0.0"
- v8-to-istanbul "^9.0.1"
+"@eslint/js@8.56.0":
+ version "8.56.0"
+ resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.56.0.tgz#ef20350fec605a7f7035a01764731b2de0f3782b"
+ integrity sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==
-"@jest/schemas@^29.4.3":
- version "29.4.3"
- resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.4.3.tgz#39cf1b8469afc40b6f5a2baaa146e332c4151788"
- integrity sha512-VLYKXQmtmuEz6IxJsrZwzG9NvtkQsWNnWMsKxqWNu3+CnfzJQhp0WDDKWLVV9hLKr0l3SLLFRqcYHjhtyuDVxg==
+"@humanwhocodes/config-array@^0.11.13":
+ version "0.11.14"
+ resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.14.tgz#d78e481a039f7566ecc9660b4ea7fe6b1fec442b"
+ integrity sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==
dependencies:
- "@sinclair/typebox" "^0.25.16"
+ "@humanwhocodes/object-schema" "^2.0.2"
+ debug "^4.3.1"
+ minimatch "^3.0.5"
-"@jest/source-map@^29.4.3":
- version "29.4.3"
- resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-29.4.3.tgz#ff8d05cbfff875d4a791ab679b4333df47951d20"
- integrity sha512-qyt/mb6rLyd9j1jUts4EQncvS6Yy3PM9HghnNv86QBlV+zdL2inCdK1tuVlL+J+lpiw2BI67qXOrX3UurBqQ1w==
- dependencies:
- "@jridgewell/trace-mapping" "^0.3.15"
- callsites "^3.0.0"
- graceful-fs "^4.2.9"
+"@humanwhocodes/module-importer@^1.0.1":
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c"
+ integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==
-"@jest/test-result@^29.5.0":
- version "29.5.0"
- resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-29.5.0.tgz#7c856a6ca84f45cc36926a4e9c6b57f1973f1408"
- integrity sha512-fGl4rfitnbfLsrfx1uUpDEESS7zM8JdgZgOCQuxQvL1Sn/I6ijeAVQWGfXI9zb1i9Mzo495cIpVZhA0yr60PkQ==
- dependencies:
- "@jest/console" "^29.5.0"
- "@jest/types" "^29.5.0"
- "@types/istanbul-lib-coverage" "^2.0.0"
- collect-v8-coverage "^1.0.0"
+"@humanwhocodes/object-schema@^2.0.2":
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz#d9fae00a2d5cb40f92cfe64b47ad749fbc38f917"
+ integrity sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==
-"@jest/test-sequencer@^29.5.0":
- version "29.5.0"
- resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-29.5.0.tgz#34d7d82d3081abd523dbddc038a3ddcb9f6d3cc4"
- integrity sha512-yPafQEcKjkSfDXyvtgiV4pevSeyuA6MQr6ZIdVkWJly9vkqjnFfcfhRQqpD5whjoU8EORki752xQmjaqoFjzMQ==
- dependencies:
- "@jest/test-result" "^29.5.0"
- graceful-fs "^4.2.9"
- jest-haste-map "^29.5.0"
- slash "^3.0.0"
+"@hutson/parse-repository-url@^3.0.0":
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/@hutson/parse-repository-url/-/parse-repository-url-3.0.2.tgz#98c23c950a3d9b6c8f0daed06da6c3af06981340"
+ integrity sha512-H9XAx3hc0BQHY6l+IFSWHDySypcXsvsuLhgYLUGywmJ5pswRVQJUHpOsobnLYp2ZUaUlKiKDrgWWhosOwAEM8Q==
-"@jest/transform@^29.5.0":
- version "29.5.0"
- resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-29.5.0.tgz#cf9c872d0965f0cbd32f1458aa44a2b1988b00f9"
- integrity sha512-8vbeZWqLJOvHaDfeMuoHITGKSz5qWc9u04lnWrQE3VyuSw604PzQM824ZeX9XSjUCeDiE3GuxZe5UKa8J61NQw==
+"@isaacs/cliui@^8.0.2":
+ version "8.0.2"
+ resolved "https://registry.yarnpkg.com/@isaacs/cliui/-/cliui-8.0.2.tgz#b37667b7bc181c168782259bab42474fbf52b550"
+ integrity sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==
dependencies:
- "@babel/core" "^7.11.6"
- "@jest/types" "^29.5.0"
- "@jridgewell/trace-mapping" "^0.3.15"
- babel-plugin-istanbul "^6.1.1"
- chalk "^4.0.0"
- convert-source-map "^2.0.0"
- fast-json-stable-stringify "^2.1.0"
- graceful-fs "^4.2.9"
- jest-haste-map "^29.5.0"
- jest-regex-util "^29.4.3"
- jest-util "^29.5.0"
- micromatch "^4.0.4"
- pirates "^4.0.4"
- slash "^3.0.0"
- write-file-atomic "^4.0.2"
+ string-width "^5.1.2"
+ string-width-cjs "npm:string-width@^4.2.0"
+ strip-ansi "^7.0.1"
+ strip-ansi-cjs "npm:strip-ansi@^6.0.1"
+ wrap-ansi "^8.1.0"
+ wrap-ansi-cjs "npm:wrap-ansi@^7.0.0"
-"@jest/types@^29.5.0":
- version "29.5.0"
- resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.5.0.tgz#f59ef9b031ced83047c67032700d8c807d6e1593"
- integrity sha512-qbu7kN6czmVRc3xWFQcAN03RAUamgppVUdXrvl1Wr3jlNF93o9mJbGcDWrwGB6ht44u7efB1qCFgVQmca24Uog==
+"@jest/schemas@^29.6.3":
+ version "29.6.3"
+ resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.6.3.tgz#430b5ce8a4e0044a7e3819663305a7b3091c8e03"
+ integrity sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==
dependencies:
- "@jest/schemas" "^29.4.3"
- "@types/istanbul-lib-coverage" "^2.0.0"
- "@types/istanbul-reports" "^3.0.0"
- "@types/node" "*"
- "@types/yargs" "^17.0.8"
- chalk "^4.0.0"
+ "@sinclair/typebox" "^0.27.8"
"@jridgewell/gen-mapping@^0.3.0", "@jridgewell/gen-mapping@^0.3.2":
version "0.3.3"
@@ -1573,995 +1444,692 @@
"@jridgewell/sourcemap-codec" "^1.4.10"
"@jridgewell/trace-mapping" "^0.3.9"
-"@jridgewell/resolve-uri@3.1.0":
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78"
- integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==
+"@jridgewell/resolve-uri@^3.1.0":
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz#c08679063f279615a3326583ba3a90d1d82cc721"
+ integrity sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==
"@jridgewell/set-array@^1.0.1":
version "1.1.2"
resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72"
integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==
-"@jridgewell/sourcemap-codec@1.4.14", "@jridgewell/sourcemap-codec@^1.4.10":
- version "1.4.14"
- resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24"
- integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==
-
-"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.15", "@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.8", "@jridgewell/trace-mapping@^0.3.9":
- version "0.3.18"
- resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz#25783b2086daf6ff1dcb53c9249ae480e4dd4cd6"
- integrity sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==
- dependencies:
- "@jridgewell/resolve-uri" "3.1.0"
- "@jridgewell/sourcemap-codec" "1.4.14"
-
-"@lerna/add@3.21.0":
- version "3.21.0"
- resolved "https://registry.yarnpkg.com/@lerna/add/-/add-3.21.0.tgz#27007bde71cc7b0a2969ab3c2f0ae41578b4577b"
- integrity sha512-vhUXXF6SpufBE1EkNEXwz1VLW03f177G9uMOFMQkp6OJ30/PWg4Ekifuz9/3YfgB2/GH8Tu4Lk3O51P2Hskg/A==
- dependencies:
- "@evocateur/pacote" "^9.6.3"
- "@lerna/bootstrap" "3.21.0"
- "@lerna/command" "3.21.0"
- "@lerna/filter-options" "3.20.0"
- "@lerna/npm-conf" "3.16.0"
- "@lerna/validation-error" "3.13.0"
- dedent "^0.7.0"
- npm-package-arg "^6.1.0"
- p-map "^2.1.0"
- semver "^6.2.0"
-
-"@lerna/bootstrap@3.21.0":
- version "3.21.0"
- resolved "https://registry.yarnpkg.com/@lerna/bootstrap/-/bootstrap-3.21.0.tgz#bcd1b651be5b0970b20d8fae04c864548123aed6"
- integrity sha512-mtNHlXpmvJn6JTu0KcuTTPl2jLsDNud0QacV/h++qsaKbhAaJr/FElNZ5s7MwZFUM3XaDmvWzHKaszeBMHIbBw==
- dependencies:
- "@lerna/command" "3.21.0"
- "@lerna/filter-options" "3.20.0"
- "@lerna/has-npm-version" "3.16.5"
- "@lerna/npm-install" "3.16.5"
- "@lerna/package-graph" "3.18.5"
- "@lerna/pulse-till-done" "3.13.0"
- "@lerna/rimraf-dir" "3.16.5"
- "@lerna/run-lifecycle" "3.16.2"
- "@lerna/run-topologically" "3.18.5"
- "@lerna/symlink-binary" "3.17.0"
- "@lerna/symlink-dependencies" "3.17.0"
- "@lerna/validation-error" "3.13.0"
- dedent "^0.7.0"
- get-port "^4.2.0"
- multimatch "^3.0.0"
- npm-package-arg "^6.1.0"
- npmlog "^4.1.2"
- p-finally "^1.0.0"
- p-map "^2.1.0"
- p-map-series "^1.0.0"
- p-waterfall "^1.0.0"
- read-package-tree "^5.1.6"
- semver "^6.2.0"
-
-"@lerna/changed@3.21.0":
- version "3.21.0"
- resolved "https://registry.yarnpkg.com/@lerna/changed/-/changed-3.21.0.tgz#108e15f679bfe077af500f58248c634f1044ea0b"
- integrity sha512-hzqoyf8MSHVjZp0gfJ7G8jaz+++mgXYiNs9iViQGA8JlN/dnWLI5sWDptEH3/B30Izo+fdVz0S0s7ydVE3pWIw==
- dependencies:
- "@lerna/collect-updates" "3.20.0"
- "@lerna/command" "3.21.0"
- "@lerna/listable" "3.18.5"
- "@lerna/output" "3.13.0"
-
-"@lerna/check-working-tree@3.16.5":
- version "3.16.5"
- resolved "https://registry.yarnpkg.com/@lerna/check-working-tree/-/check-working-tree-3.16.5.tgz#b4f8ae61bb4523561dfb9f8f8d874dd46bb44baa"
- integrity sha512-xWjVBcuhvB8+UmCSb5tKVLB5OuzSpw96WEhS2uz6hkWVa/Euh1A0/HJwn2cemyK47wUrCQXtczBUiqnq9yX5VQ==
- dependencies:
- "@lerna/collect-uncommitted" "3.16.5"
- "@lerna/describe-ref" "3.16.5"
- "@lerna/validation-error" "3.13.0"
-
-"@lerna/child-process@3.16.5":
- version "3.16.5"
- resolved "https://registry.yarnpkg.com/@lerna/child-process/-/child-process-3.16.5.tgz#38fa3c18064aa4ac0754ad80114776a7b36a69b2"
- integrity sha512-vdcI7mzei9ERRV4oO8Y1LHBZ3A5+ampRKg1wq5nutLsUA4mEBN6H7JqjWOMY9xZemv6+kATm2ofjJ3lW5TszQg==
- dependencies:
- chalk "^2.3.1"
- execa "^1.0.0"
- strong-log-transformer "^2.0.0"
-
-"@lerna/clean@3.21.0":
- version "3.21.0"
- resolved "https://registry.yarnpkg.com/@lerna/clean/-/clean-3.21.0.tgz#c0b46b5300cc3dae2cda3bec14b803082da3856d"
- integrity sha512-b/L9l+MDgE/7oGbrav6rG8RTQvRiZLO1zTcG17zgJAAuhlsPxJExMlh2DFwJEVi2les70vMhHfST3Ue1IMMjpg==
- dependencies:
- "@lerna/command" "3.21.0"
- "@lerna/filter-options" "3.20.0"
- "@lerna/prompt" "3.18.5"
- "@lerna/pulse-till-done" "3.13.0"
- "@lerna/rimraf-dir" "3.16.5"
- p-map "^2.1.0"
- p-map-series "^1.0.0"
- p-waterfall "^1.0.0"
-
-"@lerna/cli@3.18.5":
- version "3.18.5"
- resolved "https://registry.yarnpkg.com/@lerna/cli/-/cli-3.18.5.tgz#c90c461542fcd35b6d5b015a290fb0dbfb41d242"
- integrity sha512-erkbxkj9jfc89vVs/jBLY/fM0I80oLmJkFUV3Q3wk9J3miYhP14zgVEBsPZY68IZlEjT6T3Xlq2xO1AVaatHsA==
- dependencies:
- "@lerna/global-options" "3.13.0"
- dedent "^0.7.0"
- npmlog "^4.1.2"
- yargs "^14.2.2"
-
-"@lerna/collect-uncommitted@3.16.5":
- version "3.16.5"
- resolved "https://registry.yarnpkg.com/@lerna/collect-uncommitted/-/collect-uncommitted-3.16.5.tgz#a494d61aac31cdc7aec4bbe52c96550274132e63"
- integrity sha512-ZgqnGwpDZiWyzIQVZtQaj9tRizsL4dUOhuOStWgTAw1EMe47cvAY2kL709DzxFhjr6JpJSjXV5rZEAeU3VE0Hg==
- dependencies:
- "@lerna/child-process" "3.16.5"
- chalk "^2.3.1"
- figgy-pudding "^3.5.1"
- npmlog "^4.1.2"
-
-"@lerna/collect-updates@3.20.0":
- version "3.20.0"
- resolved "https://registry.yarnpkg.com/@lerna/collect-updates/-/collect-updates-3.20.0.tgz#62f9d76ba21a25b7d9fbf31c02de88744a564bd1"
- integrity sha512-qBTVT5g4fupVhBFuY4nI/3FSJtQVcDh7/gEPOpRxoXB/yCSnT38MFHXWl+y4einLciCjt/+0x6/4AG80fjay2Q==
+"@jridgewell/source-map@^0.3.3":
+ version "0.3.5"
+ resolved "https://registry.yarnpkg.com/@jridgewell/source-map/-/source-map-0.3.5.tgz#a3bb4d5c6825aab0d281268f47f6ad5853431e91"
+ integrity sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==
dependencies:
- "@lerna/child-process" "3.16.5"
- "@lerna/describe-ref" "3.16.5"
- minimatch "^3.0.4"
- npmlog "^4.1.2"
- slash "^2.0.0"
+ "@jridgewell/gen-mapping" "^0.3.0"
+ "@jridgewell/trace-mapping" "^0.3.9"
-"@lerna/command@3.21.0":
- version "3.21.0"
- resolved "https://registry.yarnpkg.com/@lerna/command/-/command-3.21.0.tgz#9a2383759dc7b700dacfa8a22b2f3a6e190121f7"
- integrity sha512-T2bu6R8R3KkH5YoCKdutKv123iUgUbW8efVjdGCDnCMthAQzoentOJfDeodBwn0P2OqCl3ohsiNVtSn9h78fyQ==
- dependencies:
- "@lerna/child-process" "3.16.5"
- "@lerna/package-graph" "3.18.5"
- "@lerna/project" "3.21.0"
- "@lerna/validation-error" "3.13.0"
- "@lerna/write-log-file" "3.13.0"
- clone-deep "^4.0.1"
- dedent "^0.7.0"
- execa "^1.0.0"
- is-ci "^2.0.0"
- npmlog "^4.1.2"
+"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14", "@jridgewell/sourcemap-codec@^1.4.15":
+ version "1.4.15"
+ resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32"
+ integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==
-"@lerna/conventional-commits@3.22.0":
- version "3.22.0"
- resolved "https://registry.yarnpkg.com/@lerna/conventional-commits/-/conventional-commits-3.22.0.tgz#2798f4881ee2ef457bdae027ab7d0bf0af6f1e09"
- integrity sha512-z4ZZk1e8Mhz7+IS8NxHr64wyklHctCJyWpJKEZZPJiLFJ8yKto/x38O80R10pIzC0rr8Sy/OsjSH4bl0TbbgqA==
- dependencies:
- "@lerna/validation-error" "3.13.0"
- conventional-changelog-angular "^5.0.3"
- conventional-changelog-core "^3.1.6"
- conventional-recommended-bump "^5.0.0"
- fs-extra "^8.1.0"
- get-stream "^4.0.0"
- lodash.template "^4.5.0"
- npm-package-arg "^6.1.0"
- npmlog "^4.1.2"
- pify "^4.0.1"
- semver "^6.2.0"
+"@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.20", "@jridgewell/trace-mapping@^0.3.8", "@jridgewell/trace-mapping@^0.3.9":
+ version "0.3.21"
+ resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.21.tgz#5dc1df7b3dc4a6209e503a924e1ca56097a2bb15"
+ integrity sha512-SRfKmRe1KvYnxjEMtxEr+J4HIeMX5YBg/qhRHpxEIGjhX1rshcHlnFUE9K0GazhVKWM7B+nARSkV8LuvJdJ5/g==
+ dependencies:
+ "@jridgewell/resolve-uri" "^3.1.0"
+ "@jridgewell/sourcemap-codec" "^1.4.14"
+
+"@lerna/create@8.0.2":
+ version "8.0.2"
+ resolved "https://registry.yarnpkg.com/@lerna/create/-/create-8.0.2.tgz#30d1ed29bb2f97d579546759e48f472a4ce9dba2"
+ integrity sha512-AueSlfiYXqEmy9/EIc17mjlaHFuv734dfgVBegyoefIA7hdeoExtsXnACWf8Tw5af6gwyTL3KAp6QQyc1sTuZQ==
+ dependencies:
+ "@npmcli/run-script" "7.0.2"
+ "@nx/devkit" ">=17.1.2 < 18"
+ "@octokit/plugin-enterprise-rest" "6.0.1"
+ "@octokit/rest" "19.0.11"
+ byte-size "8.1.1"
+ chalk "4.1.0"
+ clone-deep "4.0.1"
+ cmd-shim "6.0.1"
+ columnify "1.6.0"
+ conventional-changelog-core "5.0.1"
+ conventional-recommended-bump "7.0.1"
+ cosmiconfig "^8.2.0"
+ dedent "0.7.0"
+ execa "5.0.0"
+ fs-extra "^11.1.1"
+ get-stream "6.0.0"
+ git-url-parse "13.1.0"
+ glob-parent "5.1.2"
+ globby "11.1.0"
+ graceful-fs "4.2.11"
+ has-unicode "2.0.1"
+ ini "^1.3.8"
+ init-package-json "5.0.0"
+ inquirer "^8.2.4"
+ is-ci "3.0.1"
+ is-stream "2.0.0"
+ js-yaml "4.1.0"
+ libnpmpublish "7.3.0"
+ load-json-file "6.2.0"
+ lodash "^4.17.21"
+ make-dir "4.0.0"
+ minimatch "3.0.5"
+ multimatch "5.0.0"
+ node-fetch "2.6.7"
+ npm-package-arg "8.1.1"
+ npm-packlist "5.1.1"
+ npm-registry-fetch "^14.0.5"
+ npmlog "^6.0.2"
+ nx ">=17.1.2 < 18"
+ p-map "4.0.0"
+ p-map-series "2.1.0"
+ p-queue "6.6.2"
+ p-reduce "^2.1.0"
+ pacote "^17.0.5"
+ pify "5.0.0"
+ read-cmd-shim "4.0.0"
+ read-package-json "6.0.4"
+ resolve-from "5.0.0"
+ rimraf "^4.4.1"
+ semver "^7.3.4"
+ signal-exit "3.0.7"
+ slash "^3.0.0"
+ ssri "^9.0.1"
+ strong-log-transformer "2.1.0"
+ tar "6.1.11"
+ temp-dir "1.0.0"
+ upath "2.0.1"
+ uuid "^9.0.0"
+ validate-npm-package-license "^3.0.4"
+ validate-npm-package-name "5.0.0"
+ write-file-atomic "5.0.1"
+ write-pkg "4.0.0"
+ yargs "17.7.2"
+ yargs-parser "21.1.1"
-"@lerna/create-symlink@3.16.2":
- version "3.16.2"
- resolved "https://registry.yarnpkg.com/@lerna/create-symlink/-/create-symlink-3.16.2.tgz#412cb8e59a72f5a7d9463e4e4721ad2070149967"
- integrity sha512-pzXIJp6av15P325sgiIRpsPXLFmkisLhMBCy4764d+7yjf2bzrJ4gkWVMhsv4AdF0NN3OyZ5jjzzTtLNqfR+Jw==
+"@manypkg/find-root@^1.1.0":
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/@manypkg/find-root/-/find-root-1.1.0.tgz#a62d8ed1cd7e7d4c11d9d52a8397460b5d4ad29f"
+ integrity sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==
dependencies:
- "@zkochan/cmd-shim" "^3.1.0"
+ "@babel/runtime" "^7.5.5"
+ "@types/node" "^12.7.1"
+ find-up "^4.1.0"
fs-extra "^8.1.0"
- npmlog "^4.1.2"
-"@lerna/create@3.22.0":
- version "3.22.0"
- resolved "https://registry.yarnpkg.com/@lerna/create/-/create-3.22.0.tgz#d6bbd037c3dc5b425fe5f6d1b817057c278f7619"
- integrity sha512-MdiQQzCcB4E9fBF1TyMOaAEz9lUjIHp1Ju9H7f3lXze5JK6Fl5NYkouAvsLgY6YSIhXMY8AHW2zzXeBDY4yWkw==
+"@manypkg/get-packages@^1.1.3":
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/@manypkg/get-packages/-/get-packages-1.1.3.tgz#e184db9bba792fa4693de4658cfb1463ac2c9c47"
+ integrity sha512-fo+QhuU3qE/2TQMQmbVMqaQ6EWbMhi4ABWP+O4AM1NqPBuy0OrApV5LO6BrrgnhtAHS2NH6RrVk9OL181tTi8A==
dependencies:
- "@evocateur/pacote" "^9.6.3"
- "@lerna/child-process" "3.16.5"
- "@lerna/command" "3.21.0"
- "@lerna/npm-conf" "3.16.0"
- "@lerna/validation-error" "3.13.0"
- camelcase "^5.0.0"
- dedent "^0.7.0"
+ "@babel/runtime" "^7.5.5"
+ "@changesets/types" "^4.0.1"
+ "@manypkg/find-root" "^1.1.0"
fs-extra "^8.1.0"
- globby "^9.2.0"
- init-package-json "^1.10.3"
- npm-package-arg "^6.1.0"
- p-reduce "^1.0.0"
- pify "^4.0.1"
- semver "^6.2.0"
- slash "^2.0.0"
- validate-npm-package-license "^3.0.3"
- validate-npm-package-name "^3.0.0"
- whatwg-url "^7.0.0"
+ globby "^11.0.0"
+ read-yaml-file "^1.1.0"
-"@lerna/describe-ref@3.16.5":
- version "3.16.5"
- resolved "https://registry.yarnpkg.com/@lerna/describe-ref/-/describe-ref-3.16.5.tgz#a338c25aaed837d3dc70b8a72c447c5c66346ac0"
- integrity sha512-c01+4gUF0saOOtDBzbLMFOTJDHTKbDFNErEY6q6i9QaXuzy9LNN62z+Hw4acAAZuJQhrVWncVathcmkkjvSVGw==
+"@mapbox/node-pre-gyp@^1.0.0":
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.5.tgz#2a0b32fcb416fb3f2250fd24cb2a81421a4f5950"
+ integrity sha512-4srsKPXWlIxp5Vbqz5uLfBN+du2fJChBoYn/f2h991WLdk7jUvcSk/McVLSv/X+xQIPI8eGD5GjrnygdyHnhPA==
dependencies:
- "@lerna/child-process" "3.16.5"
+ detect-libc "^1.0.3"
+ https-proxy-agent "^5.0.0"
+ make-dir "^3.1.0"
+ node-fetch "^2.6.1"
+ nopt "^5.0.0"
npmlog "^4.1.2"
+ rimraf "^3.0.2"
+ semver "^7.3.4"
+ tar "^6.1.0"
+
+"@nicolo-ribaudo/chokidar-2@2.1.8-no-fsevents.3":
+ version "2.1.8-no-fsevents.3"
+ resolved "https://registry.yarnpkg.com/@nicolo-ribaudo/chokidar-2/-/chokidar-2-2.1.8-no-fsevents.3.tgz#323d72dd25103d0c4fbdce89dadf574a787b1f9b"
+ integrity sha512-s88O1aVtXftvp5bCPB7WnmXc5IwOZZ7YPuwNPt+GtOOXpPvad1LfbmjYv+qII7zP6RU2QGnqve27dnLycEnyEQ==
-"@lerna/diff@3.21.0":
- version "3.21.0"
- resolved "https://registry.yarnpkg.com/@lerna/diff/-/diff-3.21.0.tgz#e6df0d8b9916167ff5a49fcb02ac06424280a68d"
- integrity sha512-5viTR33QV3S7O+bjruo1SaR40m7F2aUHJaDAC7fL9Ca6xji+aw1KFkpCtVlISS0G8vikUREGMJh+c/VMSc8Usw==
+"@nodelib/fs.scandir@2.1.5":
+ version "2.1.5"
+ resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5"
+ integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==
dependencies:
- "@lerna/child-process" "3.16.5"
- "@lerna/command" "3.21.0"
- "@lerna/validation-error" "3.13.0"
- npmlog "^4.1.2"
+ "@nodelib/fs.stat" "2.0.5"
+ run-parallel "^1.1.9"
-"@lerna/exec@3.21.0":
- version "3.21.0"
- resolved "https://registry.yarnpkg.com/@lerna/exec/-/exec-3.21.0.tgz#17f07533893cb918a17b41bcc566dc437016db26"
- integrity sha512-iLvDBrIE6rpdd4GIKTY9mkXyhwsJ2RvQdB9ZU+/NhR3okXfqKc6py/24tV111jqpXTtZUW6HNydT4dMao2hi1Q==
- dependencies:
- "@lerna/child-process" "3.16.5"
- "@lerna/command" "3.21.0"
- "@lerna/filter-options" "3.20.0"
- "@lerna/profiler" "3.20.0"
- "@lerna/run-topologically" "3.18.5"
- "@lerna/validation-error" "3.13.0"
- p-map "^2.1.0"
-
-"@lerna/filter-options@3.20.0":
- version "3.20.0"
- resolved "https://registry.yarnpkg.com/@lerna/filter-options/-/filter-options-3.20.0.tgz#0f0f5d5a4783856eece4204708cc902cbc8af59b"
- integrity sha512-bmcHtvxn7SIl/R9gpiNMVG7yjx7WyT0HSGw34YVZ9B+3xF/83N3r5Rgtjh4hheLZ+Q91Or0Jyu5O3Nr+AwZe2g==
- dependencies:
- "@lerna/collect-updates" "3.20.0"
- "@lerna/filter-packages" "3.18.0"
- dedent "^0.7.0"
- figgy-pudding "^3.5.1"
- npmlog "^4.1.2"
+"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2":
+ version "2.0.5"
+ resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b"
+ integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==
-"@lerna/filter-packages@3.18.0":
- version "3.18.0"
- resolved "https://registry.yarnpkg.com/@lerna/filter-packages/-/filter-packages-3.18.0.tgz#6a7a376d285208db03a82958cfb8172e179b4e70"
- integrity sha512-6/0pMM04bCHNATIOkouuYmPg6KH3VkPCIgTfQmdkPJTullERyEQfNUKikrefjxo1vHOoCACDpy65JYyKiAbdwQ==
+"@nodelib/fs.walk@^1.2.3", "@nodelib/fs.walk@^1.2.8":
+ version "1.2.8"
+ resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a"
+ integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==
dependencies:
- "@lerna/validation-error" "3.13.0"
- multimatch "^3.0.0"
- npmlog "^4.1.2"
+ "@nodelib/fs.scandir" "2.1.5"
+ fastq "^1.6.0"
-"@lerna/get-npm-exec-opts@3.13.0":
- version "3.13.0"
- resolved "https://registry.yarnpkg.com/@lerna/get-npm-exec-opts/-/get-npm-exec-opts-3.13.0.tgz#d1b552cb0088199fc3e7e126f914e39a08df9ea5"
- integrity sha512-Y0xWL0rg3boVyJk6An/vurKzubyJKtrxYv2sj4bB8Mc5zZ3tqtv0ccbOkmkXKqbzvNNF7VeUt1OJ3DRgtC/QZw==
+"@npmcli/agent@^2.0.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@npmcli/agent/-/agent-2.2.0.tgz#e81f00fdb2a670750ff7731bbefb47ecbf0ccf44"
+ integrity sha512-2yThA1Es98orMkpSLVqlDZAMPK3jHJhifP2gnNUdk1754uZ8yI5c+ulCoVG+WlntQA6MzhrURMXjSd9Z7dJ2/Q==
dependencies:
- npmlog "^4.1.2"
+ agent-base "^7.1.0"
+ http-proxy-agent "^7.0.0"
+ https-proxy-agent "^7.0.1"
+ lru-cache "^10.0.1"
+ socks-proxy-agent "^8.0.1"
-"@lerna/get-packed@3.16.0":
- version "3.16.0"
- resolved "https://registry.yarnpkg.com/@lerna/get-packed/-/get-packed-3.16.0.tgz#1b316b706dcee86c7baa55e50b087959447852ff"
- integrity sha512-AjsFiaJzo1GCPnJUJZiTW6J1EihrPkc2y3nMu6m3uWFxoleklsSCyImumzVZJssxMi3CPpztj8LmADLedl9kXw==
+"@npmcli/fs@^3.1.0":
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/@npmcli/fs/-/fs-3.1.0.tgz#233d43a25a91d68c3a863ba0da6a3f00924a173e"
+ integrity sha512-7kZUAaLscfgbwBQRbvdMYaZOWyMEcPTH/tJjnyAWJ/dvvs9Ef+CERx/qJb9GExJpl1qipaDGn7KqHnFGGixd0w==
dependencies:
- fs-extra "^8.1.0"
- ssri "^6.0.1"
- tar "^4.4.8"
-
-"@lerna/github-client@3.22.0":
- version "3.22.0"
- resolved "https://registry.yarnpkg.com/@lerna/github-client/-/github-client-3.22.0.tgz#5d816aa4f76747ed736ae64ff962b8f15c354d95"
- integrity sha512-O/GwPW+Gzr3Eb5bk+nTzTJ3uv+jh5jGho9BOqKlajXaOkMYGBELEAqV5+uARNGWZFvYAiF4PgqHb6aCUu7XdXg==
- dependencies:
- "@lerna/child-process" "3.16.5"
- "@octokit/plugin-enterprise-rest" "^6.0.1"
- "@octokit/rest" "^16.28.4"
- git-url-parse "^11.1.2"
- npmlog "^4.1.2"
+ semver "^7.3.5"
-"@lerna/gitlab-client@3.15.0":
- version "3.15.0"
- resolved "https://registry.yarnpkg.com/@lerna/gitlab-client/-/gitlab-client-3.15.0.tgz#91f4ec8c697b5ac57f7f25bd50fe659d24aa96a6"
- integrity sha512-OsBvRSejHXUBMgwWQqNoioB8sgzL/Pf1pOUhHKtkiMl6aAWjklaaq5HPMvTIsZPfS6DJ9L5OK2GGZuooP/5c8Q==
+"@npmcli/git@^5.0.0":
+ version "5.0.4"
+ resolved "https://registry.yarnpkg.com/@npmcli/git/-/git-5.0.4.tgz#d18c50f99649e6e89e8b427318134f582498700c"
+ integrity sha512-nr6/WezNzuYUppzXRaYu/W4aT5rLxdXqEFupbh6e/ovlYFQ8hpu1UUPV3Ir/YTl+74iXl2ZOMlGzudh9ZPUchQ==
dependencies:
- node-fetch "^2.5.0"
- npmlog "^4.1.2"
- whatwg-url "^7.0.0"
-
-"@lerna/global-options@3.13.0":
- version "3.13.0"
- resolved "https://registry.yarnpkg.com/@lerna/global-options/-/global-options-3.13.0.tgz#217662290db06ad9cf2c49d8e3100ee28eaebae1"
- integrity sha512-SlZvh1gVRRzYLVluz9fryY1nJpZ0FHDGB66U9tFfvnnxmueckRQxLopn3tXj3NU1kc3QANT2I5BsQkOqZ4TEFQ==
-
-"@lerna/has-npm-version@3.16.5":
- version "3.16.5"
- resolved "https://registry.yarnpkg.com/@lerna/has-npm-version/-/has-npm-version-3.16.5.tgz#ab83956f211d8923ea6afe9b979b38cc73b15326"
- integrity sha512-WL7LycR9bkftyqbYop5rEGJ9sRFIV55tSGmbN1HLrF9idwOCD7CLrT64t235t3t4O5gehDnwKI5h2U3oxTrF8Q==
- dependencies:
- "@lerna/child-process" "3.16.5"
- semver "^6.2.0"
-
-"@lerna/import@3.22.0":
- version "3.22.0"
- resolved "https://registry.yarnpkg.com/@lerna/import/-/import-3.22.0.tgz#1a5f0394f38e23c4f642a123e5e1517e70d068d2"
- integrity sha512-uWOlexasM5XR6tXi4YehODtH9Y3OZrFht3mGUFFT3OIl2s+V85xIGFfqFGMTipMPAGb2oF1UBLL48kR43hRsOg==
- dependencies:
- "@lerna/child-process" "3.16.5"
- "@lerna/command" "3.21.0"
- "@lerna/prompt" "3.18.5"
- "@lerna/pulse-till-done" "3.13.0"
- "@lerna/validation-error" "3.13.0"
- dedent "^0.7.0"
- fs-extra "^8.1.0"
- p-map-series "^1.0.0"
+ "@npmcli/promise-spawn" "^7.0.0"
+ lru-cache "^10.0.1"
+ npm-pick-manifest "^9.0.0"
+ proc-log "^3.0.0"
+ promise-inflight "^1.0.1"
+ promise-retry "^2.0.1"
+ semver "^7.3.5"
+ which "^4.0.0"
-"@lerna/info@3.21.0":
- version "3.21.0"
- resolved "https://registry.yarnpkg.com/@lerna/info/-/info-3.21.0.tgz#76696b676fdb0f35d48c83c63c1e32bb5e37814f"
- integrity sha512-0XDqGYVBgWxUquFaIptW2bYSIu6jOs1BtkvRTWDDhw4zyEdp6q4eaMvqdSap1CG+7wM5jeLCi6z94wS0AuiuwA==
+"@npmcli/installed-package-contents@^2.0.1":
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/@npmcli/installed-package-contents/-/installed-package-contents-2.0.2.tgz#bfd817eccd9e8df200919e73f57f9e3d9e4f9e33"
+ integrity sha512-xACzLPhnfD51GKvTOOuNX2/V4G4mz9/1I2MfDoye9kBM3RYe5g2YbscsaGoTlaWqkxeiapBWyseULVKpSVHtKQ==
dependencies:
- "@lerna/command" "3.21.0"
- "@lerna/output" "3.13.0"
- envinfo "^7.3.1"
+ npm-bundled "^3.0.0"
+ npm-normalize-package-bin "^3.0.0"
-"@lerna/init@3.21.0":
- version "3.21.0"
- resolved "https://registry.yarnpkg.com/@lerna/init/-/init-3.21.0.tgz#1e810934dc8bf4e5386c031041881d3b4096aa5c"
- integrity sha512-6CM0z+EFUkFfurwdJCR+LQQF6MqHbYDCBPyhu/d086LRf58GtYZYj49J8mKG9ktayp/TOIxL/pKKjgLD8QBPOg==
- dependencies:
- "@lerna/child-process" "3.16.5"
- "@lerna/command" "3.21.0"
- fs-extra "^8.1.0"
- p-map "^2.1.0"
- write-json-file "^3.2.0"
+"@npmcli/node-gyp@^3.0.0":
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/@npmcli/node-gyp/-/node-gyp-3.0.0.tgz#101b2d0490ef1aa20ed460e4c0813f0db560545a"
+ integrity sha512-gp8pRXC2oOxu0DUE1/M3bYtb1b3/DbJ5aM113+XJBgfXdussRAsX0YOrOhdd8WvnAR6auDBvJomGAkLKA5ydxA==
-"@lerna/link@3.21.0":
- version "3.21.0"
- resolved "https://registry.yarnpkg.com/@lerna/link/-/link-3.21.0.tgz#8be68ff0ccee104b174b5bbd606302c2f06e9d9b"
- integrity sha512-tGu9GxrX7Ivs+Wl3w1+jrLi1nQ36kNI32dcOssij6bg0oZ2M2MDEFI9UF2gmoypTaN9uO5TSsjCFS7aR79HbdQ==
+"@npmcli/promise-spawn@^7.0.0":
+ version "7.0.1"
+ resolved "https://registry.yarnpkg.com/@npmcli/promise-spawn/-/promise-spawn-7.0.1.tgz#a836de2f42a2245d629cf6fbb8dd6c74c74c55af"
+ integrity sha512-P4KkF9jX3y+7yFUxgcUdDtLy+t4OlDGuEBLNs57AZsfSfg+uV6MLndqGpnl4831ggaEdXwR50XFoZP4VFtHolg==
dependencies:
- "@lerna/command" "3.21.0"
- "@lerna/package-graph" "3.18.5"
- "@lerna/symlink-dependencies" "3.17.0"
- p-map "^2.1.0"
- slash "^2.0.0"
+ which "^4.0.0"
-"@lerna/list@3.21.0":
- version "3.21.0"
- resolved "https://registry.yarnpkg.com/@lerna/list/-/list-3.21.0.tgz#42f76fafa56dea13b691ec8cab13832691d61da2"
- integrity sha512-KehRjE83B1VaAbRRkRy6jLX1Cin8ltsrQ7FHf2bhwhRHK0S54YuA6LOoBnY/NtA8bHDX/Z+G5sMY78X30NS9tg==
+"@npmcli/run-script@7.0.2":
+ version "7.0.2"
+ resolved "https://registry.yarnpkg.com/@npmcli/run-script/-/run-script-7.0.2.tgz#497e7f058799497889df65900c711312252276d3"
+ integrity sha512-Omu0rpA8WXvcGeY6DDzyRoY1i5DkCBkzyJ+m2u7PD6quzb0TvSqdIPOkTn8ZBOj7LbbcbMfZ3c5skwSu6m8y2w==
dependencies:
- "@lerna/command" "3.21.0"
- "@lerna/filter-options" "3.20.0"
- "@lerna/listable" "3.18.5"
- "@lerna/output" "3.13.0"
+ "@npmcli/node-gyp" "^3.0.0"
+ "@npmcli/promise-spawn" "^7.0.0"
+ node-gyp "^10.0.0"
+ read-package-json-fast "^3.0.0"
+ which "^4.0.0"
-"@lerna/listable@3.18.5":
- version "3.18.5"
- resolved "https://registry.yarnpkg.com/@lerna/listable/-/listable-3.18.5.tgz#e82798405b5ed8fc51843c8ef1e7a0e497388a1a"
- integrity sha512-Sdr3pVyaEv5A7ZkGGYR7zN+tTl2iDcinryBPvtuv20VJrXBE8wYcOks1edBTcOWsPjCE/rMP4bo1pseyk3UTsg==
- dependencies:
- "@lerna/query-graph" "3.18.5"
- chalk "^2.3.1"
- columnify "^1.5.4"
+"@npmcli/run-script@^7.0.0":
+ version "7.0.3"
+ resolved "https://registry.yarnpkg.com/@npmcli/run-script/-/run-script-7.0.3.tgz#a803e05c4b58e2a7b3f801a9f2767f22822df457"
+ integrity sha512-ZMWGLHpzMq3rBGIwPyeaoaleaLMvrBrH8nugHxTi5ACkJZXTxXPtVuEH91ifgtss5hUwJQ2VDnzDBWPmz78rvg==
+ dependencies:
+ "@npmcli/node-gyp" "^3.0.0"
+ "@npmcli/promise-spawn" "^7.0.0"
+ node-gyp "^10.0.0"
+ read-package-json-fast "^3.0.0"
+ which "^4.0.0"
+
+"@nrwl/devkit@17.2.8":
+ version "17.2.8"
+ resolved "https://registry.yarnpkg.com/@nrwl/devkit/-/devkit-17.2.8.tgz#dd3467b484c4611454a45541ffb29e4de5b2ebe7"
+ integrity sha512-l2dFy5LkWqSA45s6pee6CoqJeluH+sjRdVnAAQfjLHRNSx6mFAKblyzq5h1f4P0EUCVVVqLs+kVqmNx5zxYqvw==
+ dependencies:
+ "@nx/devkit" "17.2.8"
+
+"@nrwl/tao@17.2.8":
+ version "17.2.8"
+ resolved "https://registry.yarnpkg.com/@nrwl/tao/-/tao-17.2.8.tgz#41ff3d715a0763e95cf5c35e7f79cd3be358dc5f"
+ integrity sha512-Qpk5YKeJ+LppPL/wtoDyNGbJs2MsTi6qyX/RdRrEc8lc4bk6Cw3Oul1qTXCI6jT0KzTz+dZtd0zYD/G7okkzvg==
+ dependencies:
+ nx "17.2.8"
+ tslib "^2.3.0"
+
+"@nx/devkit@17.2.8", "@nx/devkit@>=17.1.2 < 18":
+ version "17.2.8"
+ resolved "https://registry.yarnpkg.com/@nx/devkit/-/devkit-17.2.8.tgz#49b6c94a3c12fba63eae6514fb37a468d0570e2e"
+ integrity sha512-6LtiQihtZwqz4hSrtT5cCG5XMCWppG6/B8c1kNksg97JuomELlWyUyVF+sxmeERkcLYFaKPTZytP0L3dmCFXaw==
+ dependencies:
+ "@nrwl/devkit" "17.2.8"
+ ejs "^3.1.7"
+ enquirer "~2.3.6"
+ ignore "^5.0.4"
+ semver "7.5.3"
+ tmp "~0.2.1"
+ tslib "^2.3.0"
+
+"@nx/nx-darwin-arm64@17.2.8":
+ version "17.2.8"
+ resolved "https://registry.yarnpkg.com/@nx/nx-darwin-arm64/-/nx-darwin-arm64-17.2.8.tgz#26645c9548d5e387b43c06fccfa18e2c1f08055e"
+ integrity sha512-dMb0uxug4hM7tusISAU1TfkDK3ixYmzc1zhHSZwpR7yKJIyKLtUpBTbryt8nyso37AS1yH+dmfh2Fj2WxfBHTg==
+
+"@nx/nx-darwin-x64@17.2.8":
+ version "17.2.8"
+ resolved "https://registry.yarnpkg.com/@nx/nx-darwin-x64/-/nx-darwin-x64-17.2.8.tgz#5143d6d01d24e338cb3d39076fe2af95146cb538"
+ integrity sha512-0cXzp1tGr7/6lJel102QiLA4NkaLCkQJj6VzwbwuvmuCDxPbpmbz7HC1tUteijKBtOcdXit1/MEoEU007To8Bw==
+
+"@nx/nx-freebsd-x64@17.2.8":
+ version "17.2.8"
+ resolved "https://registry.yarnpkg.com/@nx/nx-freebsd-x64/-/nx-freebsd-x64-17.2.8.tgz#82a018a1855170e0243b8fe7b0032af279c3fb83"
+ integrity sha512-YFMgx5Qpp2btCgvaniDGdu7Ctj56bfFvbbaHQWmOeBPK1krNDp2mqp8HK6ZKOfEuDJGOYAp7HDtCLvdZKvJxzA==
+
+"@nx/nx-linux-arm-gnueabihf@17.2.8":
+ version "17.2.8"
+ resolved "https://registry.yarnpkg.com/@nx/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-17.2.8.tgz#18b9c324221ff6a30589f3fc272a843aca57b70f"
+ integrity sha512-iN2my6MrhLRkVDtdivQHugK8YmR7URo1wU9UDuHQ55z3tEcny7LV3W9NSsY9UYPK/FrxdDfevj0r2hgSSdhnzA==
+
+"@nx/nx-linux-arm64-gnu@17.2.8":
+ version "17.2.8"
+ resolved "https://registry.yarnpkg.com/@nx/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-17.2.8.tgz#54a08640a2babe78bcf3283565b00eb487db595e"
+ integrity sha512-Iy8BjoW6mOKrSMiTGujUcNdv+xSM1DALTH6y3iLvNDkGbjGK1Re6QNnJAzqcXyDpv32Q4Fc57PmuexyysZxIGg==
+
+"@nx/nx-linux-arm64-musl@17.2.8":
+ version "17.2.8"
+ resolved "https://registry.yarnpkg.com/@nx/nx-linux-arm64-musl/-/nx-linux-arm64-musl-17.2.8.tgz#cd7b673bb9f45fec7aa1b6c880a0d23d658e927f"
+ integrity sha512-9wkAxWzknjpzdofL1xjtU6qPFF1PHlvKCZI3hgEYJDo4mQiatGI+7Ttko+lx/ZMP6v4+Umjtgq7+qWrApeKamQ==
+
+"@nx/nx-linux-x64-gnu@17.2.8":
+ version "17.2.8"
+ resolved "https://registry.yarnpkg.com/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-17.2.8.tgz#009eb75c77bf075bc9c13ec4f9caf77821eee639"
+ integrity sha512-sjG1bwGsjLxToasZ3lShildFsF0eyeGu+pOQZIp9+gjFbeIkd19cTlCnHrOV9hoF364GuKSXQyUlwtFYFR4VTQ==
+
+"@nx/nx-linux-x64-musl@17.2.8":
+ version "17.2.8"
+ resolved "https://registry.yarnpkg.com/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-17.2.8.tgz#8ee2324068732a135ca4b01081942d5956885167"
+ integrity sha512-QiakXZ1xBCIptmkGEouLHQbcM4klQkcr+kEaz2PlNwy/sW3gH1b/1c0Ed5J1AN9xgQxWspriAONpScYBRgxdhA==
+
+"@nx/nx-win32-arm64-msvc@17.2.8":
+ version "17.2.8"
+ resolved "https://registry.yarnpkg.com/@nx/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-17.2.8.tgz#9bdce5b4d1f9cec7ef326eaf43b99e68576398b0"
+ integrity sha512-XBWUY/F/GU3vKN9CAxeI15gM4kr3GOBqnzFZzoZC4qJt2hKSSUEWsMgeZtsMgeqEClbi4ZyCCkY7YJgU32WUGA==
+
+"@nx/nx-win32-x64-msvc@17.2.8":
+ version "17.2.8"
+ resolved "https://registry.yarnpkg.com/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-17.2.8.tgz#8a86ff250021ad47686b58f1840b348a209b1158"
+ integrity sha512-HTqDv+JThlLzbcEm/3f+LbS5/wYQWzb5YDXbP1wi7nlCTihNZOLNqGOkEmwlrR5tAdNHPRpHSmkYg4305W0CtA==
+
+"@octokit/auth-token@^3.0.0":
+ version "3.0.4"
+ resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-3.0.4.tgz#70e941ba742bdd2b49bdb7393e821dea8520a3db"
+ integrity sha512-TWFX7cZF2LXoCvdmJWY7XVPi74aSY0+FfBZNSXEXFkMpjcqsQwDSYVv5FhRFaI0V1ECnwbz4j59T/G+rXNWaIQ==
+
+"@octokit/core@^4.2.1":
+ version "4.2.4"
+ resolved "https://registry.yarnpkg.com/@octokit/core/-/core-4.2.4.tgz#d8769ec2b43ff37cc3ea89ec4681a20ba58ef907"
+ integrity sha512-rYKilwgzQ7/imScn3M9/pFfUf4I1AZEH3KhyJmtPdE2zfaXAn2mFfUy4FbKewzc2We5y/LlKLj36fWJLKC2SIQ==
+ dependencies:
+ "@octokit/auth-token" "^3.0.0"
+ "@octokit/graphql" "^5.0.0"
+ "@octokit/request" "^6.0.0"
+ "@octokit/request-error" "^3.0.0"
+ "@octokit/types" "^9.0.0"
+ before-after-hook "^2.2.0"
+ universal-user-agent "^6.0.0"
-"@lerna/log-packed@3.16.0":
- version "3.16.0"
- resolved "https://registry.yarnpkg.com/@lerna/log-packed/-/log-packed-3.16.0.tgz#f83991041ee77b2495634e14470b42259fd2bc16"
- integrity sha512-Fp+McSNBV/P2mnLUYTaSlG8GSmpXM7krKWcllqElGxvAqv6chk2K3c2k80MeVB4WvJ9tRjUUf+i7HUTiQ9/ckQ==
+"@octokit/endpoint@^7.0.0":
+ version "7.0.6"
+ resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-7.0.6.tgz#791f65d3937555141fb6c08f91d618a7d645f1e2"
+ integrity sha512-5L4fseVRUsDFGR00tMWD/Trdeeihn999rTMGRMC1G/Ldi1uWlWJzI98H4Iak5DB/RVvQuyMYKqSK/R6mbSOQyg==
dependencies:
- byte-size "^5.0.1"
- columnify "^1.5.4"
- has-unicode "^2.0.1"
- npmlog "^4.1.2"
+ "@octokit/types" "^9.0.0"
+ is-plain-object "^5.0.0"
+ universal-user-agent "^6.0.0"
-"@lerna/npm-conf@3.16.0":
- version "3.16.0"
- resolved "https://registry.yarnpkg.com/@lerna/npm-conf/-/npm-conf-3.16.0.tgz#1c10a89ae2f6c2ee96962557738685300d376827"
- integrity sha512-HbO3DUrTkCAn2iQ9+FF/eisDpWY5POQAOF1m7q//CZjdC2HSW3UYbKEGsSisFxSfaF9Z4jtrV+F/wX6qWs3CuA==
+"@octokit/graphql@^5.0.0":
+ version "5.0.6"
+ resolved "https://registry.yarnpkg.com/@octokit/graphql/-/graphql-5.0.6.tgz#9eac411ac4353ccc5d3fca7d76736e6888c5d248"
+ integrity sha512-Fxyxdy/JH0MnIB5h+UQ3yCoh1FG4kWXfFKkpWqjZHw/p+Kc8Y44Hu/kCgNBT6nU1shNumEchmW/sUO1JuQnPcw==
dependencies:
- config-chain "^1.1.11"
- pify "^4.0.1"
+ "@octokit/request" "^6.0.0"
+ "@octokit/types" "^9.0.0"
+ universal-user-agent "^6.0.0"
-"@lerna/npm-dist-tag@3.18.5":
- version "3.18.5"
- resolved "https://registry.yarnpkg.com/@lerna/npm-dist-tag/-/npm-dist-tag-3.18.5.tgz#9ef9abb7c104077b31f6fab22cc73b314d54ac55"
- integrity sha512-xw0HDoIG6HreVsJND9/dGls1c+lf6vhu7yJoo56Sz5bvncTloYGLUppIfDHQr4ZvmPCK8rsh0euCVh2giPxzKQ==
- dependencies:
- "@evocateur/npm-registry-fetch" "^4.0.0"
- "@lerna/otplease" "3.18.5"
- figgy-pudding "^3.5.1"
- npm-package-arg "^6.1.0"
- npmlog "^4.1.2"
+"@octokit/openapi-types@^18.0.0":
+ version "18.1.1"
+ resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-18.1.1.tgz#09bdfdabfd8e16d16324326da5148010d765f009"
+ integrity sha512-VRaeH8nCDtF5aXWnjPuEMIYf1itK/s3JYyJcWFJT8X9pSNnBtriDf7wlEWsGuhPLl4QIH4xM8fqTXDwJ3Mu6sw==
-"@lerna/npm-install@3.16.5":
- version "3.16.5"
- resolved "https://registry.yarnpkg.com/@lerna/npm-install/-/npm-install-3.16.5.tgz#d6bfdc16f81285da66515ae47924d6e278d637d3"
- integrity sha512-hfiKk8Eku6rB9uApqsalHHTHY+mOrrHeWEs+gtg7+meQZMTS3kzv4oVp5cBZigndQr3knTLjwthT/FX4KvseFg==
- dependencies:
- "@lerna/child-process" "3.16.5"
- "@lerna/get-npm-exec-opts" "3.13.0"
- fs-extra "^8.1.0"
- npm-package-arg "^6.1.0"
- npmlog "^4.1.2"
- signal-exit "^3.0.2"
- write-pkg "^3.1.0"
+"@octokit/plugin-enterprise-rest@6.0.1":
+ version "6.0.1"
+ resolved "https://registry.yarnpkg.com/@octokit/plugin-enterprise-rest/-/plugin-enterprise-rest-6.0.1.tgz#e07896739618dab8da7d4077c658003775f95437"
+ integrity sha512-93uGjlhUD+iNg1iWhUENAtJata6w5nE+V4urXOAlIXdco6xNZtUSfYY8dzp3Udy74aqO/B5UZL80x/YMa5PKRw==
-"@lerna/npm-publish@3.18.5":
- version "3.18.5"
- resolved "https://registry.yarnpkg.com/@lerna/npm-publish/-/npm-publish-3.18.5.tgz#240e4039959fd9816b49c5b07421e11b5cb000af"
- integrity sha512-3etLT9+2L8JAx5F8uf7qp6iAtOLSMj+ZYWY6oUgozPi/uLqU0/gsMsEXh3F0+YVW33q0M61RpduBoAlOOZnaTg==
+"@octokit/plugin-paginate-rest@^6.1.2":
+ version "6.1.2"
+ resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-6.1.2.tgz#f86456a7a1fe9e58fec6385a85cf1b34072341f8"
+ integrity sha512-qhrmtQeHU/IivxucOV1bbI/xZyC/iOBhclokv7Sut5vnejAIAEXVcGQeRpQlU39E0WwK9lNvJHphHri/DB6lbQ==
dependencies:
- "@evocateur/libnpmpublish" "^1.2.2"
- "@lerna/otplease" "3.18.5"
- "@lerna/run-lifecycle" "3.16.2"
- figgy-pudding "^3.5.1"
- fs-extra "^8.1.0"
- npm-package-arg "^6.1.0"
- npmlog "^4.1.2"
- pify "^4.0.1"
- read-package-json "^2.0.13"
+ "@octokit/tsconfig" "^1.0.2"
+ "@octokit/types" "^9.2.3"
-"@lerna/npm-run-script@3.16.5":
- version "3.16.5"
- resolved "https://registry.yarnpkg.com/@lerna/npm-run-script/-/npm-run-script-3.16.5.tgz#9c2ec82453a26c0b46edc0bb7c15816c821f5c15"
- integrity sha512-1asRi+LjmVn3pMjEdpqKJZFT/3ZNpb+VVeJMwrJaV/3DivdNg7XlPK9LTrORuKU4PSvhdEZvJmSlxCKyDpiXsQ==
- dependencies:
- "@lerna/child-process" "3.16.5"
- "@lerna/get-npm-exec-opts" "3.13.0"
- npmlog "^4.1.2"
+"@octokit/plugin-request-log@^1.0.4":
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/@octokit/plugin-request-log/-/plugin-request-log-1.0.4.tgz#5e50ed7083a613816b1e4a28aeec5fb7f1462e85"
+ integrity sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA==
-"@lerna/otplease@3.18.5":
- version "3.18.5"
- resolved "https://registry.yarnpkg.com/@lerna/otplease/-/otplease-3.18.5.tgz#b77b8e760b40abad9f7658d988f3ea77d4fd0231"
- integrity sha512-S+SldXAbcXTEDhzdxYLU0ZBKuYyURP/ND2/dK6IpKgLxQYh/z4ScljPDMyKymmEvgiEJmBsPZAAPfmNPEzxjog==
+"@octokit/plugin-rest-endpoint-methods@^7.1.2":
+ version "7.2.3"
+ resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-7.2.3.tgz#37a84b171a6cb6658816c82c4082ac3512021797"
+ integrity sha512-I5Gml6kTAkzVlN7KCtjOM+Ruwe/rQppp0QU372K1GP7kNOYEKe8Xn5BW4sE62JAHdwpq95OQK/qGNyKQMUzVgA==
dependencies:
- "@lerna/prompt" "3.18.5"
- figgy-pudding "^3.5.1"
+ "@octokit/types" "^10.0.0"
-"@lerna/output@3.13.0":
- version "3.13.0"
- resolved "https://registry.yarnpkg.com/@lerna/output/-/output-3.13.0.tgz#3ded7cc908b27a9872228a630d950aedae7a4989"
- integrity sha512-7ZnQ9nvUDu/WD+bNsypmPG5MwZBwu86iRoiW6C1WBuXXDxM5cnIAC1m2WxHeFnjyMrYlRXM9PzOQ9VDD+C15Rg==
- dependencies:
- npmlog "^4.1.2"
-
-"@lerna/pack-directory@3.16.4":
- version "3.16.4"
- resolved "https://registry.yarnpkg.com/@lerna/pack-directory/-/pack-directory-3.16.4.tgz#3eae5f91bdf5acfe0384510ed53faddc4c074693"
- integrity sha512-uxSF0HZeGyKaaVHz5FroDY9A5NDDiCibrbYR6+khmrhZtY0Bgn6hWq8Gswl9iIlymA+VzCbshWIMX4o2O8C8ng==
+"@octokit/request-error@^3.0.0":
+ version "3.0.3"
+ resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-3.0.3.tgz#ef3dd08b8e964e53e55d471acfe00baa892b9c69"
+ integrity sha512-crqw3V5Iy2uOU5Np+8M/YexTlT8zxCfI+qu+LxUB7SZpje4Qmx3mub5DfEKSO8Ylyk0aogi6TYdf6kxzh2BguQ==
dependencies:
- "@lerna/get-packed" "3.16.0"
- "@lerna/package" "3.16.0"
- "@lerna/run-lifecycle" "3.16.2"
- figgy-pudding "^3.5.1"
- npm-packlist "^1.4.4"
- npmlog "^4.1.2"
- tar "^4.4.10"
- temp-write "^3.4.0"
+ "@octokit/types" "^9.0.0"
+ deprecation "^2.0.0"
+ once "^1.4.0"
-"@lerna/package-graph@3.18.5":
- version "3.18.5"
- resolved "https://registry.yarnpkg.com/@lerna/package-graph/-/package-graph-3.18.5.tgz#c740e2ea3578d059e551633e950690831b941f6b"
- integrity sha512-8QDrR9T+dBegjeLr+n9WZTVxUYUhIUjUgZ0gvNxUBN8S1WB9r6H5Yk56/MVaB64tA3oGAN9IIxX6w0WvTfFudA==
+"@octokit/request@^6.0.0":
+ version "6.2.8"
+ resolved "https://registry.yarnpkg.com/@octokit/request/-/request-6.2.8.tgz#aaf480b32ab2b210e9dadd8271d187c93171d8eb"
+ integrity sha512-ow4+pkVQ+6XVVsekSYBzJC0VTVvh/FCTUUgTsboGq+DTeWdyIFV8WSCdo0RIxk6wSkBTHqIK1mYuY7nOBXOchw==
dependencies:
- "@lerna/prerelease-id-from-version" "3.16.0"
- "@lerna/validation-error" "3.13.0"
- npm-package-arg "^6.1.0"
- npmlog "^4.1.2"
- semver "^6.2.0"
+ "@octokit/endpoint" "^7.0.0"
+ "@octokit/request-error" "^3.0.0"
+ "@octokit/types" "^9.0.0"
+ is-plain-object "^5.0.0"
+ node-fetch "^2.6.7"
+ universal-user-agent "^6.0.0"
-"@lerna/package@3.16.0":
- version "3.16.0"
- resolved "https://registry.yarnpkg.com/@lerna/package/-/package-3.16.0.tgz#7e0a46e4697ed8b8a9c14d59c7f890e0d38ba13c"
- integrity sha512-2lHBWpaxcBoiNVbtyLtPUuTYEaB/Z+eEqRS9duxpZs6D+mTTZMNy6/5vpEVSCBmzvdYpyqhqaYjjSLvjjr5Riw==
+"@octokit/rest@19.0.11":
+ version "19.0.11"
+ resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-19.0.11.tgz#2ae01634fed4bd1fca5b642767205ed3fd36177c"
+ integrity sha512-m2a9VhaP5/tUw8FwfnW2ICXlXpLPIqxtg3XcAiGMLj/Xhw3RSBfZ8le/466ktO1Gcjr8oXudGnHhxV1TXJgFxw==
dependencies:
- load-json-file "^5.3.0"
- npm-package-arg "^6.1.0"
- write-pkg "^3.1.0"
+ "@octokit/core" "^4.2.1"
+ "@octokit/plugin-paginate-rest" "^6.1.2"
+ "@octokit/plugin-request-log" "^1.0.4"
+ "@octokit/plugin-rest-endpoint-methods" "^7.1.2"
-"@lerna/prerelease-id-from-version@3.16.0":
- version "3.16.0"
- resolved "https://registry.yarnpkg.com/@lerna/prerelease-id-from-version/-/prerelease-id-from-version-3.16.0.tgz#b24bfa789f5e1baab914d7b08baae9b7bd7d83a1"
- integrity sha512-qZyeUyrE59uOK8rKdGn7jQz+9uOpAaF/3hbslJVFL1NqF9ELDTqjCPXivuejMX/lN4OgD6BugTO4cR7UTq/sZA==
- dependencies:
- semver "^6.2.0"
+"@octokit/tsconfig@^1.0.2":
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/@octokit/tsconfig/-/tsconfig-1.0.2.tgz#59b024d6f3c0ed82f00d08ead5b3750469125af7"
+ integrity sha512-I0vDR0rdtP8p2lGMzvsJzbhdOWy405HcGovrspJ8RRibHnyRgggUSNO5AIox5LmqiwmatHKYsvj6VGFHkqS7lA==
-"@lerna/profiler@3.20.0":
- version "3.20.0"
- resolved "https://registry.yarnpkg.com/@lerna/profiler/-/profiler-3.20.0.tgz#0f6dc236f4ea8f9ea5f358c6703305a4f32ad051"
- integrity sha512-bh8hKxAlm6yu8WEOvbLENm42i2v9SsR4WbrCWSbsmOElx3foRnMlYk7NkGECa+U5c3K4C6GeBbwgqs54PP7Ljg==
+"@octokit/types@^10.0.0":
+ version "10.0.0"
+ resolved "https://registry.yarnpkg.com/@octokit/types/-/types-10.0.0.tgz#7ee19c464ea4ada306c43f1a45d444000f419a4a"
+ integrity sha512-Vm8IddVmhCgU1fxC1eyinpwqzXPEYu0NrYzD3YZjlGjyftdLBTeqNblRC0jmJmgxbJIsQlyogVeGnrNaaMVzIg==
dependencies:
- figgy-pudding "^3.5.1"
- fs-extra "^8.1.0"
- npmlog "^4.1.2"
- upath "^1.2.0"
+ "@octokit/openapi-types" "^18.0.0"
-"@lerna/project@3.21.0":
- version "3.21.0"
- resolved "https://registry.yarnpkg.com/@lerna/project/-/project-3.21.0.tgz#5d784d2d10c561a00f20320bcdb040997c10502d"
- integrity sha512-xT1mrpET2BF11CY32uypV2GPtPVm6Hgtha7D81GQP9iAitk9EccrdNjYGt5UBYASl4CIDXBRxwmTTVGfrCx82A==
+"@octokit/types@^9.0.0", "@octokit/types@^9.2.3":
+ version "9.3.2"
+ resolved "https://registry.yarnpkg.com/@octokit/types/-/types-9.3.2.tgz#3f5f89903b69f6a2d196d78ec35f888c0013cac5"
+ integrity sha512-D4iHGTdAnEEVsB8fl95m1hiz7D5YiRdQ9b/OEb3BYRVwbLsGHcRVPz+u+BgRLNk0Q0/4iZCBqDN96j2XNxfXrA==
dependencies:
- "@lerna/package" "3.16.0"
- "@lerna/validation-error" "3.13.0"
- cosmiconfig "^5.1.0"
- dedent "^0.7.0"
- dot-prop "^4.2.0"
- glob-parent "^5.0.0"
- globby "^9.2.0"
- load-json-file "^5.3.0"
- npmlog "^4.1.2"
- p-map "^2.1.0"
- resolve-from "^4.0.0"
- write-json-file "^3.2.0"
+ "@octokit/openapi-types" "^18.0.0"
-"@lerna/prompt@3.18.5":
- version "3.18.5"
- resolved "https://registry.yarnpkg.com/@lerna/prompt/-/prompt-3.18.5.tgz#628cd545f225887d060491ab95df899cfc5218a1"
- integrity sha512-rkKj4nm1twSbBEb69+Em/2jAERK8htUuV8/xSjN0NPC+6UjzAwY52/x9n5cfmpa9lyKf/uItp7chCI7eDmNTKQ==
- dependencies:
- inquirer "^6.2.0"
- npmlog "^4.1.2"
+"@pkgjs/parseargs@^0.11.0":
+ version "0.11.0"
+ resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33"
+ integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==
-"@lerna/publish@3.22.1":
- version "3.22.1"
- resolved "https://registry.yarnpkg.com/@lerna/publish/-/publish-3.22.1.tgz#b4f7ce3fba1e9afb28be4a1f3d88222269ba9519"
- integrity sha512-PG9CM9HUYDreb1FbJwFg90TCBQooGjj+n/pb3gw/eH5mEDq0p8wKdLFe0qkiqUkm/Ub5C8DbVFertIo0Vd0zcw==
- dependencies:
- "@evocateur/libnpmaccess" "^3.1.2"
- "@evocateur/npm-registry-fetch" "^4.0.0"
- "@evocateur/pacote" "^9.6.3"
- "@lerna/check-working-tree" "3.16.5"
- "@lerna/child-process" "3.16.5"
- "@lerna/collect-updates" "3.20.0"
- "@lerna/command" "3.21.0"
- "@lerna/describe-ref" "3.16.5"
- "@lerna/log-packed" "3.16.0"
- "@lerna/npm-conf" "3.16.0"
- "@lerna/npm-dist-tag" "3.18.5"
- "@lerna/npm-publish" "3.18.5"
- "@lerna/otplease" "3.18.5"
- "@lerna/output" "3.13.0"
- "@lerna/pack-directory" "3.16.4"
- "@lerna/prerelease-id-from-version" "3.16.0"
- "@lerna/prompt" "3.18.5"
- "@lerna/pulse-till-done" "3.13.0"
- "@lerna/run-lifecycle" "3.16.2"
- "@lerna/run-topologically" "3.18.5"
- "@lerna/validation-error" "3.13.0"
- "@lerna/version" "3.22.1"
- figgy-pudding "^3.5.1"
- fs-extra "^8.1.0"
- npm-package-arg "^6.1.0"
- npmlog "^4.1.2"
- p-finally "^1.0.0"
- p-map "^2.1.0"
- p-pipe "^1.2.0"
- semver "^6.2.0"
-
-"@lerna/pulse-till-done@3.13.0":
- version "3.13.0"
- resolved "https://registry.yarnpkg.com/@lerna/pulse-till-done/-/pulse-till-done-3.13.0.tgz#c8e9ce5bafaf10d930a67d7ed0ccb5d958fe0110"
- integrity sha512-1SOHpy7ZNTPulzIbargrgaJX387csN7cF1cLOGZiJQA6VqnS5eWs2CIrG8i8wmaUavj2QlQ5oEbRMVVXSsGrzA==
+"@puppeteer/browsers@1.9.0":
+ version "1.9.0"
+ resolved "https://registry.yarnpkg.com/@puppeteer/browsers/-/browsers-1.9.0.tgz#dfd0aad0bdc039572f1b57648f189525d627b7ff"
+ integrity sha512-QwguOLy44YBGC8vuPP2nmpX4MUN2FzWbsnvZJtiCzecU3lHmVZkaC1tq6rToi9a200m8RzlVtDyxCS0UIDrxUg==
dependencies:
- npmlog "^4.1.2"
+ debug "4.3.4"
+ extract-zip "2.0.1"
+ progress "2.0.3"
+ proxy-agent "6.3.1"
+ tar-fs "3.0.4"
+ unbzip2-stream "1.4.3"
+ yargs "17.7.2"
-"@lerna/query-graph@3.18.5":
- version "3.18.5"
- resolved "https://registry.yarnpkg.com/@lerna/query-graph/-/query-graph-3.18.5.tgz#df4830bb5155273003bf35e8dda1c32d0927bd86"
- integrity sha512-50Lf4uuMpMWvJ306be3oQDHrWV42nai9gbIVByPBYJuVW8dT8O8pA3EzitNYBUdLL9/qEVbrR0ry1HD7EXwtRA==
+"@puppeteer/browsers@^1.8.0":
+ version "1.9.1"
+ resolved "https://registry.yarnpkg.com/@puppeteer/browsers/-/browsers-1.9.1.tgz#384ee8b09786f0e8f62b1925e4c492424cb549ee"
+ integrity sha512-PuvK6xZzGhKPvlx3fpfdM2kYY3P/hB1URtK8wA7XUJ6prn6pp22zvJHu48th0SGcHL9SutbPHrFuQgfXTFobWA==
dependencies:
- "@lerna/package-graph" "3.18.5"
- figgy-pudding "^3.5.1"
+ debug "4.3.4"
+ extract-zip "2.0.1"
+ progress "2.0.3"
+ proxy-agent "6.3.1"
+ tar-fs "3.0.4"
+ unbzip2-stream "1.4.3"
+ yargs "17.7.2"
-"@lerna/resolve-symlink@3.16.0":
- version "3.16.0"
- resolved "https://registry.yarnpkg.com/@lerna/resolve-symlink/-/resolve-symlink-3.16.0.tgz#37fc7095fabdbcf317c26eb74e0d0bde8efd2386"
- integrity sha512-Ibj5e7njVHNJ/NOqT4HlEgPFPtPLWsO7iu59AM5bJDcAJcR96mLZ7KGVIsS2tvaO7akMEJvt2P+ErwCdloG3jQ==
+"@rollup/plugin-alias@^5.1.0":
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/@rollup/plugin-alias/-/plugin-alias-5.1.0.tgz#99a94accc4ff9a3483be5baeedd5d7da3b597e93"
+ integrity sha512-lpA3RZ9PdIG7qqhEfv79tBffNaoDuukFDrmhLqg9ifv99u/ehn+lOg30x2zmhf8AQqQUZaMk/B9fZraQ6/acDQ==
dependencies:
- fs-extra "^8.1.0"
- npmlog "^4.1.2"
- read-cmd-shim "^1.0.1"
+ slash "^4.0.0"
-"@lerna/rimraf-dir@3.16.5":
- version "3.16.5"
- resolved "https://registry.yarnpkg.com/@lerna/rimraf-dir/-/rimraf-dir-3.16.5.tgz#04316ab5ffd2909657aaf388ea502cb8c2f20a09"
- integrity sha512-bQlKmO0pXUsXoF8lOLknhyQjOZsCc0bosQDoX4lujBXSWxHVTg1VxURtWf2lUjz/ACsJVDfvHZbDm8kyBk5okA==
+"@rollup/plugin-babel@^6.0.0":
+ version "6.0.4"
+ resolved "https://registry.yarnpkg.com/@rollup/plugin-babel/-/plugin-babel-6.0.4.tgz#bd698e351fa9aa9619fcae780aea2a603d98e4c4"
+ integrity sha512-YF7Y52kFdFT/xVSuVdjkV5ZdX/3YtmX0QulG+x0taQOtJdHYzVU61aSSkAgVJ7NOv6qPkIYiJSgSWWN/DM5sGw==
dependencies:
- "@lerna/child-process" "3.16.5"
- npmlog "^4.1.2"
- path-exists "^3.0.0"
- rimraf "^2.6.2"
+ "@babel/helper-module-imports" "^7.18.6"
+ "@rollup/pluginutils" "^5.0.1"
-"@lerna/run-lifecycle@3.16.2":
- version "3.16.2"
- resolved "https://registry.yarnpkg.com/@lerna/run-lifecycle/-/run-lifecycle-3.16.2.tgz#67b288f8ea964db9ea4fb1fbc7715d5bbb0bce00"
- integrity sha512-RqFoznE8rDpyyF0rOJy3+KjZCeTkO8y/OB9orPauR7G2xQ7PTdCpgo7EO6ZNdz3Al+k1BydClZz/j78gNCmL2A==
+"@rollup/plugin-commonjs@^25.0.0":
+ version "25.0.7"
+ resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-25.0.7.tgz#145cec7589ad952171aeb6a585bbeabd0fd3b4cf"
+ integrity sha512-nEvcR+LRjEjsaSsc4x3XZfCCvZIaSMenZu/OiwOKGN2UhQpAYI7ru7czFvyWbErlpoGjnSX3D5Ch5FcMA3kRWQ==
dependencies:
- "@lerna/npm-conf" "3.16.0"
- figgy-pudding "^3.5.1"
- npm-lifecycle "^3.1.2"
- npmlog "^4.1.2"
-
-"@lerna/run-topologically@3.18.5":
- version "3.18.5"
- resolved "https://registry.yarnpkg.com/@lerna/run-topologically/-/run-topologically-3.18.5.tgz#3cd639da20e967d7672cb88db0f756b92f2fdfc3"
- integrity sha512-6N1I+6wf4hLOnPW+XDZqwufyIQ6gqoPfHZFkfWlvTQ+Ue7CuF8qIVQ1Eddw5HKQMkxqN10thKOFfq/9NQZ4NUg==
- dependencies:
- "@lerna/query-graph" "3.18.5"
- figgy-pudding "^3.5.1"
- p-queue "^4.0.0"
-
-"@lerna/run@3.21.0":
- version "3.21.0"
- resolved "https://registry.yarnpkg.com/@lerna/run/-/run-3.21.0.tgz#2a35ec84979e4d6e42474fe148d32e5de1cac891"
- integrity sha512-fJF68rT3veh+hkToFsBmUJ9MHc9yGXA7LSDvhziAojzOb0AI/jBDp6cEcDQyJ7dbnplba2Lj02IH61QUf9oW0Q==
- dependencies:
- "@lerna/command" "3.21.0"
- "@lerna/filter-options" "3.20.0"
- "@lerna/npm-run-script" "3.16.5"
- "@lerna/output" "3.13.0"
- "@lerna/profiler" "3.20.0"
- "@lerna/run-topologically" "3.18.5"
- "@lerna/timer" "3.13.0"
- "@lerna/validation-error" "3.13.0"
- p-map "^2.1.0"
-
-"@lerna/symlink-binary@3.17.0":
- version "3.17.0"
- resolved "https://registry.yarnpkg.com/@lerna/symlink-binary/-/symlink-binary-3.17.0.tgz#8f8031b309863814883d3f009877f82e38aef45a"
- integrity sha512-RLpy9UY6+3nT5J+5jkM5MZyMmjNHxZIZvXLV+Q3MXrf7Eaa1hNqyynyj4RO95fxbS+EZc4XVSk25DGFQbcRNSQ==
- dependencies:
- "@lerna/create-symlink" "3.16.2"
- "@lerna/package" "3.16.0"
- fs-extra "^8.1.0"
- p-map "^2.1.0"
+ "@rollup/pluginutils" "^5.0.1"
+ commondir "^1.0.1"
+ estree-walker "^2.0.2"
+ glob "^8.0.3"
+ is-reference "1.2.1"
+ magic-string "^0.30.3"
-"@lerna/symlink-dependencies@3.17.0":
- version "3.17.0"
- resolved "https://registry.yarnpkg.com/@lerna/symlink-dependencies/-/symlink-dependencies-3.17.0.tgz#48d6360e985865a0e56cd8b51b308a526308784a"
- integrity sha512-KmjU5YT1bpt6coOmdFueTJ7DFJL4H1w5eF8yAQ2zsGNTtZ+i5SGFBWpb9AQaw168dydc3s4eu0W0Sirda+F59Q==
+"@rollup/plugin-inject@^5.0.4":
+ version "5.0.5"
+ resolved "https://registry.yarnpkg.com/@rollup/plugin-inject/-/plugin-inject-5.0.5.tgz#616f3a73fe075765f91c5bec90176608bed277a3"
+ integrity sha512-2+DEJbNBoPROPkgTDNe8/1YXWcqxbN5DTjASVIOx8HS+pITXushyNiBV56RB08zuptzz8gT3YfkqriTBVycepg==
dependencies:
- "@lerna/create-symlink" "3.16.2"
- "@lerna/resolve-symlink" "3.16.0"
- "@lerna/symlink-binary" "3.17.0"
- fs-extra "^8.1.0"
- p-finally "^1.0.0"
- p-map "^2.1.0"
- p-map-series "^1.0.0"
-
-"@lerna/timer@3.13.0":
- version "3.13.0"
- resolved "https://registry.yarnpkg.com/@lerna/timer/-/timer-3.13.0.tgz#bcd0904551db16e08364d6c18e5e2160fc870781"
- integrity sha512-RHWrDl8U4XNPqY5MQHkToWS9jHPnkLZEt5VD+uunCKTfzlxGnRCr3/zVr8VGy/uENMYpVP3wJa4RKGY6M0vkRw==
+ "@rollup/pluginutils" "^5.0.1"
+ estree-walker "^2.0.2"
+ magic-string "^0.30.3"
-"@lerna/validation-error@3.13.0":
- version "3.13.0"
- resolved "https://registry.yarnpkg.com/@lerna/validation-error/-/validation-error-3.13.0.tgz#c86b8f07c5ab9539f775bd8a54976e926f3759c3"
- integrity sha512-SiJP75nwB8GhgwLKQfdkSnDufAaCbkZWJqEDlKOUPUvVOplRGnfL+BPQZH5nvq2BYSRXsksXWZ4UHVnQZI/HYA==
+"@rollup/plugin-json@^6.1.0":
+ version "6.1.0"
+ resolved "https://registry.yarnpkg.com/@rollup/plugin-json/-/plugin-json-6.1.0.tgz#fbe784e29682e9bb6dee28ea75a1a83702e7b805"
+ integrity sha512-EGI2te5ENk1coGeADSIwZ7G2Q8CJS2sF120T7jLw4xFw9n7wIOXHo+kIYRAoVpJAN+kmqZSoO3Fp4JtoNF4ReA==
dependencies:
- npmlog "^4.1.2"
+ "@rollup/pluginutils" "^5.1.0"
-"@lerna/version@3.22.1":
- version "3.22.1"
- resolved "https://registry.yarnpkg.com/@lerna/version/-/version-3.22.1.tgz#9805a9247a47ee62d6b81bd9fa5fb728b24b59e2"
- integrity sha512-PSGt/K1hVqreAFoi3zjD0VEDupQ2WZVlVIwesrE5GbrL2BjXowjCsTDPqblahDUPy0hp6h7E2kG855yLTp62+g==
- dependencies:
- "@lerna/check-working-tree" "3.16.5"
- "@lerna/child-process" "3.16.5"
- "@lerna/collect-updates" "3.20.0"
- "@lerna/command" "3.21.0"
- "@lerna/conventional-commits" "3.22.0"
- "@lerna/github-client" "3.22.0"
- "@lerna/gitlab-client" "3.15.0"
- "@lerna/output" "3.13.0"
- "@lerna/prerelease-id-from-version" "3.16.0"
- "@lerna/prompt" "3.18.5"
- "@lerna/run-lifecycle" "3.16.2"
- "@lerna/run-topologically" "3.18.5"
- "@lerna/validation-error" "3.13.0"
- chalk "^2.3.1"
- dedent "^0.7.0"
- load-json-file "^5.3.0"
- minimatch "^3.0.4"
- npmlog "^4.1.2"
- p-map "^2.1.0"
- p-pipe "^1.2.0"
- p-reduce "^1.0.0"
- p-waterfall "^1.0.0"
- semver "^6.2.0"
- slash "^2.0.0"
- temp-write "^3.4.0"
- write-json-file "^3.2.0"
-
-"@lerna/write-log-file@3.13.0":
- version "3.13.0"
- resolved "https://registry.yarnpkg.com/@lerna/write-log-file/-/write-log-file-3.13.0.tgz#b78d9e4cfc1349a8be64d91324c4c8199e822a26"
- integrity sha512-RibeMnDPvlL8bFYW5C8cs4mbI3AHfQef73tnJCQ/SgrXZHehmHnsyWUiE7qDQCAo+B1RfTapvSyFF69iPj326A==
+"@rollup/plugin-node-resolve@^15.2.0":
+ version "15.2.3"
+ resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.2.3.tgz#e5e0b059bd85ca57489492f295ce88c2d4b0daf9"
+ integrity sha512-j/lym8nf5E21LwBT4Df1VD6hRO2L2iwUeUmP7litikRsVp1H6NWx20NEp0Y7su+7XGc476GnXXc4kFeZNGmaSQ==
dependencies:
- npmlog "^4.1.2"
- write-file-atomic "^2.3.0"
+ "@rollup/pluginutils" "^5.0.1"
+ "@types/resolve" "1.20.2"
+ deepmerge "^4.2.2"
+ is-builtin-module "^3.2.1"
+ is-module "^1.0.0"
+ resolve "^1.22.1"
-"@manypkg/find-root@^1.1.0":
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/@manypkg/find-root/-/find-root-1.1.0.tgz#a62d8ed1cd7e7d4c11d9d52a8397460b5d4ad29f"
- integrity sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==
+"@rollup/plugin-replace@^5.0.0":
+ version "5.0.5"
+ resolved "https://registry.yarnpkg.com/@rollup/plugin-replace/-/plugin-replace-5.0.5.tgz#33d5653dce6d03cb24ef98bef7f6d25b57faefdf"
+ integrity sha512-rYO4fOi8lMaTg/z5Jb+hKnrHHVn8j2lwkqwyS4kTRhKyWOLf2wST2sWXr4WzWiTcoHTp2sTjqUbqIj2E39slKQ==
dependencies:
- "@babel/runtime" "^7.5.5"
- "@types/node" "^12.7.1"
- find-up "^4.1.0"
- fs-extra "^8.1.0"
+ "@rollup/pluginutils" "^5.0.1"
+ magic-string "^0.30.3"
-"@manypkg/get-packages@^1.1.3":
- version "1.1.3"
- resolved "https://registry.yarnpkg.com/@manypkg/get-packages/-/get-packages-1.1.3.tgz#e184db9bba792fa4693de4658cfb1463ac2c9c47"
- integrity sha512-fo+QhuU3qE/2TQMQmbVMqaQ6EWbMhi4ABWP+O4AM1NqPBuy0OrApV5LO6BrrgnhtAHS2NH6RrVk9OL181tTi8A==
+"@rollup/plugin-terser@^0.4.4":
+ version "0.4.4"
+ resolved "https://registry.yarnpkg.com/@rollup/plugin-terser/-/plugin-terser-0.4.4.tgz#15dffdb3f73f121aa4fbb37e7ca6be9aeea91962"
+ integrity sha512-XHeJC5Bgvs8LfukDwWZp7yeqin6ns8RTl2B9avbejt6tZqsqvVoWI7ZTQrcNsfKEDWBTnTxM8nMDkO2IFFbd0A==
dependencies:
- "@babel/runtime" "^7.5.5"
- "@changesets/types" "^4.0.1"
- "@manypkg/find-root" "^1.1.0"
- fs-extra "^8.1.0"
- globby "^11.0.0"
- read-yaml-file "^1.1.0"
+ serialize-javascript "^6.0.1"
+ smob "^1.0.0"
+ terser "^5.17.4"
-"@mapbox/node-pre-gyp@^1.0.0":
- version "1.0.5"
- resolved "https://registry.yarnpkg.com/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.5.tgz#2a0b32fcb416fb3f2250fd24cb2a81421a4f5950"
- integrity sha512-4srsKPXWlIxp5Vbqz5uLfBN+du2fJChBoYn/f2h991WLdk7jUvcSk/McVLSv/X+xQIPI8eGD5GjrnygdyHnhPA==
- dependencies:
- detect-libc "^1.0.3"
- https-proxy-agent "^5.0.0"
- make-dir "^3.1.0"
- node-fetch "^2.6.1"
- nopt "^5.0.0"
- npmlog "^4.1.2"
- rimraf "^3.0.2"
- semver "^7.3.4"
- tar "^6.1.0"
-
-"@mrmlnc/readdir-enhanced@^2.2.1":
- version "2.2.1"
- resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde"
- integrity sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==
+"@rollup/pluginutils@^5.0.1", "@rollup/pluginutils@^5.1.0":
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-5.1.0.tgz#7e53eddc8c7f483a4ad0b94afb1f7f5fd3c771e0"
+ integrity sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==
+ dependencies:
+ "@types/estree" "^1.0.0"
+ estree-walker "^2.0.2"
+ picomatch "^2.3.1"
+
+"@rollup/rollup-android-arm-eabi@4.9.6":
+ version "4.9.6"
+ resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.9.6.tgz#66b8d9cb2b3a474d115500f9ebaf43e2126fe496"
+ integrity sha512-MVNXSSYN6QXOulbHpLMKYi60ppyO13W9my1qogeiAqtjb2yR4LSmfU2+POvDkLzhjYLXz9Rf9+9a3zFHW1Lecg==
+
+"@rollup/rollup-android-arm64@4.9.6":
+ version "4.9.6"
+ resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.9.6.tgz#46327d5b86420d2307946bec1535fdf00356e47d"
+ integrity sha512-T14aNLpqJ5wzKNf5jEDpv5zgyIqcpn1MlwCrUXLrwoADr2RkWA0vOWP4XxbO9aiO3dvMCQICZdKeDrFl7UMClw==
+
+"@rollup/rollup-darwin-arm64@4.9.6":
+ version "4.9.6"
+ resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.9.6.tgz#166987224d2f8b1e2fd28ee90c447d52271d5e90"
+ integrity sha512-CqNNAyhRkTbo8VVZ5R85X73H3R5NX9ONnKbXuHisGWC0qRbTTxnF1U4V9NafzJbgGM0sHZpdO83pLPzq8uOZFw==
+
+"@rollup/rollup-darwin-x64@4.9.6":
+ version "4.9.6"
+ resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.9.6.tgz#a2e6e096f74ccea6e2f174454c26aef6bcdd1274"
+ integrity sha512-zRDtdJuRvA1dc9Mp6BWYqAsU5oeLixdfUvkTHuiYOHwqYuQ4YgSmi6+/lPvSsqc/I0Omw3DdICx4Tfacdzmhog==
+
+"@rollup/rollup-linux-arm-gnueabihf@4.9.6":
+ version "4.9.6"
+ resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.9.6.tgz#09fcd4c55a2d6160c5865fec708a8e5287f30515"
+ integrity sha512-oNk8YXDDnNyG4qlNb6is1ojTOGL/tRhbbKeE/YuccItzerEZT68Z9gHrY3ROh7axDc974+zYAPxK5SH0j/G+QQ==
+
+"@rollup/rollup-linux-arm64-gnu@4.9.6":
+ version "4.9.6"
+ resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.9.6.tgz#19a3c0b6315c747ca9acf86e9b710cc2440f83c9"
+ integrity sha512-Z3O60yxPtuCYobrtzjo0wlmvDdx2qZfeAWTyfOjEDqd08kthDKexLpV97KfAeUXPosENKd8uyJMRDfFMxcYkDQ==
+
+"@rollup/rollup-linux-arm64-musl@4.9.6":
+ version "4.9.6"
+ resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.9.6.tgz#94aaf95fdaf2ad9335983a4552759f98e6b2e850"
+ integrity sha512-gpiG0qQJNdYEVad+1iAsGAbgAnZ8j07FapmnIAQgODKcOTjLEWM9sRb+MbQyVsYCnA0Im6M6QIq6ax7liws6eQ==
+
+"@rollup/rollup-linux-riscv64-gnu@4.9.6":
+ version "4.9.6"
+ resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.9.6.tgz#160510e63f4b12618af4013bddf1761cf9fc9880"
+ integrity sha512-+uCOcvVmFUYvVDr27aiyun9WgZk0tXe7ThuzoUTAukZJOwS5MrGbmSlNOhx1j80GdpqbOty05XqSl5w4dQvcOA==
+
+"@rollup/rollup-linux-x64-gnu@4.9.6":
+ version "4.9.6"
+ resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.9.6.tgz#5ac5d068ce0726bd0a96ca260d5bd93721c0cb98"
+ integrity sha512-HUNqM32dGzfBKuaDUBqFB7tP6VMN74eLZ33Q9Y1TBqRDn+qDonkAUyKWwF9BR9unV7QUzffLnz9GrnKvMqC/fw==
+
+"@rollup/rollup-linux-x64-musl@4.9.6":
+ version "4.9.6"
+ resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.9.6.tgz#bafa759ab43e8eab9edf242a8259ffb4f2a57a5d"
+ integrity sha512-ch7M+9Tr5R4FK40FHQk8VnML0Szi2KRujUgHXd/HjuH9ifH72GUmw6lStZBo3c3GB82vHa0ZoUfjfcM7JiiMrQ==
+
+"@rollup/rollup-win32-arm64-msvc@4.9.6":
+ version "4.9.6"
+ resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.9.6.tgz#1cc3416682e5a20d8f088f26657e6e47f8db468e"
+ integrity sha512-VD6qnR99dhmTQ1mJhIzXsRcTBvTjbfbGGwKAHcu+52cVl15AC/kplkhxzW/uT0Xl62Y/meBKDZvoJSJN+vTeGA==
+
+"@rollup/rollup-win32-ia32-msvc@4.9.6":
+ version "4.9.6"
+ resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.9.6.tgz#7d2251e1aa5e8a1e47c86891fe4547a939503461"
+ integrity sha512-J9AFDq/xiRI58eR2NIDfyVmTYGyIZmRcvcAoJ48oDld/NTR8wyiPUu2X/v1navJ+N/FGg68LEbX3Ejd6l8B7MQ==
+
+"@rollup/rollup-win32-x64-msvc@4.9.6":
+ version "4.9.6"
+ resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.9.6.tgz#2c1fb69e02a3f1506f52698cfdc3a8b6386df9a6"
+ integrity sha512-jqzNLhNDvIZOrt69Ce4UjGRpXJBzhUBzawMwnaDAwyHriki3XollsewxWzOzz+4yOFDkuJHtTsZFwMxhYJWmLQ==
+
+"@sigstore/bundle@^1.1.0":
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/@sigstore/bundle/-/bundle-1.1.0.tgz#17f8d813b09348b16eeed66a8cf1c3d6bd3d04f1"
+ integrity sha512-PFutXEy0SmQxYI4texPw3dd2KewuNqv7OuK1ZFtY2fM754yhvG2KdgwIhRnoEE2uHdtdGNQ8s0lb94dW9sELog==
dependencies:
- call-me-maybe "^1.0.1"
- glob-to-regexp "^0.3.0"
-
-"@nicolo-ribaudo/chokidar-2@2.1.8-no-fsevents.3":
- version "2.1.8-no-fsevents.3"
- resolved "https://registry.yarnpkg.com/@nicolo-ribaudo/chokidar-2/-/chokidar-2-2.1.8-no-fsevents.3.tgz#323d72dd25103d0c4fbdce89dadf574a787b1f9b"
- integrity sha512-s88O1aVtXftvp5bCPB7WnmXc5IwOZZ7YPuwNPt+GtOOXpPvad1LfbmjYv+qII7zP6RU2QGnqve27dnLycEnyEQ==
+ "@sigstore/protobuf-specs" "^0.2.0"
-"@nodelib/fs.scandir@2.1.5":
- version "2.1.5"
- resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5"
- integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==
+"@sigstore/bundle@^2.1.1":
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/@sigstore/bundle/-/bundle-2.1.1.tgz#7fad9a1728939301607103722ac6f2a083d2f09a"
+ integrity sha512-v3/iS+1nufZdKQ5iAlQKcCsoh0jffQyABvYIxKsZQFWc4ubuGjwZklFHpDgV6O6T7vvV78SW5NHI91HFKEcxKg==
dependencies:
- "@nodelib/fs.stat" "2.0.5"
- run-parallel "^1.1.9"
+ "@sigstore/protobuf-specs" "^0.2.1"
-"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2":
- version "2.0.5"
- resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b"
- integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==
-
-"@nodelib/fs.stat@^1.1.2":
- version "1.1.3"
- resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz#2b5a3ab3f918cca48a8c754c08168e3f03eba61b"
- integrity sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==
-
-"@nodelib/fs.walk@^1.2.3":
- version "1.2.8"
- resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a"
- integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==
- dependencies:
- "@nodelib/fs.scandir" "2.1.5"
- fastq "^1.6.0"
+"@sigstore/core@^0.2.0":
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/@sigstore/core/-/core-0.2.0.tgz#2d8ecae2c38a59a52b1dcbd6110014d88de08a80"
+ integrity sha512-THobAPPZR9pDH2CAvDLpkrYedt7BlZnsyxDe+Isq4ZmGfPy5juOFZq487vCU2EgKD7aHSiTfE/i7sN7aEdzQnA==
-"@octokit/auth-token@^2.4.0":
- version "2.4.5"
- resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.4.5.tgz#568ccfb8cb46f36441fac094ce34f7a875b197f3"
- integrity sha512-BpGYsPgJt05M7/L/5FoE1PiAbdxXFZkX/3kDYcsvd1v6UhlnE5e96dTDr0ezX/EFwciQxf3cNV0loipsURU+WA==
- dependencies:
- "@octokit/types" "^6.0.3"
+"@sigstore/protobuf-specs@^0.2.0", "@sigstore/protobuf-specs@^0.2.1":
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/@sigstore/protobuf-specs/-/protobuf-specs-0.2.1.tgz#be9ef4f3c38052c43bd399d3f792c97ff9e2277b"
+ integrity sha512-XTWVxnWJu+c1oCshMLwnKvz8ZQJJDVOlciMfgpJBQbThVjKTCG8dwyhgLngBD2KN0ap9F/gOV8rFDEx8uh7R2A==
-"@octokit/endpoint@^6.0.1":
- version "6.0.11"
- resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-6.0.11.tgz#082adc2aebca6dcefa1fb383f5efb3ed081949d1"
- integrity sha512-fUIPpx+pZyoLW4GCs3yMnlj2LfoXTWDUVPTC4V3MUEKZm48W+XYpeWSZCv+vYF1ZABUm2CqnDVf1sFtIYrj7KQ==
+"@sigstore/sign@^1.0.0":
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/@sigstore/sign/-/sign-1.0.0.tgz#6b08ebc2f6c92aa5acb07a49784cb6738796f7b4"
+ integrity sha512-INxFVNQteLtcfGmcoldzV6Je0sbbfh9I16DM4yJPw3j5+TFP8X6uIiA18mvpEa9yyeycAKgPmOA3X9hVdVTPUA==
dependencies:
- "@octokit/types" "^6.0.3"
- is-plain-object "^5.0.0"
- universal-user-agent "^6.0.0"
+ "@sigstore/bundle" "^1.1.0"
+ "@sigstore/protobuf-specs" "^0.2.0"
+ make-fetch-happen "^11.0.1"
-"@octokit/openapi-types@^6.0.0":
- version "6.0.0"
- resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-6.0.0.tgz#7da8d7d5a72d3282c1a3ff9f951c8133a707480d"
- integrity sha512-CnDdK7ivHkBtJYzWzZm7gEkanA7gKH6a09Eguz7flHw//GacPJLmkHA3f3N++MJmlxD1Fl+mB7B32EEpSCwztQ==
-
-"@octokit/plugin-enterprise-rest@^6.0.1":
- version "6.0.1"
- resolved "https://registry.yarnpkg.com/@octokit/plugin-enterprise-rest/-/plugin-enterprise-rest-6.0.1.tgz#e07896739618dab8da7d4077c658003775f95437"
- integrity sha512-93uGjlhUD+iNg1iWhUENAtJata6w5nE+V4urXOAlIXdco6xNZtUSfYY8dzp3Udy74aqO/B5UZL80x/YMa5PKRw==
-
-"@octokit/plugin-paginate-rest@^1.1.1":
- version "1.1.2"
- resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-1.1.2.tgz#004170acf8c2be535aba26727867d692f7b488fc"
- integrity sha512-jbsSoi5Q1pj63sC16XIUboklNw+8tL9VOnJsWycWYR78TKss5PVpIPb1TUUcMQ+bBh7cY579cVAWmf5qG+dw+Q==
+"@sigstore/sign@^2.2.1":
+ version "2.2.1"
+ resolved "https://registry.yarnpkg.com/@sigstore/sign/-/sign-2.2.1.tgz#b37383db1f25ab20cfec980d23ce08e6f99e6caf"
+ integrity sha512-U5sKQEj+faE1MsnLou1f4DQQHeFZay+V9s9768lw48J4pKykPj34rWyI1lsMOGJ3Mae47Ye6q3HAJvgXO21rkQ==
dependencies:
- "@octokit/types" "^2.0.1"
+ "@sigstore/bundle" "^2.1.1"
+ "@sigstore/core" "^0.2.0"
+ "@sigstore/protobuf-specs" "^0.2.1"
+ make-fetch-happen "^13.0.0"
-"@octokit/plugin-request-log@^1.0.0":
+"@sigstore/tuf@^1.0.3":
version "1.0.3"
- resolved "https://registry.yarnpkg.com/@octokit/plugin-request-log/-/plugin-request-log-1.0.3.tgz#70a62be213e1edc04bb8897ee48c311482f9700d"
- integrity sha512-4RFU4li238jMJAzLgAwkBAw+4Loile5haQMQr+uhFq27BmyJXcXSKvoQKqh0agsZEiUlW6iSv3FAgvmGkur7OQ==
-
-"@octokit/plugin-rest-endpoint-methods@2.4.0":
- version "2.4.0"
- resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-2.4.0.tgz#3288ecf5481f68c494dd0602fc15407a59faf61e"
- integrity sha512-EZi/AWhtkdfAYi01obpX0DF7U6b1VRr30QNQ5xSFPITMdLSfhcBqjamE3F+sKcxPbD7eZuMHu3Qkk2V+JGxBDQ==
- dependencies:
- "@octokit/types" "^2.0.1"
- deprecation "^2.3.1"
-
-"@octokit/request-error@^1.0.2":
- version "1.2.1"
- resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-1.2.1.tgz#ede0714c773f32347576c25649dc013ae6b31801"
- integrity sha512-+6yDyk1EES6WK+l3viRDElw96MvwfJxCt45GvmjDUKWjYIb3PJZQkq3i46TwGwoPD4h8NmTrENmtyA1FwbmhRA==
- dependencies:
- "@octokit/types" "^2.0.0"
- deprecation "^2.0.0"
- once "^1.4.0"
-
-"@octokit/request-error@^2.0.0":
- version "2.0.5"
- resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-2.0.5.tgz#72cc91edc870281ad583a42619256b380c600143"
- integrity sha512-T/2wcCFyM7SkXzNoyVNWjyVlUwBvW3igM3Btr/eKYiPmucXTtkxt2RBsf6gn3LTzaLSLTQtNmvg+dGsOxQrjZg==
- dependencies:
- "@octokit/types" "^6.0.3"
- deprecation "^2.0.0"
- once "^1.4.0"
-
-"@octokit/request@^5.2.0":
- version "5.4.14"
- resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.4.14.tgz#ec5f96f78333bb2af390afa5ff66f114b063bc96"
- integrity sha512-VkmtacOIQp9daSnBmDI92xNIeLuSRDOIuplp/CJomkvzt7M18NXgG044Cx/LFKLgjKt9T2tZR6AtJayba9GTSA==
- dependencies:
- "@octokit/endpoint" "^6.0.1"
- "@octokit/request-error" "^2.0.0"
- "@octokit/types" "^6.7.1"
- deprecation "^2.0.0"
- is-plain-object "^5.0.0"
- node-fetch "^2.6.1"
- once "^1.4.0"
- universal-user-agent "^6.0.0"
-
-"@octokit/rest@^16.28.4":
- version "16.43.2"
- resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-16.43.2.tgz#c53426f1e1d1044dee967023e3279c50993dd91b"
- integrity sha512-ngDBevLbBTFfrHZeiS7SAMAZ6ssuVmXuya+F/7RaVvlysgGa1JKJkKWY+jV6TCJYcW0OALfJ7nTIGXcBXzycfQ==
- dependencies:
- "@octokit/auth-token" "^2.4.0"
- "@octokit/plugin-paginate-rest" "^1.1.1"
- "@octokit/plugin-request-log" "^1.0.0"
- "@octokit/plugin-rest-endpoint-methods" "2.4.0"
- "@octokit/request" "^5.2.0"
- "@octokit/request-error" "^1.0.2"
- atob-lite "^2.0.0"
- before-after-hook "^2.0.0"
- btoa-lite "^1.0.0"
- deprecation "^2.0.0"
- lodash.get "^4.4.2"
- lodash.set "^4.3.2"
- lodash.uniq "^4.5.0"
- octokit-pagination-methods "^1.1.0"
- once "^1.4.0"
- universal-user-agent "^4.0.0"
-
-"@octokit/types@^2.0.0", "@octokit/types@^2.0.1":
- version "2.16.2"
- resolved "https://registry.yarnpkg.com/@octokit/types/-/types-2.16.2.tgz#4c5f8da3c6fecf3da1811aef678fda03edac35d2"
- integrity sha512-O75k56TYvJ8WpAakWwYRN8Bgu60KrmX0z1KqFp1kNiFNkgW+JW+9EBKZ+S33PU6SLvbihqd+3drvPxKK68Ee8Q==
- dependencies:
- "@types/node" ">= 8"
-
-"@octokit/types@^6.0.3", "@octokit/types@^6.7.1":
- version "6.13.0"
- resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.13.0.tgz#779e5b7566c8dde68f2f6273861dd2f0409480d0"
- integrity sha512-W2J9qlVIU11jMwKHUp5/rbVUeErqelCsO5vW5PKNb7wAXQVUz87Rc+imjlEvpvbH8yUb+KHmv8NEjVZdsdpyxA==
- dependencies:
- "@octokit/openapi-types" "^6.0.0"
-
-"@rollup/plugin-alias@^3.1.8":
- version "3.1.8"
- resolved "https://registry.yarnpkg.com/@rollup/plugin-alias/-/plugin-alias-3.1.8.tgz#645fd84659e08d3d1b059408fcdf69c1dd435a6b"
- integrity sha512-tf7HeSs/06wO2LPqKNY3Ckbvy0JRe7Jyn98bXnt/gfrxbe+AJucoNJlsEVi9sdgbQtXemjbakCpO/76JVgnHpA==
- dependencies:
- slash "^3.0.0"
-
-"@rollup/plugin-babel@^5.3.0":
- version "5.3.0"
- resolved "https://registry.yarnpkg.com/@rollup/plugin-babel/-/plugin-babel-5.3.0.tgz#9cb1c5146ddd6a4968ad96f209c50c62f92f9879"
- integrity sha512-9uIC8HZOnVLrLHxayq/PTzw+uS25E14KPUBh5ktF+18Mjo5yK0ToMMx6epY0uEgkjwJw0aBW4x2horYXh8juWw==
- dependencies:
- "@babel/helper-module-imports" "^7.10.4"
- "@rollup/pluginutils" "^3.1.0"
-
-"@rollup/plugin-commonjs@^21.0.1":
- version "21.0.1"
- resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-21.0.1.tgz#1e57c81ae1518e4df0954d681c642e7d94588fee"
- integrity sha512-EA+g22lbNJ8p5kuZJUYyhhDK7WgJckW5g4pNN7n4mAFUM96VuwUnNT3xr2Db2iCZPI1pJPbGyfT5mS9T1dHfMg==
- dependencies:
- "@rollup/pluginutils" "^3.1.0"
- commondir "^1.0.1"
- estree-walker "^2.0.1"
- glob "^7.1.6"
- is-reference "^1.2.1"
- magic-string "^0.25.7"
- resolve "^1.17.0"
-
-"@rollup/plugin-inject@^4.0.0":
- version "4.0.4"
- resolved "https://registry.yarnpkg.com/@rollup/plugin-inject/-/plugin-inject-4.0.4.tgz#fbeee66e9a700782c4f65c8b0edbafe58678fbc2"
- integrity sha512-4pbcU4J/nS+zuHk+c+OL3WtmEQhqxlZ9uqfjQMQDOHOPld7PsCd8k5LWs8h5wjwJN7MgnAn768F2sDxEP4eNFQ==
+ resolved "https://registry.yarnpkg.com/@sigstore/tuf/-/tuf-1.0.3.tgz#2a65986772ede996485728f027b0514c0b70b160"
+ integrity sha512-2bRovzs0nJZFlCN3rXirE4gwxCn97JNjMmwpecqlbgV9WcxX7WRuIrgzx/X7Ib7MYRbyUTpBYE0s2x6AmZXnlg==
dependencies:
- "@rollup/pluginutils" "^3.1.0"
- estree-walker "^2.0.1"
- magic-string "^0.25.7"
+ "@sigstore/protobuf-specs" "^0.2.0"
+ tuf-js "^1.1.7"
-"@rollup/plugin-json@^4.1.0":
- version "4.1.0"
- resolved "https://registry.yarnpkg.com/@rollup/plugin-json/-/plugin-json-4.1.0.tgz#54e09867ae6963c593844d8bd7a9c718294496f3"
- integrity sha512-yfLbTdNS6amI/2OpmbiBoW12vngr5NW2jCJVZSBEz+H5KfUJZ2M7sDjk0U6GOOdCWFVScShte29o9NezJ53TPw==
- dependencies:
- "@rollup/pluginutils" "^3.0.8"
-
-"@rollup/plugin-node-resolve@^13.0.6":
- version "13.0.6"
- resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.0.6.tgz#29629070bb767567be8157f575cfa8f2b8e9ef77"
- integrity sha512-sFsPDMPd4gMqnh2gS0uIxELnoRUp5kBl5knxD2EO0778G1oOJv4G1vyT2cpWz75OU2jDVcXhjVUuTAczGyFNKA==
- dependencies:
- "@rollup/pluginutils" "^3.1.0"
- "@types/resolve" "1.17.1"
- builtin-modules "^3.1.0"
- deepmerge "^4.2.2"
- is-module "^1.0.0"
- resolve "^1.19.0"
-
-"@rollup/plugin-replace@^3.0.0":
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/@rollup/plugin-replace/-/plugin-replace-3.0.0.tgz#3a4c9665d4e7a4ce2c360cf021232784892f3fac"
- integrity sha512-3c7JCbMuYXM4PbPWT4+m/4Y6U60SgsnDT/cCyAyUKwFHg7pTSfsSQzIpETha3a3ig6OdOKzZz87D9ZXIK3qsDg==
+"@sigstore/tuf@^2.3.0":
+ version "2.3.0"
+ resolved "https://registry.yarnpkg.com/@sigstore/tuf/-/tuf-2.3.0.tgz#de64925ea10b16f3a7e77535d91eaf22be4dd904"
+ integrity sha512-S98jo9cpJwO1mtQ+2zY7bOdcYyfVYCUaofCG6wWRzk3pxKHVAkSfshkfecto2+LKsx7Ovtqbgb2LS8zTRhxJ9Q==
dependencies:
- "@rollup/pluginutils" "^3.1.0"
- magic-string "^0.25.7"
+ "@sigstore/protobuf-specs" "^0.2.1"
+ tuf-js "^2.2.0"
-"@rollup/pluginutils@^3.0.8", "@rollup/pluginutils@^3.0.9", "@rollup/pluginutils@^3.1.0":
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-3.1.0.tgz#706b4524ee6dc8b103b3c995533e5ad680c02b9b"
- integrity sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==
+"@sigstore/verify@^0.1.0":
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/@sigstore/verify/-/verify-0.1.0.tgz#c017aadb1a516ab4a10651cece29463aa9540bfe"
+ integrity sha512-2UzMNYAa/uaz11NhvgRnIQf4gpLTJ59bhb8ESXaoSS5sxedfS+eLak8bsdMc+qpNQfITUTFoSKFx5h8umlRRiA==
dependencies:
- "@types/estree" "0.0.39"
- estree-walker "^1.0.1"
- picomatch "^2.2.2"
+ "@sigstore/bundle" "^2.1.1"
+ "@sigstore/core" "^0.2.0"
+ "@sigstore/protobuf-specs" "^0.2.1"
-"@sinclair/typebox@^0.25.16":
- version "0.25.24"
- resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.25.24.tgz#8c7688559979f7079aacaf31aa881c3aa410b718"
- integrity sha512-XJfwUVUKDHF5ugKwIcxEgc9k8b7HbznCp6eUfWgu710hMPNIO4aw4/zB5RogDQz8nd6gyCDpU9O/m6qYEWY6yQ==
+"@sinclair/typebox@^0.27.8":
+ version "0.27.8"
+ resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e"
+ integrity sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==
-"@sinonjs/commons@^3.0.0":
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-3.0.0.tgz#beb434fe875d965265e04722ccfc21df7f755d72"
- integrity sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA==
- dependencies:
- type-detect "4.0.8"
-
-"@sinonjs/fake-timers@^10.0.2":
- version "10.2.0"
- resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-10.2.0.tgz#b3e322a34c5f26e3184e7f6115695f299c1b1194"
- integrity sha512-OPwQlEdg40HAj5KNF8WW6q2KG4Z+cBCZb3m4ninfTZKaBmbIJodviQsDBoYMPHkOyJJMHnOJo5j2+LKDOhOACg==
- dependencies:
- "@sinonjs/commons" "^3.0.0"
+"@sindresorhus/merge-streams@^1.0.0":
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/@sindresorhus/merge-streams/-/merge-streams-1.0.0.tgz#9cd84cc15bc865a5ca35fcaae198eb899f7b5c90"
+ integrity sha512-rUV5WyJrJLoloD4NDN1V1+LDMDWOa4OTsT4yYJwQNpTU6FWxkxHpL7eu4w+DmiH8x/EAM1otkPE1+LaspIbplw==
"@sitespeed.io/tracium@^0.3.3":
version "0.3.3"
@@ -2570,38 +2138,35 @@
dependencies:
debug "^4.1.1"
-"@size-limit/file@7.0.5":
- version "7.0.5"
- resolved "https://registry.yarnpkg.com/@size-limit/file/-/file-7.0.5.tgz#e8c8a610f2df408dba02a38dc283666db81948b0"
- integrity sha512-DqyuUkmCSHwML6GVmeRr0v6Ih/P3pwmCu6RDWh2QxdDSec1ZnShmFUmcC6rLQDX7KW5aCjK3cs5FNd22Eaqapw==
- dependencies:
- semver "7.3.5"
+"@size-limit/file@11.0.1":
+ version "11.0.1"
+ resolved "https://registry.yarnpkg.com/@size-limit/file/-/file-11.0.1.tgz#882ca942341f58fea048aa2f403e73a8a34cd882"
+ integrity sha512-ioSYJ1WY66kc9+3dgTHi5mT/gcaNNCJ22xU87cjzfKiNxmol+lGsNKbplmrJf+QezvPH9kRIFOWxBjGY+DOt3g==
-"@size-limit/preset-big-lib@^7.0.5":
- version "7.0.5"
- resolved "https://registry.yarnpkg.com/@size-limit/preset-big-lib/-/preset-big-lib-7.0.5.tgz#8dbb45a35b7ac7b7ee0d5334148e02240a48b196"
- integrity sha512-hXtF/p99oyNWiEmJC1SRBP0iU+wz9JALdr5AfR8PZd2yLcncly6bs4YtZ9Ujbvo0N6H8eHIW99xyr6waTYo6JQ==
+"@size-limit/preset-big-lib@^11.0.1":
+ version "11.0.1"
+ resolved "https://registry.yarnpkg.com/@size-limit/preset-big-lib/-/preset-big-lib-11.0.1.tgz#68dfe814ffd15806e26c8e65928a53b090399833"
+ integrity sha512-3B06HMEn05qkMDlP5z8y7p4P+TYeq12CfYKjUe42d3FSjN7dNovy6c8Ry/V1+9LIVAkNOQ6TIbGyRKj1aJKW0g==
dependencies:
- "@size-limit/file" "7.0.5"
- "@size-limit/time" "7.0.5"
- "@size-limit/webpack" "7.0.5"
+ "@size-limit/file" "11.0.1"
+ "@size-limit/time" "11.0.1"
+ "@size-limit/webpack" "11.0.1"
+ size-limit "11.0.1"
-"@size-limit/time@7.0.5":
- version "7.0.5"
- resolved "https://registry.yarnpkg.com/@size-limit/time/-/time-7.0.5.tgz#ab753d846d9e95f4826c542657f884c8a176fd0e"
- integrity sha512-gBDuefQCh0ON7tr+bkoT3LCaGQXUB2ZCW53k/0sTyO4UTFEUE+vf8m3pfIqAq/0FkzuJ+GYg5sAmMGHV62S70w==
+"@size-limit/time@11.0.1":
+ version "11.0.1"
+ resolved "https://registry.yarnpkg.com/@size-limit/time/-/time-11.0.1.tgz#d46b8218c9c3037293d18ed5d6874644b6c9aea7"
+ integrity sha512-o4m2kGFufKqcgcaExGAGrylnRcDrbhn1FelCa6q6aDCut2lypfBle5TRt36xdW64ceOArRkObfcVv4AkWK3kow==
dependencies:
- estimo "^2.3.1"
- react "^17.0.2"
+ estimo "^3.0.1"
-"@size-limit/webpack@7.0.5":
- version "7.0.5"
- resolved "https://registry.yarnpkg.com/@size-limit/webpack/-/webpack-7.0.5.tgz#d14a87eea681b56bb10858203b2ea0896dd01785"
- integrity sha512-OuX0hImvYDOfQEtuxDzrehuPGP7Ph+rzpPMTGcqsu7k/wag/h5kscTdsatD8xL3eUWFislFJqEf7pu4oyf4+DA==
+"@size-limit/webpack@11.0.1":
+ version "11.0.1"
+ resolved "https://registry.yarnpkg.com/@size-limit/webpack/-/webpack-11.0.1.tgz#dd7bd770314e6c017724c34659481d62fbbd39e2"
+ integrity sha512-aQLzpXpp0Xx/AqijgpXnxJGQ3bypLo0acLt8ar3OH83w4cKE1choYROxBsqGFpPSMlwXjCIAwLxLmU98pClPzA==
dependencies:
- escape-string-regexp "^4.0.0"
- nanoid "^3.1.30"
- webpack "^5.65.0"
+ nanoid "^5.0.4"
+ webpack "^5.89.0"
"@swc/helpers@^0.4.2":
version "0.4.3"
@@ -2638,15 +2203,46 @@
resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf"
integrity sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==
+"@tootallnate/quickjs-emscripten@^0.23.0":
+ version "0.23.0"
+ resolved "https://registry.yarnpkg.com/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz#db4ecfd499a9765ab24002c3b696d02e6d32a12c"
+ integrity sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==
+
+"@tufjs/canonical-json@1.0.0":
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/@tufjs/canonical-json/-/canonical-json-1.0.0.tgz#eade9fd1f537993bc1f0949f3aea276ecc4fab31"
+ integrity sha512-QTnf++uxunWvG2z3UFNzAoQPHxnSXOwtaI3iJ+AohhV+5vONuArPjJE7aPXPVXfXJsqrVbZBu9b81AJoSd09IQ==
+
+"@tufjs/canonical-json@2.0.0":
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/@tufjs/canonical-json/-/canonical-json-2.0.0.tgz#a52f61a3d7374833fca945b2549bc30a2dd40d0a"
+ integrity sha512-yVtV8zsdo8qFHe+/3kw81dSLyF7D576A5cCFCi4X7B39tWT7SekaEFUnvnWJHz+9qO7qJTah1JbrDjWKqFtdWA==
+
+"@tufjs/models@1.0.4":
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/@tufjs/models/-/models-1.0.4.tgz#5a689630f6b9dbda338d4b208019336562f176ef"
+ integrity sha512-qaGV9ltJP0EO25YfFUPhxRVK0evXFIAGicsVXuRim4Ed9cjPxYhNnNJ49SFmbeLgtxpslIkX317IgpfcHPVj/A==
+ dependencies:
+ "@tufjs/canonical-json" "1.0.0"
+ minimatch "^9.0.0"
+
+"@tufjs/models@2.0.0":
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/@tufjs/models/-/models-2.0.0.tgz#c7ab241cf11dd29deb213d6817dabb8c99ce0863"
+ integrity sha512-c8nj8BaOExmZKO2DXhDfegyhSGcG9E/mPN3U13L+/PsoWm1uaGiHHjxqSHQiasDBQwDA3aHuw9+9spYAP1qvvg==
+ dependencies:
+ "@tufjs/canonical-json" "2.0.0"
+ minimatch "^9.0.3"
+
"@types/aria-query@^5.0.1":
version "5.0.1"
resolved "https://registry.yarnpkg.com/@types/aria-query/-/aria-query-5.0.1.tgz#3286741fb8f1e1580ac28784add4c7a1d49bdfbc"
integrity sha512-XTIieEY+gvJ39ChLcB4If5zHtPxt3Syj5rgZR+e1ctpmK8NjPf0zFqsz4JpLJT0xla9GFDKjy8Cpu331nrmE1Q==
-"@types/babel__core@^7.1.14":
- version "7.20.1"
- resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.20.1.tgz#916ecea274b0c776fec721e333e55762d3a9614b"
- integrity sha512-aACu/U/omhdk15O4Nfb+fHgH/z3QsfQzpnvRZhYhThms83ZnAOZz7zZAWO7mn2yyNQaA4xTO8GLK3uqFU4bYYw==
+"@types/babel__core@^7.20.5":
+ version "7.20.5"
+ resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.20.5.tgz#3df15f27ba85319caa07ba08d0721889bb39c017"
+ integrity sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==
dependencies:
"@babel/parser" "^7.20.7"
"@babel/types" "^7.20.7"
@@ -2669,17 +2265,17 @@
"@babel/parser" "^7.1.0"
"@babel/types" "^7.0.0"
-"@types/babel__traverse@*", "@types/babel__traverse@^7.0.6":
+"@types/babel__traverse@*":
version "7.11.1"
resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.11.1.tgz#654f6c4f67568e24c23b367e947098c6206fa639"
integrity sha512-Vs0hm0vPahPMYi9tDjtP66llufgO3ST16WXaSTtDGEl9cewAl3AibmxWw6TINOqHPT9z0uABKAYjT9jNSg4npw==
dependencies:
"@babel/types" "^7.3.0"
-"@types/eslint-scope@^3.7.0":
- version "3.7.2"
- resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.2.tgz#11e96a868c67acf65bf6f11d10bb89ea71d5e473"
- integrity sha512-TzgYCWoPiTeRg6RQYgtuW7iODtVoKu3RVL72k3WohqhjfaOLK5Mg2T4Tg1o2bSfu0vPkoI48wdQFv5b/Xe04wQ==
+"@types/eslint-scope@^3.7.3":
+ version "3.7.7"
+ resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.7.tgz#3108bd5f18b0cdb277c867b3dd449c9ed7079ac5"
+ integrity sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==
dependencies:
"@types/eslint" "*"
"@types/estree" "*"
@@ -2692,29 +2288,24 @@
"@types/estree" "*"
"@types/json-schema" "*"
-"@types/estree@*", "@types/estree@^0.0.50":
- version "0.0.50"
- resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.50.tgz#1e0caa9364d3fccd2931c3ed96fdbeaa5d4cca83"
- integrity sha512-C6N5s2ZFtuZRj54k2/zyRhNDjJwwcViAM3Nbm8zjBpbqAdZ00mr0CFxvSKeO8Y/e03WVFLpQMdHYVfUd6SB+Hw==
-
-"@types/estree@0.0.39":
- version "0.0.39"
- resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f"
- integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==
+"@types/estree@*", "@types/estree@1.0.5", "@types/estree@^1.0.0":
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.5.tgz#a6ce3e556e00fd9895dd872dd172ad0d4bd687f4"
+ integrity sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==
-"@types/glob@^7.1.1":
- version "7.1.3"
- resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.3.tgz#e6ba80f36b7daad2c685acd9266382e68985c183"
- integrity sha512-SEYeGAIQIQX8NN6LDKprLjbrd5dARM5EXsd8GI/A5l0apYI1fGMWgPHSe4ZKL4eozlAyI+doUE9XbYS4xCkQ1w==
+"@types/fs-extra@^8.0.1":
+ version "8.1.5"
+ resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-8.1.5.tgz#33aae2962d3b3ec9219b5aca2555ee00274f5927"
+ integrity sha512-0dzKcwO+S8s2kuF5Z9oUWatQJj5Uq/iqphEtE3GQJVRRYm/tD1LglU2UnXi2A8jLq5umkGouOXOR9y0n613ZwQ==
dependencies:
- "@types/minimatch" "*"
"@types/node" "*"
-"@types/graceful-fs@^4.1.3":
- version "4.1.6"
- resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.6.tgz#e14b2576a1c25026b7f02ede1de3b84c3a1efeae"
- integrity sha512-Sig0SNORX9fdW+bQuTEovKj3uHcUL6LQKbCrrqb1X7J6/ReAbhCXRAhc+SMejhLELFj2QcyuxmUooZ4bt5ReSw==
+"@types/glob@^7.1.1":
+ version "7.2.0"
+ resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.2.0.tgz#bc1b5bf3aa92f25bd5dd39f35c57361bdce5b2eb"
+ integrity sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==
dependencies:
+ "@types/minimatch" "*"
"@types/node" "*"
"@types/is-ci@^3.0.0":
@@ -2724,35 +2315,7 @@
dependencies:
ci-info "^3.1.0"
-"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1":
- version "2.0.4"
- resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz#8467d4b3c087805d63580480890791277ce35c44"
- integrity sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==
-
-"@types/istanbul-lib-report@*":
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz#c14c24f18ea8190c118ee7562b7ff99a36552686"
- integrity sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==
- dependencies:
- "@types/istanbul-lib-coverage" "*"
-
-"@types/istanbul-reports@^3.0.0":
- version "3.0.1"
- resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz#9153fe98bba2bd565a63add9436d6f0d7f8468ff"
- integrity sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==
- dependencies:
- "@types/istanbul-lib-report" "*"
-
-"@types/jsdom@^20.0.0":
- version "20.0.1"
- resolved "https://registry.yarnpkg.com/@types/jsdom/-/jsdom-20.0.1.tgz#07c14bc19bd2f918c1929541cdaacae894744808"
- integrity sha512-d0r18sZPmMQr1eG35u12FZfhIXNrnsPU/g5wvRKCUf/tOGilKKwYMYGqh33BNR6ba+2gkHw1EUiHoN3mn7E5IQ==
- dependencies:
- "@types/node" "*"
- "@types/tough-cookie" "*"
- parse5 "^7.0.0"
-
-"@types/json-schema@*", "@types/json-schema@^7.0.3", "@types/json-schema@^7.0.8":
+"@types/json-schema@*", "@types/json-schema@^7.0.8":
version "7.0.9"
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.9.tgz#97edc9037ea0c38585320b28964dde3b39e4660d"
integrity sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==
@@ -2763,16 +2326,21 @@
integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4=
"@types/minimatch@*":
- version "3.0.4"
- resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.4.tgz#f0ec25dbf2f0e4b18647313ac031134ca5b24b21"
- integrity sha512-1z8k4wzFnNjVK/tlxvrWuK5WMt6mydWWP7+zvH5eFep4oj+UkrfiJTRtjCeBXNpwaA/FYqqtb4/QS4ianFpIRA==
+ version "5.1.2"
+ resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-5.1.2.tgz#07508b45797cb81ec3f273011b054cd0755eddca"
+ integrity sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==
+
+"@types/minimatch@^3.0.3":
+ version "3.0.5"
+ resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.5.tgz#1001cc5e6a3704b83c236027e77f2f58ea010f40"
+ integrity sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==
"@types/minimist@^1.2.0":
version "1.2.1"
resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.1.tgz#283f669ff76d7b8260df8ab7a4262cc83d988256"
integrity sha512-fZQQafSREFyuZcdWFAExYjBiCL7AUCdgsk80iO0q4yihYYdcIiH28CcuPTGFgLOCC8RlW49GSQxdHwZP+I7CNg==
-"@types/node@*", "@types/node@>= 8":
+"@types/node@*":
version "14.14.37"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.37.tgz#a3dd8da4eb84a996c36e331df98d82abd76b516e"
integrity sha512-XYmBiy+ohOR4Lh5jE379fV2IU+6Jn4g5qASinhitfyO71b/sCo6MKsMLF5tc7Zf2CE8hViVQyYSobJNke8OvUw==
@@ -2792,11 +2360,6 @@
resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0"
integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==
-"@types/prettier@^2.1.5":
- version "2.7.3"
- resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.7.3.tgz#3e51a17e291d01d17d3fc61422015a933af7a08f"
- integrity sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==
-
"@types/prop-types@*":
version "15.7.5"
resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.5.tgz#5f19d2b85a98e9558036f6a3cacc8819420f05cf"
@@ -2818,12 +2381,10 @@
"@types/scheduler" "*"
csstype "^3.0.2"
-"@types/resolve@1.17.1":
- version "1.17.1"
- resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-1.17.1.tgz#3afd6ad8967c77e4376c598a82ddd58f46ec45d6"
- integrity sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==
- dependencies:
- "@types/node" "*"
+"@types/resolve@1.20.2":
+ version "1.20.2"
+ resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-1.20.2.tgz#97d26e00cd4a0423b4af620abecf3e6f442b7975"
+ integrity sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==
"@types/scheduler@*":
version "0.16.3"
@@ -2835,28 +2396,6 @@
resolved "https://registry.yarnpkg.com/@types/semver/-/semver-6.2.3.tgz#5798ecf1bec94eaa64db39ee52808ec0693315aa"
integrity sha512-KQf+QAMWKMrtBMsB8/24w53tEsxllMj6TuA80TT/5igJalLI/zm0L3oXRbIAl4Ohfc85gyHX/jhMwsVkmhLU4A==
-"@types/stack-utils@^2.0.0":
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.1.tgz#20f18294f797f2209b5f65c8e3b5c8e8261d127c"
- integrity sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==
-
-"@types/tough-cookie@*":
- version "4.0.2"
- resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-4.0.2.tgz#6286b4c7228d58ab7866d19716f3696e03a09397"
- integrity sha512-Q5vtl1W5ue16D+nIaW8JWebSSraJVlK+EthKn7e7UcD4KWsaSJ8BqGPXNaPghgtcn/fhvrN17Tv8ksUsQpiplw==
-
-"@types/yargs-parser@*":
- version "20.2.0"
- resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-20.2.0.tgz#dd3e6699ba3237f0348cd085e4698780204842f9"
- integrity sha512-37RSHht+gzzgYeobbG+KWryeAW8J33Nhr69cjTqSYymXVZEN9NbRYWoYlRtDhHKPVT1FyNKwaTPC1NynKZpzRA==
-
-"@types/yargs@^17.0.8":
- version "17.0.24"
- resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.24.tgz#b3ef8d50ad4aa6aecf6ddc97c580a00f5aa11902"
- integrity sha512-6i0aC7jV6QzQB8ne1joVZ0eSFIstHsCrobmOtghM11yGlH0j43FKL2UhWdELkyps0zuf7qVTUVCCR+tgSlyLLw==
- dependencies:
- "@types/yargs-parser" "*"
-
"@types/yauzl@^2.9.1":
version "2.9.2"
resolved "https://registry.yarnpkg.com/@types/yauzl/-/yauzl-2.9.2.tgz#c48e5d56aff1444409e39fa164b0b4d4552a7b7a"
@@ -2864,142 +2403,231 @@
dependencies:
"@types/node" "*"
-"@typescript-eslint/experimental-utils@^1.13.0":
- version "1.13.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-1.13.0.tgz#b08c60d780c0067de2fb44b04b432f540138301e"
- integrity sha512-zmpS6SyqG4ZF64ffaJ6uah6tWWWgZ8m+c54XXgwFtUv0jNz8aJAVx8chMCvnk7yl6xwn8d+d96+tWp7fXzTuDg==
+"@typescript-eslint/parser@^6.21.0":
+ version "6.21.0"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.21.0.tgz#af8fcf66feee2edc86bc5d1cf45e33b0630bf35b"
+ integrity sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==
+ dependencies:
+ "@typescript-eslint/scope-manager" "6.21.0"
+ "@typescript-eslint/types" "6.21.0"
+ "@typescript-eslint/typescript-estree" "6.21.0"
+ "@typescript-eslint/visitor-keys" "6.21.0"
+ debug "^4.3.4"
+
+"@typescript-eslint/scope-manager@6.21.0":
+ version "6.21.0"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz#ea8a9bfc8f1504a6ac5d59a6df308d3a0630a2b1"
+ integrity sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==
+ dependencies:
+ "@typescript-eslint/types" "6.21.0"
+ "@typescript-eslint/visitor-keys" "6.21.0"
+
+"@typescript-eslint/types@6.21.0":
+ version "6.21.0"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.21.0.tgz#205724c5123a8fef7ecd195075fa6e85bac3436d"
+ integrity sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==
+
+"@typescript-eslint/typescript-estree@6.21.0":
+ version "6.21.0"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz#c47ae7901db3b8bddc3ecd73daff2d0895688c46"
+ integrity sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==
+ dependencies:
+ "@typescript-eslint/types" "6.21.0"
+ "@typescript-eslint/visitor-keys" "6.21.0"
+ debug "^4.3.4"
+ globby "^11.1.0"
+ is-glob "^4.0.3"
+ minimatch "9.0.3"
+ semver "^7.5.4"
+ ts-api-utils "^1.0.1"
+
+"@typescript-eslint/visitor-keys@6.21.0":
+ version "6.21.0"
+ resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz#87a99d077aa507e20e238b11d56cc26ade45fe47"
+ integrity sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==
+ dependencies:
+ "@typescript-eslint/types" "6.21.0"
+ eslint-visitor-keys "^3.4.1"
+
+"@ungap/structured-clone@^1.2.0":
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406"
+ integrity sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==
+
+"@vitejs/plugin-react@^4.2.1":
+ version "4.2.1"
+ resolved "https://registry.yarnpkg.com/@vitejs/plugin-react/-/plugin-react-4.2.1.tgz#744d8e4fcb120fc3dbaa471dadd3483f5a304bb9"
+ integrity sha512-oojO9IDc4nCUUi8qIR11KoQm0XFFLIwsRBwHRR4d/88IWghn1y6ckz/bJ8GHDCsYEJee8mDzqtJxh15/cisJNQ==
dependencies:
- "@types/json-schema" "^7.0.3"
- "@typescript-eslint/typescript-estree" "1.13.0"
- eslint-scope "^4.0.0"
+ "@babel/core" "^7.23.5"
+ "@babel/plugin-transform-react-jsx-self" "^7.23.3"
+ "@babel/plugin-transform-react-jsx-source" "^7.23.3"
+ "@types/babel__core" "^7.20.5"
+ react-refresh "^0.14.0"
-"@typescript-eslint/typescript-estree@1.13.0":
- version "1.13.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-1.13.0.tgz#8140f17d0f60c03619798f1d628b8434913dc32e"
- integrity sha512-b5rCmd2e6DCC6tCTN9GSUAuxdYwCM/k/2wdjHGrIRGPSJotWMCe/dGpi66u42bhuh8q3QBzqM4TMA1GUUCJvdw==
- dependencies:
- lodash.unescape "4.0.1"
- semver "5.5.0"
-
-"@webassemblyjs/ast@1.11.1":
- version "1.11.1"
- resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.11.1.tgz#2bfd767eae1a6996f432ff7e8d7fc75679c0b6a7"
- integrity sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw==
- dependencies:
- "@webassemblyjs/helper-numbers" "1.11.1"
- "@webassemblyjs/helper-wasm-bytecode" "1.11.1"
-
-"@webassemblyjs/floating-point-hex-parser@1.11.1":
- version "1.11.1"
- resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz#f6c61a705f0fd7a6aecaa4e8198f23d9dc179e4f"
- integrity sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ==
-
-"@webassemblyjs/helper-api-error@1.11.1":
- version "1.11.1"
- resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz#1a63192d8788e5c012800ba6a7a46c705288fd16"
- integrity sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg==
-
-"@webassemblyjs/helper-buffer@1.11.1":
- version "1.11.1"
- resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz#832a900eb444884cde9a7cad467f81500f5e5ab5"
- integrity sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA==
-
-"@webassemblyjs/helper-numbers@1.11.1":
- version "1.11.1"
- resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz#64d81da219fbbba1e3bd1bfc74f6e8c4e10a62ae"
- integrity sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ==
- dependencies:
- "@webassemblyjs/floating-point-hex-parser" "1.11.1"
- "@webassemblyjs/helper-api-error" "1.11.1"
+"@vitest/expect@1.2.1":
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/@vitest/expect/-/expect-1.2.1.tgz#574c0ac138a9e34522da202ea4c48a3adfe7240e"
+ integrity sha512-/bqGXcHfyKgFWYwIgFr1QYDaR9e64pRKxgBNWNXPefPFRhgm+K3+a/dS0cUGEreWngets3dlr8w8SBRw2fCfFQ==
+ dependencies:
+ "@vitest/spy" "1.2.1"
+ "@vitest/utils" "1.2.1"
+ chai "^4.3.10"
+
+"@vitest/runner@1.2.1":
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/@vitest/runner/-/runner-1.2.1.tgz#13e65b47eb04e572b99757e55f063f8f025822b2"
+ integrity sha512-zc2dP5LQpzNzbpaBt7OeYAvmIsRS1KpZQw4G3WM/yqSV1cQKNKwLGmnm79GyZZjMhQGlRcSFMImLjZaUQvNVZQ==
+ dependencies:
+ "@vitest/utils" "1.2.1"
+ p-limit "^5.0.0"
+ pathe "^1.1.1"
+
+"@vitest/snapshot@1.2.1":
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/@vitest/snapshot/-/snapshot-1.2.1.tgz#bd2dcae2322b90bab1660421ff9dae73fc84ecc0"
+ integrity sha512-Tmp/IcYEemKaqAYCS08sh0vORLJkMr0NRV76Gl8sHGxXT5151cITJCET20063wk0Yr/1koQ6dnmP6eEqezmd/Q==
+ dependencies:
+ magic-string "^0.30.5"
+ pathe "^1.1.1"
+ pretty-format "^29.7.0"
+
+"@vitest/spy@1.2.1":
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/@vitest/spy/-/spy-1.2.1.tgz#2777444890de9d32e55e600e34a13b2074cabc18"
+ integrity sha512-vG3a/b7INKH7L49Lbp0IWrG6sw9j4waWAucwnksPB1r1FTJgV7nkBByd9ufzu6VWya/QTvQW4V9FShZbZIB2UQ==
+ dependencies:
+ tinyspy "^2.2.0"
+
+"@vitest/utils@1.2.1":
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/@vitest/utils/-/utils-1.2.1.tgz#ad798cb13ec9e9e97b13be65d135e9e8e3c586aa"
+ integrity sha512-bsH6WVZYe/J2v3+81M5LDU8kW76xWObKIURpPrOXm2pjBniBu2MERI/XP60GpS4PHU3jyK50LUutOwrx4CyHUg==
+ dependencies:
+ diff-sequences "^29.6.3"
+ estree-walker "^3.0.3"
+ loupe "^2.3.7"
+ pretty-format "^29.7.0"
+
+"@webassemblyjs/ast@1.11.6", "@webassemblyjs/ast@^1.11.5":
+ version "1.11.6"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.11.6.tgz#db046555d3c413f8966ca50a95176a0e2c642e24"
+ integrity sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==
+ dependencies:
+ "@webassemblyjs/helper-numbers" "1.11.6"
+ "@webassemblyjs/helper-wasm-bytecode" "1.11.6"
+
+"@webassemblyjs/floating-point-hex-parser@1.11.6":
+ version "1.11.6"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz#dacbcb95aff135c8260f77fa3b4c5fea600a6431"
+ integrity sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==
+
+"@webassemblyjs/helper-api-error@1.11.6":
+ version "1.11.6"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz#6132f68c4acd59dcd141c44b18cbebbd9f2fa768"
+ integrity sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==
+
+"@webassemblyjs/helper-buffer@1.11.6":
+ version "1.11.6"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz#b66d73c43e296fd5e88006f18524feb0f2c7c093"
+ integrity sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA==
+
+"@webassemblyjs/helper-numbers@1.11.6":
+ version "1.11.6"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz#cbce5e7e0c1bd32cf4905ae444ef64cea919f1b5"
+ integrity sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==
+ dependencies:
+ "@webassemblyjs/floating-point-hex-parser" "1.11.6"
+ "@webassemblyjs/helper-api-error" "1.11.6"
"@xtuc/long" "4.2.2"
-"@webassemblyjs/helper-wasm-bytecode@1.11.1":
- version "1.11.1"
- resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz#f328241e41e7b199d0b20c18e88429c4433295e1"
- integrity sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q==
+"@webassemblyjs/helper-wasm-bytecode@1.11.6":
+ version "1.11.6"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz#bb2ebdb3b83aa26d9baad4c46d4315283acd51e9"
+ integrity sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==
-"@webassemblyjs/helper-wasm-section@1.11.1":
- version "1.11.1"
- resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz#21ee065a7b635f319e738f0dd73bfbda281c097a"
- integrity sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg==
+"@webassemblyjs/helper-wasm-section@1.11.6":
+ version "1.11.6"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.6.tgz#ff97f3863c55ee7f580fd5c41a381e9def4aa577"
+ integrity sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g==
dependencies:
- "@webassemblyjs/ast" "1.11.1"
- "@webassemblyjs/helper-buffer" "1.11.1"
- "@webassemblyjs/helper-wasm-bytecode" "1.11.1"
- "@webassemblyjs/wasm-gen" "1.11.1"
+ "@webassemblyjs/ast" "1.11.6"
+ "@webassemblyjs/helper-buffer" "1.11.6"
+ "@webassemblyjs/helper-wasm-bytecode" "1.11.6"
+ "@webassemblyjs/wasm-gen" "1.11.6"
-"@webassemblyjs/ieee754@1.11.1":
- version "1.11.1"
- resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz#963929e9bbd05709e7e12243a099180812992614"
- integrity sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ==
+"@webassemblyjs/ieee754@1.11.6":
+ version "1.11.6"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz#bb665c91d0b14fffceb0e38298c329af043c6e3a"
+ integrity sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==
dependencies:
"@xtuc/ieee754" "^1.2.0"
-"@webassemblyjs/leb128@1.11.1":
- version "1.11.1"
- resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.11.1.tgz#ce814b45574e93d76bae1fb2644ab9cdd9527aa5"
- integrity sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw==
+"@webassemblyjs/leb128@1.11.6":
+ version "1.11.6"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.11.6.tgz#70e60e5e82f9ac81118bc25381a0b283893240d7"
+ integrity sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==
dependencies:
"@xtuc/long" "4.2.2"
-"@webassemblyjs/utf8@1.11.1":
- version "1.11.1"
- resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.11.1.tgz#d1f8b764369e7c6e6bae350e854dec9a59f0a3ff"
- integrity sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ==
-
-"@webassemblyjs/wasm-edit@1.11.1":
- version "1.11.1"
- resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz#ad206ebf4bf95a058ce9880a8c092c5dec8193d6"
- integrity sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA==
- dependencies:
- "@webassemblyjs/ast" "1.11.1"
- "@webassemblyjs/helper-buffer" "1.11.1"
- "@webassemblyjs/helper-wasm-bytecode" "1.11.1"
- "@webassemblyjs/helper-wasm-section" "1.11.1"
- "@webassemblyjs/wasm-gen" "1.11.1"
- "@webassemblyjs/wasm-opt" "1.11.1"
- "@webassemblyjs/wasm-parser" "1.11.1"
- "@webassemblyjs/wast-printer" "1.11.1"
-
-"@webassemblyjs/wasm-gen@1.11.1":
- version "1.11.1"
- resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz#86c5ea304849759b7d88c47a32f4f039ae3c8f76"
- integrity sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA==
- dependencies:
- "@webassemblyjs/ast" "1.11.1"
- "@webassemblyjs/helper-wasm-bytecode" "1.11.1"
- "@webassemblyjs/ieee754" "1.11.1"
- "@webassemblyjs/leb128" "1.11.1"
- "@webassemblyjs/utf8" "1.11.1"
-
-"@webassemblyjs/wasm-opt@1.11.1":
- version "1.11.1"
- resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz#657b4c2202f4cf3b345f8a4c6461c8c2418985f2"
- integrity sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw==
- dependencies:
- "@webassemblyjs/ast" "1.11.1"
- "@webassemblyjs/helper-buffer" "1.11.1"
- "@webassemblyjs/wasm-gen" "1.11.1"
- "@webassemblyjs/wasm-parser" "1.11.1"
-
-"@webassemblyjs/wasm-parser@1.11.1":
- version "1.11.1"
- resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz#86ca734534f417e9bd3c67c7a1c75d8be41fb199"
- integrity sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA==
- dependencies:
- "@webassemblyjs/ast" "1.11.1"
- "@webassemblyjs/helper-api-error" "1.11.1"
- "@webassemblyjs/helper-wasm-bytecode" "1.11.1"
- "@webassemblyjs/ieee754" "1.11.1"
- "@webassemblyjs/leb128" "1.11.1"
- "@webassemblyjs/utf8" "1.11.1"
-
-"@webassemblyjs/wast-printer@1.11.1":
- version "1.11.1"
- resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz#d0c73beda8eec5426f10ae8ef55cee5e7084c2f0"
- integrity sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg==
- dependencies:
- "@webassemblyjs/ast" "1.11.1"
+"@webassemblyjs/utf8@1.11.6":
+ version "1.11.6"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.11.6.tgz#90f8bc34c561595fe156603be7253cdbcd0fab5a"
+ integrity sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==
+
+"@webassemblyjs/wasm-edit@^1.11.5":
+ version "1.11.6"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.6.tgz#c72fa8220524c9b416249f3d94c2958dfe70ceab"
+ integrity sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw==
+ dependencies:
+ "@webassemblyjs/ast" "1.11.6"
+ "@webassemblyjs/helper-buffer" "1.11.6"
+ "@webassemblyjs/helper-wasm-bytecode" "1.11.6"
+ "@webassemblyjs/helper-wasm-section" "1.11.6"
+ "@webassemblyjs/wasm-gen" "1.11.6"
+ "@webassemblyjs/wasm-opt" "1.11.6"
+ "@webassemblyjs/wasm-parser" "1.11.6"
+ "@webassemblyjs/wast-printer" "1.11.6"
+
+"@webassemblyjs/wasm-gen@1.11.6":
+ version "1.11.6"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.6.tgz#fb5283e0e8b4551cc4e9c3c0d7184a65faf7c268"
+ integrity sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA==
+ dependencies:
+ "@webassemblyjs/ast" "1.11.6"
+ "@webassemblyjs/helper-wasm-bytecode" "1.11.6"
+ "@webassemblyjs/ieee754" "1.11.6"
+ "@webassemblyjs/leb128" "1.11.6"
+ "@webassemblyjs/utf8" "1.11.6"
+
+"@webassemblyjs/wasm-opt@1.11.6":
+ version "1.11.6"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.6.tgz#d9a22d651248422ca498b09aa3232a81041487c2"
+ integrity sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g==
+ dependencies:
+ "@webassemblyjs/ast" "1.11.6"
+ "@webassemblyjs/helper-buffer" "1.11.6"
+ "@webassemblyjs/wasm-gen" "1.11.6"
+ "@webassemblyjs/wasm-parser" "1.11.6"
+
+"@webassemblyjs/wasm-parser@1.11.6", "@webassemblyjs/wasm-parser@^1.11.5":
+ version "1.11.6"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz#bb85378c527df824004812bbdb784eea539174a1"
+ integrity sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ==
+ dependencies:
+ "@webassemblyjs/ast" "1.11.6"
+ "@webassemblyjs/helper-api-error" "1.11.6"
+ "@webassemblyjs/helper-wasm-bytecode" "1.11.6"
+ "@webassemblyjs/ieee754" "1.11.6"
+ "@webassemblyjs/leb128" "1.11.6"
+ "@webassemblyjs/utf8" "1.11.6"
+
+"@webassemblyjs/wast-printer@1.11.6":
+ version "1.11.6"
+ resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.11.6.tgz#a7bf8dd7e362aeb1668ff43f35cb849f188eff20"
+ integrity sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A==
+ dependencies:
+ "@webassemblyjs/ast" "1.11.6"
"@xtuc/long" "4.2.2"
"@xtuc/ieee754@^1.2.0":
@@ -3012,16 +2640,27 @@
resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d"
integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==
-"@zkochan/cmd-shim@^3.1.0":
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/@zkochan/cmd-shim/-/cmd-shim-3.1.0.tgz#2ab8ed81f5bb5452a85f25758eb9b8681982fd2e"
- integrity sha512-o8l0+x7C7sMZU3v9GuJIAU10qQLtwR1dtRQIOmlNMtyaqhmpXOzx1HWiYoWfmmf9HHZoAkXpc9TM9PQYF9d4Jg==
+"@yarnpkg/lockfile@^1.1.0":
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31"
+ integrity sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==
+
+"@yarnpkg/parsers@3.0.0-rc.46":
+ version "3.0.0-rc.46"
+ resolved "https://registry.yarnpkg.com/@yarnpkg/parsers/-/parsers-3.0.0-rc.46.tgz#03f8363111efc0ea670e53b0282cd3ef62de4e01"
+ integrity sha512-aiATs7pSutzda/rq8fnuPwTglyVwjM22bNnK2ZgjrpAjQHSSl3lztd2f9evst1W/qnC58DRz7T7QndUDumAR4Q==
dependencies:
- is-windows "^1.0.0"
- mkdirp-promise "^5.0.1"
- mz "^2.5.0"
+ js-yaml "^3.10.0"
+ tslib "^2.4.0"
-JSONStream@^1.0.4, JSONStream@^1.3.4:
+"@zkochan/js-yaml@0.0.6":
+ version "0.0.6"
+ resolved "https://registry.yarnpkg.com/@zkochan/js-yaml/-/js-yaml-0.0.6.tgz#975f0b306e705e28b8068a07737fa46d3fc04826"
+ integrity sha512-nzvgl3VfhcELQ8LyVrYOru+UtAy1nrygk2+AGbTm8a5YcO6o8lSjAT+pfg3vJWxIoZKOUhrK6UU7xW/+00kQrg==
+ dependencies:
+ argparse "^2.0.1"
+
+JSONStream@^1.3.5:
version "1.3.5"
resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0"
integrity sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==
@@ -3029,79 +2668,64 @@ JSONStream@^1.0.4, JSONStream@^1.3.4:
jsonparse "^1.2.0"
through ">=2.2.7 <3"
-abab@^2.0.6:
- version "2.0.6"
- resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.6.tgz#41b80f2c871d19686216b82309231cfd3cb3d291"
- integrity sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==
-
abbrev@1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8"
integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==
+abbrev@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-2.0.0.tgz#cf59829b8b4f03f89dda2771cb7f3653828c89bf"
+ integrity sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ==
+
abs-svg-path@^0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/abs-svg-path/-/abs-svg-path-0.1.1.tgz#df601c8e8d2ba10d4a76d625e236a9a39c2723bf"
integrity sha1-32Acjo0roQ1KdtYl4japo5wnI78=
-acorn-globals@^7.0.0:
- version "7.0.1"
- resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-7.0.1.tgz#0dbf05c44fa7c94332914c02066d5beff62c40c3"
- integrity sha512-umOSDSDrfHbTNPuNpC2NSnnA3LUrqpevPb4T9jRx4MagXNS0rs+gwiTcAvqCRmsD6utzsrzNt+ebm00SNWiC3Q==
- dependencies:
- acorn "^8.1.0"
- acorn-walk "^8.0.2"
-
-acorn-import-assertions@^1.7.6:
- version "1.8.0"
- resolved "https://registry.yarnpkg.com/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz#ba2b5939ce62c238db6d93d81c9b111b29b855e9"
- integrity sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==
-
-acorn-jsx@^5.2.0:
- version "5.3.1"
- resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.1.tgz#fc8661e11b7ac1539c47dbfea2e72b3af34d267b"
- integrity sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==
+acorn-import-assertions@^1.9.0:
+ version "1.9.0"
+ resolved "https://registry.yarnpkg.com/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz#507276249d684797c84e0734ef84860334cfb1ac"
+ integrity sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==
-acorn-walk@^8.0.2:
- version "8.2.0"
- resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1"
- integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==
+acorn-jsx@^5.3.2:
+ version "5.3.2"
+ resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937"
+ integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==
-acorn@^7.1.1:
- version "7.4.1"
- resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa"
- integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==
+acorn-walk@^8.3.2:
+ version "8.3.2"
+ resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.2.tgz#7703af9415f1b6db9315d6895503862e231d34aa"
+ integrity sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==
-acorn@^8.1.0, acorn@^8.4.1, acorn@^8.8.1:
- version "8.8.2"
- resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.2.tgz#1b2f25db02af965399b9776b0c2c391276d37c4a"
- integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==
+acorn@^8.10.0, acorn@^8.11.3, acorn@^8.7.1, acorn@^8.8.2, acorn@^8.9.0:
+ version "8.11.3"
+ resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a"
+ integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==
-agent-base@4, agent-base@^4.3.0:
- version "4.3.0"
- resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee"
- integrity sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==
- dependencies:
- es6-promisify "^5.0.0"
+add-stream@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/add-stream/-/add-stream-1.0.0.tgz#6a7990437ca736d5e1288db92bd3266d5f5cb2aa"
+ integrity sha512-qQLMr+8o0WC4FZGQTcJiKBVC59JylcPSrTtk6usvmIDFUOCKegapy1VHQwRbFMOFyb/inzUVqHs+eMYKDM1YeQ==
-agent-base@6:
+agent-base@6, agent-base@^6.0.2:
version "6.0.2"
resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77"
integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==
dependencies:
debug "4"
-agent-base@~4.2.1:
- version "4.2.1"
- resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.2.1.tgz#d89e5999f797875674c07d87f260fc41e83e8ca9"
- integrity sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg==
+agent-base@^7.0.2, agent-base@^7.1.0:
+ version "7.1.0"
+ resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-7.1.0.tgz#536802b76bc0b34aa50195eb2442276d613e3434"
+ integrity sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==
dependencies:
- es6-promisify "^5.0.0"
+ debug "^4.3.4"
-agentkeepalive@^3.4.1:
- version "3.5.2"
- resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-3.5.2.tgz#a113924dd3fa24a0bc3b78108c450c2abee00f67"
- integrity sha512-e0L/HNe6qkQ7H19kTlRRqUibEAwDK5AFk6y3PtMsuut2VAH6+Q4xZml1tNDJD7kSAyqmbG/K08K5WEJYtUrSlQ==
+agentkeepalive@^4.2.1:
+ version "4.5.0"
+ resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-4.5.0.tgz#2673ad1389b3c418c5a20c5d7364f93ca04be923"
+ integrity sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==
dependencies:
humanize-ms "^1.2.1"
@@ -3118,7 +2742,7 @@ ajv-keywords@^3.5.2:
resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d"
integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==
-ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.3, ajv@^6.12.5:
+ajv@^6.12.4, ajv@^6.12.5:
version "6.12.6"
resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4"
integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==
@@ -3133,11 +2757,6 @@ ansi-colors@^4.1.1, ansi-colors@^4.1.3:
resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b"
integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==
-ansi-escapes@^3.2.0:
- version "3.2.0"
- resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b"
- integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==
-
ansi-escapes@^4.2.1, ansi-escapes@^4.3.0:
version "4.3.2"
resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e"
@@ -3150,22 +2769,17 @@ ansi-regex@^2.0.0:
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df"
integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8=
-ansi-regex@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998"
- integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=
-
-ansi-regex@^4.1.0:
- version "4.1.0"
- resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997"
- integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==
-
ansi-regex@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304"
integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==
-ansi-styles@^3.2.0, ansi-styles@^3.2.1:
+ansi-regex@^6.0.1:
+ version "6.0.1"
+ resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.0.1.tgz#3183e38fae9a65d7cb5e53945cd5897d0260a06a"
+ integrity sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==
+
+ansi-styles@^3.2.1:
version "3.2.1"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d"
integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==
@@ -3184,12 +2798,12 @@ ansi-styles@^5.0.0:
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b"
integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==
-any-promise@^1.0.0:
- version "1.3.0"
- resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f"
- integrity sha1-q8av7tzqUugJzcA3au0845Y10X8=
+ansi-styles@^6.1.0:
+ version "6.2.1"
+ resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.1.tgz#0e62320cf99c21afff3b3012192546aacbfb05c5"
+ integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==
-anymatch@^3.0.3, anymatch@~3.1.2:
+anymatch@~3.1.2:
version "3.1.3"
resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e"
integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==
@@ -3197,16 +2811,24 @@ anymatch@^3.0.3, anymatch@~3.1.2:
normalize-path "^3.0.0"
picomatch "^2.0.4"
-aproba@^1.0.3, aproba@^1.1.1:
+aproba@^1.0.3:
version "1.2.0"
resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a"
integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==
-aproba@^2.0.0:
+"aproba@^1.0.3 || ^2.0.0":
version "2.0.0"
resolved "https://registry.yarnpkg.com/aproba/-/aproba-2.0.0.tgz#52520b8ae5b569215b354efc0caa3fe1e45a8adc"
integrity sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==
+are-we-there-yet@^3.0.0:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-3.0.1.tgz#679df222b278c64f2cdba1175cdc00b0d96164bd"
+ integrity sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg==
+ dependencies:
+ delegates "^1.0.0"
+ readable-stream "^3.6.0"
+
are-we-there-yet@~1.1.2:
version "1.1.5"
resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21"
@@ -3222,132 +2844,128 @@ argparse@^1.0.7:
dependencies:
sprintf-js "~1.0.2"
-aria-query@^4.2.2:
- version "4.2.2"
- resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-4.2.2.tgz#0d2ca6c9aceb56b8977e9fed6aed7e15bbd2f83b"
- integrity sha512-o/HelwhuKpTj/frsOsbNLNgnNGVIFsVP/SW2BSF14gVl7kAfMOJ6/8wUAUvG1R1NHKrfG+2sHZTu0yauT1qBrA==
- dependencies:
- "@babel/runtime" "^7.10.2"
- "@babel/runtime-corejs3" "^7.10.2"
-
-aria-query@^5.0.0:
- version "5.1.3"
- resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-5.1.3.tgz#19db27cd101152773631396f7a95a3b58c22c35e"
- integrity sha512-R5iJ5lkuHybztUfuOAznmboyjWq8O6sqNqtK7CLOqdydi54VNbORp49mb14KbWgG1QD3JFO9hJdZ+y4KutfdOQ==
- dependencies:
- deep-equal "^2.0.5"
-
-arr-diff@^4.0.0:
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520"
- integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=
-
-arr-flatten@^1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1"
- integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==
-
-arr-union@^3.1.0:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4"
- integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=
+argparse@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38"
+ integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==
-array-buffer-byte-length@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz#fabe8bc193fea865f317fe7807085ee0dee5aead"
- integrity sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==
+aria-query@^5.0.0, aria-query@^5.3.0:
+ version "5.3.0"
+ resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-5.3.0.tgz#650c569e41ad90b51b3d7df5e5eed1c7549c103e"
+ integrity sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==
dependencies:
- call-bind "^1.0.2"
- is-array-buffer "^3.0.1"
+ dequal "^2.0.3"
-array-differ@^2.0.3:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-2.1.0.tgz#4b9c1c3f14b906757082925769e8ab904f4801b1"
- integrity sha512-KbUpJgx909ZscOc/7CLATBFam7P1Z1QRQInvgT0UztM9Q72aGKCunKASAl7WNW0tnPmPyEMeMhdsfWhfmW037w==
+array-buffer-byte-length@^1.0.0, array-buffer-byte-length@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz#1e5583ec16763540a27ae52eed99ff899223568f"
+ integrity sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==
+ dependencies:
+ call-bind "^1.0.5"
+ is-array-buffer "^3.0.4"
-array-find-index@^1.0.1:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1"
- integrity sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=
+array-differ@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-3.0.0.tgz#3cbb3d0f316810eafcc47624734237d6aee4ae6b"
+ integrity sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg==
array-ify@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/array-ify/-/array-ify-1.0.0.tgz#9e528762b4a9066ad163a6962a364418e9626ece"
integrity sha1-nlKHYrSpBmrRY6aWKjZEGOlibs4=
-array-includes@^3.1.1, array-includes@^3.1.2, array-includes@^3.1.3:
- version "3.1.3"
- resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.3.tgz#c7f619b382ad2afaf5326cddfdc0afc61af7690a"
- integrity sha512-gcem1KlBU7c9rB+Rq8/3PPKsK2kjqeEBa3bD5kkQo4nYlOHQCJqIJFqBXDEfwaRuYTT4E+FxA9xez7Gf/e3Q7A==
+array-includes@^3.1.6, array-includes@^3.1.7:
+ version "3.1.7"
+ resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.7.tgz#8cd2e01b26f7a3086cbc87271593fe921c62abda"
+ integrity sha512-dlcsNBIiWhPkHdOEEKnehA+RNUWDc4UqFtnIXU4uuYDPtA4LDkr7qip2p0VvFAEXNDr0yWZ9PJyIRiGjRLQzwQ==
dependencies:
call-bind "^1.0.2"
- define-properties "^1.1.3"
- es-abstract "^1.18.0-next.2"
- get-intrinsic "^1.1.1"
- is-string "^1.0.5"
-
-array-union@^1.0.2:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39"
- integrity sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=
- dependencies:
- array-uniq "^1.0.1"
+ define-properties "^1.2.0"
+ es-abstract "^1.22.1"
+ get-intrinsic "^1.2.1"
+ is-string "^1.0.7"
array-union@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d"
integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==
-array-uniq@^1.0.1:
+array.prototype.filter@^1.0.3:
version "1.0.3"
- resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6"
- integrity sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=
-
-array-unique@^0.3.2:
- version "0.3.2"
- resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428"
- integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=
+ resolved "https://registry.yarnpkg.com/array.prototype.filter/-/array.prototype.filter-1.0.3.tgz#423771edeb417ff5914111fff4277ea0624c0d0e"
+ integrity sha512-VizNcj/RGJiUyQBgzwxzE5oHdeuXY5hSbbmKMlphj1cy1Vl7Pn2asCGbSrru6hSQjmCzqTBPVWAF/whmEOVHbw==
+ dependencies:
+ call-bind "^1.0.2"
+ define-properties "^1.2.0"
+ es-abstract "^1.22.1"
+ es-array-method-boxes-properly "^1.0.0"
+ is-string "^1.0.7"
-array.prototype.flat@^1.2.3:
+array.prototype.findlastindex@^1.2.3:
version "1.2.4"
- resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.2.4.tgz#6ef638b43312bd401b4c6199fdec7e2dc9e9a123"
- integrity sha512-4470Xi3GAPAjZqFcljX2xzckv1qeKPizoNkiS0+O4IoPR2ZNpcjE0pkhdihlDouK+x6QOast26B4Q/O9DJnwSg==
+ resolved "https://registry.yarnpkg.com/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.4.tgz#d1c50f0b3a9da191981ff8942a0aedd82794404f"
+ integrity sha512-hzvSHUshSpCflDR1QMUBLHGHP1VIEBegT4pix9H/Z92Xw3ySoy6c2qh7lJWTJnRJ8JCZ9bJNCgTyYaJGcJu6xQ==
dependencies:
- call-bind "^1.0.0"
- define-properties "^1.1.3"
- es-abstract "^1.18.0-next.1"
+ call-bind "^1.0.5"
+ define-properties "^1.2.1"
+ es-abstract "^1.22.3"
+ es-errors "^1.3.0"
+ es-shim-unscopables "^1.0.2"
-array.prototype.flatmap@^1.2.4:
- version "1.2.4"
- resolved "https://registry.yarnpkg.com/array.prototype.flatmap/-/array.prototype.flatmap-1.2.4.tgz#94cfd47cc1556ec0747d97f7c7738c58122004c9"
- integrity sha512-r9Z0zYoxqHz60vvQbWEdXIEtCwHF0yxaWfno9qzXeNHvfyl3BZqygmGzb84dsubyaXLH4husF+NFgMSdpZhk2Q==
+array.prototype.flat@^1.2.3, array.prototype.flat@^1.3.1, array.prototype.flat@^1.3.2:
+ version "1.3.2"
+ resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz#1476217df8cff17d72ee8f3ba06738db5b387d18"
+ integrity sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==
dependencies:
- call-bind "^1.0.0"
- define-properties "^1.1.3"
- es-abstract "^1.18.0-next.1"
- function-bind "^1.1.1"
+ call-bind "^1.0.2"
+ define-properties "^1.2.0"
+ es-abstract "^1.22.1"
+ es-shim-unscopables "^1.0.0"
+
+array.prototype.flatmap@^1.3.1, array.prototype.flatmap@^1.3.2:
+ version "1.3.2"
+ resolved "https://registry.yarnpkg.com/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz#c9a7c6831db8e719d6ce639190146c24bbd3e527"
+ integrity sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==
+ dependencies:
+ call-bind "^1.0.2"
+ define-properties "^1.2.0"
+ es-abstract "^1.22.1"
+ es-shim-unscopables "^1.0.0"
+
+array.prototype.tosorted@^1.1.1:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/array.prototype.tosorted/-/array.prototype.tosorted-1.1.3.tgz#c8c89348337e51b8a3c48a9227f9ce93ceedcba8"
+ integrity sha512-/DdH4TiTmOKzyQbp/eadcCVexiCb36xJg7HshYOYJnNZFDj33GEv0P7GxsynpShhq4OLYJzbGcBDkLsDt7MnNg==
+ dependencies:
+ call-bind "^1.0.5"
+ define-properties "^1.2.1"
+ es-abstract "^1.22.3"
+ es-errors "^1.1.0"
+ es-shim-unscopables "^1.0.2"
+
+arraybuffer.prototype.slice@^1.0.2:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz#097972f4255e41bc3425e37dc3f6421cf9aefde6"
+ integrity sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==
+ dependencies:
+ array-buffer-byte-length "^1.0.1"
+ call-bind "^1.0.5"
+ define-properties "^1.2.1"
+ es-abstract "^1.22.3"
+ es-errors "^1.2.1"
+ get-intrinsic "^1.2.3"
+ is-array-buffer "^3.0.4"
+ is-shared-array-buffer "^1.0.2"
arrify@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d"
integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=
-asap@^2.0.0:
- version "2.0.6"
- resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46"
- integrity sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=
-
-asn1@~0.2.3:
- version "0.2.4"
- resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136"
- integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==
- dependencies:
- safer-buffer "~2.1.0"
-
-assert-plus@1.0.0, assert-plus@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525"
- integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=
+arrify@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/arrify/-/arrify-2.0.1.tgz#c9655e9331e0abcd588d2a7cad7e9956f66701fa"
+ integrity sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==
assert@^2.0.0:
version "2.0.0"
@@ -3359,117 +2977,81 @@ assert@^2.0.0:
object-is "^1.0.1"
util "^0.12.0"
-assign-symbols@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367"
- integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=
+assertion-error@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b"
+ integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==
-ast-types-flow@^0.0.7:
- version "0.0.7"
- resolved "https://registry.yarnpkg.com/ast-types-flow/-/ast-types-flow-0.0.7.tgz#f70b735c6bca1a5c9c22d982c3e39e7feba3bdad"
- integrity sha1-9wtzXGvKGlycItmCw+Oef+ujva0=
+ast-types-flow@^0.0.8:
+ version "0.0.8"
+ resolved "https://registry.yarnpkg.com/ast-types-flow/-/ast-types-flow-0.0.8.tgz#0a85e1c92695769ac13a428bb653e7538bea27d6"
+ integrity sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==
-astral-regex@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9"
- integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==
+ast-types@^0.13.4:
+ version "0.13.4"
+ resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.13.4.tgz#ee0d77b343263965ecc3fb62da16e7222b2b6782"
+ integrity sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==
+ dependencies:
+ tslib "^2.0.1"
astral-regex@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31"
integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==
+async@^3.2.3:
+ version "3.2.5"
+ resolved "https://registry.yarnpkg.com/async/-/async-3.2.5.tgz#ebd52a8fdaf7a2289a24df399f8d8485c8a46b66"
+ integrity sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==
+
+asynciterator.prototype@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/asynciterator.prototype/-/asynciterator.prototype-1.0.0.tgz#8c5df0514936cdd133604dfcc9d3fb93f09b2b62"
+ integrity sha512-wwHYEIS0Q80f5mosx3L/dfG5t5rjEa9Ft51GTaNt862EnpyGHpgz2RkZvLPp1oF5TnAiTohkEKVEu8pQPJI7Vg==
+ dependencies:
+ has-symbols "^1.0.3"
+
asynckit@^0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
integrity sha1-x57Zf380y48robyXkLzDZkdLS3k=
-atob-lite@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/atob-lite/-/atob-lite-2.0.0.tgz#0fef5ad46f1bd7a8502c65727f0367d5ee43d696"
- integrity sha1-D+9a1G8b16hQLGVyfwNn1e5D1pY=
-
-atob@^2.1.2:
- version "2.1.2"
- resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9"
- integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==
-
-available-typed-arrays@^1.0.5:
- version "1.0.5"
- resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7"
- integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==
-
-aws-sign2@~0.7.0:
- version "0.7.0"
- resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8"
- integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=
-
-aws4@^1.8.0:
- version "1.11.0"
- resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59"
- integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==
+available-typed-arrays@^1.0.5, available-typed-arrays@^1.0.6:
+ version "1.0.6"
+ resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.6.tgz#ac812d8ce5a6b976d738e1c45f08d0b00bc7d725"
+ integrity sha512-j1QzY8iPNPG4o4xmO3ptzpRxTciqD3MgEHtifP/YnJpIo58Xu+ne4BejlbkuaLfXn/nz6HFiw29bLpj2PNMdGg==
-axe-core@^4.0.2:
- version "4.1.4"
- resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.1.4.tgz#f19cd99a84ee32a318b9c5b5bb8ed373ad94f143"
- integrity sha512-Pdgfv6iP0gNx9ejRGa3zE7Xgkj/iclXqLfe7BnatdZz0QnLZ3jrRHUVH8wNSdN68w05Sk3ShGTb3ydktMTooig==
+axe-core@=4.7.0:
+ version "4.7.0"
+ resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.7.0.tgz#34ba5a48a8b564f67e103f0aa5768d76e15bbbbf"
+ integrity sha512-M0JtH+hlOL5pLQwHOLNYZaXuhqmvS8oExsqB1SBYgA4Dk7u/xx+YdGHXaK5pyUfed5mYXdlYiphWq3G8cRi5JQ==
-axobject-query@^2.2.0:
- version "2.2.0"
- resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-2.2.0.tgz#943d47e10c0b704aa42275e20edf3722648989be"
- integrity sha512-Td525n+iPOOyUQIeBfcASuG6uJsDOITl7Mds5gFyerkWiX7qhUTdYUBlSgNMyVqtSJqwpt1kXGLdUt6SykLMRA==
+axios@^1.5.1:
+ version "1.6.5"
+ resolved "https://registry.yarnpkg.com/axios/-/axios-1.6.5.tgz#2c090da14aeeab3770ad30c3a1461bc970fb0cd8"
+ integrity sha512-Ii012v05KEVuUoFWmMW/UQv9aRIc3ZwkWDcM+h5Il8izZCtRVpDUfwpoFf7eOtajT3QiGR4yDUx7lPqHJULgbg==
+ dependencies:
+ follow-redirects "^1.15.4"
+ form-data "^4.0.0"
+ proxy-from-env "^1.1.0"
-babel-eslint@^10.0.1:
- version "10.1.0"
- resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-10.1.0.tgz#6968e568a910b78fb3779cdd8b6ac2f479943232"
- integrity sha512-ifWaTHQ0ce+448CYop8AdrQiBsGrnC+bMgfyKFdi6EsPLTAWG+QfyDeM6OH+FmWnKvEq5NnBMLvlBUPKQZoDSg==
+axobject-query@^3.2.1:
+ version "3.2.1"
+ resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-3.2.1.tgz#39c378a6e3b06ca679f29138151e45b2b32da62a"
+ integrity sha512-jsyHu61e6N4Vbz/v18DHwWYKK0bSWLqn47eeDSKPB7m8tqMHF9YJ+mhIk2lVteyZrY8tnSj/jHOv4YiTCuCJgg==
dependencies:
- "@babel/code-frame" "^7.0.0"
- "@babel/parser" "^7.7.0"
- "@babel/traverse" "^7.7.0"
- "@babel/types" "^7.7.0"
- eslint-visitor-keys "^1.0.0"
- resolve "^1.12.0"
-
-babel-jest@^29.5.0:
- version "29.5.0"
- resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-29.5.0.tgz#3fe3ddb109198e78b1c88f9ebdecd5e4fc2f50a5"
- integrity sha512-mA4eCDh5mSo2EcA9xQjVTpmbbNk32Zb3Q3QFQsNhaK56Q+yoXowzFodLux30HRgyOho5rsQ6B0P9QpMkvvnJ0Q==
- dependencies:
- "@jest/transform" "^29.5.0"
- "@types/babel__core" "^7.1.14"
- babel-plugin-istanbul "^6.1.1"
- babel-preset-jest "^29.5.0"
- chalk "^4.0.0"
- graceful-fs "^4.2.9"
- slash "^3.0.0"
+ dequal "^2.0.3"
+
+b4a@^1.6.4:
+ version "1.6.4"
+ resolved "https://registry.yarnpkg.com/b4a/-/b4a-1.6.4.tgz#ef1c1422cae5ce6535ec191baeed7567443f36c9"
+ integrity sha512-fpWrvyVHEKyeEvbKZTVOeZF3VSKKWtJxFIxX/jaVPf+cLbGUSitjb49pHLqPV2BUNNZ0LcoeEGfE/YCpyDYHIw==
babel-plugin-add-module-exports@^1.0.0:
version "1.0.4"
resolved "https://registry.yarnpkg.com/babel-plugin-add-module-exports/-/babel-plugin-add-module-exports-1.0.4.tgz#6caa4ddbe1f578c6a5264d4d3e6c8a2720a7ca2b"
integrity sha512-g+8yxHUZ60RcyaUpfNzy56OtWW+x9cyEe9j+CranqLiqbju2yf/Cy6ZtYK40EZxtrdHllzlVZgLmcOUCTlJ7Jg==
-babel-plugin-istanbul@^6.1.1:
- version "6.1.1"
- resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz#fa88ec59232fd9b4e36dbbc540a8ec9a9b47da73"
- integrity sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==
- dependencies:
- "@babel/helper-plugin-utils" "^7.0.0"
- "@istanbuljs/load-nyc-config" "^1.0.0"
- "@istanbuljs/schema" "^0.1.2"
- istanbul-lib-instrument "^5.0.4"
- test-exclude "^6.0.0"
-
-babel-plugin-jest-hoist@^29.5.0:
- version "29.5.0"
- resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.5.0.tgz#a97db437936f441ec196990c9738d4b88538618a"
- integrity sha512-zSuuuAlTMT4mzLj2nPnUm6fsE6270vdOfnpbJ+RmruU75UhLFvL0N2NgI7xpeS7NaB6hGqmd5pVpGTDYvi4Q3w==
- dependencies:
- "@babel/template" "^7.3.3"
- "@babel/types" "^7.3.3"
- "@types/babel__core" "^7.1.14"
- "@types/babel__traverse" "^7.0.6"
-
babel-plugin-polyfill-corejs2@^0.3.3:
version "0.3.3"
resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.3.tgz#5d1bd3836d0a19e1b84bbf2d9640ccb6f951c122"
@@ -3494,32 +3076,6 @@ babel-plugin-polyfill-regenerator@^0.4.1:
dependencies:
"@babel/helper-define-polyfill-provider" "^0.3.3"
-babel-preset-current-node-syntax@^1.0.0:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz#b4399239b89b2a011f9ddbe3e4f401fc40cff73b"
- integrity sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==
- dependencies:
- "@babel/plugin-syntax-async-generators" "^7.8.4"
- "@babel/plugin-syntax-bigint" "^7.8.3"
- "@babel/plugin-syntax-class-properties" "^7.8.3"
- "@babel/plugin-syntax-import-meta" "^7.8.3"
- "@babel/plugin-syntax-json-strings" "^7.8.3"
- "@babel/plugin-syntax-logical-assignment-operators" "^7.8.3"
- "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3"
- "@babel/plugin-syntax-numeric-separator" "^7.8.3"
- "@babel/plugin-syntax-object-rest-spread" "^7.8.3"
- "@babel/plugin-syntax-optional-catch-binding" "^7.8.3"
- "@babel/plugin-syntax-optional-chaining" "^7.8.3"
- "@babel/plugin-syntax-top-level-await" "^7.8.3"
-
-babel-preset-jest@^29.5.0:
- version "29.5.0"
- resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-29.5.0.tgz#57bc8cc88097af7ff6a5ab59d1cd29d52a5916e2"
- integrity sha512-JOMloxOqdiBSxMAzjRaH023/vvcaSaec49zvg+2LmNsktC7ei39LTJGw02J+9uUtTZUq6xbLyJ4dxe9sSmIuAg==
- dependencies:
- babel-plugin-jest-hoist "^29.5.0"
- babel-preset-current-node-syntax "^1.0.0"
-
balanced-match@^1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
@@ -3530,30 +3086,15 @@ base64-js@^1.1.2, base64-js@^1.3.0, base64-js@^1.3.1:
resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a"
integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==
-base@^0.11.1:
- version "0.11.2"
- resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f"
- integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==
- dependencies:
- cache-base "^1.0.1"
- class-utils "^0.3.5"
- component-emitter "^1.2.1"
- define-property "^1.0.0"
- isobject "^3.0.1"
- mixin-deep "^1.2.0"
- pascalcase "^0.1.1"
-
-bcrypt-pbkdf@^1.0.0:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e"
- integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=
- dependencies:
- tweetnacl "^0.14.3"
+basic-ftp@^5.0.2:
+ version "5.0.4"
+ resolved "https://registry.yarnpkg.com/basic-ftp/-/basic-ftp-5.0.4.tgz#28aeab7bfbbde5f5d0159cd8bb3b8e633bbb091d"
+ integrity sha512-8PzkB0arJFV4jJWSGOYR+OEic6aeKMu/osRhBULN6RY0ykby6LKhbmuQ5ublvaas5BOwboah5D87nrHyuh8PPA==
-before-after-hook@^2.0.0:
- version "2.2.1"
- resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.2.1.tgz#73540563558687586b52ed217dad6a802ab1549c"
- integrity sha512-/6FKxSTWoJdbsLDF8tdIjaRiFXiE6UHsEHE3OPI/cwPURCVi1ukP0gmLn7XWEiFk5TcwQjjY5PWsU+j+tgXgmw==
+before-after-hook@^2.2.0:
+ version "2.2.3"
+ resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.2.3.tgz#c51e809c81a4e354084422b9b26bad88249c517c"
+ integrity sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==
better-path-resolve@1.0.0:
version "1.0.0"
@@ -3562,12 +3103,19 @@ better-path-resolve@1.0.0:
dependencies:
is-windows "^1.0.0"
+bidi-js@^1.0.2, bidi-js@^1.0.3:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/bidi-js/-/bidi-js-1.0.3.tgz#6f8bcf3c877c4d9220ddf49b9bb6930c88f877d2"
+ integrity sha512-RKshQI1R3YQ+n9YJz2QQ147P66ELpa1FQEg20Dk8oW9t2KgLbpDLLp9aGZ7y8WHSshDknG0bknqGw5/tyCs5tw==
+ dependencies:
+ require-from-string "^2.0.2"
+
binary-extensions@^2.0.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d"
integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==
-bl@^4.0.3:
+bl@^4.0.3, bl@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a"
integrity sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==
@@ -3576,11 +3124,6 @@ bl@^4.0.3:
inherits "^2.0.4"
readable-stream "^3.4.0"
-bluebird@^3.5.1, bluebird@^3.5.3, bluebird@^3.5.5:
- version "3.7.2"
- resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f"
- integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==
-
brace-expansion@^1.1.7:
version "1.1.11"
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
@@ -3589,21 +3132,12 @@ brace-expansion@^1.1.7:
balanced-match "^1.0.0"
concat-map "0.0.1"
-braces@^2.3.1:
- version "2.3.2"
- resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729"
- integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==
+brace-expansion@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae"
+ integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==
dependencies:
- arr-flatten "^1.1.0"
- array-unique "^0.3.2"
- extend-shallow "^2.0.1"
- fill-range "^4.0.0"
- isobject "^3.0.1"
- repeat-element "^1.1.2"
- snapdragon "^0.8.1"
- snapdragon-node "^2.0.1"
- split-string "^3.0.2"
- to-regex "^3.0.1"
+ balanced-match "^1.0.0"
braces@^3.0.1, braces@~3.0.2:
version "3.0.2"
@@ -3633,27 +3167,15 @@ browserify-zlib@^0.2.0:
dependencies:
pako "~1.0.5"
-browserslist@^4.14.5, browserslist@^4.21.3, browserslist@^4.21.5:
- version "4.21.5"
- resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.5.tgz#75c5dae60063ee641f977e00edd3cfb2fb7af6a7"
- integrity sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w==
+browserslist@^4.14.5, browserslist@^4.21.5, browserslist@^4.22.2:
+ version "4.22.2"
+ resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.22.2.tgz#704c4943072bd81ea18997f3bd2180e89c77874b"
+ integrity sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A==
dependencies:
- caniuse-lite "^1.0.30001449"
- electron-to-chromium "^1.4.284"
- node-releases "^2.0.8"
- update-browserslist-db "^1.0.10"
-
-bser@2.1.1:
- version "2.1.1"
- resolved "https://registry.yarnpkg.com/bser/-/bser-2.1.1.tgz#e6787da20ece9d07998533cfd9de6f5c38f4bc05"
- integrity sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==
- dependencies:
- node-int64 "^0.4.0"
-
-btoa-lite@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/btoa-lite/-/btoa-lite-1.0.0.tgz#337766da15801210fdd956c22e9c6891ab9d0337"
- integrity sha1-M3dm2hWAEhD92VbCLpxokaudAzc=
+ caniuse-lite "^1.0.30001565"
+ electron-to-chromium "^1.4.601"
+ node-releases "^2.0.14"
+ update-browserslist-db "^1.0.13"
buffer-crc32@~0.2.3:
version "0.2.13"
@@ -3681,121 +3203,89 @@ buffer@^6.0.3:
base64-js "^1.3.1"
ieee754 "^1.2.1"
-builtin-modules@^3.1.0:
- version "3.2.0"
- resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.2.0.tgz#45d5db99e7ee5e6bc4f362e008bf917ab5049887"
- integrity sha512-lGzLKcioL90C7wMczpkY0n/oART3MbBa8R9OFGE1rJxoVI86u4WAGfEk8Wjv10eKSyTHVGkSo3bvBylCEtk7LA==
+builtin-modules@^3.3.0:
+ version "3.3.0"
+ resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.3.0.tgz#cae62812b89801e9656336e46223e030386be7b6"
+ integrity sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==
builtins@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/builtins/-/builtins-1.0.3.tgz#cb94faeb61c8696451db36534e1422f94f0aee88"
integrity sha1-y5T662HIaWRR2zZTThQi+U8K7og=
-byline@^5.0.0:
- version "5.0.0"
- resolved "https://registry.yarnpkg.com/byline/-/byline-5.0.0.tgz#741c5216468eadc457b03410118ad77de8c1ddb1"
- integrity sha1-dBxSFkaOrcRXsDQQEYrXfejB3bE=
-
-byte-size@^5.0.1:
+builtins@^5.0.0:
version "5.0.1"
- resolved "https://registry.yarnpkg.com/byte-size/-/byte-size-5.0.1.tgz#4b651039a5ecd96767e71a3d7ed380e48bed4191"
- integrity sha512-/XuKeqWocKsYa/cBY1YbSJSWWqTi4cFgr9S6OyM7PBaPbr9zvNGwWP33vt0uqGhwDdN+y3yhbXVILEUpnwEWGw==
+ resolved "https://registry.yarnpkg.com/builtins/-/builtins-5.0.1.tgz#87f6db9ab0458be728564fa81d876d8d74552fa9"
+ integrity sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==
+ dependencies:
+ semver "^7.0.0"
+
+byte-size@8.1.1:
+ version "8.1.1"
+ resolved "https://registry.yarnpkg.com/byte-size/-/byte-size-8.1.1.tgz#3424608c62d59de5bfda05d31e0313c6174842ae"
+ integrity sha512-tUkzZWK0M/qdoLEqikxBWe4kumyuwjl3HO6zHTr4yEI23EojPtLYXdG1+AQY7MN0cGyNDvEaJ8wiYQm6P2bPxg==
bytes-iec@^3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/bytes-iec/-/bytes-iec-3.1.1.tgz#94cd36bf95c2c22a82002c247df8772d1d591083"
integrity sha512-fey6+4jDK7TFtFg/klGSvNKJctyU7n2aQdnM+CO0ruLPbqqMOM8Tio0Pc+deqUeVKX1tL5DQep1zQ7+37aTAsA==
-cacache@^12.0.0, cacache@^12.0.3:
- version "12.0.4"
- resolved "https://registry.yarnpkg.com/cacache/-/cacache-12.0.4.tgz#668bcbd105aeb5f1d92fe25570ec9525c8faa40c"
- integrity sha512-a0tMB40oefvuInr4Cwb3GerbL9xTj1D5yg0T5xrjGCGyfvbxseIXX7BAO/u/hIXdafzOI5JC3wDwHyf24buOAQ==
- dependencies:
- bluebird "^3.5.5"
- chownr "^1.1.1"
- figgy-pudding "^3.5.1"
- glob "^7.1.4"
- graceful-fs "^4.1.15"
- infer-owner "^1.0.3"
- lru-cache "^5.1.1"
- mississippi "^3.0.0"
- mkdirp "^0.5.1"
- move-concurrently "^1.0.1"
- promise-inflight "^1.0.1"
- rimraf "^2.6.3"
- ssri "^6.0.1"
- unique-filename "^1.1.1"
- y18n "^4.0.0"
-
-cache-base@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2"
- integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==
- dependencies:
- collection-visit "^1.0.0"
- component-emitter "^1.2.1"
- get-value "^2.0.6"
- has-value "^1.0.0"
- isobject "^3.0.1"
- set-value "^2.0.0"
- to-object-path "^0.3.0"
- union-value "^1.0.0"
- unset-value "^1.0.0"
-
-call-bind@^1.0.0, call-bind@^1.0.2:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c"
- integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==
- dependencies:
- function-bind "^1.1.1"
- get-intrinsic "^1.0.2"
-
-call-me-maybe@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.1.tgz#26d208ea89e37b5cbde60250a15f031c16a4d66b"
- integrity sha1-JtII6onje1y95gJQoV8DHBak1ms=
-
-caller-callsite@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/caller-callsite/-/caller-callsite-2.0.0.tgz#847e0fce0a223750a9a027c54b33731ad3154134"
- integrity sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=
- dependencies:
- callsites "^2.0.0"
+cac@^6.7.14:
+ version "6.7.14"
+ resolved "https://registry.yarnpkg.com/cac/-/cac-6.7.14.tgz#804e1e6f506ee363cb0e3ccbb09cad5dd9870959"
+ integrity sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==
+
+cacache@^17.0.0:
+ version "17.1.4"
+ resolved "https://registry.yarnpkg.com/cacache/-/cacache-17.1.4.tgz#b3ff381580b47e85c6e64f801101508e26604b35"
+ integrity sha512-/aJwG2l3ZMJ1xNAnqbMpA40of9dj/pIH3QfiuQSqjfPJF747VR0J/bHn+/KdNnHKc6XQcWt/AfRSBft82W1d2A==
+ dependencies:
+ "@npmcli/fs" "^3.1.0"
+ fs-minipass "^3.0.0"
+ glob "^10.2.2"
+ lru-cache "^7.7.1"
+ minipass "^7.0.3"
+ minipass-collect "^1.0.2"
+ minipass-flush "^1.0.5"
+ minipass-pipeline "^1.2.4"
+ p-map "^4.0.0"
+ ssri "^10.0.0"
+ tar "^6.1.11"
+ unique-filename "^3.0.0"
+
+cacache@^18.0.0:
+ version "18.0.2"
+ resolved "https://registry.yarnpkg.com/cacache/-/cacache-18.0.2.tgz#fd527ea0f03a603be5c0da5805635f8eef00c60c"
+ integrity sha512-r3NU8h/P+4lVUHfeRw1dtgQYar3DZMm4/cm2bZgOvrFC/su7budSOeqh52VJIC4U4iG1WWwV6vRW0znqBvxNuw==
+ dependencies:
+ "@npmcli/fs" "^3.1.0"
+ fs-minipass "^3.0.0"
+ glob "^10.2.2"
+ lru-cache "^10.0.1"
+ minipass "^7.0.3"
+ minipass-collect "^2.0.1"
+ minipass-flush "^1.0.5"
+ minipass-pipeline "^1.2.4"
+ p-map "^4.0.0"
+ ssri "^10.0.0"
+ tar "^6.1.11"
+ unique-filename "^3.0.0"
-caller-path@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-2.0.0.tgz#468f83044e369ab2010fac5f06ceee15bb2cb1f4"
- integrity sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ=
+call-bind@^1.0.0, call-bind@^1.0.2, call-bind@^1.0.5, call-bind@^1.0.6:
+ version "1.0.6"
+ resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.6.tgz#6c46675fc7a5e9de82d75a233d586c8b7ac0d931"
+ integrity sha512-Mj50FLHtlsoVfRfnHaZvyrooHcrlceNZdL/QBvJJVd9Ta55qCQK0gs4ss2oZDeV9zFCs6ewzYgVE5yfVmfFpVg==
dependencies:
- caller-callsite "^2.0.0"
-
-callsites@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50"
- integrity sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=
+ es-errors "^1.3.0"
+ function-bind "^1.1.2"
+ get-intrinsic "^1.2.3"
+ set-function-length "^1.2.0"
callsites@^3.0.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73"
integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==
-camelcase-keys@^2.0.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7"
- integrity sha1-MIvur/3ygRkFHvodkyITyRuPkuc=
- dependencies:
- camelcase "^2.0.0"
- map-obj "^1.0.0"
-
-camelcase-keys@^4.0.0:
- version "4.2.0"
- resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-4.2.0.tgz#a2aa5fb1af688758259c32c141426d78923b9b77"
- integrity sha1-oqpfsa9oh1glnDLBQUJteJI7m3c=
- dependencies:
- camelcase "^4.1.0"
- map-obj "^2.0.0"
- quick-lru "^1.0.0"
-
camelcase-keys@^6.2.2:
version "6.2.2"
resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-6.2.2.tgz#5e755d6ba51aa223ec7d3d52f25778210f9dc3c0"
@@ -3805,46 +3295,47 @@ camelcase-keys@^6.2.2:
map-obj "^4.0.0"
quick-lru "^4.0.1"
-camelcase@^2.0.0:
- version "2.1.1"
- resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f"
- integrity sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=
-
-camelcase@^4.1.0:
- version "4.1.0"
- resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd"
- integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=
-
camelcase@^5.0.0, camelcase@^5.3.1:
version "5.3.1"
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320"
integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==
-camelcase@^6.2.0:
- version "6.2.0"
- resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.2.0.tgz#924af881c9d525ac9d87f40d964e5cea982a1809"
- integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==
-
-caniuse-lite@^1.0.30001449:
- version "1.0.30001456"
- resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001456.tgz#734ec1dbfa4f3abe6e435b78ecf40d68e8c32ce4"
- integrity sha512-XFHJY5dUgmpMV25UqaD4kVq2LsiaU5rS8fb0f17pCoXQiQslzmFgnfOxfvo1bTpTqf7dwG/N/05CnLCnOEKmzA==
+caniuse-lite@^1.0.30001565:
+ version "1.0.30001576"
+ resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001576.tgz#893be772cf8ee6056d6c1e2d07df365b9ec0a5c4"
+ integrity sha512-ff5BdakGe2P3SQsMsiqmt1Lc8221NR1VzHj5jXN5vBny9A6fpze94HiVV/n7XRosOlsShJcvMv5mdnpjOGCEgg==
-canvas@^2.10.2, canvas@^2.11.0:
- version "2.11.0"
- resolved "https://registry.yarnpkg.com/canvas/-/canvas-2.11.0.tgz#7f0c3e9ae94cf469269b5d3a7963a7f3a9936434"
- integrity sha512-bdTjFexjKJEwtIo0oRx8eD4G2yWoUOXP9lj279jmQ2zMnTQhT8C3512OKz3s+ZOaQlLbE7TuVvRDYDB3Llyy5g==
+canvas@^2.11.0, canvas@^2.11.2:
+ version "2.11.2"
+ resolved "https://registry.yarnpkg.com/canvas/-/canvas-2.11.2.tgz#553d87b1e0228c7ac0fc72887c3adbac4abbd860"
+ integrity sha512-ItanGBMrmRV7Py2Z+Xhs7cT+FNt5K0vPL4p9EZ/UX/Mu7hFbkxSjKF2KVtPwX7UYWp7dRKnrTvReflgrItJbdw==
dependencies:
"@mapbox/node-pre-gyp" "^1.0.0"
nan "^2.17.0"
simple-get "^3.0.3"
-caseless@~0.12.0:
- version "0.12.0"
- resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc"
- integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=
+chai@^4.3.10:
+ version "4.4.1"
+ resolved "https://registry.yarnpkg.com/chai/-/chai-4.4.1.tgz#3603fa6eba35425b0f2ac91a009fe924106e50d1"
+ integrity sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==
+ dependencies:
+ assertion-error "^1.1.0"
+ check-error "^1.0.3"
+ deep-eql "^4.1.3"
+ get-func-name "^2.0.2"
+ loupe "^2.3.6"
+ pathval "^1.1.1"
+ type-detect "^4.0.8"
+
+chalk@4.1.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a"
+ integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==
+ dependencies:
+ ansi-styles "^4.1.0"
+ supports-color "^7.1.0"
-chalk@^2.0.0, chalk@^2.1.0, chalk@^2.3.1, chalk@^2.4.2:
+chalk@^2.1.0, chalk@^2.4.2:
version "2.4.2"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424"
integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==
@@ -3853,7 +3344,7 @@ chalk@^2.0.0, chalk@^2.1.0, chalk@^2.3.1, chalk@^2.4.2:
escape-string-regexp "^1.0.5"
supports-color "^5.3.0"
-chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.2:
+chalk@^4.0.0, chalk@^4.0.2, chalk@^4.1.0, chalk@^4.1.1, chalk@^4.1.2:
version "4.1.2"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01"
integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==
@@ -3861,20 +3352,22 @@ chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.2:
ansi-styles "^4.1.0"
supports-color "^7.1.0"
-char-regex@^1.0.2:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf"
- integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==
-
chardet@^0.7.0:
version "0.7.0"
resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e"
integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==
-chokidar@^3.4.0, chokidar@^3.5.2:
- version "3.5.2"
- resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.2.tgz#dba3976fcadb016f66fd365021d91600d01c1e75"
- integrity sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==
+check-error@^1.0.3:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.3.tgz#a6502e4312a7ee969f646e83bb3ddd56281bd694"
+ integrity sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==
+ dependencies:
+ get-func-name "^2.0.2"
+
+chokidar@^3.4.0, chokidar@^3.5.3:
+ version "3.5.3"
+ resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd"
+ integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==
dependencies:
anymatch "~3.1.2"
braces "~3.0.2"
@@ -3886,11 +3379,6 @@ chokidar@^3.4.0, chokidar@^3.5.2:
optionalDependencies:
fsevents "~2.3.2"
-chownr@^1.1.1, chownr@^1.1.2:
- version "1.1.4"
- resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b"
- integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==
-
chownr@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece"
@@ -3901,55 +3389,41 @@ chrome-trace-event@^1.0.2:
resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz#1015eced4741e15d06664a957dbbf50d041e26ac"
integrity sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==
-ci-info@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46"
- integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==
-
-ci-info@^3.1.0, ci-info@^3.2.0:
- version "3.7.1"
- resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.7.1.tgz#708a6cdae38915d597afdf3b145f2f8e1ff55f3f"
- integrity sha512-4jYS4MOAaCIStSRwiuxc4B8MYhIe676yO1sYGzARnjXkWpmzZMMYxY6zu8WYWDhSuth5zhrQ1rhNSibyyvv4/w==
-
-ci-job-number@^1.2.2:
- version "1.2.2"
- resolved "https://registry.yarnpkg.com/ci-job-number/-/ci-job-number-1.2.2.tgz#f4e5918fcaeeda95b604f214be7d7d4a961fe0c0"
- integrity sha512-CLOGsVDrVamzv8sXJGaILUVI6dsuAkouJP/n6t+OxLPeeA4DDby7zn9SB6EUpa1H7oIKoE+rMmkW80zYsFfUjA==
-
-cjs-module-lexer@^1.0.0:
- version "1.2.2"
- resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz#9f84ba3244a512f3a54e5277e8eef4c489864e40"
- integrity sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==
-
-class-utils@^0.3.5:
- version "0.3.6"
- resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463"
- integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==
- dependencies:
- arr-union "^3.1.0"
- define-property "^0.2.5"
- isobject "^3.0.0"
- static-extend "^0.1.1"
+chromium-bidi@0.5.1:
+ version "0.5.1"
+ resolved "https://registry.yarnpkg.com/chromium-bidi/-/chromium-bidi-0.5.1.tgz#390c1af350c4887824a33d82190de1cc5c5680fc"
+ integrity sha512-dcCqOgq9fHKExc2R4JZs/oKbOghWpUNFAJODS8WKRtLhp3avtIH5UDCBrutdqZdh3pARogH8y1ObXm87emwb3g==
+ dependencies:
+ mitt "3.0.1"
+ urlpattern-polyfill "9.0.0"
+
+ci-info@^3.1.0, ci-info@^3.2.0, ci-info@^3.6.1:
+ version "3.9.0"
+ resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.9.0.tgz#4279a62028a7b1f262f3473fc9605f5e218c59b4"
+ integrity sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==
clean-stack@^2.0.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b"
integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==
-cli-cursor@^2.1.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5"
- integrity sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=
- dependencies:
- restore-cursor "^2.0.0"
-
-cli-cursor@^3.1.0:
+cli-cursor@3.1.0, cli-cursor@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307"
integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==
dependencies:
restore-cursor "^3.1.0"
+cli-spinners@2.6.1:
+ version "2.6.1"
+ resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.6.1.tgz#adc954ebe281c37a6319bfa401e6dd2488ffb70d"
+ integrity sha512-x/5fWmGMnbKQAaNwN+UZlV79qBLM9JFnJuJ03gIi5whrob0xV0ofNVHy9DhwGdsMJQc2OKv0oGmLzvaqvAVv+g==
+
+cli-spinners@^2.5.0:
+ version "2.9.2"
+ resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.9.2.tgz#1773a8f4b9c4d6ac31563df53b3fc1d79462fe41"
+ integrity sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==
+
cli-truncate@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-2.1.0.tgz#c39e28bf05edcde5be3b98992a22deed5a2b93c7"
@@ -3958,25 +3432,11 @@ cli-truncate@^2.1.0:
slice-ansi "^3.0.0"
string-width "^4.2.0"
-cli-width@^2.0.0:
- version "2.2.1"
- resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.1.tgz#b0433d0b4e9c847ef18868a4ef16fd5fc8271c48"
- integrity sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==
-
cli-width@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-3.0.0.tgz#a2f48437a2caa9a22436e794bf071ec9e61cedf6"
integrity sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==
-cliui@^5.0.0:
- version "5.0.0"
- resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5"
- integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==
- dependencies:
- string-width "^3.1.0"
- strip-ansi "^5.2.0"
- wrap-ansi "^5.1.0"
-
cliui@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/cliui/-/cliui-6.0.0.tgz#511d702c0c4e41ca156d7d0e96021f23e13225b1"
@@ -3986,6 +3446,15 @@ cliui@^6.0.0:
strip-ansi "^6.0.0"
wrap-ansi "^6.2.0"
+cliui@^7.0.2:
+ version "7.0.4"
+ resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f"
+ integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==
+ dependencies:
+ string-width "^4.2.0"
+ strip-ansi "^6.0.0"
+ wrap-ansi "^7.0.0"
+
cliui@^8.0.1:
version "8.0.1"
resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa"
@@ -3995,7 +3464,7 @@ cliui@^8.0.1:
strip-ansi "^6.0.1"
wrap-ansi "^7.0.0"
-clone-deep@^4.0.1:
+clone-deep@4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-4.0.1.tgz#c19fd9bdbbf85942b4fd979c84dcf7d5f07c2387"
integrity sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==
@@ -4014,29 +3483,16 @@ clone@^2.1.2:
resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f"
integrity sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==
-co@^4.6.0:
- version "4.6.0"
- resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184"
- integrity sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=
+cmd-shim@6.0.1:
+ version "6.0.1"
+ resolved "https://registry.yarnpkg.com/cmd-shim/-/cmd-shim-6.0.1.tgz#a65878080548e1dca760b3aea1e21ed05194da9d"
+ integrity sha512-S9iI9y0nKR4hwEQsVWpyxld/6kRfGepGfzff83FcaiEBpmvlbA2nnGe7Cylgrx2f/p1P5S5wpRm9oL8z1PbS3Q==
code-point-at@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"
integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=
-collect-v8-coverage@^1.0.0:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz#cc2c8e94fc18bbdffe64d6534570c8a673b27f59"
- integrity sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg==
-
-collection-visit@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0"
- integrity sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=
- dependencies:
- map-visit "^1.0.0"
- object-visit "^1.0.0"
-
color-convert@^1.9.0:
version "1.9.3"
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8"
@@ -4061,34 +3517,49 @@ color-name@^1.0.0, color-name@~1.1.4:
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
-color-string@^1.5.3:
- version "1.5.5"
- resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.5.5.tgz#65474a8f0e7439625f3d27a6a19d89fc45223014"
- integrity sha512-jgIoum0OfQfq9Whcfc2z/VhCNcmQjWbey6qBX0vqt7YICflUmBCh9E9CiQD5GSJ+Uehixm3NUwHVhqUAWRivZg==
+color-string@^1.9.1:
+ version "1.9.1"
+ resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.9.1.tgz#4467f9146f036f855b764dfb5bf8582bf342c7a4"
+ integrity sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==
dependencies:
color-name "^1.0.0"
simple-swizzle "^0.2.2"
+color-support@^1.1.3:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2"
+ integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==
+
+colorette@^1.1.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.4.0.tgz#5190fbb87276259a86ad700bff2c6d6faa3fca40"
+ integrity sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==
+
colorette@^2.0.16:
version "2.0.16"
resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.16.tgz#713b9af84fdb000139f04546bd4a93f62a5085da"
integrity sha512-hUewv7oMjCp+wkBv5Rm0v87eJhq4woh5rSR+42YSQJKecCqgIqNkZ6lAlQms/BwHPJA5NKMRlpxPRv0n8HQW6g==
-columnify@^1.5.4:
- version "1.5.4"
- resolved "https://registry.yarnpkg.com/columnify/-/columnify-1.5.4.tgz#4737ddf1c7b69a8a7c340570782e947eec8e78bb"
- integrity sha1-Rzfd8ce2mop8NAVweC6UfuyOeLs=
+columnify@1.6.0:
+ version "1.6.0"
+ resolved "https://registry.yarnpkg.com/columnify/-/columnify-1.6.0.tgz#6989531713c9008bb29735e61e37acf5bd553cf3"
+ integrity sha512-lomjuFZKfM6MSAnV9aCZC9sc0qGbmZdfygNv+nCpqVkSKdCxCklLtd16O0EILGkImHw9ZpHkAnHaB+8Zxq5W6Q==
dependencies:
- strip-ansi "^3.0.0"
+ strip-ansi "^6.0.1"
wcwidth "^1.0.0"
-combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6:
+combined-stream@^1.0.8:
version "1.0.8"
resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f"
integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==
dependencies:
delayed-stream "~1.0.0"
+commander@^11.1.0:
+ version "11.1.0"
+ resolved "https://registry.yarnpkg.com/commander/-/commander-11.1.0.tgz#62fdce76006a68e5c1ab3314dc92e800eb83d906"
+ integrity sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==
+
commander@^2.20.0:
version "2.20.3"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33"
@@ -4104,11 +3575,6 @@ commander@^6.2.0:
resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c"
integrity sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==
-commander@^8.3.0:
- version "8.3.0"
- resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66"
- integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==
-
commondir@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b"
@@ -4122,26 +3588,11 @@ compare-func@^2.0.0:
array-ify "^1.0.0"
dot-prop "^5.1.0"
-component-emitter@^1.2.1:
- version "1.3.0"
- resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0"
- integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==
-
concat-map@0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=
-concat-stream@^1.5.0:
- version "1.6.2"
- resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34"
- integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==
- dependencies:
- buffer-from "^1.0.0"
- inherits "^2.0.3"
- readable-stream "^2.2.2"
- typedarray "^0.0.6"
-
concat-stream@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-2.0.0.tgz#414cf5af790a48c60ab9be4527d56d5e41133cb1"
@@ -4152,113 +3603,90 @@ concat-stream@^2.0.0:
readable-stream "^3.0.2"
typedarray "^0.0.6"
-config-chain@^1.1.11:
- version "1.1.12"
- resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.12.tgz#0fde8d091200eb5e808caf25fe618c02f48e4efa"
- integrity sha512-a1eOIcu8+7lUInge4Rpf/n4Krkf3Dd9lqhljRzII1/Zno/kRtUWnznPO3jOKBmTEktkt3fkxisUcivoj0ebzoA==
- dependencies:
- ini "^1.3.4"
- proto-list "~1.2.1"
-
confusing-browser-globals@^1.0.10:
version "1.0.10"
resolved "https://registry.yarnpkg.com/confusing-browser-globals/-/confusing-browser-globals-1.0.10.tgz#30d1e7f3d1b882b25ec4933d1d1adac353d20a59"
integrity sha512-gNld/3lySHwuhaVluJUKLePYirM3QNCKzVxqAdhJII9/WXKVX5PURzMVJspS1jTslSqjeuG4KMVTSouit5YPHA==
-console-control-strings@^1.0.0, console-control-strings@~1.1.0:
+console-control-strings@^1.0.0, console-control-strings@^1.1.0, console-control-strings@~1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e"
integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=
-contains-path@^0.1.0:
- version "0.1.0"
- resolved "https://registry.yarnpkg.com/contains-path/-/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a"
- integrity sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=
-
-conventional-changelog-angular@^5.0.3:
- version "5.0.12"
- resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.12.tgz#c979b8b921cbfe26402eb3da5bbfda02d865a2b9"
- integrity sha512-5GLsbnkR/7A89RyHLvvoExbiGbd9xKdKqDTrArnPbOqBqG/2wIosu0fHwpeIRI8Tl94MhVNBXcLJZl92ZQ5USw==
+conventional-changelog-angular@7.0.0:
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-7.0.0.tgz#5eec8edbff15aa9b1680a8dcfbd53e2d7eb2ba7a"
+ integrity sha512-ROjNchA9LgfNMTTFSIWPzebCwOGFdgkEq45EnvvrmSLvCtAw0HSmrCs7/ty+wAeYUZyNay0YMUNYFTRL72PkBQ==
dependencies:
compare-func "^2.0.0"
- q "^1.5.1"
-conventional-changelog-core@^3.1.6:
- version "3.2.3"
- resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-3.2.3.tgz#b31410856f431c847086a7dcb4d2ca184a7d88fb"
- integrity sha512-LMMX1JlxPIq/Ez5aYAYS5CpuwbOk6QFp8O4HLAcZxe3vxoCtABkhfjetk8IYdRB9CDQGwJFLR3Dr55Za6XKgUQ==
- dependencies:
- conventional-changelog-writer "^4.0.6"
- conventional-commits-parser "^3.0.3"
- dateformat "^3.0.0"
- get-pkg-repo "^1.0.0"
- git-raw-commits "2.0.0"
+conventional-changelog-core@5.0.1:
+ version "5.0.1"
+ resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-5.0.1.tgz#3c331b155d5b9850f47b4760aeddfc983a92ad49"
+ integrity sha512-Rvi5pH+LvgsqGwZPZ3Cq/tz4ty7mjijhr3qR4m9IBXNbxGGYgTVVO+duXzz9aArmHxFtwZ+LRkrNIMDQzgoY4A==
+ dependencies:
+ add-stream "^1.0.0"
+ conventional-changelog-writer "^6.0.0"
+ conventional-commits-parser "^4.0.0"
+ dateformat "^3.0.3"
+ get-pkg-repo "^4.2.1"
+ git-raw-commits "^3.0.0"
git-remote-origin-url "^2.0.0"
- git-semver-tags "^2.0.3"
- lodash "^4.2.1"
- normalize-package-data "^2.3.5"
- q "^1.5.1"
+ git-semver-tags "^5.0.0"
+ normalize-package-data "^3.0.3"
read-pkg "^3.0.0"
read-pkg-up "^3.0.0"
- through2 "^3.0.0"
-conventional-changelog-preset-loader@^2.1.1:
- version "2.3.4"
- resolved "https://registry.yarnpkg.com/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-2.3.4.tgz#14a855abbffd59027fd602581f1f34d9862ea44c"
- integrity sha512-GEKRWkrSAZeTq5+YjUZOYxdHq+ci4dNwHvpaBC3+ENalzFWuCWa9EZXSuZBpkr72sMdKB+1fyDV4takK1Lf58g==
+conventional-changelog-preset-loader@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-3.0.0.tgz#14975ef759d22515d6eabae6396c2ae721d4c105"
+ integrity sha512-qy9XbdSLmVnwnvzEisjxdDiLA4OmV3o8db+Zdg4WiFw14fP3B6XNz98X0swPPpkTd/pc1K7+adKgEDM1JCUMiA==
-conventional-changelog-writer@^4.0.6:
- version "4.1.0"
- resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-4.1.0.tgz#1ca7880b75aa28695ad33312a1f2366f4b12659f"
- integrity sha512-WwKcUp7WyXYGQmkLsX4QmU42AZ1lqlvRW9mqoyiQzdD+rJWbTepdWoKJuwXTS+yq79XKnQNa93/roViPQrAQgw==
+conventional-changelog-writer@^6.0.0:
+ version "6.0.1"
+ resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-6.0.1.tgz#d8d3bb5e1f6230caed969dcc762b1c368a8f7b01"
+ integrity sha512-359t9aHorPw+U+nHzUXHS5ZnPBOizRxfQsWT5ZDHBfvfxQOAik+yfuhKXG66CN5LEWPpMNnIMHUTCKeYNprvHQ==
dependencies:
- compare-func "^2.0.0"
- conventional-commits-filter "^2.0.7"
- dateformat "^3.0.0"
- handlebars "^4.7.6"
+ conventional-commits-filter "^3.0.0"
+ dateformat "^3.0.3"
+ handlebars "^4.7.7"
json-stringify-safe "^5.0.1"
- lodash "^4.17.15"
- meow "^8.0.0"
- semver "^6.0.0"
- split "^1.0.0"
- through2 "^4.0.0"
+ meow "^8.1.2"
+ semver "^7.0.0"
+ split "^1.0.1"
-conventional-commits-filter@^2.0.2, conventional-commits-filter@^2.0.7:
- version "2.0.7"
- resolved "https://registry.yarnpkg.com/conventional-commits-filter/-/conventional-commits-filter-2.0.7.tgz#f8d9b4f182fce00c9af7139da49365b136c8a0b3"
- integrity sha512-ASS9SamOP4TbCClsRHxIHXRfcGCnIoQqkvAzCSbZzTFLfcTqJVugB0agRgsEELsqaeWgsXv513eS116wnlSSPA==
+conventional-commits-filter@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/conventional-commits-filter/-/conventional-commits-filter-3.0.0.tgz#bf1113266151dd64c49cd269e3eb7d71d7015ee2"
+ integrity sha512-1ymej8b5LouPx9Ox0Dw/qAO2dVdfpRFq28e5Y0jJEU8ZrLdy0vOSkkIInwmxErFGhg6SALro60ZrwYFVTUDo4Q==
dependencies:
lodash.ismatch "^4.4.0"
- modify-values "^1.0.0"
+ modify-values "^1.0.1"
-conventional-commits-parser@^3.0.3:
- version "3.2.1"
- resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-3.2.1.tgz#ba44f0b3b6588da2ee9fd8da508ebff50d116ce2"
- integrity sha512-OG9kQtmMZBJD/32NEw5IhN5+HnBqVjy03eC+I71I0oQRFA5rOgA4OtPOYG7mz1GkCfCNxn3gKIX8EiHJYuf1cA==
+conventional-commits-parser@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-4.0.0.tgz#02ae1178a381304839bce7cea9da5f1b549ae505"
+ integrity sha512-WRv5j1FsVM5FISJkoYMR6tPk07fkKT0UodruX4je86V4owk451yjXAKzKAPOs9l7y59E2viHUS9eQ+dfUA9NSg==
dependencies:
- JSONStream "^1.0.4"
+ JSONStream "^1.3.5"
is-text-path "^1.0.1"
- lodash "^4.17.15"
- meow "^8.0.0"
- split2 "^3.0.0"
- through2 "^4.0.0"
- trim-off-newlines "^1.0.0"
+ meow "^8.1.2"
+ split2 "^3.2.2"
-conventional-recommended-bump@^5.0.0:
- version "5.0.1"
- resolved "https://registry.yarnpkg.com/conventional-recommended-bump/-/conventional-recommended-bump-5.0.1.tgz#5af63903947b6e089e77767601cb592cabb106ba"
- integrity sha512-RVdt0elRcCxL90IrNP0fYCpq1uGt2MALko0eyeQ+zQuDVWtMGAy9ng6yYn3kax42lCj9+XBxQ8ZN6S9bdKxDhQ==
+conventional-recommended-bump@7.0.1:
+ version "7.0.1"
+ resolved "https://registry.yarnpkg.com/conventional-recommended-bump/-/conventional-recommended-bump-7.0.1.tgz#ec01f6c7f5d0e2491c2d89488b0d757393392424"
+ integrity sha512-Ft79FF4SlOFvX4PkwFDRnaNiIVX7YbmqGU0RwccUaiGvgp3S0a8ipR2/Qxk31vclDNM+GSdJOVs2KrsUCjblVA==
dependencies:
concat-stream "^2.0.0"
- conventional-changelog-preset-loader "^2.1.1"
- conventional-commits-filter "^2.0.2"
- conventional-commits-parser "^3.0.3"
- git-raw-commits "2.0.0"
- git-semver-tags "^2.0.3"
- meow "^4.0.0"
- q "^1.5.1"
-
-convert-source-map@^1.1.0, convert-source-map@^1.6.0, convert-source-map@^1.7.0:
+ conventional-changelog-preset-loader "^3.0.0"
+ conventional-commits-filter "^3.0.0"
+ conventional-commits-parser "^4.0.0"
+ git-raw-commits "^3.0.0"
+ git-semver-tags "^5.0.0"
+ meow "^8.1.2"
+
+convert-source-map@^1.1.0:
version "1.9.0"
resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.9.0.tgz#7faae62353fb4213366d0ca98358d22e8368b05f"
integrity sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==
@@ -4268,23 +3696,6 @@ convert-source-map@^2.0.0:
resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a"
integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==
-copy-concurrently@^1.0.0:
- version "1.0.5"
- resolved "https://registry.yarnpkg.com/copy-concurrently/-/copy-concurrently-1.0.5.tgz#92297398cae34937fcafd6ec8139c18051f0b5e0"
- integrity sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==
- dependencies:
- aproba "^1.1.1"
- fs-write-stream-atomic "^1.0.8"
- iferr "^0.1.5"
- mkdirp "^0.5.1"
- rimraf "^2.5.4"
- run-queue "^1.0.0"
-
-copy-descriptor@^0.1.0:
- version "0.1.1"
- resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d"
- integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=
-
core-js-compat@^3.25.1:
version "3.28.0"
resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.28.0.tgz#c08456d854608a7264530a2afa281fadf20ecee6"
@@ -4292,31 +3703,11 @@ core-js-compat@^3.25.1:
dependencies:
browserslist "^4.21.5"
-core-js-pure@^3.0.0:
- version "3.10.0"
- resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.10.0.tgz#dab9d6b141779b622b40567e7a536d2276646c15"
- integrity sha512-CC582enhrFZStO4F8lGI7QL3SYx7/AIRc+IdSi3btrQGrVsTawo5K/crmKbRrQ+MOMhNX4v+PATn0k2NN6wI7A==
-
-core-js@^3.26.0:
- version "3.28.0"
- resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.28.0.tgz#ed8b9e99c273879fdfff0edfc77ee709a5800e4a"
- integrity sha512-GiZn9D4Z/rSYvTeg1ljAIsEqFm0LaN9gVtwDCrKL80zHtS31p9BAjmTxVqTQDMpwlMolJZOFntUG2uwyj7DAqw==
-
-core-util-is@1.0.2, core-util-is@~1.0.0:
+core-util-is@~1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=
-cosmiconfig@^5.1.0:
- version "5.2.1"
- resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.2.1.tgz#040f726809c591e77a17c0a3626ca45b4f168b1a"
- integrity sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==
- dependencies:
- import-fresh "^2.0.0"
- is-directory "^0.3.1"
- js-yaml "^3.13.1"
- parse-json "^4.0.0"
-
cosmiconfig@^7.0.0:
version "7.0.1"
resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.0.1.tgz#714d756522cace867867ccb4474c5d01bbae5d6d"
@@ -4328,20 +3719,29 @@ cosmiconfig@^7.0.0:
path-type "^4.0.0"
yaml "^1.10.0"
-cross-fetch@^2.2.2:
- version "2.2.3"
- resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-2.2.3.tgz#e8a0b3c54598136e037f8650f8e823ccdfac198e"
- integrity sha512-PrWWNH3yL2NYIb/7WF/5vFG3DCQiXDOVf8k3ijatbrtnwNuhMWLC7YF7uqf53tbTFDzHIUD8oITw4Bxt8ST3Nw==
+cosmiconfig@^8.2.0:
+ version "8.3.6"
+ resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-8.3.6.tgz#060a2b871d66dba6c8538ea1118ba1ac16f5fae3"
+ integrity sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==
+ dependencies:
+ import-fresh "^3.3.0"
+ js-yaml "^4.1.0"
+ parse-json "^5.2.0"
+ path-type "^4.0.0"
+
+cross-fetch@4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-4.0.0.tgz#f037aef1580bb3a1a35164ea2a848ba81b445983"
+ integrity sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==
dependencies:
- node-fetch "2.1.2"
- whatwg-fetch "2.0.4"
+ node-fetch "^2.6.12"
-cross-fetch@^3.1.5:
- version "3.1.5"
- resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.5.tgz#e1389f44d9e7ba767907f7af8454787952ab534f"
- integrity sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==
+cross-fetch@^3.0.6, cross-fetch@^3.1.5:
+ version "3.1.8"
+ resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.8.tgz#0327eba65fd68a7d119f8fb2bf9334a1a7956f82"
+ integrity sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==
dependencies:
- node-fetch "2.6.7"
+ node-fetch "^2.6.12"
cross-spawn@^5.1.0:
version "5.1.0"
@@ -4352,18 +3752,7 @@ cross-spawn@^5.1.0:
shebang-command "^1.2.0"
which "^1.2.9"
-cross-spawn@^6.0.0, cross-spawn@^6.0.5:
- version "6.0.5"
- resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4"
- integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==
- dependencies:
- nice-try "^1.0.4"
- path-key "^2.0.1"
- semver "^5.5.0"
- shebang-command "^1.2.0"
- which "^1.2.9"
-
-cross-spawn@^7.0.0, cross-spawn@^7.0.3:
+cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3:
version "7.0.3"
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6"
integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==
@@ -4372,27 +3761,25 @@ cross-spawn@^7.0.0, cross-spawn@^7.0.3:
shebang-command "^2.0.0"
which "^2.0.1"
-crypto-js@^4.0.0:
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/crypto-js/-/crypto-js-4.0.0.tgz#2904ab2677a9d042856a2ea2ef80de92e4a36dcc"
- integrity sha512-bzHZN8Pn+gS7DQA6n+iUmBfl0hO5DJq++QP3U6uTucDtk/0iGpXd/Gg7CGR0p8tJhofJyaKoWBuJI4eAO00BBg==
-
-cssom@^0.5.0:
- version "0.5.0"
- resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.5.0.tgz#d254fa92cd8b6fbd83811b9fbaed34663cc17c36"
- integrity sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw==
+crypto-js@^4.2.0:
+ version "4.2.0"
+ resolved "https://registry.yarnpkg.com/crypto-js/-/crypto-js-4.2.0.tgz#4d931639ecdfd12ff80e8186dba6af2c2e856631"
+ integrity sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==
-cssom@~0.3.6:
- version "0.3.8"
- resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.8.tgz#9f1276f5b2b463f2114d3f2c75250af8c1a36f4a"
- integrity sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==
+css-tree@^2.3.1:
+ version "2.3.1"
+ resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-2.3.1.tgz#10264ce1e5442e8572fc82fbe490644ff54b5c20"
+ integrity sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==
+ dependencies:
+ mdn-data "2.0.30"
+ source-map-js "^1.0.1"
-cssstyle@^2.3.0:
- version "2.3.0"
- resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-2.3.0.tgz#ff665a0ddbdc31864b09647f34163443d90b0852"
- integrity sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==
+cssstyle@^4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-4.0.1.tgz#ef29c598a1e90125c870525490ea4f354db0660a"
+ integrity sha512-8ZYiJ3A/3OkDd093CBT/0UKDWry7ak4BdPTFP2+QEP7cmhouyq/Up709ASSj2cK02BbZiMgk7kYjZNS4QP5qrQ==
dependencies:
- cssom "~0.3.6"
+ rrweb-cssom "^0.6.0"
csstype@^3.0.2:
version "3.1.2"
@@ -4424,97 +3811,54 @@ csv@^5.5.0:
csv-stringify "^5.6.5"
stream-transform "^2.1.3"
-currently-unhandled@^0.4.1:
- version "0.4.1"
- resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea"
- integrity sha1-mI3zP+qxke95mmE2nddsF635V+o=
- dependencies:
- array-find-index "^1.0.1"
-
-cyclist@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-1.0.1.tgz#596e9698fd0c80e12038c2b82d6eb1b35b6224d9"
- integrity sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk=
-
-damerau-levenshtein@^1.0.6:
- version "1.0.6"
- resolved "https://registry.yarnpkg.com/damerau-levenshtein/-/damerau-levenshtein-1.0.6.tgz#143c1641cb3d85c60c32329e26899adea8701791"
- integrity sha512-JVrozIeElnj3QzfUIt8tB8YMluBJom4Vw9qTPpjGYQ9fYlB3D/rb6OordUxf3xeFB35LKWs0xqcO5U6ySvBtug==
+damerau-levenshtein@^1.0.8:
+ version "1.0.8"
+ resolved "https://registry.yarnpkg.com/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz#b43d286ccbd36bc5b2f7ed41caf2d0aba1f8a6e7"
+ integrity sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==
-dargs@^4.0.1:
- version "4.1.0"
- resolved "https://registry.yarnpkg.com/dargs/-/dargs-4.1.0.tgz#03a9dbb4b5c2f139bf14ae53f0b8a2a6a86f4e17"
- integrity sha1-A6nbtLXC8Tm/FK5T8LiipqhvThc=
- dependencies:
- number-is-nan "^1.0.0"
+dargs@^7.0.0:
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/dargs/-/dargs-7.0.0.tgz#04015c41de0bcb69ec84050f3d9be0caf8d6d5cc"
+ integrity sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg==
-dashdash@^1.12.0:
- version "1.14.1"
- resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0"
- integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=
- dependencies:
- assert-plus "^1.0.0"
+data-uri-to-buffer@^6.0.0:
+ version "6.0.1"
+ resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-6.0.1.tgz#540bd4c8753a25ee129035aebdedf63b078703c7"
+ integrity sha512-MZd3VlchQkp8rdend6vrx7MmVDJzSNTBvghvKjirLkD+WTChA3KUf0jkE68Q4UyctNqI11zZO9/x2Yx+ub5Cvg==
-data-urls@^3.0.2:
- version "3.0.2"
- resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-3.0.2.tgz#9cf24a477ae22bcef5cd5f6f0bfbc1d2d3be9143"
- integrity sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ==
+data-urls@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-5.0.0.tgz#2f76906bce1824429ffecb6920f45a0b30f00dde"
+ integrity sha512-ZYP5VBHshaDAiVZxjbRVcFJpc+4xGgT0bK3vzy1HLN8jTO975HEbuYzZJcHoQEY5K1a0z8YayJkyVETa08eNTg==
dependencies:
- abab "^2.0.6"
- whatwg-mimetype "^3.0.0"
- whatwg-url "^11.0.0"
+ whatwg-mimetype "^4.0.0"
+ whatwg-url "^14.0.0"
dataloader@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/dataloader/-/dataloader-1.4.0.tgz#bca11d867f5d3f1b9ed9f737bd15970c65dff5c8"
integrity sha512-68s5jYdlvasItOJnCuI2Q9s4q98g0pCyL3HrcKJu8KNugUl8ahgmZYg38ysLTgQjjXX3H8CJLkAvWrclWfcalw==
-dateformat@^3.0.0:
+dateformat@^3.0.3:
version "3.0.3"
resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae"
integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==
-debug@3.1.0:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"
- integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==
- dependencies:
- ms "2.0.0"
-
-debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.2.0:
- version "4.3.3"
- resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.3.tgz#04266e0b70a98d4462e6e288e38259213332b664"
- integrity sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==
+debug@4, debug@4.3.4, debug@^4.1.0, debug@^4.1.1, debug@^4.2.0, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4:
+ version "4.3.4"
+ resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865"
+ integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==
dependencies:
ms "2.1.2"
-debug@4.3.2:
- version "4.3.2"
- resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b"
- integrity sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==
- dependencies:
- ms "2.1.2"
-
-debug@^2.2.0, debug@^2.3.3, debug@^2.6.9:
- version "2.6.9"
- resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
- integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==
- dependencies:
- ms "2.0.0"
-
-debug@^3.1.0:
+debug@^3.2.7:
version "3.2.7"
resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a"
integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==
dependencies:
ms "^2.1.1"
-debuglog@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492"
- integrity sha1-qiT/uaw9+aI1GDfPstJ5NgzXhJI=
-
-decamelize-keys@^1.0.0, decamelize-keys@^1.1.0:
+decamelize-keys@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/decamelize-keys/-/decamelize-keys-1.1.0.tgz#d171a87933252807eb3cb61dc1c1445d078df2d9"
integrity sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk=
@@ -4522,21 +3866,16 @@ decamelize-keys@^1.0.0, decamelize-keys@^1.1.0:
decamelize "^1.1.0"
map-obj "^1.0.0"
-decamelize@^1.1.0, decamelize@^1.1.2, decamelize@^1.2.0:
+decamelize@^1.1.0, decamelize@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=
-decimal.js@^10.4.2:
+decimal.js@^10.4.3:
version "10.4.3"
resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.4.3.tgz#1044092884d245d1b7f65725fa4ad4c6f781cc23"
integrity sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==
-decode-uri-component@^0.2.0:
- version "0.2.0"
- resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545"
- integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=
-
decompress-response@^4.2.0:
version "4.2.1"
resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-4.2.1.tgz#414023cc7a302da25ce2ec82d0d5238ccafd8986"
@@ -4544,39 +3883,22 @@ decompress-response@^4.2.0:
dependencies:
mimic-response "^2.0.0"
-dedent@^0.7.0:
+dedent@0.7.0, dedent@^0.7.0:
version "0.7.0"
resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c"
integrity sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=
-deep-equal@^2.0.5:
- version "2.2.1"
- resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-2.2.1.tgz#c72ab22f3a7d3503a4ca87dde976fe9978816739"
- integrity sha512-lKdkdV6EOGoVn65XaOsPdH4rMxTZOnmFyuIkMjM1i5HHCbfjC97dawgTAy0deYNfuqUqW+Q5VrVaQYtUpSd6yQ==
+deep-eql@^4.1.3:
+ version "4.1.3"
+ resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-4.1.3.tgz#7c7775513092f7df98d8df9996dd085eb668cc6d"
+ integrity sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==
dependencies:
- array-buffer-byte-length "^1.0.0"
- call-bind "^1.0.2"
- es-get-iterator "^1.1.3"
- get-intrinsic "^1.2.0"
- is-arguments "^1.1.1"
- is-array-buffer "^3.0.2"
- is-date-object "^1.0.5"
- is-regex "^1.1.4"
- is-shared-array-buffer "^1.0.2"
- isarray "^2.0.5"
- object-is "^1.1.5"
- object-keys "^1.1.1"
- object.assign "^4.1.4"
- regexp.prototype.flags "^1.5.0"
- side-channel "^1.0.4"
- which-boxed-primitive "^1.0.2"
- which-collection "^1.0.1"
- which-typed-array "^1.1.9"
+ type-detect "^4.0.0"
-deep-is@~0.1.3:
- version "0.1.3"
- resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34"
- integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=
+deep-is@^0.1.3:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831"
+ integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==
deepmerge@^4.2.2:
version "4.2.2"
@@ -4590,35 +3912,38 @@ defaults@^1.0.3:
dependencies:
clone "^1.0.2"
-define-properties@^1.1.3, define-properties@^1.1.4, define-properties@^1.2.0:
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.0.tgz#52988570670c9eacedd8064f4a990f2405849bd5"
- integrity sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==
+define-data-property@^1.0.1, define-data-property@^1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.2.tgz#f3c33b4f0102360cd7c0f5f28700f5678510b63a"
+ integrity sha512-SRtsSqsDbgpJBbW3pABMCOt6rQyeM8s8RiyeSN8jYG8sYmt/kGJejbydttUsnDs1tadr19tvhT4ShwMyoqAm4g==
dependencies:
- has-property-descriptors "^1.0.0"
- object-keys "^1.1.1"
+ es-errors "^1.3.0"
+ get-intrinsic "^1.2.2"
+ gopd "^1.0.1"
+ has-property-descriptors "^1.0.1"
-define-property@^0.2.5:
- version "0.2.5"
- resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116"
- integrity sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=
- dependencies:
- is-descriptor "^0.1.0"
+define-lazy-prop@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz#3f7ae421129bcaaac9bc74905c98a0009ec9ee7f"
+ integrity sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==
-define-property@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6"
- integrity sha1-dp66rz9KY6rTr56NMEybvnm/sOY=
+define-properties@^1.1.3, define-properties@^1.1.4, define-properties@^1.2.0, define-properties@^1.2.1:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.1.tgz#10781cc616eb951a80a034bafcaa7377f6af2b6c"
+ integrity sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==
dependencies:
- is-descriptor "^1.0.0"
+ define-data-property "^1.0.1"
+ has-property-descriptors "^1.0.0"
+ object-keys "^1.1.1"
-define-property@^2.0.2:
- version "2.0.2"
- resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d"
- integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==
+degenerator@^5.0.0:
+ version "5.0.1"
+ resolved "https://registry.yarnpkg.com/degenerator/-/degenerator-5.0.1.tgz#9403bf297c6dad9a1ece409b37db27954f91f2f5"
+ integrity sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==
dependencies:
- is-descriptor "^1.0.2"
- isobject "^3.0.1"
+ ast-types "^0.13.4"
+ escodegen "^2.1.0"
+ esprima "^4.0.1"
delayed-stream@~1.0.0:
version "1.0.0"
@@ -4630,11 +3955,16 @@ delegates@^1.0.0:
resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a"
integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=
-deprecation@^2.0.0, deprecation@^2.3.1:
+deprecation@^2.0.0:
version "2.3.1"
resolved "https://registry.yarnpkg.com/deprecation/-/deprecation-2.3.1.tgz#6368cbdb40abf3373b525ac87e4a260c3a700919"
integrity sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==
+dequal@^2.0.3:
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/dequal/-/dequal-2.0.3.tgz#2644214f1997d39ed0ee0ece72335490a7ac67be"
+ integrity sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==
+
detect-indent@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d"
@@ -4650,40 +3980,20 @@ detect-libc@^1.0.3:
resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b"
integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=
-detect-newline@^3.0.0:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651"
- integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==
-
-devtools-protocol@0.0.937139:
- version "0.0.937139"
- resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.937139.tgz#bdee3751fdfdb81cb701fd3afa94b1065dafafcf"
- integrity sha512-daj+rzR3QSxsPRy5vjjthn58axO8c11j58uY0lG5vvlJk/EiOdCWOptGdkXDjtuRHr78emKq0udHCXM4trhoDQ==
-
-dezalgo@^1.0.0:
- version "1.0.3"
- resolved "https://registry.yarnpkg.com/dezalgo/-/dezalgo-1.0.3.tgz#7f742de066fc748bc8db820569dddce49bf0d456"
- integrity sha1-f3Qt4Gb8dIvI24IFad3c5Jvw1FY=
- dependencies:
- asap "^2.0.0"
- wrappy "1"
+devtools-protocol@0.0.1203626:
+ version "0.0.1203626"
+ resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.1203626.tgz#4366a4c81a7e0d4fd6924e9182c67f1e5941e820"
+ integrity sha512-nEzHZteIUZfGCZtTiS1fRpC8UZmsfD1SiyPvaUNvS13dvKf666OAm8YTi0+Ca3n1nLEyu49Cy4+dPWpaHFJk9g==
dfa@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/dfa/-/dfa-1.2.0.tgz#96ac3204e2d29c49ea5b57af8d92c2ae12790657"
integrity sha512-ED3jP8saaweFTjeGX8HQPjeC1YYyZs98jGNZx6IiBvxW7JG5v492kamAQB3m2wop07CvU/RQmzcKr6bgcC5D/Q==
-diff-sequences@^29.4.3:
- version "29.4.3"
- resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.4.3.tgz#9314bc1fabe09267ffeca9cbafc457d8499a13f2"
- integrity sha512-ofrBgwpPhCD85kMKtE9RYFFq6OC1A89oW2vvgWZNCwxrUpRUILopY7lsYyMDSjc8g6U6aiO0Qubg6r4Wgt5ZnA==
-
-dir-glob@^2.2.2:
- version "2.2.2"
- resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-2.2.2.tgz#fa09f0694153c8918b18ba0deafae94769fc50c4"
- integrity sha512-f9LBi5QWzIW3I6e//uxZoLBlUt9kcp66qo0sSCxL6YZKc75R1c4MFCoe/LaZiBGmgujvQdxc5Bn3QhfyvK5Hsw==
- dependencies:
- path-type "^3.0.0"
+diff-sequences@^29.6.3:
+ version "29.6.3"
+ resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.6.3.tgz#4deaf894d11407c51efc8418012f9e70b84ea921"
+ integrity sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==
dir-glob@^3.0.1:
version "3.0.1"
@@ -4692,14 +4002,6 @@ dir-glob@^3.0.1:
dependencies:
path-type "^4.0.0"
-doctrine@1.5.0:
- version "1.5.0"
- resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa"
- integrity sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=
- dependencies:
- esutils "^2.0.2"
- isarray "^1.0.0"
-
doctrine@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d"
@@ -4719,20 +4021,6 @@ dom-accessibility-api@^0.5.9:
resolved "https://registry.yarnpkg.com/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz#5a7429e6066eb3664d911e33fb0e45de8eb08453"
integrity sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==
-domexception@^4.0.0:
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/domexception/-/domexception-4.0.0.tgz#4ad1be56ccadc86fc76d033353999a8037d03673"
- integrity sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==
- dependencies:
- webidl-conversions "^7.0.0"
-
-dot-prop@^4.2.0:
- version "4.2.1"
- resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-4.2.1.tgz#45884194a71fc2cda71cbb4bceb3a4dd2f433ba4"
- integrity sha512-l0p4+mIuJIua0mhxGoh4a+iNL9bmeK5DvnSVQa6T0OhrVmaEa1XScX5Etc673FePCJOArq/4Pa2cLGODUWTPOQ==
- dependencies:
- is-obj "^1.0.0"
-
dot-prop@^5.1.0:
version "5.3.0"
resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-5.3.0.tgz#90ccce708cd9cd82cc4dc8c3ddd9abdd55b20e88"
@@ -4740,87 +4028,81 @@ dot-prop@^5.1.0:
dependencies:
is-obj "^2.0.0"
+dotenv-expand@~10.0.0:
+ version "10.0.0"
+ resolved "https://registry.yarnpkg.com/dotenv-expand/-/dotenv-expand-10.0.0.tgz#12605d00fb0af6d0a592e6558585784032e4ef37"
+ integrity sha512-GopVGCpVS1UKH75VKHGuQFqS1Gusej0z4FyQkPdwjil2gNIv+LNsqBlboOzpJFZKVT95GkCyWJbBSdFEFUWI2A==
+
dotenv@^8.1.0:
version "8.6.0"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.6.0.tgz#061af664d19f7f4d8fc6e4ff9b584ce237adcb8b"
integrity sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g==
+dotenv@~16.3.1:
+ version "16.3.1"
+ resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.3.1.tgz#369034de7d7e5b120972693352a3bf112172cc3e"
+ integrity sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==
+
duplexer@^0.1.1:
version "0.1.2"
resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.2.tgz#3abe43aef3835f8ae077d136ddce0f276b0400e6"
integrity sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==
-duplexify@^3.4.2, duplexify@^3.6.0:
- version "3.7.1"
- resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.7.1.tgz#2a4df5317f6ccfd91f86d6fd25d8d8a103b88309"
- integrity sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==
- dependencies:
- end-of-stream "^1.0.0"
- inherits "^2.0.1"
- readable-stream "^2.0.0"
- stream-shift "^1.0.0"
+eastasianwidth@^0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb"
+ integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==
-ecc-jsbn@~0.1.1:
- version "0.1.2"
- resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9"
- integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=
+ejs@^3.1.7:
+ version "3.1.9"
+ resolved "https://registry.yarnpkg.com/ejs/-/ejs-3.1.9.tgz#03c9e8777fe12686a9effcef22303ca3d8eeb361"
+ integrity sha512-rC+QVNMJWv+MtPgkt0y+0rVEIdbtxVADApW9JXrUVlzHetgcyczP/E7DJmWJ4fJCZF2cPcBk0laWO9ZHMG3DmQ==
dependencies:
- jsbn "~0.1.0"
- safer-buffer "^2.1.0"
-
-electron-to-chromium@^1.4.284:
- version "1.4.302"
- resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.302.tgz#5770646ffe7051677b489226144aad9386d420f2"
- integrity sha512-Uk7C+7aPBryUR1Fwvk9VmipBcN9fVsqBO57jV2ZjTm+IZ6BMNqu7EDVEg2HxCNufk6QcWlFsBkhQyQroB2VWKw==
-
-emittery@^0.13.1:
- version "0.13.1"
- resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.13.1.tgz#c04b8c3457490e0847ae51fced3af52d338e3dad"
- integrity sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==
+ jake "^10.8.5"
-emoji-regex@^10.2.1:
- version "10.2.1"
- resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-10.2.1.tgz#a41c330d957191efd3d9dfe6e1e8e1e9ab048b3f"
- integrity sha512-97g6QgOk8zlDRdgq1WxwgTMgEWGVAQvB5Fdpgc1MkNy56la5SKP9GsMXKDOdqwn90/41a8yPwIGk1Y6WVbeMQA==
+electron-to-chromium@^1.4.601:
+ version "1.4.630"
+ resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.630.tgz#1d9f4169653784997bec98975e11a2c05214ce39"
+ integrity sha512-osHqhtjojpCsACVnuD11xO5g9xaCyw7Qqn/C2KParkMv42i8jrJJgx3g7mkHfpxwhy9MnOJr8+pKOdZ7qzgizg==
-emoji-regex@^7.0.1:
- version "7.0.3"
- resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156"
- integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==
+emoji-regex@^10.3.0:
+ version "10.3.0"
+ resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-10.3.0.tgz#76998b9268409eb3dae3de989254d456e70cfe23"
+ integrity sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==
emoji-regex@^8.0.0:
version "8.0.0"
resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37"
integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
-emoji-regex@^9.0.0:
+emoji-regex@^9.2.2:
version "9.2.2"
resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-9.2.2.tgz#840c8803b0d8047f4ff0cf963176b32d4ef3ed72"
integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==
-encoding@^0.1.11:
+encoding@^0.1.13:
version "0.1.13"
resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.13.tgz#56574afdd791f54a8e9b2785c0582a2d26210fa9"
integrity sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==
dependencies:
iconv-lite "^0.6.2"
-end-of-stream@^1.0.0, end-of-stream@^1.1.0, end-of-stream@^1.4.1:
+end-of-stream@^1.1.0, end-of-stream@^1.4.1:
version "1.4.4"
resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0"
integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==
dependencies:
once "^1.4.0"
-enhanced-resolve@^5.8.3:
- version "5.8.3"
- resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.8.3.tgz#6d552d465cce0423f5b3d718511ea53826a7b2f0"
- integrity sha512-EGAbGvH7j7Xt2nc0E7D99La1OiEs8LnyimkRgwExpUMScN6O+3x9tIWs7PLQZVNx4YD+00skHXPXi1yQHpAmZA==
+enhanced-resolve@^5.15.0:
+ version "5.15.0"
+ resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz#1af946c7d93603eb88e9896cee4904dc012e9c35"
+ integrity sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==
dependencies:
graceful-fs "^4.2.4"
tapable "^2.2.0"
-enquirer@^2.3.0, enquirer@^2.3.6:
+enquirer@^2.3.0, enquirer@^2.3.6, enquirer@~2.3.6:
version "2.3.6"
resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d"
integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==
@@ -4837,68 +4119,118 @@ env-paths@^2.2.0:
resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2"
integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==
-envinfo@^7.3.1:
+envinfo@7.8.1:
version "7.8.1"
resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.8.1.tgz#06377e3e5f4d379fea7ac592d5ad8927e0c4d475"
integrity sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==
-err-code@^1.0.0:
- version "1.1.2"
- resolved "https://registry.yarnpkg.com/err-code/-/err-code-1.1.2.tgz#06e0116d3028f6aef4806849eb0ea6a748ae6960"
- integrity sha1-BuARbTAo9q70gGhJ6w6mp0iuaWA=
+err-code@^2.0.2:
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/err-code/-/err-code-2.0.3.tgz#23c2f3b756ffdfc608d30e27c9a941024807e7f9"
+ integrity sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==
-error-ex@^1.2.0, error-ex@^1.3.1:
+error-ex@^1.3.1:
version "1.3.2"
resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf"
integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==
dependencies:
is-arrayish "^0.2.1"
-es-abstract@^1.18.0-next.1, es-abstract@^1.18.0-next.2:
- version "1.19.1"
- resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.19.1.tgz#d4885796876916959de78edaa0df456627115ec3"
- integrity sha512-2vJ6tjA/UfqLm2MPs7jxVybLoB8i1t1Jd9R3kISld20sIxPcTbLuggQOUxeWeAvIUkduv/CfMjuh4WmiXr2v9w==
+es-abstract@^1.22.1, es-abstract@^1.22.3:
+ version "1.22.3"
+ resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.22.3.tgz#48e79f5573198de6dee3589195727f4f74bc4f32"
+ integrity sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==
dependencies:
- call-bind "^1.0.2"
+ array-buffer-byte-length "^1.0.0"
+ arraybuffer.prototype.slice "^1.0.2"
+ available-typed-arrays "^1.0.5"
+ call-bind "^1.0.5"
+ es-set-tostringtag "^2.0.1"
es-to-primitive "^1.2.1"
- function-bind "^1.1.1"
- get-intrinsic "^1.1.1"
+ function.prototype.name "^1.1.6"
+ get-intrinsic "^1.2.2"
get-symbol-description "^1.0.0"
- has "^1.0.3"
- has-symbols "^1.0.2"
- internal-slot "^1.0.3"
- is-callable "^1.2.4"
- is-negative-zero "^2.0.1"
+ globalthis "^1.0.3"
+ gopd "^1.0.1"
+ has-property-descriptors "^1.0.0"
+ has-proto "^1.0.1"
+ has-symbols "^1.0.3"
+ hasown "^2.0.0"
+ internal-slot "^1.0.5"
+ is-array-buffer "^3.0.2"
+ is-callable "^1.2.7"
+ is-negative-zero "^2.0.2"
is-regex "^1.1.4"
- is-shared-array-buffer "^1.0.1"
+ is-shared-array-buffer "^1.0.2"
is-string "^1.0.7"
- is-weakref "^1.0.1"
- object-inspect "^1.11.0"
+ is-typed-array "^1.1.12"
+ is-weakref "^1.0.2"
+ object-inspect "^1.13.1"
object-keys "^1.1.1"
- object.assign "^4.1.2"
- string.prototype.trimend "^1.0.4"
- string.prototype.trimstart "^1.0.4"
- unbox-primitive "^1.0.1"
+ object.assign "^4.1.4"
+ regexp.prototype.flags "^1.5.1"
+ safe-array-concat "^1.0.1"
+ safe-regex-test "^1.0.0"
+ string.prototype.trim "^1.2.8"
+ string.prototype.trimend "^1.0.7"
+ string.prototype.trimstart "^1.0.7"
+ typed-array-buffer "^1.0.0"
+ typed-array-byte-length "^1.0.0"
+ typed-array-byte-offset "^1.0.0"
+ typed-array-length "^1.0.4"
+ unbox-primitive "^1.0.2"
+ which-typed-array "^1.1.13"
+
+es-array-method-boxes-properly@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz#873f3e84418de4ee19c5be752990b2e44718d09e"
+ integrity sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==
-es-get-iterator@^1.1.3:
- version "1.1.3"
- resolved "https://registry.yarnpkg.com/es-get-iterator/-/es-get-iterator-1.1.3.tgz#3ef87523c5d464d41084b2c3c9c214f1199763d6"
- integrity sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==
+es-errors@^1.0.0, es-errors@^1.1.0, es-errors@^1.2.1, es-errors@^1.3.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f"
+ integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==
+
+es-iterator-helpers@^1.0.12, es-iterator-helpers@^1.0.15:
+ version "1.0.15"
+ resolved "https://registry.yarnpkg.com/es-iterator-helpers/-/es-iterator-helpers-1.0.15.tgz#bd81d275ac766431d19305923707c3efd9f1ae40"
+ integrity sha512-GhoY8uYqd6iwUl2kgjTm4CZAf6oo5mHK7BPqx3rKgx893YSsy0LGHV6gfqqQvZt/8xM8xeOnfXBCfqclMKkJ5g==
dependencies:
+ asynciterator.prototype "^1.0.0"
call-bind "^1.0.2"
- get-intrinsic "^1.1.3"
+ define-properties "^1.2.1"
+ es-abstract "^1.22.1"
+ es-set-tostringtag "^2.0.1"
+ function-bind "^1.1.1"
+ get-intrinsic "^1.2.1"
+ globalthis "^1.0.3"
+ has-property-descriptors "^1.0.0"
+ has-proto "^1.0.1"
has-symbols "^1.0.3"
- is-arguments "^1.1.1"
- is-map "^2.0.2"
- is-set "^2.0.2"
- is-string "^1.0.7"
- isarray "^2.0.5"
- stop-iteration-iterator "^1.0.0"
+ internal-slot "^1.0.5"
+ iterator.prototype "^1.1.2"
+ safe-array-concat "^1.0.1"
-es-module-lexer@^0.9.0:
- version "0.9.3"
- resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-0.9.3.tgz#6f13db00cc38417137daf74366f535c8eb438f19"
- integrity sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==
+es-module-lexer@^1.2.1:
+ version "1.4.1"
+ resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.4.1.tgz#41ea21b43908fe6a287ffcbe4300f790555331f5"
+ integrity sha512-cXLGjP0c4T3flZJKQSuziYoq7MlT+rnvfZjfp7h+I7K9BNX54kP9nyWvdbwjQ4u1iWbOL4u96fgeZLToQlZC7w==
+
+es-set-tostringtag@^2.0.1:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.2.tgz#11f7cc9f63376930a5f20be4915834f4bc74f9c9"
+ integrity sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==
+ dependencies:
+ get-intrinsic "^1.2.2"
+ has-tostringtag "^1.0.0"
+ hasown "^2.0.0"
+
+es-shim-unscopables@^1.0.0, es-shim-unscopables@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz#1f6942e71ecc7835ed1c8a83006d8771a63a3763"
+ integrity sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==
+ dependencies:
+ hasown "^2.0.0"
es-to-primitive@^1.2.1:
version "1.2.1"
@@ -4914,17 +4246,34 @@ es6-object-assign@^1.1.0:
resolved "https://registry.yarnpkg.com/es6-object-assign/-/es6-object-assign-1.1.0.tgz#c2c3582656247c39ea107cb1e6652b6f9f24523c"
integrity sha1-wsNYJlYkfDnqEHyx5mUrb58kUjw=
-es6-promise@^4.0.3:
- version "4.2.8"
- resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a"
- integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==
-
-es6-promisify@^5.0.0:
- version "5.0.0"
- resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203"
- integrity sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=
- dependencies:
- es6-promise "^4.0.3"
+esbuild@^0.19.3:
+ version "0.19.11"
+ resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.19.11.tgz#4a02dca031e768b5556606e1b468fe72e3325d96"
+ integrity sha512-HJ96Hev2hX/6i5cDVwcqiJBBtuo9+FeIJOtZ9W1kA5M6AMJRHUZlpYZ1/SbEwtO0ioNAW8rUooVpC/WehY2SfA==
+ optionalDependencies:
+ "@esbuild/aix-ppc64" "0.19.11"
+ "@esbuild/android-arm" "0.19.11"
+ "@esbuild/android-arm64" "0.19.11"
+ "@esbuild/android-x64" "0.19.11"
+ "@esbuild/darwin-arm64" "0.19.11"
+ "@esbuild/darwin-x64" "0.19.11"
+ "@esbuild/freebsd-arm64" "0.19.11"
+ "@esbuild/freebsd-x64" "0.19.11"
+ "@esbuild/linux-arm" "0.19.11"
+ "@esbuild/linux-arm64" "0.19.11"
+ "@esbuild/linux-ia32" "0.19.11"
+ "@esbuild/linux-loong64" "0.19.11"
+ "@esbuild/linux-mips64el" "0.19.11"
+ "@esbuild/linux-ppc64" "0.19.11"
+ "@esbuild/linux-riscv64" "0.19.11"
+ "@esbuild/linux-s390x" "0.19.11"
+ "@esbuild/linux-x64" "0.19.11"
+ "@esbuild/netbsd-x64" "0.19.11"
+ "@esbuild/openbsd-x64" "0.19.11"
+ "@esbuild/sunos-x64" "0.19.11"
+ "@esbuild/win32-arm64" "0.19.11"
+ "@esbuild/win32-ia32" "0.19.11"
+ "@esbuild/win32-x64" "0.19.11"
escalade@^3.1.1:
version "3.1.1"
@@ -4936,141 +4285,140 @@ escape-string-regexp@^1.0.5:
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=
-escape-string-regexp@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344"
- integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==
-
escape-string-regexp@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34"
integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==
-escodegen@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-2.0.0.tgz#5e32b12833e8aa8fa35e1bf0befa89380484c7dd"
- integrity sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw==
+escodegen@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-2.1.0.tgz#ba93bbb7a43986d29d6041f99f5262da773e2e17"
+ integrity sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==
dependencies:
esprima "^4.0.1"
estraverse "^5.2.0"
esutils "^2.0.2"
- optionator "^0.8.1"
optionalDependencies:
source-map "~0.6.1"
-eslint-config-airbnb-base@^14.2.1:
- version "14.2.1"
- resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.2.1.tgz#8a2eb38455dc5a312550193b319cdaeef042cd1e"
- integrity sha512-GOrQyDtVEc1Xy20U7vsB2yAoB4nBlfH5HZJeatRXHleO+OS5Ot+MWij4Dpltw4/DyIkqUfqz1epfhVR5XWWQPA==
+eslint-config-airbnb-base@^15.0.0:
+ version "15.0.0"
+ resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-15.0.0.tgz#6b09add90ac79c2f8d723a2580e07f3925afd236"
+ integrity sha512-xaX3z4ZZIcFLvh2oUNvcX5oEofXda7giYmuplVxoOg5A7EXJMrUyqRgR+mhDhPK8LZ4PttFOBvCYDbX3sUoUig==
dependencies:
confusing-browser-globals "^1.0.10"
object.assign "^4.1.2"
- object.entries "^1.1.2"
+ object.entries "^1.1.5"
+ semver "^6.3.0"
-eslint-config-airbnb@^18.1.0:
- version "18.2.1"
- resolved "https://registry.yarnpkg.com/eslint-config-airbnb/-/eslint-config-airbnb-18.2.1.tgz#b7fe2b42f9f8173e825b73c8014b592e449c98d9"
- integrity sha512-glZNDEZ36VdlZWoxn/bUR1r/sdFKPd1mHPbqUtkctgNG4yT2DLLtJ3D+yCV+jzZCc2V1nBVkmdknOJBZ5Hc0fg==
+eslint-config-airbnb@^19.0.0:
+ version "19.0.4"
+ resolved "https://registry.yarnpkg.com/eslint-config-airbnb/-/eslint-config-airbnb-19.0.4.tgz#84d4c3490ad70a0ffa571138ebcdea6ab085fdc3"
+ integrity sha512-T75QYQVQX57jiNgpF9r1KegMICE94VYwoFQyMGhrvc+lB8YF2E/M/PYDaQe1AJcWaEgqLE+ErXV1Og/+6Vyzew==
dependencies:
- eslint-config-airbnb-base "^14.2.1"
+ eslint-config-airbnb-base "^15.0.0"
object.assign "^4.1.2"
- object.entries "^1.1.2"
-
-eslint-config-prettier@^4.0.0:
- version "4.3.0"
- resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-4.3.0.tgz#c55c1fcac8ce4518aeb77906984e134d9eb5a4f0"
- integrity sha512-sZwhSTHVVz78+kYD3t5pCWSYEdVSBR0PXnwjDRsUs8ytIrK8PLXw+6FKp8r3Z7rx4ZszdetWlXYKOHoUrrwPlA==
- dependencies:
- get-stdin "^6.0.0"
+ object.entries "^1.1.5"
-eslint-import-resolver-node@^0.3.4:
- version "0.3.4"
- resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz#85ffa81942c25012d8231096ddf679c03042c717"
- integrity sha512-ogtf+5AB/O+nM6DIeBUNr2fuT7ot9Qg/1harBfBtaP13ekEWFQEEMP94BCB7zaNW3gyY+8SHYF00rnqYwXKWOA==
- dependencies:
- debug "^2.6.9"
- resolve "^1.13.1"
+eslint-config-prettier@^9.0.0:
+ version "9.1.0"
+ resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz#31af3d94578645966c082fcb71a5846d3c94867f"
+ integrity sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==
+
+eslint-import-resolver-node@^0.3.9:
+ version "0.3.9"
+ resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz#d4eaac52b8a2e7c3cd1903eb00f7e053356118ac"
+ integrity sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==
+ dependencies:
+ debug "^3.2.7"
+ is-core-module "^2.13.0"
+ resolve "^1.22.4"
+
+eslint-module-utils@^2.8.0:
+ version "2.8.0"
+ resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz#e439fee65fc33f6bba630ff621efc38ec0375c49"
+ integrity sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==
+ dependencies:
+ debug "^3.2.7"
+
+eslint-plugin-import@^2.29.0:
+ version "2.29.1"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz#d45b37b5ef5901d639c15270d74d46d161150643"
+ integrity sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==
+ dependencies:
+ array-includes "^3.1.7"
+ array.prototype.findlastindex "^1.2.3"
+ array.prototype.flat "^1.3.2"
+ array.prototype.flatmap "^1.3.2"
+ debug "^3.2.7"
+ doctrine "^2.1.0"
+ eslint-import-resolver-node "^0.3.9"
+ eslint-module-utils "^2.8.0"
+ hasown "^2.0.0"
+ is-core-module "^2.13.1"
+ is-glob "^4.0.3"
+ minimatch "^3.1.2"
+ object.fromentries "^2.0.7"
+ object.groupby "^1.0.1"
+ object.values "^1.1.7"
+ semver "^6.3.1"
+ tsconfig-paths "^3.15.0"
+
+eslint-plugin-jsx-a11y@^6.8.0:
+ version "6.8.0"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.8.0.tgz#2fa9c701d44fcd722b7c771ec322432857fcbad2"
+ integrity sha512-Hdh937BS3KdwwbBaKd5+PLCOmYY6U4f2h9Z2ktwtNKvIdIEu137rjYbcb9ApSbVJfWxANNuiKTD/9tOKjK9qOA==
+ dependencies:
+ "@babel/runtime" "^7.23.2"
+ aria-query "^5.3.0"
+ array-includes "^3.1.7"
+ array.prototype.flatmap "^1.3.2"
+ ast-types-flow "^0.0.8"
+ axe-core "=4.7.0"
+ axobject-query "^3.2.1"
+ damerau-levenshtein "^1.0.8"
+ emoji-regex "^9.2.2"
+ es-iterator-helpers "^1.0.15"
+ hasown "^2.0.0"
+ jsx-ast-utils "^3.3.5"
+ language-tags "^1.0.9"
+ minimatch "^3.1.2"
+ object.entries "^1.1.7"
+ object.fromentries "^2.0.7"
+
+eslint-plugin-promise@^6.1.0:
+ version "6.1.1"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-6.1.1.tgz#269a3e2772f62875661220631bd4dafcb4083816"
+ integrity sha512-tjqWDwVZQo7UIPMeDReOpUgHCmCiH+ePnVT+5zVapL0uuHnegBUs2smM13CzOs2Xb5+MHMRFTs9v24yjba4Oig==
-eslint-module-utils@^2.6.0:
- version "2.6.0"
- resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.6.0.tgz#579ebd094f56af7797d19c9866c9c9486629bfa6"
- integrity sha512-6j9xxegbqe8/kZY8cYpcp0xhbK0EgJlg3g9mib3/miLaExuuwc3n5UEfSnU6hWMbT0FAYVvDbL9RrRgpUeQIvA==
- dependencies:
- debug "^2.6.9"
- pkg-dir "^2.0.0"
+eslint-plugin-react-hooks@^4.6.0:
+ version "4.6.0"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.0.tgz#4c3e697ad95b77e93f8646aaa1630c1ba607edd3"
+ integrity sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==
-eslint-plugin-import@^2.20.2:
- version "2.22.1"
- resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.22.1.tgz#0896c7e6a0cf44109a2d97b95903c2bb689d7702"
- integrity sha512-8K7JjINHOpH64ozkAhpT3sd+FswIZTfMZTjdx052pnWrgRCVfp8op9tbjpAk3DdUeI/Ba4C8OjdC0r90erHEOw==
+eslint-plugin-react@^7.33.0:
+ version "7.33.2"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.33.2.tgz#69ee09443ffc583927eafe86ffebb470ee737608"
+ integrity sha512-73QQMKALArI8/7xGLNI/3LylrEYrlKZSb5C9+q3OtOewTnMQi5cT+aE9E41sLCmli3I9PGGmD1yiZydyo4FEPw==
dependencies:
- array-includes "^3.1.1"
- array.prototype.flat "^1.2.3"
- contains-path "^0.1.0"
- debug "^2.6.9"
- doctrine "1.5.0"
- eslint-import-resolver-node "^0.3.4"
- eslint-module-utils "^2.6.0"
- has "^1.0.3"
- minimatch "^3.0.4"
- object.values "^1.1.1"
- read-pkg-up "^2.0.0"
- resolve "^1.17.0"
- tsconfig-paths "^3.9.0"
-
-eslint-plugin-jest@^22.3.0:
- version "22.21.0"
- resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-22.21.0.tgz#8137294645866636160487d9764224b9a43e2eb1"
- integrity sha512-OaqnSS7uBgcGiqXUiEnjoqxPNKvR4JWG5mSRkzVoR6+vDwlqqp11beeql1hYs0HTbdhiwrxWLxbX0Vx7roG3Ew==
- dependencies:
- "@typescript-eslint/experimental-utils" "^1.13.0"
-
-eslint-plugin-jsx-a11y@^6.2.3:
- version "6.4.1"
- resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.4.1.tgz#a2d84caa49756942f42f1ffab9002436391718fd"
- integrity sha512-0rGPJBbwHoGNPU73/QCLP/vveMlM1b1Z9PponxO87jfr6tuH5ligXbDT6nHSSzBC8ovX2Z+BQu7Bk5D/Xgq9zg==
- dependencies:
- "@babel/runtime" "^7.11.2"
- aria-query "^4.2.2"
- array-includes "^3.1.1"
- ast-types-flow "^0.0.7"
- axe-core "^4.0.2"
- axobject-query "^2.2.0"
- damerau-levenshtein "^1.0.6"
- emoji-regex "^9.0.0"
- has "^1.0.3"
- jsx-ast-utils "^3.1.0"
- language-tags "^1.0.5"
-
-eslint-plugin-promise@^4.0.1:
- version "4.3.1"
- resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-4.3.1.tgz#61485df2a359e03149fdafc0a68b0e030ad2ac45"
- integrity sha512-bY2sGqyptzFBDLh/GMbAxfdJC+b0f23ME63FOE4+Jao0oZ3E1LEwFtWJX/1pGMJLiTtrSSern2CRM/g+dfc0eQ==
-
-eslint-plugin-react-hooks@^2.5.1:
- version "2.5.1"
- resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-2.5.1.tgz#4ef5930592588ce171abeb26f400c7fbcbc23cd0"
- integrity sha512-Y2c4b55R+6ZzwtTppKwSmK/Kar8AdLiC2f9NADCuxbcTgPPg41Gyqa6b9GppgXSvCtkRw43ZE86CT5sejKC6/g==
-
-eslint-plugin-react@^7.20.0:
- version "7.23.1"
- resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.23.1.tgz#f1a2e844c0d1967c822388204a8bc4dee8415b11"
- integrity sha512-MvFGhZjI8Z4HusajmSw0ougGrq3Gs4vT/0WgwksZgf5RrLrRa2oYAw56okU4tZJl8+j7IYNuTM+2RnFEuTSdRQ==
- dependencies:
- array-includes "^3.1.3"
- array.prototype.flatmap "^1.2.4"
+ array-includes "^3.1.6"
+ array.prototype.flatmap "^1.3.1"
+ array.prototype.tosorted "^1.1.1"
doctrine "^2.1.0"
- has "^1.0.3"
+ es-iterator-helpers "^1.0.12"
+ estraverse "^5.3.0"
jsx-ast-utils "^2.4.1 || ^3.0.0"
- minimatch "^3.0.4"
- object.entries "^1.1.3"
- object.fromentries "^2.0.4"
- object.values "^1.1.3"
- prop-types "^15.7.2"
- resolve "^2.0.0-next.3"
- string.prototype.matchall "^4.0.4"
-
-eslint-scope@5.1.1, eslint-scope@^5.0.0:
+ minimatch "^3.1.2"
+ object.entries "^1.1.6"
+ object.fromentries "^2.0.6"
+ object.hasown "^1.1.2"
+ object.values "^1.1.6"
+ prop-types "^15.8.1"
+ resolve "^2.0.0-next.4"
+ semver "^6.3.1"
+ string.prototype.matchall "^4.0.8"
+
+eslint-scope@5.1.1:
version "5.1.1"
resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c"
integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==
@@ -5078,155 +4426,153 @@ eslint-scope@5.1.1, eslint-scope@^5.0.0:
esrecurse "^4.3.0"
estraverse "^4.1.1"
-eslint-scope@^4.0.0:
- version "4.0.3"
- resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.3.tgz#ca03833310f6889a3264781aa82e63eb9cfe7848"
- integrity sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==
- dependencies:
- esrecurse "^4.1.0"
- estraverse "^4.1.1"
-
-eslint-utils@^1.4.3:
- version "1.4.3"
- resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.3.tgz#74fec7c54d0776b6f67e0251040b5806564e981f"
- integrity sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==
+eslint-scope@^7.2.2:
+ version "7.2.2"
+ resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.2.2.tgz#deb4f92563390f32006894af62a22dba1c46423f"
+ integrity sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==
dependencies:
- eslint-visitor-keys "^1.1.0"
-
-eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0:
- version "1.3.0"
- resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e"
- integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==
+ esrecurse "^4.3.0"
+ estraverse "^5.2.0"
-eslint@^6.8.0:
- version "6.8.0"
- resolved "https://registry.yarnpkg.com/eslint/-/eslint-6.8.0.tgz#62262d6729739f9275723824302fb227c8c93ffb"
- integrity sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==
- dependencies:
- "@babel/code-frame" "^7.0.0"
- ajv "^6.10.0"
- chalk "^2.1.0"
- cross-spawn "^6.0.5"
- debug "^4.0.1"
+eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.3:
+ version "3.4.3"
+ resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800"
+ integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==
+
+eslint@^8.56.0:
+ version "8.56.0"
+ resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.56.0.tgz#4957ce8da409dc0809f99ab07a1b94832ab74b15"
+ integrity sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==
+ dependencies:
+ "@eslint-community/eslint-utils" "^4.2.0"
+ "@eslint-community/regexpp" "^4.6.1"
+ "@eslint/eslintrc" "^2.1.4"
+ "@eslint/js" "8.56.0"
+ "@humanwhocodes/config-array" "^0.11.13"
+ "@humanwhocodes/module-importer" "^1.0.1"
+ "@nodelib/fs.walk" "^1.2.8"
+ "@ungap/structured-clone" "^1.2.0"
+ ajv "^6.12.4"
+ chalk "^4.0.0"
+ cross-spawn "^7.0.2"
+ debug "^4.3.2"
doctrine "^3.0.0"
- eslint-scope "^5.0.0"
- eslint-utils "^1.4.3"
- eslint-visitor-keys "^1.1.0"
- espree "^6.1.2"
- esquery "^1.0.1"
+ escape-string-regexp "^4.0.0"
+ eslint-scope "^7.2.2"
+ eslint-visitor-keys "^3.4.3"
+ espree "^9.6.1"
+ esquery "^1.4.2"
esutils "^2.0.2"
- file-entry-cache "^5.0.1"
- functional-red-black-tree "^1.0.1"
- glob-parent "^5.0.0"
- globals "^12.1.0"
- ignore "^4.0.6"
- import-fresh "^3.0.0"
+ fast-deep-equal "^3.1.3"
+ file-entry-cache "^6.0.1"
+ find-up "^5.0.0"
+ glob-parent "^6.0.2"
+ globals "^13.19.0"
+ graphemer "^1.4.0"
+ ignore "^5.2.0"
imurmurhash "^0.1.4"
- inquirer "^7.0.0"
is-glob "^4.0.0"
- js-yaml "^3.13.1"
+ is-path-inside "^3.0.3"
+ js-yaml "^4.1.0"
json-stable-stringify-without-jsonify "^1.0.1"
- levn "^0.3.0"
- lodash "^4.17.14"
- minimatch "^3.0.4"
- mkdirp "^0.5.1"
+ levn "^0.4.1"
+ lodash.merge "^4.6.2"
+ minimatch "^3.1.2"
natural-compare "^1.4.0"
- optionator "^0.8.3"
- progress "^2.0.0"
- regexpp "^2.0.1"
- semver "^6.1.2"
- strip-ansi "^5.2.0"
- strip-json-comments "^3.0.1"
- table "^5.2.3"
+ optionator "^0.9.3"
+ strip-ansi "^6.0.1"
text-table "^0.2.0"
- v8-compile-cache "^2.0.3"
-espree@^6.1.2:
- version "6.2.1"
- resolved "https://registry.yarnpkg.com/espree/-/espree-6.2.1.tgz#77fc72e1fd744a2052c20f38a5b575832e82734a"
- integrity sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==
+espree@^9.6.0, espree@^9.6.1:
+ version "9.6.1"
+ resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f"
+ integrity sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==
dependencies:
- acorn "^7.1.1"
- acorn-jsx "^5.2.0"
- eslint-visitor-keys "^1.1.0"
+ acorn "^8.9.0"
+ acorn-jsx "^5.3.2"
+ eslint-visitor-keys "^3.4.1"
esprima@^4.0.0, esprima@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71"
integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==
-esquery@^1.0.1:
- version "1.4.0"
- resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5"
- integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==
+esquery@^1.4.2:
+ version "1.5.0"
+ resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.5.0.tgz#6ce17738de8577694edd7361c57182ac8cb0db0b"
+ integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==
dependencies:
estraverse "^5.1.0"
-esrecurse@^4.1.0, esrecurse@^4.3.0:
+esrecurse@^4.3.0:
version "4.3.0"
resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921"
integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==
dependencies:
estraverse "^5.2.0"
-estimo@^2.3.1:
- version "2.3.1"
- resolved "https://registry.yarnpkg.com/estimo/-/estimo-2.3.1.tgz#0adf3bebf7149d869921445febd3012588b9b899"
- integrity sha512-IqQwkl4qQzajWPKa42K3t/l/wTe4jJdickc1i/fHYmX1SD7NexurWRkn15NwpOEkturUrqNiRHRCG+nBvxd/VA==
+estimo@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/estimo/-/estimo-3.0.1.tgz#b0d80ebeab940d0e69f634af3c3e91d9607fb049"
+ integrity sha512-xk0Gln+Ie+rfF3EDfa07wcq1n8u3tT6Hbt9UVAYBb3CMvYVfeljqlX9eJBSklbMhgV2BV3Hpcd22Q4T+jiC0fw==
dependencies:
"@sitespeed.io/tracium" "^0.3.3"
- commander "^8.3.0"
- find-chrome-bin "^0.1.0"
- nanoid "^3.1.30"
- puppeteer-core "^12.0.1"
+ commander "^11.1.0"
+ find-chrome-bin "2.0.1"
+ nanoid "5.0.4"
+ puppeteer-core "21.6.0"
estraverse@^4.1.1:
version "4.3.0"
resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d"
integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==
-estraverse@^5.1.0, estraverse@^5.2.0:
- version "5.2.0"
- resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.2.0.tgz#307df42547e6cc7324d3cf03c155d5cdb8c53880"
- integrity sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==
-
-estree-walker@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-1.0.1.tgz#31bc5d612c96b704106b477e6dd5d8aa138cb700"
- integrity sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==
+estraverse@^5.1.0, estraverse@^5.2.0, estraverse@^5.3.0:
+ version "5.3.0"
+ resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123"
+ integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==
-estree-walker@^2.0.1:
+estree-walker@^2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-2.0.2.tgz#52f010178c2a4c117a7757cfe942adb7d2da4cac"
integrity sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==
+estree-walker@^3.0.3:
+ version "3.0.3"
+ resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-3.0.3.tgz#67c3e549ec402a487b4fc193d1953a524752340d"
+ integrity sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==
+ dependencies:
+ "@types/estree" "^1.0.0"
+
esutils@^2.0.2:
version "2.0.3"
resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64"
integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==
-eventemitter3@^3.1.0:
- version "3.1.2"
- resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.2.tgz#2d3d48f9c346698fce83a85d7d664e98535df6e7"
- integrity sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==
+eventemitter3@^4.0.4:
+ version "4.0.7"
+ resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f"
+ integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==
events@^3.2.0, events@^3.3.0:
version "3.3.0"
resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400"
integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==
-execa@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8"
- integrity sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==
+execa@5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/execa/-/execa-5.0.0.tgz#4029b0007998a841fbd1032e5f4de86a3c1e3376"
+ integrity sha512-ov6w/2LCiuyO4RLYGdpFGjkcs0wMTgGE8PrkTHikeUy5iJekXyPIKUjifk5CsE0pt7sMCrMZ3YNqoCj6idQOnQ==
dependencies:
- cross-spawn "^6.0.0"
- get-stream "^4.0.0"
- is-stream "^1.1.0"
- npm-run-path "^2.0.0"
- p-finally "^1.0.0"
- signal-exit "^3.0.0"
- strip-eof "^1.0.0"
+ cross-spawn "^7.0.3"
+ get-stream "^6.0.0"
+ human-signals "^2.1.0"
+ is-stream "^2.0.0"
+ merge-stream "^2.0.0"
+ npm-run-path "^4.0.1"
+ onetime "^5.1.2"
+ signal-exit "^3.0.3"
+ strip-final-newline "^2.0.0"
execa@^4.1.0:
version "4.1.0"
@@ -5243,69 +4589,25 @@ execa@^4.1.0:
signal-exit "^3.0.2"
strip-final-newline "^2.0.0"
-execa@^5.0.0:
- version "5.1.1"
- resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd"
- integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==
+execa@^8.0.1:
+ version "8.0.1"
+ resolved "https://registry.yarnpkg.com/execa/-/execa-8.0.1.tgz#51f6a5943b580f963c3ca9c6321796db8cc39b8c"
+ integrity sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==
dependencies:
cross-spawn "^7.0.3"
- get-stream "^6.0.0"
- human-signals "^2.1.0"
- is-stream "^2.0.0"
+ get-stream "^8.0.1"
+ human-signals "^5.0.0"
+ is-stream "^3.0.0"
merge-stream "^2.0.0"
- npm-run-path "^4.0.1"
- onetime "^5.1.2"
- signal-exit "^3.0.3"
- strip-final-newline "^2.0.0"
-
-exit@^0.1.2:
- version "0.1.2"
- resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c"
- integrity sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=
+ npm-run-path "^5.1.0"
+ onetime "^6.0.0"
+ signal-exit "^4.1.0"
+ strip-final-newline "^3.0.0"
-expand-brackets@^2.1.4:
- version "2.1.4"
- resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622"
- integrity sha1-t3c14xXOMPa27/D4OwQVGiJEliI=
- dependencies:
- debug "^2.3.3"
- define-property "^0.2.5"
- extend-shallow "^2.0.1"
- posix-character-classes "^0.1.0"
- regex-not "^1.0.0"
- snapdragon "^0.8.1"
- to-regex "^3.0.1"
-
-expect@^29.5.0:
- version "29.5.0"
- resolved "https://registry.yarnpkg.com/expect/-/expect-29.5.0.tgz#68c0509156cb2a0adb8865d413b137eeaae682f7"
- integrity sha512-yM7xqUrCO2JdpFo4XpM82t+PJBFybdqoQuJLDGeDX2ij8NZzqRHyu3Hp188/JX7SWqud+7t4MUdvcgGBICMHZg==
- dependencies:
- "@jest/expect-utils" "^29.5.0"
- jest-get-type "^29.4.3"
- jest-matcher-utils "^29.5.0"
- jest-message-util "^29.5.0"
- jest-util "^29.5.0"
-
-extend-shallow@^2.0.1:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f"
- integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=
- dependencies:
- is-extendable "^0.1.0"
-
-extend-shallow@^3.0.0, extend-shallow@^3.0.2:
- version "3.0.2"
- resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8"
- integrity sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=
- dependencies:
- assign-symbols "^1.0.0"
- is-extendable "^1.0.1"
-
-extend@~3.0.2:
- version "3.0.2"
- resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa"
- integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==
+exponential-backoff@^3.1.1:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/exponential-backoff/-/exponential-backoff-3.1.1.tgz#64ac7526fe341ab18a39016cd22c787d01e00bf6"
+ integrity sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw==
extendable-error@^0.1.5:
version "0.1.7"
@@ -5321,20 +4623,6 @@ external-editor@^3.0.3, external-editor@^3.1.0:
iconv-lite "^0.4.24"
tmp "^0.0.33"
-extglob@^2.0.4:
- version "2.0.4"
- resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543"
- integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==
- dependencies:
- array-unique "^0.3.2"
- define-property "^1.0.0"
- expand-brackets "^2.1.4"
- extend-shallow "^2.0.1"
- fragment-cache "^0.2.1"
- regex-not "^1.0.0"
- snapdragon "^0.8.1"
- to-regex "^3.0.1"
-
extract-zip@2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-2.0.1.tgz#663dca56fe46df890d5f131ef4a06d22bb8ba13a"
@@ -5346,37 +4634,20 @@ extract-zip@2.0.1:
optionalDependencies:
"@types/yauzl" "^2.9.1"
-extsprintf@1.3.0:
- version "1.3.0"
- resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05"
- integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=
-
-extsprintf@^1.2.0:
- version "1.4.0"
- resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f"
- integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8=
-
fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3:
version "3.1.3"
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525"
integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==
-fast-glob@^2.2.6:
- version "2.2.7"
- resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-2.2.7.tgz#6953857c3afa475fff92ee6015d52da70a4cd39d"
- integrity sha512-g1KuQwHOZAmOZMuBtHdxDtju+T2RT8jgCC9aANsbpdiDDTSnjgfuVsIBNKbUeJI3oKMRExcfNDtJl4OhbffMsw==
- dependencies:
- "@mrmlnc/readdir-enhanced" "^2.2.1"
- "@nodelib/fs.stat" "^1.1.2"
- glob-parent "^3.1.0"
- is-glob "^4.0.0"
- merge2 "^1.2.3"
- micromatch "^3.1.10"
+fast-fifo@^1.1.0, fast-fifo@^1.2.0:
+ version "1.3.2"
+ resolved "https://registry.yarnpkg.com/fast-fifo/-/fast-fifo-1.3.2.tgz#286e31de96eb96d38a97899815740ba2a4f3640c"
+ integrity sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==
-fast-glob@^3.2.9:
- version "3.2.10"
- resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.10.tgz#2734f83baa7f43b7fd41e13bc34438f4ffe284ee"
- integrity sha512-s9nFhFnvR63wls6/kM88kQqDhMu0AfdjqouE2l5GVQPbqLgyFjjU5ry/r2yKsJxpb9Py1EYNqieFrmMaX4v++A==
+fast-glob@^3.0.3, fast-glob@^3.2.9, fast-glob@^3.3.2:
+ version "3.3.2"
+ resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129"
+ integrity sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==
dependencies:
"@nodelib/fs.stat" "^2.0.2"
"@nodelib/fs.walk" "^1.2.3"
@@ -5384,15 +4655,15 @@ fast-glob@^3.2.9:
merge2 "^1.3.0"
micromatch "^4.0.4"
-fast-json-stable-stringify@^2.0.0, fast-json-stable-stringify@^2.1.0:
+fast-json-stable-stringify@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633"
integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==
-fast-levenshtein@~2.0.6:
+fast-levenshtein@^2.0.6:
version "2.0.6"
resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917"
- integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=
+ integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==
fastq@^1.6.0:
version "1.13.0"
@@ -5401,13 +4672,6 @@ fastq@^1.6.0:
dependencies:
reusify "^1.0.4"
-fb-watchman@^2.0.0:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.1.tgz#fc84fb39d2709cf3ff6d743706157bb5708a8a85"
- integrity sha512-DkPJKQeY6kKwmuMretBhr7G6Vodr7bFwDYTXIkfG1gjvNpaxBTQV3PbXg6bR1c1UP4jPOX0jHUbbHANL9vRjVg==
- dependencies:
- bser "2.1.1"
-
fd-slicer@~1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.1.0.tgz#25c7c89cb1f9077f8891bbe61d8f390eae256f1e"
@@ -5415,41 +4679,26 @@ fd-slicer@~1.1.0:
dependencies:
pend "~1.2.0"
-figgy-pudding@^3.4.1, figgy-pudding@^3.5.1:
- version "3.5.2"
- resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.2.tgz#b4eee8148abb01dcf1d1ac34367d59e12fa61d6e"
- integrity sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw==
-
-figures@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962"
- integrity sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=
- dependencies:
- escape-string-regexp "^1.0.5"
-
-figures@^3.0.0:
+figures@3.2.0, figures@^3.0.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af"
integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==
dependencies:
escape-string-regexp "^1.0.5"
-file-entry-cache@^5.0.1:
- version "5.0.1"
- resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-5.0.1.tgz#ca0f6efa6dd3d561333fb14515065c2fafdf439c"
- integrity sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==
+file-entry-cache@^6.0.1:
+ version "6.0.1"
+ resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027"
+ integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==
dependencies:
- flat-cache "^2.0.1"
+ flat-cache "^3.0.4"
-fill-range@^4.0.0:
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7"
- integrity sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=
+filelist@^1.0.4:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/filelist/-/filelist-1.0.4.tgz#f78978a1e944775ff9e62e744424f215e58352b5"
+ integrity sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==
dependencies:
- extend-shallow "^2.0.1"
- is-number "^3.0.0"
- repeat-string "^1.6.1"
- to-regex-range "^2.1.0"
+ minimatch "^5.0.1"
fill-range@^7.0.1:
version "7.0.1"
@@ -5458,47 +4707,20 @@ fill-range@^7.0.1:
dependencies:
to-regex-range "^5.0.1"
-filter-obj@^1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/filter-obj/-/filter-obj-1.1.0.tgz#9b311112bc6c6127a16e016c6c5d7f19e0805c5b"
- integrity sha1-mzERErxsYSehbgFsbF1/GeCAXFs=
-
-find-cache-dir@^2.0.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-2.1.0.tgz#8d0f94cd13fe43c6c7c261a0d86115ca918c05f7"
- integrity sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==
- dependencies:
- commondir "^1.0.1"
- make-dir "^2.0.0"
- pkg-dir "^3.0.0"
-
-find-chrome-bin@^0.1.0:
- version "0.1.0"
- resolved "https://registry.yarnpkg.com/find-chrome-bin/-/find-chrome-bin-0.1.0.tgz#9fa3e6f86c275762c6d8be9da9af71e6fef05373"
- integrity sha512-XoFZwaEn1R3pE6zNG8kH64l2e093hgB9+78eEKPmJK0o1EXEou+25cEWdtu2qq4DBQPDSe90VJAWVI2Sz9pX6Q==
-
-find-up@^1.0.0:
- version "1.1.2"
- resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f"
- integrity sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=
+find-chrome-bin@2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/find-chrome-bin/-/find-chrome-bin-2.0.1.tgz#e91a5496b7118bb9e3b4c306b25bda9616b572cb"
+ integrity sha512-aDwC2y0dLxt0GFmQ+q8bqBCZ10VW9zYT/lNV806tRDqDAh5XpkTWulB96RKDHDuKu36m/dEvhmhD5IU237oOTg==
dependencies:
- path-exists "^2.0.0"
- pinkie-promise "^2.0.0"
+ "@puppeteer/browsers" "^1.8.0"
-find-up@^2.0.0, find-up@^2.1.0:
+find-up@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7"
integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c=
dependencies:
locate-path "^2.0.0"
-find-up@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73"
- integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==
- dependencies:
- locate-path "^3.0.0"
-
find-up@^4.0.0, find-up@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19"
@@ -5523,27 +4745,29 @@ find-yarn-workspace-root2@1.2.16:
micromatch "^4.0.2"
pkg-dir "^4.2.0"
-flat-cache@^2.0.1:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-2.0.1.tgz#5d296d6f04bda44a4630a301413bdbc2ec085ec0"
- integrity sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==
+flat-cache@^3.0.4:
+ version "3.2.0"
+ resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.2.0.tgz#2c0c2d5040c99b1632771a9d105725c0115363ee"
+ integrity sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==
dependencies:
- flatted "^2.0.0"
- rimraf "2.6.3"
- write "1.0.3"
+ flatted "^3.2.9"
+ keyv "^4.5.3"
+ rimraf "^3.0.2"
-flatted@^2.0.0:
- version "2.0.2"
- resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.2.tgz#4575b21e2bcee7434aa9be662f4b7b5f9c2b5138"
- integrity sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==
+flat@^5.0.2:
+ version "5.0.2"
+ resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241"
+ integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==
-flush-write-stream@^1.0.0:
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.1.1.tgz#8dd7d873a1babc207d94ead0c2e0e44276ebf2e8"
- integrity sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==
- dependencies:
- inherits "^2.0.3"
- readable-stream "^2.3.6"
+flatted@^3.2.9:
+ version "3.2.9"
+ resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.9.tgz#7eb4c67ca1ba34232ca9d2d93e9886e611ad7daf"
+ integrity sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==
+
+follow-redirects@^1.15.4:
+ version "1.15.5"
+ resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.5.tgz#54d4d6d062c0fa7d9d17feb008461550e3ba8020"
+ integrity sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==
fontkit@^2.0.2:
version "2.0.2"
@@ -5567,15 +4791,13 @@ for-each@^0.3.3:
dependencies:
is-callable "^1.1.3"
-for-in@^1.0.2:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80"
- integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=
-
-forever-agent@~0.6.1:
- version "0.6.1"
- resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91"
- integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=
+foreground-child@^3.1.0:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-3.1.1.tgz#1d173e776d75d2772fed08efe4a0de1ea1b12d0d"
+ integrity sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==
+ dependencies:
+ cross-spawn "^7.0.0"
+ signal-exit "^4.0.1"
form-data@^4.0.0:
version "4.0.0"
@@ -5586,35 +4808,20 @@ form-data@^4.0.0:
combined-stream "^1.0.8"
mime-types "^2.1.12"
-form-data@~2.3.2:
- version "2.3.3"
- resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6"
- integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==
- dependencies:
- asynckit "^0.4.0"
- combined-stream "^1.0.6"
- mime-types "^2.1.12"
-
-fragment-cache@^0.2.1:
- version "0.2.1"
- resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19"
- integrity sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=
- dependencies:
- map-cache "^0.2.2"
-
-from2@^2.1.0:
- version "2.3.0"
- resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af"
- integrity sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=
- dependencies:
- inherits "^2.0.1"
- readable-stream "^2.0.0"
-
fs-constants@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad"
integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==
+fs-extra@^11.1.0, fs-extra@^11.1.1:
+ version "11.2.0"
+ resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.2.0.tgz#e70e17dfad64232287d01929399e0ea7c86b0e5b"
+ integrity sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==
+ dependencies:
+ graceful-fs "^4.2.0"
+ jsonfile "^6.0.1"
+ universalify "^2.0.0"
+
fs-extra@^7.0.1:
version "7.0.1"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9"
@@ -5633,13 +4840,6 @@ fs-extra@^8.1.0:
jsonfile "^4.0.0"
universalify "^0.1.0"
-fs-minipass@^1.2.5:
- version "1.2.7"
- resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7"
- integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==
- dependencies:
- minipass "^2.6.0"
-
fs-minipass@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb"
@@ -5647,46 +4847,62 @@ fs-minipass@^2.0.0:
dependencies:
minipass "^3.0.0"
+fs-minipass@^3.0.0:
+ version "3.0.3"
+ resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-3.0.3.tgz#79a85981c4dc120065e96f62086bf6f9dc26cc54"
+ integrity sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw==
+ dependencies:
+ minipass "^7.0.3"
+
fs-readdir-recursive@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz#e32fc030a2ccee44a6b5371308da54be0b397d27"
integrity sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==
-fs-write-stream-atomic@^1.0.8:
- version "1.0.10"
- resolved "https://registry.yarnpkg.com/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz#b47df53493ef911df75731e70a9ded0189db40c9"
- integrity sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=
- dependencies:
- graceful-fs "^4.1.2"
- iferr "^0.1.5"
- imurmurhash "^0.1.4"
- readable-stream "1 || 2"
-
fs.realpath@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8=
-fsevents@^2.3.2, fsevents@~2.3.2:
- version "2.3.2"
- resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a"
- integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==
+fsevents@~2.3.2, fsevents@~2.3.3:
+ version "2.3.3"
+ resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6"
+ integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==
-function-bind@^1.1.1:
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
- integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==
+function-bind@^1.1.1, function-bind@^1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c"
+ integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==
-functional-red-black-tree@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327"
- integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=
+function.prototype.name@^1.1.5, function.prototype.name@^1.1.6:
+ version "1.1.6"
+ resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.6.tgz#cdf315b7d90ee77a4c6ee216c3c3362da07533fd"
+ integrity sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==
+ dependencies:
+ call-bind "^1.0.2"
+ define-properties "^1.2.0"
+ es-abstract "^1.22.1"
+ functions-have-names "^1.2.3"
functions-have-names@^1.2.3:
version "1.2.3"
resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834"
integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==
+gauge@^4.0.3:
+ version "4.0.4"
+ resolved "https://registry.yarnpkg.com/gauge/-/gauge-4.0.4.tgz#52ff0652f2bbf607a989793d53b751bef2328dce"
+ integrity sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg==
+ dependencies:
+ aproba "^1.0.3 || ^2.0.0"
+ color-support "^1.1.3"
+ console-control-strings "^1.1.0"
+ has-unicode "^2.0.1"
+ signal-exit "^3.0.7"
+ string-width "^4.2.3"
+ strip-ansi "^6.0.1"
+ wide-align "^1.1.5"
+
gauge@~2.7.3:
version "2.7.4"
resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7"
@@ -5701,11 +4917,6 @@ gauge@~2.7.3:
strip-ansi "^3.0.1"
wide-align "^1.1.0"
-genfun@^5.0.0:
- version "5.0.0"
- resolved "https://registry.yarnpkg.com/genfun/-/genfun-5.0.0.tgz#9dd9710a06900a5c4a5bf57aca5da4e52fe76537"
- integrity sha512-KGDOARWVga7+rnB3z9Sd2Letx515owfk0hSxHGuqjANb1M+x2bGZGqHLiozPsYMdM2OubeMni/Hpwmjq6qIUhA==
-
gensync@^1.0.0-beta.2:
version "1.0.0-beta.2"
resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0"
@@ -5716,63 +4927,51 @@ get-caller-file@^2.0.1, get-caller-file@^2.0.5:
resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e"
integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==
-get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@^1.2.0:
- version "1.2.1"
- resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.1.tgz#d295644fed4505fc9cde952c37ee12b477a83d82"
- integrity sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==
+get-func-name@^2.0.1, get-func-name@^2.0.2:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.2.tgz#0d7cf20cd13fda808669ffa88f4ffc7a3943fc41"
+ integrity sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==
+
+get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@^1.2.1, get-intrinsic@^1.2.2, get-intrinsic@^1.2.3:
+ version "1.2.4"
+ resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.4.tgz#e385f5a4b5227d449c3eabbad05494ef0abbeadd"
+ integrity sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==
dependencies:
- function-bind "^1.1.1"
- has "^1.0.3"
+ es-errors "^1.3.0"
+ function-bind "^1.1.2"
has-proto "^1.0.1"
has-symbols "^1.0.3"
+ hasown "^2.0.0"
get-own-enumerable-property-symbols@^3.0.0:
version "3.0.2"
resolved "https://registry.yarnpkg.com/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz#b5fde77f22cbe35f390b4e089922c50bce6ef664"
integrity sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g==
-get-package-type@^0.1.0:
- version "0.1.0"
- resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a"
- integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==
-
-get-pkg-repo@^1.0.0:
- version "1.4.0"
- resolved "https://registry.yarnpkg.com/get-pkg-repo/-/get-pkg-repo-1.4.0.tgz#c73b489c06d80cc5536c2c853f9e05232056972d"
- integrity sha1-xztInAbYDMVTbCyFP54FIyBWly0=
+get-pkg-repo@^4.2.1:
+ version "4.2.1"
+ resolved "https://registry.yarnpkg.com/get-pkg-repo/-/get-pkg-repo-4.2.1.tgz#75973e1c8050c73f48190c52047c4cee3acbf385"
+ integrity sha512-2+QbHjFRfGB74v/pYWjd5OhU3TDIC2Gv/YKUTk/tCvAz0pkn/Mz6P3uByuBimLOcPvN2jYdScl3xGFSrx0jEcA==
dependencies:
- hosted-git-info "^2.1.4"
- meow "^3.3.0"
- normalize-package-data "^2.3.0"
- parse-github-repo-url "^1.3.0"
+ "@hutson/parse-repository-url" "^3.0.0"
+ hosted-git-info "^4.0.0"
through2 "^2.0.0"
+ yargs "^16.2.0"
-get-port@^4.2.0:
- version "4.2.0"
- resolved "https://registry.yarnpkg.com/get-port/-/get-port-4.2.0.tgz#e37368b1e863b7629c43c5a323625f95cf24b119"
- integrity sha512-/b3jarXkH8KJoOMQc3uVGHASwGLPq3gSFJ7tgJm2diza+bydJPTGOibin2steecKeOylE8oY2JERlVWkAJO6yw==
-
-get-stdin@^4.0.1:
- version "4.0.1"
- resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe"
- integrity sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=
+get-port@5.1.1:
+ version "5.1.1"
+ resolved "https://registry.yarnpkg.com/get-port/-/get-port-5.1.1.tgz#0469ed07563479de6efb986baf053dcd7d4e3193"
+ integrity sha512-g/Q1aTSDOxFpchXC4i8ZWvxA1lnPqx/JHqcpIw0/LX9T8x/GBbi6YnlN5nhaKIFkT8oFsscUKgDJYxfwfS6QsQ==
get-stdin@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-5.0.1.tgz#122e161591e21ff4c52530305693f20e6393a398"
- integrity sha1-Ei4WFZHiH/TFJTAwVpPyDmOTo5g=
+ integrity sha512-jZV7n6jGE3Gt7fgSTJoz91Ak5MuTLwMwkoYdjxuJ/AmjIsE1UC03y/IWkZCQGEvVNS9qoRNwy5BCqxImv0FVeA==
-get-stdin@^6.0.0:
+get-stream@6.0.0:
version "6.0.0"
- resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b"
- integrity sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==
-
-get-stream@^4.0.0, get-stream@^4.1.0:
- version "4.1.0"
- resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5"
- integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==
- dependencies:
- pump "^3.0.0"
+ resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.0.tgz#3e0012cb6827319da2706e601a1583e8629a6718"
+ integrity sha512-A1B3Bh1UmL0bidM/YX2NsCOTnGJePL9rO/M+Mw3m9f2gUpfokS0hi5Eah0WSUEWZdZhIZtMjkIYS7mDfOqNHbg==
get-stream@^5.0.0, get-stream@^5.1.0:
version "5.2.0"
@@ -5786,6 +4985,11 @@ get-stream@^6.0.0:
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7"
integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==
+get-stream@^8.0.1:
+ version "8.0.1"
+ resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-8.0.1.tgz#def9dfd71742cd7754a7761ed43749a27d02eca2"
+ integrity sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==
+
get-symbol-description@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.0.tgz#7fdb81c900101fbd564dd5f1a30af5aadc1e58d6"
@@ -5794,28 +4998,24 @@ get-symbol-description@^1.0.0:
call-bind "^1.0.2"
get-intrinsic "^1.1.1"
-get-value@^2.0.3, get-value@^2.0.6:
- version "2.0.6"
- resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28"
- integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=
-
-getpass@^0.1.1:
- version "0.1.7"
- resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa"
- integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=
+get-uri@^6.0.1:
+ version "6.0.2"
+ resolved "https://registry.yarnpkg.com/get-uri/-/get-uri-6.0.2.tgz#e019521646f4a8ff6d291fbaea2c46da204bb75b"
+ integrity sha512-5KLucCJobh8vBY1K07EFV4+cPZH3mrV9YeAruUseCQKHB58SGjjT2l9/eA9LD082IiuMjSlFJEcdJ27TXvbZNw==
dependencies:
- assert-plus "^1.0.0"
+ basic-ftp "^5.0.2"
+ data-uri-to-buffer "^6.0.0"
+ debug "^4.3.4"
+ fs-extra "^8.1.0"
-git-raw-commits@2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-2.0.0.tgz#d92addf74440c14bcc5c83ecce3fb7f8a79118b5"
- integrity sha512-w4jFEJFgKXMQJ0H0ikBk2S+4KP2VEjhCvLCNqbNRQC8BgGWgLKNCO7a9K9LI+TVT7Gfoloje502sEnctibffgg==
+git-raw-commits@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-3.0.0.tgz#5432f053a9744f67e8db03dbc48add81252cfdeb"
+ integrity sha512-b5OHmZ3vAgGrDn/X0kS+9qCfNKWe4K/jFnhwzVWWg0/k5eLa3060tZShrRg8Dja5kPc+YjS0Gc6y7cRr44Lpjw==
dependencies:
- dargs "^4.0.1"
- lodash.template "^4.0.2"
- meow "^4.0.0"
- split2 "^2.0.0"
- through2 "^2.0.0"
+ dargs "^7.0.0"
+ meow "^8.1.2"
+ split2 "^3.2.2"
git-remote-origin-url@^2.0.0:
version "2.0.0"
@@ -5825,28 +5025,28 @@ git-remote-origin-url@^2.0.0:
gitconfiglocal "^1.0.0"
pify "^2.3.0"
-git-semver-tags@^2.0.3:
- version "2.0.3"
- resolved "https://registry.yarnpkg.com/git-semver-tags/-/git-semver-tags-2.0.3.tgz#48988a718acf593800f99622a952a77c405bfa34"
- integrity sha512-tj4FD4ww2RX2ae//jSrXZzrocla9db5h0V7ikPl1P/WwoZar9epdUhwR7XHXSgc+ZkNq72BEEerqQuicoEQfzA==
+git-semver-tags@^5.0.0:
+ version "5.0.1"
+ resolved "https://registry.yarnpkg.com/git-semver-tags/-/git-semver-tags-5.0.1.tgz#db748aa0e43d313bf38dcd68624d8443234e1c15"
+ integrity sha512-hIvOeZwRbQ+7YEUmCkHqo8FOLQZCEn18yevLHADlFPZY02KJGsu5FZt9YW/lybfK2uhWFI7Qg/07LekJiTv7iA==
dependencies:
- meow "^4.0.0"
- semver "^6.0.0"
+ meow "^8.1.2"
+ semver "^7.0.0"
-git-up@^4.0.0:
- version "4.0.2"
- resolved "https://registry.yarnpkg.com/git-up/-/git-up-4.0.2.tgz#10c3d731051b366dc19d3df454bfca3f77913a7c"
- integrity sha512-kbuvus1dWQB2sSW4cbfTeGpCMd8ge9jx9RKnhXhuJ7tnvT+NIrTVfYZxjtflZddQYcmdOTlkAcjmx7bor+15AQ==
+git-up@^7.0.0:
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/git-up/-/git-up-7.0.0.tgz#bace30786e36f56ea341b6f69adfd83286337467"
+ integrity sha512-ONdIrbBCFusq1Oy0sC71F5azx8bVkvtZtMJAsv+a6lz5YAmbNnLD6HAB4gptHZVLPR8S2/kVN6Gab7lryq5+lQ==
dependencies:
- is-ssh "^1.3.0"
- parse-url "^5.0.0"
+ is-ssh "^1.4.0"
+ parse-url "^8.1.0"
-git-url-parse@^11.1.2:
- version "11.4.4"
- resolved "https://registry.yarnpkg.com/git-url-parse/-/git-url-parse-11.4.4.tgz#5d747debc2469c17bc385719f7d0427802d83d77"
- integrity sha512-Y4o9o7vQngQDIU9IjyCmRJBin5iYjI5u9ZITnddRZpD7dcCFQj2sL2XuMNbLRE4b4B/4ENPsp2Q8P44fjAZ0Pw==
+git-url-parse@13.1.0:
+ version "13.1.0"
+ resolved "https://registry.yarnpkg.com/git-url-parse/-/git-url-parse-13.1.0.tgz#07e136b5baa08d59fabdf0e33170de425adf07b4"
+ integrity sha512-5FvPJP/70WkIprlUZ33bm4UAaFdjcLkJLpWft1BeZKqwR0uhhNGoKwlUaPtVb4LxCSQ++erHapRak9kWGj+FCA==
dependencies:
- git-up "^4.0.0"
+ git-up "^7.0.0"
gitconfiglocal@^1.0.0:
version "1.0.0"
@@ -5855,32 +5055,49 @@ gitconfiglocal@^1.0.0:
dependencies:
ini "^1.3.2"
-glob-parent@^3.1.0:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae"
- integrity sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=
- dependencies:
- is-glob "^3.1.0"
- path-dirname "^1.0.0"
-
-glob-parent@^5.0.0, glob-parent@^5.1.2, glob-parent@~5.1.2:
+glob-parent@5.1.2, glob-parent@^5.1.2, glob-parent@~5.1.2:
version "5.1.2"
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4"
integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==
dependencies:
is-glob "^4.0.1"
-glob-to-regexp@^0.3.0:
- version "0.3.0"
- resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab"
- integrity sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=
+glob-parent@^6.0.2:
+ version "6.0.2"
+ resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3"
+ integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==
+ dependencies:
+ is-glob "^4.0.3"
glob-to-regexp@^0.4.1:
version "0.4.1"
resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e"
integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==
-glob@^7.1.1, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@^7.2.0:
+glob@7.1.4:
+ version "7.1.4"
+ resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255"
+ integrity sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==
+ dependencies:
+ fs.realpath "^1.0.0"
+ inflight "^1.0.4"
+ inherits "2"
+ minimatch "^3.0.4"
+ once "^1.3.0"
+ path-is-absolute "^1.0.0"
+
+glob@^10.2.2, glob@^10.3.10:
+ version "10.3.10"
+ resolved "https://registry.yarnpkg.com/glob/-/glob-10.3.10.tgz#0351ebb809fd187fe421ab96af83d3a70715df4b"
+ integrity sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==
+ dependencies:
+ foreground-child "^3.1.0"
+ jackspeak "^2.3.5"
+ minimatch "^9.0.1"
+ minipass "^5.0.0 || ^6.0.2 || ^7.0.0"
+ path-scurry "^1.10.1"
+
+glob@^7.1.3, glob@^7.2.0:
version "7.2.3"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b"
integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==
@@ -5892,19 +5109,61 @@ glob@^7.1.1, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@^7.2.0:
once "^1.3.0"
path-is-absolute "^1.0.0"
+glob@^8.0.1, glob@^8.0.3:
+ version "8.1.0"
+ resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e"
+ integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==
+ dependencies:
+ fs.realpath "^1.0.0"
+ inflight "^1.0.4"
+ inherits "2"
+ minimatch "^5.0.1"
+ once "^1.3.0"
+
+glob@^9.2.0:
+ version "9.3.5"
+ resolved "https://registry.yarnpkg.com/glob/-/glob-9.3.5.tgz#ca2ed8ca452781a3009685607fdf025a899dfe21"
+ integrity sha512-e1LleDykUz2Iu+MTYdkSsuWX8lvAjAcs0Xef0lNIu0S2wOAzuTxCJtcd9S3cijlwYF18EsU3rzb8jPVobxDh9Q==
+ dependencies:
+ fs.realpath "^1.0.0"
+ minimatch "^8.0.2"
+ minipass "^4.2.4"
+ path-scurry "^1.6.1"
+
globals@^11.1.0:
version "11.12.0"
resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e"
integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==
-globals@^12.1.0:
- version "12.4.0"
- resolved "https://registry.yarnpkg.com/globals/-/globals-12.4.0.tgz#a18813576a41b00a24a97e7f815918c2e19925f8"
- integrity sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==
+globals@^13.19.0:
+ version "13.24.0"
+ resolved "https://registry.yarnpkg.com/globals/-/globals-13.24.0.tgz#8432a19d78ce0c1e833949c36adb345400bb1171"
+ integrity sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==
dependencies:
- type-fest "^0.8.1"
+ type-fest "^0.20.2"
+
+globalthis@^1.0.3:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.3.tgz#5852882a52b80dc301b0660273e1ed082f0b6ccf"
+ integrity sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==
+ dependencies:
+ define-properties "^1.1.3"
+
+globby@10.0.1:
+ version "10.0.1"
+ resolved "https://registry.yarnpkg.com/globby/-/globby-10.0.1.tgz#4782c34cb75dd683351335c5829cc3420e606b22"
+ integrity sha512-sSs4inE1FB2YQiymcmTv6NWENryABjUNPeWhOvmn4SjtKybglsyPZxFB3U1/+L1bYi0rNZDqCLlHyLYDl1Pq5A==
+ dependencies:
+ "@types/glob" "^7.1.1"
+ array-union "^2.1.0"
+ dir-glob "^3.0.1"
+ fast-glob "^3.0.3"
+ glob "^7.1.3"
+ ignore "^5.1.1"
+ merge2 "^1.2.3"
+ slash "^3.0.0"
-globby@^11.0.0, globby@^11.0.4:
+globby@11.1.0, globby@^11.0.0, globby@^11.1.0:
version "11.1.0"
resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b"
integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==
@@ -5916,24 +5175,22 @@ globby@^11.0.0, globby@^11.0.4:
merge2 "^1.4.1"
slash "^3.0.0"
-globby@^9.2.0:
- version "9.2.0"
- resolved "https://registry.yarnpkg.com/globby/-/globby-9.2.0.tgz#fd029a706c703d29bdd170f4b6db3a3f7a7cb63d"
- integrity sha512-ollPHROa5mcxDEkwg6bPt3QbEf4pDQSNtd6JPL1YvOvAo/7/0VAm9TccUeoTmarjPw4pfUthSCqcyfNB1I3ZSg==
+globby@^14.0.0:
+ version "14.0.0"
+ resolved "https://registry.yarnpkg.com/globby/-/globby-14.0.0.tgz#ea9c062a3614e33f516804e778590fcf055256b9"
+ integrity sha512-/1WM/LNHRAOH9lZta77uGbq0dAEQM+XjNesWwhlERDVenqothRbnzTrL3/LrIoEPPjeUHC3vrS6TwoyxeHs7MQ==
dependencies:
- "@types/glob" "^7.1.1"
- array-union "^1.0.2"
- dir-glob "^2.2.2"
- fast-glob "^2.2.6"
- glob "^7.1.3"
- ignore "^4.0.3"
- pify "^4.0.1"
- slash "^2.0.0"
+ "@sindresorhus/merge-streams" "^1.0.0"
+ fast-glob "^3.3.2"
+ ignore "^5.2.4"
+ path-type "^5.0.0"
+ slash "^5.1.0"
+ unicorn-magic "^0.1.0"
glur@^1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/glur/-/glur-1.1.2.tgz#f20ea36db103bfc292343921f1f91e83c3467689"
- integrity sha1-8g6jbbEDv8KSNDkh8fkeg8NGdok=
+ integrity sha512-l+8esYHTKOx2G/Aao4lEQ0bnHWg4fWtJbVoZZT9Knxi01pB8C80BR85nONLFwkkQoFRCmXY+BUcGZN3yZ2QsRA==
gopd@^1.0.1:
version "1.0.1"
@@ -5942,7 +5199,7 @@ gopd@^1.0.1:
dependencies:
get-intrinsic "^1.1.3"
-graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.5, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.2, graceful-fs@^4.2.4, graceful-fs@^4.2.9:
+graceful-fs@4.2.11, graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.5, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.9:
version "4.2.11"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3"
integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==
@@ -5952,40 +5209,32 @@ grapheme-splitter@^1.0.4:
resolved "https://registry.yarnpkg.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e"
integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==
-handlebars@^4.7.6:
- version "4.7.7"
- resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.7.tgz#9ce33416aad02dbd6c8fafa8240d5d98004945a1"
- integrity sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==
+graphemer@^1.4.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6"
+ integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==
+
+handlebars@^4.7.7:
+ version "4.7.8"
+ resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.8.tgz#41c42c18b1be2365439188c77c6afae71c0cd9e9"
+ integrity sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==
dependencies:
minimist "^1.2.5"
- neo-async "^2.6.0"
+ neo-async "^2.6.2"
source-map "^0.6.1"
wordwrap "^1.0.0"
optionalDependencies:
uglify-js "^3.1.4"
-har-schema@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92"
- integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=
-
-har-validator@~5.1.3:
- version "5.1.5"
- resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.5.tgz#1f0803b9f8cb20c0fa13822df1ecddb36bde1efd"
- integrity sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==
- dependencies:
- ajv "^6.12.3"
- har-schema "^2.0.0"
-
hard-rejection@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/hard-rejection/-/hard-rejection-2.1.0.tgz#1c6eda5c1685c63942766d79bb40ae773cecd883"
integrity sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==
-has-bigints@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.1.tgz#64fe6acb020673e3b78db035a5af69aa9d07b113"
- integrity sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==
+has-bigints@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa"
+ integrity sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==
has-flag@^3.0.0:
version "3.0.0"
@@ -5997,91 +5246,74 @@ has-flag@^4.0.0:
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b"
integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==
-has-property-descriptors@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz#610708600606d36961ed04c196193b6a607fa861"
- integrity sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==
+has-property-descriptors@^1.0.0, has-property-descriptors@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz#52ba30b6c5ec87fd89fa574bc1c39125c6f65340"
+ integrity sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==
dependencies:
- get-intrinsic "^1.1.1"
+ get-intrinsic "^1.2.2"
has-proto@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.1.tgz#1885c1305538958aff469fef37937c22795408e0"
integrity sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==
-has-symbols@^1.0.1, has-symbols@^1.0.2, has-symbols@^1.0.3:
+has-symbols@^1.0.1, has-symbols@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8"
integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==
-has-tostringtag@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25"
- integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==
+has-tostringtag@^1.0.0, has-tostringtag@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz#2cdc42d40bef2e5b4eeab7c01a73c54ce7ab5abc"
+ integrity sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==
dependencies:
- has-symbols "^1.0.2"
+ has-symbols "^1.0.3"
-has-unicode@^2.0.0, has-unicode@^2.0.1:
+has-unicode@2.0.1, has-unicode@^2.0.0, has-unicode@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9"
integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=
-has-value@^0.3.1:
- version "0.3.1"
- resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f"
- integrity sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=
- dependencies:
- get-value "^2.0.3"
- has-values "^0.1.4"
- isobject "^2.0.0"
-
-has-value@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177"
- integrity sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=
+hasown@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.0.tgz#f4c513d454a57b7c7e1650778de226b11700546c"
+ integrity sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==
dependencies:
- get-value "^2.0.6"
- has-values "^1.0.0"
- isobject "^3.0.0"
+ function-bind "^1.1.2"
-has-values@^0.1.4:
- version "0.1.4"
- resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771"
- integrity sha1-bWHeldkd/Km5oCCJrThL/49it3E=
+hosted-git-info@^2.1.4:
+ version "2.8.8"
+ resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.8.tgz#7539bd4bc1e0e0a895815a2e0262420b12858488"
+ integrity sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==
-has-values@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f"
- integrity sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=
+hosted-git-info@^3.0.6:
+ version "3.0.8"
+ resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-3.0.8.tgz#6e35d4cc87af2c5f816e4cb9ce350ba87a3f370d"
+ integrity sha512-aXpmwoOhRBrw6X3j0h5RloK4x1OzsxMPyxqIHyNfSe2pypkVTZFpEiRoSipPEPlMrh0HW/XsjkJ5WgnCirpNUw==
dependencies:
- is-number "^3.0.0"
- kind-of "^4.0.0"
+ lru-cache "^6.0.0"
-has@^1.0.3:
- version "1.0.3"
- resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796"
- integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==
+hosted-git-info@^4.0.0, hosted-git-info@^4.0.1:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-4.1.0.tgz#827b82867e9ff1c8d0c4d9d53880397d2c86d224"
+ integrity sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==
dependencies:
- function-bind "^1.1.1"
+ lru-cache "^6.0.0"
-homedir-polyfill@^1.0.1:
- version "1.0.3"
- resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz#743298cef4e5af3e194161fbadcc2151d3a058e8"
- integrity sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==
+hosted-git-info@^6.0.0:
+ version "6.1.1"
+ resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-6.1.1.tgz#629442c7889a69c05de604d52996b74fe6f26d58"
+ integrity sha512-r0EI+HBMcXadMrugk0GCQ+6BQV39PiWAZVfq7oIckeGiN7sjRGyQxPdft3nQekFTCQbYxLBH+/axZMeH8UX6+w==
dependencies:
- parse-passwd "^1.0.0"
-
-hosted-git-info@^2.1.4, hosted-git-info@^2.7.1:
- version "2.8.8"
- resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.8.tgz#7539bd4bc1e0e0a895815a2e0262420b12858488"
- integrity sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==
+ lru-cache "^7.5.1"
-hosted-git-info@^4.0.1:
- version "4.0.2"
- resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-4.0.2.tgz#5e425507eede4fea846b7262f0838456c4209961"
- integrity sha512-c9OGXbZ3guC/xOlCg1Ci/VgWlwsqDv1yMQL1CWqXDL0hDjXuNcq0zuR4xqPSuasI3kqFDhqSyTjREz5gzq0fXg==
+hosted-git-info@^7.0.0:
+ version "7.0.1"
+ resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-7.0.1.tgz#9985fcb2700467fecf7f33a4d4874e30680b5322"
+ integrity sha512-+K84LB1DYwMHoHSgaOY/Jfhw3ucPmSET5v98Ke/HdNSw4a0UktWzyW1mjhjpuxxTqOOsfWT/7iVshHmVZ4IpOA==
dependencies:
- lru-cache "^6.0.0"
+ lru-cache "^10.0.1"
hsl-to-hex@^1.0.0:
version "1.0.0"
@@ -6095,30 +5327,17 @@ hsl-to-rgb-for-reals@^1.1.0:
resolved "https://registry.yarnpkg.com/hsl-to-rgb-for-reals/-/hsl-to-rgb-for-reals-1.1.1.tgz#e1eb23f6b78016e3722431df68197e6dcdc016d9"
integrity sha512-LgOWAkrN0rFaQpfdWBQlv/VhkOxb5AsBjk6NQVx4yEzWS923T07X0M1Y0VNko2H52HeSpZrZNNMJ0aFqsdVzQg==
-html-encoding-sniffer@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz#2cb1a8cf0db52414776e5b2a7a04d5dd98158de9"
- integrity sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==
+html-encoding-sniffer@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-4.0.0.tgz#696df529a7cfd82446369dc5193e590a3735b448"
+ integrity sha512-Y22oTqIU4uuPgEemfz7NDJz6OeKf12Lsu+QC+s3BVpda64lTiMYCyGwg5ki4vFxkMwQdeZDl2adZoqUgdFuTgQ==
dependencies:
- whatwg-encoding "^2.0.0"
+ whatwg-encoding "^3.1.1"
-html-escaper@^2.0.0:
- version "2.0.2"
- resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453"
- integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==
-
-http-cache-semantics@^3.8.1:
- version "3.8.1"
- resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz#39b0e16add9b605bf0a9ef3d9daaf4843b4cacd2"
- integrity sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==
-
-http-proxy-agent@^2.1.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz#e4821beef5b2142a2026bd73926fe537631c5405"
- integrity sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg==
- dependencies:
- agent-base "4"
- debug "3.1.0"
+http-cache-semantics@^4.1.1:
+ version "4.1.1"
+ resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz#abe02fcb2985460bf0323be664436ec3476a6d5a"
+ integrity sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==
http-proxy-agent@^5.0.0:
version "5.0.0"
@@ -6129,32 +5348,15 @@ http-proxy-agent@^5.0.0:
agent-base "6"
debug "4"
-http-signature@~1.2.0:
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1"
- integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=
- dependencies:
- assert-plus "^1.0.0"
- jsprim "^1.2.2"
- sshpk "^1.7.0"
-
-https-proxy-agent@5.0.0:
- version "5.0.0"
- resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz#e2a90542abb68a762e0a0850f6c9edadfd8506b2"
- integrity sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==
- dependencies:
- agent-base "6"
- debug "4"
-
-https-proxy-agent@^2.2.3:
- version "2.2.4"
- resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz#4ee7a737abd92678a293d9b34a1af4d0d08c787b"
- integrity sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg==
+http-proxy-agent@^7.0.0:
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-7.0.0.tgz#e9096c5afd071a3fce56e6252bb321583c124673"
+ integrity sha512-+ZT+iBxVUQ1asugqnD6oWoRiS25AkjNfG085dKJGtGxkdwLQrMKU5wJr2bOOFAXzKcTuqq+7fZlTMgG3SRfIYQ==
dependencies:
- agent-base "^4.3.0"
- debug "^3.1.0"
+ agent-base "^7.1.0"
+ debug "^4.3.4"
-https-proxy-agent@^5.0.0, https-proxy-agent@^5.0.1:
+https-proxy-agent@^5.0.0:
version "5.0.1"
resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6"
integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==
@@ -6162,6 +5364,14 @@ https-proxy-agent@^5.0.0, https-proxy-agent@^5.0.1:
agent-base "6"
debug "4"
+https-proxy-agent@^7.0.1, https-proxy-agent@^7.0.2:
+ version "7.0.2"
+ resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz#e2645b846b90e96c6e6f347fb5b2e41f1590b09b"
+ integrity sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==
+ dependencies:
+ agent-base "^7.0.2"
+ debug "4"
+
human-id@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/human-id/-/human-id-1.0.2.tgz#e654d4b2b0d8b07e45da9f6020d8af17ec0a5df3"
@@ -6177,6 +5387,11 @@ human-signals@^2.1.0:
resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0"
integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==
+human-signals@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-5.0.0.tgz#42665a284f9ae0dade3ba41ebc37eb4b852f3a28"
+ integrity sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==
+
humanize-ms@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/humanize-ms/-/humanize-ms-1.2.1.tgz#c46e3159a293f6b896da29316d8b6fe8bb79bbed"
@@ -6184,10 +5399,10 @@ humanize-ms@^1.2.1:
dependencies:
ms "^2.0.0"
-husky@^7.0.4:
- version "7.0.4"
- resolved "https://registry.yarnpkg.com/husky/-/husky-7.0.4.tgz#242048245dc49c8fb1bf0cc7cfb98dd722531535"
- integrity sha512-vbaCKN2QLtP/vD4yvs6iz6hBEo6wkSzs8HpRah1Z6aGmF2KW5PdYuAd7uX5a+OyBZHBhd+TFLqgjUgytQr4RvQ==
+husky@^9.0.0:
+ version "9.0.10"
+ resolved "https://registry.yarnpkg.com/husky/-/husky-9.0.10.tgz#ddca8908deb5f244e9286865ebc80b54387672c2"
+ integrity sha512-TQGNknoiy6bURzIO77pPRu+XHi6zI7T93rX+QnJsoYFf3xdjKOur+IlfqzJGMHIK/wXrLg+GsvMs8Op7vI2jVA==
hyphen@^1.6.4:
version "1.6.4"
@@ -6213,37 +5428,26 @@ ieee754@^1.1.13, ieee754@^1.2.1:
resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352"
integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==
-iferr@^0.1.5:
- version "0.1.5"
- resolved "https://registry.yarnpkg.com/iferr/-/iferr-0.1.5.tgz#c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501"
- integrity sha1-xg7taebY/bazEEofy8ocGS3FtQE=
-
-ignore-walk@^3.0.1:
- version "3.0.3"
- resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.3.tgz#017e2447184bfeade7c238e4aefdd1e8f95b1e37"
- integrity sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw==
+ignore-walk@^5.0.1:
+ version "5.0.1"
+ resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-5.0.1.tgz#5f199e23e1288f518d90358d461387788a154776"
+ integrity sha512-yemi4pMf51WKT7khInJqAvsIGzoqYXblnsz0ql8tM+yi1EKYTY1evX4NAbJrLL/Aanr2HyZeluqU+Oi7MGHokw==
dependencies:
- minimatch "^3.0.4"
-
-ignore@^4.0.3, ignore@^4.0.6:
- version "4.0.6"
- resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc"
- integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==
+ minimatch "^5.0.1"
-ignore@^5.2.0:
- version "5.2.0"
- resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a"
- integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==
-
-import-fresh@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-2.0.0.tgz#d81355c15612d386c61f9ddd3922d4304822a546"
- integrity sha1-2BNVwVYS04bGH53dOSLUMEgipUY=
+ignore-walk@^6.0.4:
+ version "6.0.4"
+ resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-6.0.4.tgz#89950be94b4f522225eb63a13c56badb639190e9"
+ integrity sha512-t7sv42WkwFkyKbivUCglsQW5YWMskWtbEf4MNKX5u/CCWHKSPzN4FtBQGsQZgCLbxOzpVlcbWVK5KB3auIOjSw==
dependencies:
- caller-path "^2.0.0"
- resolve-from "^3.0.0"
+ minimatch "^9.0.0"
+
+ignore@^5.0.4, ignore@^5.1.1, ignore@^5.2.0, ignore@^5.2.4:
+ version "5.3.0"
+ resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.0.tgz#67418ae40d34d6999c95ff56016759c718c82f78"
+ integrity sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==
-import-fresh@^3.0.0, import-fresh@^3.2.1:
+import-fresh@^3.2.1, import-fresh@^3.3.0:
version "3.3.0"
resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b"
integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==
@@ -6251,15 +5455,7 @@ import-fresh@^3.0.0, import-fresh@^3.2.1:
parent-module "^1.0.0"
resolve-from "^4.0.0"
-import-local@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/import-local/-/import-local-2.0.0.tgz#55070be38a5993cf18ef6db7e961f5bee5c5a09d"
- integrity sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ==
- dependencies:
- pkg-dir "^3.0.0"
- resolve-cwd "^2.0.0"
-
-import-local@^3.0.2:
+import-local@3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.1.0.tgz#b4479df8a5fd44f6cdce24070675676063c95cb4"
integrity sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==
@@ -6272,28 +5468,11 @@ imurmurhash@^0.1.4:
resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
integrity sha1-khi5srkoojixPcT7a21XbyMUU+o=
-indent-string@^2.1.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80"
- integrity sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=
- dependencies:
- repeating "^2.0.0"
-
-indent-string@^3.0.0:
- version "3.2.0"
- resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-3.2.0.tgz#4a5fd6d27cc332f37e5419a504dbb837105c9289"
- integrity sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=
-
indent-string@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251"
integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==
-infer-owner@^1.0.3, infer-owner@^1.0.4:
- version "1.0.4"
- resolved "https://registry.yarnpkg.com/infer-owner/-/infer-owner-1.0.4.tgz#c4cefcaa8e51051c2a40ba2ce8a3d27295af9467"
- integrity sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==
-
inflight@^1.0.4:
version "1.0.6"
resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
@@ -6302,97 +5481,70 @@ inflight@^1.0.4:
once "^1.3.0"
wrappy "1"
-inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3:
+inherits@2, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3:
version "2.0.4"
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
-ini@^1.3.2, ini@^1.3.4:
+ini@^1.3.2, ini@^1.3.8:
version "1.3.8"
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c"
integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==
-init-package-json@^1.10.3:
- version "1.10.3"
- resolved "https://registry.yarnpkg.com/init-package-json/-/init-package-json-1.10.3.tgz#45ffe2f610a8ca134f2bd1db5637b235070f6cbe"
- integrity sha512-zKSiXKhQveNteyhcj1CoOP8tqp1QuxPIPBl8Bid99DGLFqA1p87M6lNgfjJHSBoWJJlidGOv5rWjyYKEB3g2Jw==
- dependencies:
- glob "^7.1.1"
- npm-package-arg "^4.0.0 || ^5.0.0 || ^6.0.0"
- promzard "^0.3.0"
- read "~1.0.1"
- read-package-json "1 || 2"
- semver "2.x || 3.x || 4 || 5"
- validate-npm-package-license "^3.0.1"
- validate-npm-package-name "^3.0.0"
-
-inquirer@^6.2.0:
- version "6.5.2"
- resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.5.2.tgz#ad50942375d036d327ff528c08bd5fab089928ca"
- integrity sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ==
+init-package-json@5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/init-package-json/-/init-package-json-5.0.0.tgz#030cf0ea9c84cfc1b0dc2e898b45d171393e4b40"
+ integrity sha512-kBhlSheBfYmq3e0L1ii+VKe3zBTLL5lDCDWR+f9dLmEGSB3MqLlMlsolubSsyI88Bg6EA+BIMlomAnQ1SwgQBw==
dependencies:
- ansi-escapes "^3.2.0"
- chalk "^2.4.2"
- cli-cursor "^2.1.0"
- cli-width "^2.0.0"
- external-editor "^3.0.3"
- figures "^2.0.0"
- lodash "^4.17.12"
- mute-stream "0.0.7"
- run-async "^2.2.0"
- rxjs "^6.4.0"
- string-width "^2.1.0"
- strip-ansi "^5.1.0"
- through "^2.3.6"
+ npm-package-arg "^10.0.0"
+ promzard "^1.0.0"
+ read "^2.0.0"
+ read-package-json "^6.0.0"
+ semver "^7.3.5"
+ validate-npm-package-license "^3.0.4"
+ validate-npm-package-name "^5.0.0"
-inquirer@^7.0.0:
- version "7.3.3"
- resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.3.3.tgz#04d176b2af04afc157a83fd7c100e98ee0aad003"
- integrity sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA==
+inquirer@^8.2.4:
+ version "8.2.6"
+ resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-8.2.6.tgz#733b74888195d8d400a67ac332011b5fae5ea562"
+ integrity sha512-M1WuAmb7pn9zdFRtQYk26ZBoY043Sse0wVDdk4Bppr+JOXyQYybdtvK+l9wUibhtjdjvtoiNy8tk+EgsYIUqKg==
dependencies:
ansi-escapes "^4.2.1"
- chalk "^4.1.0"
+ chalk "^4.1.1"
cli-cursor "^3.1.0"
cli-width "^3.0.0"
external-editor "^3.0.3"
figures "^3.0.0"
- lodash "^4.17.19"
+ lodash "^4.17.21"
mute-stream "0.0.8"
+ ora "^5.4.1"
run-async "^2.4.0"
- rxjs "^6.6.0"
+ rxjs "^7.5.5"
string-width "^4.1.0"
strip-ansi "^6.0.0"
through "^2.3.6"
+ wrap-ansi "^6.0.1"
-internal-slot@^1.0.3, internal-slot@^1.0.4:
- version "1.0.5"
- resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.5.tgz#f2a2ee21f668f8627a4667f309dc0f4fb6674986"
- integrity sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==
+internal-slot@^1.0.5:
+ version "1.0.7"
+ resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.7.tgz#c06dcca3ed874249881007b0a5523b172a190802"
+ integrity sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==
dependencies:
- get-intrinsic "^1.2.0"
- has "^1.0.3"
+ es-errors "^1.3.0"
+ hasown "^2.0.0"
side-channel "^1.0.4"
-ip@1.1.5:
- version "1.1.5"
- resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a"
- integrity sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=
-
-is-accessor-descriptor@^0.1.6:
- version "0.1.6"
- resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6"
- integrity sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=
- dependencies:
- kind-of "^3.0.2"
+ip@^1.1.8:
+ version "1.1.8"
+ resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.8.tgz#ae05948f6b075435ed3307acce04629da8cdbf48"
+ integrity sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg==
-is-accessor-descriptor@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656"
- integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==
- dependencies:
- kind-of "^6.0.0"
+ip@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.0.tgz#4cf4ab182fee2314c75ede1276f8c80b479936da"
+ integrity sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==
-is-arguments@^1.0.4, is-arguments@^1.1.1:
+is-arguments@^1.0.4:
version "1.1.1"
resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.1.tgz#15b3f88fda01f2a97fec84ca761a560f123efa9b"
integrity sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==
@@ -6400,14 +5552,13 @@ is-arguments@^1.0.4, is-arguments@^1.1.1:
call-bind "^1.0.2"
has-tostringtag "^1.0.0"
-is-array-buffer@^3.0.1, is-array-buffer@^3.0.2:
- version "3.0.2"
- resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.2.tgz#f2653ced8412081638ecb0ebbd0c41c6e0aecbbe"
- integrity sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==
+is-array-buffer@^3.0.2, is-array-buffer@^3.0.4:
+ version "3.0.4"
+ resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.4.tgz#7a1f92b3d61edd2bc65d24f130530ea93d7fae98"
+ integrity sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==
dependencies:
call-bind "^1.0.2"
- get-intrinsic "^1.2.0"
- is-typed-array "^1.1.10"
+ get-intrinsic "^1.2.1"
is-arrayish@^0.2.1:
version "0.2.1"
@@ -6419,6 +5570,13 @@ is-arrayish@^0.3.1:
resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.3.2.tgz#4574a2ae56f7ab206896fb431eaeed066fdf8f03"
integrity sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==
+is-async-function@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/is-async-function/-/is-async-function-2.0.0.tgz#8e4418efd3e5d3a6ebb0164c05ef5afb69aa9646"
+ integrity sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA==
+ dependencies:
+ has-tostringtag "^1.0.0"
+
is-bigint@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.1.tgz#6923051dfcbc764278540b9ce0e6b3213aa5ebc2"
@@ -6438,50 +5596,31 @@ is-boolean-object@^1.1.0:
dependencies:
call-bind "^1.0.0"
-is-buffer@^1.1.5:
- version "1.1.6"
- resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be"
- integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==
+is-builtin-module@^3.2.1:
+ version "3.2.1"
+ resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-3.2.1.tgz#f03271717d8654cfcaf07ab0463faa3571581169"
+ integrity sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==
+ dependencies:
+ builtin-modules "^3.3.0"
-is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.4:
+is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7:
version "1.2.7"
resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055"
integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==
-is-ci@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c"
- integrity sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==
- dependencies:
- ci-info "^2.0.0"
-
-is-ci@^3.0.1:
+is-ci@3.0.1, is-ci@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-3.0.1.tgz#db6ecbed1bd659c43dac0f45661e7674103d1867"
integrity sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==
dependencies:
ci-info "^3.2.0"
-is-core-module@^2.2.0:
- version "2.2.0"
- resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.2.0.tgz#97037ef3d52224d85163f5597b2b63d9afed981a"
- integrity sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==
- dependencies:
- has "^1.0.3"
-
-is-data-descriptor@^0.1.4:
- version "0.1.4"
- resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56"
- integrity sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=
- dependencies:
- kind-of "^3.0.2"
-
-is-data-descriptor@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7"
- integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==
+is-core-module@^2.13.0, is-core-module@^2.13.1, is-core-module@^2.5.0, is-core-module@^2.8.1:
+ version "2.13.1"
+ resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.1.tgz#ad0d7532c6fea9da1ebdc82742d74525c6273384"
+ integrity sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==
dependencies:
- kind-of "^6.0.0"
+ hasown "^2.0.0"
is-date-object@^1.0.1, is-date-object@^1.0.5:
version "1.0.5"
@@ -6490,50 +5629,22 @@ is-date-object@^1.0.1, is-date-object@^1.0.5:
dependencies:
has-tostringtag "^1.0.0"
-is-descriptor@^0.1.0:
- version "0.1.6"
- resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca"
- integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==
- dependencies:
- is-accessor-descriptor "^0.1.6"
- is-data-descriptor "^0.1.4"
- kind-of "^5.0.0"
-
-is-descriptor@^1.0.0, is-descriptor@^1.0.2:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec"
- integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==
- dependencies:
- is-accessor-descriptor "^1.0.0"
- is-data-descriptor "^1.0.0"
- kind-of "^6.0.2"
-
-is-directory@^0.3.1:
- version "0.3.1"
- resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1"
- integrity sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=
-
-is-extendable@^0.1.0, is-extendable@^0.1.1:
- version "0.1.1"
- resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89"
- integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=
-
-is-extendable@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4"
- integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==
- dependencies:
- is-plain-object "^2.0.4"
+is-docker@^2.0.0, is-docker@^2.1.1:
+ version "2.2.1"
+ resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa"
+ integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==
-is-extglob@^2.1.0, is-extglob@^2.1.1:
+is-extglob@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"
integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=
-is-finite@^1.0.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.1.0.tgz#904135c77fb42c0641d6aa1bcdbc4daa8da082f3"
- integrity sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==
+is-finalizationregistry@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/is-finalizationregistry/-/is-finalizationregistry-1.0.2.tgz#c8749b65f17c133313e661b1289b95ad3dbd62e6"
+ integrity sha512-0by5vtUJs8iFQb5TYUHHPudOR+qXYIMKtiUzvLIZITZUjknFmziyBJuLhVRc+Ds0dREFlskDNJKYIdIzu/9pfw==
+ dependencies:
+ call-bind "^1.0.2"
is-fullwidth-code-point@^1.0.0:
version "1.0.0"
@@ -6542,43 +5653,36 @@ is-fullwidth-code-point@^1.0.0:
dependencies:
number-is-nan "^1.0.0"
-is-fullwidth-code-point@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f"
- integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=
-
is-fullwidth-code-point@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d"
integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==
-is-generator-fn@^2.0.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118"
- integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==
-
-is-generator-function@^1.0.7:
+is-generator-function@^1.0.10, is-generator-function@^1.0.7:
version "1.0.10"
resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.10.tgz#f1558baf1ac17e0deea7c0415c438351ff2b3c72"
integrity sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==
dependencies:
has-tostringtag "^1.0.0"
-is-glob@^3.1.0:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a"
- integrity sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=
- dependencies:
- is-extglob "^2.1.0"
-
-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"
- integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==
+is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1:
+ version "4.0.3"
+ resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084"
+ integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==
dependencies:
is-extglob "^2.1.1"
-is-map@^2.0.1, is-map@^2.0.2:
+is-interactive@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-1.0.0.tgz#cea6e6ae5c870a7b0a0004070b7b587e0252912e"
+ integrity sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==
+
+is-lambda@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/is-lambda/-/is-lambda-1.0.1.tgz#3d9877899e6a53efc0160504cde15f82e6f061d5"
+ integrity sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==
+
+is-map@^2.0.1:
version "2.0.2"
resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.2.tgz#00922db8c9bf73e81b7a335827bc2a43f2b91127"
integrity sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==
@@ -6596,29 +5700,22 @@ is-nan@^1.2.1:
call-bind "^1.0.0"
define-properties "^1.1.3"
-is-negative-zero@^2.0.1:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.1.tgz#3de746c18dda2319241a53675908d8f766f11c24"
- integrity sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==
+is-negative-zero@^2.0.2:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150"
+ integrity sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==
is-number-object@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.4.tgz#36ac95e741cf18b283fc1ddf5e83da798e3ec197"
integrity sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw==
-is-number@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195"
- integrity sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=
- dependencies:
- kind-of "^3.0.2"
-
is-number@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b"
integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==
-is-obj@^1.0.0, is-obj@^1.0.1:
+is-obj@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f"
integrity sha1-PkcprB9f3gJc19g6iW2rn09n2w8=
@@ -6628,18 +5725,28 @@ is-obj@^2.0.0:
resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-2.0.0.tgz#473fb05d973705e3fd9620545018ca8e22ef4982"
integrity sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==
+is-path-inside@^3.0.3:
+ version "3.0.3"
+ resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283"
+ integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==
+
is-plain-obj@^1.0.0, is-plain-obj@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e"
integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4=
-is-plain-object@^2.0.3, is-plain-object@^2.0.4:
+is-plain-object@^2.0.4:
version "2.0.4"
resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677"
integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==
dependencies:
isobject "^3.0.1"
+is-plain-object@^3.0.0:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-3.0.1.tgz#662d92d24c0aa4302407b0d45d21f2251c85f85b"
+ integrity sha512-Xnpx182SBMrr/aBik8y+GuR4U1L9FqMSojwDQwPMmxyC6bvEqly9UBCxhauBF5vNh2gwWJNX6oDV7O+OM4z34g==
+
is-plain-object@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-5.0.0.tgz#4427f50ab3429e9025ea7d52e9043a9ef4159344"
@@ -6650,7 +5757,7 @@ is-potential-custom-element-name@^1.0.1:
resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz#171ed6f19e3ac554394edf78caa05784a45bebb5"
integrity sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==
-is-reference@^1.2.1:
+is-reference@1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/is-reference/-/is-reference-1.2.1.tgz#8b2dac0b371f4bc994fdeaba9eb542d03002d0b7"
integrity sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==
@@ -6670,35 +5777,40 @@ is-regexp@^1.0.0:
resolved "https://registry.yarnpkg.com/is-regexp/-/is-regexp-1.0.0.tgz#fd2d883545c46bac5a633e7b9a09e87fa2cb5069"
integrity sha1-/S2INUXEa6xaYz57mgnof6LLUGk=
-is-set@^2.0.1, is-set@^2.0.2:
+is-set@^2.0.1:
version "2.0.2"
resolved "https://registry.yarnpkg.com/is-set/-/is-set-2.0.2.tgz#90755fa4c2562dc1c5d4024760d6119b94ca18ec"
integrity sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g==
-is-shared-array-buffer@^1.0.1, is-shared-array-buffer@^1.0.2:
+is-shared-array-buffer@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz#8f259c573b60b6a32d4058a1a07430c0a7344c79"
integrity sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==
dependencies:
call-bind "^1.0.2"
-is-ssh@^1.3.0:
- version "1.3.2"
- resolved "https://registry.yarnpkg.com/is-ssh/-/is-ssh-1.3.2.tgz#a4b82ab63d73976fd8263cceee27f99a88bdae2b"
- integrity sha512-elEw0/0c2UscLrNG+OAorbP539E3rhliKPg+hDMWN9VwrDXfYK+4PBEykDPfxlYYtQvl84TascnQyobfQLHEhQ==
+is-ssh@^1.4.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/is-ssh/-/is-ssh-1.4.0.tgz#4f8220601d2839d8fa624b3106f8e8884f01b8b2"
+ integrity sha512-x7+VxdxOdlV3CYpjvRLBv5Lo9OJerlYanjwFrPR9fuGPjCiNiCzFgAWpiLAohSbsnH4ZAys3SBh+hq5rJosxUQ==
dependencies:
- protocols "^1.1.0"
+ protocols "^2.0.1"
-is-stream@^1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44"
- integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ=
+is-stream@2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.0.tgz#bde9c32680d6fae04129d6ac9d921ce7815f78e3"
+ integrity sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==
is-stream@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077"
integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==
+is-stream@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-3.0.0.tgz#e6bfd7aa6bef69f4f472ce9bb681e3e57b4319ac"
+ integrity sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==
+
is-string@^1.0.5, is-string@^1.0.7:
version "1.0.7"
resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd"
@@ -6727,21 +5839,12 @@ is-text-path@^1.0.1:
dependencies:
text-extensions "^1.0.0"
-is-typed-array@^1.1.10, is-typed-array@^1.1.3:
- version "1.1.10"
- resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.10.tgz#36a5b5cb4189b575d1a3e4b08536bfb485801e3f"
- integrity sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==
+is-typed-array@^1.1.10, is-typed-array@^1.1.12, is-typed-array@^1.1.13, is-typed-array@^1.1.3, is-typed-array@^1.1.9:
+ version "1.1.13"
+ resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.13.tgz#d6c5ca56df62334959322d7d7dd1cca50debe229"
+ integrity sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==
dependencies:
- available-typed-arrays "^1.0.5"
- call-bind "^1.0.2"
- for-each "^0.3.3"
- gopd "^1.0.1"
- has-tostringtag "^1.0.0"
-
-is-typedarray@~1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a"
- integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=
+ which-typed-array "^1.1.14"
is-unicode-supported@^0.1.0:
version "0.1.0"
@@ -6753,17 +5856,12 @@ is-url@^1.2.4:
resolved "https://registry.yarnpkg.com/is-url/-/is-url-1.2.4.tgz#04a4df46d28c4cff3d73d01ff06abeb318a1aa52"
integrity sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww==
-is-utf8@^0.2.0:
- version "0.2.1"
- resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72"
- integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=
-
is-weakmap@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/is-weakmap/-/is-weakmap-2.0.1.tgz#5008b59bdc43b698201d18f62b37b2ca243e8cf2"
integrity sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA==
-is-weakref@^1.0.1:
+is-weakref@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2"
integrity sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==
@@ -6778,507 +5876,131 @@ is-weakset@^2.0.1:
call-bind "^1.0.2"
get-intrinsic "^1.1.1"
-is-windows@^1.0.0, is-windows@^1.0.2:
+is-windows@^1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d"
integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==
-isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
- integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=
+is-wsl@^2.2.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271"
+ integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==
+ dependencies:
+ is-docker "^2.0.0"
isarray@^2.0.5:
version "2.0.5"
resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723"
integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==
+isarray@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
+ integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=
+
isexe@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
- integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=
+ integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==
-isobject@^2.0.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89"
- integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=
- dependencies:
- isarray "1.0.0"
+isexe@^3.1.1:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/isexe/-/isexe-3.1.1.tgz#4a407e2bd78ddfb14bea0c27c6f7072dde775f0d"
+ integrity sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==
-isobject@^3.0.0, isobject@^3.0.1:
+isobject@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df"
integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8=
-isstream@~0.1.2:
- version "0.1.2"
- resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"
- integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=
-
-istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0:
- version "3.2.0"
- resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz#189e7909d0a39fa5a3dfad5b03f71947770191d3"
- integrity sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==
-
-istanbul-lib-instrument@^5.0.4, istanbul-lib-instrument@^5.1.0:
- version "5.2.1"
- resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz#d10c8885c2125574e1c231cacadf955675e1ce3d"
- integrity sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==
- dependencies:
- "@babel/core" "^7.12.3"
- "@babel/parser" "^7.14.7"
- "@istanbuljs/schema" "^0.1.2"
- istanbul-lib-coverage "^3.2.0"
- semver "^6.3.0"
-
-istanbul-lib-report@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz#7518fe52ea44de372f460a76b5ecda9ffb73d8a6"
- integrity sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==
- dependencies:
- istanbul-lib-coverage "^3.0.0"
- make-dir "^3.0.0"
- supports-color "^7.1.0"
-
-istanbul-lib-source-maps@^4.0.0:
- version "4.0.1"
- resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz#895f3a709fcfba34c6de5a42939022f3e4358551"
- integrity sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==
- dependencies:
- debug "^4.1.1"
- istanbul-lib-coverage "^3.0.0"
- source-map "^0.6.1"
-
-istanbul-reports@^3.1.3:
- version "3.1.5"
- resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.1.5.tgz#cc9a6ab25cb25659810e4785ed9d9fb742578bae"
- integrity sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==
- dependencies:
- html-escaper "^2.0.0"
- istanbul-lib-report "^3.0.0"
-
-jest-changed-files@^29.5.0:
- version "29.5.0"
- resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-29.5.0.tgz#e88786dca8bf2aa899ec4af7644e16d9dcf9b23e"
- integrity sha512-IFG34IUMUaNBIxjQXF/iu7g6EcdMrGRRxaUSw92I/2g2YC6vCdTltl4nHvt7Ci5nSJwXIkCu8Ka1DKF+X7Z1Ag==
- dependencies:
- execa "^5.0.0"
- p-limit "^3.1.0"
-
-jest-circus@^29.5.0:
- version "29.5.0"
- resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-29.5.0.tgz#b5926989449e75bff0d59944bae083c9d7fb7317"
- integrity sha512-gq/ongqeQKAplVxqJmbeUOJJKkW3dDNPY8PjhJ5G0lBRvu0e3EWGxGy5cI4LAGA7gV2UHCtWBI4EMXK8c9nQKA==
+iterator.prototype@^1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/iterator.prototype/-/iterator.prototype-1.1.2.tgz#5e29c8924f01916cb9335f1ff80619dcff22b0c0"
+ integrity sha512-DR33HMMr8EzwuRL8Y9D3u2BMj8+RqSE850jfGu59kS7tbmPLzGkZmVSfyCFSDxuZiEY6Rzt3T2NA/qU+NwVj1w==
dependencies:
- "@jest/environment" "^29.5.0"
- "@jest/expect" "^29.5.0"
- "@jest/test-result" "^29.5.0"
- "@jest/types" "^29.5.0"
- "@types/node" "*"
- chalk "^4.0.0"
- co "^4.6.0"
- dedent "^0.7.0"
- is-generator-fn "^2.0.0"
- jest-each "^29.5.0"
- jest-matcher-utils "^29.5.0"
- jest-message-util "^29.5.0"
- jest-runtime "^29.5.0"
- jest-snapshot "^29.5.0"
- jest-util "^29.5.0"
- p-limit "^3.1.0"
- pretty-format "^29.5.0"
- pure-rand "^6.0.0"
- slash "^3.0.0"
- stack-utils "^2.0.3"
+ define-properties "^1.2.1"
+ get-intrinsic "^1.2.1"
+ has-symbols "^1.0.3"
+ reflect.getprototypeof "^1.0.4"
+ set-function-name "^2.0.1"
-jest-cli@^29.5.0:
- version "29.5.0"
- resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-29.5.0.tgz#b34c20a6d35968f3ee47a7437ff8e53e086b4a67"
- integrity sha512-L1KcP1l4HtfwdxXNFCL5bmUbLQiKrakMUriBEcc1Vfz6gx31ORKdreuWvmQVBit+1ss9NNR3yxjwfwzZNdQXJw==
+jackspeak@^2.3.5:
+ version "2.3.6"
+ resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-2.3.6.tgz#647ecc472238aee4b06ac0e461acc21a8c505ca8"
+ integrity sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==
dependencies:
- "@jest/core" "^29.5.0"
- "@jest/test-result" "^29.5.0"
- "@jest/types" "^29.5.0"
- chalk "^4.0.0"
- exit "^0.1.2"
- graceful-fs "^4.2.9"
- import-local "^3.0.2"
- jest-config "^29.5.0"
- jest-util "^29.5.0"
- jest-validate "^29.5.0"
- prompts "^2.0.1"
- yargs "^17.3.1"
-
-jest-config@^29.5.0:
- version "29.5.0"
- resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-29.5.0.tgz#3cc972faec8c8aaea9ae158c694541b79f3748da"
- integrity sha512-kvDUKBnNJPNBmFFOhDbm59iu1Fii1Q6SxyhXfvylq3UTHbg6o7j/g8k2dZyXWLvfdKB1vAPxNZnMgtKJcmu3kA==
- dependencies:
- "@babel/core" "^7.11.6"
- "@jest/test-sequencer" "^29.5.0"
- "@jest/types" "^29.5.0"
- babel-jest "^29.5.0"
- chalk "^4.0.0"
- ci-info "^3.2.0"
- deepmerge "^4.2.2"
- glob "^7.1.3"
- graceful-fs "^4.2.9"
- jest-circus "^29.5.0"
- jest-environment-node "^29.5.0"
- jest-get-type "^29.4.3"
- jest-regex-util "^29.4.3"
- jest-resolve "^29.5.0"
- jest-runner "^29.5.0"
- jest-util "^29.5.0"
- jest-validate "^29.5.0"
- micromatch "^4.0.4"
- parse-json "^5.2.0"
- pretty-format "^29.5.0"
- slash "^3.0.0"
- strip-json-comments "^3.1.1"
+ "@isaacs/cliui" "^8.0.2"
+ optionalDependencies:
+ "@pkgjs/parseargs" "^0.11.0"
-jest-diff@^29.5.0:
- version "29.5.0"
- resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-29.5.0.tgz#e0d83a58eb5451dcc1fa61b1c3ee4e8f5a290d63"
- integrity sha512-LtxijLLZBduXnHSniy0WMdaHjmQnt3g5sa16W4p0HqukYTTsyTW3GD1q41TyGl5YFXj/5B2U6dlh5FM1LIMgxw==
+jake@^10.8.5:
+ version "10.8.7"
+ resolved "https://registry.yarnpkg.com/jake/-/jake-10.8.7.tgz#63a32821177940c33f356e0ba44ff9d34e1c7d8f"
+ integrity sha512-ZDi3aP+fG/LchyBzUM804VjddnwfSfsdeYkwt8NcbKRvo4rFkjhs456iLFn3k2ZUWvNe4i48WACDbza8fhq2+w==
dependencies:
- chalk "^4.0.0"
- diff-sequences "^29.4.3"
- jest-get-type "^29.4.3"
- pretty-format "^29.5.0"
+ async "^3.2.3"
+ chalk "^4.0.2"
+ filelist "^1.0.4"
+ minimatch "^3.1.2"
-jest-docblock@^29.4.3:
- version "29.4.3"
- resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-29.4.3.tgz#90505aa89514a1c7dceeac1123df79e414636ea8"
- integrity sha512-fzdTftThczeSD9nZ3fzA/4KkHtnmllawWrXO69vtI+L9WjEIuXWs4AmyME7lN5hU7dB0sHhuPfcKofRsUb/2Fg==
+jay-peg@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/jay-peg/-/jay-peg-1.0.1.tgz#f09b8615886cb1ce61c364c16e203f566eeaa779"
+ integrity sha512-zBfjkGbuuNXk8JW+rEePpPEbRRjupS8q+5yPak7kjy3e2GvvNwsLle9okEFvfGyZA6HvtSSiYrVd1/jgnYebaQ==
dependencies:
- detect-newline "^3.0.0"
+ restructure "^3.0.0"
-jest-each@^29.5.0:
- version "29.5.0"
- resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-29.5.0.tgz#fc6e7014f83eac68e22b7195598de8554c2e5c06"
- integrity sha512-HM5kIJ1BTnVt+DQZ2ALp3rzXEl+g726csObrW/jpEGl+CDSSQpOJJX2KE/vEg8cxcMXdyEPu6U4QX5eruQv5hA==
+"jest-diff@>=29.4.3 < 30", jest-diff@^29.4.1:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-29.7.0.tgz#017934a66ebb7ecf6f205e84699be10afd70458a"
+ integrity sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==
dependencies:
- "@jest/types" "^29.5.0"
chalk "^4.0.0"
- jest-get-type "^29.4.3"
- jest-util "^29.5.0"
- pretty-format "^29.5.0"
-
-jest-environment-jsdom@^29.5.0:
- version "29.5.0"
- resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-29.5.0.tgz#cfe86ebaf1453f3297b5ff3470fbe94739c960cb"
- integrity sha512-/KG8yEK4aN8ak56yFVdqFDzKNHgF4BAymCx2LbPNPsUshUlfAl0eX402Xm1pt+eoG9SLZEUVifqXtX8SK74KCw==
- dependencies:
- "@jest/environment" "^29.5.0"
- "@jest/fake-timers" "^29.5.0"
- "@jest/types" "^29.5.0"
- "@types/jsdom" "^20.0.0"
- "@types/node" "*"
- jest-mock "^29.5.0"
- jest-util "^29.5.0"
- jsdom "^20.0.0"
-
-jest-environment-node@^29.5.0:
- version "29.5.0"
- resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-29.5.0.tgz#f17219d0f0cc0e68e0727c58b792c040e332c967"
- integrity sha512-ExxuIK/+yQ+6PRGaHkKewYtg6hto2uGCgvKdb2nfJfKXgZ17DfXjvbZ+jA1Qt9A8EQSfPnt5FKIfnOO3u1h9qw==
- dependencies:
- "@jest/environment" "^29.5.0"
- "@jest/fake-timers" "^29.5.0"
- "@jest/types" "^29.5.0"
- "@types/node" "*"
- jest-mock "^29.5.0"
- jest-util "^29.5.0"
-
-jest-fetch-mock@^2.1.1:
- version "2.1.2"
- resolved "https://registry.yarnpkg.com/jest-fetch-mock/-/jest-fetch-mock-2.1.2.tgz#1260b347918e3931c4ec743ceaf60433da661bd0"
- integrity sha512-tcSR4Lh2bWLe1+0w/IwvNxeDocMI/6yIA2bijZ0fyWxC4kQ18lckQ1n7Yd40NKuisGmcGBRFPandRXrW/ti/Bw==
- dependencies:
- cross-fetch "^2.2.2"
- promise-polyfill "^7.1.1"
-
-jest-get-type@^29.4.3:
- version "29.4.3"
- resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-29.4.3.tgz#1ab7a5207c995161100b5187159ca82dd48b3dd5"
- integrity sha512-J5Xez4nRRMjk8emnTpWrlkyb9pfRQQanDrvWHhsR1+VUfbwxi30eVcZFlcdGInRibU4G5LwHXpI7IRHU0CY+gg==
+ diff-sequences "^29.6.3"
+ jest-get-type "^29.6.3"
+ pretty-format "^29.7.0"
-jest-haste-map@^29.5.0:
- version "29.5.0"
- resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-29.5.0.tgz#69bd67dc9012d6e2723f20a945099e972b2e94de"
- integrity sha512-IspOPnnBro8YfVYSw6yDRKh/TiCdRngjxeacCps1cQ9cgVN6+10JUcuJ1EabrgYLOATsIAigxA0rLR9x/YlrSA==
- dependencies:
- "@jest/types" "^29.5.0"
- "@types/graceful-fs" "^4.1.3"
- "@types/node" "*"
- anymatch "^3.0.3"
- fb-watchman "^2.0.0"
- graceful-fs "^4.2.9"
- jest-regex-util "^29.4.3"
- jest-util "^29.5.0"
- jest-worker "^29.5.0"
- micromatch "^4.0.4"
- walker "^1.0.8"
- optionalDependencies:
- fsevents "^2.3.2"
+jest-get-type@^29.6.3:
+ version "29.6.3"
+ resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-29.6.3.tgz#36f499fdcea197c1045a127319c0481723908fd1"
+ integrity sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==
jest-image-snapshot@^6.1.0:
- version "6.1.0"
- resolved "https://registry.yarnpkg.com/jest-image-snapshot/-/jest-image-snapshot-6.1.0.tgz#96a17b00530e1358eae657f6c9bb948e29ee7510"
- integrity sha512-LZYoks6V1HAkYqyi80gUjMWVsa++Oy0fckAGMLBQseVweZT9AmJNKAINwHLqX1fpeMy2hTG5CCEe4IUX2N3Nmg==
+ version "6.4.0"
+ resolved "https://registry.yarnpkg.com/jest-image-snapshot/-/jest-image-snapshot-6.4.0.tgz#65831d13beb1680f3bba9fb28230fa53d76939be"
+ integrity sha512-IWGtSOnelwaVPd09STbJuLmnAwlBC/roJtTLGLb8M3TA0vfku3MRNEXmljTa1EMXqdRbA0oIWiqHFB1ttTGazQ==
dependencies:
chalk "^4.0.0"
get-stdin "^5.0.1"
glur "^1.1.2"
lodash "^4.17.4"
- mkdirp "^0.5.1"
pixelmatch "^5.1.0"
pngjs "^3.4.0"
rimraf "^2.6.2"
ssim.js "^3.1.1"
-jest-leak-detector@^29.5.0:
- version "29.5.0"
- resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-29.5.0.tgz#cf4bdea9615c72bac4a3a7ba7e7930f9c0610c8c"
- integrity sha512-u9YdeeVnghBUtpN5mVxjID7KbkKE1QU4f6uUwuxiY0vYRi9BUCLKlPEZfDGR67ofdFmDz9oPAy2G92Ujrntmow==
- dependencies:
- jest-get-type "^29.4.3"
- pretty-format "^29.5.0"
-
-jest-matcher-utils@^29.5.0:
- version "29.5.0"
- resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-29.5.0.tgz#d957af7f8c0692c5453666705621ad4abc2c59c5"
- integrity sha512-lecRtgm/rjIK0CQ7LPQwzCs2VwW6WAahA55YBuI+xqmhm7LAaxokSB8C97yJeYyT+HvQkH741StzpU41wohhWw==
- dependencies:
- chalk "^4.0.0"
- jest-diff "^29.5.0"
- jest-get-type "^29.4.3"
- pretty-format "^29.5.0"
-
-jest-message-util@^29.5.0:
- version "29.5.0"
- resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-29.5.0.tgz#1f776cac3aca332ab8dd2e3b41625435085c900e"
- integrity sha512-Kijeg9Dag6CKtIDA7O21zNTACqD5MD/8HfIV8pdD94vFyFuer52SigdC3IQMhab3vACxXMiFk+yMHNdbqtyTGA==
- dependencies:
- "@babel/code-frame" "^7.12.13"
- "@jest/types" "^29.5.0"
- "@types/stack-utils" "^2.0.0"
- chalk "^4.0.0"
- graceful-fs "^4.2.9"
- micromatch "^4.0.4"
- pretty-format "^29.5.0"
- slash "^3.0.0"
- stack-utils "^2.0.3"
-
-jest-mock@^29.5.0:
- version "29.5.0"
- resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-29.5.0.tgz#26e2172bcc71d8b0195081ff1f146ac7e1518aed"
- integrity sha512-GqOzvdWDE4fAV2bWQLQCkujxYWL7RxjCnj71b5VhDAGOevB3qj3Ovg26A5NI84ZpODxyzaozXLOh2NCgkbvyaw==
- dependencies:
- "@jest/types" "^29.5.0"
- "@types/node" "*"
- jest-util "^29.5.0"
-
-jest-pnp-resolver@^1.2.2:
- version "1.2.3"
- resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz#930b1546164d4ad5937d5540e711d4d38d4cad2e"
- integrity sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==
-
-jest-regex-util@^29.4.3:
- version "29.4.3"
- resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-29.4.3.tgz#a42616141e0cae052cfa32c169945d00c0aa0bb8"
- integrity sha512-O4FglZaMmWXbGHSQInfXewIsd1LMn9p3ZXB/6r4FOkyhX2/iP/soMG98jGvk/A3HAN78+5VWcBGO0BJAPRh4kg==
-
-jest-resolve-dependencies@^29.5.0:
- version "29.5.0"
- resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-29.5.0.tgz#f0ea29955996f49788bf70996052aa98e7befee4"
- integrity sha512-sjV3GFr0hDJMBpYeUuGduP+YeCRbd7S/ck6IvL3kQ9cpySYKqcqhdLLC2rFwrcL7tz5vYibomBrsFYWkIGGjOg==
- dependencies:
- jest-regex-util "^29.4.3"
- jest-snapshot "^29.5.0"
-
-jest-resolve@^29.5.0:
- version "29.5.0"
- resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-29.5.0.tgz#b053cc95ad1d5f6327f0ac8aae9f98795475ecdc"
- integrity sha512-1TzxJ37FQq7J10jPtQjcc+MkCkE3GBpBecsSUWJ0qZNJpmg6m0D9/7II03yJulm3H/fvVjgqLh/k2eYg+ui52w==
- dependencies:
- chalk "^4.0.0"
- graceful-fs "^4.2.9"
- jest-haste-map "^29.5.0"
- jest-pnp-resolver "^1.2.2"
- jest-util "^29.5.0"
- jest-validate "^29.5.0"
- resolve "^1.20.0"
- resolve.exports "^2.0.0"
- slash "^3.0.0"
-
-jest-runner@^29.5.0:
- version "29.5.0"
- resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-29.5.0.tgz#6a57c282eb0ef749778d444c1d758c6a7693b6f8"
- integrity sha512-m7b6ypERhFghJsslMLhydaXBiLf7+jXy8FwGRHO3BGV1mcQpPbwiqiKUR2zU2NJuNeMenJmlFZCsIqzJCTeGLQ==
- dependencies:
- "@jest/console" "^29.5.0"
- "@jest/environment" "^29.5.0"
- "@jest/test-result" "^29.5.0"
- "@jest/transform" "^29.5.0"
- "@jest/types" "^29.5.0"
- "@types/node" "*"
- chalk "^4.0.0"
- emittery "^0.13.1"
- graceful-fs "^4.2.9"
- jest-docblock "^29.4.3"
- jest-environment-node "^29.5.0"
- jest-haste-map "^29.5.0"
- jest-leak-detector "^29.5.0"
- jest-message-util "^29.5.0"
- jest-resolve "^29.5.0"
- jest-runtime "^29.5.0"
- jest-util "^29.5.0"
- jest-watcher "^29.5.0"
- jest-worker "^29.5.0"
- p-limit "^3.1.0"
- source-map-support "0.5.13"
-
-jest-runtime@^29.5.0:
- version "29.5.0"
- resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-29.5.0.tgz#c83f943ee0c1da7eb91fa181b0811ebd59b03420"
- integrity sha512-1Hr6Hh7bAgXQP+pln3homOiEZtCDZFqwmle7Ew2j8OlbkIu6uE3Y/etJQG8MLQs3Zy90xrp2C0BRrtPHG4zryw==
- dependencies:
- "@jest/environment" "^29.5.0"
- "@jest/fake-timers" "^29.5.0"
- "@jest/globals" "^29.5.0"
- "@jest/source-map" "^29.4.3"
- "@jest/test-result" "^29.5.0"
- "@jest/transform" "^29.5.0"
- "@jest/types" "^29.5.0"
- "@types/node" "*"
- chalk "^4.0.0"
- cjs-module-lexer "^1.0.0"
- collect-v8-coverage "^1.0.0"
- glob "^7.1.3"
- graceful-fs "^4.2.9"
- jest-haste-map "^29.5.0"
- jest-message-util "^29.5.0"
- jest-mock "^29.5.0"
- jest-regex-util "^29.4.3"
- jest-resolve "^29.5.0"
- jest-snapshot "^29.5.0"
- jest-util "^29.5.0"
- slash "^3.0.0"
- strip-bom "^4.0.0"
-
-jest-snapshot@^29.5.0:
- version "29.5.0"
- resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-29.5.0.tgz#c9c1ce0331e5b63cd444e2f95a55a73b84b1e8ce"
- integrity sha512-x7Wolra5V0tt3wRs3/ts3S6ciSQVypgGQlJpz2rsdQYoUKxMxPNaoHMGJN6qAuPJqS+2iQ1ZUn5kl7HCyls84g==
- dependencies:
- "@babel/core" "^7.11.6"
- "@babel/generator" "^7.7.2"
- "@babel/plugin-syntax-jsx" "^7.7.2"
- "@babel/plugin-syntax-typescript" "^7.7.2"
- "@babel/traverse" "^7.7.2"
- "@babel/types" "^7.3.3"
- "@jest/expect-utils" "^29.5.0"
- "@jest/transform" "^29.5.0"
- "@jest/types" "^29.5.0"
- "@types/babel__traverse" "^7.0.6"
- "@types/prettier" "^2.1.5"
- babel-preset-current-node-syntax "^1.0.0"
- chalk "^4.0.0"
- expect "^29.5.0"
- graceful-fs "^4.2.9"
- jest-diff "^29.5.0"
- jest-get-type "^29.4.3"
- jest-matcher-utils "^29.5.0"
- jest-message-util "^29.5.0"
- jest-util "^29.5.0"
- natural-compare "^1.4.0"
- pretty-format "^29.5.0"
- semver "^7.3.5"
-
-jest-util@^29.5.0:
- version "29.5.0"
- resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.5.0.tgz#24a4d3d92fc39ce90425311b23c27a6e0ef16b8f"
- integrity sha512-RYMgG/MTadOr5t8KdhejfvUU82MxsCu5MF6KuDUHl+NuwzUt+Sm6jJWxTJVrDR1j5M/gJVCPKQEpWXY+yIQ6lQ==
- dependencies:
- "@jest/types" "^29.5.0"
- "@types/node" "*"
- chalk "^4.0.0"
- ci-info "^3.2.0"
- graceful-fs "^4.2.9"
- picomatch "^2.2.3"
-
-jest-validate@^29.5.0:
- version "29.5.0"
- resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-29.5.0.tgz#8e5a8f36178d40e47138dc00866a5f3bd9916ffc"
- integrity sha512-pC26etNIi+y3HV8A+tUGr/lph9B18GnzSRAkPaaZJIE1eFdiYm6/CewuiJQ8/RlfHd1u/8Ioi8/sJ+CmbA+zAQ==
- dependencies:
- "@jest/types" "^29.5.0"
- camelcase "^6.2.0"
- chalk "^4.0.0"
- jest-get-type "^29.4.3"
- leven "^3.1.0"
- pretty-format "^29.5.0"
-
-jest-watcher@^29.5.0:
- version "29.5.0"
- resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-29.5.0.tgz#cf7f0f949828ba65ddbbb45c743a382a4d911363"
- integrity sha512-KmTojKcapuqYrKDpRwfqcQ3zjMlwu27SYext9pt4GlF5FUgB+7XE1mcCnSm6a4uUpFyQIkb6ZhzZvHl+jiBCiA==
- dependencies:
- "@jest/test-result" "^29.5.0"
- "@jest/types" "^29.5.0"
- "@types/node" "*"
- ansi-escapes "^4.2.1"
- chalk "^4.0.0"
- emittery "^0.13.1"
- jest-util "^29.5.0"
- string-length "^4.0.1"
-
-jest-worker@^26.2.1:
- version "26.6.2"
- resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-26.6.2.tgz#7f72cbc4d643c365e27b9fd775f9d0eaa9c7a8ed"
- integrity sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==
- dependencies:
- "@types/node" "*"
- merge-stream "^2.0.0"
- supports-color "^7.0.0"
-
-jest-worker@^27.4.1:
- version "27.4.6"
- resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.4.6.tgz#5d2d93db419566cb680752ca0792780e71b3273e"
- integrity sha512-gHWJF/6Xi5CTG5QCvROr6GcmpIqNYpDJyc8A1h/DyXqH1tD6SnRCM0d3U5msV31D2LB/U+E0M+W4oyvKV44oNw==
- dependencies:
- "@types/node" "*"
- merge-stream "^2.0.0"
- supports-color "^8.0.0"
-
-jest-worker@^29.5.0:
- version "29.5.0"
- resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-29.5.0.tgz#bdaefb06811bd3384d93f009755014d8acb4615d"
- integrity sha512-NcrQnevGoSp4b5kg+akIpthoAFHxPBcb5P6mYPY0fUNT+sSvmtu6jlkEle3anczUKIKEbMxFimk9oTP/tpIPgA==
+jest-worker@^27.4.5:
+ version "27.5.1"
+ resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.5.1.tgz#8d146f0900e8973b106b6f73cc1e9a8cb86f8db0"
+ integrity sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==
dependencies:
"@types/node" "*"
- jest-util "^29.5.0"
merge-stream "^2.0.0"
supports-color "^8.0.0"
-jest@^29.5.0:
- version "29.5.0"
- resolved "https://registry.yarnpkg.com/jest/-/jest-29.5.0.tgz#f75157622f5ce7ad53028f2f8888ab53e1f1f24e"
- integrity sha512-juMg3he2uru1QoXX078zTa7pO85QyB9xajZc6bU+d9yEGwrKX6+vGmJQ3UdVZsvTEUARIdObzH68QItim6OSSQ==
- dependencies:
- "@jest/core" "^29.5.0"
- "@jest/types" "^29.5.0"
- import-local "^3.0.2"
- jest-cli "^29.5.0"
-
"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
-js-yaml@^3.13.0, js-yaml@^3.13.1, js-yaml@^3.6.1:
+js-yaml@4.1.0, js-yaml@^4.1.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602"
+ integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==
+ dependencies:
+ argparse "^2.0.1"
+
+js-yaml@^3.10.0, js-yaml@^3.13.0, js-yaml@^3.13.1, js-yaml@^3.6.1:
version "3.14.1"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537"
integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==
@@ -7286,42 +6008,32 @@ js-yaml@^3.13.0, js-yaml@^3.13.1, js-yaml@^3.6.1:
argparse "^1.0.7"
esprima "^4.0.0"
-jsbn@~0.1.0:
- version "0.1.1"
- resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513"
- integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM=
-
-jsdom@^20.0.0:
- version "20.0.3"
- resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-20.0.3.tgz#886a41ba1d4726f67a8858028c99489fed6ad4db"
- integrity sha512-SYhBvTh89tTfCD/CRdSOm13mOBa42iTaTyfyEWBdKcGdPxPtLFBXuHR8XHb33YNYaP+lLbmSvBTsnoesCNJEsQ==
- dependencies:
- abab "^2.0.6"
- acorn "^8.8.1"
- acorn-globals "^7.0.0"
- cssom "^0.5.0"
- cssstyle "^2.3.0"
- data-urls "^3.0.2"
- decimal.js "^10.4.2"
- domexception "^4.0.0"
- escodegen "^2.0.0"
+jsdom@^23.2.0:
+ version "23.2.0"
+ resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-23.2.0.tgz#08083220146d41c467efa1c6969f02b525ba6c1d"
+ integrity sha512-L88oL7D/8ufIES+Zjz7v0aes+oBMh2Xnh3ygWvL0OaICOomKEPKuPnIfBJekiXr+BHbbMjrWn/xqrDQuxFTeyA==
+ dependencies:
+ "@asamuzakjp/dom-selector" "^2.0.1"
+ cssstyle "^4.0.1"
+ data-urls "^5.0.0"
+ decimal.js "^10.4.3"
form-data "^4.0.0"
- html-encoding-sniffer "^3.0.0"
- http-proxy-agent "^5.0.0"
- https-proxy-agent "^5.0.1"
+ html-encoding-sniffer "^4.0.0"
+ http-proxy-agent "^7.0.0"
+ https-proxy-agent "^7.0.2"
is-potential-custom-element-name "^1.0.1"
- nwsapi "^2.2.2"
- parse5 "^7.1.1"
+ parse5 "^7.1.2"
+ rrweb-cssom "^0.6.0"
saxes "^6.0.0"
symbol-tree "^3.2.4"
- tough-cookie "^4.1.2"
- w3c-xmlserializer "^4.0.0"
+ tough-cookie "^4.1.3"
+ w3c-xmlserializer "^5.0.0"
webidl-conversions "^7.0.0"
- whatwg-encoding "^2.0.0"
- whatwg-mimetype "^3.0.0"
- whatwg-url "^11.0.0"
- ws "^8.11.0"
- xml-name-validator "^4.0.0"
+ whatwg-encoding "^3.1.1"
+ whatwg-mimetype "^4.0.0"
+ whatwg-url "^14.0.0"
+ ws "^8.16.0"
+ xml-name-validator "^5.0.0"
jsesc@^2.5.1:
version "2.5.2"
@@ -7333,48 +6045,58 @@ jsesc@~0.5.0:
resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d"
integrity sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=
-json-parse-better-errors@^1.0.0, json-parse-better-errors@^1.0.1, json-parse-better-errors@^1.0.2:
+json-buffer@3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13"
+ integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==
+
+json-parse-better-errors@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9"
integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==
-json-parse-even-better-errors@^2.3.0:
+json-parse-even-better-errors@^2.3.0, json-parse-even-better-errors@^2.3.1:
version "2.3.1"
resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d"
integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==
+json-parse-even-better-errors@^3.0.0:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.1.tgz#02bb29fb5da90b5444581749c22cedd3597c6cb0"
+ integrity sha512-aatBvbL26wVUCLmbWdCpeu9iF5wOyWpagiKkInA+kfws3sWdBrTnsvN2CKcyCYyUrc7rebNBlK6+kteg7ksecg==
+
json-schema-traverse@^0.4.1:
version "0.4.1"
resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660"
integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==
-json-schema@0.2.3:
- version "0.2.3"
- resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13"
- integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=
-
json-stable-stringify-without-jsonify@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651"
integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=
-json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1:
+json-stringify-safe@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb"
integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=
-json5@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe"
- integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==
+json5@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.2.tgz#63d98d60f21b313b77c4d6da18bfa69d80e1d593"
+ integrity sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==
dependencies:
minimist "^1.2.0"
-json5@^2.2.2:
+json5@^2.2.2, json5@^2.2.3:
version "2.2.3"
resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283"
integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==
+jsonc-parser@3.2.0, jsonc-parser@^3.2.0:
+ version "3.2.0"
+ resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.0.tgz#31ff3f4c2b9793f89c67212627c51c6394f88e76"
+ integrity sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==
+
jsonfile@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb"
@@ -7382,122 +6104,184 @@ jsonfile@^4.0.0:
optionalDependencies:
graceful-fs "^4.1.6"
-jsonparse@^1.2.0:
+jsonfile@^6.0.1:
+ version "6.1.0"
+ resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae"
+ integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==
+ dependencies:
+ universalify "^2.0.0"
+ optionalDependencies:
+ graceful-fs "^4.1.6"
+
+jsonparse@^1.2.0, jsonparse@^1.3.1:
version "1.3.1"
resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280"
integrity sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=
-jsprim@^1.2.2:
- version "1.4.1"
- resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2"
- integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=
- dependencies:
- assert-plus "1.0.0"
- extsprintf "1.3.0"
- json-schema "0.2.3"
- verror "1.10.0"
-
-"jsx-ast-utils@^2.4.1 || ^3.0.0", jsx-ast-utils@^3.1.0:
- version "3.2.0"
- resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-3.2.0.tgz#41108d2cec408c3453c1bbe8a4aae9e1e2bd8f82"
- integrity sha512-EIsmt3O3ljsU6sot/J4E1zDRxfBNrhjyf/OKjlydwgEimQuznlM4Wv7U+ueONJMyEn1WRE0K8dhi3dVAXYT24Q==
- dependencies:
- array-includes "^3.1.2"
- object.assign "^4.1.2"
-
-kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0:
- version "3.2.2"
- resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64"
- integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=
+"jsx-ast-utils@^2.4.1 || ^3.0.0", jsx-ast-utils@^3.3.5:
+ version "3.3.5"
+ resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz#4766bd05a8e2a11af222becd19e15575e52a853a"
+ integrity sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==
dependencies:
- is-buffer "^1.1.5"
+ array-includes "^3.1.6"
+ array.prototype.flat "^1.3.1"
+ object.assign "^4.1.4"
+ object.values "^1.1.6"
-kind-of@^4.0.0:
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57"
- integrity sha1-IIE989cSkosgc3hpGkUGb65y3Vc=
+keyv@^4.5.3:
+ version "4.5.4"
+ resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93"
+ integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==
dependencies:
- is-buffer "^1.1.5"
-
-kind-of@^5.0.0:
- version "5.1.0"
- resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d"
- integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==
+ json-buffer "3.0.1"
-kind-of@^6.0.0, kind-of@^6.0.2, kind-of@^6.0.3:
+kind-of@^6.0.2, kind-of@^6.0.3:
version "6.0.3"
resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd"
integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==
-kleur@^3.0.3:
- version "3.0.3"
- resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e"
- integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==
-
kleur@^4.1.4:
version "4.1.5"
resolved "https://registry.yarnpkg.com/kleur/-/kleur-4.1.5.tgz#95106101795f7050c6c650f350c683febddb1780"
integrity sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==
-language-subtag-registry@~0.3.2:
- version "0.3.21"
- resolved "https://registry.yarnpkg.com/language-subtag-registry/-/language-subtag-registry-0.3.21.tgz#04ac218bea46f04cb039084602c6da9e788dd45a"
- integrity sha512-L0IqwlIXjilBVVYKFT37X9Ih11Um5NEl9cbJIuU/SwP/zEEAbBPOnEeeuxVMf45ydWQRDQN3Nqc96OgbH1K+Pg==
-
-language-tags@^1.0.5:
- version "1.0.5"
- resolved "https://registry.yarnpkg.com/language-tags/-/language-tags-1.0.5.tgz#d321dbc4da30ba8bf3024e040fa5c14661f9193a"
- integrity sha1-0yHbxNowuovzAk4ED6XBRmH5GTo=
- dependencies:
- language-subtag-registry "~0.3.2"
-
-lerna@^3.21.0:
- version "3.22.1"
- resolved "https://registry.yarnpkg.com/lerna/-/lerna-3.22.1.tgz#82027ac3da9c627fd8bf02ccfeff806a98e65b62"
- integrity sha512-vk1lfVRFm+UuEFA7wkLKeSF7Iz13W+N/vFd48aW2yuS7Kv0RbNm2/qcDPV863056LMfkRlsEe+QYOw3palj5Lg==
- dependencies:
- "@lerna/add" "3.21.0"
- "@lerna/bootstrap" "3.21.0"
- "@lerna/changed" "3.21.0"
- "@lerna/clean" "3.21.0"
- "@lerna/cli" "3.18.5"
- "@lerna/create" "3.22.0"
- "@lerna/diff" "3.21.0"
- "@lerna/exec" "3.21.0"
- "@lerna/import" "3.22.0"
- "@lerna/info" "3.21.0"
- "@lerna/init" "3.21.0"
- "@lerna/link" "3.21.0"
- "@lerna/list" "3.21.0"
- "@lerna/publish" "3.22.1"
- "@lerna/run" "3.21.0"
- "@lerna/version" "3.22.1"
- import-local "^2.0.0"
- npmlog "^4.1.2"
-
-leven@^3.1.0:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2"
- integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==
-
-levn@^0.3.0, levn@~0.3.0:
- version "0.3.0"
- resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee"
- integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=
+language-subtag-registry@^0.3.20:
+ version "0.3.22"
+ resolved "https://registry.yarnpkg.com/language-subtag-registry/-/language-subtag-registry-0.3.22.tgz#2e1500861b2e457eba7e7ae86877cbd08fa1fd1d"
+ integrity sha512-tN0MCzyWnoz/4nHS6uxdlFWoUZT7ABptwKPQ52Ea7URk6vll88bWBVhodtnlfEuCcKWNGoc+uGbw1cwa9IKh/w==
+
+language-tags@^1.0.9:
+ version "1.0.9"
+ resolved "https://registry.yarnpkg.com/language-tags/-/language-tags-1.0.9.tgz#1ffdcd0ec0fafb4b1be7f8b11f306ad0f9c08777"
+ integrity sha512-MbjN408fEndfiQXbFQ1vnd+1NoLDsnQW41410oQBXiyXDMYH5z505juWa4KUE1LqxRC7DgOgZDbKLxHIwm27hA==
+ dependencies:
+ language-subtag-registry "^0.3.20"
+
+lerna@^8.0.2:
+ version "8.0.2"
+ resolved "https://registry.yarnpkg.com/lerna/-/lerna-8.0.2.tgz#ef014c4daacb886a602af94e6e7ca8994e140e97"
+ integrity sha512-nnOIGI5V5Af9gfraNcMVoV1Fry/y7/h3nCQYk0/CMzBYDD+xbNL3DH8+c82AJkNR5ABslmpXjW4DLJ11/1b3CQ==
+ dependencies:
+ "@lerna/create" "8.0.2"
+ "@npmcli/run-script" "7.0.2"
+ "@nx/devkit" ">=17.1.2 < 18"
+ "@octokit/plugin-enterprise-rest" "6.0.1"
+ "@octokit/rest" "19.0.11"
+ byte-size "8.1.1"
+ chalk "4.1.0"
+ clone-deep "4.0.1"
+ cmd-shim "6.0.1"
+ columnify "1.6.0"
+ conventional-changelog-angular "7.0.0"
+ conventional-changelog-core "5.0.1"
+ conventional-recommended-bump "7.0.1"
+ cosmiconfig "^8.2.0"
+ dedent "0.7.0"
+ envinfo "7.8.1"
+ execa "5.0.0"
+ fs-extra "^11.1.1"
+ get-port "5.1.1"
+ get-stream "6.0.0"
+ git-url-parse "13.1.0"
+ glob-parent "5.1.2"
+ globby "11.1.0"
+ graceful-fs "4.2.11"
+ has-unicode "2.0.1"
+ import-local "3.1.0"
+ ini "^1.3.8"
+ init-package-json "5.0.0"
+ inquirer "^8.2.4"
+ is-ci "3.0.1"
+ is-stream "2.0.0"
+ jest-diff ">=29.4.3 < 30"
+ js-yaml "4.1.0"
+ libnpmaccess "7.0.2"
+ libnpmpublish "7.3.0"
+ load-json-file "6.2.0"
+ lodash "^4.17.21"
+ make-dir "4.0.0"
+ minimatch "3.0.5"
+ multimatch "5.0.0"
+ node-fetch "2.6.7"
+ npm-package-arg "8.1.1"
+ npm-packlist "5.1.1"
+ npm-registry-fetch "^14.0.5"
+ npmlog "^6.0.2"
+ nx ">=17.1.2 < 18"
+ p-map "4.0.0"
+ p-map-series "2.1.0"
+ p-pipe "3.1.0"
+ p-queue "6.6.2"
+ p-reduce "2.1.0"
+ p-waterfall "2.1.1"
+ pacote "^17.0.5"
+ pify "5.0.0"
+ read-cmd-shim "4.0.0"
+ read-package-json "6.0.4"
+ resolve-from "5.0.0"
+ rimraf "^4.4.1"
+ semver "^7.3.8"
+ signal-exit "3.0.7"
+ slash "3.0.0"
+ ssri "^9.0.1"
+ strong-log-transformer "2.1.0"
+ tar "6.1.11"
+ temp-dir "1.0.0"
+ typescript ">=3 < 6"
+ upath "2.0.1"
+ uuid "^9.0.0"
+ validate-npm-package-license "3.0.4"
+ validate-npm-package-name "5.0.0"
+ write-file-atomic "5.0.1"
+ write-pkg "4.0.0"
+ yargs "17.7.2"
+ yargs-parser "21.1.1"
+
+levn@^0.4.1:
+ version "0.4.1"
+ resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade"
+ integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==
dependencies:
- prelude-ls "~1.1.2"
- type-check "~0.3.2"
+ prelude-ls "^1.2.1"
+ type-check "~0.4.0"
-lilconfig@^2.0.3:
- version "2.0.4"
- resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.0.4.tgz#f4507d043d7058b380b6a8f5cb7bcd4b34cee082"
- integrity sha512-bfTIN7lEsiooCocSISTWXkiWJkRqtL9wYtYy+8EK3Y41qh3mpwPU0ycTOgjdY9ErwXCc8QyrQp82bdL0Xkm9yA==
+libnpmaccess@7.0.2:
+ version "7.0.2"
+ resolved "https://registry.yarnpkg.com/libnpmaccess/-/libnpmaccess-7.0.2.tgz#7f056c8c933dd9c8ba771fa6493556b53c5aac52"
+ integrity sha512-vHBVMw1JFMTgEk15zRsJuSAg7QtGGHpUSEfnbcRL1/gTBag9iEfJbyjpDmdJmwMhvpoLoNBtdAUCdGnaP32hhw==
+ dependencies:
+ npm-package-arg "^10.1.0"
+ npm-registry-fetch "^14.0.3"
+
+libnpmpublish@7.3.0:
+ version "7.3.0"
+ resolved "https://registry.yarnpkg.com/libnpmpublish/-/libnpmpublish-7.3.0.tgz#2ceb2b36866d75a6cd7b4aa748808169f4d17e37"
+ integrity sha512-fHUxw5VJhZCNSls0KLNEG0mCD2PN1i14gH5elGOgiVnU3VgTcRahagYP2LKI1m0tFCJ+XrAm0zVYyF5RCbXzcg==
+ dependencies:
+ ci-info "^3.6.1"
+ normalize-package-data "^5.0.0"
+ npm-package-arg "^10.1.0"
+ npm-registry-fetch "^14.0.3"
+ proc-log "^3.0.0"
+ semver "^7.3.7"
+ sigstore "^1.4.0"
+ ssri "^10.0.1"
+
+lilconfig@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-3.0.0.tgz#f8067feb033b5b74dab4602a5f5029420be749bc"
+ integrity sha512-K2U4W2Ff5ibV7j7ydLr+zLAkIg5JJ4lPn1Ltsdt+Tz/IjQ8buJ55pZAxoP34lqIiwtF9iAvtLv3JGv7CAyAg+g==
lines-and-columns@^1.1.6:
version "1.1.6"
resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00"
integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=
+lines-and-columns@~2.0.3:
+ version "2.0.4"
+ resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-2.0.4.tgz#d00318855905d2660d8c0822e3f5a4715855fc42"
+ integrity sha512-wM1+Z03eypVAVUCE7QdSqpVIvelbOakn1M0bPDoA4SGWPx3sNDVUiMo3L6To6WWGClB7VyXnhQ4Sn7gxiJbE6A==
+
lint-staged@^10.5.4:
version "10.5.4"
resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-10.5.4.tgz#cd153b5f0987d2371fc1d2847a409a2fe705b665"
@@ -7533,26 +6317,15 @@ listr2@^3.2.2:
through "^2.3.8"
wrap-ansi "^7.0.0"
-load-json-file@^1.0.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0"
- integrity sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=
- dependencies:
- graceful-fs "^4.1.2"
- parse-json "^2.2.0"
- pify "^2.0.0"
- pinkie-promise "^2.0.0"
- strip-bom "^2.0.0"
-
-load-json-file@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8"
- integrity sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=
+load-json-file@6.2.0:
+ version "6.2.0"
+ resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-6.2.0.tgz#5c7770b42cafa97074ca2848707c61662f4251a1"
+ integrity sha512-gUD/epcRms75Cw8RT1pUdHugZYM5ce64ucs2GEISABwkRsOQr0q2wm/MV2TKThycIe5e0ytRweW2RZxclogCdQ==
dependencies:
- graceful-fs "^4.1.2"
- parse-json "^2.2.0"
- pify "^2.0.0"
- strip-bom "^3.0.0"
+ graceful-fs "^4.1.15"
+ parse-json "^5.0.0"
+ strip-bom "^4.0.0"
+ type-fest "^0.6.0"
load-json-file@^4.0.0:
version "4.0.0"
@@ -7564,17 +6337,6 @@ load-json-file@^4.0.0:
pify "^3.0.0"
strip-bom "^3.0.0"
-load-json-file@^5.3.0:
- version "5.3.0"
- resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-5.3.0.tgz#4d3c1e01fa1c03ea78a60ac7af932c9ce53403f3"
- integrity sha512-cJGP40Jc/VXUsp8/OrnyKyTZ1y6v/dphm3bioS+RrKXjK2BB6wHUd6JptZEFDGgGahMT+InnZO5i1Ei9mpC8Bw==
- dependencies:
- graceful-fs "^4.1.15"
- parse-json "^4.0.0"
- pify "^4.0.1"
- strip-bom "^3.0.0"
- type-fest "^0.3.0"
-
load-yaml-file@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/load-yaml-file/-/load-yaml-file-0.2.0.tgz#af854edaf2bea89346c07549122753c07372f64d"
@@ -7590,6 +6352,14 @@ loader-runner@^4.2.0:
resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.2.0.tgz#d7022380d66d14c5fb1d496b89864ebcfd478384"
integrity sha512-92+huvxMvYlMzMt0iIOukcwYBFpkYJdpl2xsZ7LrlayO7E8SOv+JJUEK17B/dJIHAOLMfh2dZZ/Y18WgmGtYNw==
+local-pkg@^0.5.0:
+ version "0.5.0"
+ resolved "https://registry.yarnpkg.com/local-pkg/-/local-pkg-0.5.0.tgz#093d25a346bae59a99f80e75f6e9d36d7e8c925c"
+ integrity sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg==
+ dependencies:
+ mlly "^1.4.2"
+ pkg-types "^1.0.3"
+
locate-path@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e"
@@ -7598,14 +6368,6 @@ locate-path@^2.0.0:
p-locate "^2.0.0"
path-exists "^3.0.0"
-locate-path@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e"
- integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==
- dependencies:
- p-locate "^3.0.0"
- path-exists "^3.0.0"
-
locate-path@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0"
@@ -7620,77 +6382,32 @@ locate-path@^6.0.0:
dependencies:
p-locate "^5.0.0"
-lodash._reinterpolate@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d"
- integrity sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=
-
-lodash.clonedeep@^4.5.0:
- version "4.5.0"
- resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef"
- integrity sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=
-
lodash.debounce@^4.0.8:
version "4.0.8"
resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af"
integrity sha1-gteb/zCmfEAF/9XiUVMArZyk168=
-lodash.get@^4.4.2:
- version "4.4.2"
- resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99"
- integrity sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=
-
lodash.ismatch@^4.4.0:
version "4.4.0"
resolved "https://registry.yarnpkg.com/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz#756cb5150ca3ba6f11085a78849645f188f85f37"
integrity sha1-dWy1FQyjum8RCFp4hJZF8Yj4Xzc=
-lodash.set@^4.3.2:
- version "4.3.2"
- resolved "https://registry.yarnpkg.com/lodash.set/-/lodash.set-4.3.2.tgz#d8757b1da807dde24816b0d6a84bea1a76230b23"
- integrity sha1-2HV7HagH3eJIFrDWqEvqGnYjCyM=
-
-lodash.sortby@^4.7.0:
- version "4.7.0"
- resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438"
- integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=
+lodash.merge@^4.6.2:
+ version "4.6.2"
+ resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a"
+ integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==
lodash.startcase@^4.4.0:
version "4.4.0"
resolved "https://registry.yarnpkg.com/lodash.startcase/-/lodash.startcase-4.4.0.tgz#9436e34ed26093ed7ffae1936144350915d9add8"
integrity sha1-lDbjTtJgk+1/+uGTYUQ1CRXZrdg=
-lodash.template@^4.0.2, lodash.template@^4.5.0:
- version "4.5.0"
- resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.5.0.tgz#f976195cf3f347d0d5f52483569fe8031ccce8ab"
- integrity sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A==
- dependencies:
- lodash._reinterpolate "^3.0.0"
- lodash.templatesettings "^4.0.0"
-
-lodash.templatesettings@^4.0.0:
- version "4.2.0"
- resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz#e481310f049d3cf6d47e912ad09313b154f0fb33"
- integrity sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ==
- dependencies:
- lodash._reinterpolate "^3.0.0"
-
-lodash.unescape@4.0.1:
- version "4.0.1"
- resolved "https://registry.yarnpkg.com/lodash.unescape/-/lodash.unescape-4.0.1.tgz#bf2249886ce514cda112fae9218cdc065211fc9c"
- integrity sha1-vyJJiGzlFM2hEvrpIYzcBlIR/Jw=
-
-lodash.uniq@^4.5.0:
- version "4.5.0"
- resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773"
- integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=
-
-lodash@^4.17.12, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.4, lodash@^4.2.1:
+lodash@^4.17.21, lodash@^4.17.4:
version "4.17.21"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
-log-symbols@^4.0.0:
+log-symbols@^4.0.0, log-symbols@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503"
integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==
@@ -7715,13 +6432,17 @@ loose-envify@^1.1.0, loose-envify@^1.4.0:
dependencies:
js-tokens "^3.0.0 || ^4.0.0"
-loud-rejection@^1.0.0:
- version "1.6.0"
- resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f"
- integrity sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=
+loupe@^2.3.6, loupe@^2.3.7:
+ version "2.3.7"
+ resolved "https://registry.yarnpkg.com/loupe/-/loupe-2.3.7.tgz#6e69b7d4db7d3ab436328013d37d1c8c3540c697"
+ integrity sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==
dependencies:
- currently-unhandled "^0.4.1"
- signal-exit "^3.0.0"
+ get-func-name "^2.0.1"
+
+lru-cache@^10.0.1, "lru-cache@^9.1.1 || ^10.0.0":
+ version "10.1.0"
+ resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.1.0.tgz#2098d41c2dc56500e6c88584aa656c84de7d0484"
+ integrity sha512-/1clY/ui8CzjKFyjdvwPWJUYKiFVXG2I2cY0ssG7h4+hwk+XOIX7ZSG9Q7TW8TW3Kp3BUSqgFWBLgL4PJ+Blag==
lru-cache@^4.0.1:
version "4.1.5"
@@ -7745,31 +6466,31 @@ lru-cache@^6.0.0:
dependencies:
yallist "^4.0.0"
+lru-cache@^7.14.1, lru-cache@^7.5.1, lru-cache@^7.7.1:
+ version "7.18.3"
+ resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-7.18.3.tgz#f793896e0fd0e954a59dfdd82f0773808df6aa89"
+ integrity sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==
+
lz-string@^1.5.0:
version "1.5.0"
resolved "https://registry.yarnpkg.com/lz-string/-/lz-string-1.5.0.tgz#c1ab50f77887b712621201ba9fd4e3a6ed099941"
integrity sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==
-macos-release@^2.2.0:
- version "2.4.1"
- resolved "https://registry.yarnpkg.com/macos-release/-/macos-release-2.4.1.tgz#64033d0ec6a5e6375155a74b1a1eba8e509820ac"
- integrity sha512-H/QHeBIN1fIGJX517pvK8IEK53yQOW7YcEI55oYtgjDdoCQQz7eJS94qt5kNrscReEyuD/JcdFCm2XBEcGOITg==
-
-magic-string@^0.25.7:
- version "0.25.7"
- resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.7.tgz#3f497d6fd34c669c6798dcb821f2ef31f5445051"
- integrity sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==
+magic-string@^0.30.3, magic-string@^0.30.5:
+ version "0.30.5"
+ resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.30.5.tgz#1994d980bd1c8835dc6e78db7cbd4ae4f24746f9"
+ integrity sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==
dependencies:
- sourcemap-codec "^1.4.4"
+ "@jridgewell/sourcemap-codec" "^1.4.15"
-make-dir@^1.0.0:
- version "1.3.0"
- resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c"
- integrity sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==
+make-dir@4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-4.0.0.tgz#c3c2307a771277cd9638305f915c29ae741b614e"
+ integrity sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==
dependencies:
- pify "^3.0.0"
+ semver "^7.5.3"
-make-dir@^2.0.0, make-dir@^2.1.0:
+make-dir@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5"
integrity sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==
@@ -7777,100 +6498,71 @@ make-dir@^2.0.0, make-dir@^2.1.0:
pify "^4.0.1"
semver "^5.6.0"
-make-dir@^3.0.0, make-dir@^3.1.0:
+make-dir@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f"
integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==
dependencies:
semver "^6.0.0"
-make-fetch-happen@^5.0.0:
- version "5.0.2"
- resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-5.0.2.tgz#aa8387104f2687edca01c8687ee45013d02d19bd"
- integrity sha512-07JHC0r1ykIoruKO8ifMXu+xEU8qOXDFETylktdug6vJDACnP+HKevOu3PXyNPzFyTSlz8vrBYlBO1JZRe8Cag==
- dependencies:
- agentkeepalive "^3.4.1"
- cacache "^12.0.0"
- http-cache-semantics "^3.8.1"
- http-proxy-agent "^2.1.0"
- https-proxy-agent "^2.2.3"
- lru-cache "^5.1.1"
- mississippi "^3.0.0"
- node-fetch-npm "^2.0.2"
- promise-retry "^1.1.1"
- socks-proxy-agent "^4.0.0"
- ssri "^6.0.0"
-
-makeerror@1.0.12:
- version "1.0.12"
- resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.12.tgz#3e5dd2079a82e812e983cc6610c4a2cb0eaa801a"
- integrity sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==
+make-fetch-happen@^11.0.0, make-fetch-happen@^11.0.1, make-fetch-happen@^11.1.1:
+ version "11.1.1"
+ resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-11.1.1.tgz#85ceb98079584a9523d4bf71d32996e7e208549f"
+ integrity sha512-rLWS7GCSTcEujjVBs2YqG7Y4643u8ucvCJeSRqiLYhesrDuzeuFIk37xREzAsfQaqzl8b9rNCE4m6J8tvX4Q8w==
dependencies:
- tmpl "1.0.5"
-
-map-cache@^0.2.2:
- version "0.2.2"
- resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf"
- integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=
-
-map-obj@^1.0.0, map-obj@^1.0.1:
+ agentkeepalive "^4.2.1"
+ cacache "^17.0.0"
+ http-cache-semantics "^4.1.1"
+ http-proxy-agent "^5.0.0"
+ https-proxy-agent "^5.0.0"
+ is-lambda "^1.0.1"
+ lru-cache "^7.7.1"
+ minipass "^5.0.0"
+ minipass-fetch "^3.0.0"
+ minipass-flush "^1.0.5"
+ minipass-pipeline "^1.2.4"
+ negotiator "^0.6.3"
+ promise-retry "^2.0.1"
+ socks-proxy-agent "^7.0.0"
+ ssri "^10.0.0"
+
+make-fetch-happen@^13.0.0:
+ version "13.0.0"
+ resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-13.0.0.tgz#705d6f6cbd7faecb8eac2432f551e49475bfedf0"
+ integrity sha512-7ThobcL8brtGo9CavByQrQi+23aIfgYU++wg4B87AIS8Rb2ZBt/MEaDqzA00Xwv/jUjAjYkLHjVolYuTLKda2A==
+ dependencies:
+ "@npmcli/agent" "^2.0.0"
+ cacache "^18.0.0"
+ http-cache-semantics "^4.1.1"
+ is-lambda "^1.0.1"
+ minipass "^7.0.2"
+ minipass-fetch "^3.0.0"
+ minipass-flush "^1.0.5"
+ minipass-pipeline "^1.2.4"
+ negotiator "^0.6.3"
+ promise-retry "^2.0.1"
+ ssri "^10.0.0"
+
+map-obj@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d"
integrity sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=
-map-obj@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-2.0.0.tgz#a65cd29087a92598b8791257a523e021222ac1f9"
- integrity sha1-plzSkIepJZi4eRJXpSPgISIqwfk=
-
map-obj@^4.0.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-4.2.0.tgz#0e8bc823e2aaca8a0942567d12ed14f389eec153"
integrity sha512-NAq0fCmZYGz9UFEQyndp7sisrow4GroyGeKluyKC/chuITZsPyOyC1UJZPJlVFImhXdROIP5xqouRLThT3BbpQ==
-map-visit@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f"
- integrity sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=
- dependencies:
- object-visit "^1.0.0"
+mdn-data@2.0.30:
+ version "2.0.30"
+ resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.30.tgz#ce4df6f80af6cfbe218ecd5c552ba13c4dfa08cc"
+ integrity sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==
media-engine@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/media-engine/-/media-engine-1.0.3.tgz#be3188f6cd243ea2a40804a35de5a5b032f58dad"
integrity sha1-vjGI9s0kPqKkCASjXeWlsDL1ja0=
-meow@^3.3.0:
- version "3.7.0"
- resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb"
- integrity sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=
- dependencies:
- camelcase-keys "^2.0.0"
- decamelize "^1.1.2"
- loud-rejection "^1.0.0"
- map-obj "^1.0.1"
- minimist "^1.1.3"
- normalize-package-data "^2.3.4"
- object-assign "^4.0.1"
- read-pkg-up "^1.0.1"
- redent "^1.0.0"
- trim-newlines "^1.0.0"
-
-meow@^4.0.0:
- version "4.0.1"
- resolved "https://registry.yarnpkg.com/meow/-/meow-4.0.1.tgz#d48598f6f4b1472f35bf6317a95945ace347f975"
- integrity sha512-xcSBHD5Z86zaOc+781KrupuHAzeGXSLtiAOmBsiLDiPSaYSB6hdew2ng9EBAnZ62jagG9MHAOdxpDi/lWBFJ/A==
- dependencies:
- camelcase-keys "^4.0.0"
- decamelize-keys "^1.0.0"
- loud-rejection "^1.0.0"
- minimist "^1.1.3"
- minimist-options "^3.0.1"
- normalize-package-data "^2.3.4"
- read-pkg-up "^3.0.0"
- redent "^2.0.0"
- trim-newlines "^2.0.0"
-
meow@^6.0.0:
version "6.1.1"
resolved "https://registry.yarnpkg.com/meow/-/meow-6.1.1.tgz#1ad64c4b76b2a24dfb2f635fddcadf320d251467"
@@ -7888,7 +6580,7 @@ meow@^6.0.0:
type-fest "^0.13.1"
yargs-parser "^18.1.3"
-meow@^8.0.0:
+meow@^8.1.2:
version "8.1.2"
resolved "https://registry.yarnpkg.com/meow/-/meow-8.1.2.tgz#bcbe45bda0ee1729d350c03cffc8395a36c4e897"
integrity sha512-r85E3NdZ+mpYk1C6RjPFEMSE+s1iZMuHtsHAqY0DT3jZczl0diWUZ8g6oU7h0M9cD2EL+PzaYghhCLzR0ZNn5Q==
@@ -7915,25 +6607,6 @@ merge2@^1.2.3, merge2@^1.3.0, merge2@^1.4.1:
resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae"
integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==
-micromatch@^3.1.10:
- version "3.1.10"
- resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23"
- integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==
- dependencies:
- arr-diff "^4.0.0"
- array-unique "^0.3.2"
- braces "^2.3.1"
- define-property "^2.0.2"
- extend-shallow "^3.0.2"
- extglob "^2.0.4"
- fragment-cache "^0.2.1"
- kind-of "^6.0.2"
- nanomatch "^1.2.9"
- object.pick "^1.3.0"
- regex-not "^1.0.0"
- snapdragon "^0.8.1"
- to-regex "^3.0.2"
-
micromatch@^4.0.2, micromatch@^4.0.4:
version "4.0.4"
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.4.tgz#896d519dfe9db25fce94ceb7a500919bf881ebf9"
@@ -7947,23 +6620,23 @@ mime-db@1.51.0:
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.51.0.tgz#d9ff62451859b18342d960850dc3cfb77e63fb0c"
integrity sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g==
-mime-types@^2.1.12, mime-types@^2.1.27, mime-types@~2.1.19:
+mime-types@^2.1.12, mime-types@^2.1.27:
version "2.1.34"
resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.34.tgz#5a712f9ec1503511a945803640fafe09d3793c24"
integrity sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A==
dependencies:
mime-db "1.51.0"
-mimic-fn@^1.0.0:
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022"
- integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==
-
mimic-fn@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b"
integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==
+mimic-fn@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-4.0.0.tgz#60a90550d5cb0b239cca65d893b1a53b29871ecc"
+ integrity sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==
+
mimic-response@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-2.1.0.tgz#d13763d35f613d09ec37ebb30bac0469c0ee8f43"
@@ -7974,13 +6647,41 @@ min-indent@^1.0.0:
resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869"
integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==
-minimatch@^3.0.4, minimatch@^3.1.1:
+minimatch@3.0.5:
+ version "3.0.5"
+ resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.5.tgz#4da8f1290ee0f0f8e83d60ca69f8f134068604a3"
+ integrity sha512-tUpxzX0VAzJHjLu0xUfFv1gwVp9ba3IOuRAVH2EGuRW8a5emA2FlACLqiT/lDVtS1W+TGNwqz3sWaNyLgDJWuw==
+ dependencies:
+ brace-expansion "^1.1.7"
+
+minimatch@9.0.3, minimatch@^9.0.0, minimatch@^9.0.1, minimatch@^9.0.3:
+ version "9.0.3"
+ resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.3.tgz#a6e00c3de44c3a542bfaae70abfc22420a6da825"
+ integrity sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==
+ dependencies:
+ brace-expansion "^2.0.1"
+
+minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2:
version "3.1.2"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b"
integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==
dependencies:
brace-expansion "^1.1.7"
+minimatch@^5.0.1:
+ version "5.1.6"
+ resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96"
+ integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==
+ dependencies:
+ brace-expansion "^2.0.1"
+
+minimatch@^8.0.2:
+ version "8.0.4"
+ resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-8.0.4.tgz#847c1b25c014d4e9a7f68aaf63dedd668a626229"
+ integrity sha512-W0Wvr9HyFXZRGIDgCicunpQ299OKXs9RgZfaukz4qAW/pJhcpUfupc9c+OObPOFueNy8VSrZgEmDtk6Kh4WzDA==
+ dependencies:
+ brace-expansion "^2.0.1"
+
minimist-options@4.1.0, minimist-options@^4.0.2:
version "4.1.0"
resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-4.1.0.tgz#c0655713c53a8a2ebd77ffa247d342c40f010619"
@@ -7990,42 +6691,88 @@ minimist-options@4.1.0, minimist-options@^4.0.2:
is-plain-obj "^1.1.0"
kind-of "^6.0.3"
-minimist-options@^3.0.1:
- version "3.0.2"
- resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-3.0.2.tgz#fba4c8191339e13ecf4d61beb03f070103f3d954"
- integrity sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ==
+minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6:
+ version "1.2.8"
+ resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c"
+ integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==
+
+minipass-collect@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/minipass-collect/-/minipass-collect-1.0.2.tgz#22b813bf745dc6edba2576b940022ad6edc8c617"
+ integrity sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==
dependencies:
- arrify "^1.0.1"
- is-plain-obj "^1.1.0"
+ minipass "^3.0.0"
-minimist@^1.1.3, minimist@^1.2.0, minimist@^1.2.5:
- version "1.2.5"
- resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602"
- integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==
+minipass-collect@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/minipass-collect/-/minipass-collect-2.0.1.tgz#1621bc77e12258a12c60d34e2276ec5c20680863"
+ integrity sha512-D7V8PO9oaz7PWGLbCACuI1qEOsq7UKfLotx/C0Aet43fCUB/wfQ7DYeq2oR/svFJGYDHPr38SHATeaj/ZoKHKw==
+ dependencies:
+ minipass "^7.0.3"
-minipass@^2.3.5, minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0:
- version "2.9.0"
- resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6"
- integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==
+minipass-fetch@^3.0.0:
+ version "3.0.4"
+ resolved "https://registry.yarnpkg.com/minipass-fetch/-/minipass-fetch-3.0.4.tgz#4d4d9b9f34053af6c6e597a64be8e66e42bf45b7"
+ integrity sha512-jHAqnA728uUpIaFm7NWsCnqKT6UqZz7GcI/bDpPATuwYyKwJwW0remxSCxUlKiEty+eopHGa3oc8WxgQ1FFJqg==
dependencies:
- safe-buffer "^5.1.2"
- yallist "^3.0.0"
+ minipass "^7.0.3"
+ minipass-sized "^1.0.3"
+ minizlib "^2.1.2"
+ optionalDependencies:
+ encoding "^0.1.13"
-minipass@^3.0.0:
- version "3.1.3"
- resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.1.3.tgz#7d42ff1f39635482e15f9cdb53184deebd5815fd"
- integrity sha512-Mgd2GdMVzY+x3IJ+oHnVM+KG3lA5c8tnabyJKmHSaG2kAGpudxuOf8ToDkhumF7UzME7DecbQE9uOZhNm7PuJg==
+minipass-flush@^1.0.5:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/minipass-flush/-/minipass-flush-1.0.5.tgz#82e7135d7e89a50ffe64610a787953c4c4cbb373"
+ integrity sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==
dependencies:
- yallist "^4.0.0"
+ minipass "^3.0.0"
-minizlib@^1.2.1:
- version "1.3.3"
- resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d"
- integrity sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==
+minipass-json-stream@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/minipass-json-stream/-/minipass-json-stream-1.0.1.tgz#7edbb92588fbfc2ff1db2fc10397acb7b6b44aa7"
+ integrity sha512-ODqY18UZt/I8k+b7rl2AENgbWE8IDYam+undIJONvigAz8KR5GWblsFTEfQs0WODsjbSXWlm+JHEv8Gr6Tfdbg==
dependencies:
- minipass "^2.9.0"
+ jsonparse "^1.3.1"
+ minipass "^3.0.0"
+
+minipass-pipeline@^1.2.4:
+ version "1.2.4"
+ resolved "https://registry.yarnpkg.com/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz#68472f79711c084657c067c5c6ad93cddea8214c"
+ integrity sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==
+ dependencies:
+ minipass "^3.0.0"
+
+minipass-sized@^1.0.3:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/minipass-sized/-/minipass-sized-1.0.3.tgz#70ee5a7c5052070afacfbc22977ea79def353b70"
+ integrity sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==
+ dependencies:
+ minipass "^3.0.0"
+
+minipass@^3.0.0, minipass@^3.1.1:
+ version "3.3.6"
+ resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.3.6.tgz#7bba384db3a1520d18c9c0e5251c3444e95dd94a"
+ integrity sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==
+ dependencies:
+ yallist "^4.0.0"
+
+minipass@^4.2.4:
+ version "4.2.8"
+ resolved "https://registry.yarnpkg.com/minipass/-/minipass-4.2.8.tgz#f0010f64393ecfc1d1ccb5f582bcaf45f48e1a3a"
+ integrity sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ==
+
+minipass@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/minipass/-/minipass-5.0.0.tgz#3e9788ffb90b694a5d0ec94479a45b5d8738133d"
+ integrity sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==
-minizlib@^2.1.1:
+"minipass@^5.0.0 || ^6.0.2 || ^7.0.0", minipass@^7.0.2, minipass@^7.0.3:
+ version "7.0.4"
+ resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.0.4.tgz#dbce03740f50a4786ba994c1fb908844d27b038c"
+ integrity sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==
+
+minizlib@^2.1.1, minizlib@^2.1.2:
version "2.1.2"
resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931"
integrity sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==
@@ -8033,29 +6780,10 @@ minizlib@^2.1.1:
minipass "^3.0.0"
yallist "^4.0.0"
-mississippi@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/mississippi/-/mississippi-3.0.0.tgz#ea0a3291f97e0b5e8776b363d5f0a12d94c67022"
- integrity sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==
- dependencies:
- concat-stream "^1.5.0"
- duplexify "^3.4.2"
- end-of-stream "^1.1.0"
- flush-write-stream "^1.0.0"
- from2 "^2.1.0"
- parallel-transform "^1.1.0"
- pump "^3.0.0"
- pumpify "^1.3.3"
- stream-each "^1.1.0"
- through2 "^2.0.0"
-
-mixin-deep@^1.2.0:
- version "1.3.2"
- resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566"
- integrity sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==
- dependencies:
- for-in "^1.0.2"
- is-extendable "^1.0.1"
+mitt@3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/mitt/-/mitt-3.0.1.tgz#ea36cf0cc30403601ae074c8f77b7092cdab36d1"
+ integrity sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==
mixme@^0.5.1:
version "0.5.4"
@@ -8067,47 +6795,26 @@ mkdirp-classic@^0.5.2:
resolved "https://registry.yarnpkg.com/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz#fa10c9115cc6d8865be221ba47ee9bed78601113"
integrity sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==
-mkdirp-promise@^5.0.1:
- version "5.0.1"
- resolved "https://registry.yarnpkg.com/mkdirp-promise/-/mkdirp-promise-5.0.1.tgz#e9b8f68e552c68a9c1713b84883f7a1dd039b8a1"
- integrity sha1-6bj2jlUsaKnBcTuEiD96HdA5uKE=
- dependencies:
- mkdirp "*"
-
-mkdirp@*, mkdirp@^1.0.3, mkdirp@^1.0.4:
+mkdirp@^1.0.3:
version "1.0.4"
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e"
integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==
-mkdirp@^0.5.0, mkdirp@^0.5.1:
- version "0.5.5"
- resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def"
- integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==
+mlly@^1.2.0, mlly@^1.4.2:
+ version "1.5.0"
+ resolved "https://registry.yarnpkg.com/mlly/-/mlly-1.5.0.tgz#8428a4617d54cc083d3009030ac79739a0e5447a"
+ integrity sha512-NPVQvAY1xr1QoVeG0cy8yUYC7FQcOx6evl/RjT1wL5FvzPnzOysoqB/jmx/DhssT2dYa8nxECLAaFI/+gVLhDQ==
dependencies:
- minimist "^1.2.5"
+ acorn "^8.11.3"
+ pathe "^1.1.2"
+ pkg-types "^1.0.3"
+ ufo "^1.3.2"
-modify-values@^1.0.0:
+modify-values@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/modify-values/-/modify-values-1.0.1.tgz#b3939fa605546474e3e3e3c63d64bd43b4ee6022"
integrity sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw==
-move-concurrently@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92"
- integrity sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=
- dependencies:
- aproba "^1.1.1"
- copy-concurrently "^1.0.0"
- fs-write-stream-atomic "^1.0.8"
- mkdirp "^0.5.1"
- rimraf "^2.5.4"
- run-queue "^1.0.3"
-
-ms@2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
- integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=
-
ms@2.1.2:
version "2.1.2"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
@@ -8118,66 +6825,46 @@ ms@^2.0.0, ms@^2.1.1:
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2"
integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==
-multimatch@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-3.0.0.tgz#0e2534cc6bc238d9ab67e1b9cd5fcd85a6dbf70b"
- integrity sha512-22foS/gqQfANZ3o+W7ST2x25ueHDVNWl/b9OlGcLpy/iKxjCpvcNCM51YCenUi7Mt/jAjjqv8JwZRs8YP5sRjA==
+multimatch@5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-5.0.0.tgz#932b800963cea7a31a033328fa1e0c3a1874dbe6"
+ integrity sha512-ypMKuglUrZUD99Tk2bUQ+xNQj43lPEfAeX2o9cTteAmShXy2VHDJpuwu1o0xqoKCt9jLVAvwyFKdLTPXKAfJyA==
dependencies:
- array-differ "^2.0.3"
- array-union "^1.0.2"
- arrify "^1.0.1"
+ "@types/minimatch" "^3.0.3"
+ array-differ "^3.0.0"
+ array-union "^2.1.0"
+ arrify "^2.0.1"
minimatch "^3.0.4"
-mute-stream@0.0.7:
- version "0.0.7"
- resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab"
- integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=
-
-mute-stream@0.0.8, mute-stream@~0.0.4:
+mute-stream@0.0.8:
version "0.0.8"
resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d"
integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==
-mz@^2.5.0:
- version "2.7.0"
- resolved "https://registry.yarnpkg.com/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32"
- integrity sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==
- dependencies:
- any-promise "^1.0.0"
- object-assign "^4.0.1"
- thenify-all "^1.0.0"
+mute-stream@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-1.0.0.tgz#e31bd9fe62f0aed23520aa4324ea6671531e013e"
+ integrity sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==
nan@^2.17.0:
version "2.17.0"
resolved "https://registry.yarnpkg.com/nan/-/nan-2.17.0.tgz#c0150a2368a182f033e9aa5195ec76ea41a199cb"
integrity sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==
-nanoid@^3.1.30:
- version "3.2.0"
- resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.2.0.tgz#62667522da6673971cca916a6d3eff3f415ff80c"
- integrity sha512-fmsZYa9lpn69Ad5eDn7FMcnnSR+8R34W9qJEijxYhTbfOWzr22n1QxCMzXLK+ODyW2973V3Fux959iQoUxzUIA==
-
-nanomatch@^1.2.9:
- version "1.2.13"
- resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119"
- integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==
- dependencies:
- arr-diff "^4.0.0"
- array-unique "^0.3.2"
- define-property "^2.0.2"
- extend-shallow "^3.0.2"
- fragment-cache "^0.2.1"
- is-windows "^1.0.2"
- kind-of "^6.0.2"
- object.pick "^1.3.0"
- regex-not "^1.0.0"
- snapdragon "^0.8.1"
- to-regex "^3.0.1"
+nanoid@5.0.4, nanoid@^5.0.4:
+ version "5.0.4"
+ resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-5.0.4.tgz#d2b608d8169d7da669279127615535705aa52edf"
+ integrity sha512-vAjmBf13gsmhXSgBrtIclinISzFFy22WwCYoyilZlsrRXNIHSwgFQ1bEdjRwMT3aoadeIF6HMuDRlOxzfXV8ig==
-nanospinner@^0.6.0:
- version "0.6.0"
- resolved "https://registry.yarnpkg.com/nanospinner/-/nanospinner-0.6.0.tgz#1943a2668b1ff93a02847c1d9c4655647d52e578"
- integrity sha512-G2QQwVJListXbtsBW5r5kJs8WXybsO9/SQxzcvSmPRSIOQOeR0v/ETI9hncOna0tzWscdjjcCZUVCJoR4eJlag==
+nanoid@^3.3.7:
+ version "3.3.7"
+ resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8"
+ integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==
+
+nanospinner@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/nanospinner/-/nanospinner-1.1.0.tgz#d17ff621cb1784b0a206b400da88a0ef6db39b97"
+ integrity sha512-yFvNYMig4AthKYfHFl1sLj7B2nkHL4lzdig4osvl9/LdGbXwrdFRoqBS98gsEsOakr0yH+r5NZ/1Y9gdVB8trA==
dependencies:
picocolors "^1.0.0"
@@ -8186,86 +6873,60 @@ natural-compare@^1.4.0:
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=
-neo-async@^2.6.0, neo-async@^2.6.2:
+negotiator@^0.6.3:
+ version "0.6.3"
+ resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd"
+ integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==
+
+neo-async@^2.6.2:
version "2.6.2"
resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f"
integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==
-nice-try@^1.0.4:
- version "1.0.5"
- resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366"
- integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==
-
-node-environment-flags@^1.0.5:
- version "1.0.6"
- resolved "https://registry.yarnpkg.com/node-environment-flags/-/node-environment-flags-1.0.6.tgz#a30ac13621f6f7d674260a54dede048c3982c088"
- integrity sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw==
- dependencies:
- object.getownpropertydescriptors "^2.0.3"
- semver "^5.7.0"
-
-node-fetch-npm@^2.0.2:
- version "2.0.4"
- resolved "https://registry.yarnpkg.com/node-fetch-npm/-/node-fetch-npm-2.0.4.tgz#6507d0e17a9ec0be3bec516958a497cec54bf5a4"
- integrity sha512-iOuIQDWDyjhv9qSDrj9aq/klt6F9z1p2otB3AV7v3zBDcL/x+OfGsvGQZZCcMZbUf4Ujw1xGNQkjvGnVT22cKg==
- dependencies:
- encoding "^0.1.11"
- json-parse-better-errors "^1.0.0"
- safe-buffer "^5.1.1"
-
-node-fetch@2.1.2:
- version "2.1.2"
- resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.1.2.tgz#ab884e8e7e57e38a944753cec706f788d1768bb5"
- integrity sha1-q4hOjn5X44qUR1POxwb3iNF2i7U=
-
-node-fetch@2.6.5:
- version "2.6.5"
- resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.5.tgz#42735537d7f080a7e5f78b6c549b7146be1742fd"
- integrity sha512-mmlIVHJEu5rnIxgEgez6b9GgWXbkZj5YZ7fx+2r94a2E+Uirsp6HsPTPlomfdHtpt/B0cdKviwkoaM6pyvUOpQ==
- dependencies:
- whatwg-url "^5.0.0"
+netmask@^2.0.2:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/netmask/-/netmask-2.0.2.tgz#8b01a07644065d536383835823bc52004ebac5e7"
+ integrity sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==
-node-fetch@2.6.7, node-fetch@^2.5.0, node-fetch@^2.6.1:
+node-fetch@2.6.7:
version "2.6.7"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad"
integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==
dependencies:
whatwg-url "^5.0.0"
-node-gyp@^5.0.2:
- version "5.1.1"
- resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-5.1.1.tgz#eb915f7b631c937d282e33aed44cb7a025f62a3e"
- integrity sha512-WH0WKGi+a4i4DUt2mHnvocex/xPLp9pYt5R6M2JdFB7pJ7Z34hveZ4nDTGTiLXCkitA9T8HFZjhinBCiVHYcWw==
+node-fetch@^2.5.0, node-fetch@^2.6.1, node-fetch@^2.6.12, node-fetch@^2.6.7:
+ version "2.7.0"
+ resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d"
+ integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==
dependencies:
- env-paths "^2.2.0"
- glob "^7.1.4"
- graceful-fs "^4.2.2"
- mkdirp "^0.5.1"
- nopt "^4.0.1"
- npmlog "^4.1.2"
- request "^2.88.0"
- rimraf "^2.6.3"
- semver "^5.7.1"
- tar "^4.4.12"
- which "^1.3.1"
+ whatwg-url "^5.0.0"
-node-int64@^0.4.0:
- version "0.4.0"
- resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b"
- integrity sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs=
+node-gyp@^10.0.0:
+ version "10.0.1"
+ resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-10.0.1.tgz#205514fc19e5830fa991e4a689f9e81af377a966"
+ integrity sha512-gg3/bHehQfZivQVfqIyy8wTdSymF9yTyP4CJifK73imyNMU8AIGQE2pUa7dNWfmMeG9cDVF2eehiRMv0LC1iAg==
+ dependencies:
+ env-paths "^2.2.0"
+ exponential-backoff "^3.1.1"
+ glob "^10.3.10"
+ graceful-fs "^4.2.6"
+ make-fetch-happen "^13.0.0"
+ nopt "^7.0.0"
+ proc-log "^3.0.0"
+ semver "^7.3.5"
+ tar "^6.1.2"
+ which "^4.0.0"
-node-releases@^2.0.8:
- version "2.0.10"
- resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.10.tgz#c311ebae3b6a148c89b1813fd7c4d3c024ef537f"
- integrity sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==
+node-machine-id@1.1.12:
+ version "1.1.12"
+ resolved "https://registry.yarnpkg.com/node-machine-id/-/node-machine-id-1.1.12.tgz#37904eee1e59b320bb9c5d6c0a59f3b469cb6267"
+ integrity sha512-QNABxbrPa3qEIfrE6GOJ7BYIuignnJw7iQ2YPbc3Nla1HzRJjXzZOiikfF8m7eAMfichLt3M4VgLOetqgDmgGQ==
-nopt@^4.0.1:
- version "4.0.3"
- resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.3.tgz#a375cad9d02fd921278d954c2254d5aa57e15e48"
- integrity sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==
- dependencies:
- abbrev "1"
- osenv "^0.1.4"
+node-releases@^2.0.14:
+ version "2.0.14"
+ resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.14.tgz#2ffb053bceb8b2be8495ece1ab6ce600c4461b0b"
+ integrity sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==
nopt@^5.0.0:
version "5.0.0"
@@ -8274,7 +6935,14 @@ nopt@^5.0.0:
dependencies:
abbrev "1"
-normalize-package-data@^2.0.0, normalize-package-data@^2.3.0, normalize-package-data@^2.3.2, normalize-package-data@^2.3.4, normalize-package-data@^2.3.5, normalize-package-data@^2.4.0, normalize-package-data@^2.5.0:
+nopt@^7.0.0:
+ version "7.2.0"
+ resolved "https://registry.yarnpkg.com/nopt/-/nopt-7.2.0.tgz#067378c68116f602f552876194fd11f1292503d7"
+ integrity sha512-CVDtwCdhYIvnAzFoJ6NJ6dX3oga9/HyciQDnG1vQDjSLMeKLJ4A93ZqYKDrgYSr1FBY5/hMYC+2VCi24pgpkGA==
+ dependencies:
+ abbrev "^2.0.0"
+
+normalize-package-data@^2.3.2, normalize-package-data@^2.5.0:
version "2.5.0"
resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8"
integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==
@@ -8284,16 +6952,36 @@ normalize-package-data@^2.0.0, normalize-package-data@^2.3.0, normalize-package-
semver "2 || 3 || 4 || 5"
validate-npm-package-license "^3.0.1"
-normalize-package-data@^3.0.0:
- version "3.0.2"
- resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-3.0.2.tgz#cae5c410ae2434f9a6c1baa65d5bc3b9366c8699"
- integrity sha512-6CdZocmfGaKnIHPVFhJJZ3GuR8SsLKvDANFp47Jmy51aKIr8akjAWTSxtpI+MBgBFdSMRyo4hMpDlT6dTffgZg==
+normalize-package-data@^3.0.0, normalize-package-data@^3.0.3:
+ version "3.0.3"
+ resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-3.0.3.tgz#dbcc3e2da59509a0983422884cd172eefdfa525e"
+ integrity sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==
dependencies:
hosted-git-info "^4.0.1"
- resolve "^1.20.0"
+ is-core-module "^2.5.0"
semver "^7.3.4"
validate-npm-package-license "^3.0.1"
+normalize-package-data@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-5.0.0.tgz#abcb8d7e724c40d88462b84982f7cbf6859b4588"
+ integrity sha512-h9iPVIfrVZ9wVYQnxFgtw1ugSvGEMOlyPWWtm8BMJhnwyEL/FLbYbTY3V3PpjI/BUK67n9PEWDu6eHzu1fB15Q==
+ dependencies:
+ hosted-git-info "^6.0.0"
+ is-core-module "^2.8.1"
+ semver "^7.3.5"
+ validate-npm-package-license "^3.0.4"
+
+normalize-package-data@^6.0.0:
+ version "6.0.0"
+ resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-6.0.0.tgz#68a96b3c11edd462af7189c837b6b1064a484196"
+ integrity sha512-UL7ELRVxYBHBgYEtZCXjxuD5vPxnmvMGq0jp/dGPKKrN7tfsBh2IY7TlJ15WWwdjRWD3RJbnsygUurTK3xkPkg==
+ dependencies:
+ hosted-git-info "^7.0.0"
+ is-core-module "^2.8.1"
+ semver "^7.3.5"
+ validate-npm-package-license "^3.0.4"
+
normalize-path@^3.0.0, normalize-path@~3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65"
@@ -8306,71 +6994,118 @@ normalize-svg-path@^1.1.0:
dependencies:
svg-arc-to-cubic-bezier "^3.0.0"
-normalize-url@^3.3.0:
- version "3.3.0"
- resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-3.3.0.tgz#b2e1c4dc4f7c6d57743df733a4f5978d18650559"
- integrity sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg==
-
-npm-bundled@^1.0.1:
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.1.1.tgz#1edd570865a94cdb1bc8220775e29466c9fb234b"
- integrity sha512-gqkfgGePhTpAEgUsGEgcq1rqPXA+tv/aVBlgEzfXwA1yiUJF7xtEt3CtVwOjNYQOVknDk0F20w58Fnm3EtG0fA==
+npm-bundled@^1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.1.2.tgz#944c78789bd739035b70baa2ca5cc32b8d860bc1"
+ integrity sha512-x5DHup0SuyQcmL3s7Rx/YQ8sbw/Hzg0rj48eN0dV7hf5cmQq5PXIeioroH3raV1QC1yh3uTYuMThvEQF3iKgGQ==
dependencies:
npm-normalize-package-bin "^1.0.1"
-npm-lifecycle@^3.1.2:
- version "3.1.5"
- resolved "https://registry.yarnpkg.com/npm-lifecycle/-/npm-lifecycle-3.1.5.tgz#9882d3642b8c82c815782a12e6a1bfeed0026309"
- integrity sha512-lDLVkjfZmvmfvpvBzA4vzee9cn+Me4orq0QF8glbswJVEbIcSNWib7qGOffolysc3teCqbbPZZkzbr3GQZTL1g==
+npm-bundled@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-3.0.0.tgz#7e8e2f8bb26b794265028491be60321a25a39db7"
+ integrity sha512-Vq0eyEQy+elFpzsKjMss9kxqb9tG3YHg4dsyWuUENuzvSUWe1TCnW/vV9FkhvBk/brEDoDiVd+M1Btosa6ImdQ==
+ dependencies:
+ npm-normalize-package-bin "^3.0.0"
+
+npm-install-checks@^6.0.0:
+ version "6.3.0"
+ resolved "https://registry.yarnpkg.com/npm-install-checks/-/npm-install-checks-6.3.0.tgz#046552d8920e801fa9f919cad569545d60e826fe"
+ integrity sha512-W29RiK/xtpCGqn6f3ixfRYGk+zRyr+Ew9F2E20BfXxT5/euLdA/Nm7fO7OeTGuAmTs30cpgInyJ0cYe708YTZw==
dependencies:
- byline "^5.0.0"
- graceful-fs "^4.1.15"
- node-gyp "^5.0.2"
- resolve-from "^4.0.0"
- slide "^1.1.6"
- uid-number "0.0.6"
- umask "^1.1.0"
- which "^1.3.1"
+ semver "^7.1.1"
-npm-normalize-package-bin@^1.0.0, npm-normalize-package-bin@^1.0.1:
+npm-normalize-package-bin@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz#6e79a41f23fd235c0623218228da7d9c23b8f6e2"
integrity sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==
-"npm-package-arg@^4.0.0 || ^5.0.0 || ^6.0.0", npm-package-arg@^6.0.0, npm-package-arg@^6.1.0:
- version "6.1.1"
- resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-6.1.1.tgz#02168cb0a49a2b75bf988a28698de7b529df5cb7"
- integrity sha512-qBpssaL3IOZWi5vEKUKW0cO7kzLeT+EQO9W8RsLOZf76KF9E/K9+wH0C7t06HXPpaH8WH5xF1MExLuCwbTqRUg==
+npm-normalize-package-bin@^3.0.0:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/npm-normalize-package-bin/-/npm-normalize-package-bin-3.0.1.tgz#25447e32a9a7de1f51362c61a559233b89947832"
+ integrity sha512-dMxCf+zZ+3zeQZXKxmyuCKlIDPGuv8EF940xbkC4kQVDTtqoh6rJFO+JTKSA6/Rwi0getWmtuy4Itup0AMcaDQ==
+
+npm-package-arg@8.1.1:
+ version "8.1.1"
+ resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-8.1.1.tgz#00ebf16ac395c63318e67ce66780a06db6df1b04"
+ integrity sha512-CsP95FhWQDwNqiYS+Q0mZ7FAEDytDZAkNxQqea6IaAFJTAY9Lhhqyl0irU/6PMc7BGfUmnsbHcqxJD7XuVM/rg==
dependencies:
- hosted-git-info "^2.7.1"
- osenv "^0.1.5"
- semver "^5.6.0"
+ hosted-git-info "^3.0.6"
+ semver "^7.0.0"
validate-npm-package-name "^3.0.0"
-npm-packlist@^1.4.4:
- version "1.4.8"
- resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.8.tgz#56ee6cc135b9f98ad3d51c1c95da22bbb9b2ef3e"
- integrity sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A==
+npm-package-arg@^10.0.0, npm-package-arg@^10.1.0:
+ version "10.1.0"
+ resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-10.1.0.tgz#827d1260a683806685d17193073cc152d3c7e9b1"
+ integrity sha512-uFyyCEmgBfZTtrKk/5xDfHp6+MdrqGotX/VoOyEEl3mBwiEE5FlBaePanazJSVMPT7vKepcjYBY2ztg9A3yPIA==
+ dependencies:
+ hosted-git-info "^6.0.0"
+ proc-log "^3.0.0"
+ semver "^7.3.5"
+ validate-npm-package-name "^5.0.0"
+
+npm-package-arg@^11.0.0:
+ version "11.0.1"
+ resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-11.0.1.tgz#f208b0022c29240a1c532a449bdde3f0a4708ebc"
+ integrity sha512-M7s1BD4NxdAvBKUPqqRW957Xwcl/4Zvo8Aj+ANrzvIPzGJZElrH7Z//rSaec2ORcND6FHHLnZeY8qgTpXDMFQQ==
+ dependencies:
+ hosted-git-info "^7.0.0"
+ proc-log "^3.0.0"
+ semver "^7.3.5"
+ validate-npm-package-name "^5.0.0"
+
+npm-packlist@5.1.1:
+ version "5.1.1"
+ resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-5.1.1.tgz#79bcaf22a26b6c30aa4dd66b976d69cc286800e0"
+ integrity sha512-UfpSvQ5YKwctmodvPPkK6Fwk603aoVsf8AEbmVKAEECrfvL8SSe1A2YIwrJ6xmTHAITKPwwZsWo7WwEbNk0kxw==
dependencies:
- ignore-walk "^3.0.1"
- npm-bundled "^1.0.1"
+ glob "^8.0.1"
+ ignore-walk "^5.0.1"
+ npm-bundled "^1.1.2"
npm-normalize-package-bin "^1.0.1"
-npm-pick-manifest@^3.0.0:
- version "3.0.2"
- resolved "https://registry.yarnpkg.com/npm-pick-manifest/-/npm-pick-manifest-3.0.2.tgz#f4d9e5fd4be2153e5f4e5f9b7be8dc419a99abb7"
- integrity sha512-wNprTNg+X5nf+tDi+hbjdHhM4bX+mKqv6XmPh7B5eG+QY9VARfQPfCEH013H5GqfNj6ee8Ij2fg8yk0mzps1Vw==
+npm-packlist@^8.0.0:
+ version "8.0.2"
+ resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-8.0.2.tgz#5b8d1d906d96d21c85ebbeed2cf54147477c8478"
+ integrity sha512-shYrPFIS/JLP4oQmAwDyk5HcyysKW8/JLTEA32S0Z5TzvpaeeX2yMFfoK1fjEBnCBvVyIB/Jj/GBFdm0wsgzbA==
dependencies:
- figgy-pudding "^3.5.1"
- npm-package-arg "^6.0.0"
- semver "^5.4.1"
+ ignore-walk "^6.0.4"
-npm-run-path@^2.0.0:
- version "2.0.2"
- resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f"
- integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=
+npm-pick-manifest@^9.0.0:
+ version "9.0.0"
+ resolved "https://registry.yarnpkg.com/npm-pick-manifest/-/npm-pick-manifest-9.0.0.tgz#f87a4c134504a2c7931f2bb8733126e3c3bb7e8f"
+ integrity sha512-VfvRSs/b6n9ol4Qb+bDwNGUXutpy76x6MARw/XssevE0TnctIKcmklJZM5Z7nqs5z5aW+0S63pgCNbpkUNNXBg==
dependencies:
- path-key "^2.0.0"
+ npm-install-checks "^6.0.0"
+ npm-normalize-package-bin "^3.0.0"
+ npm-package-arg "^11.0.0"
+ semver "^7.3.5"
+
+npm-registry-fetch@^14.0.3, npm-registry-fetch@^14.0.5:
+ version "14.0.5"
+ resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-14.0.5.tgz#fe7169957ba4986a4853a650278ee02e568d115d"
+ integrity sha512-kIDMIo4aBm6xg7jOttupWZamsZRkAqMqwqqbVXnUqstY5+tapvv6bkH/qMR76jdgV+YljEUCyWx3hRYMrJiAgA==
+ dependencies:
+ make-fetch-happen "^11.0.0"
+ minipass "^5.0.0"
+ minipass-fetch "^3.0.0"
+ minipass-json-stream "^1.0.1"
+ minizlib "^2.1.2"
+ npm-package-arg "^10.0.0"
+ proc-log "^3.0.0"
+
+npm-registry-fetch@^16.0.0:
+ version "16.1.0"
+ resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-16.1.0.tgz#10227b7b36c97bc1cf2902a24e4f710cfe62803c"
+ integrity sha512-PQCELXKt8Azvxnt5Y85GseQDJJlglTFM9L9U9gkv2y4e9s0k3GVDdOx3YoB6gm2Do0hlkzC39iCGXby+Wve1Bw==
+ dependencies:
+ make-fetch-happen "^13.0.0"
+ minipass "^7.0.2"
+ minipass-fetch "^3.0.0"
+ minipass-json-stream "^1.0.1"
+ minizlib "^2.1.2"
+ npm-package-arg "^11.0.0"
+ proc-log "^3.0.0"
npm-run-path@^4.0.0, npm-run-path@^4.0.1:
version "4.0.1"
@@ -8379,6 +7114,13 @@ npm-run-path@^4.0.0, npm-run-path@^4.0.1:
dependencies:
path-key "^3.0.0"
+npm-run-path@^5.1.0:
+ version "5.2.0"
+ resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-5.2.0.tgz#224cdd22c755560253dd71b83a1ef2f758b2e955"
+ integrity sha512-W4/tgAXFqFA0iL7fk0+uQ3g7wkL8xJmx3XdK0VGb4cHW//eZTtKGvFBBoRKVTpY7n6ze4NL9ly7rgXcHufqXKg==
+ dependencies:
+ path-key "^4.0.0"
+
npmlog@^4.1.2:
version "4.1.2"
resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b"
@@ -8389,41 +7131,83 @@ npmlog@^4.1.2:
gauge "~2.7.3"
set-blocking "~2.0.0"
+npmlog@^6.0.2:
+ version "6.0.2"
+ resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-6.0.2.tgz#c8166017a42f2dea92d6453168dd865186a70830"
+ integrity sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==
+ dependencies:
+ are-we-there-yet "^3.0.0"
+ console-control-strings "^1.1.0"
+ gauge "^4.0.3"
+ set-blocking "^2.0.0"
+
number-is-nan@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d"
integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=
-nwsapi@^2.2.2:
- version "2.2.5"
- resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.5.tgz#a52744c61b3889dd44b0a158687add39b8d935e2"
- integrity sha512-6xpotnECFy/og7tKSBVmUNft7J3jyXAka4XvG6AUhFWRz+Q/Ljus7znJAA3bxColfQLdS+XsjoodtJfCgeTEFQ==
-
-oauth-sign@~0.9.0:
- version "0.9.0"
- resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455"
- integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==
-
-object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1:
+nx@17.2.8, "nx@>=17.1.2 < 18":
+ version "17.2.8"
+ resolved "https://registry.yarnpkg.com/nx/-/nx-17.2.8.tgz#09482acd5d9b64c115d5ccf12417f1af2787d4d1"
+ integrity sha512-rM5zXbuXLEuqQqcjVjClyvHwRJwt+NVImR2A6KFNG40Z60HP6X12wAxxeLHF5kXXTDRU0PFhf/yACibrpbPrAw==
+ dependencies:
+ "@nrwl/tao" "17.2.8"
+ "@yarnpkg/lockfile" "^1.1.0"
+ "@yarnpkg/parsers" "3.0.0-rc.46"
+ "@zkochan/js-yaml" "0.0.6"
+ axios "^1.5.1"
+ chalk "^4.1.0"
+ cli-cursor "3.1.0"
+ cli-spinners "2.6.1"
+ cliui "^8.0.1"
+ dotenv "~16.3.1"
+ dotenv-expand "~10.0.0"
+ enquirer "~2.3.6"
+ figures "3.2.0"
+ flat "^5.0.2"
+ fs-extra "^11.1.0"
+ glob "7.1.4"
+ ignore "^5.0.4"
+ jest-diff "^29.4.1"
+ js-yaml "4.1.0"
+ jsonc-parser "3.2.0"
+ lines-and-columns "~2.0.3"
+ minimatch "3.0.5"
+ node-machine-id "1.1.12"
+ npm-run-path "^4.0.1"
+ open "^8.4.0"
+ semver "7.5.3"
+ string-width "^4.2.3"
+ strong-log-transformer "^2.1.0"
+ tar-stream "~2.2.0"
+ tmp "~0.2.1"
+ tsconfig-paths "^4.1.2"
+ tslib "^2.3.0"
+ yargs "^17.6.2"
+ yargs-parser "21.1.1"
+ optionalDependencies:
+ "@nx/nx-darwin-arm64" "17.2.8"
+ "@nx/nx-darwin-x64" "17.2.8"
+ "@nx/nx-freebsd-x64" "17.2.8"
+ "@nx/nx-linux-arm-gnueabihf" "17.2.8"
+ "@nx/nx-linux-arm64-gnu" "17.2.8"
+ "@nx/nx-linux-arm64-musl" "17.2.8"
+ "@nx/nx-linux-x64-gnu" "17.2.8"
+ "@nx/nx-linux-x64-musl" "17.2.8"
+ "@nx/nx-win32-arm64-msvc" "17.2.8"
+ "@nx/nx-win32-x64-msvc" "17.2.8"
+
+object-assign@^4.1.0, object-assign@^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=
-object-copy@^0.1.0:
- version "0.1.0"
- resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c"
- integrity sha1-fn2Fi3gb18mRpBupde04EnVOmYw=
- dependencies:
- copy-descriptor "^0.1.0"
- define-property "^0.2.5"
- kind-of "^3.0.3"
-
-object-inspect@^1.11.0, object-inspect@^1.9.0:
- version "1.12.0"
- resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.0.tgz#6e2c120e868fd1fd18cb4f18c31741d0d6e776f0"
- integrity sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==
+object-inspect@^1.13.1, object-inspect@^1.9.0:
+ version "1.13.1"
+ resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.1.tgz#b96c6109324ccfef6b12216a956ca4dc2ff94bc2"
+ integrity sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==
-object-is@^1.0.1, object-is@^1.1.5:
+object-is@^1.0.1:
version "1.1.5"
resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.1.5.tgz#b9deeaa5fc7f1846a0faecdceec138e5778f53ac"
integrity sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==
@@ -8436,13 +7220,6 @@ object-keys@^1.1.1:
resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e"
integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==
-object-visit@^1.0.0:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb"
- integrity sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=
- dependencies:
- isobject "^3.0.0"
-
object.assign@^4.1.2, object.assign@^4.1.4:
version "4.1.4"
resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.4.tgz#9673c7c7c351ab8c4d0b516f4343ebf4dfb7799f"
@@ -8453,56 +7230,51 @@ object.assign@^4.1.2, object.assign@^4.1.4:
has-symbols "^1.0.3"
object-keys "^1.1.1"
-object.entries@^1.1.2, object.entries@^1.1.3:
- version "1.1.3"
- resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.3.tgz#c601c7f168b62374541a07ddbd3e2d5e4f7711a6"
- integrity sha512-ym7h7OZebNS96hn5IJeyUmaWhaSM4SVtAPPfNLQEI2MYWCO2egsITb9nab2+i/Pwibx+R0mtn+ltKJXRSeTMGg==
- dependencies:
- call-bind "^1.0.0"
- define-properties "^1.1.3"
- es-abstract "^1.18.0-next.1"
- has "^1.0.3"
-
-object.fromentries@^2.0.4:
- version "2.0.4"
- resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.4.tgz#26e1ba5c4571c5c6f0890cef4473066456a120b8"
- integrity sha512-EsFBshs5RUUpQEY1D4q/m59kMfz4YJvxuNCJcv/jWwOJr34EaVnG11ZrZa0UHB3wnzV1wx8m58T4hQL8IuNXlQ==
+object.entries@^1.1.5, object.entries@^1.1.6, object.entries@^1.1.7:
+ version "1.1.7"
+ resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.7.tgz#2b47760e2a2e3a752f39dd874655c61a7f03c131"
+ integrity sha512-jCBs/0plmPsOnrKAfFQXRG2NFjlhZgjjcBLSmTnEhU8U6vVTsVe8ANeQJCHTl3gSsI4J+0emOoCgoKlmQPMgmA==
dependencies:
call-bind "^1.0.2"
- define-properties "^1.1.3"
- es-abstract "^1.18.0-next.2"
- has "^1.0.3"
+ define-properties "^1.2.0"
+ es-abstract "^1.22.1"
-object.getownpropertydescriptors@^2.0.3:
- version "2.1.2"
- resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.2.tgz#1bd63aeacf0d5d2d2f31b5e393b03a7c601a23f7"
- integrity sha512-WtxeKSzfBjlzL+F9b7M7hewDzMwy+C8NRssHd1YrNlzHzIDrXcXiNOMrezdAEM4UXixgV+vvnyBeN7Rygl2ttQ==
+object.fromentries@^2.0.6, object.fromentries@^2.0.7:
+ version "2.0.7"
+ resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.7.tgz#71e95f441e9a0ea6baf682ecaaf37fa2a8d7e616"
+ integrity sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA==
dependencies:
call-bind "^1.0.2"
- define-properties "^1.1.3"
- es-abstract "^1.18.0-next.2"
+ define-properties "^1.2.0"
+ es-abstract "^1.22.1"
-object.pick@^1.3.0:
- version "1.3.0"
- resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747"
- integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=
+object.groupby@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/object.groupby/-/object.groupby-1.0.2.tgz#494800ff5bab78fd0eff2835ec859066e00192ec"
+ integrity sha512-bzBq58S+x+uo0VjurFT0UktpKHOZmv4/xePiOA1nbB9pMqpGK7rUPNgf+1YC+7mE+0HzhTMqNUuCqvKhj6FnBw==
dependencies:
- isobject "^3.0.1"
+ array.prototype.filter "^1.0.3"
+ call-bind "^1.0.5"
+ define-properties "^1.2.1"
+ es-abstract "^1.22.3"
+ es-errors "^1.0.0"
-object.values@^1.1.1, object.values@^1.1.3:
+object.hasown@^1.1.2:
version "1.1.3"
- resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.3.tgz#eaa8b1e17589f02f698db093f7c62ee1699742ee"
- integrity sha512-nkF6PfDB9alkOUxpf1HNm/QlkeW3SReqL5WXeBLpEJJnlPSvRaDQpW3gQTksTN3fgJX4hL42RzKyOin6ff3tyw==
+ resolved "https://registry.yarnpkg.com/object.hasown/-/object.hasown-1.1.3.tgz#6a5f2897bb4d3668b8e79364f98ccf971bda55ae"
+ integrity sha512-fFI4VcYpRHvSLXxP7yiZOMAd331cPfd2p7PFDVbgUsYOfCT3tICVqXWngbjr4m49OvsBwUBQ6O2uQoJvy3RexA==
dependencies:
- call-bind "^1.0.2"
- define-properties "^1.1.3"
- es-abstract "^1.18.0-next.2"
- has "^1.0.3"
+ define-properties "^1.2.0"
+ es-abstract "^1.22.1"
-octokit-pagination-methods@^1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/octokit-pagination-methods/-/octokit-pagination-methods-1.1.0.tgz#cf472edc9d551055f9ef73f6e42b4dbb4c80bea4"
- integrity sha512-fZ4qZdQ2nxJvtcasX7Ghl+WlWS/d9IgnBIwFZXVNNZUmzpno91SX5bc5vuxiuKoCtK78XxGGNuSCrDC7xYB3OQ==
+object.values@^1.1.6, object.values@^1.1.7:
+ version "1.1.7"
+ resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.7.tgz#617ed13272e7e1071b43973aa1655d9291b8442a"
+ integrity sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng==
+ dependencies:
+ call-bind "^1.0.2"
+ define-properties "^1.2.0"
+ es-abstract "^1.22.1"
once@^1.3.0, once@^1.3.1, once@^1.4.0:
version "1.4.0"
@@ -8511,13 +7283,6 @@ once@^1.3.0, once@^1.3.1, once@^1.4.0:
dependencies:
wrappy "1"
-onetime@^2.0.0:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4"
- integrity sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=
- dependencies:
- mimic-fn "^1.0.0"
-
onetime@^5.1.0, onetime@^5.1.2:
version "5.1.2"
resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e"
@@ -8525,44 +7290,54 @@ onetime@^5.1.0, onetime@^5.1.2:
dependencies:
mimic-fn "^2.1.0"
-optionator@^0.8.1, optionator@^0.8.3:
- version "0.8.3"
- resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495"
- integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==
+onetime@^6.0.0:
+ version "6.0.0"
+ resolved "https://registry.yarnpkg.com/onetime/-/onetime-6.0.0.tgz#7c24c18ed1fd2e9bca4bd26806a33613c77d34b4"
+ integrity sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==
dependencies:
- deep-is "~0.1.3"
- fast-levenshtein "~2.0.6"
- levn "~0.3.0"
- prelude-ls "~1.1.2"
- type-check "~0.3.2"
- word-wrap "~1.2.3"
-
-os-homedir@^1.0.0:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3"
- integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M=
+ mimic-fn "^4.0.0"
-os-name@^3.1.0:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/os-name/-/os-name-3.1.0.tgz#dec19d966296e1cd62d701a5a66ee1ddeae70801"
- integrity sha512-h8L+8aNjNcMpo/mAIBPn5PXCM16iyPGjHNWo6U1YO8sJTMHtEtyczI6QJnLoplswm6goopQkqc7OAnjhWcugVg==
+open@^8.4.0:
+ version "8.4.2"
+ resolved "https://registry.yarnpkg.com/open/-/open-8.4.2.tgz#5b5ffe2a8f793dcd2aad73e550cb87b59cb084f9"
+ integrity sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==
dependencies:
- macos-release "^2.2.0"
- windows-release "^3.1.0"
+ define-lazy-prop "^2.0.0"
+ is-docker "^2.1.1"
+ is-wsl "^2.2.0"
+
+optionator@^0.9.3:
+ version "0.9.3"
+ resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.3.tgz#007397d44ed1872fdc6ed31360190f81814e2c64"
+ integrity sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==
+ dependencies:
+ "@aashutoshrathi/word-wrap" "^1.2.3"
+ deep-is "^0.1.3"
+ fast-levenshtein "^2.0.6"
+ levn "^0.4.1"
+ prelude-ls "^1.2.1"
+ type-check "^0.4.0"
+
+ora@^5.4.1:
+ version "5.4.1"
+ resolved "https://registry.yarnpkg.com/ora/-/ora-5.4.1.tgz#1b2678426af4ac4a509008e5e4ac9e9959db9e18"
+ integrity sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==
+ dependencies:
+ bl "^4.1.0"
+ chalk "^4.1.0"
+ cli-cursor "^3.1.0"
+ cli-spinners "^2.5.0"
+ is-interactive "^1.0.0"
+ is-unicode-supported "^0.1.0"
+ log-symbols "^4.1.0"
+ strip-ansi "^6.0.0"
+ wcwidth "^1.0.1"
-os-tmpdir@^1.0.0, os-tmpdir@~1.0.2:
+os-tmpdir@~1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"
integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=
-osenv@^0.1.4, osenv@^0.1.5:
- version "0.1.5"
- resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410"
- integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==
- dependencies:
- os-homedir "^1.0.0"
- os-tmpdir "^1.0.0"
-
outdent@^0.5.0:
version "0.5.0"
resolved "https://registry.yarnpkg.com/outdent/-/outdent-0.5.0.tgz#9e10982fdc41492bb473ad13840d22f9655be2ff"
@@ -8587,20 +7362,27 @@ p-limit@^1.1.0:
dependencies:
p-try "^1.0.0"
-p-limit@^2.0.0, p-limit@^2.2.0:
+p-limit@^2.2.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1"
integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==
dependencies:
p-try "^2.0.0"
-p-limit@^3.0.2, p-limit@^3.1.0:
+p-limit@^3.0.2:
version "3.1.0"
resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b"
integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==
dependencies:
yocto-queue "^0.1.0"
+p-limit@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-5.0.0.tgz#6946d5b7140b649b7a33a027d89b4c625b3a5985"
+ integrity sha512-/Eaoq+QyLSiXQ4lyYV23f14mZRQcXnxfHrN0vCai+ak9G0pp9iEQukIIZq5NccEvwRB8PUnZT0KsOoDCINS1qQ==
+ dependencies:
+ yocto-queue "^1.0.0"
+
p-locate@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43"
@@ -8608,13 +7390,6 @@ p-locate@^2.0.0:
dependencies:
p-limit "^1.1.0"
-p-locate@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4"
- integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==
- dependencies:
- p-limit "^2.0.0"
-
p-locate@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07"
@@ -8629,41 +7404,47 @@ p-locate@^5.0.0:
dependencies:
p-limit "^3.0.2"
-p-map-series@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/p-map-series/-/p-map-series-1.0.0.tgz#bf98fe575705658a9e1351befb85ae4c1f07bdca"
- integrity sha1-v5j+V1cFZYqeE1G++4WuTB8Hvco=
- dependencies:
- p-reduce "^1.0.0"
-
-p-map@^2.0.0, p-map@^2.1.0:
+p-map-series@2.1.0:
version "2.1.0"
- resolved "https://registry.yarnpkg.com/p-map/-/p-map-2.1.0.tgz#310928feef9c9ecc65b68b17693018a665cea175"
- integrity sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==
+ resolved "https://registry.yarnpkg.com/p-map-series/-/p-map-series-2.1.0.tgz#7560d4c452d9da0c07e692fdbfe6e2c81a2a91f2"
+ integrity sha512-RpYIIK1zXSNEOdwxcfe7FdvGcs7+y5n8rifMhMNWvaxRNMPINJHF5GDeuVxWqnfrcHPSCnp7Oo5yNXHId9Av2Q==
-p-map@^4.0.0:
+p-map@4.0.0, p-map@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b"
integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==
dependencies:
aggregate-error "^3.0.0"
-p-pipe@^1.2.0:
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/p-pipe/-/p-pipe-1.2.0.tgz#4b1a11399a11520a67790ee5a0c1d5881d6befe9"
- integrity sha1-SxoROZoRUgpneQ7loMHViB1r7+k=
+p-map@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/p-map/-/p-map-2.1.0.tgz#310928feef9c9ecc65b68b17693018a665cea175"
+ integrity sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==
-p-queue@^4.0.0:
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/p-queue/-/p-queue-4.0.0.tgz#ed0eee8798927ed6f2c2f5f5b77fdb2061a5d346"
- integrity sha512-3cRXXn3/O0o3+eVmUroJPSj/esxoEFIm0ZOno/T+NzG/VZgPOqQ8WKmlNqubSEpZmCIngEy34unkHGg83ZIBmg==
+p-pipe@3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/p-pipe/-/p-pipe-3.1.0.tgz#48b57c922aa2e1af6a6404cb7c6bf0eb9cc8e60e"
+ integrity sha512-08pj8ATpzMR0Y80x50yJHn37NF6vjrqHutASaX5LiH5npS9XPvrUmscd9MF5R4fuYRHOxQR1FfMIlF7AzwoPqw==
+
+p-queue@6.6.2:
+ version "6.6.2"
+ resolved "https://registry.yarnpkg.com/p-queue/-/p-queue-6.6.2.tgz#2068a9dcf8e67dd0ec3e7a2bcb76810faa85e426"
+ integrity sha512-RwFpb72c/BhQLEXIZ5K2e+AhgNVmIejGlTgiB9MzZ0e93GRvqZ7uSi0dvRF7/XIXDeNkra2fNHBxTyPDGySpjQ==
dependencies:
- eventemitter3 "^3.1.0"
+ eventemitter3 "^4.0.4"
+ p-timeout "^3.2.0"
-p-reduce@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/p-reduce/-/p-reduce-1.0.0.tgz#18c2b0dd936a4690a529f8231f58a0fdb6a47dfa"
- integrity sha1-GMKw3ZNqRpClKfgjH1ig/bakffo=
+p-reduce@2.1.0, p-reduce@^2.0.0, p-reduce@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/p-reduce/-/p-reduce-2.1.0.tgz#09408da49507c6c274faa31f28df334bc712b64a"
+ integrity sha512-2USApvnsutq8uoxZBGbbWM0JIYLiEMJ9RlaN7fAzVNb9OZN0SHjjTTfIcb667XynS5Y1VhwDJVDa72TnPzAYWw==
+
+p-timeout@^3.2.0:
+ version "3.2.0"
+ resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-3.2.0.tgz#c7e17abc971d2a7962ef83626b35d635acf23dfe"
+ integrity sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==
+ dependencies:
+ p-finally "^1.0.0"
p-try@^1.0.0:
version "1.0.0"
@@ -8675,12 +7456,59 @@ p-try@^2.0.0:
resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6"
integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==
-p-waterfall@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/p-waterfall/-/p-waterfall-1.0.0.tgz#7ed94b3ceb3332782353af6aae11aa9fc235bb00"
- integrity sha1-ftlLPOszMngjU69qrhGqn8I1uwA=
+p-waterfall@2.1.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/p-waterfall/-/p-waterfall-2.1.1.tgz#63153a774f472ccdc4eb281cdb2967fcf158b2ee"
+ integrity sha512-RRTnDb2TBG/epPRI2yYXsimO0v3BXC8Yd3ogr1545IaqKK17VGhbWVeGGN+XfCm/08OK8635nH31c8bATkHuSw==
dependencies:
- p-reduce "^1.0.0"
+ p-reduce "^2.0.0"
+
+pac-proxy-agent@^7.0.1:
+ version "7.0.1"
+ resolved "https://registry.yarnpkg.com/pac-proxy-agent/-/pac-proxy-agent-7.0.1.tgz#6b9ddc002ec3ff0ba5fdf4a8a21d363bcc612d75"
+ integrity sha512-ASV8yU4LLKBAjqIPMbrgtaKIvxQri/yh2OpI+S6hVa9JRkUI3Y3NPFbfngDtY7oFtSMD3w31Xns89mDa3Feo5A==
+ dependencies:
+ "@tootallnate/quickjs-emscripten" "^0.23.0"
+ agent-base "^7.0.2"
+ debug "^4.3.4"
+ get-uri "^6.0.1"
+ http-proxy-agent "^7.0.0"
+ https-proxy-agent "^7.0.2"
+ pac-resolver "^7.0.0"
+ socks-proxy-agent "^8.0.2"
+
+pac-resolver@^7.0.0:
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/pac-resolver/-/pac-resolver-7.0.0.tgz#79376f1ca26baf245b96b34c339d79bff25e900c"
+ integrity sha512-Fd9lT9vJbHYRACT8OhCbZBbxr6KRSawSovFpy8nDGshaK99S/EBhVIHp9+crhxrsZOuvLpgL1n23iyPg6Rl2hg==
+ dependencies:
+ degenerator "^5.0.0"
+ ip "^1.1.8"
+ netmask "^2.0.2"
+
+pacote@^17.0.5:
+ version "17.0.5"
+ resolved "https://registry.yarnpkg.com/pacote/-/pacote-17.0.5.tgz#e9854edee7a073635cdd36b0c07cd4f2ab1757b6"
+ integrity sha512-TAE0m20zSDMnchPja9vtQjri19X3pZIyRpm2TJVeI+yU42leJBBDTRYhOcWFsPhaMxf+3iwQkFiKz16G9AEeeA==
+ dependencies:
+ "@npmcli/git" "^5.0.0"
+ "@npmcli/installed-package-contents" "^2.0.1"
+ "@npmcli/promise-spawn" "^7.0.0"
+ "@npmcli/run-script" "^7.0.0"
+ cacache "^18.0.0"
+ fs-minipass "^3.0.0"
+ minipass "^7.0.2"
+ npm-package-arg "^11.0.0"
+ npm-packlist "^8.0.0"
+ npm-pick-manifest "^9.0.0"
+ npm-registry-fetch "^16.0.0"
+ proc-log "^3.0.0"
+ promise-retry "^2.0.1"
+ read-package-json "^7.0.0"
+ read-package-json-fast "^3.0.0"
+ sigstore "^2.0.0"
+ ssri "^10.0.0"
+ tar "^6.1.11"
pako@^0.2.5:
version "0.2.9"
@@ -8692,15 +7520,6 @@ pako@~1.0.5:
resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf"
integrity sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==
-parallel-transform@^1.1.0:
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/parallel-transform/-/parallel-transform-1.2.0.tgz#9049ca37d6cb2182c3b1d2c720be94d14a5814fc"
- integrity sha512-P2vSmIu38uIlvdcU7fDkyrxj33gTUy/ABO5ZUbGowxNCopBq/OoD42bP4UmMrJoPyk4Uqf0mu3mtWBhHCZD8yg==
- dependencies:
- cyclist "^1.0.1"
- inherits "^2.0.3"
- readable-stream "^2.1.5"
-
parent-module@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2"
@@ -8708,18 +7527,6 @@ parent-module@^1.0.0:
dependencies:
callsites "^3.0.0"
-parse-github-repo-url@^1.3.0:
- version "1.4.1"
- resolved "https://registry.yarnpkg.com/parse-github-repo-url/-/parse-github-repo-url-1.4.1.tgz#9e7d8bb252a6cb6ba42595060b7bf6df3dbc1f50"
- integrity sha1-nn2LslKmy2ukJZUGC3v23z28H1A=
-
-parse-json@^2.2.0:
- version "2.2.0"
- resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9"
- integrity sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=
- dependencies:
- error-ex "^1.2.0"
-
parse-json@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0"
@@ -8738,60 +7545,32 @@ parse-json@^5.0.0, parse-json@^5.2.0:
json-parse-even-better-errors "^2.3.0"
lines-and-columns "^1.1.6"
-parse-passwd@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6"
- integrity sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=
-
-parse-path@^4.0.0:
- version "4.0.3"
- resolved "https://registry.yarnpkg.com/parse-path/-/parse-path-4.0.3.tgz#82d81ec3e071dcc4ab49aa9f2c9c0b8966bb22bf"
- integrity sha512-9Cepbp2asKnWTJ9x2kpw6Fe8y9JDbqwahGCTvklzd/cEq5C5JC59x2Xb0Kx+x0QZ8bvNquGO8/BWP0cwBHzSAA==
+parse-path@^7.0.0:
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/parse-path/-/parse-path-7.0.0.tgz#605a2d58d0a749c8594405d8cc3a2bf76d16099b"
+ integrity sha512-Euf9GG8WT9CdqwuWJGdf3RkUcTBArppHABkO7Lm8IzRQp0e2r/kkFnmhu4TSK30Wcu5rVAZLmfPKSBBi9tWFog==
dependencies:
- is-ssh "^1.3.0"
- protocols "^1.4.0"
- qs "^6.9.4"
- query-string "^6.13.8"
+ protocols "^2.0.0"
parse-svg-path@^0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/parse-svg-path/-/parse-svg-path-0.1.2.tgz#7a7ec0d1eb06fa5325c7d3e009b859a09b5d49eb"
integrity sha1-en7A0esG+lMlx9PgCbhZoJtdSes=
-parse-url@^5.0.0:
- version "5.0.2"
- resolved "https://registry.yarnpkg.com/parse-url/-/parse-url-5.0.2.tgz#856a3be1fcdf78dc93fc8b3791f169072d898b59"
- integrity sha512-Czj+GIit4cdWtxo3ISZCvLiUjErSo0iI3wJ+q9Oi3QuMYTI6OZu+7cewMWZ+C1YAnKhYTk6/TLuhIgCypLthPA==
+parse-url@^8.1.0:
+ version "8.1.0"
+ resolved "https://registry.yarnpkg.com/parse-url/-/parse-url-8.1.0.tgz#972e0827ed4b57fc85f0ea6b0d839f0d8a57a57d"
+ integrity sha512-xDvOoLU5XRrcOZvnI6b8zA6n9O9ejNk/GExuz1yBuWUGn9KA97GI6HTs6u02wKara1CeVmZhH+0TZFdWScR89w==
dependencies:
- is-ssh "^1.3.0"
- normalize-url "^3.3.0"
- parse-path "^4.0.0"
- protocols "^1.4.0"
+ parse-path "^7.0.0"
-parse5@^7.0.0, parse5@^7.1.1:
+parse5@^7.1.2:
version "7.1.2"
resolved "https://registry.yarnpkg.com/parse5/-/parse5-7.1.2.tgz#0736bebbfd77793823240a23b7fc5e010b7f8e32"
integrity sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==
dependencies:
entities "^4.4.0"
-pascalcase@^0.1.1:
- version "0.1.1"
- resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14"
- integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=
-
-path-dirname@^1.0.0:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0"
- integrity sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=
-
-path-exists@^2.0.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b"
- integrity sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=
- dependencies:
- pinkie-promise "^2.0.0"
-
path-exists@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515"
@@ -8807,36 +7586,28 @@ path-is-absolute@^1.0.0:
resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18=
-path-key@^2.0.0, path-key@^2.0.1:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40"
- integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=
-
path-key@^3.0.0, path-key@^3.1.0:
version "3.1.1"
resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375"
integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==
-path-parse@^1.0.6:
- version "1.0.6"
- resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c"
- integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==
+path-key@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/path-key/-/path-key-4.0.0.tgz#295588dc3aee64154f877adb9d780b81c554bf18"
+ integrity sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==
-path-type@^1.0.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441"
- integrity sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=
- dependencies:
- graceful-fs "^4.1.2"
- pify "^2.0.0"
- pinkie-promise "^2.0.0"
+path-parse@^1.0.7:
+ version "1.0.7"
+ resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735"
+ integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==
-path-type@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73"
- integrity sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=
+path-scurry@^1.10.1, path-scurry@^1.6.1:
+ version "1.10.1"
+ resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.10.1.tgz#9ba6bf5aa8500fe9fd67df4f0d9483b2b0bfc698"
+ integrity sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==
dependencies:
- pify "^2.0.0"
+ lru-cache "^9.1.1 || ^10.0.0"
+ minipass "^5.0.0 || ^6.0.2 || ^7.0.0"
path-type@^3.0.0:
version "3.0.0"
@@ -8850,36 +7621,51 @@ path-type@^4.0.0:
resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b"
integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==
-pdfjs-dist@3.1.81:
- version "3.1.81"
- resolved "https://registry.yarnpkg.com/pdfjs-dist/-/pdfjs-dist-3.1.81.tgz#52d0683c8cdb60631e75d2f6aa1be2c1de0d9470"
- integrity sha512-hZHVVbjU2Ac1VYyPFrg9fBcyS7EEdB8YFy5upk6LmnsXl10WxAavdiViGWi2C/xK0GZObEpSSJU1VnoF9t8n9w==
+path-type@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/path-type/-/path-type-5.0.0.tgz#14b01ed7aea7ddf9c7c3f46181d4d04f9c785bb8"
+ integrity sha512-5HviZNaZcfqP95rwpv+1HDgUamezbqdSYTyzjTvwtJSnIH+3vnbmWsItli8OFEndS984VT55M3jduxZbX351gg==
+
+pathe@^1.1.0, pathe@^1.1.1, pathe@^1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/pathe/-/pathe-1.1.2.tgz#6c4cb47a945692e48a1ddd6e4094d170516437ec"
+ integrity sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==
+
+pathval@^1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d"
+ integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==
+
+pdfjs-dist@3.2.146:
+ version "3.2.146"
+ resolved "https://registry.yarnpkg.com/pdfjs-dist/-/pdfjs-dist-3.2.146.tgz#fffbd26e2da94a03adb43e8324d1c252ed7d46f5"
+ integrity sha512-wy1OB/v75usRD1LqgxBUWC+ZOiKTmG5J8c2z9XVFrVSSWiVbSuseNojmvFa/TT0pYtcFmkL4zn6KaxvqfPYMRg==
dependencies:
web-streams-polyfill "^3.2.1"
optionalDependencies:
- canvas "^2.10.2"
+ canvas "^2.11.0"
pend@~1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50"
integrity sha1-elfrVQpng/kRUzH89GY9XI4AelA=
-performance-now@^2.1.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
- integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=
-
picocolors@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c"
integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==
-picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.2, picomatch@^2.2.3:
- version "2.3.0"
- resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.0.tgz#f1f061de8f6a4bf022892e2d128234fb98302972"
- integrity sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==
+picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3, picomatch@^2.3.1:
+ version "2.3.1"
+ resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42"
+ integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==
+
+pify@5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/pify/-/pify-5.0.0.tgz#1f5eca3f5e87ebec28cc6d54a0e4aaf00acc127f"
+ integrity sha512-eW/gHNMlxdSP6dmG6uJip6FXN0EQBwm2clYYd8Wul42Cwu/DK8HEftzsapcNdYe2MfLiIwZqsDk2RDEsTE79hA==
-pify@^2.0.0, pify@^2.3.0:
+pify@^2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"
integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw=
@@ -8894,50 +7680,28 @@ pify@^4.0.1:
resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231"
integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==
-pinkie-promise@^2.0.0:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa"
- integrity sha1-ITXW36ejWMBprJsXh3YogihFD/o=
- dependencies:
- pinkie "^2.0.0"
-
-pinkie@^2.0.0:
- version "2.0.4"
- resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870"
- integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA=
-
-pirates@^4.0.4, pirates@^4.0.5:
- version "4.0.5"
- resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.5.tgz#feec352ea5c3268fb23a37c702ab1699f35a5f3b"
- integrity sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==
-
pixelmatch@^5.1.0:
- version "5.2.1"
- resolved "https://registry.yarnpkg.com/pixelmatch/-/pixelmatch-5.2.1.tgz#9e4e4f4aa59648208a31310306a5bed5522b0d65"
- integrity sha512-WjcAdYSnKrrdDdqTcVEY7aB7UhhwjYQKYhHiBXdJef0MOaQeYpUdQ+iVyBLa5YBKS8MPVPPMX7rpOByISLpeEQ==
+ version "5.3.0"
+ resolved "https://registry.yarnpkg.com/pixelmatch/-/pixelmatch-5.3.0.tgz#5e5321a7abedfb7962d60dbf345deda87cb9560a"
+ integrity sha512-o8mkY4E/+LNUf6LzX96ht6k6CEDi65k9G2rjMtBe9Oo+VPKSvl+0GKHuH/AlG+GA5LPG/i5hrekkxUc3s2HU+Q==
dependencies:
- pngjs "^4.0.1"
+ pngjs "^6.0.0"
-pkg-dir@4.2.0, pkg-dir@^4.2.0:
+pkg-dir@^4.2.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3"
integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==
dependencies:
find-up "^4.0.0"
-pkg-dir@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b"
- integrity sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=
- dependencies:
- find-up "^2.1.0"
-
-pkg-dir@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3"
- integrity sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==
+pkg-types@^1.0.3:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/pkg-types/-/pkg-types-1.0.3.tgz#988b42ab19254c01614d13f4f65a2cfc7880f868"
+ integrity sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==
dependencies:
- find-up "^3.0.0"
+ jsonc-parser "^3.2.0"
+ mlly "^1.2.0"
+ pathe "^1.1.0"
please-upgrade-node@^3.2.0:
version "3.2.0"
@@ -8951,21 +7715,25 @@ pngjs@^3.4.0:
resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-3.4.0.tgz#99ca7d725965fb655814eaf65f38f12bbdbf555f"
integrity sha512-NCrCHhWmnQklfH4MtJMRjZ2a8c80qXeMlQMv2uVp9ISJMTt562SbGd6n2oq0PaPgKm7Z6pL9E2UlLIhC+SHL3w==
-pngjs@^4.0.1:
- version "4.0.1"
- resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-4.0.1.tgz#f803869bb2fc1bfe1bf99aa4ec21c108117cfdbe"
- integrity sha512-rf5+2/ioHeQxR6IxuYNYGFytUyG3lma/WW1nsmjeHlWwtb2aByla6dkVc8pmJ9nplzkTA0q2xx7mMWrOTqT4Gg==
-
-posix-character-classes@^0.1.0:
- version "0.1.1"
- resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab"
- integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=
+pngjs@^6.0.0:
+ version "6.0.0"
+ resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-6.0.0.tgz#ca9e5d2aa48db0228a52c419c3308e87720da821"
+ integrity sha512-TRzzuFRRmEoSW/p1KVAmiOgPco2Irlah+bGFCeNfJXxxYGwSw7YwAOAcd7X28K/m5bjBWKsC29KyoMfHbypayg==
postcss-value-parser@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz#443f6a20ced6481a2bda4fa8532a6e55d789a2cb"
integrity sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==
+postcss@^8.4.32:
+ version "8.4.33"
+ resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.33.tgz#1378e859c9f69bf6f638b990a0212f43e2aaa742"
+ integrity sha512-Kkpbhhdjw2qQs2O2DGX+8m5OVqEcbB9HRBvuYM9pgrjEFUg30A9LmXNlTAUj4S9kgtGyrMbTzVjH7E+s5Re2yg==
+ dependencies:
+ nanoid "^3.3.7"
+ picocolors "^1.0.0"
+ source-map-js "^1.0.2"
+
preferred-pm@^3.0.0:
version "3.0.3"
resolved "https://registry.yarnpkg.com/preferred-pm/-/preferred-pm-3.0.3.tgz#1b6338000371e3edbce52ef2e4f65eb2e73586d6"
@@ -8976,21 +7744,21 @@ preferred-pm@^3.0.0:
path-exists "^4.0.0"
which-pm "2.0.0"
-prelude-ls@~1.1.2:
- version "1.1.2"
- resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
- integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=
-
-prettier@^1.16.4:
- version "1.19.1"
- resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb"
- integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==
+prelude-ls@^1.2.1:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396"
+ integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==
prettier@^2.7.1:
version "2.8.4"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.4.tgz#34dd2595629bfbb79d344ac4a91ff948694463c3"
integrity sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw==
+prettier@^3.2.0:
+ version "3.2.4"
+ resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.2.4.tgz#4723cadeac2ce7c9227de758e5ff9b14e075f283"
+ integrity sha512-FWu1oLHKCrtpO1ypU6J0SbK2d9Ckwysq6bHj/uaCP26DxrPpppCLQRGVuqAxSTvhF00AcvDRyYrLNW7ocBhFFQ==
+
pretty-format@^27.0.2:
version "27.5.1"
resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.5.1.tgz#2181879fdea51a7a5851fb39d920faa63f01d88e"
@@ -9000,15 +7768,20 @@ pretty-format@^27.0.2:
ansi-styles "^5.0.0"
react-is "^17.0.1"
-pretty-format@^29.5.0:
- version "29.5.0"
- resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.5.0.tgz#283134e74f70e2e3e7229336de0e4fce94ccde5a"
- integrity sha512-V2mGkI31qdttvTFX7Mt4efOqHXqJWMu4/r66Xh3Z3BwZaPfPJgp6/gbwoujRpPUtfEF6AUUWx3Jim3GCw5g/Qw==
+pretty-format@^29.7.0:
+ version "29.7.0"
+ resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.7.0.tgz#ca42c758310f365bfa71a0bda0a807160b776812"
+ integrity sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==
dependencies:
- "@jest/schemas" "^29.4.3"
+ "@jest/schemas" "^29.6.3"
ansi-styles "^5.0.0"
react-is "^18.0.0"
+proc-log@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/proc-log/-/proc-log-3.0.0.tgz#fb05ef83ccd64fd7b20bbe9c8c1070fc08338dd8"
+ integrity sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A==
+
process-nextick-args@~2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2"
@@ -9019,7 +7792,7 @@ process@^0.11.10:
resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182"
integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI=
-progress@2.0.3, progress@^2.0.0:
+progress@2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8"
integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==
@@ -9029,61 +7802,50 @@ promise-inflight@^1.0.1:
resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3"
integrity sha1-mEcocL8igTL8vdhoEputEsPAKeM=
-promise-polyfill@^7.1.1:
- version "7.1.2"
- resolved "https://registry.yarnpkg.com/promise-polyfill/-/promise-polyfill-7.1.2.tgz#ab05301d8c28536301622d69227632269a70ca3b"
- integrity sha512-FuEc12/eKqqoRYIGBrUptCBRhobL19PS2U31vMNTfyck1FxPyMfgsXyW4Mav85y/ZN1hop3hOwRlUDok23oYfQ==
-
-promise-retry@^1.1.1:
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/promise-retry/-/promise-retry-1.1.1.tgz#6739e968e3051da20ce6497fb2b50f6911df3d6d"
- integrity sha1-ZznpaOMFHaIM5kl/srUPaRHfPW0=
- dependencies:
- err-code "^1.0.0"
- retry "^0.10.0"
-
-prompts@^2.0.1:
- version "2.4.1"
- resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.1.tgz#befd3b1195ba052f9fd2fde8a486c4e82ee77f61"
- integrity sha512-EQyfIuO2hPDsX1L/blblV+H7I0knhgAd82cVneCwcdND9B8AuCDuRcBH6yIcG4dFzlOUqbazQqwGjx5xmsNLuQ==
+promise-retry@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/promise-retry/-/promise-retry-2.0.1.tgz#ff747a13620ab57ba688f5fc67855410c370da22"
+ integrity sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==
dependencies:
- kleur "^3.0.3"
- sisteransi "^1.0.5"
+ err-code "^2.0.2"
+ retry "^0.12.0"
-promzard@^0.3.0:
- version "0.3.0"
- resolved "https://registry.yarnpkg.com/promzard/-/promzard-0.3.0.tgz#26a5d6ee8c7dee4cb12208305acfb93ba382a9ee"
- integrity sha1-JqXW7ox97kyxIggwWs+5O6OCqe4=
+promzard@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/promzard/-/promzard-1.0.0.tgz#3246f8e6c9895a77c0549cefb65828ac0f6c006b"
+ integrity sha512-KQVDEubSUHGSt5xLakaToDFrSoZhStB8dXLzk2xvwR67gJktrHFvpR63oZgHyK19WKbHFLXJqCPXdVR3aBP8Ig==
dependencies:
- read "1"
+ read "^2.0.0"
-prop-types@^15.6.2, prop-types@^15.7.2:
- version "15.7.2"
- resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5"
- integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==
+prop-types@^15.6.2, prop-types@^15.8.1:
+ version "15.8.1"
+ resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5"
+ integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==
dependencies:
loose-envify "^1.4.0"
object-assign "^4.1.1"
- react-is "^16.8.1"
-
-proto-list@~1.2.1:
- version "1.2.4"
- resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849"
- integrity sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=
+ react-is "^16.13.1"
-protocols@^1.1.0, protocols@^1.4.0:
- version "1.4.8"
- resolved "https://registry.yarnpkg.com/protocols/-/protocols-1.4.8.tgz#48eea2d8f58d9644a4a32caae5d5db290a075ce8"
- integrity sha512-IgjKyaUSjsROSO8/D49Ab7hP8mJgTYcqApOqdPhLoPxAplXmkp+zRvsrSQjFn5by0rhm4VH0GAUELIPpx7B1yg==
-
-protoduck@^5.0.1:
- version "5.0.1"
- resolved "https://registry.yarnpkg.com/protoduck/-/protoduck-5.0.1.tgz#03c3659ca18007b69a50fd82a7ebcc516261151f"
- integrity sha512-WxoCeDCoCBY55BMvj4cAEjdVUFGRWed9ZxPlqTKYyw1nDDTQ4pqmnIMAGfJlg7Dx35uB/M+PHJPTmGOvaCaPTg==
- dependencies:
- genfun "^5.0.0"
-
-proxy-from-env@1.1.0:
+protocols@^2.0.0, protocols@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/protocols/-/protocols-2.0.1.tgz#8f155da3fc0f32644e83c5782c8e8212ccf70a86"
+ integrity sha512-/XJ368cyBJ7fzLMwLKv1e4vLxOju2MNAIokcr7meSaNcVbWz/CPcW22cP04mwxOErdA5mwjA8Q6w/cdAQxVn7Q==
+
+proxy-agent@6.3.1:
+ version "6.3.1"
+ resolved "https://registry.yarnpkg.com/proxy-agent/-/proxy-agent-6.3.1.tgz#40e7b230552cf44fd23ffaf7c59024b692612687"
+ integrity sha512-Rb5RVBy1iyqOtNl15Cw/llpeLH8bsb37gM1FUfKQ+Wck6xHlbAhWGUFiTRHtkjqGTA5pSHz6+0hrPW/oECihPQ==
+ dependencies:
+ agent-base "^7.0.2"
+ debug "^4.3.4"
+ http-proxy-agent "^7.0.0"
+ https-proxy-agent "^7.0.2"
+ lru-cache "^7.14.1"
+ pac-proxy-agent "^7.0.1"
+ proxy-from-env "^1.1.0"
+ socks-proxy-agent "^8.0.2"
+
+proxy-from-env@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2"
integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==
@@ -9093,19 +7855,11 @@ pseudomap@^1.0.2:
resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3"
integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM=
-psl@^1.1.28, psl@^1.1.33:
+psl@^1.1.33:
version "1.9.0"
resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7"
integrity sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==
-pump@^2.0.0:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/pump/-/pump-2.0.1.tgz#12399add6e4cf7526d973cbc8b5ce2e2908b3909"
- integrity sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==
- dependencies:
- end-of-stream "^1.1.0"
- once "^1.3.1"
-
pump@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64"
@@ -9114,69 +7868,22 @@ pump@^3.0.0:
end-of-stream "^1.1.0"
once "^1.3.1"
-pumpify@^1.3.3:
- version "1.5.1"
- resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.5.1.tgz#36513be246ab27570b1a374a5ce278bfd74370ce"
- integrity sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==
- dependencies:
- duplexify "^3.6.0"
- inherits "^2.0.3"
- pump "^2.0.0"
-
-punycode@^2.1.0, punycode@^2.1.1:
- version "2.1.1"
- resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec"
- integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==
-
-puppeteer-core@^12.0.1:
- version "12.0.1"
- resolved "https://registry.yarnpkg.com/puppeteer-core/-/puppeteer-core-12.0.1.tgz#b647ef14e0118537f0843b56a82a32d73ba528b0"
- integrity sha512-lty/1LQkl9zkMuQGwipHEBU8VD1m+SEWXG7zpdwzKet8P6L3taBNOt6Y1LpptakVejKz8TqMSjaWcEjqEKPfjw==
- dependencies:
- debug "4.3.2"
- devtools-protocol "0.0.937139"
- extract-zip "2.0.1"
- https-proxy-agent "5.0.0"
- node-fetch "2.6.5"
- pkg-dir "4.2.0"
- progress "2.0.3"
- proxy-from-env "1.1.0"
- rimraf "3.0.2"
- tar-fs "2.1.1"
- unbzip2-stream "1.4.3"
- ws "8.2.3"
-
-pure-rand@^6.0.0:
- version "6.0.2"
- resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-6.0.2.tgz#a9c2ddcae9b68d736a8163036f088a2781c8b306"
- integrity sha512-6Yg0ekpKICSjPswYOuC5sku/TSWaRYlA0qsXqJgM/d/4pLPHPuTxK7Nbf7jFKzAeedUhR8C7K9Uv63FBsSo8xQ==
-
-q@^1.5.1:
- version "1.5.1"
- resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7"
- integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=
-
-qs@^6.9.4:
- version "6.10.1"
- resolved "https://registry.yarnpkg.com/qs/-/qs-6.10.1.tgz#4931482fa8d647a5aab799c5271d2133b981fb6a"
- integrity sha512-M528Hph6wsSVOBiYUnGf+K/7w0hNshs/duGsNXPUCLH5XAqjEtiPGwNONLV0tBH8NoGb0mvD5JubnUTrujKDTg==
- dependencies:
- side-channel "^1.0.4"
-
-qs@~6.5.2:
- version "6.5.2"
- resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36"
- integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==
+punycode@^2.1.0, punycode@^2.1.1, punycode@^2.3.1:
+ version "2.3.1"
+ resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5"
+ integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==
-query-string@^6.13.8:
- version "6.14.1"
- resolved "https://registry.yarnpkg.com/query-string/-/query-string-6.14.1.tgz#7ac2dca46da7f309449ba0f86b1fd28255b0c86a"
- integrity sha512-XDxAeVmpfu1/6IjyT/gXHOl+S0vQ9owggJ30hhWKdHAsNPOcasn5o9BW0eejZqL2e4vMjhAxoW3jVHcD6mbcYw==
+puppeteer-core@21.6.0:
+ version "21.6.0"
+ resolved "https://registry.yarnpkg.com/puppeteer-core/-/puppeteer-core-21.6.0.tgz#506d1b7f982a1adca6f98ba88eb6a8be26869978"
+ integrity sha512-1vrzbp2E1JpBwtIIrriWkN+A0afUxkqRuFTC3uASc5ql6iuK9ppOdIU/CPGKwOyB4YFIQ16mRbK0PK19mbXnaQ==
dependencies:
- decode-uri-component "^0.2.0"
- filter-obj "^1.1.0"
- split-on-first "^1.0.0"
- strict-uri-encode "^2.0.0"
+ "@puppeteer/browsers" "1.9.0"
+ chromium-bidi "0.5.1"
+ cross-fetch "4.0.0"
+ debug "4.3.4"
+ devtools-protocol "0.0.1203626"
+ ws "8.14.2"
querystringify@^2.1.1:
version "2.2.0"
@@ -9188,6 +7895,11 @@ queue-microtask@^1.2.2:
resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243"
integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==
+queue-tick@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/queue-tick/-/queue-tick-1.0.1.tgz#f6f07ac82c1fd60f82e098b417a80e52f1f4c142"
+ integrity sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==
+
queue@^6.0.1:
version "6.0.2"
resolved "https://registry.yarnpkg.com/queue/-/queue-6.0.2.tgz#b91525283e2315c7553d2efa18d83e76432fed65"
@@ -9195,11 +7907,6 @@ queue@^6.0.1:
dependencies:
inherits "~2.0.3"
-quick-lru@^1.0.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-1.1.0.tgz#4360b17c61136ad38078397ff11416e186dcfbb8"
- integrity sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g=
-
quick-lru@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-4.0.1.tgz#5b8878f113a58217848c6482026c73e1ba57727f"
@@ -9212,6 +7919,42 @@ randombytes@^2.1.0:
dependencies:
safe-buffer "^5.1.0"
+"react-16@npm:react@^16.8.0":
+ version "16.14.0"
+ resolved "https://registry.yarnpkg.com/react/-/react-16.14.0.tgz#94d776ddd0aaa37da3eda8fc5b6b18a4c9a3114d"
+ integrity sha512-0X2CImDkJGApiAlcf0ODKIneSwBPhqJawOa5wCtKbu7ZECrmS26NvtSILynQ66cgkT/RJ4LidJOc3bUESwmU8g==
+ dependencies:
+ loose-envify "^1.1.0"
+ object-assign "^4.1.1"
+ prop-types "^15.6.2"
+
+"react-17@npm:react@^17.0.0":
+ version "17.0.2"
+ resolved "https://registry.yarnpkg.com/react/-/react-17.0.2.tgz#d0b5cc516d29eb3eee383f75b62864cfb6800037"
+ integrity sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==
+ dependencies:
+ loose-envify "^1.1.0"
+ object-assign "^4.1.1"
+
+"react-dom-16@npm:react-dom@^16.8.0":
+ version "16.14.0"
+ resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.14.0.tgz#7ad838ec29a777fb3c75c3a190f661cf92ab8b89"
+ integrity sha512-1gCeQXDLoIqMgqD3IO2Ah9bnf0w9kzhwN5q4FGnHZ67hBm9yePzB5JJAIQCc8x3pFnNlwFq4RidZggNAAkzWWw==
+ dependencies:
+ loose-envify "^1.1.0"
+ object-assign "^4.1.1"
+ prop-types "^15.6.2"
+ scheduler "^0.19.1"
+
+"react-dom-17@npm:react-dom@^17.0.0":
+ version "17.0.2"
+ resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-17.0.2.tgz#ecffb6845e3ad8dbfcdc498f0d0a939736502c23"
+ integrity sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==
+ dependencies:
+ loose-envify "^1.1.0"
+ object-assign "^4.1.1"
+ scheduler "^0.20.2"
+
react-dom@^18.2.0:
version "18.2.0"
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.2.0.tgz#22aaf38708db2674ed9ada224ca4aa708d821e3d"
@@ -9220,7 +7963,7 @@ react-dom@^18.2.0:
loose-envify "^1.1.0"
scheduler "^0.23.0"
-react-is@^16.8.1:
+react-is@^16.13.1:
version "16.13.1"
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"
integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==
@@ -9245,13 +7988,10 @@ react-reconciler@0.23.0:
prop-types "^15.6.2"
scheduler "^0.17.0"
-react@^17.0.2:
- version "17.0.2"
- resolved "https://registry.yarnpkg.com/react/-/react-17.0.2.tgz#d0b5cc516d29eb3eee383f75b62864cfb6800037"
- integrity sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==
- dependencies:
- loose-envify "^1.1.0"
- object-assign "^4.1.1"
+react-refresh@^0.14.0:
+ version "0.14.0"
+ resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.14.0.tgz#4e02825378a5f227079554d4284889354e5f553e"
+ integrity sha512-wViHqhAd8OHeLS/IRMJjTSDHF3U9eWi62F/MledQGPdJGDhodXJ9PBLNGr6WWL7qlH12Mt3TyTpbS+hGXMjCzQ==
react@^18.2.0:
version "18.2.0"
@@ -9260,47 +8000,38 @@ react@^18.2.0:
dependencies:
loose-envify "^1.1.0"
-read-cmd-shim@^1.0.1:
- version "1.0.5"
- resolved "https://registry.yarnpkg.com/read-cmd-shim/-/read-cmd-shim-1.0.5.tgz#87e43eba50098ba5a32d0ceb583ab8e43b961c16"
- integrity sha512-v5yCqQ/7okKoZZkBQUAfTsQ3sVJtXdNfbPnI5cceppoxEVLYA3k+VtV2omkeo8MS94JCy4fSiUwlRBAwCVRPUA==
- dependencies:
- graceful-fs "^4.1.2"
-
-"read-package-json@1 || 2", read-package-json@^2.0.0, read-package-json@^2.0.13:
- version "2.1.2"
- resolved "https://registry.yarnpkg.com/read-package-json/-/read-package-json-2.1.2.tgz#6992b2b66c7177259feb8eaac73c3acd28b9222a"
- integrity sha512-D1KmuLQr6ZSJS0tW8hf3WGpRlwszJOXZ3E8Yd/DNRaM5d+1wVRZdHlpGBLAuovjr28LbWvjpWkBHMxpRGGjzNA==
- dependencies:
- glob "^7.1.1"
- json-parse-even-better-errors "^2.3.0"
- normalize-package-data "^2.0.0"
- npm-normalize-package-bin "^1.0.0"
+read-cmd-shim@4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/read-cmd-shim/-/read-cmd-shim-4.0.0.tgz#640a08b473a49043e394ae0c7a34dd822c73b9bb"
+ integrity sha512-yILWifhaSEEytfXI76kB9xEEiG1AiozaCJZ83A87ytjRiN+jVibXjedjCRNjoZviinhG+4UkalO3mWTd8u5O0Q==
-read-package-tree@^5.1.6:
- version "5.3.1"
- resolved "https://registry.yarnpkg.com/read-package-tree/-/read-package-tree-5.3.1.tgz#a32cb64c7f31eb8a6f31ef06f9cedf74068fe636"
- integrity sha512-mLUDsD5JVtlZxjSlPPx1RETkNjjvQYuweKwNVt1Sn8kP5Jh44pvYuUHCp6xSVDZWbNxVxG5lyZJ921aJH61sTw==
+read-package-json-fast@^3.0.0:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/read-package-json-fast/-/read-package-json-fast-3.0.2.tgz#394908a9725dc7a5f14e70c8e7556dff1d2b1049"
+ integrity sha512-0J+Msgym3vrLOUB3hzQCuZHII0xkNGCtz/HJH9xZshwv9DbDwkw1KaE3gx/e2J5rpEY5rtOy6cyhKOPrkP7FZw==
dependencies:
- read-package-json "^2.0.0"
- readdir-scoped-modules "^1.0.0"
- util-promisify "^2.1.0"
+ json-parse-even-better-errors "^3.0.0"
+ npm-normalize-package-bin "^3.0.0"
-read-pkg-up@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02"
- integrity sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=
+read-package-json@6.0.4, read-package-json@^6.0.0:
+ version "6.0.4"
+ resolved "https://registry.yarnpkg.com/read-package-json/-/read-package-json-6.0.4.tgz#90318824ec456c287437ea79595f4c2854708836"
+ integrity sha512-AEtWXYfopBj2z5N5PbkAOeNHRPUg5q+Nen7QLxV8M2zJq1ym6/lCz3fYNTCXe19puu2d06jfHhrP7v/S2PtMMw==
dependencies:
- find-up "^1.0.0"
- read-pkg "^1.0.0"
+ glob "^10.2.2"
+ json-parse-even-better-errors "^3.0.0"
+ normalize-package-data "^5.0.0"
+ npm-normalize-package-bin "^3.0.0"
-read-pkg-up@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be"
- integrity sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=
+read-package-json@^7.0.0:
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/read-package-json/-/read-package-json-7.0.0.tgz#d605c9dcf6bc5856da24204aa4e9518ee9714be0"
+ integrity sha512-uL4Z10OKV4p6vbdvIXB+OzhInYtIozl/VxUBPgNkBuUi2DeRonnuspmaVAMcrkmfjKGNmRndyQAbE7/AmzGwFg==
dependencies:
- find-up "^2.0.0"
- read-pkg "^2.0.0"
+ glob "^10.2.2"
+ json-parse-even-better-errors "^3.0.0"
+ normalize-package-data "^6.0.0"
+ npm-normalize-package-bin "^3.0.0"
read-pkg-up@^3.0.0:
version "3.0.0"
@@ -9319,24 +8050,6 @@ read-pkg-up@^7.0.1:
read-pkg "^5.2.0"
type-fest "^0.8.1"
-read-pkg@^1.0.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28"
- integrity sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=
- dependencies:
- load-json-file "^1.0.0"
- normalize-package-data "^2.3.2"
- path-type "^1.0.0"
-
-read-pkg@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8"
- integrity sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=
- dependencies:
- load-json-file "^2.0.0"
- normalize-package-data "^2.3.2"
- path-type "^2.0.0"
-
read-pkg@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-3.0.0.tgz#9cbc686978fee65d16c00e2b19c237fcf6e38389"
@@ -9366,14 +8079,14 @@ read-yaml-file@^1.1.0:
pify "^4.0.1"
strip-bom "^3.0.0"
-read@1, read@~1.0.1:
- version "1.0.7"
- resolved "https://registry.yarnpkg.com/read/-/read-1.0.7.tgz#b3da19bd052431a97671d44a42634adf710b40c4"
- integrity sha1-s9oZvQUkMal2cdRKQmNK33ELQMQ=
+read@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/read/-/read-2.1.0.tgz#69409372c54fe3381092bc363a00650b6ac37218"
+ integrity sha512-bvxi1QLJHcaywCAEsAk4DG3nVoqiY2Csps3qzWalhj5hFqRn1d/OixkFXtLO1PrgHUcAP0FNaSY/5GYNfENFFQ==
dependencies:
- mute-stream "~0.0.4"
+ mute-stream "~1.0.0"
-"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.6, readable-stream@~2.3.6:
+readable-stream@^2.0.6, readable-stream@~2.3.6:
version "2.3.7"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57"
integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==
@@ -9386,25 +8099,15 @@ read@1, read@~1.0.1:
string_decoder "~1.1.1"
util-deprecate "~1.0.1"
-"readable-stream@2 || 3", readable-stream@3, readable-stream@^3.0.0, readable-stream@^3.0.2, readable-stream@^3.1.1, readable-stream@^3.4.0:
- version "3.6.0"
- resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198"
- integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==
+readable-stream@^3.0.0, readable-stream@^3.0.2, readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.6.0:
+ version "3.6.2"
+ resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967"
+ integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==
dependencies:
inherits "^2.0.3"
string_decoder "^1.1.1"
util-deprecate "^1.0.1"
-readdir-scoped-modules@^1.0.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/readdir-scoped-modules/-/readdir-scoped-modules-1.1.0.tgz#8d45407b4f870a0dcaebc0e28670d18e74514309"
- integrity sha512-asaikDeqAQg7JifRsZn1NJZXo9E+VwlyCfbkZhwyISinqk5zNS6266HS5kah6P0SaQKGF6SkNnZVHUzHFYxYDw==
- dependencies:
- debuglog "^1.0.1"
- dezalgo "^1.0.0"
- graceful-fs "^4.1.2"
- once "^1.3.0"
-
readdirp@~3.6.0:
version "3.6.0"
resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7"
@@ -9412,22 +8115,6 @@ readdirp@~3.6.0:
dependencies:
picomatch "^2.2.1"
-redent@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde"
- integrity sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=
- dependencies:
- indent-string "^2.1.0"
- strip-indent "^1.0.1"
-
-redent@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/redent/-/redent-2.0.0.tgz#c1b2007b42d57eb1389079b3c8333639d5e1ccaa"
- integrity sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo=
- dependencies:
- indent-string "^3.0.0"
- strip-indent "^2.0.0"
-
redent@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/redent/-/redent-3.0.0.tgz#e557b7998316bb53c9f1f56fa626352c6963059f"
@@ -9436,6 +8123,19 @@ redent@^3.0.0:
indent-string "^4.0.0"
strip-indent "^3.0.0"
+reflect.getprototypeof@^1.0.4:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/reflect.getprototypeof/-/reflect.getprototypeof-1.0.5.tgz#e0bd28b597518f16edaf9c0e292c631eb13e0674"
+ integrity sha512-62wgfC8dJWrmxv44CA36pLDnP6KKl3Vhxb7PL+8+qrrFMMoJij4vgiMP8zV4O8+CBMXY1mHxI5fITGHXFHVmQQ==
+ dependencies:
+ call-bind "^1.0.5"
+ define-properties "^1.2.1"
+ es-abstract "^1.22.3"
+ es-errors "^1.0.0"
+ get-intrinsic "^1.2.3"
+ globalthis "^1.0.3"
+ which-builtin-type "^1.1.3"
+
regenerate-unicode-properties@^10.1.0:
version "10.1.0"
resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.0.tgz#7c3192cab6dd24e21cb4461e5ddd7dd24fa8374c"
@@ -9448,10 +8148,10 @@ regenerate@^1.4.2:
resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a"
integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==
-regenerator-runtime@^0.13.11, regenerator-runtime@^0.13.4:
- version "0.13.11"
- resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz#f6dca3e7ceec20590d07ada785636a90cdca17f9"
- integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==
+regenerator-runtime@^0.14.0:
+ version "0.14.1"
+ resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz#356ade10263f685dda125100cd862c1db895327f"
+ integrity sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==
regenerator-transform@^0.15.1:
version "0.15.1"
@@ -9460,27 +8160,14 @@ regenerator-transform@^0.15.1:
dependencies:
"@babel/runtime" "^7.8.4"
-regex-not@^1.0.0, regex-not@^1.0.2:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c"
- integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==
- dependencies:
- extend-shallow "^3.0.2"
- safe-regex "^1.1.0"
-
-regexp.prototype.flags@^1.3.1, regexp.prototype.flags@^1.5.0:
- version "1.5.0"
- resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz#fe7ce25e7e4cca8db37b6634c8a2c7009199b9cb"
- integrity sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==
+regexp.prototype.flags@^1.5.0, regexp.prototype.flags@^1.5.1:
+ version "1.5.1"
+ resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz#90ce989138db209f81492edd734183ce99f9677e"
+ integrity sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==
dependencies:
call-bind "^1.0.2"
define-properties "^1.2.0"
- functions-have-names "^1.2.3"
-
-regexpp@^2.0.1:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f"
- integrity sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==
+ set-function-name "^2.0.0"
regexpu-core@^5.2.1:
version "5.3.1"
@@ -9501,54 +8188,16 @@ regjsparser@^0.9.1:
dependencies:
jsesc "~0.5.0"
-repeat-element@^1.1.2:
- version "1.1.3"
- resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce"
- integrity sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==
-
-repeat-string@^1.6.1:
- version "1.6.1"
- resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637"
- integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc=
-
-repeating@^2.0.0:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda"
- integrity sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=
- dependencies:
- is-finite "^1.0.0"
-
-request@^2.88.0:
- version "2.88.2"
- resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3"
- integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==
- dependencies:
- aws-sign2 "~0.7.0"
- aws4 "^1.8.0"
- caseless "~0.12.0"
- combined-stream "~1.0.6"
- extend "~3.0.2"
- forever-agent "~0.6.1"
- form-data "~2.3.2"
- har-validator "~5.1.3"
- http-signature "~1.2.0"
- is-typedarray "~1.0.0"
- isstream "~0.1.2"
- json-stringify-safe "~5.0.1"
- mime-types "~2.1.19"
- oauth-sign "~0.9.0"
- performance-now "^2.1.0"
- qs "~6.5.2"
- safe-buffer "^5.1.2"
- tough-cookie "~2.5.0"
- tunnel-agent "^0.6.0"
- uuid "^3.3.2"
-
require-directory@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42"
integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I=
+require-from-string@^2.0.2:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909"
+ integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==
+
require-main-filename@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b"
@@ -9559,68 +8208,40 @@ requires-port@^1.0.0:
resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff"
integrity sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==
-resolve-cwd@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a"
- integrity sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=
- dependencies:
- resolve-from "^3.0.0"
-
resolve-cwd@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d"
integrity sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==
- dependencies:
- resolve-from "^5.0.0"
-
-resolve-from@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748"
- integrity sha1-six699nWiBvItuZTM17rywoYh0g=
-
-resolve-from@^4.0.0:
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6"
- integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==
+ dependencies:
+ resolve-from "^5.0.0"
-resolve-from@^5.0.0:
+resolve-from@5.0.0, resolve-from@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69"
integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==
-resolve-url@^0.2.1:
- version "0.2.1"
- resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a"
- integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=
-
-resolve.exports@^2.0.0:
- version "2.0.2"
- resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-2.0.2.tgz#f8c934b8e6a13f539e38b7098e2e36134f01e800"
- integrity sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==
-
-resolve@^1.10.0, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.14.2, resolve@^1.17.0, resolve@^1.19.0, resolve@^1.20.0:
- version "1.20.0"
- resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975"
- integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==
- dependencies:
- is-core-module "^2.2.0"
- path-parse "^1.0.6"
+resolve-from@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6"
+ integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==
-resolve@^2.0.0-next.3:
- version "2.0.0-next.3"
- resolved "https://registry.yarnpkg.com/resolve/-/resolve-2.0.0-next.3.tgz#d41016293d4a8586a39ca5d9b5f15cbea1f55e46"
- integrity sha512-W8LucSynKUIDu9ylraa7ueVZ7hc0uAgJBxVsQSKOXOyle8a93qXhcz+XAXZ8bIq2d6i4Ehddn6Evt+0/UwKk6Q==
+resolve@^1.10.0, resolve@^1.14.2, resolve@^1.22.1, resolve@^1.22.4:
+ version "1.22.8"
+ resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d"
+ integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==
dependencies:
- is-core-module "^2.2.0"
- path-parse "^1.0.6"
+ is-core-module "^2.13.0"
+ path-parse "^1.0.7"
+ supports-preserve-symlinks-flag "^1.0.0"
-restore-cursor@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf"
- integrity sha1-n37ih/gv0ybU/RYpI9YhKe7g368=
+resolve@^2.0.0-next.4:
+ version "2.0.0-next.5"
+ resolved "https://registry.yarnpkg.com/resolve/-/resolve-2.0.0-next.5.tgz#6b0ec3107e671e52b68cd068ef327173b90dc03c"
+ integrity sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==
dependencies:
- onetime "^2.0.0"
- signal-exit "^3.0.2"
+ is-core-module "^2.13.0"
+ path-parse "^1.0.7"
+ supports-preserve-symlinks-flag "^1.0.0"
restore-cursor@^3.1.0:
version "3.1.0"
@@ -9635,15 +8256,10 @@ restructure@^3.0.0:
resolved "https://registry.yarnpkg.com/restructure/-/restructure-3.0.0.tgz#a55031d7ed3314bf585f815836fff9da3d65101d"
integrity sha512-Xj8/MEIhhfj9X2rmD9iJ4Gga9EFqVlpMj3vfLnV2r/Mh5jRMryNV+6lWh9GdJtDBcBSPIqzRdfBQ3wDtNFv/uw==
-ret@~0.1.10:
- version "0.1.15"
- resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc"
- integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==
-
-retry@^0.10.0:
- version "0.10.1"
- resolved "https://registry.yarnpkg.com/retry/-/retry-0.10.1.tgz#e76388d217992c252750241d3d3956fed98d8ff4"
- integrity sha1-52OI0heZLCUnUCQdPTlW/tmNj/Q=
+retry@^0.12.0:
+ version "0.12.0"
+ resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b"
+ integrity sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==
reusify@^1.0.4:
version "1.0.4"
@@ -9655,26 +8271,37 @@ rfdc@^1.3.0:
resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.3.0.tgz#d0b7c441ab2720d05dc4cf26e01c89631d9da08b"
integrity sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==
-rimraf@2.6.3:
- version "2.6.3"
- resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab"
- integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==
+rimraf@^2.6.2, rimraf@^2.6.3:
+ version "2.7.1"
+ resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec"
+ integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==
dependencies:
glob "^7.1.3"
-rimraf@3.0.2, rimraf@^3.0.2:
+rimraf@^3.0.0, rimraf@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a"
integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==
dependencies:
glob "^7.1.3"
-rimraf@^2.5.4, rimraf@^2.6.2, rimraf@^2.6.3:
- version "2.7.1"
- resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec"
- integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==
+rimraf@^4.4.1:
+ version "4.4.1"
+ resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-4.4.1.tgz#bd33364f67021c5b79e93d7f4fa0568c7c21b755"
+ integrity sha512-Gk8NlF062+T9CqNGn6h4tls3k6T1+/nXdOcSZVikNVtlRdYpA7wRJJMoXmuvOnLW844rPjdQ7JgXCYM6PPC/og==
dependencies:
- glob "^7.1.3"
+ glob "^9.2.0"
+
+rollup-plugin-copy@^3.5.0:
+ version "3.5.0"
+ resolved "https://registry.yarnpkg.com/rollup-plugin-copy/-/rollup-plugin-copy-3.5.0.tgz#7ffa2a7a8303e143876fa64fb5eed9022d304eeb"
+ integrity sha512-wI8D5dvYovRMx/YYKtUNt3Yxaw4ORC9xo6Gt9t22kveWz1enG9QrhVlagzwrxSC455xD1dHMKhIJkbsQ7d48BA==
+ dependencies:
+ "@types/fs-extra" "^8.0.1"
+ colorette "^1.1.0"
+ fs-extra "^8.1.0"
+ globby "10.0.1"
+ is-plain-object "^3.0.0"
rollup-plugin-ignore@^1.0.10:
version "1.0.10"
@@ -9686,39 +8313,41 @@ rollup-plugin-local-resolve@^1.0.7:
resolved "https://registry.yarnpkg.com/rollup-plugin-local-resolve/-/rollup-plugin-local-resolve-1.0.7.tgz#c486701716c15add2127565c2eaa101123320887"
integrity sha1-xIZwFxbBWt0hJ1ZcLqoQESMyCIc=
-rollup-plugin-polyfill-node@^0.9.0:
- version "0.9.0"
- resolved "https://registry.yarnpkg.com/rollup-plugin-polyfill-node/-/rollup-plugin-polyfill-node-0.9.0.tgz#09cf1a74244a74a5c5007f5fd386d320610ec1d8"
- integrity sha512-cVqm7LjgBqtZ77M9hLYayXrLz18nLIVPp3MPqNi2suStrFDg1LsA2cSdMIighr2yeuAQrphu8ymXTAsJNVABow==
- dependencies:
- "@rollup/plugin-inject" "^4.0.0"
-
-rollup-plugin-sourcemaps@^0.6.3:
- version "0.6.3"
- resolved "https://registry.yarnpkg.com/rollup-plugin-sourcemaps/-/rollup-plugin-sourcemaps-0.6.3.tgz#bf93913ffe056e414419607f1d02780d7ece84ed"
- integrity sha512-paFu+nT1xvuO1tPFYXGe+XnQvg4Hjqv/eIhG8i5EspfYYPBKL57X7iVbfv55aNVASg3dzWvES9dmWsL2KhfByw==
+rollup-plugin-polyfill-node@^0.13.0:
+ version "0.13.0"
+ resolved "https://registry.yarnpkg.com/rollup-plugin-polyfill-node/-/rollup-plugin-polyfill-node-0.13.0.tgz#28e5705b59438da894e55133a0fe7a86b57d9b0a"
+ integrity sha512-FYEvpCaD5jGtyBuBFcQImEGmTxDTPbiHjJdrYIp+mFIwgXiXabxvKUK7ZT9P31ozu2Tqm9llYQMRWsfvTMTAOw==
dependencies:
- "@rollup/pluginutils" "^3.0.9"
- source-map-resolve "^0.6.0"
+ "@rollup/plugin-inject" "^5.0.4"
-rollup-plugin-terser@^7.0.2:
- version "7.0.2"
- resolved "https://registry.yarnpkg.com/rollup-plugin-terser/-/rollup-plugin-terser-7.0.2.tgz#e8fbba4869981b2dc35ae7e8a502d5c6c04d324d"
- integrity sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ==
+rollup@^4.2.0, rollup@^4.9.0:
+ version "4.9.6"
+ resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.9.6.tgz#4515facb0318ecca254a2ee1315e22e09efc50a0"
+ integrity sha512-05lzkCS2uASX0CiLFybYfVkwNbKZG5NFQ6Go0VWyogFTXXbR039UVsegViTntkk4OglHBdF54ccApXRRuXRbsg==
dependencies:
- "@babel/code-frame" "^7.10.4"
- jest-worker "^26.2.1"
- serialize-javascript "^4.0.0"
- terser "^5.0.0"
-
-rollup@^2.60.1:
- version "2.60.1"
- resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.60.1.tgz#4b34cd247f09b421f10a3c9286eda2ecf9972079"
- integrity sha512-akwfnpjY0rXEDSn1UTVfKXJhPsEBu+imi1gqBA1ZkHGydUnkV/fWCC90P7rDaLEW8KTwBcS1G3N4893Ndz+jwg==
+ "@types/estree" "1.0.5"
optionalDependencies:
+ "@rollup/rollup-android-arm-eabi" "4.9.6"
+ "@rollup/rollup-android-arm64" "4.9.6"
+ "@rollup/rollup-darwin-arm64" "4.9.6"
+ "@rollup/rollup-darwin-x64" "4.9.6"
+ "@rollup/rollup-linux-arm-gnueabihf" "4.9.6"
+ "@rollup/rollup-linux-arm64-gnu" "4.9.6"
+ "@rollup/rollup-linux-arm64-musl" "4.9.6"
+ "@rollup/rollup-linux-riscv64-gnu" "4.9.6"
+ "@rollup/rollup-linux-x64-gnu" "4.9.6"
+ "@rollup/rollup-linux-x64-musl" "4.9.6"
+ "@rollup/rollup-win32-arm64-msvc" "4.9.6"
+ "@rollup/rollup-win32-ia32-msvc" "4.9.6"
+ "@rollup/rollup-win32-x64-msvc" "4.9.6"
fsevents "~2.3.2"
-run-async@^2.2.0, run-async@^2.4.0:
+rrweb-cssom@^0.6.0:
+ version "0.6.0"
+ resolved "https://registry.yarnpkg.com/rrweb-cssom/-/rrweb-cssom-0.6.0.tgz#ed298055b97cbddcdeb278f904857629dec5e0e1"
+ integrity sha512-APM0Gt1KoXBz0iIkkdB/kfvGOwC4UuJFeG/c+yV7wSc7q96cG/kJ0HiYCnzivD9SB53cLV1MlHFNfOuPaadYSw==
+
+run-async@^2.4.0:
version "2.4.1"
resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455"
integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==
@@ -9730,28 +8359,24 @@ run-parallel@^1.1.9:
dependencies:
queue-microtask "^1.2.2"
-run-queue@^1.0.0, run-queue@^1.0.3:
- version "1.0.3"
- resolved "https://registry.yarnpkg.com/run-queue/-/run-queue-1.0.3.tgz#e848396f057d223f24386924618e25694161ec47"
- integrity sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=
- dependencies:
- aproba "^1.1.1"
-
-rxjs@^6.4.0, rxjs@^6.6.0:
- version "6.6.7"
- resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.7.tgz#90ac018acabf491bf65044235d5863c4dab804c9"
- integrity sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==
+rxjs@^7.4.0, rxjs@^7.5.5:
+ version "7.8.1"
+ resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.8.1.tgz#6f6f3d99ea8044291efd92e7c7fcf562c4057543"
+ integrity sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==
dependencies:
- tslib "^1.9.0"
+ tslib "^2.1.0"
-rxjs@^7.4.0:
- version "7.4.0"
- resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.4.0.tgz#a12a44d7eebf016f5ff2441b87f28c9a51cebc68"
- integrity sha512-7SQDi7xeTMCJpqViXh8gL/lebcwlp3d831F05+9B44A4B0WfsEwUQHR64gsH1kvJ+Ep/J9K2+n1hVl1CsGN23w==
+safe-array-concat@^1.0.1:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/safe-array-concat/-/safe-array-concat-1.1.0.tgz#8d0cae9cb806d6d1c06e08ab13d847293ebe0692"
+ integrity sha512-ZdQ0Jeb9Ofti4hbt5lX3T2JcAamT9hfzYU1MNB+z/jaEbB6wfFfPIR/zEORmZqobkCCJhSjodobH6WHNmJ97dg==
dependencies:
- tslib "~2.1.0"
+ call-bind "^1.0.5"
+ get-intrinsic "^1.2.2"
+ has-symbols "^1.0.3"
+ isarray "^2.0.5"
-safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0:
+safe-buffer@^5.1.0, safe-buffer@^5.1.2, safe-buffer@~5.2.0:
version "5.2.1"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6"
integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==
@@ -9761,14 +8386,16 @@ safe-buffer@~5.1.0, safe-buffer@~5.1.1:
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==
-safe-regex@^1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e"
- integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4=
+safe-regex-test@^1.0.0:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.3.tgz#a5b4c0f06e0ab50ea2c395c14d8371232924c377"
+ integrity sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==
dependencies:
- ret "~0.1.10"
+ call-bind "^1.0.6"
+ es-errors "^1.3.0"
+ is-regex "^1.1.4"
-"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0:
+"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0":
version "2.1.2"
resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
@@ -9788,6 +8415,22 @@ scheduler@^0.17.0:
loose-envify "^1.1.0"
object-assign "^4.1.1"
+scheduler@^0.19.1:
+ version "0.19.1"
+ resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.19.1.tgz#4f3e2ed2c1a7d65681f4c854fa8c5a1ccb40f196"
+ integrity sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA==
+ dependencies:
+ loose-envify "^1.1.0"
+ object-assign "^4.1.1"
+
+scheduler@^0.20.2:
+ version "0.20.2"
+ resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.20.2.tgz#4baee39436e34aa93b4874bddcbf0fe8b8b50e91"
+ integrity sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==
+ dependencies:
+ loose-envify "^1.1.0"
+ object-assign "^4.1.1"
+
scheduler@^0.23.0:
version "0.23.0"
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.23.0.tgz#ba8041afc3d30eb206a487b6b384002e4e61fdfe"
@@ -9795,10 +8438,10 @@ scheduler@^0.23.0:
dependencies:
loose-envify "^1.1.0"
-schema-utils@^3.1.0, schema-utils@^3.1.1:
- version "3.1.1"
- resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.1.1.tgz#bc74c4b6b6995c1d88f76a8b77bea7219e0c8281"
- integrity sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==
+schema-utils@^3.1.1, schema-utils@^3.2.0:
+ version "3.3.0"
+ resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.3.0.tgz#f50a88877c3c01652a15b622ae9e9795df7a60fe"
+ integrity sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==
dependencies:
"@types/json-schema" "^7.0.8"
ajv "^6.12.5"
@@ -9809,46 +8452,41 @@ semver-compare@^1.0.0:
resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc"
integrity sha1-De4hahyUGrN+nvsXiPavxf9VN/w=
-"semver@2 || 3 || 4 || 5", "semver@2.x || 3.x || 4 || 5", semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0, semver@^5.7.0, semver@^5.7.1:
+"semver@2 || 3 || 4 || 5", semver@^5.4.1, semver@^5.6.0:
version "5.7.1"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==
-semver@5.5.0:
- version "5.5.0"
- resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab"
- integrity sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==
-
-semver@7.3.5:
- version "7.3.5"
- resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7"
- integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==
+semver@7.5.3:
+ version "7.5.3"
+ resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.3.tgz#161ce8c2c6b4b3bdca6caadc9fa3317a4c4fe88e"
+ integrity sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==
dependencies:
lru-cache "^6.0.0"
-semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.2.0, semver@^6.3.0:
- version "6.3.0"
- resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
- integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
+semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.3.0, semver@^6.3.1:
+ version "6.3.1"
+ resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4"
+ integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==
-semver@^7.3.4, semver@^7.3.5:
- version "7.5.1"
- resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.1.tgz#c90c4d631cf74720e46b21c1d37ea07edfab91ec"
- integrity sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==
+semver@^7.0.0, semver@^7.1.1, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.3.8, semver@^7.5.3:
+ version "7.5.4"
+ resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e"
+ integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==
dependencies:
lru-cache "^6.0.0"
-serialize-javascript@^4.0.0:
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-4.0.0.tgz#b525e1238489a5ecfc42afacc3fe99e666f4b1aa"
- integrity sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==
+semver@^7.5.4:
+ version "7.6.0"
+ resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.0.tgz#1a46a4db4bffcccd97b743b5005c8325f23d4e2d"
+ integrity sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==
dependencies:
- randombytes "^2.1.0"
+ lru-cache "^6.0.0"
-serialize-javascript@^6.0.0:
- version "6.0.0"
- resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8"
- integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==
+serialize-javascript@^6.0.1:
+ version "6.0.2"
+ resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.2.tgz#defa1e055c83bf6d59ea805d8da862254eb6a6c2"
+ integrity sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==
dependencies:
randombytes "^2.1.0"
@@ -9857,15 +8495,26 @@ set-blocking@^2.0.0, set-blocking@~2.0.0:
resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7"
integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc=
-set-value@^2.0.0, set-value@^2.0.1:
+set-function-length@^1.2.0:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.1.tgz#47cc5945f2c771e2cf261c6737cf9684a2a5e425"
+ integrity sha512-j4t6ccc+VsKwYHso+kElc5neZpjtq9EnRICFZtWyBsLojhmeF/ZBd/elqm22WJh/BziDe/SBiOeAt0m2mfLD0g==
+ dependencies:
+ define-data-property "^1.1.2"
+ es-errors "^1.3.0"
+ function-bind "^1.1.2"
+ get-intrinsic "^1.2.3"
+ gopd "^1.0.1"
+ has-property-descriptors "^1.0.1"
+
+set-function-name@^2.0.0, set-function-name@^2.0.1:
version "2.0.1"
- resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b"
- integrity sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==
+ resolved "https://registry.yarnpkg.com/set-function-name/-/set-function-name-2.0.1.tgz#12ce38b7954310b9f61faa12701620a0c882793a"
+ integrity sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==
dependencies:
- extend-shallow "^2.0.1"
- is-extendable "^0.1.1"
- is-plain-object "^2.0.3"
- split-string "^3.0.1"
+ define-data-property "^1.0.1"
+ functions-have-names "^1.2.3"
+ has-property-descriptors "^1.0.0"
shallow-clone@^3.0.0:
version "3.0.1"
@@ -9907,11 +8556,44 @@ side-channel@^1.0.4:
get-intrinsic "^1.0.2"
object-inspect "^1.9.0"
-signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7:
+siginfo@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/siginfo/-/siginfo-2.0.0.tgz#32e76c70b79724e3bb567cb9d543eb858ccfaf30"
+ integrity sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==
+
+signal-exit@3.0.7, signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7:
version "3.0.7"
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9"
integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==
+signal-exit@^4.0.1, signal-exit@^4.1.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04"
+ integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==
+
+sigstore@^1.4.0:
+ version "1.9.0"
+ resolved "https://registry.yarnpkg.com/sigstore/-/sigstore-1.9.0.tgz#1e7ad8933aa99b75c6898ddd0eeebc3eb0d59875"
+ integrity sha512-0Zjz0oe37d08VeOtBIuB6cRriqXse2e8w+7yIy2XSXjshRKxbc2KkhXjL229jXSxEm7UbcjS76wcJDGQddVI9A==
+ dependencies:
+ "@sigstore/bundle" "^1.1.0"
+ "@sigstore/protobuf-specs" "^0.2.0"
+ "@sigstore/sign" "^1.0.0"
+ "@sigstore/tuf" "^1.0.3"
+ make-fetch-happen "^11.0.1"
+
+sigstore@^2.0.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/sigstore/-/sigstore-2.2.0.tgz#acba5f73ca2158d2b0507bc52d3592149c3ed20e"
+ integrity sha512-fcU9clHwEss2/M/11FFM8Jwc4PjBgbhXoNskoK5guoK0qGQBSeUbQZRJ+B2fDFIvhyf0gqCaPrel9mszbhAxug==
+ dependencies:
+ "@sigstore/bundle" "^2.1.1"
+ "@sigstore/core" "^0.2.0"
+ "@sigstore/protobuf-specs" "^0.2.1"
+ "@sigstore/sign" "^2.2.1"
+ "@sigstore/tuf" "^2.3.0"
+ "@sigstore/verify" "^0.1.0"
+
simple-concat@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.1.tgz#f46976082ba35c2263f1c8ab5edfe26c41c9552f"
@@ -9933,43 +8615,37 @@ simple-swizzle@^0.2.2:
dependencies:
is-arrayish "^0.3.1"
-sisteransi@^1.0.5:
- version "1.0.5"
- resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed"
- integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==
-
-size-limit@^7.0.5:
- version "7.0.5"
- resolved "https://registry.yarnpkg.com/size-limit/-/size-limit-7.0.5.tgz#0a211825b540595805111c45d88a39a9d0dc8b4e"
- integrity sha512-dve+Vaq/a6H7QZhFbozAUBKNO9ZnZkPX3EF1ETI8yv3YCMdC7e63HmVZDXKB//o3FCTHqtZQ0p3ZtOwN/PSiqQ==
+size-limit@11.0.1, size-limit@^11.0.1:
+ version "11.0.1"
+ resolved "https://registry.yarnpkg.com/size-limit/-/size-limit-11.0.1.tgz#e34ab3302b83833843d578e70a2bf3c6da29f123"
+ integrity sha512-6L80ocVspWPrhIRg8kPl41VypqTGH8/lu9e6TJiSJpkNLtOR2h/EEqdAO/wNJOv/sUVtjX+lVEWrzBpItGP+gQ==
dependencies:
bytes-iec "^3.1.1"
- chokidar "^3.5.2"
- ci-job-number "^1.2.2"
- globby "^11.0.4"
- lilconfig "^2.0.3"
- mkdirp "^1.0.4"
- nanospinner "^0.6.0"
+ chokidar "^3.5.3"
+ globby "^14.0.0"
+ lilconfig "^3.0.0"
+ nanospinner "^1.1.0"
picocolors "^1.0.0"
+slash@3.0.0, slash@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634"
+ integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==
+
slash@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44"
integrity sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==
-slash@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634"
- integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==
+slash@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/slash/-/slash-4.0.0.tgz#2422372176c4c6c5addb5e2ada885af984b396a7"
+ integrity sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==
-slice-ansi@^2.1.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-2.1.0.tgz#cacd7693461a637a5788d92a7dd4fba068e81636"
- integrity sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==
- dependencies:
- ansi-styles "^3.2.0"
- astral-regex "^1.0.0"
- is-fullwidth-code-point "^2.0.0"
+slash@^5.1.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/slash/-/slash-5.1.0.tgz#be3adddcdf09ac38eebe8dcdc7b1a57a75b095ce"
+ integrity sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==
slice-ansi@^3.0.0:
version "3.0.0"
@@ -9989,15 +8665,10 @@ slice-ansi@^4.0.0:
astral-regex "^2.0.0"
is-fullwidth-code-point "^3.0.0"
-slide@^1.1.6:
- version "1.1.6"
- resolved "https://registry.yarnpkg.com/slide/-/slide-1.1.6.tgz#56eb027d65b4d2dce6cb2e2d32c4d4afc9e1d707"
- integrity sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=
-
-smart-buffer@^4.1.0:
- version "4.1.0"
- resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.1.0.tgz#91605c25d91652f4661ea69ccf45f1b331ca21ba"
- integrity sha512-iVICrxOzCynf/SNaBQCw34eM9jROU/s5rzIhpOvzhzuYHfJR/DhZfDkXiZSgKXfgv26HT3Yni3AV/DGw0cGnnw==
+smart-buffer@^4.2.0:
+ version "4.2.0"
+ resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.2.0.tgz#6e1d71fa4f18c05f7d0ff216dd16a481d0e8d9ae"
+ integrity sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==
smartwrap@^2.0.2:
version "2.0.2"
@@ -10011,51 +8682,36 @@ smartwrap@^2.0.2:
wcwidth "^1.0.1"
yargs "^15.1.0"
-snapdragon-node@^2.0.1:
- version "2.1.1"
- resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b"
- integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==
+smob@^1.0.0:
+ version "1.4.1"
+ resolved "https://registry.yarnpkg.com/smob/-/smob-1.4.1.tgz#66270e7df6a7527664816c5b577a23f17ba6f5b5"
+ integrity sha512-9LK+E7Hv5R9u4g4C3p+jjLstaLe11MDsL21UpYaCNmapvMkYhqCV4A/f/3gyH8QjMyh6l68q9xC85vihY9ahMQ==
+
+socks-proxy-agent@^7.0.0:
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-7.0.0.tgz#dc069ecf34436621acb41e3efa66ca1b5fed15b6"
+ integrity sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww==
dependencies:
- define-property "^1.0.0"
- isobject "^3.0.0"
- snapdragon-util "^3.0.1"
+ agent-base "^6.0.2"
+ debug "^4.3.3"
+ socks "^2.6.2"
-snapdragon-util@^3.0.1:
- version "3.0.1"
- resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2"
- integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==
- dependencies:
- kind-of "^3.2.0"
-
-snapdragon@^0.8.1:
- version "0.8.2"
- resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d"
- integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==
- dependencies:
- base "^0.11.1"
- debug "^2.2.0"
- define-property "^0.2.5"
- extend-shallow "^2.0.1"
- map-cache "^0.2.2"
- source-map "^0.5.6"
- source-map-resolve "^0.5.0"
- use "^3.1.0"
-
-socks-proxy-agent@^4.0.0:
- version "4.0.2"
- resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-4.0.2.tgz#3c8991f3145b2799e70e11bd5fbc8b1963116386"
- integrity sha512-NT6syHhI9LmuEMSK6Kd2V7gNv5KFZoLE7V5udWmn0de+3Mkj3UMA/AJPLyeNUVmElCurSHtUdM3ETpR3z770Wg==
+socks-proxy-agent@^8.0.1, socks-proxy-agent@^8.0.2:
+ version "8.0.2"
+ resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-8.0.2.tgz#5acbd7be7baf18c46a3f293a840109a430a640ad"
+ integrity sha512-8zuqoLv1aP/66PHF5TqwJ7Czm3Yv32urJQHrVyhD7mmA6d61Zv8cIXQYPTWwmg6qlupnPvs/QKDmfa4P/qct2g==
dependencies:
- agent-base "~4.2.1"
- socks "~2.3.2"
+ agent-base "^7.0.2"
+ debug "^4.3.4"
+ socks "^2.7.1"
-socks@~2.3.2:
- version "2.3.3"
- resolved "https://registry.yarnpkg.com/socks/-/socks-2.3.3.tgz#01129f0a5d534d2b897712ed8aceab7ee65d78e3"
- integrity sha512-o5t52PCNtVdiOvzMry7wU4aOqYWL0PeCXRWBEiJow4/i/wr+wpsJQ9awEu1EonLIqsfGd5qSgDdxEOvCdmBEpA==
+socks@^2.6.2, socks@^2.7.1:
+ version "2.7.1"
+ resolved "https://registry.yarnpkg.com/socks/-/socks-2.7.1.tgz#d8e651247178fde79c0663043e07240196857d55"
+ integrity sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==
dependencies:
- ip "1.1.5"
- smart-buffer "^4.1.0"
+ ip "^2.0.0"
+ smart-buffer "^4.2.0"
sort-keys@^2.0.0:
version "2.0.0"
@@ -10064,34 +8720,12 @@ sort-keys@^2.0.0:
dependencies:
is-plain-obj "^1.0.0"
-source-map-resolve@^0.5.0:
- version "0.5.3"
- resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a"
- integrity sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==
- dependencies:
- atob "^2.1.2"
- decode-uri-component "^0.2.0"
- resolve-url "^0.2.1"
- source-map-url "^0.4.0"
- urix "^0.1.0"
-
-source-map-resolve@^0.6.0:
- version "0.6.0"
- resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.6.0.tgz#3d9df87e236b53f16d01e58150fc7711138e5ed2"
- integrity sha512-KXBr9d/fO/bWo97NXsPIAW1bFSBOuCnjbNTBMO7N59hsv5i9yzRDfcYwwt0l04+VqnKC+EwzvJZIP/qkuMgR/w==
- dependencies:
- atob "^2.1.2"
- decode-uri-component "^0.2.0"
-
-source-map-support@0.5.13:
- version "0.5.13"
- resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932"
- integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==
- dependencies:
- buffer-from "^1.0.0"
- source-map "^0.6.0"
+source-map-js@^1.0.1, source-map-js@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c"
+ integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==
-source-map-support@^0.5.16, source-map-support@~0.5.20:
+source-map-support@~0.5.20:
version "0.5.21"
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f"
integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==
@@ -10099,31 +8733,11 @@ source-map-support@^0.5.16, source-map-support@~0.5.20:
buffer-from "^1.0.0"
source-map "^0.6.0"
-source-map-url@^0.4.0:
- version "0.4.1"
- resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.1.tgz#0af66605a745a5a2f91cf1bbf8a7afbc283dec56"
- integrity sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==
-
-source-map@^0.5.6:
- version "0.5.7"
- resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
- integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=
-
source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1:
version "0.6.1"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
-source-map@~0.7.2:
- version "0.7.3"
- resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383"
- integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==
-
-sourcemap-codec@^1.4.4:
- version "1.4.8"
- resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz#ea804bd94857402e6992d05a38ef1ae35a9ab4c4"
- integrity sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==
-
spawndamnit@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/spawndamnit/-/spawndamnit-2.0.0.tgz#9f762ac5c3476abb994b42ad592b5ad22bb4b0ad"
@@ -10158,33 +8772,14 @@ spdx-license-ids@^3.0.0:
resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.7.tgz#e9c18a410e5ed7e12442a549fbd8afa767038d65"
integrity sha512-U+MTEOO0AiDzxwFvoa4JVnMV6mZlJKk2sBLt90s7G0Gd0Mlknc7kxEn3nuDPNZRta7O2uy8oLcZLVT+4sqNZHQ==
-split-on-first@^1.0.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/split-on-first/-/split-on-first-1.1.0.tgz#f610afeee3b12bce1d0c30425e76398b78249a5f"
- integrity sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw==
-
-split-string@^3.0.1, split-string@^3.0.2:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2"
- integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==
- dependencies:
- extend-shallow "^3.0.0"
-
-split2@^2.0.0:
- version "2.2.0"
- resolved "https://registry.yarnpkg.com/split2/-/split2-2.2.0.tgz#186b2575bcf83e85b7d18465756238ee4ee42493"
- integrity sha512-RAb22TG39LhI31MbreBgIuKiIKhVsawfTgEGqKHTK87aG+ul/PB8Sqoi3I7kVdRWiCfrKxK3uo4/YUkpNvhPbw==
- dependencies:
- through2 "^2.0.2"
-
-split2@^3.0.0:
+split2@^3.2.2:
version "3.2.2"
resolved "https://registry.yarnpkg.com/split2/-/split2-3.2.2.tgz#bf2cf2a37d838312c249c89206fd7a17dd12365f"
integrity sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg==
dependencies:
readable-stream "^3.0.0"
-split@^1.0.0:
+split@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/split/-/split-1.0.1.tgz#605bd9be303aa59fb35f9229fbea0ddec9ea07d9"
integrity sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==
@@ -10196,67 +8791,34 @@ sprintf-js@~1.0.2:
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=
-sshpk@^1.7.0:
- version "1.16.1"
- resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877"
- integrity sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==
- dependencies:
- asn1 "~0.2.3"
- assert-plus "^1.0.0"
- bcrypt-pbkdf "^1.0.0"
- dashdash "^1.12.0"
- ecc-jsbn "~0.1.1"
- getpass "^0.1.1"
- jsbn "~0.1.0"
- safer-buffer "^2.0.2"
- tweetnacl "~0.14.0"
-
ssim.js@^3.1.1:
version "3.5.0"
resolved "https://registry.yarnpkg.com/ssim.js/-/ssim.js-3.5.0.tgz#d7276b9ee99b57a5ff0db34035f02f35197e62df"
integrity sha512-Aj6Jl2z6oDmgYFFbQqK7fght19bXdOxY7Tj03nF+03M9gCBAjeIiO8/PlEGMfKDwYpw4q6iBqVq2YuREorGg/g==
-ssri@^6.0.0, ssri@^6.0.1:
- version "6.0.2"
- resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.2.tgz#157939134f20464e7301ddba3e90ffa8f7728ac5"
- integrity sha512-cepbSq/neFK7xB6A50KHN0xHDotYzq58wWCa5LeWqnPrHG8GzfEjO/4O8kpmcGW+oaxkvhEJCWgbgNk4/ZV93Q==
- dependencies:
- figgy-pudding "^3.5.1"
-
-stack-utils@^2.0.3:
- version "2.0.6"
- resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.6.tgz#aaf0748169c02fc33c8232abccf933f54a1cc34f"
- integrity sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==
+ssri@^10.0.0, ssri@^10.0.1:
+ version "10.0.5"
+ resolved "https://registry.yarnpkg.com/ssri/-/ssri-10.0.5.tgz#e49efcd6e36385196cb515d3a2ad6c3f0265ef8c"
+ integrity sha512-bSf16tAFkGeRlUNDjXu8FzaMQt6g2HZJrun7mtMbIPOddxt3GLMSz5VWUWcqTJUPfLEaDIepGxv+bYQW49596A==
dependencies:
- escape-string-regexp "^2.0.0"
+ minipass "^7.0.3"
-static-extend@^0.1.1:
- version "0.1.2"
- resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6"
- integrity sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=
- dependencies:
- define-property "^0.2.5"
- object-copy "^0.1.0"
-
-stop-iteration-iterator@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/stop-iteration-iterator/-/stop-iteration-iterator-1.0.0.tgz#6a60be0b4ee757d1ed5254858ec66b10c49285e4"
- integrity sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ==
+ssri@^9.0.1:
+ version "9.0.1"
+ resolved "https://registry.yarnpkg.com/ssri/-/ssri-9.0.1.tgz#544d4c357a8d7b71a19700074b6883fcb4eae057"
+ integrity sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q==
dependencies:
- internal-slot "^1.0.4"
+ minipass "^3.1.1"
-stream-each@^1.1.0:
- version "1.2.3"
- resolved "https://registry.yarnpkg.com/stream-each/-/stream-each-1.2.3.tgz#ebe27a0c389b04fbcc233642952e10731afa9bae"
- integrity sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw==
- dependencies:
- end-of-stream "^1.1.0"
- stream-shift "^1.0.0"
+stackback@0.0.2:
+ version "0.0.2"
+ resolved "https://registry.yarnpkg.com/stackback/-/stackback-0.0.2.tgz#1ac8a0d9483848d1695e418b6d031a3c3ce68e3b"
+ integrity sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==
-stream-shift@^1.0.0:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.1.tgz#d7088281559ab2778424279b0877da3c392d5a3d"
- integrity sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==
+std-env@^3.5.0:
+ version "3.7.0"
+ resolved "https://registry.yarnpkg.com/std-env/-/std-env-3.7.0.tgz#c9f7386ced6ecf13360b6c6c55b8aaa4ef7481d2"
+ integrity sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==
stream-transform@^2.1.3:
version "2.1.3"
@@ -10265,23 +8827,27 @@ stream-transform@^2.1.3:
dependencies:
mixme "^0.5.1"
-strict-uri-encode@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546"
- integrity sha1-ucczDHBChi9rFC3CdLvMWGbONUY=
+streamx@^2.15.0:
+ version "2.15.6"
+ resolved "https://registry.yarnpkg.com/streamx/-/streamx-2.15.6.tgz#28bf36997ebc7bf6c08f9eba958735231b833887"
+ integrity sha512-q+vQL4AAz+FdfT137VF69Cc/APqUbxy+MDOImRrMvchJpigHj9GksgDU2LYbO9rx7RX6osWgxJB2WxhYv4SZAw==
+ dependencies:
+ fast-fifo "^1.1.0"
+ queue-tick "^1.0.1"
string-argv@0.3.1:
version "0.3.1"
resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.1.tgz#95e2fbec0427ae19184935f816d74aaa4c5c19da"
integrity sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==
-string-length@^4.0.1:
- version "4.0.2"
- resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.2.tgz#a8a8dc7bd5c1a82b9b3c8b87e125f66871b6e57a"
- integrity sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==
+"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
+ version "4.2.3"
+ resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
+ integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
dependencies:
- char-regex "^1.0.2"
- strip-ansi "^6.0.0"
+ emoji-regex "^8.0.0"
+ is-fullwidth-code-point "^3.0.0"
+ strip-ansi "^6.0.1"
string-width@^1.0.1:
version "1.0.2"
@@ -10292,60 +8858,56 @@ string-width@^1.0.1:
is-fullwidth-code-point "^1.0.0"
strip-ansi "^3.0.0"
-"string-width@^1.0.2 || 2", string-width@^2.1.0:
- version "2.1.1"
- resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e"
- integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==
- dependencies:
- is-fullwidth-code-point "^2.0.0"
- strip-ansi "^4.0.0"
-
-string-width@^3.0.0, string-width@^3.1.0:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961"
- integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==
+string-width@^5.0.1, string-width@^5.1.2:
+ version "5.1.2"
+ resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794"
+ integrity sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==
dependencies:
- emoji-regex "^7.0.1"
- is-fullwidth-code-point "^2.0.0"
- strip-ansi "^5.1.0"
+ eastasianwidth "^0.2.0"
+ emoji-regex "^9.2.2"
+ strip-ansi "^7.0.1"
-string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
- version "4.2.3"
- resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
- integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
+string.prototype.matchall@^4.0.8:
+ version "4.0.10"
+ resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-4.0.10.tgz#a1553eb532221d4180c51581d6072cd65d1ee100"
+ integrity sha512-rGXbGmOEosIQi6Qva94HUjgPs9vKW+dkG7Y8Q5O2OYkWL6wFaTRZO8zM4mhP94uX55wgyrXzfS2aGtGzUL7EJQ==
dependencies:
- emoji-regex "^8.0.0"
- is-fullwidth-code-point "^3.0.0"
- strip-ansi "^6.0.1"
+ call-bind "^1.0.2"
+ define-properties "^1.2.0"
+ es-abstract "^1.22.1"
+ get-intrinsic "^1.2.1"
+ has-symbols "^1.0.3"
+ internal-slot "^1.0.5"
+ regexp.prototype.flags "^1.5.0"
+ set-function-name "^2.0.0"
+ side-channel "^1.0.4"
-string.prototype.matchall@^4.0.4:
- version "4.0.4"
- resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-4.0.4.tgz#608f255e93e072107f5de066f81a2dfb78cf6b29"
- integrity sha512-pknFIWVachNcyqRfaQSeu/FUfpvJTe4uskUSZ9Wc1RijsPuzbZ8TyYT8WCNnntCjUEqQ3vUHMAfVj2+wLAisPQ==
+string.prototype.trim@^1.2.8:
+ version "1.2.8"
+ resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz#f9ac6f8af4bd55ddfa8895e6aea92a96395393bd"
+ integrity sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==
dependencies:
call-bind "^1.0.2"
- define-properties "^1.1.3"
- es-abstract "^1.18.0-next.2"
- has-symbols "^1.0.1"
- internal-slot "^1.0.3"
- regexp.prototype.flags "^1.3.1"
- side-channel "^1.0.4"
+ define-properties "^1.2.0"
+ es-abstract "^1.22.1"
-string.prototype.trimend@^1.0.4:
- version "1.0.4"
- resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz#e75ae90c2942c63504686c18b287b4a0b1a45f80"
- integrity sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==
+string.prototype.trimend@^1.0.7:
+ version "1.0.7"
+ resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz#1bb3afc5008661d73e2dc015cd4853732d6c471e"
+ integrity sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==
dependencies:
call-bind "^1.0.2"
- define-properties "^1.1.3"
+ define-properties "^1.2.0"
+ es-abstract "^1.22.1"
-string.prototype.trimstart@^1.0.4:
- version "1.0.4"
- resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz#b36399af4ab2999b4c9c648bd7a3fb2bb26feeed"
- integrity sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==
+string.prototype.trimstart@^1.0.7:
+ version "1.0.7"
+ resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz#d4cdb44b83a4737ffbac2d406e405d43d0184298"
+ integrity sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==
dependencies:
call-bind "^1.0.2"
- define-properties "^1.1.3"
+ define-properties "^1.2.0"
+ es-abstract "^1.22.1"
string_decoder@^1.1.1:
version "1.3.0"
@@ -10370,6 +8932,13 @@ stringify-object@^3.3.0:
is-obj "^1.0.1"
is-regexp "^1.0.0"
+"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
+ version "6.0.1"
+ resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
+ integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
+ dependencies:
+ ansi-regex "^5.0.1"
+
strip-ansi@^3.0.0, strip-ansi@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf"
@@ -10377,33 +8946,12 @@ strip-ansi@^3.0.0, strip-ansi@^3.0.1:
dependencies:
ansi-regex "^2.0.0"
-strip-ansi@^4.0.0:
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f"
- integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8=
- dependencies:
- ansi-regex "^3.0.0"
-
-strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0:
- version "5.2.0"
- resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae"
- integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==
- dependencies:
- ansi-regex "^4.1.0"
-
-strip-ansi@^6.0.0, strip-ansi@^6.0.1:
- version "6.0.1"
- resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
- integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
- dependencies:
- ansi-regex "^5.0.1"
-
-strip-bom@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e"
- integrity sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=
+strip-ansi@^7.0.1:
+ version "7.1.0"
+ resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45"
+ integrity sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==
dependencies:
- is-utf8 "^0.2.0"
+ ansi-regex "^6.0.1"
strip-bom@^3.0.0:
version "3.0.0"
@@ -10415,27 +8963,15 @@ strip-bom@^4.0.0:
resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-4.0.0.tgz#9c3505c1db45bcedca3d9cf7a16f5c5aa3901878"
integrity sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==
-strip-eof@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf"
- integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=
-
strip-final-newline@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad"
integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==
-strip-indent@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-1.0.1.tgz#0c7962a6adefa7bbd4ac366460a638552ae1a0a2"
- integrity sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=
- dependencies:
- get-stdin "^4.0.1"
-
-strip-indent@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68"
- integrity sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=
+strip-final-newline@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-3.0.0.tgz#52894c313fbff318835280aed60ff71ebf12b8fd"
+ integrity sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==
strip-indent@^3.0.0:
version "3.0.0"
@@ -10444,12 +8980,19 @@ strip-indent@^3.0.0:
dependencies:
min-indent "^1.0.0"
-strip-json-comments@^3.0.1, strip-json-comments@^3.1.1:
+strip-json-comments@^3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006"
integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==
-strong-log-transformer@^2.0.0:
+strip-literal@^1.3.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/strip-literal/-/strip-literal-1.3.0.tgz#db3942c2ec1699e6836ad230090b84bb458e3a07"
+ integrity sha512-PugKzOsyXpArk0yWmUwqOZecSO0GH0bPoctLcqNDH9J04pVW3lflYE0ujElBGTloevcxF5MofAOZ7C5l2b+wLg==
+ dependencies:
+ acorn "^8.10.0"
+
+strong-log-transformer@2.1.0, strong-log-transformer@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/strong-log-transformer/-/strong-log-transformer-2.1.0.tgz#0f5ed78d325e0421ac6f90f7f10e691d6ae3ae10"
integrity sha512-B3Hgul+z0L9a236FAUC9iZsL+nVHgoCJnqCbN588DjYxvGXaXaaFbfmQ/JhvKjZwsOukuR72XbHv71Qkug0HxA==
@@ -10465,7 +9008,7 @@ supports-color@^5.3.0:
dependencies:
has-flag "^3.0.0"
-supports-color@^7.0.0, supports-color@^7.1.0:
+supports-color@^7.1.0:
version "7.2.0"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da"
integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==
@@ -10479,6 +9022,11 @@ supports-color@^8.0.0:
dependencies:
has-flag "^4.0.0"
+supports-preserve-symlinks-flag@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09"
+ integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==
+
svg-arc-to-cubic-bezier@^3.0.0, svg-arc-to-cubic-bezier@^3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/svg-arc-to-cubic-bezier/-/svg-arc-to-cubic-bezier-3.2.0.tgz#390c450035ae1c4a0104d90650304c3bc814abe6"
@@ -10489,32 +9037,30 @@ symbol-tree@^3.2.4:
resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2"
integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==
-table@^5.2.3:
- version "5.4.6"
- resolved "https://registry.yarnpkg.com/table/-/table-5.4.6.tgz#1292d19500ce3f86053b05f0e8e7e4a3bb21079e"
- integrity sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==
- dependencies:
- ajv "^6.10.2"
- lodash "^4.17.14"
- slice-ansi "^2.1.0"
- string-width "^3.0.0"
-
tapable@^2.1.1, tapable@^2.2.0:
version "2.2.1"
resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0"
integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==
-tar-fs@2.1.1:
- version "2.1.1"
- resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.1.1.tgz#489a15ab85f1f0befabb370b7de4f9eb5cbe8784"
- integrity sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==
+tar-fs@3.0.4:
+ version "3.0.4"
+ resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-3.0.4.tgz#a21dc60a2d5d9f55e0089ccd78124f1d3771dbbf"
+ integrity sha512-5AFQU8b9qLfZCX9zp2duONhPmZv0hGYiBPJsyUdqMjzq/mqVpy/rEUSeHk1+YitmxugaptgBh5oDGU3VsAJq4w==
dependencies:
- chownr "^1.1.1"
mkdirp-classic "^0.5.2"
pump "^3.0.0"
- tar-stream "^2.1.4"
+ tar-stream "^3.1.5"
+
+tar-stream@^3.1.5:
+ version "3.1.6"
+ resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-3.1.6.tgz#6520607b55a06f4a2e2e04db360ba7d338cc5bab"
+ integrity sha512-B/UyjYwPpMBv+PaFSWAmtYjwdrlEaZQEhMIBFNC5oEG8lpiW8XjcSdmEaClj28ArfKScKHs2nshz3k2le6crsg==
+ dependencies:
+ b4a "^1.6.4"
+ fast-fifo "^1.2.0"
+ streamx "^2.15.0"
-tar-stream@^2.1.4:
+tar-stream@~2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.2.0.tgz#acad84c284136b060dc3faa64474aa9aebd77287"
integrity sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==
@@ -10525,82 +9071,61 @@ tar-stream@^2.1.4:
inherits "^2.0.3"
readable-stream "^3.1.1"
-tar@^4.4.10, tar@^4.4.12, tar@^4.4.8:
- version "4.4.13"
- resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525"
- integrity sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==
+tar@6.1.11:
+ version "6.1.11"
+ resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.11.tgz#6760a38f003afa1b2ffd0ffe9e9abbd0eab3d621"
+ integrity sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==
dependencies:
- chownr "^1.1.1"
- fs-minipass "^1.2.5"
- minipass "^2.8.6"
- minizlib "^1.2.1"
- mkdirp "^0.5.0"
- safe-buffer "^5.1.2"
- yallist "^3.0.3"
+ chownr "^2.0.0"
+ fs-minipass "^2.0.0"
+ minipass "^3.0.0"
+ minizlib "^2.1.1"
+ mkdirp "^1.0.3"
+ yallist "^4.0.0"
-tar@^6.1.0:
- version "6.1.1"
- resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.1.tgz#4d7da4b132b334bb8c175ed1de466fe9157ea0eb"
- integrity sha512-GG0R7yt/CQkvG4fueXDi52Zskqxe2AyRJ+Wm54yqarnBgcX3qRIWh10qLVAAN+mlPFGTfP5UxvD3Fbi11UOTUQ==
+tar@^6.1.0, tar@^6.1.11, tar@^6.1.2:
+ version "6.2.0"
+ resolved "https://registry.yarnpkg.com/tar/-/tar-6.2.0.tgz#b14ce49a79cb1cd23bc9b016302dea5474493f73"
+ integrity sha512-/Wo7DcT0u5HUV486xg675HtjNd3BXZ6xDbzsCUZPt5iw8bTQ63bP0Raut3mvro9u+CUyq7YQd8Cx55fsZXxqLQ==
dependencies:
chownr "^2.0.0"
fs-minipass "^2.0.0"
- minipass "^3.0.0"
+ minipass "^5.0.0"
minizlib "^2.1.1"
mkdirp "^1.0.3"
yallist "^4.0.0"
-temp-dir@^1.0.0:
+temp-dir@1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-1.0.0.tgz#0a7c0ea26d3a39afa7e0ebea9c1fc0bc4daa011d"
- integrity sha1-CnwOom06Oa+n4OvqnB/AvE2qAR0=
-
-temp-write@^3.4.0:
- version "3.4.0"
- resolved "https://registry.yarnpkg.com/temp-write/-/temp-write-3.4.0.tgz#8cff630fb7e9da05f047c74ce4ce4d685457d492"
- integrity sha1-jP9jD7fp2gXwR8dM5M5NaFRX1JI=
- dependencies:
- graceful-fs "^4.1.2"
- is-stream "^1.1.0"
- make-dir "^1.0.0"
- pify "^3.0.0"
- temp-dir "^1.0.0"
- uuid "^3.0.1"
+ integrity sha512-xZFXEGbG7SNC3itwBzI3RYjq/cEhBkx2hJuKGIUOcEULmkQExXiHat2z/qkISYsuR+IKumhEfKKbV5qXmhICFQ==
term-size@^2.1.0:
version "2.2.1"
resolved "https://registry.yarnpkg.com/term-size/-/term-size-2.2.1.tgz#2a6a54840432c2fb6320fea0f415531e90189f54"
integrity sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==
-terser-webpack-plugin@^5.1.3:
- version "5.3.0"
- resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.0.tgz#21641326486ecf91d8054161c816e464435bae9f"
- integrity sha512-LPIisi3Ol4chwAaPP8toUJ3L4qCM1G0wao7L3qNv57Drezxj6+VEyySpPw4B1HSO2Eg/hDY/MNF5XihCAoqnsQ==
+terser-webpack-plugin@^5.3.7:
+ version "5.3.10"
+ resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz#904f4c9193c6fd2a03f693a2150c62a92f40d199"
+ integrity sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==
dependencies:
- jest-worker "^27.4.1"
+ "@jridgewell/trace-mapping" "^0.3.20"
+ jest-worker "^27.4.5"
schema-utils "^3.1.1"
- serialize-javascript "^6.0.0"
- source-map "^0.6.1"
- terser "^5.7.2"
+ serialize-javascript "^6.0.1"
+ terser "^5.26.0"
-terser@^5.0.0, terser@^5.7.2:
- version "5.10.0"
- resolved "https://registry.yarnpkg.com/terser/-/terser-5.10.0.tgz#b86390809c0389105eb0a0b62397563096ddafcc"
- integrity sha512-AMmF99DMfEDiRJfxfY5jj5wNH/bYO09cniSqhfoyxc8sFoYIgkJy86G04UoZU5VjlpnplVu0K6Tx6E9b5+DlHA==
+terser@^5.17.4, terser@^5.26.0:
+ version "5.27.0"
+ resolved "https://registry.yarnpkg.com/terser/-/terser-5.27.0.tgz#70108689d9ab25fef61c4e93e808e9fd092bf20c"
+ integrity sha512-bi1HRwVRskAjheeYl291n3JC4GgO/Ty4z1nVs5AAsmonJulGxpSektecnNedrwK9C7vpvVtcX3cw00VSLt7U2A==
dependencies:
+ "@jridgewell/source-map" "^0.3.3"
+ acorn "^8.8.2"
commander "^2.20.0"
- source-map "~0.7.2"
source-map-support "~0.5.20"
-test-exclude@^6.0.0:
- version "6.0.0"
- resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e"
- integrity sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==
- dependencies:
- "@istanbuljs/schema" "^0.1.2"
- glob "^7.1.4"
- minimatch "^3.0.4"
-
text-extensions@^1.0.0:
version "1.9.0"
resolved "https://registry.yarnpkg.com/text-extensions/-/text-extensions-1.9.0.tgz#1853e45fee39c945ce6f6c36b2d659b5aabc2a26"
@@ -10611,42 +9136,13 @@ text-table@^0.2.0:
resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4"
integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=
-thenify-all@^1.0.0:
- version "1.6.0"
- resolved "https://registry.yarnpkg.com/thenify-all/-/thenify-all-1.6.0.tgz#1a1918d402d8fc3f98fbf234db0bcc8cc10e9726"
- integrity sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY=
- dependencies:
- thenify ">= 3.1.0 < 4"
-
-"thenify@>= 3.1.0 < 4":
- version "3.3.1"
- resolved "https://registry.yarnpkg.com/thenify/-/thenify-3.3.1.tgz#8932e686a4066038a016dd9e2ca46add9838a95f"
- integrity sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==
- dependencies:
- any-promise "^1.0.0"
-
-through2@^2.0.0, through2@^2.0.2:
+through2@^2.0.0:
version "2.0.5"
- resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd"
- integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==
- dependencies:
- readable-stream "~2.3.6"
- xtend "~4.0.1"
-
-through2@^3.0.0:
- version "3.0.2"
- resolved "https://registry.yarnpkg.com/through2/-/through2-3.0.2.tgz#99f88931cfc761ec7678b41d5d7336b5b6a07bf4"
- integrity sha512-enaDQ4MUyP2W6ZyT6EsMzqBPZaM/avg8iuo+l2d3QCs0J+6RaqkHV/2/lOwDTueBHeJ/2LG9lrLW3d5rWPucuQ==
- dependencies:
- inherits "^2.0.4"
- readable-stream "2 || 3"
-
-through2@^4.0.0:
- version "4.0.2"
- resolved "https://registry.yarnpkg.com/through2/-/through2-4.0.2.tgz#a7ce3ac2a7a8b0b966c80e7c49f0484c3b239764"
- integrity sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==
+ resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd"
+ integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==
dependencies:
- readable-stream "3"
+ readable-stream "~2.3.6"
+ xtend "~4.0.1"
through@2, "through@>=2.2.7 <3", through@^2.3.4, through@^2.3.6, through@^2.3.8:
version "2.3.8"
@@ -10658,6 +9154,21 @@ tiny-inflate@^1.0.0, tiny-inflate@^1.0.3:
resolved "https://registry.yarnpkg.com/tiny-inflate/-/tiny-inflate-1.0.3.tgz#122715494913a1805166aaf7c93467933eea26c4"
integrity sha512-pkY1fj1cKHb2seWDy0B16HeWyczlJA9/WW3u3c4z/NiWDsO3DOU5D7nhTLE9CF0yXv/QZFY7sEJmj24dK+Rrqw==
+tinybench@^2.5.1:
+ version "2.6.0"
+ resolved "https://registry.yarnpkg.com/tinybench/-/tinybench-2.6.0.tgz#1423284ee22de07c91b3752c048d2764714b341b"
+ integrity sha512-N8hW3PG/3aOoZAN5V/NSAEDz0ZixDSSt5b/a05iqtpgfLWMSVuCo7w0k2vVvEjdrIoeGqZzweX2WlyioNIHchA==
+
+tinypool@^0.8.1:
+ version "0.8.1"
+ resolved "https://registry.yarnpkg.com/tinypool/-/tinypool-0.8.1.tgz#b6c4e4972ede3e3e5cda74a3da1679303d386b03"
+ integrity sha512-zBTCK0cCgRROxvs9c0CGK838sPkeokNGdQVUUwHAbynHFlmyJYj825f/oRs528HaIJ97lo0pLIlDUzwN+IorWg==
+
+tinyspy@^2.2.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/tinyspy/-/tinyspy-2.2.0.tgz#9dc04b072746520b432f77ea2c2d17933de5d6ce"
+ integrity sha512-d2eda04AN/cPOR89F7Xv5bK/jrQEhmcLFe6HFldoeO9AJtps+fqEnh486vnT/8y4bw38pSyxDcTCAq+Ks2aJTg==
+
tmp@^0.0.33:
version "0.0.33"
resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9"
@@ -10665,31 +9176,18 @@ tmp@^0.0.33:
dependencies:
os-tmpdir "~1.0.2"
-tmpl@1.0.5:
- version "1.0.5"
- resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc"
- integrity sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==
+tmp@~0.2.1:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.1.tgz#8457fc3037dcf4719c251367a1af6500ee1ccf14"
+ integrity sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==
+ dependencies:
+ rimraf "^3.0.0"
to-fast-properties@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e"
integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=
-to-object-path@^0.3.0:
- version "0.3.0"
- resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af"
- integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=
- dependencies:
- kind-of "^3.0.2"
-
-to-regex-range@^2.1.0:
- version "2.1.1"
- resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38"
- integrity sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=
- dependencies:
- is-number "^3.0.0"
- repeat-string "^1.6.1"
-
to-regex-range@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4"
@@ -10697,97 +9195,61 @@ to-regex-range@^5.0.1:
dependencies:
is-number "^7.0.0"
-to-regex@^3.0.1, to-regex@^3.0.2:
- version "3.0.2"
- resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce"
- integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==
- dependencies:
- define-property "^2.0.2"
- extend-shallow "^3.0.2"
- regex-not "^1.0.2"
- safe-regex "^1.1.0"
-
-tough-cookie@^4.1.2:
- version "4.1.2"
- resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.1.2.tgz#e53e84b85f24e0b65dd526f46628db6c85f6b874"
- integrity sha512-G9fqXWoYFZgTc2z8Q5zaHy/vJMjm+WV0AkAeHxVCQiEB1b+dGvWzFW6QV07cY5jQ5gRkeid2qIkzkxUnmoQZUQ==
+tough-cookie@^4.1.3:
+ version "4.1.3"
+ resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.1.3.tgz#97b9adb0728b42280aa3d814b6b999b2ff0318bf"
+ integrity sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==
dependencies:
psl "^1.1.33"
punycode "^2.1.1"
universalify "^0.2.0"
url-parse "^1.5.3"
-tough-cookie@~2.5.0:
- version "2.5.0"
- resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2"
- integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==
- dependencies:
- psl "^1.1.28"
- punycode "^2.1.1"
-
-tr46@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09"
- integrity sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk=
- dependencies:
- punycode "^2.1.0"
-
-tr46@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/tr46/-/tr46-3.0.0.tgz#555c4e297a950617e8eeddef633c87d4d9d6cbf9"
- integrity sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==
+tr46@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/tr46/-/tr46-5.0.0.tgz#3b46d583613ec7283020d79019f1335723801cec"
+ integrity sha512-tk2G5R2KRwBd+ZN0zaEXpmzdKyOYksXwywulIX95MBODjSzMIuQnQ3m8JxgbhnL1LeVo7lqQKsYa1O3Htl7K5g==
dependencies:
- punycode "^2.1.1"
+ punycode "^2.3.1"
tr46@~0.0.3:
version "0.0.3"
resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a"
integrity sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=
-trim-newlines@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613"
- integrity sha1-WIeWa7WCpFA6QetST301ARgVphM=
-
-trim-newlines@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-2.0.0.tgz#b403d0b91be50c331dfc4b82eeceb22c3de16d20"
- integrity sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA=
-
trim-newlines@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-3.0.0.tgz#79726304a6a898aa8373427298d54c2ee8b1cb30"
integrity sha512-C4+gOpvmxaSMKuEf9Qc134F1ZuOHVXKRbtEflf4NTtuuJDEIJ9p5PXsalL8SkeRw+qit1Mo+yuvMPAKwWg/1hA==
-trim-off-newlines@^1.0.0:
- version "1.0.3"
- resolved "https://registry.yarnpkg.com/trim-off-newlines/-/trim-off-newlines-1.0.3.tgz#8df24847fcb821b0ab27d58ab6efec9f2fe961a1"
- integrity sha512-kh6Tu6GbeSNMGfrrZh6Bb/4ZEHV1QlB4xNDBeog8Y9/QwFlKTRyWvY3Fs9tRDAMZliVUwieMgEdIeL/FtqjkJg==
+ts-api-utils@^1.0.1:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.2.1.tgz#f716c7e027494629485b21c0df6180f4d08f5e8b"
+ integrity sha512-RIYA36cJn2WiH9Hy77hdF9r7oEwxAtB/TS9/S4Qd90Ap4z5FSiin5zEiTL44OII1Y3IIlEvxwxFUVgrHSZ/UpA==
-tsconfig-paths@^3.9.0:
- version "3.9.0"
- resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.9.0.tgz#098547a6c4448807e8fcb8eae081064ee9a3c90b"
- integrity sha512-dRcuzokWhajtZWkQsDVKbWyY+jgcLC5sqJhg2PSgf4ZkH2aHPvaOY8YWGhmjb68b5qqTfasSsDO9k7RUiEmZAw==
+tsconfig-paths@^3.15.0:
+ version "3.15.0"
+ resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz#5299ec605e55b1abb23ec939ef15edaf483070d4"
+ integrity sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==
dependencies:
"@types/json5" "^0.0.29"
- json5 "^1.0.1"
- minimist "^1.2.0"
+ json5 "^1.0.2"
+ minimist "^1.2.6"
strip-bom "^3.0.0"
-tslib@^1.9.0:
- version "1.14.1"
- resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
- integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
-
-tslib@^2.4.0:
- version "2.4.0"
- resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3"
- integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==
+tsconfig-paths@^4.1.2:
+ version "4.2.0"
+ resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-4.2.0.tgz#ef78e19039133446d244beac0fd6a1632e2d107c"
+ integrity sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==
+ dependencies:
+ json5 "^2.2.2"
+ minimist "^1.2.6"
+ strip-bom "^3.0.0"
-tslib@~2.1.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.1.0.tgz#da60860f1c2ecaa5703ab7d39bc05b6bf988b97a"
- integrity sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==
+tslib@^2.0.1, tslib@^2.1.0, tslib@^2.3.0, tslib@^2.4.0:
+ version "2.6.2"
+ resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae"
+ integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==
tty-table@^4.1.5:
version "4.1.6"
@@ -10802,26 +9264,32 @@ tty-table@^4.1.5:
wcwidth "^1.0.1"
yargs "^17.1.1"
-tunnel-agent@^0.6.0:
- version "0.6.0"
- resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd"
- integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=
+tuf-js@^1.1.7:
+ version "1.1.7"
+ resolved "https://registry.yarnpkg.com/tuf-js/-/tuf-js-1.1.7.tgz#21b7ae92a9373015be77dfe0cb282a80ec3bbe43"
+ integrity sha512-i3P9Kgw3ytjELUfpuKVDNBJvk4u5bXL6gskv572mcevPbSKCV3zt3djhmlEQ65yERjIbOSncy7U4cQJaB1CBCg==
dependencies:
- safe-buffer "^5.0.1"
+ "@tufjs/models" "1.0.4"
+ debug "^4.3.4"
+ make-fetch-happen "^11.1.1"
-tweetnacl@^0.14.3, tweetnacl@~0.14.0:
- version "0.14.5"
- resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64"
- integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=
+tuf-js@^2.2.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/tuf-js/-/tuf-js-2.2.0.tgz#4daaa8620ba7545501d04dfa933c98abbcc959b9"
+ integrity sha512-ZSDngmP1z6zw+FIkIBjvOp/II/mIub/O7Pp12j1WNsiCpg5R5wAc//i555bBQsE44O94btLt0xM/Zr2LQjwdCg==
+ dependencies:
+ "@tufjs/models" "2.0.0"
+ debug "^4.3.4"
+ make-fetch-happen "^13.0.0"
-type-check@~0.3.2:
- version "0.3.2"
- resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72"
- integrity sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=
+type-check@^0.4.0, type-check@~0.4.0:
+ version "0.4.0"
+ resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1"
+ integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==
dependencies:
- prelude-ls "~1.1.2"
+ prelude-ls "^1.2.1"
-type-detect@4.0.8:
+type-detect@^4.0.0, type-detect@^4.0.8:
version "4.0.8"
resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c"
integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==
@@ -10836,15 +9304,20 @@ type-fest@^0.18.0:
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.18.1.tgz#db4bc151a4a2cf4eebf9add5db75508db6cc841f"
integrity sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==
+type-fest@^0.20.2:
+ version "0.20.2"
+ resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4"
+ integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==
+
type-fest@^0.21.3:
version "0.21.3"
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37"
integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==
-type-fest@^0.3.0:
- version "0.3.1"
- resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.3.1.tgz#63d00d204e059474fe5e1b7c011112bbd1dc29e1"
- integrity sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ==
+type-fest@^0.4.1:
+ version "0.4.1"
+ resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.4.1.tgz#8bdf77743385d8a4f13ba95f610f5ccd68c728f8"
+ integrity sha512-IwzA/LSfD2vC1/YDYMv/zHP4rDF1usCwllsDpbolT3D4fUepIO7f9K70jjmUewU/LmGUKJcwcVtDCpnKk4BPMw==
type-fest@^0.6.0:
version "0.6.0"
@@ -10856,34 +9329,73 @@ type-fest@^0.8.1:
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d"
integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==
+typed-array-buffer@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/typed-array-buffer/-/typed-array-buffer-1.0.1.tgz#0608ffe6bca71bf15a45bff0ca2604107a1325f5"
+ integrity sha512-RSqu1UEuSlrBhHTWC8O9FnPjOduNs4M7rJ4pRKoEjtx1zUNOPN2sSXHLDX+Y2WPbHIxbvg4JFo2DNAEfPIKWoQ==
+ dependencies:
+ call-bind "^1.0.6"
+ es-errors "^1.3.0"
+ is-typed-array "^1.1.13"
+
+typed-array-byte-length@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz#d787a24a995711611fb2b87a4052799517b230d0"
+ integrity sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==
+ dependencies:
+ call-bind "^1.0.2"
+ for-each "^0.3.3"
+ has-proto "^1.0.1"
+ is-typed-array "^1.1.10"
+
+typed-array-byte-offset@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz#cbbe89b51fdef9cd6aaf07ad4707340abbc4ea0b"
+ integrity sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==
+ dependencies:
+ available-typed-arrays "^1.0.5"
+ call-bind "^1.0.2"
+ for-each "^0.3.3"
+ has-proto "^1.0.1"
+ is-typed-array "^1.1.10"
+
+typed-array-length@^1.0.4:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.4.tgz#89d83785e5c4098bec72e08b319651f0eac9c1bb"
+ integrity sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==
+ dependencies:
+ call-bind "^1.0.2"
+ for-each "^0.3.3"
+ is-typed-array "^1.1.9"
+
typedarray@^0.0.6:
version "0.0.6"
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=
+"typescript@>=3 < 6":
+ version "5.3.3"
+ resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.3.tgz#b3ce6ba258e72e6305ba66f5c9b452aaee3ffe37"
+ integrity sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==
+
+ufo@^1.3.2:
+ version "1.3.2"
+ resolved "https://registry.yarnpkg.com/ufo/-/ufo-1.3.2.tgz#c7d719d0628a1c80c006d2240e0d169f6e3c0496"
+ integrity sha512-o+ORpgGwaYQXgqGDwd+hkS4PuZ3QnmqMMxRuajK/a38L6fTpcE5GPIfrf+L/KemFzfUpeUQc1rRS1iDBozvnFA==
+
uglify-js@^3.1.4:
version "3.13.3"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.13.3.tgz#ce72a1ad154348ea2af61f50933c76cc8802276e"
integrity sha512-otIc7O9LyxpUcQoXzj2hL4LPWKklO6LJWoJUzNa8A17Xgi4fOeDC8FBDOLHnC/Slo1CQgsZMcM6as0M76BZaig==
-uid-number@0.0.6:
- version "0.0.6"
- resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81"
- integrity sha1-DqEOgDXo61uOREnwbaHHMGY7qoE=
-
-umask@^1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/umask/-/umask-1.1.0.tgz#f29cebf01df517912bb58ff9c4e50fde8e33320d"
- integrity sha1-8pzr8B31F5ErtY/5xOUP3o4zMg0=
-
-unbox-primitive@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.1.tgz#085e215625ec3162574dc8859abee78a59b14471"
- integrity sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==
+unbox-primitive@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e"
+ integrity sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==
dependencies:
- function-bind "^1.1.1"
- has-bigints "^1.0.1"
- has-symbols "^1.0.2"
+ call-bind "^1.0.2"
+ has-bigints "^1.0.2"
+ has-symbols "^1.0.3"
which-boxed-primitive "^1.0.2"
unbzip2-stream@1.4.3:
@@ -10933,37 +9445,25 @@ unicode-trie@^2.0.0:
pako "^0.2.5"
tiny-inflate "^1.0.0"
-union-value@^1.0.0:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847"
- integrity sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==
- dependencies:
- arr-union "^3.1.0"
- get-value "^2.0.6"
- is-extendable "^0.1.1"
- set-value "^2.0.1"
+unicorn-magic@^0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/unicorn-magic/-/unicorn-magic-0.1.0.tgz#1bb9a51c823aaf9d73a8bfcd3d1a23dde94b0ce4"
+ integrity sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==
-unique-filename@^1.1.1:
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-1.1.1.tgz#1d69769369ada0583103a1e6ae87681b56573230"
- integrity sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==
+unique-filename@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-3.0.0.tgz#48ba7a5a16849f5080d26c760c86cf5cf05770ea"
+ integrity sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g==
dependencies:
- unique-slug "^2.0.0"
+ unique-slug "^4.0.0"
-unique-slug@^2.0.0:
- version "2.0.2"
- resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-2.0.2.tgz#baabce91083fc64e945b0f3ad613e264f7cd4e6c"
- integrity sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==
+unique-slug@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-4.0.0.tgz#6bae6bb16be91351badd24cdce741f892a6532e3"
+ integrity sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ==
dependencies:
imurmurhash "^0.1.4"
-universal-user-agent@^4.0.0:
- version "4.0.1"
- resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-4.0.1.tgz#fd8d6cb773a679a709e967ef8288a31fcc03e557"
- integrity sha512-LnST3ebHwVL2aNe4mejI9IQh2HfZ1RLo8Io2HugSif8ekzD1TlWpHpColOB/eh8JHMLkGH3Akqf040I+4ylNxg==
- dependencies:
- os-name "^3.1.0"
-
universal-user-agent@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-6.0.0.tgz#3381f8503b251c0d9cd21bc1de939ec9df5480ee"
@@ -10979,23 +9479,20 @@ universalify@^0.2.0:
resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.2.0.tgz#6451760566fa857534745ab1dde952d1b1761be0"
integrity sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==
-unset-value@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559"
- integrity sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=
- dependencies:
- has-value "^0.3.1"
- isobject "^3.0.0"
+universalify@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.1.tgz#168efc2180964e6386d061e094df61afe239b18d"
+ integrity sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==
-upath@^1.2.0:
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/upath/-/upath-1.2.0.tgz#8f66dbcd55a883acdae4408af8b035a5044c1894"
- integrity sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==
+upath@2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/upath/-/upath-2.0.1.tgz#50c73dea68d6f6b990f51d279ce6081665d61a8b"
+ integrity sha512-1uEe95xksV1O0CYKXo8vQvN1JEbtJp7lb7C5U9HMsIp6IVwntkH/oNUzyVNQSd4S1sYk2FpSSW44FqMc8qee5w==
-update-browserslist-db@^1.0.10:
- version "1.0.10"
- resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz#0f54b876545726f17d00cd9a2561e6dade943ff3"
- integrity sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==
+update-browserslist-db@^1.0.13:
+ version "1.0.13"
+ resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz#3c5e4f5c083661bd38ef64b6328c26ed6c8248c4"
+ integrity sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==
dependencies:
escalade "^3.1.1"
picocolors "^1.0.0"
@@ -11007,11 +9504,6 @@ uri-js@^4.2.2:
dependencies:
punycode "^2.1.0"
-urix@^0.1.0:
- version "0.1.0"
- resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72"
- integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=
-
url-parse@^1.5.3:
version "1.5.10"
resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.10.tgz#9d3c2f736c1d75dd3bd2be507dcc111f1e2ea9c1"
@@ -11020,23 +9512,16 @@ url-parse@^1.5.3:
querystringify "^2.1.1"
requires-port "^1.0.0"
-use@^3.1.0:
- version "3.1.1"
- resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f"
- integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==
+urlpattern-polyfill@9.0.0:
+ version "9.0.0"
+ resolved "https://registry.yarnpkg.com/urlpattern-polyfill/-/urlpattern-polyfill-9.0.0.tgz#bc7e386bb12fd7898b58d1509df21d3c29ab3460"
+ integrity sha512-WHN8KDQblxd32odxeIgo83rdVDE2bvdkb86it7bMhYZwWKJz0+O0RK/eZiHYnM+zgt/U7hAHOlCQGfjjvSkw2g==
util-deprecate@^1.0.1, util-deprecate@~1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=
-util-promisify@^2.1.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/util-promisify/-/util-promisify-2.1.0.tgz#3c2236476c4d32c5ff3c47002add7c13b9a82a53"
- integrity sha1-PCI2R2xNMsX/PEcAKt18E7moKlM=
- dependencies:
- object.getownpropertydescriptors "^2.0.3"
-
util@^0.12.0, util@^0.12.4:
version "0.12.4"
resolved "https://registry.yarnpkg.com/util/-/util-0.12.4.tgz#66121a31420df8f01ca0c464be15dfa1d1850253"
@@ -11049,33 +9534,12 @@ util@^0.12.0, util@^0.12.4:
safe-buffer "^5.1.2"
which-typed-array "^1.1.2"
-uuid@^3.0.1, uuid@^3.3.2:
- version "3.4.0"
- resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee"
- integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==
-
-v8-compile-cache@^2.0.3:
- version "2.3.0"
- resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee"
- integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==
-
-v8-to-istanbul@^9.0.1:
- version "9.1.0"
- resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.1.0.tgz#1b83ed4e397f58c85c266a570fc2558b5feb9265"
- integrity sha512-6z3GW9x8G1gd+JIIgQQQxXuiJtCXeAjp6RaPEPLv62mH3iPHPxV6W3robxtCzNErRo6ZwTmzWhsbNvjyEBKzKA==
- dependencies:
- "@jridgewell/trace-mapping" "^0.3.12"
- "@types/istanbul-lib-coverage" "^2.0.1"
- convert-source-map "^1.6.0"
-
-v8flags@^3.1.1:
- version "3.2.0"
- resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-3.2.0.tgz#b243e3b4dfd731fa774e7492128109a0fe66d656"
- integrity sha512-mH8etigqMfiGWdeXpaaqGfs6BndypxusHHcv2qSHyZkGEznCd/qAXCWWRzeowtL54147cktFOC4P5y+kl8d8Jg==
- dependencies:
- homedir-polyfill "^1.0.1"
+uuid@^9.0.0:
+ version "9.0.1"
+ resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.1.tgz#e188d4c8853cc722220392c424cd637f32293f30"
+ integrity sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==
-validate-npm-package-license@^3.0.1, validate-npm-package-license@^3.0.3:
+validate-npm-package-license@3.0.4, validate-npm-package-license@^3.0.1, validate-npm-package-license@^3.0.4:
version "3.0.4"
resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a"
integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==
@@ -11083,6 +9547,13 @@ validate-npm-package-license@^3.0.1, validate-npm-package-license@^3.0.3:
spdx-correct "^3.0.0"
spdx-expression-parse "^3.0.0"
+validate-npm-package-name@5.0.0, validate-npm-package-name@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/validate-npm-package-name/-/validate-npm-package-name-5.0.0.tgz#f16afd48318e6f90a1ec101377fa0384cfc8c713"
+ integrity sha512-YuKoXDAhBYxY7SfOKxHBDoSyENFeW5VvIIQp2TGQuit8gpK6MnWaQelBKxso72DoxTZfZdcP3W90LqpSkgPzLQ==
+ dependencies:
+ builtins "^5.0.0"
+
validate-npm-package-name@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz#5fa912d81eb7d0c74afc140de7317f0ca7df437e"
@@ -11090,15 +9561,6 @@ validate-npm-package-name@^3.0.0:
dependencies:
builtins "^1.0.3"
-verror@1.10.0:
- version "1.10.0"
- resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400"
- integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=
- dependencies:
- assert-plus "^1.0.0"
- core-util-is "1.0.2"
- extsprintf "^1.2.0"
-
vite-compatible-readable-stream@^3.6.1:
version "3.6.1"
resolved "https://registry.yarnpkg.com/vite-compatible-readable-stream/-/vite-compatible-readable-stream-3.6.1.tgz#27267aebbdc9893c0ddf65a421279cbb1e31d8cd"
@@ -11108,24 +9570,73 @@ vite-compatible-readable-stream@^3.6.1:
string_decoder "^1.1.1"
util-deprecate "^1.0.1"
-w3c-xmlserializer@^4.0.0:
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/w3c-xmlserializer/-/w3c-xmlserializer-4.0.0.tgz#aebdc84920d806222936e3cdce408e32488a3073"
- integrity sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw==
+vite-node@1.2.1:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/vite-node/-/vite-node-1.2.1.tgz#bca96ae91b2b1ee9a7aa73685908362d70ce26a8"
+ integrity sha512-fNzHmQUSOY+y30naohBvSW7pPn/xn3Ib/uqm+5wAJQJiqQsU0NBR78XdRJb04l4bOFKjpTWld0XAfkKlrDbySg==
dependencies:
- xml-name-validator "^4.0.0"
+ cac "^6.7.14"
+ debug "^4.3.4"
+ pathe "^1.1.1"
+ picocolors "^1.0.0"
+ vite "^5.0.0"
-walker@^1.0.8:
- version "1.0.8"
- resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.8.tgz#bd498db477afe573dc04185f011d3ab8a8d7653f"
- integrity sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==
+vite@^5.0.0, vite@^5.0.11:
+ version "5.0.12"
+ resolved "https://registry.yarnpkg.com/vite/-/vite-5.0.12.tgz#8a2ffd4da36c132aec4adafe05d7adde38333c47"
+ integrity sha512-4hsnEkG3q0N4Tzf1+t6NdN9dg/L3BM+q8SWgbSPnJvrgH2kgdyzfVJwbR1ic69/4uMJJ/3dqDZZE5/WwqW8U1w==
+ dependencies:
+ esbuild "^0.19.3"
+ postcss "^8.4.32"
+ rollup "^4.2.0"
+ optionalDependencies:
+ fsevents "~2.3.3"
+
+vitest-fetch-mock@^0.2.2:
+ version "0.2.2"
+ resolved "https://registry.yarnpkg.com/vitest-fetch-mock/-/vitest-fetch-mock-0.2.2.tgz#f6849dcf7a8e862a509e1cee2fa3bb0cb534f468"
+ integrity sha512-XmH6QgTSjCWrqXoPREIdbj40T7i1xnGmAsTAgfckoO75W1IEHKR8hcPCQ7SO16RsdW1t85oUm6pcQRLeBgjVYQ==
dependencies:
- makeerror "1.0.12"
+ cross-fetch "^3.0.6"
-watchpack@^2.3.1:
- version "2.3.1"
- resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.3.1.tgz#4200d9447b401156eeca7767ee610f8809bc9d25"
- integrity sha512-x0t0JuydIo8qCNctdDrn1OzH/qDzk2+rdCOC3YzumZ42fiMqmQ7T3xQurykYMhYfHaPHTp4ZxAx2NfUo1K6QaA==
+vitest@^1.2.0:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/vitest/-/vitest-1.2.1.tgz#9afb705826a2c6260a71b625d28b49117833dce6"
+ integrity sha512-TRph8N8rnSDa5M2wKWJCMnztCZS9cDcgVTQ6tsTFTG/odHJ4l5yNVqvbeDJYJRZ6is3uxaEpFs8LL6QM+YFSdA==
+ dependencies:
+ "@vitest/expect" "1.2.1"
+ "@vitest/runner" "1.2.1"
+ "@vitest/snapshot" "1.2.1"
+ "@vitest/spy" "1.2.1"
+ "@vitest/utils" "1.2.1"
+ acorn-walk "^8.3.2"
+ cac "^6.7.14"
+ chai "^4.3.10"
+ debug "^4.3.4"
+ execa "^8.0.1"
+ local-pkg "^0.5.0"
+ magic-string "^0.30.5"
+ pathe "^1.1.1"
+ picocolors "^1.0.0"
+ std-env "^3.5.0"
+ strip-literal "^1.3.0"
+ tinybench "^2.5.1"
+ tinypool "^0.8.1"
+ vite "^5.0.0"
+ vite-node "1.2.1"
+ why-is-node-running "^2.2.2"
+
+w3c-xmlserializer@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/w3c-xmlserializer/-/w3c-xmlserializer-5.0.0.tgz#f925ba26855158594d907313cedd1476c5967f6c"
+ integrity sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==
+ dependencies:
+ xml-name-validator "^5.0.0"
+
+watchpack@^2.4.0:
+ version "2.4.0"
+ resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.0.tgz#fa33032374962c78113f93c7f2fb4c54c9862a5d"
+ integrity sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==
dependencies:
glob-to-regexp "^0.4.1"
graceful-fs "^4.1.2"
@@ -11147,74 +9658,64 @@ webidl-conversions@^3.0.0:
resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871"
integrity sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=
-webidl-conversions@^4.0.2:
- version "4.0.2"
- resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad"
- integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==
-
webidl-conversions@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-7.0.0.tgz#256b4e1882be7debbf01d05f0aa2039778ea080a"
integrity sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==
-webpack-sources@^3.2.2:
- version "3.2.2"
- resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.2.tgz#d88e3741833efec57c4c789b6010db9977545260"
- integrity sha512-cp5qdmHnu5T8wRg2G3vZZHoJPN14aqQ89SyQ11NpGH5zEMDCclt49rzo+MaRazk7/UeILhAI+/sEtcM+7Fr0nw==
-
-webpack@^5.65.0:
- version "5.65.0"
- resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.65.0.tgz#ed2891d9145ba1f0d318e4ea4f89c3fa18e6f9be"
- integrity sha512-Q5or2o6EKs7+oKmJo7LaqZaMOlDWQse9Tm5l1WAfU/ujLGN5Pb0SqGeVkN/4bpPmEqEP5RnVhiqsOtWtUVwGRw==
- dependencies:
- "@types/eslint-scope" "^3.7.0"
- "@types/estree" "^0.0.50"
- "@webassemblyjs/ast" "1.11.1"
- "@webassemblyjs/wasm-edit" "1.11.1"
- "@webassemblyjs/wasm-parser" "1.11.1"
- acorn "^8.4.1"
- acorn-import-assertions "^1.7.6"
+webpack-sources@^3.2.3:
+ version "3.2.3"
+ resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde"
+ integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==
+
+webpack@^5.89.0:
+ version "5.89.0"
+ resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.89.0.tgz#56b8bf9a34356e93a6625770006490bf3a7f32dc"
+ integrity sha512-qyfIC10pOr70V+jkmud8tMfajraGCZMBWJtrmuBymQKCrLTRejBI8STDp1MCyZu/QTdZSeacCQYpYNQVOzX5kw==
+ dependencies:
+ "@types/eslint-scope" "^3.7.3"
+ "@types/estree" "^1.0.0"
+ "@webassemblyjs/ast" "^1.11.5"
+ "@webassemblyjs/wasm-edit" "^1.11.5"
+ "@webassemblyjs/wasm-parser" "^1.11.5"
+ acorn "^8.7.1"
+ acorn-import-assertions "^1.9.0"
browserslist "^4.14.5"
chrome-trace-event "^1.0.2"
- enhanced-resolve "^5.8.3"
- es-module-lexer "^0.9.0"
+ enhanced-resolve "^5.15.0"
+ es-module-lexer "^1.2.1"
eslint-scope "5.1.1"
events "^3.2.0"
glob-to-regexp "^0.4.1"
- graceful-fs "^4.2.4"
- json-parse-better-errors "^1.0.2"
+ graceful-fs "^4.2.9"
+ json-parse-even-better-errors "^2.3.1"
loader-runner "^4.2.0"
mime-types "^2.1.27"
neo-async "^2.6.2"
- schema-utils "^3.1.0"
+ schema-utils "^3.2.0"
tapable "^2.1.1"
- terser-webpack-plugin "^5.1.3"
- watchpack "^2.3.1"
- webpack-sources "^3.2.2"
+ terser-webpack-plugin "^5.3.7"
+ watchpack "^2.4.0"
+ webpack-sources "^3.2.3"
-whatwg-encoding@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz#e7635f597fd87020858626805a2729fa7698ac53"
- integrity sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==
+whatwg-encoding@^3.1.1:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz#d0f4ef769905d426e1688f3e34381a99b60b76e5"
+ integrity sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==
dependencies:
iconv-lite "0.6.3"
-whatwg-fetch@2.0.4:
- version "2.0.4"
- resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz#dde6a5df315f9d39991aa17621853d720b85566f"
- integrity sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng==
-
-whatwg-mimetype@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz#5fa1a7623867ff1af6ca3dc72ad6b8a4208beba7"
- integrity sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==
+whatwg-mimetype@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz#bc1bf94a985dc50388d54a9258ac405c3ca2fc0a"
+ integrity sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==
-whatwg-url@^11.0.0:
- version "11.0.0"
- resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-11.0.0.tgz#0a849eebb5faf2119b901bb76fd795c2848d4018"
- integrity sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==
+whatwg-url@^14.0.0:
+ version "14.0.0"
+ resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-14.0.0.tgz#00baaa7fd198744910c4b1ef68378f2200e4ceb6"
+ integrity sha512-1lfMEm2IEr7RIV+f4lUNPOqfFL+pO+Xw3fJSqmjX9AbXcXcYOkCe1P6+9VBZB6n94af16NfZf+sSk0JCBZC9aw==
dependencies:
- tr46 "^3.0.0"
+ tr46 "^5.0.0"
webidl-conversions "^7.0.0"
whatwg-url@^5.0.0:
@@ -11225,15 +9726,6 @@ whatwg-url@^5.0.0:
tr46 "~0.0.3"
webidl-conversions "^3.0.0"
-whatwg-url@^7.0.0:
- version "7.1.0"
- resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-7.1.0.tgz#c2c492f1eca612988efd3d2266be1b9fc6170d06"
- integrity sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==
- dependencies:
- lodash.sortby "^4.7.0"
- tr46 "^1.0.1"
- webidl-conversions "^4.0.2"
-
which-boxed-primitive@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6"
@@ -11245,6 +9737,24 @@ which-boxed-primitive@^1.0.2:
is-string "^1.0.5"
is-symbol "^1.0.3"
+which-builtin-type@^1.1.3:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/which-builtin-type/-/which-builtin-type-1.1.3.tgz#b1b8443707cc58b6e9bf98d32110ff0c2cbd029b"
+ integrity sha512-YmjsSMDBYsM1CaFiayOVT06+KJeXf0o5M/CAd4o1lTadFAtacTUM49zoYxr/oroopFDfhvN6iEcBxUyc3gvKmw==
+ dependencies:
+ function.prototype.name "^1.1.5"
+ has-tostringtag "^1.0.0"
+ is-async-function "^2.0.0"
+ is-date-object "^1.0.5"
+ is-finalizationregistry "^1.0.2"
+ is-generator-function "^1.0.10"
+ is-regex "^1.1.4"
+ is-weakref "^1.0.2"
+ isarray "^2.0.5"
+ which-boxed-primitive "^1.0.2"
+ which-collection "^1.0.1"
+ which-typed-array "^1.1.9"
+
which-collection@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/which-collection/-/which-collection-1.0.1.tgz#70eab71ebbbd2aefaf32f917082fc62cdcb70906"
@@ -11268,19 +9778,18 @@ which-pm@2.0.0:
load-yaml-file "^0.2.0"
path-exists "^4.0.0"
-which-typed-array@^1.1.2, which-typed-array@^1.1.9:
- version "1.1.9"
- resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.9.tgz#307cf898025848cf995e795e8423c7f337efbde6"
- integrity sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==
+which-typed-array@^1.1.13, which-typed-array@^1.1.14, which-typed-array@^1.1.2, which-typed-array@^1.1.9:
+ version "1.1.14"
+ resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.14.tgz#1f78a111aee1e131ca66164d8bdc3ab062c95a06"
+ integrity sha512-VnXFiIW8yNn9kIHN88xvZ4yOWchftKDsRJ8fEPacX/wl1lOvBrhsJ/OeJCXq7B0AaijRuqgzSKalJoPk+D8MPg==
dependencies:
- available-typed-arrays "^1.0.5"
- call-bind "^1.0.2"
+ available-typed-arrays "^1.0.6"
+ call-bind "^1.0.5"
for-each "^0.3.3"
gopd "^1.0.1"
- has-tostringtag "^1.0.0"
- is-typed-array "^1.1.10"
+ has-tostringtag "^1.0.1"
-which@^1.2.9, which@^1.3.1:
+which@^1.2.9:
version "1.3.1"
resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a"
integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==
@@ -11294,40 +9803,43 @@ which@^2.0.1:
dependencies:
isexe "^2.0.0"
-wide-align@^1.1.0:
- version "1.1.3"
- resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457"
- integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==
+which@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/which/-/which-4.0.0.tgz#cd60b5e74503a3fbcfbf6cd6b4138a8bae644c1a"
+ integrity sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==
dependencies:
- string-width "^1.0.2 || 2"
+ isexe "^3.1.1"
-windows-release@^3.1.0:
- version "3.3.3"
- resolved "https://registry.yarnpkg.com/windows-release/-/windows-release-3.3.3.tgz#1c10027c7225743eec6b89df160d64c2e0293999"
- integrity sha512-OSOGH1QYiW5yVor9TtmXKQvt2vjQqbYS+DqmsZw+r7xDwLXEeT3JGW0ZppFmHx4diyXmxt238KFR3N9jzevBRg==
+why-is-node-running@^2.2.2:
+ version "2.2.2"
+ resolved "https://registry.yarnpkg.com/why-is-node-running/-/why-is-node-running-2.2.2.tgz#4185b2b4699117819e7154594271e7e344c9973e"
+ integrity sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA==
dependencies:
- execa "^1.0.0"
+ siginfo "^2.0.0"
+ stackback "0.0.2"
-word-wrap@~1.2.3:
- version "1.2.3"
- resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c"
- integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==
+wide-align@^1.1.0, wide-align@^1.1.5:
+ version "1.1.5"
+ resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.5.tgz#df1d4c206854369ecf3c9a4898f1b23fbd9d15d3"
+ integrity sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==
+ dependencies:
+ string-width "^1.0.2 || 2 || 3 || 4"
wordwrap@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb"
integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=
-wrap-ansi@^5.1.0:
- version "5.1.0"
- resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09"
- integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==
+"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
+ integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
dependencies:
- ansi-styles "^3.2.0"
- string-width "^3.0.0"
- strip-ansi "^5.0.0"
+ ansi-styles "^4.0.0"
+ string-width "^4.1.0"
+ strip-ansi "^6.0.0"
-wrap-ansi@^6.2.0:
+wrap-ansi@^6.0.1, wrap-ansi@^6.2.0:
version "6.2.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53"
integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==
@@ -11336,21 +9848,29 @@ wrap-ansi@^6.2.0:
string-width "^4.1.0"
strip-ansi "^6.0.0"
-wrap-ansi@^7.0.0:
- version "7.0.0"
- resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
- integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
+wrap-ansi@^8.1.0:
+ version "8.1.0"
+ resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"
+ integrity sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==
dependencies:
- ansi-styles "^4.0.0"
- string-width "^4.1.0"
- strip-ansi "^6.0.0"
+ ansi-styles "^6.1.0"
+ string-width "^5.0.1"
+ strip-ansi "^7.0.1"
wrappy@1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=
-write-file-atomic@^2.0.0, write-file-atomic@^2.3.0, write-file-atomic@^2.4.2:
+write-file-atomic@5.0.1:
+ version "5.0.1"
+ resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-5.0.1.tgz#68df4717c55c6fa4281a7860b4c2ba0a6d2b11e7"
+ integrity sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==
+ dependencies:
+ imurmurhash "^0.1.4"
+ signal-exit "^4.0.1"
+
+write-file-atomic@^2.4.2:
version "2.4.3"
resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.4.3.tgz#1fd2e9ae1df3e75b8d8c367443c692d4ca81f481"
integrity sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==
@@ -11359,26 +9879,6 @@ write-file-atomic@^2.0.0, write-file-atomic@^2.3.0, write-file-atomic@^2.4.2:
imurmurhash "^0.1.4"
signal-exit "^3.0.2"
-write-file-atomic@^4.0.2:
- version "4.0.2"
- resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-4.0.2.tgz#a9df01ae5b77858a027fd2e80768ee433555fcfd"
- integrity sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==
- dependencies:
- imurmurhash "^0.1.4"
- signal-exit "^3.0.7"
-
-write-json-file@^2.2.0:
- version "2.3.0"
- resolved "https://registry.yarnpkg.com/write-json-file/-/write-json-file-2.3.0.tgz#2b64c8a33004d54b8698c76d585a77ceb61da32f"
- integrity sha1-K2TIozAE1UuGmMdtWFp3zrYdoy8=
- dependencies:
- detect-indent "^5.0.0"
- graceful-fs "^4.1.2"
- make-dir "^1.0.0"
- pify "^3.0.0"
- sort-keys "^2.0.0"
- write-file-atomic "^2.0.0"
-
write-json-file@^3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/write-json-file/-/write-json-file-3.2.0.tgz#65bbdc9ecd8a1458e15952770ccbadfcff5fe62a"
@@ -11391,35 +9891,29 @@ write-json-file@^3.2.0:
sort-keys "^2.0.0"
write-file-atomic "^2.4.2"
-write-pkg@^3.1.0:
- version "3.2.0"
- resolved "https://registry.yarnpkg.com/write-pkg/-/write-pkg-3.2.0.tgz#0e178fe97820d389a8928bc79535dbe68c2cff21"
- integrity sha512-tX2ifZ0YqEFOF1wjRW2Pk93NLsj02+n1UP5RvO6rCs0K6R2g1padvf006cY74PQJKMGS2r42NK7FD0dG6Y6paw==
+write-pkg@4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/write-pkg/-/write-pkg-4.0.0.tgz#675cc04ef6c11faacbbc7771b24c0abbf2a20039"
+ integrity sha512-v2UQ+50TNf2rNHJ8NyWttfm/EJUBWMJcx6ZTYZr6Qp52uuegWw/lBkCtCbnYZEmPRNL61m+u67dAmGxo+HTULA==
dependencies:
sort-keys "^2.0.0"
- write-json-file "^2.2.0"
-
-write@1.0.3:
- version "1.0.3"
- resolved "https://registry.yarnpkg.com/write/-/write-1.0.3.tgz#0800e14523b923a387e415123c865616aae0f5c3"
- integrity sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==
- dependencies:
- mkdirp "^0.5.1"
+ type-fest "^0.4.1"
+ write-json-file "^3.2.0"
-ws@8.2.3:
- version "8.2.3"
- resolved "https://registry.yarnpkg.com/ws/-/ws-8.2.3.tgz#63a56456db1b04367d0b721a0b80cae6d8becbba"
- integrity sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA==
+ws@8.14.2:
+ version "8.14.2"
+ resolved "https://registry.yarnpkg.com/ws/-/ws-8.14.2.tgz#6c249a806eb2db7a20d26d51e7709eab7b2e6c7f"
+ integrity sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==
-ws@^8.11.0:
- version "8.13.0"
- resolved "https://registry.yarnpkg.com/ws/-/ws-8.13.0.tgz#9a9fb92f93cf41512a0735c8f4dd09b8a1211cd0"
- integrity sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==
+ws@^8.16.0:
+ version "8.16.0"
+ resolved "https://registry.yarnpkg.com/ws/-/ws-8.16.0.tgz#d1cd774f36fbc07165066a60e40323eab6446fd4"
+ integrity sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==
-xml-name-validator@^4.0.0:
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-4.0.0.tgz#79a006e2e63149a8600f15430f0a4725d1524835"
- integrity sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==
+xml-name-validator@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-5.0.0.tgz#82be9b957f7afdacf961e5980f1bf227c0bf7673"
+ integrity sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==
xmlchars@^2.2.0:
version "2.2.0"
@@ -11446,7 +9940,7 @@ yallist@^2.1.2:
resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52"
integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=
-yallist@^3.0.0, yallist@^3.0.2, yallist@^3.0.3:
+yallist@^3.0.2:
version "3.1.1"
resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd"
integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==
@@ -11461,13 +9955,10 @@ yaml@^1.10.0:
resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b"
integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==
-yargs-parser@^15.0.1:
- version "15.0.1"
- resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-15.0.1.tgz#54786af40b820dcb2fb8025b11b4d659d76323b3"
- integrity sha512-0OAMV2mAZQrs3FkNpDQcBk1x5HXb8X4twADss4S0Iuk+2dGnLOE/fRHrsYm542GduMveyA77OF4wrNJuanRCWw==
- dependencies:
- camelcase "^5.0.0"
- decamelize "^1.2.0"
+yargs-parser@21.1.1, yargs-parser@^21.1.1:
+ version "21.1.1"
+ resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35"
+ integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==
yargs-parser@^18.1.2, yargs-parser@^18.1.3:
version "18.1.3"
@@ -11477,32 +9968,23 @@ yargs-parser@^18.1.2, yargs-parser@^18.1.3:
camelcase "^5.0.0"
decamelize "^1.2.0"
-yargs-parser@^20.2.3:
- version "20.2.7"
- resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.7.tgz#61df85c113edfb5a7a4e36eb8aa60ef423cbc90a"
- integrity sha512-FiNkvbeHzB/syOjIUxFDCnhSfzAL8R5vs40MgLFBorXACCOAEaWu0gRZl14vG8MR9AOJIZbmkjhusqBYZ3HTHw==
-
-yargs-parser@^21.1.1:
- version "21.1.1"
- resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35"
- integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==
+yargs-parser@^20.2.2, yargs-parser@^20.2.3:
+ version "20.2.9"
+ resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee"
+ integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==
-yargs@^14.2.2:
- version "14.2.3"
- resolved "https://registry.yarnpkg.com/yargs/-/yargs-14.2.3.tgz#1a1c3edced1afb2a2fea33604bc6d1d8d688a414"
- integrity sha512-ZbotRWhF+lkjijC/VhmOT9wSgyBQ7+zr13+YLkhfsSiTriYsMzkTUFP18pFhWwBeMa5gUc1MzbhrO6/VB7c9Xg==
+yargs@17.7.2, yargs@^17.1.1, yargs@^17.6.2:
+ version "17.7.2"
+ resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269"
+ integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==
dependencies:
- cliui "^5.0.0"
- decamelize "^1.2.0"
- find-up "^3.0.0"
- get-caller-file "^2.0.1"
+ cliui "^8.0.1"
+ escalade "^3.1.1"
+ get-caller-file "^2.0.5"
require-directory "^2.1.1"
- require-main-filename "^2.0.0"
- set-blocking "^2.0.0"
- string-width "^3.0.0"
- which-module "^2.0.0"
- y18n "^4.0.0"
- yargs-parser "^15.0.1"
+ string-width "^4.2.3"
+ y18n "^5.0.5"
+ yargs-parser "^21.1.1"
yargs@^15.1.0:
version "15.4.1"
@@ -11521,18 +10003,18 @@ yargs@^15.1.0:
y18n "^4.0.0"
yargs-parser "^18.1.2"
-yargs@^17.1.1, yargs@^17.3.1:
- version "17.7.2"
- resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269"
- integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==
+yargs@^16.2.0:
+ version "16.2.0"
+ resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66"
+ integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==
dependencies:
- cliui "^8.0.1"
+ cliui "^7.0.2"
escalade "^3.1.1"
get-caller-file "^2.0.5"
require-directory "^2.1.1"
- string-width "^4.2.3"
+ string-width "^4.2.0"
y18n "^5.0.5"
- yargs-parser "^21.1.1"
+ yargs-parser "^20.2.2"
yauzl@^2.10.0:
version "2.10.0"
@@ -11547,7 +10029,12 @@ yocto-queue@^0.1.0:
resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"
integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==
-yoga-wasm-web@~0.3.2:
- version "0.3.2"
- resolved "https://registry.yarnpkg.com/yoga-wasm-web/-/yoga-wasm-web-0.3.2.tgz#8f3bb23ca959d92d86047d209853737eb99c7dda"
- integrity sha512-X//8P6RHzkO4E1ba/wXwKOybeArNDQJI2vwzFLJxz5bfT9K8fB798ZVYvq+Z+hjRA0Wy2iUlOUch4n2+ddqbDQ==
+yocto-queue@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-1.0.0.tgz#7f816433fb2cbc511ec8bf7d263c3b58a1a3c251"
+ integrity sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==
+
+yoga-layout@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/yoga-layout/-/yoga-layout-2.0.1.tgz#4bc686abe2464f977866650ddccc1dbcf9f0d03c"
+ integrity sha512-tT/oChyDXelLo2A+UVnlW9GU7CsvFMaEnd9kVFsaiCQonFAXd3xrHhkLYu+suwwosrAEQ746xBU+HvYtm1Zs2Q==