diff --git a/.all-contributorsrc b/.all-contributorsrc index 0340f41c92..3286d1be28 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -1,5 +1,5 @@ { - "projectName": "Ligo-Virgo", + "projectName": "toeverything", "projectOwner": "toeverything", "repoType": "github", "repoHost": "https://github.com", @@ -25,7 +25,7 @@ "login": "tzhangchi", "name": "Chi Zhang", "avatar_url": "https://avatars.githubusercontent.com/u/5910926?v=4", - "profile": "https://zhangchi.blog.csdn.net/", + "profile": "http://zhangchi.page/", "contributions": [ "code", "doc" @@ -33,7 +33,7 @@ }, { "login": "alt1o", - "name": "alt1o", + "name": "wang xinglong", "avatar_url": "https://avatars.githubusercontent.com/u/21084335?v=4", "profile": "https://github.com/alt1o", "contributions": [ @@ -43,7 +43,7 @@ }, { "login": "DiamondThree", - "name": "Diamond", + "name": "DiamondThree", "avatar_url": "https://avatars.githubusercontent.com/u/24630517?v=4", "profile": "https://github.com/DiamondThree", "contributions": [ @@ -63,7 +63,7 @@ }, { "login": "zuoxiaodong0815", - "name": "zuoxiaodong0815", + "name": "xiaodong zuo", "avatar_url": "https://avatars.githubusercontent.com/u/53252747?v=4", "profile": "https://github.com/zuoxiaodong0815", "contributions": [ @@ -73,7 +73,7 @@ }, { "login": "SaikaSakura", - "name": "SaikaSakura", + "name": "MingLIang Wang", "avatar_url": "https://avatars.githubusercontent.com/u/11530942?v=4", "profile": "https://github.com/SaikaSakura", "contributions": [ @@ -92,10 +92,10 @@ ] }, { - "login": "tuluffy", - "name": "tuluffy", - "avatar_url": "https://avatars.githubusercontent.com/u/26808339?v=4", - "profile": "https://tuluffy.github.io/angular.github.io/", + "login": "mitsuhatu", + "name": "mitsuhatu", + "avatar_url": "https://avatars.githubusercontent.com/u/110213079?v=4", + "profile": "https://github.com/mitsuhatu", "contributions": [ "code", "doc" diff --git a/.github/deployment/Caddyfile-affine b/.github/deployment/Caddyfile-affine new file mode 100644 index 0000000000..b6db6009e9 --- /dev/null +++ b/.github/deployment/Caddyfile-affine @@ -0,0 +1,28 @@ +:3000 { + root /* ./dist + + file_server { + precompressed br + } + + encode { + zstd + gzip 9 + } + + @notStatic { + not path /*.css + not path /*.js + not path /*.png + not path /*.jpg + not path /*.svg + not path /*.ttf + not path /*.eot + not path /*.woff + not path /*.woff2 + } + + handle @notStatic { + try_files {path} /index.html + } +} diff --git a/Caddyfile b/.github/deployment/Caddyfile-lisa similarity index 100% rename from Caddyfile rename to .github/deployment/Caddyfile-lisa diff --git a/Caddyfile-venus b/.github/deployment/Caddyfile-venus similarity index 100% rename from Caddyfile-venus rename to .github/deployment/Caddyfile-venus diff --git a/.github/deployment/Dockerfile-affine b/.github/deployment/Dockerfile-affine new file mode 100644 index 0000000000..46a46233f2 --- /dev/null +++ b/.github/deployment/Dockerfile-affine @@ -0,0 +1,21 @@ +FROM node:16-alpine as builder +WORKDIR /app +COPY . . +RUN apk add g++ make python3 git libpng-dev +RUN npm i -g pnpm@7 && pnpm i --frozen-lockfile --store=node_modules/.pnpm-store && pnpm run build:local + +FROM node:16-alpine as relocate +WORKDIR /app +COPY --from=builder /app/dist/apps/ligo-virgo ./dist +COPY --from=builder /app/.github/deployment/Caddyfile-affine ./Caddyfile +RUN rm ./dist/*.txt + +# ============= +# AFFiNE image +# ============= +FROM caddy:2.4.6-alpine as AFFiNE +WORKDIR /app +COPY --from=relocate /app . + +EXPOSE 3000 +CMD ["caddy", "run"] \ No newline at end of file diff --git a/Dockerfile-keck b/.github/deployment/Dockerfile-keck similarity index 93% rename from Dockerfile-keck rename to .github/deployment/Dockerfile-keck index 598fded0ab..7918e49427 100644 --- a/Dockerfile-keck +++ b/.github/deployment/Dockerfile-keck @@ -1,7 +1,7 @@ FROM node:16-alpine as builder WORKDIR /app COPY . . -RUN apk add g++ make python3 git +RUN apk add g++ make python3 git libpng-dev RUN npm i -g pnpm@7 && pnpm i --frozen-lockfile --store=node_modules/.pnpm-store && pnpm run build:keck FROM node:16-alpine as node_modules diff --git a/Dockerfile b/.github/deployment/Dockerfile-lisa similarity index 78% rename from Dockerfile rename to .github/deployment/Dockerfile-lisa index f6e2249faf..471e4d0d48 100644 --- a/Dockerfile +++ b/.github/deployment/Dockerfile-lisa @@ -1,13 +1,13 @@ FROM node:16-alpine as builder WORKDIR /app COPY . . -RUN apk add g++ make python3 git +RUN apk add g++ make python3 git libpng-dev RUN npm i -g pnpm@7 && pnpm i --frozen-lockfile --store=node_modules/.pnpm-store && pnpm run build FROM node:16-alpine as relocate WORKDIR /app COPY --from=builder /app/dist/apps/ligo-virgo ./dist -COPY --from=builder /app/Caddyfile ./ +COPY --from=builder /app/.github/deployment/Caddyfile-lisa ./Caddyfile RUN rm ./dist/*.txt # ============= diff --git a/Dockerfile-venus b/.github/deployment/Dockerfile-venus similarity index 78% rename from Dockerfile-venus rename to .github/deployment/Dockerfile-venus index 55ece303c6..585ade8a20 100644 --- a/Dockerfile-venus +++ b/.github/deployment/Dockerfile-venus @@ -1,13 +1,13 @@ FROM node:16-alpine as builder WORKDIR /app COPY . . -RUN apk add g++ make python3 git +RUN apk add g++ make python3 git libpng-dev RUN npm i -g pnpm@7 && pnpm i --frozen-lockfile --store=node_modules/.pnpm-store && pnpm run build:venus FROM node:16-alpine as relocate WORKDIR /app COPY --from=builder /app/dist/apps/venus ./dist -COPY --from=builder /app/Caddyfile-venus ./Caddyfile +COPY --from=builder /app/.github/deployment/Caddyfile-venus ./Caddyfile RUN rm ./dist/*.txt # ============= diff --git a/.github/workflows/affine.yml b/.github/workflows/affine.yml new file mode 100644 index 0000000000..28ca2d429b --- /dev/null +++ b/.github/workflows/affine.yml @@ -0,0 +1,57 @@ +name: Build AFFiNE-Local + +on: + push: + branches: [master] + pull_request: + branches: [master] + +# Cancels all previous workflow runs for pull requests that have not completed. +# See https://docs.github.com/en/actions/using-jobs/using-concurrency +concurrency: + # The concurrency group contains the workflow name and the branch name for + # pull requests or the commit hash for any other events. + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} + cancel-in-progress: true + +env: + REGISTRY: ghcr.io + NAMESPACE: toeverything + AFFINE_IMAGE_NAME: AFFiNE + IMAGE_TAG_LATEST: nightly-latest + +jobs: + ligo-virgo: + runs-on: self-hosted + environment: development + permissions: + contents: read + packages: write + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Log in to the Container registry + uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker (AFFiNE-Local) + id: meta_affine + uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 + with: + images: ${{ env.REGISTRY }}/${{ env.NAMESPACE }}/${{ env.AFFINE_IMAGE_NAME }} + tags: ${{ env.IMAGE_TAG_LATEST }} + + - name: Build and push Docker image (AFFINE-Local) + uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc + with: + context: . + file: ./.github/deployment/Dockerfile-affine + push: ${{ github.ref == 'refs/heads/master' && true || false }} + tags: ${{ steps.meta_affine.outputs.tags }} + labels: ${{ steps.meta_affine.outputs.labels }} + target: AFFiNE diff --git a/.github/workflows/keck.yml b/.github/workflows/keck.yml index d7b915c100..a09d790455 100644 --- a/.github/workflows/keck.yml +++ b/.github/workflows/keck.yml @@ -6,11 +6,13 @@ on: branches: [master] paths: - 'apps/keck/**' + - '.github/deployment' - '.github/workflows/keck.yml' pull_request: branches: [master] paths: - 'apps/keck/**' + - '.github/deployment' - '.github/workflows/keck.yml' # Cancels all previous workflow runs for pull requests that have not completed. @@ -60,7 +62,7 @@ jobs: uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc with: context: . - file: ./Dockerfile-keck + file: ./.github/deployment/Dockerfile-keck push: ${{ github.ref == 'refs/heads/field' && true || false }} tags: ${{ steps.meta_keck.outputs.tags }} labels: ${{ steps.meta_keck.outputs.labels }} diff --git a/.github/workflows/lisa.yml b/.github/workflows/lisa.yml index 878fad6274..ead4c8fff2 100644 --- a/.github/workflows/lisa.yml +++ b/.github/workflows/lisa.yml @@ -53,6 +53,7 @@ jobs: uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc with: context: . + file: ./.github/deployment/Dockerfile-lisa push: ${{ github.ref == 'refs/heads/master' && true || false }} tags: ${{ steps.meta_lisa.outputs.tags }} labels: ${{ steps.meta_lisa.outputs.labels }} diff --git a/.github/workflows/venus.yml b/.github/workflows/venus.yml index 59bf758cdc..8b8841404c 100644 --- a/.github/workflows/venus.yml +++ b/.github/workflows/venus.yml @@ -5,6 +5,7 @@ on: branches: [master] paths: - 'apps/venus/**' + - '.github/deployment' - '.github/workflows/venus.yml' pull_request: branches: [master] @@ -59,7 +60,7 @@ jobs: uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc with: context: . - file: ./Dockerfile-venus + file: ./.github/deployment/Dockerfile-venus push: ${{ github.ref == 'refs/heads/master' && true || false }} tags: ${{ steps.meta_venus.outputs.tags }} labels: ${{ steps.meta_venus.outputs.labels }} diff --git a/README.md b/README.md index 0fbcf5bf80..44c097948e 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Planning, Sorting and Creating all Together. Open-source, Privacy-First, and Fre @@ -38,21 +38,27 @@ See https://github.com/all-contributors/all-contributors/issues/361#issuecomment Telegram

-

affine_screen

+

affine_screen

# Stay Up-to-Date ![952cd7a5-70fe-48ab-b74f-23981d94d2c5](https://user-images.githubusercontent.com/79301703/182365526-df074c64-cee4-45f6-b8e0-b912f17332c6.gif) +# How to use + +If you have experience in front-end development, please [refer to here](https://affine.gitbook.io/affine/basic-documentation/contribute-to-affine); if you want to experience our latest version, please wait a moment, we will launch a web version in the near future + # Table of contents - [Stay Up-to-Date](#stay-up-to-date) +- [How to Use](#how-to-use) - [Table of contents](#table-of-contents) - [Shape your page](#shape-your-page) - [Plan your task](#plan-your-task) - [Sort your knowledge](#sort-your-knowledge) - [Create your story](#create-your-story) -- [Getting Started with development](#getting-started-with-development) +- [Documentation](#documentation) + - [Getting Started with development](#getting-started-with-development) - [Roadmap](#roadmap) - [Releases](#releases) - [Feature requests](#feature-requests) @@ -60,6 +66,7 @@ See https://github.com/all-contributors/all-contributors/issues/361#issuecomment - [The Philosophy of AFFiNE](#the-philosophy-of-affine) - [Community](#community) - [Contributors](#contributors) +- [Acknowledgments](#acknowledgments) - [License](#license) ## Shape your page @@ -80,9 +87,13 @@ We want your data always to be yours, and we don't want to make any sacrifice to Collaboration isn't only necessary for teams -- you may take and insert pics on your phone, then edit them on your desktop, and share them with your collaborators. Affine is fully built with web technologies so that consistency and accessibility are always guaranteed on Mac, Windows and Linux. The local file system support will be available when version 0.0.1beta is released. -# Getting Started with development +# Documentation -Please view the [documentation](https://affine.gitbook.io/affine/) in Contribute-to-AFFiNE/Software-Contributions/Environment-setup. +Please view the [documentation](https://affine.gitbook.io/affine/) + +## Getting Started with development + +Please view the path Contribute-to-AFFiNE/Software-Contributions/Quick-Start in documentation. # Roadmap @@ -134,9 +145,17 @@ We would like to give special thanks to the innovators and pioneers who greatly We would also like to give thanks to open-source projects that make affine possible: -- Yjs & Yrs -- React -- Rust +- [Yjs](https://github.com/yjs/yjs) & [Yrs](https://github.com/y-crdt/y-crdt) -- Fundamental support of CRDTs for our implements on state management and data sync. +- [React](https://github.com/facebook/react) -- View layer support and web GUI framework. +- [Rust](https://github.com/rust-lang/rust) -- High performance language that extends the ability and availability of our real-time backend, JWST. +- [Fossil](https://www2.fossil-scm.org/home/doc/trunk/www/index.wiki) -- Source code management tool made with CRDTs which inspired our design on block data structure. +- [slatejs](https://github.com/ianstormtaylor/slate) -- Customizable rich-text editor. +- [Jotai](https://github.com/pmndrs/jotai) -- Minimal state management tool for frontend. +- [Tldraw](https://github.com/tldraw/tldraw) -- Excellent drawing board. +- [MUI](https://github.com/mui/material-ui) -- Our most used graphic UI component library. +- Other [dependancies](https://github.com/toeverything/AFFiNE/network/dependencies) + +Thanks a lot to the community for providing such powerful and simple libraries, so that we can focus more on the implementation of the product logic, and we hope that in the future our projects will also provide a more easy-to-use knowledge base for everyone. # Community @@ -152,16 +171,16 @@ For help, discussion about best practices, or any other conversation that would - - - + + + - - + + - + diff --git a/apps/ligo-virgo/src/pages/workspace/docs/Page.tsx b/apps/ligo-virgo/src/pages/workspace/docs/Page.tsx index b2ebc5f7dc..bdba3722fe 100644 --- a/apps/ligo-virgo/src/pages/workspace/docs/Page.tsx +++ b/apps/ligo-virgo/src/pages/workspace/docs/Page.tsx @@ -1,16 +1,9 @@ /* eslint-disable filename-rules/match */ -import { - useEffect, - useRef, - type UIEvent, - useState, - useLayoutEffect, -} from 'react'; +import { useEffect, useRef, type UIEvent, useState } from 'react'; import { useParams } from 'react-router'; import { MuiBox as Box, MuiCircularProgress as CircularProgress, - MuiDivider as Divider, styled, } from '@toeverything/components/ui'; import { AffineEditor } from '@toeverything/components/affine-editor'; @@ -31,7 +24,7 @@ import { WorkspaceName } from './workspace-name'; import { CollapsiblePageTree } from './collapsible-page-tree'; import { useFlag } from '@toeverything/datasource/feature-flags'; import { type BlockEditor } from '@toeverything/components/editor-core'; - +import { Tabs } from './components/tabs'; type PageProps = { workspace: string; }; @@ -54,11 +47,11 @@ export function Page(props: PageProps) { } ); - // await services.api.userConfig.addRecentPage( - // props.workspace, - // user.id, - // page_id - // ); + await services.api.userConfig.addRecentPage( + props.workspace, + user.id, + page_id + ); await services.api.editorBlock.clearUndoRedo(props.workspace); }; updateRecentPages(); @@ -80,7 +73,9 @@ export function Page(props: PageProps) { onMouseLeave={() => setSpaceSidebarVisible(false)} > - + + +
{dailyNotesFlag && ( @@ -92,14 +87,14 @@ export function Page(props: PageProps) { )}
- + {page_id ? : null}
@@ -146,7 +141,7 @@ const EditorContainer = ({ obv.observe(scrollContainerRef.current); return () => obv.disconnect(); } - }); + }, [setPageClientWidth]); return (
- + diff --git a/libs/components/editor-blocks/src/blocks/code/CodeView.tsx b/libs/components/editor-blocks/src/blocks/code/CodeView.tsx index 3a729e51f0..3b64cc3b1a 100644 --- a/libs/components/editor-blocks/src/blocks/code/CodeView.tsx +++ b/libs/components/editor-blocks/src/blocks/code/CodeView.tsx @@ -50,7 +50,7 @@ import { Option, Select } from '@toeverything/components/ui'; import { useOnSelect, - WrapperWithPendantAndDragDrop, + BlockPendantProvider, } from '@toeverything/components/editor-core'; import { copyToClipboard } from '@toeverything/utils'; interface CreateCodeView extends CreateView { @@ -163,7 +163,7 @@ export const CodeView: FC = ({ block, editor }) => { editor.selectionManager.activePreviousNode(block.id, 'start'); }; return ( - + { e.stopPropagation(); @@ -222,6 +222,6 @@ export const CodeView: FC = ({ block, editor }) => { handleKeyArrowUp={handleKeyArrowUp} /> - + ); }; diff --git a/libs/components/editor-blocks/src/blocks/embed-link/EmbedLinkView.tsx b/libs/components/editor-blocks/src/blocks/embed-link/EmbedLinkView.tsx index ac073abdb0..da33c2be4a 100644 --- a/libs/components/editor-blocks/src/blocks/embed-link/EmbedLinkView.tsx +++ b/libs/components/editor-blocks/src/blocks/embed-link/EmbedLinkView.tsx @@ -1,7 +1,7 @@ import { FC, useState } from 'react'; import { CreateView } from '@toeverything/framework/virgo'; import { - WrapperWithPendantAndDragDrop, + BlockPendantProvider, useOnSelect, } from '@toeverything/components/editor-core'; import { Upload } from '../../components/upload/upload'; @@ -33,7 +33,7 @@ export const EmbedLinkView: FC = props => { }; return ( - + {embedLinkUrl ? ( = props => { /> )} - + ); }; diff --git a/libs/components/editor-blocks/src/blocks/figma/FigmaView.tsx b/libs/components/editor-blocks/src/blocks/figma/FigmaView.tsx index 1dbaef3e11..2d12315235 100644 --- a/libs/components/editor-blocks/src/blocks/figma/FigmaView.tsx +++ b/libs/components/editor-blocks/src/blocks/figma/FigmaView.tsx @@ -2,7 +2,7 @@ import { FC, useState } from 'react'; import { CreateView } from '@toeverything/framework/virgo'; import { useOnSelect, - WrapperWithPendantAndDragDrop, + BlockPendantProvider, } from '@toeverything/components/editor-core'; import { Upload } from '../../components/upload/upload'; import { SourceView } from '../../components/source-view'; @@ -30,7 +30,7 @@ export const FigmaView: FC = ({ block, editor }) => { setIsSelect(isSelect); }); return ( - + {figmaUrl ? ( = ({ block, editor }) => { /> )} - + ); }; diff --git a/libs/components/editor-blocks/src/blocks/group/GroupView.tsx b/libs/components/editor-blocks/src/blocks/group/GroupView.tsx index 694fe7820f..193a97f076 100644 --- a/libs/components/editor-blocks/src/blocks/group/GroupView.tsx +++ b/libs/components/editor-blocks/src/blocks/group/GroupView.tsx @@ -60,7 +60,7 @@ const GroupContainer = styled('div')<{ isSelect?: boolean }>( ({ isSelect, theme }) => ({ background: theme.affine.palette.white, border: '2px solid rgba(236,241,251,.5)', - padding: '15px 12px', + padding: `15px 16px 0 16px`, borderRadius: '10px', ...(isSelect ? { @@ -69,7 +69,7 @@ const GroupContainer = styled('div')<{ isSelect?: boolean }>( } : { '&:hover': { - boxShadow: '0px 1px 10px rgb(152 172 189 / 60%)', + boxShadow: theme.affine.shadows.shadow1, }, }), }) diff --git a/libs/components/editor-blocks/src/blocks/group/components/Panel.tsx b/libs/components/editor-blocks/src/blocks/group/components/Panel.tsx index e8faba84a1..d6d4b79f02 100644 --- a/libs/components/editor-blocks/src/blocks/group/components/Panel.tsx +++ b/libs/components/editor-blocks/src/blocks/group/components/Panel.tsx @@ -2,11 +2,11 @@ import { styled } from '@toeverything/components/ui'; import type { ComponentPropsWithRef, MouseEvent } from 'react'; import { forwardRef } from 'react'; -const StyledPanel = styled('div')(() => ({ +const StyledPanel = styled('div')(({ theme }) => ({ position: 'absolute', top: 50, background: '#FFFFFF', - boxShadow: '0px 1px 10px rgba(152, 172, 189, 0.6)', + boxShadow: theme.affine.shadows.shadow1, borderRadius: 10, padding: '12px 24px', })); diff --git a/libs/components/editor-blocks/src/blocks/group/scene-kanban/CardContainer.tsx b/libs/components/editor-blocks/src/blocks/group/scene-kanban/CardContainer.tsx index 3616c0d206..cd71b72666 100644 --- a/libs/components/editor-blocks/src/blocks/group/scene-kanban/CardContainer.tsx +++ b/libs/components/editor-blocks/src/blocks/group/scene-kanban/CardContainer.tsx @@ -41,6 +41,7 @@ const getKanbanColor = ( return DEFAULT_COLOR; } if ( + group.type === PropertyType.Status || group.type === PropertyType.Select || group.type === PropertyType.MultiSelect || group.type === DEFAULT_GROUP_ID diff --git a/libs/components/editor-blocks/src/blocks/image/ImageView.tsx b/libs/components/editor-blocks/src/blocks/image/ImageView.tsx index 36b446d790..dd07a1058a 100644 --- a/libs/components/editor-blocks/src/blocks/image/ImageView.tsx +++ b/libs/components/editor-blocks/src/blocks/image/ImageView.tsx @@ -1,7 +1,7 @@ import { useCurrentView, useOnSelect, - WrapperWithPendantAndDragDrop, + BlockPendantProvider, } from '@toeverything/components/editor-core'; import { styled } from '@toeverything/components/ui'; import { services } from '@toeverything/datasource/db-service'; @@ -158,7 +158,7 @@ export const ImageView: FC = ({ block, editor }) => { }; return ( - +
{imgUrl ? ( @@ -229,6 +229,6 @@ export const ImageView: FC = ({ block, editor }) => {
*/}
-
+ ); }; diff --git a/libs/components/editor-blocks/src/blocks/numbered/NumberedView.tsx b/libs/components/editor-blocks/src/blocks/numbered/NumberedView.tsx index 514ce335f6..2f8f29b706 100644 --- a/libs/components/editor-blocks/src/blocks/numbered/NumberedView.tsx +++ b/libs/components/editor-blocks/src/blocks/numbered/NumberedView.tsx @@ -19,9 +19,8 @@ import { supportChildren, RenderBlockChildren, useOnSelect, - WrapperWithPendantAndDragDrop, + BlockPendantProvider, } from '@toeverything/components/editor-core'; -import { styled } from '@toeverything/components/ui'; import { List } from '../../components/style-container'; import { BlockContainer } from '../../components/BlockContainer'; @@ -185,7 +184,7 @@ export const NumberedView: FC = ({ block, editor }) => { return ( - +
{getNumber(properties.numberType, number)}. @@ -203,7 +202,7 @@ export const NumberedView: FC = ({ block, editor }) => { />
-
+ diff --git a/libs/components/editor-blocks/src/blocks/text/TextView.tsx b/libs/components/editor-blocks/src/blocks/text/TextView.tsx index ced1a8745d..66c6360633 100644 --- a/libs/components/editor-blocks/src/blocks/text/TextView.tsx +++ b/libs/components/editor-blocks/src/blocks/text/TextView.tsx @@ -8,7 +8,7 @@ import { supportChildren, unwrapGroup, useOnSelect, - WrapperWithPendantAndDragDrop, + BlockPendantProvider, } from '@toeverything/components/editor-core'; import { styled } from '@toeverything/components/ui'; import { Protocol } from '@toeverything/datasource/db-service'; @@ -231,7 +231,7 @@ export const TextView: FC = ({ selected={isSelect} className={containerClassName} > - + = ({ handleConvert={handleConvert} handleTab={onTab} /> - + diff --git a/libs/components/editor-blocks/src/utils/WithTreeViewChildren.tsx b/libs/components/editor-blocks/src/utils/WithTreeViewChildren.tsx index e30e275bda..f2b2b3652d 100644 --- a/libs/components/editor-blocks/src/utils/WithTreeViewChildren.tsx +++ b/libs/components/editor-blocks/src/utils/WithTreeViewChildren.tsx @@ -3,7 +3,7 @@ import { RenderBlock, useCurrentView, useOnSelect, - WrapperWithPendantAndDragDrop, + BlockPendantProvider, } from '@toeverything/components/editor-core'; import { styled } from '@toeverything/components/ui'; import type { @@ -13,7 +13,6 @@ import type { ReactElement, } from 'react'; import { forwardRef, useState } from 'react'; -import style9 from 'style9'; import { SCENE_CONFIG } from '../blocks/group/config'; import { BlockContainer } from '../components/BlockContainer'; @@ -30,29 +29,15 @@ const TreeView = forwardRef< { lastItem?: boolean } & ComponentPropsWithRef<'div'> >(({ lastItem, children, onClick, ...restProps }, ref) => { return ( -
-
-
-
- {lastItem &&
} -
+ + + + + {lastItem && } + {/* maybe need a child wrapper */} {children} -
+ ); }); @@ -71,10 +56,7 @@ const ChildrenView = ({ const isKanbanScene = currentView.type === SCENE_CONFIG.KANBAN; return ( -
+ {childrenIds.map((childId, idx) => { if (isKanbanScene) { return ( @@ -94,7 +76,7 @@ const ChildrenView = ({ ); })} -
+ ); }; @@ -104,9 +86,7 @@ const CollapsedNode = forwardRef< >((props, ref) => { return ( -
- ··· -
+ ···
); }); @@ -146,11 +126,11 @@ export const withTreeViewChildren = ( editor={props.editor} block={block} selected={isSelect} - className={styles('wrapper')} + className={Wrapper.toString()} > - -
{creator(props)}
-
+ +
{creator(props)}
+
{collapsed && ( (({ last }) => ({ + width: '1px', + height: last ? ITEM_POINT_HEIGHT : '100%', + paddingTop: 0, + paddingBottom: 0, + transform: 'translate(-50%, 0)', - lastItemHorizontalLine: { - opacity: 0, - }, - lastItemVerticalLine: { - height: itemPointHeight, - opacity: 0, - }, - lastItemRadius: { - boxSizing: 'content-box', - position: 'absolute', - left: '-0.5px', - top: 0, - height: itemPointHeight, - bottom: '50%', - width: '16px', - borderWidth: '1px', - borderStyle: 'solid', - borderLeftColor: treeColor, - borderBottomColor: treeColor, - borderTop: 'none', - borderRight: 'none', - borderRadius: '0 0 0 3px', - pointerEvents: 'none', - }, + opacity: last ? 0 : 'unset', +})); - collapsed: { - cursor: 'pointer', - display: 'inline-block', - color: '#B9CAD5', - }, +const HorizontalLine = styled(Line)<{ last: boolean }>(({ last }) => ({ + width: '16px', + height: '1px', + paddingLeft: 0, + paddingRight: 0, + top: ITEM_POINT_HEIGHT, + transform: 'translate(0, -50%)', + opacity: last ? 0 : 'unset', +})); + +const Collapsed = styled('div')({ + cursor: 'pointer', + display: 'inline-block', + color: '#B9CAD5', +}); + +const LastItemRadius = styled('div')({ + boxSizing: 'content-box', + position: 'absolute', + left: '-0.5px', + top: 0, + height: ITEM_POINT_HEIGHT, + bottom: '50%', + width: '16px', + borderWidth: '1px', + borderStyle: 'solid', + borderLeftColor: TREE_COLOR, + borderBottomColor: TREE_COLOR, + borderTop: 'none', + borderRight: 'none', + borderRadius: '0 0 0 3px', + pointerEvents: 'none', }); const StyledBorder = styled('div')({ diff --git a/libs/components/editor-core/src/block-content-wrapper/BlockContentWrapper.tsx b/libs/components/editor-core/src/block-content-wrapper/BlockContentWrapper.tsx deleted file mode 100644 index 792b1a8455..0000000000 --- a/libs/components/editor-core/src/block-content-wrapper/BlockContentWrapper.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { AsyncBlock, BlockEditor } from '../editor'; -import type { FC, ReactElement } from 'react'; -import { BlockPendantProvider } from '../block-pendant'; -import { DragDropWrapper } from '../drag-drop-wrapper'; - -type BlockContentWrapperProps = { - block: AsyncBlock; - editor: BlockEditor; - children: ReactElement | null; -}; - -export const WrapperWithPendantAndDragDrop: FC = - function ({ block, children, editor }) { - return ( - - - {children} - - - ); - }; diff --git a/libs/components/editor-core/src/block-content-wrapper/index.ts b/libs/components/editor-core/src/block-content-wrapper/index.ts deleted file mode 100644 index 80c770d496..0000000000 --- a/libs/components/editor-core/src/block-content-wrapper/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './BlockContentWrapper'; diff --git a/libs/components/editor-core/src/block-pendant/BlockPendantProvider.tsx b/libs/components/editor-core/src/block-pendant/BlockPendantProvider.tsx index 877c4e451a..66cf4001a0 100644 --- a/libs/components/editor-core/src/block-pendant/BlockPendantProvider.tsx +++ b/libs/components/editor-core/src/block-pendant/BlockPendantProvider.tsx @@ -1,5 +1,4 @@ import type { FC, PropsWithChildren } from 'react'; -import React, { useState } from 'react'; import { styled } from '@toeverything/components/ui'; import type { AsyncBlock } from '../editor'; import { PendantPopover } from './pendant-popover'; @@ -11,74 +10,68 @@ interface BlockTagProps { block: AsyncBlock; } -/** - * @deprecated Need to be refactored - */ export const BlockPendantProvider: FC> = ({ block, children, }) => { - const [container, setContainer] = useState(null); - const [isHover, setIsHover] = useState(false); return ( - setContainer(dom)}> + {children} - {container && ( - { - setIsHover(visible); - }} - > - - - )} + + + + + ); }; -const Container = styled('div')({ +export const LINE_GAP = 16; +const TAG_GAP = 4; + +const StyledTriggerLine = styled('div')({ + padding: `${TAG_GAP}px 0`, + width: '100px', + cursor: 'default', + display: 'flex', + alignItems: 'flex-end', position: 'relative', - padding: '4px', - '&:hover .triggerLine::before': { - display: 'flex', + + '::before': { + content: "''", + width: '100%', + height: '2px', + background: '#dadada', + display: 'none', + position: 'absolute', + left: '0', + top: '4px', + }, + '::after': { + content: "''", + width: '0', + height: '2px', + background: '#aac4d5', + display: 'block', + position: 'absolute', + left: '0', + top: '4px', + transition: 'width .3s', }, }); -const StyledTriggerLine = styled('div')<{ isHover: boolean }>(({ isHover }) => { - return { - padding: '4px 0', - width: '100px', - cursor: 'default', - display: 'flex', - alignItems: 'flex-end', - position: 'relative', - - '::before': { - content: "''", - width: '100%', - height: '2px', - background: '#dadada', - display: 'none', - position: 'absolute', - left: '0', - top: '4px', +const Container = styled('div')({ + position: 'relative', + paddingBottom: `${LINE_GAP - TAG_GAP * 2}px`, + '&:hover': { + [StyledTriggerLine.toString()]: { + '&::before': { + display: 'flex', + }, + '&::after': { + width: '100%', + }, }, - '::after': { - content: "''", - width: isHover ? '100%' : '0', - height: '2px', - background: '#aac4d5', - display: 'block', - position: 'absolute', - left: '0', - top: '4px', - transition: 'width .3s', - }, - }; + }, }); diff --git a/libs/components/editor-core/src/block-pendant/pendant-history-panel/PendantHistoryPanel.tsx b/libs/components/editor-core/src/block-pendant/pendant-history-panel/PendantHistoryPanel.tsx index 5fdd24788c..0f610301df 100644 --- a/libs/components/editor-core/src/block-pendant/pendant-history-panel/PendantHistoryPanel.tsx +++ b/libs/components/editor-core/src/block-pendant/pendant-history-panel/PendantHistoryPanel.tsx @@ -1,5 +1,4 @@ import React, { ReactNode, useRef, useEffect, useState } from 'react'; -import { getPendantHistory } from '../utils'; import { getRecastItemValue, RecastMetaProperty, @@ -30,22 +29,22 @@ export const PendantHistoryPanel = ({ const [history, setHistory] = useState([]); const popoverHandlerRef = useRef<{ [key: string]: PopperHandler }>({}); + const { getValueHistory } = getRecastItemValue(block); useEffect(() => { const init = async () => { const currentBlockValues = getRecastItemValue(block).getAllValue(); - const allProperties = getProperties(); - const missProperties = allProperties.filter( + const missValues = getProperties().filter( property => !currentBlockValues.find(v => v.id === property.id) ); - const pendantHistory = getPendantHistory({ + const valueHistory = getValueHistory({ recastBlockId: recastBlock.id, }); - const historyMap = missProperties.reduce<{ - [key: RecastPropertyId]: string; + const historyMap = missValues.reduce<{ + [key: RecastPropertyId]: string[]; }>((history, property) => { - if (pendantHistory[property.id]) { - history[property.id] = pendantHistory[property.id]; + if (valueHistory[property.id]) { + history[property.id] = valueHistory[property.id]; } return history; @@ -54,18 +53,30 @@ export const PendantHistoryPanel = ({ const blockHistory = ( await Promise.all( Object.entries(historyMap).map( - async ([propertyId, blockId]) => { - const latestValueBlock = ( - await groupBlock.children() - ).find((block: AsyncBlock) => block.id === blockId); + async ([propertyId, blockIds]) => { + const blocks = await groupBlock.children(); + const latestChangeBlock = blockIds + .reverse() + .reduce((block, id) => { + if (!block) { + return blocks.find( + block => block.id === id + ); + } + return block; + }, null); - return getRecastItemValue( - latestValueBlock - ).getValue(propertyId as RecastPropertyId); + if (latestChangeBlock) { + return getRecastItemValue( + latestChangeBlock + ).getValue(propertyId as RecastPropertyId); + } + return null; } ) ) ).filter(v => v); + setHistory(blockHistory); }; diff --git a/libs/components/editor-core/src/block-pendant/pendant-modify-panel/Information.tsx b/libs/components/editor-core/src/block-pendant/pendant-modify-panel/Information.tsx index afd5bc5525..a8929f9e6b 100644 --- a/libs/components/editor-core/src/block-pendant/pendant-modify-panel/Information.tsx +++ b/libs/components/editor-core/src/block-pendant/pendant-modify-panel/Information.tsx @@ -4,7 +4,7 @@ import { ModifyPanelContentProps } from './types'; import { StyledDivider, StyledPopoverSubTitle } from '../StyledComponent'; import { BasicSelect } from './Select'; import { InformationProperty, InformationValue } from '../../recast-block'; -import { genInitialOptions, getPendantIconsConfigByName } from '../utils'; +import { generateInitialOptions, getPendantIconsConfigByName } from '../utils'; export default (props: ModifyPanelContentProps) => { const { onPropertyChange, onValueChange, initialValue, property } = props; @@ -38,7 +38,7 @@ export default (props: ModifyPanelContentProps) => { }} initialOptions={ propProperty?.emailOptions || - genInitialOptions( + generateInitialOptions( property?.type, getPendantIconsConfigByName('Email') ) @@ -66,7 +66,7 @@ export default (props: ModifyPanelContentProps) => { }} initialOptions={ propProperty?.phoneOptions || - genInitialOptions( + generateInitialOptions( property?.type, getPendantIconsConfigByName('Phone') ) @@ -94,7 +94,7 @@ export default (props: ModifyPanelContentProps) => { }} initialOptions={ propProperty?.locationOptions || - genInitialOptions( + generateInitialOptions( property?.type, getPendantIconsConfigByName('Location') ) diff --git a/libs/components/editor-core/src/block-pendant/pendant-modify-panel/Mention.tsx b/libs/components/editor-core/src/block-pendant/pendant-modify-panel/Mention.tsx index 0b741ecbdc..8ce2bab003 100644 --- a/libs/components/editor-core/src/block-pendant/pendant-modify-panel/Mention.tsx +++ b/libs/components/editor-core/src/block-pendant/pendant-modify-panel/Mention.tsx @@ -18,7 +18,9 @@ export default ({ user: { username, nickname, photo }, } = useUserAndSpaces(); - const [selectedValue, setSelectedValue] = useState(initialValue?.value); + const [selectedValue, setSelectedValue] = useState( + initialValue?.value || '' + ); const [focus, setFocus] = useState(false); const theme = useTheme(); return ( diff --git a/libs/components/editor-core/src/block-pendant/pendant-modify-panel/Select.tsx b/libs/components/editor-core/src/block-pendant/pendant-modify-panel/Select.tsx index 6d0d1f26f9..b016437ac8 100644 --- a/libs/components/editor-core/src/block-pendant/pendant-modify-panel/Select.tsx +++ b/libs/components/editor-core/src/block-pendant/pendant-modify-panel/Select.tsx @@ -21,7 +21,7 @@ import { } from '@toeverything/components/ui'; import { HighLightIconInput } from './IconInput'; import { PendantConfig, IconNames, OptionIdType, OptionType } from '../types'; -import { genBasicOption } from '../utils'; +import { generateBasicOption } from '../utils'; type OptionItemType = { option: OptionType; @@ -66,7 +66,7 @@ export const BasicSelect = ({ const [selectIds, setSelectIds] = useState(initialValue); const insertOption = (insertId: OptionIdType) => { - const newOption = genBasicOption({ + const newOption = generateBasicOption({ index: options.length + 1, iconConfig, }); diff --git a/libs/components/editor-core/src/block-pendant/pendant-operation-panel/CreatePendantPanel.tsx b/libs/components/editor-core/src/block-pendant/pendant-operation-panel/CreatePendantPanel.tsx index b9d29cebe7..b09f23ed35 100644 --- a/libs/components/editor-core/src/block-pendant/pendant-operation-panel/CreatePendantPanel.tsx +++ b/libs/components/editor-core/src/block-pendant/pendant-operation-panel/CreatePendantPanel.tsx @@ -1,5 +1,4 @@ import React, { useState, useEffect } from 'react'; -import { nanoid } from 'nanoid'; import { Input, Option, Select, Tooltip } from '@toeverything/components/ui'; import { HelpCenterIcon } from '@toeverything/components/icons'; import { AsyncBlock } from '../../editor'; @@ -15,13 +14,13 @@ import { StyledPopoverSubTitle, StyledPopoverWrapper, } from '../StyledComponent'; -import { genInitialOptions, getPendantConfigByType } from '../utils'; +import { + generateRandomFieldName, + generateInitialOptions, + getPendantConfigByType, +} from '../utils'; import { useOnCreateSure } from './hooks'; -const upperFirst = (str: string) => { - return `${str[0].toUpperCase()}${str.slice(1)}`; -}; - export const CreatePendantPanel = ({ block, onSure, @@ -35,7 +34,7 @@ export const CreatePendantPanel = ({ useEffect(() => { selectedOption && - setFieldName(upperFirst(`${selectedOption.type}#${nanoid(4)}`)); + setFieldName(generateRandomFieldName(selectedOption.type)); }, [selectedOption]); return ( @@ -45,7 +44,7 @@ export const CreatePendantPanel = ({ set_search(e.target.value)} /> - @@ -119,8 +99,30 @@ export const Search = (props: SearchProps) => { }} /> ))} - + ); }; + +const SearchInput = styled('input')(({ theme }) => ({ + margin: '0.5em', + backgroundColor: 'white', + boxShadow: theme.affine.shadows.shadow1, + padding: '16px 32px', + borderRadius: '10px', +})); + +const ResultContainer = styled(MuiBox)(({ theme }) => ({ + margin: '0.5em', + backgroundColor: 'white', + boxShadow: theme.affine.shadows.shadow1, + padding: '16px 32px', + borderRadius: '10px', + transitionProperty: 'max-height', + transitionDuration: '300ms', + transitionTimingFunction: 'cubic-bezier(0.4, 0, 0.2, 1)', + transitionDelay: '0ms', + overflowX: 'hidden', + overflowY: 'hidden', +})); diff --git a/libs/components/layout/src/header/EditorBoardSwitcher/StatusIcon.tsx b/libs/components/layout/src/header/EditorBoardSwitcher/StatusIcon.tsx index ada3a92f57..a30e17f913 100644 --- a/libs/components/layout/src/header/EditorBoardSwitcher/StatusIcon.tsx +++ b/libs/components/layout/src/header/EditorBoardSwitcher/StatusIcon.tsx @@ -20,7 +20,7 @@ const IconWrapper = styled('div')>( width: '20px', height: '20px', borderRadius: '5px', - boxShadow: '0px 1px 10px rgba(152, 172, 189, 0.6)', + boxShadow: theme.affine.shadows.shadow1, color: theme.affine.palette.primary, cursor: 'pointer', backgroundColor: theme.affine.palette.white, diff --git a/libs/components/layout/src/settings-sidebar/Comments/CommentItem.tsx b/libs/components/layout/src/settings-sidebar/Comments/CommentItem.tsx index 8ebc4baf24..2ac99e7185 100644 --- a/libs/components/layout/src/settings-sidebar/Comments/CommentItem.tsx +++ b/libs/components/layout/src/settings-sidebar/Comments/CommentItem.tsx @@ -94,7 +94,7 @@ const StyledContainerForCommentItem = styled('div', { transition: 'left 150ms ease-in-out', backgroundColor: theme.affine.palette.white, '&:hover': { - boxShadow: theme.affine.shadows.shadowSxDownLg, + boxShadow: theme.affine.shadows.shadow1, }, }; }); diff --git a/libs/components/layout/src/workspace-sidebar/activities/activities.tsx b/libs/components/layout/src/workspace-sidebar/activities/activities.tsx index b0527c5e42..4e5a9de413 100644 --- a/libs/components/layout/src/workspace-sidebar/activities/activities.tsx +++ b/libs/components/layout/src/workspace-sidebar/activities/activities.tsx @@ -12,17 +12,22 @@ import { useNavigate } from 'react-router'; import { formatDistanceToNow } from 'date-fns'; const StyledWrapper = styled('div')({ - margin: '0 16px 0 32px', + paddingLeft: '12px', span: { textOverflow: 'ellipsis', overflow: 'hidden', }, '.item': { + height: '32px', display: 'flex', alignItems: 'center', - ustifyContent: 'space-between', - padding: '7px 0px', + justifyContent: 'space-between', + paddingRight: '20px', whiteSpace: 'nowrap', + '&:hover': { + background: '#f5f7f8', + borderRadius: '5px', + }, }, '.itemButton': { padding: 0, @@ -31,6 +36,7 @@ const StyledWrapper = styled('div')({ '.itemLeft': { color: '#4c6275', marginRight: '20px', + cursor: 'pointer', span: { fontSize: 14, }, @@ -44,6 +50,14 @@ const StyledWrapper = styled('div')({ }, }); +const StyledItemContent = styled('div')({ + width: '100%', + height: '32px', + display: 'flex', + alignItems: 'center', + justifyContent: 'space-between', +}); + export const Activities = () => { const navigate = useNavigate(); const { user, currentSpaceId } = useUserAndSpaces(); @@ -51,34 +65,29 @@ export const Activities = () => { const userId = user?.id; /* temporarily remove:show recently viewed documents */ - // const fetchRecentPages = useCallback(async () => { - // if (!userId || !currentSpaceId) { - // return; - // } - // const recent_pages = await services.api.userConfig.getRecentPages( - // currentSpaceId, - // userId - // ); - // setRecentPages(recent_pages); - // }, [userId, currentSpaceId]); + const fetchRecentPages = useCallback(async () => { + if (!userId || !currentSpaceId) { + return; + } + const recent_pages = await services.api.userConfig.getRecentPages( + currentSpaceId, + userId + ); + setRecentPages(recent_pages); + }, [userId, currentSpaceId]); - // useEffect(() => { - // (async () => { - // await fetchRecentPages(); - // })(); - // }, [fetchRecentPages]); - - /* show recently edit documents */ - const getRecentEditPages = async (state, block) => { - console.log(state, await block.children()); - }; + useEffect(() => { + (async () => { + await fetchRecentPages(); + })(); + }, [fetchRecentPages]); useEffect(() => { let unobserve: () => void; const observe = async () => { unobserve = await services.api.userConfig.observe( { workspace: currentSpaceId }, - getRecentEditPages + fetchRecentPages ); }; observe(); @@ -86,16 +95,15 @@ export const Activities = () => { return () => { unobserve?.(); }; - }, [currentSpaceId, getRecentEditPages]); + }, [currentSpaceId, fetchRecentPages]); return ( - + {recentPages.map(({ id, title, lastOpenTime }) => { return ( - { navigate(`/${currentSpaceId}/${id}`); }} @@ -110,7 +118,7 @@ export const Activities = () => { includeSeconds: true, })} /> - + ); })} diff --git a/libs/components/layout/src/workspace-sidebar/page-tree/DndTree.tsx b/libs/components/layout/src/workspace-sidebar/page-tree/DndTree.tsx index 0c58d60fb0..57d7643bba 100755 --- a/libs/components/layout/src/workspace-sidebar/page-tree/DndTree.tsx +++ b/libs/components/layout/src/workspace-sidebar/page-tree/DndTree.tsx @@ -44,7 +44,7 @@ export type DndTreeProps = { */ export function DndTree(props: DndTreeProps) { const { - indentationWidth = 16, + indentationWidth = 12, collapsible, removable, showDragIndicator, diff --git a/libs/components/layout/src/workspace-sidebar/page-tree/tree-item/TreeItem.tsx b/libs/components/layout/src/workspace-sidebar/page-tree/tree-item/TreeItem.tsx index a524dff76e..96c14522fc 100755 --- a/libs/components/layout/src/workspace-sidebar/page-tree/tree-item/TreeItem.tsx +++ b/libs/components/layout/src/workspace-sidebar/page-tree/tree-item/TreeItem.tsx @@ -101,9 +101,6 @@ export const TreeItem = forwardRef( ))} - {/**/} - {/* */} - {/**/}
* { @@ -69,7 +72,6 @@ box-sizing: border-box; display: flex; align-items: center; - background-color: #fff; color: #4c6275; } @@ -81,7 +83,6 @@ display: flex; align-items: center; justify-content: space-around; - background-color: #fff; color: #4c6275; padding-right: 0.5rem; overflow: hidden; @@ -96,11 +97,6 @@ display: block; } } - - &:hover { - background: #f5f7f8; - border-radius: 5px; - } } .Text { @@ -167,14 +163,6 @@ background-color: transparent; -webkit-tap-highlight-color: transparent; - &:hover { - background-color: var(--action-background, rgba(0, 0, 0, 0.05)); - - svg { - fill: #6f7b88; - } - } - svg { flex: 0 0 auto; margin: auto; diff --git a/libs/components/ui/src/cascader/Cascader.tsx b/libs/components/ui/src/cascader/Cascader.tsx index 5ff6fe608d..ef486e5029 100644 --- a/libs/components/ui/src/cascader/Cascader.tsx +++ b/libs/components/ui/src/cascader/Cascader.tsx @@ -133,7 +133,7 @@ export function Cascader(props: CascaderProps) { const MenuPaper = styled('div')(({ theme }) => ({ fontFamily: 'PingFang SC', background: '#FFF', - boxShadow: '0px 1px 10px rgba(152, 172, 189, 0.6)', + boxShadow: theme.affine.shadows.shadow1, borderRadius: '10px 0px 10px 10px', color: '#4C6275', fontWeight: '400', diff --git a/libs/components/ui/src/mui.ts b/libs/components/ui/src/mui.ts index 94025c5f5b..b0658ad526 100644 --- a/libs/components/ui/src/mui.ts +++ b/libs/components/ui/src/mui.ts @@ -51,6 +51,7 @@ import { tooltipClasses, Typography, Zoom, + Fade, } from '@mui/material'; export { alpha } from '@mui/system'; @@ -233,6 +234,11 @@ export const MuiInput = Input; */ export const MuiZoom = Zoom; +/** + * @deprecated It is not recommended to use Mui directly, because the design will not refer to Mui's interaction logic. + */ +export const MuiFade = Fade; + /** * @deprecated It is not recommended to use Mui directly, because the design will not refer to Mui's interaction logic. */ diff --git a/libs/components/ui/src/popover/container.tsx b/libs/components/ui/src/popover/Container.tsx similarity index 85% rename from libs/components/ui/src/popover/container.tsx rename to libs/components/ui/src/popover/Container.tsx index f91e95b024..3f7f8c382f 100644 --- a/libs/components/ui/src/popover/container.tsx +++ b/libs/components/ui/src/popover/Container.tsx @@ -12,14 +12,14 @@ const border_radius_map: Record = { export const PopoverContainer = styled('div')< Pick >(({ theme, direction, style }) => { - const shadow = theme.affine.shadows.shadowSxDownLg; + const shadow = theme.affine.shadows.shadow1; const white = theme.affine.palette.white; - const border_radius = + const borderRadius = border_radius_map[direction] || border_radius_map['left-top']; return { boxShadow: shadow, - borderRadius: border_radius, + borderRadius: borderRadius, padding: '8px 4px', backgroundColor: white, ...style, diff --git a/libs/components/ui/src/popover/Popover.tsx b/libs/components/ui/src/popover/Popover.tsx index 67ab3f3c29..d03a65f322 100644 --- a/libs/components/ui/src/popover/Popover.tsx +++ b/libs/components/ui/src/popover/Popover.tsx @@ -1,7 +1,7 @@ import type { MuiPopperPlacementType as PopperPlacementType } from '../mui'; import React, { forwardRef, type PropsWithChildren } from 'react'; import { type PopperHandler, Popper } from '../popper'; -import { PopoverContainer } from './container'; +import { PopoverContainer } from './Container'; import type { PopoverProps, PopoverDirection } from './interface'; export const placementToContainerDirection: Record< diff --git a/libs/components/ui/src/popover/index.tsx b/libs/components/ui/src/popover/index.ts similarity index 53% rename from libs/components/ui/src/popover/index.tsx rename to libs/components/ui/src/popover/index.ts index c829b413b6..718c074cce 100644 --- a/libs/components/ui/src/popover/index.tsx +++ b/libs/components/ui/src/popover/index.ts @@ -1,3 +1,3 @@ export * from './Popover'; export * from './interface'; -export { PopoverContainer } from './container'; +export { PopoverContainer } from './Container'; diff --git a/libs/components/ui/src/select/Select.tsx b/libs/components/ui/src/select/Select.tsx index ebbf585e11..d1f3141e69 100644 --- a/libs/components/ui/src/select/Select.tsx +++ b/libs/components/ui/src/select/Select.tsx @@ -117,7 +117,7 @@ const StyledListbox = styled('ul')(({ theme }) => ({ background: '#fff', borderRadius: '10px', overflow: 'auto', - boxShadow: theme.affine.shadows.shadowSxDownLg, + boxShadow: theme.affine.shadows.shadow1, })); const StyledPopper = styled(PopperUnstyled)` diff --git a/libs/components/ui/src/theme/theme.ts b/libs/components/ui/src/theme/theme.ts index a51bca8827..70aace8122 100644 --- a/libs/components/ui/src/theme/theme.ts +++ b/libs/components/ui/src/theme/theme.ts @@ -70,7 +70,7 @@ interface Typography { interface Shadows { none: 'none'; - shadowSxDownLg: string; + shadow1: string; } type StringWithNone = [ @@ -225,7 +225,7 @@ export const Theme = { }, shadows: { none: 'none', - shadowSxDownLg: '0px 1px 10px rgba(152, 172, 189, 0.6)', + shadow1: '0px 1px 5px rgba(152, 172, 189, 0.2)', }, border: ['none'], spacing: { diff --git a/libs/datasource/db-service/src/services/editor-block/templates/template-factory.ts b/libs/datasource/db-service/src/services/editor-block/templates/template-factory.ts index 953cf0e6de..88a8d08bbe 100644 --- a/libs/datasource/db-service/src/services/editor-block/templates/template-factory.ts +++ b/libs/datasource/db-service/src/services/editor-block/templates/template-factory.ts @@ -13,7 +13,7 @@ const groupTemplateMap = { grid: gridTemplate, } as GroupTemplateMap; -const defaultTemplateList = [ +const defaultTemplateList: Array = [ { name: 'New From Quick Start', groupKeys: ['todolist'], @@ -22,10 +22,10 @@ const defaultTemplateList = [ { name: 'New From Blog', groupKeys: ['blog'] }, { name: ' New Todolist', groupKeys: ['todolist'] }, { name: ' New Empty Page', groupKeys: ['empty'] }, -] as const; +]; const TemplateFactory = { - defaultTemplateList: defaultTemplateList, + defaultTemplateList, generatePageTemplateByGroupKeys(props: TemplateMeta): Template { const newTitle = props.name || 'Get Started with AFFiNE'; const keys: GroupTemplateKeys[] = props.groupKeys || []; diff --git a/libs/datasource/db-service/src/services/workspace/user-config.ts b/libs/datasource/db-service/src/services/workspace/user-config.ts index 0a5dca7eef..001eaca18b 100644 --- a/libs/datasource/db-service/src/services/workspace/user-config.ts +++ b/libs/datasource/db-service/src/services/workspace/user-config.ts @@ -6,40 +6,40 @@ import { PageConfigItem } from './types'; /** Operate the user configuration at the workspace level */ export class UserConfig extends ServiceBaseClass { - private async fetch_recent_pages( + private async _fetchRecentPages( workspace: string ): Promise>> { - const workspace_db_block = await this.getWorkspaceDbBlock(workspace); - const recent_work_pages = - workspace_db_block.getDecoration< + const workspaceDbBlock = await this.getWorkspaceDbBlock(workspace); + const recentWorkPages = + workspaceDbBlock.getDecoration< Record> >(RECENT_PAGES) || {}; - return recent_work_pages; + return recentWorkPages; } - private async save_recent_pages( + private async _saveRecentPages( workspace: string, recentPages: Record> ) { - const workspace_db_block = await this.getWorkspaceDbBlock(workspace); - workspace_db_block.setDecoration(RECENT_PAGES, recentPages); + const workspaceDbBlock = await this.getWorkspaceDbBlock(workspace); + workspaceDbBlock.setDecoration(RECENT_PAGES, recentPages); } async getUserInitialPage( workspace: string, userId: string ): Promise { - const recent_pages = await this.getRecentPages(workspace, userId); - if (recent_pages.length > 0) { - return recent_pages[0].id; + const recentPages = await this.getRecentPages(workspace, userId); + if (recentPages.length > 0) { + return recentPages[0].id; } const db = await this.database.getDatabase(workspace); - const new_page = await db.get('page'); + const newPage = await db.get('page'); - await this.get_dependency(PageTree).addPage(workspace, new_page.id); - await this.addRecentPage(workspace, userId, new_page.id); - return new_page.id; + await this.get_dependency(PageTree).addPage(workspace, newPage.id); + await this.addRecentPage(workspace, userId, newPage.id); + return newPage.id; } async getRecentPages( @@ -47,13 +47,10 @@ export class UserConfig extends ServiceBaseClass { userId: string, topNumber = 5 ): Promise { - const recent_work_pages = await this.fetch_recent_pages(workspace); - const recent_pages = (recent_work_pages[userId] || []).slice( - 0, - topNumber - ); + const recentWorkPages = await this._fetchRecentPages(workspace); + const recentPages = (recentWorkPages[userId] || []).slice(0, topNumber); const db = await this.database.getDatabase(workspace); - for (const item of recent_pages) { + for (const item of recentPages) { const page = await db.get(item.id as 'page'); item.title = page @@ -61,39 +58,39 @@ export class UserConfig extends ServiceBaseClass { ?.value?.map(v => v.text) .join('') || 'Untitled'; } - return recent_pages; + return recentPages; } async addRecentPage(workspace: string, userId: string, pageId: string) { - const recent_work_pages = await this.fetch_recent_pages(workspace); - let recent_pages = recent_work_pages[userId] || []; - recent_pages = recent_pages.filter(item => item.id !== pageId); - recent_pages.unshift({ + const recentWorkPages = await this._fetchRecentPages(workspace); + let recentPages = recentWorkPages[userId] || []; + recentPages = recentPages.filter(item => item.id !== pageId); + recentPages.unshift({ id: pageId, lastOpenTime: Date.now(), }); - recent_work_pages[userId] = recent_pages; - await this.save_recent_pages(workspace, recent_work_pages); + recentWorkPages[userId] = recentPages; + await this._saveRecentPages(workspace, recentWorkPages); } async removePage(workspace: string, pageId: string) { - const recent_work_pages = await this.fetch_recent_pages(workspace); - for (const key in recent_work_pages) { - recent_work_pages[key] = recent_work_pages[key].filter( + const recentWorkPages = await this._fetchRecentPages(workspace); + for (const key in recentWorkPages) { + recentWorkPages[key] = recentWorkPages[key].filter( item => item.id !== pageId ); } - await this.save_recent_pages(workspace, recent_work_pages); + await this._saveRecentPages(workspace, recentWorkPages); } async observe( { workspace }: { workspace: string }, callback: ObserveCallback ): Promise { - const workspace_db_block = await this.getWorkspaceDbBlock(workspace); + const workspaceDbBlock = await this.getWorkspaceDbBlock(workspace); const unobserveWorkspace = await this._observe( workspace, - workspace_db_block.id, + workspaceDbBlock.id, (states, block) => { callback(states, block); } @@ -105,24 +102,24 @@ export class UserConfig extends ServiceBaseClass { } async unobserve({ workspace }: { workspace: string }) { - const workspace_db_block = await this.getWorkspaceDbBlock(workspace); - await this._unobserve(workspace, workspace_db_block.id); + const workspaceDbBlock = await this.getWorkspaceDbBlock(workspace); + await this._unobserve(workspace, workspaceDbBlock.id); } async getWorkspaceName(workspace: string): Promise { - const workspace_db_block = await this.getWorkspaceDbBlock(workspace); + const workspaceDbBlock = await this.getWorkspaceDbBlock(workspace); const workspaceName = - workspace_db_block.getDecoration(WORKSPACE_CONFIG) || ''; + workspaceDbBlock.getDecoration(WORKSPACE_CONFIG) || ''; return workspaceName; } async getWorkspaceId(workspace: string): Promise { - const workspace_db_block = await this.getWorkspaceDbBlock(workspace); - return workspace_db_block.id; + const workspaceDbBlock = await this.getWorkspaceDbBlock(workspace); + return workspaceDbBlock.id; } async setWorkspaceName(workspace: string, workspaceName: string) { - const workspace_db_block = await this.getWorkspaceDbBlock(workspace); - workspace_db_block.setDecoration(WORKSPACE_CONFIG, workspaceName); + const workspaceDbBlock = await this.getWorkspaceDbBlock(workspace); + workspaceDbBlock.setDecoration(WORKSPACE_CONFIG, workspaceName); } } diff --git a/libs/datasource/jwt/package.json b/libs/datasource/jwt/package.json index 1788d382ea..4e62ef229d 100644 --- a/libs/datasource/jwt/package.json +++ b/libs/datasource/jwt/package.json @@ -20,6 +20,7 @@ "@types/flexsearch": "^0.7.3", "buffer": "^6.0.3", "debug": "^4.3.4", + "fast-sort": "^3.2.0", "fflate": "^0.7.3", "idb-keyval": "^6.2.0", "immer": "^9.0.15", diff --git a/libs/datasource/jwt/src/adapter/yjs/binary.ts b/libs/datasource/jwt/src/adapter/yjs/binary.ts index d475cd05f2..5c677a4f51 100644 --- a/libs/datasource/jwt/src/adapter/yjs/binary.ts +++ b/libs/datasource/jwt/src/adapter/yjs/binary.ts @@ -3,29 +3,29 @@ import { Array as YArray, Map as YMap } from 'yjs'; import { RemoteKvService } from '@toeverything/datasource/remote-kv'; export class YjsRemoteBinaries { - readonly #binaries: YMap>; // binary instance - readonly #remote_storage?: RemoteKvService; + readonly _binaries: YMap>; // binary instance + readonly _remoteStorage?: RemoteKvService; constructor(binaries: YMap>, remote_token?: string) { - this.#binaries = binaries; + this._binaries = binaries; if (remote_token) { - this.#remote_storage = new RemoteKvService(remote_token); + this._remoteStorage = new RemoteKvService(remote_token); } else { console.warn(`Remote storage is not ready`); } } has(name: string): boolean { - return this.#binaries.has(name); + return this._binaries.has(name); } async get(name: string): Promise | undefined> { - if (this.#binaries.has(name)) { - return this.#binaries.get(name); + if (this._binaries.has(name)) { + return this._binaries.get(name); } else { // TODO: Remote Load try { - const file = await this.#remote_storage?.instance.getBuffData( + const file = await this._remoteStorage?.instance.getBuffData( name ); console.log(file); @@ -38,16 +38,16 @@ export class YjsRemoteBinaries { } async set(name: string, binary: YArray) { - if (!this.#binaries.has(name)) { + if (!this._binaries.has(name)) { console.log(name, 'name'); if (binary.length === 1) { - this.#binaries.set(name, binary); - if (this.#remote_storage) { + this._binaries.set(name, binary); + if (this._remoteStorage) { // TODO: Remote Save, if there is an object with the same name remotely, the upload is skipped, because the file name is the hash of the file content - const has_file = this.#remote_storage.instance.exist(name); + const has_file = this._remoteStorage.instance.exist(name); if (!has_file) { const upload_file = new File(binary.toArray(), name); - await this.#remote_storage.instance + await this._remoteStorage.instance .upload(upload_file) .catch(err => { throw new Error(`${err} upload error`); diff --git a/libs/datasource/jwt/src/adapter/yjs/block.ts b/libs/datasource/jwt/src/adapter/yjs/block.ts index 2faf3b80fe..ad60aa31e0 100644 --- a/libs/datasource/jwt/src/adapter/yjs/block.ts +++ b/libs/datasource/jwt/src/adapter/yjs/block.ts @@ -32,49 +32,49 @@ type YjsBlockInstanceProps = { }; export class YjsBlockInstance implements BlockInstance { - readonly #id: string; - readonly #block: YMap; - readonly #binary?: YArray; - readonly #children: YArray; - readonly #set_block: ( + readonly _id: string; + readonly _block: YMap; + readonly _binary?: YArray; + readonly _children: YArray; + readonly _setBlock: ( id: string, block: BlockItem ) => Promise; - readonly #get_updated: (id: string) => number | undefined; - readonly #get_creator: (id: string) => string | undefined; - readonly #get_block_instance: (id: string) => YjsBlockInstance | undefined; - readonly #children_listeners: Map; - readonly #content_listeners: Map; + readonly _getUpdated: (id: string) => number | undefined; + readonly _getCreator: (id: string) => string | undefined; + readonly _getBlockInstance: (id: string) => YjsBlockInstance | undefined; + readonly _childrenListeners: Map; + readonly _contentListeners: Map; // eslint-disable-next-line @typescript-eslint/naming-convention - #children_map: Map; + _childrenMap: Map; constructor(props: YjsBlockInstanceProps) { - this.#id = props.id; - this.#block = props.block; - this.#binary = props.binary; + this._id = props.id; + this._block = props.block; + this._binary = props.binary; - this.#children = props.block.get('children') as YArray; - this.#children_map = getMapFromYArray(this.#children); - this.#set_block = props.setBlock; - this.#get_updated = props.getUpdated; - this.#get_creator = props.getCreator; - this.#get_block_instance = props.getBlockInstance; + this._children = props.block.get('children') as YArray; + this._childrenMap = getMapFromYArray(this._children); + this._setBlock = props.setBlock; + this._getUpdated = props.getUpdated; + this._getCreator = props.getCreator; + this._getBlockInstance = props.getBlockInstance; - this.#children_listeners = new Map(); - this.#content_listeners = new Map(); + this._childrenListeners = new Map(); + this._contentListeners = new Map(); - const content = this.#block.get('content') as YMap; + const content = this._block.get('content') as YMap; - this.#children.observe(event => - ChildrenListenerHandler(this.#children_listeners, event) + this._children.observe(event => + ChildrenListenerHandler(this._childrenListeners, event) ); content?.observeDeep(events => - ContentListenerHandler(this.#content_listeners, events) + ContentListenerHandler(this._contentListeners, events) ); // TODO: flavor needs optimization - this.#block.observeDeep(events => - ContentListenerHandler(this.#content_listeners, events) + this._block.observeDeep(events => + ContentListenerHandler(this._contentListeners, events) ); } @@ -99,85 +99,85 @@ export class YjsBlockInstance implements BlockInstance { } addChildrenListener(name: string, listener: BlockListener): void { - this.#children_listeners.set(name, listener); + this._childrenListeners.set(name, listener); } removeChildrenListener(name: string): void { - this.#children_listeners.delete(name); + this._childrenListeners.delete(name); } addContentListener(name: string, listener: BlockListener): void { - this.#content_listeners.set(name, listener); + this._contentListeners.set(name, listener); } removeContentListener(name: string): void { - this.#content_listeners.delete(name); + this._contentListeners.delete(name); } get id() { - return this.#id; + return this._id; } get content(): YjsContentOperation { if (this.type === BlockTypes.block) { - const content = this.#block.get('content'); + const content = this._block.get('content'); if (content instanceof YAbstractType) { return new YjsContentOperation(content); } else { throw new Error(`Invalid content type: ${typeof content}`); } - } else if (this.type === BlockTypes.binary && this.#binary) { - return new YjsContentOperation(this.#binary); + } else if (this.type === BlockTypes.binary && this._binary) { + return new YjsContentOperation(this._binary); } throw new Error( - `Invalid content type: ${this.type}, ${this.#block.get( + `Invalid content type: ${this.type}, ${this._block.get( 'content' - )}, ${this.#binary}` + )}, ${this._binary}` ); } get type(): BlockItem['type'] { - return this.#block.get( + return this._block.get( 'type' ) as BlockItem['type']; } get flavor(): BlockItem['flavor'] { - return this.#block.get( + return this._block.get( 'flavor' ) as BlockItem['flavor']; } // TODO: bad case. Need to optimize. setFlavor(flavor: BlockItem['flavor']) { - this.#block.set('flavor', flavor); + this._block.set('flavor', flavor); } get created(): BlockItem['created'] { - return this.#block.get( + return this._block.get( 'created' ) as BlockItem['created']; } get updated(): number { - return this.#get_updated(this.#id) || this.created; + return this._getUpdated(this._id) || this.created; } get creator(): string | undefined { - return this.#get_creator(this.#id); + return this._getCreator(this._id); } get children(): string[] { - return this.#children.toArray(); + return this._children.toArray(); } getChildren(ids?: (string | undefined)[]): YjsBlockInstance[] { const query_ids = ids?.filter((id): id is string => !!id) || []; - const exists_ids = this.#children.map(id => id); + const exists_ids = this._children.map(id => id); const filter_ids = query_ids.length ? query_ids : exists_ids; return exists_ids .filter(id => filter_ids.includes(id)) - .map(id => this.#get_block_instance(id)) + .map(id => this._getBlockInstance(id)) .filter((v): v is YjsBlockInstance => !!v); } @@ -196,7 +196,7 @@ export class YjsBlockInstance implements BlockInstance { return pos; } } else if (before) { - const current_pos = this.#children_map.get(before || ''); + const current_pos = this._childrenMap.get(before || ''); if ( typeof current_pos === 'number' && Number.isInteger(current_pos) @@ -207,7 +207,7 @@ export class YjsBlockInstance implements BlockInstance { } } } else if (after) { - const current_pos = this.#children_map.get(after || ''); + const current_pos = this._childrenMap.get(after || ''); if ( typeof current_pos === 'number' && Number.isInteger(current_pos) @@ -227,44 +227,44 @@ export class YjsBlockInstance implements BlockInstance { ): Promise { const content = block[GET_BLOCK_ITEM](); if (content) { - const lastIndex = this.#children_map.get(block.id); + const lastIndex = this._childrenMap.get(block.id); if (typeof lastIndex === 'number') { - this.#children.delete(lastIndex); - this.#children_map = getMapFromYArray(this.#children); + this._children.delete(lastIndex); + this._childrenMap = getMapFromYArray(this._children); } const position = this.position_calculator( - this.#children_map.size, + this._childrenMap.size, pos ); if (typeof position === 'number') { - this.#children.insert(position, [block.id]); + this._children.insert(position, [block.id]); } else { - this.#children.push([block.id]); + this._children.push([block.id]); } - await this.#set_block(block.id, content); - this.#children_map = getMapFromYArray(this.#children); + await this._setBlock(block.id, content); + this._childrenMap = getMapFromYArray(this._children); } } removeChildren(ids: (string | undefined)[]): Promise { return new Promise(resolve => { - if (this.#children.doc) { - transact(this.#children.doc, () => { + if (this._children.doc) { + transact(this._children.doc, () => { const failed = []; for (const id of ids) { let idx = -1; - for (const block_id of this.#children) { + for (const block_id of this._children) { idx += 1; if (block_id === id) { - this.#children.delete(idx); + this._children.delete(idx); break; } } if (id) failed.push(id); } - this.#children_map = getMapFromYArray(this.#children); + this._childrenMap = getMapFromYArray(this._children); resolve(failed); }); } else { @@ -274,7 +274,7 @@ export class YjsBlockInstance implements BlockInstance { } public scopedHistory(scope: any[]): HistoryManager { - return new YjsHistoryManager(this.#block, scope); + return new YjsHistoryManager(this._block, scope); } [GET_BLOCK_ITEM]() { @@ -283,7 +283,7 @@ export class YjsBlockInstance implements BlockInstance { return { type: this.type, flavor: this.flavor, - children: this.#children.slice(), + children: this._children.slice(), created: this.created, content: this.content, }; diff --git a/libs/datasource/jwt/src/adapter/yjs/gatekeeper.ts b/libs/datasource/jwt/src/adapter/yjs/gatekeeper.ts index 1dd739de4f..1ee3e93ca3 100644 --- a/libs/datasource/jwt/src/adapter/yjs/gatekeeper.ts +++ b/libs/datasource/jwt/src/adapter/yjs/gatekeeper.ts @@ -2,35 +2,35 @@ import { Map as YMap } from 'yjs'; export class GateKeeper { // eslint-disable-next-line @typescript-eslint/naming-convention - #user_id: string; - #creators: YMap; - #common: YMap; + _userId: string; + _creators: YMap; + _common: YMap; constructor(userId: string, creators: YMap, common: YMap) { - this.#user_id = userId; - this.#creators = creators; - this.#common = common; + this._userId = userId; + this._creators = creators; + this._common = common; } getCreator(block_id: string): string | undefined { - return this.#creators.get(block_id) || this.#common.get(block_id); + return this._creators.get(block_id) || this._common.get(block_id); } setCreator(block_id: string) { - if (!this.#creators.get(block_id)) { - this.#creators.set(block_id, this.#user_id); + if (!this._creators.get(block_id)) { + this._creators.set(block_id, this._userId); } } setCommon(block_id: string) { - if (!this.#creators.get(block_id) && !this.#common.get(block_id)) { - this.#common.set(block_id, this.#user_id); + if (!this._creators.get(block_id) && !this._common.get(block_id)) { + this._common.set(block_id, this._userId); } } private check_delete(block_id: string): boolean { - const creator = this.#creators.get(block_id); - return creator === this.#user_id || !!this.#common.get(block_id); + const creator = this._creators.get(block_id); + return creator === this._userId || !!this._common.get(block_id); } checkDeleteLists(block_ids: string[]) { @@ -47,7 +47,7 @@ export class GateKeeper { } clear() { - this.#creators.clear(); - this.#common.clear(); + this._creators.clear(); + this._common.clear(); } } diff --git a/libs/datasource/jwt/src/adapter/yjs/history.ts b/libs/datasource/jwt/src/adapter/yjs/history.ts index 0434d340d8..34884a1150 100644 --- a/libs/datasource/jwt/src/adapter/yjs/history.ts +++ b/libs/datasource/jwt/src/adapter/yjs/history.ts @@ -5,34 +5,34 @@ import { HistoryCallback, HistoryManager } from '../../adapter'; type StackItem = UndoManager['undoStack'][0]; export class YjsHistoryManager implements HistoryManager { - readonly #blocks: YMap; - readonly #history_manager: UndoManager; - readonly #push_listeners: Map>; - readonly #pop_listeners: Map>; + readonly _blocks: YMap; + readonly _historyManager: UndoManager; + readonly _pushListeners: Map>; + readonly _popListeners: Map>; constructor(scope: YMap, tracker?: any[]) { - this.#blocks = scope; - this.#history_manager = new UndoManager(scope, { + this._blocks = scope; + this._historyManager = new UndoManager(scope, { trackedOrigins: tracker ? new Set(tracker) : undefined, }); - this.#push_listeners = new Map(); - this.#history_manager.on( + this._pushListeners = new Map(); + this._historyManager.on( 'stack-item-added', (event: { stackItem: StackItem }) => { const meta = event.stackItem.meta; - for (const listener of this.#push_listeners.values()) { + for (const listener of this._pushListeners.values()) { listener(meta); } } ); - this.#pop_listeners = new Map(); - this.#history_manager.on( + this._popListeners = new Map(); + this._historyManager.on( 'stack-item-popped', (event: { stackItem: StackItem }) => { const meta = event.stackItem.meta; - for (const listener of this.#pop_listeners.values()) { + for (const listener of this._popListeners.values()) { listener(new Map(meta)); } } @@ -40,19 +40,19 @@ export class YjsHistoryManager implements HistoryManager { } onPush(name: string, callback: HistoryCallback): void { - this.#push_listeners.set(name, callback); + this._pushListeners.set(name, callback); } offPush(name: string): boolean { - return this.#push_listeners.delete(name); + return this._pushListeners.delete(name); } onPop(name: string, callback: HistoryCallback): void { - this.#pop_listeners.set(name, callback); + this._popListeners.set(name, callback); } offPop(name: string): boolean { - return this.#pop_listeners.delete(name); + return this._popListeners.delete(name); } break(): void { @@ -60,14 +60,14 @@ export class YjsHistoryManager implements HistoryManager { } undo(): Map | undefined { - return this.#history_manager.undo()?.meta; + return this._historyManager.undo()?.meta; } redo(): Map | undefined { - return this.#history_manager.redo()?.meta; + return this._historyManager.redo()?.meta; } clear(): void { - return this.#history_manager.clear(); + return this._historyManager.clear(); } } diff --git a/libs/datasource/jwt/src/adapter/yjs/index.ts b/libs/datasource/jwt/src/adapter/yjs/index.ts index 1037d9e3f6..1a0a637859 100644 --- a/libs/datasource/jwt/src/adapter/yjs/index.ts +++ b/libs/datasource/jwt/src/adapter/yjs/index.ts @@ -178,22 +178,22 @@ export type YjsInitOptions = { }; export class YjsAdapter implements AsyncDatabaseAdapter { - readonly #provider: YjsProviders; - readonly #doc: Doc; // doc instance - readonly #awareness: Awareness; // lightweight state synchronization - readonly #gatekeeper: GateKeeper; // Simple access control - readonly #history: YjsHistoryManager; + readonly _provider: YjsProviders; + readonly _doc: Doc; // doc instance + readonly _awareness: Awareness; // lightweight state synchronization + readonly _gatekeeper: GateKeeper; // Simple access control + readonly _history: YjsHistoryManager; // Block Collection // key is a randomly generated global id - readonly #blocks: YMap>; - readonly #block_updated: YMap; + readonly _blocks: YMap>; + readonly _blockUpdated: YMap; // Maximum cache Block 1024, ttl 10 minutes - readonly #block_caches: LRUCache; + readonly _blockCaches: LRUCache; - readonly #binaries: YjsRemoteBinaries; + readonly _binaries: YjsRemoteBinaries; - readonly #listener: Map>; + readonly _listener: Map>; static async init( workspace: string, @@ -209,30 +209,30 @@ export class YjsAdapter implements AsyncDatabaseAdapter { } private constructor(providers: YjsProviders) { - this.#provider = providers; - this.#doc = providers.idb.doc; - this.#awareness = providers.awareness; - this.#gatekeeper = providers.gatekeeper; + this._provider = providers; + this._doc = providers.idb.doc; + this._awareness = providers.awareness; + this._gatekeeper = providers.gatekeeper; - const blocks = this.#doc.getMap>('blocks'); - this.#blocks = + const blocks = this._doc.getMap>('blocks'); + this._blocks = blocks.get('content') || blocks.set('content', new YMap()); - this.#block_updated = + this._blockUpdated = blocks.get('updated') || blocks.set('updated', new YMap()); - this.#block_caches = new LRUCache({ max: 1024, ttl: 1000 * 60 * 10 }); - this.#binaries = new YjsRemoteBinaries( + this._blockCaches = new LRUCache({ max: 1024, ttl: 1000 * 60 * 10 }); + this._binaries = new YjsRemoteBinaries( providers.binariesIdb.doc.getMap(), providers.remoteToken ); - this.#history = new YjsHistoryManager(this.#blocks); + this._history = new YjsHistoryManager(this._blocks); - this.#listener = new Map(); + this._listener = new Map(); const ws = providers.ws as any; if (ws) { const workspace = providers.idb.name; const emitState = (connectivity: Connectivity) => { - this.#listener.get('connectivity')?.( + this._listener.get('connectivity')?.( new Map([[workspace, connectivity]]) ); }; @@ -244,9 +244,9 @@ export class YjsAdapter implements AsyncDatabaseAdapter { const debounced_editing_notifier = debounce( () => { const listener: BlockListener> | undefined = - this.#listener.get('editing'); + this._listener.get('editing'); if (listener) { - const mapping = this.#awareness.getStates(); + const mapping = this._awareness.getStates(); const editing_mapping: Record = {}; for (const { userId, @@ -280,11 +280,11 @@ export class YjsAdapter implements AsyncDatabaseAdapter { { maxWait: 1000 } ); - this.#awareness.setLocalStateField('userId', providers.userId); + this._awareness.setLocalStateField('userId', providers.userId); - this.#awareness.on('update', debounced_editing_notifier); + this._awareness.on('update', debounced_editing_notifier); - this.#blocks.observeDeep(events => { + this._blocks.observeDeep(events => { const now = Date.now(); const keys = events.flatMap(e => { @@ -300,14 +300,14 @@ export class YjsAdapter implements AsyncDatabaseAdapter { } }); - EmitEvents(keys, this.#listener.get('updated')); + EmitEvents(keys, this._listener.get('updated')); - transact(this.#doc, () => { + transact(this._doc, () => { for (const [key, action] of keys) { if (action === 'delete') { - this.#block_updated.delete(key); + this._blockUpdated.delete(key); } else { - this.#block_updated.set(key, now); + this._blockUpdated.set(key, now); } } }); @@ -315,7 +315,7 @@ export class YjsAdapter implements AsyncDatabaseAdapter { } getUserId(): string { - return this.#provider.userId; + return this._provider.userId; } inspector() { @@ -333,7 +333,7 @@ export class YjsAdapter implements AsyncDatabaseAdapter { return { save: () => { - const binary = encodeStateAsUpdate(this.#doc); + const binary = encodeStateAsUpdate(this._doc); saveAs( new Blob([binary]), `affine_workspace_${new Date().toDateString()}.apk` @@ -353,7 +353,7 @@ export class YjsAdapter implements AsyncDatabaseAdapter { }); const [file] = (await fromEvent(handles)) as File[]; const binary = await file.arrayBuffer(); - await this.#provider.idb.clearData(); + await this._provider.idb.clearData(); const doc = new Doc({ autoLoad: true, shouldLoad: true }); let updated = 0; let isUpdated = false; @@ -374,21 +374,21 @@ export class YjsAdapter implements AsyncDatabaseAdapter { }; check(); }); - await new IndexeddbPersistence(this.#provider.idb.name, doc) + await new IndexeddbPersistence(this._provider.idb.name, doc) .whenSynced; applyUpdate(doc, new Uint8Array(binary)); await update_check; console.log('load success'); }, - parse: () => this.#doc.toJSON(), + parse: () => this._doc.toJSON(), // eslint-disable-next-line @typescript-eslint/naming-convention parse_page: (page_id: string) => { - const blocks = this.#blocks.toJSON(); + const blocks = this._blocks.toJSON(); return resolve_block(blocks, page_id); }, // eslint-disable-next-line @typescript-eslint/naming-convention parse_pages: (resolve = false) => { - const blocks = this.#blocks.toJSON(); + const blocks = this._blocks.toJSON(); return Object.fromEntries( Object.entries(blocks) .filter(([, block]) => block.flavor === 'page') @@ -402,21 +402,21 @@ export class YjsAdapter implements AsyncDatabaseAdapter { ); }, clear: () => { - this.#blocks.clear(); - this.#block_updated.clear(); - this.#gatekeeper.clear(); - this.#doc.getMap('blocks').clear(); - this.#doc.getMap('gatekeeper').clear(); + this._blocks.clear(); + this._blockUpdated.clear(); + this._gatekeeper.clear(); + this._doc.getMap('blocks').clear(); + this._doc.getMap('gatekeeper').clear(); }, // eslint-disable-next-line @typescript-eslint/naming-convention clear_old: () => { - this.#doc.getMap('block_updated').clear(); - this.#doc.getMap('blocks').clear(); - this.#doc.getMap('common').clear(); - this.#doc.getMap('creators').clear(); + this._doc.getMap('block_updated').clear(); + this._doc.getMap('blocks').clear(); + this._doc.getMap('common').clear(); + this._doc.getMap('creators').clear(); }, snapshot: () => { - return snapshot(this.#doc); + return snapshot(this._doc); }, }; } @@ -459,15 +459,15 @@ export class YjsAdapter implements AsyncDatabaseAdapter { } private get_updated(id: string) { - return this.#block_updated.get(id); + return this._blockUpdated.get(id); } private get_creator(id: string) { - return this.#gatekeeper.getCreator(id); + return this._gatekeeper.getCreator(id); } private get_block_sync(id: string): YjsBlockInstance | undefined { - const cached = this.#block_caches.get(id); + const cached = this._blockCaches.get(id); if (cached) { // Synchronous read cannot read binary if (cached.type === BlockTypes.block) { @@ -476,7 +476,7 @@ export class YjsAdapter implements AsyncDatabaseAdapter { return undefined; } - const block = this.#blocks.get(id); + const block = this._blocks.get(id); // Synchronous read cannot read binary if (block && block.get('type') === BlockTypes.block) { @@ -496,9 +496,9 @@ export class YjsAdapter implements AsyncDatabaseAdapter { async getBlock(id: string): Promise { const block_instance = this.get_block_sync(id); if (block_instance) return block_instance; - const block = this.#blocks.get(id); + const block = this._blocks.get(id); if (block && block.get('type') === BlockTypes.binary) { - const binary = await this.#binaries.get( + const binary = await this._binaries.get( block.get('hash') as string ); if (binary) { @@ -520,7 +520,7 @@ export class YjsAdapter implements AsyncDatabaseAdapter { flavor: BlockItem['flavor'] ): Promise { const keys: string[] = []; - this.#blocks.forEach((doc, key) => { + this._blocks.forEach((doc, key) => { if (doc.get('flavor') === flavor) { keys.push(key); } @@ -533,7 +533,7 @@ export class YjsAdapter implements AsyncDatabaseAdapter { type: BlockItem['type'] ): Promise { const keys: string[] = []; - this.#blocks.forEach((doc, key) => { + this._blocks.forEach((doc, key) => { if (doc.get('type') === type) { keys.push(key); } @@ -547,8 +547,8 @@ export class YjsAdapter implements AsyncDatabaseAdapter { item: BlockItem & { hash?: string } ): Promise { return new Promise((resolve, reject) => { - const block = this.#blocks.get(key) || new YMap(); - transact(this.#doc, () => { + const block = this._blocks.get(key) || new YMap(); + transact(this._doc, () => { // Insert only if the block doesn't exist yet // Other modification operations are done in the block instance let uploaded: Promise | undefined; @@ -568,8 +568,8 @@ export class YjsAdapter implements AsyncDatabaseAdapter { } else if (item.type === BlockTypes.binary && item.hash) { if (content instanceof YArray) { block.set('hash', item.hash); - if (!this.#binaries.has(item.hash)) { - uploaded = this.#binaries.set( + if (!this._binaries.has(item.hash)) { + uploaded = this._binaries.set( item.hash, content ); @@ -583,18 +583,18 @@ export class YjsAdapter implements AsyncDatabaseAdapter { throw new Error('invalid block type: ' + item.type); } - this.#blocks.set(key, block); + this._blocks.set(key, block); } if (item.flavor === 'page') { - this.#awareness.setLocalStateField('editing', key); - this.#awareness.setLocalStateField('updated', Date.now()); + this._awareness.setLocalStateField('editing', key); + this._awareness.setLocalStateField('updated', Date.now()); } // References do not add delete restrictions if (item.flavor === 'reference') { - this.#gatekeeper.setCommon(key); + this._gatekeeper.setCommon(key); } else { - this.#gatekeeper.setCreator(key); + this._gatekeeper.setCreator(key); } if (uploaded) { @@ -613,15 +613,15 @@ export class YjsAdapter implements AsyncDatabaseAdapter { async checkBlocks(keys: string[]): Promise { return ( - keys.filter(key => !!this.#blocks.get(key)).length === keys.length + keys.filter(key => !!this._blocks.get(key)).length === keys.length ); } async deleteBlocks(keys: string[]): Promise { - const [success, fail] = this.#gatekeeper.checkDeleteLists(keys); - transact(this.#doc, () => { + const [success, fail] = this._gatekeeper.checkDeleteLists(keys); + transact(this._doc, () => { for (const key of success) { - this.#blocks.delete(key); + this._blocks.delete(key); } }); return fail; @@ -631,7 +631,7 @@ export class YjsAdapter implements AsyncDatabaseAdapter { key: 'editing' | 'updated' | 'connectivity', listener: BlockListener ): void { - this.#listener.set(key, listener); + this._listener.set(key, listener); } suspend(suspend: boolean) { @@ -639,6 +639,6 @@ export class YjsAdapter implements AsyncDatabaseAdapter { } public history(): HistoryManager { - return this.#history; + return this._history; } } diff --git a/libs/datasource/jwt/src/adapter/yjs/operation.ts b/libs/datasource/jwt/src/adapter/yjs/operation.ts index 8cb825ad3b..e4b2da50dd 100644 --- a/libs/datasource/jwt/src/adapter/yjs/operation.ts +++ b/libs/datasource/jwt/src/adapter/yjs/operation.ts @@ -52,18 +52,18 @@ function auto_set(root: ContentOperation, key: string, data: BaseTypes): void { } export class YjsContentOperation implements ContentOperation { - readonly #content: YAbstractType; + readonly _content: YAbstractType; constructor(content: YAbstractType) { - this.#content = content; + this._content = content; } get length(): number { - if (this.#content instanceof YMap) { - return this.#content.size; + if (this._content instanceof YMap) { + return this._content.size; } - if (this.#content instanceof YArray || this.#content instanceof YText) { - return this.#content.length; + if (this._content instanceof YArray || this._content instanceof YText) { + return this._content.length; } return 0; } @@ -83,8 +83,8 @@ export class YjsContentOperation implements ContentOperation { } asText(): YjsTextOperation | undefined { - if (this.#content instanceof YText) { - return new YjsTextOperation(this.#content); + if (this._content instanceof YText) { + return new YjsTextOperation(this._content); } return undefined; } @@ -92,8 +92,8 @@ export class YjsContentOperation implements ContentOperation { asArray(): | YjsArrayOperation | undefined { - if (this.#content instanceof YArray) { - return new YjsArrayOperation(this.#content); + if (this._content instanceof YArray) { + return new YjsArrayOperation(this._content); } return undefined; } @@ -101,8 +101,8 @@ export class YjsContentOperation implements ContentOperation { asMap(): | YjsMapOperation | undefined { - if (this.#content instanceof YMap) { - return new YjsMapOperation(this.#content); + if (this._content instanceof YMap) { + return new YjsMapOperation(this._content); } return undefined; } @@ -184,24 +184,24 @@ export class YjsContentOperation implements ContentOperation { } [INTO_INNER](): YAbstractType | undefined { - if (this.#content instanceof YAbstractType) { - return this.#content; + if (this._content instanceof YAbstractType) { + return this._content; } return undefined; } // eslint-disable-next-line @typescript-eslint/naming-convention private toJSON() { - return this.#content.toJSON(); + return this._content.toJSON(); } } class YjsTextOperation extends YjsContentOperation implements TextOperation { - readonly #content: YText; + readonly _textContent: YText; constructor(content: YText) { super(content); - this.#content = content; + this._textContent = content; } insert( @@ -209,7 +209,7 @@ class YjsTextOperation extends YjsContentOperation implements TextOperation { content: string, format?: Record ): void { - this.#content.insert(index, content, format); + this._textContent.insert(index, content, format); } format( @@ -217,23 +217,23 @@ class YjsTextOperation extends YjsContentOperation implements TextOperation { length: number, format: Record ): void { - this.#content.format(index, length, format); + this._textContent.format(index, length, format); } delete(index: number, length: number): void { - this.#content.delete(index, length); + this._textContent.delete(index, length); } setAttribute(name: string, value: BaseTypes) { - this.#content.setAttribute(name, value); + this._textContent.setAttribute(name, value); } getAttribute(name: string): T | undefined { - return this.#content.getAttribute(name); + return this._textContent.getAttribute(name); } override toString(): TextToken[] { - return this.#content.toDelta(); + return this._textContent.toDelta(); } } @@ -241,67 +241,69 @@ class YjsArrayOperation extends YjsContentOperation implements ArrayOperation { - readonly #content: YArray; - readonly #listeners: Map; + readonly _arrayContent: YArray; + readonly _listeners: Map; constructor(content: YArray) { super(content); - this.#content = content; - this.#listeners = new Map(); + this._arrayContent = content; + this._listeners = new Map(); - this.#content.observe(event => - ChildrenListenerHandler(this.#listeners, event) + this._arrayContent.observe(event => + ChildrenListenerHandler(this._listeners, event) ); } on(name: string, listener: BlockListener) { - this.#listeners.set(name, listener); + this._listeners.set(name, listener); } off(name: string) { - this.#listeners.delete(name); + this._listeners.delete(name); } insert(index: number, content: Array>): void { - this.#content.insert( + this._arrayContent.insert( index, content.map(v => this.into_inner(v)) ); } delete(index: number, length: number): void { - this.#content.delete(index, length); + this._arrayContent.delete(index, length); } push(content: Array>): void { - this.#content.push(content.map(v => this.into_inner(v))); + this._arrayContent.push(content.map(v => this.into_inner(v))); } unshift(content: Array>): void { - this.#content.unshift(content.map(v => this.into_inner(v))); + this._arrayContent.unshift(content.map(v => this.into_inner(v))); } get(index: number): Operable | undefined { - const content = this.#content.get(index); + const content = this._arrayContent.get(index); if (content) return this.to_operable(content); return undefined; } private get_internal(index: number): T { - return this.#content.get(index); + return this._arrayContent.get(index); } slice(start?: number, end?: number): Operable[] { - return this.#content.slice(start, end).map(v => this.to_operable(v)); + return this._arrayContent + .slice(start, end) + .map(v => this.to_operable(v)); } map(callback: (value: T, index: number) => R): R[] { - return this.#content.map((value, index) => callback(value, index)); + return this._arrayContent.map((value, index) => callback(value, index)); } // Traverse, if callback returns false, stop traversing forEach(callback: (value: T, index: number) => boolean) { - for (let i = 0; i < this.#content.length; i++) { + for (let i = 0; i < this._arrayContent.length; i++) { const ret = callback(this.get_internal(i), i); if (ret === false) { break; @@ -342,47 +344,47 @@ class YjsMapOperation extends YjsContentOperation implements MapOperation { - readonly #content: YMap; - readonly #listeners: Map; + readonly _mapContent: YMap; + readonly _listeners: Map; constructor(content: YMap) { super(content); - this.#content = content; - this.#listeners = new Map(); + this._mapContent = content; + this._listeners = new Map(); content?.observeDeep(events => - ContentListenerHandler(this.#listeners, events) + ContentListenerHandler(this._listeners, events) ); } on(name: string, listener: BlockListener) { - this.#listeners.set(name, listener); + this._listeners.set(name, listener); } off(name: string) { - this.#listeners.delete(name); + this._listeners.delete(name); } set(key: string, value: Operable): void { if (value instanceof YjsContentOperation) { const content = value[INTO_INNER](); - if (content) this.#content.set(key, content as unknown as T); + if (content) this._mapContent.set(key, content as unknown as T); } else { - this.#content.set(key, value as T); + this._mapContent.set(key, value as T); } } get(key: string): Operable | undefined { - const content = this.#content.get(key); + const content = this._mapContent.get(key); if (content) return this.to_operable(content); return undefined; } delete(key: string): void { - this.#content.delete(key); + this._mapContent.delete(key); } has(key: string): boolean { - return this.#content.has(key); + return this._mapContent.has(key); } } diff --git a/libs/datasource/jwt/src/block/abstract.ts b/libs/datasource/jwt/src/block/abstract.ts index 30da2ffc57..9d675ee803 100644 --- a/libs/datasource/jwt/src/block/abstract.ts +++ b/libs/datasource/jwt/src/block/abstract.ts @@ -26,47 +26,47 @@ export class AbstractBlock< B extends BlockInstance, C extends ContentOperation > { - readonly #id: string; + readonly _id: string; readonly #block: BlockInstance; - readonly #history: HistoryManager; - readonly #root?: AbstractBlock; - readonly #parent_listener: Map; + readonly _history: HistoryManager; + readonly _root?: AbstractBlock; + readonly _parentListener: Map; - #parent?: AbstractBlock; + _parent?: AbstractBlock; constructor( block: B, root?: AbstractBlock, parent?: AbstractBlock ) { - this.#id = block.id; + this._id = block.id; this.#block = block; - this.#history = this.#block.scopedHistory([this.#id]); + this._history = this.#block.scopedHistory([this._id]); - this.#root = root; - this.#parent_listener = new Map(); - this.#parent = parent; - JWT_DEV && logger_debug(`init: exists ${this.#id}`); + this._root = root; + this._parentListener = new Map(); + this._parent = parent; + JWT_DEV && logger_debug(`init: exists ${this._id}`); } public get root() { - return this.#root; + return this._root; } protected get parent_node() { - return this.#parent; + return this._parent; } protected _getParentPage(warning = true): string | undefined { if (this.flavor === 'page') { return this.#block.id; - } else if (!this.#parent) { + } else if (!this._parent) { if (warning && this.flavor !== 'workspace') { console.warn('parent not found'); } return undefined; } else { - return this.#parent.parent_page; + return this._parent.parent_page; } } @@ -80,7 +80,7 @@ export class AbstractBlock< callback: BlockListener ) { if (event === 'parent') { - this.#parent_listener.set(name, callback); + this._parentListener.set(name, callback); } else { this.#block.on(event, name, callback); } @@ -88,7 +88,7 @@ export class AbstractBlock< public off(event: 'content' | 'children' | 'parent', name: string) { if (event === 'parent') { - this.#parent_listener.delete(name); + this._parentListener.delete(name); } else { this.#block.off(event, name); } @@ -117,7 +117,7 @@ export class AbstractBlock< return this.#block.content.asMap() as MapOperation; } throw new Error( - `this block not a structured block: ${this.#id}, ${ + `this block not a structured block: ${this._id}, ${ this.#block.type }` ); @@ -181,9 +181,9 @@ export class AbstractBlock< } [SET_PARENT](parent: AbstractBlock) { - this.#parent = parent; + this._parent = parent; const states: Map = new Map([[parent.id, 'update']]); - for (const listener of this.#parent_listener.values()) { + for (const listener of this._parentListener.values()) { listener(states); } } @@ -196,7 +196,7 @@ export class AbstractBlock< const updated = this.last_updated_date; return [ - `id:${this.#id}`, + `id:${this._id}`, `type:${this.type}`, `type:${this.flavor}`, this.flavor === BlockFlavors.page && `type:doc`, // normal documentation @@ -211,7 +211,7 @@ export class AbstractBlock< * current document instance id */ public get id(): string { - return this.#id; + return this._id; } /** @@ -249,7 +249,7 @@ export class AbstractBlock< ) { JWT_DEV && logger(`insertChildren: start`); - if (block.id === this.#id) return; // avoid self-reference + if (block.id === this._id) return; // avoid self-reference if ( this.type !== BlockTypes.block || // binary cannot insert subblocks (block.type !== BlockTypes.block && @@ -367,6 +367,6 @@ export class AbstractBlock< * TODO: scoped history */ public get history(): HistoryManager { - return this.#history; + return this._history; } } diff --git a/libs/datasource/jwt/src/block/base.ts b/libs/datasource/jwt/src/block/base.ts index 23a251fe24..cf79c08ea7 100644 --- a/libs/datasource/jwt/src/block/base.ts +++ b/libs/datasource/jwt/src/block/base.ts @@ -51,24 +51,24 @@ export class BaseBlock< B extends BlockInstance, C extends ContentOperation > extends AbstractBlock { - readonly #exporters?: Exporters; - readonly #content_exporters_getter: () => Map< + readonly _exporters?: Exporters; + readonly _contentExportersGetter: () => Map< string, ReadableContentExporter >; - readonly #metadata_exporters_getter: () => Map< + readonly _metadataExportersGetter: () => Map< string, ReadableContentExporter< Array<[string, number | string | string[]]>, any > >; - readonly #tag_exporters_getter: () => Map< + readonly _tagExportersGetter: () => Map< string, ReadableContentExporter >; - #validators: Map = new Map(); + validators: Map = new Map(); constructor( block: B, @@ -78,12 +78,11 @@ export class BaseBlock< ) { super(block, root, parent); - this.#exporters = exporters; - this.#content_exporters_getter = () => - new Map(exporters?.content(block)); - this.#metadata_exporters_getter = () => + this._exporters = exporters; + this._contentExportersGetter = () => new Map(exporters?.content(block)); + this._metadataExportersGetter = () => new Map(exporters?.metadata(block)); - this.#tag_exporters_getter = () => new Map(exporters?.tag(block)); + this._tagExportersGetter = () => new Map(exporters?.tag(block)); } get parent() { @@ -158,14 +157,14 @@ export class BaseBlock< setValidator(key: string, validator?: Validator) { if (validator) { - this.#validators.set(key, validator); + this.validators.set(key, validator); } else { - this.#validators.delete(key); + this.validators.delete(key); } } private validate(key: string, value: unknown): boolean { - const validate = this.#validators.get(key); + const validate = this.validators.get(key); if (validate) { return validate(value) === false ? false : true; } @@ -185,13 +184,13 @@ export class BaseBlock< */ private get_children_instance(blockId?: string): BaseBlock[] { return this.get_children(blockId).map( - block => new BaseBlock(block, this.root, this, this.#exporters) + block => new BaseBlock(block, this.root, this, this._exporters) ); } private get_indexable_metadata() { const metadata: Record = {}; - for (const [name, exporter] of this.#metadata_exporters_getter()) { + for (const [name, exporter] of this._metadataExportersGetter()) { try { for (const [key, val] of exporter(this.getContent())) { metadata[key] = val; @@ -226,7 +225,7 @@ export class BaseBlock< private get_indexable_content(): string | undefined { const contents = []; - for (const [name, exporter] of this.#content_exporters_getter()) { + for (const [name, exporter] of this._contentExportersGetter()) { try { const content = exporter(this.getContent()); if (content) contents.push(content); @@ -246,7 +245,7 @@ export class BaseBlock< private get_indexable_tags(): string[] { const tags: string[] = []; - for (const [name, exporter] of this.#tag_exporters_getter()) { + for (const [name, exporter] of this._tagExportersGetter()) { try { tags.push(...exporter(this.getContent())); } catch (err) { diff --git a/libs/datasource/jwt/src/block/indexer.ts b/libs/datasource/jwt/src/block/indexer.ts index cc887eb6e9..39dd52c4e0 100644 --- a/libs/datasource/jwt/src/block/indexer.ts +++ b/libs/datasource/jwt/src/block/indexer.ts @@ -1,3 +1,5 @@ +/* eslint-disable max-lines */ +import { createNewSortInstance } from 'fast-sort'; import { deflateSync, inflateSync, strToU8, strFromU8 } from 'fflate'; import { Document as DocumentIndexer, DocumentSearchOptions } from 'flexsearch'; import { get, set, keys, del, createStore } from 'idb-keyval'; @@ -21,6 +23,13 @@ declare const JWT_DEV: boolean; const logger = getLogger('BlockDB:indexing'); const logger_debug = getLogger('debug:BlockDB:indexing'); +const naturalSort = createNewSortInstance({ + comparer: new Intl.Collator(undefined, { + numeric: true, + sensitivity: 'base', + }).compare, +}); + type ChangedState = ChangedStates extends Map ? R : never; export type BlockMetadata = QueryMetadata & { readonly id: string }; @@ -87,25 +96,29 @@ type BlockIndexedContent = { query: QueryMetadata; }; -export type QueryIndexMetadata = Query; +export type QueryIndexMetadata = Query & { + $sort?: string; + $desc?: boolean; + $limit?: number; +}; export class BlockIndexer< A extends AsyncDatabaseAdapter, B extends BlockInstance, C extends ContentOperation > { - readonly #adapter: A; - readonly #idb: BlockIdbInstance; + readonly _adapter: A; + readonly _idb: BlockIdbInstance; - readonly #block_indexer: DocumentIndexer; - readonly #block_metadata: LRUCache; - readonly #event_bus: BlockEventBus; + readonly _blockIndexer: DocumentIndexer; + readonly _blockMetadata: LRUCache; + readonly _eventBus: BlockEventBus; - readonly #block_builder: ( + readonly _blockBuilder: ( block: BlockInstance ) => Promise>; - readonly #delay_index: { documents: Map> }; + readonly _delayIndex: { documents: Map> }; constructor( adapter: A, @@ -113,10 +126,10 @@ export class BlockIndexer< block_builder: (block: BlockInstance) => Promise>, event_bus: BlockEventBus ) { - this.#adapter = adapter; - this.#idb = initIndexIdb(workspace); + this._adapter = adapter; + this._idb = initIndexIdb(workspace); - this.#block_indexer = new DocumentIndexer({ + this._blockIndexer = new DocumentIndexer({ document: { id: 'id', index: ['content', 'reference'], @@ -126,23 +139,23 @@ export class BlockIndexer< tokenize: 'forward', context: true, }); - this.#block_metadata = new LRUCache({ + this._blockMetadata = new LRUCache({ max: 10240, ttl: 1000 * 60 * 30, }); - this.#block_builder = block_builder; - this.#event_bus = event_bus; + this._blockBuilder = block_builder; + this._eventBus = event_bus; - this.#delay_index = { documents: new Map() }; + this._delayIndex = { documents: new Map() }; - this.#event_bus + this._eventBus .topic('reindex') .on('reindex', this.content_reindex.bind(this), { debounce: { wait: 1000, maxWait: 1000 * 10 }, }); - this.#event_bus + this._eventBus .topic('save_index') .on('save_index', this.save_index.bind(this), { debounce: { wait: 1000 * 10, maxWait: 1000 * 20 }, @@ -152,8 +165,8 @@ export class BlockIndexer< private async content_reindex() { const paddings: Record = {}; - this.#delay_index.documents = produce( - this.#delay_index.documents, + this._delayIndex.documents = produce( + this._delayIndex.documents, draft => { for (const [k, block] of draft) { paddings[k] = { @@ -166,11 +179,11 @@ export class BlockIndexer< ); for (const [key, { index, query }] of Object.entries(paddings)) { if (index.content) { - await this.#block_indexer.addAsync(key, index); - this.#block_metadata.set(key, query); + await this._blockIndexer.addAsync(key, index); + this._blockMetadata.set(key, query); } } - this.#event_bus.topic('save_index').emit(); + this._eventBus.topic('save_index').emit(); } private async refresh_index(block: BaseBlock) { @@ -185,14 +198,14 @@ export class BlockIndexer< BlockFlavors.reference, ]; if (filter.includes(block.flavor)) { - this.#delay_index.documents = produce( - this.#delay_index.documents, + this._delayIndex.documents = produce( + this._delayIndex.documents, draft => { draft.set(block.id, block); } ); - this.#event_bus.topic('reindex').emit(); + this._eventBus.topic('reindex').emit(); return true; } logger_debug(`skip index ${block.flavor}: ${block.id}`); @@ -202,19 +215,19 @@ export class BlockIndexer< async refreshIndex(id: string, state: ChangedState) { JWT_DEV && logger(`refreshArticleIndex: ${id}`); if (state === 'delete') { - this.#delay_index.documents = produce( - this.#delay_index.documents, + this._delayIndex.documents = produce( + this._delayIndex.documents, draft => { - this.#block_indexer.remove(id); - this.#block_metadata.delete(id); + this._blockIndexer.remove(id); + this._blockMetadata.delete(id); draft.delete(id); } ); return; } - const block = await this.#adapter.getBlock(id); + const block = await this._adapter.getBlock(id); if (block?.id === id) { - if (await this.refresh_index(await this.#block_builder(block))) { + if (await this.refresh_index(await this._blockBuilder(block))) { JWT_DEV && logger( state @@ -230,43 +243,43 @@ export class BlockIndexer< } async loadIndex() { - for (const key of await this.#idb.index.keys()) { - const content = await this.#idb.index.get(key); + for (const key of await this._idb.index.keys()) { + const content = await this._idb.index.get(key); if (content) { const decoded = strFromU8(inflateSync(new Uint8Array(content))); try { - await this.#block_indexer.import(key, decoded as any); + await this._blockIndexer.import(key, decoded as any); } catch (e) { console.error(`Failed to load index ${key}`, e); } } } - for (const key of await this.#idb.metadata.keys()) { - const content = await this.#idb.metadata.get(key); + for (const key of await this._idb.metadata.keys()) { + const content = await this._idb.metadata.get(key); if (content) { const decoded = strFromU8(inflateSync(new Uint8Array(content))); try { - await this.#block_indexer.import(key, JSON.parse(decoded)); + await this._blockIndexer.import(key, JSON.parse(decoded)); } catch (e) { console.error(`Failed to load index ${key}`, e); } } } - return Array.from(this.#block_metadata.keys()); + return Array.from(this._blockMetadata.keys()); } private async save_index() { - const idb = this.#idb; + const idb = this._idb; await idb.index .keys() .then(keys => Promise.all(keys.map(key => idb.index.delete(key)))); - await this.#block_indexer.export((key, data) => { + await this._blockIndexer.export((key, data) => { return idb.index.set( String(key), deflateSync(strToU8(data as any)) ); }); - const metadata = this.#block_metadata; + const metadata = this._blockMetadata; await idb.metadata .keys() .then(keys => @@ -286,7 +299,7 @@ export class BlockIndexer< public async inspectIndex() { const index: Record = {}; - await this.#block_indexer.export((key, data) => { + await this._blockIndexer.export((key, data) => { index[key] = data; }); } @@ -296,21 +309,52 @@ export class BlockIndexer< | string | Partial> ) { - return this.#block_indexer.search(part_of_title_or_content as string); + return this._blockIndexer.search(part_of_title_or_content as string); + } + + private _testMetaKey(key: string) { + try { + const metadata = this._blockMetadata.values().next().value; + if (!metadata || typeof metadata !== 'object') return false; + return !!(key in metadata); + } catch (e) { + return false; + } + } + + private _getSortedMetadata(sort: string, desc?: boolean) { + const sorter = naturalSort(Array.from(this._blockMetadata.entries())); + if (desc) return sorter.desc(([, m]) => m[sort]); + else return sorter.asc(([, m]) => m[sort]); } public query(query: QueryIndexMetadata) { const matches: string[] = []; - const filter = sift(query); - this.#block_metadata.forEach((value, key) => { - if (filter(value)) matches.push(key); - }); - return matches; + const { $sort, $desc, $limit, ...condition } = query; + const filter = sift(condition); + const limit = $limit || this._blockMetadata.size; + + if ($sort && this._testMetaKey($sort)) { + const metadata = this._getSortedMetadata($sort, $desc); + metadata.forEach(([key, value]) => { + if (matches.length > limit) return; + if (filter(value)) matches.push(key); + }); + + return matches; + } else { + this._blockMetadata.forEach((value, key) => { + if (matches.length > limit) return; + if (filter(value)) matches.push(key); + }); + + return matches; + } } public getMetadata(ids: string[]): Array { return ids - .filter(id => this.#block_metadata.has(id)) - .map(id => ({ ...this.#block_metadata.get(id)!, id })); + .filter(id => this._blockMetadata.has(id)) + .map(id => ({ ...this._blockMetadata.get(id)!, id })); } } diff --git a/libs/datasource/jwt/src/index.ts b/libs/datasource/jwt/src/index.ts index c8d868cff7..343f1f79ad 100644 --- a/libs/datasource/jwt/src/index.ts +++ b/libs/datasource/jwt/src/index.ts @@ -69,14 +69,14 @@ export class BlockClient< B extends BlockInstance, C extends ContentOperation > { - readonly #adapter: A; - readonly #workspace: string; + readonly _adapter: A; + readonly _workspace: string; // Maximum cache Block 8192, ttl 30 minutes - readonly #block_caches: LRUCache>; - readonly #block_indexer: BlockIndexer; + readonly _blockCaches: LRUCache>; + readonly _blockIndexer: BlockIndexer; - readonly #exporters: { + readonly _exporters: { readonly content: BlockExporters; readonly metadata: BlockExporters< Array<[string, number | string | string[]]> @@ -84,84 +84,83 @@ export class BlockClient< readonly tag: BlockExporters; }; - readonly #event_bus: BlockEventBus; + readonly _eventBus: BlockEventBus; - readonly #parent_mapping: Map; - readonly #page_mapping: Map; + readonly _parentMapping: Map; + readonly _pageMapping: Map; - readonly #root: { node?: BaseBlock }; + readonly _root: { node?: BaseBlock }; private constructor( adapter: A, workspace: string, options?: BlockClientOptions ) { - this.#adapter = adapter; - this.#workspace = workspace; + this._adapter = adapter; + this._workspace = workspace; - this.#block_caches = new LRUCache({ max: 8192, ttl: 1000 * 60 * 30 }); + this._blockCaches = new LRUCache({ max: 8192, ttl: 1000 * 60 * 30 }); - this.#exporters = { + this._exporters = { content: options?.content || new Map(), metadata: options?.metadata || new Map(), tag: options?.tagger || new Map(), }; - this.#event_bus = new BlockEventBus(); + this._eventBus = new BlockEventBus(); - this.#block_indexer = new BlockIndexer( - this.#adapter, - this.#workspace, + this._blockIndexer = new BlockIndexer( + this._adapter, + this._workspace, this.block_builder.bind(this), - this.#event_bus.topic('indexer') + this._eventBus.topic('indexer') ); - this.#parent_mapping = new Map(); - this.#page_mapping = new Map(); - this.#adapter.on('editing', (states: ChangedStates) => - this.#event_bus.topic('editing').emit(states) + this._parentMapping = new Map(); + this._pageMapping = new Map(); + this._adapter.on('editing', (states: ChangedStates) => + this._eventBus.topic('editing').emit(states) ); - this.#adapter.on('updated', (states: ChangedStates) => - this.#event_bus.topic('updated').emit(states) + this._adapter.on('updated', (states: ChangedStates) => + this._eventBus.topic('updated').emit(states) ); - this.#adapter.on( + this._adapter.on( 'connectivity', (states: ChangedStates) => - this.#event_bus.topic('connectivity').emit(states) + this._eventBus.topic('connectivity').emit(states) ); - this.#event_bus + this._eventBus .topic('rebuild_index') .on('rebuild_index', this.rebuild_index.bind(this), { debounce: { wait: 1000, maxWait: 1000 }, }); - this.#root = {}; + this._root = {}; } public addBlockListener(tag: string, listener: BlockListener) { - const bus = this.#event_bus.topic('updated'); + const bus = this._eventBus.topic('updated'); if (tag !== 'index' || !bus.has(tag)) bus.on(tag, listener); else console.error(`block listener ${tag} is reserved or exists`); } public removeBlockListener(tag: string) { - this.#event_bus.topic('updated').off(tag); + this._eventBus.topic('updated').off(tag); } public addEditingListener( tag: string, listener: BlockListener> ) { - const bus = - this.#event_bus.topic>>('editing'); + const bus = this._eventBus.topic>>('editing'); if (tag !== 'index' || !bus.has(tag)) bus.on(tag, listener); else console.error(`editing listener ${tag} is reserved or exists`); } public removeEditingListener(tag: string) { - this.#event_bus.topic('editing').off(tag); + this._eventBus.topic('editing').off(tag); } public addConnectivityListener( @@ -169,31 +168,31 @@ export class BlockClient< listener: BlockListener ) { const bus = - this.#event_bus.topic>('connectivity'); + this._eventBus.topic>('connectivity'); if (tag !== 'index' || !bus.has(tag)) bus.on(tag, listener); else console.error(`connectivity listener ${tag} is reserved or exists`); } public removeConnectivityListener(tag: string) { - this.#event_bus.topic('connectivity').off(tag); + this._eventBus.topic('connectivity').off(tag); } private inspector() { return { - ...this.#adapter.inspector(), - indexed: () => this.#block_indexer.inspectIndex(), + ...this._adapter.inspector(), + indexed: () => this._blockIndexer.inspectIndex(), }; } private async rebuild_index(exists_ids?: string[]) { JWT_DEV && logger(`rebuild index`); - const blocks = await this.#adapter.getBlockByType(BlockTypes.block); + const blocks = await this._adapter.getBlockByType(BlockTypes.block); const excluded = exists_ids || []; await Promise.all( blocks .filter(id => !excluded.includes(id)) - .map(id => this.#block_indexer.refreshIndex(id, 'add')) + .map(id => this._blockIndexer.refreshIndex(id, 'add')) ); } @@ -201,13 +200,13 @@ export class BlockClient< JWT_DEV && logger(`buildIndex: start`); // Skip the block index that exists in the metadata, assuming that the index of the block existing in the metadata is the latest, and modify this part if there is a problem // Although there may be cases where the index is refreshed but the metadata is not refreshed, re-indexing will be automatically triggered after the block is changed - const exists_ids = await this.#block_indexer.loadIndex(); + const exists_ids = await this._blockIndexer.loadIndex(); await this.rebuild_index(exists_ids); this.addBlockListener('index', async states => { await Promise.allSettled( Array.from(states.entries()).map(([id, state]) => { - if (state === 'delete') this.#block_caches.delete(id); - return this.#block_indexer.refreshIndex(id, state); + if (state === 'delete') this._blockCaches.delete(id); + return this._blockIndexer.refreshIndex(id, state); }) ); }); @@ -223,10 +222,10 @@ export class BlockClient< ): Promise>> { JWT_DEV && logger(`getByType: ${block_type}`); const ids = [ - ...this.#block_indexer.query({ + ...this._blockIndexer.query({ type: BlockTypes[block_type as BlockTypeKeys], }), - ...this.#block_indexer.query({ + ...this._blockIndexer.query({ flavor: BlockFlavors[block_type as BlockFlavorKeys], }), ]; @@ -256,7 +255,7 @@ export class BlockClient< | string | Partial> ) { - return this.#block_indexer.search(part_of_title_or_content); + return this._blockIndexer.search(part_of_title_or_content); } /** @@ -278,7 +277,7 @@ export class BlockClient< const promised_pages = await Promise.all( this.search(part_of_title_or_content).flatMap(({ result }) => result.map(async id => { - const page = this.#page_mapping.get(id as string); + const page = this._pageMapping.get(id as string); if (page) return page; const block = await this.get(id as BlockTypeKeys); return this.set_page(block); @@ -289,9 +288,9 @@ export class BlockClient< ...new Set(promised_pages.filter((v): v is string => !!v)), ]; return Promise.all( - this.#block_indexer.getMetadata(pages).map(async page => ({ + this._blockIndexer.getMetadata(pages).map(async page => ({ content: this.get_decoded_content( - await this.#adapter.getBlock(page.id) + await this._adapter.getBlock(page.id) ), ...page, })) @@ -303,7 +302,19 @@ export class BlockClient< * @returns array of search results */ public query(query: QueryIndexMetadata): string[] { - return this.#block_indexer.query(query); + return this._blockIndexer.query(query); + } + + public queryBlocks(query: QueryIndexMetadata): Promise { + const ids = this.query(query); + return Promise.all( + this._blockIndexer.getMetadata(ids).map(async page => ({ + content: this.get_decoded_content( + await this._adapter.getBlock(page.id) + ), + ...page, + })) + ); } /** @@ -330,12 +341,12 @@ export class BlockClient< * @returns block instance */ public async getWorkspace() { - if (!this.#root.node) { - this.#root.node = await this.get_named_block(this.#workspace, { + if (!this._root.node) { + this._root.node = await this.get_named_block(this._workspace, { workspace: true, }); } - return this.#root.node; + return this._root.node; } /** @@ -348,38 +359,38 @@ export class BlockClient< } private async get_parent(id: string) { - const parents = this.#parent_mapping.get(id); + const parents = this._parentMapping.get(id); if (parents) { const parent_block_id = parents[0]; - if (!this.#block_caches.has(parent_block_id)) { - this.#block_caches.set( + if (!this._blockCaches.has(parent_block_id)) { + this._blockCaches.set( parent_block_id, await this.get(parent_block_id as BlockTypeKeys) ); } - return this.#block_caches.get(parent_block_id); + return this._blockCaches.get(parent_block_id); } return undefined; } private set_parent(parent: string, child: string) { - const parents = this.#parent_mapping.get(child); + const parents = this._parentMapping.get(child); if (parents?.length) { if (!parents.includes(parent)) { console.error('parent already exists', child, parents); - this.#parent_mapping.set(child, [...parents, parent]); + this._parentMapping.set(child, [...parents, parent]); } } else { - this.#parent_mapping.set(child, [parent]); + this._parentMapping.set(child, [parent]); } } private set_page(block: BaseBlock) { - const page = this.#page_mapping.get(block.id); + const page = this._pageMapping.get(block.id); if (page) return page; const parent_page = block.parent_page; if (parent_page) { - this.#page_mapping.set(block.id, parent_page); + this._pageMapping.set(block.id, parent_page); return parent_page; } return undefined; @@ -390,13 +401,13 @@ export class BlockClient< matcher: BlockMatcher, exporter: ReadableContentExporter ) { - this.#exporters.content.set(name, [matcher, exporter]); - this.#event_bus.topic('rebuild_index').emit(); // // rebuild the index every time the content exporter is registered + this._exporters.content.set(name, [matcher, exporter]); + this._eventBus.topic('rebuild_index').emit(); // // rebuild the index every time the content exporter is registered } unregisterContentExporter(name: string) { - this.#exporters.content.delete(name); - this.#event_bus.topic('rebuild_index').emit(); // Rebuild indexes every time content exporter logs out + this._exporters.content.delete(name); + this._eventBus.topic('rebuild_index').emit(); // Rebuild indexes every time content exporter logs out } registerMetadataExporter( @@ -407,13 +418,13 @@ export class BlockClient< T > ) { - this.#exporters.metadata.set(name, [matcher, exporter]); - this.#event_bus.topic('rebuild_index').emit(); // // rebuild the index every time the content exporter is registered + this._exporters.metadata.set(name, [matcher, exporter]); + this._eventBus.topic('rebuild_index').emit(); // // rebuild the index every time the content exporter is registered } unregisterMetadataExporter(name: string) { - this.#exporters.metadata.delete(name); - this.#event_bus.topic('rebuild_index').emit(); // Rebuild indexes every time content exporter logs out + this._exporters.metadata.delete(name); + this._eventBus.topic('rebuild_index').emit(); // Rebuild indexes every time content exporter logs out } registerTagExporter( @@ -421,13 +432,13 @@ export class BlockClient< matcher: BlockMatcher, exporter: ReadableContentExporter ) { - this.#exporters.tag.set(name, [matcher, exporter]); - this.#event_bus.topic('rebuild_index').emit(); // Reindex every tag exporter registration + this._exporters.tag.set(name, [matcher, exporter]); + this._eventBus.topic('rebuild_index').emit(); // Reindex every tag exporter registration } unregisterTagExporter(name: string) { - this.#exporters.tag.delete(name); - this.#event_bus.topic('rebuild_index').emit(); // Reindex every time tag exporter logs out + this._exporters.tag.delete(name); + this._eventBus.topic('rebuild_index').emit(); // Reindex every time tag exporter logs out } private get_exporters( @@ -453,7 +464,7 @@ export class BlockClient< private get_decoded_content(block?: BlockInstance) { if (block) { const [exporter] = this.get_exporters( - this.#exporters.content, + this._exporters.content, block ); if (exporter) { @@ -474,10 +485,10 @@ export class BlockClient< (await this.get_parent(block.id)) || root, { content: block => - this.get_exporters(this.#exporters.content, block), + this.get_exporters(this._exporters.content, block), metadata: block => - this.get_exporters(this.#exporters.metadata, block), - tag: block => this.get_exporters(this.#exporters.tag, block), + this.get_exporters(this._exporters.metadata, block), + tag: block => this.get_exporters(this._exporters.tag, block), } ); } @@ -506,13 +517,13 @@ export class BlockClient< binary, [namedUuid]: is_named_uuid, } = options || {}; - if (block_id_or_type && this.#block_caches.has(block_id_or_type)) { - return this.#block_caches.get(block_id_or_type) as BaseBlock; + if (block_id_or_type && this._blockCaches.has(block_id_or_type)) { + return this._blockCaches.get(block_id_or_type) as BaseBlock; } else { const block = (block_id_or_type && - (await this.#adapter.getBlock(block_id_or_type))) || - (await this.#adapter.createBlock({ + (await this._adapter.getBlock(block_id_or_type))) || + (await this._adapter.createBlock({ uuid: is_named_uuid ? block_id_or_type : undefined, binary, type: @@ -540,7 +551,11 @@ export class BlockClient< this.set_parent(parent, abstract_block.id); this.set_page(abstract_block); }); - this.#block_caches.set(abstract_block.id, abstract_block); + this._blockCaches.set(abstract_block.id, abstract_block); + + if (root && abstract_block.flavor === BlockFlavors.page) { + root.insertChildren(abstract_block); + } return abstract_block; } } @@ -548,15 +563,15 @@ export class BlockClient< public async getBlockByFlavor( flavor: BlockItem['flavor'] ): Promise { - return await this.#adapter.getBlockByFlavor(flavor); + return await this._adapter.getBlockByFlavor(flavor); } public getUserId(): string { - return this.#adapter.getUserId(); + return this._adapter.getUserId(); } public has(block_ids: string[]): Promise { - return this.#adapter.checkBlocks(block_ids); + return this._adapter.checkBlocks(block_ids); } /** @@ -564,11 +579,11 @@ export class BlockClient< * @param suspend true: suspend monitoring, false: resume monitoring */ suspend(suspend: boolean) { - this.#adapter.suspend(suspend); + this._adapter.suspend(suspend); } public get history(): HistoryManager { - return this.#adapter.history(); + return this._adapter.history(); } public static async init( diff --git a/libs/datasource/jwt/src/utils/event-bus.ts b/libs/datasource/jwt/src/utils/event-bus.ts index e37c41404c..9d128049e7 100644 --- a/libs/datasource/jwt/src/utils/event-bus.ts +++ b/libs/datasource/jwt/src/utils/event-bus.ts @@ -7,14 +7,14 @@ declare const JWT_DEV: boolean; const logger = getLogger('BlockDB:event_bus'); export class BlockEventBus { - readonly #event_bus: EventTarget; - readonly #event_callback_cache: Map; - readonly #scoped_cache: Map>; + readonly _eventBus: EventTarget; + readonly _eventCallbackCache: Map; + readonly _scopedCache: Map>; constructor(event_bus?: EventTarget) { - this.#event_bus = event_bus || new EventTarget(); - this.#event_callback_cache = new Map(); - this.#scoped_cache = new Map(); + this._eventBus = event_bus || new EventTarget(); + this._eventCallbackCache = new Map(); + this._scopedCache = new Map(); } protected on_listener( @@ -23,9 +23,9 @@ export class BlockEventBus { listener: (e: Event) => void ) { const handler_name = `${topic}/${name}`; - if (!this.#event_callback_cache.has(handler_name)) { - this.#event_bus.addEventListener(topic, listener); - this.#event_callback_cache.set(handler_name, listener); + if (!this._eventCallbackCache.has(handler_name)) { + this._eventBus.addEventListener(topic, listener); + this._eventCallbackCache.set(handler_name, listener); } else { JWT_DEV && logger(`event handler ${handler_name} is existing`); } @@ -33,27 +33,27 @@ export class BlockEventBus { protected off_listener(topic: string, name: string) { const handler_name = `${topic}/${name}`; - const listener = this.#event_callback_cache.get(handler_name); + const listener = this._eventCallbackCache.get(handler_name); if (listener) { - this.#event_bus.removeEventListener(topic, listener); - this.#event_callback_cache.delete(handler_name); + this._eventBus.removeEventListener(topic, listener); + this._eventCallbackCache.delete(handler_name); } else { JWT_DEV && logger(`event handler ${handler_name} is not existing`); } } protected has_listener(topic: string, name: string) { - return this.#event_callback_cache.has(`${topic}/${name}`); + return this._eventCallbackCache.has(`${topic}/${name}`); } protected emit_event(topic: string, detail?: T) { - this.#event_bus.dispatchEvent(new CustomEvent(topic, { detail })); + this._eventBus.dispatchEvent(new CustomEvent(topic, { detail })); } topic(topic: string): BlockScopedEventBus { return ( - this.#scoped_cache.get(topic) || - new BlockScopedEventBus(topic, this.#event_bus) + this._scopedCache.get(topic) || + new BlockScopedEventBus(topic, this._eventBus) ); } } @@ -68,11 +68,11 @@ type ListenerOptions = { }; class BlockScopedEventBus extends BlockEventBus { - readonly #topic: string; + readonly _topic: string; constructor(topic: string, event_bus?: EventTarget) { super(event_bus); - this.#topic = topic; + this._topic = topic; } on( @@ -83,25 +83,25 @@ class BlockScopedEventBus extends BlockEventBus { if (options?.debounce) { const { wait, maxWait } = options.debounce; const debounced = debounce(listener, wait, { maxWait }); - this.on_listener(this.#topic, name, e => { + this.on_listener(this._topic, name, e => { debounced((e as CustomEvent)?.detail); }); } else { - this.on_listener(this.#topic, name, e => { + this.on_listener(this._topic, name, e => { listener((e as CustomEvent)?.detail); }); } } off(name: string) { - this.off_listener(this.#topic, name); + this.off_listener(this._topic, name); } has(name: string) { - return this.has_listener(this.#topic, name); + return this.has_listener(this._topic, name); } emit(detail?: T) { - this.emit_event(this.#topic, detail); + this.emit_event(this._topic, detail); } } diff --git a/package.json b/package.json index ed3aca9478..eb5ada9ccd 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "start:keck": "nx serve keck", "start:venus": "nx serve venus", "build": "nx build ligo-virgo", - "build:local": "env-cmd -f .env.local nx build ligo-virgo", + "build:local": "env-cmd -f .env.local-dev nx build ligo-virgo", "build:keck": "nx build keck", "build:venus": "nx build venus", "build:analytic": "cross-env BUNDLE_ANALYZER=true nx build --skip-nx-cache", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0121c3f933..852beb66c2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -188,7 +188,7 @@ importers: yjs: ^13.5.39 dependencies: authing-js-sdk: 4.23.33 - firebase-admin: 11.0.0 + firebase-admin: 11.0.0_@firebase+app-types@0.7.0 lib0: 0.2.51 lru-cache: 7.13.1 nanoid: 4.0.0 @@ -218,17 +218,23 @@ importers: '@emotion/react': ^11.10.0 '@emotion/styled': ^11.10.0 '@mui/joy': ^5.0.0-alpha.39 + image-minimizer-webpack-plugin: ^3.2.3 + imagemin: ^8.0.1 + imagemin-optipng: ^8.0.0 lozad: ^1.16.0 mini-css-extract-plugin: ^2.6.1 - webpack: ^5.73.0 + webpack: ^5.74.0 dependencies: '@emotion/react': 11.10.0 '@emotion/styled': 11.10.0_@emotion+react@11.10.0 '@mui/joy': 5.0.0-alpha.39_72v32ofbtgpmxm7mhvtx474vfu lozad: 1.16.0 devDependencies: - mini-css-extract-plugin: 2.6.1_webpack@5.73.0 - webpack: 5.73.0 + image-minimizer-webpack-plugin: 3.2.3_5emixpjl54fjyhdvj76qjbw4py + imagemin: 8.0.1 + imagemin-optipng: 8.0.0 + mini-css-extract-plugin: 2.6.1_webpack@5.74.0 + webpack: 5.74.0 libs/components/account: specifiers: @@ -566,6 +572,7 @@ importers: '@types/wicg-file-system-access': ^2020.9.5 buffer: ^6.0.3 debug: ^4.3.4 + fast-sort: ^3.2.0 fflate: ^0.7.3 file-saver: ^2.0.5 file-selector: ^0.6.0 @@ -586,6 +593,7 @@ importers: '@types/flexsearch': 0.7.3 buffer: 6.0.3 debug: 4.3.4 + fast-sort: 3.2.0 fflate: 0.7.3 idb-keyval: 6.2.0 immer: 9.0.15 @@ -3232,15 +3240,6 @@ packages: - utf-8-validate dev: true - /@firebase/auth-interop-types/0.1.6_@firebase+util@1.6.2: - resolution: {integrity: sha512-etIi92fW3CctsmR9e3sYM3Uqnoq861M0Id9mdOPF6PWIg38BXL5k4upCNBggGUpLIS0H1grMOvy/wn1xymwe2g==} - peerDependencies: - '@firebase/app-types': 0.x - '@firebase/util': 1.x - dependencies: - '@firebase/util': 1.6.2 - dev: false - /@firebase/auth-interop-types/0.1.6_ee7bhenjigpuz3jknhp5542foa: resolution: {integrity: sha512-etIi92fW3CctsmR9e3sYM3Uqnoq861M0Id9mdOPF6PWIg38BXL5k4upCNBggGUpLIS0H1grMOvy/wn1xymwe2g==} peerDependencies: @@ -3249,7 +3248,6 @@ packages: dependencies: '@firebase/app-types': 0.7.0 '@firebase/util': 1.6.2 - dev: true /@firebase/auth-types/0.11.0_ee7bhenjigpuz3jknhp5542foa: resolution: {integrity: sha512-q7Bt6cx+ySj9elQHTsKulwk3+qDezhzRBFC9zlQ1BjgMueUOnGMcvqmU0zuKlQ4RhLSH7MNAdBV2znVaoN3Vxw==} @@ -3285,19 +3283,6 @@ packages: '@firebase/util': 1.6.2 tslib: 2.4.0 - /@firebase/database-compat/0.2.2: - resolution: {integrity: sha512-3wLHJ54WHMhrveCywCMbkspshFezN07PLOIsmqELM1+pmrg3bwMj9u/o3Equ0DwmESMnchp5sMxgzdBUOextJg==} - dependencies: - '@firebase/component': 0.5.16 - '@firebase/database': 0.13.2 - '@firebase/database-types': 0.9.10 - '@firebase/logger': 0.3.3 - '@firebase/util': 1.6.2 - tslib: 2.4.0 - transitivePeerDependencies: - - '@firebase/app-types' - dev: false - /@firebase/database-compat/0.2.2_@firebase+app-types@0.7.0: resolution: {integrity: sha512-3wLHJ54WHMhrveCywCMbkspshFezN07PLOIsmqELM1+pmrg3bwMj9u/o3Equ0DwmESMnchp5sMxgzdBUOextJg==} dependencies: @@ -3309,7 +3294,6 @@ packages: tslib: 2.4.0 transitivePeerDependencies: - '@firebase/app-types' - dev: true /@firebase/database-types/0.9.10: resolution: {integrity: sha512-2ji6nXRRsY+7hgU6zRhUtK0RmSjVWM71taI7Flgaw+BnopCo/lDF5HSwxp8z7LtiHlvQqeRA3Ozqx5VhlAbiKg==} @@ -3317,19 +3301,6 @@ packages: '@firebase/app-types': 0.7.0 '@firebase/util': 1.6.2 - /@firebase/database/0.13.2: - resolution: {integrity: sha512-wKkBD4rq6PPv9gl1hNJNpl0R0bwJmXCJfDuvotjXmTcU7kV0AIaJ45GVhULkbSCApAAFC6QUJ91oasDUO1ZVxw==} - dependencies: - '@firebase/auth-interop-types': 0.1.6_@firebase+util@1.6.2 - '@firebase/component': 0.5.16 - '@firebase/logger': 0.3.3 - '@firebase/util': 1.6.2 - faye-websocket: 0.11.4 - tslib: 2.4.0 - transitivePeerDependencies: - - '@firebase/app-types' - dev: false - /@firebase/database/0.13.2_@firebase+app-types@0.7.0: resolution: {integrity: sha512-wKkBD4rq6PPv9gl1hNJNpl0R0bwJmXCJfDuvotjXmTcU7kV0AIaJ45GVhULkbSCApAAFC6QUJ91oasDUO1ZVxw==} dependencies: @@ -3341,7 +3312,6 @@ packages: tslib: 2.4.0 transitivePeerDependencies: - '@firebase/app-types' - dev: true /@firebase/firestore-compat/0.1.20_2whj6v3knk7rswcmdbn5bdkgna: resolution: {integrity: sha512-0+WAh+pjCi0t/DK5cefECiwQGiZbrAU2UenZ61Uly1w7L5ob932Qc61OQKk+Y2VD+IQ7YPcBpUM7X6JOSbgJ6g==} @@ -6041,6 +6011,11 @@ packages: resolution: {integrity: sha512-AFBVi/iT4g20DHoujvMH1aEDn8fGJh4xsRGCP6d8RpLPMqsNPvW01Jcn0QysXTsg++/xj25NmJsGyH9xug/wKg==} dev: true + /@sindresorhus/is/0.7.0: + resolution: {integrity: sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow==} + engines: {node: '>=4'} + dev: true + /@sindresorhus/is/4.6.0: resolution: {integrity: sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==} engines: {node: '>=10'} @@ -6512,6 +6487,10 @@ packages: resolution: {integrity: sha512-qM6Z9RvkLFFEzr91mmsA4HI14msyDgDDOu36csIzG5BYu2bFmEz5siQ8WntHgDtUjzJHP+VSSOTbAXhklEZHLA==} dev: false + /@tokenizer/token/0.3.0: + resolution: {integrity: sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==} + dev: true + /@tootallnate/once/1.1.2: resolution: {integrity: sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==} engines: {node: '>= 6'} @@ -6630,12 +6609,12 @@ packages: resolution: {integrity: sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==} dependencies: '@types/eslint': 8.4.5 - '@types/estree': 0.0.51 + '@types/estree': 0.0.52 /@types/eslint/8.4.5: resolution: {integrity: sha512-dhsC09y1gpJWnK+Ff4SGvCuSnk9DaU0BJZSzOwa6GVSg65XtTugLBITDAAzRU5duGBoXBHpdR/9jHGxJjNflJQ==} dependencies: - '@types/estree': 0.0.51 + '@types/estree': 0.0.52 '@types/json-schema': 7.0.11 /@types/estree/0.0.39: @@ -6646,7 +6625,6 @@ packages: /@types/estree/0.0.52: resolution: {integrity: sha512-BZWrtCU0bMVAIliIV+HJO1f1PR41M7NKjfxrFJwwhKI1KwhwOxYw1SXg9ao+CIMt774nFuGiG6eU+udtbEI9oQ==} - dev: true /@types/express-serve-static-core/4.17.29: resolution: {integrity: sha512-uMd++6dMKS32EOuw1Uli3e3BPgdLIXmezcfHv7N4c1s3gkhikBplORPpMq3fuWkxncZN1reb16d5n8yhQ80x7Q==} @@ -6763,7 +6741,6 @@ packages: resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==} dependencies: '@types/node': 18.0.1 - dev: false /@types/lodash-es/4.17.6: resolution: {integrity: sha512-R+zTeVUKDdfoRxpAryaQNRKk3105Rrgx2CFRClIgRGaqDTdjsm8h6IYA8ir584W3ePzkZfst5xIgDwYrlh9HLg==} @@ -6887,7 +6864,6 @@ packages: resolution: {integrity: sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==} dependencies: '@types/node': 18.0.1 - dev: false /@types/retry/0.12.0: resolution: {integrity: sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==} @@ -7505,6 +7481,17 @@ packages: resolution: {integrity: sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==} dev: true + /arch/2.2.0: + resolution: {integrity: sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==} + dev: true + + /archive-type/4.0.0: + resolution: {integrity: sha512-zV4Ky0v1F8dBrdYElwTvQhweQ0P7Kwc1aluqJsYtOBP01jXcWCyW2IEfI1YiqsG+Iy7ZR+o5LF1N+PGECBxHWA==} + engines: {node: '>=4'} + dependencies: + file-type: 4.4.0 + dev: true + /are-we-there-yet/1.1.7: resolution: {integrity: sha512-nxwy40TuMiUGqMyRHgCSWZ9FM4VAoRP4xUYSTv5ImRog+h9yISPbVH7H8fASCIzYn9wlEv4zvFL7uKDMCFQm3g==} dependencies: @@ -7567,6 +7554,11 @@ packages: engines: {node: '>=8'} dev: true + /array-union/3.0.1: + resolution: {integrity: sha512-1OvF9IbWwaeiM9VhzYXVQacMibxpXOMYVNIvMtKRyX9SImBXpKcFr8XvFDeEslCyuH/t6KRt7HEO94AlP8Iatw==} + engines: {node: '>=12'} + dev: true + /array.prototype.flat/1.3.0: resolution: {integrity: sha512-12IUEkHsAhA4DY5s0FPgNXIdc8VRSqD9Zp78a5au9abH/SOBrsp082JOWFNTjkMozh8mqcdiKuaLGhPeYztxSw==} engines: {node: '>= 0.4'} @@ -8011,11 +8003,66 @@ packages: dev: false optional: true + /bin-build/3.0.0: + resolution: {integrity: sha512-jcUOof71/TNAI2uM5uoUaDq2ePcVBQ3R/qhxAz1rX7UfvduAL/RXD3jXzvn8cVcDJdGVkiR1shal3OH0ImpuhA==} + engines: {node: '>=4'} + dependencies: + decompress: 4.2.1 + download: 6.2.5 + execa: 0.7.0 + p-map-series: 1.0.0 + tempfile: 2.0.0 + dev: true + + /bin-check/4.1.0: + resolution: {integrity: sha512-b6weQyEUKsDGFlACWSIOfveEnImkJyK/FGW6FAG42loyoquvjdtOIqO6yBFzHyqyVVhNgNkQxxx09SFLK28YnA==} + engines: {node: '>=4'} + dependencies: + execa: 0.7.0 + executable: 4.1.1 + dev: true + + /bin-version-check/4.0.0: + resolution: {integrity: sha512-sR631OrhC+1f8Cvs8WyVWOA33Y8tgwjETNPyyD/myRBXLkfS/vl74FmH/lFcRl9KY3zwGh7jFhvyk9vV3/3ilQ==} + engines: {node: '>=6'} + dependencies: + bin-version: 3.1.0 + semver: 5.7.1 + semver-truncate: 1.1.2 + dev: true + + /bin-version/3.1.0: + resolution: {integrity: sha512-Mkfm4iE1VFt4xd4vH+gx+0/71esbfus2LsnCGe8Pi4mndSPyT+NGES/Eg99jx8/lUGWfu3z2yuB/bt5UB+iVbQ==} + engines: {node: '>=6'} + dependencies: + execa: 1.0.0 + find-versions: 3.2.0 + dev: true + + /bin-wrapper/4.1.0: + resolution: {integrity: sha512-hfRmo7hWIXPkbpi0ZltboCMVrU+0ClXR/JgbCKKjlDjQf6igXa7OwdqNcFWQZPZTgiY7ZpzE3+LjjkLiTN2T7Q==} + engines: {node: '>=6'} + dependencies: + bin-check: 4.1.0 + bin-version-check: 4.0.0 + download: 7.1.0 + import-lazy: 3.1.0 + os-filter-obj: 2.0.0 + pify: 4.0.1 + dev: true + /binary-extensions/2.2.0: resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} engines: {node: '>=8'} dev: true + /bl/1.2.3: + resolution: {integrity: sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww==} + dependencies: + readable-stream: 2.3.7 + safe-buffer: 5.2.1 + dev: true + /bl/4.1.0: resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} dependencies: @@ -8117,10 +8164,29 @@ packages: node-int64: 0.4.0 dev: true + /buffer-alloc-unsafe/1.1.0: + resolution: {integrity: sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==} + dev: true + + /buffer-alloc/1.2.0: + resolution: {integrity: sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==} + dependencies: + buffer-alloc-unsafe: 1.1.0 + buffer-fill: 1.0.0 + dev: true + + /buffer-crc32/0.2.13: + resolution: {integrity: sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==} + dev: true + /buffer-equal-constant-time/1.0.1: resolution: {integrity: sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=} dev: false + /buffer-fill/1.0.0: + resolution: {integrity: sha512-T7zexNBwiiaCOGDg9xNX9PBmjrubblRkENuptryuI64URkXDFum9il/JGL8Lm8wYfAXpredVXXZz7eMHilimiQ==} + dev: true + /buffer-from/1.1.2: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} @@ -8166,6 +8232,18 @@ packages: engines: {node: '>=10.6.0'} dev: false + /cacheable-request/2.1.4: + resolution: {integrity: sha512-vag0O2LKZ/najSoUwDbVlnlCFvhBE/7mGTY2B5FgCBDcRD+oVV1HYTOwM6JZfMg/hIcM6IwnTZ1uQQL5/X3xIQ==} + dependencies: + clone-response: 1.0.2 + get-stream: 3.0.0 + http-cache-semantics: 3.8.1 + keyv: 3.0.0 + lowercase-keys: 1.0.0 + normalize-url: 2.0.1 + responselike: 1.0.2 + dev: true + /cacheable-request/7.0.2: resolution: {integrity: sha512-pouW8/FmiPQbuGpkXQ9BAPv/Mo5xDGANgSNXzTzJ8DrKGuXOssM4wIQRjfanNRh3Yu5cfYPvcorqbhg2KIJtew==} engines: {node: '>=8'} @@ -8231,6 +8309,16 @@ packages: engines: {node: '>=6'} dev: false + /caw/2.0.1: + resolution: {integrity: sha512-Cg8/ZSBEa8ZVY9HspcGUYaK63d/bN7rqS3CYCzEGUxuYv6UlmcjzDUz2fCFFHyTvUW5Pk0I+3hkA3iXlIj6guA==} + engines: {node: '>=4'} + dependencies: + get-proxy: 2.1.0 + isurl: 1.0.0 + tunnel-agent: 0.6.0 + url-to-options: 1.0.1 + dev: true + /chalk/2.4.2: resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} engines: {node: '>=4'} @@ -8400,7 +8488,6 @@ packages: resolution: {integrity: sha512-yjLXh88P599UOyPTFX0POsd7WxnbsVsGohcwzHOLspIhhpalPw1BcqED8NblyZLKcGrL8dTgMlcaZxV2jAD41Q==} dependencies: mimic-response: 1.0.1 - dev: false /clone/1.0.4: resolution: {integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==} @@ -8571,6 +8658,13 @@ packages: source-map: 0.6.1 dev: true + /config-chain/1.1.13: + resolution: {integrity: sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==} + dependencies: + ini: 1.3.8 + proto-list: 1.2.4 + dev: true + /confusing-browser-globals/1.0.11: resolution: {integrity: sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA==} dev: true @@ -8709,6 +8803,25 @@ packages: cross-spawn: 7.0.3 dev: true + /cross-spawn/5.1.0: + resolution: {integrity: sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==} + dependencies: + lru-cache: 4.0.2 + shebang-command: 1.2.0 + which: 1.3.1 + dev: true + + /cross-spawn/6.0.5: + resolution: {integrity: sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==} + engines: {node: '>=4.8'} + dependencies: + nice-try: 1.0.5 + path-key: 2.0.1 + semver: 5.7.1 + shebang-command: 1.2.0 + which: 1.3.1 + dev: true + /cross-spawn/7.0.3: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} @@ -9025,6 +9138,13 @@ packages: engines: {node: '>=0.10'} dev: true + /decompress-response/3.3.0: + resolution: {integrity: sha512-BzRPQuY1ip+qDonAOz42gRm/pg9F768C+npV/4JOsxRC2sq+Rlk+Q4ZCAsOhnIaMrgarILY+RMUIvMmmX1qAEA==} + engines: {node: '>=4'} + dependencies: + mimic-response: 1.0.1 + dev: true + /decompress-response/6.0.0: resolution: {integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==} engines: {node: '>=10'} @@ -9032,6 +9152,59 @@ packages: mimic-response: 3.1.0 dev: false + /decompress-tar/4.1.1: + resolution: {integrity: sha512-JdJMaCrGpB5fESVyxwpCx4Jdj2AagLmv3y58Qy4GE6HMVjWz1FeVQk1Ct4Kye7PftcdOo/7U7UKzYBJgqnGeUQ==} + engines: {node: '>=4'} + dependencies: + file-type: 5.2.0 + is-stream: 1.1.0 + tar-stream: 1.6.2 + dev: true + + /decompress-tarbz2/4.1.1: + resolution: {integrity: sha512-s88xLzf1r81ICXLAVQVzaN6ZmX4A6U4z2nMbOwobxkLoIIfjVMBg7TeguTUXkKeXni795B6y5rnvDw7rxhAq9A==} + engines: {node: '>=4'} + dependencies: + decompress-tar: 4.1.1 + file-type: 6.2.0 + is-stream: 1.1.0 + seek-bzip: 1.0.6 + unbzip2-stream: 1.4.3 + dev: true + + /decompress-targz/4.1.1: + resolution: {integrity: sha512-4z81Znfr6chWnRDNfFNqLwPvm4db3WuZkqV+UgXQzSngG3CEKdBkw5jrv3axjjL96glyiiKjsxJG3X6WBZwX3w==} + engines: {node: '>=4'} + dependencies: + decompress-tar: 4.1.1 + file-type: 5.2.0 + is-stream: 1.1.0 + dev: true + + /decompress-unzip/4.0.1: + resolution: {integrity: sha512-1fqeluvxgnn86MOh66u8FjbtJpAFv5wgCT9Iw8rcBqQcCo5tO8eiJw7NNTrvt9n4CRBVq7CstiS922oPgyGLrw==} + engines: {node: '>=4'} + dependencies: + file-type: 3.9.0 + get-stream: 2.3.1 + pify: 2.3.0 + yauzl: 2.10.0 + dev: true + + /decompress/4.2.1: + resolution: {integrity: sha512-e48kc2IjU+2Zw8cTb6VZcJQ3lgVbS4uuB1TfCHbiZIP/haNXm+SVyhu+87jts5/3ROpd82GSVCoNs/z8l4ZOaQ==} + engines: {node: '>=4'} + dependencies: + decompress-tar: 4.1.1 + decompress-tarbz2: 4.1.1 + decompress-targz: 4.1.1 + decompress-unzip: 4.0.1 + graceful-fs: 4.2.10 + make-dir: 1.3.0 + pify: 2.3.0 + strip-dirs: 2.1.0 + dev: true + /dedent/0.7.0: resolution: {integrity: sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==} dev: true @@ -9245,10 +9418,49 @@ packages: engines: {node: '>=12'} dev: true + /download/6.2.5: + resolution: {integrity: sha512-DpO9K1sXAST8Cpzb7kmEhogJxymyVUd5qz/vCOSyvwtp2Klj2XcDt5YUuasgxka44SxF0q5RriKIwJmQHG2AuA==} + engines: {node: '>=4'} + dependencies: + caw: 2.0.1 + content-disposition: 0.5.4 + decompress: 4.2.1 + ext-name: 5.0.0 + file-type: 5.2.0 + filenamify: 2.1.0 + get-stream: 3.0.0 + got: 7.1.0 + make-dir: 1.3.0 + p-event: 1.3.0 + pify: 3.0.0 + dev: true + + /download/7.1.0: + resolution: {integrity: sha512-xqnBTVd/E+GxJVrX5/eUJiLYjCGPwMpdL+jGhGU57BvtcA7wwhtHVbXBeUk51kOpW3S7Jn3BQbN9Q1R1Km2qDQ==} + engines: {node: '>=6'} + dependencies: + archive-type: 4.0.0 + caw: 2.0.1 + content-disposition: 0.5.4 + decompress: 4.2.1 + ext-name: 5.0.0 + file-type: 8.1.0 + filenamify: 2.1.0 + get-stream: 3.0.0 + got: 8.3.2 + make-dir: 1.3.0 + p-event: 2.3.1 + pify: 3.0.0 + dev: true + /duplexer/0.1.2: resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==} dev: true + /duplexer3/0.1.5: + resolution: {integrity: sha512-1A8za6ws41LQgv9HrE/66jyC5yuSjQ3L/KOpFtoBilsAK2iA2wuS5rTt1OCzIvtS2V7nVmedsUU+DGRcjBmOYA==} + dev: true + /duplexify/4.1.2: resolution: {integrity: sha512-fz3OjcNCHmRP12MJoZMPglx8m4rrFP8rovnk4vT8Fs+aonZoCwGg10dSsQsfP/E62eZcPTMSMP6686fu9Qlqtw==} dependencies: @@ -9896,6 +10108,43 @@ packages: resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} engines: {node: '>=0.8.x'} + /exec-buffer/3.2.0: + resolution: {integrity: sha512-wsiD+2Tp6BWHoVv3B+5Dcx6E7u5zky+hUwOHjuH2hKSLR3dvRmX8fk8UD8uqQixHs4Wk6eDmiegVrMPjKj7wpA==} + engines: {node: '>=4'} + dependencies: + execa: 0.7.0 + p-finally: 1.0.0 + pify: 3.0.0 + rimraf: 2.6.3 + tempfile: 2.0.0 + dev: true + + /execa/0.7.0: + resolution: {integrity: sha512-RztN09XglpYI7aBBrJCPW95jEH7YF1UEPOoX9yDhUTPdp7mK+CQvnLTuD10BNXZ3byLTu2uehZ8EcKT/4CGiFw==} + engines: {node: '>=4'} + dependencies: + cross-spawn: 5.1.0 + get-stream: 3.0.0 + is-stream: 1.1.0 + npm-run-path: 2.0.2 + p-finally: 1.0.0 + signal-exit: 3.0.7 + strip-eof: 1.0.0 + dev: true + + /execa/1.0.0: + resolution: {integrity: sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==} + engines: {node: '>=6'} + dependencies: + cross-spawn: 6.0.5 + get-stream: 4.1.0 + is-stream: 1.1.0 + npm-run-path: 2.0.2 + p-finally: 1.0.0 + signal-exit: 3.0.7 + strip-eof: 1.0.0 + dev: true + /execa/5.1.1: resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} engines: {node: '>=10'} @@ -9926,6 +10175,13 @@ packages: strip-final-newline: 3.0.0 dev: true + /executable/4.1.1: + resolution: {integrity: sha512-8iA79xD3uAch729dUG8xaaBBFGaEa0wdD2VkYLFHwlqosEj/jT66AzcreRDSgV7ehnNLBW2WR5jIXwGKjVdTLg==} + engines: {node: '>=4'} + dependencies: + pify: 2.3.0 + dev: true + /exit/0.1.2: resolution: {integrity: sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==} engines: {node: '>= 0.8.0'} @@ -9991,6 +10247,21 @@ packages: - supports-color dev: true + /ext-list/2.2.2: + resolution: {integrity: sha512-u+SQgsubraE6zItfVA0tBuCBhfU9ogSRnsvygI7wht9TS510oLkBRXBsqopeUG/GBOIQyKZO9wjTqIu/sf5zFA==} + engines: {node: '>=0.10.0'} + dependencies: + mime-db: 1.52.0 + dev: true + + /ext-name/5.0.0: + resolution: {integrity: sha512-yblEwXAbGv1VQDmow7s38W77hzAgJAO50ztBLMcUyUBfxv1HC+LGwtiEN+Co6LtlqT/5uwVOxsD4TNIilWhwdQ==} + engines: {node: '>=4'} + dependencies: + ext-list: 2.2.2 + sort-keys-length: 1.0.1 + dev: true + /extend/3.0.2: resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==} dev: false @@ -10045,6 +10316,10 @@ packages: resolution: {integrity: sha512-HPtaa38cPgWvaCFmRNhlc6NG7pv6NUHqjPgVAkWGoB9mQMwYB27/K0CvOM5Czy+qpT3e8XJ6Q4aPAnzpNpzNaw==} dev: false + /fast-sort/3.2.0: + resolution: {integrity: sha512-EgQtkmWo2Icq6uei57fTrZAKayL9b4OISU1613737AuLcIbAZ57tcOtGaK2A7zO54kk97wOnSw6INDA++rjMAQ==} + dev: false + /fast-text-encoding/1.0.4: resolution: {integrity: sha512-x6lDDm/tBAzX9kmsPcZsNbvDs3Zey3+scsxaZElS8xWLgUMAg/oFLeewfUz0mu1CblHhhsu15jGkraldkFh8KQ==} dev: false @@ -10076,6 +10351,12 @@ packages: bser: 2.1.1 dev: true + /fd-slicer/1.1.0: + resolution: {integrity: sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==} + dependencies: + pend: 1.2.0 + dev: true + /ffc-js-client-side-sdk/1.1.5: resolution: {integrity: sha512-xDsh/9+Xoh46O4aKZdR9e+nrBnOChmkQI4CoOGyvPd5x72u4CN66w12qChtVhG5e/0im8qu6ZARG28BSLJP8yw==} dependencies: @@ -10133,12 +10414,60 @@ packages: tslib: 2.4.0 dev: true + /file-type/16.5.4: + resolution: {integrity: sha512-/yFHK0aGjFEgDJjEKP0pWCplsPFPhwyfwevf/pVxiN0tmE4L9LmwWxWukdJSHdoCli4VgQLehjJtwQBnqmsKcw==} + engines: {node: '>=10'} + dependencies: + readable-web-to-node-stream: 3.0.2 + strtok3: 6.3.0 + token-types: 4.2.1 + dev: true + + /file-type/3.9.0: + resolution: {integrity: sha512-RLoqTXE8/vPmMuTI88DAzhMYC99I8BWv7zYP4A1puo5HIjEJ5EX48ighy4ZyKMG9EDXxBgW6e++cn7d1xuFghA==} + engines: {node: '>=0.10.0'} + dev: true + + /file-type/4.4.0: + resolution: {integrity: sha512-f2UbFQEk7LXgWpi5ntcO86OeA/cC80fuDDDaX/fZ2ZGel+AF7leRQqBBW1eJNiiQkrZlAoM6P+VYP5P6bOlDEQ==} + engines: {node: '>=4'} + dev: true + + /file-type/5.2.0: + resolution: {integrity: sha512-Iq1nJ6D2+yIO4c8HHg4fyVb8mAJieo1Oloy1mLLaB2PvezNedhBVm+QU7g0qM42aiMbRXTxKKwGD17rjKNJYVQ==} + engines: {node: '>=4'} + dev: true + + /file-type/6.2.0: + resolution: {integrity: sha512-YPcTBDV+2Tm0VqjybVd32MHdlEGAtuxS3VAYsumFokDSMG+ROT5wawGlnHDoz7bfMcMDt9hxuXvXwoKUx2fkOg==} + engines: {node: '>=4'} + dev: true + + /file-type/8.1.0: + resolution: {integrity: sha512-qyQ0pzAy78gVoJsmYeNgl8uH8yKhr1lVhW7JbzJmnlRi0I4R2eEDEJZVKG8agpDnLpacwNbDhLNG/LMdxHD2YQ==} + engines: {node: '>=6'} + dev: true + /filelist/1.0.4: resolution: {integrity: sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==} dependencies: minimatch: 5.1.0 dev: true + /filename-reserved-regex/2.0.0: + resolution: {integrity: sha512-lc1bnsSr4L4Bdif8Xb/qrtokGbq5zlsms/CYH8PP+WtCkGNF65DPiQY8vG3SakEdRn8Dlnm+gW/qWKKjS5sZzQ==} + engines: {node: '>=4'} + dev: true + + /filenamify/2.1.0: + resolution: {integrity: sha512-ICw7NTT6RsDp2rnYKVd8Fu4cr6ITzGy3+u4vUujPkabyaz+03F24NWEX7fs5fp+kBonlaqPH8fAO2NM+SXt/JA==} + engines: {node: '>=4'} + dependencies: + filename-reserved-regex: 2.0.0 + strip-outer: 1.0.1 + trim-repeated: 1.0.0 + dev: true + /fill-range/7.0.1: resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} engines: {node: '>=8'} @@ -10208,12 +10537,19 @@ packages: path-exists: 4.0.0 dev: true - /firebase-admin/11.0.0: + /find-versions/3.2.0: + resolution: {integrity: sha512-P8WRou2S+oe222TOCHitLy8zj+SIsVJh52VP4lvXkaFVnOFFdoWv1H1Jjvel1aI6NCFOAaeAVm8qrI0odiLcww==} + engines: {node: '>=6'} + dependencies: + semver-regex: 2.0.0 + dev: true + + /firebase-admin/11.0.0_@firebase+app-types@0.7.0: resolution: {integrity: sha512-x56u+Q1P8QDvQKaYRe29ZUM/3f829cP8tsKCDXOhaIX/GbGfgcdjRhPmCafzlwgCWP5wW9NkOgIhnrw94zucvw==} engines: {node: '>=14'} dependencies: '@fastify/busboy': 1.1.0 - '@firebase/database-compat': 0.2.2 + '@firebase/database-compat': 0.2.2_@firebase+app-types@0.7.0 '@firebase/database-types': 0.9.10 '@types/node': 18.0.1 jsonwebtoken: 8.5.1 @@ -10370,6 +10706,13 @@ packages: engines: {node: '>= 0.6'} dev: true + /from2/2.3.0: + resolution: {integrity: sha512-OMcX/4IC/uqEPVgGeyfN22LJk6AZrMkRZHxcHBMBvHScDGgwTm2GT2Wkgtocyd3JfZffjj2kYUDXXII0Fk9W0g==} + dependencies: + inherits: 2.0.4 + readable-stream: 2.3.7 + dev: true + /fs-constants/1.0.0: resolution: {integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==} dev: true @@ -10534,6 +10877,33 @@ packages: engines: {node: '>=8.0.0'} dev: true + /get-proxy/2.1.0: + resolution: {integrity: sha512-zmZIaQTWnNQb4R4fJUEp/FC51eZsc6EkErspy3xtIYStaq8EB/hDIWipxsal+E8rz0qD7f2sL/NA9Xee4RInJw==} + engines: {node: '>=4'} + dependencies: + npm-conf: 1.1.3 + dev: true + + /get-stream/2.3.1: + resolution: {integrity: sha512-AUGhbbemXxrZJRD5cDvKtQxLuYaIbNtDTK8YqupCI393Q2KSTreEsLUN3ZxAWFGiKTzL6nKuzfcIvieflUX9qA==} + engines: {node: '>=0.10.0'} + dependencies: + object-assign: 4.1.1 + pinkie-promise: 2.0.1 + dev: true + + /get-stream/3.0.0: + resolution: {integrity: sha512-GlhdIUuVakc8SJ6kK0zAFbiGzRFzNnY4jUuEbV9UROo4Y+0Ny4fjvcZFVTeDA4odpFyOQzaw6hXukJSq/f28sQ==} + engines: {node: '>=4'} + dev: true + + /get-stream/4.1.0: + resolution: {integrity: sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==} + engines: {node: '>=6'} + dependencies: + pump: 3.0.0 + dev: true + /get-stream/5.2.0: resolution: {integrity: sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==} engines: {node: '>=8'} @@ -10659,6 +11029,18 @@ packages: slash: 3.0.0 dev: true + /globby/12.2.0: + resolution: {integrity: sha512-wiSuFQLZ+urS9x2gGPl1H5drc5twabmm4m2gTR27XDFyjUHJUNsS8o/2aKyIF6IoBaR630atdher0XJ5g6OMmA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dependencies: + array-union: 3.0.1 + dir-glob: 3.0.1 + fast-glob: 3.2.11 + ignore: 5.2.0 + merge2: 1.4.1 + slash: 4.0.0 + dev: true + /google-auth-library/7.14.1: resolution: {integrity: sha512-5Rk7iLNDFhFeBYc3s8l1CqzbEBcdhwR193RlD4vSNFajIcINKI8W8P0JLmBpwymHqqWbX34pJDQu39cSy/6RsA==} engines: {node: '>=10'} @@ -10758,6 +11140,53 @@ packages: responselike: 2.0.0 dev: false + /got/7.1.0: + resolution: {integrity: sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw==} + engines: {node: '>=4'} + dependencies: + '@types/keyv': 3.1.4 + '@types/responselike': 1.0.0 + decompress-response: 3.3.0 + duplexer3: 0.1.5 + get-stream: 3.0.0 + is-plain-obj: 1.1.0 + is-retry-allowed: 1.2.0 + is-stream: 1.1.0 + isurl: 1.0.0 + lowercase-keys: 1.0.1 + p-cancelable: 0.3.0 + p-timeout: 1.2.1 + safe-buffer: 5.2.1 + timed-out: 4.0.1 + url-parse-lax: 1.0.0 + url-to-options: 1.0.1 + dev: true + + /got/8.3.2: + resolution: {integrity: sha512-qjUJ5U/hawxosMryILofZCkm3C84PLJS/0grRIpjAwu+Lkxxj5cxeCU25BG0/3mDSpXKTyZr8oh8wIgLaH0QCw==} + engines: {node: '>=4'} + dependencies: + '@sindresorhus/is': 0.7.0 + '@types/keyv': 3.1.4 + '@types/responselike': 1.0.0 + cacheable-request: 2.1.4 + decompress-response: 3.3.0 + duplexer3: 0.1.5 + get-stream: 3.0.0 + into-stream: 3.1.0 + is-retry-allowed: 1.2.0 + isurl: 1.0.0 + lowercase-keys: 1.0.1 + mimic-response: 1.0.1 + p-cancelable: 0.4.1 + p-timeout: 2.0.1 + pify: 3.0.0 + safe-buffer: 5.2.1 + timed-out: 4.0.1 + url-parse-lax: 3.0.0 + url-to-options: 1.0.1 + dev: true + /graceful-fs/4.2.10: resolution: {integrity: sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==} @@ -10818,10 +11247,20 @@ packages: dependencies: get-intrinsic: 1.1.2 + /has-symbol-support-x/1.4.2: + resolution: {integrity: sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==} + dev: true + /has-symbols/1.0.3: resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} engines: {node: '>= 0.4'} + /has-to-string-tag-x/1.4.1: + resolution: {integrity: sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==} + dependencies: + has-symbol-support-x: 1.4.2 + dev: true + /has-tostringtag/1.0.0: resolution: {integrity: sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==} engines: {node: '>= 0.4'} @@ -10941,6 +11380,10 @@ packages: entities: 2.2.0 dev: true + /http-cache-semantics/3.8.1: + resolution: {integrity: sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==} + dev: true + /http-cache-semantics/4.1.0: resolution: {integrity: sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==} dev: false @@ -11142,6 +11585,27 @@ packages: engines: {node: '>= 4'} dev: true + /image-minimizer-webpack-plugin/3.2.3_5emixpjl54fjyhdvj76qjbw4py: + resolution: {integrity: sha512-a8mG+lTvIGLFnlU4BpDqbw2tr0IC+R2T57Lx+xGNCR5R6WccZ/gmL8P3y8ic0bOYL1azmh2L6+PptccdjIYqqw==} + engines: {node: '>= 12.13.0'} + peerDependencies: + '@squoosh/lib': '*' + imagemin: '*' + webpack: ^5.1.0 + peerDependenciesMeta: + '@squoosh/lib': + optional: true + imagemin: + optional: true + webpack: + optional: true + dependencies: + imagemin: 8.0.1 + schema-utils: 4.0.0 + serialize-javascript: 6.0.0 + webpack: 5.74.0 + dev: true + /image-size/0.5.5: resolution: {integrity: sha512-6TDAlDPZxUFCv+fuOkIoXT/V/f3Qbq8e37p+YOiYrUv3v9cc3/6x78VdfPgFVaB9dZYeLUfKgHRebpkm/oP2VQ==} engines: {node: '>=0.10.0'} @@ -11150,6 +11614,28 @@ packages: dev: true optional: true + /imagemin-optipng/8.0.0: + resolution: {integrity: sha512-CUGfhfwqlPjAC0rm8Fy+R2DJDBGjzy2SkfyT09L8rasnF9jSoHFqJ1xxSZWK6HVPZBMhGPMxCTL70OgTHlLF5A==} + engines: {node: '>=10'} + dependencies: + exec-buffer: 3.2.0 + is-png: 2.0.0 + optipng-bin: 7.0.1 + dev: true + + /imagemin/8.0.1: + resolution: {integrity: sha512-Q/QaPi+5HuwbZNtQRqUVk6hKacI6z9iWiCSQBisAv7uBynZwO7t1svkryKl7+iSQbkU/6t9DWnHz04cFs2WY7w==} + engines: {node: '>=12'} + dependencies: + file-type: 16.5.4 + globby: 12.2.0 + graceful-fs: 4.2.10 + junk: 3.1.0 + p-pipe: 4.0.0 + replace-ext: 2.0.0 + slash: 3.0.0 + dev: true + /immediate/3.0.6: resolution: {integrity: sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==} dev: true @@ -11183,6 +11669,11 @@ packages: resolve-from: 5.0.0 dev: true + /import-lazy/3.1.0: + resolution: {integrity: sha512-8/gvXvX2JMn0F+CDlSC4l6kOmVaLOO3XLkksI7CI3Ud95KDYJuYur2b9P/PUt/i/pDAMd/DulQsNbbbmRRsDIQ==} + engines: {node: '>=6'} + dev: true + /import-local/3.1.0: resolution: {integrity: sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==} engines: {node: '>=8'} @@ -11257,6 +11748,14 @@ packages: has: 1.0.3 side-channel: 1.0.4 + /into-stream/3.1.0: + resolution: {integrity: sha512-TcdjPibTksa1NQximqep2r17ISRiNE9fwlfbg3F8ANdvP5/yrFTew86VcO//jk4QTaMlbjypPBq76HN2zaKfZQ==} + engines: {node: '>=4'} + dependencies: + from2: 2.3.0 + p-is-promise: 1.1.0 + dev: true + /ipaddr.js/1.9.1: resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==} engines: {node: '>= 0.10'} @@ -11400,6 +11899,10 @@ packages: define-properties: 1.1.4 dev: false + /is-natural-number/4.0.1: + resolution: {integrity: sha512-Y4LTamMe0DDQIIAlaer9eKebAlDSV6huy+TWhJVPlzZh2o4tRP5SQWFlLn5N0To4mDD22/qdOq+veo1cSISLgQ==} + dev: true + /is-negative-zero/2.0.2: resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==} engines: {node: '>= 0.4'} @@ -11415,6 +11918,15 @@ packages: engines: {node: '>=0.12.0'} dev: true + /is-object/1.0.2: + resolution: {integrity: sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA==} + dev: true + + /is-plain-obj/1.1.0: + resolution: {integrity: sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==} + engines: {node: '>=0.10.0'} + dev: true + /is-plain-obj/3.0.0: resolution: {integrity: sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA==} engines: {node: '>=10'} @@ -11437,6 +11949,11 @@ packages: engines: {node: '>=0.10.0'} dev: false + /is-png/2.0.0: + resolution: {integrity: sha512-4KPGizaVGj2LK7xwJIz8o5B2ubu1D/vcQsgOGFEDlpcvgZHto4gBnyd0ig7Ws+67ixmwKoNmu0hYnpo6AaKb5g==} + engines: {node: '>=8'} + dev: true + /is-potential-custom-element-name/1.0.1: resolution: {integrity: sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==} dev: true @@ -11454,6 +11971,11 @@ packages: call-bind: 1.0.2 has-tostringtag: 1.0.0 + /is-retry-allowed/1.2.0: + resolution: {integrity: sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==} + engines: {node: '>=0.10.0'} + dev: true + /is-shared-array-buffer/1.0.2: resolution: {integrity: sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==} dependencies: @@ -11464,6 +11986,11 @@ packages: dev: false optional: true + /is-stream/1.1.0: + resolution: {integrity: sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==} + engines: {node: '>=0.10.0'} + dev: true + /is-stream/2.0.1: resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} engines: {node: '>=8'} @@ -11581,6 +12108,14 @@ packages: istanbul-lib-report: 3.0.0 dev: true + /isurl/1.0.0: + resolution: {integrity: sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==} + engines: {node: '>= 4'} + dependencies: + has-to-string-tag-x: 1.4.1 + is-object: 1.0.2 + dev: true + /jake/10.8.5: resolution: {integrity: sha512-sVpxYeuAhWt0OTWITwT98oyV0GsXyMlXCF+3L1SuafBVUIr/uILGRB+NqwkzhgXKvoJpDIpQvqkUALgdmQsQxw==} engines: {node: '>=10'} @@ -12521,6 +13056,10 @@ packages: dev: false optional: true + /json-buffer/3.0.0: + resolution: {integrity: sha512-CuUqjv0FUZIdXkHPI8MezCnFCdaTAacej1TZYulLoAg1h/PhwkdXFN4V/gzY4g+fMBCOV2xF+rp7t2XD2ns/NQ==} + dev: true + /json-buffer/3.0.1: resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} dev: false @@ -12615,6 +13154,11 @@ packages: setimmediate: 1.0.5 dev: true + /junk/3.1.0: + resolution: {integrity: sha512-pBxcB3LFc8QVgdggvZWyeys+hnrNWg4OcZIU/1X59k5jQdLBlCsYGRQaz234SqoRLTCgMH00fY0xRJH+F9METQ==} + engines: {node: '>=8'} + dev: true + /jwa/1.4.1: resolution: {integrity: sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==} dependencies: @@ -12664,6 +13208,12 @@ packages: /jwt-decode/2.2.0: resolution: {integrity: sha512-86GgN2vzfUu7m9Wcj63iUkuDzFNYFVmjeDm2GzWpUk+opB0pEpMsw6ePCMrhYkumz2C1ihqtZzOMAg7FiXcNoQ==} + /keyv/3.0.0: + resolution: {integrity: sha512-eguHnq22OE3uVoSYG0LVWNP+4ppamWr9+zWBe1bsNcovIMy6huUJFPgy4mGwCd/rnl3vOLGW1MTlu4c57CT1xA==} + dependencies: + json-buffer: 3.0.0 + dev: true + /keyv/4.3.2: resolution: {integrity: sha512-kn8WmodVBe12lmHpA6W8OY7SNh6wVR+Z+wZESF4iF5FCazaVXGWOtnbnvX0tMQ1bO+/TmOD9LziuYMvrIIs0xw==} dependencies: @@ -13096,6 +13646,16 @@ packages: tslib: 2.4.0 dev: true + /lowercase-keys/1.0.0: + resolution: {integrity: sha512-RPlX0+PHuvxVDZ7xX+EBVAp4RsVxP/TdDSN2mJYdiq1Lc4Hz7EUSjUI7RZrKKlmrIzVhf6Jo2stj7++gVarS0A==} + engines: {node: '>=0.10.0'} + dev: true + + /lowercase-keys/1.0.1: + resolution: {integrity: sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==} + engines: {node: '>=0.10.0'} + dev: true + /lowercase-keys/2.0.0: resolution: {integrity: sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==} engines: {node: '>=8'} @@ -13115,7 +13675,6 @@ packages: dependencies: pseudomap: 1.0.2 yallist: 2.1.2 - dev: false /lru-cache/6.0.0: resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} @@ -13156,6 +13715,13 @@ packages: sourcemap-codec: 1.4.8 dev: true + /make-dir/1.3.0: + resolution: {integrity: sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==} + engines: {node: '>=4'} + dependencies: + pify: 3.0.0 + dev: true + /make-dir/2.1.0: resolution: {integrity: sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==} engines: {node: '>=6'} @@ -13278,7 +13844,6 @@ packages: /mimic-response/1.0.1: resolution: {integrity: sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==} engines: {node: '>=4'} - dev: false /mimic-response/3.1.0: resolution: {integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==} @@ -13346,6 +13911,19 @@ packages: webpack: 5.73.0 dev: true + /mini-css-extract-plugin/2.6.1_webpack@5.74.0: + resolution: {integrity: sha512-wd+SD57/K6DiV7jIR34P+s3uckTRuQvx0tKPcvjFlrEylk6P4mQ2KSWk1hblj1Kxaqok7LogKOieygXqBczNlg==} + engines: {node: '>= 12.13.0'} + peerDependencies: + webpack: ^5.0.0 + peerDependenciesMeta: + webpack: + optional: true + dependencies: + schema-utils: 4.0.0 + webpack: 5.74.0 + dev: true + /mini-svg-data-uri/1.4.4: resolution: {integrity: sha512-r9deDe9p5FJUPZAk3A59wGH7Ii9YrjjWw0jmw/liSbHl2CHiyXj6FcDXDu2K3TjVAXqiJdaw3xxwlZZr9E6nHg==} hasBin: true @@ -13568,6 +14146,10 @@ packages: - '@babel/core' - babel-plugin-macros + /nice-try/1.0.5: + resolution: {integrity: sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==} + dev: true + /no-case/3.0.4: resolution: {integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==} dependencies: @@ -13619,6 +14201,15 @@ packages: engines: {node: '>=0.10.0'} dev: true + /normalize-url/2.0.1: + resolution: {integrity: sha512-D6MUW4K/VzoJ4rJ01JFKxDrtY1v9wrgzCX5f2qj/lzH1m/lW6MhUZFKerVsnyjOhOsYzI9Kqqak+10l4LvLpMw==} + engines: {node: '>=4'} + dependencies: + prepend-http: 2.0.0 + query-string: 5.1.1 + sort-keys: 2.0.0 + dev: true + /normalize-url/6.1.0: resolution: {integrity: sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==} engines: {node: '>=10'} @@ -13650,6 +14241,21 @@ packages: hoist-non-react-statics: 3.3.2 dev: false + /npm-conf/1.1.3: + resolution: {integrity: sha512-Yic4bZHJOt9RCFbRP3GgpqhScOY4HH3V2P8yBj6CeYq118Qr+BLXqT2JvpJ00mryLESpgOxf5XlFv4ZjXxLScw==} + engines: {node: '>=4'} + dependencies: + config-chain: 1.1.13 + pify: 3.0.0 + dev: true + + /npm-run-path/2.0.2: + resolution: {integrity: sha512-lJxZYlT4DW/bRUtFh1MQIWqmLwQfAxnqWG4HhEdjMlkrJYnJn0Jrr2u3mgxqaWsdiBc76TYkTG/mhrnYTuzfHw==} + engines: {node: '>=4'} + dependencies: + path-key: 2.0.1 + dev: true + /npm-run-path/4.0.1: resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} engines: {node: '>=8'} @@ -13882,6 +14488,16 @@ packages: word-wrap: 1.2.3 dev: true + /optipng-bin/7.0.1: + resolution: {integrity: sha512-W99mpdW7Nt2PpFiaO+74pkht7KEqkXkeRomdWXfEz3SALZ6hns81y/pm1dsGZ6ItUIfchiNIP6ORDr1zETU1jA==} + engines: {node: '>=10'} + hasBin: true + requiresBuild: true + dependencies: + bin-build: 3.0.0 + bin-wrapper: 4.1.0 + dev: true + /ora/5.4.1: resolution: {integrity: sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==} engines: {node: '>=10'} @@ -13897,6 +14513,13 @@ packages: wcwidth: 1.0.1 dev: true + /os-filter-obj/2.0.0: + resolution: {integrity: sha512-uksVLsqG3pVdzzPvmAHpBK0wKxYItuzZr7SziusRPoz67tGV8rL1szZ6IdeUrbqLjGDwApBtN29eEE3IqGHOjg==} + engines: {node: '>=4'} + dependencies: + arch: 2.2.0 + dev: true + /os-homedir/1.0.2: resolution: {integrity: sha512-B5JU3cabzk8c67mRRd3ECmROafjYMXbuzlwtqdM8IbS8ktlTix8aFGb2bAGKrSRIlnfKwovGUUr72JUPyOb6kQ==} engines: {node: '>=0.10.0'} @@ -13907,16 +14530,45 @@ packages: engines: {node: '>=0.10.0'} dev: true + /p-cancelable/0.3.0: + resolution: {integrity: sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==} + engines: {node: '>=4'} + dev: true + + /p-cancelable/0.4.1: + resolution: {integrity: sha512-HNa1A8LvB1kie7cERyy21VNeHb2CWJJYqyyC2o3klWFfMGlFmWv2Z7sFgZH8ZiaYL95ydToKTFVXgMV/Os0bBQ==} + engines: {node: '>=4'} + dev: true + /p-cancelable/3.0.0: resolution: {integrity: sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==} engines: {node: '>=12.20'} dev: false + /p-event/1.3.0: + resolution: {integrity: sha512-hV1zbA7gwqPVFcapfeATaNjQ3J0NuzorHPyG8GPL9g/Y/TplWVBVoCKCXL6Ej2zscrCEv195QNWJXuBH6XZuzA==} + engines: {node: '>=4'} + dependencies: + p-timeout: 1.2.1 + dev: true + + /p-event/2.3.1: + resolution: {integrity: sha512-NQCqOFhbpVTMX4qMe8PF8lbGtzZ+LCiN7pcNrb/413Na7+TRoe1xkKUzuWa/YEJdGQ0FvKtj35EEbDoVPO2kbA==} + engines: {node: '>=6'} + dependencies: + p-timeout: 2.0.1 + dev: true + /p-finally/1.0.0: resolution: {integrity: sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==} engines: {node: '>=4'} dev: true + /p-is-promise/1.1.0: + resolution: {integrity: sha512-zL7VE4JVS2IFSkR2GQKDSPEVxkoH43/p7oEnwpdCndKYJO0HVeRB7fA8TJwuLOTBREtK0ea8eHaxdwcpob5dmg==} + engines: {node: '>=4'} + dev: true + /p-limit/1.3.0: resolution: {integrity: sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==} engines: {node: '>=4'} @@ -13958,6 +14610,13 @@ packages: p-limit: 3.1.0 dev: true + /p-map-series/1.0.0: + resolution: {integrity: sha512-4k9LlvY6Bo/1FcIdV33wqZQES0Py+iKISU9Uc8p8AjWoZPnFKMpVIVD3s0EYn4jzLh1I+WeUZkJ0Yoa4Qfw3Kg==} + engines: {node: '>=4'} + dependencies: + p-reduce: 1.0.0 + dev: true + /p-map/4.0.0: resolution: {integrity: sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==} engines: {node: '>=10'} @@ -13965,6 +14624,11 @@ packages: aggregate-error: 3.1.0 dev: true + /p-pipe/4.0.0: + resolution: {integrity: sha512-HkPfFklpZQPUKBFXzKFB6ihLriIHxnmuQdK9WmLDwe4hf2PdhhfWT/FJa+pc3bA1ywvKXtedxIRmd4Y7BTXE4w==} + engines: {node: '>=12'} + dev: true + /p-queue/6.6.2: resolution: {integrity: sha512-RwFpb72c/BhQLEXIZ5K2e+AhgNVmIejGlTgiB9MzZ0e93GRvqZ7uSi0dvRF7/XIXDeNkra2fNHBxTyPDGySpjQ==} engines: {node: '>=8'} @@ -13973,6 +14637,11 @@ packages: p-timeout: 3.2.0 dev: true + /p-reduce/1.0.0: + resolution: {integrity: sha512-3Tx1T3oM1xO/Y8Gj0sWyE78EIJZ+t+aEmXUdvQgvGmSMri7aPTHoovbXEreWKkL5j21Er60XAWLTzKbAKYOujQ==} + engines: {node: '>=4'} + dev: true + /p-retry/4.6.2: resolution: {integrity: sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ==} engines: {node: '>=8'} @@ -13981,6 +14650,20 @@ packages: retry: 0.13.1 dev: true + /p-timeout/1.2.1: + resolution: {integrity: sha512-gb0ryzr+K2qFqFv6qi3khoeqMZF/+ajxQipEF6NteZVnvz9tzdsfAVj3lYtn1gAXvH5lfLwfxEII799gt/mRIA==} + engines: {node: '>=4'} + dependencies: + p-finally: 1.0.0 + dev: true + + /p-timeout/2.0.1: + resolution: {integrity: sha512-88em58dDVB/KzPEx1X0N3LwFfYZPyDc4B6eF38M1rk9VTZMbxXXgjugz8mmwpS9Ox4BDZ+t6t3QP5+/gazweIA==} + engines: {node: '>=4'} + dependencies: + p-finally: 1.0.0 + dev: true + /p-timeout/3.2.0: resolution: {integrity: sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==} engines: {node: '>=8'} @@ -14085,6 +14768,11 @@ packages: tslib: 2.4.0 dev: true + /path-key/2.0.1: + resolution: {integrity: sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==} + engines: {node: '>=4'} + dev: true + /path-key/3.1.1: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} @@ -14112,6 +14800,15 @@ packages: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} + /peek-readable/4.1.0: + resolution: {integrity: sha512-ZI3LnwUv5nOGbQzD9c2iDG6toheuXSZP5esSHBjopsXH4dg19soufvpUGA3uohi5anFtGb2lhAVdHzH6R/Evvg==} + engines: {node: '>=8'} + dev: true + + /pend/1.2.0: + resolution: {integrity: sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==} + dev: true + /perfect-freehand/1.1.0: resolution: {integrity: sha512-nVWukMN9qlii1dQsQHVvfaNpeOAWVLgTZP6e/tFcU6cWlLo+6YdvfRGBL2u5pU11APlPbHeB0SpMcGA8ZjPgcQ==} dev: false @@ -14139,17 +14836,33 @@ packages: engines: {node: '>=0.10.0'} dev: true + /pify/3.0.0: + resolution: {integrity: sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==} + engines: {node: '>=4'} + dev: true + /pify/4.0.1: resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==} engines: {node: '>=6'} dev: true - optional: true /pify/5.0.0: resolution: {integrity: sha512-eW/gHNMlxdSP6dmG6uJip6FXN0EQBwm2clYYd8Wul42Cwu/DK8HEftzsapcNdYe2MfLiIwZqsDk2RDEsTE79hA==} engines: {node: '>=10'} dev: true + /pinkie-promise/2.0.1: + resolution: {integrity: sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==} + engines: {node: '>=0.10.0'} + dependencies: + pinkie: 2.0.4 + dev: true + + /pinkie/2.0.4: + resolution: {integrity: sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==} + engines: {node: '>=0.10.0'} + dev: true + /pirates/4.0.5: resolution: {integrity: sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==} engines: {node: '>= 6'} @@ -14607,6 +15320,16 @@ packages: engines: {node: '>= 0.8.0'} dev: true + /prepend-http/1.0.4: + resolution: {integrity: sha512-PhmXi5XmoyKw1Un4E+opM2KcsJInDvKyuOumcjjw3waw86ZNjHwVUOOWLc4bCzLdcKNaWBH9e99sbWzDQsVaYg==} + engines: {node: '>=0.10.0'} + dev: true + + /prepend-http/2.0.0: + resolution: {integrity: sha512-ravE6m9Atw9Z/jjttRUZ+clIXogdghyZAuWJ3qEzjT+jI/dL1ifAqhZeC5VHzQp1MSt1+jxKkFNemj/iO7tVUA==} + engines: {node: '>=4'} + dev: true + /prettier-linter-helpers/1.0.0: resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==} engines: {node: '>=6.0.0'} @@ -14684,6 +15407,10 @@ packages: object-assign: 4.1.1 react-is: 16.13.1 + /proto-list/1.2.4: + resolution: {integrity: sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==} + dev: true + /proto3-json-serializer/0.1.9: resolution: {integrity: sha512-A60IisqvnuI45qNRygJjrnNjX2TMdQGMY+57tR3nul3ZgO2zXkR9OGR8AXxJhkqx84g0FTnrfi3D5fWMSdANdQ==} dependencies: @@ -14725,7 +15452,6 @@ packages: /pseudomap/1.0.2: resolution: {integrity: sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==} - dev: false /psl/1.9.0: resolution: {integrity: sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==} @@ -14736,7 +15462,6 @@ packages: dependencies: end-of-stream: 1.4.4 once: 1.4.0 - dev: false /pumpify/2.0.1: resolution: {integrity: sha512-m7KOje7jZxrmutanlkS1daj1dS6z6BgslzOXmcSEpIlCxM3VJH7lG5QLeck/6hgF6F4crFf01UtQmNsJfweTAw==} @@ -14768,6 +15493,15 @@ packages: dependencies: side-channel: 1.0.4 + /query-string/5.1.1: + resolution: {integrity: sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==} + engines: {node: '>=0.10.0'} + dependencies: + decode-uri-component: 0.2.0 + object-assign: 4.1.1 + strict-uri-encode: 1.1.0 + dev: true + /querystring/0.2.0: resolution: {integrity: sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g==} engines: {node: '>=0.4.x'} @@ -15769,6 +16503,13 @@ packages: abort-controller: 3.0.0 dev: false + /readable-web-to-node-stream/3.0.2: + resolution: {integrity: sha512-ePeK6cc1EcKLEhJFt/AebMCLL+GgSKhuygrZ/GLaKZYEecIgIECf4UaUuaByiGtzckwR4ain9VzUh95T1exYGw==} + engines: {node: '>=8'} + dependencies: + readable-stream: 3.6.0 + dev: true + /readdirp/3.6.0: resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} engines: {node: '>=8.10.0'} @@ -15847,6 +16588,11 @@ packages: strip-ansi: 6.0.1 dev: true + /replace-ext/2.0.0: + resolution: {integrity: sha512-UszKE5KVK6JvyD92nzMn9cDapSk6w/CaFZ96CnmDMUqH9oowfxF/ZjRITD25H4DnOQClLA4/j7jLGXXLVKxAug==} + engines: {node: '>= 10'} + dev: true + /require-directory/2.1.1: resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} engines: {node: '>=0.10.0'} @@ -15910,6 +16656,12 @@ packages: supports-preserve-symlinks-flag: 1.0.0 dev: true + /responselike/1.0.2: + resolution: {integrity: sha512-/Fpe5guzJk1gPqdJLJR5u7eG/gNY4nImjbRDaVWVMRhne55TCmj2i9Q+54PBRfatRC8v/rIiv9BN0pMd9OV5EQ==} + dependencies: + lowercase-keys: 1.0.1 + dev: true + /responselike/2.0.0: resolution: {integrity: sha512-xH48u3FTB9VsZw7R+vvgaKeLKzT6jOogbQhEe/jewwnZgzPcnyWui2Av6JpoYZF/91uueC+lqhWqeURw5/qhCw==} dependencies: @@ -16240,6 +16992,13 @@ packages: resolution: {integrity: sha1-8aAymzCLIh+uN7mXTz1XjQypmeM=} dev: true + /seek-bzip/1.0.6: + resolution: {integrity: sha512-e1QtP3YL5tWww8uKaOCQ18UxIT2laNBXHjV/S2WYCiK4udiv8lkG89KRIoCjUagnAmCBurjF4zEVX2ByBbnCjQ==} + hasBin: true + dependencies: + commander: 2.20.3 + dev: true + /select-hose/2.0.0: resolution: {integrity: sha512-mEugaLK+YfkijB4fx0e6kImuJdCIt2LxCRcbEYPqRGCs4F2ogyfZU5IAZRdjCP8JPq2AtdNoC/Dux63d9Kiryg==} dev: true @@ -16263,6 +17022,18 @@ packages: node-forge: 1.3.1 dev: true + /semver-regex/2.0.0: + resolution: {integrity: sha512-mUdIBBvdn0PLOeP3TEkMH7HHeUP3GjsXCwKarjv/kGmUFOYg1VqEemKhoQpWMu6X2I8kHeuVdGibLGkVK+/5Qw==} + engines: {node: '>=6'} + dev: true + + /semver-truncate/1.1.2: + resolution: {integrity: sha512-V1fGg9i4CL3qesB6U0L6XAm4xOJiHmt4QAacazumuasc03BvtFGIMCduv01JWQ69Nv+JST9TqhSCiJoxoY031w==} + engines: {node: '>=0.10.0'} + dependencies: + semver: 5.7.1 + dev: true + /semver/5.7.1: resolution: {integrity: sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==} hasBin: true @@ -16395,6 +17166,13 @@ packages: resolution: {integrity: sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==} dev: false + /shebang-command/1.2.0: + resolution: {integrity: sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==} + engines: {node: '>=0.10.0'} + dependencies: + shebang-regex: 1.0.0 + dev: true + /shebang-command/2.0.0: resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} engines: {node: '>=8'} @@ -16402,6 +17180,11 @@ packages: shebang-regex: 3.0.0 dev: true + /shebang-regex/1.0.0: + resolution: {integrity: sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==} + engines: {node: '>=0.10.0'} + dev: true + /shebang-regex/3.0.0: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} @@ -16440,6 +17223,11 @@ packages: engines: {node: '>=8'} dev: true + /slash/4.0.0: + resolution: {integrity: sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==} + engines: {node: '>=12'} + dev: true + /slate-react/0.81.0_slate@0.81.1: resolution: {integrity: sha512-bwryad4EvOmc7EFKb8aGg9DWNDh3KvToaggGieIgGTTbHJYHc9ADFC3A87Ittlpd5XUVopR0MpChQ3g3ODyvqw==} peerDependencies: @@ -16522,6 +17310,27 @@ packages: engines: {node: '>= 6.3.0'} dev: false + /sort-keys-length/1.0.1: + resolution: {integrity: sha512-GRbEOUqCxemTAk/b32F2xa8wDTs+Z1QHOkbhJDQTvv/6G3ZkbJ+frYWsTcc7cBB3Fu4wy4XlLCuNtJuMn7Gsvw==} + engines: {node: '>=0.10.0'} + dependencies: + sort-keys: 1.1.2 + dev: true + + /sort-keys/1.1.2: + resolution: {integrity: sha512-vzn8aSqKgytVik0iwdBEi+zevbTYZogewTUM6dtpmGwEcdzbub/TX4bCzRhebDCRC3QzXgJsLRKB2V/Oof7HXg==} + engines: {node: '>=0.10.0'} + dependencies: + is-plain-obj: 1.1.0 + dev: true + + /sort-keys/2.0.0: + resolution: {integrity: sha512-/dPCrG1s3ePpWm6yBbxZq5Be1dXGLyLn9Z791chDC3NFrpkVbWGzkBwPN1knaciexFXgRJ7hzdnwZ4stHSDmjg==} + engines: {node: '>=4'} + dependencies: + is-plain-obj: 1.1.0 + dev: true + /source-list-map/2.0.1: resolution: {integrity: sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==} dev: false @@ -16688,6 +17497,11 @@ packages: dev: false optional: true + /strict-uri-encode/1.1.0: + resolution: {integrity: sha512-R3f198pcvnB+5IpnBlRkphuE9n46WyVl8I39W/ZUTZLz4nqSP/oLYUrcnJrw462Ds8he4YKMov2efsTIw1BDGQ==} + engines: {node: '>=0.10.0'} + dev: true + /string-argv/0.3.1: resolution: {integrity: sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==} engines: {node: '>=0.6.19'} @@ -16837,6 +17651,17 @@ packages: engines: {node: '>=8'} dev: true + /strip-dirs/2.1.0: + resolution: {integrity: sha512-JOCxOeKLm2CAS73y/U4ZeZPTkE+gNVCzKt7Eox84Iej1LT/2pTWYpZKJuxwQpvX1LiZb1xokNR7RLfuBAa7T3g==} + dependencies: + is-natural-number: 4.0.1 + dev: true + + /strip-eof/1.0.0: + resolution: {integrity: sha512-7FCwGGmx8mD5xQd3RPUvnSpUXHM3BWuzjtpD4TXsfcZ9EL4azvVVUscFYwD9nx8Kh+uCBC00XBtAykoMHwTh8Q==} + engines: {node: '>=0.10.0'} + dev: true + /strip-final-newline/2.0.0: resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==} engines: {node: '>=6'} @@ -16852,6 +17677,21 @@ packages: engines: {node: '>=8'} dev: true + /strip-outer/1.0.1: + resolution: {integrity: sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg==} + engines: {node: '>=0.10.0'} + dependencies: + escape-string-regexp: 1.0.5 + dev: true + + /strtok3/6.3.0: + resolution: {integrity: sha512-fZtbhtvI9I48xDSywd/somNqgUHl2L2cstmXCCif0itOf96jeW18MBSyrLuNicYQVkvpOxkZtkzujiTJ9LW5Jw==} + engines: {node: '>=10'} + dependencies: + '@tokenizer/token': 0.3.0 + peek-readable: 4.1.0 + dev: true + /stubs/3.0.0: resolution: {integrity: sha512-PdHt7hHUJKxvTCgbKX9C1V/ftOcjJQgz8BZwNfV5c4B6dcGqlpelTbJ999jBGZ2jYiPAwcX5dP6oBwVlBlUbxw==} dev: false @@ -17067,6 +17907,19 @@ packages: resolution: {integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==} engines: {node: '>=6'} + /tar-stream/1.6.2: + resolution: {integrity: sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==} + engines: {node: '>= 0.8.0'} + dependencies: + bl: 1.2.3 + buffer-alloc: 1.2.0 + end-of-stream: 1.4.4 + fs-constants: 1.0.0 + readable-stream: 2.3.7 + to-buffer: 1.1.1 + xtend: 4.0.2 + dev: true + /tar-stream/2.2.0: resolution: {integrity: sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==} engines: {node: '>=6'} @@ -17105,6 +17958,11 @@ packages: dev: false optional: true + /temp-dir/1.0.0: + resolution: {integrity: sha512-xZFXEGbG7SNC3itwBzI3RYjq/cEhBkx2hJuKGIUOcEULmkQExXiHat2z/qkISYsuR+IKumhEfKKbV5qXmhICFQ==} + engines: {node: '>=4'} + dev: true + /temp/0.9.4: resolution: {integrity: sha512-yYrrsWnrXMcdsnu/7YMYAofM1ktpL5By7vZhf15CrXijWWrEYZks5AXBudalfSWJLlnen/QUJUB5aoB0kqZUGA==} engines: {node: '>=6.0.0'} @@ -17113,6 +17971,14 @@ packages: rimraf: 2.6.3 dev: true + /tempfile/2.0.0: + resolution: {integrity: sha512-ZOn6nJUgvgC09+doCEF3oB+r3ag7kUvlsXEGX069QRD60p+P3uP7XG9N2/at+EyIRGSN//ZY3LyEotA1YpmjuA==} + engines: {node: '>=4'} + dependencies: + temp-dir: 1.0.0 + uuid: 3.4.0 + dev: true + /terminal-link/2.1.1: resolution: {integrity: sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==} engines: {node: '>=8'} @@ -17173,6 +18039,32 @@ packages: webpack: 5.73.0 dev: true + /terser-webpack-plugin/5.3.3_webpack@5.74.0: + resolution: {integrity: sha512-Fx60G5HNYknNTNQnzQ1VePRuu89ZVYWfjRAeT5rITuCY/1b08s49e5kSQwHDirKZWuoKOBRFS98EUUoZ9kLEwQ==} + engines: {node: '>= 10.13.0'} + peerDependencies: + '@swc/core': '*' + esbuild: '*' + uglify-js: '*' + webpack: ^5.1.0 + peerDependenciesMeta: + '@swc/core': + optional: true + esbuild: + optional: true + uglify-js: + optional: true + webpack: + optional: true + dependencies: + '@jridgewell/trace-mapping': 0.3.14 + jest-worker: 27.5.1 + schema-utils: 3.1.1 + serialize-javascript: 6.0.0 + terser: 5.14.1 + webpack: 5.74.0 + dev: true + /terser/5.14.1: resolution: {integrity: sha512-+ahUAE+iheqBTDxXhTisdA8hgvbEG1hHOQ9xmNjeUJSoi6DU/gMrKNcfZjHkyY6Alnuyc+ikYJaxxfHkT3+WuQ==} engines: {node: '>=10'} @@ -17217,6 +18109,11 @@ packages: resolution: {integrity: sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==} dev: true + /timed-out/4.0.1: + resolution: {integrity: sha512-G7r3AhovYtr5YKOWQkta8RKAPb+J9IsO4uVmzjl8AZwfhs8UcUwTiD6gcJYSgOtzyjvQKrKYn41syHbUWMkafA==} + engines: {node: '>=0.10.0'} + dev: true + /tiny-invariant/1.0.6: resolution: {integrity: sha512-FOyLWWVjG+aC0UqG76V53yAWdXfH8bO6FNmyZOuUrzDzK8DI3/JRY25UD7+g49JWM1LXwymsKERB+DzI0dTEQA==} dev: false @@ -17247,6 +18144,10 @@ packages: resolution: {integrity: sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==} dev: true + /to-buffer/1.1.1: + resolution: {integrity: sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==} + dev: true + /to-fast-properties/2.0.0: resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} engines: {node: '>=4'} @@ -17267,6 +18168,14 @@ packages: engines: {node: '>=0.6'} dev: true + /token-types/4.2.1: + resolution: {integrity: sha512-6udB24Q737UD/SDsKAHI9FCRP7Bqc9D/MQUV02ORQg5iskjtLJlZJNdN4kKtcdtwCeWIwIHDGaUsTsCCAa8sFQ==} + engines: {node: '>=10'} + dependencies: + '@tokenizer/token': 0.3.0 + ieee754: 1.2.1 + dev: true + /totalist/1.1.0: resolution: {integrity: sha512-gduQwd1rOdDMGxFG1gEvhV88Oirdo2p+KjoYFU7k2g+i7n6AFFbDQ5kMPUsW0pNbfQsB/cwXvT1i4Bue0s9g5g==} engines: {node: '>=6'} @@ -17296,6 +18205,13 @@ packages: hasBin: true dev: true + /trim-repeated/1.0.0: + resolution: {integrity: sha512-pkonvlKk8/ZuR0D5tLW8ljt5I8kmxp2XKymhepUeOdCEfKpZaktSArkLHZt76OB1ZvO9bssUsDty4SWhLvZpLg==} + engines: {node: '>=0.10.0'} + dependencies: + escape-string-regexp: 1.0.5 + dev: true + /ts-debounce/4.0.0: resolution: {integrity: sha512-+1iDGY6NmOGidq7i7xZGA4cm8DAa6fqdYcvO5Z6yBevH++Bdo9Qt/mN0TzHUgcCcKv1gmh9+W5dHqz8pMWbCbg==} dev: true @@ -17420,6 +18336,12 @@ packages: typescript: 4.7.4 dev: true + /tunnel-agent/0.6.0: + resolution: {integrity: sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==} + dependencies: + safe-buffer: 5.2.1 + dev: true + /turndown/7.1.1: resolution: {integrity: sha512-BEkXaWH7Wh7e9bd2QumhfAXk5g34+6QUmmWx+0q6ThaVOLuLUqsnkq35HQ5SBHSaxjSfSM7US5o4lhJNH7B9MA==} dependencies: @@ -17491,6 +18413,13 @@ packages: has-symbols: 1.0.3 which-boxed-primitive: 1.0.2 + /unbzip2-stream/1.4.3: + resolution: {integrity: sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==} + dependencies: + buffer: 5.7.1 + through: 2.3.8 + dev: true + /unicode-canonical-property-names-ecmascript/2.0.0: resolution: {integrity: sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==} engines: {node: '>=4'} @@ -17594,6 +18523,25 @@ packages: webpack: 5.73.0_@swc+core@1.2.210 dev: true + /url-parse-lax/1.0.0: + resolution: {integrity: sha512-BVA4lR5PIviy2PMseNd2jbFQ+jwSwQGdJejf5ctd1rEXt0Ypd7yanUK9+lYechVlN5VaTJGsu2U/3MDDu6KgBA==} + engines: {node: '>=0.10.0'} + dependencies: + prepend-http: 1.0.4 + dev: true + + /url-parse-lax/3.0.0: + resolution: {integrity: sha512-NjFKA0DidqPa5ciFcSrXnAltTtzz84ogy+NebPvfEgAck0+TNg4UJ4IN+fB7zRZfbgUf0syOo9MDxFkDSMuFaQ==} + engines: {node: '>=4'} + dependencies: + prepend-http: 2.0.0 + dev: true + + /url-to-options/1.0.1: + resolution: {integrity: sha512-0kQLIzG4fdk/G5NONku64rSH/x32NOA39LVQqlK8Le6lvTF6GGRJpqaQFGgU+CLwySIqBSMdwYM0sYcW9f6P4A==} + engines: {node: '>= 4'} + dev: true + /url/0.10.3: resolution: {integrity: sha512-hzSUW2q06EqL1gKM/a+obYHLIO6ct2hwPuviqTTOcfFVc61UbfJ2Q32+uGL/HCPxKqrdGB5QUwIe7UqlDgwsOQ==} dependencies: @@ -17641,6 +18589,12 @@ packages: engines: {node: '>= 0.4.0'} dev: true + /uuid/3.4.0: + resolution: {integrity: sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==} + deprecated: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. + hasBin: true + dev: true + /uuid/8.0.0: resolution: {integrity: sha512-jOXGuXZAWdsTH7eZLtyXMqUb9EcWMGZNbL9YcGBJl4MH4nrxHmZJhEHvyLFrkxo+28uLb/NYRcStH48fnD0Vzw==} hasBin: true @@ -17954,6 +18908,46 @@ packages: - esbuild - uglify-js + /webpack/5.74.0: + resolution: {integrity: sha512-A2InDwnhhGN4LYctJj6M1JEaGL7Luj6LOmyBHjcI8529cm5p6VXiTIW2sn6ffvEAKmveLzvu4jrihwXtPojlAA==} + engines: {node: '>=10.13.0'} + hasBin: true + peerDependencies: + webpack-cli: '*' + peerDependenciesMeta: + webpack-cli: + optional: true + dependencies: + '@types/eslint-scope': 3.7.4 + '@types/estree': 0.0.51 + '@webassemblyjs/ast': 1.11.1 + '@webassemblyjs/wasm-edit': 1.11.1 + '@webassemblyjs/wasm-parser': 1.11.1 + acorn: 8.7.1 + acorn-import-assertions: 1.8.0_acorn@8.7.1 + browserslist: 4.21.1 + chrome-trace-event: 1.0.3 + enhanced-resolve: 5.10.0 + es-module-lexer: 0.9.3 + eslint-scope: 5.1.1 + events: 3.3.0 + glob-to-regexp: 0.4.1 + graceful-fs: 4.2.10 + json-parse-even-better-errors: 2.3.1 + loader-runner: 4.3.0 + mime-types: 2.1.35 + neo-async: 2.6.2 + schema-utils: 3.1.1 + tapable: 2.2.1 + terser-webpack-plugin: 5.3.3_webpack@5.74.0 + watchpack: 2.4.0 + webpack-sources: 3.2.3 + transitivePeerDependencies: + - '@swc/core' + - esbuild + - uglify-js + dev: true + /websocket-driver/0.7.4: resolution: {integrity: sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==} engines: {node: '>=0.8.0'} @@ -18023,6 +19017,13 @@ packages: is-typed-array: 1.1.9 dev: false + /which/1.3.1: + resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==} + hasBin: true + dependencies: + isexe: 2.0.0 + dev: true + /which/2.0.2: resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} engines: {node: '>= 8'} @@ -18132,6 +19133,11 @@ packages: resolution: {integrity: sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==} dev: true + /xtend/4.0.2: + resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} + engines: {node: '>=0.4'} + dev: true + /y-indexeddb/9.0.8_yjs@13.5.39: resolution: {integrity: sha512-PWjvuL/hjeGwvBI45U4Xe6j8o6RpOIxxSR8oUgd31Bas2susFeVDB088ev8Ijpxo3ZO7Q91PYE3I0eLBaNO/Lw==} peerDependencies: @@ -18153,7 +19159,6 @@ packages: /yallist/2.1.2: resolution: {integrity: sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==} - dev: false /yallist/4.0.0: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} @@ -18199,6 +19204,13 @@ packages: y18n: 5.0.8 yargs-parser: 21.0.1 + /yauzl/2.10.0: + resolution: {integrity: sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==} + dependencies: + buffer-crc32: 0.2.13 + fd-slicer: 1.1.0 + dev: true + /yjs/13.5.39: resolution: {integrity: sha512-EoVT856l301lomtjjVspgTdSRiFqZ7gNKnmVPX4/V8NHI5EYS39/MdjB9iNv0Mw1weKDZRU8NgxgerqwJ3y2xA==} dependencies:

DarkSky

💻 📖

Chi Zhang

💻 📖

alt1o

💻 📖

Diamond

💻 📖

Chi Zhang

💻 📖

wang xinglong

💻 📖

DiamondThree

💻 📖

Whitewater

💻 📖

zuoxiaodong0815

💻 📖

SaikaSakura

💻 📖

xiaodong zuo

💻 📖

MingLIang Wang

💻 📖

Qi

💻 📖

tuluffy

💻 📖

mitsuhatu

💻 📖

Austaras

💻 📖

Jin Yao

💻 📖