temp
This commit is contained in:
2
packages/codemirror/.npmrc
Normal file
2
packages/codemirror/.npmrc
Normal file
@@ -0,0 +1,2 @@
|
||||
//npm.xiongxiao.me/:_authToken=${ME_NPM_TOKEN}
|
||||
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
|
||||
19
packages/codemirror/dist/editor.d.ts
vendored
Normal file
19
packages/codemirror/dist/editor.d.ts
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
import { EditorView } from 'codemirror';
|
||||
declare let editor: EditorView;
|
||||
type CreateOpts = {
|
||||
jsx?: boolean;
|
||||
typescript?: boolean;
|
||||
};
|
||||
/**
|
||||
* 创建单例
|
||||
* @param el
|
||||
* @returns
|
||||
*/
|
||||
declare const createEditorInstance: (el?: HTMLDivElement, opts?: CreateOpts) => EditorView;
|
||||
/**
|
||||
* 每次都创建新的实例
|
||||
* @param el
|
||||
* @returns
|
||||
*/
|
||||
export declare const createEditor: (el: HTMLDivElement, opts?: CreateOpts) => EditorView;
|
||||
export { editor, createEditorInstance };
|
||||
27136
packages/codemirror/dist/editor.js
vendored
Normal file
27136
packages/codemirror/dist/editor.js
vendored
Normal file
File diff suppressed because one or more lines are too long
15
packages/codemirror/dist/editor.json.d.ts
vendored
Normal file
15
packages/codemirror/dist/editor.json.d.ts
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
import { EditorView } from 'codemirror';
|
||||
declare let editor: EditorView;
|
||||
/**
|
||||
* 创建单例
|
||||
* @param el
|
||||
* @returns
|
||||
*/
|
||||
declare const createEditorInstance: (el?: HTMLDivElement) => EditorView;
|
||||
/**
|
||||
* 每次都创建新的实例
|
||||
* @param el
|
||||
* @returns
|
||||
*/
|
||||
export declare const createEditor: (el: HTMLDivElement) => EditorView;
|
||||
export { editor, createEditorInstance };
|
||||
26271
packages/codemirror/dist/editor.json.js
vendored
Normal file
26271
packages/codemirror/dist/editor.json.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
# kevisual codemirror
|
||||
|
||||
```ts
|
||||
import { createEditorInstance } from '@kevisual/codemirror';
|
||||
const editor = createEditorInstance(ref.current!, { typescript: false });
|
||||
editor.dom.style.height = '100%';
|
||||
```
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
@build:registry=https://npm.xiongxiao.me
|
||||
//npm.xiongxiao.me/:_authToken=${ME_NPM_TOKEN}
|
||||
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
|
||||
40
packages/tailwind/css/card.css
Normal file
40
packages/tailwind/css/card.css
Normal file
@@ -0,0 +1,40 @@
|
||||
@import 'tailwindcss';
|
||||
|
||||
@utility {
|
||||
.btn {
|
||||
@apply bg-blue-500 text-white font-bold py-2 px-4 rounded;
|
||||
}
|
||||
.card {
|
||||
@apply bg-white shadow-md rounded-lg p-4;
|
||||
.card-title {
|
||||
@apply text-lg font-bold;
|
||||
}
|
||||
.card-subtitle {
|
||||
@apply text-sm text-gray-500;
|
||||
}
|
||||
.card-description {
|
||||
@apply text-gray-700 break-words;
|
||||
}
|
||||
.card-code {
|
||||
@apply bg-gray-100 p-2;
|
||||
}
|
||||
.card-body {
|
||||
@apply text-gray-700;
|
||||
}
|
||||
.card-key {
|
||||
@apply text-xs text-gray-400;
|
||||
}
|
||||
.card-footer {
|
||||
@apply text-sm text-gray-500;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@utilities {
|
||||
.layout-menu {
|
||||
@apply bg-gray-900 p-2 text-white flex justify-between h-12;
|
||||
}
|
||||
.bg-custom-blue {
|
||||
background-color: #3490dc;
|
||||
}
|
||||
}
|
||||
@@ -1,15 +1,23 @@
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
@import 'tailwindcss';
|
||||
|
||||
@layer base {
|
||||
html,
|
||||
body {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font-size: 16px;
|
||||
font-family: 'Montserrat', sans-serif;
|
||||
}
|
||||
@theme {
|
||||
--color-primary: #ffc107;
|
||||
--color-secondary: #ffa000;
|
||||
--color-text-primary: #000000;
|
||||
--color-text-secondary: #000000;
|
||||
--color-success: #28a745;
|
||||
--color-scrollbar-thumb: #999999;
|
||||
--color-scrollbar-track: rgba(0, 0, 0, 0.1);
|
||||
--color-scrollbar-thumb-hover: #666666;
|
||||
--scrollbar-color: #ffc107; /* 滚动条颜色 */
|
||||
}
|
||||
|
||||
html,
|
||||
body {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font-size: 16px;
|
||||
font-family: 'Montserrat', sans-serif;
|
||||
h1 {
|
||||
@apply text-2xl font-bold;
|
||||
}
|
||||
@@ -20,42 +28,60 @@
|
||||
@apply text-lg font-bold;
|
||||
}
|
||||
}
|
||||
|
||||
@layer components {
|
||||
.btn {
|
||||
@apply bg-blue-500 text-white font-bold py-2 px-4 rounded;
|
||||
}
|
||||
.card {
|
||||
@apply bg-white shadow-md rounded-lg p-4;
|
||||
.card-title {
|
||||
@apply text-lg font-bold;
|
||||
}
|
||||
.card-subtitle {
|
||||
@apply text-sm text-gray-500;
|
||||
}
|
||||
.card-description {
|
||||
@apply text-gray-700 break-words;
|
||||
}
|
||||
.card-code {
|
||||
@apply bg-gray-100 p-2;
|
||||
}
|
||||
.card-body {
|
||||
@apply text-gray-700;
|
||||
}
|
||||
.card-key {
|
||||
@apply text-xs text-gray-400;
|
||||
}
|
||||
.card-footer {
|
||||
@apply text-sm text-gray-500;
|
||||
}
|
||||
}
|
||||
/* font-family */
|
||||
@utility font-family-mon {
|
||||
font-family: 'Montserrat', sans-serif;
|
||||
}
|
||||
@utility font-family-rob {
|
||||
font-family: 'Roboto', sans-serif;
|
||||
}
|
||||
@utility font-family-int {
|
||||
font-family: 'Inter', sans-serif;
|
||||
}
|
||||
@utility font-family-orb {
|
||||
font-family: 'Orbitron', sans-serif;
|
||||
}
|
||||
@utility font-family-din {
|
||||
font-family: 'DIN', sans-serif;
|
||||
}
|
||||
|
||||
@layer utilities {
|
||||
.layout-menu {
|
||||
@apply bg-gray-900 p-2 text-white flex justify-between h-12;
|
||||
@utility flex-row-center {
|
||||
@apply flex flex-row items-center justify-center;
|
||||
}
|
||||
@utility flex-col-center {
|
||||
@apply flex flex-col items-center justify-center;
|
||||
}
|
||||
|
||||
@utility scrollbar {
|
||||
overflow: auto;
|
||||
/* 整个滚动条 */
|
||||
&::-webkit-scrollbar {
|
||||
width: 3px;
|
||||
height: 3px;
|
||||
}
|
||||
.bg-custom-blue {
|
||||
background-color: #3490dc;
|
||||
&::-webkit-scrollbar-track {
|
||||
background-color: var(--color-scrollbar-track);
|
||||
}
|
||||
}
|
||||
/* 滚动条有滑块的轨道部分 */
|
||||
&::-webkit-scrollbar-track-piece {
|
||||
background-color: transparent;
|
||||
border-radius: 1px;
|
||||
}
|
||||
|
||||
/* 滚动条滑块(竖向:vertical 横向:horizontal) */
|
||||
&::-webkit-scrollbar-thumb {
|
||||
cursor: pointer;
|
||||
background-color: var(--color-scrollbar-thumb);
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
/* 滚动条滑块hover */
|
||||
&::-webkit-scrollbar-thumb:hover {
|
||||
background-color: var(--color-scrollbar-thumb-hover);
|
||||
}
|
||||
|
||||
/* 同时有垂直和水平滚动条时交汇的部分 */
|
||||
&::-webkit-scrollbar-corner {
|
||||
display: block; /* 修复交汇时出现的白块 */
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
@tailwind components;
|
||||
@import 'tailwindcss';
|
||||
|
||||
@layer components {
|
||||
@utility {
|
||||
.loading {
|
||||
@apply w-full h-full flex justify-center items-center;
|
||||
> div {
|
||||
@@ -11,3 +11,4 @@
|
||||
@apply w-4 h-4 border-t-2 border-b-2 rounded-full animate-spin;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
.scrollbar {
|
||||
@import 'tailwindcss';
|
||||
@utility .scrollbar {
|
||||
/* 整个滚动条 */
|
||||
&::-webkit-scrollbar {
|
||||
width: 3px;
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
@import "./css/globals.css";
|
||||
@import "./css/loading.css";
|
||||
@import "./css/scrollbar.css"
|
||||
/* @import "./css/scrollbar.css" */
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@build/tailwind",
|
||||
"version": "1.0.2-alpha-2",
|
||||
"name": "@kevisual/tailwind",
|
||||
"version": "1.0.3",
|
||||
"description": "",
|
||||
"main": "plugin/index.js",
|
||||
"type": "module",
|
||||
|
||||
@@ -15,39 +15,38 @@
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@abearxiong/ui": "0.0.1-alpha.0",
|
||||
"@kevisual/codemirror": "workspace:^",
|
||||
"@kevisual/ui": "workspace:^",
|
||||
"antd": "^5.20.6",
|
||||
"antd": "^5.25.1",
|
||||
"clsx": "^2.1.1",
|
||||
"immer": "^10.1.1",
|
||||
"lodash-es": "^4.17.21",
|
||||
"nanoid": "^5.0.7",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"react-router": "^6.26.2",
|
||||
"react-router-dom": "^6.26.2",
|
||||
"react-toastify": "^10.0.5",
|
||||
"zustand": "^4.5.5"
|
||||
"nanoid": "^5.1.5",
|
||||
"react": "^19.1.0",
|
||||
"react-dom": "^19.1.0",
|
||||
"react-router": "^7.6.0",
|
||||
"react-router-dom": "^7.6.0",
|
||||
"react-toastify": "^11.0.5",
|
||||
"zustand": "^5.0.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.10.0",
|
||||
"@eslint/js": "^9.26.0",
|
||||
"@tailwindcss/aspect-ratio": "^0.4.2",
|
||||
"@tailwindcss/typography": "^0.5.15",
|
||||
"@types/node": "^22.5.5",
|
||||
"@types/react": "^18.3.8",
|
||||
"@types/react-dom": "^18.3.0",
|
||||
"@vitejs/plugin-react": "^4.3.1",
|
||||
"autoprefixer": "^10.4.20",
|
||||
"eslint": "^9.10.0",
|
||||
"eslint-plugin-react-hooks": "^5.1.0-rc.0",
|
||||
"eslint-plugin-react-refresh": "^0.4.12",
|
||||
"globals": "^15.9.0",
|
||||
"tailwind-merge": "^2.5.2",
|
||||
"tailwindcss": "^3.4.12",
|
||||
"@tailwindcss/typography": "^0.5.16",
|
||||
"@types/node": "^22.15.17",
|
||||
"@types/react": "^19.1.3",
|
||||
"@types/react-dom": "^19.1.3",
|
||||
"@vitejs/plugin-react": "^4.4.1",
|
||||
"autoprefixer": "^10.4.21",
|
||||
"eslint": "^9.26.0",
|
||||
"eslint-plugin-react-hooks": "^5.2.0",
|
||||
"eslint-plugin-react-refresh": "^0.4.20",
|
||||
"globals": "^16.1.0",
|
||||
"tailwind-merge": "^3.2.0",
|
||||
"tailwindcss": "^4.1.6",
|
||||
"tailwindcss-animate": "^1.0.7",
|
||||
"typescript": "^5.6.2",
|
||||
"typescript-eslint": "^8.6.0",
|
||||
"vite": "^5.4.6"
|
||||
"typescript": "^5.8.3",
|
||||
"typescript-eslint": "^8.32.0",
|
||||
"vite": "^6.3.5"
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
import { createEditorInstance } from '@kevisual/codemirror/dist/editor.json';
|
||||
import { createEditorInstance } from '@kevisual/codemirror/json';
|
||||
import { useEffect, useRef } from 'react';
|
||||
export const App = () => {
|
||||
const ref = useRef<HTMLDivElement>(null);
|
||||
|
||||
@@ -11,7 +11,6 @@ export const App = ({ typescript }: AppProps) => {
|
||||
}, []);
|
||||
const init = () => {
|
||||
const editor = createEditorInstance(ref.current!, { typescript });
|
||||
editor.dom.style.height = '100%';
|
||||
};
|
||||
return (
|
||||
<div className='h-full w-full bg-gray-400'>
|
||||
|
||||
@@ -21,24 +21,23 @@
|
||||
"keywords": [],
|
||||
"author": "abearxiong",
|
||||
"devDependencies": {
|
||||
"@emotion/serialize": "^1.3.2",
|
||||
"@rollup/plugin-commonjs": "^28.0.1",
|
||||
"@rollup/plugin-node-resolve": "^15.3.0",
|
||||
"@emotion/serialize": "^1.3.3",
|
||||
"@rollup/plugin-commonjs": "^28.0.3",
|
||||
"@rollup/plugin-node-resolve": "^16.0.1",
|
||||
"@rollup/plugin-terser": "^0.4.4",
|
||||
"@rollup/plugin-typescript": "^12.1.1",
|
||||
"@rollup/plugin-typescript": "^12.1.2",
|
||||
"@types/postcss-import": "^14.0.3",
|
||||
"@types/react": "^18.3.12",
|
||||
"autoprefixer": "^10.4.20",
|
||||
"@types/react": "^19.1.3",
|
||||
"autoprefixer": "^10.4.21",
|
||||
"cross-env": "^7.0.3",
|
||||
"cssnano": "^7.0.6",
|
||||
"cssnano": "^7.0.7",
|
||||
"immer": "^10.1.1",
|
||||
"nanoid": "^5.0.8",
|
||||
"nanoid": "^5.1.5",
|
||||
"postcss-import": "^16.1.0",
|
||||
"rollup": "^4.24.3",
|
||||
"rollup": "^4.40.2",
|
||||
"rollup-plugin-postcss": "^4.0.2",
|
||||
"typescript": "^5.6.3",
|
||||
"zustand": "5.0.1",
|
||||
"@kevisual/system-ui": "^0.0.2"
|
||||
"typescript": "^5.8.3",
|
||||
"zustand": "5.0.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"dayjs": "^1.11.13",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@build/vite",
|
||||
"name": "@kevisual/vite",
|
||||
"version": "0.0.1",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
@@ -17,22 +17,22 @@
|
||||
"src"
|
||||
],
|
||||
"devDependencies": {
|
||||
"@rollup/plugin-commonjs": "^28.0.1",
|
||||
"@rollup/plugin-node-resolve": "^15.3.0",
|
||||
"@rollup/plugin-commonjs": "^28.0.3",
|
||||
"@rollup/plugin-node-resolve": "^16.0.1",
|
||||
"@rollup/plugin-terser": "^0.4.4",
|
||||
"@rollup/plugin-typescript": "^12.1.1",
|
||||
"@rollup/plugin-typescript": "^12.1.2",
|
||||
"@types/postcss-import": "^14.0.3",
|
||||
"@types/react": "^18.3.12",
|
||||
"autoprefixer": "^10.4.20",
|
||||
"@types/react": "^19.1.3",
|
||||
"autoprefixer": "^10.4.21",
|
||||
"cross-env": "^7.0.3",
|
||||
"cssnano": "^7.0.6",
|
||||
"cssnano": "^7.0.7",
|
||||
"immer": "^10.1.1",
|
||||
"nanoid": "^5.0.8",
|
||||
"nanoid": "^5.1.5",
|
||||
"postcss-import": "^16.1.0",
|
||||
"rollup": "^4.24.3",
|
||||
"rollup-plugin-dts": "^6.1.1",
|
||||
"rollup": "^4.40.2",
|
||||
"rollup-plugin-dts": "^6.2.1",
|
||||
"rollup-plugin-postcss": "^4.0.2",
|
||||
"typescript": "^5.6.3",
|
||||
"vite": "^5.4.6"
|
||||
"typescript": "^5.8.3",
|
||||
"vite": "^6.3.5"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user