neko-ui 2.3.4 → 2.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -0
- package/lib/@moneko/app/index.d.ts +50 -0
- package/lib/@moneko/coverage/index.d.ts +35 -0
- package/lib/@moneko/locales/index.d.ts +11 -0
- package/lib/@moneko/routes/index.d.ts +27 -0
- package/lib/cron/index.d.ts +4 -0
- package/lib/index.d.ts +2 -38
- package/lib/index.js +1 -1
- package/lib/provider/index.d.ts +4 -0
- package/lib/report.html +2 -2
- package/package.json +7 -4
package/README.md
CHANGED
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
[docs-url]: https://monako97.github.io/neko-ui
|
|
6
6
|
[docs-tag]: https://cdn.staticaly.com/gh/monako97/cdn/main/image/202307281701250.svg
|
|
7
7
|
[npm-url]: https://npmjs.org/package/neko-ui
|
|
8
|
+
[cli-url]: https://www.npmjs.com/package/@moneko/cli
|
|
9
|
+
[cli-tag]: https://nodei.co/npm/@moneko/cli.png
|
|
8
10
|
[install-tag]: https://nodei.co/npm/neko-ui.png
|
|
9
11
|
[version-tag]: https://img.shields.io/npm/v/neko-ui/latest.svg?logo=npm
|
|
10
12
|
[size-tag]: https://packagephobia.com/badge?p=neko-ui@latest
|
|
@@ -51,6 +53,16 @@ yarn add neko-ui -S
|
|
|
51
53
|
</body>
|
|
52
54
|
```
|
|
53
55
|
|
|
56
|
+
> 文档通过 @moneko/cli 生成
|
|
57
|
+
|
|
58
|
+
[![@moneko/cli][cli-tag]][cli-url]
|
|
59
|
+
|
|
60
|
+
## 兼容性
|
|
61
|
+
|
|
62
|
+
| [](http://godban.github.io/browsers-support-badges/)<br>IE / Edge | [](http://godban.github.io/browsers-support-badges/)<br>Firefox | [](http://godban.github.io/browsers-support-badges/)<br>Chrome | [](http://godban.github.io/browsers-support-badges/)<br>Safari | [](http://godban.github.io/browsers-support-badges/)<br>Electron |
|
|
63
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
64
|
+
| IE11, Edge | last 2 versions | last 2 versions | last 2 versions | last 2 versions |
|
|
65
|
+
|
|
54
66
|
## 感谢
|
|
55
67
|
|
|
56
68
|
[![jetbrains][jetbrains-tag]][jetbrains-url]
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/** 虚拟模块 @app
|
|
2
|
+
* @ignore optional
|
|
3
|
+
*/
|
|
4
|
+
export interface Api {
|
|
5
|
+
/** 应用名称 */
|
|
6
|
+
name: string;
|
|
7
|
+
/** 应用名称(大写) */
|
|
8
|
+
projectName: string;
|
|
9
|
+
/** 应用描述 */
|
|
10
|
+
description: string;
|
|
11
|
+
/** 应用版本 */
|
|
12
|
+
version: string;
|
|
13
|
+
/** 应用类型 */
|
|
14
|
+
type: 'mobile' | 'site' | 'backstage' | 'micro' | 'library';
|
|
15
|
+
/** 开发者 */
|
|
16
|
+
author: Author;
|
|
17
|
+
/** 存储库 */
|
|
18
|
+
repository: Repository;
|
|
19
|
+
/** 路由模式 */
|
|
20
|
+
routerMode: 'hash' | 'browser';
|
|
21
|
+
/** 根路由 */
|
|
22
|
+
base: string;
|
|
23
|
+
/** 类名前缀 */
|
|
24
|
+
prefixCls?: string;
|
|
25
|
+
/** 主题风格 */
|
|
26
|
+
theme?: string;
|
|
27
|
+
}
|
|
28
|
+
/** 开发者
|
|
29
|
+
* @ignore optional
|
|
30
|
+
*/
|
|
31
|
+
interface Author {
|
|
32
|
+
/** 名称 */
|
|
33
|
+
name: string;
|
|
34
|
+
/** 主页 */
|
|
35
|
+
url?: string;
|
|
36
|
+
/** 邮箱 */
|
|
37
|
+
email?: string;
|
|
38
|
+
}
|
|
39
|
+
/** 存储库
|
|
40
|
+
* @ignore optional
|
|
41
|
+
*/
|
|
42
|
+
interface Repository {
|
|
43
|
+
/** 类型 */
|
|
44
|
+
type?: string;
|
|
45
|
+
/** 存储库地址 */
|
|
46
|
+
url?: string;
|
|
47
|
+
/** 存储库目录 */
|
|
48
|
+
directory?: string;
|
|
49
|
+
}
|
|
50
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/** 文件级覆盖率
|
|
2
|
+
* @ignore optional
|
|
3
|
+
*/
|
|
4
|
+
export interface CoverageType {
|
|
5
|
+
/** 语句(statement coverage) */
|
|
6
|
+
statements: string;
|
|
7
|
+
/** 语句覆盖: 是不是每个语句都执行了 */
|
|
8
|
+
coveredstatements: string;
|
|
9
|
+
/** 条件(branch coverage) */
|
|
10
|
+
conditionals: string;
|
|
11
|
+
/** 条件覆盖: 是不是每个条件代码块都执行了 */
|
|
12
|
+
coveredconditionals: string;
|
|
13
|
+
/** 函数(function coverage) */
|
|
14
|
+
methods: string;
|
|
15
|
+
/** 函数覆盖: 是不是每个函数都调用了 */
|
|
16
|
+
coveredmethods: string;
|
|
17
|
+
}
|
|
18
|
+
/** 项目级覆盖率
|
|
19
|
+
* @ignore optional
|
|
20
|
+
*/
|
|
21
|
+
export interface ProjectCoverageType {
|
|
22
|
+
/** 元素 */
|
|
23
|
+
elements: string;
|
|
24
|
+
/** 覆盖元素 */
|
|
25
|
+
coveredelements: string;
|
|
26
|
+
complexity: string;
|
|
27
|
+
loc: string;
|
|
28
|
+
ncloc: string;
|
|
29
|
+
/** 经过测试的组件 */
|
|
30
|
+
packages: string;
|
|
31
|
+
/** 经过测试的文件 */
|
|
32
|
+
files: string;
|
|
33
|
+
/** 经过测试的类 */
|
|
34
|
+
classes: string;
|
|
35
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { RouteDefinition } from '@solidjs/router';
|
|
2
|
+
interface IRouteDefinition extends Omit<RouteDefinition, 'children'> {
|
|
3
|
+
children?: RouteConfig[];
|
|
4
|
+
}
|
|
5
|
+
export interface RouteConfig extends IRouteDefinition {
|
|
6
|
+
/** 菜单id */
|
|
7
|
+
key?: string;
|
|
8
|
+
/** 地址 */
|
|
9
|
+
path: string;
|
|
10
|
+
/** 图标 */
|
|
11
|
+
icon?: string;
|
|
12
|
+
/** 名称 */
|
|
13
|
+
label?: string | null;
|
|
14
|
+
/** 隐藏菜单 */
|
|
15
|
+
hideMenu?: boolean;
|
|
16
|
+
/** 隐藏标签页 */
|
|
17
|
+
hideTab?: boolean;
|
|
18
|
+
/** 菜单父id */
|
|
19
|
+
parentId?: string;
|
|
20
|
+
/** 可否关闭标签 */
|
|
21
|
+
closable?: boolean;
|
|
22
|
+
/** 子菜单 */
|
|
23
|
+
props?: Record<string, Any>;
|
|
24
|
+
/** 元数据 */
|
|
25
|
+
meta?: Record<string, string | number | boolean>;
|
|
26
|
+
}
|
|
27
|
+
export {};
|
package/lib/cron/index.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { type JSX } from 'solid-js';
|
|
2
2
|
import type { CustomElement } from '..';
|
|
3
3
|
export interface CronProps extends Omit<JSX.HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
4
|
+
/** 自定义类名 */
|
|
5
|
+
class?: string;
|
|
6
|
+
/** 自定义样式表 */
|
|
7
|
+
css?: string;
|
|
4
8
|
/** 隐藏域 */
|
|
5
9
|
exclude?: string[];
|
|
6
10
|
/** 显示表达式
|
package/lib/index.d.ts
CHANGED
|
@@ -38,6 +38,8 @@ export { default as Typography, type TypographyElement, type TypographyProps } f
|
|
|
38
38
|
export { default as dayjs } from './date-picker/dayjs';
|
|
39
39
|
export { default as Provider, type ProviderElement, type ProviderProps } from './provider';
|
|
40
40
|
export { hot, customElement, noShadowDOM, withSolid, getCurrentElement } from 'solid-element';
|
|
41
|
+
export type { CustomElement } from 'custom-element-type';
|
|
42
|
+
import { Transform } from 'custom-element-type';
|
|
41
43
|
import type { AvatarElement, AvatarGroupElement, BackTopElement, ButtonElement, CaptureScreenElement, CarouselElement, CheckboxBoolElement, CheckboxGroupElement, CodeElement, ColorPaletteElement, ColorPickerElement, CronElement, DatePickerElement, DropdownElement, DropdownMultipleElement, EmptyElement, HighlightTextElement, ImgElement, InputElement, InputNumberElement, MdElement, MenuElement, MenuMultipleElement, PaginationElement, PopoverElement, ProviderElement, RadioElement, SegmentedElement, SelectElement, SelectMultipleElement, SkeletonElement, SpinElement, SwitchElement, TableElement, TabsElement, TagElement, TreeElement, TreeMultipleElement, TreeMultipleSchemaElement, TreeMultipleStringElement, TreeSchemaElement, TreeStringElement, TypographyElement } from '.';
|
|
42
44
|
/** 组件列表
|
|
43
45
|
* @author monako97
|
|
@@ -121,44 +123,6 @@ interface CustomElementTags {
|
|
|
121
123
|
*/
|
|
122
124
|
'n-provider': ProviderElement;
|
|
123
125
|
}
|
|
124
|
-
type Any = any;
|
|
125
|
-
interface ICustomElement {
|
|
126
|
-
[prop: string]: Any;
|
|
127
|
-
__initialized?: boolean;
|
|
128
|
-
__released: boolean;
|
|
129
|
-
__releaseCallbacks: Any[];
|
|
130
|
-
__propertyChangedCallbacks: Any[];
|
|
131
|
-
__updating: Record<string, Any>;
|
|
132
|
-
props: Record<string, Any>;
|
|
133
|
-
lookupProp(attrName: string): string | undefined;
|
|
134
|
-
renderRoot: Element | Document | ShadowRoot | DocumentFragment;
|
|
135
|
-
addReleaseCallback(fn: () => void): void;
|
|
136
|
-
addPropertyChangedCallback(fn: (name: string, value: any) => void): void;
|
|
137
|
-
}
|
|
138
|
-
type IEvent<T> = (e: CustomEvent<T>) => void;
|
|
139
|
-
type ICustomEvent<T, K extends keyof T> = T extends {
|
|
140
|
-
[key in K]?: (v: infer V) => void;
|
|
141
|
-
} ? IEvent<V> : T extends {
|
|
142
|
-
[key in K]?: (...args: infer Args) => void;
|
|
143
|
-
} ? IEvent<Args> : never;
|
|
144
|
-
type Hyphenate<T> = T extends `${infer First}${infer Rest}` ? Rest extends Uncapitalize<Rest> ? `${Lowercase<First>}${Hyphenate<Rest>}` : `${Lowercase<First>}-${Hyphenate<Rest>}` : T;
|
|
145
|
-
type TransformKeys<T> = {
|
|
146
|
-
[K in keyof T as T[K] extends symbol | string | number | boolean | undefined | null ? Hyphenate<K> : K]: T[K];
|
|
147
|
-
};
|
|
148
|
-
type Transform<T> = {
|
|
149
|
-
[K in keyof T]: TransformKeys<T[K]>;
|
|
150
|
-
};
|
|
151
|
-
type IOmit<T, Keys extends keyof T> = Omit<T, Keys> & {
|
|
152
|
-
[K in Keys]?: ICustomEvent<T, K>;
|
|
153
|
-
};
|
|
154
|
-
export type CustomElement<T extends Partial<ICustomElement> = ICustomElement, E extends string = 'onChange'> = IOmit<T, E> & {
|
|
155
|
-
ref?: CustomElement<T, E> | {
|
|
156
|
-
current: CustomElement<T, E> | null;
|
|
157
|
-
};
|
|
158
|
-
shadowRoot?: ShadowRoot | Element | null;
|
|
159
|
-
offsetWidth?: number;
|
|
160
|
-
part?: string;
|
|
161
|
-
};
|
|
162
126
|
type IntrinsicNekoElement = Transform<CustomElementTags>;
|
|
163
127
|
declare module 'solid-js' {
|
|
164
128
|
namespace JSX {
|