Skip to content

Commit

Permalink
fix: stylint
Browse files Browse the repository at this point in the history
  • Loading branch information
monako97 committed Apr 21, 2023
1 parent ff519b4 commit 0cc1814
Show file tree
Hide file tree
Showing 13 changed files with 42 additions and 44 deletions.
3 changes: 0 additions & 3 deletions .stylelintrc.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
extends:
- stylelint-config-moneko
ignoreFiles:
- coverage/**/*
- components/emotion/index.ts
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Unreleased (2023-04-21)
## [1.0.48](https://github.com/monako97/neko-ui/compare/1.0.47...1.0.48) (2023-04-21)



Expand Down
2 changes: 2 additions & 0 deletions components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ export { default as Carousel, type CarouselProps } from './carousel';

export type ComponentSize = 'small' | 'normal' | 'large';

export { default as Portal, type PortalProps } from './portal';

export { default as prefixCls, setPrefixCls } from './prefix-cls';

export { default as highlight } from './highlight';
Expand Down
2 changes: 1 addition & 1 deletion components/photo/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ injectGlobal`
.${cls.img} {
position: relative;
z-index: 1;
border-radius: 8px;
inline-size: 100%;
block-size: 100%;
object-fit: contain;
content-visibility: auto;
backdrop-filter: blur(16px);
-webkit-backdrop-filter: blur(16px);
border-radius: 8px;
}
.${cls.close} {
Expand Down
11 changes: 4 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "neko-ui",
"version": "1.0.47",
"version": "1.0.48",
"description": "UI库",
"main": "lib/index.js",
"scripts": {
Expand All @@ -26,7 +26,7 @@
"@commitlint/cli": "17.6.1",
"@commitlint/config-conventional": "17.6.1",
"@moneko/cli": "1.1.15",
"@moneko/core": "2.0.56",
"@moneko/core": "2.0.58",
"@moneko/postcss": "1.0.29",
"@moneko/react-live": "3.1.3",
"@swc/jest": "0.2.26",
Expand All @@ -44,20 +44,17 @@
"jest-environment-jsdom": "29.5.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"stylelint-config-moneko": "1.0.13",
"stylelint-config-moneko": "1.0.14",
"ts-node": "10.9.1"
},
"dependencies": {
"@emotion/css": "11.10.6",
"@moneko/common": "1.0.33",
"@moneko/common": "1.0.34",
"katex": "0.16.6",
"marked-completed": "1.2.5",
"shared-store-object": "1.0.7",
"stylis-px2rem-plugin": "0.1.0"
},
"resolutions": {
"terser": "npm:@swc/core"
},
"files": [
"lib",
"es",
Expand Down
48 changes: 27 additions & 21 deletions site/components/bg.tsx
Original file line number Diff line number Diff line change
@@ -1,30 +1,36 @@
import React from 'react';
import { css, keyframes } from '@emotion/css';
import { createPortal } from 'react-dom';
import { injectGlobal, Portal } from 'neko-ui';

const colorfulStripe = keyframes`
100% {
filter: hue-rotate(360deg);
injectGlobal`
.n-site-bg {
position: fixed;
inset-block-start: 50%;
inset-inline-start: 50%;
z-index: -1;
inline-size: 100vi;
block-size: 100vb;
background: linear-gradient(limegreen, transparent),
linear-gradient(90deg, skyblue, transparent), linear-gradient(-90deg, coral, transparent);
transform: translate(-50%, -50%);
background-blend-mode: screen;
animation: color-ful-stripe 15s infinite alternate linear;
pointer-events: none;
opacity: 0.05;
}
@keyframes color-ful-stripe {
100% {
filter: hue-rotate(360deg);
}
}
`;
const bg = css`
position: fixed;
inset-block-start: 50%;
inset-inline-start: 50%;
z-index: -1;
inline-size: 100vi;
block-size: 100vb;
background: linear-gradient(limegreen, transparent), linear-gradient(90deg, skyblue, transparent),
linear-gradient(-90deg, coral, transparent);
transform: translate(-50%, -50%);
background-blend-mode: screen;
animation: ${colorfulStripe} 15s infinite alternate linear;
pointer-events: none;
opacity: 0.05;
`;

const Bg: React.FC = () => {
return createPortal(<div className={bg} />, document.body);
return (
<Portal>
<div className="n-site-bg" />
</Portal>
);
};

export default Bg;
2 changes: 1 addition & 1 deletion site/components/coverage.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useMemo } from 'react';
import { cx, injectGlobal } from '@emotion/css';
import { projectBasicInfo, useLocation, useOutlet } from '@moneko/core';
import { cx, injectGlobal } from 'neko-ui';

const cover = projectBasicInfo.coverage;
const projectCoverage = cover[projectBasicInfo.programInfo.name] || {};
Expand Down
2 changes: 1 addition & 1 deletion site/components/empty.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { injectGlobal } from '@emotion/css';
import { injectGlobal } from 'neko-ui';
import getBrowser from 'neko-ui/utils/broswer';
import jb_beam from '@/assets/images/jb_beam.svg';
import { projectInfo } from '@/utils';
Expand Down
3 changes: 1 addition & 2 deletions site/components/fallback.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';
import { injectGlobal } from '@emotion/css';
import { Skeleton } from 'neko-ui';
import { Skeleton, injectGlobal } from 'neko-ui';

injectGlobal`
.site-fallback {
Expand Down
2 changes: 1 addition & 1 deletion site/components/footer.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { css } from '@emotion/css';
import { css } from 'neko-ui';
import { projectInfo } from '@/utils';

const footer = css`
Expand Down
3 changes: 1 addition & 2 deletions site/components/sandbox.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import React, { useEffect, useMemo, useRef } from 'react';
import { cx, injectGlobal } from '@emotion/css';
import { mdxComponents, type ExampleModule, myDemoKv, sso } from '@moneko/core';
import { LiveProvider, LiveEditor, LiveError, LivePreview } from '@moneko/react-live';
import { Markdown, Prism } from 'neko-ui';
import { cx, injectGlobal, Markdown, Prism } from 'neko-ui';

injectGlobal`
.sandbox-box {
Expand Down
3 changes: 1 addition & 2 deletions site/components/sider.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import React, { useCallback, useEffect, useMemo, useRef } from 'react';
import { injectGlobal } from '@emotion/css';
import { updateStyleRule } from '@moneko/common';
import { myPkgs, MyPkg, useLocation, Link } from '@moneko/core';
import { Avatar, colorScheme } from 'neko-ui';
import { Avatar, colorScheme, injectGlobal } from 'neko-ui';
import { projectInfo } from '@/utils';

injectGlobal`
Expand Down
3 changes: 1 addition & 2 deletions site/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React, { useEffect, useRef, memo } from 'react';
import { injectGlobal } from '@emotion/css';
import { useLocation, useOutlet } from '@moneko/core';
import { BackTop } from 'neko-ui';
import { BackTop, injectGlobal } from 'neko-ui';
import Bg from '@/components/bg';
import Coverage from '@/components/coverage';
import Empty from '@/components/empty';
Expand Down

0 comments on commit 0cc1814

Please sign in to comment.