From 13fc999c250b0963eb0f92743f4c0d42968f84b9 Mon Sep 17 00:00:00 2001 From: Wendao Date: Fri, 11 Aug 2023 05:53:34 +0800 Subject: [PATCH] [update] runtime --- packages/pro | 2 +- packages/xgen/runtime.ts | 31 +++++++++++++++++++++++-------- pnpm-lock.yaml | 16 ++++++++-------- 3 files changed, 32 insertions(+), 17 deletions(-) diff --git a/packages/pro b/packages/pro index 943ae75e..96d035f5 160000 --- a/packages/pro +++ b/packages/pro @@ -1 +1 @@ -Subproject commit 943ae75e53ad29222997e88b93f315de64156271 +Subproject commit 96d035f5ed060700289729510d0f24405cbdd2db diff --git a/packages/xgen/runtime.ts b/packages/xgen/runtime.ts index 4b7d10a4..4c8f1849 100644 --- a/packages/xgen/runtime.ts +++ b/packages/xgen/runtime.ts @@ -58,23 +58,25 @@ import { verticalListSortingStrategy } from '@dnd-kit/sortable' import { CSS } from '@dnd-kit/utilities' +import EditorJS from '@editorjs/editorjs' +import { Header, Image, Marker, NestedList, Paragraph, Underline } from '@yaoapp/editorjs_plugins' import { local, session } from '@yaoapp/storex' const import_maps = { ['react']: { default: React, - ...React, - __useDefault: true + ...React, + __useDefault: true }, ['react-dom']: { default: ReactDom, ...ReactDom, - __useDefault: true + __useDefault: true }, ['react-dom/client']: { default: ReactDomClient, ...ReactDomClient, - __useDefault: true + __useDefault: true }, ['react/jsx-runtime']: { ...JsxRuntime @@ -82,11 +84,11 @@ const import_maps = { ['react-shadow']: { default: root, - __useDefault: true + __useDefault: true }, ['await-to-js']: { default: to, - __useDefault: true + __useDefault: true }, ['ts-pattern']: { match, @@ -94,11 +96,11 @@ const import_maps = { }, ['axios']: { default: axios, - __useDefault: true + __useDefault: true }, ['emittery']: { default: Emittery, - __useDefault: true + __useDefault: true }, ['nanoid']: { nanoid @@ -162,6 +164,11 @@ const import_maps = { CSS }, + ['@editorjs/editorjs']: { + default: EditorJS, + __useDefault: true + }, + ['antd']: { ConfigProvider, Input, @@ -193,6 +200,14 @@ const import_maps = { ['@yaoapp/storex']: { local, session + }, + ['@yaoapp/editorjs_plugins']: { + Header, + Image, + Marker, + NestedList, + Paragraph, + Underline } } as Record diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5a2c74dc..e1f8c822 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -184,12 +184,18 @@ importers: '@dnd-kit/utilities': specifier: ^3.2.1 version: 3.2.1(react@18.2.0) + '@editorjs/editorjs': + specifier: ^2.26.4 + version: 2.26.5 '@emotion/react': specifier: ^11.10.6 version: 11.10.6(@types/react@18.0.33)(react@18.2.0) '@phosphor-icons/react': specifier: ^2.0.8 version: 2.0.8(react-dom@18.2.0)(react@18.2.0) + '@yaoapp/editorjs_plugins': + specifier: workspace:* + version: link:../editorjs_plugins '@yaoapp/storex': specifier: workspace:^ version: link:../storex @@ -3355,7 +3361,7 @@ packages: codex-notifier: 1.1.2 codex-tooltip: 1.0.5 html-janitor: 2.0.4 - nanoid: 3.3.4 + nanoid: 3.3.6 dev: false /@editorjs/header@2.7.0: @@ -14100,16 +14106,10 @@ packages: stylis: 4.2.0 dev: false - /nanoid@3.3.4: - resolution: {integrity: sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==} - engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} - hasBin: true - /nanoid@3.3.6: resolution: {integrity: sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true - dev: false /nanoid@4.0.0: resolution: {integrity: sha512-IgBP8piMxe/gf73RTQx7hmnhwz0aaEXYakvqZyE302IXW3HyVNhdNGC+O2MwMAVhLEnvXlvKtGbtJf6wvHihCg==} @@ -15633,7 +15633,7 @@ packages: resolution: {integrity: sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==} engines: {node: ^10 || ^12 || >=14} dependencies: - nanoid: 3.3.4 + nanoid: 3.3.6 picocolors: 1.0.0 source-map-js: 1.0.2